Lines Matching +full:axi +full:- +full:ethernet +full:- +full:1

1 // SPDX-License-Identifier: GPL-2.0-only
5 Copyright (C) 2011-2012 Vayavya Labs Pvt Ltd
12 #include <linux/clk-provider.h>
24 plat->clk_csr = 2; /* clk_csr_i = 20-35MHz & MDC = clk_csr_i/16 */ in common_default_data()
25 plat->has_gmac = 1; in common_default_data()
26 plat->force_sf_dma_mode = 1; in common_default_data()
28 plat->mdio_bus_data->needs_reset = true; in common_default_data()
31 plat->multicast_filter_bins = HASH_TABLE_SIZE; in common_default_data()
34 plat->unicast_filter_entries = 1; in common_default_data()
37 plat->maxmtu = JUMBO_LEN; in common_default_data()
40 plat->tx_queues_to_use = 1; in common_default_data()
41 plat->rx_queues_to_use = 1; in common_default_data()
44 plat->tx_queues_cfg[0].use_prio = false; in common_default_data()
45 plat->rx_queues_cfg[0].use_prio = false; in common_default_data()
48 plat->rx_queues_cfg[0].pkt_route = 0x0; in common_default_data()
57 plat->bus_id = 1; in stmmac_default_data()
58 plat->phy_addr = 0; in stmmac_default_data()
59 plat->phy_interface = PHY_INTERFACE_MODE_GMII; in stmmac_default_data()
61 plat->dma_cfg->pbl = 32; in stmmac_default_data()
62 plat->dma_cfg->pblx8 = true; in stmmac_default_data()
63 /* TODO: AXI */ in stmmac_default_data()
77 plat->clk_csr = 5; in snps_gmac5_default_data()
78 plat->has_gmac4 = 1; in snps_gmac5_default_data()
79 plat->force_sf_dma_mode = 1; in snps_gmac5_default_data()
80 plat->flags |= STMMAC_FLAG_TSO_EN; in snps_gmac5_default_data()
81 plat->pmt = 1; in snps_gmac5_default_data()
84 plat->multicast_filter_bins = HASH_TABLE_SIZE; in snps_gmac5_default_data()
87 plat->unicast_filter_entries = 1; in snps_gmac5_default_data()
90 plat->maxmtu = JUMBO_LEN; in snps_gmac5_default_data()
93 plat->tx_queues_to_use = 4; in snps_gmac5_default_data()
94 plat->rx_queues_to_use = 4; in snps_gmac5_default_data()
96 plat->tx_sched_algorithm = MTL_TX_ALGORITHM_WRR; in snps_gmac5_default_data()
97 for (i = 0; i < plat->tx_queues_to_use; i++) { in snps_gmac5_default_data()
98 plat->tx_queues_cfg[i].use_prio = false; in snps_gmac5_default_data()
99 plat->tx_queues_cfg[i].mode_to_use = MTL_QUEUE_DCB; in snps_gmac5_default_data()
100 plat->tx_queues_cfg[i].weight = 25; in snps_gmac5_default_data()
102 plat->tx_queues_cfg[i].tbs_en = 1; in snps_gmac5_default_data()
105 plat->rx_sched_algorithm = MTL_RX_ALGORITHM_SP; in snps_gmac5_default_data()
106 for (i = 0; i < plat->rx_queues_to_use; i++) { in snps_gmac5_default_data()
107 plat->rx_queues_cfg[i].use_prio = false; in snps_gmac5_default_data()
108 plat->rx_queues_cfg[i].mode_to_use = MTL_QUEUE_DCB; in snps_gmac5_default_data()
109 plat->rx_queues_cfg[i].pkt_route = 0x0; in snps_gmac5_default_data()
110 plat->rx_queues_cfg[i].chan = i; in snps_gmac5_default_data()
113 plat->bus_id = 1; in snps_gmac5_default_data()
114 plat->phy_addr = -1; in snps_gmac5_default_data()
115 plat->phy_interface = PHY_INTERFACE_MODE_GMII; in snps_gmac5_default_data()
117 plat->dma_cfg->pbl = 32; in snps_gmac5_default_data()
118 plat->dma_cfg->pblx8 = true; in snps_gmac5_default_data()
120 /* Axi Configuration */ in snps_gmac5_default_data()
121 plat->axi = devm_kzalloc(&pdev->dev, sizeof(*plat->axi), GFP_KERNEL); in snps_gmac5_default_data()
122 if (!plat->axi) in snps_gmac5_default_data()
123 return -ENOMEM; in snps_gmac5_default_data()
125 plat->axi->axi_wr_osr_lmt = 31; in snps_gmac5_default_data()
126 plat->axi->axi_rd_osr_lmt = 31; in snps_gmac5_default_data()
128 plat->axi->axi_fb = false; in snps_gmac5_default_data()
129 plat->axi->axi_blen[0] = 4; in snps_gmac5_default_data()
130 plat->axi->axi_blen[1] = 8; in snps_gmac5_default_data()
131 plat->axi->axi_blen[2] = 16; in snps_gmac5_default_data()
132 plat->axi->axi_blen[3] = 32; in snps_gmac5_default_data()
151 * to take "ownership" of the device or an error code(-ve no) otherwise.
156 struct stmmac_pci_info *info = (struct stmmac_pci_info *)id->driver_data; in stmmac_pci_probe()
162 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); in stmmac_pci_probe()
164 return -ENOMEM; in stmmac_pci_probe()
166 plat->mdio_bus_data = devm_kzalloc(&pdev->dev, in stmmac_pci_probe()
167 sizeof(*plat->mdio_bus_data), in stmmac_pci_probe()
169 if (!plat->mdio_bus_data) in stmmac_pci_probe()
170 return -ENOMEM; in stmmac_pci_probe()
172 plat->dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*plat->dma_cfg), in stmmac_pci_probe()
174 if (!plat->dma_cfg) in stmmac_pci_probe()
175 return -ENOMEM; in stmmac_pci_probe()
177 plat->safety_feat_cfg = devm_kzalloc(&pdev->dev, in stmmac_pci_probe()
178 sizeof(*plat->safety_feat_cfg), in stmmac_pci_probe()
180 if (!plat->safety_feat_cfg) in stmmac_pci_probe()
181 return -ENOMEM; in stmmac_pci_probe()
186 dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n", in stmmac_pci_probe()
203 ret = info->setup(pdev, plat); in stmmac_pci_probe()
209 res.wol_irq = pdev->irq; in stmmac_pci_probe()
210 res.irq = pdev->irq; in stmmac_pci_probe()
212 plat->safety_feat_cfg->tsoee = 1; in stmmac_pci_probe()
213 plat->safety_feat_cfg->mrxpee = 1; in stmmac_pci_probe()
214 plat->safety_feat_cfg->mestee = 1; in stmmac_pci_probe()
215 plat->safety_feat_cfg->mrxee = 1; in stmmac_pci_probe()
216 plat->safety_feat_cfg->mtxee = 1; in stmmac_pci_probe()
217 plat->safety_feat_cfg->epsi = 1; in stmmac_pci_probe()
218 plat->safety_feat_cfg->edpp = 1; in stmmac_pci_probe()
219 plat->safety_feat_cfg->prtyen = 1; in stmmac_pci_probe()
220 plat->safety_feat_cfg->tmouten = 1; in stmmac_pci_probe()
222 return stmmac_dvr_probe(&pdev->dev, plat, &res); in stmmac_pci_probe()
236 stmmac_dvr_remove(&pdev->dev); in stmmac_pci_remove()
310 MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet PCI driver");