From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from service87.mimecast.com ([94.185.240.25]) by canuck.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1QLzGc-00072q-60 for linux-mtd@lists.infradead.org; Mon, 16 May 2011 14:59:31 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org Subject: [PATCH v5 4/8] ARM: VExpress: Use physmap driver instead of integrator-flash Date: Mon, 16 May 2011 15:59:33 +0100 Message-Id: <1305557977-16871-5-git-send-email-marc.zyngier@arm.com> In-Reply-To: <1305557977-16871-1-git-send-email-marc.zyngier@arm.com> References: <1305557977-16871-1-git-send-email-marc.zyngier@arm.com> Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Cc: David Woodhouse List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Signed-off-by: Marc Zyngier Acked-by: Catalin Marinas Cc: David Woodhouse --- 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 ba46e8e..e326815 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c @@ -13,11 +13,11 @@ #include #include #include +#include =20 #include #include #include -#include #include #include #include @@ -206,27 +206,13 @@ static struct platform_device v2m_usb_device =3D { =09.dev.platform_data =3D &v2m_usb_config, }; =20 -static int v2m_flash_init(void) -{ -=09writel(0, MMIO_P2V(V2M_SYS_FLASH)); -=09return 0; -} - -static void v2m_flash_exit(void) -{ -=09writel(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) { =09writel(on !=3D 0, MMIO_P2V(V2M_SYS_FLASH)); } =20 -static struct flash_platform_data v2m_flash_data =3D { -=09.map_name=09=3D "cfi_probe", +static struct physmap_flash_data v2m_flash_data =3D { =09.width=09=09=3D 4, -=09.init=09=09=3D v2m_flash_init, -=09.exit=09=09=3D v2m_flash_exit, =09.set_vpp=09=3D v2m_flash_set_vpp, }; =20 @@ -243,7 +229,7 @@ static struct resource v2m_flash_resources[] =3D { }; =20 static struct platform_device v2m_flash_device =3D { -=09.name=09=09=3D "armflash", +=09.name=09=09=3D "physmap-flash", =09.id=09=09=3D -1, =09.resource=09=3D v2m_flash_resources, =09.num_resources=09=3D ARRAY_SIZE(v2m_flash_resources), --=20 1.7.0.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Mon, 16 May 2011 15:59:33 +0100 Subject: [PATCH v5 4/8] ARM: VExpress: Use physmap driver instead of integrator-flash In-Reply-To: <1305557977-16871-1-git-send-email-marc.zyngier@arm.com> References: <1305557977-16871-1-git-send-email-marc.zyngier@arm.com> Message-ID: <1305557977-16871-5-git-send-email-marc.zyngier@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Signed-off-by: Marc Zyngier Acked-by: Catalin Marinas Cc: David Woodhouse --- 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 ba46e8e..e326815 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c @@ -13,11 +13,11 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -206,27 +206,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, }; @@ -243,7 +229,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), -- 1.7.0.4