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 13492C433EF for ; Tue, 31 May 2022 08:59:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4F824842A8; Tue, 31 May 2022 10:59:41 +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="lekwXVqD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AB9E4842A8; Tue, 31 May 2022 10:59:39 +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 5ABFD84269 for ; Tue, 31 May 2022 10:59:37 +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=p.yadav@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 24V8xMAH099183; Tue, 31 May 2022 03:59:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1653987562; bh=6X4G3cY+BHtEQhJ4NjvgFJoKWdJCnnWY/OMEms4NzXs=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=lekwXVqDjiAoAVqjITjoyC2Dm7/fS6cMa2UyAsFrZyHRJ1QrzHs7JP9cMxzURWbUd RijlonhOurzsEFmrXYug5I2j/2UpLObDfkoWxmumgWRky+jQyWZdsaqdqw64Gc7KiK qFhJxmPVgLPKuxllmDuL8ScIVisHaAHYaj8mtaBM= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 24V8xMoP005371 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 31 May 2022 03:59:22 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 31 May 2022 03:59:21 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE110.ent.ti.com (10.64.6.31) 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, 31 May 2022 03:59:21 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 24V8xKJT024695; Tue, 31 May 2022 03:59:21 -0500 Date: Tue, 31 May 2022 14:29:20 +0530 From: Pratyush Yadav To: Vaishnav Achath CC: , , , , , , , , , , , , , , Subject: Re: [PATCH v2 1/2] common: spl: spl_spi: add support for dynamic override of sf bus Message-ID: <20220531085920.tlnnis44q342ittb@ti.com> References: <20220511060352.28140-1-vaishnav.a@ti.com> <20220511060352.28140-2-vaishnav.a@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220511060352.28140-2-vaishnav.a@ti.com> 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.5 at phobos.denx.de X-Virus-Status: Clean On 11/05/22 11:33AM, Vaishnav Achath wrote: > Currently the SPI flash to load from is defined through the compile > time config CONFIG_SF_DEFAULT_BUS and CONFIG_SF_DEFAULT_CS, this > prevents the loading of binaries from different SPI flash using the > same build.E.g. supporting QSPI flash boot and OSPI flash boot > on J721E platform is not possible due to this limitation. > > This commit adds lookup functions spl_spi_boot_bus() > and spl_spi_boot_cs for identifying the flash device based on the > selected boot device, when not overridden the lookup functions are > weakly defined in common/spl/spl_spi.c. > > Signed-off-by: Vaishnav Achath Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.