Skip to contentSkip to conversation

add STB810 support (Philips PNX8550-based)

PATCH In review Vitaly Wool 3 participants 7 messages Dec 8, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add STB810 support (Philips PNX8550-based)

Hello Ralf,

please find the updated patch that adds support for STB810 below.

 arch/mips/Kconfig                              |    5 
 arch/mips/Makefile                             |    5 
 arch/mips/configs/pnx8550-stb810_defconfig     | 1229 +++++++++++++++++++++++++
 arch/mips/pci/fixup-pnx8550.c                  |    4 
 arch/mips/philips/pnx8550/common/prom.c        |   20 
 arch/mips/philips/pnx8550/jbs/irqmap.c         |    8 
 arch/mips/philips/pnx8550/stb810/Makefile      |    4 
 arch/mips/philips/pnx8550/stb810/board_setup.c |   49 
 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, 1377 insertions(+), 20 deletions(-)
arch/mips/Kconfig +5 -0
Index: linux-mips.git/arch/mips/Kconfig
===================================================================
@@ -459,6 +459,11 @@
 	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
===================================================================
@@ -463,6 +463,11 @@
 #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/
arch/mips/configs/pnx8550-stb810_defconfig new file +1229 -0

1,229 lines not on this page · raw message

arch/mips/philips/pnx8550/common/prom.c +6 -14
Index: linux-mips.git/arch/mips/philips/pnx8550/common/prom.c
===================================================================
@@ -35,23 +35,15 @@
 	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/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 +49 -0

49 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 pnx8550_irq_tab[][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
===================================================================
@@ -131,6 +131,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 SIBYTE
arch/mips/pci/fixup-pnx8550.c +2 -2
Index: linux-mips.git/arch/mips/pci/fixup-pnx8550.c
===================================================================
@@ -33,7 +33,7 @@
 #define	DBG(x...)
 #endif
 
-extern char irq_tab_jbs[][5];
+extern char pnx8550_irq_tab[][5];
 
 void __init pcibios_fixup_resources(struct pci_dev *dev)
 {
@@ -47,7 +47,7 @@
 
 int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
-	return irq_tab_jbs[slot][pin];
+	return pnx8550_irq_tab[slot][pin];
 }
 
 /* Do platform specific device initialization at pci_enable_device() time */
arch/mips/philips/pnx8550/jbs/irqmap.c +4 -4
Index: linux-mips.git/arch/mips/philips/pnx8550/jbs/irqmap.c
===================================================================
@@ -28,9 +28,9 @@
 #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},
- [17] =	{ -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
+char pnx8550_irq_tab[][5] __initdata = {
+	[8]	= { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
+	[9]	= { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
+	[17]	= { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
 };
 
#1 lore raw
Quoted 1 line · Vitaly Wool

please find the updated patch that adds support for STB810 below.

Ok, I applied the unARMed version of the patch :-)

Thanks Vitaly,

Ralf

#2 lore raw

On Fri, Dec 08, 2006 at 01:05:43PM +0000, Ralf Baechle wrote:

Hmmm...

CC arch/mips/philips/pnx8550/common/setup.o
arch/mips/philips/pnx8550/common/setup.c:27:34: error: linux/serial_pnx8xxx.h: No such file or directory arch/mips/philips/pnx8550/common/setup.c: In function 'plat_mem_setup':
arch/mips/philips/pnx8550/common/setup.c:147: error: 'PNX8XXX_UART_LCR_8BIT' undeclared (first use in this function) arch/mips/philips/pnx8550/common/setup.c:147: error: (Each undeclared identifier is reported only once arch/mips/philips/pnx8550/common/setup.c:147: error: for each function it appears in.)
make[1]: *** [arch/mips/philips/pnx8550/common/setup.o] Error 1
make: *** [arch/mips/philips/pnx8550/common] Error 2

Ralf

#3 lore raw

Hello.

Quoted 7 lines · Ralf Baechle

On Fri, Dec 08, 2006 at 01:05:43PM +0000, Ralf Baechle wrote:

Hmmm...

CC arch/mips/philips/pnx8550/common/setup.o
arch/mips/philips/pnx8550/common/setup.c:27:34: error: linux/serial_pnx8xxx.h: No such file or directory

Quoted 6 lines

arch/mips/philips/pnx8550/common/setup.c: In function 'plat_mem_setup':
arch/mips/philips/pnx8550/common/setup.c:147: error: 'PNX8XXX_UART_LCR_8BIT' undeclared (first use in this function) arch/mips/philips/pnx8550/common/setup.c:147: error: (Each undeclared identifier is reported only once arch/mips/philips/pnx8550/common/setup.c:147: error: for each function it appears in.)
make[1]: *** [arch/mips/philips/pnx8550/common/setup.o] Error 1
make: *** [arch/mips/philips/pnx8550/common] Error 2

PNX8xxx UART driver still not accepted it seems, thanks to RMK's step out
from the serial core maintenance...

WBR, Sergei

#4 lore raw
In reply to Ralf Baechle
Quoted 4 lines · Ralf Baechle

On Fri, Dec 08, 2006 at 01:05:43PM +0000, Ralf Baechle wrote:

Hmmm...

Quoted 12 lines

CC arch/mips/philips/pnx8550/common/setup.o
arch/mips/philips/pnx8550/common/setup.c:27:34: error:
linux/serial_pnx8xxx.h: No such file or directory arch/mips/philips/pnx8550/common/setup.c: In function 'plat_mem_setup':
arch/mips/philips/pnx8550/common/setup.c:147: error: 'PNX8XXX_UART_LCR_8BIT' undeclared (first use in this function) arch/mips/philips/pnx8550/common/setup.c:147: error: (Each undeclared identifier is reported only once arch/mips/philips/pnx8550/common/setup.c:147: error: for each function it appears in.)
make[1]: *** [arch/mips/philips/pnx8550/common/setup.o] Error 1
make: *** [arch/mips/philips/pnx8550/common] Error 2

That's due to my serial rework for 8550 still being ignored, even though it has been accepted basically by rmk just before he quitted mainstaining serial stuff .

The latest repost was yesterday: http://lkml.org/lkml/2006/12/7/147.
I don't know what else to do to make it seen by anyone :(

Vitaly

#5 lore raw
In reply to Vitaly Wool

Hello.

Quoted 1 line · Vitaly Wool

please find the updated patch that adds support for STB810 below.

[...]

arch/mips/configs/pnx8550-stb810_defconfig

Quoted 8 lines

Index: linux-mips.git/arch/mips/configs/pnx8550-stb810_defconfig
===================================================================

arch/mips/configs/pnx8550-stb810_defconfig new file +1 -0
 
+CONFIG_BLK_DEV_HPT366=y

Oh? Definitely not a good driver support choice for embedded targets...
Does STB810 have is on board?

Quoted 4 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +4 -0
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support

arch/mips/configs/pnx8550-stb810_defconfig line 472

Quoted 10 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +10 -0
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y

Do we really need SCSI *disk* support?

Quoted 10 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +10 -0
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+CONFIG_SCSI_CONSTANTS=y
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transports
+#

arch/mips/configs/pnx8550-stb810_defconfig line 498

Quoted 10 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +10 -0
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+CONFIG_ISCSI_TCP=m

I doubt this kernel needs iSCSI crap even as modules...

arch/mips/configs/pnx8550-stb810_defconfig line 741

Quoted 5 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +5 -0
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y

Oh?

arch/mips/configs/pnx8550-stb810_defconfig line 774

Quoted 4 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +4 -0
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y

Oh really?

arch/mips/configs/pnx8550-stb810_defconfig line 861

Quoted 12 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +12 -0
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_ISD200=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y

Hm, do we really need to support all these?

Quoted 88 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +88 -0
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+# CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set

arch/mips/configs/pnx8550-stb810_defconfig line 1089

Quoted 10 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +10 -0
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y

I doubt this kernel needs iSCSI crap even as modules but well...

WBR, Sergei

#6 lore raw
Quoted 7 lines · Hello, I wrote:

arch/mips/configs/pnx8550-stb810_defconfig line 1089

Quoted 5 lines
arch/mips/configs/pnx8550-stb810_defconfig new file +5 -0
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y

I doubt this kernel needs iSCSI crap even as modules but well...

Oh, sorry, cut-n-paste issue. I meant to also complain about [V]FAT
support in-kernel...

WBR, Sergei