blob: 1c473a1bd9862b9a75d27e8c59292f28ff419bbc [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-only */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Copyright (C) 2016 SiFive
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004 */
5
Olivier Deprez157378f2022-04-04 15:47:50 +02006#ifndef _ASM_RISCV_PCI_H
7#define _ASM_RISCV_PCI_H
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00008
9#include <linux/types.h>
10#include <linux/slab.h>
11#include <linux/dma-mapping.h>
12
13#include <asm/io.h>
14
15#define PCIBIOS_MIN_IO 0
16#define PCIBIOS_MIN_MEM 0
17
18/* RISC-V shim does not initialize PCI bus */
19#define pcibios_assign_all_busses() 1
20
21extern int isa_dma_bridge_buggy;
22
23#ifdef CONFIG_PCI
24static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
25{
26 /* no legacy IRQ on risc-v */
27 return -ENODEV;
28}
29
30static inline int pci_proc_domain(struct pci_bus *bus)
31{
32 /* always show the domain in /proc */
33 return 1;
34}
35#endif /* CONFIG_PCI */
36
Olivier Deprez157378f2022-04-04 15:47:50 +020037#endif /* _ASM_RISCV_PCI_H */