arch.h 1.8 KB

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