arch.h 1.9 KB

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