On 2026-08-02 15:16, Luca Lauro via B4 Relay wrote: > From: Luca Lauro <[email protected]> > > Barebox previously supported only memory-mapped AHCI controllers. > Some devices expose their AHCI controller through PCI BARs, such as the > Marvell 9170 controller found in Netgear RN102/RN104 NAS devices, > requiring a dedicated probing path and MMIO mapping. > This patch extends the barebox AHCI driver with full support for > PCI-based AHCI controllers, adding: > > - A PCI probe path that enables AHCI initialization via > pci_enable_device(), pci_iomap() and ahci_add_host(). > > - A small device list to keep track of PCI AHCI instances. > > Changes are based on the upstream Linux driver, with some adaptations. > > Signed-off-by: Luca Lauro <[email protected]> > --- > drivers/ata/ahci.c | 54 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > drivers/ata/ahci.h | 1 + > 2 files changed, 55 insertions(+) > > diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > index 819dc37b3e..0ac1a9dead 100644 > --- a/drivers/ata/ahci.c > +++ b/drivers/ata/ahci.c > @@ -19,6 +19,7 @@ > #include <disks.h> > #include <ata_drive.h> > #include <linux/sizes.h> > +#include <linux/pci.h> > #include <clock.h> > > #include "ahci.h" > @@ -47,6 +48,51 @@ > #define ahci_debug(ahci, fmt, arg...) \ > dev_dbg(ahci->dev, fmt, ##arg) > > +#ifndef PCI_VENDOR_ID_MARVELL_EXT > +#define PCI_VENDOR_ID_MARVELL_EXT 0x1b4b > +#endif
This is defined in include/linux/pci_ids.h already. Please use it. > + > +static LIST_HEAD(ahci_devices); This list is only added to, but not used here. If it's used in a later patch please move this there. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
