diff options
author | David Hendricks <dhendrix@chromium.org> | 2013-01-09 17:42:02 -0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-01-10 05:55:46 +0100 |
commit | 27094b0afe25caf38e323d5f350be7d89aace366 (patch) | |
tree | bf4c57c8e18b066119492b9bec06c41ad142fbc2 /src | |
parent | 1d5390ecc85f7d0fc25d1a5cbe62ae6fa1abf5e2 (diff) |
exynos5250: un-comment a lot of code which was left out earlier
Turns out initializing power rails is necessary, even for getting
serial output.
Change-Id: I3042c1001ae43b1e793ee6cb90bb79b8db0f8fd1
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/2126
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/samsung/exynos5250/power.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/cpu/samsung/exynos5250/power.c b/src/cpu/samsung/exynos5250/power.c index 7d294ed90f..7c61655676 100644 --- a/src/cpu/samsung/exynos5250/power.c +++ b/src/cpu/samsung/exynos5250/power.c @@ -31,6 +31,9 @@ #include <cpu/samsung/exynos5-common/spl.h> #include <drivers/maxim/max77686/max77686.h> +#include "device/i2c.h" +#include "cpu/samsung/s5p-common/s3c24x0_i2c.h" + static void ps_hold_setup(void) { struct exynos5_power *power = @@ -138,21 +141,16 @@ int power_init(void) { int error = 0; - /* FIXME(dhendrix): not necessary for initial bringup... */ -#if 0 -#ifdef CONFIG_SPL_BUILD - struct spl_machine_param *param = spl_get_machine_params(); - + /* + * FIXME(dhendrix): We will re-factor the caller of power_init() + * to start from a board-specific romstage file and do the i2c + * early setup. There is no reason CPU power init code should + * mess with board-specific i2c parameters. + */ /* Set the i2c register address base so i2c works before FDT */ - i2c_set_early_reg(param->i2c_base); -#endif -#endif + i2c_set_early_reg(0x12c60000); ps_hold_setup(); - - /* FIXME(dhendrix): not necessary for initial bringup... */ -#if 0 - /* init the i2c so that we can program pmic chip */ i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); /* @@ -183,9 +181,10 @@ int power_init(void) REG_ENABLE, MAX77686_MV); error |= max77686_volsetting(PMIC_LDO10, CONFIG_VDD_LDO10_MV, REG_ENABLE, MAX77686_MV); -#endif - if (error != 0) + if (error != 0) { + power_shutdown(); printk(BIOS_ERR, "power init failed\n"); + } return error; } |