Re: [PATCH V3 2/4] ARM64 LPC: LPC driver implementation on Hip06
From: Arnd Bergmann <hidden>
Date: 2016-09-24 21:01:45
Also in:
linux-arm-kernel, linux-devicetree, linux-pci, lkml
From: Arnd Bergmann <hidden>
Date: 2016-09-24 21:01:45
Also in:
linux-arm-kernel, linux-devicetree, linux-pci, lkml
On Saturday, September 24, 2016 4:14:15 PM CEST zhichang wrote:
In V3, the outb is :
void outb(u8 value, unsigned long addr)
{
if (!arm64_extio_ops || arm64_extio_ops->start > addr ||
arm64_extio_ops->end < addr)
writeb(value, PCI_IOBASE + addr);
else
if (arm64_extio_ops->pfout)
arm64_extio_ops->pfout(arm64_extio_ops->devpara,
addr + arm64_extio_ops->ptoffset, &value,
sizeof(u8), 1);
}
here, arm64_extio_ops->ptoffset is the offset between the real legacy IO address
and the logical IO address, similar to the offset of primary address and
secondary address in PCI bridge.Ok, though we can probably simplify this by making the assumption that 'ptoffset' is the negative of 'start', as the bus we register should always start at port zero.
But in V3, LPC driver call pci_address_to_pio to request the logical IO as PCI host bridge during its probing.
Right, so this still needs to be fixed. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html