From patchwork Wed Oct 14 09:03:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lulu Su X-Patchwork-Id: 1381930 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CB60G0KmFz9sTs for ; Wed, 14 Oct 2020 20:03:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=wistron.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CB60F31CczDqVL for ; Wed, 14 Oct 2020 20:03:41 +1100 (AEDT) X-Original-To: skiboot-stable@lists.ozlabs.org Delivered-To: skiboot-stable@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=wistron.com (client-ip=103.200.3.19; helo=segapp02.wistron.com; envelope-from=lulu_su@wistron.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=wistron.com Received: from segapp02.wistron.com (segapp02.wistron.com [103.200.3.19]) by lists.ozlabs.org (Postfix) with ESMTP id 4CB6051421zDqK3 for ; Wed, 14 Oct 2020 20:03:30 +1100 (AEDT) Received: from EXCHAPP04.whq.wistron (unverified [10.37.38.27]) by TWNHUMSW3.wistron.com (Clearswift SMTPRS 5.6.0) with ESMTP id for ; Wed, 14 Oct 2020 17:03:25 +0800 Received: from EXCHAPP04.whq.wistron (10.37.38.27) by EXCHAPP04.whq.wistron (10.37.38.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Wed, 14 Oct 2020 17:03:22 +0800 Received: from gitserver.wistron.com (10.37.38.233) by EXCHAPP04.whq.wistron (10.37.38.27) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Wed, 14 Oct 2020 17:03:22 +0800 From: Lulu Su To: Date: Wed, 14 Oct 2020 17:03:20 +0800 Message-ID: <20201014090320.30451-1-Lulu_Su@wistron.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-TM-SNTS-SMTP: 46578F26DABE82F7578AF61D3390D576398B0D1AF02BCBB08654F8BE585813192000:8 Subject: [Skiboot-stable] [PATCH] platform/mowgli: modify VPD to export correct data to system VPD EEPROM X-BeenThere: skiboot-stable@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Patches, review, and discussion for stable releases of skiboot" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: skiboot-stable@lists.ozlabs.org Errors-To: skiboot-stable-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot-stable" From: LuluTHSu Hostboot doesn't export the correct data for the system VPD EEPROM for this system. So add vpd_dt_fixup(). Cc: skiboot-stable@lists.ozlabs.org Signed-off-by: LuluTHSu --- platforms/astbmc/mowgli.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/platforms/astbmc/mowgli.c b/platforms/astbmc/mowgli.c index 265cab3..e61a109 100644 --- a/platforms/astbmc/mowgli.c +++ b/platforms/astbmc/mowgli.c @@ -30,6 +30,24 @@ static const struct slot_table_entry mowgli_phb_table[] = { { .etype = st_end }, }; +/* + * HACK: Hostboot doesn't export the correct data for the system VPD EEPROM + * for this system. So we need to work around it here. + */ +static void vpd_dt_fixup(void) +{ + struct dt_node *n = dt_find_by_path(dt_root, + "/xscom@603fc00000000/i2cm@a2000/i2c-bus@0/eeprom@50"); + + if (n) { + dt_check_del_prop(n, "compatible"); + dt_add_property_string(n, "compatible", "atmel,24c512"); + + dt_check_del_prop(n, "label"); + dt_add_property_string(n, "label", "system-vpd"); + } +} + static bool mowgli_probe(void) { if (!dt_node_is_compatible(dt_root, "ibm,mowgli")) @@ -41,6 +59,8 @@ static bool mowgli_probe(void) /* Setup UART for use by OPAL (Linux hvc) */ uart_set_console_policy(UART_CONSOLE_OPAL); + vpd_dt_fixup(); + slot_table_init(mowgli_phb_table); return true;