public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine
@ 2014-01-29  8:04 Minkyu Kang
  2014-01-29  9:01 ` Rajeshwari Birje
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Minkyu Kang @ 2014-01-29  8:04 UTC (permalink / raw)
  To: u-boot

Because of the list of peripherals is not sequential,
such a routine does not check for valid correctly.
Error check will be done when call the exynos_pinmux_config function.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
---
 arch/arm/cpu/armv7/exynos/pinmux.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
index 904177a..645c497 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void *blob, int node)
 	if (err)
 		return PERIPH_ID_NONE;
 
-	/* check for invalid peripheral id */
-	if ((PERIPH_ID_SDMMC4 > cell[1]) || (cell[1] < PERIPH_ID_UART0))
-		return cell[1];
-
-	debug(" invalid peripheral id\n");
-	return PERIPH_ID_NONE;
+	return cell[1];
 }
 
 int pinmux_decode_periph_id(const void *blob, int node)
-- 
1.7.9.5
-- 
Thanks,
Minkyu Kang.

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine
  2014-01-29  8:04 [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine Minkyu Kang
@ 2014-01-29  9:01 ` Rajeshwari Birje
  2014-02-03  7:23   ` Minkyu Kang
  2014-02-03 11:38 ` Jaehoon Chung
  2014-02-05  7:25 ` Minkyu Kang
  2 siblings, 1 reply; 6+ messages in thread
From: Rajeshwari Birje @ 2014-01-29  9:01 UTC (permalink / raw)
  To: u-boot

Hi Minkyu Knag,

On Wed, Jan 29, 2014 at 1:34 PM, Minkyu Kang <mk7.kang@samsung.com> wrote:
> Because of the list of peripherals is not sequential,
> such a routine does not check for valid correctly.
> Error check will be done when call the exynos_pinmux_config function.
>
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> ---
>  arch/arm/cpu/armv7/exynos/pinmux.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
> index 904177a..645c497 100644
> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
> @@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void *blob, int node)
>         if (err)
>                 return PERIPH_ID_NONE;
>
> -       /* check for invalid peripheral id */
> -       if ((PERIPH_ID_SDMMC4 > cell[1]) || (cell[1] < PERIPH_ID_UART0))
> -               return cell[1];

Cant we check if less than PERIPH_ID_COUNT, this way we can atleast
cut down some wrong values.
Or value has to range between PERIPH_ID_UART0 and PERIPH_ID_COUNT
-- 
Regards,
Rajeshwari Shinde
> -
> -       debug(" invalid peripheral id\n");
> -       return PERIPH_ID_NONE;
> +       return cell[1];
>  }
>
>  int pinmux_decode_periph_id(const void *blob, int node)
> --
> 1.7.9.5
> --
> Thanks,
> Minkyu Kang.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine
  2014-01-29  9:01 ` Rajeshwari Birje
@ 2014-02-03  7:23   ` Minkyu Kang
  2014-02-04  9:12     ` Rajeshwari Birje
  0 siblings, 1 reply; 6+ messages in thread
From: Minkyu Kang @ 2014-02-03  7:23 UTC (permalink / raw)
  To: u-boot

On 29/01/14 18:01, Rajeshwari Birje wrote:
> Hi Minkyu Knag,
> 
> On Wed, Jan 29, 2014 at 1:34 PM, Minkyu Kang <mk7.kang@samsung.com> wrote:
>> Because of the list of peripherals is not sequential,
>> such a routine does not check for valid correctly.
>> Error check will be done when call the exynos_pinmux_config function.
>>
>> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
>> ---
>>  arch/arm/cpu/armv7/exynos/pinmux.c |    7 +------
>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
>> index 904177a..645c497 100644
>> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
>> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
>> @@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void *blob, int node)
>>         if (err)
>>                 return PERIPH_ID_NONE;
>>
>> -       /* check for invalid peripheral id */
>> -       if ((PERIPH_ID_SDMMC4 > cell[1]) || (cell[1] < PERIPH_ID_UART0))
>> -               return cell[1];
> 
> Cant we check if less than PERIPH_ID_COUNT, this way we can atleast
> cut down some wrong values.
> Or value has to range between PERIPH_ID_UART0 and PERIPH_ID_COUNT
> 

possible. but I think it's unnecessary.
It can not check error correctly.
for example, if cell[1] is 55 then it's valid but does not supported.

Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine
  2014-01-29  8:04 [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine Minkyu Kang
  2014-01-29  9:01 ` Rajeshwari Birje
@ 2014-02-03 11:38 ` Jaehoon Chung
  2014-02-05  7:25 ` Minkyu Kang
  2 siblings, 0 replies; 6+ messages in thread
From: Jaehoon Chung @ 2014-02-03 11:38 UTC (permalink / raw)
  To: u-boot

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

On 01/29/2014 05:04 PM, Minkyu Kang wrote:
> Because of the list of peripherals is not sequential,
> such a routine does not check for valid correctly.
> Error check will be done when call the exynos_pinmux_config function.
> 
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> ---
>  arch/arm/cpu/armv7/exynos/pinmux.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
> index 904177a..645c497 100644
> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
> @@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void *blob, int node)
>  	if (err)
>  		return PERIPH_ID_NONE;
>  
> -	/* check for invalid peripheral id */
> -	if ((PERIPH_ID_SDMMC4 > cell[1]) || (cell[1] < PERIPH_ID_UART0))
> -		return cell[1];
> -
> -	debug(" invalid peripheral id\n");
> -	return PERIPH_ID_NONE;
> +	return cell[1];
>  }
>  
>  int pinmux_decode_periph_id(const void *blob, int node)
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine
  2014-02-03  7:23   ` Minkyu Kang
@ 2014-02-04  9:12     ` Rajeshwari Birje
  0 siblings, 0 replies; 6+ messages in thread
From: Rajeshwari Birje @ 2014-02-04  9:12 UTC (permalink / raw)
  To: u-boot

Hi Minkyu Kang,

On Mon, Feb 3, 2014 at 12:53 PM, Minkyu Kang <mk7.kang@samsung.com> wrote:
> On 29/01/14 18:01, Rajeshwari Birje wrote:
>> Hi Minkyu Knag,
>>
>> On Wed, Jan 29, 2014 at 1:34 PM, Minkyu Kang <mk7.kang@samsung.com> wrote:
>>> Because of the list of peripherals is not sequential,
>>> such a routine does not check for valid correctly.
>>> Error check will be done when call the exynos_pinmux_config function.
>>>
>>> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
>>> ---
>>>  arch/arm/cpu/armv7/exynos/pinmux.c |    7 +------
>>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>>
>>> diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
>>> index 904177a..645c497 100644
>>> --- a/arch/arm/cpu/armv7/exynos/pinmux.c
>>> +++ b/arch/arm/cpu/armv7/exynos/pinmux.c
>>> @@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void *blob, int node)
>>>         if (err)
>>>                 return PERIPH_ID_NONE;
>>>
>>> -       /* check for invalid peripheral id */
>>> -       if ((PERIPH_ID_SDMMC4 > cell[1]) || (cell[1] < PERIPH_ID_UART0))
>>> -               return cell[1];
>>
>> Cant we check if less than PERIPH_ID_COUNT, this way we can atleast
>> cut down some wrong values.
>> Or value has to range between PERIPH_ID_UART0 and PERIPH_ID_COUNT
>>
>
> possible. but I think it's unnecessary.
> It can not check error correctly.
> for example, if cell[1] is 55 then it's valid but does not supported.

Ok the point seems valid.

Acked-by: Rajeshwari Shinde<rajeshwari.s@samsung.com>
>
> Thanks,
> Minkyu Kang.
>
-- 
Regards,
Rajeshwari Shinde

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine
  2014-01-29  8:04 [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine Minkyu Kang
  2014-01-29  9:01 ` Rajeshwari Birje
  2014-02-03 11:38 ` Jaehoon Chung
@ 2014-02-05  7:25 ` Minkyu Kang
  2 siblings, 0 replies; 6+ messages in thread
From: Minkyu Kang @ 2014-02-05  7:25 UTC (permalink / raw)
  To: u-boot

On 29/01/14 17:04, Minkyu Kang wrote:
> Because of the list of peripherals is not sequential,
> such a routine does not check for valid correctly.
> Error check will be done when call the exynos_pinmux_config function.
> 
> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
> ---
>  arch/arm/cpu/armv7/exynos/pinmux.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 

applied to u-boot-samsung.

Minkyu Kang.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-05  7:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29  8:04 [U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine Minkyu Kang
2014-01-29  9:01 ` Rajeshwari Birje
2014-02-03  7:23   ` Minkyu Kang
2014-02-04  9:12     ` Rajeshwari Birje
2014-02-03 11:38 ` Jaehoon Chung
2014-02-05  7:25 ` Minkyu Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox