From d9a0bb7553b59a0ecdd2cfdc8f26666492f298a9 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 8 Feb 2010 16:30:59 +0100 Subject: [PATCH 06/30] board-omap3beagle: prepare for DM3730 based BeagleboardXM * OPP changes copy/pasted from board-omap3evm.c * EHCI changes copy/pasted from Steve Kipisz' 2.6.33rcX work --- arch/arm/mach-omap2/board-omap3beagle.c | 57 ++++++++++++++++++++++++++---- 1 files changed, 49 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 1caaa01..accf80d 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -53,6 +53,23 @@ #include "pm.h" #include "omap3-opp.h" +#ifdef CONFIG_PM +static struct omap_opp * _omap35x_mpu_rate_table = omap35x_mpu_rate_table; +static struct omap_opp * _omap37x_mpu_rate_table = omap37x_mpu_rate_table; +static struct omap_opp * _omap35x_dsp_rate_table = omap35x_dsp_rate_table; +static struct omap_opp * _omap37x_dsp_rate_table = omap37x_dsp_rate_table; +static struct omap_opp * _omap35x_l3_rate_table = omap35x_l3_rate_table; +static struct omap_opp * _omap37x_l3_rate_table = omap37x_l3_rate_table; +#else /* CONFIG_PM */ +static struct omap_opp * _omap35x_mpu_rate_table = NULL; +static struct omap_opp * _omap37x_mpu_rate_table = NULL; +static struct omap_opp * _omap35x_dsp_rate_table = NULL; +static struct omap_opp * _omap37x_dsp_rate_table = NULL; +static struct omap_opp * _omap35x_l3_rate_table = NULL; +static struct omap_opp * _omap37x_l3_rate_table = NULL; +#endif /* CONFIG_PM */ + + #define GPMC_CS0_BASE 0x60 #define GPMC_CS_SIZE 0x30 @@ -303,12 +320,23 @@ static int beagle_twl_gpio_setup(struct device *dev, * power switch and overcurrent detect */ - gpio_request(gpio + 1, "EHCI_nOC"); - gpio_direction_input(gpio + 1); + if (cpu_is_omap3630()) { + gpio_request(gpio + 1, "nDVI_PWR_EN"); + gpio_direction_output(gpio + 1, 0); + + /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ + gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); + } + else { + gpio_request(gpio + 1, "EHCI_nOC"); + gpio_direction_input(gpio + 1); + + /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ + gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + } - /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ - gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); - gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; @@ -501,9 +529,22 @@ static struct platform_device keys_gpio = { static void __init omap3_beagle_init_irq(void) { - omap2_init_common_hw(mt46h32m32lf6_sdrc_params, - mt46h32m32lf6_sdrc_params, omap35x_mpu_rate_table, - omap35x_dsp_rate_table, omap35x_l3_rate_table); + if (cpu_is_omap3630()) + { + omap2_init_common_hw(mt46h32m32lf6_sdrc_params, + NULL, + _omap37x_mpu_rate_table, + _omap37x_dsp_rate_table, + _omap37x_l3_rate_table); + } + else + { + omap2_init_common_hw(mt46h32m32lf6_sdrc_params, + NULL, + _omap35x_mpu_rate_table, + _omap35x_dsp_rate_table, + _omap35x_l3_rate_table); + } omap_init_irq(); #ifdef CONFIG_OMAP_32K_TIMER omap2_gp_clockevent_set_gptimer(12); -- 1.6.6.1