blob: 35ec32b47500a5a017785f5c7d3ac4e083c28b3a [file] [log] [blame]
Sebastian Andrzej Siewiorda6b7372011-02-22 21:07:37 +01001/*
2 * Definitions for Device tree / OpenFirmware handling on X86
3 *
4 * based on arch/powerpc/include/asm/prom.h which is
5 * Copyright (C) 1996-2005 Paul Mackerras.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13#ifndef _ASM_X86_PROM_H
14#define _ASM_X86_PROM_H
15#ifndef __ASSEMBLY__
16
17#include <linux/of.h>
18#include <linux/types.h>
19
20#include <asm/irq.h>
21#include <asm/atomic.h>
22#include <asm/setup.h>
Sebastian Andrzej Siewior19c4f5f2011-02-22 21:07:39 +010023#include <asm/irq_controller.h>
Sebastian Andrzej Siewiorda6b7372011-02-22 21:07:37 +010024
25#ifdef CONFIG_OF
Sebastian Andrzej Siewior3879a6f2011-02-22 21:07:40 +010026extern int of_ioapic;
27extern u64 initial_dtb;
Sebastian Andrzej Siewiorda6b7372011-02-22 21:07:37 +010028extern void add_dtb(u64 data);
Sebastian Andrzej Siewior3879a6f2011-02-22 21:07:40 +010029void x86_dtb_find_config(void);
30void x86_dtb_get_config(unsigned int unused);
Sebastian Andrzej Siewior19c4f5f2011-02-22 21:07:39 +010031void add_interrupt_host(struct irq_domain *ih);
Sebastian Andrzej Siewiorda6b7372011-02-22 21:07:37 +010032#else
33static inline void add_dtb(u64 data) { }
Sebastian Andrzej Siewior3879a6f2011-02-22 21:07:40 +010034#define x86_dtb_find_config x86_init_noop
35#define x86_dtb_get_config x86_init_uint_noop
36#define of_ioapic 0
Sebastian Andrzej Siewiorda6b7372011-02-22 21:07:37 +010037#endif
38
39extern char cmd_line[COMMAND_LINE_SIZE];
40
41#define pci_address_to_pio pci_address_to_pio
42unsigned long pci_address_to_pio(phys_addr_t addr);
43
44/**
45 * irq_dispose_mapping - Unmap an interrupt
46 * @virq: linux virq number of the interrupt to unmap
47 *
48 * FIXME: We really should implement proper virq handling like power,
49 * but that's going to be major surgery.
50 */
51static inline void irq_dispose_mapping(unsigned int virq) { }
52
53#define HAVE_ARCH_DEVTREE_FIXUPS
54
55#endif /* __ASSEMBLY__ */
56#endif