blob: b3638c50572819605a80e2ad6b57022150e2aaf5 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/*
2 * Copyright (C) 2016 SiFive
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#ifndef __ASM_RISCV_PCI_H
15#define __ASM_RISCV_PCI_H
16
17#include <linux/types.h>
18#include <linux/slab.h>
19#include <linux/dma-mapping.h>
20
21#include <asm/io.h>
22
23#define PCIBIOS_MIN_IO 0
24#define PCIBIOS_MIN_MEM 0
25
26/* RISC-V shim does not initialize PCI bus */
27#define pcibios_assign_all_busses() 1
28
29extern int isa_dma_bridge_buggy;
30
31#ifdef CONFIG_PCI
32static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
33{
34 /* no legacy IRQ on risc-v */
35 return -ENODEV;
36}
37
38static inline int pci_proc_domain(struct pci_bus *bus)
39{
40 /* always show the domain in /proc */
41 return 1;
42}
43#endif /* CONFIG_PCI */
44
45#endif /* __ASM_PCI_H */