summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/apps
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/apps
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/apps')
-rw-r--r--src/target/firmware/apps/compal_dsp_dump/main.c2
-rw-r--r--src/target/firmware/apps/hello_world/main.c2
-rw-r--r--src/target/firmware/apps/layer1/main.c2
-rw-r--r--src/target/firmware/apps/loader/main.c21
-rw-r--r--src/target/firmware/apps/loader_mtk/main.c2
-rw-r--r--src/target/firmware/apps/rssi/main.c2
-rwxr-xr-xsrc/target/firmware/apps/simtest/main.c2
7 files changed, 8 insertions, 25 deletions
diff --git a/src/target/firmware/apps/compal_dsp_dump/main.c b/src/target/firmware/apps/compal_dsp_dump/main.c
index ba48790f..5e1ab68d 100644
--- a/src/target/firmware/apps/compal_dsp_dump/main.c
+++ b/src/target/firmware/apps/compal_dsp_dump/main.c
@@ -44,7 +44,7 @@ const char *hr = "==============================================================
int main(void)
{
- board_init();
+ board_init(1);
puts("\n\nOsmocomBB Compal DSP Dumper (revision " GIT_REVISION ")\n");
puts(hr);
diff --git a/src/target/firmware/apps/hello_world/main.c b/src/target/firmware/apps/hello_world/main.c
index 02cab050..481cf170 100644
--- a/src/target/firmware/apps/hello_world/main.c
+++ b/src/target/firmware/apps/hello_world/main.c
@@ -100,7 +100,7 @@ static struct osmo_timer_list write_battery_info_timer = {
int main(void)
{
- board_init();
+ board_init(1);
puts("\n\nOsmocomBB Hello World (revision " GIT_REVISION ")\n");
puts(hr);
diff --git a/src/target/firmware/apps/layer1/main.c b/src/target/firmware/apps/layer1/main.c
index 6a78bef8..59ffe972 100644
--- a/src/target/firmware/apps/layer1/main.c
+++ b/src/target/firmware/apps/layer1/main.c
@@ -62,7 +62,7 @@ int main(void)
uint8_t atr[20];
uint8_t atrLength = 0;
- board_init();
+ board_init(1);
puts("\n\nOsmocomBB Layer 1 (revision " GIT_REVISION ")\n");
puts(hr);
diff --git a/src/target/firmware/apps/loader/main.c b/src/target/firmware/apps/loader/main.c
index 50a39ddd..3cb1333e 100644
--- a/src/target/firmware/apps/loader/main.c
+++ b/src/target/firmware/apps/loader/main.c
@@ -131,25 +131,8 @@ int main(void)
putchar_asm(phone_ack[i]);
}
- /* Always disable wdt (some platforms enable it on boot) */
- wdog_enable(0);
-
- /* Disable the bootrom mapping */
- calypso_bootrom(0);
-
- /* Initialize TWL3025 for power control */
- twl3025_init();
-
- /* Backlight */
- bl_mode_pwl(1);
- bl_level(50);
-
- /* Initialize UART without interrupts */
- uart_init(SERCOMM_UART_NR, 0);
- uart_baudrate(SERCOMM_UART_NR, UART_115200);
-
- /* Initialize HDLC subsystem */
- sercomm_init();
+ /* initialize board without interrupts */
+ board_init(0);
/* Say hi */
puts("\n\nOsmocomBB Loader (revision " GIT_REVISION ")\n");
diff --git a/src/target/firmware/apps/loader_mtk/main.c b/src/target/firmware/apps/loader_mtk/main.c
index 7748dc45..d3c974e6 100644
--- a/src/target/firmware/apps/loader_mtk/main.c
+++ b/src/target/firmware/apps/loader_mtk/main.c
@@ -111,7 +111,7 @@ static const uint8_t phone_ack[] = { 0x1b, 0xf6, 0x02, 0x00, 0x41, 0x03, 0x42 };
int main(void)
{
- board_init ();
+ board_init(0);
/* Initialize HDLC subsystem */
sercomm_init();
diff --git a/src/target/firmware/apps/rssi/main.c b/src/target/firmware/apps/rssi/main.c
index b2cafae4..50204869 100644
--- a/src/target/firmware/apps/rssi/main.c
+++ b/src/target/firmware/apps/rssi/main.c
@@ -1506,7 +1506,7 @@ static void key_handler(enum key_codes code, enum key_states state)
int main(void)
{
- board_init();
+ board_init(1);
puts("\n\nOsmocomBB Monitor Tool (revision " GIT_REVISION ")\n");
puts(hr);
diff --git a/src/target/firmware/apps/simtest/main.c b/src/target/firmware/apps/simtest/main.c
index 8e089d32..e20c52a1 100755
--- a/src/target/firmware/apps/simtest/main.c
+++ b/src/target/firmware/apps/simtest/main.c
@@ -310,7 +310,7 @@ static void *console_rx_cb(uint8_t dlci, struct msgb *msg)
int main(void)
{
- board_init();
+ board_init(1);
puts("\n\nOsmocomBB SIM Test (revision " GIT_REVISION ")\n");
puts(hr);