[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC |
Date: |
Wed, 30 Aug 2017 13:26:12 +0100 |
On 30 August 2017 at 03:45, Philippe Mathieu-Daudé <address@hidden> wrote:
> I think they might be issues if you start QEMU without -serial and then use
> a firmware polling for an uart, the device won't be mapped and the memory
> accesses are mostly ignored.
>
> I'd rather use:
>
> for (i = 0; i < MSF2_NUM_UARTS && i < MAX_SERIAL_PORTS; i++) {
> static const char *serial[] = {"serial0", "serial1"};
>
> if (!serial_hds[i]) {
> serial_hds[i] = qemu_chr_new(serial[i], "null");
>
> }
>
>> + serial_mm_init(get_system_memory(), uart_addr[i], 2,
>> + qdev_get_gpio_in(armv7m, uart_irq[i]),
>> + 115200, serial_hds[i], DEVICE_NATIVE_ENDIAN);
>> + }
>> + }
It would be better to fix serial_mm_init() to handle having
a NULL chardev pointer, because we already have a lot of
SoC code that just passes it serial_hds[] regardless.
I'd leave this code as it is and we can fix serial_mm_init
separately (somebody pointed out this issue for a xilinx
board recently).
thanks
-- PMM
- [Qemu-arm] [Qemu devel v7 PATCH 2/5] msf2: Microsemi Smartfusion2 System Register block, (continued)
- [Qemu-arm] [Qemu devel v7 PATCH 2/5] msf2: Microsemi Smartfusion2 System Register block, Subbaraya Sundeep, 2017/08/28
- [Qemu-arm] [Qemu devel v7 PATCH 5/5] msf2: Add Emcraft's Smartfusion2 SOM kit, Subbaraya Sundeep, 2017/08/28
- [Qemu-arm] [Qemu devel v7 PATCH 3/5] msf2: Add Smartfusion2 SPI controller, Subbaraya Sundeep, 2017/08/28
- [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC, Subbaraya Sundeep, 2017/08/28
- Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC, Alistair Francis, 2017/08/28
- Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC, Philippe Mathieu-Daudé, 2017/08/29
- Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC, sundeep subbaraya, 2017/08/30
- Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC,
Peter Maydell <=
- Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC, Philippe Mathieu-Daudé, 2017/08/30
- Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC, Alistair Francis, 2017/08/31
- Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC, Philippe Mathieu-Daudé, 2017/08/31
- Re: [Qemu-arm] [Qemu devel v7 PATCH 4/5] msf2: Add Smartfusion2 SoC, Alistair Francis, 2017/08/31