* [PATCH 1/3] mtd: afs: Move AFS partition parser to parsers subdir
2019-01-23 12:29 [PATCH 0/3] AFS move and OF support Linus Walleij
@ 2019-01-23 12:29 ` Linus Walleij
2019-01-23 12:29 ` [PATCH 2/3] mtd: partitions: Add AFS partitions DT bindings Linus Walleij
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2019-01-23 12:29 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, Cyrille Pitchen, linux-mtd
Cc: Linus Walleij
This moves the AFS (ARM Firmware Suite) partition parser
for NOR flash down into the parsers subdirectory.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/mtd/Kconfig | 16 ----------------
drivers/mtd/Makefile | 1 -
drivers/mtd/parsers/Kconfig | 16 ++++++++++++++++
drivers/mtd/parsers/Makefile | 1 +
drivers/mtd/{ => parsers}/afs.c | 0
5 files changed, 17 insertions(+), 17 deletions(-)
rename drivers/mtd/{ => parsers}/afs.c (100%)
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 79a8ff542883..55cacc1edcd4 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -60,22 +60,6 @@ config MTD_CMDLINE_PARTS
If unsure, say 'N'.
-config MTD_AFS_PARTS
- tristate "ARM Firmware Suite partition parsing"
- depends on (ARM || ARM64)
- help
- The ARM Firmware Suite allows the user to divide flash devices into
- multiple 'images'. Each such image has a header containing its name
- and offset/size etc.
-
- If you need code which can detect and parse these tables, and
- register MTD 'partitions' corresponding to each image detected,
- enable this option.
-
- You will still need the parsing functions to be called by the driver
- for your particular device. It won't happen automatically. The
- 'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
-
config MTD_OF_PARTS
tristate "OpenFirmware partitioning information support"
default y
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 58fc327a5276..806287e80e84 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -9,7 +9,6 @@ mtd-y := mtdcore.o mtdsuper.o mtdconcat.o mtdpart.o mtdchar.o
obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
-obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
obj-$(CONFIG_MTD_AR7_PARTS) += ar7part.o
obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm47xxpart.o
diff --git a/drivers/mtd/parsers/Kconfig b/drivers/mtd/parsers/Kconfig
index fccf1950e92d..419529318504 100644
--- a/drivers/mtd/parsers/Kconfig
+++ b/drivers/mtd/parsers/Kconfig
@@ -1,3 +1,19 @@
+config MTD_AFS_PARTS
+ tristate "ARM Firmware Suite partition parsing"
+ depends on (ARM || ARM64)
+ help
+ The ARM Firmware Suite allows the user to divide flash devices into
+ multiple 'images'. Each such image has a header containing its name
+ and offset/size etc.
+
+ If you need code which can detect and parse these tables, and
+ register MTD 'partitions' corresponding to each image detected,
+ enable this option.
+
+ You will still need the parsing functions to be called by the driver
+ for your particular device. It won't happen automatically. The
+ 'physmap' map driver (CONFIG_MTD_PHYSMAP) does this, for example.
+
config MTD_PARSER_TRX
tristate "Parser for TRX format partitions"
depends on MTD && (BCM47XX || ARCH_BCM_5301X || COMPILE_TEST)
diff --git a/drivers/mtd/parsers/Makefile b/drivers/mtd/parsers/Makefile
index d8418bf6804a..f7a8fe66e2ca 100644
--- a/drivers/mtd/parsers/Makefile
+++ b/drivers/mtd/parsers/Makefile
@@ -1,3 +1,4 @@
+obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o
obj-$(CONFIG_MTD_SHARPSL_PARTS) += sharpslpart.o
obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
diff --git a/drivers/mtd/afs.c b/drivers/mtd/parsers/afs.c
similarity index 100%
rename from drivers/mtd/afs.c
rename to drivers/mtd/parsers/afs.c
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] mtd: partitions: Add AFS partitions DT bindings
2019-01-23 12:29 [PATCH 0/3] AFS move and OF support Linus Walleij
2019-01-23 12:29 ` [PATCH 1/3] mtd: afs: Move AFS partition parser to parsers subdir Linus Walleij
@ 2019-01-23 12:29 ` Linus Walleij
2019-02-23 0:34 ` Rob Herring
2019-01-23 12:29 ` [PATCH 3/3] mtd: partitions: Add OF support to AFS partitions Linus Walleij
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2019-01-23 12:29 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, Cyrille Pitchen, linux-mtd
Cc: devicetree, Linus Walleij
This adds device tree bindings for ARM Firmware Suite
flash partitioning used in NOR flashes on ARM reference
designs.
Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
.../mtd/partitions/arm,arm-firmware-suite.txt | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.txt
diff --git a/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.txt b/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.txt
new file mode 100644
index 000000000000..d5c5616f6db5
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.txt
@@ -0,0 +1,17 @@
+ARM AFS - ARM Firmware Suite Partitions
+=======================================
+
+The ARM Firmware Suite is a flash partitioning system found on the
+ARM reference designs: Integrator AP, Integrator CP, Versatile AB,
+Versatile PB, the RealView family, Versatile Express and Juno.
+
+Required properties:
+- compatible : (required) must be "arm,arm-firmware-suite"
+
+Example:
+
+flash@0 {
+ partitions {
+ compatible = "arm,arm-firmware-suite";
+ };
+};
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] mtd: partitions: Add AFS partitions DT bindings
2019-01-23 12:29 ` [PATCH 2/3] mtd: partitions: Add AFS partitions DT bindings Linus Walleij
@ 2019-02-23 0:34 ` Rob Herring
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2019-02-23 0:34 UTC (permalink / raw)
To: Linus Walleij
Cc: Boris Brezillon, devicetree, Richard Weinberger, Linus Walleij,
Marek Vasut, linux-mtd, Cyrille Pitchen, Brian Norris,
David Woodhouse
On Wed, 23 Jan 2019 13:29:09 +0100, Linus Walleij wrote:
> This adds device tree bindings for ARM Firmware Suite
> flash partitioning used in NOR flashes on ARM reference
> designs.
>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> .../mtd/partitions/arm,arm-firmware-suite.txt | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.txt
>
Reviewed-by: Rob Herring <robh@kernel.org>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/3] mtd: partitions: Add OF support to AFS partitions
2019-01-23 12:29 [PATCH 0/3] AFS move and OF support Linus Walleij
2019-01-23 12:29 ` [PATCH 1/3] mtd: afs: Move AFS partition parser to parsers subdir Linus Walleij
2019-01-23 12:29 ` [PATCH 2/3] mtd: partitions: Add AFS partitions DT bindings Linus Walleij
@ 2019-01-23 12:29 ` Linus Walleij
2019-02-13 7:59 ` [PATCH 0/3] AFS move and OF support Linus Walleij
2019-02-13 13:36 ` Boris Brezillon
4 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2019-01-23 12:29 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, Cyrille Pitchen, linux-mtd
Cc: Linus Walleij
This adds device tree support for AFS partitioning.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/mtd/parsers/afs.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mtd/parsers/afs.c b/drivers/mtd/parsers/afs.c
index d61b7edfc938..3679e1d22595 100644
--- a/drivers/mtd/parsers/afs.c
+++ b/drivers/mtd/parsers/afs.c
@@ -255,9 +255,16 @@ static int parse_afs_partitions(struct mtd_info *mtd,
return idx ? idx : ret;
}
+static const struct of_device_id mtd_parser_afs_of_match_table[] = {
+ { .compatible = "arm,arm-firmware-suite" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, mtd_parser_afs_of_match_table);
+
static struct mtd_part_parser afs_parser = {
.parse_fn = parse_afs_partitions,
.name = "afs",
+ .of_match_table = mtd_parser_afs_of_match_table,
};
module_mtd_part_parser(afs_parser);
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] AFS move and OF support
2019-01-23 12:29 [PATCH 0/3] AFS move and OF support Linus Walleij
` (2 preceding siblings ...)
2019-01-23 12:29 ` [PATCH 3/3] mtd: partitions: Add OF support to AFS partitions Linus Walleij
@ 2019-02-13 7:59 ` Linus Walleij
2019-02-13 8:40 ` Linus Walleij
2019-02-13 13:36 ` Boris Brezillon
4 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2019-02-13 7:59 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, Cyrille Pitchen, linux-mtd
On Wed, Jan 23, 2019 at 1:29 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> As a starting point to fixing up the AFS support on ARM
> reference designs, let's move the implementation down to
> the "parsers" subdirectory and add OF probing support.
>
> More refactorings will be done on top of this change.
>
> Linus Walleij (3):
> mtd: afs: Move AFS partition parser to parsers subdir
> mtd: partitions: Add AFS partitions DT bindings
> mtd: partitions: Add OF support to AFS partitions
Can we merge this for v5.1?
If what you're waiting for is DT binding review I am pretty
sure they are uncontroversial and will not happen at all since
noone responded for three weeks on that list.
The follow-up AFSv2 series would be nice to get in as well
so I can patch up the device trees to finally have all
DT platforms detect the software binaries on the flash.
Yours,
Linus Walleij
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] AFS move and OF support
2019-02-13 7:59 ` [PATCH 0/3] AFS move and OF support Linus Walleij
@ 2019-02-13 8:40 ` Linus Walleij
2019-02-13 9:15 ` Boris Brezillon
0 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2019-02-13 8:40 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Marek Vasut, Richard Weinberger,
Cyrille Pitchen, linux-mtd, Boris Brezillon
Top posting to Boris' kernelorg address, sorry for using the wrong
address, maybe this is why the series was missed in the first
place :/
Yours,
Linus Walleij
On Wed, Feb 13, 2019 at 8:59 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Wed, Jan 23, 2019 at 1:29 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > As a starting point to fixing up the AFS support on ARM
> > reference designs, let's move the implementation down to
> > the "parsers" subdirectory and add OF probing support.
> >
> > More refactorings will be done on top of this change.
> >
> > Linus Walleij (3):
> > mtd: afs: Move AFS partition parser to parsers subdir
> > mtd: partitions: Add AFS partitions DT bindings
> > mtd: partitions: Add OF support to AFS partitions
>
> Can we merge this for v5.1?
>
> If what you're waiting for is DT binding review I am pretty
> sure they are uncontroversial and will not happen at all since
> noone responded for three weeks on that list.
>
> The follow-up AFSv2 series would be nice to get in as well
> so I can patch up the device trees to finally have all
> DT platforms detect the software binaries on the flash.
>
> Yours,
> Linus Walleij
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] AFS move and OF support
2019-02-13 8:40 ` Linus Walleij
@ 2019-02-13 9:15 ` Boris Brezillon
0 siblings, 0 replies; 9+ messages in thread
From: Boris Brezillon @ 2019-02-13 9:15 UTC (permalink / raw)
To: Linus Walleij
Cc: Richard Weinberger, Marek Vasut, linux-mtd, Cyrille Pitchen,
Brian Norris, David Woodhouse
Hi Linus,
On Wed, 13 Feb 2019 09:40:11 +0100
Linus Walleij <linus.walleij@linaro.org> wrote:
> Top posting to Boris' kernelorg address, sorry for using the wrong
> address, maybe this is why the series was missed in the first
> place :/
Nope, it's on my todo list. Just didn't have much time to dedicate to
MTD lately. Sorry for the delay, I'll see if I can review/merge it this
week.
Boris
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] AFS move and OF support
2019-01-23 12:29 [PATCH 0/3] AFS move and OF support Linus Walleij
` (3 preceding siblings ...)
2019-02-13 7:59 ` [PATCH 0/3] AFS move and OF support Linus Walleij
@ 2019-02-13 13:36 ` Boris Brezillon
4 siblings, 0 replies; 9+ messages in thread
From: Boris Brezillon @ 2019-02-13 13:36 UTC (permalink / raw)
To: Linus Walleij
Cc: Boris Brezillon, Richard Weinberger, Marek Vasut, linux-mtd,
Cyrille Pitchen, Brian Norris, David Woodhouse
On Wed, 23 Jan 2019 13:29:07 +0100
Linus Walleij <linus.walleij@linaro.org> wrote:
> As a starting point to fixing up the AFS support on ARM
> reference designs, let's move the implementation down to
> the "parsers" subdirectory and add OF probing support.
>
> More refactorings will be done on top of this change.
>
> Linus Walleij (3):
> mtd: afs: Move AFS partition parser to parsers subdir
> mtd: partitions: Add AFS partitions DT bindings
> mtd: partitions: Add OF support to AFS partitions
Let's try to use a consistent prefix for patches touching partition
parsers code, like "mtd: partitions: <format>: ". Same applies to the
other patch series. Other than that, patches look good to me.
>
> .../mtd/partitions/arm,arm-firmware-suite.txt | 17 +++++++++++++++++
> drivers/mtd/Kconfig | 16 ----------------
> drivers/mtd/Makefile | 1 -
> drivers/mtd/parsers/Kconfig | 16 ++++++++++++++++
> drivers/mtd/parsers/Makefile | 1 +
> drivers/mtd/{ => parsers}/afs.c | 7 +++++++
> 6 files changed, 41 insertions(+), 17 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mtd/partitions/arm,arm-firmware-suite.txt
> rename drivers/mtd/{ => parsers}/afs.c (96%)
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 9+ messages in thread