diff --git a/sys/arch/arm/broadcom/bcm53xx_pax.c b/sys/arch/arm/broadcom/bcm53xx_pax.c index 0a388950ddfa..58870e639df0 100644 --- a/sys/arch/arm/broadcom/bcm53xx_pax.c +++ b/sys/arch/arm/broadcom/bcm53xx_pax.c @@ -34,7 +34,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.5 2012/09/27 00:25:26 matt Exp $"); +__KERNEL_RCSID(1, "$NetBSD: bcm53xx_pax.c,v 1.6 2012/10/12 17:18:02 matt Exp $"); #include #include @@ -218,8 +218,6 @@ bcmpax_ccb_attach(device_t parent, device_t self, void *aux) bcmpax_write_4(sc, PCIE_CLK_CONTROL, 3); delay(250); bcmpax_write_4(sc, PCIE_CLK_CONTROL, 1); - // delay(100*1000); - uint32_t v = bcmpax_read_4(sc, PCIE_STRAP_STATUS); const bool enabled = (v & STRAP_PCIE_IF_ENABLE) != 0; @@ -291,6 +289,13 @@ bcmpax_ccb_attach(device_t parent, device_t self, void *aux) &offset, NULL); KASSERT(ok); + /* + * This will force the device to negotiate to a max of gen1. + */ + if (device_cfdata(self)->cf_flags & 1) { + bcmpax_conf_write(sc, 0, offset + PCI_PCIE_LCSR2, 1); + } + /* * Now we wait (.25 sec) for the link to come up. */ diff --git a/sys/arch/arm/broadcom/bcm53xx_reg.h b/sys/arch/arm/broadcom/bcm53xx_reg.h index 6d225e68a9fa..21a21b500426 100644 --- a/sys/arch/arm/broadcom/bcm53xx_reg.h +++ b/sys/arch/arm/broadcom/bcm53xx_reg.h @@ -443,6 +443,8 @@ #define PCIE_SYS_RC_INTX_EN 0x330 #define PCIE_SYS_RC_INTX_CSR 0x334 +#define PCIE_CFG000_BASE 0x400 + #define PCIE_FUNC0_IMAP0_0 0xc00 #define PCIE_FUNC0_IMAP0_1 0xc04 #define PCIE_FUNC0_IMAP0_2 0xc08