aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc/include/asm/prom.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/openrisc/include/asm/prom.h')
-rw-r--r--arch/openrisc/include/asm/prom.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/arch/openrisc/include/asm/prom.h b/arch/openrisc/include/asm/prom.h
new file mode 100644
index 000000000000..e1f3fe26606c
--- /dev/null
+++ b/arch/openrisc/include/asm/prom.h
@@ -0,0 +1,77 @@
1/*
2 * OpenRISC Linux
3 *
4 * Linux architectural port borrowing liberally from similar works of
5 * others. All original copyrights apply as per the original source
6 * declaration.
7 *
8 * OpenRISC implementation:
9 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
10 * et al.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 */
17
18#include <linux/of.h> /* linux/of.h gets to determine #include ordering */
19
20#ifndef _ASM_OPENRISC_PROM_H
21#define _ASM_OPENRISC_PROM_H
22#ifdef __KERNEL__
23#ifndef __ASSEMBLY__
24
25#include <linux/types.h>
26#include <asm/irq.h>
27#include <linux/atomic.h>
28#include <linux/of_irq.h>
29#include <linux/of_fdt.h>
30#include <linux/of_address.h>
31#include <linux/proc_fs.h>
32#include <linux/platform_device.h>
33#define HAVE_ARCH_DEVTREE_FIXUPS
34
35/* Other Prototypes */
36extern int early_uartlite_console(void);
37
38/* Parse the ibm,dma-window property of an OF node into the busno, phys and
39 * size parameters.
40 */
41void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
42 unsigned long *busno, unsigned long *phys, unsigned long *size);
43
44extern void kdump_move_device_tree(void);
45
46/* CPU OF node matching */
47struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
48
49/* Get the MAC address */
50extern const void *of_get_mac_address(struct device_node *np);
51
52/**
53 * of_irq_map_pci - Resolve the interrupt for a PCI device
54 * @pdev: the device whose interrupt is to be resolved
55 * @out_irq: structure of_irq filled by this function
56 *
57 * This function resolves the PCI interrupt for a given PCI device. If a
58 * device-node exists for a given pci_dev, it will use normal OF tree
59 * walking. If not, it will implement standard swizzling and walk up the
60 * PCI tree until an device-node is found, at which point it will finish
61 * resolving using the OF tree walking.
62 */
63struct pci_dev;
64extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
65
66/* This routine is here to provide compatibility with how powerpc
67 * handles IRQ mapping for OF device nodes. We precompute and permanently
68 * register them in the platform_device objects, whereas powerpc computes them
69 * on request.
70 */
71static inline void irq_dispose_mapping(unsigned int virq)
72{
73}
74
75#endif /* __ASSEMBLY__ */
76#endif /* __KERNEL__ */
77#endif /* _ASM_OPENRISC_PROM_H */