dev-eth.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. void ath79_setup_qca956x_eth_cfg(u32 mask);
  43. #endif /* _ATH79_DEV_ETH_H */