]> git.karo-electronics.de Git - mv-sheeva.git/blob - arch/microblaze/include/asm/prom.h
microblaze: Simplify early console binding from DT
[mv-sheeva.git] / arch / microblaze / include / asm / prom.h
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
15 #include <linux/of.h>   /* linux/of.h gets to determine #include ordering */
16
17 #ifndef _ASM_MICROBLAZE_PROM_H
18 #define _ASM_MICROBLAZE_PROM_H
19 #ifdef __KERNEL__
20 #ifndef __ASSEMBLY__
21
22 #include <linux/types.h>
23 #include <asm/irq.h>
24 #include <asm/atomic.h>
25
26 #define HAVE_ARCH_DEVTREE_FIXUPS
27
28 /* Other Prototypes */
29 enum early_consoles {
30         UARTLITE = 1,
31         UART16550 = 2,
32 };
33
34 extern int of_early_console(void *version);
35
36 #ifdef CONFIG_PCI
37 /*
38  * PCI <-> OF matching functions
39  * (XXX should these be here?)
40  */
41 struct pci_bus;
42 struct pci_dev;
43 extern int pci_device_from_OF_node(struct device_node *node,
44                                         u8 *bus, u8 *devfn);
45 extern struct device_node *pci_busdev_to_OF_node(struct pci_bus *bus,
46                                                         int devfn);
47 extern struct device_node *pci_device_to_OF_node(struct pci_dev *dev);
48 extern void pci_create_OF_bus_map(void);
49 #endif
50
51 /*
52  * OF address retreival & translation
53  */
54
55 #ifdef CONFIG_PCI
56 extern unsigned long pci_address_to_pio(phys_addr_t address);
57 #define pci_address_to_pio pci_address_to_pio
58 #endif  /* CONFIG_PCI */
59
60 /* Parse the ibm,dma-window property of an OF node into the busno, phys and
61  * size parameters.
62  */
63 void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
64                 unsigned long *busno, unsigned long *phys, unsigned long *size);
65
66 extern void kdump_move_device_tree(void);
67
68 /* CPU OF node matching */
69 struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
70
71 #endif /* __ASSEMBLY__ */
72 #endif /* __KERNEL__ */
73
74 /* These includes are put at the bottom because they may contain things
75  * that are overridden by this file.  Ideally they shouldn't be included
76  * by this file, but there are a bunch of .c files that currently depend
77  * on it.  Eventually they will be cleaned up. */
78 #include <linux/of_fdt.h>
79 #include <linux/of_irq.h>
80 #include <linux/platform_device.h>
81
82 #endif /* _ASM_MICROBLAZE_PROM_H */