diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom2.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-zoom2.c | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c new file mode 100644 index 000000000000..bcc0f7632dea --- /dev/null +++ b/arch/arm/mach-omap2/board-zoom2.c | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2009 Texas Instruments Inc. | ||
| 3 | * Mikkel Christensen <mlc@ti.com> | ||
| 4 | * | ||
| 5 | * Modified from mach-omap2/board-ldp.c | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/kernel.h> | ||
| 13 | #include <linux/init.h> | ||
| 14 | #include <linux/platform_device.h> | ||
| 15 | #include <linux/gpio.h> | ||
| 16 | #include <linux/i2c/twl4030.h> | ||
| 17 | |||
| 18 | #include <asm/mach-types.h> | ||
| 19 | #include <asm/mach/arch.h> | ||
| 20 | |||
| 21 | #include <mach/common.h> | ||
| 22 | #include <mach/usb.h> | ||
| 23 | |||
| 24 | #include "mmc-twl4030.h" | ||
| 25 | |||
| 26 | static void __init omap_zoom2_init_irq(void) | ||
| 27 | { | ||
| 28 | omap2_init_common_hw(NULL); | ||
| 29 | omap_init_irq(); | ||
| 30 | omap_gpio_init(); | ||
| 31 | } | ||
| 32 | |||
| 33 | static struct omap_uart_config zoom2_uart_config __initdata = { | ||
| 34 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | ||
| 35 | }; | ||
| 36 | |||
| 37 | static struct omap_board_config_kernel zoom2_config[] __initdata = { | ||
| 38 | { OMAP_TAG_UART, &zoom2_uart_config }, | ||
| 39 | }; | ||
| 40 | |||
| 41 | static struct twl4030_gpio_platform_data zoom2_gpio_data = { | ||
| 42 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
| 43 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
| 44 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
| 45 | }; | ||
| 46 | |||
| 47 | static struct twl4030_platform_data zoom2_twldata = { | ||
| 48 | .irq_base = TWL4030_IRQ_BASE, | ||
| 49 | .irq_end = TWL4030_IRQ_END, | ||
| 50 | |||
| 51 | /* platform_data for children goes here */ | ||
| 52 | .gpio = &zoom2_gpio_data, | ||
| 53 | }; | ||
| 54 | |||
| 55 | static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = { | ||
| 56 | { | ||
| 57 | I2C_BOARD_INFO("twl4030", 0x48), | ||
| 58 | .flags = I2C_CLIENT_WAKE, | ||
| 59 | .irq = INT_34XX_SYS_NIRQ, | ||
| 60 | .platform_data = &zoom2_twldata, | ||
| 61 | }, | ||
| 62 | }; | ||
| 63 | |||
| 64 | static int __init omap_i2c_init(void) | ||
| 65 | { | ||
| 66 | omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo, | ||
| 67 | ARRAY_SIZE(zoom2_i2c_boardinfo)); | ||
| 68 | omap_register_i2c_bus(2, 400, NULL, 0); | ||
| 69 | omap_register_i2c_bus(3, 400, NULL, 0); | ||
| 70 | return 0; | ||
| 71 | } | ||
| 72 | |||
| 73 | static struct twl4030_hsmmc_info mmc[] __initdata = { | ||
| 74 | { | ||
| 75 | .mmc = 1, | ||
| 76 | .wires = 4, | ||
| 77 | .gpio_cd = -EINVAL, | ||
| 78 | .gpio_wp = -EINVAL, | ||
| 79 | }, | ||
| 80 | {} /* Terminator */ | ||
| 81 | }; | ||
| 82 | |||
| 83 | extern int __init omap_zoom2_debugboard_init(void); | ||
| 84 | |||
| 85 | static void __init omap_zoom2_init(void) | ||
| 86 | { | ||
| 87 | omap_i2c_init(); | ||
| 88 | omap_board_config = zoom2_config; | ||
| 89 | omap_board_config_size = ARRAY_SIZE(zoom2_config); | ||
| 90 | omap_serial_init(); | ||
| 91 | omap_zoom2_debugboard_init(); | ||
| 92 | twl4030_mmc_init(mmc); | ||
| 93 | usb_musb_init(); | ||
| 94 | } | ||
| 95 | |||
| 96 | static void __init omap_zoom2_map_io(void) | ||
| 97 | { | ||
| 98 | omap2_set_globals_343x(); | ||
| 99 | omap2_map_common_io(); | ||
| 100 | } | ||
| 101 | |||
| 102 | MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") | ||
| 103 | .phys_io = 0x48000000, | ||
| 104 | .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, | ||
| 105 | .boot_params = 0x80000100, | ||
| 106 | .map_io = omap_zoom2_map_io, | ||
| 107 | .init_irq = omap_zoom2_init_irq, | ||
| 108 | .init_machine = omap_zoom2_init, | ||
| 109 | .timer = &omap_timer, | ||
| 110 | MACHINE_END | ||
