From patchwork Tue Dec 11 14:58:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 205252 X-Patchwork-Delegate: sbabic@denx.de 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 C9AA52C0086 for ; Wed, 12 Dec 2012 01:58:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C41C74A10C; Tue, 11 Dec 2012 15:58:26 +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 yNiraR+0HI6f; Tue, 11 Dec 2012 15:58:26 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF49C4A11B; Tue, 11 Dec 2012 15:58:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 607B04A11B for ; Tue, 11 Dec 2012 15:58:22 +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 1aszoqB9HJjU for ; Tue, 11 Dec 2012 15:58:20 +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 co1outboundpool.messaging.microsoft.com (co1ehsobe003.messaging.microsoft.com [216.32.180.186]) by theia.denx.de (Postfix) with ESMTPS id 42F8D4A10C for ; Tue, 11 Dec 2012 15:58:18 +0100 (CET) Received: from mail30-co1-R.bigfish.com (10.243.78.238) by CO1EHSOBE006.bigfish.com (10.243.66.69) with Microsoft SMTP Server id 14.1.225.23; Tue, 11 Dec 2012 14:58:15 +0000 Received: from mail30-co1 (localhost [127.0.0.1]) by mail30-co1-R.bigfish.com (Postfix) with ESMTP id 9B3DC74020F; Tue, 11 Dec 2012 14:58:15 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1155h) Received: from mail30-co1 (localhost.localdomain [127.0.0.1]) by mail30-co1 (MessageSwitch) id 1355237893506799_13754; Tue, 11 Dec 2012 14:58:13 +0000 (UTC) Received: from CO1EHSMHS019.bigfish.com (unknown [10.243.78.236]) by mail30-co1.bigfish.com (Postfix) with ESMTP id 545909000DA; Tue, 11 Dec 2012 14:58:13 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS019.bigfish.com (10.243.66.29) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 11 Dec 2012 14:58:07 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.318.3; Tue, 11 Dec 2012 14:58:06 +0000 Received: from fabio-Latitude-E6410.am.freescale.net ([10.29.244.90]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id qBBEw3xj009725; Tue, 11 Dec 2012 07:58:04 -0700 From: Fabio Estevam To: Date: Tue, 11 Dec 2012 12:58:02 -0200 Message-ID: <1355237882-30410-1-git-send-email-fabio.estevam@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: Fabio Estevam , u-boot@lists.denx.de Subject: [U-Boot] [PATCH] mx25pdk: Adapt it for the new PMIC framework 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 Make the necessary adaptions for the new PMIC framework, so that mx25pdk can be built again. Signed-off-by: Fabio Estevam Acked-by: Stefano Babic --- Stefano, Build tested only, as I did not manage to get access to a mx25pdk. board/freescale/mx25pdk/mx25pdk.c | 13 ++++++++++--- include/configs/mx25pdk.h | 6 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c index 72fa6bc..d73e27e 100644 --- a/board/freescale/mx25pdk/mx25pdk.c +++ b/board/freescale/mx25pdk/mx25pdk.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include @@ -110,11 +110,18 @@ int board_init(void) int board_late_init(void) { struct pmic *p; + int ret; mx25pdk_fec_init(); - pmic_init(); - p = get_pmic(); + ret = pmic_init(I2C_PMIC); + if (ret) + return ret; + + p = pmic_get("FSL_PMIC"); + if (!p) + return -ENODEV; + /* Turn on Ethernet PHY supply */ pmic_reg_write(p, MC34704_GENERAL2_REG, ONOFFE); diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h index b5338a0..bbb3161 100644 --- a/include/configs/mx25pdk.h +++ b/include/configs/mx25pdk.h @@ -108,9 +108,9 @@ #define CONFIG_SYS_FSL_ESDHC_NUM 1 /* PMIC Configs */ -#define CONFIG_PMIC -#define CONFIG_PMIC_I2C -#define CONFIG_PMIC_FSL +#define CONFIG_POWER +#define CONFIG_POWER_I2C +#define CONFIG_POWER_FSL #define CONFIG_PMIC_FSL_MC34704 #define CONFIG_SYS_FSL_PMIC_I2C_ADDR 0x54