* [PATCH v2 2/2] mtd: cfi: Add early fixup for S70GL02GS
@ 2018-04-30 16:35 Aaron Sierra
2018-05-03 9:35 ` Boris Brezillon
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Sierra @ 2018-04-30 16:35 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger
Cc: linux-mtd
S70GL02GS flash reports a single 256 MiB chip, but is really made up
of two 128 MiB chips with 1024 sectors each.
Without early fixups (top half of device cannot be written or erased):
ff0000000.nor-boot: Found 1 x16 devices at 0x0 in 16-bit bank. <snip>
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.5.
number of CFI chips: 1
With early fixups (entire device can be written and erased):
Bad S70GL02GS CFI data; adjust to detect 2 chips
ff0000000.nor-boot: Found 1 x16 devices at 0x0 in 16-bit bank. <snip>
ff0000000.nor-boot: Found 1 x16 devices at 0x8000000 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.5.
number of CFI chips: 2
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
---
drivers/mtd/chips/cfi_probe.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index c05deac..65f3ab0 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -174,7 +174,19 @@ static int __xipram cfi_probe_chip(struct map_info *map, __u32 base,
return 1;
}
+static void fixup_s70gl02gs_chips(struct cfi_private *cfi)
+{
+ /*
+ * S70GL02GS flash reports a single 256 MiB chip, but is really made up
+ * of two 128 MiB chips with 1024 sectors each.
+ */
+ cfi->cfiq->DevSize = 27;
+ cfi->cfiq->EraseRegionInfo[0] = 0x20003ff;
+ pr_warn("Bad S70GL02GS CFI data; adjust to detect 2 chips\n");
+}
+
static struct cfi_early_fixup cfi_early_fixup_table[] = {
+ { CFI_MFR_AMD, 0x4801, fixup_s70gl02gs_chips },
{ 0, 0, NULL },
};
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 2/2] mtd: cfi: Add early fixup for S70GL02GS
2018-04-30 16:35 [PATCH v2 2/2] mtd: cfi: Add early fixup for S70GL02GS Aaron Sierra
@ 2018-05-03 9:35 ` Boris Brezillon
2018-05-03 14:33 ` Aaron Sierra
0 siblings, 1 reply; 3+ messages in thread
From: Boris Brezillon @ 2018-05-03 9:35 UTC (permalink / raw)
To: Aaron Sierra
Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, linux-mtd
On Mon, 30 Apr 2018 11:35:07 -0500 (CDT)
Aaron Sierra <asierra@xes-inc.com> wrote:
> S70GL02GS flash reports a single 256 MiB chip, but is really made up
> of two 128 MiB chips with 1024 sectors each.
>
> Without early fixups (top half of device cannot be written or erased):
> ff0000000.nor-boot: Found 1 x16 devices at 0x0 in 16-bit bank. <snip>
> Amd/Fujitsu Extended Query Table at 0x0040
> Amd/Fujitsu Extended Query version 1.5.
> number of CFI chips: 1
>
> With early fixups (entire device can be written and erased):
> Bad S70GL02GS CFI data; adjust to detect 2 chips
> ff0000000.nor-boot: Found 1 x16 devices at 0x0 in 16-bit bank. <snip>
> ff0000000.nor-boot: Found 1 x16 devices at 0x8000000 in 16-bit bank
> Amd/Fujitsu Extended Query Table at 0x0040
> Amd/Fujitsu Extended Query version 1.5.
> number of CFI chips: 2
>
> Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Just one comment for your future contributions: can you make sure you
send patch series as a thread (patch X should be 'In-Reply-To' the
cover letter or the first patch in the series if you don't have a cover
letter).
Usually, developers use git send-email which takes care of that for you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 2/2] mtd: cfi: Add early fixup for S70GL02GS
2018-05-03 9:35 ` Boris Brezillon
@ 2018-05-03 14:33 ` Aaron Sierra
0 siblings, 0 replies; 3+ messages in thread
From: Aaron Sierra @ 2018-05-03 14:33 UTC (permalink / raw)
To: Boris Brezillon
Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, linux-mtd
----- Original Message -----
> From: "Boris Brezillon" <boris.brezillon@bootlin.com>
> To: "Aaron Sierra" <asierra@xes-inc.com>
> Sent: Thursday, May 3, 2018 4:35:57 AM
> Subject: Re: [PATCH v2 2/2] mtd: cfi: Add early fixup for S70GL02GS
> On Mon, 30 Apr 2018 11:35:07 -0500 (CDT)
> Aaron Sierra <asierra@xes-inc.com> wrote:
>
[ snip ]
>
> Just one comment for your future contributions: can you make sure you
> send patch series as a thread (patch X should be 'In-Reply-To' the
> cover letter or the first patch in the series if you don't have a cover
> letter).
>
> Usually, developers use git send-email which takes care of that for you.
Yes, I will. Thanks for pointing this out to me.
-Aaron
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-03 14:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 16:35 [PATCH v2 2/2] mtd: cfi: Add early fixup for S70GL02GS Aaron Sierra
2018-05-03 9:35 ` Boris Brezillon
2018-05-03 14:33 ` Aaron Sierra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.