From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Thu, 11 Oct 2018 21:33:04 +0800 Subject: [U-Boot] [PATCH 20/27] x86: Implement arch-specific io accessor routines In-Reply-To: References: <1537710145-1888-1-git-send-email-bmeng.cn@gmail.com> <1537710145-1888-21-git-send-email-bmeng.cn@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On Thu, Sep 27, 2018 at 9:43 PM Simon Glass wrote: > > On 23 September 2018 at 06:42, Bin Meng wrote: > > At present the generic io{read,write}{8,16,32} routines only support > > MMIO access. With architecture like x86 that has a separate IO space, > > these routines cannot be used to access I/O ports. > > > > Implement x86-specific version to support both PIO and MMIO access, > > so that drivers for multiple architectures can use these accessors > > without the need to know whether it's MMIO or PIO. > > > > These are ported from Linux kernel lib/iomap.c, with slight changes. > > > > Signed-off-by: Bin Meng > > --- > > > > arch/Kconfig | 1 + > > arch/x86/include/asm/io.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 67 insertions(+) > > Reviewed-by: Simon Glass > > Should we use regmap instead? No, regmap is for something else, e.g. the same driver to be used on different buses. Regards, Bin