diff options
Diffstat (limited to 'board/da8xx/da8xx-evm/da830.c')
-rw-r--r-- | board/da8xx/da8xx-evm/da830.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/board/da8xx/da8xx-evm/da830.c b/board/da8xx/da8xx-evm/da830.c index 716caf65df2..7268384a94b 100644 --- a/board/da8xx/da8xx-evm/da830.c +++ b/board/da8xx/da8xx-evm/da830.c @@ -40,8 +40,7 @@ DECLARE_GLOBAL_DATA_PTR; extern void timer_init(void); extern int eth_hw_init(void); -/* Works on Always On power domain only (no PD argument) */ -void lpsc_on(unsigned int id) +void lpsc_on(unsigned domain, unsigned int id) { dv_reg_p mdstat, mdctl, ptstat, ptcmd; @@ -61,16 +60,16 @@ void lpsc_on(unsigned int id) ptcmd = REG_P(PSC1_PTCMD); } - while (*ptstat & 0x01) {;} + while (*ptstat & (0x1 << domain)) {;} if ((*mdstat & 0x1f) == 0x03) return; /* Already on and enabled */ *mdctl |= 0x03; - *ptcmd = 0x01; + *ptcmd = 0x01 << domain; - while (*ptstat & 0x01) {;} + while (*ptstat & (0x1 << domain)) {;} while ((*mdstat & 0x1f) != 0x03) {;} /* Probably an overkill... */ } @@ -122,11 +121,11 @@ int board_init(void) * assuming here that the DSP bootloader has set the IOPU * such that PSC access is available to ARM */ - lpsc_on(DAVINCI_LPSC_AEMIF); /* NAND, NOR */ - lpsc_on(DAVINCI_LPSC_SPI0); /* Serial Flash */ - lpsc_on(DAVINCI_LPSC_EMAC); /* image download */ - lpsc_on(DAVINCI_LPSC_UART2); /* console */ - lpsc_on(DAVINCI_LPSC_GPIO); + lpsc_on(0, DAVINCI_LPSC_AEMIF); /* NAND, NOR */ + lpsc_on(0, DAVINCI_LPSC_SPI0); /* Serial Flash */ + lpsc_on(0, DAVINCI_LPSC_EMAC); /* image download */ + lpsc_on(0, DAVINCI_LPSC_UART2); /* console */ + lpsc_on(0, DAVINCI_LPSC_GPIO); /* Pin Muxing support */ |