[U-Boot] [PATCH 2/3] misc:pmic: Enable PMIC handling at u-boot startup code

stefano babic sbabic at denx.de
Sun Oct 2 18:14:57 CEST 2011


Am 26/09/2011 17:10, schrieb Lukasz Majewski:
> The pmic_init() initialization handler has been added to
> board_init_r function.
> 
> Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
>  arch/arm/lib/board.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index 85320bc..ea9e3d6 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -48,6 +48,7 @@
>  #include <nand.h>
>  #include <onenand_uboot.h>
>  #include <mmc.h>
> +#include <pmic.h>
>  
>  #ifdef CONFIG_BITBANGMII
>  #include <miiphy.h>
> @@ -578,6 +579,10 @@ void board_init_r(gd_t *id, ulong dest_addr)
>  		copy_filename(BootFile, s, sizeof(BootFile));
>  #endif
>  
> +#if defined(CONFIG_PMIC)
> +	pmic_init();
> +#endif
> +
>  #ifdef BOARD_LATE_INIT
>  	board_late_init();
>  #endif

I do not think this is correct. Only a few boards have a PMIC, and we
put the initialization in the general code for all ARM. And we cannot
decide *when* the PMIC must be initialized. Maybe a board requires some
other parts (GPIO initialization,...) before accessing the PMIC. It is
better to let the board maintainers to decide when to call this
function. So simply drop this patch, and put the call to pmic_init() in
your s5p_goni code.

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
=====================================================================


More information about the U-Boot mailing list