linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash
@ 2010-09-07 12:49 Catalin Marinas
  2010-09-07 12:49 ` [RFC PATCH 1/3] RealView: Convert the platform code to use the physmap flash driver Catalin Marinas
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Catalin Marinas @ 2010-09-07 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

I've had this patches in my tree for some time but forgot about them. Is
there a reason why we need to use the integrator flash and not convert
to the physmap-flash? It gives us the same functionality. If converting
the Integrator boards, we can even remove the integrator flash support.

Thanks.


Catalin Marinas (3):
      RealView: Convert the platform code to use the physmap flash driver
      Versatile: Convert the platform code to use the physmap flash driver
      VExpress: Convert the platform code to use the physmap flash driver


 arch/arm/mach-realview/core.c  |   31 ++++---------------------------
 arch/arm/mach-versatile/core.c |   31 ++++---------------------------
 arch/arm/mach-vexpress/v2m.c   |   22 ++++------------------
 3 files changed, 12 insertions(+), 72 deletions(-)

-- 
Catalin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC PATCH 1/3] RealView: Convert the platform code to use the physmap flash driver
  2010-09-07 12:49 [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Catalin Marinas
@ 2010-09-07 12:49 ` Catalin Marinas
  2010-09-07 12:49 ` [RFC PATCH 2/3] Versatile: " Catalin Marinas
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2010-09-07 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

This platform was still using the integrator-flash driver but this
pretty much duplicates the physmap one.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm/mach-realview/core.c |   31 ++++---------------------------
 1 files changed, 4 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 2fa38df..efeb2b3 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -30,6 +30,7 @@
 #include <linux/ata_platform.h>
 #include <linux/amba/mmci.h>
 #include <linux/gfp.h>
+#include <linux/mtd/physmap.h>
 
 #include <asm/clkdev.h>
 #include <asm/system.h>
@@ -41,7 +42,6 @@
 #include <asm/hardware/icst.h>
 
 #include <asm/mach/arch.h>
-#include <asm/mach/flash.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/map.h>
 
@@ -78,27 +78,7 @@ void __init realview_adjust_zones(unsigned long *size, unsigned long *hole)
 
 #define REALVIEW_FLASHCTRL    (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET)
 
-static int realview_flash_init(void)
-{
-	u32 val;
-
-	val = __raw_readl(REALVIEW_FLASHCTRL);
-	val &= ~REALVIEW_FLASHPROG_FLVPPEN;
-	__raw_writel(val, REALVIEW_FLASHCTRL);
-
-	return 0;
-}
-
-static void realview_flash_exit(void)
-{
-	u32 val;
-
-	val = __raw_readl(REALVIEW_FLASHCTRL);
-	val &= ~REALVIEW_FLASHPROG_FLVPPEN;
-	__raw_writel(val, REALVIEW_FLASHCTRL);
-}
-
-static void realview_flash_set_vpp(int on)
+static void realview_flash_set_vpp(struct map_info *map, int on)
 {
 	u32 val;
 
@@ -110,16 +90,13 @@ static void realview_flash_set_vpp(int on)
 	__raw_writel(val, REALVIEW_FLASHCTRL);
 }
 
-static struct flash_platform_data realview_flash_data = {
-	.map_name		= "cfi_probe",
+static struct physmap_flash_data realview_flash_data = {
 	.width			= 4,
-	.init			= realview_flash_init,
-	.exit			= realview_flash_exit,
 	.set_vpp		= realview_flash_set_vpp,
 };
 
 struct platform_device realview_flash_device = {
-	.name			= "armflash",
+	.name			= "physmap-flash",
 	.id			= 0,
 	.dev			= {
 		.platform_data	= &realview_flash_data,

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC PATCH 2/3] Versatile: Convert the platform code to use the physmap flash driver
  2010-09-07 12:49 [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Catalin Marinas
  2010-09-07 12:49 ` [RFC PATCH 1/3] RealView: Convert the platform code to use the physmap flash driver Catalin Marinas
@ 2010-09-07 12:49 ` Catalin Marinas
  2010-09-07 12:49 ` [RFC PATCH 3/3] VExpress: " Catalin Marinas
  2010-09-08  8:28 ` [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Colin Tuckley
  3 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2010-09-07 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

This platform was still using the integrator-flash driver but this
pretty much duplicates the physmap one.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm/mach-versatile/core.c |   31 ++++---------------------------
 1 files changed, 4 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index e38acb0..9cb37a9 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -31,6 +31,7 @@
 #include <linux/amba/pl022.h>
 #include <linux/io.h>
 #include <linux/gfp.h>
+#include <linux/mtd/physmap.h>
 
 #include <asm/clkdev.h>
 #include <asm/system.h>
@@ -42,7 +43,6 @@
 #include <asm/mach-types.h>
 
 #include <asm/mach/arch.h>
-#include <asm/mach/flash.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 #include <asm/mach/map.h>
@@ -231,27 +231,7 @@ void __init versatile_map_io(void)
 
 #define VERSATILE_FLASHCTRL    (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET)
 
-static int versatile_flash_init(void)
-{
-	u32 val;
-
-	val = __raw_readl(VERSATILE_FLASHCTRL);
-	val &= ~VERSATILE_FLASHPROG_FLVPPEN;
-	__raw_writel(val, VERSATILE_FLASHCTRL);
-
-	return 0;
-}
-
-static void versatile_flash_exit(void)
-{
-	u32 val;
-
-	val = __raw_readl(VERSATILE_FLASHCTRL);
-	val &= ~VERSATILE_FLASHPROG_FLVPPEN;
-	__raw_writel(val, VERSATILE_FLASHCTRL);
-}
-
-static void versatile_flash_set_vpp(int on)
+static void versatile_flash_set_vpp(struct map_info *map, int on)
 {
 	u32 val;
 
@@ -263,11 +243,8 @@ static void versatile_flash_set_vpp(int on)
 	__raw_writel(val, VERSATILE_FLASHCTRL);
 }
 
-static struct flash_platform_data versatile_flash_data = {
-	.map_name		= "cfi_probe",
+static struct physmap_flash_data versatile_flash_data = {
 	.width			= 4,
-	.init			= versatile_flash_init,
-	.exit			= versatile_flash_exit,
 	.set_vpp		= versatile_flash_set_vpp,
 };
 
@@ -278,7 +255,7 @@ static struct resource versatile_flash_resource = {
 };
 
 static struct platform_device versatile_flash_device = {
-	.name			= "armflash",
+	.name			= "physmap-flash",
 	.id			= 0,
 	.dev			= {
 		.platform_data	= &versatile_flash_data,

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC PATCH 3/3] VExpress: Convert the platform code to use the physmap flash driver
  2010-09-07 12:49 [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Catalin Marinas
  2010-09-07 12:49 ` [RFC PATCH 1/3] RealView: Convert the platform code to use the physmap flash driver Catalin Marinas
  2010-09-07 12:49 ` [RFC PATCH 2/3] Versatile: " Catalin Marinas
@ 2010-09-07 12:49 ` Catalin Marinas
  2010-09-08  8:28 ` [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Colin Tuckley
  3 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2010-09-07 12:49 UTC (permalink / raw)
  To: linux-arm-kernel

This platform was still using the integrator-flash driver but this
pretty much duplicates the physmap one.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
---
 arch/arm/mach-vexpress/v2m.c |   22 ++++------------------
 1 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 817f0ad..5768e26 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -11,10 +11,10 @@
 #include <linux/spinlock.h>
 #include <linux/sysdev.h>
 #include <linux/usb/isp1760.h>
+#include <linux/mtd/physmap.h>
 
 #include <asm/clkdev.h>
 #include <asm/sizes.h>
-#include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
 #include <asm/hardware/arm_timer.h>
@@ -194,27 +194,13 @@ static struct platform_device v2m_usb_device = {
 	.dev.platform_data = &v2m_usb_config,
 };
 
-static int v2m_flash_init(void)
-{
-	writel(0, MMIO_P2V(V2M_SYS_FLASH));
-	return 0;
-}
-
-static void v2m_flash_exit(void)
-{
-	writel(0, MMIO_P2V(V2M_SYS_FLASH));
-}
-
-static void v2m_flash_set_vpp(int on)
+static void v2m_flash_set_vpp(struct map_info *map, int on)
 {
 	writel(on != 0, MMIO_P2V(V2M_SYS_FLASH));
 }
 
-static struct flash_platform_data v2m_flash_data = {
-	.map_name	= "cfi_probe",
+static struct physmap_flash_data v2m_flash_data = {
 	.width		= 4,
-	.init		= v2m_flash_init,
-	.exit		= v2m_flash_exit,
 	.set_vpp	= v2m_flash_set_vpp,
 };
 
@@ -231,7 +217,7 @@ static struct resource v2m_flash_resources[] = {
 };
 
 static struct platform_device v2m_flash_device = {
-	.name		= "armflash",
+	.name		= "physmap-flash",
 	.id		= -1,
 	.resource	= v2m_flash_resources,
 	.num_resources	= ARRAY_SIZE(v2m_flash_resources),

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash
  2010-09-07 12:49 [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Catalin Marinas
                   ` (2 preceding siblings ...)
  2010-09-07 12:49 ` [RFC PATCH 3/3] VExpress: " Catalin Marinas
@ 2010-09-08  8:28 ` Colin Tuckley
  2010-09-08 14:58   ` [RFC PATCH 0/3] Convert RealView/Versatile platforms tophysmap-flash Catalin Marinas
  3 siblings, 1 reply; 6+ messages in thread
From: Colin Tuckley @ 2010-09-08  8:28 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----
> From: Catalin Marinas
> Sent: 07 September 2010 13:49

> I've had this patches in my tree for some time but forgot about them.
> Is
> there a reason why we need to use the integrator flash and not convert
> to the physmap-flash? It gives us the same functionality. If converting
> the Integrator boards, we can even remove the integrator flash support.

Does this still support the concatenation of the two flash devices into one
large device?

Colin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC PATCH 0/3] Convert RealView/Versatile platforms tophysmap-flash
  2010-09-08  8:28 ` [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Colin Tuckley
@ 2010-09-08 14:58   ` Catalin Marinas
  0 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2010-09-08 14:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2010-09-08 at 09:28 +0100, Colin Tuckley wrote:
> > -----Original Message-----
> > From: Catalin Marinas
> > Sent: 07 September 2010 13:49
> 
> > I've had this patches in my tree for some time but forgot about them.
> > Is
> > there a reason why we need to use the integrator flash and not convert
> > to the physmap-flash? It gives us the same functionality. If converting
> > the Integrator boards, we can even remove the integrator flash support.
> 
> Does this still support the concatenation of the two flash devices into one
> large device?

Yes.

-- 
Catalin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-08 14:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-07 12:49 [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Catalin Marinas
2010-09-07 12:49 ` [RFC PATCH 1/3] RealView: Convert the platform code to use the physmap flash driver Catalin Marinas
2010-09-07 12:49 ` [RFC PATCH 2/3] Versatile: " Catalin Marinas
2010-09-07 12:49 ` [RFC PATCH 3/3] VExpress: " Catalin Marinas
2010-09-08  8:28 ` [RFC PATCH 0/3] Convert RealView/Versatile platforms to physmap-flash Colin Tuckley
2010-09-08 14:58   ` [RFC PATCH 0/3] Convert RealView/Versatile platforms tophysmap-flash Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).