am3517crane.c 1.4 KB

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