Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 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 | |
Grant Likely | 9d24c88 | 2009-10-15 10:57:44 -0600 | [diff] [blame] | 15 | #include <linux/of.h> /* linux/of.h gets to determine #include ordering */ |
| 16 | |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 17 | #ifndef _ASM_MICROBLAZE_PROM_H |
| 18 | #define _ASM_MICROBLAZE_PROM_H |
| 19 | #ifdef __KERNEL__ |
John Williams | 909964e | 2009-06-22 14:02:09 +1000 | [diff] [blame] | 20 | #ifndef __ASSEMBLY__ |
| 21 | |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 22 | #include <linux/types.h> |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 23 | #include <asm/irq.h> |
Arun Sharma | 6006349 | 2011-07-26 16:09:06 -0700 | [diff] [blame] | 24 | #include <linux/atomic.h> |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 25 | |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 26 | #define HAVE_ARCH_DEVTREE_FIXUPS |
| 27 | |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 28 | /* Other Prototypes */ |
Michal Simek | 2aa8e37 | 2011-04-14 11:48:43 +0200 | [diff] [blame] | 29 | enum early_consoles { |
| 30 | UARTLITE = 1, |
| 31 | UART16550 = 2, |
| 32 | }; |
| 33 | |
| 34 | extern int of_early_console(void *version); |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 35 | |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 36 | /* |
| 37 | * OF address retreival & translation |
| 38 | */ |
| 39 | |
Grant Likely | 1f5bef3 | 2010-06-08 07:48:09 -0600 | [diff] [blame] | 40 | #ifdef CONFIG_PCI |
| 41 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
Grant Likely | 22ae782 | 2010-07-29 11:49:01 -0600 | [diff] [blame] | 42 | #define pci_address_to_pio pci_address_to_pio |
Grant Likely | 1f5bef3 | 2010-06-08 07:48:09 -0600 | [diff] [blame] | 43 | #endif /* CONFIG_PCI */ |
| 44 | |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 45 | /* Parse the ibm,dma-window property of an OF node into the busno, phys and |
| 46 | * size parameters. |
| 47 | */ |
| 48 | void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop, |
| 49 | unsigned long *busno, unsigned long *phys, unsigned long *size); |
| 50 | |
| 51 | extern void kdump_move_device_tree(void); |
| 52 | |
| 53 | /* CPU OF node matching */ |
| 54 | struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); |
| 55 | |
John Williams | 909964e | 2009-06-22 14:02:09 +1000 | [diff] [blame] | 56 | #endif /* __ASSEMBLY__ */ |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 57 | #endif /* __KERNEL__ */ |
Grant Likely | 22ae782 | 2010-07-29 11:49:01 -0600 | [diff] [blame] | 58 | |
| 59 | /* These includes are put at the bottom because they may contain things |
| 60 | * that are overridden by this file. Ideally they shouldn't be included |
| 61 | * by this file, but there are a bunch of .c files that currently depend |
| 62 | * on it. Eventually they will be cleaned up. */ |
| 63 | #include <linux/of_fdt.h> |
| 64 | #include <linux/of_irq.h> |
| 65 | #include <linux/platform_device.h> |
| 66 | |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 67 | #endif /* _ASM_MICROBLAZE_PROM_H */ |