sys_proto.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * sys_proto.h
  3. *
  4. * System 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 _SYS_PROTO_H_
  19. #define _SYS_PROTO_H_
  20. /*
  21. * 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. #define BOARD_REV_ID 0x0
  37. u32 get_cpu_rev(void);
  38. u32 get_sysboot_value(void);
  39. #ifdef CONFIG_DISPLAY_CPUINFO
  40. int print_cpuinfo(void);
  41. #endif
  42. u32 get_device_type(void);
  43. void setup_clocks_for_console(void);
  44. void ddr_pll_config(unsigned int ddrpll_M);
  45. /*
  46. * We have three pin mux functions that must exist. We must be able to enable
  47. * uart0, for initial output and i2c0 to read the main EEPROM. We then have a
  48. * main pinmux function that can be overridden to enable all other pinmux that
  49. * is required on the board.
  50. */
  51. void enable_uart0_pin_mux(void);
  52. void enable_i2c0_pin_mux(void);
  53. void enable_board_pin_mux(struct am335x_baseboard_id *header);
  54. #endif