Add support for LPC2468 from NXP
Basic startup code
Internal flash is supported (for environment storage)
Signed-off-by: Remco Poelstra
---
MAINTAINERS |4 +
MAKEALL |1 +
Makefile |3 +
arch/arm/cpu/arm720t/cpu.c |4 +-
arch/arm/cpu/arm720t/interrupts.c| 43 ++-
arch/arm/cpu/arm720t/lpc24xx/Makefile| 50 +++
arch/arm/cpu/arm720t/lpc24xx/flash.c | 236
arch/arm/cpu/arm720t/lpc24xx/iap_entry.S |7 +
arch/arm/cpu/arm720t/start.S | 12 +-
arch/arm/include/asm/arch-lpc24xx/hardware.h | 32 ++
arch/arm/include/asm/arch-lpc24xx/immap.h| 532
++
arch/arm/include/asm/config.h|4 +
arch/arm/lib/eabi_compat.c |5 +
drivers/serial/Makefile |1 +
drivers/serial/serial_lpc2468.c | 119 ++
include/flash.h |1 +
16 files changed, 1049 insertions(+), 5 deletions(-)
create mode 100644 arch/arm/cpu/arm720t/lpc24xx/Makefile
create mode 100644 arch/arm/cpu/arm720t/lpc24xx/flash.c
create mode 100644 arch/arm/cpu/arm720t/lpc24xx/iap_entry.S
create mode 100644 arch/arm/include/asm/arch-lpc24xx/hardware.h
create mode 100644 arch/arm/include/asm/arch-lpc24xx/immap.h
create mode 100644 drivers/serial/serial_lpc2468.c
diff --git a/MAINTAINERS b/MAINTAINERS
index 5cbc845..3cdf22d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -708,6 +708,10 @@ Manikandan Pillai
omap3_evmARM CORTEX-A8 (OMAP3xx SoC)
+Remco Poelstra
+
+LPC2468LPC2468
+
Stelian Pop
at91cap9adkARM926EJS (AT91CAP9 SoC)
diff --git a/MAKEALL b/MAKEALL
index bb09627..2f747c6 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -540,6 +540,7 @@ LIST_ARM7="\
impa7\
integratorap\
lpc2292sodimm\
+LPC2468\
modnet50\
SMN42\
"
diff --git a/Makefile b/Makefile
index 82cbbf4..a4212c8 100644
--- a/Makefile
+++ b/Makefile
@@ -3148,6 +3148,9 @@ evb4510_config :unconfig
lpc2292sodimm_config:unconfig
@$(MKCONFIG) $(@:_config=) arm arm720t lpc2292sodimm NULL lpc2292
+LPC2468_config:unconfig
+@$(MKCONFIG) $(@:_config=) arm arm720t LPC2468 NULL lpc24xx
+
SMN42_config:unconfig
@$(MKCONFIG) $(@:_config=) arm arm720t SMN42 siemens lpc2292
diff --git a/arch/arm/cpu/arm720t/cpu.c b/arch/arm/cpu/arm720t/cpu.c
index 88c71bf..578358c 100644
--- a/arch/arm/cpu/arm720t/cpu.c
+++ b/arch/arm/cpu/arm720t/cpu.c
@@ -63,7 +63,9 @@ int cleanup_before_linux (void)
/* go to high speed */
IO_SYSCON3 = (IO_SYSCON3 & ~CLKCTL) | CLKCTL_73;
#endif
-#elif defined(CONFIG_NETARM) || defined(CONFIG_S3C4510B) ||
defined(CONFIG_LPC2292)
+#elifdefined(CONFIG_NETARM) || defined(CONFIG_S3C4510B) ||\
+defined(CONFIG_LPC2000)
+
disable_interrupts ();
/* Nothing more needed */
#elif defined(CONFIG_INTEGRATOR) && defined(CONFIG_ARCH_INTEGRATOR)
diff --git a/arch/arm/cpu/arm720t/interrupts.c
b/arch/arm/cpu/arm720t/interrupts.c
index eb8d425..2ef7101 100644
--- a/arch/arm/cpu/arm720t/interrupts.c
+++ b/arch/arm/cpu/arm720t/interrupts.c
@@ -30,6 +30,8 @@
#include
#include
#include
+#include
+#include
#ifndef CONFIG_NETARM
/* we always count down the max. */
@@ -80,6 +82,14 @@ void do_irq (struct pt_regs *pt_regs)
pfnct = (void (*)(void))VICVectAddr;
(*pfnct)();
+#elif defined(CONFIG_LPC2468)
+void (*pfnct) (void);
+vic_2468_t *vic = &(((immap_t *)CONFIG_SYS_IMMAP)->ahb.vic);
+
+pfnct = (void (*)(void))(&(vic->vicaddr));
+
+(*pfnct) ();
+
#else
#error do_irq() not defined for this CPU type
#endif
@@ -138,6 +148,10 @@ int arch_interrupt_init (void)
int timer_init (void)
{
+#if defined(CONFIG_LPC2468)
+timer_2468_t *timer0=&(((immap_t *)CONFIG_SYS_IMMAP)->apb.timer0);
+#endif
+
#if defined(CONFIG_NETARM)
/* disable all interrupts */
IRQEN = 0;
@@ -191,6 +205,13 @@ int timer_init (void)
PUT32(T0MCR, 0);
PUT32(T0TC, 0);
PUT32(T0TCR, 1);/* enable timer0 */
+#elif defined(CONFIG_LPC2468)
+writel (0, &(timer0->ir));/*disable all timer0 interupts */
+writel (0, &(timer0->tcr));/*disable timer0 */
+writel (CFG_SYS_CLK_FREQ / CONFIG_SYS_HZ - 1, &(timer0->pr));
+writel (0, &(timer0->mcr));
+writel (0, &(timer0->tc));
+writel (1, &(timer0->tcr));
#else
#error No timer_init() defined for this CPU type
@@ -207,7 +228,8 @@ int timer_init (void)
*/
-#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) ||
defined(CONFIG_NETARM) || defined(CONFIG_ARMADILLO) ||
defined(CONFIG_LPC2292)
+#ifdefined(CONFIG_IMPA7) || defined(CONFIG_EP7312) ||
defined(CONFIG_NETARM) ||\
+defined(CONFIG_ARMADILLO) || defined(CONFIG_LPC2000)
voi