From patchwork Mon Jun 27 08:32:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 70903 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp956729qgy; Mon, 27 Jun 2016 01:31:45 -0700 (PDT) X-Received: by 10.28.168.86 with SMTP id r83mr8902513wme.44.1467016305425; Mon, 27 Jun 2016 01:31:45 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id 190si478768wmy.14.2016.06.27.01.31.45; Mon, 27 Jun 2016 01:31:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8E6F2A75F9; Mon, 27 Jun 2016 10:31:44 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HqFNsmF7HB3k; Mon, 27 Jun 2016 10:31:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CB8ABA7548; Mon, 27 Jun 2016 10:31:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DBFE3A7548 for ; Mon, 27 Jun 2016 10:31:39 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UwsPS3wf4MAK for ; Mon, 27 Jun 2016 10:31:39 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by theia.denx.de (Postfix) with ESMTPS id 3A516A7527 for ; Mon, 27 Jun 2016 10:31:35 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id u5R8VAv2021043; Mon, 27 Jun 2016 17:31:15 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com u5R8VAv2021043 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1467016275; bh=vWwBcqDRmqJkjV7+nw/zBzkfeTFQergJfmFbRvl+6Z8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JZD5spa+olQA8L6yFvUAJKCeiAKJD40FfPJDaeMDE4kkYwCRX+9Ucakms8N12OluB lrHoGxe1Inby7XmdEijCdL2DgTb7ZmNehGy5le3mWojqm4wg//1pLPD8332RNh8t8a 7wSva3mRY38rMssrnuzOYAjRm2PT33qYQkDFr1X1rS3hUWD4VSjgeKOcfJMDs3K5Vz Aw4HSL71PA7J5cHZ0whY5lSiP9Rwf+sg4Z4as5IIoYr9IDs+/u8SMTXSa6mB5iApgy D+AhXcKzg6rthvAoRvgabmlK4fmBxx/frk54MRD6bfZxTTGqHTI4MnretduVT7huEr lBaWB6yCt8+Uw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 27 Jun 2016 17:32:30 +0900 Message-Id: <1467016351-22360-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1467016351-22360-1-git-send-email-yamada.masahiro@socionext.com> References: <1467016351-22360-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 3/3] linux/io.h: add generic ioremap()/iounmap() defines X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" For most of architectures in U-Boot, virtual address is straight mapped to physical address. So, it makes sense to have generic defines of ioremap and friends in . All of them are just empty and will disappear at compile time, but they will be helpful to implement drivers which are counterparts of Linux ones. I notice MIPS already has its own implementation, so I surrounded the defines with #ifndef CONFIG_MIPS ... #endif. I guess Sandbox will need its own implementation as well. Signed-off-by: Masahiro Yamada --- include/linux/io.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/include/linux/io.h b/include/linux/io.h index 1b36a22..ca23caa 100644 --- a/include/linux/io.h +++ b/include/linux/io.h @@ -5,6 +5,22 @@ #ifndef _LINUX_IO_H #define _LINUX_IO_H +#include +#include #include +#ifndef CONFIG_MIPS +static inline void __iomem *ioremap(resource_size_t offset, + resource_size_t size) +{ + return (void __iomem *)(unsigned long)offset; +} + +static inline void iounmap(void __iomem *addr) +{ +} + +#define devm_ioremap(dev, offset, size) ioremap(offset, size) +#endif + #endif /* _LINUX_IO_H */