From patchwork Tue Jun 14 08:44:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 1643187 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=7292Jofo; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LMhnY1NXYz9sGH for ; Tue, 14 Jun 2022 18:44:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CDC8843BE; Tue, 14 Jun 2022 10:44:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="7292Jofo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 362E68442A; Tue, 14 Jun 2022 10:44:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E54F18434C for ; Tue, 14 Jun 2022 10:44:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=clabbe@baylibre.com Received: by mail-wr1-x433.google.com with SMTP id v14so10244846wra.5 for ; Tue, 14 Jun 2022 01:44:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HMU+O22t7+C7QCrLtOBAy6HoY8dkCFQmsf2qxR7nIEU=; b=7292Jofo7E83Wg5oBDidNlaRlRw4rhkkOdRRQAv3fGUtuNI+004YvcJ/yfp+mcbwSK puJMKtvhW6KX/Jwg3Zd4/BuCnZap1yuN3JGlgBdYrhk7H1nRZsXLPwzvSAJ8BBQlR5sy h6mZjbAyJxO7n7IZhJjdbxaYjtb4e7aUHEqD/xjDazct7b8iSqEF1HaWZio0qxjg3fRu IJWBbkdfpbV+3Y4eDmllNuLjnkZHuXoLblaq/xBMkAD/bzloW/yApqa9x37RHF5VLEN8 3GSws6qYx4D+2/dOwP2UHgPh0qpaVGGPR4OczUd6L1wVzaojqyyy0s7ZZRCclfFurXmE hMcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HMU+O22t7+C7QCrLtOBAy6HoY8dkCFQmsf2qxR7nIEU=; b=yqd8faIH+bQpJBaaEu+aVfumuoxI3M5WwfAlBj0QPOhMV1fhW3HmlV+lV+qGQpZTvF JWX//lgvdnDGCQFpmud6V64NrxAp4MHbHfg7/pMtU5ImL33I1lUdRgZ2vkLCNTK7uItA 32wB5X2rzTmR5WYgZ0eU8nKpy3WFPbdAjedBoormbD0xVQv5sumOS4NusvUlssCCOT1B vTKBDbiaHMU1CoAodKGXTB4InOrs/1H3YQ6c5usEqoirM+Rgc3D2DLlZuELuKYH0u6z1 MNnqGARXuvXpD7m0s5WFDz/YbuD/auiIWUp9C4M3NOgYEIhSVANy40LKqk8XXMqm7upa NBxw== X-Gm-Message-State: AJIora/v14vkura8WPmU9jIrNHoJw4Pu2hQOldVMZ9Apmhkc3i8IyPf0 M5A+ZmUYJKwpKIgKjmaxVrfY7w== X-Google-Smtp-Source: AGRyM1s97G69MalKjV8y9Kjhsk9oB7ewQojeVDzW1HcGSKjCh+9nmf6NFEatfDTrPcEqgdKZIKhenA== X-Received: by 2002:adf:e28a:0:b0:210:b31:722 with SMTP id v10-20020adfe28a000000b002100b310722mr3712713wri.65.1655196263458; Tue, 14 Jun 2022 01:44:23 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id o19-20020a05600c4fd300b0039c55bc2c97sm17869909wmq.16.2022.06.14.01.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 01:44:22 -0700 (PDT) From: Corentin LABBE To: trini@konsulko.com, afd@ti.com Cc: u-boot@lists.denx.de, Corentin LABBE Subject: [PATCH] board: ti: am335x: eth_cpsw should depend on CONFIG_NET Date: Tue, 14 Jun 2022 08:44:07 +0000 Message-Id: <20220614084407.1991748-1-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 The origin of this patch is the breaking of am335x-hs boot due to commit e41651fffda7 ("dm: Support parent devices with of-platdata") HS boards have less SRAM for SPL and so this commit increased memory usage beyond am335x limit. This commit added 10 driver binding pass and am335x boot only if one pass is done. SPL try to do more than one pass due to eth_cpsw failing. Since HS SPL does not need network (and NET is already disabled in config), the easiest fix is to "remove" eth_cpsw from SPL by testing if NET is enabled. Signed-off-by: Corentin LABBE Reviewed-by: Tom Rini Acked-by: Andrew Davis --- board/ti/am335x/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 7c0545892c..2cb5b1cb3f 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -902,7 +902,7 @@ int board_late_init(void) #endif /* CPSW plat */ -#if !CONFIG_IS_ENABLED(OF_CONTROL) +#if CONFIG_IS_ENABLED(NET) && !CONFIG_IS_ENABLED(OF_CONTROL) struct cpsw_slave_data slave_data[] = { { .slave_reg_ofs = CPSW_SLAVE0_OFFSET,