diff options
Diffstat (limited to 'board/ti/am43xx/board.h')
-rw-r--r-- | board/ti/am43xx/board.h | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/board/ti/am43xx/board.h b/board/ti/am43xx/board.h index eb9493e191..2cf7a7751d 100644 --- a/board/ti/am43xx/board.h +++ b/board/ti/am43xx/board.h @@ -14,58 +14,37 @@ #include <asm/arch/omap.h> -static char *const am43xx_board_name = (char *)AM4372_BOARD_NAME_START; -static char *const am43xx_board_rev = (char *)AM4372_BOARD_VERSION_START; - -/* - * TI AM437x EVMs define a system EEPROM that defines certain sub-fields. - * We use these fields to in turn see what board we are on, and what - * that might require us to set or not set. - */ -#define HDR_NO_OF_MAC_ADDR 3 -#define HDR_ETH_ALEN 6 -#define HDR_NAME_LEN 8 - -#define DEV_ATTR_MAX_OFFSET 5 -#define DEV_ATTR_MIN_OFFSET 0 - -struct am43xx_board_id { - unsigned int magic; - char name[HDR_NAME_LEN]; - char version[4]; - char serial[12]; - char config[32]; - char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN]; -}; +#define DEV_ATTR_MAX_OFFSET 5 +#define DEV_ATTR_MIN_OFFSET 0 static inline int board_is_eposevm(void) { - return !strncmp(am43xx_board_name, "AM43EPOS", HDR_NAME_LEN); + return board_ti_is("AM43EPOS"); } static inline int board_is_gpevm(void) { - return !strncmp(am43xx_board_name, "AM43__GP", HDR_NAME_LEN); + return board_ti_is("AM43__GP"); } static inline int board_is_sk(void) { - return !strncmp(am43xx_board_name, "AM43__SK", HDR_NAME_LEN); + return board_ti_is("AM43__SK"); } static inline int board_is_idk(void) { - return !strncmp(am43xx_board_name, "AM43_IDK", HDR_NAME_LEN); + return board_ti_is("AM43_IDK"); } static inline int board_is_evm_14_or_later(void) { - return (board_is_gpevm() && strncmp("1.4", am43xx_board_rev, 3) <= 0); + return (board_is_gpevm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0); } static inline int board_is_evm_12_or_later(void) { - return (board_is_gpevm() && strncmp("1.2", am43xx_board_rev, 3) <= 0); + return (board_is_gpevm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0); } void enable_uart0_pin_mux(void); |