From cc19fbb873a5d8cb303ece90618d180a9eff7732 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Tue, 21 Apr 2015 12:06:23 +0300 Subject: [PATCH] ti_lm3s6965: Add Bluetooth initialization to system.c Add Bluetooth initialization for target ti_lm3s6965. Change-Id: I7c7e392d2bb8671098e54b1305051a5882fd3bef Signed-off-by: Andrei Emeltchenko --- arch/arm/ti_lm3s6965/system.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/ti_lm3s6965/system.c b/arch/arm/ti_lm3s6965/system.c index e1ffedb69a..04fb43bb62 100644 --- a/arch/arm/ti_lm3s6965/system.c +++ b/arch/arm/ti_lm3s6965/system.c @@ -116,6 +116,27 @@ static void consoleInit(void) } while ((0)) #endif /* DO_CONSOLE_INIT */ +#if defined(CONFIG_BLUETOOTH) +#if defined(CONFIG_BLUETOOTH_UART) +#include +#endif /* CONFIG_BLUETOOTH_UART */ + +static void bluetooth_init(void) +{ +#if defined(CONFIG_BLUETOOTH_UART) + /* Enable clock to UART1 */ + RCGC1 |= RCGC1_UART1_EN; + + /* General UART init */ + bt_uart_init(); +#endif /* CONFIG_BLUETOOTH_UART */ +} +#else /* CONFIG_BLUETOOTH */ +#define bluetooth_init() \ + do {/* nothing */ \ + } while ((0)) +#endif /* CONFIG_BLUETOOTH */ + /******************************************************************************* * * _InitHardware - perform basic hardware initialization @@ -130,6 +151,7 @@ static void consoleInit(void) void _InitHardware(void) { consoleInit(); /* NOP if not needed */ + bluetooth_init(); /* NOP if not needed */ /* Install default handler that simply resets the CPU * if configured in the kernel, NOP otherwise