exynos: pinmux: remove unnecessary routine
Subsystems (2)
PATCH 3/3 exynos: pinmux: remove unnecessary routine
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.
--- arch/arm/cpu/armv7/exynos/pinmux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm/cpu/armv7/exynos/pinmux.c +1 -6
@@ -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)
Signature · 4 lines
1.7.9.5 -- Thanks, Minkyu Kang.
PATCH 3/3 exynos: pinmux: remove unnecessary routine
Hi Minkyu Knag,
Quoted 14 lines · Minkyu Kang
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 theexynos_pinmux_configfunction.Signed-off-by Minkyu Kang <[email protected]>--- arch/arm/cpu/armv7/exynos/pinmux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/arm/cpu/armv7/exynos/pinmux.c +0
-0
arch/arm/cpu/armv7/exynos/pinmux.c static int exynos5_pinmux_decode_periph_id(const void *blob, int node) · line 756
Quoted 6 lines
arch/arm/cpu/armv7/exynos/pinmux.c +0
-3@@ -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
Signature · 2 lines
Regards, Rajeshwari Shinde
Quoted 16 lines
arch/arm/cpu/armv7/exynos/pinmux.c +1
-4- -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
PATCH 3/3 exynos: pinmux: remove unnecessary routine
Quoted 20 lines · Rajeshwari Birje
Hi Minkyu Knag,
Quoted 17 lines · Minkyu Kang
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 theexynos_pinmux_configfunction.Signed-off-by Minkyu Kang <[email protected]>--- arch/arm/cpu/armv7/exynos/pinmux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/arm/cpu/armv7/exynos/pinmux.c +0
-0@@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void *blob, int node)if (err)return PERIPH_ID_NONE ;
Quoted 8 lines
arch/arm/cpu/armv7/exynos/pinmux.c static int exynos5_pinmux_decode_periph_id(const void *blob, int node) · line 756
Quoted 3 lines
arch/arm/cpu/armv7/exynos/pinmux.c +0
-3-/* 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 betweenPERIPH_ID_UART0andPERIPH_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.
PATCH 3/3 exynos: pinmux: remove unnecessary routine
In reply to Minkyu KangQuoted 28 lines · Minkyu Kang
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 theexynos_pinmux_configfunction.Signed-off-by Minkyu Kang <[email protected]>--- arch/arm/cpu/armv7/exynos/pinmux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/arm/cpu/armv7/exynos/pinmux.c +1
-6@@ -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)
PATCH 3/3 exynos: pinmux: remove unnecessary routine
In reply to Minkyu KangHi Minkyu Kang,
Quoted 30 lines · Minkyu Kang
Quoted 20 lines · Rajeshwari Birje
Hi Minkyu Knag,
Quoted 17 lines · Minkyu Kang
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 theexynos_pinmux_configfunction.Signed-off-by Minkyu Kang <[email protected]>--- arch/arm/cpu/armv7/exynos/pinmux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)arch/arm/cpu/armv7/exynos/pinmux.c +0
-0@@ -751,12 +751,7 @@ static int exynos5_pinmux_decode_periph_id(const void *blob, int node)if (err)return PERIPH_ID_NONE ;Quoted 8 lines
arch/arm/cpu/armv7/exynos/pinmux.c static int exynos5_pinmux_decode_periph_id(const void *blob, int node) · line 756
Quoted 3 lines
arch/arm/cpu/armv7/exynos/pinmux.c +0
-3-/* 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 betweenPERIPH_ID_UART0andPERIPH_ID_COUNT
Quoted 3 lines
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.
Quoted 4 lines
Thanks,
Minkyu Kang.
Signature · 2 lines
Regards, Rajeshwari Shinde
PATCH 3/3 exynos: pinmux: remove unnecessary routine
In reply to Minkyu KangQuoted 9 lines · Minkyu Kang
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 theexynos_pinmux_configfunction.Signed-off-by Minkyu Kang <[email protected]>--- arch/arm/cpu/armv7/exynos/pinmux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
applied to u-boot-samsung.
Minkyu Kang.