summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-07-01 20:52:51 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-07-01 20:52:51 +0200
commit304f936aeaab0c3cc9d5af438fd3498ac7682991 (patch)
tree6b50ccc855dff4717749974630d258ba786811d0 /drivers
parent019b57cc1d280c3768e2e8a7ff22e07a64c2f670 (diff)
parent5287d595449512385e25f5afcb68a130bf08bae6 (diff)
downloadu-boot-imx-304f936aeaab0c3cc9d5af438fd3498ac7682991.zip
u-boot-imx-304f936aeaab0c3cc9d5af438fd3498ac7682991.tar.gz
u-boot-imx-304f936aeaab0c3cc9d5af438fd3498ac7682991.tar.bz2
Merge remote-tracking branch 'u-boot-samsung/master'
Conflicts: boards.cfg Conflict was trivial between goni maintainer change and lager_nor removal.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/pmic/pmic_max77686.c13
-rw-r--r--drivers/spi/exynos_spi.c5
2 files changed, 12 insertions, 6 deletions
diff --git a/drivers/power/pmic/pmic_max77686.c b/drivers/power/pmic/pmic_max77686.c
index d4c430e..df1fd91 100644
--- a/drivers/power/pmic/pmic_max77686.c
+++ b/drivers/power/pmic/pmic_max77686.c
@@ -210,6 +210,10 @@ int pmic_init(unsigned char bus)
{
static const char name[] = "MAX77686_PMIC";
struct pmic *p = pmic_alloc();
+#ifdef CONFIG_OF_CONTROL
+ const void *blob = gd->fdt_blob;
+ int node, parent, tmp;
+#endif
if (!p) {
printf("%s: POWER allocation error!\n", __func__);
@@ -217,9 +221,6 @@ int pmic_init(unsigned char bus)
}
#ifdef CONFIG_OF_CONTROL
- const void *blob = gd->fdt_blob;
- int node, parent;
-
node = fdtdec_next_compatible(blob, 0, COMPAT_MAXIM_MAX77686_PMIC);
if (node < 0) {
debug("PMIC: No node for PMIC Chip in device tree\n");
@@ -233,11 +234,13 @@ int pmic_init(unsigned char bus)
return -1;
}
- p->bus = i2c_get_bus_num_fdt(parent);
- if (p->bus < 0) {
+ /* tmp since p->bus is unsigned */
+ tmp = i2c_get_bus_num_fdt(parent);
+ if (tmp < 0) {
debug("%s: Cannot find I2C bus\n", __func__);
return -1;
}
+ p->bus = tmp;
p->hw.i2c.addr = fdtdec_get_int(blob, node, "reg", 9);
#else
p->bus = bus;
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index 4d5def2..c92276f 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -302,7 +302,10 @@ static int spi_rx_tx(struct exynos_spi_slave *spi_slave, int todo,
}
} else {
if (rxp || stopping) {
- *rxp = temp;
+ if (step == 4)
+ *(uint32_t *)rxp = temp;
+ else
+ *rxp = temp;
rxp += step;
}
in_bytes -= step;