am3517crane.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23. */
  24. #include <common.h>
  25. #include <asm/io.h>
  26. #include <asm/arch/mmc_host_def.h>
  27. #include <asm/arch/mem.h>
  28. #include <asm/arch/mux.h>
  29. #include <asm/arch/sys_proto.h>
  30. #include <asm/mach-types.h>
  31. #include <i2c.h>
  32. #include "am3517crane.h"
  33. DECLARE_GLOBAL_DATA_PTR;
  34. /*
  35. * Routine: board_init
  36. * Description: Early hardware init.
  37. */
  38. int board_init(void)
  39. {
  40. gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
  41. /* board id for Linux */
  42. gd->bd->bi_arch_number = MACH_TYPE_CRANEBOARD;
  43. /* boot param addr */
  44. gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
  45. return 0;
  46. }
  47. /*
  48. * Routine: misc_init_r
  49. * Description: Init i2c, ethernet, etc... (done here so udelay works)
  50. */
  51. int misc_init_r(void)
  52. {
  53. #ifdef CONFIG_DRIVER_OMAP34XX_I2C
  54. i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
  55. #endif
  56. dieid_num_r();
  57. return 0;
  58. }
  59. /*
  60. * Routine: set_muxconf_regs
  61. * Description: Setting up the configuration Mux registers specific to the
  62. * hardware. Many pins need to be moved from protect to primary
  63. * mode.
  64. */
  65. void set_muxconf_regs(void)
  66. {
  67. MUX_AM3517CRANE();
  68. }
  69. #if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
  70. int board_mmc_init(bd_t *bis)
  71. {
  72. return omap_mmc_init(0, 0, 0, -1);
  73. }
  74. #endif