Sandeep Paulraj | 37dd009 | 2009-06-09 16:28:15 -0400 | [diff] [blame] | 1 | /* |
| 2 | * TI DaVinci DM365 EVM board support |
| 3 | * |
| 4 | * Copyright (C) 2009 Texas Instruments Incorporated |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation version 2. |
| 9 | * |
| 10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any |
| 11 | * kind, whether express or implied; without even the implied warranty |
| 12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/module.h> |
| 17 | #include <linux/init.h> |
| 18 | #include <linux/dma-mapping.h> |
| 19 | #include <linux/i2c.h> |
| 20 | #include <linux/io.h> |
| 21 | #include <linux/clk.h> |
| 22 | |
| 23 | #include <asm/setup.h> |
| 24 | #include <asm/mach-types.h> |
| 25 | #include <asm/mach/arch.h> |
| 26 | #include <asm/mach/map.h> |
| 27 | |
| 28 | #include <mach/hardware.h> |
| 29 | #include <mach/dm365.h> |
| 30 | #include <mach/psc.h> |
| 31 | #include <mach/common.h> |
| 32 | #include <mach/i2c.h> |
| 33 | #include <linux/i2c.h> |
| 34 | #include <mach/serial.h> |
| 35 | #include <mach/common.h> |
| 36 | |
| 37 | static struct davinci_i2c_platform_data i2c_pdata = { |
| 38 | .bus_freq = 400 /* kHz */, |
| 39 | .bus_delay = 0 /* usec */, |
| 40 | }; |
| 41 | |
| 42 | static void __init evm_init_i2c(void) |
| 43 | { |
| 44 | davinci_init_i2c(&i2c_pdata); |
| 45 | } |
| 46 | |
| 47 | static struct davinci_uart_config uart_config __initdata = { |
| 48 | .enabled_uarts = (1 << 0), |
| 49 | }; |
| 50 | |
| 51 | static void __init dm365_evm_map_io(void) |
| 52 | { |
| 53 | dm365_init(); |
| 54 | } |
| 55 | |
| 56 | static __init void dm365_evm_init(void) |
| 57 | { |
| 58 | evm_init_i2c(); |
| 59 | davinci_serial_init(&uart_config); |
| 60 | } |
| 61 | |
| 62 | static __init void dm365_evm_irq_init(void) |
| 63 | { |
| 64 | davinci_irq_init(); |
| 65 | } |
| 66 | |
| 67 | MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM") |
| 68 | .phys_io = IO_PHYS, |
| 69 | .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc, |
| 70 | .boot_params = (0x80000100), |
| 71 | .map_io = dm365_evm_map_io, |
| 72 | .init_irq = dm365_evm_irq_init, |
| 73 | .timer = &davinci_timer, |
| 74 | .init_machine = dm365_evm_init, |
| 75 | MACHINE_END |
| 76 | |