diff mbox

[OpenWrt-Devel] linux:generic: mtd backport for Spansion S25FL164K

Message ID 1435557262-3347-1-git-send-email-ldpinney@gmail.com
State Changes Requested
Delegated to: Rafał Miłecki
Headers show

Commit Message

L. D. Pinney June 29, 2015, 5:54 a.m. UTC
Backport for the Spansion S25FL164K
It's an 8 MiB flash with 4 KiB erase sectors.

Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
---
 target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K | 10 ++++++++++
 target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K  | 10 ++++++++++
 target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K  | 10 ++++++++++
 3 files changed, 30 insertions(+)

Comments

Rafał Miłecki June 29, 2015, 7:16 a.m. UTC | #1
On 29 June 2015 at 07:54, L. D. Pinney <ldpinney@gmail.com> wrote:
> Backport for the Spansion S25FL164K
> It's an 8 MiB flash with 4 KiB erase sectors.
>
> Signed-off-by: L. D. Pinney <ldpinney@gmail.com>

It looks much better but this patch doesn't seem to be refreshed, see:

Applying patch generic/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
patching file drivers/mtd/spi-nor/spi-nor.c
Hunk #1 succeeded at 566 (offset -7 lines).

Applying patch generic/472-mtd-m25p80-add-support-for-Winbond-W25X05-flash.patch
patching file drivers/mtd/spi-nor/spi-nor.c
Hunk #1 succeeded at 617 (offset 1 line).

And there is some general problem with your patch, see below


> diff --git a/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
> new file mode 100644
> index 0000000..866567a
> --- /dev/null
> +++ b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
> @@ -0,0 +1,10 @@
> +--- a/drivers/mtd/spi-nor/spi-nor.c
> ++++ b/drivers/mtd/spi-nor/spi-nor.c
> +@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
> +       { "s25fl008k",  INFO(0xef4014,      0,  64 * 1024,  16, SECT_4K) },
> +       { "s25fl016k",  INFO(0xef4015,      0,  64 * 1024,  32, SECT_4K) },
> +       { "s25fl064k",  INFO(0xef4017,      0,  64 * 1024, 128, SECT_4K) },
> ++      { "s25fl164k",  INFO(0x014017,      0,  64 * 1024, 128, SECT_4K) },
> +
> +       /* SST -- large erase sizes are "overlays", "sectors" are 4K */
> +       { "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) },

A diff (patch) file should have space at the beginning for every
unmodified (reference) file. The file you added doesn't have it. How
did you prepare this file?
L. D. Pinney June 29, 2015, 11:38 p.m. UTC | #2
The space was removed because "git apply" complained....I'll ignore the
complaint.
Please mark this one rejected...
I'll do better next time.
Thanks for your patience and guidance.

Larry

On Mon, Jun 29, 2015 at 2:16 AM, Rafał Miłecki <zajec5@gmail.com> wrote:

> On 29 June 2015 at 07:54, L. D. Pinney <ldpinney@gmail.com> wrote:
> > Backport for the Spansion S25FL164K
> > It's an 8 MiB flash with 4 KiB erase sectors.
> >
> > Signed-off-by: L. D. Pinney <ldpinney@gmail.com>
>
> It looks much better but this patch doesn't seem to be refreshed, see:
>
> Applying patch
> generic/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
> patching file drivers/mtd/spi-nor/spi-nor.c
> Hunk #1 succeeded at 566 (offset -7 lines).
>
> Applying patch
> generic/472-mtd-m25p80-add-support-for-Winbond-W25X05-flash.patch
> patching file drivers/mtd/spi-nor/spi-nor.c
> Hunk #1 succeeded at 617 (offset 1 line).
>
> And there is some general problem with your patch, see below
>
>
> > diff --git
> a/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
> b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
> > new file mode 100644
> > index 0000000..866567a
> > --- /dev/null
> > +++
> b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
> > @@ -0,0 +1,10 @@
> > +--- a/drivers/mtd/spi-nor/spi-nor.c
> > ++++ b/drivers/mtd/spi-nor/spi-nor.c
> > +@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
> > +       { "s25fl008k",  INFO(0xef4014,      0,  64 * 1024,  16, SECT_4K)
> },
> > +       { "s25fl016k",  INFO(0xef4015,      0,  64 * 1024,  32, SECT_4K)
> },
> > +       { "s25fl064k",  INFO(0xef4017,      0,  64 * 1024, 128, SECT_4K)
> },
> > ++      { "s25fl164k",  INFO(0x014017,      0,  64 * 1024, 128, SECT_4K)
> },
> > +
> > +       /* SST -- large erase sizes are "overlays", "sectors" are 4K */
> > +       { "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K |
> SST_WRITE) },
>
> A diff (patch) file should have space at the beginning for every
> unmodified (reference) file. The file you added doesn't have it. How
> did you prepare this file?
>
Rafał Miłecki June 30, 2015, 4:41 a.m. UTC | #3
On 30 June 2015 at 01:38, L. D. Pinney <ldpinney@gmail.com> wrote:
> The space was removed because "git apply" complained....I'll ignore the
> complaint.

In this case it's alright to have this complain, git just doesn't
handle nicely patches adding patches :)


> Please mark this one rejected...
> I'll do better next time.
> Thanks for your patience and guidance.

Sure, thanks.
Rafał Miłecki June 30, 2015, 4:43 a.m. UTC | #4
On 30 June 2015 at 01:38, L. D. Pinney <ldpinney@gmail.com> wrote:
> Please mark this one rejected...
> I'll do better next time.
> Thanks for your patience and guidance.

Every new try should also include increased V (like version) number.
So the *next* one should be:
[PATCH V3] linux:generic: mtd backport for Spansion S25FL164K
you can get that e.g. using
git format-patch --subject-prefix="PATCH V3"
diff mbox

Patch

diff --git a/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 0000000..866567a
--- /dev/null
+++ b/target/linux/generic/patches-3.18/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@ 
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+	{ "s25fl008k",  INFO(0xef4014,      0,  64 * 1024,  16, SECT_4K) },
+	{ "s25fl016k",  INFO(0xef4015,      0,  64 * 1024,  32, SECT_4K) },
+	{ "s25fl064k",  INFO(0xef4017,      0,  64 * 1024, 128, SECT_4K) },
++	{ "s25fl164k",  INFO(0x014017,      0,  64 * 1024, 128, SECT_4K) },
+
+	/* SST -- large erase sizes are "overlays", "sectors" are 4K */
+	{ "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) },
diff --git a/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K b/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 0000000..866567a
--- /dev/null
+++ b/target/linux/generic/patches-4.0/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@ 
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+	{ "s25fl008k",  INFO(0xef4014,      0,  64 * 1024,  16, SECT_4K) },
+	{ "s25fl016k",  INFO(0xef4015,      0,  64 * 1024,  32, SECT_4K) },
+	{ "s25fl064k",  INFO(0xef4017,      0,  64 * 1024, 128, SECT_4K) },
++	{ "s25fl164k",  INFO(0x014017,      0,  64 * 1024, 128, SECT_4K) },
+
+	/* SST -- large erase sizes are "overlays", "sectors" are 4K */
+	{ "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) },
diff --git a/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K b/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
new file mode 100644
index 0000000..866567a
--- /dev/null
+++ b/target/linux/generic/patches-4.1/091-mtd-spi-nor-add-support-for-the-Spansion_S25FL164K
@@ -0,0 +1,10 @@ 
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -573,6 +573,7 @@ static const struct spi_device_id spi_nor_ids[] = {
+	{ "s25fl008k",  INFO(0xef4014,      0,  64 * 1024,  16, SECT_4K) },
+	{ "s25fl016k",  INFO(0xef4015,      0,  64 * 1024,  32, SECT_4K) },
+	{ "s25fl064k",  INFO(0xef4017,      0,  64 * 1024, 128, SECT_4K) },
++	{ "s25fl164k",  INFO(0x014017,      0,  64 * 1024, 128, SECT_4K) },
+
+	/* SST -- large erase sizes are "overlays", "sectors" are 4K */
+	{ "sst25vf040b", INFO(0xbf258d, 0, 64 * 1024,  8, SECT_4K | SST_WRITE) },