diff --git a/qiboot/include/serial.h b/qiboot/include/serial.h index 732fe67..c10a386 100644 --- a/qiboot/include/serial.h +++ b/qiboot/include/serial.h @@ -104,7 +104,7 @@ #define rGPJUP (*(volatile unsigned *)0x560000d8) //Port J data void port_init(void); -void serial_init (const int ubrdiv_val,const int uart); +void serial_init (const int uart); void serial_putc (const int uart,const char c); int printk(const char *fmt, ...); int puts(const char *string); diff --git a/qiboot/src/serial.c b/qiboot/src/serial.c index e5b1952..5432056 100644 --- a/qiboot/src/serial.c +++ b/qiboot/src/serial.c @@ -23,8 +23,9 @@ #include "blink_led.h" #include "kboot.h" -void serial_init (const int ubrdiv_val,const int uart) +void serial_init (const int uart) { + int ubrdiv_val = 0x11; switch(uart) { case UART0: diff --git a/qiboot/src/start.S b/qiboot/src/start.S index c16a2a0..1d2ee92 100644 --- a/qiboot/src/start.S +++ b/qiboot/src/start.S @@ -89,8 +89,6 @@ start_code: # define UPLLCON 0x4c000008 # define MPLLCON_val ((142 << 12) + (7 << 4) + 1) # define UPLLCON_val (( 88 << 12) + (8 << 4) + 2) -/* # define MPLLCON_val ((0x7d << 12) + (0x2 << 4) + 0x1) -# define UPLLCON_val ((0x38 << 12) + (0x2 << 4) + 0x2) */ ldr r0, =UPLLCON ldr r1, =UPLLCON_val @@ -108,7 +106,7 @@ start_code: ldr r1, =MPLLCON_val str r1, [r0, #-4] /* MPLLCON */ -# define CLKDIVN 0x4C000014 /* clock divisor register */ +# define CLKDIVN 0x4C000014 /* clock divisor register */ # define CLKDIVN_val 7 /* FCLK:HCLK:PCLK = 1:3:6 */ /* FCLK:HCLK:PCLK = 1:3:6 */ @@ -126,19 +124,6 @@ start_code: ldr r1, =0x2afaaa str r1, [r0] - /* init uart0 */ -/* ldr r0, =0x50000000 - mov r1, #0x03 - str r1, [r0] - ldr r1, =0x245 - str r1, [r0, #0x04] - mov r1, #0x00 - str r1, [r0, #0x08] - mov r1, #0x00 - str r1, [r0, #0x0c] - mov r1, #0x7 - str r1, [r0, #0x28] */ - bl cpu_init_crit /* reset nand controller, or it is dead to us */ @@ -153,7 +138,7 @@ start_code: orr r3, r3, #1 @ enable nand controller str r3, [r1, #4] - /* >> CFG_VIDEO_LOGO_MAX_SIZE */ + /* >> CFG_VIDEO_LOGO_MAX_SIZE */ #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ diff --git a/qiboot/src/start_kboot.c b/qiboot/src/start_kboot.c index 51625ca..12806ce 100644 --- a/qiboot/src/start_kboot.c +++ b/qiboot/src/start_kboot.c @@ -155,7 +155,7 @@ void start_kboot(void) TEXT_BASE); port_init(); - serial_init(0x11, UART2); + serial_init(UART2); puts("Openmoko KBOOT "stringify2(BUILD_HOST)" " stringify2(BUILD_VERSION)" "