1/*
2 *  Atheros AR71xx SoC device definitions
3 *
4 *  Copyright (C) 2008-2012 Gabor Juhos <juhosg@openwrt.org>
5 *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
6 *
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.
10 */
11
12#ifndef _ATH79_DEV_ETH_H
13#define _ATH79_DEV_ETH_H
14
15#include <asm/mach-ath79/ag71xx_platform.h>
16
17struct platform_device;
18
19extern unsigned char ath79_mac_base[] __initdata;
20void ath79_parse_ascii_mac(char *mac_str, u8 *mac);
21void ath79_init_mac(unsigned char *dst, const unsigned char *src,
22		    int offset);
23void ath79_init_local_mac(unsigned char *dst, const unsigned char *src);
24
25struct ath79_eth_pll_data {
26	u32	pll_10;
27	u32	pll_100;
28	u32	pll_1000;
29};
30
31extern struct ath79_eth_pll_data ath79_eth0_pll_data;
32extern struct ath79_eth_pll_data ath79_eth1_pll_data;
33
34extern struct ag71xx_platform_data ath79_eth0_data;
35extern struct ag71xx_platform_data ath79_eth1_data;
36extern struct platform_device ath79_eth0_device;
37extern struct platform_device ath79_eth1_device;
38void ath79_register_eth(unsigned int id);
39
40extern struct ag71xx_switch_platform_data ath79_switch_data;
41
42extern struct ag71xx_mdio_platform_data ath79_mdio0_data;
43extern struct ag71xx_mdio_platform_data ath79_mdio1_data;
44extern struct platform_device ath79_mdio0_device;
45extern struct platform_device ath79_mdio1_device;
46void ath79_register_mdio(unsigned int id, u32 phy_mask);
47
48void ath79_setup_ar933x_phy4_switch(bool mac, bool mdio);
49void ath79_setup_ar934x_eth_cfg(u32 mask);
50void ath79_setup_ar934x_eth_rx_delay(unsigned int rxd, unsigned int rxdv);
51void ath79_setup_qca955x_eth_cfg(u32 mask);
52
53#endif /* _ATH79_DEV_ETH_H */
54