Lines Matching refs:bgmac

440 struct bgmac {
486 u32 (*read)(struct bgmac *bgmac, u16 offset);
487 void (*write)(struct bgmac *bgmac, u16 offset, u32 value);
488 u32 (*idm_read)(struct bgmac *bgmac, u16 offset);
489 void (*idm_write)(struct bgmac *bgmac, u16 offset, u32 value);
490 bool (*clk_enabled)(struct bgmac *bgmac);
491 void (*clk_enable)(struct bgmac *bgmac, u32 flags);
492 void (*cco_ctl_maskset)(struct bgmac *bgmac, u32 offset, u32 mask,
494 u32 (*get_bus_clock)(struct bgmac *bgmac);
495 void (*cmn_maskset32)(struct bgmac *bgmac, u16 offset, u32 mask,
497 int (*phy_connect)(struct bgmac *bgmac);
500 struct bgmac *bgmac_alloc(struct device *dev);
501 int bgmac_enet_probe(struct bgmac *bgmac);
502 void bgmac_enet_remove(struct bgmac *bgmac);
504 int bgmac_phy_connect_direct(struct bgmac *bgmac);
505 int bgmac_enet_suspend(struct bgmac *bgmac);
506 int bgmac_enet_resume(struct bgmac *bgmac);
508 struct mii_bus *bcma_mdio_mii_register(struct bgmac *bgmac);
511 static inline u32 bgmac_read(struct bgmac *bgmac, u16 offset)
513 return bgmac->read(bgmac, offset);
516 static inline void bgmac_write(struct bgmac *bgmac, u16 offset, u32 value)
518 bgmac->write(bgmac, offset, value);
521 static inline u32 bgmac_umac_read(struct bgmac *bgmac, u16 offset)
523 return bgmac_read(bgmac, BGMAC_UNIMAC + offset);
526 static inline void bgmac_umac_write(struct bgmac *bgmac, u16 offset, u32 value)
528 bgmac_write(bgmac, BGMAC_UNIMAC + offset, value);
531 static inline u32 bgmac_idm_read(struct bgmac *bgmac, u16 offset)
533 return bgmac->idm_read(bgmac, offset);
536 static inline void bgmac_idm_write(struct bgmac *bgmac, u16 offset, u32 value)
538 bgmac->idm_write(bgmac, offset, value);
541 static inline bool bgmac_clk_enabled(struct bgmac *bgmac)
543 return bgmac->clk_enabled(bgmac);
546 static inline void bgmac_clk_enable(struct bgmac *bgmac, u32 flags)
548 bgmac->clk_enable(bgmac, flags);
551 static inline void bgmac_cco_ctl_maskset(struct bgmac *bgmac, u32 offset,
554 bgmac->cco_ctl_maskset(bgmac, offset, mask, set);
557 static inline u32 bgmac_get_bus_clock(struct bgmac *bgmac)
559 return bgmac->get_bus_clock(bgmac);
562 static inline void bgmac_cmn_maskset32(struct bgmac *bgmac, u16 offset,
565 bgmac->cmn_maskset32(bgmac, offset, mask, set);
568 static inline void bgmac_maskset(struct bgmac *bgmac, u16 offset, u32 mask,
571 bgmac_write(bgmac, offset, (bgmac_read(bgmac, offset) & mask) | set);
574 static inline void bgmac_mask(struct bgmac *bgmac, u16 offset, u32 mask)
576 bgmac_maskset(bgmac, offset, mask, 0);
579 static inline void bgmac_set(struct bgmac *bgmac, u16 offset, u32 set)
581 bgmac_maskset(bgmac, offset, ~0, set);
584 static inline void bgmac_umac_maskset(struct bgmac *bgmac, u16 offset, u32 mask, u32 set)
586 bgmac_maskset(bgmac, BGMAC_UNIMAC + offset, mask, set);
589 static inline int bgmac_phy_connect(struct bgmac *bgmac)
591 return bgmac->phy_connect(bgmac);