arch.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. * Set of macros to define architecture features. This is built into
  44. * a table by the linker.
  45. */
  46. #define MACHINE_START(_type,_name) \
  47. static const struct machine_desc __mach_desc_##_type \
  48. __used \
  49. __attribute__((__section__(".arch.info.init"))) = { \
  50. .nr = MACH_TYPE_##_type, \
  51. .name = _name,
  52. #define MACHINE_END \
  53. };
  54. #endif