sdp.c 1.9 KB

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