aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vesely <jano.vesely@gmail.com>2012-06-07 13:02:32 +0930
committerPeter Maydell <peter.maydell@linaro.org>2012-07-25 13:33:18 +0100
commit58308dcc70441466ce38f2e861f383759dbef844 (patch)
tree3d71f1f48bfe3689b2cdd8b99ed558450c23a1ae
parenta438d971c3c90f02aa6cfbfecc7fcd9f2c752cdb (diff)
downloadqemu-arm-58308dcc70441466ce38f2e861f383759dbef844.tar.gz
omap_uart: Add revision property.
Set revision to values reported by beagleboard(-xm) hw. Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
-rw-r--r--hw/omap_uart.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/omap_uart.c b/hw/omap_uart.c
index cd568b0436..644fa04e92 100644
--- a/hw/omap_uart.c
+++ b/hw/omap_uart.c
@@ -46,6 +46,7 @@ struct omap_uart_s {
const MemoryRegionOps *serial_ops;
uint32_t mmio_size;
uint32_t baudrate;
+ uint32_t revision;
qemu_irq tx_drq;
qemu_irq rx_drq;
@@ -165,7 +166,7 @@ static uint64_t omap_uart_read(void *opaque, target_phys_addr_t addr,
case 0x4C: /* OSC_12M_SEL (OMAP1) */
return s->clksel;
case 0x50: /* MVR */
- return 0x30;
+ return s->revision;
case 0x54: /* SYSC (OMAP2) */
return s->syscontrol;
case 0x58: /* SYSS (OMAP2) */
@@ -326,6 +327,7 @@ static int omap_uart_init(SysBusDevice *busdev)
}
static Property omap_uart_properties[] = {
+ DEFINE_PROP_UINT32("revision", struct omap_uart_s, revision, 0x30),
DEFINE_PROP_UINT32("mmio_size", struct omap_uart_s, mmio_size, 0x400),
DEFINE_PROP_UINT32("baudrate", struct omap_uart_s, baudrate, 0),
DEFINE_PROP_CHR("chardev", struct omap_uart_s, chr),