diff options
author | Greg Bellows <greg.bellows@linaro.org> | 2015-02-12 12:15:21 +0800 |
---|---|---|
committer | Greg Bellows <greg.bellows@linaro.org> | 2015-02-12 12:15:21 +0800 |
commit | 4a5a7a6e7d69b6c68b109744270758907fd079e1 (patch) | |
tree | 45bf62dbdd6c6da3ab4097673f7b9d00c5534ede | |
parent | f7f04675240da74c72122f877a9d3dfe1cdcff26 (diff) |
target-arm: Add 2nd UART to Ranchuqemutz-ranchu.2xuart
Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
-rw-r--r-- | hw/arm/ranchu.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/hw/arm/ranchu.c b/hw/arm/ranchu.c index 4391a40b4..ed01dbb9f 100644 --- a/hw/arm/ranchu.c +++ b/hw/arm/ranchu.c @@ -71,7 +71,8 @@ enum { RANCHU_CPUPERIPHS, RANCHU_GIC_DIST, RANCHU_GIC_CPU, - RANCHU_UART, + RANCHU_UART0, + RANCHU_UART1, RANCHU_GF_FB, RANCHU_GF_BATTERY, RANCHU_GF_AUDIO, @@ -116,11 +117,12 @@ static const MemMapEntry memmap[] = { /* GIC distributor and CPU interfaces sit inside the CPU peripheral space */ [RANCHU_GIC_DIST] = { 0x8000000, 0x10000 }, [RANCHU_GIC_CPU] = { 0x8010000, 0x10000 }, - [RANCHU_UART] = { 0x9000000, 0x1000 }, - [RANCHU_GF_FB] = { 0x9010000, 0x100 }, - [RANCHU_GF_BATTERY] = { 0x9020000, 0x1000 }, - [RANCHU_GF_AUDIO] = { 0x9030000, 0x100 }, - [RANCHU_GF_EVDEV] = { 0x9040000, 0x1000 }, + [RANCHU_UART0] = { 0x9000000, 0x1000 }, + [RANCHU_UART1] = { 0x9010000, 0x1000 }, + [RANCHU_GF_FB] = { 0x9020000, 0x100 }, + [RANCHU_GF_BATTERY] = { 0x9030000, 0x1000 }, + [RANCHU_GF_AUDIO] = { 0x9040000, 0x100 }, + [RANCHU_GF_EVDEV] = { 0x9050000, 0x1000 }, [RANCHU_MMIO] = { 0xa000000, 0x200 }, [RANCHU_ANDROID_PIPE] = {0xa010000, 0x2000 }, /* ...repeating for a total of NUM_VIRTIO_TRANSPORTS, each of that size */ @@ -129,12 +131,13 @@ static const MemMapEntry memmap[] = { }; static const int irqmap[] = { - [RANCHU_UART] = 1, - [RANCHU_GF_FB] = 2, - [RANCHU_GF_BATTERY] = 3, - [RANCHU_GF_AUDIO] = 4, - [RANCHU_GF_EVDEV] = 5, - [RANCHU_ANDROID_PIPE] = 6, + [RANCHU_UART0] = 1, + [RANCHU_UART1] = 2, + [RANCHU_GF_FB] = 3, + [RANCHU_GF_BATTERY] = 4, + [RANCHU_GF_AUDIO] = 5, + [RANCHU_GF_EVDEV] = 6, + [RANCHU_ANDROID_PIPE] = 7, [RANCHU_MMIO] = 16, /* ...to 16 + NUM_VIRTIO_TRANSPORTS - 1 */ }; @@ -601,7 +604,9 @@ static void ranchu_init(MachineState *machine) memory_region_add_subregion(sysmem, memmap[RANCHU_MEM].base, ram); create_gic(vbi, pic); - create_simple_device(vbi, pic, RANCHU_UART, "pl011", + create_simple_device(vbi, pic, RANCHU_UART0, "pl011", + "arm,pl011\0arm,primecell", 2, "uartclk\0apb_pclk", 2); + create_simple_device(vbi, pic, RANCHU_UART1, "pl011", "arm,pl011\0arm,primecell", 2, "uartclk\0apb_pclk", 2); create_simple_device(vbi, pic, RANCHU_GF_FB, "goldfish_fb", "generic,goldfish-fb", 1, 0, 0); |