summaryrefslogtreecommitdiff
path: root/board/ads5121/ads5121.c
diff options
context:
space:
mode:
authorMartha Marx <mmarx@silicontkx.com>2008-05-29 14:23:25 -0400
committerJohn Rigby <jrigby@freescale.com>2008-07-10 11:36:42 -0600
commitf31c49db2a5e076f415c0785eb37f67f2faa5fc8 (patch)
tree5d89a520255ea95f33adbffc50660a209033eaf3 /board/ads5121/ads5121.c
parent16bee7b0dc294ee01ca2434aa1dd3bd717a69615 (diff)
downloadu-boot-imx-f31c49db2a5e076f415c0785eb37f67f2faa5fc8.zip
u-boot-imx-f31c49db2a5e076f415c0785eb37f67f2faa5fc8.tar.gz
u-boot-imx-f31c49db2a5e076f415c0785eb37f67f2faa5fc8.tar.bz2
Configuration changes for ADS5121 Rev 3
ADS5121 Rev 3 board is now the default config config targets are now ads5121_config Rev 3 board with PCI M41T62 on board RTC 512MB DRAM ads5121_rev2_config Rev 2 board with No PCI 256MB DRAM Signed-off-by: Martha Marx <mmarx@silicontkx.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: John Rigby <jrigby@freescale.com>
Diffstat (limited to 'board/ads5121/ads5121.c')
-rw-r--r--board/ads5121/ads5121.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index 130b81d..de59991 100644
--- a/board/ads5121/ads5121.c
+++ b/board/ads5121/ads5121.c
@@ -26,7 +26,9 @@
#include <asm/bitops.h>
#include <command.h>
#include <fdt_support.h>
-
+#ifdef CONFIG_MISC_INIT_R
+#include <i2c.h>
+#endif
/* Clocks in use */
#define SCCR1_CLOCKS_EN (CLOCK_SCCR1_CFG_EN | \
CLOCK_SCCR1_LPC_EN | \
@@ -75,8 +77,21 @@ int board_early_init_f (void)
* Without this the flash identification routine fails, as it needs to issue
* write commands in order to establish the device ID.
*/
- *((volatile u8 *)(CFG_CPLD_BASE + 0x08)) = 0xC1;
+#ifdef CONFIG_ADS5121_REV2
+ *((volatile u8 *)(CFG_CPLD_BASE + 0x08)) = 0xC1;
+#else
+ if (*((u8 *)(CFG_CPLD_BASE + 0x08)) & 0x04) {
+ *((volatile u8 *)(CFG_CPLD_BASE + 0x08)) = 0xC1;
+ } else {
+ /* running from Backup flash */
+ *((volatile u8 *)(CFG_CPLD_BASE + 0x08)) = 0x32;
+ }
+#endif
+ /*
+ * Configure Flash Speed
+ */
+ *((volatile u32 *)(CFG_IMMR + LPC_OFFSET + CS0_CONFIG)) = CFG_CS0_CFG;
/*
* Enable clocks
*/