Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 6903/1: Realview: Use physmap driver instead of integrator-flash

Tested on a PB11-MPCore.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Marc Zyngier and committed by
Russell King
b8b87aef b7281ca2

+6 -29
+1 -1
arch/arm/configs/realview-smp_defconfig
··· 38 38 CONFIG_MTD_CFI=y 39 39 CONFIG_MTD_CFI_INTELEXT=y 40 40 CONFIG_MTD_CFI_AMDSTD=y 41 - CONFIG_MTD_ARM_INTEGRATOR=y 41 + CONFIG_MTD_PHYSMAP=y 42 42 CONFIG_ARM_CHARLCD=y 43 43 CONFIG_NETDEVICES=y 44 44 CONFIG_SMSC_PHY=y
+1 -1
arch/arm/configs/realview_defconfig
··· 37 37 CONFIG_MTD_CFI=y 38 38 CONFIG_MTD_CFI_INTELEXT=y 39 39 CONFIG_MTD_CFI_AMDSTD=y 40 - CONFIG_MTD_ARM_INTEGRATOR=y 40 + CONFIG_MTD_PHYSMAP=y 41 41 CONFIG_ARM_CHARLCD=y 42 42 CONFIG_NETDEVICES=y 43 43 CONFIG_SMSC_PHY=y
+4 -27
arch/arm/mach-realview/core.c
··· 31 31 #include <linux/amba/mmci.h> 32 32 #include <linux/gfp.h> 33 33 #include <linux/clkdev.h> 34 + #include <linux/mtd/physmap.h> 34 35 35 36 #include <asm/system.h> 36 37 #include <mach/hardware.h> ··· 42 41 #include <asm/hardware/icst.h> 43 42 44 43 #include <asm/mach/arch.h> 45 - #include <asm/mach/flash.h> 46 44 #include <asm/mach/irq.h> 47 45 #include <asm/mach/map.h> 48 46 ··· 77 77 78 78 #define REALVIEW_FLASHCTRL (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_FLASH_OFFSET) 79 79 80 - static int realview_flash_init(void) 81 - { 82 - u32 val; 83 - 84 - val = __raw_readl(REALVIEW_FLASHCTRL); 85 - val &= ~REALVIEW_FLASHPROG_FLVPPEN; 86 - __raw_writel(val, REALVIEW_FLASHCTRL); 87 - 88 - return 0; 89 - } 90 - 91 - static void realview_flash_exit(void) 92 - { 93 - u32 val; 94 - 95 - val = __raw_readl(REALVIEW_FLASHCTRL); 96 - val &= ~REALVIEW_FLASHPROG_FLVPPEN; 97 - __raw_writel(val, REALVIEW_FLASHCTRL); 98 - } 99 - 100 - static void realview_flash_set_vpp(int on) 80 + static void realview_flash_set_vpp(struct map_info *map, int on) 101 81 { 102 82 u32 val; 103 83 ··· 89 109 __raw_writel(val, REALVIEW_FLASHCTRL); 90 110 } 91 111 92 - static struct flash_platform_data realview_flash_data = { 93 - .map_name = "cfi_probe", 112 + static struct physmap_flash_data realview_flash_data = { 94 113 .width = 4, 95 - .init = realview_flash_init, 96 - .exit = realview_flash_exit, 97 114 .set_vpp = realview_flash_set_vpp, 98 115 }; 99 116 100 117 struct platform_device realview_flash_device = { 101 - .name = "armflash", 118 + .name = "physmap-flash", 102 119 .id = 0, 103 120 .dev = { 104 121 .platform_data = &realview_flash_data,