2 * Atheros AR71xx DSA switch device support
4 * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
5 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
15 #include <asm/mach-ar71xx/ar71xx.h>
20 static struct platform_device ar71xx_dsa_switch_device = {
25 void __init ar71xx_add_device_dsa(struct device *netdev,
26 struct device *miidev,
27 struct dsa_platform_data *d)
32 for (i = 0; i < d->nr_chips; i++)
33 d->chip[i].mii_bus = miidev;
35 ar71xx_dsa_switch_device.dev.platform_data = d;
37 platform_device_register(&ar71xx_dsa_switch_device);