diff options
author | Tom Rini <trini@ti.com> | 2012-10-01 08:21:35 -0700 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-01 08:21:35 -0700 |
commit | e1f92e819d612b0bd86d3703fe574cae8c33ce1f (patch) | |
tree | 0dbfe717fc3d32932ec04fa35dee12cd1125e54a /board/amirix/ap1000/ap1000.c | |
parent | 4668a086bb0a769b741e3a4ffab85f1c41c7cdb8 (diff) | |
download | u-boot-imx-e1f92e819d612b0bd86d3703fe574cae8c33ce1f.zip u-boot-imx-e1f92e819d612b0bd86d3703fe574cae8c33ce1f.tar.gz u-boot-imx-e1f92e819d612b0bd86d3703fe574cae8c33ce1f.tar.bz2 |
AP1000: Inline local 'get_device'
The AP1000 defines a 'get_device' function to determine what board
revision we are on. Inline that checking as it conflicts with the
get_device() in <part.h> and is only used once.
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'board/amirix/ap1000/ap1000.c')
-rw-r--r-- | board/amirix/ap1000/ap1000.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/board/amirix/ap1000/ap1000.c b/board/amirix/ap1000/ap1000.c index 64de04c..dbcb34b 100644 --- a/board/amirix/ap1000/ap1000.c +++ b/board/amirix/ap1000/ap1000.c @@ -43,11 +43,13 @@ int checkboard (void) /* After a loadace command, the SystemAce control register is left in a wonky state. */ /* this code did not work in board_pre_init */ unsigned char *p = (unsigned char *) AP1000_SYSACE_REGBASE; + unsigned int *revision_reg_ptr = (unsigned int *) AP1xx_FPGA_REV_ADDR; + unsigned int device = (*revision_reg_ptr & AP1xx_TARGET_MASK); p[SYSACE_CTRLREG0] = 0x0; /* add platform and device to banner */ - switch (get_device ()) { + switch (device) { case AP1xx_AP107_TARGET: puts (AP1xx_AP107_TARGET_STR); break; @@ -160,13 +162,6 @@ unsigned int get_platform (void) return (*revision_reg_ptr & AP1xx_PLATFORM_MASK); } -unsigned int get_device (void) -{ - unsigned int *revision_reg_ptr = (unsigned int *) AP1xx_FPGA_REV_ADDR; - - return (*revision_reg_ptr & AP1xx_TARGET_MASK); -} - #if 0 /* loadace is not working; it appears to be a hardware issue with the system ace. */ /* This function loads FPGA configurations from the SystemACE CompactFlash |