Skip to contentSkip to conversation

clps711x/ceiva: port to use physmap flash

PATCH New Dmitry Eremin-Solenikov 3 participants 13 messages Jun 2, 2011 – Jun 4, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

Port ceiva machine to use physmap flash instead of custom mapping driver (which even can't compile cleanly with current kernels). All info is gathered from drivers/mtd/maps/ceiva.c. Compile tested only.

---
 arch/arm/mach-clps711x/ceiva.c |   60 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)
arch/arm/mach-clps711x/ceiva.c +60 -0
index 16481cf..00e3c45 100644
@@ -26,6 +26,9 @@
 #include <asm/mach/arch.h>
 
 #include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
 
 #include <mach/hardware.h>
 #include <asm/page.h>
@@ -46,6 +49,56 @@ static struct map_desc ceiva_io_desc[] __initdata = {
 	}
 };
 
+/* Flash / Partition sizing */
+/* For the 28F8003, we use the block mapping to calcuate the sizes */
+#define MAX_SIZE_KiB                  (16 + 8 + 8 + 96 + (7*128))
+#define BOOT_PARTITION_SIZE_KiB       (16)
+#define PARAMS_PARTITION_SIZE_KiB     (8)
+#define KERNEL_PARTITION_SIZE_KiB     (4*128)
+/* Use both remaining portion of first flash, and all of second flash */
+#define ROOT_PARTITION_SIZE_KiB       ((3*128) + (8*128))
+
+static struct mtd_partition ceiva_partitions[] = {
+	{
+		.name = "Ceiva BOOT partition",
+		.size   = BOOT_PARTITION_SIZE_KiB*1024,
+		.offset = 0,
+
+	}, {
+		.name = "Ceiva parameters partition",
+		.size   = PARAMS_PARTITION_SIZE_KiB*1024,
+		.offset = (16 + 8) * 1024,
+	}, {
+		.name = "Ceiva kernel partition",
+		.size = (KERNEL_PARTITION_SIZE_KiB)*1024,
+		.offset = 0x20000,
+
+	}, {
+		.name = "Ceiva root filesystem partition",
+		.offset = MTDPART_OFS_APPEND,
+		.size = (ROOT_PARTITION_SIZE_KiB)*1024,
+	}
+};
+
+static struct physmap_flash_data __initdata ceiva_flash_data = {
+	.width		= CEIVA_FLASH_WIDTH,
+	.parts		= ceiva_partitions,
+	.nr_parts	= ARRAY_SIZE(ceiva_partitions),
+	.probe_type	= "jedec_probe",
+};
+
+static struct resource __initdata ceiva_flash_resouces[] = {
+	{
+		.start	= CS0_PHYS_BASE,
+		.end	= CS0_PHYS_BASE + SZ_32M,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= CS1_PHYS_BASE,
+		.end	= CS1_PHYS_BASE + SZ_32M,
+		.flags	= IORESOURCE_MEM,
+	}
+};
 
 static void __init ceiva_map_io(void)
 {
@@ -53,11 +106,18 @@ static void __init ceiva_map_io(void)
         iotable_init(ceiva_io_desc, ARRAY_SIZE(ceiva_io_desc));
 }
 
+static void __init ceiva_init(void)
+{
+	platform_device_register_resndata(NULL, "physmap-flash", -1,
+			ceiva_flash_resouces, ARRAY_SIZE(ceiva_flash_resouces),
+			&ceiva_flash_data, sizeof(ceiva_flash_data));
+}
 
 MACHINE_START(CEIVA, "CEIVA/Polaroid Photo MAX Digital Picture Frame")
 	/* Maintainer: Rob Scott */
 	.boot_params	= 0xc0000100,
 	.map_io		= ceiva_map_io,
 	.init_irq	= clps711x_init_irq,
+	.init_machine	= ceiva_init,
 	.timer		= &clps711x_timer,
 MACHINE_END
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH 2/2 mtd: drop ceiva map driver

The same functionality is provided by physmap flash driver, drivers/mtd/maps/ceiva.c didn't receive any functional changes since the start of current git history, so drop it.

---
 drivers/mtd/maps/Kconfig  |    8 -
 drivers/mtd/maps/Makefile |    1 -
 drivers/mtd/maps/ceiva.c  |  341 ---------------------------------------------
 3 files changed, 0 insertions(+), 350 deletions(-)
 delete mode 100644 drivers/mtd/maps/ceiva.c
drivers/mtd/maps/Kconfig +0 -8
index 1831063..46eca3b 100644
@@ -406,14 +406,6 @@ config MTD_IMPA7
 	  This enables access to the NOR Flash on the impA7 board of
 	  implementa GmbH. If you have such a board, say 'Y' here.
 
-config MTD_CEIVA
-	tristate "JEDEC Flash device mapped on Ceiva/Polaroid PhotoMax Digital Picture Frame"
-	depends on MTD_JEDECPROBE && ARCH_CEIVA
-	help
-	  This enables access to the flash chips on the Ceiva/Polaroid
-	  PhotoMax Digital Picture Frame.
-	  If you have such a device, say 'Y'.
-
 config MTD_H720X
 	tristate "Hynix evaluation board mappings"
 	depends on MTD_CFI && ( ARCH_H7201 || ARCH_H7202 )
drivers/mtd/maps/Makefile +0 -1
index cb48b11..d6379fe 100644
@@ -19,7 +19,6 @@ obj-$(CONFIG_MTD_CK804XROM)	+= ck804xrom.o
 obj-$(CONFIG_MTD_TSUNAMI)	+= tsunami_flash.o
 obj-$(CONFIG_MTD_PXA2XX)	+= pxa2xx-flash.o
 obj-$(CONFIG_MTD_MBX860)	+= mbx860.o
-obj-$(CONFIG_MTD_CEIVA)		+= ceiva.o
 obj-$(CONFIG_MTD_OCTAGON)	+= octagon-5066.o
 obj-$(CONFIG_MTD_PHYSMAP)	+= physmap.o
 obj-$(CONFIG_MTD_PHYSMAP_OF)	+= physmap_of.o
drivers/mtd/maps/ceiva.c deleted +0 -341

341 lines not on this page · raw message

Signature · 1 line
1.7.4.4
#2 lore raw

PATCH 2/2 mtd: drop ceiva map driver

Quoted 5 lines · Dmitry Eremin-Solenikov

The same functionality is provided by physmap flash driver, drivers/mtd/maps/ceiva.c didn't receive any functional changes since the start of current git history, so drop it.

How about this: I take this patch to l2-mtd-2.6, but not taking the first patch. If someone complains that he needs ceiva, we'll add you first patch. Otherwise, you should kill all the other ceiva bits. Is this OK?

Signature · 2 lines
Best Regards,
Artem Bityutskiy (????? ????????)
#3 lore raw

PATCH 2/2 mtd: drop ceiva map driver

Hello,

Quoted 11 lines · Artem Bityutskiy
Quoted 5 lines · Dmitry Eremin-Solenikov

The same functionality is provided by physmap flash driver, drivers/mtd/maps/ceiva.c didn't receive any functional changes since the start of current git history, so drop it.

How about this: I take this patch to l2-mtd-2.6, but not taking the first patch. If someone complains that he needs ceiva, we'll add you first patch. Otherwise, you should kill all the other ceiva bits. Is this OK?

Yes, this is perfectly fine with me. Anyway, I'm still waiting for a response from Russell/linux-arm-kernel regarding ceiva & whole clps sub-arch.

Signature · 2 lines
With best wishes
Dmitry
#4 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

In reply to Dmitry Eremin-Solenikov
Quoted 8 lines · Dmitry Eremin-Solenikov

Port ceiva machine to use physmap flash instead of custom mapping driver (which even can't compile cleanly with current kernels). All info is gathered from drivers/mtd/maps/ceiva.c. Compile tested only.

---
 arch/arm/mach-clps711x/ceiva.c |   60 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)

Is ceiva used and not dead? May be we could kill it completely?

Signature · 2 lines
Best Regards,
Artem Bityutskiy (????? ????????)
#5 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

Quoted 5 lines · Artem Bityutskiy
Quoted 4 lines · Dmitry Eremin-Solenikov

Port ceiva machine to use physmap flash instead of custom mapping driver (which even can't compile cleanly with current kernels). All info is gathered from drivers/mtd/maps/ceiva.c. Compile tested only.

Quoted 7 lines
Quoted 5 lines
---
 arch/arm/mach-clps711x/ceiva.c |   60
++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)

Is ceiva used and not dead? May be we could kill it completely?

No functional changes to board file since start of git history. Also I don't know how useful can be contemporary Linux on 4 MiB of RAM

Signature · 2 lines
With best wishes
Dmitry
#6 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

Quoted 12 lines · Dmitry Eremin-Solenikov
Quoted 11 lines · Artem Bityutskiy
Quoted 9 lines · Dmitry Eremin-Solenikov

Port ceiva machine to use physmap flash instead of custom mapping driver (which even can't compile cleanly with current kernels). All info is gathered from drivers/mtd/maps/ceiva.c. Compile tested only.

---
 arch/arm/mach-clps711x/ceiva.c |   60
++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)
Quoted 4 lines
Quoted 1 line

Is ceiva used and not dead? May be we could kill it completely?

No functional changes to board file since start of git history. Also I don't know how useful can be contemporary Linux on 4 MiB of RAM

I also noticed that no one is interested in this board for long time. So I suggest to remove ceiva support altogether via some arm tree.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (????? ????????)
#7 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

Quoted 14 lines · Artem Bityutskiy
Quoted 13 lines · Dmitry Eremin-Solenikov
Quoted 12 lines · Artem Bityutskiy
Quoted 10 lines · Dmitry Eremin-Solenikov

Port ceiva machine to use physmap flash instead of custom mapping driver
(which even can't compile cleanly with current kernels). All info is gathered from drivers/mtd/maps/ceiva.c. Compile tested only.

---
 arch/arm/mach-clps711x/ceiva.c |   60
++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Is ceiva used and not dead? May be we could kill it completely?

No functional changes to board file since start of git history. Also I don't know how useful can be contemporary Linux on 4 MiB of RAM

I also noticed that no one is interested in this board for long time. So I suggest to remove ceiva support altogether via some arm tree.

Anyway the patch removing mtd support can be pushed via mtd tree (there is really no point on mtd/maps/ceiva.c), and removing ceiva depends on Russell's decision.

Signature · 2 lines
With best wishes
Dmitry
#8 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

Quoted 20 lines · Dmitry Eremin-Solenikov
Quoted 19 lines · Artem Bityutskiy
Quoted 17 lines · Dmitry Eremin-Solenikov
Quoted 6 lines · Artem Bityutskiy
Quoted 5 lines · Dmitry Eremin-Solenikov

Port ceiva machine to use physmap flash instead of custom mapping driver
(which even can't compile cleanly with current kernels). All info is gathered from drivers/mtd/maps/ceiva.c. Compile tested only.

Quoted 7 lines
Quoted 5 lines
---
 arch/arm/mach-clps711x/ceiva.c |   60
++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)

Is ceiva used and not dead? May be we could kill it completely?

No functional changes to board file since start of git history. Also I don't know how useful can be contemporary Linux on 4 MiB of RAM

Quoted 6 lines
Quoted 2 lines

I also noticed that no one is interested in this board for long time. So I suggest to remove ceiva support altogether via some arm tree.

Anyway the patch removing mtd support can be pushed via mtd tree (there is really no point on mtd/maps/ceiva.c), and removing ceiva depends on Russell's decision.

There is as well little point in changing ceiva code if we can just kill it instead. So let's first try to ask Russell if he is fine with killing ceiva or not. Could you please do this in a separate thread with an appropriate subject.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (????? ????????)
#9 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

In reply to Dmitry Eremin-Solenikov
Quoted 20 lines · Dmitry Eremin-Solenikov
Quoted 19 lines · Artem Bityutskiy
Quoted 17 lines · Dmitry Eremin-Solenikov
Quoted 6 lines · Artem Bityutskiy
Quoted 5 lines · Dmitry Eremin-Solenikov

Port ceiva machine to use physmap flash instead of custom mapping driver
(which even can't compile cleanly with current kernels). All info is gathered from drivers/mtd/maps/ceiva.c. Compile tested only.

Quoted 7 lines
Quoted 5 lines
---
 arch/arm/mach-clps711x/ceiva.c |   60
++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)

Is ceiva used and not dead? May be we could kill it completely?

No functional changes to board file since start of git history. Also I don't know how useful can be contemporary Linux on 4 MiB of RAM

Quoted 6 lines
Quoted 2 lines

I also noticed that no one is interested in this board for long time. So I suggest to remove ceiva support altogether via some arm tree.

Anyway the patch removing mtd support can be pushed via mtd tree (there is really no point on mtd/maps/ceiva.c), and removing ceiva depends on Russell's decision.

If you care about conflicts and how to merge all that - you can remove ceiva via the arm tree, and at the same time modify the driver in the mtd tree, and we'll just put a not to the commit message that during the merge this change has to be discarded. Linus did a similar thing this merge window for one board which mtd modified and arm tree removed.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (????? ????????)
#10 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

Quoted 28 lines · Artem Bityutskiy
Quoted 20 lines · Dmitry Eremin-Solenikov
Quoted 19 lines · Artem Bityutskiy
Quoted 17 lines · Dmitry Eremin-Solenikov
Quoted 6 lines · Artem Bityutskiy
Quoted 5 lines · Dmitry Eremin-Solenikov

Port ceiva machine to use physmap flash instead of custom mapping driver
(which even can't compile cleanly with current kernels). All info is gathered from drivers/mtd/maps/ceiva.c. Compile tested only.

Quoted 7 lines
Quoted 5 lines
---
 arch/arm/mach-clps711x/ceiva.c |   60
++++++++++++++++++++++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)

Is ceiva used and not dead? May be we could kill it completely?

No functional changes to board file since start of git history. Also I don't know how useful can be contemporary Linux on 4 MiB of RAM

Quoted 6 lines
Quoted 2 lines

I also noticed that no one is interested in this board for long time. So I suggest to remove ceiva support altogether via some arm tree.

Anyway the patch removing mtd support can be pushed via mtd tree (there is really no point on mtd/maps/ceiva.c), and removing ceiva depends on Russell's decision.

Quoted 5 lines

If you care about conflicts and how to merge all that - you can remove ceiva via the arm tree, and at the same time modify the driver in the mtd tree, and we'll just put a not to the commit message that during the merge this change has to be discarded. Linus did a similar thing this merge window for one board which mtd modified and arm tree removed.

In fact second patch from this serie (drop of drivers/mtd/maps/ceiva.c) should be commited through the mtd tree and will bring no conflicts in either case. And either the first patch (port of ceiva to physmap) or complete dropout of ceiva should come through the ARM tree, again bringing no conflicts. So with these patches we are safe :)

Signature · 2 lines
With best wishes
Dmitry
#11 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

In reply to Dmitry Eremin-Solenikov
Quoted 3 lines · Dmitry Eremin-Solenikov

Anyway the patch removing mtd support can be pushed via mtd tree (there is really no point on mtd/maps/ceiva.c), and removing ceiva depends on Russell's decision.

If it's not getting any attention and no one's interested in it then it can be removed.

#12 lore raw

PATCH 1/2 clps711x/ceiva: port to use physmap flash

Quoted 7 lines · Russell King - ARM Linux
Quoted 3 lines · Dmitry Eremin-Solenikov

Anyway the patch removing mtd support can be pushed via mtd tree (there is really no point on mtd/maps/ceiva.c), and removing ceiva depends on Russell's decision.

If it's not getting any attention and no one's interested in it then it can be removed.

I've sent a separate e-mail to ARM ML to see if anybody is interested.

Signature · 2 lines
With best wishes
Dmitry