summaryrefslogtreecommitdiffstats
path: root/board/atc
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-18 20:22:24 +0000
committerwdenk <wdenk>2003-06-18 20:22:24 +0000
commit15ef8a5d17181ea376fac94579dce0af1cfcdeb7 (patch)
tree2c1b3f24078b0f68b0748b0d493860abe8d432f1 /board/atc
parent2abbe0754759f94c79125a2534fbc4be74f416bc (diff)
downloadbootable_bootloader_goldelico_gta04-15ef8a5d17181ea376fac94579dce0af1cfcdeb7.zip
bootable_bootloader_goldelico_gta04-15ef8a5d17181ea376fac94579dce0af1cfcdeb7.tar.gz
bootable_bootloader_goldelico_gta04-15ef8a5d17181ea376fac94579dce0af1cfcdeb7.tar.bz2
Add support for DS12887 RTC; add RTC support for ATC board
Diffstat (limited to 'board/atc')
-rw-r--r--board/atc/atc.c54
-rw-r--r--board/atc/config.mk7
2 files changed, 55 insertions, 6 deletions
diff --git a/board/atc/atc.c b/board/atc/atc.c
index 21ed2b0..ea7416a 100644
--- a/board/atc/atc.c
+++ b/board/atc/atc.c
@@ -203,6 +203,49 @@ const iop_conf_t iop_conf_tab[4][32] = {
}
};
+/*
+ * UPMB initialization table
+ */
+#define _NOT_USED_ 0xFFFFFFFF
+
+static const uint rtc_table[] =
+{
+ /*
+ * Single Read. (Offset 0 in UPMA RAM)
+ */
+ 0xfffec00, 0xfffac00, 0xfff2d00, 0xfef2800,
+ 0xfaf2080, 0xfaf2080, 0xfff2400, 0x1fff6c05, /* last */
+ /*
+ * Burst Read. (Offset 8 in UPMA RAM)
+ */
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ /*
+ * Single Write. (Offset 18 in UPMA RAM)
+ */
+ 0xfffec00, 0xfffac00, 0xfff2d00, 0xfef2800,
+ 0xfaf2080, 0xfaf2080, 0xfaf2400, 0x1fbf6c05, /* last */
+ /*
+ * Burst Write. (Offset 20 in UPMA RAM)
+ */
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ /*
+ * Refresh (Offset 30 in UPMA RAM)
+ */
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+ /*
+ * Exception. (Offset 3c in UPMA RAM)
+ */
+ _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
+};
+
/* ------------------------------------------------------------------------- */
/* Check Board Identity:
@@ -319,6 +362,17 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
return (maxsize);
}
+int misc_init_r(void)
+{
+ volatile immap_t *immap = (immap_t *) CFG_IMMR;
+ volatile memctl8260_t *memctl = &immap->im_memctl;
+
+ upmconfig(UPMA, (uint *)rtc_table, sizeof(rtc_table) / sizeof(uint));
+ memctl->memc_mamr = MxMR_RLFx_6X | MxMR_WLFx_6X | MxMR_OP_NORM;
+
+ return (0);
+}
+
long int initdram (int board_type)
{
volatile immap_t *immap = (immap_t *) CFG_IMMR;
diff --git a/board/atc/config.mk b/board/atc/config.mk
index 8fc82f3..eee7a60 100644
--- a/board/atc/config.mk
+++ b/board/atc/config.mk
@@ -30,12 +30,7 @@
# in RAM where U-Boot is loaded at for debugging.
#
-ifeq ($(CONFIG_BOOT_ROM),y)
- TEXT_BASE := 0xFF800000
- PLATFORM_CPPFLAGS += -DCONFIG_BOOT_ROM
-else
- TEXT_BASE := 0xFF000000
-endif
+TEXT_BASE := 0xFF000000
# RAM version
#TEXT_BASE := 0x100000