public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>
Cc: linux-mtd@lists.infradead.org, vigneshr@ti.com,
	linux-arm-kernel@lists.infradead.org,
	Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: [PATCH] mtd: cfi_cmdset_0001: Support the absence of protection registers
Date: Wed, 29 Apr 2020 15:47:41 +0100	[thread overview]
Message-ID: <20200429144741.GB16356@bogus> (raw)
In-Reply-To: <20200417142325.2931423-1-jean-philippe@linaro.org>

On Fri, Apr 17, 2020 at 04:23:26PM +0200, Jean-Philippe Brucker wrote:
> The flash controller implemented by the Arm Base platform behaves like
> the Intel StrataFlash J3 device, but omits several features. In
> particular it doesn't implement a protection register, so "Number of
> Protection register fields" in the Primary Vendor-Specific Extended
> Query, is 0.
> 
> The Intel StrataFlash J3 datasheet only lists 1 as a valid value for
> NumProtectionFields. It describes the field as:
> 
> 	"Number of Protection register fields in JEDEC ID space.
> 	“00h,” indicates that 256 protection bytes are available"
> 
> While a value of 0 may arguably not be architecturally valid, the
> driver's current behavior is certainly wrong: if NumProtectionFields is
> 0, read_pri_intelext() adds a negative value to the unsigned extra_size,
> and ends up in an infinite loop.
> 
> Fix it by ignoring a NumProtectionFields of 0.
> 
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
> ---
> I guess this flash device has never been tested on Linux. The bug showed
> up when trying to boot the latest arm64 defconfig, which enabled
> CONFIG_MTD_PHYSMAP_OF, on the RevC FastModel. Without this config option
> the device isn't probed.

Any progress with this patch ?

FWIW, this fixes boot on few arm64 Arm Ltd FastModels we use for
development including the above mentioned RevC FastModel. So,

Tested-by:  Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-04-29 14:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 14:23 [PATCH] mtd: cfi_cmdset_0001: Support the absence of protection registers Jean-Philippe Brucker
2020-04-29 14:47 ` Sudeep Holla [this message]
2020-04-30 16:32 ` Catalin Marinas
2020-05-01  6:24   ` Vignesh Raghavendra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200429144741.GB16356@bogus \
    --to=sudeep.holla@arm.com \
    --cc=jean-philippe@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox