omap3: IGEP v2: Improve igep2_flash_init() function
[deliverable/linux.git] / arch / arm / mach-omap2 / board-zoom3.c
CommitLineData
5f35fbe8 1/*
2 * Copyright (C) 2009 Texas Instruments Inc.
3 *
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/platform_device.h>
13#include <linux/input.h>
14#include <linux/gpio.h>
15
16#include <asm/mach-types.h>
17#include <asm/mach/arch.h>
18
19#include <mach/board-zoom.h>
20
21#include <plat/common.h>
22#include <plat/board.h>
31e464cd 23#include <plat/usb.h>
5f35fbe8 24
04aeae77 25#include "board-flash.h"
662c8b55 26#include "mux.h"
5f35fbe8 27#include "sdram-hynix-h8mbx00u0mer-0em.h"
28
5f35fbe8 29static struct omap_board_config_kernel zoom_config[] __initdata = {
30};
31
e08b105e
SG
32static struct mtd_partition zoom_nand_partitions[] = {
33 /* All the partition sizes are listed in terms of NAND block size */
34 {
35 .name = "X-Loader-NAND",
36 .offset = 0,
37 .size = 4 * (64 * 2048), /* 512KB, 0x80000 */
38 .mask_flags = MTD_WRITEABLE, /* force read-only */
39 },
40 {
41 .name = "U-Boot-NAND",
42 .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
43 .size = 10 * (64 * 2048), /* 1.25MB, 0x140000 */
44 .mask_flags = MTD_WRITEABLE, /* force read-only */
45 },
46 {
47 .name = "Boot Env-NAND",
48 .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */
49 .size = 2 * (64 * 2048), /* 256KB, 0x40000 */
50 },
51 {
52 .name = "Kernel-NAND",
53 .offset = MTDPART_OFS_APPEND, /* Offset = 0x0200000*/
54 .size = 240 * (64 * 2048), /* 30M, 0x1E00000 */
55 },
56 {
57 .name = "system",
58 .offset = MTDPART_OFS_APPEND, /* Offset = 0x2000000 */
59 .size = 3328 * (64 * 2048), /* 416M, 0x1A000000 */
60 },
61 {
62 .name = "userdata",
63 .offset = MTDPART_OFS_APPEND, /* Offset = 0x1C000000*/
64 .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
65 },
66 {
67 .name = "cache",
68 .offset = MTDPART_OFS_APPEND, /* Offset = 0x1E000000*/
69 .size = 256 * (64 * 2048), /* 32M, 0x2000000 */
70 },
71};
72
5f35fbe8 73static void __init omap_zoom_init_irq(void)
74{
75 omap_board_config = zoom_config;
76 omap_board_config_size = ARRAY_SIZE(zoom_config);
77 omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
78 h8mbx00u0mer0em_sdrc_params);
79 omap_init_irq();
80 omap_gpio_init();
81}
82
662c8b55
TL
83#ifdef CONFIG_OMAP_MUX
84static struct omap_board_mux board_mux[] __initdata = {
c3777c19
OBC
85 /* WLAN IRQ - GPIO 162 */
86 OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
87 /* WLAN POWER ENABLE - GPIO 101 */
88 OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
89 /* WLAN SDIO: MMC3 CMD */
90 OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP),
91 /* WLAN SDIO: MMC3 CLK */
92 OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
93 /* WLAN SDIO: MMC3 DAT[0-3] */
94 OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
95 OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
96 OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
97 OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP),
662c8b55
TL
98 { .reg_offset = OMAP_MUX_TERMINATOR },
99};
100#else
101#define board_mux NULL
102#endif
103
6f69a181 104static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
31e464cd 105 .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
106 .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
107 .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
108 .phy_reset = true,
109 .reset_gpio_port[0] = -EINVAL,
110 .reset_gpio_port[1] = 64,
111 .reset_gpio_port[2] = -EINVAL,
112};
113
5f35fbe8 114static void __init omap_zoom_init(void)
115{
662c8b55 116 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
5f35fbe8 117 zoom_peripherals_init();
e08b105e
SG
118 board_nand_init(zoom_nand_partitions,
119 ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS);
5f35fbe8 120 zoom_debugboard_init();
31e464cd 121
122 omap_mux_init_gpio(64, OMAP_PIN_OUTPUT);
123 usb_ehci_init(&ehci_pdata);
5f35fbe8 124}
125
126MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
5f35fbe8 127 .boot_params = 0x80000100,
869fef41 128 .map_io = omap3_map_io,
71ee7dad 129 .reserve = omap_reserve,
5f35fbe8 130 .init_irq = omap_zoom_init_irq,
131 .init_machine = omap_zoom_init,
132 .timer = &omap_timer,
133MACHINE_END
This page took 0.084087 seconds and 5 git commands to generate.