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 6E043C43334 for ; Tue, 21 Jun 2022 21:36:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2A9482104; Tue, 21 Jun 2022 23:36:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="j05ilW1s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A60A2820E2; Tue, 21 Jun 2022 23:36:27 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6965D820E2 for ; Tue, 21 Jun 2022 23:36:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bb@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 25LLaM5G119520; Tue, 21 Jun 2022 16:36:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1655847382; bh=2dvQfQ+V4XGP5wxtxOAaaw+dD68y+w/r8dKdx9oABM8=; h=From:To:CC:Subject:Date; b=j05ilW1sZR5z5+QkS/D432Vqf4ONgreykymXs8OJ3iYBe7scFeEVgta3s7wmO3o5c 01AlYK8eQjbyOb0pZ7jULLaKEpxURWjRp/HjEOa/gZa5eCJ6McO3tj6mpVQGkoMF/Q 1rLCDKmF1dc8B24xDHeQClzgt1iOe+iTAMOWdCeY= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 25LLaMXn009292 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 21 Jun 2022 16:36:22 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 21 Jun 2022 16:36:21 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Tue, 21 Jun 2022 16:36:21 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 25LLaLC4078618; Tue, 21 Jun 2022 16:36:21 -0500 From: Bryan Brattlof To: Tom Rini CC: UBoot Mailing List , Bryan Brattlof Subject: [PATCH] soc: soc_ti_k3: identify j7200 SR2.0 SoCs Date: Tue, 21 Jun 2022 16:36:03 -0500 Message-ID: <20220621213603.29875-1-bb@ti.com> X-Mailer: git-send-email 2.17.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1479; h=from:subject; bh=Iz4ZgFpiWcMbNyjhDgRGLBMcIKViQkUAIkPo41D2wEE=; b=owEBbQGS/pANAwAKAcD4q9PiE9cMAcsmYgBisjnCtFO2aUE6IERvoruU0dqviCaaD4RC7oM1qP19 BH6eDGaJATMEAAEKAB0WIQT86LDvkHWcjT+1Kb7A+KvT4hPXDAUCYrI5wgAKCRDA+KvT4hPXDGqiB/ sE9019hZGT0iywDap7jM0tsE+PJhh5NkDfivsNMwZRu8K5a9NSxkl+UzraLbBfaHwlXMmV63wZHoWa +T9cWlMONR3GaSrYliOpYAKbyar8miMHHcprtuO8XYzpVt1m2wCPhSHKVYOEBGqGBygRKsXWYDd3xh BK47TEPuaovoWRq6VeqRHel8nhKyqlrg1lIj4XRg+dadMCljB0TXIJO5hENOjc1LjlKpBMmQ9Xub98 yeLNsNc0ZgU9qol4rrzOn4oebVkScgDilksuYPhFDsd0nkr2Bj3P499BLcWzRhI9A0/elH1OyDHs30 GBY/lV2qC3AWhDMgPgc/Ybu9s1SXKI X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.6 at phobos.denx.de X-Virus-Status: Clean Anytime a new revision of a chip is produced, Texas Instruments will increment the 4 bit VARIANT section of the CTRLMMR_WKUP_JTAGID register by one. Typically this will be decoded as SR1.0 -> SR2.0 ... however a few TI SoCs do not follow this convention. Rather than defining a revision string array for each SoC, use a default revision string array for all TI SoCs that continue to follow the typical 1.0 -> 2.0 revision scheme. Signed-off-by: Bryan Brattlof --- drivers/soc/soc_ti_k3.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c index 965728e8185a0..88bf153d9f6a6 100644 --- a/drivers/soc/soc_ti_k3.c +++ b/drivers/soc/soc_ti_k3.c @@ -60,8 +60,8 @@ static char *j721e_rev_string_map[] = { "1.0", "1.1", }; -static char *am65x_rev_string_map[] = { - "1.0", "2.0", +static char *typical_rev_string_map[] = { + "1.0", "2.0", "3.0", }; static const char *get_rev_string(u32 idreg) @@ -78,16 +78,10 @@ static const char *get_rev_string(u32 idreg) goto bail; return j721e_rev_string_map[rev]; - case AM65X: - if (rev > ARRAY_SIZE(am65x_rev_string_map)) - goto bail; - return am65x_rev_string_map[rev]; - - case AM64X: - case J7200: default: - if (!rev) - return "1.0"; + if (rev > ARRAY_SIZE(typical_rev_string_map)) + goto bail; + return typical_rev_string_map[rev]; }; bail: -- 2.17.1