1 From 99669461e2ddd9947c30bbd5e49561609cee1367 Mon Sep 17 00:00:00 2001
2 From: OpenEmbedded User <oe@OE-builder.(none)>
3 Date: Mon, 8 Feb 2010 16:30:59 +0100
4 Subject: [PATCH] board-omap3beagle: prepare for DM3730 based BeagleboardXM
6 * OPP changes copy/pasted from board-omap3evm.c
7 * EHCI changes copy/pasted from Steve Kipisz' 2.6.33rcX work
9 arch/arm/mach-omap2/board-omap3beagle.c | 57 ++++++++++++++++++++++++++----
10 1 files changed, 49 insertions(+), 8 deletions(-)
12 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
13 index 1caaa01..accf80d 100644
14 --- a/arch/arm/mach-omap2/board-omap3beagle.c
15 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
18 #include "omap3-opp.h"
21 +static struct omap_opp * _omap35x_mpu_rate_table = omap35x_mpu_rate_table;
22 +static struct omap_opp * _omap37x_mpu_rate_table = omap37x_mpu_rate_table;
23 +static struct omap_opp * _omap35x_dsp_rate_table = omap35x_dsp_rate_table;
24 +static struct omap_opp * _omap37x_dsp_rate_table = omap37x_dsp_rate_table;
25 +static struct omap_opp * _omap35x_l3_rate_table = omap35x_l3_rate_table;
26 +static struct omap_opp * _omap37x_l3_rate_table = omap37x_l3_rate_table;
27 +#else /* CONFIG_PM */
28 +static struct omap_opp * _omap35x_mpu_rate_table = NULL;
29 +static struct omap_opp * _omap37x_mpu_rate_table = NULL;
30 +static struct omap_opp * _omap35x_dsp_rate_table = NULL;
31 +static struct omap_opp * _omap37x_dsp_rate_table = NULL;
32 +static struct omap_opp * _omap35x_l3_rate_table = NULL;
33 +static struct omap_opp * _omap37x_l3_rate_table = NULL;
34 +#endif /* CONFIG_PM */
37 #define GPMC_CS0_BASE 0x60
38 #define GPMC_CS_SIZE 0x30
40 @@ -303,12 +320,23 @@ static int beagle_twl_gpio_setup(struct device *dev,
41 * power switch and overcurrent detect
44 - gpio_request(gpio + 1, "EHCI_nOC");
45 - gpio_direction_input(gpio + 1);
46 + if (cpu_is_omap3630()) {
47 + gpio_request(gpio + 1, "nDVI_PWR_EN");
48 + gpio_direction_output(gpio + 1, 0);
50 + /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
51 + gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
52 + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
55 + gpio_request(gpio + 1, "EHCI_nOC");
56 + gpio_direction_input(gpio + 1);
58 + /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
59 + gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
60 + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
63 - /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
64 - gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
65 - gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
67 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
68 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
69 @@ -501,9 +529,22 @@ static struct platform_device keys_gpio = {
71 static void __init omap3_beagle_init_irq(void)
73 - omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
74 - mt46h32m32lf6_sdrc_params, omap35x_mpu_rate_table,
75 - omap35x_dsp_rate_table, omap35x_l3_rate_table);
76 + if (cpu_is_omap3630())
78 + omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
80 + _omap37x_mpu_rate_table,
81 + _omap37x_dsp_rate_table,
82 + _omap37x_l3_rate_table);
86 + omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
88 + _omap35x_mpu_rate_table,
89 + _omap35x_dsp_rate_table,
90 + _omap35x_l3_rate_table);
93 #ifdef CONFIG_OMAP_32K_TIMER
94 omap2_gp_clockevent_set_gptimer(12);