Convert RealView/Versatile platforms to physmap-flash
Subsystems (4)
cover Convert RealView/Versatile platforms to physmap-flash
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(-)
Signature · 1 line
Catalin
RFC PATCH 1/3 RealView: Convert the platform code to use the physmap flash driver
This platform was still using the integrator-flash driver but this pretty much duplicates the physmap one.
--- arch/arm/mach-realview/core.c | 31 ++++--------------------------- 1 files changed, 4 insertions(+), 27 deletions(-)
arch/arm/mach-realview/core.c +4 -27
@@ -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,
RFC PATCH 2/3 Versatile: Convert the platform code to use the physmap flash driver
In reply to Catalin MarinasThis platform was still using the integrator-flash driver but this pretty much duplicates the physmap one.
--- arch/arm/mach-versatile/core.c | 31 ++++--------------------------- 1 files changed, 4 insertions(+), 27 deletions(-)
arch/arm/mach-versatile/core.c +4 -27
@@ -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,
RFC PATCH 3/3 VExpress: Convert the platform code to use the physmap flash driver
In reply to Catalin MarinasThis platform was still using the integrator-flash driver but this pretty much duplicates the physmap one.
--- arch/arm/mach-vexpress/v2m.c | 22 ++++------------------ 1 files changed, 4 insertions(+), 18 deletions(-)
arch/arm/mach-vexpress/v2m.c +4 -18
@@ -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),
cover Convert RealView/Versatile platforms to physmap-flash
In reply to Catalin MarinasQuoted 9 lines
-----Original Message-----
From: Catalin Marinas
Sent: 07 September 2010 13:49I'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
cover Convert RealView/Versatile platforms tophysmap-flash
Quoted 4 lines · Colin Tuckley
Quoted 3 lines
-----Original Message-----
From: Catalin Marinas
Sent: 07 September 2010 13:49
Quoted 8 lines
Quoted 5 lines
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.
Signature · 1 line
Catalin