wepep250.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (C) 2003 ETC s.r.o.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of
  7. * the License, or (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., 59 Temple Place, Suite 330, Boston,
  17. * MA 02111-1307 USA
  18. *
  19. * Written by Peter Figuli <peposh@etc.sk>, 2003.
  20. *
  21. */
  22. #include <common.h>
  23. #include <asm/arch/pxa-regs.h>
  24. DECLARE_GLOBAL_DATA_PTR;
  25. int board_init (void)
  26. {
  27. gd->bd->bi_arch_number = MACH_TYPE_WEP_EP250;
  28. gd->bd->bi_boot_params = 0xa0000000;
  29. /*
  30. * Setup GPIO stuff to get serial working
  31. */
  32. #if defined( CONFIG_FFUART )
  33. GPDR1 = 0x80;
  34. GAFR1_L = 0x8010;
  35. #elif defined( CONFIG_BTUART )
  36. GPDR1 = 0x800;
  37. GAFR1_L = 0x900000;
  38. #endif
  39. PSSR = 0x20;
  40. return 0;
  41. }
  42. int dram_init (void)
  43. {
  44. #if ( CONFIG_NR_DRAM_BANKS > 0 )
  45. gd->bd->bi_dram[0].start = WEP_SDRAM_1;
  46. gd->bd->bi_dram[0].size = WEP_SDRAM_1_SIZE;
  47. #endif
  48. #if ( CONFIG_NR_DRAM_BANKS > 1 )
  49. gd->bd->bi_dram[1].start = WEP_SDRAM_2;
  50. gd->bd->bi_dram[1].size = WEP_SDRAM_2_SIZE;
  51. #endif
  52. #if ( CONFIG_NR_DRAM_BANKS > 2 )
  53. gd->bd->bi_dram[2].start = WEP_SDRAM_3;
  54. gd->bd->bi_dram[2].size = WEP_SDRAM_3_SIZE;
  55. #endif
  56. #if ( CONFIG_NR_DRAM_BANKS > 3 )
  57. gd->bd->bi_dram[3].start = WEP_SDRAM_4;
  58. gd->bd->bi_dram[3].size = WEP_SDRAM_4_SIZE;
  59. #endif
  60. return 0;
  61. }