summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2010-07-23 18:11:25 +0200
committerSteve Markgraf <steve@steve-m.de>2010-07-23 18:11:25 +0200
commitd42f73a1ffb4e5db97484d0e732423d2ece22242 (patch)
tree18527f871603ddeacc98344107b78a0b92b03c2e
parent33c2a1c265e5ea553fdb28f0ae064742347cf857 (diff)
[firmware] bring back gta0x images
Signed-off-by: Steve Markgraf <steve@steve-m.de>
-rw-r--r--src/target/firmware/Makefile9
-rw-r--r--src/target/firmware/board/gta0x/init.c24
2 files changed, 18 insertions, 15 deletions
diff --git a/src/target/firmware/Makefile b/src/target/firmware/Makefile
index 5c7a07af..b5fcf995 100644
--- a/src/target/firmware/Makefile
+++ b/src/target/firmware/Makefile
@@ -13,7 +13,10 @@ calypso_COMMON_OBJS=board/common/calypso_uart.o board/common/calypso_pwl.o
# OpenMoko GTA0x
-gta0x_COMMON_OBJS=board/common/rffe_gta0x_triband.o $(calypso_COMMON_OBJS)
+gta0x_COMMON_OBJS=$(calypso_COMMON_OBJS) board/common/rffe_gta0x_triband.o
+gta0x_COMMON_ENVIRONMENTS=highram
+gta0x_OBJS=$(gta0x_COMMON_OBJS) board/gta0x/init.o
+gta0x_ENVIRONMENTS=$(gta0x_COMMON_ENVIRONMENTS)
# Compal Generic
@@ -40,16 +43,12 @@ e88flash_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/except
# Compal E99
compal_e99_OBJS=$(compal_COMMON_OBJS) board/compal_e99/init.o
-
-gta0x_OBJS=$(gta0x_COMMON_OBJS) board/gta0x/init.o
-
compal_e99_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)
e99loader_LDS=board/compal_e99/loader.lds
e99loader_OBJS=board/compal/header.o
e99flash_LDS=board/compal_e99/flash.lds
-
# Global include path
INCLUDES=-Iinclude/ -I../../../include -I../../shared/libosmocore/include
diff --git a/src/target/firmware/board/gta0x/init.c b/src/target/firmware/board/gta0x/init.c
index 3c606485..573b763d 100644
--- a/src/target/firmware/board/gta0x/init.c
+++ b/src/target/firmware/board/gta0x/init.c
@@ -37,6 +37,7 @@
#include <calypso/rtc.h>
#include <calypso/timer.h>
#include <calypso/uart.h>
+#include <calypso/backlight.h>
#include <comm/sercomm.h>
#include <comm/timer.h>
@@ -73,15 +74,9 @@ static void board_io_init(void)
writew(reg, ARMIO_LATCH_OUT);
}
-static void __ctor_board board_init(void)
+void board_init(void)
{
- /* FIXME: this needs to go to board_e99/init.c once we have it */
- wdog_enable(0);
-
- static cfi_flash_t flash;
- // XXX: move after mapping initialization and use final address
- flash_init(&flash, 0x00000000);
-
+ /* Configure the memory interface */
calypso_mem_cfg(CALYPSO_nCS0, 3, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS1, 3, CALYPSO_MEM_16bit, 1);
calypso_mem_cfg(CALYPSO_nCS2, 5, CALYPSO_MEM_16bit, 1);
@@ -96,33 +91,42 @@ static void __ctor_board board_init(void)
/* Configure the RHEA bridge with some sane default values */
calypso_rhea_cfg(0, 0, 0xff, 0, 1, 0, 0);
+ /* Initialize board-specific GPIO */
board_io_init();
/* Enable bootrom mapping to route exception vectors to RAM */
calypso_bootrom(1);
calypso_exceptions_install();
+ /* Initialize interrupt controller */
irq_init();
/* initialize MODEM UART to be used for sercomm*/
uart_init(SERCOMM_UART_NR, 1);
uart_baudrate(SERCOMM_UART_NR, UART_115200);
- /* initialize IRDA UART to be used for old-school console code.
+ /* 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_baudrate(CONS_UART_NR, UART_115200);
+ /* Initialize hardware timers */
hwtimer_init();
+ /* Initialize DMA controller */
dma_init();
+
+ /* Initialize real time clock */
rtc_init();
+ /* Initialize system timers (uses hwtimer 2) */
timer_init();
- /* Initialize LCD driver (uses I2C) */
+ /* Initialize LCD driver (uses I2C) and backlight */
display = &st7558_display;
display_init();
+ bl_mode_pwl(1);
+ bl_level(50);
/* Initialize keypad driver */
keypad_init(1);