Blame view
arch/arm/mach-at91/board-kb9202.c
3.55 KB
6902f523a [ARM] 3604/1: AT9... |
1 |
/* |
9d0412680 [ARM] 4124/1: Ren... |
2 |
* linux/arch/arm/mach-at91/board-kb9202.c |
6902f523a [ARM] 3604/1: AT9... |
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
* * Copyright (c) 2005 kb_admin * KwikByte, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
6902f523a [ARM] 3604/1: AT9... |
21 |
#include <linux/types.h> |
2f8163baa ARM: gpio: conver... |
22 |
#include <linux/gpio.h> |
6902f523a [ARM] 3604/1: AT9... |
23 24 25 26 |
#include <linux/init.h> #include <linux/mm.h> #include <linux/module.h> #include <linux/platform_device.h> |
a09e64fbc [ARM] Move includ... |
27 |
#include <mach/hardware.h> |
6902f523a [ARM] 3604/1: AT9... |
28 29 30 31 32 33 34 |
#include <asm/setup.h> #include <asm/mach-types.h> #include <asm/irq.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/mach/irq.h> |
a09e64fbc [ARM] Move includ... |
35 |
#include <mach/board.h> |
e57556e3b at91rm9200: intro... |
36 |
#include <mach/cpu.h> |
a09e64fbc [ARM] Move includ... |
37 |
#include <mach/at91rm9200_mc.h> |
6902f523a [ARM] 3604/1: AT9... |
38 |
|
19750336d [ARM] 5059/1: [AT... |
39 |
#include "generic.h" |
6902f523a [ARM] 3604/1: AT9... |
40 |
|
6902f523a [ARM] 3604/1: AT9... |
41 |
|
1b021a3b2 at91: fix map_io ... |
42 |
static void __init kb9202_init_early(void) |
6902f523a [ARM] 3604/1: AT9... |
43 |
{ |
e57556e3b at91rm9200: intro... |
44 45 |
/* Set cpu type: PQFP */ at91rm9200_set_type(ARCH_REVISON_9200_PQFP); |
2eeaaa21d [ARM] 3866/1: AT9... |
46 |
/* Initialize processor: 10 MHz crystal */ |
21d08b9d5 at91: introduce c... |
47 |
at91_initialize(10000000); |
6902f523a [ARM] 3604/1: AT9... |
48 49 50 |
/* Set up the LEDs */ at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); |
19750336d [ARM] 5059/1: [AT... |
51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
/* DBGU on ttyS0. (Rx & Tx only) */ at91_register_uart(0, 0, 0); /* USART0 on ttyS1 (Rx & Tx only) */ at91_register_uart(AT91RM9200_ID_US0, 1, 0); /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ at91_register_uart(AT91RM9200_ID_US1, 2, 0); /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); /* set serial console to ttyS0 (ie, DBGU) */ at91_set_serial_console(0); |
6902f523a [ARM] 3604/1: AT9... |
65 |
} |
84e0cdb0a macb: unify at91 ... |
66 |
static struct macb_platform_data __initdata kb9202_eth_data = { |
6902f523a [ARM] 3604/1: AT9... |
67 68 69 70 71 72 |
.phy_irq_pin = AT91_PIN_PB29, .is_rmii = 0, }; static struct at91_usbh_data __initdata kb9202_usbh_data = { .ports = 1, |
63b4c2967 ARM: at91/boards:... |
73 74 |
.vbus_pin = {-EINVAL, -EINVAL}, .overcurrent_pin= {-EINVAL, -EINVAL}, |
6902f523a [ARM] 3604/1: AT9... |
75 76 77 78 79 80 81 82 83 |
}; static struct at91_udc_data __initdata kb9202_udc_data = { .vbus_pin = AT91_PIN_PB24, .pullup_pin = AT91_PIN_PB22, }; static struct at91_mmc_data __initdata kb9202_mmc_data = { .det_pin = AT91_PIN_PB2, |
c019d49b6 [ARM] 3972/1: AT9... |
84 |
.slot_b = 0, |
6902f523a [ARM] 3604/1: AT9... |
85 |
.wire4 = 1, |
63b4c2967 ARM: at91/boards:... |
86 87 |
.wp_pin = -EINVAL, .vcc_pin = -EINVAL, |
6902f523a [ARM] 3604/1: AT9... |
88 |
}; |
cc2b28ba6 [ARM] 3869/1: AT9... |
89 90 91 92 93 94 95 |
static struct mtd_partition __initdata kb9202_nand_partition[] = { { .name = "nand_fs", .offset = 0, .size = MTDPART_SIZ_FULL, }, }; |
3c3796cc3 [MTD] [NAND] rena... |
96 |
static struct atmel_nand_data __initdata kb9202_nand_data = { |
cc2b28ba6 [ARM] 3869/1: AT9... |
97 98 |
.ale = 22, .cle = 21, |
63b4c2967 ARM: at91/boards:... |
99 |
.det_pin = -EINVAL, |
cc2b28ba6 [ARM] 3869/1: AT9... |
100 101 |
.rdy_pin = AT91_PIN_PC29, .enable_pin = AT91_PIN_PC28, |
1754aab9b mtd: ATMEL, AVR32... |
102 103 |
.parts = kb9202_nand_partition, .num_parts = ARRAY_SIZE(kb9202_nand_partition), |
cc2b28ba6 [ARM] 3869/1: AT9... |
104 |
}; |
6902f523a [ARM] 3604/1: AT9... |
105 106 107 108 109 110 111 112 113 114 115 |
static void __init kb9202_board_init(void) { /* Serial */ at91_add_device_serial(); /* Ethernet */ at91_add_device_eth(&kb9202_eth_data); /* USB Host */ at91_add_device_usbh(&kb9202_usbh_data); /* USB Device */ at91_add_device_udc(&kb9202_udc_data); /* MMC */ |
d0760b3bc [ARM] 4143/1: AT9... |
116 |
at91_add_device_mmc(0, &kb9202_mmc_data); |
6902f523a [ARM] 3604/1: AT9... |
117 |
/* I2C */ |
f230d3f53 [ARM] 4650/1: AT9... |
118 |
at91_add_device_i2c(NULL, 0); |
6902f523a [ARM] 3604/1: AT9... |
119 120 |
/* SPI */ at91_add_device_spi(NULL, 0); |
cc2b28ba6 [ARM] 3869/1: AT9... |
121 122 |
/* NAND */ at91_add_device_nand(&kb9202_nand_data); |
6902f523a [ARM] 3604/1: AT9... |
123 124 125 126 |
} MACHINE_START(KB9200, "KB920x") /* Maintainer: KwikByte, Inc. */ |
6902f523a [ARM] 3604/1: AT9... |
127 |
.timer = &at91rm9200_timer, |
21d08b9d5 at91: introduce c... |
128 |
.map_io = at91_map_io, |
1b021a3b2 at91: fix map_io ... |
129 |
.init_early = kb9202_init_early, |
92100c12c at91: factorize a... |
130 |
.init_irq = at91_init_irq_default, |
6902f523a [ARM] 3604/1: AT9... |
131 132 |
.init_machine = kb9202_board_init, MACHINE_END |