From 9594a715b50c338f1261e88c12c120cf8e5b8bba Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Sun, 30 Nov 2014 12:21:34 +1100 Subject: Add tweaks to work in Mambo simulator Mambo doesn't implement various things such as PBA SCOMs, LPC, ChipTOD, etc... It also provides a special console hook. This adds detection of Mambo via the /mambo node, and enables us to boot all the way to Linux. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Stewart Smith --- core/chip.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/chip.c') diff --git a/core/chip.c b/core/chip.c index 272f024..b805fe1 100644 --- a/core/chip.c +++ b/core/chip.c @@ -20,6 +20,7 @@ #include static struct proc_chip *chips[MAX_CHIPS]; +bool is_mambo_chip; uint32_t pir_to_chip_id(uint32_t pir) { @@ -66,6 +67,10 @@ void init_chips(void) struct proc_chip *chip; struct dt_node *xn; + /* Detect mambo chip */ + if (dt_find_by_path(dt_root, "/mambo")) + is_mambo_chip = true; + /* We walk the chips based on xscom nodes in the tree */ dt_for_each_compatible(dt_root, xn, "ibm,xscom") { uint32_t id = dt_get_chip_id(xn); -- cgit v1.1