From patchwork Mon Oct 6 13:52:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5037221 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2DE899F2F1 for ; Mon, 6 Oct 2014 13:55:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55264201EC for ; Mon, 6 Oct 2014 13:55:26 +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 148392017D for ; Mon, 6 Oct 2014 13:55:25 +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 1Xb8jK-0007MH-Si; Mon, 06 Oct 2014 13:53:38 +0000 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xb8ix-00078p-IH for linux-arm-kernel@lists.infradead.org; Mon, 06 Oct 2014 13:53:16 +0000 Received: by mail-wg0-f52.google.com with SMTP id a1so6559708wgh.11 for ; Mon, 06 Oct 2014 06:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RHRyEqvktksTuUIN75k2ow0KWHYLO29qIswNy+iWADs=; b=j4U8v3rgCskt5IZl4i+Y9QUpfAmf8mXJRI/jGgXsRsBKSOxxl4KOznWRWDYMI8Qa85 ESK3EjAoaqXnzEsWReMEOZg3FGFBSQAT6D6rHfOAdWsxd98inkO4gw64ZErk+9JjhQn5 bvpVOs3Fc//hwDrSfKxfFvxeoL+5HdvyBxu62EnPOf7U7cuVW1M0G8h6ZCSaU4kJxYbm UK8U9PcCi6arAxLC/wrxY9paN9kCzMM9gJfRE9gYX0SOSX3AsYZZnYSxWfA2iCe2m4mM zzK99vIGYuRsUxYL9Zp3RvdB4ng7so0BQ+YifPSc+rsXQc2cv+xyn1okH45b+Cf8nPqY xmYA== X-Received: by 10.180.182.131 with SMTP id ee3mr19916328wic.60.1412603572426; Mon, 06 Oct 2014 06:52:52 -0700 (PDT) Received: from localhost (port-93673.pppoe.wtnet.de. [84.46.78.104]) by mx.google.com with ESMTPSA id ny6sm11379054wic.22.2014.10.06.06.52.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Oct 2014 06:52:51 -0700 (PDT) From: Thierry Reding To: Arnd Bergmann , Olof Johansson , Fengguang Wu Subject: [PATCH 3/9] ARM: ixp4xx: Properly override I/O accessors Date: Mon, 6 Oct 2014 15:52:35 +0200 Message-Id: <1412603561-27653-4-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412603561-27653-1-git-send-email-thierry.reding@gmail.com> References: <1412603561-27653-1-git-send-email-thierry.reding@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141006_065315_757033_FC947C76 X-CRM114-Status: GOOD ( 11.45 ) X-Spam-Score: 0.2 (/) Cc: linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-ia64@vger.kernel.org, Catalin Marinas , x86@kernel.org, Stephen Boyd , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, sparclinux@vger.kernel.org, Russell King , Sam Ravnborg , linux-arm-kernel@lists.infradead.org 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=-0.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY,URIBL_RHS_DOB autolearn=no 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 From: Thierry Reding In order to override accessors properly they must be #define'd so that subsequent generic headers (the one for ARM and finally the architecture independent one) can properly detect it. Signed-off-by: Thierry Reding --- arch/arm/mach-ixp4xx/include/mach/io.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 559c69a47731..b47efdad95f4 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h @@ -226,6 +226,7 @@ static inline void __indirect_readsl(const volatile void __iomem *bus_addr, * I/O functions. */ +#define outb outb static inline void outb(u8 value, u32 addr) { u32 n, byte_enables, data; @@ -235,12 +236,14 @@ static inline void outb(u8 value, u32 addr) ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data); } +#define outsb outsb static inline void outsb(u32 io_addr, const u8 *vaddr, u32 count) { while (count--) outb(*vaddr++, io_addr); } +#define outw outw static inline void outw(u16 value, u32 addr) { u32 n, byte_enables, data; @@ -250,23 +253,27 @@ static inline void outw(u16 value, u32 addr) ixp4xx_pci_write(addr, byte_enables | NP_CMD_IOWRITE, data); } +#define outsw outsw static inline void outsw(u32 io_addr, const u16 *vaddr, u32 count) { while (count--) outw(cpu_to_le16(*vaddr++), io_addr); } +#define outl outl static inline void outl(u32 value, u32 addr) { ixp4xx_pci_write(addr, NP_CMD_IOWRITE, value); } +#define outsl outsl static inline void outsl(u32 io_addr, const u32 *vaddr, u32 count) { while (count--) outl(cpu_to_le32(*vaddr++), io_addr); } +#define inb inb static inline u8 inb(u32 addr) { u32 n, byte_enables, data; @@ -278,12 +285,14 @@ static inline u8 inb(u32 addr) return data >> (8*n); } +#define insb insb static inline void insb(u32 io_addr, u8 *vaddr, u32 count) { while (count--) *vaddr++ = inb(io_addr); } +#define inw inw static inline u16 inw(u32 addr) { u32 n, byte_enables, data; @@ -295,12 +304,14 @@ static inline u16 inw(u32 addr) return data>>(8*n); } +#define insw insw static inline void insw(u32 io_addr, u16 *vaddr, u32 count) { while (count--) *vaddr++ = le16_to_cpu(inw(io_addr)); } +#define inl inl static inline u32 inl(u32 addr) { u32 data; @@ -310,6 +321,7 @@ static inline u32 inl(u32 addr) return data; } +#define insl insl static inline void insl(u32 io_addr, u32 *vaddr, u32 count) { while (count--)