Home
last modified time | relevance | path

Searched refs:bgmac (Results 1 – 6 of 6) sorted by relevance

/OK3568_Linux_fs/kernel/drivers/net/ethernet/broadcom/
H A Dbgmac.c21 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 …]
H A Dbgmac-bcma.c33 static u32 bcma_bgmac_read(struct bgmac *bgmac, u16 offset) in bcma_bgmac_read() argument
35 return bcma_read32(bgmac->bcma.core, offset); in bcma_bgmac_read()
38 static void bcma_bgmac_write(struct bgmac *bgmac, u16 offset, u32 value) in bcma_bgmac_write() argument
40 bcma_write32(bgmac->bcma.core, offset, value); in bcma_bgmac_write()
43 static u32 bcma_bgmac_idm_read(struct bgmac *bgmac, u16 offset) in bcma_bgmac_idm_read() argument
45 return bcma_aread32(bgmac->bcma.core, offset); in bcma_bgmac_idm_read()
48 static void bcma_bgmac_idm_write(struct bgmac *bgmac, u16 offset, u32 value) in bcma_bgmac_idm_write() argument
50 return bcma_awrite32(bgmac->bcma.core, offset, value); in bcma_bgmac_idm_write()
53 static bool bcma_bgmac_clk_enabled(struct bgmac *bgmac) in bcma_bgmac_clk_enabled() argument
55 return bcma_core_is_enabled(bgmac->bcma.core); in bcma_bgmac_clk_enabled()
[all …]
H A Dbgmac-platform.c36 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 …]
H A Dbgmac.h480 struct bgmac { struct
524 u32 (*read)(struct bgmac *bgmac, u16 offset); argument
525 void (*write)(struct bgmac *bgmac, u16 offset, u32 value); argument
526 u32 (*idm_read)(struct bgmac *bgmac, u16 offset); argument
527 void (*idm_write)(struct bgmac *bgmac, u16 offset, u32 value); argument
528 bool (*clk_enabled)(struct bgmac *bgmac); argument
529 void (*clk_enable)(struct bgmac *bgmac, u32 flags); argument
530 void (*cco_ctl_maskset)(struct bgmac *bgmac, u32 offset, u32 mask, argument
532 u32 (*get_bus_clock)(struct bgmac *bgmac); argument
533 void (*cmn_maskset32)(struct bgmac *bgmac, u16 offset, u32 mask, argument
[all …]
H A Dbgmac-bcma-mdio.c35 static u16 bcma_mdio_phy_read(struct bgmac *bgmac, u8 phyaddr, u8 reg) in bcma_mdio_phy_read() argument
54 if (bgmac->bcma.core->id.id == BCMA_CORE_4706_MAC_GBIT) { in bcma_mdio_phy_read()
55 core = bgmac->bcma.core->bus->drv_gmac_cmn.core; in bcma_mdio_phy_read()
59 core = bgmac->bcma.core; in bcma_mdio_phy_read()
85 static int bcma_mdio_phy_write(struct bgmac *bgmac, u8 phyaddr, u8 reg, in bcma_mdio_phy_write() argument
93 if (bgmac->bcma.core->id.id == BCMA_CORE_4706_MAC_GBIT) { in bcma_mdio_phy_write()
94 core = bgmac->bcma.core->bus->drv_gmac_cmn.core; in bcma_mdio_phy_write()
98 core = bgmac->bcma.core; in bcma_mdio_phy_write()
108 bcma_write32(bgmac->bcma.core, BGMAC_INT_STATUS, BGMAC_IS_MDIO); in bcma_mdio_phy_write()
109 if (bcma_read32(bgmac->bcma.core, BGMAC_INT_STATUS) & BGMAC_IS_MDIO) in bcma_mdio_phy_write()
[all …]
H A DMakefile14 obj-$(CONFIG_BGMAC) += bgmac.o
15 obj-$(CONFIG_BGMAC_BCMA) += bgmac-bcma.o bgmac-bcma-mdio.o
16 obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o