diff options
author | wdenk <wdenk> | 2004-07-01 16:30:44 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-07-01 16:30:44 +0000 |
commit | 39539887ea7dc298c98ac1fddd38551dfa335120 (patch) | |
tree | 31e3bc0bd93cead0c977b8fd26ede7d06f70e0a1 /cpu/arm720t/serial.c | |
parent | e94d2cd9d1dc0f58b18e7c31fc9345129b1a44fb (diff) | |
download | u-boot-imx-39539887ea7dc298c98ac1fddd38551dfa335120.zip u-boot-imx-39539887ea7dc298c98ac1fddd38551dfa335120.tar.gz u-boot-imx-39539887ea7dc298c98ac1fddd38551dfa335120.tar.bz2 |
* Code cleanup (ARM mostly)
* Patch by Curt Brune, 17 May 2004:
- Add support for Samsung S3C4510B CPU (ARM7tdmi based SoC)
- Add support for ESPD-Inc. EVB4510 Board
Diffstat (limited to 'cpu/arm720t/serial.c')
-rw-r--r-- | cpu/arm720t/serial.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/cpu/arm720t/serial.c b/cpu/arm720t/serial.c index 5c6a0cc..a5da4b7 100644 --- a/cpu/arm720t/serial.c +++ b/cpu/arm720t/serial.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2002 + * (C) Copyright 2002-2004 * Wolfgang Denk, DENX Software Engineering, <wd@denx.de> * * (C) Copyright 2002 @@ -29,9 +29,10 @@ */ #include <common.h> -#include <clps7111.h> -#ifndef CONFIG_NETARM +#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) + +#include <clps7111.h> void serial_setbrg (void) { @@ -39,20 +40,15 @@ void serial_setbrg (void) unsigned int reg = 0; - if (gd->baudrate == 1200) - reg = 191; - else if (gd->baudrate == 9600) - reg = 23; - else if (gd->baudrate == 19200) - reg = 11; - else if (gd->baudrate == 38400) - reg = 5; - else if (gd->baudrate == 57600) - reg = 3; - else if (gd->baudrate == 115200) - reg = 1; - else - hang (); + switch (gd->baudrate) { + case 1200: reg = 191; break; + case 9600: reg = 23; break; + case 19200: reg = 11; break; + case 38400: reg = 5; break; + case 57600: reg = 3; break; + case 115200: reg = 1; break; + default: hang (); break; + } /* init serial serial 1,2 */ IO_SYSCON1 = SYSCON1_UART1EN; @@ -127,4 +123,4 @@ serial_puts (const char *s) } } -#endif /* CONFIG_NETARM */ +#endif /* defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) */ |