uninorth: create new uninorth device

Commit 4e46dcdbd3 "PPC: Newworld: Add uninorth token register" added a TODO
which was to convert the uninorth registers hack to a proper device. Move
these registers to a new uninorth device, removing the old hacks from
mac_newworld.c.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Mark Cave-Ayland 2018-05-03 21:24:39 +01:00 committed by David Gibson
parent 47a9b55154
commit 0662946aa6
5 changed files with 77 additions and 39 deletions

View file

@ -53,4 +53,15 @@ typedef struct UNINHostState {
MemoryRegion pci_io;
} UNINHostState;
typedef struct UNINState {
SysBusDevice parent_obj;
MemoryRegion mem;
int token[1];
} UNINState;
#define TYPE_UNI_NORTH "uni-north"
#define UNI_NORTH(obj) \
OBJECT_CHECK(UNINState, (obj), TYPE_UNI_NORTH)
#endif /* UNINORTH_H */