dev-eth.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #ifndef _ATH79_DEV_ETH_H
  12. #define _ATH79_DEV_ETH_H
  13. #include <asm/mach-ath79/ag71xx_platform.h>
  14. struct platform_device;
  15. extern unsigned char ath79_mac_base[] __initdata;
  16. void ath79_parse_ascii_mac(char *mac_str, u8 *mac);
  17. void ath79_init_mac(unsigned char *dst, const unsigned char *src,
  18. int offset);
  19. void ath79_init_local_mac(unsigned char *dst, const unsigned char *src);
  20. struct ath79_eth_pll_data {
  21. u32 pll_10;
  22. u32 pll_100;
  23. u32 pll_1000;
  24. };
  25. extern struct ath79_eth_pll_data ath79_eth0_pll_data;
  26. extern struct ath79_eth_pll_data ath79_eth1_pll_data;
  27. extern struct ag71xx_platform_data ath79_eth0_data;
  28. extern struct ag71xx_platform_data ath79_eth1_data;
  29. extern struct platform_device ath79_eth0_device;
  30. extern struct platform_device ath79_eth1_device;
  31. void ath79_register_eth(unsigned int id);
  32. extern struct ag71xx_switch_platform_data ath79_switch_data;
  33. extern struct ag71xx_mdio_platform_data ath79_mdio0_data;
  34. extern struct ag71xx_mdio_platform_data ath79_mdio1_data;
  35. extern struct platform_device ath79_mdio0_device;
  36. extern struct platform_device ath79_mdio1_device;
  37. void ath79_register_mdio(unsigned int id, u32 phy_mask);
  38. void ath79_setup_ar933x_phy4_switch(bool mac, bool mdio);
  39. void ath79_setup_ar934x_eth_cfg(u32 mask);
  40. void ath79_setup_ar934x_eth_rx_delay(unsigned int rxd, unsigned int rxdv);
  41. void ath79_setup_qca955x_eth_cfg(u32 mask);
  42. #endif /* _ATH79_DEV_ETH_H */