gerg | 16 Jul 2012 14:27

[PATCH v2 0/5] ColdFire PCI bus support


This is version 2 of the ColdFire PCI bus support.

The following patch series adds support for the PCI bus on the ColdFire
M54[78]x family of parts.

Changes since the last version:

. change to drivers/pci/Makefile sent to linux-pci email list separately
. header file changes broken out into a separate patch (for easier review)
. IO barriers added within PCI config space access functions

---
 arch/m68k/Kconfig.bus                |    7 
 arch/m68k/include/asm/dma.h          |    4 
 arch/m68k/include/asm/io_mm.h        |   50 +++++
 arch/m68k/include/asm/m54xxpci.h     |  138 ++++++++++++++
 arch/m68k/include/asm/m54xxsim.h     |    3 
 arch/m68k/include/asm/pci.h          |    6 
 arch/m68k/kernel/Makefile            |    1 
 arch/m68k/kernel/pcibios.c           |  109 +++++++++++
 arch/m68k/platform/coldfire/Makefile |    2 
 arch/m68k/platform/coldfire/pci.c    |  327 +++++++++++++++++++++++++++++++++++
 10 files changed, 646 insertions(+), 1 deletion(-)

gerg | 16 Jul 2012 14:27

[PATCH v2 1/5] m68k: common PCI support definitions and code

From: Greg Ungerer <gerg <at> uclinux.org>

Basic set of definitions and support code required to turn on CONFIG_PCI
for the m68k architecture. Nothing specific to any PCI implementation in
any m68k class CPU hardware yet.

Signed-off-by: Greg Ungerer <gerg <at> uclinux.org>
Acked-by: Geert Uytterhoeven <geert <at> linux-m68k.org>
---
 arch/m68k/include/asm/dma.h   |    4 ++
 arch/m68k/include/asm/io_mm.h |    2 +
 arch/m68k/include/asm/pci.h   |    6 ++
 arch/m68k/kernel/Makefile     |    1 +
 arch/m68k/kernel/pcibios.c    |  109 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 122 insertions(+), 0 deletions(-)
 create mode 100644 arch/m68k/kernel/pcibios.c

diff --git a/arch/m68k/include/asm/dma.h b/arch/m68k/include/asm/dma.h
index 6fbdfe8..7a59439 100644
--- a/arch/m68k/include/asm/dma.h
+++ b/arch/m68k/include/asm/dma.h
 <at>  <at>  -486,6 +486,10  <at>  <at>  static __inline__ int get_dma_residue(unsigned int dmanr)
 extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */
 extern void free_dma(unsigned int dmanr);	/* release it again */

+#ifdef CONFIG_PCI
+extern int isa_dma_bridge_buggy;
+#else
 #define isa_dma_bridge_buggy    (0)
+#endif
(Continue reading)

gerg | 16 Jul 2012 14:27

[PATCH v2 2/5] m68k: add PCI bus support definitions for the ColdFire M54xx SoC family

From: Greg Ungerer <gerg <at> uclinux.org>

Add all the required definitoins to support the ColdFire M54xx SoC PCI
hardware unit. These are strait out of the MCF5475 Reference Manual.

Signed-off-by: Greg Ungerer <gerg <at> uclinux.org>
---
 arch/m68k/include/asm/m54xxpci.h |  138 ++++++++++++++++++++++++++++++++++++++
 arch/m68k/include/asm/m54xxsim.h |    3 +
 2 files changed, 141 insertions(+), 0 deletions(-)
 create mode 100644 arch/m68k/include/asm/m54xxpci.h

diff --git a/arch/m68k/include/asm/m54xxpci.h b/arch/m68k/include/asm/m54xxpci.h
new file mode 100644
index 0000000..6fbf54f
--- /dev/null
+++ b/arch/m68k/include/asm/m54xxpci.h
 <at>  <at>  -0,0 +1,138  <at>  <at> 
+/****************************************************************************/
+
+/*
+ *	m54xxpci.h -- ColdFire 547x and 548x PCI bus support
+ *
+ *	(C) Copyright 2011,  Greg Ungerer <gerg <at> uclinux.org>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive
+ * for more details.
+ */
+
(Continue reading)

gerg | 16 Jul 2012 14:27

[PATCH v2 3/5] m68k: add IO access definitions to support PCI on ColdFire platforms

From: Greg Ungerer <gerg <at> uclinux.org>

Define the usual memory access functions (readb/writeb/...) and I/O space
functions (inb/outb/...) for PCI bus support on ColdFire CPU based platforms.

Signed-off-by: Greg Ungerer <gerg <at> uclinux.org>
Acked-by: Geert Uytterhoeven <geert <at> linux-m68k.org>
---
 arch/m68k/include/asm/io_mm.h |   48 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h
index b85dbef..a6686d2 100644
--- a/arch/m68k/include/asm/io_mm.h
+++ b/arch/m68k/include/asm/io_mm.h
 <at>  <at>  -65,7 +65,53  <at>  <at> 

 

-#ifdef CONFIG_ISA
+#if defined(CONFIG_PCI) && defined(CONFIG_COLDFIRE)
+
+#define HAVE_ARCH_PIO_SIZE
+#define PIO_OFFSET	0
+#define PIO_MASK	0xffff
+#define PIO_RESERVED	0x10000
+
+u8 mcf_pci_inb(u32 addr);
+u16 mcf_pci_inw(u32 addr);
+u32 mcf_pci_inl(u32 addr);
(Continue reading)

gerg | 16 Jul 2012 14:27

[PATCH v2 5/5] m68k: allow PCI bus to be enabled for ColdFire m54xx CPUs

From: Greg Ungerer <gerg <at> uclinux.org>

All support code for the PCI bus hardware on the ColdFire 547x and 548x
CPUs is now in. Allow enabling of CONFIG_PCI for them.

Signed-off-by: Greg Ungerer <gerg <at> uclinux.org>
---
 arch/m68k/Kconfig.bus |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/m68k/Kconfig.bus b/arch/m68k/Kconfig.bus
index 3adb499..ffc0601 100644
--- a/arch/m68k/Kconfig.bus
+++ b/arch/m68k/Kconfig.bus
 <at>  <at>  -48,6 +48,13  <at>  <at>  config ISA
 config GENERIC_ISA_DMA
 	def_bool ISA

+config PCI
+	bool "PCI support"
+	depends on M54xx
+	help
+	  Enable the PCI bus. Support for the PCI bus hardware built into the
+	  ColdFire 547x and 548x processors.
+
 source "drivers/pci/Kconfig"

 source "drivers/zorro/Kconfig"
--

-- 
1.7.0.4
(Continue reading)

gerg | 16 Jul 2012 14:27

[PATCH v2 4/5] m68k: add PCI bus code support for the ColdFire M54xx SoC family

From: Greg Ungerer <gerg <at> uclinux.org>

The ColdFire M54xx SoC family have a traditional PCI bus interface.
Add the core support code to access and use this bus on these parts.
This code provides all the config space access functions and IO access
functions. It also carries out the PCI bus initialization and hooks into
the kernel PCI subsystem.

Signed-off-by: Greg Ungerer <gerg <at> uclinux.org>
---
 arch/m68k/platform/coldfire/Makefile |    2 +
 arch/m68k/platform/coldfire/pci.c    |  327 ++++++++++++++++++++++++++++++++++
 2 files changed, 329 insertions(+), 0 deletions(-)
 create mode 100644 arch/m68k/platform/coldfire/pci.c

diff --git a/arch/m68k/platform/coldfire/Makefile b/arch/m68k/platform/coldfire/Makefile
index 76d389d..8d72a38 100644
--- a/arch/m68k/platform/coldfire/Makefile
+++ b/arch/m68k/platform/coldfire/Makefile
 <at>  <at>  -32,5 +32,7  <at>  <at>  obj-$(CONFIG_NETtel)	+= nettel.o
 obj-$(CONFIG_CLEOPATRA)	+= nettel.o
 obj-$(CONFIG_FIREBEE)	+= firebee.o

+obj-$(CONFIG_PCI)	+= pci.o
+
 obj-y			+= pinmux.o gpio.o
 extra-y := head.o
diff --git a/arch/m68k/platform/coldfire/pci.c b/arch/m68k/platform/coldfire/pci.c
new file mode 100644
index 0000000..553210d
(Continue reading)


Gmane