diff options
author | Sudhakar Rajashekhara <sudhakar.raj@ti.com> | 2010-06-07 12:39:59 +0530 |
---|---|---|
committer | Sandeep Paulraj <s-paulraj@ti.com> | 2010-06-10 12:04:32 -0400 |
commit | 9d79956029ec379e7137948ba3a7debbea61325f (patch) | |
tree | 507ad69a7762340004628f1a8163a426116275b4 /board/davinci/da830evm/da830evm.c | |
parent | 5246d01edd8935e04cdf79a5b9a03874509a31b1 (diff) | |
download | u-boot-imx-9d79956029ec379e7137948ba3a7debbea61325f.zip u-boot-imx-9d79956029ec379e7137948ba3a7debbea61325f.tar.gz u-boot-imx-9d79956029ec379e7137948ba3a7debbea61325f.tar.bz2 |
da830: Move common code out of da830evm.c file
TI's DA850/OMAP-L138 platform is similar to DA830/OMAP-L137
in many aspects. So instead of repeating the same code in
multiple files, move the common code to a different file
and call those functions from the respective da830/da850
files.
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: Nick Thompson <nick.thompson@ge.com>
Acked-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Diffstat (limited to 'board/davinci/da830evm/da830evm.c')
-rw-r--r-- | board/davinci/da830evm/da830evm.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/board/davinci/da830evm/da830evm.c b/board/davinci/da830evm/da830evm.c index 6385443..57506d6 100644 --- a/board/davinci/da830evm/da830evm.c +++ b/board/davinci/da830evm/da830evm.c @@ -41,6 +41,7 @@ #include <asm/arch/emac_defs.h> #include <asm/io.h> #include "../common/misc.h" +#include "common.h" DECLARE_GLOBAL_DATA_PTR; @@ -120,21 +121,18 @@ static const struct pinmux_resource pinmuxes[] = { #endif }; +static const struct lpsc_resource lpsc[] = { + { DAVINCI_LPSC_AEMIF }, /* NAND, NOR */ + { DAVINCI_LPSC_SPI0 }, /* Serial Flash */ + { DAVINCI_LPSC_EMAC }, /* image download */ + { DAVINCI_LPSC_UART2 }, /* console */ + { DAVINCI_LPSC_GPIO }, +}; + int board_init(void) { #ifndef CONFIG_USE_IRQ - /* - * Mask all IRQs by clearing the global enable and setting - * the enable clear for all the 90 interrupts. - */ - - writel(0, &davinci_aintc_regs->ger); - - writel(0, &davinci_aintc_regs->hier); - - writel(0xffffffff, &davinci_aintc_regs->ecr1); - writel(0xffffffff, &davinci_aintc_regs->ecr2); - writel(0xffffffff, &davinci_aintc_regs->ecr3); + irq_init(); #endif #ifdef CONFIG_NAND_DAVINCI @@ -165,11 +163,8 @@ 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); + if (da8xx_configure_lpsc_items(lpsc, ARRAY_SIZE(lpsc))) + return 1; /* setup the SUSPSRC for ARM to control emulation suspend */ writel(readl(&davinci_syscfg_regs->suspsrc) & |