Skip to contentSkip to conversation

add TV810 board support

PATCH In review Vitaly Wool 2 participants 2 messages Oct 3, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add TV810 board support

Hello folks,

inlined is the patch that adds support for TV810 board which is a small deviation :) from PNX8550 platform.

 arch/mips/Kconfig                              |    5 
 arch/mips/Makefile                             |    5 
 arch/mips/configs/pnx8550-stb810_defconfig     | 1219 +++++++++++++++++++++++++
 arch/mips/kernel/head.S                        |    2 
 arch/mips/philips/pnx8550/common/prom.c        |   20 
 arch/mips/philips/pnx8550/stb810/Makefile      |    4 
 arch/mips/philips/pnx8550/stb810/board_setup.c |   56 +
 arch/mips/philips/pnx8550/stb810/irqmap.c      |   23 
 arch/mips/philips/pnx8550/stb810/prom_init.c   |   49 +
 include/asm-mips/bootinfo.h                    |    1 
 10 files changed, 1369 insertions(+), 15 deletions(-)
arch/mips/philips/pnx8550/stb810/Makefile new file +4 -0
Index: linux-mips.git/arch/mips/philips/pnx8550/stb810/Makefile
===================================================================
@@ -0,0 +1,4 @@
+
+# Makefile for the Philips STB810 Board.
+
+lib-y := prom_init.o board_setup.o irqmap.o
arch/mips/philips/pnx8550/stb810/board_setup.c new file +56 -0

56 lines not on this page · raw message

arch/mips/philips/pnx8550/stb810/irqmap.c new file +23 -0
Index: linux-mips.git/arch/mips/philips/pnx8550/stb810/irqmap.c
===================================================================
@@ -0,0 +1,23 @@
+/*
+ *  Philips STB810 board irqmap.
+ *
+ *  Author: MontaVista Software, Inc.
+ *          [email protected]
+ *
+ *  Copyright 2005 MontaVista Software Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation; either version 2 of the License, or (at your
+ *  option) any later version.
+ */
+
+#include <linux/init.h>
+#include <int.h>
+
+char irq_tab_jbs[][5] __initdata = {
+ [8] =  { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
+ [9] =  { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
+ [10] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
+};
+
arch/mips/philips/pnx8550/stb810/prom_init.c new file +49 -0

49 lines not on this page · raw message

include/asm-mips/bootinfo.h +1 -0
Index: linux-mips.git/include/asm-mips/bootinfo.h
===================================================================
@@ -137,6 +137,7 @@
 #define  MACH_PHILIPS_NINO	0	/* Nino */
 #define  MACH_PHILIPS_VELO	1	/* Velo */
 #define  MACH_PHILIPS_JBS	2	/* JBS */
+#define  MACH_PHILIPS_STB810	3	/* STB810 */
 
 /*
  * Valid machtype for group Globespan
arch/mips/philips/pnx8550/common/prom.c +6 -14
Index: linux-mips.git/arch/mips/philips/pnx8550/common/prom.c
===================================================================
@@ -35,23 +35,15 @@ char * prom_getcmdline(void)
 	return &(arcs_cmdline[0]);
 }
 
-void  prom_init_cmdline(void)
+void __init prom_init_cmdline(void)
 {
-	char *cp;
-	int actr;
-
-	actr = 1; /* Always ignore argv[0] */
+	int i;
 
-	cp = &(arcs_cmdline[0]);
-	while(actr < prom_argc) {
-	        strcpy(cp, prom_argv[actr]);
-		cp += strlen(prom_argv[actr]);
-		*cp++ = ' ';
-		actr++;
+	arcs_cmdline[0] = '\0';
+	for (i = 0; i < prom_argc; i++) {
+		strcat(arcs_cmdline, prom_argv[i]);
+		strcat(arcs_cmdline, " ");
 	}
-	if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
-		--cp;
-	*cp = '\0';
 }
 
 char *prom_getenv(char *envname)
arch/mips/kernel/head.S +1 -1
Index: linux-mips.git/arch/mips/kernel/head.S
===================================================================
@@ -138,7 +138,7 @@
 EXPORT(stext)					# used for profiling
 EXPORT(_stext)
 
-#if defined(CONFIG_QEMU) || defined(CONFIG_MIPS_SIM)
+#if defined(CONFIG_QEMU) || defined(CONFIG_MIPS_SIM) || defined(CONFIG_PNX8550_STB810)
 	/*
 	 * Give us a fighting chance of running if execution beings at the
 	 * kernel load address.  This is needed because this platform does
arch/mips/configs/pnx8550-stb810_defconfig new file +1219 -0

1,219 lines not on this page · raw message

arch/mips/Kconfig +5 -0
Index: linux-mips.git/arch/mips/Kconfig
===================================================================
@@ -480,6 +480,11 @@ config PNX8550_JBS
 	select PNX8550
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
+config PNX8550_STB810
+	bool "Support for Philips PNX8550 based STB810 board"
+	select PNX8550
+	select SYS_SUPPORTS_LITTLE_ENDIAN
+
 config DDB5477
 	bool "NEC DDB Vrc-5477"
 	select DDB5XXX_COMMON
arch/mips/Makefile +5 -0
Index: linux-mips.git/arch/mips/Makefile
===================================================================
@@ -467,6 +467,11 @@ libs-$(CONFIG_PNX8550_JBS)	+= arch/mips/
 #cflags-$(CONFIG_PNX8550_JBS)	+= -Iinclude/asm-mips/mach-pnx8550
 load-$(CONFIG_PNX8550_JBS)	+= 0xffffffff80060000
 
+# Philips PNX8550 STB810 board
+#
+libs-$(CONFIG_PNX8550_STB810)	+= arch/mips/philips/pnx8550/stb810/
+load-$(CONFIG_PNX8550_STB810)	+= 0xffffffff80060000
+
 # NEC EMMA2RH boards
 #
 core-$(CONFIG_EMMA2RH)          += arch/mips/emma2rh/common/
#1 lore raw

Vitaly Wool wrote:
[snip]

arch/mips/philips/pnx8550/stb810/board_setup.c line 37

Quoted 4 lines
arch/mips/philips/pnx8550/stb810/board_setup.c new file +4 -0
+/* CP0 hazard avoidance. */
+#define BARRIER __asm__ __volatile__(".set noreorder\n\t" \
+				     "nop; nop; nop; nop; nop; nop;\n\t" \
+				     ".set reorder\n\t")

Didn't we just get rid of that BARRIER stuff?

Thiemo