Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1647060pxb; Wed, 9 Feb 2022 01:05:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeD0p6OebE22+IWOADWxPXp2eYF2oRqbhYuwNdud/+lagXnP0cfBT/okxohpNeBgEmZej0 X-Received: by 2002:a17:90a:15c9:: with SMTP id w9mr1421223pjd.225.1644397553562; Wed, 09 Feb 2022 01:05:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644397553; cv=none; d=google.com; s=arc-20160816; b=aBDJlx40zQ+ewFco4PjgicKD5humyW6686U27QJAVWi4iio3TQcZoY3ZHJoNsG8Oh4 p86MaWYNYOHyl+HTKeglc2smmGhR0gyjuFs5M+rDKHsW9SXenhbls8DHcTSHm5YW29AG GJpneJSwh/qyJ3FVwtLSoa2+IUZBtjqQc+rETkUJ1HUoH5zBflUPhJt5JbNOVeVTsK8O VCUQCtAXZ/riZZY2dhpdIbx7jepTR9wCx/CN0O97OzdRAKKbKpKK5k/lLKVxzK/WcUFe qAiicmKGCapIvNgE2OqM9YUPOo6rWCjl5ycwwDyABvqaabmpcOAiTS3zTG7chK/hx+nV my3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6UqkATHFYuKMAaK02BGNEELKOaebX+fdRGwvNctEq64=; b=LTFrmCoUMsH+2vQw9N330eilbk3OEfyPjW14jwpO8yEZlF5lD7zjBOhUWn95Eh8t7j eCtQGWhc14v+tqBmOcgzvujAZxzP8kw9zo5QdcqQQ5UTlSInSCY8YRJP+LLcgFmQrMnn WttSpA6fEaN95KT1BZ4DRJuGr3YKKtQQ+FNXnnLL0tpA/uiYG8BtzY+8pHk6WgdPJB2A YgtuGbMWWAokJIQv1HgXewe/eDI6sI3Vm0R8XnaX5GO+F2sBBKhHu5QW5ajddpAZSvjy rieuPpXztV/SM9C9LQweUSy+VOsQ9QhC6suNk4+C0p2aQCzE5YePZAWijjPRRObqvurY 2NyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=opT1ONKv; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k25si14397310pgl.206.2022.02.09.01.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:05:53 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=opT1ONKv; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6CEE9E019748; Wed, 9 Feb 2022 00:50:43 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388634AbiBHWdT (ORCPT + 99 others); Tue, 8 Feb 2022 17:33:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386323AbiBHUId (ORCPT ); Tue, 8 Feb 2022 15:08:33 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BE73C0613CB for ; Tue, 8 Feb 2022 12:08:31 -0800 (PST) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 218J6cbj046485; Tue, 8 Feb 2022 13:06:38 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1644347198; bh=6UqkATHFYuKMAaK02BGNEELKOaebX+fdRGwvNctEq64=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=opT1ONKvoXJeiWDy4C7+obV7cOaSEKXJp0DwOGZwB2jKBrjPCWqC3Kvh80OM4HrN5 PHjgX3pPUUhVAuJA9cA0M6669bUEwT8DUgejKSFMCEjCnofGhch26ZmzNP1Cv8jSJ5 o3QFhE2IOf9vzOSK6uCtXTtapOb0lYGVkgcuUM4Y= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 218J6caC084086 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Feb 2022 13:06:38 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 8 Feb 2022 13:06:37 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE113.ent.ti.com (157.170.170.24) 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, 8 Feb 2022 13:06:37 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 218J6axK108441; Tue, 8 Feb 2022 13:06:37 -0600 Date: Wed, 9 Feb 2022 00:36:36 +0530 From: Pratyush Yadav To: =?utf-8?Q?C=C3=A9dric?= Le Goater CC: Patrick Williams , Vignesh Raghavendra , , Tudor Ambarus , Richard Weinberger , Potin Lai , , Michael Walle , , Miquel Raynal , Subject: Re: [PATCH] mtd: aspeed-smc: improve probe resilience Message-ID: <20220208190636.h6dubktkmuosvdxo@ti.com> References: <20211231102623.izaqlzjvracbbgmp@ti.com> <20220103171721.46c8e697@xps13> <20220105063244.lno3xur64uepa7i5@ti.com> <20220124153644.m3iwlvq5ld5cpbyz@ti.com> <20220124203708.lm23sgsub234wlhq@ti.com> <53d53523-7174-89fd-8661-550346d53141@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <53d53523-7174-89fd-8661-550346d53141@kaod.org> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/02/22 06:13PM, C?dric Le Goater wrote: > Hello, > > On 1/24/22 21:37, Pratyush Yadav wrote: > > On 24/01/22 07:34PM, C?dric Le Goater wrote: > > > > > spimem needs an extension I think. Sorry I have not been able to > > > > > push that forward. Lack of time and other tasks to address on the > > > > > host side of the machine. This is really a software problem, we > > > > > have the HW procedures ready. If a spimem expert could get involved > > > > > to make a few proposals, I would be happy to help and do some testing. > > > > > QEMU models are good enough for the software part. We can do the > > > > > training validation on real HW when ready. > > > > > > > > What information about the flash do you need for this training? > > > > > > Last time I looked, we lacked some post_init handler to setup a slave: > > > configure the registers defining the AHB windows for each flash > > > slave and perform the read timing calibration. calibration should > > > only be done once. > > > > > > See how the aspeed_spi_flash_init() routine doing the calibration > > > is hooked up under aspeed_spi_claim_bus() in the u-boot driver : > > > > My patch series should provide a hook for doing the calibration _after_ > > the flash is initialized. > > You can also use the .dirmap_create handler. The flash device has > been scanned when called and the size is available in the spi-mem > dirmap descriptor. I feel uncomfortable doing that since the API does not actually make this guarantee. Who knows if a future change will violate that assumption. That is why I added a new API call to explicitly mark the flash as ready. I suppose you can get the op from the .dirmap_create handler, but I guess we can debate that over the patches. > > I reworked the current Aspeed driver with this approach and it > seems sufficient for read calibration. > > Thanks, > > C. > -- Regards, Pratyush Yadav Texas Instruments Inc.