davinci_emac.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * TI DaVinci EMAC platform support
  3. *
  4. * Author: Kevin Hilman, Deep Root Systems, LLC
  5. *
  6. * 2007 (c) Deep Root Systems, LLC. This file is licensed under
  7. * the terms of the GNU General Public License version 2. This program
  8. * is licensed "as is" without any warranty of any kind, whether express
  9. * or implied.
  10. */
  11. #ifndef _LINUX_DAVINCI_EMAC_H
  12. #define _LINUX_DAVINCI_EMAC_H
  13. #include <linux/if_ether.h>
  14. #include <linux/nvmem-consumer.h>
  15. struct mdio_platform_data {
  16. unsigned long bus_freq;
  17. };
  18. struct emac_platform_data {
  19. char mac_addr[ETH_ALEN];
  20. u32 ctrl_reg_offset;
  21. u32 ctrl_mod_reg_offset;
  22. u32 ctrl_ram_offset;
  23. u32 hw_ram_addr;
  24. u32 ctrl_ram_size;
  25. /*
  26. * phy_id can be one of the following:
  27. * - NULL : use the first phy on the bus,
  28. * - "" : force to 100/full, no mdio control
  29. * - "<bus>:<addr>" : use the specified bus and phy
  30. */
  31. const char *phy_id;
  32. u8 rmii_en;
  33. u8 version;
  34. bool no_bd_ram;
  35. void (*interrupt_enable) (void);
  36. void (*interrupt_disable) (void);
  37. };
  38. enum {
  39. EMAC_VERSION_1, /* DM644x */
  40. EMAC_VERSION_2, /* DM646x */
  41. };
  42. #endif