board.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * board.h
  3. *
  4. * TI AM335x boards information header
  5. *
  6. * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
  16. * GNU General Public License for more details.
  17. */
  18. #ifndef _BOARD_H_
  19. #define _BOARD_H_
  20. /*
  21. * TI AM335x parts define a system EEPROM that defines certain sub-fields.
  22. * We use these fields to in turn see what board we are on, and what
  23. * that might require us to set or not set.
  24. */
  25. #define HDR_NO_OF_MAC_ADDR 3
  26. #define HDR_ETH_ALEN 6
  27. #define HDR_NAME_LEN 8
  28. struct am335x_baseboard_id {
  29. unsigned int magic;
  30. char name[HDR_NAME_LEN];
  31. char version[4];
  32. char serial[12];
  33. char config[32];
  34. char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
  35. };
  36. /*
  37. * We have three pin mux functions that must exist. We must be able to enable
  38. * uart0, for initial output and i2c0 to read the main EEPROM. We then have a
  39. * main pinmux function that can be overridden to enable all other pinmux that
  40. * is required on the board.
  41. */
  42. void enable_uart0_pin_mux(void);
  43. void enable_i2c0_pin_mux(void);
  44. void enable_board_pin_mux(struct am335x_baseboard_id *header);
  45. #endif