oprofile: Fix uninitialized memory access when writing to writing to oprofilefs
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / arm / mach-at91 / board-flexibity.c
blob4c3f65d9c59b6732bc403f3e33a1f837c009658b
1 /*
2 * linux/arch/arm/mach-at91/board-flexibity.c
4 * Copyright (C) 2010 Flexibity
5 * Copyright (C) 2005 SAN People
6 * Copyright (C) 2006 Atmel
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <linux/init.h>
24 #include <linux/platform_device.h>
25 #include <linux/spi/spi.h>
26 #include <linux/input.h>
27 #include <linux/gpio.h>
29 #include <asm/mach-types.h>
31 #include <asm/mach/arch.h>
32 #include <asm/mach/map.h>
33 #include <asm/mach/irq.h>
35 #include <mach/hardware.h>
36 #include <mach/board.h>
38 #include "generic.h"
40 static void __init flexibity_init_early(void)
42 /* Initialize processor: 18.432 MHz crystal */
43 at91_initialize(18432000);
45 /* DBGU on ttyS0. (Rx & Tx only) */
46 at91_register_uart(0, 0, 0);
48 /* set serial console to ttyS0 (ie, DBGU) */
49 at91_set_serial_console(0);
52 /* USB Host port */
53 static struct at91_usbh_data __initdata flexibity_usbh_data = {
54 .ports = 2,
57 /* USB Device port */
58 static struct at91_udc_data __initdata flexibity_udc_data = {
59 .vbus_pin = AT91_PIN_PC5,
60 .pullup_pin = 0, /* pull-up driven by UDC */
63 /* SPI devices */
64 static struct spi_board_info flexibity_spi_devices[] = {
65 { /* DataFlash chip */
66 .modalias = "mtd_dataflash",
67 .chip_select = 1,
68 .max_speed_hz = 15 * 1000 * 1000,
69 .bus_num = 0,
73 /* MCI (SD/MMC) */
74 static struct at91_mmc_data __initdata flexibity_mmc_data = {
75 .slot_b = 0,
76 .wire4 = 1,
77 .det_pin = AT91_PIN_PC9,
78 .wp_pin = AT91_PIN_PC4,
81 /* LEDs */
82 static struct gpio_led flexibity_leds[] = {
84 .name = "usb1:green",
85 .gpio = AT91_PIN_PA12,
86 .active_low = 1,
87 .default_trigger = "default-on",
90 .name = "usb1:red",
91 .gpio = AT91_PIN_PA13,
92 .active_low = 1,
93 .default_trigger = "default-on",
96 .name = "usb2:green",
97 .gpio = AT91_PIN_PB26,
98 .active_low = 1,
99 .default_trigger = "default-on",
102 .name = "usb2:red",
103 .gpio = AT91_PIN_PB27,
104 .active_low = 1,
105 .default_trigger = "default-on",
108 .name = "usb3:green",
109 .gpio = AT91_PIN_PC8,
110 .active_low = 1,
111 .default_trigger = "default-on",
114 .name = "usb3:red",
115 .gpio = AT91_PIN_PC6,
116 .active_low = 1,
117 .default_trigger = "default-on",
120 .name = "usb4:green",
121 .gpio = AT91_PIN_PB4,
122 .active_low = 1,
123 .default_trigger = "default-on",
126 .name = "usb4:red",
127 .gpio = AT91_PIN_PB5,
128 .active_low = 1,
129 .default_trigger = "default-on",
133 static void __init flexibity_board_init(void)
135 /* Serial */
136 at91_add_device_serial();
137 /* USB Host */
138 at91_add_device_usbh(&flexibity_usbh_data);
139 /* USB Device */
140 at91_add_device_udc(&flexibity_udc_data);
141 /* SPI */
142 at91_add_device_spi(flexibity_spi_devices,
143 ARRAY_SIZE(flexibity_spi_devices));
144 /* MMC */
145 at91_add_device_mmc(0, &flexibity_mmc_data);
146 /* LEDs */
147 at91_gpio_leds(flexibity_leds, ARRAY_SIZE(flexibity_leds));
150 MACHINE_START(FLEXIBITY, "Flexibity Connect")
151 /* Maintainer: Maxim Osipov */
152 .timer = &at91sam926x_timer,
153 .map_io = at91_map_io,
154 .init_early = flexibity_init_early,
155 .init_irq = at91_init_irq_default,
156 .init_machine = flexibity_board_init,
157 MACHINE_END