Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1490291
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 |
| Date | 2016-09-23 18:00 +0200 |
| Message-ID | <skB3j-5Jn-17@gated-at.bofh.it> (permalink) |
| References | <shh18-no-5@gated-at.bofh.it> <skz1x-4hK-67@gated-at.bofh.it> <skAgV-5sZ-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Friday, September 23, 2016 2:59:55 PM CEST Gabriele Paoloni wrote:
>
> > > From the perspective of the indirect IO function the input parameter
> > > is an unsigned long addr that (now) can be either:
> > > 1) an IO token coming from a legacy pci device
> > > 2) a phys address that lives on the LPC bus
> > >
> > > These are conceptually two separate address spaces (and actually they
> > > both start from 0).
> >
> > Why? Any IORESOURCE_IO address always refers to the logical I/O port
> > range in Linux, not the physical address that is used on a bus.
>
> If I read the code correctly when you get an I/O token you just add it
> to PCI_IOBASE.
> This is enough since pci_remap_iospace set the virtual address to
> PCI_IOBASE + the I/O token offset; so we can read/write to
> vaddr = PCI_IOBASE + token as pci_remap_iospace has mapped it correctly
> to the respective PCI cpu address (that is set in the I/O range property
> of the host controller)
>
> In the patchset accessors LPC operates directly on the cpu addresses
> and the input parameter of the accessors can be either an IO token or
> a cpu address
>
> +static inline void outb(u8 value, unsigned long addr)
> +{
> +#ifdef CONFIG_ARM64_INDIRECT_PIO
> + if (arm64_extio_ops && arm64_extio_ops->start <= addr &&
> + addr <= arm64_extio_ops->end)
>
> Here below we operate on cpu address
>
> + extio_outb(value, addr);
> + else
> +#endif
I missed this bug earlier, this obviously needs to be
arm64_extio_ops->outb(value, addr - arm64_extio_ops->start);
or possibly
arm64_extio_ops->outb(arm64_extio_ops, value, addr);
as the outb function won't know what the offset is, but
that needed to be fixed regardless.
Arnd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Zhichang Yuan <yuanzhichang@hisilicon.com> - 2016-09-14 14:00 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-14 14:40 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 "zhichang.yuan" <yuanzhichang@hisilicon.com> - 2016-09-14 17:00 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-14 23:40 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-15 10:10 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-15 10:30 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-15 14:10 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-15 14:30 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-15 16:30 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 zhichang <zhichang.yuan02@gmail.com> - 2016-09-21 12:10 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-21 18:30 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-21 22:20 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-22 14:00 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-22 14:20 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-22 16:50 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-22 17:10 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-22 17:30 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 "zhichang.yuan" <zhichang.yuan02@gmail.com> - 2016-09-22 17:50 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 "zhichang.yuan" <zhichang.yuan02@gmail.com> - 2016-09-22 18:30 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-23 12:00 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-23 12:30 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-23 15:50 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-23 17:10 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-23 18:00 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 zhichang <zhichang.yuan02@gmail.com> - 2016-09-24 10:20 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Arnd Bergmann <arnd@arndb.de> - 2016-09-24 23:10 +0200
RE: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Gabriele Paoloni <gabriele.paoloni@huawei.com> - 2016-09-26 15:30 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 zhichang <zhichang.yuan02@gmail.com> - 2016-09-24 10:10 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Jon Masters <jcm@jonmasters.org> - 2016-10-03 00:50 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 John Garry <john.garry@huawei.com> - 2016-10-04 14:10 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2016-10-06 02:30 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 John Garry <john.garry@huawei.com> - 2016-10-06 15:40 +0200
Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06 kbuild test robot <lkp@intel.com> - 2016-09-14 16:20 +0200
csiph-web