summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/board/gta0x/init.c
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2013-01-03 22:50:21 +0100
committerSylvain Munaut <tnt@246tNt.com>2013-01-05 18:37:49 +0100
commite340681c5bbcb9f904b0058d7f69f80ab2d32cc5 (patch)
tree444a59eb702b21985ca5ddce17f82f5217c2662f /src/target/firmware/board/gta0x/init.c
parent9fc637700346a269f4fbd40284c440ed53e6355b (diff)
fw: introduce with_irq parameter for board_init()
So far the loader-app used to do the init on its own, which brought a lot of problems for board- specific initialization. Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/target/firmware/board/gta0x/init.c')
-rw-r--r--src/target/firmware/board/gta0x/init.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/target/firmware/board/gta0x/init.c b/src/target/firmware/board/gta0x/init.c
index d125e15f..ef75e7df 100644
--- a/src/target/firmware/board/gta0x/init.c
+++ b/src/target/firmware/board/gta0x/init.c
@@ -73,7 +73,7 @@ static void board_io_init(void)
writew(reg, ARMIO_LATCH_OUT);
}
-void board_init(void)
+void board_init(int with_irq)
{
/* Configure the memory interface */
calypso_mem_cfg(CALYPSO_nCS0, 3, CALYPSO_MEM_16bit, 1);
@@ -94,19 +94,20 @@ void board_init(void)
board_io_init();
/* Enable bootrom mapping to route exception vectors to RAM */
- calypso_bootrom(1);
+ calypso_bootrom(with_irq);
calypso_exceptions_install();
/* Initialize interrupt controller */
- irq_init();
+ if (with_irq)
+ irq_init();
/* initialize MODEM UART to be used for sercomm*/
- uart_init(SERCOMM_UART_NR, 1);
+ uart_init(SERCOMM_UART_NR, with_irq);
uart_baudrate(SERCOMM_UART_NR, UART_115200);
/* Initialize IRDA UART to be used for old-school console code.
* note: IRDA uart only accessible on C115 and C117 PCB */
- uart_init(CONS_UART_NR, 1);
+ uart_init(CONS_UART_NR, with_irq);
uart_baudrate(CONS_UART_NR, UART_115200);
/* Initialize hardware timers */
@@ -126,7 +127,7 @@ void board_init(void)
bl_level(50);
/* Initialize keypad driver */
- keypad_init(1);
+ keypad_init(with_irq);
/* Initialize ABB driver (uses SPI) */
twl3025_init();