diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2013-05-14 16:57:50 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-07-10 20:08:15 +0200 |
commit | 08dc3571463d7226068d4a4c19d453859b148957 (patch) | |
tree | 9bda6512548f802a80ca226f3301111d88588e6f /src/drivers/maxim/max77686/max77686.c | |
parent | f73de9b9752229f95b4c2196ebb96a1bb0740cfb (diff) |
ARMv7: De-uboot-ify Exynos5250 code
When starting the Exynos5250 port, a lot of unneeded u-boot code
was imported. This is an attempt to get rid of a lot of unneeded
code before the port is used as a basis for further ARM ports.
There is a lot more that can be done, including cleaning up the
5250's Kconfig file.
Change-Id: I2d88676c436eea4b21bcb62f40018af9fabb3016
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Reviewed-on: http://review.coreboot.org/3642
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers/maxim/max77686/max77686.c')
-rw-r--r-- | src/drivers/maxim/max77686/max77686.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/drivers/maxim/max77686/max77686.c b/src/drivers/maxim/max77686/max77686.c index 5760d4223d..adc1627430 100644 --- a/src/drivers/maxim/max77686/max77686.c +++ b/src/drivers/maxim/max77686/max77686.c @@ -21,8 +21,8 @@ * MA 02111-1307 USA */ +#include <console/console.h> #include <arch/io.h> -#include <common.h> #include <device/i2c.h> #include "max77686.h" @@ -131,7 +131,7 @@ static int max77686_enablereg(unsigned int bus, enum max77686_regnum reg, int en ret = max77686_i2c_read(bus, MAX77686_I2C_ADDR, pmic->reg_enaddr, &read_data); if (ret != 0) { - debug("max77686 i2c read failed.\n"); + printk(BIOS_DEBUG, "max77686 i2c read failed.\n"); return -1; } @@ -147,7 +147,7 @@ static int max77686_enablereg(unsigned int bus, enum max77686_regnum reg, int en ret = max77686_i2c_write(bus, MAX77686_I2C_ADDR, pmic->reg_enaddr, read_data); if (ret != 0) { - debug("max77686 i2c write failed.\n"); + printk(BIOS_DEBUG, "max77686 i2c write failed.\n"); return -1; } @@ -165,13 +165,13 @@ int max77686_volsetting(unsigned int bus, enum max77686_regnum reg, pmic = &max77686_param[reg]; if (pmic->vol_addr == 0) { - debug("not a voltage register.\n"); + printk(BIOS_DEBUG, "not a voltage register.\n"); return -1; } ret = max77686_i2c_read(bus, MAX77686_I2C_ADDR, pmic->vol_addr, &read_data); if (ret != 0) { - debug("max77686 i2c read failed.\n"); + printk(BIOS_DEBUG, "max77686 i2c read failed.\n"); return -1; } @@ -181,7 +181,7 @@ int max77686_volsetting(unsigned int bus, enum max77686_regnum reg, vol_level = (volt - (u32)pmic->vol_min) * 1000; if (vol_level < 0) { - debug("Not a valid voltage level to set\n"); + printk(BIOS_DEBUG, "Not a valid voltage level to set\n"); return -1; } vol_level /= (u32)pmic->vol_div; @@ -191,13 +191,13 @@ int max77686_volsetting(unsigned int bus, enum max77686_regnum reg, ret = max77686_i2c_write(bus, MAX77686_I2C_ADDR, pmic->vol_addr, read_data); if (ret != 0) { - debug("max77686 i2c write failed.\n"); + printk(BIOS_DEBUG, "max77686 i2c write failed.\n"); return -1; } ret = max77686_enablereg(bus, reg, enable); if (ret != 0) { - debug("Failed to enable buck/ldo.\n"); + printk(BIOS_DEBUG, "Failed to enable buck/ldo.\n"); return -1; } return 0; @@ -215,7 +215,7 @@ int max77686_disable_backup_batt(unsigned int bus) ret = max77686_i2c_read(bus, MAX77686_I2C_ADDR, REG_BBAT, &val); if (ret) { - debug("max77686 i2c read failed\n"); + printk(BIOS_DEBUG, "max77686 i2c read failed\n"); return ret; } @@ -228,7 +228,7 @@ int max77686_disable_backup_batt(unsigned int bus) val &= ~BBAT_BBCHOSTEN_MASK; ret = max77686_i2c_write(bus, MAX77686_I2C_ADDR, REG_BBAT, val); if (ret) { - debug("max77686 i2c write failed\n"); + printk(BIOS_DEBUG, "max77686 i2c write failed\n"); return -1; } @@ -236,7 +236,7 @@ int max77686_disable_backup_batt(unsigned int bus) val |= BBAT_BBCVS_MASK; ret = max77686_i2c_write(bus, MAX77686_I2C_ADDR, REG_BBAT, val); if (ret) { - debug("max77686 i2c write failed\n"); + printk(BIOS_DEBUG, "max77686 i2c write failed\n"); return -1; } |