Skip to contentSkip to conversation

SNI_RM: collected changes

PATCH In review Thomas Bogendoerfer 2 participants 2 messages Jan 4, 2008 – Jan 7, 2008 MIPS

lore
Share & tools
lore

Thomas Bogendoerfer

author maintainer
#0 lore raw

PATCH 1/1 SNI_RM: collected changes

- EISA support for non PCI RMs (RM200 and RM400-xxx). The major part is the splitting of the EISA and onboard ISA of the RM200, which makes the EISA bus on the RM200 look like on other RMs.
- 64bit kernel support
- system type detection is now common for big and little endian (thanks Ralf)
- moved sniprom code to arch/mips/fw
- added call_o32 function to arch/mips/fw/lib, which uses a private stack for calling prom functions
- fix problem with isa interrupts, which makes using pit clockevent possible

---

This is 2.6.25 material and replaces [PATCH] SNI_RM: EISA support for A20R/RM200

 arch/mips/Kconfig           |    4 +
 arch/mips/Makefile          |    2 +
 arch/mips/fw/lib/Makefile   |    5 +
 arch/mips/fw/lib/call_o32.S |   97 +++++++++++++
 arch/mips/fw/sni/Makefile   |    5 +
 arch/mips/fw/sni/sniprom.c  |  152 ++++++++++++++++++++
 arch/mips/sni/Makefile      |    2 +-
 arch/mips/sni/a20r.c        |   13 ++-
 arch/mips/sni/eisa.c        |   52 +++++++
 arch/mips/sni/irq.c         |    4 +-
 arch/mips/sni/rm200.c       |  326 +++++++++++++++++++++++++++++++++++++++++--
 arch/mips/sni/setup.c       |  143 +++++++++++++++++++-
 arch/mips/sni/sniprom.c     |  251 ---------------------------------
 arch/mips/sni/time.c        |    1 +
 include/asm-mips/bootinfo.h |    1 +
 include/asm-mips/mipsprom.h |    2 +
 include/asm-mips/sni.h      |  159 ++++++++++++---------
 18 files changed, 1042 insertions(+), 338 deletions(-)
arch/mips/Kconfig +4 -0
index 291d368..515fcac 100644
@@ -573,6 +573,7 @@ config SNI_RM
 	bool "SNI RM200/300/400"
 	select ARC if CPU_LITTLE_ENDIAN
 	select ARC32 if CPU_LITTLE_ENDIAN
+	select SNIPROM if CPU_BIG_ENDIAN
 	select ARCH_MAY_HAVE_PC_FDC
 	select BOOT_ELF32
 	select CEVT_R4K
@@ -957,6 +959,9 @@ config SERIAL_RM9000
 config ARC32
 	bool
 
+config SNIPROM
+	bool
+
 config BOOT_ELF32
 	bool
 
arch/mips/Makefile +2 -0
index a1f8d8b..f2ea18b 100644
@@ -152,6 +152,8 @@ endif
 #
 libs-$(CONFIG_ARC)		+= arch/mips/fw/arc/
 libs-$(CONFIG_CFE)		+= arch/mips/fw/cfe/
+libs-$(CONFIG_SNIPROM)		+= arch/mips/fw/sni/
+libs-y				+= arch/mips/fw/lib/
 libs-$(CONFIG_SIBYTE_CFE)	+= arch/mips/sibyte/cfe/
 
 #
arch/mips/fw/lib/Makefile new file +5 -0
new file mode 100644
index 0000000..84befc9
@@ -0,0 +1,5 @@
+#
+# Makefile for generic prom monitor library routines under Linux.
+#
+
+lib-$(CONFIG_64BIT)	+= call_o32.o
arch/mips/fw/lib/call_o32.S new file +97 -0

97 lines not on this page · raw message

arch/mips/fw/sni/Makefile new file +5 -0
new file mode 100644
index 0000000..d9740a3
@@ -0,0 +1,5 @@
+#
+# Makefile for the SNI prom monitor routines under Linux.
+#
+
+lib-$(CONFIG_SNIPROM)	+= sniprom.o
arch/mips/fw/sni/sniprom.c new file +152 -0

152 lines not on this page · raw message

arch/mips/sni/Makefile +1 -1
index 3a99cd6..a7dbeeb 100644
@@ -3,6 +3,6 @@
 #
 
 obj-y += irq.o reset.o setup.o a20r.o rm200.o pcimt.o pcit.o time.o
-obj-$(CONFIG_CPU_BIG_ENDIAN) += sniprom.o
+obj-$(CONFIG_EISA) += eisa.o
 
 EXTRA_CFLAGS += -Werror
arch/mips/sni/a20r.c +11 -2
index b746075..3f8cf5e 100644
@@ -117,10 +117,19 @@ static struct resource sc26xx_rsrc[] = {
 	}
 };
 
+static unsigned int sc26xx_data[2] = {
+	/* DTR   |   RTS    |   DSR    |   CTS     |   DCD     |   RI    */
+	(8 << 0) | (4 << 4) | (6 << 8) | (0 << 12) | (6 << 16) | (0 << 20),
+	(3 << 0) | (2 << 4) | (1 << 8) | (2 << 12) | (3 << 16) | (4 << 20)
+};
+
 static struct platform_device sc26xx_pdev = {
 	.name           = "SC26xx",
 	.num_resources  = ARRAY_SIZE(sc26xx_rsrc),
-	.resource       = sc26xx_rsrc
+	.resource       = sc26xx_rsrc,
+	.dev			= {
+		.platform_data	= sc26xx_data,
+	}
 };
 
 static u32 a20r_ack_hwint(void)
@@ -231,9 +240,9 @@ static int __init snirm_a20r_setup_devinit(void)
 	        platform_device_register(&sc26xx_pdev);
 	        platform_device_register(&a20r_serial8250_device);
 	        platform_device_register(&a20r_ds1216_device);
+		sni_eisa_root_init();
 	        break;
 	}
-
 	return 0;
 }
 
arch/mips/sni/eisa.c new file +52 -0

52 lines not on this page · raw message

arch/mips/sni/irq.c +2 -2
index 9ccffdf..e8e72bb 100644
@@ -35,14 +35,14 @@ static irqreturn_t sni_isa_irq_handler(int dummy, void *p)
 	if (unlikely(irq < 0))
 		return IRQ_NONE;
 
-	do_IRQ(irq);
+	generic_handle_irq(irq);
 	return IRQ_HANDLED;
 }
 
 struct irqaction sni_isa_irq = {
 	.handler = sni_isa_irq_handler,
 	.name = "ISA",
-	.flags = IRQF_SHARED
+	.flags = IRQF_SHARED | IRQF_DISABLED
 };
 
 /*
arch/mips/sni/rm200.c +314 -12

376 lines not on this page · raw message

arch/mips/sni/setup.c +141 -2

181 lines not on this page · raw message

arch/mips/sni/sniprom.c deleted +0 -251

251 lines not on this page · raw message

arch/mips/sni/time.c +1 -0
index 6f339af..796e3ce 100644
@@ -178,6 +178,7 @@ void __init plat_time_init(void)
 		sni_a20r_timer_setup();
 		break;
 	}
+	setup_pit_timer();
 }
 
 unsigned long read_persistent_clock(void)
include/asm-mips/bootinfo.h +1 -0
index b2dd9b3..c8b6625 100644
@@ -200,6 +200,7 @@
 
 #define CL_SIZE			COMMAND_LINE_SIZE
 
+extern char *system_type;
 const char *get_system_type(void);
 
 extern unsigned long mips_machtype;
include/asm-mips/mipsprom.h +2 -0
index ce7cff7..146d41b 100644
@@ -71,4 +71,6 @@
 #define PROM_NV_GET		53	/* XXX */
 #define PROM_NV_SET		54	/* XXX */
 
+extern char *prom_getenv(char *);
+
 #endif /* __ASM_MIPS_PROM_H */
include/asm-mips/sni.h +91 -68

216 lines not on this page · raw message

#1 lore raw
Quoted 12 lines · Thomas Bogendoerfer

- EISA support for non PCI RMs (RM200 and RM400-xxx). The major part is the splitting of the EISA and onboard ISA of the RM200, which makes the EISA bus on the RM200 look like on other RMs.
- 64bit kernel support
- system type detection is now common for big and little endian (thanks Ralf)
- moved sniprom code to arch/mips/fw
- added call_o32 function to arch/mips/fw/lib, which uses a private stack for calling prom functions
- fix problem with isa interrupts, which makes using pit clockevent possible

Quoted 5 lines

---

This is 2.6.25 material and replaces [PATCH] SNI_RM: EISA support for A20R/RM200

I dropped this into my -queue and -mm trees.

Ralf