Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Driver for the MDIO interface of Marvell network interfaces. |
| 3 | * |
| 4 | * Since the MDIO interface of Marvell network interfaces is shared |
| 5 | * between all network interfaces, having a single driver allows to |
| 6 | * handle concurrent accesses properly (you may have four Ethernet |
Leigh Brown | d4a0acb | 2013-10-29 09:33:34 +0000 | [diff] [blame] | 7 | * ports, but they in fact share the same SMI interface to access |
| 8 | * the MDIO bus). This driver is currently used by the mvneta and |
| 9 | * mv643xx_eth drivers. |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 10 | * |
| 11 | * Copyright (C) 2012 Marvell |
| 12 | * |
| 13 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
| 14 | * |
| 15 | * This file is licensed under the terms of the GNU General Public |
| 16 | * License version 2. This program is licensed "as is" without any |
| 17 | * warranty of any kind, whether express or implied. |
| 18 | */ |
| 19 | |
Antoine Ténart | 14ef8b3 | 2017-06-15 16:43:16 +0200 | [diff] [blame^] | 20 | #include <linux/clk.h> |
| 21 | #include <linux/delay.h> |
| 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/io.h> |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 24 | #include <linux/kernel.h> |
| 25 | #include <linux/module.h> |
| 26 | #include <linux/mutex.h> |
Florian Fainelli | 7111b71 | 2013-03-22 03:39:25 +0000 | [diff] [blame] | 27 | #include <linux/of_mdio.h> |
Antoine Ténart | 14ef8b3 | 2017-06-15 16:43:16 +0200 | [diff] [blame^] | 28 | #include <linux/phy.h> |
| 29 | #include <linux/platform_device.h> |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 30 | #include <linux/sched.h> |
| 31 | #include <linux/wait.h> |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 32 | |
| 33 | #define MVMDIO_SMI_DATA_SHIFT 0 |
| 34 | #define MVMDIO_SMI_PHY_ADDR_SHIFT 16 |
| 35 | #define MVMDIO_SMI_PHY_REG_SHIFT 21 |
| 36 | #define MVMDIO_SMI_READ_OPERATION BIT(26) |
| 37 | #define MVMDIO_SMI_WRITE_OPERATION 0 |
| 38 | #define MVMDIO_SMI_READ_VALID BIT(27) |
| 39 | #define MVMDIO_SMI_BUSY BIT(28) |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 40 | #define MVMDIO_ERR_INT_CAUSE 0x007C |
| 41 | #define MVMDIO_ERR_INT_SMI_DONE 0x00000010 |
| 42 | #define MVMDIO_ERR_INT_MASK 0x0080 |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 43 | |
Leigh Brown | b70cd1c | 2013-10-29 09:33:31 +0000 | [diff] [blame] | 44 | /* |
| 45 | * SMI Timeout measurements: |
| 46 | * - Kirkwood 88F6281 (Globalscale Dreamplug): 45us to 95us (Interrupt) |
| 47 | * - Armada 370 (Globalscale Mirabox): 41us to 43us (Polled) |
| 48 | */ |
| 49 | #define MVMDIO_SMI_TIMEOUT 1000 /* 1000us = 1ms */ |
| 50 | #define MVMDIO_SMI_POLL_INTERVAL_MIN 45 |
| 51 | #define MVMDIO_SMI_POLL_INTERVAL_MAX 55 |
| 52 | |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 53 | struct orion_mdio_dev { |
| 54 | struct mutex lock; |
Florian Fainelli | 3712b71 | 2013-03-22 03:39:26 +0000 | [diff] [blame] | 55 | void __iomem *regs; |
Russell King | 96cb434 | 2017-04-10 16:28:31 +0100 | [diff] [blame] | 56 | struct clk *clk[3]; |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 57 | /* |
| 58 | * If we have access to the error interrupt pin (which is |
| 59 | * somewhat misnamed as it not only reflects internal errors |
| 60 | * but also reflects SMI completion), use that to wait for |
| 61 | * SMI access completion instead of polling the SMI busy bit. |
| 62 | */ |
| 63 | int err_interrupt; |
| 64 | wait_queue_head_t smi_busy_wait; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 65 | }; |
| 66 | |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 67 | static int orion_mdio_smi_is_done(struct orion_mdio_dev *dev) |
| 68 | { |
| 69 | return !(readl(dev->regs) & MVMDIO_SMI_BUSY); |
| 70 | } |
| 71 | |
Thomas Petazzoni | b07812f | 2012-11-19 11:40:15 +0100 | [diff] [blame] | 72 | /* Wait for the SMI unit to be ready for another operation |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 73 | */ |
| 74 | static int orion_mdio_wait_ready(struct mii_bus *bus) |
| 75 | { |
| 76 | struct orion_mdio_dev *dev = bus->priv; |
Leigh Brown | b70cd1c | 2013-10-29 09:33:31 +0000 | [diff] [blame] | 77 | unsigned long timeout = usecs_to_jiffies(MVMDIO_SMI_TIMEOUT); |
| 78 | unsigned long end = jiffies + timeout; |
| 79 | int timedout = 0; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 80 | |
Leigh Brown | b70cd1c | 2013-10-29 09:33:31 +0000 | [diff] [blame] | 81 | while (1) { |
| 82 | if (orion_mdio_smi_is_done(dev)) |
| 83 | return 0; |
| 84 | else if (timedout) |
| 85 | break; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 86 | |
Leigh Brown | b70cd1c | 2013-10-29 09:33:31 +0000 | [diff] [blame] | 87 | if (dev->err_interrupt <= 0) { |
| 88 | usleep_range(MVMDIO_SMI_POLL_INTERVAL_MIN, |
| 89 | MVMDIO_SMI_POLL_INTERVAL_MAX); |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 90 | |
Leigh Brown | b70cd1c | 2013-10-29 09:33:31 +0000 | [diff] [blame] | 91 | if (time_is_before_jiffies(end)) |
| 92 | ++timedout; |
| 93 | } else { |
Leigh Brown | 1a1f20b | 2013-12-19 13:09:48 +0000 | [diff] [blame] | 94 | /* wait_event_timeout does not guarantee a delay of at |
| 95 | * least one whole jiffie, so timeout must be no less |
| 96 | * than two. |
| 97 | */ |
| 98 | if (timeout < 2) |
| 99 | timeout = 2; |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 100 | wait_event_timeout(dev->smi_busy_wait, |
Leigh Brown | b70cd1c | 2013-10-29 09:33:31 +0000 | [diff] [blame] | 101 | orion_mdio_smi_is_done(dev), |
| 102 | timeout); |
| 103 | |
| 104 | ++timedout; |
| 105 | } |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 106 | } |
| 107 | |
Leigh Brown | b70cd1c | 2013-10-29 09:33:31 +0000 | [diff] [blame] | 108 | dev_err(bus->parent, "Timeout: SMI busy for too long\n"); |
| 109 | return -ETIMEDOUT; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | static int orion_mdio_read(struct mii_bus *bus, int mii_id, |
| 113 | int regnum) |
| 114 | { |
| 115 | struct orion_mdio_dev *dev = bus->priv; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 116 | u32 val; |
| 117 | int ret; |
| 118 | |
| 119 | mutex_lock(&dev->lock); |
| 120 | |
| 121 | ret = orion_mdio_wait_ready(bus); |
Leigh Brown | 839f46b | 2013-10-29 09:33:32 +0000 | [diff] [blame] | 122 | if (ret < 0) |
| 123 | goto out; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 124 | |
| 125 | writel(((mii_id << MVMDIO_SMI_PHY_ADDR_SHIFT) | |
| 126 | (regnum << MVMDIO_SMI_PHY_REG_SHIFT) | |
| 127 | MVMDIO_SMI_READ_OPERATION), |
Florian Fainelli | 3712b71 | 2013-03-22 03:39:26 +0000 | [diff] [blame] | 128 | dev->regs); |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 129 | |
Leigh Brown | 839f46b | 2013-10-29 09:33:32 +0000 | [diff] [blame] | 130 | ret = orion_mdio_wait_ready(bus); |
| 131 | if (ret < 0) |
| 132 | goto out; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 133 | |
Leigh Brown | 839f46b | 2013-10-29 09:33:32 +0000 | [diff] [blame] | 134 | val = readl(dev->regs); |
| 135 | if (!(val & MVMDIO_SMI_READ_VALID)) { |
| 136 | dev_err(bus->parent, "SMI bus read not valid\n"); |
| 137 | ret = -ENODEV; |
| 138 | goto out; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 139 | } |
| 140 | |
Leigh Brown | 839f46b | 2013-10-29 09:33:32 +0000 | [diff] [blame] | 141 | ret = val & 0xFFFF; |
| 142 | out: |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 143 | mutex_unlock(&dev->lock); |
Leigh Brown | 839f46b | 2013-10-29 09:33:32 +0000 | [diff] [blame] | 144 | return ret; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | static int orion_mdio_write(struct mii_bus *bus, int mii_id, |
| 148 | int regnum, u16 value) |
| 149 | { |
| 150 | struct orion_mdio_dev *dev = bus->priv; |
| 151 | int ret; |
| 152 | |
| 153 | mutex_lock(&dev->lock); |
| 154 | |
| 155 | ret = orion_mdio_wait_ready(bus); |
Leigh Brown | 526edcf | 2013-10-29 09:33:33 +0000 | [diff] [blame] | 156 | if (ret < 0) |
| 157 | goto out; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 158 | |
| 159 | writel(((mii_id << MVMDIO_SMI_PHY_ADDR_SHIFT) | |
| 160 | (regnum << MVMDIO_SMI_PHY_REG_SHIFT) | |
| 161 | MVMDIO_SMI_WRITE_OPERATION | |
| 162 | (value << MVMDIO_SMI_DATA_SHIFT)), |
Florian Fainelli | 3712b71 | 2013-03-22 03:39:26 +0000 | [diff] [blame] | 163 | dev->regs); |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 164 | |
Leigh Brown | 526edcf | 2013-10-29 09:33:33 +0000 | [diff] [blame] | 165 | out: |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 166 | mutex_unlock(&dev->lock); |
Leigh Brown | 526edcf | 2013-10-29 09:33:33 +0000 | [diff] [blame] | 167 | return ret; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 168 | } |
| 169 | |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 170 | static irqreturn_t orion_mdio_err_irq(int irq, void *dev_id) |
| 171 | { |
| 172 | struct orion_mdio_dev *dev = dev_id; |
| 173 | |
| 174 | if (readl(dev->regs + MVMDIO_ERR_INT_CAUSE) & |
| 175 | MVMDIO_ERR_INT_SMI_DONE) { |
| 176 | writel(~MVMDIO_ERR_INT_SMI_DONE, |
| 177 | dev->regs + MVMDIO_ERR_INT_CAUSE); |
| 178 | wake_up(&dev->smi_busy_wait); |
| 179 | return IRQ_HANDLED; |
| 180 | } |
| 181 | |
| 182 | return IRQ_NONE; |
| 183 | } |
| 184 | |
Greg KH | 03ce758 | 2012-12-21 13:42:15 +0000 | [diff] [blame] | 185 | static int orion_mdio_probe(struct platform_device *pdev) |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 186 | { |
Florian Fainelli | 7111b71 | 2013-03-22 03:39:25 +0000 | [diff] [blame] | 187 | struct resource *r; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 188 | struct mii_bus *bus; |
| 189 | struct orion_mdio_dev *dev; |
Russell King | 96cb434 | 2017-04-10 16:28:31 +0100 | [diff] [blame] | 190 | int i, ret; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 191 | |
Florian Fainelli | 7111b71 | 2013-03-22 03:39:25 +0000 | [diff] [blame] | 192 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 193 | if (!r) { |
| 194 | dev_err(&pdev->dev, "No SMI register address given\n"); |
| 195 | return -ENODEV; |
| 196 | } |
| 197 | |
Ezequiel Garcia | 56ecd2c | 2014-05-22 20:07:02 -0300 | [diff] [blame] | 198 | bus = devm_mdiobus_alloc_size(&pdev->dev, |
| 199 | sizeof(struct orion_mdio_dev)); |
| 200 | if (!bus) |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 201 | return -ENOMEM; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 202 | |
| 203 | bus->name = "orion_mdio_bus"; |
| 204 | bus->read = orion_mdio_read; |
| 205 | bus->write = orion_mdio_write; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 206 | snprintf(bus->id, MII_BUS_ID_SIZE, "%s-mii", |
| 207 | dev_name(&pdev->dev)); |
| 208 | bus->parent = &pdev->dev; |
| 209 | |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 210 | dev = bus->priv; |
Florian Fainelli | 3712b71 | 2013-03-22 03:39:26 +0000 | [diff] [blame] | 211 | dev->regs = devm_ioremap(&pdev->dev, r->start, resource_size(r)); |
| 212 | if (!dev->regs) { |
Florian Fainelli | 7111b71 | 2013-03-22 03:39:25 +0000 | [diff] [blame] | 213 | dev_err(&pdev->dev, "Unable to remap SMI register\n"); |
Alexey Khoroshilov | f814bfd | 2016-10-01 00:56:37 +0300 | [diff] [blame] | 214 | return -ENODEV; |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | init_waitqueue_head(&dev->smi_busy_wait); |
| 218 | |
Russell King | 96cb434 | 2017-04-10 16:28:31 +0100 | [diff] [blame] | 219 | for (i = 0; i < ARRAY_SIZE(dev->clk); i++) { |
| 220 | dev->clk[i] = of_clk_get(pdev->dev.of_node, i); |
| 221 | if (IS_ERR(dev->clk[i])) |
| 222 | break; |
| 223 | clk_prepare_enable(dev->clk[i]); |
| 224 | } |
Sebastian Hesselbarth | 3d604da | 2013-04-07 01:09:47 +0000 | [diff] [blame] | 225 | |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 226 | dev->err_interrupt = platform_get_irq(pdev, 0); |
Russell King | a51e2c9 | 2017-04-10 16:28:20 +0100 | [diff] [blame] | 227 | if (dev->err_interrupt > 0 && |
| 228 | resource_size(r) < MVMDIO_ERR_INT_MASK + 4) { |
| 229 | dev_err(&pdev->dev, |
| 230 | "disabling interrupt, resource size is too small\n"); |
| 231 | dev->err_interrupt = 0; |
| 232 | } |
Ezequiel Garcia | 39076b0 | 2014-04-30 13:28:51 -0300 | [diff] [blame] | 233 | if (dev->err_interrupt > 0) { |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 234 | ret = devm_request_irq(&pdev->dev, dev->err_interrupt, |
| 235 | orion_mdio_err_irq, |
| 236 | IRQF_SHARED, pdev->name, dev); |
| 237 | if (ret) |
| 238 | goto out_mdio; |
| 239 | |
| 240 | writel(MVMDIO_ERR_INT_SMI_DONE, |
| 241 | dev->regs + MVMDIO_ERR_INT_MASK); |
Ezequiel Garcia | 39076b0 | 2014-04-30 13:28:51 -0300 | [diff] [blame] | 242 | |
| 243 | } else if (dev->err_interrupt == -EPROBE_DEFER) { |
| 244 | return -EPROBE_DEFER; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 245 | } |
| 246 | |
| 247 | mutex_init(&dev->lock); |
| 248 | |
Florian Fainelli | 7111b71 | 2013-03-22 03:39:25 +0000 | [diff] [blame] | 249 | if (pdev->dev.of_node) |
| 250 | ret = of_mdiobus_register(bus, pdev->dev.of_node); |
| 251 | else |
| 252 | ret = mdiobus_register(bus); |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 253 | if (ret < 0) { |
| 254 | dev_err(&pdev->dev, "Cannot register MDIO bus (%d)\n", ret); |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 255 | goto out_mdio; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 256 | } |
| 257 | |
| 258 | platform_set_drvdata(pdev, bus); |
| 259 | |
| 260 | return 0; |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 261 | |
| 262 | out_mdio: |
Russell King | 3728248 | 2017-04-10 16:28:04 +0100 | [diff] [blame] | 263 | if (dev->err_interrupt > 0) |
| 264 | writel(0, dev->regs + MVMDIO_ERR_INT_MASK); |
Russell King | 96cb434 | 2017-04-10 16:28:31 +0100 | [diff] [blame] | 265 | |
| 266 | for (i = 0; i < ARRAY_SIZE(dev->clk); i++) { |
| 267 | if (IS_ERR(dev->clk[i])) |
| 268 | break; |
| 269 | clk_disable_unprepare(dev->clk[i]); |
| 270 | clk_put(dev->clk[i]); |
| 271 | } |
| 272 | |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 273 | return ret; |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 274 | } |
| 275 | |
Greg KH | 03ce758 | 2012-12-21 13:42:15 +0000 | [diff] [blame] | 276 | static int orion_mdio_remove(struct platform_device *pdev) |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 277 | { |
| 278 | struct mii_bus *bus = platform_get_drvdata(pdev); |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 279 | struct orion_mdio_dev *dev = bus->priv; |
Russell King | 96cb434 | 2017-04-10 16:28:31 +0100 | [diff] [blame] | 280 | int i; |
Florian Fainelli | 2ec9852 | 2013-03-22 03:39:27 +0000 | [diff] [blame] | 281 | |
Russell King | 7093a97 | 2017-04-10 16:28:09 +0100 | [diff] [blame] | 282 | if (dev->err_interrupt > 0) |
| 283 | writel(0, dev->regs + MVMDIO_ERR_INT_MASK); |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 284 | mdiobus_unregister(bus); |
Russell King | 96cb434 | 2017-04-10 16:28:31 +0100 | [diff] [blame] | 285 | |
| 286 | for (i = 0; i < ARRAY_SIZE(dev->clk); i++) { |
| 287 | if (IS_ERR(dev->clk[i])) |
| 288 | break; |
| 289 | clk_disable_unprepare(dev->clk[i]); |
| 290 | clk_put(dev->clk[i]); |
| 291 | } |
Sebastian Hesselbarth | 3d604da | 2013-04-07 01:09:47 +0000 | [diff] [blame] | 292 | |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 293 | return 0; |
| 294 | } |
| 295 | |
| 296 | static const struct of_device_id orion_mdio_match[] = { |
| 297 | { .compatible = "marvell,orion-mdio" }, |
| 298 | { } |
| 299 | }; |
| 300 | MODULE_DEVICE_TABLE(of, orion_mdio_match); |
| 301 | |
| 302 | static struct platform_driver orion_mdio_driver = { |
| 303 | .probe = orion_mdio_probe, |
Greg KH | 03ce758 | 2012-12-21 13:42:15 +0000 | [diff] [blame] | 304 | .remove = orion_mdio_remove, |
Thomas Petazzoni | fc8f5ad | 2012-11-12 17:03:47 +0100 | [diff] [blame] | 305 | .driver = { |
| 306 | .name = "orion-mdio", |
| 307 | .of_match_table = orion_mdio_match, |
| 308 | }, |
| 309 | }; |
| 310 | |
| 311 | module_platform_driver(orion_mdio_driver); |
| 312 | |
| 313 | MODULE_DESCRIPTION("Marvell MDIO interface driver"); |
| 314 | MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>"); |
| 315 | MODULE_LICENSE("GPL"); |
Simon Baatz | 404b8be | 2013-03-24 10:33:59 +0000 | [diff] [blame] | 316 | MODULE_ALIAS("platform:orion-mdio"); |