From 0662946aa6d3129e7974d4484fc94ab2a5b15d4e Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Thu, 3 May 2018 21:24:39 +0100 Subject: uninorth: create new uninorth device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Gibson --- include/hw/pci-host/uninorth.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/hw') diff --git a/include/hw/pci-host/uninorth.h b/include/hw/pci-host/uninorth.h index f0e6836c76..f6654bad9b 100644 --- a/include/hw/pci-host/uninorth.h +++ b/include/hw/pci-host/uninorth.h @@ -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 */ -- cgit v1.2.1