board.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * board.c
  3. *
  4. * Common board functions for AM33XX based boards
  5. *
  6. * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
  16. * GNU General Public License for more details.
  17. */
  18. #include <common.h>
  19. #include <errno.h>
  20. #include <spl.h>
  21. #include <asm/arch/cpu.h>
  22. #include <asm/arch/hardware.h>
  23. #include <asm/arch/omap.h>
  24. #include <asm/arch/ddr_defs.h>
  25. #include <asm/arch/clock.h>
  26. #include <asm/arch/gpio.h>
  27. #include <asm/arch/mmc_host_def.h>
  28. #include <asm/arch/sys_proto.h>
  29. #include <asm/io.h>
  30. #include <asm/emif.h>
  31. #include <asm/gpio.h>
  32. #include <i2c.h>
  33. #include <miiphy.h>
  34. #include <cpsw.h>
  35. DECLARE_GLOBAL_DATA_PTR;
  36. static const struct gpio_bank gpio_bank_am33xx[4] = {
  37. { (void *)AM33XX_GPIO0_BASE, METHOD_GPIO_24XX },
  38. { (void *)AM33XX_GPIO1_BASE, METHOD_GPIO_24XX },
  39. { (void *)AM33XX_GPIO2_BASE, METHOD_GPIO_24XX },
  40. { (void *)AM33XX_GPIO3_BASE, METHOD_GPIO_24XX },
  41. };
  42. const struct gpio_bank *const omap_gpio_bank = gpio_bank_am33xx;
  43. #if defined(CONFIG_OMAP_HSMMC) && !defined(CONFIG_SPL_BUILD)
  44. int board_mmc_init(bd_t *bis)
  45. {
  46. int ret;
  47. ret = omap_mmc_init(0, 0, 0);
  48. if (ret)
  49. return ret;
  50. return omap_mmc_init(1, 0, 0);
  51. }
  52. #endif
  53. void setup_clocks_for_console(void)
  54. {
  55. /* Not yet implemented */
  56. return;
  57. }