From patchwork Wed Mar 15 07:40:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 739041 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vjk6k4q7pz9s2Q for ; Wed, 15 Mar 2017 18:40:46 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vjk6k3K3wzDqYw for ; Wed, 15 Mar 2017 18:40:46 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vjk6b6BvmzDqMd for ; Wed, 15 Mar 2017 18:40:39 +1100 (AEDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2F7XqCI083917 for ; Wed, 15 Mar 2017 03:40:34 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 296nfvxju2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 15 Mar 2017 03:40:34 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Mar 2017 03:40:33 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 15 Mar 2017 03:40:32 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2F7eVFN55836878; Wed, 15 Mar 2017 07:40:31 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E1E1C12403D; Wed, 15 Mar 2017 03:40:27 -0400 (EDT) Received: from birb.localdomain (unknown [9.83.0.144]) by b01ledav002.gho.pok.ibm.com (Postfix) with SMTP id 108F5124044; Wed, 15 Mar 2017 03:40:26 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id E42F8228D8D6; Wed, 15 Mar 2017 18:40:25 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Wed, 15 Mar 2017 18:40:25 +1100 X-Mailer: git-send-email 2.9.3 X-TM-AS-GCONF: 00 x-cbid: 17031507-0048-0000-0000-000001290C97 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006785; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000206; SDB=6.00834061; UDB=6.00409559; IPR=6.00611718; BA=6.00005212; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014652; XFM=3.00000013; UTC=2017-03-15 07:40:33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17031507-0049-0000-0000-00003FB0D2F8 Message-Id: <20170315074025.20018-1-stewart@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-15_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703150060 Subject: [Skiboot] [PATCH] generic platform: If /bmc in device tree, attempt to init one X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" For the most part, this gets us somewhere on some OpenPOWER systems before there's a platform file for that machine. Useful in bringup only, and marked as such with scary looking log messages. Signed-off-by: Stewart Smith --- core/platform.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/platform.c b/core/platform.c index 1d4ae6da3ced..7e3db4586371 100644 --- a/core/platform.c +++ b/core/platform.c @@ -25,6 +25,7 @@ #include #include #include +#include bool manufacturing_mode = false; struct platform platform; @@ -107,6 +108,16 @@ static bool generic_platform_probe(void) { uart_init(); + if (!dt_find_by_path(dt_root, "bmc")) { + /* We appear to have a BMC... so let's cross our fingers + * and see if we can do anything! + */ + prlog(PR_ERR, "GENERIC BMC PLATFORM: **GUESSING** that there's " + "*maybe* a BMC we can talk to.\n"); + prlog(PR_ERR, "THIS IS ****UNSUPPORTED****, BRINGUP USE ONLY.\n"); + astbmc_early_init(); +} + return true; } @@ -118,6 +129,11 @@ static void generic_platform_init(void) /* Enable a BT interface if we find one too */ bt_init(); + if (!dt_find_by_path(dt_root, "bmc")) { + prlog(PR_ERR, "BMC-GUESSWORK: Here be dragons with a taste for human flesh\n"); + astbmc_init(); + } + /* Fake a real time clock */ fake_rtc_init(); }