ixdp425.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * (C) Copyright 2006
  3. * Stefan Roese, DENX Software Engineering, sr@denx.de.
  4. *
  5. * (C) Copyright 2002
  6. * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
  7. *
  8. * (C) Copyright 2002
  9. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  10. * Marius Groeger <mgroeger@sysgo.de>
  11. *
  12. * See file CREDITS for list of people who contributed to this
  13. * project.
  14. *
  15. * This program is free software; you can redistribute it and/or
  16. * modify it under the terms of the GNU General Public License as
  17. * published by the Free Software Foundation; either version 2 of
  18. * the License, or (at your option) any later version.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, write to the Free Software
  27. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  28. * MA 02111-1307 USA
  29. */
  30. #include <common.h>
  31. #include <command.h>
  32. #include <malloc.h>
  33. #include <asm/arch/ixp425.h>
  34. DECLARE_GLOBAL_DATA_PTR;
  35. /*
  36. * Miscelaneous platform dependent initialisations
  37. */
  38. int board_post_init (void)
  39. {
  40. return (0);
  41. }
  42. int board_init (void)
  43. {
  44. /* arch number of IXDP */
  45. gd->bd->bi_arch_number = MACH_TYPE_IXDP425;
  46. /* adress of boot parameters */
  47. gd->bd->bi_boot_params = 0x00000100;
  48. #ifdef CONFIG_IXDPG425
  49. /* arch number of IXDP */
  50. gd->bd->bi_arch_number = MACH_TYPE_IXDPG425;
  51. /*
  52. * Get realtek RTL8305 switch and SLIC out of reset
  53. */
  54. GPIO_OUTPUT_SET(CFG_GPIO_SWITCH_RESET_N);
  55. GPIO_OUTPUT_ENABLE(CFG_GPIO_SWITCH_RESET_N);
  56. GPIO_OUTPUT_SET(CFG_GPIO_SLIC_RESET_N);
  57. GPIO_OUTPUT_ENABLE(CFG_GPIO_SLIC_RESET_N);
  58. /*
  59. * Setup GPIO's for PCI INTA & INTB
  60. */
  61. GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTA_N);
  62. GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTA_N);
  63. GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTB_N);
  64. GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTB_N);
  65. /*
  66. * Setup GPIO's for 33MHz clock output
  67. */
  68. *IXP425_GPIO_GPCLKR = 0x01FF01FF;
  69. GPIO_OUTPUT_ENABLE(CFG_GPIO_PCI_CLK);
  70. GPIO_OUTPUT_ENABLE(CFG_GPIO_EXTBUS_CLK);
  71. #endif
  72. return 0;
  73. }
  74. /*
  75. * Check Board Identity
  76. */
  77. int checkboard(void)
  78. {
  79. char *s = getenv("serial#");
  80. #ifdef CONFIG_IXDPG425
  81. puts("Board: IXDPG425 - Intel Network Gateway Reference Platform");
  82. #else
  83. puts("Board: IXDP425 - Intel Development Platform");
  84. #endif
  85. if (s != NULL) {
  86. puts(", serial# ");
  87. puts(s);
  88. }
  89. putc('\n');
  90. return (0);
  91. }
  92. int dram_init (void)
  93. {
  94. gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
  95. gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
  96. return (0);
  97. }
  98. #if (CONFIG_COMMANDS & CFG_CMD_PCI) || defined(CONFIG_PCI)
  99. extern struct pci_controller hose;
  100. extern void pci_ixp_init(struct pci_controller * hose);
  101. void pci_init_board(void)
  102. {
  103. extern void pci_ixp_init (struct pci_controller *hose);
  104. pci_ixp_init(&hose);
  105. }
  106. #endif