Revert r362389, it was committed with <patch>.diff instead of <patch>.txt as
commit log.
This commit is contained in:
parent
865c7b713c
commit
224c5a9ff3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362391
@ -64,11 +64,15 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#define MV_GLOBAL_CONTROL_REG 0x8000
|
||||
#define PCIE_APP_LTSSM_EN (1 << 2)
|
||||
//#define PCIE_DEVICE_TYPE_SHIFT 4
|
||||
//#define PCIE_DEVICE_TYPE_MASK 0xF
|
||||
//#define PCIE_DEVICE_TYPE_RC 0x4/
|
||||
|
||||
#define MV_GLOBAL_STATUS_REG 0x8008
|
||||
#define MV_STATUS_RDLH_LINK_UP (1 << 1)
|
||||
#define MV_STATUS_PHY_LINK_UP (1 << 9)
|
||||
|
||||
|
||||
#define MV_INT_CAUSE1 0x801C
|
||||
#define MV_INT_MASK1 0x8020
|
||||
#define INT_A_ASSERT_MASK (1 << 9)
|
||||
@ -86,7 +90,11 @@ __FBSDID("$FreeBSD$");
|
||||
#define MV_ARUSER_REG 0x805C
|
||||
#define MV_AWUSER_REG 0x8060
|
||||
|
||||
|
||||
|
||||
#define MV_MAX_LANES 8
|
||||
|
||||
|
||||
struct pci_mv_softc {
|
||||
struct pci_dw_softc dw_sc;
|
||||
device_t dev;
|
||||
@ -104,6 +112,7 @@ static struct ofw_compat_data compat_data[] = {
|
||||
{NULL, 0},
|
||||
};
|
||||
|
||||
|
||||
static int
|
||||
pci_mv_phy_init(struct pci_mv_softc *sc)
|
||||
{
|
||||
@ -113,12 +122,7 @@ pci_mv_phy_init(struct pci_mv_softc *sc)
|
||||
rv = phy_get_by_ofw_idx(sc->dev, sc->node, i, &(sc->phy[i]));
|
||||
if (rv != 0 && rv != ENOENT) {
|
||||
device_printf(sc->dev, "Cannot get phy[%d]\n", i);
|
||||
/* XXX revert when phy driver will be implemented */
|
||||
#if 0
|
||||
goto fail;
|
||||
#else
|
||||
continue;
|
||||
#endif
|
||||
}
|
||||
if (sc->phy[i] == NULL)
|
||||
continue;
|
||||
@ -169,14 +173,13 @@ pci_mv_init(struct pci_mv_softc *sc)
|
||||
/* Enable local interrupts */
|
||||
pci_dw_dbi_wr4(sc->dev, DW_MSI_INTR0_MASK, 0xFFFFFFFF);
|
||||
pci_dw_dbi_wr4(sc->dev, MV_INT_MASK1, 0xFFFFFFFF);
|
||||
pci_dw_dbi_wr4(sc->dev, MV_INT_MASK2, 0xFFFFFFFD);
|
||||
pci_dw_dbi_wr4(sc->dev, MV_INT_MASK2, 0xFFFFFFFF);
|
||||
pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE1, 0xFFFFFFFF);
|
||||
pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE2, 0xFFFFFFFF);
|
||||
|
||||
/* Errors have own interrupt, not yet populated in DTt */
|
||||
pci_dw_dbi_wr4(sc->dev, MV_ERR_INT_MASK, 0);
|
||||
}
|
||||
|
||||
static int pci_mv_intr(void *arg)
|
||||
{
|
||||
struct pci_mv_softc *sc = arg;
|
||||
@ -185,6 +188,8 @@ static int pci_mv_intr(void *arg)
|
||||
/* Ack all interrups */
|
||||
cause1 = pci_dw_dbi_rd4(sc->dev, MV_INT_CAUSE1);
|
||||
cause2 = pci_dw_dbi_rd4(sc->dev, MV_INT_CAUSE2);
|
||||
if (cause1 == 0 || cause2 == 0)
|
||||
return(FILTER_STRAY);
|
||||
|
||||
pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE1, cause1);
|
||||
pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE2, cause2);
|
||||
|
Loading…
Reference in New Issue
Block a user