ar71xx: remove dev-ap91-eth.c. switch its only user (RB-750) to the new switch driver
SVN-Revision: 23439v19.07.3_mercusys_ac12_duma
parent
4b16a5ba97
commit
fc035b3cb6
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Atheros AP91 reference board ethernet initialization
|
||||
*
|
||||
* Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "devices.h"
|
||||
#include "dev-dsa.h"
|
||||
#include "dev-ap91-eth.h"
|
||||
|
||||
static struct dsa_chip_data ap91_dsa_chip = {
|
||||
.port_names[0] = "cpu",
|
||||
.port_names[1] = "lan1",
|
||||
.port_names[2] = "lan2",
|
||||
.port_names[3] = "lan3",
|
||||
.port_names[4] = "lan4",
|
||||
};
|
||||
|
||||
static struct dsa_platform_data ap91_dsa_data = {
|
||||
.nr_chips = 1,
|
||||
.chip = &ap91_dsa_chip,
|
||||
};
|
||||
|
||||
static void ap91_eth_set_port_name(unsigned port, const char *name)
|
||||
{
|
||||
if (port < 1 || port > 5)
|
||||
return;
|
||||
|
||||
if (name)
|
||||
ap91_dsa_chip.port_names[port] = (char *) name;
|
||||
}
|
||||
|
||||
void __init ap91_eth_init(const char *port_names[])
|
||||
{
|
||||
if (port_names) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < AP91_ETH_NUM_PORT_NAMES; i++)
|
||||
ap91_eth_set_port_name(i + 1, port_names[i]);
|
||||
}
|
||||
|
||||
/* WAN port */
|
||||
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
|
||||
ar71xx_eth0_data.speed = SPEED_100;
|
||||
ar71xx_eth0_data.duplex = DUPLEX_FULL;
|
||||
|
||||
/* LAN ports */
|
||||
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
|
||||
ar71xx_eth1_data.speed = SPEED_1000;
|
||||
ar71xx_eth1_data.duplex = DUPLEX_FULL;
|
||||
|
||||
ar71xx_add_device_mdio(0x0);
|
||||
ar71xx_add_device_eth(1);
|
||||
ar71xx_add_device_eth(0);
|
||||
|
||||
ar71xx_add_device_dsa(1, &ap91_dsa_data);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Atheros AP91 reference board ethernet initialization
|
||||
*
|
||||
* Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _AR71XX_DEV_AP91_ETH_H
|
||||
#define _AR71XX_DEV_AP91_ETH_H
|
||||
|
||||
#define AP91_ETH_NUM_PORT_NAMES 4
|
||||
|
||||
#if defined(CONFIG_AR71XX_DEV_AP91_ETH)
|
||||
void ap91_eth_init(const char *port_names[]) __init;
|
||||
#else
|
||||
static inline void ap91_eth_init(const char *port_names[]) { }
|
||||
#endif
|
||||
|
||||
#endif /* _AR71XX_DEV_AP91_ETH_H */
|
||||
|
Loading…
Reference in New Issue