aboutsummaryrefslogtreecommitdiff
path: root/hw/nseries.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-28 23:34:13 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-28 23:34:13 +0000
commit58a26b477e9f864f67a205ee0a8436c4632a389f (patch)
tree84a144a801cdeea4ad9a8dc98aa114a6a608aa1b /hw/nseries.c
parent1ae26a18a33263330e1551abf5244d68f8aa825a (diff)
downloadqemu-58a26b477e9f864f67a205ee0a8436c4632a389f.zip
qemu-58a26b477e9f864f67a205ee0a8436c4632a389f.tar.gz
qemu-58a26b477e9f864f67a205ee0a8436c4632a389f.tar.bz2
Emulate a serial bluetooth HCI with H4+ extensions and attach to n8x0's UART.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5343 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/nseries.c')
-rw-r--r--hw/nseries.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/nseries.c b/hw/nseries.c
index bb1b1b2..11e817b 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -741,6 +741,20 @@ static void n8x0_cbus_setup(struct n800_s *s)
cbus_attach(cbus, s->tahvo = tahvo_init(tahvo_irq, 1));
}
+static void n8x0_uart_setup(struct n800_s *s)
+{
+ CharDriverState *radio = uart_hci_init(
+ omap2_gpio_in_get(s->cpu->gpif,
+ N8X0_BT_HOST_WKUP_GPIO)[0]);
+
+ omap2_gpio_out_set(s->cpu->gpif, N8X0_BT_RESET_GPIO,
+ csrhci_pins_get(radio)[csrhci_pin_reset]);
+ omap2_gpio_out_set(s->cpu->gpif, N8X0_BT_WKUP_GPIO,
+ csrhci_pins_get(radio)[csrhci_pin_wakeup]);
+
+ omap_uart_attach(s->cpu->uart[BT_UART], radio);
+}
+
static void n8x0_usb_power_cb(void *opaque, int line, int level)
{
struct n800_s *s = opaque;
@@ -1306,6 +1320,7 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device,
n8x0_spi_setup(s);
n8x0_dss_setup(s, ds);
n8x0_cbus_setup(s);
+ n8x0_uart_setup(s);
if (usb_enabled)
n8x0_usb_setup(s);