[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1] arm: Adding new arm machine, Kinetis K64 MK6
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-devel] [PATCH v1] arm: Adding new arm machine, Kinetis K64 MK64FN1M0 |
Date: |
Fri, 20 Oct 2017 19:23:30 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 10/19/2017 09:50 AM, address@hidden wrote:
> From: Gabriel Augusto Costa <address@hidden>
>
> I add a new arm machine with some peripherals. The machine is mk64fn1m0, a
> cortex-m4 microcontroller from NXP Kinetis family. The machine can run a
> simple arm binary file using UART0 in polling mode.
> I prepared two patchs to include this machine:
> PATCH v1: Include the machine and peripherals devices;
> PATCH v2: Change the make file to compile this machine.
> Also, I made a folder tree to accomodate this machine more or less like
> u-boot.
> In my opinion put all files in the same folder "/hw/arm" is not a good idea,
> or put all code in an unique file, because machines from the same family
> sharing the same peripherals.
> The folder tree struct is machine/family/peripheral, as an example:
> kinetis/k64/peripheral.
> So, in this way the code will be more maintainable.
>
> Signed-off-by: Gabriel Augusto Costa <address@hidden>
> ---
[...]
> +static void kinetis_k64_sim_init(Object *obj)
> +{
> + kinetis_k64_sim_state *s = KINETIS_K64_SIM(obj);
> + SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
> +
> + memory_region_init_io(&s->iomem, obj, &kinetis_k64_sim_ops, s,
> + TYPE_KINETIS_K64_SIM, 0x2000);
Why not... personally I'd rather use 2 regions for the sysctl, a 8B for
SOPT1 and and 128B for the rest mapped at the next 4KB block.
> + sysbus_init_mmio(sbd, &s->iomem);
> +}
- [Qemu-devel] [PATCH v1] arm: Adding new arm machine, Kinetis K64 MK64FN1M0, gabriel291075, 2017/10/19
- Re: [Qemu-devel] [PATCH v1] arm: Adding new arm machine, Kinetis K64 MK64FN1M0, Peter Maydell, 2017/10/19
- Re: [Qemu-devel] [PATCH v1] arm: Adding new arm machine, Kinetis K64 MK64FN1M0, no-reply, 2017/10/19
- Re: [Qemu-devel] [PATCH v1] arm: Adding new arm machine, Kinetis K64 MK64FN1M0,
Philippe Mathieu-Daudé <=
- Re: [Qemu-devel] [PATCH v1] arm: Adding new arm machine, Kinetis K64 MK64FN1M0, Philippe Mathieu-Daudé, 2017/10/20