diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 20:48:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 20:48:14 -0400 |
commit | 2ca7d674d7ab2220707b2ada0b690c0e7c95e7ac (patch) | |
tree | 9c0927ed1d540e5fd704c1f82689870786514655 /arch/arm/mach-at91/at91sam9260_devices.c | |
parent | 2195d2818c37bdf263865f1e9effccdd9fc5f9d4 (diff) | |
parent | 87d721ad7a37b7650dd710c88dd5c6a5bf9fe996 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (257 commits)
[ARM] Update mach-types
ARM: 5636/1: Move vendor enum to AMBA include
ARM: Fix pfn_valid() for sparse memory
[ARM] orion5x: Add LaCie NAS 2Big Network support
[ARM] pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume
ARM: 5686/1: at91: Correct AC97 reset line in at91sam9263ek board
ARM: 5640/1: This patch modifies the support of AC97 on the at91sam9263 ek board
ARM: 5689/1: Update default config of HP Jornada 700-series machines
ARM: 5691/1: fix cache aliasing issues between kmap() and kmap_atomic() with highmem
ARM: 5688/1: ks8695_serial: disable_irq() lockup
ARM: 5687/1: fix an oops with highmem
ARM: 5684/1: Add nuc960 platform to w90x900
ARM: 5683/1: Add nuc950 platform to w90x900
ARM: 5682/1: Add cpu.c and dev.c and modify some files of w90p910 platform
ARM: 5626/1: add suspend/resume functions to amba-pl011 serial driver
ARM: 5625/1: fix hard coded 4K resource size in amba bus detection
MMC: MMCI: convert realview MMC to use gpiolib
ARM: 5685/1: Make MMCI driver compile without gpiolib
ARM: implement highpte
ARM: Show FIQ in /proc/interrupts on CONFIG_FIQ
...
Fix up trivial conflict in arch/arm/kernel/signal.c.
It was due to the TIF_NOTIFY_RESUME addition in commit d0420c83f ("KEYS:
Extend TIF_NOTIFY_RESUME to (almost) all architectures") and follow-ups.
Diffstat (limited to 'arch/arm/mach-at91/at91sam9260_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index d74c9ac007e7..ee4ea0e720cf 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -1113,6 +1113,122 @@ void __init at91_set_serial_console(unsigned portnr) {} | |||
1113 | void __init at91_add_device_serial(void) {} | 1113 | void __init at91_add_device_serial(void) {} |
1114 | #endif | 1114 | #endif |
1115 | 1115 | ||
1116 | /* -------------------------------------------------------------------- | ||
1117 | * CF/IDE | ||
1118 | * -------------------------------------------------------------------- */ | ||
1119 | |||
1120 | #if defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE) || \ | ||
1121 | defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) || \ | ||
1122 | defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) | ||
1123 | |||
1124 | static struct at91_cf_data cf0_data; | ||
1125 | |||
1126 | static struct resource cf0_resources[] = { | ||
1127 | [0] = { | ||
1128 | .start = AT91_CHIPSELECT_4, | ||
1129 | .end = AT91_CHIPSELECT_4 + SZ_256M - 1, | ||
1130 | .flags = IORESOURCE_MEM, | ||
1131 | } | ||
1132 | }; | ||
1133 | |||
1134 | static struct platform_device cf0_device = { | ||
1135 | .id = 0, | ||
1136 | .dev = { | ||
1137 | .platform_data = &cf0_data, | ||
1138 | }, | ||
1139 | .resource = cf0_resources, | ||
1140 | .num_resources = ARRAY_SIZE(cf0_resources), | ||
1141 | }; | ||
1142 | |||
1143 | static struct at91_cf_data cf1_data; | ||
1144 | |||
1145 | static struct resource cf1_resources[] = { | ||
1146 | [0] = { | ||
1147 | .start = AT91_CHIPSELECT_5, | ||
1148 | .end = AT91_CHIPSELECT_5 + SZ_256M - 1, | ||
1149 | .flags = IORESOURCE_MEM, | ||
1150 | } | ||
1151 | }; | ||
1152 | |||
1153 | static struct platform_device cf1_device = { | ||
1154 | .id = 1, | ||
1155 | .dev = { | ||
1156 | .platform_data = &cf1_data, | ||
1157 | }, | ||
1158 | .resource = cf1_resources, | ||
1159 | .num_resources = ARRAY_SIZE(cf1_resources), | ||
1160 | }; | ||
1161 | |||
1162 | void __init at91_add_device_cf(struct at91_cf_data *data) | ||
1163 | { | ||
1164 | struct platform_device *pdev; | ||
1165 | unsigned long csa; | ||
1166 | |||
1167 | if (!data) | ||
1168 | return; | ||
1169 | |||
1170 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
1171 | |||
1172 | switch (data->chipselect) { | ||
1173 | case 4: | ||
1174 | at91_set_multi_drive(AT91_PIN_PC8, 0); | ||
1175 | at91_set_A_periph(AT91_PIN_PC8, 0); | ||
1176 | csa |= AT91_MATRIX_CS4A_SMC_CF1; | ||
1177 | cf0_data = *data; | ||
1178 | pdev = &cf0_device; | ||
1179 | break; | ||
1180 | case 5: | ||
1181 | at91_set_multi_drive(AT91_PIN_PC9, 0); | ||
1182 | at91_set_A_periph(AT91_PIN_PC9, 0); | ||
1183 | csa |= AT91_MATRIX_CS5A_SMC_CF2; | ||
1184 | cf1_data = *data; | ||
1185 | pdev = &cf1_device; | ||
1186 | break; | ||
1187 | default: | ||
1188 | printk(KERN_ERR "AT91 CF: bad chip-select requested (%u)\n", | ||
1189 | data->chipselect); | ||
1190 | return; | ||
1191 | } | ||
1192 | |||
1193 | at91_sys_write(AT91_MATRIX_EBICSA, csa); | ||
1194 | |||
1195 | if (data->rst_pin) { | ||
1196 | at91_set_multi_drive(data->rst_pin, 0); | ||
1197 | at91_set_gpio_output(data->rst_pin, 1); | ||
1198 | } | ||
1199 | |||
1200 | if (data->irq_pin) { | ||
1201 | at91_set_gpio_input(data->irq_pin, 0); | ||
1202 | at91_set_deglitch(data->irq_pin, 1); | ||
1203 | } | ||
1204 | |||
1205 | if (data->det_pin) { | ||
1206 | at91_set_gpio_input(data->det_pin, 0); | ||
1207 | at91_set_deglitch(data->det_pin, 1); | ||
1208 | } | ||
1209 | |||
1210 | at91_set_B_periph(AT91_PIN_PC6, 0); /* CFCE1 */ | ||
1211 | at91_set_B_periph(AT91_PIN_PC7, 0); /* CFCE2 */ | ||
1212 | at91_set_A_periph(AT91_PIN_PC10, 0); /* CFRNW */ | ||
1213 | at91_set_A_periph(AT91_PIN_PC15, 1); /* NWAIT */ | ||
1214 | |||
1215 | if (data->flags & AT91_CF_TRUE_IDE) | ||
1216 | #if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) | ||
1217 | pdev->name = "pata_at91"; | ||
1218 | #elif defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE) | ||
1219 | pdev->name = "at91_ide"; | ||
1220 | #else | ||
1221 | #warning "board requires AT91_CF_TRUE_IDE: enable either at91_ide or pata_at91" | ||
1222 | #endif | ||
1223 | else | ||
1224 | pdev->name = "at91_cf"; | ||
1225 | |||
1226 | platform_device_register(pdev); | ||
1227 | } | ||
1228 | |||
1229 | #else | ||
1230 | void __init at91_add_device_cf(struct at91_cf_data * data) {} | ||
1231 | #endif | ||
1116 | 1232 | ||
1117 | /* -------------------------------------------------------------------- */ | 1233 | /* -------------------------------------------------------------------- */ |
1118 | /* | 1234 | /* |