aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-spear3xx/spear300.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-spear3xx/spear300.c')
-rw-r--r--arch/arm/mach-spear3xx/spear300.c82
1 files changed, 43 insertions, 39 deletions
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c
index 5aa2d54ebfaa..2697e65adf86 100644
--- a/arch/arm/mach-spear3xx/spear300.c
+++ b/arch/arm/mach-spear3xx/spear300.c
@@ -15,9 +15,9 @@
15#include <linux/amba/pl061.h> 15#include <linux/amba/pl061.h>
16#include <linux/ptrace.h> 16#include <linux/ptrace.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18#include <mach/generic.h>
19#include <mach/spear.h>
20#include <plat/shirq.h> 18#include <plat/shirq.h>
19#include <mach/generic.h>
20#include <mach/hardware.h>
21 21
22/* pad multiplexing support */ 22/* pad multiplexing support */
23/* muxing registers */ 23/* muxing registers */
@@ -310,7 +310,7 @@ struct pmx_dev pmx_telecom_boot_pins = {
310 .enb_on_reset = 1, 310 .enb_on_reset = 1,
311}; 311};
312 312
313struct pmx_dev_mode pmx_telecom_sdio_4bit_modes[] = { 313struct pmx_dev_mode pmx_telecom_sdhci_4bit_modes[] = {
314 { 314 {
315 .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | 315 .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE |
316 HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | 316 HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE |
@@ -323,14 +323,14 @@ struct pmx_dev_mode pmx_telecom_sdio_4bit_modes[] = {
323 }, 323 },
324}; 324};
325 325
326struct pmx_dev pmx_telecom_sdio_4bit = { 326struct pmx_dev pmx_telecom_sdhci_4bit = {
327 .name = "telecom_sdio_4bit", 327 .name = "telecom_sdhci_4bit",
328 .modes = pmx_telecom_sdio_4bit_modes, 328 .modes = pmx_telecom_sdhci_4bit_modes,
329 .mode_count = ARRAY_SIZE(pmx_telecom_sdio_4bit_modes), 329 .mode_count = ARRAY_SIZE(pmx_telecom_sdhci_4bit_modes),
330 .enb_on_reset = 1, 330 .enb_on_reset = 1,
331}; 331};
332 332
333struct pmx_dev_mode pmx_telecom_sdio_8bit_modes[] = { 333struct pmx_dev_mode pmx_telecom_sdhci_8bit_modes[] = {
334 { 334 {
335 .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | 335 .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE |
336 HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | 336 HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE |
@@ -342,10 +342,10 @@ struct pmx_dev_mode pmx_telecom_sdio_8bit_modes[] = {
342 }, 342 },
343}; 343};
344 344
345struct pmx_dev pmx_telecom_sdio_8bit = { 345struct pmx_dev pmx_telecom_sdhci_8bit = {
346 .name = "telecom_sdio_8bit", 346 .name = "telecom_sdhci_8bit",
347 .modes = pmx_telecom_sdio_8bit_modes, 347 .modes = pmx_telecom_sdhci_8bit_modes,
348 .mode_count = ARRAY_SIZE(pmx_telecom_sdio_8bit_modes), 348 .mode_count = ARRAY_SIZE(pmx_telecom_sdhci_8bit_modes),
349 .enb_on_reset = 1, 349 .enb_on_reset = 1,
350}; 350};
351 351
@@ -370,26 +370,6 @@ struct pmx_driver pmx_driver = {
370 .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, 370 .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff},
371}; 371};
372 372
373/* Add spear300 specific devices here */
374/* arm gpio1 device registration */
375static struct pl061_platform_data gpio1_plat_data = {
376 .gpio_base = 8,
377 .irq_base = SPEAR_GPIO1_INT_BASE,
378};
379
380struct amba_device gpio1_device = {
381 .dev = {
382 .init_name = "gpio1",
383 .platform_data = &gpio1_plat_data,
384 },
385 .res = {
386 .start = SPEAR300_GPIO_BASE,
387 .end = SPEAR300_GPIO_BASE + SPEAR300_GPIO_SIZE - 1,
388 .flags = IORESOURCE_MEM,
389 },
390 .irq = {VIRQ_GPIO1, NO_IRQ},
391};
392
393/* spear3xx shared irq */ 373/* spear3xx shared irq */
394struct shirq_dev_config shirq_ras1_config[] = { 374struct shirq_dev_config shirq_ras1_config[] = {
395 { 375 {
@@ -443,6 +423,26 @@ struct spear_shirq shirq_ras1 = {
443 }, 423 },
444}; 424};
445 425
426/* Add spear300 specific devices here */
427/* arm gpio1 device registration */
428static struct pl061_platform_data gpio1_plat_data = {
429 .gpio_base = 8,
430 .irq_base = SPEAR_GPIO1_INT_BASE,
431};
432
433struct amba_device gpio1_device = {
434 .dev = {
435 .init_name = "gpio1",
436 .platform_data = &gpio1_plat_data,
437 },
438 .res = {
439 .start = SPEAR300_GPIO_BASE,
440 .end = SPEAR300_GPIO_BASE + SZ_4K - 1,
441 .flags = IORESOURCE_MEM,
442 },
443 .irq = {VIRQ_GPIO1, NO_IRQ},
444};
445
446/* spear300 routines */ 446/* spear300 routines */
447void __init spear300_init(void) 447void __init spear300_init(void)
448{ 448{
@@ -452,17 +452,21 @@ void __init spear300_init(void)
452 spear3xx_init(); 452 spear3xx_init();
453 453
454 /* shared irq registration */ 454 /* shared irq registration */
455 shirq_ras1.regs.base = 455 shirq_ras1.regs.base = ioremap(SPEAR300_TELECOM_BASE, SZ_4K);
456 ioremap(SPEAR300_TELECOM_BASE, SPEAR300_TELECOM_REG_SIZE);
457 if (shirq_ras1.regs.base) { 456 if (shirq_ras1.regs.base) {
458 ret = spear_shirq_register(&shirq_ras1); 457 ret = spear_shirq_register(&shirq_ras1);
459 if (ret) 458 if (ret)
460 printk(KERN_ERR "Error registering Shared IRQ\n"); 459 printk(KERN_ERR "Error registering Shared IRQ\n");
461 } 460 }
462}
463 461
464void spear300_pmx_init(void) 462 /* pmx initialization */
465{ 463 pmx_driver.base = ioremap(SPEAR300_SOC_CONFIG_BASE, SZ_4K);
466 spear_pmx_init(&pmx_driver, SPEAR300_SOC_CONFIG_BASE, 464 if (pmx_driver.base) {
467 SPEAR300_SOC_CONFIG_SIZE); 465 ret = pmx_register(&pmx_driver);
466 if (ret)
467 printk(KERN_ERR "padmux: registeration failed. err no"
468 ": %d\n", ret);
469 /* Free Mapping, device selection already done */
470 iounmap(pmx_driver.base);
471 }
468} 472}