mv643xx_eth.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * MV-643XX ethernet platform device data definition file.
  3. */
  4. #ifndef __LINUX_MV643XX_ETH_H
  5. #define __LINUX_MV643XX_ETH_H
  6. #include <linux/mbus.h>
  7. #define MV643XX_ETH_SHARED_NAME "mv643xx_eth"
  8. #define MV643XX_ETH_NAME "mv643xx_eth_port"
  9. #define MV643XX_ETH_SHARED_REGS 0x2000
  10. #define MV643XX_ETH_SHARED_REGS_SIZE 0x2000
  11. #define MV643XX_ETH_BAR_4 0x2220
  12. #define MV643XX_ETH_SIZE_REG_4 0x2224
  13. #define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x2290
  14. struct mv643xx_eth_shared_platform_data {
  15. struct mbus_dram_target_info *dram;
  16. unsigned int t_clk;
  17. };
  18. struct mv643xx_eth_platform_data {
  19. /*
  20. * Pointer back to our parent instance, and our port number.
  21. */
  22. struct platform_device *shared;
  23. int port_number;
  24. /*
  25. * Whether a PHY is present, and if yes, at which address.
  26. */
  27. struct platform_device *shared_smi;
  28. int force_phy_addr;
  29. int phy_addr;
  30. /*
  31. * Use this MAC address if it is valid, overriding the
  32. * address that is already in the hardware.
  33. */
  34. u8 mac_addr[6];
  35. /*
  36. * If speed is 0, autonegotiation is enabled.
  37. * Valid values for speed: 0, SPEED_10, SPEED_100, SPEED_1000.
  38. * Valid values for duplex: DUPLEX_HALF, DUPLEX_FULL.
  39. */
  40. int speed;
  41. int duplex;
  42. /*
  43. * Which RX/TX queues to use.
  44. */
  45. int rx_queue_mask;
  46. int tx_queue_mask;
  47. /*
  48. * Override default RX/TX queue sizes if nonzero.
  49. */
  50. int rx_queue_size;
  51. int tx_queue_size;
  52. /*
  53. * Use on-chip SRAM for RX/TX descriptors if size is nonzero
  54. * and sufficient to contain all descriptors for the requested
  55. * ring sizes.
  56. */
  57. unsigned long rx_sram_addr;
  58. int rx_sram_size;
  59. unsigned long tx_sram_addr;
  60. int tx_sram_size;
  61. };
  62. #endif