From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefano babic Date: Sun, 02 Oct 2011 18:14:57 +0200 Subject: [U-Boot] [PATCH 2/3] misc:pmic: Enable PMIC handling at u-boot startup code In-Reply-To: <1317049825-25751-3-git-send-email-l.majewski@samsung.com> References: <1314868412-2949-1-git-send-email-l.majewski@samsung.com> <1317049825-25751-1-git-send-email-l.majewski@samsung.com> <1317049825-25751-3-git-send-email-l.majewski@samsung.com> Message-ID: <4E888E01.6060305@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Signed-off-by: Kyungmin Park > Cc: Stefano Babic > --- > 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 > #include > #include > +#include > > #ifdef CONFIG_BITBANGMII > #include > @@ -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 =====================================================================