am3517crane.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * am3517crane.c - board file for AM3517 CraneBoard
  4. *
  5. * Author: Srinath.R <srinath@mistralsolutions.com>
  6. *
  7. * Based on logicpd/am3517evm/am3517evm.c
  8. *
  9. * Copyright (C) 2011 Mistral Solutions Pvt Ltd
  10. */
  11. #include <common.h>
  12. #include <asm/io.h>
  13. #include <asm/arch/mmc_host_def.h>
  14. #include <asm/arch/mem.h>
  15. #include <asm/arch/mux.h>
  16. #include <asm/arch/sys_proto.h>
  17. #include <asm/mach-types.h>
  18. #include <i2c.h>
  19. #include "am3517crane.h"
  20. DECLARE_GLOBAL_DATA_PTR;
  21. /*
  22. * Routine: board_init
  23. * Description: Early hardware init.
  24. */
  25. int board_init(void)
  26. {
  27. gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
  28. /* board id for Linux */
  29. gd->bd->bi_arch_number = MACH_TYPE_CRANEBOARD;
  30. /* boot param addr */
  31. gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
  32. return 0;
  33. }
  34. /*
  35. * Routine: misc_init_r
  36. * Description: Init i2c, ethernet, etc... (done here so udelay works)
  37. */
  38. int misc_init_r(void)
  39. {
  40. #ifdef CONFIG_SYS_I2C_OMAP24XX
  41. i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
  42. #endif
  43. omap_die_id_display();
  44. return 0;
  45. }
  46. /*
  47. * Routine: set_muxconf_regs
  48. * Description: Setting up the configuration Mux registers specific to the
  49. * hardware. Many pins need to be moved from protect to primary
  50. * mode.
  51. */
  52. void set_muxconf_regs(void)
  53. {
  54. MUX_AM3517CRANE();
  55. }
  56. #if defined(CONFIG_MMC)
  57. int board_mmc_init(bd_t *bis)
  58. {
  59. return omap_mmc_init(0, 0, 0, -1, -1);
  60. }
  61. #endif