diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 0b12e1adcc8e..b6454c525962 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <asm/arch/board.h> | 22 | #include <asm/arch/board.h> |
23 | #include <asm/arch/gpio.h> | 23 | #include <asm/arch/gpio.h> |
24 | #include <asm/arch/at91sam9263.h> | 24 | #include <asm/arch/at91sam9263.h> |
25 | #include <asm/arch/at91sam926x_mc.h> | ||
26 | #include <asm/arch/at91sam9263_matrix.h> | 25 | #include <asm/arch/at91sam9263_matrix.h> |
26 | #include <asm/arch/at91sam9_smc.h> | ||
27 | 27 | ||
28 | #include "generic.h" | 28 | #include "generic.h" |
29 | 29 | ||
@@ -358,10 +358,15 @@ static struct at91_nand_data nand_data; | |||
358 | #define NAND_BASE AT91_CHIPSELECT_3 | 358 | #define NAND_BASE AT91_CHIPSELECT_3 |
359 | 359 | ||
360 | static struct resource nand_resources[] = { | 360 | static struct resource nand_resources[] = { |
361 | { | 361 | [0] = { |
362 | .start = NAND_BASE, | 362 | .start = NAND_BASE, |
363 | .end = NAND_BASE + SZ_256M - 1, | 363 | .end = NAND_BASE + SZ_256M - 1, |
364 | .flags = IORESOURCE_MEM, | 364 | .flags = IORESOURCE_MEM, |
365 | }, | ||
366 | [1] = { | ||
367 | .start = AT91_BASE_SYS + AT91_ECC0, | ||
368 | .end = AT91_BASE_SYS + AT91_ECC0 + SZ_512 - 1, | ||
369 | .flags = IORESOURCE_MEM, | ||
365 | } | 370 | } |
366 | }; | 371 | }; |
367 | 372 | ||
@@ -783,6 +788,43 @@ void __init at91_add_device_isi(void) {} | |||
783 | 788 | ||
784 | 789 | ||
785 | /* -------------------------------------------------------------------- | 790 | /* -------------------------------------------------------------------- |
791 | * Timer/Counter block | ||
792 | * -------------------------------------------------------------------- */ | ||
793 | |||
794 | #ifdef CONFIG_ATMEL_TCLIB | ||
795 | |||
796 | static struct resource tcb_resources[] = { | ||
797 | [0] = { | ||
798 | .start = AT91SAM9263_BASE_TCB0, | ||
799 | .end = AT91SAM9263_BASE_TCB0 + SZ_16K - 1, | ||
800 | .flags = IORESOURCE_MEM, | ||
801 | }, | ||
802 | [1] = { | ||
803 | .start = AT91SAM9263_ID_TCB, | ||
804 | .end = AT91SAM9263_ID_TCB, | ||
805 | .flags = IORESOURCE_IRQ, | ||
806 | }, | ||
807 | }; | ||
808 | |||
809 | static struct platform_device at91sam9263_tcb_device = { | ||
810 | .name = "atmel_tcb", | ||
811 | .id = 0, | ||
812 | .resource = tcb_resources, | ||
813 | .num_resources = ARRAY_SIZE(tcb_resources), | ||
814 | }; | ||
815 | |||
816 | static void __init at91_add_device_tc(void) | ||
817 | { | ||
818 | /* this chip has one clock and irq for all three TC channels */ | ||
819 | at91_clock_associate("tcb_clk", &at91sam9263_tcb_device.dev, "t0_clk"); | ||
820 | platform_device_register(&at91sam9263_tcb_device); | ||
821 | } | ||
822 | #else | ||
823 | static void __init at91_add_device_tc(void) { } | ||
824 | #endif | ||
825 | |||
826 | |||
827 | /* -------------------------------------------------------------------- | ||
786 | * RTT | 828 | * RTT |
787 | * -------------------------------------------------------------------- */ | 829 | * -------------------------------------------------------------------- */ |
788 | 830 | ||
@@ -933,9 +975,6 @@ static inline void configure_ssc1_pins(unsigned pins) | |||
933 | } | 975 | } |
934 | 976 | ||
935 | /* | 977 | /* |
936 | * Return the device node so that board init code can use it as the | ||
937 | * parent for the device node reflecting how it's used on this board. | ||
938 | * | ||
939 | * SSC controllers are accessed through library code, instead of any | 978 | * SSC controllers are accessed through library code, instead of any |
940 | * kind of all-singing/all-dancing driver. For example one could be | 979 | * kind of all-singing/all-dancing driver. For example one could be |
941 | * used by a particular I2S audio codec's driver, while another one | 980 | * used by a particular I2S audio codec's driver, while another one |
@@ -1146,49 +1185,9 @@ static inline void configure_usart2_pins(unsigned pins) | |||
1146 | at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */ | 1185 | at91_set_B_periph(AT91_PIN_PD6, 0); /* CTS2 */ |
1147 | } | 1186 | } |
1148 | 1187 | ||
1149 | static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ | 1188 | static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ |
1150 | struct platform_device *atmel_default_console_device; /* the serial console device */ | 1189 | struct platform_device *atmel_default_console_device; /* the serial console device */ |
1151 | 1190 | ||
1152 | void __init __deprecated at91_init_serial(struct at91_uart_config *config) | ||
1153 | { | ||
1154 | int i; | ||
1155 | |||
1156 | /* Fill in list of supported UARTs */ | ||
1157 | for (i = 0; i < config->nr_tty; i++) { | ||
1158 | switch (config->tty_map[i]) { | ||
1159 | case 0: | ||
1160 | configure_usart0_pins(ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
1161 | at91_uarts[i] = &at91sam9263_uart0_device; | ||
1162 | at91_clock_associate("usart0_clk", &at91sam9263_uart0_device.dev, "usart"); | ||
1163 | break; | ||
1164 | case 1: | ||
1165 | configure_usart1_pins(ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
1166 | at91_uarts[i] = &at91sam9263_uart1_device; | ||
1167 | at91_clock_associate("usart1_clk", &at91sam9263_uart1_device.dev, "usart"); | ||
1168 | break; | ||
1169 | case 2: | ||
1170 | configure_usart2_pins(ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
1171 | at91_uarts[i] = &at91sam9263_uart2_device; | ||
1172 | at91_clock_associate("usart2_clk", &at91sam9263_uart2_device.dev, "usart"); | ||
1173 | break; | ||
1174 | case 3: | ||
1175 | configure_dbgu_pins(); | ||
1176 | at91_uarts[i] = &at91sam9263_dbgu_device; | ||
1177 | at91_clock_associate("mck", &at91sam9263_dbgu_device.dev, "usart"); | ||
1178 | break; | ||
1179 | default: | ||
1180 | continue; | ||
1181 | } | ||
1182 | at91_uarts[i]->id = i; /* update ID number to mapped ID */ | ||
1183 | } | ||
1184 | |||
1185 | /* Set serial console device */ | ||
1186 | if (config->console_tty < ATMEL_MAX_UART) | ||
1187 | atmel_default_console_device = at91_uarts[config->console_tty]; | ||
1188 | if (!atmel_default_console_device) | ||
1189 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1190 | } | ||
1191 | |||
1192 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | 1191 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) |
1193 | { | 1192 | { |
1194 | struct platform_device *pdev; | 1193 | struct platform_device *pdev; |
@@ -1227,8 +1226,6 @@ void __init at91_set_serial_console(unsigned portnr) | |||
1227 | { | 1226 | { |
1228 | if (portnr < ATMEL_MAX_UART) | 1227 | if (portnr < ATMEL_MAX_UART) |
1229 | atmel_default_console_device = at91_uarts[portnr]; | 1228 | atmel_default_console_device = at91_uarts[portnr]; |
1230 | if (!atmel_default_console_device) | ||
1231 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1232 | } | 1229 | } |
1233 | 1230 | ||
1234 | void __init at91_add_device_serial(void) | 1231 | void __init at91_add_device_serial(void) |
@@ -1239,9 +1236,11 @@ void __init at91_add_device_serial(void) | |||
1239 | if (at91_uarts[i]) | 1236 | if (at91_uarts[i]) |
1240 | platform_device_register(at91_uarts[i]); | 1237 | platform_device_register(at91_uarts[i]); |
1241 | } | 1238 | } |
1239 | |||
1240 | if (!atmel_default_console_device) | ||
1241 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
1242 | } | 1242 | } |
1243 | #else | 1243 | #else |
1244 | void __init at91_init_serial(struct at91_uart_config *config) {} | ||
1245 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | 1244 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} |
1246 | void __init at91_set_serial_console(unsigned portnr) {} | 1245 | void __init at91_set_serial_console(unsigned portnr) {} |
1247 | void __init at91_add_device_serial(void) {} | 1246 | void __init at91_add_device_serial(void) {} |
@@ -1257,6 +1256,7 @@ static int __init at91_add_standard_devices(void) | |||
1257 | { | 1256 | { |
1258 | at91_add_device_rtt(); | 1257 | at91_add_device_rtt(); |
1259 | at91_add_device_watchdog(); | 1258 | at91_add_device_watchdog(); |
1259 | at91_add_device_tc(); | ||
1260 | return 0; | 1260 | return 0; |
1261 | } | 1261 | } |
1262 | 1262 | ||