arm: ks8695: use defined constants for UART
authorYann Vernier <yann.vernier@orsoc.se>
Fri, 5 Oct 2012 02:09:48 +0000 (02:09 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 26 Oct 2012 21:32:11 +0000 (23:32 +0200)
CONFIG_BAUDRATE and KS8695_UART_LINEC_WLEN8 used for UART registers

arch/arm/cpu/arm920t/ks8695/lowlevel_init.S

index e9f1227dd6038aeeee8b7e8b9f76791b1b6284db..1bba571077740cd131ef46df4fe1663246e2c650 100644 (file)
@@ -72,10 +72,10 @@ lowlevel_init:
         * enable UART for early debug trace
         */
        ldr     r1, =(KS8695_IO_BASE+KS8695_UART_DIVISOR)
-       mov     r2, #0xd9
-       str     r2, [r1]                /* 115200 baud */
+       mov     r2, #((25000000+CONFIG_BAUDRATE/2) / CONFIG_BAUDRATE)
+       str     r2, [r1]
        ldr     r1, =(KS8695_IO_BASE+KS8695_UART_LINE_CTRL)
-       mov     r2, #0x03
+       mov     r2, #KS8695_UART_LINEC_WLEN8
        str     r2, [r1]                /* 8 data bits, no parity, 1 stop */
        ldr     r1, =(KS8695_IO_BASE+KS8695_UART_TX_HOLDING)
        mov     r2, #0x41