/drivers/net/ethernet/broadcom/ |
D | bgmac.c | 21 static bool bgmac_wait_value(struct bgmac *bgmac, u16 reg, u32 mask, in bgmac_wait_value() argument 28 val = bgmac_read(bgmac, reg); in bgmac_wait_value() 33 dev_err(bgmac->dev, "Timeout waiting for reg 0x%X\n", reg); in bgmac_wait_value() 41 static void bgmac_dma_tx_reset(struct bgmac *bgmac, struct bgmac_dma_ring *ring) in bgmac_dma_tx_reset() argument 53 bgmac_write(bgmac, ring->mmio_base + BGMAC_DMA_TX_CTL, in bgmac_dma_tx_reset() 56 val = bgmac_read(bgmac, ring->mmio_base + BGMAC_DMA_TX_STATUS); in bgmac_dma_tx_reset() 67 dev_err(bgmac->dev, "Timeout suspending DMA TX ring 0x%X (BGMAC_DMA_TX_STAT: 0x%08X)\n", in bgmac_dma_tx_reset() 71 bgmac_write(bgmac, ring->mmio_base + BGMAC_DMA_TX_CTL, 0); in bgmac_dma_tx_reset() 72 if (!bgmac_wait_value(bgmac, in bgmac_dma_tx_reset() 76 dev_warn(bgmac->dev, "DMA TX ring 0x%X wasn't disabled on time, waiting additional 300us\n", in bgmac_dma_tx_reset() [all …]
|
D | bgmac-bcma.c | 34 static u32 bcma_bgmac_read(struct bgmac *bgmac, u16 offset) in bcma_bgmac_read() argument 36 return bcma_read32(bgmac->bcma.core, offset); in bcma_bgmac_read() 39 static void bcma_bgmac_write(struct bgmac *bgmac, u16 offset, u32 value) in bcma_bgmac_write() argument 41 bcma_write32(bgmac->bcma.core, offset, value); in bcma_bgmac_write() 44 static u32 bcma_bgmac_idm_read(struct bgmac *bgmac, u16 offset) in bcma_bgmac_idm_read() argument 46 return bcma_aread32(bgmac->bcma.core, offset); in bcma_bgmac_idm_read() 49 static void bcma_bgmac_idm_write(struct bgmac *bgmac, u16 offset, u32 value) in bcma_bgmac_idm_write() argument 51 return bcma_awrite32(bgmac->bcma.core, offset, value); in bcma_bgmac_idm_write() 54 static bool bcma_bgmac_clk_enabled(struct bgmac *bgmac) in bcma_bgmac_clk_enabled() argument 56 return bcma_core_is_enabled(bgmac->bcma.core); in bcma_bgmac_clk_enabled() [all …]
|
D | bgmac-platform.c | 36 static u32 platform_bgmac_read(struct bgmac *bgmac, u16 offset) in platform_bgmac_read() argument 38 return readl(bgmac->plat.base + offset); in platform_bgmac_read() 41 static void platform_bgmac_write(struct bgmac *bgmac, u16 offset, u32 value) in platform_bgmac_write() argument 43 writel(value, bgmac->plat.base + offset); in platform_bgmac_write() 46 static u32 platform_bgmac_idm_read(struct bgmac *bgmac, u16 offset) in platform_bgmac_idm_read() argument 48 return readl(bgmac->plat.idm_base + offset); in platform_bgmac_idm_read() 51 static void platform_bgmac_idm_write(struct bgmac *bgmac, u16 offset, u32 value) in platform_bgmac_idm_write() argument 53 writel(value, bgmac->plat.idm_base + offset); in platform_bgmac_idm_write() 56 static bool platform_bgmac_clk_enabled(struct bgmac *bgmac) in platform_bgmac_clk_enabled() argument 58 if (!bgmac->plat.idm_base) in platform_bgmac_clk_enabled() [all …]
|
D | bgmac.h | 440 struct bgmac { struct 486 u32 (*read)(struct bgmac *bgmac, u16 offset); argument 487 void (*write)(struct bgmac *bgmac, u16 offset, u32 value); argument 488 u32 (*idm_read)(struct bgmac *bgmac, u16 offset); argument 489 void (*idm_write)(struct bgmac *bgmac, u16 offset, u32 value); argument 490 bool (*clk_enabled)(struct bgmac *bgmac); argument 491 void (*clk_enable)(struct bgmac *bgmac, u32 flags); argument 492 void (*cco_ctl_maskset)(struct bgmac *bgmac, u32 offset, u32 mask, argument 494 u32 (*get_bus_clock)(struct bgmac *bgmac); argument 495 void (*cmn_maskset32)(struct bgmac *bgmac, u16 offset, u32 mask, argument [all …]
|
D | bgmac-bcma-mdio.c | 36 static u16 bcma_mdio_phy_read(struct bgmac *bgmac, u8 phyaddr, u8 reg) in bcma_mdio_phy_read() argument 55 if (bgmac->bcma.core->id.id == BCMA_CORE_4706_MAC_GBIT) { in bcma_mdio_phy_read() 56 core = bgmac->bcma.core->bus->drv_gmac_cmn.core; in bcma_mdio_phy_read() 60 core = bgmac->bcma.core; in bcma_mdio_phy_read() 86 static int bcma_mdio_phy_write(struct bgmac *bgmac, u8 phyaddr, u8 reg, in bcma_mdio_phy_write() argument 94 if (bgmac->bcma.core->id.id == BCMA_CORE_4706_MAC_GBIT) { in bcma_mdio_phy_write() 95 core = bgmac->bcma.core->bus->drv_gmac_cmn.core; in bcma_mdio_phy_write() 99 core = bgmac->bcma.core; in bcma_mdio_phy_write() 109 bcma_write32(bgmac->bcma.core, BGMAC_INT_STATUS, BGMAC_IS_MDIO); in bcma_mdio_phy_write() 110 if (bcma_read32(bgmac->bcma.core, BGMAC_INT_STATUS) & BGMAC_IS_MDIO) in bcma_mdio_phy_write() [all …]
|
D | Makefile | 15 obj-$(CONFIG_BGMAC) += bgmac.o 16 obj-$(CONFIG_BGMAC_BCMA) += bgmac-bcma.o bgmac-bcma-mdio.o 17 obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o
|