/* Derived from Beagle Board and 3430 SDP code by Richard Woodruff <r-woodruff2 at ti.com> Syed Mohammed Khasim <khasim at ti.com> Power Reset  */
void twl4030_power_reset_init(void)
/* Derived from Beagle Board and 3430 SDP code by Richard Woodruff <r-woodruff2 at ti.com> Syed Mohammed Khasim <khasim at ti.com> Power Reset  */
void twl4030_power_reset_init(void)
{
	u8 val = 0;
	if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
				TWL4030_PM_MASTER_P1_SW_EVENTS)) {
		printf("Error:TWL4030: failed to read the power register\n");
		printf("Could not initialize hardware reset\n");
	} else {
		val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
		if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
					 TWL4030_PM_MASTER_P1_SW_EVENTS)) {
			printf("Error:TWL4030: failed to write the power register\n");
			printf("Could not initialize hardware reset\n");
		}
	}
}