diff options
author | Tom Rini <trini@ti.com> | 2013-07-18 15:13:01 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-07-30 09:21:41 -0400 |
commit | ace4275eb33b7833d96fa2db02d253e06cc1a734 (patch) | |
tree | b87ef8256138084811001fa2e89533249d5c0b3a /board/ti/am335x/mux.c | |
parent | 6454028abbfcbfb6c448bafa165eeebf2da420c8 (diff) | |
download | u-boot-ace4275eb33b7833d96fa2db02d253e06cc1a734.tar.gz |
am335x_evm: Rework board_is_foo() checks
We rework the various board_is_foo() checks to take a pointer to
struct am335x_baseboard_id rather than using a local copy in board.c.
This allows us to make use of the same checks in mux.c as well as fixing
problems when this code could be running from read-only memory.
Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'board/ti/am335x/mux.c')
-rw-r--r-- | board/ti/am335x/mux.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 02837082cb..2e09d98f9e 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -262,13 +262,13 @@ static unsigned short detect_daughter_board_profile(void) void enable_board_pin_mux(struct am335x_baseboard_id *header) { /* Do board-specific muxes. */ - if (!strncmp(header->name, "A335BONE", HDR_NAME_LEN)) { + if (board_is_bone(header)) { /* Beaglebone pinmux */ configure_module_pin_mux(i2c1_pin_mux); configure_module_pin_mux(mii1_pin_mux); configure_module_pin_mux(mmc0_pin_mux); configure_module_pin_mux(mmc1_pin_mux); - } else if (!strncmp(header->config, "SKU#01", 6)) { + } else if (board_is_gp_evm(header)) { /* General Purpose EVM */ unsigned short profile = detect_daughter_board_profile(); configure_module_pin_mux(rgmii1_pin_mux); @@ -283,7 +283,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header) configure_module_pin_mux(mmc1_pin_mux); configure_module_pin_mux(spi0_pin_mux); } - } else if (!strncmp(header->config, "SKU#02", 6)) { + } else if (board_is_idk(header)) { /* * Industrial Motor Control (IDK) * note: IDK console is on UART3 by default. @@ -292,13 +292,13 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header) */ configure_module_pin_mux(mii1_pin_mux); configure_module_pin_mux(mmc0_no_cd_pin_mux); - } else if (!strncmp(header->name, "A335X_SK", HDR_NAME_LEN)) { + } else if (board_is_evm_sk(header)) { /* Starter Kit EVM */ configure_module_pin_mux(i2c1_pin_mux); configure_module_pin_mux(gpio0_7_pin_mux); configure_module_pin_mux(rgmii1_pin_mux); configure_module_pin_mux(mmc0_pin_mux_sk_evm); - } else if (!strncmp(header->name, "A335BNLT", HDR_NAME_LEN)) { + } else if (board_is_bone_lt(header)) { /* Beaglebone LT pinmux */ configure_module_pin_mux(i2c1_pin_mux); configure_module_pin_mux(mii1_pin_mux); |