From patchwork Thu May 14 16:12:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 48518 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4B52721411 for ; Thu, 14 May 2015 16:18:42 +0000 (UTC) Received: by wgtl5 with SMTP id l5sf21036663wgt.1 for ; Thu, 14 May 2015 09:18:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=TADbc1lkh2UrYJjSQ1FSAvzefnVy0vsM3tHBqPoOTtI=; b=EjyP15bKrR90ab6tOeGY7lrg0lXord4fO1ttMw4B3KCZDknt0iVWAdY1b1RIwLeC2h EThxD/JaBGb0UWCKZ0fqY2LhblLQJNfhwIKn97BUEgA4r1jPL6SWbDj8IQb6pgeFZRTB SVzWa325PNuXlQPCV6aVFOdReuffZxXa7yzOqoA0nkWqSujWZ96/pLVZ6XYALEUlzP75 ArwvzhF76JHlkUCWLTE1eJieylzB4Lm8vkSbKyU6WgKwcirCpx+gtG4yBger7yTYUzmB QE+ZpxQXoVf3/VhO4Jxr9fDKqju855VgLTXwB1UBs97K0Kes8EDDFb2Oki8eM7USbX8j oEMw== X-Gm-Message-State: ALoCoQl8oFWP84FczzSqNqTeBHBeo3J2WNF1WhJk+R38FPHJ/bvVTcNbzUo9JP1jU6BThUE0K3u1 X-Received: by 10.112.151.146 with SMTP id uq18mr3575633lbb.20.1431620321591; Thu, 14 May 2015 09:18:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.72 with SMTP id h8ls449742laa.71.gmail; Thu, 14 May 2015 09:18:41 -0700 (PDT) X-Received: by 10.152.116.49 with SMTP id jt17mr3790861lab.82.1431620321386; Thu, 14 May 2015 09:18:41 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id z7si14858443lal.43.2015.05.14.09.18.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:18:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lagv1 with SMTP id v1so75140349lag.3 for ; Thu, 14 May 2015 09:18:41 -0700 (PDT) X-Received: by 10.112.182.4 with SMTP id ea4mr3890763lbc.35.1431620321285; Thu, 14 May 2015 09:18:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1380135lbb; Thu, 14 May 2015 09:18:40 -0700 (PDT) X-Received: by 10.70.54.103 with SMTP id i7mr9704874pdp.134.1431620319634; Thu, 14 May 2015 09:18:39 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id py8si33132171pab.158.2015.05.14.09.18.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:18:39 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ysvnh-0008Py-Bg; Thu, 14 May 2015 16:15:57 +0000 Received: from mail-la0-f46.google.com ([209.85.215.46]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ysvl6-0005Yv-9N for linux-arm-kernel@lists.infradead.org; Thu, 14 May 2015 16:13:17 +0000 Received: by labbd9 with SMTP id bd9so75020099lab.2 for ; Thu, 14 May 2015 09:12:54 -0700 (PDT) X-Received: by 10.112.150.100 with SMTP id uh4mr3719926lbb.112.1431619974104; Thu, 14 May 2015 09:12:54 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id dh4sm6254328lac.12.2015.05.14.09.12.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 09:12:53 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 03/10] ARM: ux500: remap BB offset dynamically Date: Thu, 14 May 2015 18:12:47 +0200 Message-Id: <1431619967-14930-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150514_091316_574083_4A4F8A9D X-CRM114-Status: GOOD ( 11.15 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.46 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.46 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Linus Walleij X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Instead of relying on static maps, remap the BB chip ID offset dynamically. Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/cpu-db8500.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 391d329a7e88..0b3ebbf38702 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -104,14 +104,18 @@ static struct arm_pmu_platdata db8500_pmu_platdata = { static const char *db8500_read_soc_id(void) { - void __iomem *uid = __io_address(U8500_BB_UID_BASE); + void __iomem *uid; + uid = ioremap(U8500_BB_UID_BASE, 0x20); + if (!uid) + return NULL; /* Throw these device-specific numbers into the entropy pool */ add_device_randomness(uid, 0x14); return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", readl((u32 *)uid+0), readl((u32 *)uid+1), readl((u32 *)uid+2), readl((u32 *)uid+3), readl((u32 *)uid+4)); + iounmap(uid); } static struct device * __init db8500_soc_device_init(void)