From patchwork Wed Feb 2 07:05:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 526111 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p127BY9o012458 for ; Wed, 2 Feb 2011 07:11:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752841Ab1BBHLd (ORCPT ); Wed, 2 Feb 2011 02:11:33 -0500 Received: from mail-pz0-f46.google.com ([209.85.210.46]:37360 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752812Ab1BBHLd (ORCPT ); Wed, 2 Feb 2011 02:11:33 -0500 Received: by pzk35 with SMTP id 35so1179100pzk.19 for ; Tue, 01 Feb 2011 23:11:33 -0800 (PST) Received: by 10.142.86.17 with SMTP id j17mr8580328wfb.308.1296630692923; Tue, 01 Feb 2011 23:11:32 -0800 (PST) Received: from localhost.localdomain (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id y42sm30947444wfd.10.2011.02.01.23.11.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Feb 2011 23:11:32 -0800 (PST) From: Nobuhiro Iwamatsu To: linux-sh@vger.kernel.org Cc: yoshihiro.shimoda.uh@renesas.com, Nobuhiro Iwamatsu Subject: [PATCH] sh: Provide in/out{b,w,l} Date: Wed, 2 Feb 2011 16:05:15 +0900 Message-Id: <1296630315-21264-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.7.2.3 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 02 Feb 2011 07:11:35 +0000 (UTC) diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 28c5aa5..408d3ed 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -69,6 +69,43 @@ #define writesw(p,d,l) __raw_writesw(p,d,l) #define writesl(p,d,l) __raw_writesl(p,d,l) +static inline u8 inb(unsigned long addr) +{ + return __raw_readb(addr); +} + +static inline u16 inw(unsigned long addr) +{ + return __raw_readw(addr); +} + +static inline u32 inl(unsigned long addr) +{ + return __raw_readl(addr); +} + +static inline void outb(u8 b, unsigned long addr) +{ + __raw_writeb(b, addr); +} + +static inline void outw(u16 b, unsigned long addr) +{ + __raw_writew(b, addr); +} + +static inline void outl(u32 b, unsigned long addr) +{ + __raw_writel(b, addr); +} + +#define inb_p(addr) readb_relaxed(addr) +#define inw_p(addr) readw_relaxed(addr) +#define inl_p(addr) readl_relaxed(addr) +#define outb_p(x, addr) writeb_relaxed((x), (addr)) +#define outw_p(x, addr) writew_relaxed((x), (addr)) +#define outl_p(x, addr) writel_relaxed((x), (addr)) + #define __BUILD_UNCACHED_IO(bwlq, type) \ static inline type read##bwlq##_uncached(unsigned long addr) \ { \