4d2ca545838788905e0849792b481bde20a11dac
[openembedded.git] /
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
5
6         * OPP changes copy/pasted from board-omap3evm.c
7         * EHCI changes copy/pasted from Steve Kipisz' 2.6.33rcX work
8 ---
9  arch/arm/mach-omap2/board-omap3beagle.c |   57 ++++++++++++++++++++++++++----
10  1 files changed, 49 insertions(+), 8 deletions(-)
11
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
16 @@ -53,6 +53,23 @@
17  #include "pm.h"
18  #include "omap3-opp.h"
19  
20 +#ifdef CONFIG_PM
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 */
35 +
36 +
37  #define GPMC_CS0_BASE  0x60
38  #define GPMC_CS_SIZE   0x30
39  
40 @@ -303,12 +320,23 @@ static int beagle_twl_gpio_setup(struct device *dev,
41          * power switch and overcurrent detect
42          */
43  
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);     
49 +
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);
53 +       }
54 +       else {
55 +               gpio_request(gpio + 1, "EHCI_nOC");
56 +               gpio_direction_input(gpio + 1);
57 +
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);
61 +       }
62  
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);
66  
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 = {
70  
71  static void __init omap3_beagle_init_irq(void)
72  {
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())
77 +        {
78 +                omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
79 +                                        NULL,
80 +                                        _omap37x_mpu_rate_table,
81 +                                        _omap37x_dsp_rate_table,
82 +                                        _omap37x_l3_rate_table);
83 +        }
84 +        else
85 +        {
86 +                omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
87 +                                        NULL,
88 +                                        _omap35x_mpu_rate_table,
89 +                                        _omap35x_dsp_rate_table,
90 +                                        _omap35x_l3_rate_table);
91 +        }
92         omap_init_irq();
93  #ifdef CONFIG_OMAP_32K_TIMER
94         omap2_gp_clockevent_set_gptimer(12);
95 -- 
96 1.5.4.3
97