at91rm9200ek.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * (C) Copyright 2002
  3. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  4. * Marius Groeger <mgroeger@sysgo.de>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #include <common.h>
  25. #include <asm/arch/AT91RM9200.h>
  26. #include <at91rm9200_net.h>
  27. #include <dm9161.h>
  28. DECLARE_GLOBAL_DATA_PTR;
  29. /* ------------------------------------------------------------------------- */
  30. /*
  31. * Miscelaneous platform dependent initialisations
  32. */
  33. int board_init (void)
  34. {
  35. /* Enable Ctrlc */
  36. console_init_f ();
  37. /*
  38. * Correct IRDA resistor problem
  39. * Set PA23_TXD in Output
  40. */
  41. writel(AT91C_PA23_TXD2, ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_OER);
  42. /*
  43. * memory and cpu-speed are setup before relocation
  44. * so we do _nothing_ here
  45. */
  46. /* arch number of AT91RM9200EK-Board */
  47. gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK;
  48. /* adress of boot parameters */
  49. gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
  50. return 0;
  51. }
  52. int dram_init (void)
  53. {
  54. gd->bd->bi_dram[0].start = PHYS_SDRAM;
  55. gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
  56. return 0;
  57. }
  58. #if defined(CONFIG_DRIVER_ETHER) && defined(CONFIG_CMD_NET)
  59. /*
  60. * Name:
  61. * at91rm9200_GetPhyInterface
  62. * Description:
  63. * Initialise the interface functions to the PHY
  64. * Arguments:
  65. * None
  66. * Return value:
  67. * None
  68. */
  69. void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
  70. {
  71. p_phyops->Init = dm9161_InitPhy;
  72. p_phyops->IsPhyConnected = dm9161_IsPhyConnected;
  73. p_phyops->GetLinkSpeed = dm9161_GetLinkSpeed;
  74. p_phyops->AutoNegotiate = dm9161_AutoNegotiate;
  75. }
  76. #endif