aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/ar7/platform.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-29 14:13:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-29 14:13:10 -0400
commitb77d643ced576bdd1e918aebda869de74696cde9 (patch)
treebb5d708f4bbb48461923a28e63a8cf8bdd477dd7 /arch/mips/ar7/platform.c
parentb4020c1b198c0f0c0b0ff0cfdd824a26b93edd6f (diff)
parent64575f918f3279d8487cf670dbefa956ce16a526 (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (46 commits) ftrace/MIPS: Enable C Version of recordmcount ftrace/MIPS: Add module support for C version of recordmcount ftrace/MIPS: Add MIPS64 support for C version of recordmcount MIPS: Make TASK_SIZE reflect proper size for both 32 and 64 bit processes. MIPS: Allow UserLocal on MIPS_R1 processors MIPS: Honor L2 bypass bit MIPS: Add BMIPS CP0 register definitions MIPS: Add BMIPS processor types to Kconfig MIPS: Decouple BMIPS CPU support from bcm47xx/bcm63xx SoC code MIPS: Add support for hardware performance events (mipsxx) MIPS: Perf-events: Add callchain support MIPS: add support for hardware performance events (skeleton) MIPS: add support for software performance events MIPS: define local_xchg from xchg_local to atomic_long_xchg MIPS: AR7: Add support for Titan (TNETV10xx) SoC variant MIPS: AR7: Initialize GPIO earlier MIPS: Add platform device and Kconfig for Octeon USB EHCI / OHCI USB: Add EHCI and OHCH glue for OCTEON II SOCs. MIPS: Octeon: Add register definitions for EHCI / OHCI USB glue logic. MIPS: Octeon: Apply CN63XXP1 errata workarounds. ...
Diffstat (limited to 'arch/mips/ar7/platform.c')
-rw-r--r--arch/mips/ar7/platform.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 0da5b2b8dd88..7d2fab392327 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -357,6 +357,11 @@ static struct gpio_led default_leds[] = {
357 }, 357 },
358}; 358};
359 359
360static struct gpio_led titan_leds[] = {
361 { .name = "status", .gpio = 8, .active_low = 1, },
362 { .name = "wifi", .gpio = 13, .active_low = 1, },
363};
364
360static struct gpio_led dsl502t_leds[] = { 365static struct gpio_led dsl502t_leds[] = {
361 { 366 {
362 .name = "status", 367 .name = "status",
@@ -495,6 +500,9 @@ static void __init detect_leds(void)
495 } else if (strstr(prid, "DG834")) { 500 } else if (strstr(prid, "DG834")) {
496 ar7_led_data.num_leds = ARRAY_SIZE(dg834g_leds); 501 ar7_led_data.num_leds = ARRAY_SIZE(dg834g_leds);
497 ar7_led_data.leds = dg834g_leds; 502 ar7_led_data.leds = dg834g_leds;
503 } else if (strstr(prid, "CYWM") || strstr(prid, "CYWL")) {
504 ar7_led_data.num_leds = ARRAY_SIZE(titan_leds);
505 ar7_led_data.leds = titan_leds;
498 } 506 }
499} 507}
500 508
@@ -560,6 +568,51 @@ static int __init ar7_register_uarts(void)
560 return 0; 568 return 0;
561} 569}
562 570
571static void __init titan_fixup_devices(void)
572{
573 /* Set vlynq0 data */
574 vlynq_low_data.reset_bit = 15;
575 vlynq_low_data.gpio_bit = 14;
576
577 /* Set vlynq1 data */
578 vlynq_high_data.reset_bit = 16;
579 vlynq_high_data.gpio_bit = 7;
580
581 /* Set vlynq0 resources */
582 vlynq_low_res[0].start = TITAN_REGS_VLYNQ0;
583 vlynq_low_res[0].end = TITAN_REGS_VLYNQ0 + 0xff;
584 vlynq_low_res[1].start = 33;
585 vlynq_low_res[1].end = 33;
586 vlynq_low_res[2].start = 0x0c000000;
587 vlynq_low_res[2].end = 0x0fffffff;
588 vlynq_low_res[3].start = 80;
589 vlynq_low_res[3].end = 111;
590
591 /* Set vlynq1 resources */
592 vlynq_high_res[0].start = TITAN_REGS_VLYNQ1;
593 vlynq_high_res[0].end = TITAN_REGS_VLYNQ1 + 0xff;
594 vlynq_high_res[1].start = 34;
595 vlynq_high_res[1].end = 34;
596 vlynq_high_res[2].start = 0x40000000;
597 vlynq_high_res[2].end = 0x43ffffff;
598 vlynq_high_res[3].start = 112;
599 vlynq_high_res[3].end = 143;
600
601 /* Set cpmac0 data */
602 cpmac_low_data.phy_mask = 0x40000000;
603
604 /* Set cpmac1 data */
605 cpmac_high_data.phy_mask = 0x80000000;
606
607 /* Set cpmac0 resources */
608 cpmac_low_res[0].start = TITAN_REGS_MAC0;
609 cpmac_low_res[0].end = TITAN_REGS_MAC0 + 0x7ff;
610
611 /* Set cpmac1 resources */
612 cpmac_high_res[0].start = TITAN_REGS_MAC1;
613 cpmac_high_res[0].end = TITAN_REGS_MAC1 + 0x7ff;
614}
615
563static int __init ar7_register_devices(void) 616static int __init ar7_register_devices(void)
564{ 617{
565 void __iomem *bootcr; 618 void __iomem *bootcr;
@@ -574,6 +627,9 @@ static int __init ar7_register_devices(void)
574 if (res) 627 if (res)
575 pr_warning("unable to register physmap-flash: %d\n", res); 628 pr_warning("unable to register physmap-flash: %d\n", res);
576 629
630 if (ar7_is_titan())
631 titan_fixup_devices();
632
577 ar7_device_disable(vlynq_low_data.reset_bit); 633 ar7_device_disable(vlynq_low_data.reset_bit);
578 res = platform_device_register(&vlynq_low); 634 res = platform_device_register(&vlynq_low);
579 if (res) 635 if (res)