blob: 9ad567e2d425eae6a2628774b27da824bb0b0bb4 [file] [log] [blame]
Michal Simek12e84142009-03-27 14:25:12 +01001/*
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 Likely9d24c882009-10-15 10:57:44 -060015#include <linux/of.h> /* linux/of.h gets to determine #include ordering */
16
Michal Simek12e84142009-03-27 14:25:12 +010017#ifndef _ASM_MICROBLAZE_PROM_H
18#define _ASM_MICROBLAZE_PROM_H
19#ifdef __KERNEL__
John Williams909964e2009-06-22 14:02:09 +100020#ifndef __ASSEMBLY__
21
Michal Simek12e84142009-03-27 14:25:12 +010022#include <linux/types.h>
Michal Simek12e84142009-03-27 14:25:12 +010023#include <asm/irq.h>
Arun Sharma600634972011-07-26 16:09:06 -070024#include <linux/atomic.h>
Michal Simek12e84142009-03-27 14:25:12 +010025
Michal Simek12e84142009-03-27 14:25:12 +010026#define HAVE_ARCH_DEVTREE_FIXUPS
27
Michal Simek12e84142009-03-27 14:25:12 +010028/* Other Prototypes */
Michal Simek12e84142009-03-27 14:25:12 +010029extern int early_uartlite_console(void);
Michal Simek67f4aaa2010-09-28 16:17:03 +100030extern int early_uart16550_console(void);
Michal Simek12e84142009-03-27 14:25:12 +010031
Michal Simek12e84142009-03-27 14:25:12 +010032/*
33 * OF address retreival & translation
34 */
35
Grant Likely1f5bef32010-06-08 07:48:09 -060036#ifdef CONFIG_PCI
37extern unsigned long pci_address_to_pio(phys_addr_t address);
Grant Likely22ae7822010-07-29 11:49:01 -060038#define pci_address_to_pio pci_address_to_pio
Grant Likely1f5bef32010-06-08 07:48:09 -060039#endif /* CONFIG_PCI */
40
Michal Simek12e84142009-03-27 14:25:12 +010041/* Parse the ibm,dma-window property of an OF node into the busno, phys and
42 * size parameters.
43 */
44void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop,
45 unsigned long *busno, unsigned long *phys, unsigned long *size);
46
47extern void kdump_move_device_tree(void);
48
49/* CPU OF node matching */
50struct device_node *of_get_cpu_node(int cpu, unsigned int *thread);
51
John Williams909964e2009-06-22 14:02:09 +100052#endif /* __ASSEMBLY__ */
Michal Simek12e84142009-03-27 14:25:12 +010053#endif /* __KERNEL__ */
Grant Likely22ae7822010-07-29 11:49:01 -060054
55/* These includes are put at the bottom because they may contain things
56 * that are overridden by this file. Ideally they shouldn't be included
57 * by this file, but there are a bunch of .c files that currently depend
58 * on it. Eventually they will be cleaned up. */
59#include <linux/of_fdt.h>
60#include <linux/of_irq.h>
61#include <linux/platform_device.h>
62
Michal Simek12e84142009-03-27 14:25:12 +010063#endif /* _ASM_MICROBLAZE_PROM_H */