diff options
author | Markus Niebel <Markus.Niebel@tq-group.com> | 2017-02-03 16:24:58 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2017-03-17 09:27:08 +0100 |
commit | d7d8e8e4133d1124acb1b2b1d35f5c53f21a1046 (patch) | |
tree | 4ced8f1b2f2765fea32a857da63dfc8ed34531cf | |
parent | 10fa3ee09b4219e96128bf56b380a47a2b905134 (diff) |
imx6: tqma6: implement power_init_board
PMIC implements proper I2C bus switching,
implement power_init_board instead handling in
board_late_init.
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
-rw-r--r-- | board/tqc/tqma6/tqma6.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c index c8fc95d52bc..59b4a6c2eee 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; |