From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 29F83C433F5 for ; Thu, 14 Apr 2022 20:01:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7905983EA1; Thu, 14 Apr 2022 22:01:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id B390C83E5D; Thu, 14 Apr 2022 22:01:01 +0200 (CEST) Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8234E83EAD for ; Thu, 14 Apr 2022 22:00:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: from 068-189-091-139.biz.spectrum.com ([68.189.91.139] helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.93) (envelope-from ) id 1nf5e9-00CScZ-Lt; Thu, 14 Apr 2022 20:00:53 +0000 From: Tim Harvey To: Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" , u-boot@lists.denx.de Cc: Tim Harvey Subject: [PATCH v3 1/2] board: gateworks: venice: add additional levels for dtb name match Date: Thu, 14 Apr 2022 13:00:51 -0700 Message-Id: <20220414200052.30805-1-tharvey@gateworks.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Gateworks produces many products from a single PCB with subloaded components. Add an additional two levels of dtb name matching so that for example a GW7400-A matches the dtb name of gw74xx.dtb Signed-off-by: Tim Harvey --- v3: no changes - rebase --- board/gateworks/venice/eeprom.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/board/gateworks/venice/eeprom.c b/board/gateworks/venice/eeprom.c index 62b8125960c7..282d55f2ae30 100644 --- a/board/gateworks/venice/eeprom.c +++ b/board/gateworks/venice/eeprom.c @@ -259,8 +259,16 @@ const char *eeprom_get_dtb_name(int level, char *buf, int sz) break; case 2: /* don't care about PCB or BOM revision */ break; + case 3: /* don't care about last digit of model */ + buf[strlen(buf) - 1] = 'x'; + break; + case 4: /* don't care about last two digits of model */ + buf[strlen(buf) - 1] = 'x'; + buf[strlen(buf) - 2] = 'x'; + break; default: return NULL; + break; } } -- 2.17.1