Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1654705 > unrolled thread
| Started by | Andrea Adami <andrea.adami@gmail.com> |
|---|---|
| First post | 2017-06-01 00:50 +0200 |
| Last post | 2017-06-01 00:50 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v3 0/9] mtd: sharpslpart partition parser Andrea Adami <andrea.adami@gmail.com> - 2017-06-01 00:50 +0200
[PATCH v3 8/9] arm: pxa: spitz.c: remove hardcoded partitioning, use sharpslpart parser Andrea Adami <andrea.adami@gmail.com> - 2017-06-01 00:50 +0200
| From | Andrea Adami <andrea.adami@gmail.com> |
|---|---|
| Date | 2017-06-01 00:50 +0200 |
| Subject | [PATCH v3 0/9] mtd: sharpslpart partition parser |
| Message-ID | <tNkBb-2ET-3@gated-at.bofh.it> |
This patchset introduces a simple partition parser for the Sharp SL
Series PXA handhelds. More details in the commit text.
I have set in cc the ARM PXA maintainers because this is the MTD part of
a planned wider patchset cleaning the Zaurus board files. The MFD maintainers
are also in cc (tmio.h change).
Changelog:
v1 initial import of 2.4 sources [1]
v2 refactor applying many suggested fixes [2]
v3 put the partition parser types in the platform data
[1] https://github.com/LinuxPDA/Sharp_FTL_2.4.20
[2] https://github.com/LinuxPDA/linux/commits/sharpslpart_v2
Andrea Adami (9):
mtd: sharpslpart: add sharpslpart MTD partition parser
mtd: nand: sharpsl.h: support partition parser types
mfd: nand: tmio.h: support partition parser types
mtd: nand: sharpsl.c: take in account partition parser types
mtd: nand: tmio_nand.c: take in account partition parser types
arm: pxa: corgi.c: remove hardcoded partitioning, use sharpslpart
parser
arm: pxa: tosa.c: remove hardcoded partitioning, use sharpslpart
parser
arm: pxa: spitz.c: remove hardcoded partitioning, use sharpslpart
parser
arm: pxa: poodle.c: remove hardcoded partitioning, use sharpslpart
parser
arch/arm/mach-pxa/corgi.c | 31 ++-----
arch/arm/mach-pxa/poodle.c | 28 ++----
arch/arm/mach-pxa/spitz.c | 34 ++-----
arch/arm/mach-pxa/tosa.c | 28 ++----
drivers/mtd/Kconfig | 8 ++
drivers/mtd/Makefile | 2 +
drivers/mtd/nand/sharpsl.c | 9 +-
drivers/mtd/nand/tmio_nand.c | 4 +-
drivers/mtd/sharpsl_ftl.c | 216 +++++++++++++++++++++++++++++++++++++++++++
drivers/mtd/sharpsl_ftl.h | 34 +++++++
drivers/mtd/sharpslpart.c | 132 ++++++++++++++++++++++++++
include/linux/mfd/tmio.h | 1 +
include/linux/mtd/sharpsl.h | 1 +
13 files changed, 437 insertions(+), 91 deletions(-)
create mode 100644 drivers/mtd/sharpsl_ftl.c
create mode 100644 drivers/mtd/sharpsl_ftl.h
create mode 100644 drivers/mtd/sharpslpart.c
--
2.7.4
[toc] | [next] | [standalone]
| From | Andrea Adami <andrea.adami@gmail.com> |
|---|---|
| Date | 2017-06-01 00:50 +0200 |
| Subject | [PATCH v3 8/9] arm: pxa: spitz.c: remove hardcoded partitioning, use sharpslpart parser |
| Message-ID | <tNkBc-2ET-39@gated-at.bofh.it> |
| In reply to | #1654705 |
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
arch/arm/mach-pxa/spitz.c | 34 +++++++++-------------------------
1 file changed, 9 insertions(+), 25 deletions(-)
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 67d66c7..21a2e42 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -739,21 +739,6 @@ static inline void spitz_lcd_init(void) {}
* NAND Flash
******************************************************************************/
#if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE)
-static struct mtd_partition spitz_nand_partitions[] = {
- {
- .name = "System Area",
- .offset = 0,
- .size = 7 * 1024 * 1024,
- }, {
- .name = "Root Filesystem",
- .offset = 7 * 1024 * 1024,
- }, {
- .name = "Home Filesystem",
- .offset = MTDPART_OFS_APPEND,
- .size = MTDPART_SIZ_FULL,
- },
-};
-
static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
static struct nand_bbt_descr spitz_nand_bbt = {
@@ -808,10 +793,16 @@ static const struct mtd_ooblayout_ops akita_ooblayout_ops = {
.free = akita_ooblayout_free,
};
+static const char * const probes[] = {
+ "cmdlinepart",
+ "ofpart",
+ "sharpslpart",
+ NULL,
+};
+
static struct sharpsl_nand_platform_data spitz_nand_pdata = {
.badblock_pattern = &spitz_nand_bbt,
- .partitions = spitz_nand_partitions,
- .nr_partitions = ARRAY_SIZE(spitz_nand_partitions),
+ .types = probes,
};
static struct resource spitz_nand_resources[] = {
@@ -834,14 +825,7 @@ static struct platform_device spitz_nand_device = {
static void __init spitz_nand_init(void)
{
- if (machine_is_spitz()) {
- spitz_nand_partitions[1].size = 5 * 1024 * 1024;
- } else if (machine_is_akita()) {
- spitz_nand_partitions[1].size = 58 * 1024 * 1024;
- spitz_nand_bbt.len = 1;
- spitz_nand_pdata.ecc_layout = &akita_ooblayout_ops;
- } else if (machine_is_borzoi()) {
- spitz_nand_partitions[1].size = 32 * 1024 * 1024;
+ if (machine_is_akita() || machine_is_borzoi()) {
spitz_nand_bbt.len = 1;
spitz_nand_pdata.ecc_layout = &akita_ooblayout_ops;
}
--
2.7.4
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web