ns9750dev.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * (C) Copyright 2002
  3. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  4. * Marius Groeger <mgroeger@sysgo.de>
  5. *
  6. * (C) Copyright 2002
  7. * David Mueller, ELSOFT AG, <d.mueller@elsoft.ch>
  8. *
  9. * (C) Copyright 2003
  10. * Texas Instruments, <www.ti.com>
  11. * Kshitij Gupta <Kshitij@ti.com>
  12. *
  13. * Copyright (C) 2004 by FS Forth-Systeme GmbH.
  14. * All rights reserved.
  15. * Markus Pietrek <mpietrek@fsforth.de>
  16. * derived from omap1610innovator.c
  17. * @References: [1] NS9750 Hardware Reference/December 2003
  18. *
  19. * See file CREDITS for list of people who contributed to this
  20. * project.
  21. *
  22. * This program is free software; you can redistribute it and/or
  23. * modify it under the terms of the GNU General Public License as
  24. * published by the Free Software Foundation; either version 2 of
  25. * the License, or (at your option) any later version.
  26. *
  27. * This program is distributed in the hope that it will be useful,
  28. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  30. * GNU General Public License for more details.
  31. *
  32. * You should have received a copy of the GNU General Public License
  33. * along with this program; if not, write to the Free Software
  34. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  35. * MA 02111-1307 USA
  36. */
  37. #include <common.h>
  38. #if defined(CONFIG_NS9750DEV)
  39. # include <./configs/ns9750dev.h>
  40. # include <./ns9750_bbus.h>
  41. #endif
  42. DECLARE_GLOBAL_DATA_PTR;
  43. void flash__init( void );
  44. void ether__init( void );
  45. static inline void delay( unsigned long loops )
  46. {
  47. __asm__ volatile ("1:\n"
  48. "subs %0, %1, #1\n"
  49. "bne 1b":"=r" (loops):"0" (loops));
  50. }
  51. /***********************************************************************
  52. * @Function: board_init
  53. * @Return: 0
  54. * @Descr: Enables BBUS modules and other devices
  55. ***********************************************************************/
  56. int board_init( void )
  57. {
  58. /* Active BBUS modules */
  59. *get_bbus_reg_addr( NS9750_BBUS_MASTER_RESET ) = 0;
  60. #warning Please register your machine at http://www.arm.linux.org.uk/developer/machines/?action=new
  61. /* arch number of OMAP 1510-Board */
  62. /* to be changed for OMAP 1610 Board */
  63. gd->bd->bi_arch_number = 234;
  64. /* adress of boot parameters */
  65. gd->bd->bi_boot_params = 0x10000100;
  66. /* this speeds up your boot a quite a bit. However to make it
  67. * work, you need make sure your kernel startup flush bug is fixed.
  68. * ... rkw ...
  69. */
  70. icache_enable();
  71. flash__init();
  72. ether__init();
  73. return 0;
  74. }
  75. int misc_init_r (void)
  76. {
  77. /* currently empty */
  78. return (0);
  79. }
  80. /******************************
  81. Routine:
  82. Description:
  83. ******************************/
  84. void flash__init (void)
  85. {
  86. }
  87. /*************************************************************
  88. Routine:ether__init
  89. Description: take the Ethernet controller out of reset and wait
  90. for the EEPROM load to complete.
  91. *************************************************************/
  92. void ether__init (void)
  93. {
  94. }
  95. /******************************
  96. Routine:
  97. Description:
  98. ******************************/
  99. int dram_init (void)
  100. {
  101. gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
  102. gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
  103. #if CONFIG_NR_DRAM_BANKS > 1
  104. gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
  105. gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
  106. #endif
  107. return 0;
  108. }