public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx25pdk: Adapt it for the new PMIC framework
@ 2012-12-11 14:58 Fabio Estevam
  2012-12-11 15:14 ` Stefano Babic
  2012-12-11 16:45 ` Stefano Babic
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2012-12-11 14:58 UTC (permalink / raw)
  To: u-boot

Make the necessary adaptions for the new PMIC framework, so that mx25pdk can
be built again. 

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
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 <mmc.h>
 #include <fsl_esdhc.h>
 #include <i2c.h>
-#include <pmic.h>
+#include <power/pmic.h>
 #include <fsl_pmic.h>
 #include <mc34704.h>
 
@@ -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
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mx25pdk: Adapt it for the new PMIC framework
  2012-12-11 14:58 [U-Boot] [PATCH] mx25pdk: Adapt it for the new PMIC framework Fabio Estevam
@ 2012-12-11 15:14 ` Stefano Babic
  2012-12-11 16:29   ` Fabio Estevam
  2012-12-11 16:45 ` Stefano Babic
  1 sibling, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2012-12-11 15:14 UTC (permalink / raw)
  To: u-boot

On 11/12/2012 15:58, Fabio Estevam wrote:
> Make the necessary adaptions for the new PMIC framework, so that mx25pdk can
> be built again. 
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Stefano,
> 
> Build tested only, as I did not manage to get access to a mx25pdk.

Ok - I will merge it soon into u-boot-imx. If we will find some issues
later, we will fix on the top of it.

Acked-by: Stefano Babic <sbabic@denx.de>

Regards,
Stefano


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mx25pdk: Adapt it for the new PMIC framework
  2012-12-11 15:14 ` Stefano Babic
@ 2012-12-11 16:29   ` Fabio Estevam
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2012-12-11 16:29 UTC (permalink / raw)
  To: u-boot

On Tue, Dec 11, 2012 at 1:14 PM, Stefano Babic <sbabic@denx.de> wrote:

> Ok - I will merge it soon into u-boot-imx. If we will find some issues
> later, we will fix on the top of it.

Good, I have managed to get a mx25pdk and I can confirm that with this
patch the FEC (which depends on a supply being turned on by the PMIC)
is functional.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mx25pdk: Adapt it for the new PMIC framework
  2012-12-11 14:58 [U-Boot] [PATCH] mx25pdk: Adapt it for the new PMIC framework Fabio Estevam
  2012-12-11 15:14 ` Stefano Babic
@ 2012-12-11 16:45 ` Stefano Babic
  1 sibling, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2012-12-11 16:45 UTC (permalink / raw)
  To: u-boot

On 11/12/2012 15:58, Fabio Estevam wrote:
> Make the necessary adaptions for the new PMIC framework, so that mx25pdk can
> be built again. 
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, thanks.

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-11 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 14:58 [U-Boot] [PATCH] mx25pdk: Adapt it for the new PMIC framework Fabio Estevam
2012-12-11 15:14 ` Stefano Babic
2012-12-11 16:29   ` Fabio Estevam
2012-12-11 16:45 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox