Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | This contains the functions to handle the pci driver. |
| 3 | |
| 4 | Copyright (C) 2011-2012 Vayavya Labs Pvt Ltd |
| 5 | |
| 6 | This program is free software; you can redistribute it and/or modify it |
| 7 | under the terms and conditions of the GNU General Public License, |
| 8 | version 2, as published by the Free Software Foundation. |
| 9 | |
| 10 | This program is distributed in the hope it will be useful, but WITHOUT |
| 11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 13 | more details. |
| 14 | |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 15 | The full GNU General Public License is included in this distribution in |
| 16 | the file called "COPYING". |
| 17 | |
| 18 | Author: Rayagond Kokatanur <rayagond@vayavyalabs.com> |
| 19 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> |
| 20 | *******************************************************************************/ |
| 21 | |
| 22 | #include <linux/pci.h> |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 23 | #include <linux/dmi.h> |
| 24 | |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 25 | #include "stmmac.h" |
| 26 | |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 27 | /* |
| 28 | * This struct is used to associate PCI Function of MAC controller on a board, |
| 29 | * discovered via DMI, with the address of PHY connected to the MAC. The |
| 30 | * negative value of the address means that MAC controller is not connected |
| 31 | * with PHY. |
| 32 | */ |
| 33 | struct stmmac_pci_dmi_data { |
| 34 | const char *name; |
Jan Kiszka | 212c7fd | 2017-05-02 09:58:00 +0200 | [diff] [blame] | 35 | const char *asset_tag; |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 36 | unsigned int func; |
| 37 | int phy_addr; |
| 38 | }; |
| 39 | |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 40 | struct stmmac_pci_info { |
Jan Kiszka | c5d5287 | 2017-06-22 08:17:57 +0200 | [diff] [blame] | 41 | int (*setup)(struct pci_dev *pdev, struct plat_stmmacenet_data *plat, |
| 42 | const struct stmmac_pci_info *info); |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 43 | struct stmmac_pci_dmi_data *dmi; |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 44 | }; |
| 45 | |
Jan Kiszka | c5d5287 | 2017-06-22 08:17:57 +0200 | [diff] [blame] | 46 | static int stmmac_pci_find_phy_addr(struct pci_dev *pdev, |
| 47 | const struct stmmac_pci_info *info) |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 48 | { |
| 49 | const char *name = dmi_get_system_info(DMI_BOARD_NAME); |
Jan Kiszka | 212c7fd | 2017-05-02 09:58:00 +0200 | [diff] [blame] | 50 | const char *asset_tag = dmi_get_system_info(DMI_BOARD_ASSET_TAG); |
Jan Kiszka | c5d5287 | 2017-06-22 08:17:57 +0200 | [diff] [blame] | 51 | unsigned int func = PCI_FUNC(pdev->devfn); |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 52 | struct stmmac_pci_dmi_data *dmi; |
| 53 | |
| 54 | /* |
| 55 | * Galileo boards with old firmware don't support DMI. We always return |
| 56 | * 1 here, so at least first found MAC controller would be probed. |
| 57 | */ |
| 58 | if (!name) |
| 59 | return 1; |
| 60 | |
| 61 | for (dmi = info->dmi; dmi->name && *dmi->name; dmi++) { |
Jan Kiszka | 212c7fd | 2017-05-02 09:58:00 +0200 | [diff] [blame] | 62 | if (!strcmp(dmi->name, name) && dmi->func == func) { |
| 63 | /* If asset tag is provided, match on it as well. */ |
| 64 | if (dmi->asset_tag && strcmp(dmi->asset_tag, asset_tag)) |
| 65 | continue; |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 66 | return dmi->phy_addr; |
Jan Kiszka | 212c7fd | 2017-05-02 09:58:00 +0200 | [diff] [blame] | 67 | } |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | return -ENODEV; |
| 71 | } |
| 72 | |
Andy Shevchenko | 70fe443 | 2017-05-08 17:14:22 +0300 | [diff] [blame] | 73 | static void common_default_data(struct plat_stmmacenet_data *plat) |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 74 | { |
Andy Shevchenko | c4b2b9a | 2014-11-28 15:40:56 +0200 | [diff] [blame] | 75 | plat->clk_csr = 2; /* clk_csr_i = 20-35MHz & MDC = clk_csr_i/16 */ |
| 76 | plat->has_gmac = 1; |
| 77 | plat->force_sf_dma_mode = 1; |
Andy Shevchenko | 1e19e08 | 2014-10-31 18:28:03 +0200 | [diff] [blame] | 78 | |
Andy Shevchenko | c4b2b9a | 2014-11-28 15:40:56 +0200 | [diff] [blame] | 79 | plat->mdio_bus_data->phy_reset = NULL; |
| 80 | plat->mdio_bus_data->phy_mask = 0; |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 81 | |
Andy Shevchenko | 1e19e08 | 2014-10-31 18:28:03 +0200 | [diff] [blame] | 82 | /* Set default value for multicast hash bins */ |
Andy Shevchenko | c4b2b9a | 2014-11-28 15:40:56 +0200 | [diff] [blame] | 83 | plat->multicast_filter_bins = HASH_TABLE_SIZE; |
Andy Shevchenko | 1e19e08 | 2014-10-31 18:28:03 +0200 | [diff] [blame] | 84 | |
| 85 | /* Set default value for unicast filter entries */ |
Andy Shevchenko | c4b2b9a | 2014-11-28 15:40:56 +0200 | [diff] [blame] | 86 | plat->unicast_filter_entries = 1; |
Kweh, Hock Leong | a2cd64f | 2017-01-07 17:32:03 +0800 | [diff] [blame] | 87 | |
| 88 | /* Set the maxmtu to a default of JUMBO_LEN */ |
| 89 | plat->maxmtu = JUMBO_LEN; |
Joao Pinto | 26d6851 | 2017-03-13 10:07:07 +0000 | [diff] [blame] | 90 | |
| 91 | /* Set default number of RX and TX queues to use */ |
| 92 | plat->tx_queues_to_use = 1; |
| 93 | plat->rx_queues_to_use = 1; |
Joao Pinto | a8f5102 | 2017-03-17 16:11:06 +0000 | [diff] [blame] | 94 | |
| 95 | /* Disable Priority config by default */ |
| 96 | plat->tx_queues_cfg[0].use_prio = false; |
| 97 | plat->rx_queues_cfg[0].use_prio = false; |
Joao Pinto | abe80fd | 2017-03-17 16:11:07 +0000 | [diff] [blame] | 98 | |
| 99 | /* Disable RX queues routing by default */ |
| 100 | plat->rx_queues_cfg[0].pkt_route = 0x0; |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 101 | } |
| 102 | |
Jan Kiszka | b6a4c8f0 | 2017-06-22 08:17:58 +0200 | [diff] [blame^] | 103 | static int stmmac_default_data(struct pci_dev *pdev, |
| 104 | struct plat_stmmacenet_data *plat, |
| 105 | const struct stmmac_pci_info *info) |
Andy Shevchenko | 70fe443 | 2017-05-08 17:14:22 +0300 | [diff] [blame] | 106 | { |
| 107 | /* Set common default data first */ |
| 108 | common_default_data(plat); |
| 109 | |
| 110 | plat->bus_id = 1; |
| 111 | plat->phy_addr = 0; |
| 112 | plat->interface = PHY_INTERFACE_MODE_GMII; |
| 113 | |
| 114 | plat->dma_cfg->pbl = 32; |
| 115 | plat->dma_cfg->pblx8 = true; |
| 116 | /* TODO: AXI */ |
Jan Kiszka | b6a4c8f0 | 2017-06-22 08:17:58 +0200 | [diff] [blame^] | 117 | |
| 118 | return 0; |
Andy Shevchenko | 70fe443 | 2017-05-08 17:14:22 +0300 | [diff] [blame] | 119 | } |
| 120 | |
Jan Kiszka | b6a4c8f0 | 2017-06-22 08:17:58 +0200 | [diff] [blame^] | 121 | static const struct stmmac_pci_info stmmac_pci_info = { |
| 122 | .setup = stmmac_default_data, |
| 123 | }; |
| 124 | |
Jan Kiszka | c5d5287 | 2017-06-22 08:17:57 +0200 | [diff] [blame] | 125 | static int quark_default_data(struct pci_dev *pdev, |
| 126 | struct plat_stmmacenet_data *plat, |
| 127 | const struct stmmac_pci_info *info) |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 128 | { |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 129 | int ret; |
| 130 | |
Andy Shevchenko | 70fe443 | 2017-05-08 17:14:22 +0300 | [diff] [blame] | 131 | /* Set common default data first */ |
| 132 | common_default_data(plat); |
| 133 | |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 134 | /* |
| 135 | * Refuse to load the driver and register net device if MAC controller |
| 136 | * does not connect to any PHY interface. |
| 137 | */ |
Jan Kiszka | c5d5287 | 2017-06-22 08:17:57 +0200 | [diff] [blame] | 138 | ret = stmmac_pci_find_phy_addr(pdev, info); |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 139 | if (ret < 0) |
| 140 | return ret; |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 141 | |
| 142 | plat->bus_id = PCI_DEVID(pdev->bus->number, pdev->devfn); |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 143 | plat->phy_addr = ret; |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 144 | plat->interface = PHY_INTERFACE_MODE_RMII; |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 145 | |
| 146 | plat->dma_cfg->pbl = 16; |
Niklas Cassel | 4022d03 | 2016-12-07 15:20:08 +0100 | [diff] [blame] | 147 | plat->dma_cfg->pblx8 = true; |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 148 | plat->dma_cfg->fixed_burst = 1; |
Giuseppe Cavallaro | afea036 | 2016-02-29 14:27:28 +0100 | [diff] [blame] | 149 | /* AXI (TODO) */ |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 150 | |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 151 | return 0; |
| 152 | } |
| 153 | |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 154 | static struct stmmac_pci_dmi_data quark_pci_dmi_data[] = { |
| 155 | { |
| 156 | .name = "Galileo", |
| 157 | .func = 6, |
| 158 | .phy_addr = 1, |
| 159 | }, |
| 160 | { |
| 161 | .name = "GalileoGen2", |
| 162 | .func = 6, |
| 163 | .phy_addr = 1, |
| 164 | }, |
Jan Kiszka | 212c7fd | 2017-05-02 09:58:00 +0200 | [diff] [blame] | 165 | { |
| 166 | .name = "SIMATIC IOT2000", |
| 167 | .asset_tag = "6ES7647-0AA00-0YA2", |
| 168 | .func = 6, |
| 169 | .phy_addr = 1, |
| 170 | }, |
| 171 | { |
| 172 | .name = "SIMATIC IOT2000", |
| 173 | .asset_tag = "6ES7647-0AA00-1YA2", |
| 174 | .func = 6, |
| 175 | .phy_addr = 1, |
| 176 | }, |
| 177 | { |
| 178 | .name = "SIMATIC IOT2000", |
| 179 | .asset_tag = "6ES7647-0AA00-1YA2", |
| 180 | .func = 7, |
| 181 | .phy_addr = 1, |
| 182 | }, |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 183 | {} |
| 184 | }; |
| 185 | |
Jan Kiszka | c5d5287 | 2017-06-22 08:17:57 +0200 | [diff] [blame] | 186 | static const struct stmmac_pci_info quark_pci_info = { |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 187 | .setup = quark_default_data, |
Andy Shevchenko | 0763d95 | 2015-01-27 21:44:48 +0200 | [diff] [blame] | 188 | .dmi = quark_pci_dmi_data, |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 189 | }; |
| 190 | |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 191 | /** |
| 192 | * stmmac_pci_probe |
| 193 | * |
| 194 | * @pdev: pci device pointer |
| 195 | * @id: pointer to table of device id/id's. |
| 196 | * |
| 197 | * Description: This probing function gets called for all PCI devices which |
| 198 | * match the ID table and are not "owned" by other driver yet. This function |
| 199 | * gets passed a "struct pci_dev *" for each device whose entry in the ID table |
| 200 | * matches the device. The probe functions returns zero when the driver choose |
| 201 | * to take "ownership" of the device or an error code(-ve no) otherwise. |
| 202 | */ |
Bill Pemberton | 979857b | 2012-12-03 09:23:34 -0500 | [diff] [blame] | 203 | static int stmmac_pci_probe(struct pci_dev *pdev, |
Greg Kroah-Hartman | 1dd06ae | 2012-12-06 14:30:56 +0000 | [diff] [blame] | 204 | const struct pci_device_id *id) |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 205 | { |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 206 | struct stmmac_pci_info *info = (struct stmmac_pci_info *)id->driver_data; |
Andy Shevchenko | c4b2b9a | 2014-11-28 15:40:56 +0200 | [diff] [blame] | 207 | struct plat_stmmacenet_data *plat; |
Joachim Eastwood | e56788c | 2015-05-20 20:03:07 +0200 | [diff] [blame] | 208 | struct stmmac_resources res; |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 209 | int i; |
Andy Shevchenko | 2a3e8e9 | 2014-11-05 12:27:28 +0200 | [diff] [blame] | 210 | int ret; |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 211 | |
Andy Shevchenko | c4b2b9a | 2014-11-28 15:40:56 +0200 | [diff] [blame] | 212 | plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); |
| 213 | if (!plat) |
| 214 | return -ENOMEM; |
| 215 | |
| 216 | plat->mdio_bus_data = devm_kzalloc(&pdev->dev, |
| 217 | sizeof(*plat->mdio_bus_data), |
| 218 | GFP_KERNEL); |
| 219 | if (!plat->mdio_bus_data) |
| 220 | return -ENOMEM; |
| 221 | |
| 222 | plat->dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*plat->dma_cfg), |
| 223 | GFP_KERNEL); |
| 224 | if (!plat->dma_cfg) |
| 225 | return -ENOMEM; |
| 226 | |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 227 | /* Enable pci device */ |
Andy Shevchenko | 2a3e8e9 | 2014-11-05 12:27:28 +0200 | [diff] [blame] | 228 | ret = pcim_enable_device(pdev); |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 229 | if (ret) { |
Andy Shevchenko | 7627fc0 | 2014-11-05 12:27:29 +0200 | [diff] [blame] | 230 | dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n", |
| 231 | __func__); |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 232 | return ret; |
| 233 | } |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 234 | |
| 235 | /* Get the base address of device */ |
Andy Shevchenko | 295f9d0 | 2014-11-05 12:27:26 +0200 | [diff] [blame] | 236 | for (i = 0; i <= PCI_STD_RESOURCE_END; i++) { |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 237 | if (pci_resource_len(pdev, i) == 0) |
| 238 | continue; |
Andy Shevchenko | 2a3e8e9 | 2014-11-05 12:27:28 +0200 | [diff] [blame] | 239 | ret = pcim_iomap_regions(pdev, BIT(i), pci_name(pdev)); |
| 240 | if (ret) |
| 241 | return ret; |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 242 | break; |
| 243 | } |
Andy Shevchenko | 2a3e8e9 | 2014-11-05 12:27:28 +0200 | [diff] [blame] | 244 | |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 245 | pci_set_master(pdev); |
| 246 | |
Jan Kiszka | b6a4c8f0 | 2017-06-22 08:17:58 +0200 | [diff] [blame^] | 247 | ret = info->setup(pdev, plat, info); |
| 248 | if (ret) |
| 249 | return ret; |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 250 | |
Kweh, Hock Leong | d2a029b | 2015-01-27 21:44:49 +0200 | [diff] [blame] | 251 | pci_enable_msi(pdev); |
| 252 | |
Joachim Eastwood | e56788c | 2015-05-20 20:03:07 +0200 | [diff] [blame] | 253 | memset(&res, 0, sizeof(res)); |
| 254 | res.addr = pcim_iomap_table(pdev)[i]; |
| 255 | res.wol_irq = pdev->irq; |
| 256 | res.irq = pdev->irq; |
| 257 | |
Joachim Eastwood | 15ffac7 | 2015-05-20 20:03:08 +0200 | [diff] [blame] | 258 | return stmmac_dvr_probe(&pdev->dev, plat, &res); |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | /** |
Ben Hutchings | 49ce9c2 | 2012-07-10 10:56:00 +0000 | [diff] [blame] | 262 | * stmmac_pci_remove |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 263 | * |
| 264 | * @pdev: platform device pointer |
| 265 | * Description: this function calls the main to free the net resources |
| 266 | * and releases the PCI resources. |
| 267 | */ |
Bill Pemberton | 979857b | 2012-12-03 09:23:34 -0500 | [diff] [blame] | 268 | static void stmmac_pci_remove(struct pci_dev *pdev) |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 269 | { |
Joachim Eastwood | f4e7bd8 | 2016-05-01 22:58:19 +0200 | [diff] [blame] | 270 | stmmac_dvr_remove(&pdev->dev); |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 271 | } |
| 272 | |
Joachim Eastwood | f4e7bd8 | 2016-05-01 22:58:19 +0200 | [diff] [blame] | 273 | static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_suspend, stmmac_resume); |
Andy Shevchenko | 3be3d81 | 2014-11-05 12:27:27 +0200 | [diff] [blame] | 274 | |
Jan Kiszka | b6a4c8f0 | 2017-06-22 08:17:58 +0200 | [diff] [blame^] | 275 | /* synthetic ID, no official vendor */ |
| 276 | #define PCI_VENDOR_ID_STMMAC 0x700 |
| 277 | |
Kweh, Hock Leong | 5b99a6b | 2015-01-27 21:44:47 +0200 | [diff] [blame] | 278 | #define STMMAC_QUARK_ID 0x0937 |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 279 | #define STMMAC_DEVICE_ID 0x1108 |
| 280 | |
Jan Kiszka | b6a4c8f0 | 2017-06-22 08:17:58 +0200 | [diff] [blame^] | 281 | #define STMMAC_DEVICE(vendor_id, dev_id, info) { \ |
| 282 | PCI_VDEVICE(vendor_id, dev_id), \ |
| 283 | .driver_data = (kernel_ulong_t)&info \ |
| 284 | } |
| 285 | |
Benoit Taine | 9baa3c3 | 2014-08-08 15:56:03 +0200 | [diff] [blame] | 286 | static const struct pci_device_id stmmac_id_table[] = { |
Jan Kiszka | b6a4c8f0 | 2017-06-22 08:17:58 +0200 | [diff] [blame^] | 287 | STMMAC_DEVICE(STMMAC, STMMAC_DEVICE_ID, stmmac_pci_info), |
| 288 | STMMAC_DEVICE(STMICRO, PCI_DEVICE_ID_STMICRO_MAC, stmmac_pci_info), |
| 289 | STMMAC_DEVICE(INTEL, STMMAC_QUARK_ID, quark_pci_info), |
Alessandro Rubini | 5437f4b | 2012-01-23 23:08:56 +0000 | [diff] [blame] | 290 | {} |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 291 | }; |
| 292 | |
| 293 | MODULE_DEVICE_TABLE(pci, stmmac_id_table); |
| 294 | |
Andy Shevchenko | b2e2f0c | 2014-11-10 12:38:59 +0200 | [diff] [blame] | 295 | static struct pci_driver stmmac_pci_driver = { |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 296 | .name = STMMAC_RESOURCE_NAME, |
| 297 | .id_table = stmmac_id_table, |
| 298 | .probe = stmmac_pci_probe, |
Bill Pemberton | 979857b | 2012-12-03 09:23:34 -0500 | [diff] [blame] | 299 | .remove = stmmac_pci_remove, |
Andy Shevchenko | 3be3d81 | 2014-11-05 12:27:27 +0200 | [diff] [blame] | 300 | .driver = { |
| 301 | .pm = &stmmac_pm_ops, |
| 302 | }, |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 303 | }; |
| 304 | |
Andy Shevchenko | b2e2f0c | 2014-11-10 12:38:59 +0200 | [diff] [blame] | 305 | module_pci_driver(stmmac_pci_driver); |
| 306 | |
Giuseppe CAVALLARO | bfab27a | 2011-12-21 03:58:19 +0000 | [diff] [blame] | 307 | MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet PCI driver"); |
| 308 | MODULE_AUTHOR("Rayagond Kokatanur <rayagond.kokatanur@vayavyalabs.com>"); |
| 309 | MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>"); |
| 310 | MODULE_LICENSE("GPL"); |