qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC for-1.2] arm: Move some ARM devices into lib


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH RFC for-1.2] arm: Move some ARM devices into libhw
Date: Sat, 11 Aug 2012 20:12:08 +0100

On 10 August 2012 18:15, Andreas Färber <address@hidden> wrote:
> Am 02.08.2012 15:48, schrieb Peter Maydell:
>> On 2 August 2012 02:16, Andreas Färber <address@hidden> wrote:
>>> +hw-obj-$(CONFIG_STELLARIS_ENET) += stellaris_enet.o
>>
>> Why just this stellaris device and not the others?
>
> So, turns out there was an actual reason:
>
>   CC    libhw64/hw/stellaris.o
> In file included from /home/andreas/QEMU/qemu-arm/hw/stellaris.c:12:0:
> /home/andreas/QEMU/qemu-arm/hw/arm-misc.h:19:28: error: unknown type
> name ‘ARMCPU’
> /home/andreas/QEMU/qemu-arm/hw/arm-misc.h:53:34: error: unknown type
> name ‘ARMCPU’
> /home/andreas/QEMU/qemu-arm/hw/arm-misc.h:55:38: error: unknown type
> name ‘ARMCPU’
> /home/andreas/QEMU/qemu-arm/hw/arm-misc.h:62:22: error: unknown type
> name ‘ARMCPU’
> make[1]: *** [hw/stellaris.o] Fehler 1
> make: *** [subdir-libhw64] Fehler 2

Yeah, although in fact this is just the result of arm-misc.h being a bit
of a grab-bag header: all stellaris.c needs is the prototype for armv7m_init()
and the system_clock_scale extern definition, not any of the ARMCPU
using things.

(system_clock_scale incidentally is pretty nasty -- this should be
done as some kind of QOM connection from the board model to the
armv7m and its systick device so the board model can feed the
right value in. This corresponds to hardware, where there is an external
set of signal lines for the board to pass this value in with.)

Also, stellaris.c is the board model, not a pure device, so you could
kind of construct a justification for only moving the other stellaris files
(ideally the devices wedged into stellaris.c at the moment would move
out of it, I guess.)

> Leave this part of the patch as is for now then?

If you don't want to try fixing this mess now I'd leave all the stellaris
bits where they are for the moment.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]