From: Sven Luther <sven.luther@wanadoo.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
Dale Farnsworth <dale@farnsworth.org>,
linuxppc-embedded@ozlabs.org, Nicolas DET <det.nicolas@free.fr>
Subject: Re: [PATCH] final mv643xx_eth pegasos patch set ...
Date: Tue, 8 Mar 2005 20:52:40 +0100 [thread overview]
Message-ID: <20050308195239.GA14126@pegasos> (raw)
In-Reply-To: <20050308192805.GA13884@pegasos>
[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]
On Tue, Mar 08, 2005 at 08:28:05PM +0100, luther wrote:
> Hello,
>
> Ok, thanks for your help, here is the final (hopefully) and cleaned up version
> of my patches :
>
> 1) mv643xx-eth-pegasos.diff
> This is the arch/ppc/platform diff, benh, could you look it over, and merge
> it in ? It is not really usefull without the mv643xx_eth.c changes, but dale
> is going to move those in together with his patches.
>
> 2) linux-2.5-mv643xx-enet-pegasos.diff
> This is just two small hunks against dale's linux-2.5-mv643xx-enet tree,
> which include the SA_INTERRUPT -> SA_IRQ and the Kconfig change. Dale said
> he would merge them with his stuff, hopefully for 2.6.12.
>
> 3) mv643xx-eth.diff
> This is the linux-2.5-mv643xx-enet diff against 2.6.11, together with the
> linux-2.5-mv643xx-enet-pegasos.diff changes, for those who want to build
> against 2.6.11.
>
> So to build against the linux-2.5-mv643xx-enet tree, you need 1) and 2) and to
> build against 2.6.11 you need 1) and 3).
>
> I am currently running the patches included in these changes, and will include
> them in the debian 2.6.11 kernels unless i hear otherwise.
Oh well, with the patches this time :/
Friendly,
Sven Luther
[-- Attachment #2: mv643xx-eth-pegasos.diff --]
[-- Type: text/plain, Size: 3683 bytes --]
--- 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 @@
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-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,112 @@
+/*
+ * arch/ppc/platforms/mv643xx_eth_pegasos.c
+ *
+ * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de>
+ * Thanks to :
+ * Dale Farnsworth <dale@farnsworth.org>
+ * Mark A. Greer <mgreer@mvista.com>
+ * Nicolas DET <nd@bplan-gmbh.de>
+ * Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ * And anyone else who helped me on this.
+ */
+
+#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>
+
+/* Pegasos 2 specific Marvell MV 64361 gigabit ethernet port setup */
+static struct resource mv643xx_eth_shared_resources[] = {
+ [0] = {
+ .name = "ethernet shared base",
+ .start = 0xf1000000 + MV643XX_ETH_SHARED_REGS,
+ .end = 0xf1000000 + MV643XX_ETH_SHARED_REGS +
+ MV643XX_ETH_SHARED_REGS_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device mv643xx_eth_shared_device = {
+ .name = MV643XX_ETH_SHARED_NAME,
+ .id = 0,
+ .num_resources = ARRAY_SIZE(mv643xx_eth_shared_resources),
+ .resource = mv643xx_eth_shared_resources,
+};
+
+#ifdef CONFIG_MV643XX_ETH_0
+static struct resource mv643xx_eth0_resources[] = {
+ [0] = {
+ .name = "eth0 irq",
+ .start = 9,
+ .end = 9,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct mv643xx_eth_platform_data eth0_pd;
+
+static struct platform_device eth0_device = {
+ .name = MV643XX_ETH_NAME,
+ .id = 0,
+ .num_resources = ARRAY_SIZE(mv643xx_eth0_resources),
+ .resource = mv643xx_eth0_resources,
+ .dev = {
+ .platform_data = ð0_pd,
+ },
+};
+#endif
+
+#ifdef CONFIG_MV643XX_ETH_1
+static struct resource mv643xx_eth1_resources[] = {
+ [0] = {
+ .name = "eth1 irq",
+ .start = 9,
+ .end = 9,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct mv643xx_eth_platform_data eth1_pd;
+
+static struct platform_device eth1_device = {
+ .name = MV643XX_ETH_NAME,
+ .id = 1,
+ .num_resources = ARRAY_SIZE(mv643xx_eth1_resources),
+ .resource = mv643xx_eth1_resources,
+ .dev = {
+ .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
+mv643xx_eth_add_pds(void)
+{
+ int ret = 0;
+ struct device_node *np;
+ np = find_devices("host");
+ if (np != NULL) {
+ unsigned short *vendorid = (unsigned short *) get_property (np, "vendor-id", NULL);
+ unsigned short *deviceid = (unsigned short *) get_property (np, "device-id", NULL);
+
+ if (vendorid && *vendorid == PCI_VENDOR_ID_MARVELL &&
+ deviceid && *deviceid == PCI_DEVICE_ID_MARVELL_MV64360)
+ ret = platform_add_devices(mv643xx_eth_pd_devs,
+ ARRAY_SIZE(mv643xx_eth_pd_devs));
+ }
+ return ret;
+}
+arch_initcall(mv643xx_eth_add_pds);
[-- Attachment #3: mv643xx-eth-pegasos.diff --]
[-- Type: text/plain, Size: 3683 bytes --]
--- 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 @@
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-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,112 @@
+/*
+ * arch/ppc/platforms/mv643xx_eth_pegasos.c
+ *
+ * Copyright (C) 2005 Sven Luther <sl@bplan-gmbh.de>
+ * Thanks to :
+ * Dale Farnsworth <dale@farnsworth.org>
+ * Mark A. Greer <mgreer@mvista.com>
+ * Nicolas DET <nd@bplan-gmbh.de>
+ * Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ * And anyone else who helped me on this.
+ */
+
+#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>
+
+/* Pegasos 2 specific Marvell MV 64361 gigabit ethernet port setup */
+static struct resource mv643xx_eth_shared_resources[] = {
+ [0] = {
+ .name = "ethernet shared base",
+ .start = 0xf1000000 + MV643XX_ETH_SHARED_REGS,
+ .end = 0xf1000000 + MV643XX_ETH_SHARED_REGS +
+ MV643XX_ETH_SHARED_REGS_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device mv643xx_eth_shared_device = {
+ .name = MV643XX_ETH_SHARED_NAME,
+ .id = 0,
+ .num_resources = ARRAY_SIZE(mv643xx_eth_shared_resources),
+ .resource = mv643xx_eth_shared_resources,
+};
+
+#ifdef CONFIG_MV643XX_ETH_0
+static struct resource mv643xx_eth0_resources[] = {
+ [0] = {
+ .name = "eth0 irq",
+ .start = 9,
+ .end = 9,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct mv643xx_eth_platform_data eth0_pd;
+
+static struct platform_device eth0_device = {
+ .name = MV643XX_ETH_NAME,
+ .id = 0,
+ .num_resources = ARRAY_SIZE(mv643xx_eth0_resources),
+ .resource = mv643xx_eth0_resources,
+ .dev = {
+ .platform_data = ð0_pd,
+ },
+};
+#endif
+
+#ifdef CONFIG_MV643XX_ETH_1
+static struct resource mv643xx_eth1_resources[] = {
+ [0] = {
+ .name = "eth1 irq",
+ .start = 9,
+ .end = 9,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct mv643xx_eth_platform_data eth1_pd;
+
+static struct platform_device eth1_device = {
+ .name = MV643XX_ETH_NAME,
+ .id = 1,
+ .num_resources = ARRAY_SIZE(mv643xx_eth1_resources),
+ .resource = mv643xx_eth1_resources,
+ .dev = {
+ .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
+mv643xx_eth_add_pds(void)
+{
+ int ret = 0;
+ struct device_node *np;
+ np = find_devices("host");
+ if (np != NULL) {
+ unsigned short *vendorid = (unsigned short *) get_property (np, "vendor-id", NULL);
+ unsigned short *deviceid = (unsigned short *) get_property (np, "device-id", NULL);
+
+ if (vendorid && *vendorid == PCI_VENDOR_ID_MARVELL &&
+ deviceid && *deviceid == PCI_DEVICE_ID_MARVELL_MV64360)
+ ret = platform_add_devices(mv643xx_eth_pd_devs,
+ ARRAY_SIZE(mv643xx_eth_pd_devs));
+ }
+ return ret;
+}
+arch_initcall(mv643xx_eth_add_pds);
[-- Attachment #4: mv643xx-eth.diff.gz --]
[-- Type: application/octet-stream, Size: 39442 bytes --]
next prev parent reply other threads:[~2005-03-08 19:52 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-26 0:14 [PATCH][PPC32] mv64x60 updates Mark A. Greer
2005-02-24 8:25 ` Sven Luther
2005-02-24 15:28 ` Mark A. Greer
2005-02-24 16:04 ` Sven Luther
2005-02-24 17:08 ` Mark A. Greer
2005-02-24 17:05 ` Sven Luther
2005-02-24 17:24 ` Dale Farnsworth
2005-03-05 19:27 ` Sven Luther
2005-03-05 20:32 ` Sven Luther
2005-03-05 22:51 ` Dale Farnsworth
2005-03-06 7:02 ` Sven Luther
2005-03-06 10:29 ` Dale Farnsworth
2005-03-06 19:10 ` Sven Luther
2005-03-06 19:48 ` Nicolas DET
2005-03-07 1:00 ` [PATCH][PPC32] " Dale Farnsworth
2005-03-07 6:52 ` Sven Luther
2005-03-07 10:56 ` Nicolas DET
2005-03-07 10:58 ` Nicolas DET
2005-03-07 12:30 ` James Chapman
2005-03-07 12:46 ` Sven Luther
2005-03-07 12:57 ` Nicolas DET
2005-03-07 13:20 ` Sven Luther
2005-03-07 17:24 ` Mark A. Greer
2005-03-07 13:23 ` Linwoes
2005-03-07 22:54 ` mv643xx_eth SA_SHIRQ support patch Dale Farnsworth
2005-03-08 6:49 ` Sven Luther
2005-03-08 7:27 ` Benjamin Herrenschmidt
2005-03-08 12:20 ` Dale Farnsworth
2005-03-08 12:15 ` Sven Luther
2005-03-08 12:42 ` Sven Luther
[not found] ` <20050308164310.GA9891@pegasos>
2005-03-08 22:31 ` Benjamin Herrenschmidt
2005-03-09 7:17 ` Sven Luther
2005-03-09 7:39 ` Benjamin Herrenschmidt
2005-03-09 7:40 ` Sven Luther
2005-03-08 18:19 ` Mark A. Greer
2005-03-08 18:19 ` Sven Luther
2005-03-08 19:28 ` [PATCH] final mv643xx_eth pegasos patch set Sven Luther
2005-03-08 19:52 ` Sven Luther [this message]
2005-03-08 23:18 ` Nicolas DET
2005-03-09 2:03 ` mv64x60 updates Benjamin Herrenschmidt
2005-03-09 2:01 ` Benjamin Herrenschmidt
2005-03-09 15:59 ` Chris Friesen
2005-03-05 21:58 ` [PATCH][PPC32] " Dale Farnsworth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050308195239.GA14126@pegasos \
--to=sven.luther@wanadoo.fr \
--cc=benh@kernel.crashing.org \
--cc=dale@farnsworth.org \
--cc=det.nicolas@free.fr \
--cc=linuxppc-dev@ozlabs.org \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).