evm.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * (C) Copyright 2013
  3. * Texas Instruments Incorporated, <www.ti.com>
  4. *
  5. * Lokesh Vutla <lokeshvutla@ti.com>
  6. *
  7. * Based on previous work by:
  8. * Aneesh V <aneesh@ti.com>
  9. * Steve Sakoman <steve@sakoman.com>
  10. *
  11. * See file CREDITS for list of people who contributed to this
  12. * project.
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU General Public License as
  16. * published by the Free Software Foundation; either version 2 of
  17. * the License, or (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, write to the Free Software
  26. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  27. * MA 02111-1307 USA
  28. */
  29. #include <common.h>
  30. #include <twl6035.h>
  31. #include <asm/arch/sys_proto.h>
  32. #include <asm/arch/mmc_host_def.h>
  33. #include "mux_data.h"
  34. #ifdef CONFIG_USB_EHCI
  35. #include <usb.h>
  36. #include <asm/arch/ehci.h>
  37. #include <asm/ehci-omap.h>
  38. #endif
  39. DECLARE_GLOBAL_DATA_PTR;
  40. const struct omap_sysinfo sysinfo = {
  41. "Board: DRA7xx\n"
  42. };
  43. /**
  44. * @brief board_init
  45. *
  46. * @return 0
  47. */
  48. int board_init(void)
  49. {
  50. gpmc_init();
  51. gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */
  52. return 0;
  53. }
  54. int board_eth_init(bd_t *bis)
  55. {
  56. return 0;
  57. }
  58. /**
  59. * @brief misc_init_r - Configure EVM board specific configurations
  60. * such as power configurations, ethernet initialization as phase2 of
  61. * boot sequence
  62. *
  63. * @return 0
  64. */
  65. int misc_init_r(void)
  66. {
  67. return 0;
  68. }
  69. static void do_set_mux32(u32 base,
  70. struct pad_conf_entry const *array, int size)
  71. {
  72. int i;
  73. struct pad_conf_entry *pad = (struct pad_conf_entry *)array;
  74. for (i = 0; i < size; i++, pad++)
  75. writel(pad->val, base + pad->offset);
  76. }
  77. void set_muxconf_regs_essential(void)
  78. {
  79. do_set_mux32((*ctrl)->control_padconf_core_base,
  80. core_padconf_array_essential,
  81. sizeof(core_padconf_array_essential) /
  82. sizeof(struct pad_conf_entry));
  83. }
  84. #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
  85. int board_mmc_init(bd_t *bis)
  86. {
  87. omap_mmc_init(0, 0, 0, -1, -1);
  88. omap_mmc_init(1, 0, 0, -1, -1);
  89. return 0;
  90. }
  91. #endif