arch.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * arch/arm/include/asm/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. unsigned int nr; /* architecture number */
  16. const char *name; /* architecture name */
  17. unsigned long boot_params; /* tagged list */
  18. const char **dt_compat; /* array of device tree
  19. * 'compatible' strings */
  20. unsigned int nr_irqs; /* number of IRQs */
  21. unsigned int video_start; /* start of video RAM */
  22. unsigned int video_end; /* end of video RAM */
  23. unsigned int reserve_lp0 :1; /* never has lp0 */
  24. unsigned int reserve_lp1 :1; /* never has lp1 */
  25. unsigned int reserve_lp2 :1; /* never has lp2 */
  26. unsigned int soft_reboot :1; /* soft reboot */
  27. void (*fixup)(struct machine_desc *,
  28. struct tag *, char **,
  29. struct meminfo *);
  30. void (*reserve)(void);/* reserve mem blocks */
  31. void (*map_io)(void);/* IO mapping function */
  32. void (*init_early)(void);
  33. void (*init_irq)(void);
  34. struct sys_timer *timer; /* system tick timer */
  35. void (*init_machine)(void);
  36. #ifdef CONFIG_MULTI_IRQ_HANDLER
  37. void (*handle_irq)(struct pt_regs *);
  38. #endif
  39. };
  40. /*
  41. * Current machine - only accessible during boot.
  42. */
  43. extern struct machine_desc *machine_desc;
  44. /*
  45. * Machine type table - also only accessible during boot
  46. */
  47. extern struct machine_desc __arch_info_begin[], __arch_info_end[];
  48. #define for_each_machine_desc(p) \
  49. for (p = __arch_info_begin; p < __arch_info_end; p++)
  50. /*
  51. * Set of macros to define architecture features. This is built into
  52. * a table by the linker.
  53. */
  54. #define MACHINE_START(_type,_name) \
  55. static const struct machine_desc __mach_desc_##_type \
  56. __used \
  57. __attribute__((__section__(".arch.info.init"))) = { \
  58. .nr = MACH_TYPE_##_type, \
  59. .name = _name,
  60. #define MACHINE_END \
  61. };
  62. #endif