delta board: one more DA9030 fix.

This commit is contained in:
Markus Klotzbuecher 2006-03-30 17:00:39 +02:00 committed by Markus Klotzb�cher
parent f2841d3770
commit 9e7b5ce61b
2 changed files with 19 additions and 11 deletions
board/delta
include/configs

View File

@ -79,27 +79,34 @@ int dram_init (void)
return 0;
}
void i2c_init_board()
{
CKENB |= (CKENB_4_I2C);
/* setup I2C GPIO's */
GPIO32 = 0x801; /* SCL = Alt. Fkt. 1 */
GPIO33 = 0x801; /* SDA = Alt. Fkt. 1 */
}
/* initialize the DA9030 Power Controller */
static void init_DA9030()
{
uchar addr = (uchar) DA9030_I2C_ADDR, val = 0;
/* setup I2C GPIO's */
GPIO32 = 0x801; /* SCL = Alt. Fkt. 1 */
GPIO33 = 0x801; /* SDA = Alt. Fkt. 1 */
CKENB |= CKENB_7_GPIO;
udelay(100);
/* rising Edge on EXTON */
GPIO17 = 0xc800; /* enable pullup */
/* Rising Edge on EXTON to reset DA9030 */
GPIO17 = 0x8800; /* configure GPIO17, no pullup, -down */
GPDR0 |= (1<<17); /* GPIO17 is output */
GSDR0 = (1<<17);
GPCR0 = (1<<17); /* drive GPIO17 low */
udelay(5);
GPSR0 = (1<<17); /* drive GPIO17 high */
#if CFG_DA9030_EXTON_DELAY
udelay((unsigned long) CFG_DA9030_EXTON_DELAY); /* wait for DA9030 */
#endif
GPCR0 = (1<<17); /* drive GPIO17 low */
GPIO17 = 0x8800; /* disable pullup */
/* reset the watchdog and go active (0xec) */
val = (SYS_CONTROL_A_HWRES_ENABLE |

View File

@ -63,6 +63,7 @@
#define CFG_I2C_SLAVE 1 /* I2C controllers address */
#define DA9030_I2C_ADDR 0x49 /* I2C address of DA9030 */
#define CFG_DA9030_EXTON_DELAY 100000 /* wait x us after DA9030 reset via EXTON */
#define CFG_I2C_INIT_BOARD 1
/* #define CONFIG_HW_WATCHDOG 1 /\* Required for hitting the DA9030 WD *\/ */
/*