r2731 - trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches
Sven Luther
luther@costa.debian.org
Wed, 16 Mar 2005 23:19:48 +0100
Author: luther
Date: 2005-03-16 23:19:43 +0100 (Wed, 16 Mar 2005)
New Revision: 2731
Modified:
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-mv643xx-eth-pegasos.dpatch
Log:
New version of the pegasos gigabit ethernet controller.
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 19:15:37 UTC (rev 2730)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-mv643xx-eth-pegasos.dpatch 2005-03-16 22:19:43 UTC (rev 2731)
@@ -8,18 +8,29 @@
. $(dirname $0)/DPATCH
@DPATCH@
-diff -urN linux-2.6.11/arch/ppc/platforms/chrp_pci.c linux-2.6.11-pegasos/arch/ppc/platforms/chrp_pci.c
+--- linux-2.6.11/arch/ppc/platforms/Makefile 2005-03-02 08:38:33.000000000 +0100
++++ linux-2.6.11-pegasos/arch/ppc/platforms/Makefile 2005-03-16 19:43:43.464210680 +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
+-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_PREP) += prep_pci.o prep_setup.o
+ ifeq ($(CONFIG_PPC_PMAC),y)
+ obj-$(CONFIG_NVRAM) += pmac_nvram.o
--- linux-2.6.11/arch/ppc/platforms/chrp_pci.c 2005-03-02 08:38:33.000000000 +0100
-+++ linux-2.6.11-pegasos/arch/ppc/platforms/chrp_pci.c 2005-03-16 13:31:30.967266264 +0100
-@@ -155,19 +155,25 @@
- return 1;
- }
++++ linux-2.6.11-pegasos/arch/ppc/platforms/chrp_pci.c 2005-03-16 19:50:13.983842672 +0100
+@@ -21,6 +21,7 @@
+ #include <asm/sections.h>
+ #include <asm/pci-bridge.h>
+ #include <asm/open_pic.h>
++#include <asm/mv64x60.h>
-+extern int __init mv643xx_eth_add_pds(void);
-+
- void __init
- chrp_pcibios_fixup(void)
- {
+ /* LongTrail */
+ void __iomem *gg2_pci_config_base;
+@@ -161,13 +162,18 @@
struct pci_dev *dev = NULL;
struct device_node *np;
@@ -29,7 +40,6 @@
- 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) {
@@ -38,6 +48,7 @@
+ 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();
@@ -52,23 +63,9 @@
- ppc_md.pcibios_fixup = chrp_pcibios_fixup;
+ ppc_md.pcibios_fixup = chrp_pcibios_fixup;
}
-diff -urN linux-2.6.11/arch/ppc/platforms/Makefile linux-2.6.11-pegasos/arch/ppc/platforms/Makefile
---- linux-2.6.11/arch/ppc/platforms/Makefile 2005-03-02 08:38:33.000000000 +0100
-+++ linux-2.6.11-pegasos/arch/ppc/platforms/Makefile 2005-03-16 13:30:51.697236216 +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
--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_PREP) += prep_pci.o prep_setup.o
- ifeq ($(CONFIG_PPC_PMAC),y)
- obj-$(CONFIG_NVRAM) += pmac_nvram.o
-diff -urN linux-2.6.11/arch/ppc/platforms/mv643xx_eth_pegasos.c linux-2.6.11-pegasos/arch/ppc/platforms/mv643xx_eth_pegasos.c
--- linux-2.6.11/arch/ppc/platforms/mv643xx_eth_pegasos.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.11-pegasos/arch/ppc/platforms/mv643xx_eth_pegasos.c 2005-03-16 13:30:22.458681152 +0100
-@@ -0,0 +1,103 @@
++++ linux-2.6.11-pegasos/arch/ppc/platforms/mv643xx_eth_pegasos.c 2005-03-16 19:43:34.375592360 +0100
+@@ -0,0 +1,100 @@
+/*
+ * arch/ppc/platforms/mv643xx_eth_pegasos.c
+ *
@@ -82,12 +79,11 @@
+ */
+
+#include <linux/types.h>
-+#include <asm/prom.h>
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/device.h>
+#include <linux/mv643xx.h>
-+#include <linux/pci_ids.h>
++#include <linux/pci.h>
+
+/* Pegasos 2 specific Marvell MV 64361 gigabit ethernet port setup */
+static struct resource mv643xx_eth_shared_resources[] = {
@@ -107,7 +103,6 @@
+ .resource = mv643xx_eth_shared_resources,
+};
+
-+#ifdef CONFIG_MV643XX_ETH_0
+static struct resource mv643xx_eth0_resources[] = {
+ [0] = {
+ .name = "eth0 irq",
@@ -128,9 +123,7 @@
+ .platform_data = ð0_pd,
+ },
+};
-+#endif
+
-+#ifdef CONFIG_MV643XX_ETH_1
+static struct resource mv643xx_eth1_resources[] = {
+ [0] = {
+ .name = "eth1 irq",
@@ -151,24 +144,35 @@
+ .platform_data = ð1_pd,
+ },
+};
-+#endif
+
+static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
+ &mv643xx_eth_shared_device,
-+#ifdef CONFIG_MV643XX_ETH_0
+ ð0_device,
-+#endif
-+#ifdef CONFIG_MV643XX_ETH_1
+ ð1_device,
-+#endif
+};
+
-+static int __init
++
++int
+mv643xx_eth_add_pds(void)
+{
+ int ret = 0;
++ static struct pci_device_id pci_marvell_mv64360[] = {
++ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360) },
++ { }
++ };
+
-+ if ((ret = pci_find_device(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360, NULL))) {
++ if (pci_dev_present(pci_marvell_mv64360)) {
+ ret = platform_add_devices(mv643xx_eth_pd_devs, ARRAY_SIZE(mv643xx_eth_pd_devs));
+ }
++ return ret;
+}
+--- linux-2.6.11/include/asm-ppc/mv64x60.h 2005-03-02 08:38:17.000000000 +0100
++++ linux-2.6.11-pegasos/include/asm-ppc/mv64x60.h 2005-03-16 19:48:44.646424024 +0100
+@@ -342,4 +342,7 @@
+ extern struct mv64x60_64bit_window
+ mv64360_64bit_windows[MV64x60_64BIT_WIN_COUNT];
+
++/* chrp/pegasos probe and initialization function */
++extern int mv643xx_eth_add_pds(void);
++
+ #endif /* __ASMPPC_MV64x60_H */