summaryrefslogtreecommitdiffstats
path: root/board/hale/tt01
diff options
context:
space:
mode:
authorŁukasz Majewski <l.majewski@samsung.com>2012-11-13 03:21:55 +0000
committerAnatolij Gustschin <agust@denx.de>2012-11-14 11:21:09 +0100
commitc7336815078ff3745e3130aeff35991e3e98e61e (patch)
tree8ace1a85705cbd5b6484a45fefd093161a7a5b05 /board/hale/tt01
parent452329f1d57fe7cbc54e65617e84d5bb1f93f631 (diff)
downloadblackbird-obmc-uboot-c7336815078ff3745e3130aeff35991e3e98e61e.tar.gz
blackbird-obmc-uboot-c7336815078ff3745e3130aeff35991e3e98e61e.zip
pmic: Extend PMIC framework to support multiple instances of PMIC devices
The PMIC framework has been extended to support multiple instances of the variety of devices responsible for power management. This change allows supporting of e.g. fuel gauge, charger, MUIC (Micro USB Interface Circuit). Power related includes have been moved to ./include/power directory. This is a first of a series of patches - in the future "pmic" will be replaced with "power". Two important issues: 1. The PMIC needs to be initialized just after malloc is configured 2. It uses list to hold information about available PMIC devices Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board/hale/tt01')
-rw-r--r--board/hale/tt01/tt01.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/board/hale/tt01/tt01.c b/board/hale/tt01/tt01.c
index 143fcefedf..0c2cb795dd 100644
--- a/board/hale/tt01/tt01.c
+++ b/board/hale/tt01/tt01.c
@@ -25,12 +25,13 @@
#include <common.h>
#include <netdev.h>
#include <command.h>
-#include <pmic.h>
+#include <power/pmic.h>
#include <fsl_pmic.h>
#include <mc13783.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
+#include <errno.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -195,14 +196,21 @@ int board_mmc_init(bd_t *bis)
{
u32 val;
struct pmic *p;
+ int ret;
/*
* this is the first driver to use the pmic, so call
* pmic_init() here. board_late_init() is too late for
* the MMC driver.
*/
- pmic_init();
- p = get_pmic();
+
+ ret = pmic_init(I2C_PMIC);
+ if (ret)
+ return ret;
+
+ p = pmic_get("FSL_PMIC");
+ if (!p)
+ return -ENODEV;
/* configure pins for SDHC1 only */
mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SD1_CLK, MUX_CTL_FUNC));
OpenPOWER on IntegriCloud