1
From 2683e338ab8c58065cd4363211e79c4954fa9772 Mon Sep 17 00:00:00 2001
2
From: Riku Voipio <riku.voipio@nokia.com>
3
Date: Mon, 18 Feb 2013 16:58:29 +0000
4
Subject: [PATCH 33/71] hw/omap_uart.c omap_uart_attach: add label argument
6
Add label argument to omap_uart_attach
8
hw/arm/nseries.c | 2 +-
9
hw/char/omap_uart.c | 5 +++--
10
include/hw/arm/omap.h | 3 ++-
11
3 files changed, 6 insertions(+), 4 deletions(-)
13
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
14
index f4218f0..2a079a2 100644
15
--- a/hw/arm/nseries.c
16
+++ b/hw/arm/nseries.c
17
@@ -786,7 +786,7 @@ static void n8x0_uart_setup(struct n800_s *s)
18
qdev_connect_gpio_out(s->mpu->gpio, N8X0_BT_WKUP_GPIO,
19
csrhci_pins_get(radio)[csrhci_pin_wakeup]);
21
- omap_uart_attach(s->mpu->uart[BT_UART], radio);
22
+ omap_uart_attach(s->mpu->uart[BT_UART], radio, "bt-uart");
25
static void n8x0_usb_setup(struct n800_s *s)
26
diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c
27
index 0b91693..61d893b 100644
28
--- a/hw/char/omap_uart.c
29
+++ b/hw/char/omap_uart.c
30
@@ -177,11 +177,12 @@ struct omap_uart_s *omap2_uart_init(MemoryRegion *sysmem,
34
-void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr)
35
+void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr,
38
/* TODO: Should reuse or destroy current s->serial */
39
s->serial = serial_mm_init(get_system_memory(), s->base, 2, s->irq,
40
omap_clk_getrate(s->fclk) / 16,
41
- chr ?: qemu_chr_new("null", "null", NULL),
42
+ chr ?: qemu_chr_new(label, "null", NULL),
43
DEVICE_NATIVE_ENDIAN);
45
diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h
46
index 21d83a6..e408771 100644
47
--- a/include/hw/arm/omap.h
48
+++ b/include/hw/arm/omap.h
49
@@ -882,7 +882,8 @@ struct omap_uart_s *omap2_uart_init(MemoryRegion *sysmem,
50
qemu_irq txdma, qemu_irq rxdma,
51
const char *label, CharDriverState *chr);
52
void omap_uart_reset(struct omap_uart_s *s);
53
-void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr);
54
+void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr,
58
qemu_irq *omap_mpuio_in_get(struct omap_mpuio_s *s);