summaryrefslogtreecommitdiffstats
path: root/cpu/arm720t
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-10-09 01:41:48 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-10-09 01:41:48 +0200
commit3df5bea0b0bddc196bf952c51d1dd54d966b82ba (patch)
treebb76917676431534c036b74511cfccb264fbcf12 /cpu/arm720t
parent7521af1c7d95ff087a4f7636ed050f4d4be91b59 (diff)
downloadbootable_bootloader_goldelico_gta04-3df5bea0b0bddc196bf952c51d1dd54d966b82ba.tar.gz
bootable_bootloader_goldelico_gta04-3df5bea0b0bddc196bf952c51d1dd54d966b82ba.tar.bz2
bootable_bootloader_goldelico_gta04-3df5bea0b0bddc196bf952c51d1dd54d966b82ba.zip
Add support for NetSilicon NS7520 processor.
Patch by Art Shipkowski, 12 May 2005 Cleanup.
Diffstat (limited to 'cpu/arm720t')
-rw-r--r--cpu/arm720t/serial_netarm.c14
-rw-r--r--cpu/arm720t/start.S3
2 files changed, 17 insertions, 0 deletions
diff --git a/cpu/arm720t/serial_netarm.c b/cpu/arm720t/serial_netarm.c
index 5b41949e0..5ad98f06f 100644
--- a/cpu/arm720t/serial_netarm.c
+++ b/cpu/arm720t/serial_netarm.c
@@ -35,7 +35,11 @@
#include <asm/hardware.h>
#define PORTA (*(volatile unsigned int *)(NETARM_GEN_MODULE_BASE + NETARM_GEN_PORTA))
+#if !defined(CONFIG_NETARM_NS7520)
#define PORTB (*(volatile unsigned int *)(NETARM_GEN_MODULE_BASE + NETARM_GEN_PORTB))
+#else
+#define PORTC (*(volatile unsigned int *)(NETARM_GEN_MODULE_BASE + NETARM_GEN_PORTC))
+#endif
/* wait until transmitter is ready for another character */
#define TXWAITRDY(registers) \
@@ -48,8 +52,13 @@
}
+#ifndef CONFIG_UART1_CONSOLE
volatile netarm_serial_channel_t *serial_reg_ch1 = get_serial_channel(0);
volatile netarm_serial_channel_t *serial_reg_ch2 = get_serial_channel(1);
+#else
+volatile netarm_serial_channel_t *serial_reg_ch1 = get_serial_channel(1);
+volatile netarm_serial_channel_t *serial_reg_ch2 = get_serial_channel(0);
+#endif
extern void _netarm_led_FAIL1(void);
@@ -62,8 +71,13 @@ void serial_setbrg (void)
DECLARE_GLOBAL_DATA_PTR;
/* set 0 ... make sure pins are configured for serial */
+#if !defined(CONFIG_NETARM_NS7520)
PORTA = PORTB =
NETARM_GEN_PORT_MODE (0xef) | NETARM_GEN_PORT_DIR (0xe0);
+#else
+ PORTA = NETARM_GEN_PORT_MODE (0xef) | NETARM_GEN_PORT_DIR (0xe0);
+ PORTC = NETARM_GEN_PORT_CSF (0xef) | NETARM_GEN_PORT_MODE (0xef) | NETARM_GEN_PORT_DIR (0xe0);
+#endif
/* first turn em off */
serial_reg_ch1->ctrl_a = serial_reg_ch2->ctrl_a = 0;
diff --git a/cpu/arm720t/start.S b/cpu/arm720t/start.S
index 43582b328..e66d10944 100644
--- a/cpu/arm720t/start.S
+++ b/cpu/arm720t/start.S
@@ -272,12 +272,15 @@ cpu_init_crit:
str r1, [r0, #+NETARM_GEN_SYSTEM_CONTROL]
+#ifndef CONFIG_NETARM_PLL_BYPASS
ldr r1, =( NETARM_GEN_PLL_CTL_PLLCNT(NETARM_PLL_COUNT_VAL) | \
NETARM_GEN_PLL_CTL_POLTST_DEF | \
NETARM_GEN_PLL_CTL_INDIV(1) | \
NETARM_GEN_PLL_CTL_ICP_DEF | \
NETARM_GEN_PLL_CTL_OUTDIV(2) )
str r1, [r0, #+NETARM_GEN_PLL_CONTROL]
+#endif
+
/*
* mask all IRQs by clearing all bits in the INTMRs
*/