diff options
Diffstat (limited to 'arch/mips/ar7/platform.c')
| -rw-r--r-- | arch/mips/ar7/platform.c | 56 |
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 | ||
| 360 | static struct gpio_led titan_leds[] = { | ||
| 361 | { .name = "status", .gpio = 8, .active_low = 1, }, | ||
| 362 | { .name = "wifi", .gpio = 13, .active_low = 1, }, | ||
| 363 | }; | ||
| 364 | |||
| 360 | static struct gpio_led dsl502t_leds[] = { | 365 | static 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 | ||
| 571 | static 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 | |||
| 563 | static int __init ar7_register_devices(void) | 616 | static 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) |
