prom.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Definitions for talking to the Open Firmware PROM on
  3. * Power Macintosh computers.
  4. *
  5. * Copyright (C) 1996-2005 Paul Mackerras.
  6. *
  7. * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version
  12. * 2 of the License, or (at your option) any later version.
  13. */
  14. #include <linux/of.h> /* linux/of.h gets to determine #include ordering */
  15. #ifndef _ASM_MICROBLAZE_PROM_H
  16. #define _ASM_MICROBLAZE_PROM_H
  17. #ifdef __KERNEL__
  18. #ifndef __ASSEMBLY__
  19. #include <linux/types.h>
  20. #include <asm/irq.h>
  21. #include <asm/atomic.h>
  22. #define HAVE_ARCH_DEVTREE_FIXUPS
  23. /* Other Prototypes */
  24. enum early_consoles {
  25. UARTLITE = 1,
  26. UART16550 = 2,
  27. };
  28. extern int of_early_console(void *version);
  29. #ifdef CONFIG_PCI
  30. /*
  31. * PCI <-> OF matching functions
  32. * (XXX should these be here?)
  33. */
  34. struct pci_bus;
  35. struct pci_dev;
  36. extern int pci_device_from_OF_node(struct device_node *node,
  37. u8 *bus, u8 *devfn);
  38. extern struct device_node *pci_busdev_to_OF_node(struct pci_bus *bus,
  39. int devfn);
  40. extern struct device_node *pci_device_to_OF_node(struct pci_dev *dev);
  41. extern void pci_create_OF_bus_map(void);
  42. #endif
  43. /*
  44. * OF address retreival & translation
  45. */
  46. #ifdef CONFIG_PCI
  47. extern unsigned long pci_address_to_pio(phys_addr_t address);
  48. #define pci_address_to_pio pci_address_to_pio
  49. #endif /* CONFIG_PCI */
  50. /* Parse the ibm,dma-window property of an OF node into the busno, phys and
  51. * size parameters.
  52. */
  53. void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
  54. unsigned long *busno, unsigned long *phys, unsigned long *size);
  55. extern void kdump_move_device_tree(void);
  56. /* CPU OF node matching */
  57. struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
  58. #endif /* __ASSEMBLY__ */
  59. #endif /* __KERNEL__ */
  60. /* These includes are put at the bottom because they may contain things
  61. * that are overridden by this file. Ideally they shouldn't be included
  62. * by this file, but there are a bunch of .c files that currently depend
  63. * on it. Eventually they will be cleaned up. */
  64. #include <linux/of_fdt.h>
  65. #include <linux/of_irq.h>
  66. #include <linux/platform_device.h>
  67. #endif /* _ASM_MICROBLAZE_PROM_H */