From patchwork Sun Jul 30 23:51:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Derald D. Woods" X-Patchwork-Id: 795470 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="u1VXoaEV"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xLK9q73Smz9sNV for ; Mon, 31 Jul 2017 09:51:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2F5A5C21EC0; Sun, 30 Jul 2017 23:51:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 553FDC21C8F; Sun, 30 Jul 2017 23:51:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 91BB2C21C8F; Sun, 30 Jul 2017 23:51:32 +0000 (UTC) Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by lists.denx.de (Postfix) with ESMTPS id F355FC21C54 for ; Sun, 30 Jul 2017 23:51:31 +0000 (UTC) Received: by mail-io0-f172.google.com with SMTP id g13so104919108ioj.5 for ; Sun, 30 Jul 2017 16:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bCQ5G+IX0Ne6b/A8NAlbZA6s54/nCLvWOYvqt5VipkU=; b=u1VXoaEVMWYUBQmk4HVlqwVD+ZiAA+YMRX5SYRep1yH3P8S+VfRKYnx/+hMGFC5LHj Fjcxss/HM3NJfXx5fqZlzMSMSEVT6rBn2EpsSEdAWAb3OwAQGWf1iJyFc8OPS2BhefdR agVOhXQQ/nzFi0s3rtW3Ml2Bdw9g9MkrSS5eHxnw/o+HxRYV1JCekEovCcisUuz7lbuL yDNck0hq6laoBGFMTe4A7w8IFe9bysq/oSYX+cJtTjlF8YCXXfvHkSc5XiBblDu0iiRC wkxzInmnhqlUWGW/sxV+7Z0D2mPS1I76VywCHWoPqFNL3t6+vAP4vYWrtD5IpA5LhFGi 2QyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bCQ5G+IX0Ne6b/A8NAlbZA6s54/nCLvWOYvqt5VipkU=; b=J+EAJG8jQfq9ulgQQEgEkqoRryd7kjEigJ6ERJNcjvIN9t15I/XqEYF/zX66vFg68r TxR4/Qt3OVUWE78ZE8YyQq6Kdsc8Ds3BqIaaJhkKh69rV4JJtb3Mty3Ba762j+bna5QE EmqmezJ0tDecjrdJgj0l0ZgiQ6lb1SjFudFfItl4yj1UKtGhki5i2b2JUvwzp5W6hQBb cRVy9TGKjNoqEUD7KErEaGtOA+Y+IQYLRmrBU8csiDNZ6RRb94ABxfpchFDFlUSfLDot Wqd3gx4/TL7SW5cSdWZPMQRHAWHpSz1Nlx8hcCaXcQkxPAAJFGJXdz+UvmcR4rfgRwDr 0PFw== X-Gm-Message-State: AIVw111QoTTTwR9onm71sQ3Ryj94XEAlIMQMsNw+e/fhaG/Hj0KxDAzT e5Q4zx29HCF+QHCM X-Received: by 10.107.134.87 with SMTP id i84mr15985884iod.292.1501458690205; Sun, 30 Jul 2017 16:51:30 -0700 (PDT) Received: from exodus.hsd1.il.comcast.net ([2601:247:c080:b23:eb85:522a:f9fb:2eb1]) by smtp.gmail.com with ESMTPSA id t9sm12619071iof.40.2017.07.30.16.51.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Jul 2017 16:51:28 -0700 (PDT) From: "Derald D. Woods" To: u-boot@lists.denx.de Date: Sun, 30 Jul 2017 18:51:11 -0500 Message-Id: <20170730235111.6256-1-woods.technical@gmail.com> X-Mailer: git-send-email 2.13.3 Subject: [U-Boot] [PATCH] arm: omap: Fix 'get_device_type()' for OMAP34XX X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Fixes 00bbe96ebabb (arm: omap: Unify get_device_type() function) where the control status register value is embedded in a structure somewhere in SRAM. This patch allows OMAP3 EVM (TMDSEVM3530) to boot again using a known global constant and offset for 'readl'. --- arch/arm/mach-omap2/sysinfo-common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-omap2/sysinfo-common.c b/arch/arm/mach-omap2/sysinfo-common.c index 1dc7051ab3..3955e803ad 100644 --- a/arch/arm/mach-omap2/sysinfo-common.c +++ b/arch/arm/mach-omap2/sysinfo-common.c @@ -16,6 +16,10 @@ */ u32 get_device_type(void) { +#if defined(CONFIG_OMAP34XX) + return (readl(OMAP34XX_CTRL_BASE + 0x2f0) & DEVICE_TYPE_MASK) >> + DEVICE_TYPE_SHIFT; +#endif return (readl((*ctrl)->control_status) & DEVICE_TYPE_MASK) >> DEVICE_TYPE_SHIFT; }