Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2598900pxp; Tue, 22 Mar 2022 01:54:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7qpb0a3yRiVE+Wk0OjyRORq+rOXdrUqtYDHTyAd8mJ9s4A+6XGXd4/OtlivDxzpbm5o0a X-Received: by 2002:a05:6402:5186:b0:419:49af:428f with SMTP id q6-20020a056402518600b0041949af428fmr7121573edd.177.1647939276507; Tue, 22 Mar 2022 01:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647939276; cv=none; d=google.com; s=arc-20160816; b=RtpjT9qqJymNJDaaYDhzeR919ClkoYESaKkHGsbLa6w6NHckOLbszMSmuaIg4qIrDL El1Lc1KaxuJOCv1YhMsvmqmrp6qR1Mgdl0rLPn4sqH9Bjs8T+OzeV5EdhvccptZGqKvv TvHLWzJChVkdrbnxuspZZavekisRNaXzq49FPwVE1a1qCgjcmCGabQnlARpI2lDiWYkV DRR8RXbRRv0VlPB0dP+9b40TMJXwRF24xzRgq5RmFJC2pgxjvlpvGgfBULaKEpcJJ9RQ xRj3MsXiHEzqSyUZVYv7p7L6FvWldYvtCUPQkuAZq0gRc7aG8zo8rkIANlPuBFlvgOr2 1jxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=zL5MkQsCXafBeEg4aKfiJNR+gU4ZjIQei5uI3xDhyqM=; b=UtITz/LN5QKfAoq9Xd3iBMEXnJGf33spCDrT5iFQMwok4DXcmjiB9vey30su06Lk0X gzdq13rEjLDbEcavTvurW21d5wJD5Y6t8Fse9kVOvBnF6gNEIQGkgVJCwhuou0U9KD6u Jc7A1U/XqEEN3nSE4lAzH8vZRis27OqBz6tacv1RehKWpxvUvGITUvF9PX3qZX7Fg++C qKo8UAOsML9/78FdV9nDjB4Rm0LAM6I6Si4BlrKOzfHtsQhZKJ24z8j4bMycrgt4b17u XWDlT21XFC8bVT3fgvq4+hK2Dfj9s0TDHqN31Pj/CT2sJ8EzM8mp4HWgNwJAyC+clpoF NU7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=IcLe4Q6S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a170906728500b006df76385c95si8350383ejl.309.2022.03.22.01.54.11; Tue, 22 Mar 2022 01:54:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=IcLe4Q6S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230358AbiCVIVW (ORCPT + 99 others); Tue, 22 Mar 2022 04:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230342AbiCVIVU (ORCPT ); Tue, 22 Mar 2022 04:21:20 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D425D5EDD7 for ; Tue, 22 Mar 2022 01:19:52 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id B891922246; Tue, 22 Mar 2022 09:19:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1647937190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zL5MkQsCXafBeEg4aKfiJNR+gU4ZjIQei5uI3xDhyqM=; b=IcLe4Q6SWVwEb14ZFt+QiDGekYS+efuPr2YDmu0dM1dZ26WDIPzNzE9jAHEXvVKU/V6qZx ufRb3R3h4W9k/w+Q6jiCINPqdzMinTlIoBk7rPpsDg4fF0AK+HKvXKBgRR/2F2G+B1WaL+ 5zBm+Ky2Cu4ry60CQme34joM8k+T830= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 22 Mar 2022 09:19:49 +0100 From: Michael Walle To: Pratyush Yadav Cc: Tudor Ambarus , miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, nicolas.ferre@microchip.com Subject: Re: [PATCH v2 4/8] mtd: spi-nor: core: Introduce method for RDID op In-Reply-To: <20220322073209.26m2udmftiaxxtcq@ti.com> References: <20220228111712.111737-1-tudor.ambarus@microchip.com> <20220228111712.111737-5-tudor.ambarus@microchip.com> <0bdbe6ad8f39996df6345bb249e4a2e8@walle.cc> <20220322073209.26m2udmftiaxxtcq@ti.com> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: michael@walle.cc X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Am 2022-03-22 08:32, schrieb Pratyush Yadav: > On 21/03/22 11:56PM, Michael Walle wrote: >> Am 2022-02-28 12:17, schrieb Tudor Ambarus: >> > RDID is used in the core to auto detect the flash, but also by some >> > manufacturer drivers that contain flashes that support Octal DTR mode, >> > so that they can read the flash ID after the switch to Octal DTR was >> > made >> > to test if the switch was successful. Introduce a core method for RDID >> > op >> > to avoid code duplication. >> >> Some or all? Is that specific to the flash or can we just check that >> readid works in spi_nor_octal_dtr_enable()? That way we could also >> just get rid of the proto parameter for the read_id because it can >> be called after we set the reg_proto. > > It is specific to the flash. Not all flashes support RDID in 8D mode. > And the RDID command is also different in 8D mode for various flashes. > For example, Micron MT35XU512ABA flash expects 8 dummy cycles and 0 > address cycles. Cypress S28HS512T expects 4 address cycles and 3 dummy > cycles. > > The octal_dtr_enable hook would know what parameters to use but it is > harder for the core to know since this information is not discoverable > via SFDP. Ah, I see, thanks for clarification. -michael