summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-static.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-10-17 10:40:00 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-10-17 10:40:00 +0000
commit4f609eec670815166ca1d18e96f7cc4ed430f4ee (patch)
tree56ef774c74a526d770c8d4686d03f6a55847fae8 /c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-static.c
parent2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-4f609eec670815166ca1d18e96f7cc4ed430f4ee.tar.bz2
2011-10-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
* include/start-config.h, make/custom/lpc24xx_plx800_rom_int.cfg, startup/linkcmds.lpc24xx_plx800_rom_int, startup/start-config-emc-dynamic.c, startup/start-config-emc-static.c, startup/start-config-pinsel.c: New files. * Makefile.am, configure.ac, preinstall.am: Reflect changes above. * startup/bspstarthooks.c: Use configuration tables for EMC initialization.
Diffstat (limited to 'c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-static.c')
-rw-r--r--c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-static.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-static.c b/c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-static.c
new file mode 100644
index 0000000000..2efcacd3ba
--- /dev/null
+++ b/c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-static.c
@@ -0,0 +1,75 @@
+/**
+ * @file
+ *
+ * @ingroup lpc24xx
+ *
+ * @brief BSP start EMC static memory configuration.
+ */
+
+/*
+ * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#include <bsp/start-config.h>
+#include <bsp/lpc24xx.h>
+
+const BSP_START_DATA_SECTION lpc24xx_emc_static_chip_config
+ lpc24xx_start_config_emc_static_chip [] = {
+#ifdef LPC24XX_EMC_NUMONYX
+ /*
+ * Static Memory 1: Numonyx M29W160EB
+ *
+ * 1 clock cycle = 1/72MHz = 13.9ns
+ */
+ {
+ .chip_select = (volatile lpc_emc_static *) EMC_STA_BASE_1,
+ .config = {
+ /*
+ * 16 bit, page mode disabled, active LOW chip select, extended wait
+ * disabled, writes not protected, byte lane state LOW/LOW (!).
+ */
+ .config = 0x81,
+
+ /* 1 clock cycles delay from the chip select 1 to the write enable */
+ .waitwen = 0,
+
+ /*
+ * 0 clock cycles delay from the chip select 1 or address change
+ * (whichever is later) to the output enable
+ */
+ .waitoen = 0,
+
+ /* 7 clock cycles delay from the chip select 1 to the read access */
+ .waitrd = 0x6,
+
+ /*
+ * 32 clock cycles delay for asynchronous page mode sequential accesses
+ */
+ .waitpage = 0x1f,
+
+ /* 5 clock cycles delay from the chip select 1 to the write access */
+ .waitwr = 0x3,
+
+ /* 16 bus turnaround cycles */
+ .waitrun = 0xf
+ }
+ }
+#endif /* LPC24XX_EMC_NUMONYX */
+};
+
+const BSP_START_DATA_SECTION size_t
+ lpc24xx_start_config_emc_static_chip_count =
+ sizeof(lpc24xx_start_config_emc_static_chip)
+ / sizeof(lpc24xx_start_config_emc_static_chip [0]);