Skip to contentSkip to conversation

[5343] Emulate a serial bluetooth HCI with H4+ extensions and attach to n8x0' s UART.

Qemu-devel Andrzej Zaborowski 1 participant 1 message Sep 28, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

Revision: 5343

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5343
Author:   balrog
Date:     2008-09-28 23:34:13 +0000 (Sun, 28 Sep 2008)

Log Message:
-----------
Emulate a serial bluetooth HCI with H4+ extensions and attach to n8x0's UART.

Modified Paths:
--------------
trunk/Makefile.target
trunk/hw/bt.h
trunk/hw/nseries.c

Added Paths:
-----------
trunk/hw/bt-hci-csr.c

Modified: trunk/Makefile.target
===================================================================

Makefile.target +1 -1
@@ -612,7 +612,7 @@
 OBJS+= omap2.o omap_dss.o soc_dma.o
 OBJS+= palm.o tsc210x.o
 OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o
-OBJS+= tsc2005.o
+OBJS+= tsc2005.o bt-hci-csr.o
 OBJS+= mst_fpga.o mainstone.o
 OBJS+= musicpal.o pflash_cfi02.o
 CPPFLAGS += -DHAS_AUDIO

Added: trunk/hw/bt-hci-csr.c
===================================================================

hw/bt-hci-csr.c +456 -0

456 lines not on this page · raw message

Modified: trunk/hw/bt.h
===================================================================

hw/bt.h +1512 -0

1,515 lines not on this page · raw message

Modified: trunk/hw/nseries.c
===================================================================

hw/nseries.c +15 -0
@@ -741,6 +741,20 @@
     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 @@
     n8x0_spi_setup(s);
     n8x0_dss_setup(s, ds);
     n8x0_cbus_setup(s);
+    n8x0_uart_setup(s);
     if (usb_enabled)
         n8x0_usb_setup(s);