diff options
author | Tony Lindgren <tony@atomide.com> | 2011-03-10 21:54:14 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-03-10 21:54:14 -0500 |
commit | 94a06b74e724caabcf0464c81527cfbcae0c8aff (patch) | |
tree | 3570b6a627382a5eb5c8328b4959f615544d8e62 /arch/arm/mach-omap2/board-omap3beagle.c | |
parent | 0dde52a9f5330eec240660191a94b51bd911ffcd (diff) | |
parent | 9062511097683b4422f023d181b4a8b2db1a7a72 (diff) |
Merge branch 'for_2.6.39/pm-misc' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3beagle.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index b6752ac5b97e..20c5dbea8953 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/input.h> | 24 | #include <linux/input.h> |
25 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
26 | #include <linux/opp.h> | ||
26 | 27 | ||
27 | #include <linux/mtd/mtd.h> | 28 | #include <linux/mtd/mtd.h> |
28 | #include <linux/mtd/partitions.h> | 29 | #include <linux/mtd/partitions.h> |
@@ -45,10 +46,12 @@ | |||
45 | #include <plat/gpmc.h> | 46 | #include <plat/gpmc.h> |
46 | #include <plat/nand.h> | 47 | #include <plat/nand.h> |
47 | #include <plat/usb.h> | 48 | #include <plat/usb.h> |
49 | #include <plat/omap_device.h> | ||
48 | 50 | ||
49 | #include "mux.h" | 51 | #include "mux.h" |
50 | #include "hsmmc.h" | 52 | #include "hsmmc.h" |
51 | #include "timer-gp.h" | 53 | #include "timer-gp.h" |
54 | #include "pm.h" | ||
52 | 55 | ||
53 | #define NAND_BLOCK_SIZE SZ_128K | 56 | #define NAND_BLOCK_SIZE SZ_128K |
54 | 57 | ||
@@ -603,6 +606,52 @@ static struct omap_musb_board_data musb_board_data = { | |||
603 | .power = 100, | 606 | .power = 100, |
604 | }; | 607 | }; |
605 | 608 | ||
609 | static void __init beagle_opp_init(void) | ||
610 | { | ||
611 | int r = 0; | ||
612 | |||
613 | /* Initialize the omap3 opp table */ | ||
614 | if (omap3_opp_init()) { | ||
615 | pr_err("%s: opp default init failed\n", __func__); | ||
616 | return; | ||
617 | } | ||
618 | |||
619 | /* Custom OPP enabled for XM */ | ||
620 | if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { | ||
621 | struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); | ||
622 | struct omap_hwmod *dh = omap_hwmod_lookup("iva"); | ||
623 | struct device *dev; | ||
624 | |||
625 | if (!mh || !dh) { | ||
626 | pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", | ||
627 | __func__, mh, dh); | ||
628 | return; | ||
629 | } | ||
630 | /* Enable MPU 1GHz and lower opps */ | ||
631 | dev = &mh->od->pdev.dev; | ||
632 | r = opp_enable(dev, 800000000); | ||
633 | /* TODO: MPU 1GHz needs SR and ABB */ | ||
634 | |||
635 | /* Enable IVA 800MHz and lower opps */ | ||
636 | dev = &dh->od->pdev.dev; | ||
637 | r |= opp_enable(dev, 660000000); | ||
638 | /* TODO: DSP 800MHz needs SR and ABB */ | ||
639 | if (r) { | ||
640 | pr_err("%s: failed to enable higher opp %d\n", | ||
641 | __func__, r); | ||
642 | /* | ||
643 | * Cleanup - disable the higher freqs - we dont care | ||
644 | * about the results | ||
645 | */ | ||
646 | dev = &mh->od->pdev.dev; | ||
647 | opp_disable(dev, 800000000); | ||
648 | dev = &dh->od->pdev.dev; | ||
649 | opp_disable(dev, 660000000); | ||
650 | } | ||
651 | } | ||
652 | return; | ||
653 | } | ||
654 | |||
606 | static void __init omap3_beagle_init(void) | 655 | static void __init omap3_beagle_init(void) |
607 | { | 656 | { |
608 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 657 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
@@ -627,6 +676,7 @@ static void __init omap3_beagle_init(void) | |||
627 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); | 676 | omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); |
628 | 677 | ||
629 | beagle_display_init(); | 678 | beagle_display_init(); |
679 | beagle_opp_init(); | ||
630 | } | 680 | } |
631 | 681 | ||
632 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | 682 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") |