diff options
author | TsiChungLiew <Tsi-Chung.Liew@freescale.com> | 2007-08-05 03:55:21 -0500 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2007-08-08 09:47:25 +0200 |
commit | 8d1d66af54d305de29d0bbf4aa8c9e6375f7f731 (patch) | |
tree | 1202f2b25ce8b39aea7b49adb56f87791b4f35c4 /cpu/mcf532x | |
parent | 6fde84a44b7e575ea80fe0e2d5be3b6f73d1e630 (diff) | |
download | u-boot-imx-8d1d66af54d305de29d0bbf4aa8c9e6375f7f731.zip u-boot-imx-8d1d66af54d305de29d0bbf4aa8c9e6375f7f731.tar.gz u-boot-imx-8d1d66af54d305de29d0bbf4aa8c9e6375f7f731.tar.bz2 |
Added uart_gpio_conf() in serial_init(), seperated uart port configuration from cpu_init() to uart_gpio_conf()
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
Diffstat (limited to 'cpu/mcf532x')
-rw-r--r-- | cpu/mcf532x/cpu_init.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/cpu/mcf532x/cpu_init.c b/cpu/mcf532x/cpu_init.c index 32711a1..5a26ae0 100644 --- a/cpu/mcf532x/cpu_init.c +++ b/cpu/mcf532x/cpu_init.c @@ -60,20 +60,6 @@ void cpu_init_f(void) scm2->pacrg = 0; scm1->pacrh = 0; - /* Setup Ports: */ - switch (CFG_UART_PORT) { - case 0: - gpio->par_uart = (GPIO_PAR_UART_TXD0 | GPIO_PAR_UART_RXD0); - break; - case 1: - gpio->par_uart = - (GPIO_PAR_UART_TXD1(3) | GPIO_PAR_UART_RXD1(3)); - break; - case 2: - gpio->par_uart = (GPIO_PAR_TIN3_URXD2 | GPIO_PAR_TIN2_UTXD2); - break; - } - /* Port configuration */ gpio->par_cs = 0x3E; @@ -124,3 +110,24 @@ int cpu_init_r(void) { return (0); } + +void uart_port_conf(void) +{ + volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO; + + /* Setup Ports: */ + switch (CFG_UART_PORT) { + case 0: + gpio->par_uart = (GPIO_PAR_UART_TXD0 | GPIO_PAR_UART_RXD0); + break; + case 1: + gpio->par_uart = + (GPIO_PAR_UART_TXD1(3) | GPIO_PAR_UART_RXD1(3)); + break; + case 2: + gpio->par_timer &= 0x0F; + gpio->par_timer |= (GPIO_PAR_TIN3_URXD2 | GPIO_PAR_TIN2_UTXD2); + break; + } +} + |