diff options
Diffstat (limited to 'arch/arm/mach-davinci/devices-tnetv107x.c')
| -rw-r--r-- | arch/arm/mach-davinci/devices-tnetv107x.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c index 2718a3a90dff..c9a86d8130d1 100644 --- a/arch/arm/mach-davinci/devices-tnetv107x.c +++ b/arch/arm/mach-davinci/devices-tnetv107x.c | |||
| @@ -31,8 +31,10 @@ | |||
| 31 | #define TNETV107X_TPTC0_BASE 0x01c10000 | 31 | #define TNETV107X_TPTC0_BASE 0x01c10000 |
| 32 | #define TNETV107X_TPTC1_BASE 0x01c10400 | 32 | #define TNETV107X_TPTC1_BASE 0x01c10400 |
| 33 | #define TNETV107X_WDOG_BASE 0x08086700 | 33 | #define TNETV107X_WDOG_BASE 0x08086700 |
| 34 | #define TNETV107X_TSC_BASE 0x08088500 | ||
| 34 | #define TNETV107X_SDIO0_BASE 0x08088700 | 35 | #define TNETV107X_SDIO0_BASE 0x08088700 |
| 35 | #define TNETV107X_SDIO1_BASE 0x08088800 | 36 | #define TNETV107X_SDIO1_BASE 0x08088800 |
| 37 | #define TNETV107X_KEYPAD_BASE 0x08088a00 | ||
| 36 | #define TNETV107X_ASYNC_EMIF_CNTRL_BASE 0x08200000 | 38 | #define TNETV107X_ASYNC_EMIF_CNTRL_BASE 0x08200000 |
| 37 | #define TNETV107X_ASYNC_EMIF_DATA_CE0_BASE 0x30000000 | 39 | #define TNETV107X_ASYNC_EMIF_DATA_CE0_BASE 0x30000000 |
| 38 | #define TNETV107X_ASYNC_EMIF_DATA_CE1_BASE 0x40000000 | 40 | #define TNETV107X_ASYNC_EMIF_DATA_CE1_BASE 0x40000000 |
| @@ -298,12 +300,55 @@ static int __init nand_init(int chipsel, struct davinci_nand_pdata *data) | |||
| 298 | return platform_device_register(pdev); | 300 | return platform_device_register(pdev); |
| 299 | } | 301 | } |
| 300 | 302 | ||
| 303 | static struct resource keypad_resources[] = { | ||
| 304 | { | ||
| 305 | .start = TNETV107X_KEYPAD_BASE, | ||
| 306 | .end = TNETV107X_KEYPAD_BASE + 0xff, | ||
| 307 | .flags = IORESOURCE_MEM, | ||
| 308 | }, | ||
| 309 | { | ||
| 310 | .start = IRQ_TNETV107X_KEYPAD, | ||
| 311 | .flags = IORESOURCE_IRQ, | ||
| 312 | .name = "press", | ||
| 313 | }, | ||
| 314 | { | ||
| 315 | .start = IRQ_TNETV107X_KEYPAD_FREE, | ||
| 316 | .flags = IORESOURCE_IRQ, | ||
| 317 | .name = "release", | ||
| 318 | }, | ||
| 319 | }; | ||
| 320 | |||
| 321 | static struct platform_device keypad_device = { | ||
| 322 | .name = "tnetv107x-keypad", | ||
| 323 | .num_resources = ARRAY_SIZE(keypad_resources), | ||
| 324 | .resource = keypad_resources, | ||
| 325 | }; | ||
| 326 | |||
| 327 | static struct resource tsc_resources[] = { | ||
| 328 | { | ||
| 329 | .start = TNETV107X_TSC_BASE, | ||
| 330 | .end = TNETV107X_TSC_BASE + 0xff, | ||
| 331 | .flags = IORESOURCE_MEM, | ||
| 332 | }, | ||
| 333 | { | ||
| 334 | .start = IRQ_TNETV107X_TSC, | ||
| 335 | .flags = IORESOURCE_IRQ, | ||
| 336 | }, | ||
| 337 | }; | ||
| 338 | |||
| 339 | static struct platform_device tsc_device = { | ||
| 340 | .name = "tnetv107x-ts", | ||
| 341 | .num_resources = ARRAY_SIZE(tsc_resources), | ||
| 342 | .resource = tsc_resources, | ||
| 343 | }; | ||
| 344 | |||
| 301 | void __init tnetv107x_devices_init(struct tnetv107x_device_info *info) | 345 | void __init tnetv107x_devices_init(struct tnetv107x_device_info *info) |
| 302 | { | 346 | { |
| 303 | int i; | 347 | int i; |
| 304 | 348 | ||
| 305 | platform_device_register(&edma_device); | 349 | platform_device_register(&edma_device); |
| 306 | platform_device_register(&tnetv107x_wdt_device); | 350 | platform_device_register(&tnetv107x_wdt_device); |
| 351 | platform_device_register(&tsc_device); | ||
| 307 | 352 | ||
| 308 | if (info->serial_config) | 353 | if (info->serial_config) |
| 309 | davinci_serial_init(info->serial_config); | 354 | davinci_serial_init(info->serial_config); |
| @@ -317,4 +362,9 @@ void __init tnetv107x_devices_init(struct tnetv107x_device_info *info) | |||
| 317 | for (i = 0; i < 4; i++) | 362 | for (i = 0; i < 4; i++) |
| 318 | if (info->nand_config[i]) | 363 | if (info->nand_config[i]) |
| 319 | nand_init(i, info->nand_config[i]); | 364 | nand_init(i, info->nand_config[i]); |
| 365 | |||
| 366 | if (info->keypad_config) { | ||
| 367 | keypad_device.dev.platform_data = info->keypad_config; | ||
| 368 | platform_device_register(&keypad_device); | ||
| 369 | } | ||
| 320 | } | 370 | } |
