From patchwork Wed Mar 18 15:53:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 6041461 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0305C9F314 for ; Wed, 18 Mar 2015 16:03:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23B7720374 for ; Wed, 18 Mar 2015 16:03:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1338B2024F for ; Wed, 18 Mar 2015 16:03:47 +0000 (UTC) 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 1YYGP5-0004kV-8n; Wed, 18 Mar 2015 16:01:07 +0000 Received: from ducie-dc1.codethink.co.uk ([185.25.241.215]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YYGI1-0002qk-Lz for linux-arm-kernel@lists.infradead.org; Wed, 18 Mar 2015 15:53:51 +0000 Received: from localhost (localhost [127.0.0.1]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTP id 55664460A7F; Wed, 18 Mar 2015 15:53:30 +0000 (GMT) X-Virus-Scanned: Debian amavisd-new at ducie-dc1.codethink.co.uk Received: from ducie-dc1.codethink.co.uk ([127.0.0.1]) by localhost (ducie-dc1.codethink.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wbEbwycENosi; Wed, 18 Mar 2015 15:53:28 +0000 (GMT) Received: from rainbowdash.ducie.codethink.co.uk (rainbowdash.dyn.ducie.codethink.co.uk [10.24.2.99]) by ducie-dc1.codethink.co.uk (Postfix) with ESMTPS id 6C38A460A82; Wed, 18 Mar 2015 15:53:27 +0000 (GMT) Received: from ben by rainbowdash.ducie.codethink.co.uk with local (Exim 4.84) (envelope-from ) id 1YYGHf-00087e-3o; Wed, 18 Mar 2015 15:53:27 +0000 From: Ben Dooks To: linux-kernel@lists.codethink.co.uk, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/13] ARM: at91: setup.c: use endian agnostic IO functions Date: Wed, 18 Mar 2015 15:53:03 +0000 Message-Id: <1426693992-31163-5-git-send-email-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426693992-31163-1-git-send-email-ben.dooks@codethink.co.uk> References: <1426693992-31163-1-git-send-email-ben.dooks@codethink.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150318_085350_090035_02A371A3 X-CRM114-Status: GOOD ( 10.91 ) X-Spam-Score: -0.0 (/) Cc: Jean-Christophe Plagniol-Villard , Ben Dooks , Nicolas Ferre , Andrew Victor , Russell King 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the endian agnostic IO accessors in setup.c to avoid issues if running on an big endian capable cpu Signed-off-by: Ben Dooks --- CC: Andrew Victor CC: Nicolas Ferre CC: Jean-Christophe Plagniol-Villard CC: Russell King CC: Linux ARM Kernel --- arch/arm/mach-at91/setup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 4e58bc9..7bf81fd 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -46,7 +46,7 @@ static void __init soc_detect(u32 dbgu_base) { u32 cidr, socid; - cidr = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_CIDR); + cidr = readl_relaxed(AT91_IO_P2V(dbgu_base) + AT91_DBGU_CIDR); socid = cidr & ~AT91_CIDR_VERSION; switch (socid) { @@ -96,7 +96,7 @@ static void __init soc_detect(u32 dbgu_base) break; case ARCH_ID_SAMA5: - at91_soc_initdata.exid = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID); + at91_soc_initdata.exid = readl_relaxed(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID); if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D3) { at91_soc_initdata.type = AT91_SOC_SAMA5D3; } @@ -121,7 +121,7 @@ static void __init soc_detect(u32 dbgu_base) /* sub version of soc */ if (!at91_soc_initdata.exid) - at91_soc_initdata.exid = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID); + at91_soc_initdata.exid = readl_relaxed(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID); if (at91_soc_initdata.type == AT91_SOC_SAM9G45) { switch (at91_soc_initdata.exid) { @@ -183,12 +183,12 @@ static void __init alt_soc_detect(u32 dbgu_base) u32 cidr, socid; /* SoC ID */ - cidr = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_CIDR); + cidr = readl_relaxed(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_CIDR); socid = cidr & ~AT91_CIDR_VERSION; switch (socid) { case ARCH_ID_SAMA5: - at91_soc_initdata.exid = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID); + at91_soc_initdata.exid = readl_relaxed(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID); if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D3) { at91_soc_initdata.type = AT91_SOC_SAMA5D3; } else if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D4) { @@ -204,7 +204,7 @@ static void __init alt_soc_detect(u32 dbgu_base) /* sub version of soc */ if (!at91_soc_initdata.exid) - at91_soc_initdata.exid = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID); + at91_soc_initdata.exid = readl_relaxed(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID); if (at91_soc_initdata.type == AT91_SOC_SAMA5D4) { switch (at91_soc_initdata.exid) {