From patchwork Fri Feb 3 15:24:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Niebel X-Patchwork-Id: 723719 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 3vFLKJ4Yhyz9s2s for ; Sat, 4 Feb 2017 02:25:24 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92E2D4B15F; Fri, 3 Feb 2017 16:25:20 +0100 (CET) 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 5GydMxm18-Ww; Fri, 3 Feb 2017 16:25:20 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6D7CE4B01B; Fri, 3 Feb 2017 16:25:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 563C94AE71 for ; Fri, 3 Feb 2017 16:25:11 +0100 (CET) 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 MoWd8s0bdOCU for ; Fri, 3 Feb 2017 16:25:11 +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 smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.18.16]) by theia.denx.de (Postfix) with ESMTPS id 2283D4ADB1 for ; Fri, 3 Feb 2017 16:25:07 +0100 (CET) Received: from [82.210.228.12] (helo=mailtqsc.tqsc.de) by smtprelay04.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1cZfjX-0004Bg-DB; Fri, 03 Feb 2017 16:25:07 +0100 Received: from niebel-ws.tq-net.de ([10.20.228.2]) by mailtqsc.tqsc.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1cZfjW-0007rk-IE; Fri, 03 Feb 2017 16:25:06 +0100 From: Markus Niebel To: u-boot@lists.denx.de Date: Fri, 3 Feb 2017 16:24:58 +0100 Message-Id: <1486135502-12034-2-git-send-email-niebelm@tqsc.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1486135502-12034-1-git-send-email-niebelm@tqsc.de> References: <1486135502-12034-1-git-send-email-niebelm@tqsc.de> X-Df-Sender: MTQ1NzgzNQ== Cc: Markus Niebel Subject: [U-Boot] [PATCH 1/5] imx6: tqma6: implement power_init_board X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Markus Niebel PMIC implements proper I2C bus switching, implement power_init_board instead handling in board_late_init. Signed-off-by: Markus Niebel --- board/tqc/tqma6/tqma6.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index c8fc95d..59b4a6c 100644 --- a/board/tqc/tqma6/tqma6.c +++ b/board/tqc/tqma6/tqma6.c @@ -232,25 +232,27 @@ static const char *tqma6_get_boardname(void) }; } -int board_late_init(void) +/* setup board specific PMIC */ +int power_init_board(void) { struct pmic *p; - u32 reg; - - setenv("board_name", tqma6_get_boardname()); + u32 reg, rev; - /* - * configure PFUZE100 PMIC: - * TODO: should go to power_init_board if bus switching is - * fixed in generic power code - */ power_pfuze100_init(TQMA6_PFUZE100_I2C_BUS); p = pmic_get("PFUZE100"); if (p && !pmic_probe(p)) { pmic_reg_read(p, PFUZE100_DEVICEID, ®); - printf("PMIC: PFUZE100 ID=0x%02x\n", reg); + pmic_reg_read(p, PFUZE100_REVID, &rev); + printf("PMIC: PFUZE100 ID=0x%02x REV=0x%02x\n", reg, rev); } + return 0; +} + +int board_late_init(void) +{ + setenv("board_name", tqma6_get_boardname()); + tqma6_bb_board_late_init(); return 0;