Skip to contentSkip to conversation

m68knommu: better support for ColdFire external interrupts

PATCH New [email protected] 1 participant 3 messages Mar 14, 2011 m68k architecture

lore
Share & tools
lore
#0 lore raw

cover m68knommu: better support for ColdFire external interrupts

Implement proper setup and support for the external interrupts on the newer families of ColdFire CPUs. Most of them offer up to 7 external (that is not on-chip) interrupts, and there is some extra effort required to init them, and ack them.

#1 lore raw

PATCH 1/2 m68knommu: external interrupt support to ColdFire intc-2 controller

From: Greg Ungerer <[email protected]>

The EDGE Port module of some ColdFire parts using the intc-2 interrupt controller provides support for 7 external interrupts. These interrupts go off-chip (that is they are not for internal peripherals). They need some special handling and have some extra setup registers. Add code to support them.

---
 arch/m68k/include/asm/m523xsim.h          |    3 +
 arch/m68k/include/asm/m527xsim.h          |    3 +
 arch/m68k/include/asm/m54xxsim.h          |   10 ++++
 arch/m68knommu/platform/coldfire/intc-2.c |   85 +++++++++++++++++++++++++++--
 4 files changed, 97 insertions(+), 4 deletions(-)
arch/m68k/include/asm/m523xsim.h +3 -0
index 3852f07..8996df6 100644
@@ -139,9 +139,12 @@
 /*
  * EPort
  */
+#define MCFEPORT_EPPAR		(MCF_IPSBAR + 0x130000)
 #define MCFEPORT_EPDDR		(MCF_IPSBAR + 0x130002)
+#define MCFEPORT_EPIER		(MCF_IPSBAR + 0x130003)
 #define MCFEPORT_EPDR		(MCF_IPSBAR + 0x130004)
 #define MCFEPORT_EPPDR		(MCF_IPSBAR + 0x130005)
+#define MCFEPORT_EPFR		(MCF_IPSBAR + 0x130006)
 
 /*
  * Generic GPIO support
arch/m68k/include/asm/m527xsim.h +3 -0
index c23046e..74855a6 100644
@@ -259,9 +259,12 @@
 /*
  * EPort
  */
+#define MCFEPORT_EPPAR		(MCF_IPSBAR + 0x130000)
 #define MCFEPORT_EPDDR		(MCF_IPSBAR + 0x130002)
+#define MCFEPORT_EPIER		(MCF_IPSBAR + 0x130003)
 #define MCFEPORT_EPDR		(MCF_IPSBAR + 0x130004)
 #define MCFEPORT_EPPDR		(MCF_IPSBAR + 0x130005)
+#define MCFEPORT_EPFR		(MCF_IPSBAR + 0x130006)
 
 /*
  *	GPIO pins setups to enable the UARTs.
arch/m68k/include/asm/m54xxsim.h +10 -0
index daaae27..1ed8bfb 100644
@@ -50,6 +50,16 @@
 #define MCFGPIO_IRQ_VECBASE	-1
 
 /*
+ *	EDGE Port support.
+ */
+#define	MCFEPORT_EPPAR		(MCF_MBAR + 0xf00)	/* Pin assignment */
+#define	MCFEPORT_EPDDR		(MCF_MBAR + 0xf04)	/* Data direction */
+#define	MCFEPORT_EPIER		(MCF_MBAR + 0xf05)	/* Interrupt enable */
+#define	MCFEPORT_EPDR		(MCF_MBAR + 0xf08)	/* Port data (w) */
+#define	MCFEPORT_EPPDR		(MCF_MBAR + 0xf09)	/* Port data (r) */
+#define	MCFEPORT_EPFR		(MCF_MBAR + 0xf0c)	/* Flags */
+
+/*
  *	Some PSC related definitions
  */
 #define MCF_PAR_PSC(x)		(0x000A4F-((x)&0x3))
arch/m68knommu/platform/coldfire/intc-2.c +81 -4

125 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/2 m68knommu: external interrupt support to ColdFire intc-simr controller

From: Greg Ungerer <[email protected]>

The EDGE Port module of some ColdFire parts using the intc-simr interrupt controller provides support for 7 external interrupts. These interrupts go off-chip (that is they are not for internal peripherals). They need some special handling and have some extra setup registers. Add code to support them.

---
 arch/m68k/include/asm/m520xsim.h             |    3 +
 arch/m68knommu/platform/coldfire/intc-simr.c |  114 +++++++++++++++++++++++++-
 2 files changed, 113 insertions(+), 4 deletions(-)
arch/m68k/include/asm/m520xsim.h +3 -0
index ee89801..55d5a4c 100644
@@ -63,9 +63,12 @@
 /*
  * EPORT and GPIO registers.
  */
+#define MCFEPORT_EPPAR			0xFC088000
 #define MCFEPORT_EPDDR			0xFC088002
+#define MCFEPORT_EPIER			0xFC088003
 #define MCFEPORT_EPDR			0xFC088004
 #define MCFEPORT_EPPDR			0xFC088005
+#define MCFEPORT_EPFR			0xFC088006
 
 #define MCFGPIO_PODR_BUSCTL		0xFC0A4000
 #define MCFGPIO_PODR_BE			0xFC0A4001
arch/m68knommu/platform/coldfire/intc-simr.c +110 -4

151 lines not on this page · raw message

Signature · 1 line
1.7.0.4