From patchwork Fri Sep 14 21:34:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11439 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9870623E42 for ; Fri, 14 Sep 2012 21:35:47 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id E822AA39257 for ; Fri, 14 Sep 2012 21:35:46 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j25so3512549iaf.11 for ; Fri, 14 Sep 2012 14:35:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=BtZOiOPU44g/lPtU7NpXcizMnqeelusJHyt2Y/1CGKY=; b=fbeKF3bwFLO0cQUV2A5IsxJE7IMuuxdhc5a5ku+HYnPbAOsYPlWgNfo/h1I6bdHSsr 9HbyEcnxyOkxhR9LH4eAZ2/VnJwErNNLITItE11OD7BywI4lF4gw/tU6OXmdRgmgxCRG rdHTgaJJG9b1lYu6zFQLftAM1sful3a7Yg3MwIuUYVtCJmCi15PHPvOQabzB1WKho8HN eNnJ7aAKYe4PQ+olyXxbFH7gip6IYHH86n5yDqQBFBG7s85nVzsE+mcb33SNQhvsqL8B 65zx3DXE+PIop4eYatwOQYL3Ms3SAlxKZ4OdCEb9LNZ/7KQXg+eEvI2wkOR8hF0/tO+F bWPA== Received: by 10.42.84.69 with SMTP id k5mr3469943icl.5.1347658546664; Fri, 14 Sep 2012 14:35:46 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp215434igc; Fri, 14 Sep 2012 14:35:45 -0700 (PDT) Received: by 10.181.13.208 with SMTP id fa16mr702614wid.11.1347658544727; Fri, 14 Sep 2012 14:35:44 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.10]) by mx.google.com with ESMTP id e47si3604332wep.3.2012.09.14.14.35.44; Fri, 14 Sep 2012 14:35:44 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.10; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.17.10 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LjcUK-1TnuEe3RDE-00c8i3; Fri, 14 Sep 2012 23:35:25 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Will Deacon , Russell King , Nicolas Pitre , Arnd Bergmann , David Brown , Daniel Walker , Bryan Huntsman Subject: [PATCH 12/24] ARM: msm: use __iomem pointers for MMIO Date: Fri, 14 Sep 2012 23:34:40 +0200 Message-Id: <1347658492-11608-13-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1347658492-11608-1-git-send-email-arnd@arndb.de> References: <1347658492-11608-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:kEi6i0WtXaISfPKdcEmLxULugblOkbXQCw62yqILVuH +GuwUxyMTso5aoo7A13OrUNYMRxc8IsaIqnn+Zzc56slxDReW9 oP6UK1lV44saHmX1bqijs59LAHndZ+21VFFWy+2ozuVPFeKXrp CJ9Va/nF7+BhrUGip/9aauMOoNd8oCu8DtrC4H97ivRvfZvd89 oiI0VzYXzcUOhPcN8KSsOcYzVMXiWdNZB4iz1QlExfPKVA6DZk x4MIrRqXNbnUAxGAFdS3phqsuCHrm0WxAzOfvwP/pceCMs1h9P iEDZO5mi2etspcZOwrf+KHO6nXYOkqynnZhnFor1e1Sya3GtbN ir1AXLAHn+NuwNjWSSzQGWJ4edsrk/L3mVeh2NyvqWABBzYqFC gsdI52ZXun0cA== X-Gm-Message-State: ALoCoQluCjHoQoYEOC4ikSPhDW2EHAdd1WTKwTyGo2KXIBl2npofVfhhylCHlShUCf+ut73hTV0S ARM is moving to stricter checks on readl/write functions, so we need to use the correct types everywhere. Cc: David Brown Cc: Daniel Walker Cc: Bryan Huntsman Signed-off-by: Arnd Bergmann --- arch/arm/mach-msm/smd.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c index 657be73..f4e475c 100644 --- a/arch/arm/mach-msm/smd.c +++ b/arch/arm/mach-msm/smd.c @@ -52,13 +52,14 @@ static int msm_smd_debug_mask; struct shared_info { int ready; - unsigned state; + void __iomem *state; }; static unsigned dummy_state[SMSM_STATE_COUNT]; static struct shared_info smd_info = { - .state = (unsigned) &dummy_state, + /* FIXME: not a real __iomem pointer */ + .state = &dummy_state, }; module_param_named(debug_mask, msm_smd_debug_mask, @@ -796,22 +797,22 @@ void *smem_alloc(unsigned id, unsigned size) return smem_find(id, size); } -void *smem_item(unsigned id, unsigned *size) +void __iomem *smem_item(unsigned id, unsigned *size) { struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE; struct smem_heap_entry *toc = shared->heap_toc; if (id >= SMEM_NUM_ITEMS) - return 0; + return NULL; if (toc[id].allocated) { *size = toc[id].size; - return (void *) (MSM_SHARED_RAM_BASE + toc[id].offset); + return (MSM_SHARED_RAM_BASE + toc[id].offset); } else { *size = 0; } - return 0; + return NULL; } void *smem_find(unsigned id, unsigned size_in) @@ -857,7 +858,7 @@ static irqreturn_t smsm_irq_handler(int irq, void *data) int smsm_change_state(enum smsm_state_item item, uint32_t clear_mask, uint32_t set_mask) { - unsigned long addr = smd_info.state + item * 4; + void __iomem *addr = smd_info.state + item * 4; unsigned long flags; unsigned state; @@ -943,10 +944,10 @@ int smd_core_init(void) /* wait for essential items to be initialized */ for (;;) { unsigned size; - void *state; + void __iomem *state; state = smem_item(SMEM_SMSM_SHARED_STATE, &size); if (size == SMSM_V1_SIZE || size == SMSM_V2_SIZE) { - smd_info.state = (unsigned)state; + smd_info.state = state; break; } }