arch.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * linux/include/asm-arm/mach/arch.h
  3. *
  4. * Copyright (C) 2000 Russell King
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASSEMBLY__
  11. struct tag;
  12. struct meminfo;
  13. struct sys_timer;
  14. struct machine_desc {
  15. /*
  16. * Note! The first five elements are used
  17. * by assembler code in head-armv.S
  18. */
  19. unsigned int nr; /* architecture number */
  20. unsigned int phys_ram; /* start of physical ram */
  21. unsigned int phys_io; /* start of physical io */
  22. unsigned int io_pg_offst; /* byte offset for io
  23. * page tabe entry */
  24. const char *name; /* architecture name */
  25. unsigned int param_offset; /* parameter page */
  26. unsigned int video_start; /* start of video RAM */
  27. unsigned int video_end; /* end of video RAM */
  28. unsigned int reserve_lp0 :1; /* never has lp0 */
  29. unsigned int reserve_lp1 :1; /* never has lp1 */
  30. unsigned int reserve_lp2 :1; /* never has lp2 */
  31. unsigned int soft_reboot :1; /* soft reboot */
  32. void (*fixup)(struct machine_desc *,
  33. struct tag *, char **,
  34. struct meminfo *);
  35. void (*map_io)(void);/* IO mapping function */
  36. void (*init_irq)(void);
  37. struct sys_timer *timer; /* system tick timer */
  38. void (*init_machine)(void);
  39. };
  40. /*
  41. * Set of macros to define architecture features. This is built into
  42. * a table by the linker.
  43. */
  44. #define MACHINE_START(_type,_name) \
  45. const struct machine_desc __mach_desc_##_type \
  46. __attribute__((__section__(".arch.info"))) = { \
  47. .nr = MACH_TYPE_##_type, \
  48. .name = _name,
  49. #define MAINTAINER(n)
  50. #define BOOT_MEM(_pram,_pio,_vio) \
  51. .phys_ram = _pram, \
  52. .phys_io = _pio, \
  53. .io_pg_offst = ((_vio)>>18)&0xfffc,
  54. #define BOOT_PARAMS(_params) \
  55. .param_offset = _params,
  56. #define VIDEO(_start,_end) \
  57. .video_start = _start, \
  58. .video_end = _end,
  59. #define DISABLE_PARPORT(_n) \
  60. .reserve_lp##_n = 1,
  61. #define SOFT_REBOOT \
  62. .soft_reboot = 1,
  63. #define FIXUP(_func) \
  64. .fixup = _func,
  65. #define MAPIO(_func) \
  66. .map_io = _func,
  67. #define INITIRQ(_func) \
  68. .init_irq = _func,
  69. #define INIT_MACHINE(_func) \
  70. .init_machine = _func,
  71. #define MACHINE_END \
  72. };
  73. #endif