Lines Matching full:macb

3  * Cadence MACB/GEM Ethernet Controller driver
41 #include "macb.h"
43 /* This structure is only used for MACB on SiFive FU540 devices */
128 static unsigned int macb_dma_desc_get_size(struct macb *bp) in macb_dma_desc_get_size()
155 static unsigned int macb_adj_dma_desc_idx(struct macb *bp, unsigned int desc_idx) in macb_adj_dma_desc_idx()
174 static struct macb_dma_desc_64 *macb_64b_desc(struct macb *bp, struct macb_dma_desc *desc) in macb_64b_desc()
182 static unsigned int macb_tx_ring_wrap(struct macb *bp, unsigned int index) in macb_tx_ring_wrap()
211 static unsigned int macb_rx_ring_wrap(struct macb *bp, unsigned int index) in macb_rx_ring_wrap()
230 static u32 hw_readl_native(struct macb *bp, int offset) in hw_readl_native()
235 static void hw_writel_native(struct macb *bp, int offset, u32 value) in hw_writel_native()
240 static u32 hw_readl(struct macb *bp, int offset) in hw_readl()
245 static void hw_writel(struct macb *bp, int offset, u32 value) in hw_writel()
279 static void macb_set_hwaddr(struct macb *bp) in macb_set_hwaddr()
303 static void macb_get_hwaddr(struct macb *bp) in macb_get_hwaddr()
332 static int macb_mdio_wait_for_idle(struct macb *bp) in macb_mdio_wait_for_idle()
342 struct macb *bp = bus->priv; in macb_mdio_read_c22()
375 struct macb *bp = bus->priv; in macb_mdio_read_c45()
421 struct macb *bp = bus->priv; in macb_mdio_write_c22()
454 struct macb *bp = bus->priv; in macb_mdio_write_c45()
496 static void macb_init_buffers(struct macb *bp) in macb_init_buffers()
519 * @bp: pointer to struct macb
522 static void macb_set_tx_clk(struct macb *bp, int speed) in macb_set_tx_clk()
569 struct macb *bp = container_of(pcs, struct macb, phylink_usx_pcs); in macb_usx_pcs_link_up()
583 struct macb *bp = container_of(pcs, struct macb, phylink_usx_pcs); in macb_usx_pcs_get_state()
603 struct macb *bp = container_of(pcs, struct macb, phylink_usx_pcs); in macb_usx_pcs_config()
647 struct macb *bp = netdev_priv(ndev); in macb_mac_config()
705 struct macb *bp = netdev_priv(ndev); in macb_mac_link_down()
729 struct macb *bp = netdev_priv(ndev); in macb_mac_link_up()
795 struct macb *bp = netdev_priv(ndev); in macb_mac_select_pcs()
819 static int macb_phylink_connect(struct macb *bp) in macb_phylink_connect()
854 struct macb *bp = netdev_priv(ndev); in macb_get_pcs_fixed_state()
862 struct macb *bp = netdev_priv(dev); in macb_mii_probe()
918 static int macb_mdiobus_register(struct macb *bp) in macb_mdiobus_register()
951 static int macb_mii_init(struct macb *bp) in macb_mii_init()
958 * In that case, some devices may be attached to the MACB's MDIO bus. in macb_mii_init()
1005 static void macb_update_stats(struct macb *bp) in macb_update_stats()
1007 u32 *p = &bp->hw_stats.macb.rx_pause_frames; in macb_update_stats()
1008 u32 *end = &bp->hw_stats.macb.tx_pause_frames + 1; in macb_update_stats()
1017 static int macb_halt_tx(struct macb *bp) in macb_halt_tx()
1037 static void macb_tx_unmap(struct macb *bp, struct macb_tx_skb *tx_skb, int budget) in macb_tx_unmap()
1055 static void macb_set_addr(struct macb *bp, struct macb_dma_desc *desc, dma_addr_t addr) in macb_set_addr()
1073 static dma_addr_t macb_get_addr(struct macb *bp, struct macb_dma_desc *desc) in macb_get_addr()
1097 struct macb *bp = queue->bp; in macb_tx_error_task()
1112 * network engine about the macb/gem being halted. in macb_tx_error_task()
1122 * macb/gem must be halted to write TBQP register in macb_tx_error_task()
1242 struct macb *bp = queue->bp; in macb_tx_complete()
1317 struct macb *bp = queue->bp; in gem_rx_refill()
1399 struct macb *bp = queue->bp; in gem_rx()
1495 struct macb *bp = queue->bp; in macb_rx_frame()
1571 struct macb *bp = queue->bp; in macb_init_rx_ring()
1590 struct macb *bp = queue->bp; in macb_rx()
1668 struct macb *bp = queue->bp; in macb_rx_pending()
1684 struct macb *bp = queue->bp; in macb_rx_poll()
1721 struct macb *bp = queue->bp; in macb_tx_restart()
1763 struct macb *bp = queue->bp; in macb_tx_poll()
1805 struct macb *bp = from_tasklet(bp, t, hresp_err_tasklet); in macb_hresp_error_task()
1845 struct macb *bp = queue->bp; in macb_wol_interrupt()
1858 netdev_vdbg(bp->dev, "MACB WoL: queue = %u, isr = 0x%08lx\n", in macb_wol_interrupt()
1874 struct macb *bp = queue->bp; in gem_wol_interrupt()
1903 struct macb *bp = queue->bp; in macb_interrupt()
1998 bp->hw_stats.macb.rx_overruns++; in macb_interrupt()
2025 struct macb *bp = netdev_priv(dev); in macb_poll_controller()
2037 static unsigned int macb_tx_map(struct macb *bp, in macb_tx_map()
2318 struct macb *bp = netdev_priv(dev); in macb_start_xmit()
2417 static void macb_init_rx_buffer_size(struct macb *bp, size_t size) in macb_init_rx_buffer_size()
2437 static void gem_free_rx_buffers(struct macb *bp) in gem_free_rx_buffers()
2470 static void macb_free_rx_buffers(struct macb *bp) in macb_free_rx_buffers()
2482 static void macb_free_consistent(struct macb *bp) in macb_free_consistent()
2508 static int gem_alloc_rx_buffers(struct macb *bp) in gem_alloc_rx_buffers()
2527 static int macb_alloc_rx_buffers(struct macb *bp) in macb_alloc_rx_buffers()
2544 static int macb_alloc_consistent(struct macb *bp) in macb_alloc_consistent()
2586 static void gem_init_rings(struct macb *bp) in gem_init_rings()
2611 static void macb_init_rings(struct macb *bp) in macb_init_rings()
2628 static void macb_reset_hw(struct macb *bp) in macb_reset_hw()
2660 static u32 gem_mdc_clk_div(struct macb *bp) in gem_mdc_clk_div()
2685 static u32 macb_mdc_clk_div(struct macb *bp) in macb_mdc_clk_div()
2710 static u32 macb_dbw(struct macb *bp) in macb_dbw()
2733 static void macb_configure_dma(struct macb *bp) in macb_configure_dma()
2779 static void macb_init_hw(struct macb *bp) in macb_init_hw()
2876 struct macb *bp = netdev_priv(dev); in macb_sethashtable()
2894 struct macb *bp = netdev_priv(dev); in macb_set_rx_mode()
2936 struct macb *bp = netdev_priv(dev); in macb_open()
2996 struct macb *bp = netdev_priv(dev); in macb_close()
3050 static void gem_update_stats(struct macb *bp) in gem_update_stats()
3079 static struct net_device_stats *gem_get_stats(struct macb *bp) in gem_get_stats()
3123 struct macb *bp; in gem_get_ethtool_stats()
3133 struct macb *bp = netdev_priv(dev); in gem_get_sset_count()
3146 struct macb *bp = netdev_priv(dev); in gem_get_ethtool_strings()
3170 struct macb *bp = netdev_priv(dev); in macb_get_stats()
3172 struct macb_stats *hwstat = &bp->hw_stats.macb; in macb_get_stats()
3223 struct macb *bp = netdev_priv(dev); in macb_get_regs()
3255 struct macb *bp = netdev_priv(netdev); in macb_get_wol()
3268 struct macb *bp = netdev_priv(netdev); in macb_set_wol()
3296 struct macb *bp = netdev_priv(netdev); in macb_get_link_ksettings()
3304 struct macb *bp = netdev_priv(netdev); in macb_set_link_ksettings()
3314 struct macb *bp = netdev_priv(netdev); in macb_get_ringparam()
3328 struct macb *bp = netdev_priv(netdev); in macb_set_ringparam()
3364 static unsigned int gem_get_tsu_rate(struct macb *bp) in gem_get_tsu_rate()
3389 struct macb *bp = netdev_priv(dev); in gem_get_ts_info()
3430 struct macb *bp = netdev_priv(netdev); in macb_get_ts_info()
3438 static void gem_enable_flow_filters(struct macb *bp, bool enable) in gem_enable_flow_filters()
3484 static void gem_prog_cmp_regs(struct macb *bp, struct ethtool_rx_flow_spec *fs) in gem_prog_cmp_regs()
3570 struct macb *bp = netdev_priv(netdev); in gem_add_flow_filter()
3625 struct macb *bp = netdev_priv(netdev); in gem_del_flow_filter()
3661 struct macb *bp = netdev_priv(netdev); in gem_get_flow_entry()
3676 struct macb *bp = netdev_priv(netdev); in gem_get_all_flow_entries()
3695 struct macb *bp = netdev_priv(netdev); in gem_get_rxnfc()
3722 struct macb *bp = netdev_priv(netdev); in gem_set_rxnfc()
3779 struct macb *bp = netdev_priv(dev); in macb_ioctl()
3796 static inline void macb_set_txcsum_feature(struct macb *bp, in macb_set_txcsum_feature()
3813 static inline void macb_set_rxcsum_feature(struct macb *bp, in macb_set_rxcsum_feature()
3831 static inline void macb_set_rxflow_feature(struct macb *bp, in macb_set_rxflow_feature()
3843 struct macb *bp = netdev_priv(netdev); in macb_set_features()
3861 static void macb_restore_features(struct macb *bp) in macb_restore_features()
3900 static void macb_configure_caps(struct macb *bp, in macb_configure_caps()
3946 /* is it macb or gem ? in macb_probe_queues()
4063 struct macb *bp = netdev_priv(dev); in macb_init()
4231 static int at91ether_alloc_coherent(struct macb *lp) in at91ether_alloc_coherent()
4258 static void at91ether_free_coherent(struct macb *lp) in at91ether_free_coherent()
4280 static int at91ether_start(struct macb *lp) in at91ether_start()
4325 static void at91ether_stop(struct macb *lp) in at91ether_stop()
4349 struct macb *lp = netdev_priv(dev); in at91ether_open()
4385 struct macb *lp = netdev_priv(dev); in at91ether_close()
4401 struct macb *lp = netdev_priv(dev); in at91ether_start_xmit()
4438 struct macb *lp = netdev_priv(dev); in at91ether_rx()
4482 struct macb *lp = netdev_priv(dev); in at91ether_interrupt()
4579 struct macb *bp = netdev_priv(dev); in at91ether_init()
4709 struct macb *bp = netdev_priv(dev); in init_reset_optional()
4913 { .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
4914 { .compatible = "cdns,macb" },
4915 { .compatible = "cdns,np4-macb", .data = &np4_config },
4918 { .compatible = "cdns,sam9x60-macb", .data = &at91sam9260_config },
4922 { .compatible = "atmel,sama5d3-macb", .data = &sama5d3macb_config },
4929 { .compatible = "microchip,mpfs-macb", .data = &mpfs_config },
4968 struct macb *bp; in macb_probe()
5140 macb_is_gem(bp) ? "GEM" : "MACB", macb_readl(bp, MID), in macb_probe()
5170 struct macb *bp; in macb_remove()
5199 struct macb *bp = netdev_priv(netdev); in macb_suspend()
5291 struct macb *bp = netdev_priv(netdev); in macb_resume()
5374 struct macb *bp = netdev_priv(netdev); in macb_runtime_suspend()
5387 struct macb *bp = netdev_priv(netdev); in macb_runtime_resume()
5411 .name = "macb",
5420 MODULE_DESCRIPTION("Cadence MACB/GEM Ethernet driver");
5422 MODULE_ALIAS("platform:macb");