[U-Boot] [PATCH 3/3] exynos: pinmux: remove unnecessary routine
Rajeshwari Birje
rajeshwari.birje at gmail.com
Wed Jan 29 10:01:30 CET 2014
Hi Minkyu Knag,
On Wed, Jan 29, 2014 at 1:34 PM, Minkyu Kang <mk7.kang at 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 at 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
More information about the U-Boot
mailing list