platform.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __ASM_SH64_PLATFORM_H
  2. #define __ASM_SH64_PLATFORM_H
  3. /*
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * include/asm-sh64/platform.h
  9. *
  10. * Copyright (C) 2000, 2001 Paolo Alberelli
  11. *
  12. * benedict.gaster@superh.com: 3rd May 2002
  13. * Added support for ramdisk, removing statically linked romfs at the same time.
  14. */
  15. #include <linux/ioport.h>
  16. #include <asm/irq.h>
  17. /*
  18. * Platform definition structure.
  19. */
  20. struct sh64_platform {
  21. unsigned int readonly_rootfs;
  22. unsigned int ramdisk_flags;
  23. unsigned int initial_root_dev;
  24. unsigned int loader_type;
  25. unsigned int initrd_start;
  26. unsigned int initrd_size;
  27. unsigned int fpu_flags;
  28. unsigned int io_res_count;
  29. unsigned int kram_res_count;
  30. unsigned int xram_res_count;
  31. unsigned int rom_res_count;
  32. struct resource *io_res_p;
  33. struct resource *kram_res_p;
  34. struct resource *xram_res_p;
  35. struct resource *rom_res_p;
  36. };
  37. extern struct sh64_platform platform_parms;
  38. extern unsigned long long memory_start, memory_end;
  39. extern unsigned long long fpu_in_use;
  40. extern int platform_int_priority[NR_INTC_IRQS];
  41. #define FPU_FLAGS (platform_parms.fpu_flags)
  42. #define STANDARD_IO_RESOURCES (platform_parms.io_res_count)
  43. #define STANDARD_KRAM_RESOURCES (platform_parms.kram_res_count)
  44. #define STANDARD_XRAM_RESOURCES (platform_parms.xram_res_count)
  45. #define STANDARD_ROM_RESOURCES (platform_parms.rom_res_count)
  46. /*
  47. * Kernel Memory description, Respectively:
  48. * code = last but one memory descriptor
  49. * data = last memory descriptor
  50. */
  51. #define code_resource (platform_parms.kram_res_p[STANDARD_KRAM_RESOURCES - 2])
  52. #define data_resource (platform_parms.kram_res_p[STANDARD_KRAM_RESOURCES - 1])
  53. #endif /* __ASM_SH64_PLATFORM_H */