am3517evm.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * am3517evm.c - board file for TI's AM3517 family of devices.
  3. *
  4. * Author: Vaibhav Hiremath <hvaibhav@ti.com>
  5. *
  6. * Based on ti/evm/evm.c
  7. *
  8. * Copyright (C) 2010
  9. * Texas Instruments Incorporated - http://www.ti.com/
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24. */
  25. #include <common.h>
  26. #include <asm/io.h>
  27. #include <asm/arch/mem.h>
  28. #include <asm/arch/mux.h>
  29. #include <asm/arch/sys_proto.h>
  30. #include <asm/arch/mmc_host_def.h>
  31. #include <asm/mach-types.h>
  32. #include <i2c.h>
  33. #include "am3517evm.h"
  34. DECLARE_GLOBAL_DATA_PTR;
  35. /*
  36. * Routine: board_init
  37. * Description: Early hardware init.
  38. */
  39. int board_init(void)
  40. {
  41. gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
  42. /* board id for Linux */
  43. gd->bd->bi_arch_number = MACH_TYPE_OMAP3517EVM;
  44. /* boot param addr */
  45. gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
  46. return 0;
  47. }
  48. /*
  49. * Routine: misc_init_r
  50. * Description: Init i2c, ethernet, etc... (done here so udelay works)
  51. */
  52. int misc_init_r(void)
  53. {
  54. #ifdef CONFIG_DRIVER_OMAP34XX_I2C
  55. i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
  56. #endif
  57. dieid_num_r();
  58. return 0;
  59. }
  60. /*
  61. * Routine: set_muxconf_regs
  62. * Description: Setting up the configuration Mux registers specific to the
  63. * hardware. Many pins need to be moved from protect to primary
  64. * mode.
  65. */
  66. void set_muxconf_regs(void)
  67. {
  68. MUX_AM3517EVM();
  69. }
  70. #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
  71. int board_mmc_init(bd_t *bis)
  72. {
  73. omap_mmc_init(0, 0, 0);
  74. return 0;
  75. }
  76. #endif