diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-02-18 14:57:28 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-18 15:40:42 +1100 |
commit | 789c171a6783918783855eb195a9502dfe3791ba (patch) | |
tree | 37f7b2bc1e1832e5db438a200e69f8b33ade1a4e /include | |
parent | 0aecda9cb221649e184fdfb9c9cb11be37d60f51 (diff) | |
download | skiboot-789c171a6783918783855eb195a9502dfe3791ba.zip skiboot-789c171a6783918783855eb195a9502dfe3791ba.tar.gz skiboot-789c171a6783918783855eb195a9502dfe3791ba.tar.bz2 |
Replace is_mambo_chip with a better chip quirk mechanism
And add some basic qemu quirks
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/chip.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/chip.h b/include/chip.h index 83671fa..ae0902f 100644 --- a/include/chip.h +++ b/include/chip.h @@ -89,6 +89,21 @@ enum proc_chip_type { PROC_CHIP_P8_VENICE, }; +/* Simulator quirks */ +enum proc_chip_quirks { + QUIRK_NO_CHIPTOD = 0x00000001, + QUIRK_MAMBO_CALLOUTS = 0x00000002, + QUIRK_NO_F000F = 0x00000004, + QUIRK_NO_PBA = 0x00000008, + QUIRK_NO_OCC_IRQ = 0x00000010, + QUIRK_DISABLE_NAP = 0x00000020, +} proc_chip_quirks; + +static inline bool chip_quirk(unsigned int q) +{ + return !!(proc_chip_quirks & q); +} + #define MAX_CHIPS (1 << 6) /* 6-bit chip ID */ /* @@ -139,9 +154,6 @@ struct proc_chip { struct list_head i2cms; }; -/* Mambo simplified chip model lacks some features, handle it here */ -extern bool is_mambo_chip; - extern uint32_t pir_to_chip_id(uint32_t pir); extern uint32_t pir_to_core_id(uint32_t pir); extern uint32_t pir_to_thread_id(uint32_t pir); |