prom.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Definitions for Device tree / OpenFirmware handling on X86
  3. *
  4. * based on arch/powerpc/include/asm/prom.h which is
  5. * Copyright (C) 1996-2005 Paul Mackerras.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version
  10. * 2 of the License, or (at your option) any later version.
  11. */
  12. #ifndef _ASM_X86_PROM_H
  13. #define _ASM_X86_PROM_H
  14. #ifndef __ASSEMBLY__
  15. #include <linux/of.h>
  16. #include <linux/types.h>
  17. #include <asm/irq.h>
  18. #include <asm/atomic.h>
  19. #include <asm/setup.h>
  20. #include <asm/irq_controller.h>
  21. #ifdef CONFIG_OF
  22. extern int of_ioapic;
  23. extern u64 initial_dtb;
  24. extern void add_dtb(u64 data);
  25. void x86_dtb_find_config(void);
  26. void x86_dtb_get_config(unsigned int unused);
  27. void add_interrupt_host(struct irq_domain *ih);
  28. #else
  29. static inline void add_dtb(u64 data) { }
  30. #define x86_dtb_find_config x86_init_noop
  31. #define x86_dtb_get_config x86_init_uint_noop
  32. #define of_ioapic 0
  33. #endif
  34. extern char cmd_line[COMMAND_LINE_SIZE];
  35. #define pci_address_to_pio pci_address_to_pio
  36. unsigned long pci_address_to_pio(phys_addr_t addr);
  37. /**
  38. * irq_dispose_mapping - Unmap an interrupt
  39. * @virq: linux virq number of the interrupt to unmap
  40. *
  41. * FIXME: We really should implement proper virq handling like power,
  42. * but that's going to be major surgery.
  43. */
  44. static inline void irq_dispose_mapping(unsigned int virq) { }
  45. #define HAVE_ARCH_DEVTREE_FIXUPS
  46. #endif /* __ASSEMBLY__ */
  47. #endif