Skip to content

Commit

Permalink
Merge branch 'omap/cleanup' into next/cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnd Bergmann committed Sep 30, 2011
2 parents 9be6eb4 + be73246 commit 2cd0500
Show file tree
Hide file tree
Showing 37 changed files with 594 additions and 751 deletions.
5 changes: 5 additions & 0 deletions arch/arm/include/asm/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ struct dev_archdata {
#endif
};

struct omap_device;

struct pdev_archdata {
#ifdef CONFIG_ARCH_OMAP
struct omap_device *od;
#endif
};

#endif
45 changes: 45 additions & 0 deletions arch/arm/mach-omap1/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
static int dsp_use;
static struct clk *api_clk;
static struct clk *dsp_clk;
static struct platform_device **omap_mcbsp_devices;

static void omap1_mcbsp_request(unsigned int id)
{
Expand Down Expand Up @@ -78,6 +79,17 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = {
.free = omap1_mcbsp_free,
};

#define OMAP7XX_MCBSP1_BASE 0xfffb1000
#define OMAP7XX_MCBSP2_BASE 0xfffb1800

#define OMAP1510_MCBSP1_BASE 0xe1011800
#define OMAP1510_MCBSP2_BASE 0xfffb1000
#define OMAP1510_MCBSP3_BASE 0xe1017000

#define OMAP1610_MCBSP1_BASE 0xe1011800
#define OMAP1610_MCBSP2_BASE 0xfffb1000
#define OMAP1610_MCBSP3_BASE 0xe1017000

#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
struct resource omap7xx_mcbsp_res[][6] = {
{
Expand Down Expand Up @@ -369,6 +381,39 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
#define OMAP16XX_MCBSP_COUNT 0
#endif

static void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
struct omap_mcbsp_platform_data *config, int size)
{
int i;

omap_mcbsp_devices = kzalloc(size * sizeof(struct platform_device *),
GFP_KERNEL);
if (!omap_mcbsp_devices) {
printk(KERN_ERR "Could not register McBSP devices\n");
return;
}

for (i = 0; i < size; i++) {
struct platform_device *new_mcbsp;
int ret;

new_mcbsp = platform_device_alloc("omap-mcbsp", i + 1);
if (!new_mcbsp)
continue;
platform_device_add_resources(new_mcbsp, &res[i * res_count],
res_count);
config[i].reg_size = 2;
config[i].reg_step = 2;
new_mcbsp->dev.platform_data = &config[i];
ret = platform_device_add(new_mcbsp);
if (ret) {
platform_device_put(new_mcbsp);
continue;
}
omap_mcbsp_devices[i] = new_mcbsp;
}
}

static int __init omap1_mcbsp_init(void)
{
if (!cpu_class_is_omap1())
Expand Down
8 changes: 1 addition & 7 deletions arch/arm/mach-omap2/board-2430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,11 @@ static void __init omap_2430sdp_init(void)
"Secondary LCD backlight");
}

static void __init omap_2430sdp_map_io(void)
{
omap2_set_globals_243x();
omap243x_map_common_io();
}

MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
/* Maintainer: Syed Khasim - Texas Instruments Inc */
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = omap_2430sdp_map_io,
.map_io = omap243x_map_io,
.init_early = omap2430_init_early,
.init_irq = omap2_init_irq,
.init_machine = omap_2430sdp_init,
Expand Down
8 changes: 1 addition & 7 deletions arch/arm/mach-omap2/board-4430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,17 +825,11 @@ static void __init omap_4430sdp_init(void)
omap_4430sdp_display_init();
}

static void __init omap_4430sdp_map_io(void)
{
omap2_set_globals_443x();
omap44xx_map_common_io();
}

MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
/* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = omap_4430sdp_map_io,
.map_io = omap4_map_io,
.init_early = omap4430_init_early,
.init_irq = gic_init_irq,
.init_machine = omap_4430sdp_init,
Expand Down
8 changes: 1 addition & 7 deletions arch/arm/mach-omap2/board-apollon.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,17 +337,11 @@ static void __init omap_apollon_init(void)
omap_sdrc_init(NULL, NULL);
}

static void __init omap_apollon_map_io(void)
{
omap2_set_globals_242x();
omap242x_map_common_io();
}

MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
/* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = omap_apollon_map_io,
.map_io = omap242x_map_io,
.init_early = omap2420_init_early,
.init_irq = omap2_init_irq,
.init_machine = omap_apollon_init,
Expand Down
7 changes: 1 addition & 6 deletions arch/arm/mach-omap2/board-devkit8000.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,6 @@ static struct platform_device keys_gpio = {
},
};

static void __init devkit8000_init_irq(void)
{
omap3_init_irq();
}

#define OMAP_DM9000_BASE 0x2c000000

static struct resource omap_dm9000_resources[] = {
Expand Down Expand Up @@ -665,7 +660,7 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
.reserve = omap_reserve,
.map_io = omap3_map_io,
.init_early = omap35xx_init_early,
.init_irq = devkit8000_init_irq,
.init_irq = omap3_init_irq,
.init_machine = devkit8000_init,
.timer = &omap3_secure_timer,
MACHINE_END
5 changes: 0 additions & 5 deletions arch/arm/mach-omap2/board-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,6 @@ __init board_nand_init(struct mtd_partition *nand_parts,
board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs;
gpmc_nand_init(&board_nand_data);
}
#else
void
__init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs, int nand_type)
{
}
#endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */

/**
Expand Down
19 changes: 19 additions & 0 deletions arch/arm/mach-omap2/board-flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,26 @@ struct flash_partitions {
int nr_parts;
};

#if defined(CONFIG_MTD_NAND_OMAP2) || \
defined(CONFIG_MTD_NAND_OMAP2_MODULE) || \
defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
extern void board_flash_init(struct flash_partitions [],
char chip_sel[][GPMC_CS_NUM], int nand_type);
#else
static inline void board_flash_init(struct flash_partitions part[],
char chip_sel[][GPMC_CS_NUM], int nand_type)
{
}
#endif

#if defined(CONFIG_MTD_NAND_OMAP2) || \
defined(CONFIG_MTD_NAND_OMAP2_MODULE)
extern void board_nand_init(struct mtd_partition *nand_parts,
u8 nr_parts, u8 cs, int nand_type);
#else
static inline void board_nand_init(struct mtd_partition *nand_parts,
u8 nr_parts, u8 cs, int nand_type)
{
}
#endif
15 changes: 2 additions & 13 deletions arch/arm/mach-omap2/board-h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ static struct omap_board_config_kernel h4_config[] __initdata = {
{ OMAP_TAG_LCD, &h4_lcd_config },
};

static void __init omap_h4_init_irq(void)
{
omap2_init_irq();
}

static struct at24_platform_data m24c01 = {
.byte_len = SZ_1K / 8,
.page_size = 16,
Expand Down Expand Up @@ -369,19 +364,13 @@ static void __init omap_h4_init(void)
h4_init_flash();
}

static void __init omap_h4_map_io(void)
{
omap2_set_globals_242x();
omap242x_map_common_io();
}

MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
/* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = omap_h4_map_io,
.map_io = omap242x_map_io,
.init_early = omap2420_init_early,
.init_irq = omap_h4_init_irq,
.init_irq = omap2_init_irq,
.init_machine = omap_h4_init,
.timer = &omap2_timer,
MACHINE_END
12 changes: 3 additions & 9 deletions arch/arm/mach-omap2/board-n8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,12 +616,6 @@ static struct i2c_board_info n810_i2c_board_info_2[] __initdata = {
},
};

static void __init n8x0_map_io(void)
{
omap2_set_globals_242x();
omap242x_map_common_io();
}

#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
/* I2S codec port pins for McBSP block */
Expand Down Expand Up @@ -692,7 +686,7 @@ static void __init n8x0_init_machine(void)
MACHINE_START(NOKIA_N800, "Nokia N800")
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = n8x0_map_io,
.map_io = omap242x_map_io,
.init_early = omap2420_init_early,
.init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine,
Expand All @@ -702,7 +696,7 @@ MACHINE_END
MACHINE_START(NOKIA_N810, "Nokia N810")
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = n8x0_map_io,
.map_io = omap242x_map_io,
.init_early = omap2420_init_early,
.init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine,
Expand All @@ -712,7 +706,7 @@ MACHINE_END
MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = n8x0_map_io,
.map_io = omap242x_map_io,
.init_early = omap2420_init_early,
.init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine,
Expand Down
7 changes: 1 addition & 6 deletions arch/arm/mach-omap2/board-omap3beagle.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,6 @@ static void __init omap3_beagle_init_early(void)
omap2_init_common_infrastructure();
}

static void __init omap3_beagle_init_irq(void)
{
omap3_init_irq();
}

static struct platform_device *omap3_beagle_devices[] __initdata = {
&leds_gpio,
&keys_gpio,
Expand Down Expand Up @@ -561,7 +556,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
.reserve = omap_reserve,
.map_io = omap3_map_io,
.init_early = omap3_beagle_init_early,
.init_irq = omap3_beagle_init_irq,
.init_irq = omap3_init_irq,
.init_machine = omap3_beagle_init,
.timer = &omap3_secure_timer,
MACHINE_END
7 changes: 1 addition & 6 deletions arch/arm/mach-omap2/board-omap3stalker.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,6 @@ static int __init omap3_stalker_i2c_init(void)
static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
};

static void __init omap3_stalker_init_irq(void)
{
omap3_init_irq();
}

static struct platform_device *omap3_stalker_devices[] __initdata = {
&keys_gpio,
};
Expand Down Expand Up @@ -492,7 +487,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
.boot_params = 0x80000100,
.map_io = omap3_map_io,
.init_early = omap35xx_init_early,
.init_irq = omap3_stalker_init_irq,
.init_irq = omap3_init_irq,
.init_machine = omap3_stalker_init,
.timer = &omap3_secure_timer,
MACHINE_END
7 changes: 1 addition & 6 deletions arch/arm/mach-omap2/board-omap3touchbook.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,6 @@ static struct omap_board_mux board_mux[] __initdata = {
};
#endif

static void __init omap3_touchbook_init_irq(void)
{
omap3_init_irq();
}

static struct platform_device *omap3_touchbook_devices[] __initdata = {
&omap3_touchbook_lcd_device,
&leds_gpio,
Expand Down Expand Up @@ -403,7 +398,7 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
.reserve = omap_reserve,
.map_io = omap3_map_io,
.init_early = omap3430_init_early,
.init_irq = omap3_touchbook_init_irq,
.init_irq = omap3_init_irq,
.init_machine = omap3_touchbook_init,
.timer = &omap3_secure_timer,
MACHINE_END
8 changes: 1 addition & 7 deletions arch/arm/mach-omap2/board-omap4panda.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,17 +570,11 @@ static void __init omap4_panda_init(void)
omap4_panda_display_init();
}

static void __init omap4_panda_map_io(void)
{
omap2_set_globals_443x();
omap44xx_map_common_io();
}

MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
/* Maintainer: David Anders - Texas Instruments Inc */
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = omap4_panda_map_io,
.map_io = omap4_map_io,
.init_early = omap4430_init_early,
.init_irq = gic_init_irq,
.init_machine = omap4_panda_init,
Expand Down
8 changes: 1 addition & 7 deletions arch/arm/mach-omap2/board-rm680.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,10 @@ static void __init rm680_init(void)
rm680_peripherals_init();
}

static void __init rm680_map_io(void)
{
omap2_set_globals_3xxx();
omap34xx_map_common_io();
}

MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
.boot_params = 0x80000100,
.reserve = omap_reserve,
.map_io = rm680_map_io,
.map_io = omap3_map_io,
.init_early = omap3630_init_early,
.init_irq = omap3_init_irq,
.init_machine = rm680_init,
Expand Down
8 changes: 1 addition & 7 deletions arch/arm/mach-omap2/board-rx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ static void __init rx51_init(void)
platform_device_register(&leds_gpio);
}

static void __init rx51_map_io(void)
{
omap2_set_globals_3xxx();
omap34xx_map_common_io();
}

static void __init rx51_reserve(void)
{
rx51_video_mem_init();
Expand All @@ -155,7 +149,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
/* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
.boot_params = 0x80000100,
.reserve = rx51_reserve,
.map_io = rx51_map_io,
.map_io = omap3_map_io,
.init_early = omap3430_init_early,
.init_irq = omap3_init_irq,
.init_machine = rx51_init,
Expand Down
Loading

0 comments on commit 2cd0500

Please sign in to comment.