diff options
| -rw-r--r-- | arch/arm/mach-at91/Makefile | 15 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-1arm.c | 99 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-carmeva.c | 167 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-cpuat91.c | 189 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-csb337.c | 260 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-csb637.c | 142 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-eb9200.c | 126 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-ecbat91.c | 191 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-eco920.c | 160 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-kafa.c | 113 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-kb9202.c | 159 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-picotux200.c | 129 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-rm9200ek.c | 196 | ||||
| -rw-r--r-- | arch/arm/mach-at91/board-yl-9200.c | 597 |
14 files changed, 0 insertions, 2543 deletions
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index b2495d71f7ac..016d9a126eb9 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
| @@ -22,21 +22,6 @@ obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o | |||
| 22 | 22 | ||
| 23 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o | 23 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o |
| 24 | 24 | ||
| 25 | # AT91RM9200 board-specific support | ||
| 26 | obj-$(CONFIG_MACH_ONEARM) += board-1arm.o | ||
| 27 | obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o | ||
| 28 | obj-$(CONFIG_MACH_CSB337) += board-csb337.o | ||
| 29 | obj-$(CONFIG_MACH_CSB637) += board-csb637.o | ||
| 30 | obj-$(CONFIG_MACH_CARMEVA) += board-carmeva.o | ||
| 31 | obj-$(CONFIG_MACH_KB9200) += board-kb9202.o | ||
| 32 | obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o | ||
| 33 | obj-$(CONFIG_MACH_KAFA) += board-kafa.o | ||
| 34 | obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o | ||
| 35 | obj-$(CONFIG_MACH_ECBAT91) += board-ecbat91.o | ||
| 36 | obj-$(CONFIG_MACH_YL9200) += board-yl-9200.o | ||
| 37 | obj-$(CONFIG_MACH_CPUAT91) += board-cpuat91.o | ||
| 38 | obj-$(CONFIG_MACH_ECO920) += board-eco920.o | ||
| 39 | |||
| 40 | # AT91SAM board with device-tree | 25 | # AT91SAM board with device-tree |
| 41 | obj-$(CONFIG_MACH_AT91RM9200_DT) += board-dt-rm9200.o | 26 | obj-$(CONFIG_MACH_AT91RM9200_DT) += board-dt-rm9200.o |
| 42 | obj-$(CONFIG_MACH_AT91SAM9_DT) += board-dt-sam9.o | 27 | obj-$(CONFIG_MACH_AT91SAM9_DT) += board-dt-sam9.o |
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c deleted file mode 100644 index 3f6dbcc34022..000000000000 --- a/arch/arm/mach-at91/board-1arm.c +++ /dev/null | |||
| @@ -1,99 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-1arm.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 SAN People | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | #include <linux/gpio.h> | ||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/mm.h> | ||
| 25 | #include <linux/module.h> | ||
| 26 | #include <linux/platform_device.h> | ||
| 27 | |||
| 28 | #include <mach/hardware.h> | ||
| 29 | #include <asm/setup.h> | ||
| 30 | #include <asm/mach-types.h> | ||
| 31 | #include <asm/irq.h> | ||
| 32 | |||
| 33 | #include <asm/mach/arch.h> | ||
| 34 | #include <asm/mach/map.h> | ||
| 35 | #include <asm/mach/irq.h> | ||
| 36 | |||
| 37 | #include <mach/cpu.h> | ||
| 38 | |||
| 39 | #include "at91_aic.h" | ||
| 40 | #include "board.h" | ||
| 41 | #include "generic.h" | ||
| 42 | #include "gpio.h" | ||
| 43 | |||
| 44 | static void __init onearm_init_early(void) | ||
| 45 | { | ||
| 46 | /* Set cpu type: PQFP */ | ||
| 47 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
| 48 | |||
| 49 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 50 | at91_initialize(18432000); | ||
| 51 | } | ||
| 52 | |||
| 53 | static struct macb_platform_data __initdata onearm_eth_data = { | ||
| 54 | .phy_irq_pin = AT91_PIN_PC4, | ||
| 55 | .is_rmii = 1, | ||
| 56 | }; | ||
| 57 | |||
| 58 | static struct at91_usbh_data __initdata onearm_usbh_data = { | ||
| 59 | .ports = 1, | ||
| 60 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 61 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 62 | }; | ||
| 63 | |||
| 64 | static struct at91_udc_data __initdata onearm_udc_data = { | ||
| 65 | .vbus_pin = AT91_PIN_PC2, | ||
| 66 | .pullup_pin = AT91_PIN_PC3, | ||
| 67 | }; | ||
| 68 | |||
| 69 | static void __init onearm_board_init(void) | ||
| 70 | { | ||
| 71 | /* Serial */ | ||
| 72 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 73 | at91_register_uart(0, 0, 0); | ||
| 74 | |||
| 75 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
| 76 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
| 77 | |||
| 78 | /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
| 79 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
| 80 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
| 81 | | ATMEL_UART_RI); | ||
| 82 | at91_add_device_serial(); | ||
| 83 | /* Ethernet */ | ||
| 84 | at91_add_device_eth(&onearm_eth_data); | ||
| 85 | /* USB Host */ | ||
| 86 | at91_add_device_usbh(&onearm_usbh_data); | ||
| 87 | /* USB Device */ | ||
| 88 | at91_add_device_udc(&onearm_udc_data); | ||
| 89 | } | ||
| 90 | |||
| 91 | MACHINE_START(ONEARM, "Ajeco 1ARM single board computer") | ||
| 92 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | ||
| 93 | .init_time = at91rm9200_timer_init, | ||
| 94 | .map_io = at91_map_io, | ||
| 95 | .handle_irq = at91_aic_handle_irq, | ||
| 96 | .init_early = onearm_init_early, | ||
| 97 | .init_irq = at91_init_irq_default, | ||
| 98 | .init_machine = onearm_board_init, | ||
| 99 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c deleted file mode 100644 index 47313d3ee037..000000000000 --- a/arch/arm/mach-at91/board-carmeva.c +++ /dev/null | |||
| @@ -1,167 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-carmeva.c | ||
| 3 | * | ||
| 4 | * Copyright (c) 2005 Peer Georgi | ||
| 5 | * Conitec Datasystems | ||
| 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 as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/types.h> | ||
| 23 | #include <linux/gpio.h> | ||
| 24 | #include <linux/init.h> | ||
| 25 | #include <linux/mm.h> | ||
| 26 | #include <linux/module.h> | ||
| 27 | #include <linux/platform_device.h> | ||
| 28 | |||
| 29 | #include <asm/setup.h> | ||
| 30 | #include <asm/mach-types.h> | ||
| 31 | #include <asm/irq.h> | ||
| 32 | |||
| 33 | #include <asm/mach/arch.h> | ||
| 34 | #include <asm/mach/map.h> | ||
| 35 | #include <asm/mach/irq.h> | ||
| 36 | |||
| 37 | #include <mach/hardware.h> | ||
| 38 | |||
| 39 | #include "at91_aic.h" | ||
| 40 | #include "board.h" | ||
| 41 | #include "generic.h" | ||
| 42 | #include "gpio.h" | ||
| 43 | |||
| 44 | |||
| 45 | static void __init carmeva_init_early(void) | ||
| 46 | { | ||
| 47 | /* Initialize processor: 20.000 MHz crystal */ | ||
| 48 | at91_initialize(20000000); | ||
| 49 | } | ||
| 50 | |||
| 51 | static struct macb_platform_data __initdata carmeva_eth_data = { | ||
| 52 | .phy_irq_pin = AT91_PIN_PC4, | ||
| 53 | .is_rmii = 1, | ||
| 54 | }; | ||
| 55 | |||
| 56 | static struct at91_usbh_data __initdata carmeva_usbh_data = { | ||
| 57 | .ports = 2, | ||
| 58 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 59 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 60 | }; | ||
| 61 | |||
| 62 | static struct at91_udc_data __initdata carmeva_udc_data = { | ||
| 63 | .vbus_pin = AT91_PIN_PD12, | ||
| 64 | .pullup_pin = AT91_PIN_PD9, | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* FIXME: user dependent */ | ||
| 68 | // static struct at91_cf_data __initdata carmeva_cf_data = { | ||
| 69 | // .det_pin = AT91_PIN_PB0, | ||
| 70 | // .rst_pin = AT91_PIN_PC5, | ||
| 71 | // .irq_pin = -EINVAL, | ||
| 72 | // .vcc_pin = -EINVAL, | ||
| 73 | // }; | ||
| 74 | |||
| 75 | static struct mci_platform_data __initdata carmeva_mci0_data = { | ||
| 76 | .slot[0] = { | ||
| 77 | .bus_width = 4, | ||
| 78 | .detect_pin = AT91_PIN_PB10, | ||
| 79 | .wp_pin = AT91_PIN_PC14, | ||
| 80 | }, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static struct spi_board_info carmeva_spi_devices[] = { | ||
| 84 | { /* DataFlash chip */ | ||
| 85 | .modalias = "mtd_dataflash", | ||
| 86 | .chip_select = 0, | ||
| 87 | .max_speed_hz = 10 * 1000 * 1000, | ||
| 88 | }, | ||
| 89 | { /* User accessible spi - cs1 (250KHz) */ | ||
| 90 | .modalias = "spi-cs1", | ||
| 91 | .chip_select = 1, | ||
| 92 | .max_speed_hz = 250 * 1000, | ||
| 93 | }, | ||
| 94 | { /* User accessible spi - cs2 (1MHz) */ | ||
| 95 | .modalias = "spi-cs2", | ||
| 96 | .chip_select = 2, | ||
| 97 | .max_speed_hz = 1 * 1000 * 1000, | ||
| 98 | }, | ||
| 99 | { /* User accessible spi - cs3 (10MHz) */ | ||
| 100 | .modalias = "spi-cs3", | ||
| 101 | .chip_select = 3, | ||
| 102 | .max_speed_hz = 10 * 1000 * 1000, | ||
| 103 | }, | ||
| 104 | }; | ||
| 105 | |||
| 106 | static struct gpio_led carmeva_leds[] = { | ||
| 107 | { /* "user led 1", LED9 */ | ||
| 108 | .name = "led9", | ||
| 109 | .gpio = AT91_PIN_PA21, | ||
| 110 | .active_low = 1, | ||
| 111 | .default_trigger = "heartbeat", | ||
| 112 | }, | ||
| 113 | { /* "user led 2", LED10 */ | ||
| 114 | .name = "led10", | ||
| 115 | .gpio = AT91_PIN_PA25, | ||
| 116 | .active_low = 1, | ||
| 117 | }, | ||
| 118 | { /* "user led 3", LED11 */ | ||
| 119 | .name = "led11", | ||
| 120 | .gpio = AT91_PIN_PA26, | ||
| 121 | .active_low = 1, | ||
| 122 | }, | ||
| 123 | { /* "user led 4", LED12 */ | ||
| 124 | .name = "led12", | ||
| 125 | .gpio = AT91_PIN_PA18, | ||
| 126 | .active_low = 1, | ||
| 127 | } | ||
| 128 | }; | ||
| 129 | |||
| 130 | static void __init carmeva_board_init(void) | ||
| 131 | { | ||
| 132 | /* Serial */ | ||
| 133 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 134 | at91_register_uart(0, 0, 0); | ||
| 135 | |||
| 136 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
| 137 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
| 138 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
| 139 | | ATMEL_UART_RI); | ||
| 140 | at91_add_device_serial(); | ||
| 141 | /* Ethernet */ | ||
| 142 | at91_add_device_eth(&carmeva_eth_data); | ||
| 143 | /* USB Host */ | ||
| 144 | at91_add_device_usbh(&carmeva_usbh_data); | ||
| 145 | /* USB Device */ | ||
| 146 | at91_add_device_udc(&carmeva_udc_data); | ||
| 147 | /* I2C */ | ||
| 148 | at91_add_device_i2c(NULL, 0); | ||
| 149 | /* SPI */ | ||
| 150 | at91_add_device_spi(carmeva_spi_devices, ARRAY_SIZE(carmeva_spi_devices)); | ||
| 151 | /* Compact Flash */ | ||
| 152 | // at91_add_device_cf(&carmeva_cf_data); | ||
| 153 | /* MMC */ | ||
| 154 | at91_add_device_mci(0, &carmeva_mci0_data); | ||
| 155 | /* LEDs */ | ||
| 156 | at91_gpio_leds(carmeva_leds, ARRAY_SIZE(carmeva_leds)); | ||
| 157 | } | ||
| 158 | |||
| 159 | MACHINE_START(CARMEVA, "Carmeva") | ||
| 160 | /* Maintainer: Conitec Datasystems */ | ||
| 161 | .init_time = at91rm9200_timer_init, | ||
| 162 | .map_io = at91_map_io, | ||
| 163 | .handle_irq = at91_aic_handle_irq, | ||
| 164 | .init_early = carmeva_init_early, | ||
| 165 | .init_irq = at91_init_irq_default, | ||
| 166 | .init_machine = carmeva_board_init, | ||
| 167 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c deleted file mode 100644 index c094350c9314..000000000000 --- a/arch/arm/mach-at91/board-cpuat91.c +++ /dev/null | |||
| @@ -1,189 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-cpuat91.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Eric Benard - eric@eukrea.com | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | #include <linux/gpio.h> | ||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/mm.h> | ||
| 25 | #include <linux/module.h> | ||
| 26 | #include <linux/platform_device.h> | ||
| 27 | #include <linux/mtd/physmap.h> | ||
| 28 | #include <linux/mtd/plat-ram.h> | ||
| 29 | |||
| 30 | #include <mach/hardware.h> | ||
| 31 | #include <asm/setup.h> | ||
| 32 | #include <asm/mach-types.h> | ||
| 33 | #include <asm/irq.h> | ||
| 34 | |||
| 35 | #include <asm/mach/arch.h> | ||
| 36 | #include <asm/mach/map.h> | ||
| 37 | #include <asm/mach/irq.h> | ||
| 38 | |||
| 39 | #include <mach/at91rm9200_mc.h> | ||
| 40 | #include <mach/at91_ramc.h> | ||
| 41 | #include <mach/cpu.h> | ||
| 42 | |||
| 43 | #include "at91_aic.h" | ||
| 44 | #include "board.h" | ||
| 45 | #include "generic.h" | ||
| 46 | #include "gpio.h" | ||
| 47 | |||
| 48 | |||
| 49 | static struct gpio_led cpuat91_leds[] = { | ||
| 50 | { | ||
| 51 | .name = "led1", | ||
| 52 | .default_trigger = "heartbeat", | ||
| 53 | .active_low = 1, | ||
| 54 | .gpio = AT91_PIN_PC0, | ||
| 55 | }, | ||
| 56 | }; | ||
| 57 | |||
| 58 | static void __init cpuat91_init_early(void) | ||
| 59 | { | ||
| 60 | /* Set cpu type: PQFP */ | ||
| 61 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
| 62 | |||
| 63 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 64 | at91_initialize(18432000); | ||
| 65 | } | ||
| 66 | |||
| 67 | static struct macb_platform_data __initdata cpuat91_eth_data = { | ||
| 68 | .phy_irq_pin = -EINVAL, | ||
| 69 | .is_rmii = 1, | ||
| 70 | }; | ||
| 71 | |||
| 72 | static struct at91_usbh_data __initdata cpuat91_usbh_data = { | ||
| 73 | .ports = 1, | ||
| 74 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 75 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 76 | }; | ||
| 77 | |||
| 78 | static struct at91_udc_data __initdata cpuat91_udc_data = { | ||
| 79 | .vbus_pin = AT91_PIN_PC15, | ||
| 80 | .pullup_pin = AT91_PIN_PC14, | ||
| 81 | }; | ||
| 82 | |||
| 83 | static struct mci_platform_data __initdata cpuat91_mci0_data = { | ||
| 84 | .slot[0] = { | ||
| 85 | .bus_width = 4, | ||
| 86 | .detect_pin = AT91_PIN_PC2, | ||
| 87 | .wp_pin = -EINVAL, | ||
| 88 | }, | ||
| 89 | }; | ||
| 90 | |||
| 91 | static struct physmap_flash_data cpuat91_flash_data = { | ||
| 92 | .width = 2, | ||
| 93 | }; | ||
| 94 | |||
| 95 | static struct resource cpuat91_flash_resource = { | ||
| 96 | .start = AT91_CHIPSELECT_0, | ||
| 97 | .end = AT91_CHIPSELECT_0 + SZ_16M - 1, | ||
| 98 | .flags = IORESOURCE_MEM, | ||
| 99 | }; | ||
| 100 | |||
| 101 | static struct platform_device cpuat91_norflash = { | ||
| 102 | .name = "physmap-flash", | ||
| 103 | .id = 0, | ||
| 104 | .dev = { | ||
| 105 | .platform_data = &cpuat91_flash_data, | ||
| 106 | }, | ||
| 107 | .resource = &cpuat91_flash_resource, | ||
| 108 | .num_resources = 1, | ||
| 109 | }; | ||
| 110 | |||
| 111 | #ifdef CONFIG_MTD_PLATRAM | ||
| 112 | struct platdata_mtd_ram at91_sram_pdata = { | ||
| 113 | .mapname = "SRAM", | ||
| 114 | .bankwidth = 2, | ||
| 115 | }; | ||
| 116 | |||
| 117 | static struct resource at91_sram_resource[] = { | ||
| 118 | [0] = { | ||
| 119 | .start = AT91RM9200_SRAM_BASE, | ||
| 120 | .end = AT91RM9200_SRAM_BASE + AT91RM9200_SRAM_SIZE - 1, | ||
| 121 | .flags = IORESOURCE_MEM, | ||
| 122 | }, | ||
| 123 | }; | ||
| 124 | |||
| 125 | static struct platform_device at91_sram = { | ||
| 126 | .name = "mtd-ram", | ||
| 127 | .id = 0, | ||
| 128 | .resource = at91_sram_resource, | ||
| 129 | .num_resources = ARRAY_SIZE(at91_sram_resource), | ||
| 130 | .dev = { | ||
| 131 | .platform_data = &at91_sram_pdata, | ||
| 132 | }, | ||
| 133 | }; | ||
| 134 | #endif /* MTD_PLATRAM */ | ||
| 135 | |||
| 136 | static struct platform_device *platform_devices[] __initdata = { | ||
| 137 | &cpuat91_norflash, | ||
| 138 | #ifdef CONFIG_MTD_PLATRAM | ||
| 139 | &at91_sram, | ||
| 140 | #endif /* CONFIG_MTD_PLATRAM */ | ||
| 141 | }; | ||
| 142 | |||
| 143 | static void __init cpuat91_board_init(void) | ||
| 144 | { | ||
| 145 | /* Serial */ | ||
| 146 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 147 | at91_register_uart(0, 0, 0); | ||
| 148 | |||
| 149 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ | ||
| 150 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | | ||
| 151 | ATMEL_UART_RTS); | ||
| 152 | |||
| 153 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
| 154 | at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | | ||
| 155 | ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR | | ||
| 156 | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
| 157 | |||
| 158 | /* USART2 on ttyS3 (Rx, Tx) */ | ||
| 159 | at91_register_uart(AT91RM9200_ID_US2, 3, 0); | ||
| 160 | |||
| 161 | /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */ | ||
| 162 | at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS | | ||
| 163 | ATMEL_UART_RTS); | ||
| 164 | at91_add_device_serial(); | ||
| 165 | /* LEDs. */ | ||
| 166 | at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds)); | ||
| 167 | /* Ethernet */ | ||
| 168 | at91_add_device_eth(&cpuat91_eth_data); | ||
| 169 | /* USB Host */ | ||
| 170 | at91_add_device_usbh(&cpuat91_usbh_data); | ||
| 171 | /* USB Device */ | ||
| 172 | at91_add_device_udc(&cpuat91_udc_data); | ||
| 173 | /* MMC */ | ||
| 174 | at91_add_device_mci(0, &cpuat91_mci0_data); | ||
| 175 | /* I2C */ | ||
| 176 | at91_add_device_i2c(NULL, 0); | ||
| 177 | /* Platform devices */ | ||
| 178 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
| 179 | } | ||
| 180 | |||
| 181 | MACHINE_START(CPUAT91, "Eukrea") | ||
| 182 | /* Maintainer: Eric Benard - EUKREA Electromatique */ | ||
| 183 | .init_time = at91rm9200_timer_init, | ||
| 184 | .map_io = at91_map_io, | ||
| 185 | .handle_irq = at91_aic_handle_irq, | ||
| 186 | .init_early = cpuat91_init_early, | ||
| 187 | .init_irq = at91_init_irq_default, | ||
| 188 | .init_machine = cpuat91_board_init, | ||
| 189 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c deleted file mode 100644 index 0e35a45cf8d4..000000000000 --- a/arch/arm/mach-at91/board-csb337.c +++ /dev/null | |||
| @@ -1,260 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-csb337.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 SAN People | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | #include <linux/gpio.h> | ||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/mm.h> | ||
| 25 | #include <linux/module.h> | ||
| 26 | #include <linux/platform_device.h> | ||
| 27 | #include <linux/spi/spi.h> | ||
| 28 | #include <linux/mtd/physmap.h> | ||
| 29 | #include <linux/input.h> | ||
| 30 | #include <linux/gpio_keys.h> | ||
| 31 | |||
| 32 | #include <asm/setup.h> | ||
| 33 | #include <asm/mach-types.h> | ||
| 34 | #include <asm/irq.h> | ||
| 35 | |||
| 36 | #include <asm/mach/arch.h> | ||
| 37 | #include <asm/mach/map.h> | ||
| 38 | #include <asm/mach/irq.h> | ||
| 39 | |||
| 40 | #include <mach/hardware.h> | ||
| 41 | |||
| 42 | #include "at91_aic.h" | ||
| 43 | #include "board.h" | ||
| 44 | #include "generic.h" | ||
| 45 | #include "gpio.h" | ||
| 46 | |||
| 47 | static void __init csb337_init_early(void) | ||
| 48 | { | ||
| 49 | /* Initialize processor: 3.6864 MHz crystal */ | ||
| 50 | at91_initialize(3686400); | ||
| 51 | } | ||
| 52 | |||
| 53 | static struct macb_platform_data __initdata csb337_eth_data = { | ||
| 54 | .phy_irq_pin = AT91_PIN_PC2, | ||
| 55 | .is_rmii = 0, | ||
| 56 | /* The CSB337 bootloader stores the MAC the wrong-way around */ | ||
| 57 | .rev_eth_addr = 1, | ||
| 58 | }; | ||
| 59 | |||
| 60 | static struct at91_usbh_data __initdata csb337_usbh_data = { | ||
| 61 | .ports = 2, | ||
| 62 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 63 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 64 | }; | ||
| 65 | |||
| 66 | static struct at91_udc_data __initdata csb337_udc_data = { | ||
| 67 | .pullup_pin = AT91_PIN_PA24, | ||
| 68 | .vbus_pin = -EINVAL, | ||
| 69 | }; | ||
| 70 | |||
| 71 | static struct i2c_board_info __initdata csb337_i2c_devices[] = { | ||
| 72 | { | ||
| 73 | I2C_BOARD_INFO("ds1307", 0x68), | ||
| 74 | }, | ||
| 75 | }; | ||
| 76 | |||
| 77 | static struct at91_cf_data __initdata csb337_cf_data = { | ||
| 78 | /* | ||
| 79 | * connector P4 on the CSB 337 mates to | ||
| 80 | * connector P8 on the CSB 300CF | ||
| 81 | */ | ||
| 82 | |||
| 83 | /* CSB337 specific */ | ||
| 84 | .det_pin = AT91_PIN_PC3, | ||
| 85 | |||
| 86 | /* CSB300CF specific */ | ||
| 87 | .irq_pin = AT91_PIN_PA19, | ||
| 88 | .vcc_pin = AT91_PIN_PD0, | ||
| 89 | .rst_pin = AT91_PIN_PD2, | ||
| 90 | }; | ||
| 91 | |||
| 92 | static struct mci_platform_data __initdata csb337_mci0_data = { | ||
| 93 | .slot[0] = { | ||
| 94 | .bus_width = 4, | ||
| 95 | .detect_pin = AT91_PIN_PD5, | ||
| 96 | .wp_pin = AT91_PIN_PD6, | ||
| 97 | }, | ||
| 98 | }; | ||
| 99 | |||
| 100 | static struct spi_board_info csb337_spi_devices[] = { | ||
| 101 | { /* CAN controller */ | ||
| 102 | .modalias = "sak82c900", | ||
| 103 | .chip_select = 0, | ||
| 104 | .max_speed_hz = 6 * 1000 * 1000, | ||
| 105 | }, | ||
| 106 | }; | ||
| 107 | |||
| 108 | #define CSB_FLASH_BASE AT91_CHIPSELECT_0 | ||
| 109 | #define CSB_FLASH_SIZE SZ_8M | ||
| 110 | |||
| 111 | static struct mtd_partition csb_flash_partitions[] = { | ||
| 112 | { | ||
| 113 | .name = "uMON flash", | ||
| 114 | .offset = 0, | ||
| 115 | .size = MTDPART_SIZ_FULL, | ||
| 116 | .mask_flags = MTD_WRITEABLE, /* read only */ | ||
| 117 | } | ||
| 118 | }; | ||
| 119 | |||
| 120 | static struct physmap_flash_data csb_flash_data = { | ||
| 121 | .width = 2, | ||
| 122 | .parts = csb_flash_partitions, | ||
| 123 | .nr_parts = ARRAY_SIZE(csb_flash_partitions), | ||
| 124 | }; | ||
| 125 | |||
| 126 | static struct resource csb_flash_resources[] = { | ||
| 127 | { | ||
| 128 | .start = CSB_FLASH_BASE, | ||
| 129 | .end = CSB_FLASH_BASE + CSB_FLASH_SIZE - 1, | ||
| 130 | .flags = IORESOURCE_MEM, | ||
| 131 | } | ||
| 132 | }; | ||
| 133 | |||
| 134 | static struct platform_device csb_flash = { | ||
| 135 | .name = "physmap-flash", | ||
| 136 | .id = 0, | ||
| 137 | .dev = { | ||
| 138 | .platform_data = &csb_flash_data, | ||
| 139 | }, | ||
| 140 | .resource = csb_flash_resources, | ||
| 141 | .num_resources = ARRAY_SIZE(csb_flash_resources), | ||
| 142 | }; | ||
| 143 | |||
| 144 | /* | ||
| 145 | * GPIO Buttons (on CSB300) | ||
| 146 | */ | ||
| 147 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
| 148 | static struct gpio_keys_button csb300_buttons[] = { | ||
| 149 | { | ||
| 150 | .gpio = AT91_PIN_PB29, | ||
| 151 | .code = BTN_0, | ||
| 152 | .desc = "sw0", | ||
| 153 | .active_low = 1, | ||
| 154 | .wakeup = 1, | ||
| 155 | }, | ||
| 156 | { | ||
| 157 | .gpio = AT91_PIN_PB28, | ||
| 158 | .code = BTN_1, | ||
| 159 | .desc = "sw1", | ||
| 160 | .active_low = 1, | ||
| 161 | .wakeup = 1, | ||
| 162 | }, | ||
| 163 | { | ||
| 164 | .gpio = AT91_PIN_PA21, | ||
| 165 | .code = BTN_2, | ||
| 166 | .desc = "sw2", | ||
| 167 | .active_low = 1, | ||
| 168 | .wakeup = 1, | ||
| 169 | } | ||
| 170 | }; | ||
| 171 | |||
| 172 | static struct gpio_keys_platform_data csb300_button_data = { | ||
| 173 | .buttons = csb300_buttons, | ||
| 174 | .nbuttons = ARRAY_SIZE(csb300_buttons), | ||
| 175 | }; | ||
| 176 | |||
| 177 | static struct platform_device csb300_button_device = { | ||
| 178 | .name = "gpio-keys", | ||
| 179 | .id = -1, | ||
| 180 | .num_resources = 0, | ||
| 181 | .dev = { | ||
| 182 | .platform_data = &csb300_button_data, | ||
| 183 | } | ||
| 184 | }; | ||
| 185 | |||
| 186 | static void __init csb300_add_device_buttons(void) | ||
| 187 | { | ||
| 188 | at91_set_gpio_input(AT91_PIN_PB29, 1); /* sw0 */ | ||
| 189 | at91_set_deglitch(AT91_PIN_PB29, 1); | ||
| 190 | at91_set_gpio_input(AT91_PIN_PB28, 1); /* sw1 */ | ||
| 191 | at91_set_deglitch(AT91_PIN_PB28, 1); | ||
| 192 | at91_set_gpio_input(AT91_PIN_PA21, 1); /* sw2 */ | ||
| 193 | at91_set_deglitch(AT91_PIN_PA21, 1); | ||
| 194 | |||
| 195 | platform_device_register(&csb300_button_device); | ||
| 196 | } | ||
| 197 | #else | ||
| 198 | static void __init csb300_add_device_buttons(void) {} | ||
| 199 | #endif | ||
| 200 | |||
| 201 | static struct gpio_led csb_leds[] = { | ||
| 202 | { /* "led0", yellow */ | ||
| 203 | .name = "led0", | ||
| 204 | .gpio = AT91_PIN_PB2, | ||
| 205 | .active_low = 1, | ||
| 206 | .default_trigger = "heartbeat", | ||
| 207 | }, | ||
| 208 | { /* "led1", green */ | ||
| 209 | .name = "led1", | ||
| 210 | .gpio = AT91_PIN_PB1, | ||
| 211 | .active_low = 1, | ||
| 212 | .default_trigger = "mmc0", | ||
| 213 | }, | ||
| 214 | { /* "led2", yellow */ | ||
| 215 | .name = "led2", | ||
| 216 | .gpio = AT91_PIN_PB0, | ||
| 217 | .active_low = 1, | ||
| 218 | .default_trigger = "ide-disk", | ||
| 219 | } | ||
| 220 | }; | ||
| 221 | |||
| 222 | |||
| 223 | static void __init csb337_board_init(void) | ||
| 224 | { | ||
| 225 | /* Serial */ | ||
| 226 | /* DBGU on ttyS0 */ | ||
| 227 | at91_register_uart(0, 0, 0); | ||
| 228 | at91_add_device_serial(); | ||
| 229 | /* Ethernet */ | ||
| 230 | at91_add_device_eth(&csb337_eth_data); | ||
| 231 | /* USB Host */ | ||
| 232 | at91_add_device_usbh(&csb337_usbh_data); | ||
| 233 | /* USB Device */ | ||
| 234 | at91_add_device_udc(&csb337_udc_data); | ||
| 235 | /* I2C */ | ||
| 236 | at91_add_device_i2c(csb337_i2c_devices, ARRAY_SIZE(csb337_i2c_devices)); | ||
| 237 | /* Compact Flash */ | ||
| 238 | at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */ | ||
| 239 | at91_add_device_cf(&csb337_cf_data); | ||
| 240 | /* SPI */ | ||
| 241 | at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices)); | ||
| 242 | /* MMC */ | ||
| 243 | at91_add_device_mci(0, &csb337_mci0_data); | ||
| 244 | /* NOR flash */ | ||
| 245 | platform_device_register(&csb_flash); | ||
| 246 | /* LEDs */ | ||
| 247 | at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); | ||
| 248 | /* Switches on CSB300 */ | ||
| 249 | csb300_add_device_buttons(); | ||
| 250 | } | ||
| 251 | |||
| 252 | MACHINE_START(CSB337, "Cogent CSB337") | ||
| 253 | /* Maintainer: Bill Gatliff */ | ||
| 254 | .init_time = at91rm9200_timer_init, | ||
| 255 | .map_io = at91_map_io, | ||
| 256 | .handle_irq = at91_aic_handle_irq, | ||
| 257 | .init_early = csb337_init_early, | ||
| 258 | .init_irq = at91_init_irq_default, | ||
| 259 | .init_machine = csb337_board_init, | ||
| 260 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c deleted file mode 100644 index 18d027f529a8..000000000000 --- a/arch/arm/mach-at91/board-csb637.c +++ /dev/null | |||
| @@ -1,142 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-csb637.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 SAN People | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | #include <linux/init.h> | ||
| 23 | #include <linux/gpio.h> | ||
| 24 | #include <linux/mm.h> | ||
| 25 | #include <linux/module.h> | ||
| 26 | #include <linux/platform_device.h> | ||
| 27 | #include <linux/mtd/physmap.h> | ||
| 28 | |||
| 29 | #include <asm/setup.h> | ||
| 30 | #include <asm/mach-types.h> | ||
| 31 | #include <asm/irq.h> | ||
| 32 | |||
| 33 | #include <asm/mach/arch.h> | ||
| 34 | #include <asm/mach/map.h> | ||
| 35 | #include <asm/mach/irq.h> | ||
| 36 | |||
| 37 | #include <mach/hardware.h> | ||
| 38 | |||
| 39 | #include "at91_aic.h" | ||
| 40 | #include "board.h" | ||
| 41 | #include "generic.h" | ||
| 42 | #include "gpio.h" | ||
| 43 | |||
| 44 | |||
| 45 | static void __init csb637_init_early(void) | ||
| 46 | { | ||
| 47 | /* Initialize processor: 3.6864 MHz crystal */ | ||
| 48 | at91_initialize(3686400); | ||
| 49 | } | ||
| 50 | |||
| 51 | static struct macb_platform_data __initdata csb637_eth_data = { | ||
| 52 | .phy_irq_pin = AT91_PIN_PC0, | ||
| 53 | .is_rmii = 0, | ||
| 54 | }; | ||
| 55 | |||
| 56 | static struct at91_usbh_data __initdata csb637_usbh_data = { | ||
| 57 | .ports = 2, | ||
| 58 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 59 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 60 | }; | ||
| 61 | |||
| 62 | static struct at91_udc_data __initdata csb637_udc_data = { | ||
| 63 | .vbus_pin = AT91_PIN_PB28, | ||
| 64 | .pullup_pin = AT91_PIN_PB1, | ||
| 65 | }; | ||
| 66 | |||
| 67 | #define CSB_FLASH_BASE AT91_CHIPSELECT_0 | ||
| 68 | #define CSB_FLASH_SIZE SZ_16M | ||
| 69 | |||
| 70 | static struct mtd_partition csb_flash_partitions[] = { | ||
| 71 | { | ||
| 72 | .name = "uMON flash", | ||
| 73 | .offset = 0, | ||
| 74 | .size = MTDPART_SIZ_FULL, | ||
| 75 | .mask_flags = MTD_WRITEABLE, /* read only */ | ||
| 76 | } | ||
| 77 | }; | ||
| 78 | |||
| 79 | static struct physmap_flash_data csb_flash_data = { | ||
| 80 | .width = 2, | ||
| 81 | .parts = csb_flash_partitions, | ||
| 82 | .nr_parts = ARRAY_SIZE(csb_flash_partitions), | ||
| 83 | }; | ||
| 84 | |||
| 85 | static struct resource csb_flash_resources[] = { | ||
| 86 | { | ||
| 87 | .start = CSB_FLASH_BASE, | ||
| 88 | .end = CSB_FLASH_BASE + CSB_FLASH_SIZE - 1, | ||
| 89 | .flags = IORESOURCE_MEM, | ||
| 90 | } | ||
| 91 | }; | ||
| 92 | |||
| 93 | static struct platform_device csb_flash = { | ||
| 94 | .name = "physmap-flash", | ||
| 95 | .id = 0, | ||
| 96 | .dev = { | ||
| 97 | .platform_data = &csb_flash_data, | ||
| 98 | }, | ||
| 99 | .resource = csb_flash_resources, | ||
| 100 | .num_resources = ARRAY_SIZE(csb_flash_resources), | ||
| 101 | }; | ||
| 102 | |||
| 103 | static struct gpio_led csb_leds[] = { | ||
| 104 | { /* "d1", red */ | ||
| 105 | .name = "d1", | ||
| 106 | .gpio = AT91_PIN_PB2, | ||
| 107 | .active_low = 1, | ||
| 108 | .default_trigger = "heartbeat", | ||
| 109 | }, | ||
| 110 | }; | ||
| 111 | |||
| 112 | static void __init csb637_board_init(void) | ||
| 113 | { | ||
| 114 | /* LED(s) */ | ||
| 115 | at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds)); | ||
| 116 | /* Serial */ | ||
| 117 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 118 | at91_register_uart(0, 0, 0); | ||
| 119 | at91_add_device_serial(); | ||
| 120 | /* Ethernet */ | ||
| 121 | at91_add_device_eth(&csb637_eth_data); | ||
| 122 | /* USB Host */ | ||
| 123 | at91_add_device_usbh(&csb637_usbh_data); | ||
| 124 | /* USB Device */ | ||
| 125 | at91_add_device_udc(&csb637_udc_data); | ||
| 126 | /* I2C */ | ||
| 127 | at91_add_device_i2c(NULL, 0); | ||
| 128 | /* SPI */ | ||
| 129 | at91_add_device_spi(NULL, 0); | ||
| 130 | /* NOR flash */ | ||
| 131 | platform_device_register(&csb_flash); | ||
| 132 | } | ||
| 133 | |||
| 134 | MACHINE_START(CSB637, "Cogent CSB637") | ||
| 135 | /* Maintainer: Bill Gatliff */ | ||
| 136 | .init_time = at91rm9200_timer_init, | ||
| 137 | .map_io = at91_map_io, | ||
| 138 | .handle_irq = at91_aic_handle_irq, | ||
| 139 | .init_early = csb637_init_early, | ||
| 140 | .init_irq = at91_init_irq_default, | ||
| 141 | .init_machine = csb637_board_init, | ||
| 142 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c deleted file mode 100644 index aa457a8b22f5..000000000000 --- a/arch/arm/mach-at91/board-eb9200.c +++ /dev/null | |||
| @@ -1,126 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-eb9200.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 SAN People, adapted for ATEB9200 from Embest | ||
| 5 | * by Andrew Patrikalakis | ||
| 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 as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/types.h> | ||
| 23 | #include <linux/gpio.h> | ||
| 24 | #include <linux/init.h> | ||
| 25 | #include <linux/mm.h> | ||
| 26 | #include <linux/module.h> | ||
| 27 | #include <linux/device.h> | ||
| 28 | |||
| 29 | #include <mach/hardware.h> | ||
| 30 | #include <asm/setup.h> | ||
| 31 | #include <asm/mach-types.h> | ||
| 32 | #include <asm/irq.h> | ||
| 33 | |||
| 34 | #include <asm/mach/arch.h> | ||
| 35 | #include <asm/mach/map.h> | ||
| 36 | #include <asm/mach/irq.h> | ||
| 37 | |||
| 38 | #include "at91_aic.h" | ||
| 39 | #include "board.h" | ||
| 40 | #include "generic.h" | ||
| 41 | #include "gpio.h" | ||
| 42 | |||
| 43 | |||
| 44 | static void __init eb9200_init_early(void) | ||
| 45 | { | ||
| 46 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 47 | at91_initialize(18432000); | ||
| 48 | } | ||
| 49 | |||
| 50 | static struct macb_platform_data __initdata eb9200_eth_data = { | ||
| 51 | .phy_irq_pin = AT91_PIN_PC4, | ||
| 52 | .is_rmii = 1, | ||
| 53 | }; | ||
| 54 | |||
| 55 | static struct at91_usbh_data __initdata eb9200_usbh_data = { | ||
| 56 | .ports = 2, | ||
| 57 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 58 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 59 | }; | ||
| 60 | |||
| 61 | static struct at91_udc_data __initdata eb9200_udc_data = { | ||
| 62 | .vbus_pin = AT91_PIN_PD4, | ||
| 63 | .pullup_pin = AT91_PIN_PD5, | ||
| 64 | }; | ||
| 65 | |||
| 66 | static struct at91_cf_data __initdata eb9200_cf_data = { | ||
| 67 | .irq_pin = -EINVAL, | ||
| 68 | .det_pin = AT91_PIN_PB0, | ||
| 69 | .vcc_pin = -EINVAL, | ||
| 70 | .rst_pin = AT91_PIN_PC5, | ||
| 71 | }; | ||
| 72 | |||
| 73 | static struct mci_platform_data __initdata eb9200_mci0_data = { | ||
| 74 | .slot[0] = { | ||
| 75 | .bus_width = 4, | ||
| 76 | .detect_pin = -EINVAL, | ||
| 77 | .wp_pin = -EINVAL, | ||
| 78 | }, | ||
| 79 | }; | ||
| 80 | |||
| 81 | static struct i2c_board_info __initdata eb9200_i2c_devices[] = { | ||
| 82 | { | ||
| 83 | I2C_BOARD_INFO("24c512", 0x50), | ||
| 84 | }, | ||
| 85 | }; | ||
| 86 | |||
| 87 | |||
| 88 | static void __init eb9200_board_init(void) | ||
| 89 | { | ||
| 90 | /* Serial */ | ||
| 91 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 92 | at91_register_uart(0, 0, 0); | ||
| 93 | |||
| 94 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
| 95 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
| 96 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
| 97 | | ATMEL_UART_RI); | ||
| 98 | |||
| 99 | /* USART2 on ttyS2. (Rx, Tx) - IRDA */ | ||
| 100 | at91_register_uart(AT91RM9200_ID_US2, 2, 0); | ||
| 101 | at91_add_device_serial(); | ||
| 102 | /* Ethernet */ | ||
| 103 | at91_add_device_eth(&eb9200_eth_data); | ||
| 104 | /* USB Host */ | ||
| 105 | at91_add_device_usbh(&eb9200_usbh_data); | ||
| 106 | /* USB Device */ | ||
| 107 | at91_add_device_udc(&eb9200_udc_data); | ||
| 108 | /* I2C */ | ||
| 109 | at91_add_device_i2c(eb9200_i2c_devices, ARRAY_SIZE(eb9200_i2c_devices)); | ||
| 110 | /* Compact Flash */ | ||
| 111 | at91_add_device_cf(&eb9200_cf_data); | ||
| 112 | /* SPI */ | ||
| 113 | at91_add_device_spi(NULL, 0); | ||
| 114 | /* MMC */ | ||
| 115 | /* only supports 1 or 4 bit interface, not wired through to SPI */ | ||
| 116 | at91_add_device_mci(0, &eb9200_mci0_data); | ||
| 117 | } | ||
| 118 | |||
| 119 | MACHINE_START(ATEB9200, "Embest ATEB9200") | ||
| 120 | .init_time = at91rm9200_timer_init, | ||
| 121 | .map_io = at91_map_io, | ||
| 122 | .handle_irq = at91_aic_handle_irq, | ||
| 123 | .init_early = eb9200_init_early, | ||
| 124 | .init_irq = at91_init_irq_default, | ||
| 125 | .init_machine = eb9200_board_init, | ||
| 126 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c deleted file mode 100644 index ede1373ccaba..000000000000 --- a/arch/arm/mach-at91/board-ecbat91.c +++ /dev/null | |||
| @@ -1,191 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91rm9200/board-ecbat91.c | ||
| 3 | * Copyright (C) 2007 emQbit.com. | ||
| 4 | * | ||
| 5 | * We started from board-dk.c, which is Copyright (C) 2005 SAN People. | ||
| 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 as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/types.h> | ||
| 23 | #include <linux/gpio.h> | ||
| 24 | #include <linux/init.h> | ||
| 25 | #include <linux/mm.h> | ||
| 26 | #include <linux/module.h> | ||
| 27 | #include <linux/platform_device.h> | ||
| 28 | #include <linux/spi/spi.h> | ||
| 29 | #include <linux/spi/flash.h> | ||
| 30 | |||
| 31 | #include <mach/hardware.h> | ||
| 32 | #include <asm/setup.h> | ||
| 33 | #include <asm/mach-types.h> | ||
| 34 | #include <asm/irq.h> | ||
| 35 | |||
| 36 | #include <asm/mach/arch.h> | ||
| 37 | #include <asm/mach/map.h> | ||
| 38 | #include <asm/mach/irq.h> | ||
| 39 | |||
| 40 | #include <mach/cpu.h> | ||
| 41 | |||
| 42 | #include "at91_aic.h" | ||
| 43 | #include "board.h" | ||
| 44 | #include "generic.h" | ||
| 45 | #include "gpio.h" | ||
| 46 | |||
| 47 | |||
| 48 | static void __init ecb_at91init_early(void) | ||
| 49 | { | ||
| 50 | /* Set cpu type: PQFP */ | ||
| 51 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
| 52 | |||
| 53 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 54 | at91_initialize(18432000); | ||
| 55 | } | ||
| 56 | |||
| 57 | static struct macb_platform_data __initdata ecb_at91eth_data = { | ||
| 58 | .phy_irq_pin = AT91_PIN_PC4, | ||
| 59 | .is_rmii = 0, | ||
| 60 | }; | ||
| 61 | |||
| 62 | static struct at91_usbh_data __initdata ecb_at91usbh_data = { | ||
| 63 | .ports = 1, | ||
| 64 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 65 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 66 | }; | ||
| 67 | |||
| 68 | static struct mci_platform_data __initdata ecbat91_mci0_data = { | ||
| 69 | .slot[0] = { | ||
| 70 | .bus_width = 4, | ||
| 71 | .detect_pin = -EINVAL, | ||
| 72 | .wp_pin = -EINVAL, | ||
| 73 | }, | ||
| 74 | }; | ||
| 75 | |||
| 76 | |||
| 77 | #if defined(CONFIG_MTD_DATAFLASH) | ||
| 78 | static struct mtd_partition __initdata my_flash0_partitions[] = | ||
| 79 | { | ||
| 80 | { /* 0x8400 */ | ||
| 81 | .name = "Darrell-loader", | ||
| 82 | .offset = 0, | ||
| 83 | .size = 12 * 1056, | ||
| 84 | }, | ||
| 85 | { | ||
| 86 | .name = "U-boot", | ||
| 87 | .offset = MTDPART_OFS_NXTBLK, | ||
| 88 | .size = 110 * 1056, | ||
| 89 | }, | ||
| 90 | { /* 1336 (167 blocks) pages * 1056 bytes = 0x158700 bytes */ | ||
| 91 | .name = "UBoot-env", | ||
| 92 | .offset = MTDPART_OFS_NXTBLK, | ||
| 93 | .size = 8 * 1056, | ||
| 94 | }, | ||
| 95 | { /* 1336 (167 blocks) pages * 1056 bytes = 0x158700 bytes */ | ||
| 96 | .name = "Kernel", | ||
| 97 | .offset = MTDPART_OFS_NXTBLK, | ||
| 98 | .size = 1534 * 1056, | ||
| 99 | }, | ||
| 100 | { /* 190200 - jffs2 root filesystem */ | ||
| 101 | .name = "Filesystem", | ||
| 102 | .offset = MTDPART_OFS_NXTBLK, | ||
| 103 | .size = MTDPART_SIZ_FULL, /* 26 sectors */ | ||
| 104 | } | ||
| 105 | }; | ||
| 106 | |||
| 107 | static struct flash_platform_data __initdata my_flash0_platform = { | ||
| 108 | .name = "Removable flash card", | ||
| 109 | .parts = my_flash0_partitions, | ||
| 110 | .nr_parts = ARRAY_SIZE(my_flash0_partitions) | ||
| 111 | }; | ||
| 112 | |||
| 113 | #endif | ||
| 114 | |||
| 115 | static struct spi_board_info __initdata ecb_at91spi_devices[] = { | ||
| 116 | { /* DataFlash chip */ | ||
| 117 | .modalias = "mtd_dataflash", | ||
| 118 | .chip_select = 0, | ||
| 119 | .max_speed_hz = 10 * 1000 * 1000, | ||
| 120 | .bus_num = 0, | ||
| 121 | #if defined(CONFIG_MTD_DATAFLASH) | ||
| 122 | .platform_data = &my_flash0_platform, | ||
| 123 | #endif | ||
| 124 | }, | ||
| 125 | { /* User accessible spi - cs1 (250KHz) */ | ||
| 126 | .modalias = "spi-cs1", | ||
| 127 | .chip_select = 1, | ||
| 128 | .max_speed_hz = 250 * 1000, | ||
| 129 | }, | ||
| 130 | { /* User accessible spi - cs2 (1MHz) */ | ||
| 131 | .modalias = "spi-cs2", | ||
| 132 | .chip_select = 2, | ||
| 133 | .max_speed_hz = 1 * 1000 * 1000, | ||
| 134 | }, | ||
| 135 | { /* User accessible spi - cs3 (10MHz) */ | ||
| 136 | .modalias = "spi-cs3", | ||
| 137 | .chip_select = 3, | ||
| 138 | .max_speed_hz = 10 * 1000 * 1000, | ||
| 139 | }, | ||
| 140 | }; | ||
| 141 | |||
| 142 | /* | ||
| 143 | * LEDs | ||
| 144 | */ | ||
| 145 | static struct gpio_led ecb_leds[] = { | ||
| 146 | { /* D1 */ | ||
| 147 | .name = "led1", | ||
| 148 | .gpio = AT91_PIN_PC7, | ||
| 149 | .active_low = 1, | ||
| 150 | .default_trigger = "heartbeat", | ||
| 151 | } | ||
| 152 | }; | ||
| 153 | |||
| 154 | static void __init ecb_at91board_init(void) | ||
| 155 | { | ||
| 156 | /* Serial */ | ||
| 157 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 158 | at91_register_uart(0, 0, 0); | ||
| 159 | |||
| 160 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
| 161 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
| 162 | at91_add_device_serial(); | ||
| 163 | |||
| 164 | /* Ethernet */ | ||
| 165 | at91_add_device_eth(&ecb_at91eth_data); | ||
| 166 | |||
| 167 | /* USB Host */ | ||
| 168 | at91_add_device_usbh(&ecb_at91usbh_data); | ||
| 169 | |||
| 170 | /* I2C */ | ||
| 171 | at91_add_device_i2c(NULL, 0); | ||
| 172 | |||
| 173 | /* MMC */ | ||
| 174 | at91_add_device_mci(0, &ecbat91_mci0_data); | ||
| 175 | |||
| 176 | /* SPI */ | ||
| 177 | at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices)); | ||
| 178 | |||
| 179 | /* LEDs */ | ||
| 180 | at91_gpio_leds(ecb_leds, ARRAY_SIZE(ecb_leds)); | ||
| 181 | } | ||
| 182 | |||
| 183 | MACHINE_START(ECBAT91, "emQbit's ECB_AT91") | ||
| 184 | /* Maintainer: emQbit.com */ | ||
| 185 | .init_time = at91rm9200_timer_init, | ||
| 186 | .map_io = at91_map_io, | ||
| 187 | .handle_irq = at91_aic_handle_irq, | ||
| 188 | .init_early = ecb_at91init_early, | ||
| 189 | .init_irq = at91_init_irq_default, | ||
| 190 | .init_machine = ecb_at91board_init, | ||
| 191 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c deleted file mode 100644 index 4e75321a8f2a..000000000000 --- a/arch/arm/mach-at91/board-eco920.c +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * This program is free software; you can redistribute it and/or modify | ||
| 3 | * it under the terms of the GNU General Public License as published by | ||
| 4 | * the Free Software Foundation; either version 2 of the License, or | ||
| 5 | * (at your option) any later version. | ||
| 6 | * | ||
| 7 | * This program is distributed in the hope that it will be useful, | ||
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | * GNU General Public License for more details. | ||
| 11 | * | ||
| 12 | * You should have received a copy of the GNU General Public License | ||
| 13 | * along with this program; if not, write to the Free Software | ||
| 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/init.h> | ||
| 18 | #include <linux/platform_device.h> | ||
| 19 | #include <linux/mtd/physmap.h> | ||
| 20 | #include <linux/gpio.h> | ||
| 21 | |||
| 22 | #include <asm/mach-types.h> | ||
| 23 | |||
| 24 | #include <asm/mach/arch.h> | ||
| 25 | #include <asm/mach/map.h> | ||
| 26 | |||
| 27 | #include <mach/at91rm9200_mc.h> | ||
| 28 | #include <mach/at91_ramc.h> | ||
| 29 | #include <mach/cpu.h> | ||
| 30 | |||
| 31 | #include "at91_aic.h" | ||
| 32 | #include "board.h" | ||
| 33 | #include "generic.h" | ||
| 34 | #include "gpio.h" | ||
| 35 | |||
| 36 | |||
| 37 | static void __init eco920_init_early(void) | ||
| 38 | { | ||
| 39 | /* Set cpu type: PQFP */ | ||
| 40 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
| 41 | |||
| 42 | at91_initialize(18432000); | ||
| 43 | } | ||
| 44 | |||
| 45 | static struct macb_platform_data __initdata eco920_eth_data = { | ||
| 46 | .phy_irq_pin = AT91_PIN_PC2, | ||
| 47 | .is_rmii = 1, | ||
| 48 | }; | ||
| 49 | |||
| 50 | static struct at91_usbh_data __initdata eco920_usbh_data = { | ||
| 51 | .ports = 1, | ||
| 52 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 53 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 54 | }; | ||
| 55 | |||
| 56 | static struct at91_udc_data __initdata eco920_udc_data = { | ||
| 57 | .vbus_pin = AT91_PIN_PB12, | ||
| 58 | .pullup_pin = AT91_PIN_PB13, | ||
| 59 | }; | ||
| 60 | |||
| 61 | static struct mci_platform_data __initdata eco920_mci0_data = { | ||
| 62 | .slot[0] = { | ||
| 63 | .bus_width = 1, | ||
| 64 | .detect_pin = -EINVAL, | ||
| 65 | .wp_pin = -EINVAL, | ||
| 66 | }, | ||
| 67 | }; | ||
| 68 | |||
| 69 | static struct physmap_flash_data eco920_flash_data = { | ||
| 70 | .width = 2, | ||
| 71 | }; | ||
| 72 | |||
| 73 | static struct resource eco920_flash_resource = { | ||
| 74 | .start = 0x11000000, | ||
| 75 | .end = 0x11ffffff, | ||
| 76 | .flags = IORESOURCE_MEM, | ||
| 77 | }; | ||
| 78 | |||
| 79 | static struct platform_device eco920_flash = { | ||
| 80 | .name = "physmap-flash", | ||
| 81 | .id = 0, | ||
| 82 | .dev = { | ||
| 83 | .platform_data = &eco920_flash_data, | ||
| 84 | }, | ||
| 85 | .resource = &eco920_flash_resource, | ||
| 86 | .num_resources = 1, | ||
| 87 | }; | ||
| 88 | |||
| 89 | static struct spi_board_info eco920_spi_devices[] = { | ||
| 90 | { /* CAN controller */ | ||
| 91 | .modalias = "tlv5638", | ||
| 92 | .chip_select = 3, | ||
| 93 | .max_speed_hz = 20 * 1000 * 1000, | ||
| 94 | .mode = SPI_CPHA, | ||
| 95 | }, | ||
| 96 | }; | ||
| 97 | |||
| 98 | /* | ||
| 99 | * LEDs | ||
| 100 | */ | ||
| 101 | static struct gpio_led eco920_leds[] = { | ||
| 102 | { /* D1 */ | ||
| 103 | .name = "led1", | ||
| 104 | .gpio = AT91_PIN_PB0, | ||
| 105 | .active_low = 1, | ||
| 106 | .default_trigger = "heartbeat", | ||
| 107 | }, | ||
| 108 | { /* D2 */ | ||
| 109 | .name = "led2", | ||
| 110 | .gpio = AT91_PIN_PB1, | ||
| 111 | .active_low = 1, | ||
| 112 | .default_trigger = "timer", | ||
| 113 | } | ||
| 114 | }; | ||
| 115 | |||
| 116 | static void __init eco920_board_init(void) | ||
| 117 | { | ||
| 118 | /* DBGU on ttyS0. (Rx & Tx only */ | ||
| 119 | at91_register_uart(0, 0, 0); | ||
| 120 | at91_add_device_serial(); | ||
| 121 | at91_add_device_eth(&eco920_eth_data); | ||
| 122 | at91_add_device_usbh(&eco920_usbh_data); | ||
| 123 | at91_add_device_udc(&eco920_udc_data); | ||
| 124 | |||
| 125 | at91_add_device_mci(0, &eco920_mci0_data); | ||
| 126 | platform_device_register(&eco920_flash); | ||
| 127 | |||
| 128 | at91_ramc_write(0, AT91_SMC_CSR(7), AT91_SMC_RWHOLD_(1) | ||
| 129 | | AT91_SMC_RWSETUP_(1) | ||
| 130 | | AT91_SMC_DBW_8 | ||
| 131 | | AT91_SMC_WSEN | ||
| 132 | | AT91_SMC_NWS_(15)); | ||
| 133 | |||
| 134 | at91_set_A_periph(AT91_PIN_PC6, 1); | ||
| 135 | |||
| 136 | at91_set_gpio_input(AT91_PIN_PA23, 0); | ||
| 137 | at91_set_deglitch(AT91_PIN_PA23, 1); | ||
| 138 | |||
| 139 | /* Initialization of the Static Memory Controller for Chip Select 3 */ | ||
| 140 | at91_ramc_write(0, AT91_SMC_CSR(3), | ||
| 141 | AT91_SMC_DBW_16 | /* 16 bit */ | ||
| 142 | AT91_SMC_WSEN | | ||
| 143 | AT91_SMC_NWS_(5) | /* wait states */ | ||
| 144 | AT91_SMC_TDF_(1) /* float time */ | ||
| 145 | ); | ||
| 146 | |||
| 147 | at91_add_device_spi(eco920_spi_devices, ARRAY_SIZE(eco920_spi_devices)); | ||
| 148 | /* LEDs */ | ||
| 149 | at91_gpio_leds(eco920_leds, ARRAY_SIZE(eco920_leds)); | ||
| 150 | } | ||
| 151 | |||
| 152 | MACHINE_START(ECO920, "eco920") | ||
| 153 | /* Maintainer: Sascha Hauer */ | ||
| 154 | .init_time = at91rm9200_timer_init, | ||
| 155 | .map_io = at91_map_io, | ||
| 156 | .handle_irq = at91_aic_handle_irq, | ||
| 157 | .init_early = eco920_init_early, | ||
| 158 | .init_irq = at91_init_irq_default, | ||
| 159 | .init_machine = eco920_board_init, | ||
| 160 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c deleted file mode 100644 index 93b1df42f639..000000000000 --- a/arch/arm/mach-at91/board-kafa.c +++ /dev/null | |||
| @@ -1,113 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-kafa.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2006 Sperry-Sun | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 19 | */ | ||
| 20 | |||
| 21 | #include <linux/types.h> | ||
| 22 | #include <linux/gpio.h> | ||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/mm.h> | ||
| 25 | #include <linux/module.h> | ||
| 26 | #include <linux/platform_device.h> | ||
| 27 | |||
| 28 | #include <mach/hardware.h> | ||
| 29 | #include <asm/setup.h> | ||
| 30 | #include <asm/mach-types.h> | ||
| 31 | #include <asm/irq.h> | ||
| 32 | |||
| 33 | #include <asm/mach/arch.h> | ||
| 34 | #include <asm/mach/map.h> | ||
| 35 | #include <asm/mach/irq.h> | ||
| 36 | |||
| 37 | #include <mach/cpu.h> | ||
| 38 | |||
| 39 | #include "at91_aic.h" | ||
| 40 | #include "board.h" | ||
| 41 | #include "generic.h" | ||
| 42 | #include "gpio.h" | ||
| 43 | |||
| 44 | |||
| 45 | static void __init kafa_init_early(void) | ||
| 46 | { | ||
| 47 | /* Set cpu type: PQFP */ | ||
| 48 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
| 49 | |||
| 50 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 51 | at91_initialize(18432000); | ||
| 52 | } | ||
| 53 | |||
| 54 | static struct macb_platform_data __initdata kafa_eth_data = { | ||
| 55 | .phy_irq_pin = AT91_PIN_PC4, | ||
| 56 | .is_rmii = 0, | ||
| 57 | }; | ||
| 58 | |||
| 59 | static struct at91_usbh_data __initdata kafa_usbh_data = { | ||
| 60 | .ports = 1, | ||
| 61 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 62 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 63 | }; | ||
| 64 | |||
| 65 | static struct at91_udc_data __initdata kafa_udc_data = { | ||
| 66 | .vbus_pin = AT91_PIN_PB6, | ||
| 67 | .pullup_pin = AT91_PIN_PB7, | ||
| 68 | }; | ||
| 69 | |||
| 70 | /* | ||
| 71 | * LEDs | ||
| 72 | */ | ||
| 73 | static struct gpio_led kafa_leds[] = { | ||
| 74 | { /* D1 */ | ||
| 75 | .name = "led1", | ||
| 76 | .gpio = AT91_PIN_PB4, | ||
| 77 | .active_low = 1, | ||
| 78 | .default_trigger = "heartbeat", | ||
| 79 | }, | ||
| 80 | }; | ||
| 81 | |||
| 82 | static void __init kafa_board_init(void) | ||
| 83 | { | ||
| 84 | /* Serial */ | ||
| 85 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 86 | at91_register_uart(0, 0, 0); | ||
| 87 | |||
| 88 | /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */ | ||
| 89 | at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
| 90 | at91_add_device_serial(); | ||
| 91 | /* Ethernet */ | ||
| 92 | at91_add_device_eth(&kafa_eth_data); | ||
| 93 | /* USB Host */ | ||
| 94 | at91_add_device_usbh(&kafa_usbh_data); | ||
| 95 | /* USB Device */ | ||
| 96 | at91_add_device_udc(&kafa_udc_data); | ||
| 97 | /* I2C */ | ||
| 98 | at91_add_device_i2c(NULL, 0); | ||
| 99 | /* SPI */ | ||
| 100 | at91_add_device_spi(NULL, 0); | ||
| 101 | /* LEDs */ | ||
| 102 | at91_gpio_leds(kafa_leds, ARRAY_SIZE(kafa_leds)); | ||
| 103 | } | ||
| 104 | |||
| 105 | MACHINE_START(KAFA, "Sperry-Sun KAFA") | ||
| 106 | /* Maintainer: Sergei Sharonov */ | ||
| 107 | .init_time = at91rm9200_timer_init, | ||
| 108 | .map_io = at91_map_io, | ||
| 109 | .handle_irq = at91_aic_handle_irq, | ||
| 110 | .init_early = kafa_init_early, | ||
| 111 | .init_irq = at91_init_irq_default, | ||
| 112 | .init_machine = kafa_board_init, | ||
| 113 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c deleted file mode 100644 index d58d36225e08..000000000000 --- a/arch/arm/mach-at91/board-kb9202.c +++ /dev/null | |||
| @@ -1,159 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-kb9202.c | ||
| 3 | * | ||
| 4 | * Copyright (c) 2005 kb_admin | ||
| 5 | * KwikByte, Inc. | ||
| 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 as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/types.h> | ||
| 23 | #include <linux/gpio.h> | ||
| 24 | #include <linux/init.h> | ||
| 25 | #include <linux/mm.h> | ||
| 26 | #include <linux/module.h> | ||
| 27 | #include <linux/platform_device.h> | ||
| 28 | |||
| 29 | #include <mach/hardware.h> | ||
| 30 | #include <asm/setup.h> | ||
| 31 | #include <asm/mach-types.h> | ||
| 32 | #include <asm/irq.h> | ||
| 33 | |||
| 34 | #include <asm/mach/arch.h> | ||
| 35 | #include <asm/mach/map.h> | ||
| 36 | #include <asm/mach/irq.h> | ||
| 37 | |||
| 38 | #include <mach/cpu.h> | ||
| 39 | #include <mach/at91rm9200_mc.h> | ||
| 40 | #include <mach/at91_ramc.h> | ||
| 41 | |||
| 42 | #include "at91_aic.h" | ||
| 43 | #include "board.h" | ||
| 44 | #include "generic.h" | ||
| 45 | #include "gpio.h" | ||
| 46 | |||
| 47 | |||
| 48 | static void __init kb9202_init_early(void) | ||
| 49 | { | ||
| 50 | /* Set cpu type: PQFP */ | ||
| 51 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
| 52 | |||
| 53 | /* Initialize processor: 10 MHz crystal */ | ||
| 54 | at91_initialize(10000000); | ||
| 55 | } | ||
| 56 | |||
| 57 | static struct macb_platform_data __initdata kb9202_eth_data = { | ||
| 58 | .phy_irq_pin = AT91_PIN_PB29, | ||
| 59 | .is_rmii = 0, | ||
| 60 | }; | ||
| 61 | |||
| 62 | static struct at91_usbh_data __initdata kb9202_usbh_data = { | ||
| 63 | .ports = 1, | ||
| 64 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 65 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 66 | }; | ||
| 67 | |||
| 68 | static struct at91_udc_data __initdata kb9202_udc_data = { | ||
| 69 | .vbus_pin = AT91_PIN_PB24, | ||
| 70 | .pullup_pin = AT91_PIN_PB22, | ||
| 71 | }; | ||
| 72 | |||
| 73 | static struct mci_platform_data __initdata kb9202_mci0_data = { | ||
| 74 | .slot[0] = { | ||
| 75 | .bus_width = 4, | ||
| 76 | .detect_pin = AT91_PIN_PB2, | ||
| 77 | .wp_pin = -EINVAL, | ||
| 78 | }, | ||
| 79 | }; | ||
| 80 | |||
| 81 | static struct mtd_partition __initdata kb9202_nand_partition[] = { | ||
| 82 | { | ||
| 83 | .name = "nand_fs", | ||
| 84 | .offset = 0, | ||
| 85 | .size = MTDPART_SIZ_FULL, | ||
| 86 | }, | ||
| 87 | }; | ||
| 88 | |||
| 89 | static struct atmel_nand_data __initdata kb9202_nand_data = { | ||
| 90 | .ale = 22, | ||
| 91 | .cle = 21, | ||
| 92 | .det_pin = -EINVAL, | ||
| 93 | .rdy_pin = AT91_PIN_PC29, | ||
| 94 | .enable_pin = AT91_PIN_PC28, | ||
| 95 | .ecc_mode = NAND_ECC_SOFT, | ||
| 96 | .parts = kb9202_nand_partition, | ||
| 97 | .num_parts = ARRAY_SIZE(kb9202_nand_partition), | ||
| 98 | }; | ||
| 99 | |||
| 100 | /* | ||
| 101 | * LEDs | ||
| 102 | */ | ||
| 103 | static struct gpio_led kb9202_leds[] = { | ||
| 104 | { /* D1 */ | ||
| 105 | .name = "led1", | ||
| 106 | .gpio = AT91_PIN_PC19, | ||
| 107 | .active_low = 1, | ||
| 108 | .default_trigger = "heartbeat", | ||
| 109 | }, | ||
| 110 | { /* D2 */ | ||
| 111 | .name = "led2", | ||
| 112 | .gpio = AT91_PIN_PC18, | ||
| 113 | .active_low = 1, | ||
| 114 | .default_trigger = "timer", | ||
| 115 | } | ||
| 116 | }; | ||
| 117 | |||
| 118 | static void __init kb9202_board_init(void) | ||
| 119 | { | ||
| 120 | /* Serial */ | ||
| 121 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 122 | at91_register_uart(0, 0, 0); | ||
| 123 | |||
| 124 | /* USART0 on ttyS1 (Rx & Tx only) */ | ||
| 125 | at91_register_uart(AT91RM9200_ID_US0, 1, 0); | ||
| 126 | |||
| 127 | /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ | ||
| 128 | at91_register_uart(AT91RM9200_ID_US1, 2, 0); | ||
| 129 | |||
| 130 | /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ | ||
| 131 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
| 132 | at91_add_device_serial(); | ||
| 133 | /* Ethernet */ | ||
| 134 | at91_add_device_eth(&kb9202_eth_data); | ||
| 135 | /* USB Host */ | ||
| 136 | at91_add_device_usbh(&kb9202_usbh_data); | ||
| 137 | /* USB Device */ | ||
| 138 | at91_add_device_udc(&kb9202_udc_data); | ||
| 139 | /* MMC */ | ||
| 140 | at91_add_device_mci(0, &kb9202_mci0_data); | ||
| 141 | /* I2C */ | ||
| 142 | at91_add_device_i2c(NULL, 0); | ||
| 143 | /* SPI */ | ||
| 144 | at91_add_device_spi(NULL, 0); | ||
| 145 | /* NAND */ | ||
| 146 | at91_add_device_nand(&kb9202_nand_data); | ||
| 147 | /* LEDs */ | ||
| 148 | at91_gpio_leds(kb9202_leds, ARRAY_SIZE(kb9202_leds)); | ||
| 149 | } | ||
| 150 | |||
| 151 | MACHINE_START(KB9200, "KB920x") | ||
| 152 | /* Maintainer: KwikByte, Inc. */ | ||
| 153 | .init_time = at91rm9200_timer_init, | ||
| 154 | .map_io = at91_map_io, | ||
| 155 | .handle_irq = at91_aic_handle_irq, | ||
| 156 | .init_early = kb9202_init_early, | ||
| 157 | .init_irq = at91_init_irq_default, | ||
| 158 | .init_machine = kb9202_board_init, | ||
| 159 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c deleted file mode 100644 index 2c0f2d554d84..000000000000 --- a/arch/arm/mach-at91/board-picotux200.c +++ /dev/null | |||
| @@ -1,129 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-picotux200.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 SAN People | ||
| 5 | * Copyright (C) 2007 Kleinhenz Elektronik GmbH | ||
| 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 as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <linux/types.h> | ||
| 23 | #include <linux/gpio.h> | ||
| 24 | #include <linux/init.h> | ||
| 25 | #include <linux/mm.h> | ||
| 26 | #include <linux/module.h> | ||
| 27 | #include <linux/platform_device.h> | ||
| 28 | #include <linux/spi/spi.h> | ||
| 29 | #include <linux/mtd/physmap.h> | ||
| 30 | |||
| 31 | #include <mach/hardware.h> | ||
| 32 | #include <asm/setup.h> | ||
| 33 | #include <asm/mach-types.h> | ||
| 34 | #include <asm/irq.h> | ||
| 35 | |||
| 36 | #include <asm/mach/arch.h> | ||
| 37 | #include <asm/mach/map.h> | ||
| 38 | #include <asm/mach/irq.h> | ||
| 39 | |||
| 40 | #include <mach/at91rm9200_mc.h> | ||
| 41 | #include <mach/at91_ramc.h> | ||
| 42 | |||
| 43 | #include "at91_aic.h" | ||
| 44 | #include "board.h" | ||
| 45 | #include "generic.h" | ||
| 46 | #include "gpio.h" | ||
| 47 | |||
| 48 | |||
| 49 | static void __init picotux200_init_early(void) | ||
| 50 | { | ||
| 51 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 52 | at91_initialize(18432000); | ||
| 53 | } | ||
| 54 | |||
| 55 | static struct macb_platform_data __initdata picotux200_eth_data = { | ||
| 56 | .phy_irq_pin = AT91_PIN_PC4, | ||
| 57 | .is_rmii = 1, | ||
| 58 | }; | ||
| 59 | |||
| 60 | static struct at91_usbh_data __initdata picotux200_usbh_data = { | ||
| 61 | .ports = 1, | ||
| 62 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 63 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 64 | }; | ||
| 65 | |||
| 66 | static struct mci_platform_data __initdata picotux200_mci0_data = { | ||
| 67 | .slot[0] = { | ||
| 68 | .bus_width = 4, | ||
| 69 | .detect_pin = AT91_PIN_PB27, | ||
| 70 | .wp_pin = AT91_PIN_PA17, | ||
| 71 | }, | ||
| 72 | }; | ||
| 73 | |||
| 74 | #define PICOTUX200_FLASH_BASE AT91_CHIPSELECT_0 | ||
| 75 | #define PICOTUX200_FLASH_SIZE SZ_4M | ||
| 76 | |||
| 77 | static struct physmap_flash_data picotux200_flash_data = { | ||
| 78 | .width = 2, | ||
| 79 | }; | ||
| 80 | |||
| 81 | static struct resource picotux200_flash_resource = { | ||
| 82 | .start = PICOTUX200_FLASH_BASE, | ||
| 83 | .end = PICOTUX200_FLASH_BASE + PICOTUX200_FLASH_SIZE - 1, | ||
| 84 | .flags = IORESOURCE_MEM, | ||
| 85 | }; | ||
| 86 | |||
| 87 | static struct platform_device picotux200_flash = { | ||
| 88 | .name = "physmap-flash", | ||
| 89 | .id = 0, | ||
| 90 | .dev = { | ||
| 91 | .platform_data = &picotux200_flash_data, | ||
| 92 | }, | ||
| 93 | .resource = &picotux200_flash_resource, | ||
| 94 | .num_resources = 1, | ||
| 95 | }; | ||
| 96 | |||
| 97 | static void __init picotux200_board_init(void) | ||
| 98 | { | ||
| 99 | /* Serial */ | ||
| 100 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 101 | at91_register_uart(0, 0, 0); | ||
| 102 | |||
| 103 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
| 104 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
| 105 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
| 106 | | ATMEL_UART_RI); | ||
| 107 | at91_add_device_serial(); | ||
| 108 | /* Ethernet */ | ||
| 109 | at91_add_device_eth(&picotux200_eth_data); | ||
| 110 | /* USB Host */ | ||
| 111 | at91_add_device_usbh(&picotux200_usbh_data); | ||
| 112 | /* I2C */ | ||
| 113 | at91_add_device_i2c(NULL, 0); | ||
| 114 | /* MMC */ | ||
| 115 | at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ | ||
| 116 | at91_add_device_mci(0, &picotux200_mci0_data); | ||
| 117 | /* NOR Flash */ | ||
| 118 | platform_device_register(&picotux200_flash); | ||
| 119 | } | ||
| 120 | |||
| 121 | MACHINE_START(PICOTUX2XX, "picotux 200") | ||
| 122 | /* Maintainer: Kleinhenz Elektronik GmbH */ | ||
| 123 | .init_time = at91rm9200_timer_init, | ||
| 124 | .map_io = at91_map_io, | ||
| 125 | .handle_irq = at91_aic_handle_irq, | ||
| 126 | .init_early = picotux200_init_early, | ||
| 127 | .init_irq = at91_init_irq_default, | ||
| 128 | .init_machine = picotux200_board_init, | ||
| 129 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c deleted file mode 100644 index 953cea416754..000000000000 --- a/arch/arm/mach-at91/board-rm9200ek.c +++ /dev/null | |||
| @@ -1,196 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-rm9200ek.c | ||
| 3 | * | ||
| 4 | * Copyright (C) 2005 SAN People | ||
| 5 | * | ||
| 6 | * Epson S1D framebuffer glue code is: | ||
| 7 | * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | */ | ||
| 23 | |||
| 24 | #include <linux/types.h> | ||
| 25 | #include <linux/gpio.h> | ||
| 26 | #include <linux/init.h> | ||
| 27 | #include <linux/mm.h> | ||
| 28 | #include <linux/module.h> | ||
| 29 | #include <linux/platform_device.h> | ||
| 30 | #include <linux/spi/spi.h> | ||
| 31 | #include <linux/mtd/physmap.h> | ||
| 32 | |||
| 33 | #include <asm/setup.h> | ||
| 34 | #include <asm/mach-types.h> | ||
| 35 | #include <asm/irq.h> | ||
| 36 | |||
| 37 | #include <asm/mach/arch.h> | ||
| 38 | #include <asm/mach/map.h> | ||
| 39 | #include <asm/mach/irq.h> | ||
| 40 | |||
| 41 | #include <mach/hardware.h> | ||
| 42 | #include <mach/at91rm9200_mc.h> | ||
| 43 | #include <mach/at91_ramc.h> | ||
| 44 | |||
| 45 | #include "at91_aic.h" | ||
| 46 | #include "board.h" | ||
| 47 | #include "generic.h" | ||
| 48 | #include "gpio.h" | ||
| 49 | |||
| 50 | |||
| 51 | static void __init ek_init_early(void) | ||
| 52 | { | ||
| 53 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 54 | at91_initialize(18432000); | ||
| 55 | } | ||
| 56 | |||
| 57 | static struct macb_platform_data __initdata ek_eth_data = { | ||
| 58 | .phy_irq_pin = AT91_PIN_PC4, | ||
| 59 | .is_rmii = 1, | ||
| 60 | }; | ||
| 61 | |||
| 62 | static struct at91_usbh_data __initdata ek_usbh_data = { | ||
| 63 | .ports = 2, | ||
| 64 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 65 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 66 | }; | ||
| 67 | |||
| 68 | static struct at91_udc_data __initdata ek_udc_data = { | ||
| 69 | .vbus_pin = AT91_PIN_PD4, | ||
| 70 | .pullup_pin = AT91_PIN_PD5, | ||
| 71 | }; | ||
| 72 | |||
| 73 | #ifndef CONFIG_MTD_AT91_DATAFLASH_CARD | ||
| 74 | static struct mci_platform_data __initdata ek_mci0_data = { | ||
| 75 | .slot[0] = { | ||
| 76 | .bus_width = 4, | ||
| 77 | .detect_pin = AT91_PIN_PB27, | ||
| 78 | .wp_pin = AT91_PIN_PA17, | ||
| 79 | } | ||
| 80 | }; | ||
| 81 | #endif | ||
| 82 | |||
| 83 | static struct spi_board_info ek_spi_devices[] = { | ||
| 84 | { /* DataFlash chip */ | ||
| 85 | .modalias = "mtd_dataflash", | ||
| 86 | .chip_select = 0, | ||
| 87 | .max_speed_hz = 15 * 1000 * 1000, | ||
| 88 | }, | ||
| 89 | #ifdef CONFIG_MTD_AT91_DATAFLASH_CARD | ||
| 90 | { /* DataFlash card */ | ||
| 91 | .modalias = "mtd_dataflash", | ||
| 92 | .chip_select = 3, | ||
| 93 | .max_speed_hz = 15 * 1000 * 1000, | ||
| 94 | }, | ||
| 95 | #endif | ||
| 96 | }; | ||
| 97 | |||
| 98 | static struct i2c_board_info __initdata ek_i2c_devices[] = { | ||
| 99 | { | ||
| 100 | I2C_BOARD_INFO("ics1523", 0x26), | ||
| 101 | }, | ||
| 102 | { | ||
| 103 | I2C_BOARD_INFO("dac3550", 0x4d), | ||
| 104 | } | ||
| 105 | }; | ||
| 106 | |||
| 107 | #define EK_FLASH_BASE AT91_CHIPSELECT_0 | ||
| 108 | #define EK_FLASH_SIZE SZ_8M | ||
| 109 | |||
| 110 | static struct physmap_flash_data ek_flash_data = { | ||
| 111 | .width = 2, | ||
| 112 | }; | ||
| 113 | |||
| 114 | static struct resource ek_flash_resource = { | ||
| 115 | .start = EK_FLASH_BASE, | ||
| 116 | .end = EK_FLASH_BASE + EK_FLASH_SIZE - 1, | ||
| 117 | .flags = IORESOURCE_MEM, | ||
| 118 | }; | ||
| 119 | |||
| 120 | static struct platform_device ek_flash = { | ||
| 121 | .name = "physmap-flash", | ||
| 122 | .id = 0, | ||
| 123 | .dev = { | ||
| 124 | .platform_data = &ek_flash_data, | ||
| 125 | }, | ||
| 126 | .resource = &ek_flash_resource, | ||
| 127 | .num_resources = 1, | ||
| 128 | }; | ||
| 129 | |||
| 130 | static struct gpio_led ek_leds[] = { | ||
| 131 | { /* "user led 1", DS2 */ | ||
| 132 | .name = "green", | ||
| 133 | .gpio = AT91_PIN_PB0, | ||
| 134 | .active_low = 1, | ||
| 135 | .default_trigger = "mmc0", | ||
| 136 | }, | ||
| 137 | { /* "user led 2", DS4 */ | ||
| 138 | .name = "yellow", | ||
| 139 | .gpio = AT91_PIN_PB1, | ||
| 140 | .active_low = 1, | ||
| 141 | .default_trigger = "heartbeat", | ||
| 142 | }, | ||
| 143 | { /* "user led 3", DS6 */ | ||
| 144 | .name = "red", | ||
| 145 | .gpio = AT91_PIN_PB2, | ||
| 146 | .active_low = 1, | ||
| 147 | } | ||
| 148 | }; | ||
| 149 | |||
| 150 | static void __init ek_board_init(void) | ||
| 151 | { | ||
| 152 | /* Serial */ | ||
| 153 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 154 | at91_register_uart(0, 0, 0); | ||
| 155 | |||
| 156 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
| 157 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
| 158 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
| 159 | | ATMEL_UART_RI); | ||
| 160 | at91_add_device_serial(); | ||
| 161 | /* Ethernet */ | ||
| 162 | at91_add_device_eth(&ek_eth_data); | ||
| 163 | /* USB Host */ | ||
| 164 | at91_add_device_usbh(&ek_usbh_data); | ||
| 165 | /* USB Device */ | ||
| 166 | at91_add_device_udc(&ek_udc_data); | ||
| 167 | at91_set_multi_drive(ek_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */ | ||
| 168 | /* I2C */ | ||
| 169 | at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); | ||
| 170 | /* SPI */ | ||
| 171 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | ||
| 172 | #ifdef CONFIG_MTD_AT91_DATAFLASH_CARD | ||
| 173 | /* DataFlash card */ | ||
| 174 | at91_set_gpio_output(AT91_PIN_PB22, 0); | ||
| 175 | #else | ||
| 176 | /* MMC */ | ||
| 177 | at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ | ||
| 178 | at91_add_device_mci(0, &ek_mci0_data); | ||
| 179 | #endif | ||
| 180 | /* NOR Flash */ | ||
| 181 | platform_device_register(&ek_flash); | ||
| 182 | /* LEDs */ | ||
| 183 | at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); | ||
| 184 | /* VGA */ | ||
| 185 | // ek_add_device_video(); | ||
| 186 | } | ||
| 187 | |||
| 188 | MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK") | ||
| 189 | /* Maintainer: SAN People/Atmel */ | ||
| 190 | .init_time = at91rm9200_timer_init, | ||
| 191 | .map_io = at91_map_io, | ||
| 192 | .handle_irq = at91_aic_handle_irq, | ||
| 193 | .init_early = ek_init_early, | ||
| 194 | .init_irq = at91_init_irq_default, | ||
| 195 | .init_machine = ek_board_init, | ||
| 196 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c deleted file mode 100644 index 46fdb0c68a68..000000000000 --- a/arch/arm/mach-at91/board-yl-9200.c +++ /dev/null | |||
| @@ -1,597 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * linux/arch/arm/mach-at91/board-yl-9200.c | ||
| 3 | * | ||
| 4 | * Adapted from various board files in arch/arm/mach-at91 | ||
| 5 | * | ||
| 6 | * Modifications for YL-9200 platform: | ||
| 7 | * Copyright (C) 2007 S. Birtles | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | */ | ||
| 23 | |||
| 24 | #include <linux/types.h> | ||
| 25 | #include <linux/gpio.h> | ||
| 26 | #include <linux/init.h> | ||
| 27 | #include <linux/mm.h> | ||
| 28 | #include <linux/module.h> | ||
| 29 | #include <linux/dma-mapping.h> | ||
| 30 | #include <linux/platform_device.h> | ||
| 31 | #include <linux/spi/spi.h> | ||
| 32 | #include <linux/spi/ads7846.h> | ||
| 33 | #include <linux/mtd/physmap.h> | ||
| 34 | #include <linux/gpio_keys.h> | ||
| 35 | #include <linux/input.h> | ||
| 36 | |||
| 37 | #include <asm/setup.h> | ||
| 38 | #include <asm/mach-types.h> | ||
| 39 | #include <asm/irq.h> | ||
| 40 | |||
| 41 | #include <asm/mach/arch.h> | ||
| 42 | #include <asm/mach/map.h> | ||
| 43 | #include <asm/mach/irq.h> | ||
| 44 | |||
| 45 | #include <mach/hardware.h> | ||
| 46 | #include <mach/at91rm9200_mc.h> | ||
| 47 | #include <mach/at91_ramc.h> | ||
| 48 | #include <mach/cpu.h> | ||
| 49 | |||
| 50 | #include "at91_aic.h" | ||
| 51 | #include "board.h" | ||
| 52 | #include "generic.h" | ||
| 53 | #include "gpio.h" | ||
| 54 | |||
| 55 | |||
| 56 | static void __init yl9200_init_early(void) | ||
| 57 | { | ||
| 58 | /* Set cpu type: PQFP */ | ||
| 59 | at91rm9200_set_type(ARCH_REVISON_9200_PQFP); | ||
| 60 | |||
| 61 | /* Initialize processor: 18.432 MHz crystal */ | ||
| 62 | at91_initialize(18432000); | ||
| 63 | } | ||
| 64 | |||
| 65 | /* | ||
| 66 | * LEDs | ||
| 67 | */ | ||
| 68 | static struct gpio_led yl9200_leds[] = { | ||
| 69 | { /* D2 */ | ||
| 70 | .name = "led2", | ||
| 71 | .gpio = AT91_PIN_PB17, | ||
| 72 | .active_low = 1, | ||
| 73 | .default_trigger = "timer", | ||
| 74 | }, | ||
| 75 | { /* D3 */ | ||
| 76 | .name = "led3", | ||
| 77 | .gpio = AT91_PIN_PB16, | ||
| 78 | .active_low = 1, | ||
| 79 | .default_trigger = "heartbeat", | ||
| 80 | }, | ||
| 81 | { /* D4 */ | ||
| 82 | .name = "led4", | ||
| 83 | .gpio = AT91_PIN_PB15, | ||
| 84 | .active_low = 1, | ||
| 85 | }, | ||
| 86 | { /* D5 */ | ||
| 87 | .name = "led5", | ||
| 88 | .gpio = AT91_PIN_PB8, | ||
| 89 | .active_low = 1, | ||
| 90 | } | ||
| 91 | }; | ||
| 92 | |||
| 93 | /* | ||
| 94 | * Ethernet | ||
| 95 | */ | ||
| 96 | static struct macb_platform_data __initdata yl9200_eth_data = { | ||
| 97 | .phy_irq_pin = AT91_PIN_PB28, | ||
| 98 | .is_rmii = 1, | ||
| 99 | }; | ||
| 100 | |||
| 101 | /* | ||
| 102 | * USB Host | ||
| 103 | */ | ||
| 104 | static struct at91_usbh_data __initdata yl9200_usbh_data = { | ||
| 105 | .ports = 1, /* PQFP version of AT91RM9200 */ | ||
| 106 | .vbus_pin = {-EINVAL, -EINVAL}, | ||
| 107 | .overcurrent_pin= {-EINVAL, -EINVAL}, | ||
| 108 | }; | ||
| 109 | |||
| 110 | /* | ||
| 111 | * USB Device | ||
| 112 | */ | ||
| 113 | static struct at91_udc_data __initdata yl9200_udc_data = { | ||
| 114 | .pullup_pin = AT91_PIN_PC4, | ||
| 115 | .vbus_pin = AT91_PIN_PC5, | ||
| 116 | .pullup_active_low = 1, /* Active Low due to PNP transistor (pg 7) */ | ||
| 117 | |||
| 118 | }; | ||
| 119 | |||
| 120 | /* | ||
| 121 | * MMC | ||
| 122 | */ | ||
| 123 | static struct mci_platform_data __initdata yl9200_mci0_data = { | ||
| 124 | .slot[0] = { | ||
| 125 | .bus_width = 4, | ||
| 126 | .detect_pin = AT91_PIN_PB9, | ||
| 127 | .wp_pin = -EINVAL, | ||
| 128 | }, | ||
| 129 | }; | ||
| 130 | |||
| 131 | /* | ||
| 132 | * NAND Flash | ||
| 133 | */ | ||
| 134 | static struct mtd_partition __initdata yl9200_nand_partition[] = { | ||
| 135 | { | ||
| 136 | .name = "AT91 NAND partition 1, boot", | ||
| 137 | .offset = 0, | ||
| 138 | .size = SZ_256K | ||
| 139 | }, | ||
| 140 | { | ||
| 141 | .name = "AT91 NAND partition 2, kernel", | ||
| 142 | .offset = MTDPART_OFS_NXTBLK, | ||
| 143 | .size = (2 * SZ_1M) - SZ_256K | ||
| 144 | }, | ||
| 145 | { | ||
| 146 | .name = "AT91 NAND partition 3, filesystem", | ||
| 147 | .offset = MTDPART_OFS_NXTBLK, | ||
| 148 | .size = 14 * SZ_1M | ||
| 149 | }, | ||
| 150 | { | ||
| 151 | .name = "AT91 NAND partition 4, storage", | ||
| 152 | .offset = MTDPART_OFS_NXTBLK, | ||
| 153 | .size = SZ_16M | ||
| 154 | }, | ||
| 155 | { | ||
| 156 | .name = "AT91 NAND partition 5, ext-fs", | ||
| 157 | .offset = MTDPART_OFS_NXTBLK, | ||
| 158 | .size = SZ_32M | ||
| 159 | } | ||
| 160 | }; | ||
| 161 | |||
| 162 | static struct atmel_nand_data __initdata yl9200_nand_data = { | ||
| 163 | .ale = 6, | ||
| 164 | .cle = 7, | ||
| 165 | .det_pin = -EINVAL, | ||
| 166 | .rdy_pin = AT91_PIN_PC14, /* R/!B (Sheet10) */ | ||
| 167 | .enable_pin = AT91_PIN_PC15, /* !CE (Sheet10) */ | ||
| 168 | .ecc_mode = NAND_ECC_SOFT, | ||
| 169 | .parts = yl9200_nand_partition, | ||
| 170 | .num_parts = ARRAY_SIZE(yl9200_nand_partition), | ||
| 171 | }; | ||
| 172 | |||
| 173 | /* | ||
| 174 | * NOR Flash | ||
| 175 | */ | ||
| 176 | #define YL9200_FLASH_BASE AT91_CHIPSELECT_0 | ||
| 177 | #define YL9200_FLASH_SIZE SZ_16M | ||
| 178 | |||
| 179 | static struct mtd_partition yl9200_flash_partitions[] = { | ||
| 180 | { | ||
| 181 | .name = "Bootloader", | ||
| 182 | .offset = 0, | ||
| 183 | .size = SZ_256K, | ||
| 184 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
| 185 | }, | ||
| 186 | { | ||
| 187 | .name = "Kernel", | ||
| 188 | .offset = MTDPART_OFS_NXTBLK, | ||
| 189 | .size = (2 * SZ_1M) - SZ_256K | ||
| 190 | }, | ||
| 191 | { | ||
| 192 | .name = "Filesystem", | ||
| 193 | .offset = MTDPART_OFS_NXTBLK, | ||
| 194 | .size = MTDPART_SIZ_FULL | ||
| 195 | } | ||
| 196 | }; | ||
| 197 | |||
| 198 | static struct physmap_flash_data yl9200_flash_data = { | ||
| 199 | .width = 2, | ||
| 200 | .parts = yl9200_flash_partitions, | ||
| 201 | .nr_parts = ARRAY_SIZE(yl9200_flash_partitions), | ||
| 202 | }; | ||
| 203 | |||
| 204 | static struct resource yl9200_flash_resources[] = { | ||
| 205 | { | ||
| 206 | .start = YL9200_FLASH_BASE, | ||
| 207 | .end = YL9200_FLASH_BASE + YL9200_FLASH_SIZE - 1, | ||
| 208 | .flags = IORESOURCE_MEM, | ||
| 209 | } | ||
| 210 | }; | ||
| 211 | |||
| 212 | static struct platform_device yl9200_flash = { | ||
| 213 | .name = "physmap-flash", | ||
| 214 | .id = 0, | ||
| 215 | .dev = { | ||
| 216 | .platform_data = &yl9200_flash_data, | ||
| 217 | }, | ||
| 218 | .resource = yl9200_flash_resources, | ||
| 219 | .num_resources = ARRAY_SIZE(yl9200_flash_resources), | ||
| 220 | }; | ||
| 221 | |||
| 222 | /* | ||
| 223 | * I2C (TWI) | ||
| 224 | */ | ||
| 225 | static struct i2c_board_info __initdata yl9200_i2c_devices[] = { | ||
| 226 | { /* EEPROM */ | ||
| 227 | I2C_BOARD_INFO("24c128", 0x50), | ||
| 228 | } | ||
| 229 | }; | ||
| 230 | |||
| 231 | /* | ||
| 232 | * GPIO Buttons | ||
| 233 | */ | ||
| 234 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
| 235 | static struct gpio_keys_button yl9200_buttons[] = { | ||
| 236 | { | ||
| 237 | .gpio = AT91_PIN_PA24, | ||
| 238 | .code = BTN_2, | ||
| 239 | .desc = "SW2", | ||
| 240 | .active_low = 1, | ||
| 241 | .wakeup = 1, | ||
| 242 | }, | ||
| 243 | { | ||
| 244 | .gpio = AT91_PIN_PB1, | ||
| 245 | .code = BTN_3, | ||
| 246 | .desc = "SW3", | ||
| 247 | .active_low = 1, | ||
| 248 | .wakeup = 1, | ||
| 249 | }, | ||
| 250 | { | ||
| 251 | .gpio = AT91_PIN_PB2, | ||
| 252 | .code = BTN_4, | ||
| 253 | .desc = "SW4", | ||
| 254 | .active_low = 1, | ||
| 255 | .wakeup = 1, | ||
| 256 | }, | ||
| 257 | { | ||
| 258 | .gpio = AT91_PIN_PB6, | ||
| 259 | .code = BTN_5, | ||
| 260 | .desc = "SW5", | ||
| 261 | .active_low = 1, | ||
| 262 | .wakeup = 1, | ||
| 263 | } | ||
| 264 | }; | ||
| 265 | |||
| 266 | static struct gpio_keys_platform_data yl9200_button_data = { | ||
| 267 | .buttons = yl9200_buttons, | ||
| 268 | .nbuttons = ARRAY_SIZE(yl9200_buttons), | ||
| 269 | }; | ||
| 270 | |||
| 271 | static struct platform_device yl9200_button_device = { | ||
| 272 | .name = "gpio-keys", | ||
| 273 | .id = -1, | ||
| 274 | .num_resources = 0, | ||
| 275 | .dev = { | ||
| 276 | .platform_data = &yl9200_button_data, | ||
| 277 | } | ||
| 278 | }; | ||
| 279 | |||
| 280 | static void __init yl9200_add_device_buttons(void) | ||
| 281 | { | ||
| 282 | at91_set_gpio_input(AT91_PIN_PA24, 1); /* SW2 */ | ||
| 283 | at91_set_deglitch(AT91_PIN_PA24, 1); | ||
| 284 | at91_set_gpio_input(AT91_PIN_PB1, 1); /* SW3 */ | ||
| 285 | at91_set_deglitch(AT91_PIN_PB1, 1); | ||
| 286 | at91_set_gpio_input(AT91_PIN_PB2, 1); /* SW4 */ | ||
| 287 | at91_set_deglitch(AT91_PIN_PB2, 1); | ||
| 288 | at91_set_gpio_input(AT91_PIN_PB6, 1); /* SW5 */ | ||
| 289 | at91_set_deglitch(AT91_PIN_PB6, 1); | ||
| 290 | |||
| 291 | /* Enable buttons (Sheet 5) */ | ||
| 292 | at91_set_gpio_output(AT91_PIN_PB7, 1); | ||
| 293 | |||
| 294 | platform_device_register(&yl9200_button_device); | ||
| 295 | } | ||
| 296 | #else | ||
| 297 | static void __init yl9200_add_device_buttons(void) {} | ||
| 298 | #endif | ||
| 299 | |||
| 300 | /* | ||
| 301 | * Touchscreen | ||
| 302 | */ | ||
| 303 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | ||
| 304 | static int ads7843_pendown_state(void) | ||
| 305 | { | ||
| 306 | return !at91_get_gpio_value(AT91_PIN_PB11); /* Touchscreen PENIRQ */ | ||
| 307 | } | ||
| 308 | |||
| 309 | static struct ads7846_platform_data ads_info = { | ||
| 310 | .model = 7843, | ||
| 311 | .x_min = 150, | ||
| 312 | .x_max = 3830, | ||
| 313 | .y_min = 190, | ||
| 314 | .y_max = 3830, | ||
| 315 | .vref_delay_usecs = 100, | ||
| 316 | |||
| 317 | /* For a 8" touch-screen */ | ||
| 318 | // .x_plate_ohms = 603, | ||
| 319 | // .y_plate_ohms = 332, | ||
| 320 | |||
| 321 | /* For a 10.4" touch-screen */ | ||
| 322 | // .x_plate_ohms = 611, | ||
| 323 | // .y_plate_ohms = 325, | ||
| 324 | |||
| 325 | .x_plate_ohms = 576, | ||
| 326 | .y_plate_ohms = 366, | ||
| 327 | |||
| 328 | .pressure_max = 15000, /* generally nonsense on the 7843 */ | ||
| 329 | .debounce_max = 1, | ||
| 330 | .debounce_rep = 0, | ||
| 331 | .debounce_tol = (~0), | ||
| 332 | .get_pendown_state = ads7843_pendown_state, | ||
| 333 | }; | ||
| 334 | |||
| 335 | static void __init yl9200_add_device_ts(void) | ||
| 336 | { | ||
| 337 | at91_set_gpio_input(AT91_PIN_PB11, 1); /* Touchscreen interrupt pin */ | ||
| 338 | at91_set_gpio_input(AT91_PIN_PB10, 1); /* Touchscreen BUSY signal - not used! */ | ||
| 339 | } | ||
| 340 | #else | ||
| 341 | static void __init yl9200_add_device_ts(void) {} | ||
| 342 | #endif | ||
| 343 | |||
| 344 | /* | ||
| 345 | * SPI devices | ||
| 346 | */ | ||
| 347 | static struct spi_board_info yl9200_spi_devices[] = { | ||
| 348 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | ||
| 349 | { /* Touchscreen */ | ||
| 350 | .modalias = "ads7846", | ||
| 351 | .chip_select = 0, | ||
| 352 | .max_speed_hz = 5000 * 26, | ||
| 353 | .platform_data = &ads_info, | ||
| 354 | .irq = AT91_PIN_PB11, | ||
| 355 | }, | ||
| 356 | #endif | ||
| 357 | { /* CAN */ | ||
| 358 | .modalias = "mcp2510", | ||
| 359 | .chip_select = 1, | ||
| 360 | .max_speed_hz = 25000 * 26, | ||
| 361 | .irq = AT91_PIN_PC0, | ||
| 362 | } | ||
| 363 | }; | ||
| 364 | |||
| 365 | /* | ||
| 366 | * LCD / VGA | ||
| 367 | * | ||
| 368 | * EPSON S1D13806 FB (discontinued chip) | ||
| 369 | * EPSON S1D13506 FB | ||
| 370 | */ | ||
| 371 | #if defined(CONFIG_FB_S1D13XXX) || defined(CONFIG_FB_S1D13XXX_MODULE) | ||
| 372 | #include <video/s1d13xxxfb.h> | ||
| 373 | |||
| 374 | |||
| 375 | static void yl9200_init_video(void) | ||
| 376 | { | ||
| 377 | /* NWAIT Signal */ | ||
| 378 | at91_set_A_periph(AT91_PIN_PC6, 0); | ||
| 379 | |||
| 380 | /* Initialization of the Static Memory Controller for Chip Select 2 */ | ||
| 381 | at91_ramc_write(0, AT91_SMC_CSR(2), AT91_SMC_DBW_16 /* 16 bit */ | ||
| 382 | | AT91_SMC_WSEN | AT91_SMC_NWS_(0x4) /* wait states */ | ||
| 383 | | AT91_SMC_TDF_(0x100) /* float time */ | ||
| 384 | ); | ||
| 385 | } | ||
| 386 | |||
| 387 | static struct s1d13xxxfb_regval yl9200_s1dfb_initregs[] = | ||
| 388 | { | ||
| 389 | {S1DREG_MISC, 0x00}, /* Miscellaneous Register*/ | ||
| 390 | {S1DREG_COM_DISP_MODE, 0x01}, /* Display Mode Register, LCD only*/ | ||
| 391 | {S1DREG_GPIO_CNF0, 0x00}, /* General IO Pins Configuration Register*/ | ||
| 392 | {S1DREG_GPIO_CTL0, 0x00}, /* General IO Pins Control Register*/ | ||
| 393 | {S1DREG_CLK_CNF, 0x11}, /* Memory Clock Configuration Register*/ | ||
| 394 | {S1DREG_LCD_CLK_CNF, 0x10}, /* LCD Pixel Clock Configuration Register*/ | ||
| 395 | {S1DREG_CRT_CLK_CNF, 0x12}, /* CRT/TV Pixel Clock Configuration Register*/ | ||
| 396 | {S1DREG_MPLUG_CLK_CNF, 0x01}, /* MediaPlug Clock Configuration Register*/ | ||
| 397 | {S1DREG_CPU2MEM_WST_SEL, 0x02}, /* CPU To Memory Wait State Select Register*/ | ||
| 398 | {S1DREG_MEM_CNF, 0x00}, /* Memory Configuration Register*/ | ||
| 399 | {S1DREG_SDRAM_REF_RATE, 0x04}, /* DRAM Refresh Rate Register, MCLK source*/ | ||
| 400 | {S1DREG_SDRAM_TC0, 0x12}, /* DRAM Timings Control Register 0*/ | ||
| 401 | {S1DREG_SDRAM_TC1, 0x02}, /* DRAM Timings Control Register 1*/ | ||
| 402 | {S1DREG_PANEL_TYPE, 0x25}, /* Panel Type Register*/ | ||
| 403 | {S1DREG_MOD_RATE, 0x00}, /* MOD Rate Register*/ | ||
| 404 | {S1DREG_LCD_DISP_HWIDTH, 0x4F}, /* LCD Horizontal Display Width Register*/ | ||
| 405 | {S1DREG_LCD_NDISP_HPER, 0x13}, /* LCD Horizontal Non-Display Period Register*/ | ||
| 406 | {S1DREG_TFT_FPLINE_START, 0x01}, /* TFT FPLINE Start Position Register*/ | ||
| 407 | {S1DREG_TFT_FPLINE_PWIDTH, 0x0c}, /* TFT FPLINE Pulse Width Register*/ | ||
| 408 | {S1DREG_LCD_DISP_VHEIGHT0, 0xDF}, /* LCD Vertical Display Height Register 0*/ | ||
| 409 | {S1DREG_LCD_DISP_VHEIGHT1, 0x01}, /* LCD Vertical Display Height Register 1*/ | ||
| 410 | {S1DREG_LCD_NDISP_VPER, 0x2c}, /* LCD Vertical Non-Display Period Register*/ | ||
| 411 | {S1DREG_TFT_FPFRAME_START, 0x0a}, /* TFT FPFRAME Start Position Register*/ | ||
| 412 | {S1DREG_TFT_FPFRAME_PWIDTH, 0x02}, /* TFT FPFRAME Pulse Width Register*/ | ||
| 413 | {S1DREG_LCD_DISP_MODE, 0x05}, /* LCD Display Mode Register*/ | ||
| 414 | {S1DREG_LCD_MISC, 0x01}, /* LCD Miscellaneous Register*/ | ||
| 415 | {S1DREG_LCD_DISP_START0, 0x00}, /* LCD Display Start Address Register 0*/ | ||
| 416 | {S1DREG_LCD_DISP_START1, 0x00}, /* LCD Display Start Address Register 1*/ | ||
| 417 | {S1DREG_LCD_DISP_START2, 0x00}, /* LCD Display Start Address Register 2*/ | ||
| 418 | {S1DREG_LCD_MEM_OFF0, 0x80}, /* LCD Memory Address Offset Register 0*/ | ||
| 419 | {S1DREG_LCD_MEM_OFF1, 0x02}, /* LCD Memory Address Offset Register 1*/ | ||
| 420 | {S1DREG_LCD_PIX_PAN, 0x03}, /* LCD Pixel Panning Register*/ | ||
| 421 | {S1DREG_LCD_DISP_FIFO_HTC, 0x00}, /* LCD Display FIFO High Threshold Control Register*/ | ||
| 422 | {S1DREG_LCD_DISP_FIFO_LTC, 0x00}, /* LCD Display FIFO Low Threshold Control Register*/ | ||
| 423 | {S1DREG_CRT_DISP_HWIDTH, 0x4F}, /* CRT/TV Horizontal Display Width Register*/ | ||
| 424 | {S1DREG_CRT_NDISP_HPER, 0x13}, /* CRT/TV Horizontal Non-Display Period Register*/ | ||
| 425 | {S1DREG_CRT_HRTC_START, 0x01}, /* CRT/TV HRTC Start Position Register*/ | ||
| 426 | {S1DREG_CRT_HRTC_PWIDTH, 0x0B}, /* CRT/TV HRTC Pulse Width Register*/ | ||
| 427 | {S1DREG_CRT_DISP_VHEIGHT0, 0xDF}, /* CRT/TV Vertical Display Height Register 0*/ | ||
| 428 | {S1DREG_CRT_DISP_VHEIGHT1, 0x01}, /* CRT/TV Vertical Display Height Register 1*/ | ||
| 429 | {S1DREG_CRT_NDISP_VPER, 0x2B}, /* CRT/TV Vertical Non-Display Period Register*/ | ||
| 430 | {S1DREG_CRT_VRTC_START, 0x09}, /* CRT/TV VRTC Start Position Register*/ | ||
| 431 | {S1DREG_CRT_VRTC_PWIDTH, 0x01}, /* CRT/TV VRTC Pulse Width Register*/ | ||
| 432 | {S1DREG_TV_OUT_CTL, 0x18}, /* TV Output Control Register */ | ||
| 433 | {S1DREG_CRT_DISP_MODE, 0x05}, /* CRT/TV Display Mode Register, 16BPP*/ | ||
| 434 | {S1DREG_CRT_DISP_START0, 0x00}, /* CRT/TV Display Start Address Register 0*/ | ||
| 435 | {S1DREG_CRT_DISP_START1, 0x00}, /* CRT/TV Display Start Address Register 1*/ | ||
| 436 | {S1DREG_CRT_DISP_START2, 0x00}, /* CRT/TV Display Start Address Register 2*/ | ||
| 437 | {S1DREG_CRT_MEM_OFF0, 0x80}, /* CRT/TV Memory Address Offset Register 0*/ | ||
| 438 | {S1DREG_CRT_MEM_OFF1, 0x02}, /* CRT/TV Memory Address Offset Register 1*/ | ||
| 439 | {S1DREG_CRT_PIX_PAN, 0x00}, /* CRT/TV Pixel Panning Register*/ | ||
| 440 | {S1DREG_CRT_DISP_FIFO_HTC, 0x00}, /* CRT/TV Display FIFO High Threshold Control Register*/ | ||
| 441 | {S1DREG_CRT_DISP_FIFO_LTC, 0x00}, /* CRT/TV Display FIFO Low Threshold Control Register*/ | ||
| 442 | {S1DREG_LCD_CUR_CTL, 0x00}, /* LCD Ink/Cursor Control Register*/ | ||
| 443 | {S1DREG_LCD_CUR_START, 0x01}, /* LCD Ink/Cursor Start Address Register*/ | ||
| 444 | {S1DREG_LCD_CUR_XPOS0, 0x00}, /* LCD Cursor X Position Register 0*/ | ||
| 445 | {S1DREG_LCD_CUR_XPOS1, 0x00}, /* LCD Cursor X Position Register 1*/ | ||
| 446 | {S1DREG_LCD_CUR_YPOS0, 0x00}, /* LCD Cursor Y Position Register 0*/ | ||
| 447 | {S1DREG_LCD_CUR_YPOS1, 0x00}, /* LCD Cursor Y Position Register 1*/ | ||
| 448 | {S1DREG_LCD_CUR_BCTL0, 0x00}, /* LCD Ink/Cursor Blue Color 0 Register*/ | ||
| 449 | {S1DREG_LCD_CUR_GCTL0, 0x00}, /* LCD Ink/Cursor Green Color 0 Register*/ | ||
| 450 | {S1DREG_LCD_CUR_RCTL0, 0x00}, /* LCD Ink/Cursor Red Color 0 Register*/ | ||
| 451 | {S1DREG_LCD_CUR_BCTL1, 0x1F}, /* LCD Ink/Cursor Blue Color 1 Register*/ | ||
| 452 | {S1DREG_LCD_CUR_GCTL1, 0x3F}, /* LCD Ink/Cursor Green Color 1 Register*/ | ||
| 453 | {S1DREG_LCD_CUR_RCTL1, 0x1F}, /* LCD Ink/Cursor Red Color 1 Register*/ | ||
| 454 | {S1DREG_LCD_CUR_FIFO_HTC, 0x00}, /* LCD Ink/Cursor FIFO Threshold Register*/ | ||
| 455 | {S1DREG_CRT_CUR_CTL, 0x00}, /* CRT/TV Ink/Cursor Control Register*/ | ||
| 456 | {S1DREG_CRT_CUR_START, 0x01}, /* CRT/TV Ink/Cursor Start Address Register*/ | ||
| 457 | {S1DREG_CRT_CUR_XPOS0, 0x00}, /* CRT/TV Cursor X Position Register 0*/ | ||
| 458 | {S1DREG_CRT_CUR_XPOS1, 0x00}, /* CRT/TV Cursor X Position Register 1*/ | ||
| 459 | {S1DREG_CRT_CUR_YPOS0, 0x00}, /* CRT/TV Cursor Y Position Register 0*/ | ||
| 460 | {S1DREG_CRT_CUR_YPOS1, 0x00}, /* CRT/TV Cursor Y Position Register 1*/ | ||
| 461 | {S1DREG_CRT_CUR_BCTL0, 0x00}, /* CRT/TV Ink/Cursor Blue Color 0 Register*/ | ||
| 462 | {S1DREG_CRT_CUR_GCTL0, 0x00}, /* CRT/TV Ink/Cursor Green Color 0 Register*/ | ||
| 463 | {S1DREG_CRT_CUR_RCTL0, 0x00}, /* CRT/TV Ink/Cursor Red Color 0 Register*/ | ||
| 464 | {S1DREG_CRT_CUR_BCTL1, 0x1F}, /* CRT/TV Ink/Cursor Blue Color 1 Register*/ | ||
| 465 | {S1DREG_CRT_CUR_GCTL1, 0x3F}, /* CRT/TV Ink/Cursor Green Color 1 Register*/ | ||
| 466 | {S1DREG_CRT_CUR_RCTL1, 0x1F}, /* CRT/TV Ink/Cursor Red Color 1 Register*/ | ||
| 467 | {S1DREG_CRT_CUR_FIFO_HTC, 0x00}, /* CRT/TV Ink/Cursor FIFO Threshold Register*/ | ||
| 468 | {S1DREG_BBLT_CTL0, 0x00}, /* BitBlt Control Register 0*/ | ||
| 469 | {S1DREG_BBLT_CTL1, 0x01}, /* BitBlt Control Register 1*/ | ||
| 470 | {S1DREG_BBLT_CC_EXP, 0x00}, /* BitBlt ROP Code/Color Expansion Register*/ | ||
| 471 | {S1DREG_BBLT_OP, 0x00}, /* BitBlt Operation Register*/ | ||
| 472 | {S1DREG_BBLT_SRC_START0, 0x00}, /* BitBlt Source Start Address Register 0*/ | ||
| 473 | {S1DREG_BBLT_SRC_START1, 0x00}, /* BitBlt Source Start Address Register 1*/ | ||
| 474 | {S1DREG_BBLT_SRC_START2, 0x00}, /* BitBlt Source Start Address Register 2*/ | ||
| 475 | {S1DREG_BBLT_DST_START0, 0x00}, /* BitBlt Destination Start Address Register 0*/ | ||
| 476 | {S1DREG_BBLT_DST_START1, 0x00}, /* BitBlt Destination Start Address Register 1*/ | ||
| 477 | {S1DREG_BBLT_DST_START2, 0x00}, /* BitBlt Destination Start Address Register 2*/ | ||
| 478 | {S1DREG_BBLT_MEM_OFF0, 0x00}, /* BitBlt Memory Address Offset Register 0*/ | ||
| 479 | {S1DREG_BBLT_MEM_OFF1, 0x00}, /* BitBlt Memory Address Offset Register 1*/ | ||
| 480 | {S1DREG_BBLT_WIDTH0, 0x00}, /* BitBlt Width Register 0*/ | ||
| 481 | {S1DREG_BBLT_WIDTH1, 0x00}, /* BitBlt Width Register 1*/ | ||
| 482 | {S1DREG_BBLT_HEIGHT0, 0x00}, /* BitBlt Height Register 0*/ | ||
| 483 | {S1DREG_BBLT_HEIGHT1, 0x00}, /* BitBlt Height Register 1*/ | ||
| 484 | {S1DREG_BBLT_BGC0, 0x00}, /* BitBlt Background Color Register 0*/ | ||
| 485 | {S1DREG_BBLT_BGC1, 0x00}, /* BitBlt Background Color Register 1*/ | ||
| 486 | {S1DREG_BBLT_FGC0, 0x00}, /* BitBlt Foreground Color Register 0*/ | ||
| 487 | {S1DREG_BBLT_FGC1, 0x00}, /* BitBlt Foreground Color Register 1*/ | ||
| 488 | {S1DREG_LKUP_MODE, 0x00}, /* Look-Up Table Mode Register*/ | ||
| 489 | {S1DREG_LKUP_ADDR, 0x00}, /* Look-Up Table Address Register*/ | ||
| 490 | {S1DREG_PS_CNF, 0x00}, /* Power Save Configuration Register*/ | ||
| 491 | {S1DREG_PS_STATUS, 0x00}, /* Power Save Status Register*/ | ||
| 492 | {S1DREG_CPU2MEM_WDOGT, 0x00}, /* CPU-to-Memory Access Watchdog Timer Register*/ | ||
| 493 | {S1DREG_COM_DISP_MODE, 0x01}, /* Display Mode Register, LCD only*/ | ||
| 494 | }; | ||
| 495 | |||
| 496 | static struct s1d13xxxfb_pdata yl9200_s1dfb_pdata = { | ||
| 497 | .initregs = yl9200_s1dfb_initregs, | ||
| 498 | .initregssize = ARRAY_SIZE(yl9200_s1dfb_initregs), | ||
| 499 | .platform_init_video = yl9200_init_video, | ||
| 500 | }; | ||
| 501 | |||
| 502 | #define YL9200_FB_REG_BASE AT91_CHIPSELECT_7 | ||
| 503 | #define YL9200_FB_VMEM_BASE YL9200_FB_REG_BASE + SZ_2M | ||
| 504 | #define YL9200_FB_VMEM_SIZE SZ_2M | ||
| 505 | |||
| 506 | static struct resource yl9200_s1dfb_resource[] = { | ||
| 507 | [0] = { /* video mem */ | ||
| 508 | .name = "s1d13xxxfb memory", | ||
| 509 | .start = YL9200_FB_VMEM_BASE, | ||
| 510 | .end = YL9200_FB_VMEM_BASE + YL9200_FB_VMEM_SIZE -1, | ||
| 511 | .flags = IORESOURCE_MEM, | ||
| 512 | }, | ||
| 513 | [1] = { /* video registers */ | ||
| 514 | .name = "s1d13xxxfb registers", | ||
| 515 | .start = YL9200_FB_REG_BASE, | ||
| 516 | .end = YL9200_FB_REG_BASE + SZ_512 -1, | ||
| 517 | .flags = IORESOURCE_MEM, | ||
| 518 | }, | ||
| 519 | }; | ||
| 520 | |||
| 521 | static u64 s1dfb_dmamask = DMA_BIT_MASK(32); | ||
| 522 | |||
| 523 | static struct platform_device yl9200_s1dfb_device = { | ||
| 524 | .name = "s1d13806fb", | ||
| 525 | .id = -1, | ||
| 526 | .dev = { | ||
| 527 | .dma_mask = &s1dfb_dmamask, | ||
| 528 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 529 | .platform_data = &yl9200_s1dfb_pdata, | ||
| 530 | }, | ||
| 531 | .resource = yl9200_s1dfb_resource, | ||
| 532 | .num_resources = ARRAY_SIZE(yl9200_s1dfb_resource), | ||
| 533 | }; | ||
| 534 | |||
| 535 | void __init yl9200_add_device_video(void) | ||
| 536 | { | ||
| 537 | platform_device_register(&yl9200_s1dfb_device); | ||
| 538 | } | ||
| 539 | #else | ||
| 540 | void __init yl9200_add_device_video(void) {} | ||
| 541 | #endif | ||
| 542 | |||
| 543 | |||
| 544 | static void __init yl9200_board_init(void) | ||
| 545 | { | ||
| 546 | /* Serial */ | ||
| 547 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
| 548 | at91_register_uart(0, 0, 0); | ||
| 549 | |||
| 550 | /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
| 551 | at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
| 552 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
| 553 | | ATMEL_UART_RI); | ||
| 554 | |||
| 555 | /* USART0 on ttyS2. (Rx & Tx only to JP3) */ | ||
| 556 | at91_register_uart(AT91RM9200_ID_US0, 2, 0); | ||
| 557 | |||
| 558 | /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */ | ||
| 559 | at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS); | ||
| 560 | at91_add_device_serial(); | ||
| 561 | /* Ethernet */ | ||
| 562 | at91_add_device_eth(&yl9200_eth_data); | ||
| 563 | /* USB Host */ | ||
| 564 | at91_add_device_usbh(&yl9200_usbh_data); | ||
| 565 | /* USB Device */ | ||
| 566 | at91_add_device_udc(&yl9200_udc_data); | ||
| 567 | /* I2C */ | ||
| 568 | at91_add_device_i2c(yl9200_i2c_devices, ARRAY_SIZE(yl9200_i2c_devices)); | ||
| 569 | /* MMC */ | ||
| 570 | at91_add_device_mci(0, &yl9200_mci0_data); | ||
| 571 | /* NAND */ | ||
| 572 | at91_add_device_nand(&yl9200_nand_data); | ||
| 573 | /* NOR Flash */ | ||
| 574 | platform_device_register(&yl9200_flash); | ||
| 575 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) | ||
| 576 | /* SPI */ | ||
| 577 | at91_add_device_spi(yl9200_spi_devices, ARRAY_SIZE(yl9200_spi_devices)); | ||
| 578 | /* Touchscreen */ | ||
| 579 | yl9200_add_device_ts(); | ||
| 580 | #endif | ||
| 581 | /* LEDs. */ | ||
| 582 | at91_gpio_leds(yl9200_leds, ARRAY_SIZE(yl9200_leds)); | ||
| 583 | /* Push Buttons */ | ||
| 584 | yl9200_add_device_buttons(); | ||
| 585 | /* VGA */ | ||
| 586 | yl9200_add_device_video(); | ||
| 587 | } | ||
| 588 | |||
| 589 | MACHINE_START(YL9200, "uCdragon YL-9200") | ||
| 590 | /* Maintainer: S.Birtles */ | ||
| 591 | .init_time = at91rm9200_timer_init, | ||
| 592 | .map_io = at91_map_io, | ||
| 593 | .handle_irq = at91_aic_handle_irq, | ||
| 594 | .init_early = yl9200_init_early, | ||
| 595 | .init_irq = at91_init_irq_default, | ||
| 596 | .init_machine = yl9200_board_init, | ||
| 597 | MACHINE_END | ||
