From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=us.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=miltonm@us.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44lYd934NDzDqQX for ; Fri, 19 Apr 2019 08:27:24 +1000 (AEST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3IMOdSC131776 for ; Thu, 18 Apr 2019 18:27:20 -0400 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ry1s9rjx2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 18 Apr 2019 18:27:20 -0400 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Thu, 18 Apr 2019 22:27:20 -0000 Received: from us1a3-smtp03.a3.dal06.isc4sb.com (10.106.154.98) by smtp.notes.na.collabserv.com (10.106.227.158) with smtp.notes.na.collabserv.com ESMTP; Thu, 18 Apr 2019 22:27:15 -0000 Received: from us1a3-mail228.a3.dal06.isc4sb.com ([10.146.103.71]) by us1a3-smtp03.a3.dal06.isc4sb.com with ESMTP id 2019041822271539-994156 ; Thu, 18 Apr 2019 22:27:15 +0000 In-Reply-To: <20190417133941.22962-3-clg@kaod.org> Subject: Re: [PATCH dev-5.0 2/4] mtd: spi-nor: aspeed: clarify 4BYTE address mode mask From: "Milton Miller II" To: "=?ISO-8859-1?Q?C=E9dric_Le_Goater?=" Cc: openbmc@lists.ozlabs.org, Andrew Jeffery Date: Thu, 18 Apr 2019 22:27:15 +0000 MIME-Version: 1.0 Sensitivity: Importance: Normal X-Priority: 3 (Normal) References: <20190417133941.22962-3-clg@kaod.org>, <20190417133941.22962-1-clg@kaod.org> X-Mailer: IBM iNotes ($HaikuForm 1048) | IBM Domino Build SCN1812108_20180501T0841_FP38 April 10, 2019 at 11:56 X-LLNOutbound: False X-Disclaimed: 20303 X-TNEFEvaluated: 1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8 x-cbid: 19041822-6059-0000-0000-00000E43D61C X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.373977; ST=0; TS=0; UL=0; ISC=; MB=0.000001 X-IBM-SpamModules-Versions: BY=3.00010952; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01191037; UDB=6.00624171; IPR=6.00971833; BA=6.00006282; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00026507; XFM=3.00000015; UTC=2019-04-18 22:27:18 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2019-04-18 18:18:59 - 6.00009822 x-cbparentid: 19041822-6060-0000-0000-00007A0B163F Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-18_11:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2019 22:27:26 -0000
About 04/17/2019 09:18AM in some timezone, C=C3=A9dric Le Goate= r wrote:

>Subject: [PATCH dev-5.0 2/4] mtd: spi= -nor: aspeed: clarify 4BYTE
>address mode mask
>

=
Missing  change log here.

>= Signed-off-by: C=C3=A9dric Le Goater <clg@kaod.org>
>---
> drivers/mtd/spi= -nor/aspeed-smc.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), = 1 deletion(-)
>
>diff --git a/drivers/mtd/spi-nor/aspeed-smc.c<= br>>b/drivers/mtd/spi-nor/aspeed-smc.c
>index ee3059b27c07..143773= 2fdea1 100644
>--- a/drivers/mtd/spi-nor/aspeed-smc.c
>+++ b/dr= ivers/mtd/spi-nor/aspeed-smc.c
>@@ -884,7 +884,15 @@ static const uin= t32=5Ft aspeed=5Fsmc=5Fhclk=5Fdivs[] =3D {
>
> static u32 aspe= ed=5Fsmc=5Fdefault=5Fread(struct aspeed=5Fsmc=5Fchip *chip)
> {
&g= t;- return (chip->ctl=5Fval[smc=5Fread] & 0x2000) |
>+ = /*
>+ * Keep the 4Byte address mode on the AST2400 SPI= controller.
>+ * Other controllers set the 4Byte mode in the= CE Control
>+ * Register
>+ */
>+ = u32 ctl=5Fmask =3D chip->controller->info =3D=3D &spi=5F2400=5Fi= nfo ?
>+ CONTROL=5FIO=5FADDRESS=5F4B : 0;
>= ;+

I dislike this patch because it violates the da= ta driven model of the types.

Either a dupicate me= thod should be created or at least a member of the
type structure= should be used instead of a compare to a specific instance.
=
>+ return (chip->ctl=5Fval[smc=5Fread] & ctl=5Fm= ask) |
> (0x00 << 28) | /* Single bit */
>= ; (0x00 << 24) | /* CE# max */
> = (0x03 << 16) | /* use normal reads */
>--
>2.20.1
&= gt;
>