From patchwork Wed Dec 26 15:21:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 208176 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 4AC972C00BD for ; Thu, 27 Dec 2012 02:21:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7A2B4A030; Wed, 26 Dec 2012 16:21:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LqyCX4y1JMvi; Wed, 26 Dec 2012 16:21:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BED054A028; Wed, 26 Dec 2012 16:21:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F22214A028 for ; Wed, 26 Dec 2012 16:21:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aqGPbxDqGIVj for ; Wed, 26 Dec 2012 16:21:17 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by theia.denx.de (Postfix) with ESMTPS id 510FB4A023 for ; Wed, 26 Dec 2012 16:21:15 +0100 (CET) Received: by mail-ob0-f170.google.com with SMTP id wp18so8074222obc.29 for ; Wed, 26 Dec 2012 07:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XYlJL6TDMNRazAZAs2wo6v7ch/FjMORAAptK7DEREBM=; b=Xr9z+yswgzQDkRloOhhnOidlfRNGzf80zvHXbzHlPkwEEkJeQfn+iIJFItEf1hNpXi iHoE5ORAgNcaqNoTbt3RzQgaw/W/CTd9Z051IC2b1ui3ODNxpOXR0qqr8wPaQvNQAUgZ lNL6l9O38j2j1Zjms0EsFOZzSx8JDNn+hR3G23xO4Cto4xqBkfJURe+4dAMF899nGI82 U5Z4vm6JZ9ecFMxskQ5aObkEUDQJcL6ByfagmSk1evOEWbMq3eFgDekBusTpQr4+XtcN mbx5jo5NB/xsQefRVoPdYppgo6PiODneoAmNlXxp7wR7W7FaTIFOLEyvItfq1vCLkglB MDgg== MIME-Version: 1.0 Received: by 10.60.0.199 with SMTP id 7mr11226581oeg.139.1356535273897; Wed, 26 Dec 2012 07:21:13 -0800 (PST) Received: by 10.76.33.34 with HTTP; Wed, 26 Dec 2012 07:21:13 -0800 (PST) In-Reply-To: References: <1355243818-23962-1-git-send-email-fabio.estevam@freescale.com> Date: Wed, 26 Dec 2012 13:21:13 -0200 Message-ID: From: Fabio Estevam To: Robert Nelson Cc: Fabio Estevam , u-boot@lists.denx.de, =?UTF-8?B?TWFyZWsgVmHFoXV0?= Subject: Re: [U-Boot] [PATCH] mx53loco: Fix PMIC name X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Robert, On Wed, Dec 26, 2012 at 1:07 PM, Fabio Estevam wrote: > On Wed, Dec 26, 2012 at 1:02 PM, Fabio Estevam wrote: > >> With the new PMIC framework: is it safe to call the PMIC API from >> board_init function? > > Calling it from board_late_init fixes the issue for me. > > Will send the patch soon. Can you try the patch below? board/freescale/mx53loco/mx53loco.c | 10 ++++++++-- include/configs/mx53loco.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index 2c8cb7a..63a4f8b 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -462,12 +462,18 @@ int board_init(void) mxc_set_sata_internal_clock(); setup_iomux_i2c(); + + lcd_enable(); + + return 0; +} + +int board_late_init(void) +{ if (!power_init()) clock_1GHz(); print_cpuinfo(); - lcd_enable(); - return 0; } diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index e30502b..c4181bd 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -39,6 +39,7 @@ #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024) #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_GPIO #define CONFIG_REVISION_TAG