2 * TI DA850/OMAP-L138 EVM board
4 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
6 * Derived from: arch/arm/mach-davinci/board-da830-evm.c
7 * Original Copyrights follow:
9 * 2007, 2009 (c) MontaVista Software, Inc. This file is licensed under
10 * the terms of the GNU General Public License version 2. This program
11 * is licensed "as is" without any warranty of any kind, whether express
14 #include <linux/kernel.h>
15 #include <linux/module.h>
16 #include <linux/init.h>
17 #include <linux/console.h>
18 #include <linux/i2c.h>
19 #include <linux/i2c/at24.h>
21 #include <asm/mach-types.h>
22 #include <asm/mach/arch.h>
24 #include <mach/common.h>
25 #include <mach/irqs.h>
26 #include <mach/cp_intc.h>
27 #include <mach/da8xx.h>
29 static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata
= {
30 .bus_freq
= 100, /* kHz */
31 .bus_delay
= 0, /* usec */
34 static struct davinci_uart_config da850_evm_uart_config __initdata
= {
38 static __init
void da850_evm_init(void)
42 ret
= da8xx_register_edma();
44 pr_warning("da850_evm_init: edma registration failed: %d\n",
47 ret
= da8xx_pinmux_setup(da850_i2c0_pins
);
49 pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
52 ret
= da8xx_register_i2c(0, &da850_evm_i2c_0_pdata
);
54 pr_warning("da850_evm_init: i2c0 registration failed: %d\n",
57 ret
= da8xx_register_watchdog();
59 pr_warning("da830_evm_init: watchdog registration failed: %d\n",
62 davinci_serial_init(&da850_evm_uart_config
);
65 * shut down uart 0 and 1; they are not used on the board and
66 * accessing them causes endless "too much work in irq53" messages
69 __raw_writel(0, IO_ADDRESS(DA8XX_UART1_BASE
) + 0x30);
70 __raw_writel(0, IO_ADDRESS(DA8XX_UART0_BASE
) + 0x30);
73 #ifdef CONFIG_SERIAL_8250_CONSOLE
74 static int __init
da850_evm_console_init(void)
76 return add_preferred_console("ttyS", 2, "115200");
78 console_initcall(da850_evm_console_init
);
81 static __init
void da850_evm_irq_init(void)
83 struct davinci_soc_info
*soc_info
= &davinci_soc_info
;
85 cp_intc_init((void __iomem
*)DA8XX_CP_INTC_VIRT
, DA850_N_CP_INTC_IRQ
,
86 soc_info
->intc_irq_prios
);
89 static void __init
da850_evm_map_io(void)
94 MACHINE_START(DAVINCI_DA850_EVM
, "DaVinci DA850/OMAP-L138 EVM")
96 .io_pg_offst
= (__IO_ADDRESS(IO_PHYS
) >> 18) & 0xfffc,
97 .boot_params
= (DA8XX_DDR_BASE
+ 0x100),
98 .map_io
= da850_evm_map_io
,
99 .init_irq
= da850_evm_irq_init
,
100 .timer
= &davinci_timer
,
101 .init_machine
= da850_evm_init
,