diff options
author | roy zang <tie-fei.zang@freescale.com> | 2007-01-22 13:15:35 +0800 |
---|---|---|
committer | Zang Tiefei <roy@bus.ap.freescale.net> | 2007-01-22 13:15:35 +0800 |
commit | ee460917afb74767aedc3da095d4fec4a50ba6f8 (patch) | |
tree | fdead38c4681fc9adbedd6836792660f933614d3 /board/prodrive/alpr/alpr.c | |
parent | a41969e09b9d886091a804c2ba5f1ab84b084dd3 (diff) | |
parent | a4012396645533aef218354eeba754dff0deace8 (diff) | |
download | u-boot-imx-ee460917afb74767aedc3da095d4fec4a50ba6f8.zip u-boot-imx-ee460917afb74767aedc3da095d4fec4a50ba6f8.tar.gz u-boot-imx-ee460917afb74767aedc3da095d4fec4a50ba6f8.tar.bz2 |
Merge branch 'master' into hpc2
Conflicts:
drivers/cfi_flash.c
The patch by Heiko Schocher <hs@pollux.denx.de> on Jan, 19, 2007
fixes cfi_driver bug for mpc7448hpc2 board. The default cfi_driver can support
mpc7448hpc2 board.
Diffstat (limited to 'board/prodrive/alpr/alpr.c')
-rw-r--r-- | board/prodrive/alpr/alpr.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/board/prodrive/alpr/alpr.c b/board/prodrive/alpr/alpr.c index 2389561..5abc87d 100644 --- a/board/prodrive/alpr/alpr.c +++ b/board/prodrive/alpr/alpr.c @@ -77,8 +77,12 @@ int board_early_init_f (void) mtdcr (uicb0tr, 0x00000000); /* */ mtdcr (uicb0vr, 0x00000001); /* */ + /* Setup shutdown/SSD empty interrupt as inputs */ + out32(GPIO0_TCR, in32(GPIO0_TCR) & ~(CFG_GPIO_SHUTDOWN | CFG_GPIO_SSD_EMPTY)); + out32(GPIO0_ODR, in32(GPIO0_ODR) & ~(CFG_GPIO_SHUTDOWN | CFG_GPIO_SSD_EMPTY)); + /* Setup GPIO/IRQ multiplexing */ - mtsdr(sdr_pfc0, 0x01a03e00); + mtsdr(sdr_pfc0, 0x01a33e00); return 0; } @@ -105,26 +109,11 @@ int last_stage_init(void) static int board_rev(void) { - int rev; - u32 pfc0; - - /* Setup GPIO14 & 15 as GPIO */ - mfsdr(sdr_pfc0, pfc0); - pfc0 |= CFG_GPIO_REV0 | CFG_GPIO_REV1; - mtsdr(sdr_pfc0, pfc0); - /* Setup as input */ - out32(GPIO0_TCR, in32(GPIO0_TCR) & ~(CFG_GPIO_REV0 | CFG_GPIO_REV0)); - out32(GPIO0_ODR, in32(GPIO0_ODR) & ~(CFG_GPIO_REV0 | CFG_GPIO_REV0)); - - rev = (in32(GPIO0_IR) >> 16) & 0x3; - - /* Setup GPIO14 & 15 as non GPIO again */ - mfsdr(sdr_pfc0, pfc0); - pfc0 &= ~(CFG_GPIO_REV0 | CFG_GPIO_REV1); - mtsdr(sdr_pfc0, pfc0); + out32(GPIO0_TCR, in32(GPIO0_TCR) & ~(CFG_GPIO_REV0 | CFG_GPIO_REV1)); + out32(GPIO0_ODR, in32(GPIO0_ODR) & ~(CFG_GPIO_REV0 | CFG_GPIO_REV1)); - return rev; + return (in32(GPIO0_IR) >> 16) & 0x3; } int checkboard (void) |