You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

e132_xs.c 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright 2003 Yannis Mitsos and George Thanos
  3. * {gmitsos@gthanos}@telecom.ntua.gr
  4. * Released under GPL2, see the file COPYING in the top directory
  5. *
  6. */
  7. #include "hooks.h"
  8. #include "io.h"
  9. #include "etherboot.h"
  10. #include "e132_xs_board.h"
  11. unsigned int io_periph[NR_CS] = {[0 ... NR_CS-1] = 0 };
  12. /*
  13. void arch_main(struct Elf_Bhdr *ptr __unused)
  14. {
  15. }
  16. */
  17. void init_peripherals(void)
  18. {
  19. int i;
  20. for(i=0; i< NR_CS; i++){
  21. io_periph[i]= (SLOW_IO_ACCESS | i << 22);
  22. }
  23. io_periph[ETHERNET_CS] = (io_periph[ETHERNET_CS] | 1 << IOWait);
  24. asm volatile("
  25. ori SR, 0x20
  26. movi FCR, 0x66ffFFFF"
  27. :
  28. :);
  29. }
  30. struct meminfo meminfo;
  31. void get_memsizes(void)
  32. {
  33. /* We initialize the meminfo structure
  34. * according to our development board's specs
  35. * We do not have a way to automatically probe the
  36. * memspace instead we initialize it manually
  37. */
  38. meminfo.basememsize = BASEMEM;
  39. meminfo.memsize = SDRAM_SIZE;
  40. meminfo.map_count = NR_MEMORY_REGNS;
  41. meminfo.map[0].addr = SDRAM_BASEMEM;
  42. meminfo.map[0].size = SDRAM_SIZE;
  43. meminfo.map[0].type = E820_RAM;
  44. meminfo.map[1].addr = SRAM_BASEMEM;
  45. meminfo.map[1].size = SRAM_SIZE;
  46. meminfo.map[1].type = E820_RAM;
  47. meminfo.map[2].addr = IRAM_BASEMEM;
  48. meminfo.map[2].size = IRAM_SIZE;
  49. meminfo.map[2].type = E820_RAM;
  50. }
  51. int mach_boot(register unsigned long entry_point)
  52. {
  53. asm volatile(
  54. "mov PC, %0"
  55. : /* no outputs */
  56. : "l" (entry_point) );
  57. return 0; /* We should never reach this point ! */
  58. }