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 /core/chip.c | |
parent | 0aecda9cb221649e184fdfb9c9cb11be37d60f51 (diff) | |
download | talos-skiboot-789c171a6783918783855eb195a9502dfe3791ba.tar.gz talos-skiboot-789c171a6783918783855eb195a9502dfe3791ba.zip |
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 'core/chip.c')
-rw-r--r-- | core/chip.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/core/chip.c b/core/chip.c index b805fe13..2ba7b6e6 100644 --- a/core/chip.c +++ b/core/chip.c @@ -20,7 +20,7 @@ #include <device.h> static struct proc_chip *chips[MAX_CHIPS]; -bool is_mambo_chip; +enum proc_chip_quirks proc_chip_quirks; uint32_t pir_to_chip_id(uint32_t pir) { @@ -68,8 +68,16 @@ void init_chips(void) struct dt_node *xn; /* Detect mambo chip */ - if (dt_find_by_path(dt_root, "/mambo")) - is_mambo_chip = true; + if (dt_find_by_path(dt_root, "/mambo")) { + proc_chip_quirks |= QUIRK_NO_CHIPTOD | QUIRK_MAMBO_CALLOUTS + | QUIRK_NO_F000F | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ + | QUIRK_DISABLE_NAP; + prlog(PR_NOTICE, "CHIP: Detected Mambo simulator\n"); + } + if (dt_node_is_compatible(dt_root, "qemu,powernv")) { + proc_chip_quirks |= QUIRK_NO_CHIPTOD | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ; + prlog(PR_NOTICE, "CHIP: Detected Qemu simulator\n"); + } /* We walk the chips based on xscom nodes in the tree */ dt_for_each_compatible(dt_root, xn, "ibm,xscom") { |