Linux 4.16.11
[linux/fpc-iii.git] / drivers / net / dsa / dsa_loop_bdinfo.c
blobfb8d5dc71013c40ad9e0341c9c2d7998c14ae17e
1 #include <linux/kernel.h>
2 #include <linux/init.h>
3 #include <linux/phy.h>
4 #include <net/dsa.h>
6 #include "dsa_loop.h"
8 static struct dsa_loop_pdata dsa_loop_pdata = {
9 .cd = {
10 .port_names[0] = "lan1",
11 .port_names[1] = "lan2",
12 .port_names[2] = "lan3",
13 .port_names[3] = "lan4",
14 .port_names[DSA_LOOP_CPU_PORT] = "cpu",
16 .name = "DSA mockup driver",
17 .enabled_ports = 0x1f,
18 .netdev = "eth0",
21 static const struct mdio_board_info bdinfo = {
22 .bus_id = "fixed-0",
23 .modalias = "dsa-loop",
24 .mdio_addr = 31,
25 .platform_data = &dsa_loop_pdata,
28 static int __init dsa_loop_bdinfo_init(void)
30 return mdiobus_register_board_info(&bdinfo, 1);
32 arch_initcall(dsa_loop_bdinfo_init)
34 MODULE_LICENSE("GPL");