Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1642988 > unrolled thread

[PATCH 0/4] mtd: mchp23k256: device tree and mchp23lcv1024

Started byChris Packham <chris.packham@alliedtelesis.co.nz>
First post2017-05-17 07:40 +0200
Last post2017-05-17 16:20 +0200
Articles 12 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] mtd: mchp23k256: device tree and mchp23lcv1024 Chris Packham <chris.packham@alliedtelesis.co.nz> - 2017-05-17 07:40 +0200
    [PATCH 1/4] mtd: mchp23k256: Add OF device ID table Chris Packham <chris.packham@alliedtelesis.co.nz> - 2017-05-17 07:50 +0200
      Re: [PATCH 1/4] mtd: mchp23k256: Add OF device ID table Andrew Lunn <andrew@lunn.ch> - 2017-05-17 13:50 +0200
    [PATCH 2/4] mtd: mchp23k256: switch to mtd_device_register() Chris Packham <chris.packham@alliedtelesis.co.nz> - 2017-05-17 07:50 +0200
      Re: [PATCH 2/4] mtd: mchp23k256: switch to mtd_device_register() Andrew Lunn <andrew@lunn.ch> - 2017-05-17 13:50 +0200
    [PATCH 3/4] mtd: mchp23k256: add partitioning support Chris Packham <chris.packham@alliedtelesis.co.nz> - 2017-05-17 07:50 +0200
      Re: [PATCH 3/4] mtd: mchp23k256: add partitioning support Andrew Lunn <andrew@lunn.ch> - 2017-05-17 16:20 +0200
      Re: [PATCH 3/4] mtd: mchp23k256: add partitioning support Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-05-17 17:30 +0200
        Re: [PATCH 3/4] mtd: mchp23k256: add partitioning support Chris Packham <Chris.Packham@alliedtelesis.co.nz> - 2017-05-22 07:00 +0200
          Re: [PATCH 3/4] mtd: mchp23k256: add partitioning support Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-05-22 09:40 +0200
    Re: [PATCH 0/4] mtd: mchp23k256: device tree and mchp23lcv1024 Andrew Lunn <andrew@lunn.ch> - 2017-05-17 13:50 +0200
    Re: [PATCH 0/4] mtd: mchp23k256: device tree and mchp23lcv1024 Andrew Lunn <andrew@lunn.ch> - 2017-05-17 16:20 +0200

#1642988 — [PATCH 0/4] mtd: mchp23k256: device tree and mchp23lcv1024

FromChris Packham <chris.packham@alliedtelesis.co.nz>
Date2017-05-17 07:40 +0200
Subject[PATCH 0/4] mtd: mchp23k256: device tree and mchp23lcv1024
Message-ID<tHZQK-7s4-19@gated-at.bofh.it>
This series adds device tree support to the mchp23k256 driver and
support for the mchp23lcv1024 chip. I suspect there are more compatible
variants that we could now enumerate if desired.

Chris Packham (4):
  mtd: mchp23k256: Add OF device ID table
  mtd: mchp23k256: switch to mtd_device_register()
  mtd: mchp23k256: add partitioning support
  mtd: mchp23k256: Add support for mchp23lcv1024

 .../bindings/mtd/microchip,mchp23k256.txt          | 18 +++++++++++
 drivers/mtd/devices/mchp23k256.c                   | 37 +++++++++++++++++++---
 2 files changed, 51 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mtd/microchip,mchp23k256.txt

-- 
2.11.0.24.ge6920cf

[toc] | [next] | [standalone]


#1642989 — [PATCH 1/4] mtd: mchp23k256: Add OF device ID table

FromChris Packham <chris.packham@alliedtelesis.co.nz>
Date2017-05-17 07:50 +0200
Subject[PATCH 1/4] mtd: mchp23k256: Add OF device ID table
Message-ID<tI00p-7v7-5@gated-at.bofh.it>
In reply to#1642988
This allows registering of this device via a Device Tree.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 .../devicetree/bindings/mtd/microchip,mchp23k256.txt   | 18 ++++++++++++++++++
 drivers/mtd/devices/mchp23k256.c                       |  8 ++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/microchip,mchp23k256.txt

diff --git a/Documentation/devicetree/bindings/mtd/microchip,mchp23k256.txt b/Documentation/devicetree/bindings/mtd/microchip,mchp23k256.txt
new file mode 100644
index 000000000000..25e5ad38b0f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/microchip,mchp23k256.txt
@@ -0,0 +1,18 @@
+* MTD SPI driver for Microchip 23K256 (and similar) serial SRAM
+
+Required properties:
+- #address-cells, #size-cells : Must be present if the device has sub-nodes
+  representing partitions.
+- compatible : Must be "microchip,mchp23k256"
+- reg : Chip-Select number
+- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
+
+Example:
+
+	spi-sram@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "microchip,mchp23k256";
+		reg = <0>;
+		spi-max-frequency = <20000000>;
+	};
diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
index e237db9f1bdb..9d8306a15833 100644
--- a/drivers/mtd/devices/mchp23k256.c
+++ b/drivers/mtd/devices/mchp23k256.c
@@ -19,6 +19,7 @@
 #include <linux/sizes.h>
 #include <linux/spi/flash.h>
 #include <linux/spi/spi.h>
+#include <linux/of_device.h>
 
 struct mchp23k256_flash {
 	struct spi_device	*spi;
@@ -166,9 +167,16 @@ static int mchp23k256_remove(struct spi_device *spi)
 	return mtd_device_unregister(&flash->mtd);
 }
 
+static const struct of_device_id mchp23k256_of_table[] = {
+	{ .compatible = "microchip,mchp23k256" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, mchp23k256_of_table);
+
 static struct spi_driver mchp23k256_driver = {
 	.driver = {
 		.name	= "mchp23k256",
+		.of_match_table = of_match_ptr(mchp23k256_of_table),
 	},
 	.probe		= mchp23k256_probe,
 	.remove		= mchp23k256_remove,
-- 
2.11.0.24.ge6920cf

[toc] | [prev] | [next] | [standalone]


#1643291 — Re: [PATCH 1/4] mtd: mchp23k256: Add OF device ID table

FromAndrew Lunn <andrew@lunn.ch>
Date2017-05-17 13:50 +0200
SubjectRe: [PATCH 1/4] mtd: mchp23k256: Add OF device ID table
Message-ID<tI5CO-2wd-19@gated-at.bofh.it>
In reply to#1642989
On Wed, May 17, 2017 at 05:39:05PM +1200, Chris Packham wrote:
> This allows registering of this device via a Device Tree.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [next] | [standalone]


#1642991 — [PATCH 2/4] mtd: mchp23k256: switch to mtd_device_register()

FromChris Packham <chris.packham@alliedtelesis.co.nz>
Date2017-05-17 07:50 +0200
Subject[PATCH 2/4] mtd: mchp23k256: switch to mtd_device_register()
Message-ID<tI00p-7v7-9@gated-at.bofh.it>
In reply to#1642988
Use mtd_device_register() instead of mtd_device_parse_register() to
eliminate two unused parameters.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 drivers/mtd/devices/mchp23k256.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
index 9d8306a15833..2542f5b8b63f 100644
--- a/drivers/mtd/devices/mchp23k256.c
+++ b/drivers/mtd/devices/mchp23k256.c
@@ -151,9 +151,8 @@ static int mchp23k256_probe(struct spi_device *spi)
 	flash->mtd._read	= mchp23k256_read;
 	flash->mtd._write	= mchp23k256_write;
 
-	err = mtd_device_parse_register(&flash->mtd, NULL, NULL,
-					data ? data->parts : NULL,
-					data ? data->nr_parts : 0);
+	err = mtd_device_register(&flash->mtd, data ? data->parts : NULL,
+				  data ? data->nr_parts : 0);
 	if (err)
 		return err;
 
-- 
2.11.0.24.ge6920cf

[toc] | [prev] | [next] | [standalone]


#1643285 — Re: [PATCH 2/4] mtd: mchp23k256: switch to mtd_device_register()

FromAndrew Lunn <andrew@lunn.ch>
Date2017-05-17 13:50 +0200
SubjectRe: [PATCH 2/4] mtd: mchp23k256: switch to mtd_device_register()
Message-ID<tI5CN-2wd-3@gated-at.bofh.it>
In reply to#1642991
On Wed, May 17, 2017 at 05:39:06PM +1200, Chris Packham wrote:
> Use mtd_device_register() instead of mtd_device_parse_register() to
> eliminate two unused parameters.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [next] | [standalone]


#1642994 — [PATCH 3/4] mtd: mchp23k256: add partitioning support

FromChris Packham <chris.packham@alliedtelesis.co.nz>
Date2017-05-17 07:50 +0200
Subject[PATCH 3/4] mtd: mchp23k256: add partitioning support
Message-ID<tI00p-7v7-21@gated-at.bofh.it>
In reply to#1642988
Setting the of_node for the mtd device allows the generic mtd code to
setup the partitions. Additionally we must specify a non-zero erasesize
for the partitions to be writeable.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 drivers/mtd/devices/mchp23k256.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
index 2542f5b8b63f..02c6b9dcbd3e 100644
--- a/drivers/mtd/devices/mchp23k256.c
+++ b/drivers/mtd/devices/mchp23k256.c
@@ -143,6 +143,7 @@ static int mchp23k256_probe(struct spi_device *spi)
 
 	data = dev_get_platdata(&spi->dev);
 
+	mtd_set_of_node(&flash->mtd, spi->dev.of_node);
 	flash->mtd.dev.parent	= &spi->dev;
 	flash->mtd.type		= MTD_RAM;
 	flash->mtd.flags	= MTD_CAP_RAM;
@@ -151,6 +152,10 @@ static int mchp23k256_probe(struct spi_device *spi)
 	flash->mtd._read	= mchp23k256_read;
 	flash->mtd._write	= mchp23k256_write;
 
+	flash->mtd.erasesize = PAGE_SIZE;
+	while (flash->mtd.size & (flash->mtd.erasesize - 1))
+		flash->mtd.erasesize >>= 1;
+
 	err = mtd_device_register(&flash->mtd, data ? data->parts : NULL,
 				  data ? data->nr_parts : 0);
 	if (err)
-- 
2.11.0.24.ge6920cf

[toc] | [prev] | [next] | [standalone]


#1643399 — Re: [PATCH 3/4] mtd: mchp23k256: add partitioning support

FromAndrew Lunn <andrew@lunn.ch>
Date2017-05-17 16:20 +0200
SubjectRe: [PATCH 3/4] mtd: mchp23k256: add partitioning support
Message-ID<tI7XX-48K-21@gated-at.bofh.it>
In reply to#1642994
On Wed, May 17, 2017 at 05:39:07PM +1200, Chris Packham wrote:
> Setting the of_node for the mtd device allows the generic mtd code to
> setup the partitions. Additionally we must specify a non-zero erasesize
> for the partitions to be writeable.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [next] | [standalone]


#1643467 — Re: [PATCH 3/4] mtd: mchp23k256: add partitioning support

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2017-05-17 17:30 +0200
SubjectRe: [PATCH 3/4] mtd: mchp23k256: add partitioning support
Message-ID<tI93J-4Nh-31@gated-at.bofh.it>
In reply to#1642994
Hi Chris,

On Wed, 17 May 2017 17:39:07 +1200
Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:

> Setting the of_node for the mtd device allows the generic mtd code to
> setup the partitions. Additionally we must specify a non-zero erasesize
> for the partitions to be writeable.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
>  drivers/mtd/devices/mchp23k256.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
> index 2542f5b8b63f..02c6b9dcbd3e 100644
> --- a/drivers/mtd/devices/mchp23k256.c
> +++ b/drivers/mtd/devices/mchp23k256.c
> @@ -143,6 +143,7 @@ static int mchp23k256_probe(struct spi_device *spi)
>  
>  	data = dev_get_platdata(&spi->dev);
>  
> +	mtd_set_of_node(&flash->mtd, spi->dev.of_node);
>  	flash->mtd.dev.parent	= &spi->dev;
>  	flash->mtd.type		= MTD_RAM;
>  	flash->mtd.flags	= MTD_CAP_RAM;
> @@ -151,6 +152,10 @@ static int mchp23k256_probe(struct spi_device *spi)
>  	flash->mtd._read	= mchp23k256_read;
>  	flash->mtd._write	= mchp23k256_write;
>  
> +	flash->mtd.erasesize = PAGE_SIZE;
> +	while (flash->mtd.size & (flash->mtd.erasesize - 1))
> +		flash->mtd.erasesize >>= 1;
> +

Can we fix allocate_partition() to properly handle the
master->erasesize == 0 case instead of doing that?

Thanks,

Boris

[toc] | [prev] | [next] | [standalone]


#1646508 — Re: [PATCH 3/4] mtd: mchp23k256: add partitioning support

FromChris Packham <Chris.Packham@alliedtelesis.co.nz>
Date2017-05-22 07:00 +0200
SubjectRe: [PATCH 3/4] mtd: mchp23k256: add partitioning support
Message-ID<tJNBL-Rs-5@gated-at.bofh.it>
In reply to#1643467
On 18/05/17 03:29, Boris Brezillon wrote:
> Hi Chris,
> 
> On Wed, 17 May 2017 17:39:07 +1200
> Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
> 
>> Setting the of_node for the mtd device allows the generic mtd code to
>> setup the partitions. Additionally we must specify a non-zero erasesize
>> for the partitions to be writeable.
>>
>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> ---
>>   drivers/mtd/devices/mchp23k256.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
>> index 2542f5b8b63f..02c6b9dcbd3e 100644
>> --- a/drivers/mtd/devices/mchp23k256.c
>> +++ b/drivers/mtd/devices/mchp23k256.c
>> @@ -143,6 +143,7 @@ static int mchp23k256_probe(struct spi_device *spi)
>>   
>>   	data = dev_get_platdata(&spi->dev);
>>   
>> +	mtd_set_of_node(&flash->mtd, spi->dev.of_node);
>>   	flash->mtd.dev.parent	= &spi->dev;
>>   	flash->mtd.type		= MTD_RAM;
>>   	flash->mtd.flags	= MTD_CAP_RAM;
>> @@ -151,6 +152,10 @@ static int mchp23k256_probe(struct spi_device *spi)
>>   	flash->mtd._read	= mchp23k256_read;
>>   	flash->mtd._write	= mchp23k256_write;
>>   
>> +	flash->mtd.erasesize = PAGE_SIZE;
>> +	while (flash->mtd.size & (flash->mtd.erasesize - 1))
>> +		flash->mtd.erasesize >>= 1;
>> +
> 
> Can we fix allocate_partition() to properly handle the
> master->erasesize == 0 case instead of doing that?
> 

Do you mean something like this?

diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index ea5e5307f667..0cd20ed6b374 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -577,6 +577,7 @@ static struct mtd_part *allocate_partition(struct 
mtd_info *master,
                         part->name);
         }
         if ((slave->mtd.flags & MTD_WRITEABLE) &&
+           master->erasesize != 0 &&
             mtd_mod_by_eb(slave->mtd.size, &slave->mtd)) {
                 slave->mtd.flags &= ~MTD_WRITEABLE;


I'm happy to submit this as a formal patch but it could potentially 
affect a number of devices. Whereas the snippet I initially added is 
consistent with drivers/mtd/chips/map_ram.c.

For now I'll leave v2 as-is but I can send a v3 if needed.

[toc] | [prev] | [next] | [standalone]


#1646566 — Re: [PATCH 3/4] mtd: mchp23k256: add partitioning support

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2017-05-22 09:40 +0200
SubjectRe: [PATCH 3/4] mtd: mchp23k256: add partitioning support
Message-ID<tJQ6C-2yw-3@gated-at.bofh.it>
In reply to#1646508
Hi Chris,

On Mon, 22 May 2017 04:52:34 +0000
Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:

> On 18/05/17 03:29, Boris Brezillon wrote:
> > Hi Chris,
> > 
> > On Wed, 17 May 2017 17:39:07 +1200
> > Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
> >   
> >> Setting the of_node for the mtd device allows the generic mtd code to
> >> setup the partitions. Additionally we must specify a non-zero erasesize
> >> for the partitions to be writeable.
> >>
> >> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> >> ---
> >>   drivers/mtd/devices/mchp23k256.c | 5 +++++
> >>   1 file changed, 5 insertions(+)
> >>
> >> diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c
> >> index 2542f5b8b63f..02c6b9dcbd3e 100644
> >> --- a/drivers/mtd/devices/mchp23k256.c
> >> +++ b/drivers/mtd/devices/mchp23k256.c
> >> @@ -143,6 +143,7 @@ static int mchp23k256_probe(struct spi_device *spi)
> >>   
> >>   	data = dev_get_platdata(&spi->dev);
> >>   
> >> +	mtd_set_of_node(&flash->mtd, spi->dev.of_node);
> >>   	flash->mtd.dev.parent	= &spi->dev;
> >>   	flash->mtd.type		= MTD_RAM;
> >>   	flash->mtd.flags	= MTD_CAP_RAM;
> >> @@ -151,6 +152,10 @@ static int mchp23k256_probe(struct spi_device *spi)
> >>   	flash->mtd._read	= mchp23k256_read;
> >>   	flash->mtd._write	= mchp23k256_write;
> >>   
> >> +	flash->mtd.erasesize = PAGE_SIZE;
> >> +	while (flash->mtd.size & (flash->mtd.erasesize - 1))
> >> +		flash->mtd.erasesize >>= 1;
> >> +  
> > 
> > Can we fix allocate_partition() to properly handle the
> > master->erasesize == 0 case instead of doing that?
> >   
> 
> Do you mean something like this?

I had something slightly different in mind (see below).

> 
> diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
> index ea5e5307f667..0cd20ed6b374 100644
> --- a/drivers/mtd/mtdpart.c
> +++ b/drivers/mtd/mtdpart.c
> @@ -577,6 +577,7 @@ static struct mtd_part *allocate_partition(struct 
> mtd_info *master,
>                          part->name);
>          }
>          if ((slave->mtd.flags & MTD_WRITEABLE) &&
> +           master->erasesize != 0 &&
>              mtd_mod_by_eb(slave->mtd.size, &slave->mtd)) {
>                  slave->mtd.flags &= ~MTD_WRITEABLE;
> 
> 
> I'm happy to submit this as a formal patch but it could potentially 
> affect a number of devices. Whereas the snippet I initially added is 
> consistent with drivers/mtd/chips/map_ram.c.

Well, if you're duplicating a workaround that's a good sign this should
actually be handled in the core.

> 
> For now I'll leave v2 as-is but I can send a v3 if needed.
> 

--->8---
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index ea5e5307f667..378ff4a9174e 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -393,7 +393,9 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
                        const struct mtd_partition *part, int partno,
                        uint64_t cur_offset)
 {
+       int wr_alignment = master->erasesize ? : master->writesize;
        struct mtd_part *slave;
+       u32 remainder;
        char *name;
 
        /* allocate the partition structure */
@@ -499,10 +501,12 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
        if (slave->offset == MTDPART_OFS_APPEND)
                slave->offset = cur_offset;
        if (slave->offset == MTDPART_OFS_NXTBLK) {
+               u64 tmp = cur_offset;
+
                slave->offset = cur_offset;
-               if (mtd_mod_by_eb(cur_offset, master) != 0) {
-                       /* Round up to next erasesize */
-                       slave->offset = (mtd_div_by_eb(cur_offset, master) + 1) * master->erasesize;
+               remainder = do_div(tmp, wr_alignment);
+               if (remainder) {
+                       slave->offset += wr_alignment - remainder;
                        printk(KERN_NOTICE "Moving partition %d: "
                               "0x%012llx -> 0x%012llx\n", partno,
                               (unsigned long long)cur_offset, (unsigned long long)slave->offset);
@@ -567,19 +571,22 @@ static struct mtd_part *allocate_partition(struct mtd_info *master,
                slave->mtd.erasesize = master->erasesize;
        }
 
-       if ((slave->mtd.flags & MTD_WRITEABLE) &&
-           mtd_mod_by_eb(slave->offset, &slave->mtd)) {
+       tmp = slave->offset;
+       remainder = do_div(tmp, wr_alignment);
+       if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
                /* Doesn't start on a boundary of major erase size */
                /* FIXME: Let it be writable if it is on a boundary of
                 * _minor_ erase size though */
                slave->mtd.flags &= ~MTD_WRITEABLE;
-               printk(KERN_WARNING"mtd: partition \"%s\" doesn't start on an erase block boundary -- force read-only\n",
+               printk(KERN_WARNING"mtd: partition \"%s\" doesn't start on an erase/write block boundary -- force read-only\n",
                        part->name);
        }
-       if ((slave->mtd.flags & MTD_WRITEABLE) &&
-           mtd_mod_by_eb(slave->mtd.size, &slave->mtd)) {
+
+       tmp = slave->mtd.size;
+       remainder = do_div(tmp, wr_alignment);
+       if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
                slave->mtd.flags &= ~MTD_WRITEABLE;
-               printk(KERN_WARNING"mtd: partition \"%s\" doesn't end on an erase block -- force read-only\n",
+               printk(KERN_WARNING"mtd: partition \"%s\" doesn't end on an erase/write block -- force read-only\n",
                        part->name);
        }
 

[toc] | [prev] | [next] | [standalone]


#1643286

FromAndrew Lunn <andrew@lunn.ch>
Date2017-05-17 13:50 +0200
Message-ID<tI5CN-2wd-5@gated-at.bofh.it>
In reply to#1642988
On Wed, May 17, 2017 at 05:39:04PM +1200, Chris Packham wrote:
> This series adds device tree support to the mchp23k256 driver and
> support for the mchp23lcv1024 chip. I suspect there are more compatible
> variants that we could now enumerate if desired.

Hi Chris

Cool. I only have a mchp23k256, so that is what i targeted. And it is
used on an Intel board, via a USB-SPI dongle, so i didn't need
platform data. I considered partition support, but decided against it,
for my use case. I can just about get a usable minix filesystem in
256K. But anything smaller seems silly to have a real filesystem on
it.

	Andrew

[toc] | [prev] | [next] | [standalone]


#1643397

FromAndrew Lunn <andrew@lunn.ch>
Date2017-05-17 16:20 +0200
Message-ID<tI7XX-48K-17@gated-at.bofh.it>
In reply to#1642988
On Wed, May 17, 2017 at 05:39:04PM +1200, Chris Packham wrote:
> This series adds device tree support to the mchp23k256 driver and
> support for the mchp23lcv1024 chip. I suspect there are more compatible
> variants that we could now enumerate if desired.

Hi Chris

I tested my user case. No obvious regressions.

Tested-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web