evm.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #include <common.h>
  16. #include <asm/arch/cpu.h>
  17. #include <asm/arch/hardware.h>
  18. #include <asm/arch/common_def.h>
  19. #include <serial.h>
  20. #include <i2c.h>
  21. DECLARE_GLOBAL_DATA_PTR;
  22. #define UART_RESET (0x1 << 1)
  23. #define UART_CLK_RUNNING_MASK 0x1
  24. #define UART_SMART_IDLE_EN (0x1 << 0x3)
  25. /*
  26. * Basic board specific setup
  27. */
  28. int init_basic_setup(void)
  29. {
  30. /* Initialize the Timer */
  31. init_timer();
  32. /* address of boot parameters */
  33. gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100;
  34. return 0;
  35. }
  36. int board_init(void)
  37. {
  38. enable_uart0_pin_mux();
  39. #ifdef CONFIG_I2C
  40. enable_i2c0_pin_mux();
  41. i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
  42. #endif
  43. init_basic_setup();
  44. return 0;
  45. }