sdp.c 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * (C) Copyright 2010
  3. * Texas Instruments Incorporated, <www.ti.com>
  4. * Aneesh V <aneesh@ti.com>
  5. * Steve Sakoman <steve@sakoman.com>
  6. *
  7. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <common.h>
  10. #include <twl6030.h>
  11. #include <asm/arch/sys_proto.h>
  12. #include <asm/arch/mmc_host_def.h>
  13. #include "sdp4430_mux_data.h"
  14. DECLARE_GLOBAL_DATA_PTR;
  15. const struct omap_sysinfo sysinfo = {
  16. "Board: OMAP4430 SDP\n"
  17. };
  18. /**
  19. * @brief board_init
  20. *
  21. * @return 0
  22. */
  23. int board_init(void)
  24. {
  25. gpmc_init();
  26. gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */
  27. return 0;
  28. }
  29. int board_eth_init(bd_t *bis)
  30. {
  31. return 0;
  32. }
  33. /**
  34. * @brief misc_init_r - Configure SDP board specific configurations
  35. * such as power configurations, ethernet initialization as phase2 of
  36. * boot sequence
  37. *
  38. * @return 0
  39. */
  40. int misc_init_r(void)
  41. {
  42. #ifdef CONFIG_TWL6030_POWER
  43. twl6030_init_battery_charging();
  44. #endif
  45. return 0;
  46. }
  47. void set_muxconf_regs(void)
  48. {
  49. do_set_mux((*ctrl)->control_padconf_core_base,
  50. core_padconf_array_essential,
  51. sizeof(core_padconf_array_essential) /
  52. sizeof(struct pad_conf_entry));
  53. do_set_mux((*ctrl)->control_padconf_wkup_base,
  54. wkup_padconf_array_essential,
  55. sizeof(wkup_padconf_array_essential) /
  56. sizeof(struct pad_conf_entry));
  57. if ((omap_revision() >= OMAP4460_ES1_0) &&
  58. (omap_revision() < OMAP4470_ES1_0))
  59. do_set_mux((*ctrl)->control_padconf_wkup_base,
  60. wkup_padconf_array_essential_4460,
  61. sizeof(wkup_padconf_array_essential_4460) /
  62. sizeof(struct pad_conf_entry));
  63. }
  64. #if defined(CONFIG_GENERIC_MMC)
  65. int board_mmc_init(bd_t *bis)
  66. {
  67. omap_mmc_init(0, 0, 0, -1, -1);
  68. omap_mmc_init(1, 0, 0, -1, -1);
  69. return 0;
  70. }
  71. #if !defined(CONFIG_SPL_BUILD)
  72. void board_mmc_power_init(void)
  73. {
  74. twl6030_power_mmc_init(0);
  75. twl6030_power_mmc_init(1);
  76. }
  77. #endif
  78. #endif
  79. /*
  80. * get_board_rev() - get board revision
  81. */
  82. u32 get_board_rev(void)
  83. {
  84. return 0x20;
  85. }