blob: 614be031a79ab543295d8fe6b045db3a0aadb258 [file] [log] [blame]
Chris Zankel9a8fd552005-06-23 22:01:26 -07001/*
2 * linux/include/asm-xtensa/pci.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_PCI_H
12#define _XTENSA_PCI_H
13
14#ifdef __KERNEL__
15
16/* Can be used to override the logic in pci_scan_bus for skipping
17 * already-configured bus numbers - to be used for buggy BIOSes
18 * or architectures with incomplete PCI setup by the loader
19 */
20
21#define pcibios_assign_all_busses() 0
22
23extern struct pci_controller* pcibios_alloc_controller(void);
24
Adrian Bunkd99cf712005-09-03 15:57:53 -070025static inline void pcibios_penalize_isa_irq(int irq)
Chris Zankel9a8fd552005-06-23 22:01:26 -070026{
27 /* We don't do dynamic PCI IRQ allocation */
28}
29
30/* Assume some values. (We should revise them, if necessary) */
31
32#define PCIBIOS_MIN_IO 0x2000
33#define PCIBIOS_MIN_MEM 0x10000000
34
35/* Dynamic DMA mapping stuff.
36 * Xtensa has everything mapped statically like x86.
37 */
38
39#include <linux/types.h>
40#include <linux/slab.h>
41#include <asm/scatterlist.h>
42#include <linux/string.h>
43#include <asm/io.h>
44
45struct pci_dev;
46
47/* The PCI address space does equal the physical memory address space.
48 * The networking and block device layers use this boolean for bounce buffer
49 * decisions.
50 */
51
52#define PCI_DMA_BUS_IS_PHYS (1)
53
Chris Zankel9a8fd552005-06-23 22:01:26 -070054/* Map a range of PCI memory or I/O space for a device into user space */
55int pci_mmap_page_range(struct pci_dev *pdev, struct vm_area_struct *vma,
Chris Zankelc4c45942012-11-28 16:53:51 -080056 enum pci_mmap_state mmap_state, int write_combine);
Chris Zankel9a8fd552005-06-23 22:01:26 -070057
58/* Tell drivers/pci/proc.c that we have pci_mmap_page_range() */
59#define HAVE_PCI_MMAP 1
60
Chris Zankel9a8fd552005-06-23 22:01:26 -070061#endif /* __KERNEL__ */
62
63/* Implement the pci_ DMA API in terms of the generic device dma_ one */
64#include <asm-generic/pci-dma-compat.h>
65
66/* Generic PCI */
67#include <asm-generic/pci.h>
68
69#endif /* _XTENSA_PCI_H */