projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'u-boot/master' into u-boot-arm-merged
[oweals/u-boot.git]
/
drivers
/
power
/
power_fsl.c
diff --git
a/drivers/power/power_fsl.c
b/drivers/power/power_fsl.c
index 651f88f850a0690bc26f15693051ddfee31e16f2..af4663dd259e651ba026453103dbcf26222792ce 100644
(file)
--- a/
drivers/power/power_fsl.c
+++ b/
drivers/power/power_fsl.c
@@
-27,6
+27,12
@@
#include <fsl_pmic.h>
#include <errno.h>
#include <fsl_pmic.h>
#include <errno.h>
+#if defined(CONFIG_PMIC_FSL_MC13892)
+#define FSL_PMIC_I2C_LENGTH 3
+#elif defined(CONFIG_PMIC_FSL_MC34704)
+#define FSL_PMIC_I2C_LENGTH 1
+#endif
+
#if defined(CONFIG_POWER_SPI)
static u32 pmic_spi_prepare_tx(u32 reg, u32 *val, u32 write)
{
#if defined(CONFIG_POWER_SPI)
static u32 pmic_spi_prepare_tx(u32 reg, u32 *val, u32 write)
{
@@
-59,8
+65,8
@@
int pmic_init(unsigned char bus)
#elif defined(CONFIG_POWER_I2C)
p->interface = PMIC_I2C;
p->hw.i2c.addr = CONFIG_SYS_FSL_PMIC_I2C_ADDR;
#elif defined(CONFIG_POWER_I2C)
p->interface = PMIC_I2C;
p->hw.i2c.addr = CONFIG_SYS_FSL_PMIC_I2C_ADDR;
- p->hw.i2c.tx_num =
3
;
- p->bus =
bus
;
+ p->hw.i2c.tx_num =
FSL_PMIC_I2C_LENGTH
;
+ p->bus =
I2C_PMIC
;
#else
#error "You must select CONFIG_POWER_SPI or CONFIG_PMIC_I2C"
#endif
#else
#error "You must select CONFIG_POWER_SPI or CONFIG_PMIC_I2C"
#endif