Chandan Nath | 7d74410 | 2011-10-14 02:58:26 +0000 | [diff] [blame] | 1 | /* |
| 2 | * evm.c |
| 3 | * |
| 4 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ |
| 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 | |
| 16 | #include <common.h> |
| 17 | #include <asm/arch/cpu.h> |
| 18 | #include <asm/arch/hardware.h> |
Chandan Nath | 77a73fe | 2012-01-09 20:38:59 +0000 | [diff] [blame] | 19 | #include <asm/arch/common_def.h> |
Chandan Nath | 7d74410 | 2011-10-14 02:58:26 +0000 | [diff] [blame] | 20 | #include <serial.h> |
Patil, Rachna | 5f70c51 | 2012-01-22 23:47:01 +0000 | [diff] [blame] | 21 | #include <i2c.h> |
Chandan Nath | 7d74410 | 2011-10-14 02:58:26 +0000 | [diff] [blame] | 22 | |
| 23 | DECLARE_GLOBAL_DATA_PTR; |
| 24 | |
| 25 | #define UART_RESET (0x1 << 1) |
| 26 | #define UART_CLK_RUNNING_MASK 0x1 |
| 27 | #define UART_SMART_IDLE_EN (0x1 << 0x3) |
| 28 | |
| 29 | /* |
| 30 | * Basic board specific setup |
| 31 | */ |
| 32 | int init_basic_setup(void) |
| 33 | { |
| 34 | /* Initialize the Timer */ |
| 35 | init_timer(); |
| 36 | |
| 37 | /* address of boot parameters */ |
| 38 | gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100; |
| 39 | |
| 40 | return 0; |
| 41 | } |
| 42 | |
| 43 | int board_init(void) |
| 44 | { |
| 45 | enable_uart0_pin_mux(); |
Patil, Rachna | 5f70c51 | 2012-01-22 23:47:01 +0000 | [diff] [blame] | 46 | |
| 47 | #ifdef CONFIG_I2C |
| 48 | enable_i2c0_pin_mux(); |
| 49 | i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); |
| 50 | #endif |
| 51 | |
Chandan Nath | 7d74410 | 2011-10-14 02:58:26 +0000 | [diff] [blame] | 52 | init_basic_setup(); |
| 53 | |
| 54 | return 0; |
| 55 | } |