From patchwork Fri Sep 8 00:46:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 811277 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 3xpJY46fc5z9sCZ for ; Fri, 8 Sep 2017 10:46:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="inFQSZIE"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xpJY45JPTzDrZ8 for ; Fri, 8 Sep 2017 10:46:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="inFQSZIE"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c05::244; helo=mail-pg0-x244.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="inFQSZIE"; dkim-atps=neutral Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xpJXv5NclzDrXy for ; Fri, 8 Sep 2017 10:46:23 +1000 (AEST) Received: by mail-pg0-x244.google.com with SMTP id d8so598153pgt.3 for ; Thu, 07 Sep 2017 17:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=BNitbepfPaW7EfQ228RZD1kstqlHFj4JPxqj/ep/Goc=; b=inFQSZIENYKuqUzIjgWc/5nBVwA/8N+OYpAe5Rnv1d3c7Io+0Ll8Tfnc2ezL1Hl27s rlC97CBOR8JatbCmYHCk9L7wAUtTG4zvlrptJcMjn3w2x5J/eELXVadzZYvetu8Kkk/b YQ1RSfAJJO5AY9q+QDl6bntPJwg667DsT1BERZzU8+oG8p4uvlORJAkqJT1xWoQleHCo CWOt4D1qSX6FWMlxj2oeYVwpqW/zoCT1KNt+A43WlTNUJw5y3VCKe38ET2bi0PoBHscD 6gKM1pREAzvnXtbC2WifXymBzZjdlfn6JrqSHxIQJgHgyYsS29/dlJf1led+lbAXmpPo btjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BNitbepfPaW7EfQ228RZD1kstqlHFj4JPxqj/ep/Goc=; b=g5Yz1vcrk+lAfPGYHI1QuK5TlV7tGKWRURMZLnWtLVdzU+zQwSnhJRwTuhd4uYGhQl Ecpcyo7RJjZgXY9ocZG9D7L+Vw7EutuJToH36yfCxxuUUtHp9Fxx7WxMPhlvjQ900F7P EuOonrN5f0Yd6ycgW2tL5XvnxB1mYBcHmWiGzxIHh6095yV49H8yQe7a9Nf2CgVA5BrK 0wMMew3VSofsNCyrNHRZnK7L5EdtUtXmdW/b21bqmO1TvEHkuLCPSQlrDG1EKcpuHqSI cXD+yfSm31K15La5w7EkNIiSH9Bu+XACT2MEek4zFQB4yLxKWrBtIUGHYBEEr9vxbiPQ QSlw== X-Gm-Message-State: AHPjjUjs/eXs2xMi9+s5NILyAyHAsywu12a5M5hPXP3m/UPG3FmwSCWV 1txTTNDxJONm0JHl X-Google-Smtp-Source: ADKCNb44xCTEHSesinSpipGRb6MADCQzUJ3MPIlE+1wgwLIV6Xklvc0v7gme0yisCsTmb9NdawiX6w== X-Received: by 10.98.98.196 with SMTP id w187mr1223950pfb.235.1504831581326; Thu, 07 Sep 2017 17:46:21 -0700 (PDT) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id b4sm964836pfa.98.2017.09.07.17.46.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Sep 2017 17:46:20 -0700 (PDT) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Fri, 8 Sep 2017 10:46:05 +1000 Message-Id: <20170908004605.5125-1-oohall@gmail.com> X-Mailer: git-send-email 2.9.5 Subject: [Skiboot] [PATCH] hdata: Fix /vpd dtc warnings 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" When dealing with HDAT generated device-trees dtc will complain loudly about the missing reg, #size-cells and #address-cells properties of the nodes in the /vpd hierarchy. This patch fixes these so we get a bit more signal and less noise from the dtc warnings. Signed-off-by: Oliver O'Halloran --- hdata/spira.c | 3 +++ hdata/vpd.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/hdata/spira.c b/hdata/spira.c index 95e1a016642e..291365e82c81 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -1181,7 +1181,10 @@ static void dt_init_vpd_node(void) dt_vpd = dt_new(dt_root, "vpd"); assert(dt_vpd); + dt_add_property_string(dt_vpd, "compatible", "ibm,opal-v3-vpd"); + dt_add_property_cells(dt_vpd, "#address-cells", 1); + dt_add_property_cells(dt_vpd, "#size-cells", 0); } static void hostservices_parse(void) diff --git a/hdata/vpd.c b/hdata/vpd.c index d7d57cdad67c..9f3fe010c3e8 100644 --- a/hdata/vpd.c +++ b/hdata/vpd.c @@ -405,6 +405,14 @@ static struct dt_node *dt_create_vpd_node(struct dt_node *parent, return NULL; } + /* + * no one is sure what this is or what it means, we're adding it here + * to stop dtc from complaining about it. + */ + dt_add_property_cells(node, "reg", addr); + dt_add_property_cells(node, "#address-cells", 1); + dt_add_property_cells(node, "#size-cells", 0); + /* Add location code */ slca_vpd_add_loc_code(node, be16_to_cpu(entry->my_index)); /* Add FRU label */