Skip to contentSkip to conversation

sh: Add support for Solution Engine SH7721 board

PATCH Applied Yoshihiro Shimoda 2 participants 2 messages Mar 21, 2008 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sh: Add support for Solution Engine SH7721 board

Add support for Solution Engine SH7721 board(MS7721RP01).

---
 arch/sh/Kconfig                  |    8
 arch/sh/Makefile                 |    1
 arch/sh/boards/se/7721/Makefile  |    1
 arch/sh/boards/se/7721/irq.c     |   45 +
 arch/sh/boards/se/7721/setup.c   |   99 ++
 arch/sh/configs/se7721_defconfig | 1085 +++++++++++++++++++++++++++++
 arch/sh/kernel/cf-enabler.c      |    9
 arch/sh/tools/mach-types         |    1
 include/asm-sh/se7721.h          |   70 +
 9 files changed, 1316 insertions(+), 3 deletions(-)
arch/sh/boards/se/7721/irq.c +45 -0
diff -uprN a/arch/sh/boards/se/7721/irq.c b/arch/sh/boards/se/7721/irq.c
@@ -0,0 +1,45 @@
+/*
+ * linux/arch/sh/boards/se/7721/irq.c
+ *
+ * Copyright (C) 2008  Renesas Solutions Corp.
+ *
+ * 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.
+ */
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <asm/se7721.h>
+
+enum {
+	UNUSED = 0,
+
+	/* board specific interrupt sources */
+	MRSHPC,
+};
+
+static struct intc_vect vectors[] __initdata = {
+	INTC_IRQ(MRSHPC, MRSHPC_IRQ0),
+};
+
+static struct intc_prio_reg prio_registers[] __initdata = {
+	{ FPGA_ILSR6, 0, 8, 4, /* IRLMSK */
+	  { 0, MRSHPC } },
+};
+
+static DECLARE_INTC_DESC(intc_desc, "SE7721", vectors,
+			 NULL, NULL, prio_registers, NULL);
+
+/*
+ * Initialize IRQ setting
+ */
+void __init init_se7721_IRQ(void)
+{
+	/* PPCR */
+	ctrl_outw(ctrl_inw(0xa4050118) & ~0x00ff, 0xa4050118);
+
+	register_intc_controller(&intc_desc);
+	intc_set_priority(MRSHPC_IRQ0, 0xf - MRSHPC_IRQ0);
+}
arch/sh/boards/se/7721/Makefile +1 -0
diff -uprN a/arch/sh/boards/se/7721/Makefile b/arch/sh/boards/se/7721/Makefile
@@ -0,0 +1 @@
+obj-y	 := setup.o irq.o
arch/sh/boards/se/7721/setup.c +99 -0

99 lines not on this page · raw message

arch/sh/configs/se7721_defconfig +1085 -0

1,085 lines not on this page · raw message

arch/sh/Kconfig +8 -0
diff -uprN a/arch/sh/Kconfig b/arch/sh/Kconfig
@@ -375,6 +375,14 @@ config SH_7619_SOLUTION_ENGINE
 	  Select 7619 SolutionEngine if configuring for a Hitachi SH7619
 	  evaluation board.
 	
+config SH_7721_SOLUTION_ENGINE
+	bool "SolutionEngine7721"
+	select SOLUTION_ENGINE
+	depends on CPU_SUBTYPE_SH7721
+	help
+	  Select 7721 SolutionEngine if configuring for a Hitachi SH7721
+	  evaluation board.
+
 config SH_7722_SOLUTION_ENGINE
 	bool "SolutionEngine7722"
 	select SOLUTION_ENGINE
arch/sh/kernel/cf-enabler.c +6 -3
diff -uprN a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c
@@ -83,6 +83,8 @@ static int __init cf_init_default(void)
 #include <asm/se.h>
 #elif defined(CONFIG_SH_7722_SOLUTION_ENGINE)
 #include <asm/se7722.h>
+#elif defined(CONFIG_SH_7721_SOLUTION_ENGINE)
+#include <asm/se7721.h>
 #endif
 
 /*
@@ -99,7 +101,9 @@ static int __init cf_init_default(void)
  * 0xB0600000 : I/O
  */
 
-#if defined(CONFIG_SH_SOLUTION_ENGINE) || defined(CONFIG_SH_7722_SOLUTION_ENGINE)
+#if defined(CONFIG_SH_SOLUTION_ENGINE) || \
+    defined(CONFIG_SH_7722_SOLUTION_ENGINE) || \
+    defined(CONFIG_SH_7721_SOLUTION_ENGINE)
 static int __init cf_init_se(void)
 {
 	if ((ctrl_inw(MRSHPC_CSR) & 0x000c) != 0)
@@ -155,9 +159,8 @@ static int __init cf_init_se(void)
 
 int __init cf_init(void)
 {
-	if( mach_is_se() || mach_is_7722se() ){
+	if (mach_is_se() || mach_is_7722se() || mach_is_7721se())
 		return cf_init_se();
-	}
 	
 	return cf_init_default();
 }
arch/sh/Makefile +1 -0
diff -uprN a/arch/sh/Makefile b/arch/sh/Makefile
@@ -107,6 +107,7 @@ machdir-$(CONFIG_SH_7722_SOLUTION_ENGINE
 machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	+= se/7751
 machdir-$(CONFIG_SH_7780_SOLUTION_ENGINE)	+= se/7780
 machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE)	+= se/7343
+machdir-$(CONFIG_SH_7721_SOLUTION_ENGINE)	+= se/7721
 machdir-$(CONFIG_SH_HP6XX)			+= hp6xx
 machdir-$(CONFIG_SH_DREAMCAST)			+= dreamcast
 machdir-$(CONFIG_SH_MPC1211)			+= mpc1211
arch/sh/tools/mach-types +1 -0
diff -uprN a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
@@ -21,6 +21,7 @@ HD64465			HD64465
 7206SE			SH_7206_SOLUTION_ENGINE
 7343SE			SH_7343_SOLUTION_ENGINE
 7619SE			SH_7619_SOLUTION_ENGINE
+7721SE			SH_7721_SOLUTION_ENGINE		
 7722SE			SH_7722_SOLUTION_ENGINE		
 7751SE			SH_7751_SOLUTION_ENGINE		
 7780SE			SH_7780_SOLUTION_ENGINE
include/asm-sh/se7721.h +70 -0

70 lines not on this page · raw message