kb9202.c 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. /*
  25. * Adapted for KwikByte KB920x board from at91rm9200dk.c: 22APR2005
  26. */
  27. #include <common.h>
  28. #include <asm/arch/AT91RM9200.h>
  29. #include <at91rm9200_net.h>
  30. #include <lxt971a.h>
  31. /* ------------------------------------------------------------------------- */
  32. /*
  33. * Miscelaneous platform dependent initialisations
  34. */
  35. void lowlevel_init(void) {
  36. /* Required by assembly functions - do nothing */
  37. }
  38. int board_init (void)
  39. {
  40. DECLARE_GLOBAL_DATA_PTR;
  41. /* Enable Ctrlc */
  42. console_init_f ();
  43. /* memory and cpu-speed are setup before relocation */
  44. /* so we do _nothing_ here */
  45. gd->bd->bi_arch_number = MACH_TYPE_KB9200;
  46. /* adress of boot parameters */
  47. gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
  48. return 0;
  49. }
  50. int dram_init (void)
  51. {
  52. DECLARE_GLOBAL_DATA_PTR;
  53. gd->bd->bi_dram[0].start = PHYS_SDRAM;
  54. gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
  55. return 0;
  56. }
  57. #ifdef CONFIG_DRIVER_ETHER
  58. #if (CONFIG_COMMANDS & CFG_CMD_NET)
  59. unsigned int lxt972_IsPhyConnected (AT91PS_EMAC p_mac);
  60. UCHAR lxt972_GetLinkSpeed (AT91PS_EMAC p_mac);
  61. UCHAR lxt972_InitPhy (AT91PS_EMAC p_mac);
  62. UCHAR lxt972_AutoNegotiate (AT91PS_EMAC p_mac, int *status);
  63. /*
  64. * Name:
  65. * at91rm9200_GetPhyInterface
  66. * Description:
  67. * Initialise the interface functions to the PHY
  68. * Arguments:
  69. * None
  70. * Return value:
  71. * None
  72. */
  73. void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
  74. {
  75. p_phyops->Init = lxt972_InitPhy;
  76. p_phyops->IsPhyConnected = lxt972_IsPhyConnected;
  77. p_phyops->GetLinkSpeed = lxt972_GetLinkSpeed;
  78. p_phyops->AutoNegotiate = lxt972_AutoNegotiate;
  79. }
  80. #endif /* CONFIG_COMMANDS & CFG_CMD_NET */
  81. #endif /* CONFIG_DRIVER_ETHER */