bcma: add driver for PCIe Gen 2 core
Rafał Miłecki
maintainerPATCH 1/1 bcma: add driver for PCIe Gen 2 core
New Broadcom PCIe devices (802.11ac ones?) use Gen2 and have to be initialized differently.
Signed-off-by Rafa? Mi?ecki <[email protected]>
--- drivers/bcma/Makefile | 1 + drivers/bcma/driver_pcie2.c | 175 +++++++++++++++++++++++++++++++++ drivers/bcma/main.c | 8 ++ include/linux/bcma/bcma.h | 2 + include/linux/bcma/bcma_driver_pcie2.h | 158 +++++++++++++++++++++++++++++ 5 files changed, 344 insertions(+) create mode 100644 drivers/bcma/driver_pcie2.c create mode 100644 include/linux/bcma/bcma_driver_pcie2.h
drivers/bcma/Makefile +1 -0
@@ -3,6 +3,7 @@ bcma-y += driver_chipcommon.o driver_chipcommon_pmu.o bcma-$(CONFIG_BCMA_SFLASH) += driver_chipcommon_sflash.o bcma-$(CONFIG_BCMA_NFLASH) += driver_chipcommon_nflash.o bcma-y += driver_pci.o +bcma-y += driver_pcie2.o bcma-$(CONFIG_BCMA_DRIVER_PCI_HOSTMODE) += driver_pci_host.o bcma-$(CONFIG_BCMA_DRIVER_MIPS) += driver_mips.o bcma-$(CONFIG_BCMA_DRIVER_GMAC_CMN) += driver_gmac_cmn.o
drivers/bcma/driver_pcie2.c new file +175 -0
175 lines not on this page · raw message
drivers/bcma/main.c +8 -0
@@ -132,6 +132,7 @@ static int bcma_register_cores(struct bcma_bus *bus)case BCMA_CORE_CHIPCOMMON :case BCMA_CORE_PCI :case BCMA_CORE_PCIE : +case BCMA_CORE_PCIE2 :case BCMA_CORE_MIPS_74K :case BCMA_CORE_4706_MAC_GBIT_COMMON :continue ;
@@ -281,6 +282,13 @@ int bcma_bus_register(struct bcma_bus *bus)bcma_core_pci_init (&bus->drv_pci[1 ]); } +/* Init PCIe Gen 2 core */ + core =bcma_find_core_unit (bus,BCMA_CORE_PCIE2 ,0 ); +if (core) { + bus->drv_pcie2.core = core; +bcma_core_pcie2_init (&bus->drv_pcie2); + } +/* Init GBIT MAC COMMON core */ core =bcma_find_core (bus,BCMA_CORE_4706_MAC_GBIT_COMMON );if (core) {
include/linux/bcma/bcma.h +2 -0
@@ -6,6 +6,7 @@#include <linux/bcma/bcma_driver_chipcommon.h> #include <linux/bcma/bcma_driver_pci.h> +#include <linux/bcma/bcma_driver_pcie2.h> #include <linux/bcma/bcma_driver_mips.h> #include <linux/bcma/bcma_driver_gmac_cmn.h> #include <linux/ssb/ssb.h> /* SPROM sharing */
@@ -333,6 +334,7 @@ struct bcma_bus {struct bcma_drv_cc drv_cc;struct bcma_drv_pci drv_pci[2 ]; +struct bcma_drv_pcie2 drv_pcie2;struct bcma_drv_mips drv_mips;struct bcma_drv_gmac_cmn drv_gmac_cmn;
include/linux/bcma/bcma_driver_pcie2.h new file +158 -0
158 lines not on this page · raw message
Signature · 1 line
1.8.4.5