2 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
4 * Based on da830evm.c. Original Copyrights follow:
6 * Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. <nick.thompson@gefanuc.com>
7 * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include <asm/arch/hardware.h>
28 #include "../common/misc.h"
31 DECLARE_GLOBAL_DATA_PTR;
33 #define pinmux (&davinci_syscfg_regs->pinmux)
35 /* SPI0 pin muxer settings */
36 static const struct pinmux_config spi1_pins[] = {
43 /* UART pin muxer settings */
44 static const struct pinmux_config uart_pins[] = {
51 /* I2C pin muxer settings */
52 static const struct pinmux_config i2c_pins[] = {
57 static const struct pinmux_resource pinmuxes[] = {
58 #ifdef CONFIG_SPI_FLASH
59 PINMUX_ITEM(spi1_pins),
61 PINMUX_ITEM(uart_pins),
62 PINMUX_ITEM(i2c_pins),
65 static const struct lpsc_resource lpsc[] = {
66 { DAVINCI_LPSC_AEMIF }, /* NAND, NOR */
67 { DAVINCI_LPSC_SPI1 }, /* Serial Flash */
68 { DAVINCI_LPSC_EMAC }, /* image download */
69 { DAVINCI_LPSC_UART2 }, /* console */
70 { DAVINCI_LPSC_GPIO },
75 #ifndef CONFIG_USE_IRQ
79 /* arch number of the board */
80 gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DA850_EVM;
82 /* address of boot parameters */
83 gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
86 * Power on required peripherals
87 * ARM does not have access by default to PSC0 and PSC1
88 * assuming here that the DSP bootloader has set the IOPU
89 * such that PSC access is available to ARM
91 if (da8xx_configure_lpsc_items(lpsc, ARRAY_SIZE(lpsc)))
94 /* setup the SUSPSRC for ARM to control emulation suspend */
95 writel(readl(&davinci_syscfg_regs->suspsrc) &
96 ~(DAVINCI_SYSCFG_SUSPSRC_EMAC | DAVINCI_SYSCFG_SUSPSRC_I2C |
97 DAVINCI_SYSCFG_SUSPSRC_SPI1 | DAVINCI_SYSCFG_SUSPSRC_TIMER0 |
98 DAVINCI_SYSCFG_SUSPSRC_UART2),
99 &davinci_syscfg_regs->suspsrc);
101 /* configure pinmux settings */
102 if (davinci_configure_pin_mux_items(pinmuxes, ARRAY_SIZE(pinmuxes)))
105 /* enable the console UART */
106 writel((DAVINCI_UART_PWREMU_MGMT_FREE | DAVINCI_UART_PWREMU_MGMT_URRST |
107 DAVINCI_UART_PWREMU_MGMT_UTRST),
108 &davinci_uart2_ctrl_regs->pwremu_mgmt);