Re: [PATCH v2 2/2] omap3: beaglexm: fix DVI initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 9, 2011 at 1:13 AM, Ricardo Salveti de Araujo
<ricardo.salveti@xxxxxxxxxxxxx> wrote:
> Function beagle_twl_gpio_setup is called after beagle_display_init, what
> lets reset_gpio with an invalid value at the time it request the gpio.
> As a side effect the DVI reset GPIO is not properly set.
>
> Also removing old code that powers down DVI in a hardcoded way, as it's
> not necessary anymore.
>
> Tested with Beagle-xM and C4.

Surprised to see if this code works on C4 since there is gpio_request
for gpio_170 in the beagle init code
(linux omap master branch) which is before beagle_display_init()

        omap_mux_init_gpio(170, OMAP_PIN_INPUT);
        gpio_request(170, "DVI_nPD");
        /* REVISIT leave DVI powered down until it's needed ... */
        gpio_direction_output(170, true);

The second gpio_request(for 170) should fail in beagle_display_init.
Pls check and confirm.

-Manjunath

>
> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@xxxxxxxxxxxxx>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index 685ac06..1a21002 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -52,6 +52,9 @@
>
>  #define NAND_BLOCK_SIZE                SZ_128K
>
> +#define BEAGLE_DVI_RESET_GPIO          170
> +#define BEAGLE_XM_DVI_RESET_GPIO       129
> +
>  /*
>  * OMAP3 Beagle revision
>  * Run time detection of Beagle revision is done by reading GPIO.
> @@ -248,6 +251,14 @@ static void __init beagle_display_init(void)
>  {
>        int r;
>
> +       /* DVI reset GPIO is different between beagle revisions */
> +       if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
> +               beagle_dvi_device.reset_gpio = BEAGLE_XM_DVI_RESET_GPIO;
> +       else
> +               beagle_dvi_device.reset_gpio = BEAGLE_DVI_RESET_GPIO;
> +
> +       omap_mux_init_gpio(beagle_dvi_device.reset_gpio, OMAP_PIN_OUTPUT);
> +
>        r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
>        if (r < 0) {
>                printk(KERN_ERR "Unable to get DVI reset GPIO\n");
> @@ -324,12 +335,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
>        else
>                gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
>
> -       /* DVI reset GPIO is different between beagle revisions */
> -       if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM)
> -               beagle_dvi_device.reset_gpio = 129;
> -       else
> -               beagle_dvi_device.reset_gpio = 170;
> -
>        /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
>        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
>
> @@ -620,11 +625,6 @@ static void __init omap3_beagle_init(void)
>                        ARRAY_SIZE(omap3_beagle_devices));
>        omap_serial_init();
>
> -       omap_mux_init_gpio(170, OMAP_PIN_INPUT);
> -       gpio_request(170, "DVI_nPD");
> -       /* REVISIT leave DVI powered down until it's needed ... */
> -       gpio_direction_output(170, true);
> -
>        usb_musb_init(&musb_board_data);
>        usb_ehci_init(&ehci_pdata);
>        omap3beagle_flash_init();
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux