Skip to content

Commit

Permalink
omap: convert boards to use physmap-flash
Browse files Browse the repository at this point in the history
Convert OMAP based boards to use physmap-flash. Refreshed against today's
Linux omap kernel tree

Cc: linux-mtd@lists.infradead.org
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Ladislav Michl authored and Tony Lindgren committed Feb 15, 2010
1 parent fd17a25 commit 561b036
Show file tree
Hide file tree
Showing 16 changed files with 112 additions and 55 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

# Common support
obj-y := io.o id.o sram.o irq.o mux.o serial.o devices.o
obj-y := io.o id.o sram.o irq.o mux.o flash.o serial.o devices.o
obj-y += clock.o clock_data.o opp_data.o

obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-omap1/board-fsample.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/input.h>
#include <linux/smc91x.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#include <asm/mach/map.h>

#include <plat/tc.h>
#include <mach/gpio.h>
#include <plat/mux.h>
#include <plat/flash.h>
#include <plat/fpga.h>
#include <plat/keypad.h>
#include <plat/common.h>
Expand Down Expand Up @@ -150,9 +151,9 @@ static struct mtd_partition nor_partitions[] = {
},
};

static struct flash_platform_data nor_data = {
.map_name = "cfi_probe",
static struct physmap_flash_data nor_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = nor_partitions,
.nr_parts = ARRAY_SIZE(nor_partitions),
};
Expand All @@ -164,7 +165,7 @@ static struct resource nor_resource = {
};

static struct platform_device nor_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &nor_data,
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-omap1/board-h2.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/input.h>
#include <linux/i2c/tps65010.h>
#include <linux/smc91x.h>
Expand All @@ -35,7 +36,6 @@

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#include <asm/mach/map.h>

#include <plat/mux.h>
Expand All @@ -45,6 +45,7 @@
#include <plat/usb.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include <plat/flash.h>

#include "board-h2.h"

Expand Down Expand Up @@ -121,9 +122,9 @@ static struct mtd_partition h2_nor_partitions[] = {
}
};

static struct flash_platform_data h2_nor_data = {
.map_name = "cfi_probe",
static struct physmap_flash_data h2_nor_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = h2_nor_partitions,
.nr_parts = ARRAY_SIZE(h2_nor_partitions),
};
Expand All @@ -134,7 +135,7 @@ static struct resource h2_nor_resource = {
};

static struct platform_device h2_nor_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &h2_nor_data,
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-omap1/board-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/input.h>
#include <linux/spi/spi.h>
#include <linux/i2c/tps65010.h>
Expand All @@ -37,7 +38,6 @@

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#include <asm/mach/map.h>

#include <mach/irqs.h>
Expand All @@ -47,6 +47,7 @@
#include <plat/keypad.h>
#include <plat/dma.h>
#include <plat/common.h>
#include <plat/flash.h>

#include "board-h3.h"

Expand Down Expand Up @@ -126,9 +127,9 @@ static struct mtd_partition nor_partitions[] = {
}
};

static struct flash_platform_data nor_data = {
.map_name = "cfi_probe",
static struct physmap_flash_data nor_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = nor_partitions,
.nr_parts = ARRAY_SIZE(nor_partitions),
};
Expand All @@ -139,7 +140,7 @@ static struct resource nor_resource = {
};

static struct platform_device nor_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &nor_data,
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-omap1/board-innovator.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
#include <linux/delay.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/input.h>
#include <linux/smc91x.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#include <asm/mach/map.h>

#include <plat/mux.h>
#include <plat/flash.h>
#include <plat/fpga.h>
#include <mach/gpio.h>
#include <plat/tc.h>
Expand Down Expand Up @@ -94,9 +95,9 @@ static struct mtd_partition innovator_partitions[] = {
}
};

static struct flash_platform_data innovator_flash_data = {
.map_name = "cfi_probe",
static struct physmap_flash_data innovator_flash_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = innovator_partitions,
.nr_parts = ARRAY_SIZE(innovator_partitions),
};
Expand All @@ -108,7 +109,7 @@ static struct resource innovator_flash_resource = {
};

static struct platform_device innovator_flash_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &innovator_flash_data,
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-omap1/board-osk.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>

#include <linux/i2c/tps65010.h>

Expand All @@ -46,8 +47,8 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/flash.h>

#include <plat/flash.h>
#include <plat/usb.h>
#include <plat/mux.h>
#include <plat/tc.h>
Expand Down Expand Up @@ -94,9 +95,9 @@ static struct mtd_partition osk_partitions[] = {
}
};

static struct flash_platform_data osk_flash_data = {
.map_name = "cfi_probe",
static struct physmap_flash_data osk_flash_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = osk_partitions,
.nr_parts = ARRAY_SIZE(osk_partitions),
};
Expand All @@ -107,7 +108,7 @@ static struct resource osk_flash_resource = {
};

static struct platform_device osk5912_flash_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &osk_flash_data,
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-omap1/board-palmte.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/spi/spi.h>
#include <linux/interrupt.h>
#include <linux/apm-emulation.h>
Expand All @@ -31,9 +32,9 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/flash.h>

#include <mach/gpio.h>
#include <plat/flash.h>
#include <plat/mux.h>
#include <plat/usb.h>
#include <plat/tc.h>
Expand Down Expand Up @@ -126,9 +127,9 @@ static struct mtd_partition palmte_rom_partitions[] = {
},
};

static struct flash_platform_data palmte_rom_data = {
.map_name = "map_rom",
static struct physmap_flash_data palmte_rom_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = palmte_rom_partitions,
.nr_parts = ARRAY_SIZE(palmte_rom_partitions),
};
Expand All @@ -140,7 +141,7 @@ static struct resource palmte_rom_resource = {
};

static struct platform_device palmte_rom_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = -1,
.dev = {
.platform_data = &palmte_rom_data,
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-omap1/board-palmtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@
#include <linux/interrupt.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/leds.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/flash.h>

#include <plat/led.h>
#include <mach/gpio.h>
#include <plat/flash.h>
#include <plat/mux.h>
#include <plat/usb.h>
#include <plat/dma.h>
Expand Down Expand Up @@ -104,9 +105,9 @@ static struct mtd_partition palmtt_partitions[] = {
}
};

static struct flash_platform_data palmtt_flash_data = {
.map_name = "cfi_probe",
static struct physmap_flash_data palmtt_flash_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = palmtt_partitions,
.nr_parts = ARRAY_SIZE(palmtt_partitions),
};
Expand All @@ -118,7 +119,7 @@ static struct resource palmtt_flash_resource = {
};

static struct platform_device palmtt_flash_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &palmtt_flash_data,
Expand Down
10 changes: 5 additions & 5 deletions arch/arm/mach-omap1/board-palmz71.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
#include <linux/interrupt.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/flash.h>

#include <mach/gpio.h>
#include <plat/flash.h>
#include <plat/mux.h>
#include <plat/usb.h>
#include <plat/dma.h>
Expand Down Expand Up @@ -126,10 +127,9 @@ static struct mtd_partition palmz71_rom_partitions[] = {
},
};

static struct flash_platform_data palmz71_rom_data = {
.map_name = "map_rom",
.name = "onboardrom",
static struct physmap_flash_data palmz71_rom_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = palmz71_rom_partitions,
.nr_parts = ARRAY_SIZE(palmz71_rom_partitions),
};
Expand All @@ -141,7 +141,7 @@ static struct resource palmz71_rom_resource = {
};

static struct platform_device palmz71_rom_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = -1,
.dev = {
.platform_data = &palmz71_rom_data,
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/mach-omap1/board-perseus2.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/input.h>
#include <linux/smc91x.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#include <asm/mach/map.h>

#include <plat/tc.h>
#include <mach/gpio.h>
#include <plat/mux.h>
#include <plat/fpga.h>
#include <plat/flash.h>
#include <plat/keypad.h>
#include <plat/common.h>
#include <plat/board.h>
Expand Down Expand Up @@ -117,9 +118,9 @@ static struct mtd_partition nor_partitions[] = {
},
};

static struct flash_platform_data nor_data = {
.map_name = "cfi_probe",
static struct physmap_flash_data nor_data = {
.width = 2,
.set_vpp = omap1_set_vpp,
.parts = nor_partitions,
.nr_parts = ARRAY_SIZE(nor_partitions),
};
Expand All @@ -131,7 +132,7 @@ static struct resource nor_resource = {
};

static struct platform_device nor_device = {
.name = "omapflash",
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &nor_data,
Expand Down
Loading

0 comments on commit 561b036

Please sign in to comment.