summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/daisy/mainboard.c1
-rw-r--r--src/mainboard/google/nyan/pmic.c2
-rw-r--r--src/mainboard/google/nyan_big/pmic.c2
-rw-r--r--src/mainboard/google/nyan_blaze/pmic.c2
-rw-r--r--src/mainboard/google/peach_pit/mainboard.c1
-rw-r--r--src/mainboard/google/peach_pit/romstage.c9
6 files changed, 8 insertions, 9 deletions
diff --git a/src/mainboard/google/daisy/mainboard.c b/src/mainboard/google/daisy/mainboard.c
index 8a252b1a19..cf25967851 100644
--- a/src/mainboard/google/daisy/mainboard.c
+++ b/src/mainboard/google/daisy/mainboard.c
@@ -34,6 +34,7 @@
#include <soc/samsung/exynos5250/i2c.h>
#include <soc/samsung/exynos5250/dp-core.h>
#include <soc/samsung/exynos5250/dp.h>
+#include <soc/samsung/exynos5250/periph.h>
#include <soc/samsung/exynos5250/usb.h>
#include "exynos5250.h"
diff --git a/src/mainboard/google/nyan/pmic.c b/src/mainboard/google/nyan/pmic.c
index cea872602a..7ec9290fd9 100644
--- a/src/mainboard/google/nyan/pmic.c
+++ b/src/mainboard/google/nyan/pmic.c
@@ -59,7 +59,7 @@ static struct as3722_init_reg init_list[] = {
static void pmic_write_reg(unsigned bus, uint8_t reg, uint8_t val, int do_delay)
{
- i2c_write(bus, AS3722_I2C_ADDR, reg, 1, &val, 1);
+ i2c_writeb(bus, AS3722_I2C_ADDR, reg, val);
if (do_delay)
udelay(500);
}
diff --git a/src/mainboard/google/nyan_big/pmic.c b/src/mainboard/google/nyan_big/pmic.c
index a6f6912a62..9f3f81a985 100644
--- a/src/mainboard/google/nyan_big/pmic.c
+++ b/src/mainboard/google/nyan_big/pmic.c
@@ -59,7 +59,7 @@ static struct as3722_init_reg init_list[] = {
static void pmic_write_reg(unsigned bus, uint8_t reg, uint8_t val, int do_delay)
{
- i2c_write(bus, AS3722_I2C_ADDR, reg, 1, &val, 1);
+ i2c_writeb(bus, AS3722_I2C_ADDR, reg, val);
if (do_delay)
udelay(500);
}
diff --git a/src/mainboard/google/nyan_blaze/pmic.c b/src/mainboard/google/nyan_blaze/pmic.c
index a6f6912a62..9f3f81a985 100644
--- a/src/mainboard/google/nyan_blaze/pmic.c
+++ b/src/mainboard/google/nyan_blaze/pmic.c
@@ -59,7 +59,7 @@ static struct as3722_init_reg init_list[] = {
static void pmic_write_reg(unsigned bus, uint8_t reg, uint8_t val, int do_delay)
{
- i2c_write(bus, AS3722_I2C_ADDR, reg, 1, &val, 1);
+ i2c_writeb(bus, AS3722_I2C_ADDR, reg, val);
if (do_delay)
udelay(500);
}
diff --git a/src/mainboard/google/peach_pit/mainboard.c b/src/mainboard/google/peach_pit/mainboard.c
index 706447ae92..01d19bc4aa 100644
--- a/src/mainboard/google/peach_pit/mainboard.c
+++ b/src/mainboard/google/peach_pit/mainboard.c
@@ -32,6 +32,7 @@
#include <soc/samsung/exynos5420/cpu.h>
#include <soc/samsung/exynos5420/gpio.h>
#include <soc/samsung/exynos5420/power.h>
+#include <soc/samsung/exynos5420/periph.h>
#include <soc/samsung/exynos5420/i2c.h>
#include <soc/samsung/exynos5420/dp.h>
#include <soc/samsung/exynos5420/fimd.h>
diff --git a/src/mainboard/google/peach_pit/romstage.c b/src/mainboard/google/peach_pit/romstage.c
index 16dc997e75..248809d1a2 100644
--- a/src/mainboard/google/peach_pit/romstage.c
+++ b/src/mainboard/google/peach_pit/romstage.c
@@ -97,13 +97,10 @@ static int setup_power(int is_resume)
uint8_t reg = pmic_writes[i].reg;
if (pmic_writes[i].or_orig)
- error |= i2c_read(4, MAX77802_I2C_ADDR,
- reg, sizeof(reg),
- &data, sizeof(data));
+ error |= i2c_readb(4, MAX77802_I2C_ADDR, reg, &data);
+
data |= pmic_writes[i].val;
- error |= i2c_write(4, MAX77802_I2C_ADDR,
- reg, sizeof(reg),
- &data, sizeof(data));
+ error |= i2c_writeb(4, MAX77802_I2C_ADDR, reg, data);
}
return error;