* [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C
@ 2011-06-03 21:56 ` Fernandes, Joel A
2011-06-04 8:01 ` Kooi, Koen
2011-06-04 14:07 ` Jason Kridner
0 siblings, 2 replies; 5+ messages in thread
From: Fernandes, Joel A @ 2011-06-03 21:56 UTC (permalink / raw)
To: linux-omap@vger.kernel.org
Cc: beagle@list.ti.com - Ultra-low cost OMAP3 board (May contain non-TIers),
beagleboard@googlegroups.com, Maupin, Chase
The USB enable GPIO has been in beagleboard xM revision C
The USER button has been moved since beagleboard xM
Also, board specific initialization has been moved to beagle_config struct
and initialized in omap3_beagle_init_rev. Default values in struct are for xMC.
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
arch/arm/mach-omap2/board-omap3beagle.c | 70 ++++++++++++++++++++-----------
1 files changed, 46 insertions(+), 24 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach-omap2/board-omap3beagle.c
index 7f21d24..261fb53 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -61,7 +61,8 @@
* AXBX = GPIO173, GPIO172, GPIO171: 1 1 1
* C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0
* C4 = GPIO173, GPIO172, GPIO171: 1 0 1
- * XM = GPIO173, GPIO172, GPIO171: 0 0 0
+ * XMA/XMB = GPIO173, GPIO172, GPIO171: 0 0 0
+ * XMC = GPIO173, GPIO172, GPIO171: 0 1 0
*/
enum {
OMAP3BEAGLE_BOARD_UNKN = 0,
@@ -69,14 +70,26 @@ enum {
OMAP3BEAGLE_BOARD_C1_3,
OMAP3BEAGLE_BOARD_C4,
OMAP3BEAGLE_BOARD_XM,
+ OMAP3BEAGLE_BOARD_XMC,
};
static u8 omap3_beagle_version;
-static u8 omap3_beagle_get_rev(void)
-{
- return omap3_beagle_version;
-}
+/*
+ * Board-specific configuration
+ * Defaults to BeagleBoard-xMC
+ */
+static struct {
+ int mmc1_gpio_wp;
+ int usb_pwr_level;
+ int reset_gpio;
+ int usr_button_gpio;
+} beagle_config = {
+ .mmc1_gpio_wp = -EINVAL,
+ .usb_pwr_level = GPIOF_OUT_INIT_LOW,
+ .reset_gpio = 129,
+ .usr_button_gpio = 4,
+};
static struct gpio omap3_beagle_rev_gpios[] __initdata = {
{ 171, GPIOF_IN, "rev_id_0" },
@@ -111,18 +124,32 @@ static void __init omap3_beagle_init_rev(void)
case 7:
printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
+ beagle_config.mmc1_gpio_wp = 29;
+ beagle_config.reset_gpio = 170;
+ beagle_config.usr_button_gpio = 7;
break;
case 6:
printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
+ beagle_config.mmc1_gpio_wp = 23;
+ beagle_config.reset_gpio = 170;
+ beagle_config.usr_button_gpio = 7;
break;
case 5:
printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
+ beagle_config.mmc1_gpio_wp = 23;
+ beagle_config.reset_gpio = 170;
+ beagle_config.usr_button_gpio = 7;
break;
case 0:
printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
+ beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
+ break;
+ case 2:
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
break;
default:
printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
@@ -234,7 +261,7 @@ static struct omap2_hsmmc_info mmc[] = {
{
.mmc = 1,
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
- .gpio_wp = 29,
+ .gpio_wp = -EINVAL,
},
{} /* Terminator */
};
@@ -252,17 +279,11 @@ static struct gpio_led gpio_leds[];
static int beagle_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{
- int r, usb_pwr_level;
-
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
- mmc[0].gpio_wp = -EINVAL;
- } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
- (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
- omap_mux_init_gpio(23, OMAP_PIN_INPUT);
- mmc[0].gpio_wp = 23;
- } else {
- omap_mux_init_gpio(29, OMAP_PIN_INPUT);
- }
+ int r;
+
+ if (beagle_config.mmc1_gpio_wp != -EINVAL)
+ omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
+ mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp;
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc);
@@ -276,9 +297,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
* high / others active low)
* DVI reset GPIO is different between beagle revisions
*/
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
- usb_pwr_level = GPIOF_OUT_INIT_HIGH;
- beagle_dvi_device.reset_gpio = 129;
+ if (cpu_is_omap3630()) {
/*
* gpio + 1 on Xm controls the TFP410's enable line (active low)
* gpio + 2 control varies depending on the board rev as below:
@@ -296,8 +315,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
pr_err("%s: unable to configure DVI_LDO_EN\n",
__func__);
} else {
- usb_pwr_level = GPIOF_OUT_INIT_LOW;
- beagle_dvi_device.reset_gpio = 170;
/*
* REVISIT: need ehci-omap hooks for external VBUS
* power switch and overcurrent detect
@@ -305,8 +322,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
pr_err("%s: unable to configure EHCI_nOC\n", __func__);
}
+ beagle_dvi_device.reset_gpio = beagle_config.reset_gpio;
- gpio_request_one(gpio + TWL4030_GPIO_MAX, usb_pwr_level, "nEN_USB_PWR");
+ gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
+ "nEN_USB_PWR");
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -526,7 +545,7 @@ static void __init beagle_opp_init(void)
}
/* Custom OPP enabled for XM */
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+ if (cpu_is_omap3630()) {
struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
struct omap_hwmod *dh = omap_hwmod_lookup("iva");
struct device *dev;
@@ -566,6 +585,9 @@ static void __init omap3_beagle_init(void)
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3_beagle_init_rev();
omap3_beagle_i2c_init();
+
+ gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
+
platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices));
omap_display_init(&beagle_dss_data);
--
1.6.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C
2011-06-03 21:56 ` [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C Fernandes, Joel A
@ 2011-06-04 8:01 ` Kooi, Koen
2011-06-04 14:11 ` Jason Kridner
2011-06-04 14:07 ` Jason Kridner
1 sibling, 1 reply; 5+ messages in thread
From: Kooi, Koen @ 2011-06-04 8:01 UTC (permalink / raw)
To: Fernandes, Joel A, linux-omap@vger.kernel.org
Cc: beagle@list.ti.com - Ultra-low cost OMAP3 board (May contain non-TIers),
beagleboard@googlegroups.com, Maupin, Chase
Texas Instruments Limited, 800 Pavilion Drive, Northampton, NN4 7YL. Registered in England & Wales under company number 00574102
________________________________________
From: Fernandes, Joel A
Sent: 03 June 2011 23:56
To: linux-omap@vger.kernel.org
Cc: beagle@list.ti.com - Ultra-low cost OMAP3 board (May contain non-TIers); beagleboard@googlegroups.com; Maupin, Chase
Subject: [beagle] [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C
The USB enable GPIO has been in beagleboard xM revision C
The USER button has been moved since beagleboard xM
Also, board specific initialization has been moved to beagle_config struct
and initialized in omap3_beagle_init_rev. Default values in struct are for xMC.
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
arch/arm/mach-omap2/board-omap3beagle.c | 70 ++++++++++++++++++++-----------
1 files changed, 46 insertions(+), 24 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach-omap2/board-omap3beagle.c
index 7f21d24..261fb53 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -276,9 +297,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
* high / others active low)
* DVI reset GPIO is different between beagle revisions
*/
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
- usb_pwr_level = GPIOF_OUT_INIT_HIGH;
- beagle_dvi_device.reset_gpio = 129;
+ if (cpu_is_omap3630()) {
PLease add a comment like "valid for all xM versions" to the above.
@@ -526,7 +545,7 @@ static void __init beagle_opp_init(void)
}
/* Custom OPP enabled for XM */
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+ if (cpu_is_omap3630()) {
same
@@ -566,6 +585,9 @@ static void __init omap3_beagle_init(void)
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3_beagle_init_rev();
omap3_beagle_i2c_init();
+
+ gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
+
And please move that into
static struct gpio_keys_button gpio_buttons[] = {
{
.code = BTN_EXTRA,
.gpio = 7, <- there
.desc = "user",
.wakeup = 1,
},
}
regards,
Koen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C
2011-06-03 21:56 ` [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C Fernandes, Joel A
2011-06-04 8:01 ` Kooi, Koen
@ 2011-06-04 14:07 ` Jason Kridner
1 sibling, 0 replies; 5+ messages in thread
From: Jason Kridner @ 2011-06-04 14:07 UTC (permalink / raw)
To: Fernandes, Joel A
Cc: linux-omap@vger.kernel.org,
beagle@list.ti.com - Ultra-low cost OMAP3 board (May contain non-TIers),
beagleboard@googlegroups.com, Maupin, Chase
On Fri, Jun 3, 2011 at 5:56 PM, Fernandes, Joel A <joelagnel@ti.com> wrote:
> The USB enable GPIO has been in beagleboard xM revision C
> The USER button has been moved since beagleboard xM
> Also, board specific initialization has been moved to beagle_config struct
> and initialized in omap3_beagle_init_rev. Default values in struct are for xMC.
>
> Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
> arch/arm/mach-omap2/board-omap3beagle.c | 70 ++++++++++++++++++++-----------
> 1 files changed, 46 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
> b/arch/arm/mach-omap2/board-omap3beagle.c
> index 7f21d24..261fb53 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -61,7 +61,8 @@
> * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1
> * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0
> * C4 = GPIO173, GPIO172, GPIO171: 1 0 1
> - * XM = GPIO173, GPIO172, GPIO171: 0 0 0
> + * XMA/XMB = GPIO173, GPIO172, GPIO171: 0 0 0
> + * XMC = GPIO173, GPIO172, GPIO171: 0 1 0
> */
> enum {
> OMAP3BEAGLE_BOARD_UNKN = 0,
> @@ -69,14 +70,26 @@ enum {
> OMAP3BEAGLE_BOARD_C1_3,
> OMAP3BEAGLE_BOARD_C4,
> OMAP3BEAGLE_BOARD_XM,
> + OMAP3BEAGLE_BOARD_XMC,
> };
>
> static u8 omap3_beagle_version;
>
> -static u8 omap3_beagle_get_rev(void)
> -{
> - return omap3_beagle_version;
> -}
> +/*
> + * Board-specific configuration
> + * Defaults to BeagleBoard-xMC
> + */
> +static struct {
> + int mmc1_gpio_wp;
> + int usb_pwr_level;
> + int reset_gpio;
> + int usr_button_gpio;
> +} beagle_config = {
> + .mmc1_gpio_wp = -EINVAL,
> + .usb_pwr_level = GPIOF_OUT_INIT_LOW,
> + .reset_gpio = 129,
> + .usr_button_gpio = 4,
> +};
>
> static struct gpio omap3_beagle_rev_gpios[] __initdata = {
> { 171, GPIOF_IN, "rev_id_0" },
> @@ -111,18 +124,32 @@ static void __init omap3_beagle_init_rev(void)
> case 7:
> printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
> omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
> + beagle_config.mmc1_gpio_wp = 29;
> + beagle_config.reset_gpio = 170;
> + beagle_config.usr_button_gpio = 7;
> break;
> case 6:
> printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
> omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
> + beagle_config.mmc1_gpio_wp = 23;
> + beagle_config.reset_gpio = 170;
> + beagle_config.usr_button_gpio = 7;
> break;
> case 5:
> printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
> omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
> + beagle_config.mmc1_gpio_wp = 23;
> + beagle_config.reset_gpio = 170;
> + beagle_config.usr_button_gpio = 7;
> break;
> case 0:
> printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
Since it sounds like there is already another revision coming, update
the text above to:
printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
> omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
> + beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
> + break;
> + case 2:
> + printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
> + omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
> break;
> default:
> printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
> @@ -234,7 +261,7 @@ static struct omap2_hsmmc_info mmc[] = {
> {
> .mmc = 1,
> .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
> - .gpio_wp = 29,
> + .gpio_wp = -EINVAL,
> },
> {} /* Terminator */
> };
> @@ -252,17 +279,11 @@ static struct gpio_led gpio_leds[];
> static int beagle_twl_gpio_setup(struct device *dev,
> unsigned gpio, unsigned ngpio)
> {
> - int r, usb_pwr_level;
> -
> - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
> - mmc[0].gpio_wp = -EINVAL;
> - } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
> - (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
> - omap_mux_init_gpio(23, OMAP_PIN_INPUT);
> - mmc[0].gpio_wp = 23;
> - } else {
> - omap_mux_init_gpio(29, OMAP_PIN_INPUT);
> - }
> + int r;
> +
> + if (beagle_config.mmc1_gpio_wp != -EINVAL)
> + omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
> + mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp;
> /* gpio + 0 is "mmc0_cd" (input/IRQ) */
> mmc[0].gpio_cd = gpio + 0;
> omap2_hsmmc_init(mmc);
> @@ -276,9 +297,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
> * high / others active low)
> * DVI reset GPIO is different between beagle revisions
> */
> - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
> - usb_pwr_level = GPIOF_OUT_INIT_HIGH;
> - beagle_dvi_device.reset_gpio = 129;
> + if (cpu_is_omap3630()) {
> /*
> * gpio + 1 on Xm controls the TFP410's enable line (active low)
> * gpio + 2 control varies depending on the board rev as below:
> @@ -296,8 +315,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
> pr_err("%s: unable to configure DVI_LDO_EN\n",
> __func__);
> } else {
> - usb_pwr_level = GPIOF_OUT_INIT_LOW;
> - beagle_dvi_device.reset_gpio = 170;
> /*
> * REVISIT: need ehci-omap hooks for external VBUS
> * power switch and overcurrent detect
> @@ -305,8 +322,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
> if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
> pr_err("%s: unable to configure EHCI_nOC\n", __func__);
> }
> + beagle_dvi_device.reset_gpio = beagle_config.reset_gpio;
>
> - gpio_request_one(gpio + TWL4030_GPIO_MAX, usb_pwr_level, "nEN_USB_PWR");
> + gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
> + "nEN_USB_PWR");
>
> /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
> gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
> @@ -526,7 +545,7 @@ static void __init beagle_opp_init(void)
> }
>
> /* Custom OPP enabled for XM */
> - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
> + if (cpu_is_omap3630()) {
> struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
> struct omap_hwmod *dh = omap_hwmod_lookup("iva");
> struct device *dev;
> @@ -566,6 +585,9 @@ static void __init omap3_beagle_init(void)
> omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
> omap3_beagle_init_rev();
> omap3_beagle_i2c_init();
> +
> + gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
> +
> platform_add_devices(omap3_beagle_devices,
> ARRAY_SIZE(omap3_beagle_devices));
> omap_display_init(&beagle_dss_data);
> --
> 1.6.1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C
2011-06-04 8:01 ` Kooi, Koen
@ 2011-06-04 14:11 ` Jason Kridner
2011-06-04 14:26 ` [beagleboard] " Koen Kooi
0 siblings, 1 reply; 5+ messages in thread
From: Jason Kridner @ 2011-06-04 14:11 UTC (permalink / raw)
To: Kooi, Koen
Cc: Fernandes, Joel A, linux-omap@vger.kernel.org,
beagle@list.ti.com - Ultra-low cost OMAP3 board (May contain non-TIers),
beagleboard@googlegroups.com, Maupin, Chase
On Sat, Jun 4, 2011 at 4:01 AM, Kooi, Koen <k-kooi@ti.com> wrote:
>
>
> Texas Instruments Limited, 800 Pavilion Drive, Northampton, NN4 7YL. Registered in England & Wales under company number 00574102
>
> ________________________________________
>
> From: Fernandes, Joel A
> Sent: 03 June 2011 23:56
> To: linux-omap@vger.kernel.org
> Cc: beagle@list.ti.com - Ultra-low cost OMAP3 board (May contain non-TIers); beagleboard@googlegroups.com; Maupin, Chase
> Subject: [beagle] [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C
>
> The USB enable GPIO has been in beagleboard xM revision C
> The USER button has been moved since beagleboard xM
> Also, board specific initialization has been moved to beagle_config struct
> and initialized in omap3_beagle_init_rev. Default values in struct are for xMC.
>
> Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
> arch/arm/mach-omap2/board-omap3beagle.c | 70 ++++++++++++++++++++-----------
> 1 files changed, 46 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
> b/arch/arm/mach-omap2/board-omap3beagle.c
> index 7f21d24..261fb53 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>
> @@ -276,9 +297,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
> * high / others active low)
> * DVI reset GPIO is different between beagle revisions
> */
> - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
> - usb_pwr_level = GPIOF_OUT_INIT_HIGH;
> - beagle_dvi_device.reset_gpio = 129;
> + if (cpu_is_omap3630()) {
>
> PLease add a comment like "valid for all xM versions" to the above.
>
> @@ -526,7 +545,7 @@ static void __init beagle_opp_init(void)
> }
>
> /* Custom OPP enabled for XM */
> - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
> + if (cpu_is_omap3630()) {
>
> same
>
> @@ -566,6 +585,9 @@ static void __init omap3_beagle_init(void)
> omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
> omap3_beagle_init_rev();
> omap3_beagle_i2c_init();
> +
> + gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
> +
>
> And please move that into
>
> static struct gpio_keys_button gpio_buttons[] = {
> {
> .code = BTN_EXTRA,
> .gpio = 7, <- there
I don't follow. The other assignment is dynamic, following the
detection of the board revision and, hopefully, before the
initialization of the GPIO button. I don't see how it can be moved
here. Perhaps it might be better to set it to -EINVAL to indicate it
will be assigned later?
> .desc = "user",
> .wakeup = 1,
> },
> }
>
> regards,
>
> Koen
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [beagleboard] Re: [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C
2011-06-04 14:11 ` Jason Kridner
@ 2011-06-04 14:26 ` Koen Kooi
0 siblings, 0 replies; 5+ messages in thread
From: Koen Kooi @ 2011-06-04 14:26 UTC (permalink / raw)
To: beagleboard
Cc: Kooi, Koen, Fernandes, Joel A, linux-omap@vger.kernel.org,
beagle@list.ti.com - Ultra-low cost OMAP3 board (May contain non-TIers),
Maupin, Chase
Op 4 jun 2011, om 16:11 heeft Jason Kridner het volgende geschreven:
> On Sat, Jun 4, 2011 at 4:01 AM, Kooi, Koen <k-kooi@ti.com> wrote:
>>
>>
>> Texas Instruments Limited, 800 Pavilion Drive, Northampton, NN4 7YL. Registered in England & Wales under company number 00574102
>>
>> ________________________________________
>>
>> From: Fernandes, Joel A
>> Sent: 03 June 2011 23:56
>> To: linux-omap@vger.kernel.org
>> Cc: beagle@list.ti.com - Ultra-low cost OMAP3 board (May contain non-TIers); beagleboard@googlegroups.com; Maupin, Chase
>> Subject: [beagle] [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C
>>
>> The USB enable GPIO has been in beagleboard xM revision C
>> The USER button has been moved since beagleboard xM
>> Also, board specific initialization has been moved to beagle_config struct
>> and initialized in omap3_beagle_init_rev. Default values in struct are for xMC.
>>
>> Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> ---
>> arch/arm/mach-omap2/board-omap3beagle.c | 70 ++++++++++++++++++++-----------
>> 1 files changed, 46 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
>> b/arch/arm/mach-omap2/board-omap3beagle.c
>> index 7f21d24..261fb53 100644
>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>>
>> @@ -276,9 +297,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
>> * high / others active low)
>> * DVI reset GPIO is different between beagle revisions
>> */
>> - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
>> - usb_pwr_level = GPIOF_OUT_INIT_HIGH;
>> - beagle_dvi_device.reset_gpio = 129;
>> + if (cpu_is_omap3630()) {
>>
>> PLease add a comment like "valid for all xM versions" to the above.
>>
>> @@ -526,7 +545,7 @@ static void __init beagle_opp_init(void)
>> }
>>
>> /* Custom OPP enabled for XM */
>> - if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
>> + if (cpu_is_omap3630()) {
>>
>> same
>>
>> @@ -566,6 +585,9 @@ static void __init omap3_beagle_init(void)
>> omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
>> omap3_beagle_init_rev();
>> omap3_beagle_i2c_init();
>> +
>> + gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
>> +
>>
>> And please move that into
>>
>> static struct gpio_keys_button gpio_buttons[] = {
>> {
>> .code = BTN_EXTRA,
>> .gpio = 7, <- there
>
> I don't follow. The other assignment is dynamic, following the
> detection of the board revision and, hopefully, before the
> initialization of the GPIO button. I don't see how it can be moved
> here. Perhaps it might be better to set it to -EINVAL to indicate it
> will be assigned later?
That would work, I think we should be consistent in all the assignments and if possible only set/assign them once.
regards,
Koen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-04 14:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <AQHMIjbc1GOjdu39Zku6xIzu4J56tg==>
2011-06-03 21:56 ` [PATCH v6] OMAP3: beagle: add support for beagleboard xM revision C Fernandes, Joel A
2011-06-04 8:01 ` Kooi, Koen
2011-06-04 14:11 ` Jason Kridner
2011-06-04 14:26 ` [beagleboard] " Koen Kooi
2011-06-04 14:07 ` Jason Kridner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).