dm6467evm.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (C) 2009 Texas Instruments Incorporated
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. #include <common.h>
  19. #include <netdev.h>
  20. #include <asm/io.h>
  21. #include <nand.h>
  22. #include <asm/arch/nand_defs.h>
  23. DECLARE_GLOBAL_DATA_PTR;
  24. int board_init(void)
  25. {
  26. gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DM6467_EVM;
  27. gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
  28. lpsc_on(DAVINCI_DM646X_LPSC_TIMER0);
  29. lpsc_on(DAVINCI_DM646X_LPSC_UART0);
  30. lpsc_on(DAVINCI_DM646X_LPSC_I2C);
  31. lpsc_on(DAVINCI_DM646X_LPSC_EMAC);
  32. /* Enable GIO3.3V cells used for EMAC */
  33. REG(VDD3P3V_PWDN) = 0x80000c0;
  34. /* Select UART function on UART0 */
  35. REG(PINMUX0) &= ~(0x0000003f << 18);
  36. REG(PINMUX1) &= ~(0x00000003);
  37. return 0;
  38. }
  39. #if defined(CONFIG_DRIVER_TI_EMAC)
  40. int board_eth_init(bd_t *bis)
  41. {
  42. if (!davinci_emac_initialize()) {
  43. printf("Error: Ethernet init failed!\n");
  44. return -1;
  45. }
  46. return 0;
  47. }
  48. #endif /* CONFIG_DRIVER_TI_EMAC */
  49. #ifdef CONFIG_NAND_DAVINCI
  50. int board_nand_init(struct nand_chip *nand)
  51. {
  52. davinci_nand_init(nand);
  53. return 0;
  54. }
  55. #endif