diff options
author | Wolfgang Denk <wd@denx.de> | 2010-09-08 00:03:22 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-09-08 00:03:22 +0200 |
commit | 09b4a9cf4003599f2cd609587dfa5f0b754640ed (patch) | |
tree | 768c7e70dc393814643ed7b7290ea8e33fa95ba3 /drivers/serial/serial_s5p.c | |
parent | 27130f133eda205b07d97b475a2ef96ec3f46b0f (diff) | |
parent | a87bc64cb4311323f592265541ced6ec9171d4d6 (diff) | |
download | u-boot-imx-09b4a9cf4003599f2cd609587dfa5f0b754640ed.zip u-boot-imx-09b4a9cf4003599f2cd609587dfa5f0b754640ed.tar.gz u-boot-imx-09b4a9cf4003599f2cd609587dfa5f0b754640ed.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-samsung
Diffstat (limited to 'drivers/serial/serial_s5p.c')
-rw-r--r-- | drivers/serial/serial_s5p.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index e0d4e80..7709664 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -30,11 +30,7 @@ static inline struct s5p_uart *s5p_get_base_uart(int dev_index) { u32 offset = dev_index * sizeof(struct s5p_uart); - - if (cpu_is_s5pc100()) - return (struct s5p_uart *)(S5PC100_UART_BASE + offset); - else - return (struct s5p_uart *)(S5PC110_UART_BASE + offset); + return (struct s5p_uart *)(samsung_get_base_uart() + offset); } /* @@ -67,11 +63,11 @@ void serial_setbrg_dev(const int dev_index) { DECLARE_GLOBAL_DATA_PTR; struct s5p_uart *const uart = s5p_get_base_uart(dev_index); - u32 pclk = get_pclk(); + u32 uclk = get_uart_clk(dev_index); u32 baudrate = gd->baudrate; u32 val; - val = pclk / baudrate; + val = uclk / baudrate; writel(val / 16 - 1, &uart->ubrdiv); writew(udivslot[val % 16], &uart->udivslot); |