* [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver
2011-11-22 14:14 [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver Robert Deliën
@ 2011-11-22 14:21 ` Marek Vasut
2011-11-22 18:14 ` Marek Vasut
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2011-11-22 14:21 UTC (permalink / raw)
To: u-boot
> This patch fixes a small off-by-one bug in the GPIO driver for the mxs
> platform that allowed the selection gpio pins of one bank more than the
> SoC actually has.
>
> Signed-off-by: Robert Deli?n <robert@delien.nl>
>
> diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
> index b7e9591..539738b 100644
> --- a/drivers/gpio/mxs_gpio.c
> +++ b/drivers/gpio/mxs_gpio.c
> @@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)
>
> int gpio_request(int gp, const char *label)
> {
> - if (PAD_BANK(gp) > PINCTRL_BANKS)
> + if (PAD_BANK(gp) >= PINCTRL_BANKS)
> return -EINVAL;
>
> return 0;
Good catch, I'll verify and ack afterwards.
Thanks
M
^ permalink raw reply [flat|nested] 6+ messages in thread* [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver
2011-11-22 14:14 [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver Robert Deliën
2011-11-22 14:21 ` Marek Vasut
@ 2011-11-22 18:14 ` Marek Vasut
[not found] ` <201111221953.42597.marek.vasut@gmail.com>
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2011-11-22 18:14 UTC (permalink / raw)
To: u-boot
> This patch fixes a small off-by-one bug in the GPIO driver for the mxs
> platform that allowed the selection gpio pins of one bank more than the
> SoC actually has.
>
> Signed-off-by: Robert Deli?n <robert@delien.nl>
>
> diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
> index b7e9591..539738b 100644
> --- a/drivers/gpio/mxs_gpio.c
> +++ b/drivers/gpio/mxs_gpio.c
> @@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)
>
> int gpio_request(int gp, const char *label)
> {
> - if (PAD_BANK(gp) > PINCTRL_BANKS)
> + if (PAD_BANK(gp) >= PINCTRL_BANKS)
> return -EINVAL;
>
> return 0;
Acked-by: Marek Vasut <marek.vasut@gmail.com>
I'd like to see Stefano review this too.
M
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <201111221953.42597.marek.vasut@gmail.com>]
* [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver
2011-11-22 14:14 [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver Robert Deliën
` (2 preceding siblings ...)
[not found] ` <201111221953.42597.marek.vasut@gmail.com>
@ 2011-11-22 22:49 ` Marek Vasut
2011-11-25 8:14 ` Stefano Babic
4 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2011-11-22 22:49 UTC (permalink / raw)
To: u-boot
> This patch fixes a small off-by-one bug in the GPIO driver for the mxs
> platform that allowed the selection gpio pins of one bank more than the
> SoC actually has.
>
> Signed-off-by: Robert Deli?n <robert@delien.nl>
>
> diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
> index b7e9591..539738b 100644
> --- a/drivers/gpio/mxs_gpio.c
> +++ b/drivers/gpio/mxs_gpio.c
> @@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)
>
> int gpio_request(int gp, const char *label)
> {
> - if (PAD_BANK(gp) > PINCTRL_BANKS)
> + if (PAD_BANK(gp) >= PINCTRL_BANKS)
> return -EINVAL;
>
> return 0;
Stefano, can you please apply ?
Acked-by: Marek Vasut <marek.vasut@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver
2011-11-22 14:14 [U-Boot] [PATCH] M28: Fix OB1 bug in GPIO driver Robert Deliën
` (3 preceding siblings ...)
2011-11-22 22:49 ` Marek Vasut
@ 2011-11-25 8:14 ` Stefano Babic
4 siblings, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2011-11-25 8:14 UTC (permalink / raw)
To: u-boot
On 22/11/2011 15:14, Robert Deli?n wrote:
> This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has.
>
> Signed-off-by: Robert Deli?n <robert@delien.nl>
>
> diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c
> index b7e9591..539738b 100644
> --- a/drivers/gpio/mxs_gpio.c
> +++ b/drivers/gpio/mxs_gpio.c
> @@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value)
>
> int gpio_request(int gp, const char *label)
> {
> - if (PAD_BANK(gp) > PINCTRL_BANKS)
> + if (PAD_BANK(gp) >= PINCTRL_BANKS)
> return -EINVAL;
>
> return 0;
>
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread