r2726 - trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches

Sven Luther luther@costa.debian.org
Wed, 16 Mar 2005 11:41:29 +0100


Author: luther
Date: 2005-03-16 11:41:29 +0100 (Wed, 16 Mar 2005)
New Revision: 2726

Modified:
   trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-mv643xx-eth-pegasos.dpatch
Log:
Upgraded arch-specific pegasos gigabit ethernet driver.


Modified: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-mv643xx-eth-pegasos.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-mv643xx-eth-pegasos.dpatch	2005-03-16 10:23:02 UTC (rev 2725)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-mv643xx-eth-pegasos.dpatch	2005-03-16 10:41:29 UTC (rev 2726)
@@ -8,20 +8,69 @@
 . $(dirname $0)/DPATCH
 
 @DPATCH@
---- linux-dale/arch/ppc/platforms/Makefile	2005-03-08 09:52:44.000000000 +0100
-+++ kernel-source-2.6.11-marvell/arch/ppc/platforms/Makefile	2005-03-08 17:33:29.000000000 +0100
-@@ -12,7 +12,7 @@
+diff -urN linux-2.6.10-pegasos/arch/ppc/platforms/chrp_pci.c linux-2.6.10-pegasos-marvell/arch/ppc/platforms/chrp_pci.c
+--- linux-2.6.10-pegasos/arch/ppc/platforms/chrp_pci.c	2005-03-16 10:52:31.499243024 +0100
++++ linux-2.6.10-pegasos-marvell/arch/ppc/platforms/chrp_pci.c	2005-03-16 11:01:12.267074280 +0100
+@@ -153,19 +153,25 @@
+ 	return 1;
+ }
+ 
++extern int __init mv643xx_eth_add_pds(void);
++
+ void __init
+ chrp_pcibios_fixup(void)
+ {
+ 	struct pci_dev *dev = NULL;
+ 	struct device_node *np;
+ 
+-	/* PCI interrupts are controlled by the OpenPIC */
+-	for_each_pci_dev(dev) {
+-		np = pci_device_to_OF_node(dev);
+-		if ((np != 0) && (np->n_intrs > 0) && (np->intrs[0].line != 0))
+-			dev->irq = np->intrs[0].line;
+-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+-	}
++	if (_chrp_type != _CHRP_Pegasos) {
++		/* PCI interrupts are controlled by the OpenPIC */
++		for_each_pci_dev(dev) {
++			np = pci_device_to_OF_node(dev);
++			if ((np != 0) && (np->n_intrs > 0) && (np->intrs[0].line != 0))
++				dev->irq = np->intrs[0].line;
++			pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
++		}
++	
++	/* Let's search for marvel 643xx northbridges and do presetup if found */
++	mv643xx_eth_add_pds();
+ }
+ 
+ #define PRG_CL_RESET_VALID 0x00010000
+@@ -303,8 +309,5 @@
+ 		}
+ 	}
+ 	
+-	if (is_pegasos)
+-		ppc_md.pcibios_fixup = NULL;
+-	else
+-		ppc_md.pcibios_fixup = chrp_pcibios_fixup;
++	ppc_md.pcibios_fixup = chrp_pcibios_fixup;
+ }
+diff -urN linux-2.6.10-pegasos/arch/ppc/platforms/Makefile linux-2.6.10-pegasos-marvell/arch/ppc/platforms/Makefile
+--- linux-2.6.10-pegasos/arch/ppc/platforms/Makefile	2004-12-24 22:35:49.000000000 +0100
++++ linux-2.6.10-pegasos-marvell/arch/ppc/platforms/Makefile	2005-03-16 10:53:30.681245992 +0100
+@@ -12,7 +12,8 @@
  obj-$(CONFIG_PPC_PMAC)		+= pmac_pic.o pmac_setup.o pmac_time.o \
  					pmac_feature.o pmac_pci.o pmac_sleep.o \
- 					pmac_low_i2c.o pmac_cache.o
+ 					pmac_low_i2c.o
 -obj-$(CONFIG_PPC_CHRP)		+= chrp_setup.o chrp_time.o chrp_pci.o
-+obj-$(CONFIG_PPC_CHRP)		+= chrp_setup.o chrp_time.o chrp_pci.o mv643xx_eth_pegasos.o
++obj-$(CONFIG_PPC_CHRP)		+= chrp_setup.o chrp_time.o chrp_pci.o \
++					mv643xx_eth_pegasos.o
  obj-$(CONFIG_PPC_PREP)		+= prep_pci.o prep_setup.o
  ifeq ($(CONFIG_PPC_PMAC),y)
  obj-$(CONFIG_NVRAM)		+= pmac_nvram.o
---- linux-dale/arch/ppc/platforms/mv643xx_eth_pegasos.c	1970-01-01 01:00:00.000000000 +0100
-+++ kernel-source-2.6.11-marvell/arch/ppc/platforms/mv643xx_eth_pegasos.c	2005-03-08 20:21:33.000000000 +0100
-@@ -0,0 +1,105 @@
+diff -urN linux-2.6.10-pegasos/arch/ppc/platforms/mv643xx_eth_pegasos.c linux-2.6.10-pegasos-marvell/arch/ppc/platforms/mv643xx_eth_pegasos.c
+--- linux-2.6.10-pegasos/arch/ppc/platforms/mv643xx_eth_pegasos.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.10-pegasos-marvell/arch/ppc/platforms/mv643xx_eth_pegasos.c	2005-03-16 10:46:45.000000000 +0100
+@@ -0,0 +1,103 @@
 +/*
 + *  arch/ppc/platforms/mv643xx_eth_pegasos.c
 + *
@@ -40,7 +89,7 @@
 +#include <linux/ioport.h>
 +#include <linux/device.h>
 +#include <linux/mv643xx.h>
-+#include <linux/pci.h>
++#include <linux/pci_ids.h>
 +
 +/* Pegasos 2 specific Marvell MV 64361 gigabit ethernet port setup */
 +static struct resource mv643xx_eth_shared_resources[] = {
@@ -120,10 +169,8 @@
 +mv643xx_eth_add_pds(void)
 +{
 +	int ret = 0;
-+	if (pci_find_device(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360, NULL)) {
-+		ret = platform_add_devices(mv643xx_eth_pd_devs,
-+			ARRAY_SIZE(mv643xx_eth_pd_devs));
++
++	if ((ret = pci_find_device(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360, NULL))) {
++		ret = platform_add_devices(mv643xx_eth_pd_devs, ARRAY_SIZE(mv643xx_eth_pd_devs));
 +	}
-+	return ret;
 +}
-+late_initcall(mv643xx_eth_add_pds);