[PATCH][2.6] JS20 support

Jake Moilanen moilanen at austin.ibm.com
Tue Nov 25 10:12:13 EST 2003


Here are some patches and the config to boot a JS20 Blade.  After the
interrupt abstraction was done, there was not much code needed.

Note: There is a current FW bug (should be fixed in a couple weeks) that
you need to make sure you do not call event-scan.  From the OF prompt
run these commands.

        dev /rtas
        " event-scan" delete-property


Patches
-------
linux-2.6-amd74x-irq-1.patch -
        Bug fix required

linux-2.6-js20-ide-workaorund-1.patch -
        Temporary workaround for IDE IO space being stuck
        in the ISA range.  FW is working on a fix.

linux-2.6-pcibios-scan-all-fns-1.patch -
        This is a forward port of the 2.4 patch to allow arch
        decide if need to scan all pci functions or not.  This
        is based on a patch from Anton.

defconfig.js20.bz2 -
        The config file to boot.

Thanks,
Jake
-------------- next part --------------
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1342  -> 1.1343 
#	drivers/ide/pci/amd74xx.c	1.22    -> 1.23   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/24	moilanen at threadlp13.austin.ibm.com	1.1343
# init chipset does not return irq, like is required.
# --------------------------------------------
#
diff -Nru a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
--- a/drivers/ide/pci/amd74xx.c	Mon Nov 24 14:23:40 2003
+++ b/drivers/ide/pci/amd74xx.c	Mon Nov 24 14:23:40 2003
@@ -374,7 +374,7 @@
 #endif /* DISPLAY_AMD_TIMINGS && CONFIG_PROC_FS */
 
 
-	return 0;
+	return dev->irq;
 }
 
 static void __init init_hwif_amd74xx(ide_hwif_t *hwif)
-------------- next part --------------
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1341  -> 1.1342 
#	arch/ppc64/defconfig	1.41    -> 1.42   
#	  arch/ppc64/Kconfig	1.25    -> 1.26   
#	include/asm-ppc64/eeh.h	1.6     -> 1.7    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/24	moilanen at threadlp13.austin.ibm.com	1.1342
# This is a temporary workaround for us the IDE IO space being in ISA
# space instead of PCI space.  Firmware is working on a fix for this.
# --------------------------------------------
#
diff -Nru a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
--- a/arch/ppc64/Kconfig	Mon Nov 24 14:20:01 2003
+++ b/arch/ppc64/Kconfig	Mon Nov 24 14:20:01 2003
@@ -142,6 +142,12 @@
 	bool "Proc interface to RTAS"
 	depends on !PPC_ISERIES
 
+config JS20
+	bool "JS20 System"
+	depends on !PPC_ISERIES
+	help
+	  This option is for a JS20 box.
+
 endmenu
 
 
diff -Nru a/arch/ppc64/defconfig b/arch/ppc64/defconfig
--- a/arch/ppc64/defconfig	Mon Nov 24 14:20:01 2003
+++ b/arch/ppc64/defconfig	Mon Nov 24 14:20:01 2003
@@ -59,6 +59,7 @@
 # CONFIG_RTAS_FLASH is not set
 CONFIG_SCANLOG=y
 CONFIG_PPC_RTAS=y
+# CONFIG_JS20 is not set
 
 #
 # General setup
diff -Nru a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h
--- a/include/asm-ppc64/eeh.h	Mon Nov 24 14:20:01 2003
+++ b/include/asm-ppc64/eeh.h	Mon Nov 24 14:20:01 2003
@@ -150,7 +150,11 @@
  * ISA does not implement EEH and ISA may not exist in the system.
  * For PCI we check for EEH failures.
  */
+#ifdef CONFIG_JS20
+#define _IO_IS_ISA(port) ((port) < 0x00000)
+#else
 #define _IO_IS_ISA(port) ((port) < 0x10000)
+#endif
 #define _IO_HAS_ISA_BUS	(isa_io_base != 0)
 
 static inline u8 eeh_inb(unsigned long port) {
-------------- next part --------------
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1343  -> 1.1344 
#	include/asm-alpha/pci.h	1.18    -> 1.19   
#	include/asm-sparc64/pci.h	1.17    -> 1.18   
#	include/asm-arm/pci.h	1.21    -> 1.22   
#	include/asm-v850/pci.h	1.2     -> 1.3    
#	include/asm-ppc64/pci.h	1.11    -> 1.12   
#	include/asm-i386/pci.h	1.25    -> 1.26   
#	include/asm-x86_64/pci.h	1.12    -> 1.13   
#	include/asm-um/pci.h	1.1     -> 1.2    
#	include/asm-m68k/pci.h	1.6     -> 1.7    
#	include/asm-generic/pci.h	1.1     -> 1.2    
#	include/asm-h8300/pci.h	1.3     -> 1.4    
#	include/asm-sh/pci.h	1.14    -> 1.15   
#	include/asm-arm26/pci.h	1.1     -> 1.2    
#	include/asm-mips/pci.h	1.13    -> 1.14   
#	 drivers/pci/probe.c	1.37    -> 1.38   
#	include/asm-parisc/pci.h	1.9     -> 1.10   
#	include/asm-ppc/pci.h	1.22    -> 1.23   
#	include/asm-sparc/pci.h	1.11    -> 1.12   
#	include/asm-m68knommu/pci.h	1.2     -> 1.3    
#	include/asm-ia64/pci.h	1.22    -> 1.23   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/24	moilanen at threadlp13.austin.ibm.com	1.1344
# Have callouts for each architecture to determine if need to
# scanning all pci functions or not.
# --------------------------------------------
#
diff -Nru a/drivers/pci/probe.c b/drivers/pci/probe.c
--- a/drivers/pci/probe.c	Mon Nov 24 14:30:06 2003
+++ b/drivers/pci/probe.c	Mon Nov 24 14:30:06 2003
@@ -7,6 +7,8 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 
+#include <asm/pci.h>
+
 #undef DEBUG
 
 #ifdef DEBUG
@@ -552,7 +554,7 @@
 		struct pci_dev *dev;
 
 		dev = pci_scan_device(bus, devfn);
-		if (func == 0) {
+		if (!pcibios_scan_all_fns() && func == 0) {
 			if (!dev)
 				break;
 		} else {
diff -Nru a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
--- a/include/asm-alpha/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-alpha/pci.h	Mon Nov 24 14:30:06 2003
@@ -51,6 +51,7 @@
    bus numbers.  */
 
 #define pcibios_assign_all_busses()	1
+#define pcibios_scan_all_fns()		0
 
 #define PCIBIOS_MIN_IO		alpha_mv.min_io_address
 #define PCIBIOS_MIN_MEM		alpha_mv.min_mem_address
diff -Nru a/include/asm-arm/pci.h b/include/asm-arm/pci.h
--- a/include/asm-arm/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-arm/pci.h	Mon Nov 24 14:30:06 2003
@@ -20,6 +20,8 @@
 #endif
 
 
+#define pcibios_scan_all_fns()		0
+
 static inline void pcibios_set_master(struct pci_dev *dev)
 {
 	/* No special bus mastering setup handling */
diff -Nru a/include/asm-arm26/pci.h b/include/asm-arm26/pci.h
--- a/include/asm-arm26/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-arm26/pci.h	Mon Nov 24 14:30:06 2003
@@ -1,5 +1,6 @@
 /* Should not be needed. IDE stupidity */
 /* JMA 18.05.03 - is kinda needed, if only to tell it we don't have a PCI bus */
 
-#define PCI_DMA_BUS_IS_PHYS  0
+#define PCI_DMA_BUS_IS_PHYS  		0
+#define pcibios_scan_all_fns()		0
 
diff -Nru a/include/asm-generic/pci.h b/include/asm-generic/pci.h
--- a/include/asm-generic/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-generic/pci.h	Mon Nov 24 14:30:06 2003
@@ -22,4 +22,6 @@
 	region->end = res->end;
 }
 
+#define pcibios_scan_all_fns()		0
+
 #endif
diff -Nru a/include/asm-h8300/pci.h b/include/asm-h8300/pci.h
--- a/include/asm-h8300/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-h8300/pci.h	Mon Nov 24 14:30:06 2003
@@ -8,6 +8,7 @@
  */
 
 #define pcibios_assign_all_busses()	0
+#define pcibios_scan_all_fns()		0
 
 extern inline void pcibios_set_master(struct pci_dev *dev)
 {
diff -Nru a/include/asm-i386/pci.h b/include/asm-i386/pci.h
--- a/include/asm-i386/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-i386/pci.h	Mon Nov 24 14:30:06 2003
@@ -15,6 +15,7 @@
 #else
 #define pcibios_assign_all_busses()	0
 #endif
+#define pcibios_scan_all_fns()		0
 
 extern unsigned long pci_mem_start;
 #define PCIBIOS_MIN_IO		0x1000
diff -Nru a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h
--- a/include/asm-ia64/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-ia64/pci.h	Mon Nov 24 14:30:06 2003
@@ -16,6 +16,7 @@
  * loader.
  */
 #define pcibios_assign_all_busses()     0
+#define pcibios_scan_all_fns()		0
 
 #define PCIBIOS_MIN_IO		0x1000
 #define PCIBIOS_MIN_MEM		0x10000000
diff -Nru a/include/asm-m68k/pci.h b/include/asm-m68k/pci.h
--- a/include/asm-m68k/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-m68k/pci.h	Mon Nov 24 14:30:06 2003
@@ -36,6 +36,7 @@
 };
 
 #define pcibios_assign_all_busses()	0
+#define pcibios_scan_all_fns()		0
 
 extern inline void pcibios_set_master(struct pci_dev *dev)
 {
diff -Nru a/include/asm-m68knommu/pci.h b/include/asm-m68knommu/pci.h
--- a/include/asm-m68knommu/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-m68knommu/pci.h	Mon Nov 24 14:30:06 2003
@@ -11,6 +11,8 @@
 #define PCIBIOS_MIN_IO		0x100
 #define PCIBIOS_MIN_MEM		0x00010000
 
+#define pcibios_scan_all_fns()		0
+
 /*
  * Return whether the given PCI device DMA address mask can
  * be supported properly.  For example, if your device can
diff -Nru a/include/asm-mips/pci.h b/include/asm-mips/pci.h
--- a/include/asm-mips/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-mips/pci.h	Mon Nov 24 14:30:06 2003
@@ -20,6 +20,7 @@
 #else
 #define pcibios_assign_all_busses()	0
 #endif
+#define pcibios_scan_all_fns()		0
 
 #define PCIBIOS_MIN_IO		0x1000
 #define PCIBIOS_MIN_MEM		0x10000000
diff -Nru a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h
--- a/include/asm-parisc/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-parisc/pci.h	Mon Nov 24 14:30:06 2003
@@ -174,6 +174,7 @@
 **   to zero for legacy platforms and one for PAT platforms.
 */
 #define pcibios_assign_all_busses()     (pdc_type == PDC_TYPE_PAT)
+#define pcibios_scan_all_fns()		0
 
 #define PCIBIOS_MIN_IO          0x10
 #define PCIBIOS_MIN_MEM         0x1000 /* NBPG - but pci/setup-res.c dies */
diff -Nru a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
--- a/include/asm-ppc/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-ppc/pci.h	Mon Nov 24 14:30:06 2003
@@ -26,6 +26,7 @@
 extern int pci_assign_all_busses;
 
 #define pcibios_assign_all_busses()	(pci_assign_all_busses)
+#define pcibios_scan_all_fns()		0
 
 #define PCIBIOS_MIN_IO		0x1000
 #define PCIBIOS_MIN_MEM		0x10000000
diff -Nru a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h
--- a/include/asm-ppc64/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-ppc64/pci.h	Mon Nov 24 14:30:06 2003
@@ -19,6 +19,12 @@
 #define PCIBIOS_MIN_IO		0x1000
 #define PCIBIOS_MIN_MEM		0x10000000
 
+/*
+ * ppc64 can have multifunction devices that do not respond to function 0. 
+ * In this case we must scan all functions.
+ */
+#define pcibios_scan_all_fns()     1
+
 static inline void pcibios_set_master(struct pci_dev *dev)
 {
 	/* No special bus mastering setup handling */
diff -Nru a/include/asm-sh/pci.h b/include/asm-sh/pci.h
--- a/include/asm-sh/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-sh/pci.h	Mon Nov 24 14:30:06 2003
@@ -12,6 +12,7 @@
    or architectures with incomplete PCI setup by the loader */
 
 #define pcibios_assign_all_busses()	1
+#define pcibios_scan_all_fns()		0
 
 #if defined(CONFIG_CPU_SUBTYPE_ST40STB1)
 /* These are currently the correct values for the STM overdrive board. 
diff -Nru a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h
--- a/include/asm-sparc/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-sparc/pci.h	Mon Nov 24 14:30:06 2003
@@ -8,6 +8,7 @@
  * or architectures with incomplete PCI setup by the loader.
  */
 #define pcibios_assign_all_busses()	0
+#define pcibios_scan_all_fns()		0
 
 #define PCIBIOS_MIN_IO		0UL
 #define PCIBIOS_MIN_MEM		0UL
diff -Nru a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h
--- a/include/asm-sparc64/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-sparc64/pci.h	Mon Nov 24 14:30:06 2003
@@ -11,6 +11,7 @@
  * or architectures with incomplete PCI setup by the loader.
  */
 #define pcibios_assign_all_busses()	0
+#define pcibios_scan_all_fns()		0
 
 #define PCIBIOS_MIN_IO		0UL
 #define PCIBIOS_MIN_MEM		0UL
diff -Nru a/include/asm-um/pci.h b/include/asm-um/pci.h
--- a/include/asm-um/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-um/pci.h	Mon Nov 24 14:30:06 2003
@@ -2,5 +2,6 @@
 #define __UM_PCI_H
 
 #define PCI_DMA_BUS_IS_PHYS     (1)
+#define pcibios_scan_all_fns()		0
 
 #endif
diff -Nru a/include/asm-v850/pci.h b/include/asm-v850/pci.h
--- a/include/asm-v850/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-v850/pci.h	Mon Nov 24 14:30:06 2003
@@ -17,6 +17,8 @@
 /* Get any platform-dependent definitions.  */
 #include <asm/machdep.h>
 
+#define pcibios_scan_all_fns()		0
+
 /* Generic declarations.  */
 
 struct scatterlist;
diff -Nru a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h
--- a/include/asm-x86_64/pci.h	Mon Nov 24 14:30:06 2003
+++ b/include/asm-x86_64/pci.h	Mon Nov 24 14:30:06 2003
@@ -17,6 +17,7 @@
 #else
 #define pcibios_assign_all_busses()	0
 #endif
+#define pcibios_scan_all_fns()		0
 
 extern int no_iommu, force_iommu;
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: defconfig.js20.bz2
Type: application/x-bzip
Size: 4368 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20031124/2d831892/attachment.bin 


More information about the Linuxppc64-dev mailing list