Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp623452pxb; Thu, 5 Nov 2020 08:45:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxAGYOQCkbo2JTXmGBTsWxGrQaJv/Wi57uh7Lk1xsyvLT6ZjHPJtjkNvepwIY3j00M9asjA X-Received: by 2002:aa7:da0a:: with SMTP id r10mr3625733eds.102.1604594758375; Thu, 05 Nov 2020 08:45:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604594758; cv=none; d=google.com; s=arc-20160816; b=ol/ZMImLdJEw518q18Tm5qWZr3OUULsOBdu62ZEwUNclTkhkCON8BW6NziPC+1ttI+ 5QZ0tU8nQMPwQpGbZdSc5vzVUpWB7ayzg/tP0ExLfkZGMkJKGH7VyetLxHNYh1yvisTw JAiQRhyIk39axXg5cuLFLwKw1Bb+eock8/T2myiq/TQrEWtlVGCKssVF9FCnE4FmzZ4t H7fU/ijL46aKNbihDPcHVvKQ1RdqUbHx8gMG2yByFyGWU2XaxTnWgzqkBqVxCu0FdRNo iEDTPHMeXeR9zyS+pPC480BWZHShPkQdg/q3r32Hr5PKqZVQgiZfwFlrBlaK8tdqKEij VwHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XsCIjBiklR0t6D0Qqy/m7nrDcplpUraQFzOX1UA/aNA=; b=LUmX3eoQO7pheeFgBm+gqajmQChzWpb7+aUS0onks9gP7BauuXDJHlEyAwIuBohZaG Jhghkv/sGjgl3eubi+66zlLBqXrJ02D8uCuAd/OJpWg/MG5cR5/qBnBzcazZa4xmlfZi fxWQHCbuXjvCFFa937TcIdf1AyugPniBhpo/7zxDFYU2QgfmrX1CU/gKOAwGTRQDYZBH +zjWKXh9gOzttk9DYrNUXIj4s7Td714oVoZK1uAYYIKAxe1xcT9qE/0765OPqCkUFzSM nNlEs/14wgqkW4MwIsSrl4I+4AAuE4OHvbViPxnEm6eR5+YURo+VZsfopEgzdE9Pp2Am lNTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PqIqOxZp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n24si1482023ejb.608.2020.11.05.08.45.34; Thu, 05 Nov 2020 08:45:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PqIqOxZp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731259AbgKEQn1 (ORCPT + 99 others); Thu, 5 Nov 2020 11:43:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:47894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731149AbgKEQnZ (ORCPT ); Thu, 5 Nov 2020 11:43:25 -0500 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A5B552080D; Thu, 5 Nov 2020 16:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604594604; bh=nzUBLENvNGw4qP7529IkPGt+67Ej7GsURN40SwoTbuQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PqIqOxZpYIytUMk1dkb5b3eIQUatp1Du9XOiOGzQ22gJ2Xofp+ZV5a/hHGDK7NXfs N4qyhQfu5EeA5H8bNzRWF6Om4Zu+rIJ25FfR+VIktuHEfmU4Cyko/KJc6ie19+JLZf HBKenVSBGWEPXANLQiRnbgp7EEh3c7fQVOfbFu6A= Date: Thu, 5 Nov 2020 16:43:12 +0000 From: Mark Brown To: Boris Brezillon Cc: =?iso-8859-1?Q?C=E9dric?= Le Goater , robh+dt@kernel.org, Chin-Ting Kuo , joel@jms.id.au, andrew@aj.id.au, bbrezillon@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-spi@vger.kernel.org, BMC-SW@aspeedtech.com Subject: Re: [v3 4/4] spi: aspeed: Add ASPEED FMC/SPI memory controller driver Message-ID: <20201105164312.GE4856@sirena.org.uk> References: <20201105120331.9853-1-chin-ting_kuo@aspeedtech.com> <20201105120331.9853-5-chin-ting_kuo@aspeedtech.com> <20201105161132.37eb3265@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="a+b56+3nqLzpiR9O" Content-Disposition: inline In-Reply-To: <20201105161132.37eb3265@collabora.com> X-Cookie: It's the thought, if any, that counts! User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --a+b56+3nqLzpiR9O Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 05, 2020 at 04:11:32PM +0100, Boris Brezillon wrote: > C=E9dric Le Goater wrote: > > Thanks for this driver. It's much cleaner than the previous and we shou= ld=20 > > try adding support for the AST2500 SoC also. I guess we can keep the ol= d=20 > > driver for the AST2400 which has a different register layout. > >=20 > > On the patchset, I think we should split this patch in three :=20 > >=20 > > - basic support > > - AHB window calculation depending on the flash size > > - read training support =20 > I didn't look closely at the implementation, but if the read training > tries to read a section of the NOR, I'd recommend exposing that feature > through spi-mem and letting the SPI-NOR framework trigger the training > instead of doing that at dirmap creation time (remember that spi-mem is > also used for SPI NANDs which use the dirmap API too, and this training > is unlikely to work there). > The SPI-NOR framework could pass a read op template and a reference > pattern such that all the spi-mem driver has to do is execute the > template op and compare the output to the reference buffer. That seems like a good idea. > > We should avoid magic values when setting registers. This is confusing= =20 > > and defines are much better. It does depend a bit on documentation though, it's not a hard requirement. --a+b56+3nqLzpiR9O Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl+kK58ACgkQJNaLcl1U h9DGCgf+I0rBJDAblAFHQZV/Foq1amFegL1fHRXAk5+kobJswoMMwbeep5jlgZ4k P/9UMfROv98skgwDGByNx79txjX5xCcUMW5Oz10pk7y0e9UQya8fUTUrf0gbQza6 OMXG9IMBZObmiJgUKahOaZqmoYo3CE0XJSwjiZwnk9hXQ23t2nsfFZMKe0ZfIORl vnx/OpoGDVLmnIwCGNIpV+DjdGXuXCVPB4i7NgsQUdyhORxa8WOJUrWAkwC/FCNi cGHBoQSQYoe1lxm8KCC/xqPqDe5MqIF5+46TFNLORhzTY529mYEdXcHDAE4QZ6bx nbw7Y3kGyBBE3YjsakRkeoNj/oFcjA== =QXki -----END PGP SIGNATURE----- --a+b56+3nqLzpiR9O--