On Mon, Jun 7, 2021 at 3:07 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > > This adds a new PCI controller driver for the Intel IXP4xx > (IX425, IXP435 etc), based on the XScale microarchitecture. > > This replaces the old driver in arch/arm/mach-ixp4xx/common-pci.c > which utilized the ARM-specific BIOS32 PCI framework, > and all parameterization for such things as memory and > IO space as well as interrupt swizzling is done from the > device tree. > > The plan is to phase out and delete the old driver piecemal. > > The __raw_writel() and __raw_readl() are used for accessing > the PCI controller for the same reason that these accessors > are used in the timer, IRQ and GPIO drivers: the platform > will alter its address bus pattern based on whether the > system is booted in big- or little-endian mode. For this > reason all register on IXP4xx must always be accessed in > native (CPU) endianness. > > This driver supports 64MB of PCI memory space, but not the > indirect access of 1GB that is available in the old driver. > We can address that later if and only if there are users > that need all 1GB of PCI address space. Krzysztof reports > having to use indirect MMIO only once for a VGA card. There > is work ongoing for general indirect MMIO. (In practice > the indirect MMIO is performed by writing address and > writing and reading values into/from a controller > register.) > > Tested by booting the NSLU2, attaching a USB stick, mounting > and browsing the drive. > > Link: https://lore.kernel.org/linux-arm-kernel/m37edwuv8m.fsf@xxxxxxxxxxx/ > Cc: Arnd Bergmann <arnd@xxxxxxxx> > Cc: Imre Kaloz <kaloz@xxxxxxxxxxx> > Cc: Krzysztof Halasa <khalasa@xxxxxxx> > Cc: Zoltan HERPAI <wigyori@xxxxxxx> > Cc: Raylynn Knight <rayknight@xxxxxx> > Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx> One small detail: > +static struct platform_driver ixp4xx_pci_driver = { > + .driver = { > + .name = "ixp4xx-pci", > + .suppress_bind_attrs = true, > + .of_match_table = of_match_ptr(ixp4xx_pci_of_match), > + }, > +}; That of_match_ptr() is pointless unless the ixp4xx_pci_of_match[] array is inside of an #ifdef. Arnd