Skip to contentSkip to conversation

Philips PNX8550

PATCH In review Vladimir A. Barinov 2 participants 7 messages Dec 6, 2005 – Dec 8, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Philips PNX8550

Hi Ralf, Pete,

This patch enables NATSEMI eth driver to be used on pci bus.

Does it make sense to push this patch?

Vladimir

arch/mips/philips/pnx8550/jbs/irqmap.c +1 -0
@@ -31,6 +31,7 @@
 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},
  [17] =	{ -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
 };
 
#1 lore raw

Hi Vladimir,

Is this really for the JBS board or for a different board?

Pete

--- "Vladimir A. Barinov" <[email protected]>

Quoted 10 lines · wrote:

Hi Ralf, Pete,

This patch enables NATSEMI eth driver to be used on pci bus.

Does it make sense to push this patch?

Vladimir

Quoted 1 line

---

linux-2.6.15.orig/arch/mips/philips/pnx8550/jbs/irqmap.c

Quoted 17 lines
2005-12-02 16:37:59.000000000 +0300
+++
linux-2.6.15/arch/mips/philips/pnx8550/jbs/irqmap.c
2005-12-02 17:33:05.000000000 +0300
(quoted diff) +1 -0
@@ -31,6 +31,7 @@
 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},

[17] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff,
0xff},
};

#2 lore raw

Hi Pete,

Quoted 6 lines · Peter Popov

Hi Vladimir,

Is this really for the JBS board or for a different board?

Thank you for the response.

I used a quite different board (STB810), but it's based on the same board dependent code as JBS (i.e arch/mips/philips/pnx8550/jbs). I haven't worked with JBS board and I'm not sure if slot=10 is needed for that, but it's really necessary for STB810.

I also has another question - Could you please advice: shall I create a different arch/mips/philips/pnx8550/stb810
and add MACH_PHILIPS_STB810 ID and defconfig
or I can use exiting JBS one?

TIA,
Vladimir

Quoted 46 lines

Pete

--- "Vladimir A. Barinov" <[email protected]>

Quoted 13 lines · wrote:

Hi Ralf, Pete,

This patch enables NATSEMI eth driver to be used on pci bus.

Does it make sense to push this patch?

Vladimir

Quoted 3 lines

---

linux-2.6.15.orig/arch/mips/philips/pnx8550/jbs/irqmap.c

Quoted 19 lines
2005-12-02 16:37:59.000000000 +0300
+++
linux-2.6.15/arch/mips/philips/pnx8550/jbs/irqmap.c
2005-12-02 17:33:05.000000000 +0300
(quoted diff) +1 -0
@@ -31,6 +31,7 @@
 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},

[17] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff,
0xff},
};

#3 lore raw
Quoted 8 lines

I used a quite different board (STB810), but it's based on the same board dependent code as JBS (i.e arch/mips/philips/pnx8550/jbs). I haven't worked with
JBS board and I'm not sure if slot=10 is needed for that, but it's really necessary for STB810.

The JBS has only 3 pci slots and I tested all three. So the fourth one you added won't do any damage but it's not quite right either.

Quoted 5 lines

I also has another question - Could you please
advice: shall I create a different arch/mips/philips/pnx8550/stb810
and add MACH_PHILIPS_STB810 ID and defconfig or I can use exiting JBS one?

Is anything else different that would justify the new directory? If not, perhaps we just need an STB board selection in arch/mips/Kconfig, a defconfig, and an ifdef around that pci slot you sent.

BTW, regarding your serial driver patch ... I have one outstanding change (small) I still have to make, as requested by rmk. Mind if I forward that email to you so you can take care of it :)?

Pete

Pete

#4 lore raw

Hi Pete,

Quoted 24 lines
Quoted 9 lines

I used a quite different board (STB810), but it's based on the same board dependent code as JBS (i.e arch/mips/philips/pnx8550/jbs). I haven't worked with JBS board and I'm not sure if slot=10 is needed for that, but it's really necessary for STB810.

The JBS has only 3 pci slots and I tested all three. So the fourth one you added won't do any damage but it's not quite right either.

Quoted 7 lines

I also has another question - Could you please
advice: shall I create a different arch/mips/philips/pnx8550/stb810
and add MACH_PHILIPS_STB810 ID and defconfig or I can use exiting JBS one?

Quoted 6 lines

Is anything else different that would justify the new directory? If not, perhaps we just need an STB board selection in arch/mips/Kconfig, a defconfig, and an ifdef around that pci slot you sent.

The are only 3 small file in the arch/mips/philips/pnx8550/jbs directory:
1) board_setup.c is the same for STB810
2) init.c may be needs cosmetic changes to identify the board:
"Philips PNX8550/JBS" -> "Philips PNX8550/STB810" MACH_PHILIPS_JBS -> MACH_PHILIPS_STB810

I'm not sure are they really needed?
3) irq.map needs change to add slot 10 and remove slot 17 for STB810 board.

That's all :)

Quoted 6 lines

BTW, regarding your serial driver patch ... I have one outstanding change (small) I still have to make, as requested by rmk. Mind if I forward that email to you so you can take care of it :)?

Yes, please.

Vladimir

#5 lore raw
Quoted 8 lines
Quoted 7 lines

BTW, regarding your serial driver patch ... I have one outstanding change (small) I still have to make, as requested by rmk. Mind if I forward that email to you so you can take care of it :)?

Yes, please.

i.e.: please forward it to me :)

#6 lore raw
In reply to Vladimir A. Barinov

Hello Pete, Ralf,

This patch adds support for STB810 board based on Philips PNX8550 processor.

1) added arch/mips/philips/pnx8550/stb810/* files based on the arch/mips/philips/pnx8550/jbs/*
2) modified Kconfig and Makefile in arch/mips/
3) added new board ID in bootinfo.h to identify STB810 board
4) added pnx8550-stb810_defconfig

5) STB810 platform has a special bootloader "PNX8550 bootlader" that does not have ELF loader, so it's needed to point to the kernel_entry. (modified arch_mips/kernel/head.S)

6) arch/mips/philips/pnx8550/common/platform.c - compile fix
7) arch/mips/philips/pnx8550/common/prom.c - fix for proper parsing bootloader command-line.

Pete could you please review?

TIA,
Vladimir

Quoted 37 lines · Vladimir A. Barinov

Hi Pete,

Quoted 23 lines
Quoted 8 lines

I used a quite different board (STB810), but it's based on the same board dependent code as JBS (i.e arch/mips/philips/pnx8550/jbs). I haven't worked with JBS board and I'm not sure if slot=10 is needed for that, but it's really necessary for STB810.

The JBS has only 3 pci slots and I tested all three. So the fourth one you added won't do any damage but it's not quite right either.

Quoted 6 lines

I also has another question - Could you please
advice: shall I create a different arch/mips/philips/pnx8550/stb810
and add MACH_PHILIPS_STB810 ID and defconfig or I can use exiting JBS one?

Quoted 6 lines

Is anything else different that would justify the new directory? If not, perhaps we just need an STB board selection in arch/mips/Kconfig, a defconfig, and an ifdef around that pci slot you sent.

The are only 3 small file in the arch/mips/philips/pnx8550/jbs directory:
1) board_setup.c is the same for STB810
2) init.c may be needs cosmetic changes to identify the board:
"Philips PNX8550/JBS" -> "Philips PNX8550/STB810" MACH_PHILIPS_JBS -> MACH_PHILIPS_STB810

Quoted 6 lines

I'm not sure are they really needed?
3) irq.map needs change to add slot 10 and remove slot 17 for STB810 board.

That's all :)

 arch/mips/Kconfig                              |    5 
 arch/mips/Makefile                             |    5 
 arch/mips/configs/pnx8550-stb810_defconfig     | 1117 +++++++++++++++++++++++++
 arch/mips/kernel/head.S                        |    2 
 arch/mips/philips/pnx8550/common/platform.c    |    1 
 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 
 11 files changed, 1268 insertions(+), 15 deletions(-)
arch/mips/Kconfig +5 -0
Index: linux-2.6.15_0/arch/mips/Kconfig
===================================================================
@@ -445,6 +445,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 DDB5074
 	bool "Support for NEC DDB Vrc-5074 (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
arch/mips/Makefile +5 -0
Index: linux-2.6.15_0/arch/mips/Makefile
===================================================================
@@ -583,6 +583,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
+
 #
 # SGI IP22 (Indy/Indigo2)
 #
arch/mips/philips/pnx8550/stb810/Makefile new file +4 -0
Index: linux-2.6.15_0/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-2.6.15_0/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-2.6.15_0/include/asm-mips/bootinfo.h
===================================================================
@@ -138,6 +138,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/platform.c +1 -0
Index: linux-2.6.15_0/arch/mips/philips/pnx8550/common/platform.c
===================================================================
@@ -18,6 +18,7 @@
 #include <linux/resource.h>
 #include <linux/serial.h>
 #include <linux/serial_ip3106.h>
+#include <linux/platform_device.h>
 
 #include <int.h>
 #include <usb.h>
arch/mips/philips/pnx8550/common/prom.c +6 -14
Index: linux-2.6.15_0/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-2.6.15_0/arch/mips/kernel/head.S
===================================================================
@@ -116,7 +116,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 +1117 -0

1,117 lines not on this page · raw message