Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1678ffc authored by Joao Pinto's avatar Joao Pinto Committed by Bjorn Helgaas
Browse files

ARC: Add PCI support



Add PCI support to ARC and update drivers/pci Makefile enabling the ARC
arch to use the generic PCI setup functions.

[bhelgaas: fold in Joao's pci-dma-compat.h & pci-bridge.h build fix (I
should have caught this myself, sorry]
Signed-off-by: default avatarJoao Pinto <jpinto@synopsys.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarVineet Gupta <vgupta@synopsys.com>
parent ed00c83c
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ config ARC
	select GENERIC_FIND_FIRST_BIT
	# for now, we don't need GENERIC_IRQ_PROBE, CONFIG_GENERIC_IRQ_CHIP
	select GENERIC_IRQ_SHOW
	select GENERIC_PCI_IOMAP
	select GENERIC_PENDING_IRQ if SMP
	select GENERIC_SMP_IDLE_THREAD
	select HAVE_ARCH_KGDB
@@ -39,6 +40,9 @@ config ARC
	select PERF_USE_VMALLOC
	select HAVE_DEBUG_STACKOVERFLOW

config MIGHT_HAVE_PCI
	bool

config TRACE_IRQFLAGS_SUPPORT
	def_bool y

@@ -568,6 +572,28 @@ endmenu # "ARC Architecture Configuration"
source "mm/Kconfig"
source "net/Kconfig"
source "drivers/Kconfig"

menu "Bus Support"

config PCI
	bool "PCI support" if MIGHT_HAVE_PCI
	help
	  PCI is the name of a bus system, i.e., the way the CPU talks to
	  the other stuff inside your box.  Find out if your board/platform
	  has PCI.

	  Note: PCIe support for Synopsys Device will be available only
	  when HAPS DX is configured with PCIe RC bitmap. If you have PCI,
	  say Y, otherwise N.

config PCI_SYSCALL
	def_bool PCI

source "drivers/pci/Kconfig"
source "drivers/pci/pcie/Kconfig"

endmenu

source "fs/Kconfig"
source "arch/arc/Kconfig.debug"
source "security/Kconfig"
+5 −0
Original line number Diff line number Diff line
@@ -10,5 +10,10 @@
#define ASM_ARC_DMA_H

#define MAX_DMA_ADDRESS 0xC0000000
#ifdef CONFIG_PCI
extern int isa_dma_bridge_buggy;
#else
#define isa_dma_bridge_buggy	0
#endif

#endif
+9 −0
Original line number Diff line number Diff line
@@ -16,6 +16,15 @@
extern void __iomem *ioremap(unsigned long physaddr, unsigned long size);
extern void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size,
				  unsigned long flags);
static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
{
	return (void __iomem *)port;
}

static inline void ioport_unmap(void __iomem *addr)
{
}

extern void iounmap(const void __iomem *addr);

#define ioremap_nocache(phy, sz)	ioremap(phy, sz)
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef _ASM_ARC_PCI_H
#define _ASM_ARC_PCI_H

#ifdef __KERNEL__
#include <linux/ioport.h>

#define PCIBIOS_MIN_IO 0x100
#define PCIBIOS_MIN_MEM 0x100000

#define pcibios_assign_all_busses()	1
/*
 * The PCI address space does equal the physical memory address space.
 * The networking and block device layers use this boolean for bounce
 * buffer decisions.
 */
#define PCI_DMA_BUS_IS_PHYS	1

#endif /* __KERNEL__ */

#endif /* _ASM_ARC_PCI_H */
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ obj-y := arcksyms.o setup.o irq.o time.o reset.o ptrace.o process.o devtree.o
obj-y	+= signal.o traps.o sys.o troubleshoot.o stacktrace.o disasm.o clk.o
obj-$(CONFIG_ISA_ARCOMPACT)		+= entry-compact.o intc-compact.o
obj-$(CONFIG_ISA_ARCV2)			+= entry-arcv2.o intc-arcv2.o
obj-$(CONFIG_PCI)  			+= pcibios.o

obj-$(CONFIG_MODULES)			+= arcksyms.o module.o
obj-$(CONFIG_SMP) 			+= smp.o
Loading