linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* More updates to bcm63xx
@ 2009-06-02 23:47 Maxime Bizon
  2009-06-03  6:06 ` Ralf Baechle
  0 siblings, 1 reply; 14+ messages in thread
From: Maxime Bizon @ 2009-06-02 23:47 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli


Hi Ralf,

Could you please fold the following patches in the bcm63xx tree ?

Thanks,

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: More updates to bcm63xx
  2009-06-02 23:47 Maxime Bizon
@ 2009-06-03  6:06 ` Ralf Baechle
  0 siblings, 0 replies; 14+ messages in thread
From: Ralf Baechle @ 2009-06-03  6:06 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Florian Fainelli

On Wed, Jun 03, 2009 at 01:47:34AM +0200, Maxime Bizon wrote:

> Could you please fold the following patches in the bcm63xx tree ?

Thanks, all three folded into the bcm63xx tree.

  Ralf

^ permalink raw reply	[flat|nested] 14+ messages in thread

* More updates to bcm63xx
@ 2009-06-03 14:02 Maxime Bizon
  2009-06-03 14:02 ` [PATCH 1/8] bcm63xx: register gpiochip in prom Maxime Bizon
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli


Hi Ralf,

Yet another list of cleanup and fixes for the bcm63xx tree, please
fold them into the existing patches.

Thanks !

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/8] bcm63xx: register gpiochip in prom
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
@ 2009-06-03 14:02 ` Maxime Bizon
  2009-06-03 14:02 ` [PATCH 2/8] bcm63xx: register correct number of gpio for 6358 Maxime Bizon
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

This patch moves the gpiochip registration fro arch_initcall to
prom. This allows GPIO-based runtime board detection to be performed
earlier.

Original patch by Florian, changed to register gpio before calling
board_prom_init callback since we may want to use gpio inside it.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 arch/mips/bcm63xx/gpio.c                          |    3 +--
 arch/mips/bcm63xx/prom.c                          |    4 ++++
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h |    4 ++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c
index b78d3fd..997fcaa 100644
--- a/arch/mips/bcm63xx/gpio.c
+++ b/arch/mips/bcm63xx/gpio.c
@@ -120,9 +120,8 @@ static struct gpio_chip bcm63xx_gpio_chip = {
 	.ngpio			= BCM63XX_GPIO_COUNT,
 };
 
-static int __init bcm63xx_gpio_init(void)
+int __init bcm63xx_gpio_init(void)
 {
 	printk(KERN_INFO "registering %d GPIOs\n", BCM63XX_GPIO_COUNT);
 	return gpiochip_add(&bcm63xx_gpio_chip);
 }
-arch_initcall(bcm63xx_gpio_init);
diff --git a/arch/mips/bcm63xx/prom.c b/arch/mips/bcm63xx/prom.c
index d97ceed..386cb9a 100644
--- a/arch/mips/bcm63xx/prom.c
+++ b/arch/mips/bcm63xx/prom.c
@@ -13,6 +13,7 @@
 #include <bcm63xx_cpu.h>
 #include <bcm63xx_io.h>
 #include <bcm63xx_regs.h>
+#include <bcm63xx_gpio.h>
 
 void __init prom_init(void)
 {
@@ -38,6 +39,9 @@ void __init prom_init(void)
 	/* assign command line from kernel config */
 	strcpy(arcs_cmdline, CONFIG_CMDLINE);
 
+	/* register gpiochip */
+	bcm63xx_gpio_init();
+
 	/* do low level board init */
 	board_prom_init();
 }
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
index 72cee75..7f5d8e8 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
@@ -1,6 +1,10 @@
 #ifndef BCM63XX_GPIO_H
 #define BCM63XX_GPIO_H
 
+#include <linux/init.h>
+
+int __init bcm63xx_gpio_init(void);
+
 /* all helpers will BUG() if gpio count is >= 37. */
 #define BCM63XX_GPIO_COUNT	37
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/8] bcm63xx: register correct number of gpio for 6358.
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
  2009-06-03 14:02 ` [PATCH 1/8] bcm63xx: register gpiochip in prom Maxime Bizon
@ 2009-06-03 14:02 ` Maxime Bizon
  2009-06-03 14:02 ` [PATCH 3/8] bcm63xx: fix gpio set Maxime Bizon
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

6358 has 40 gpio whereas 6348 has 37, so set the maximum number of
gpio at runtime.

Also remove NR_BUILTIN_GPIO which does not seem to be used anymore.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 arch/mips/bcm63xx/gpio.c                          |    4 ++--
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h |   12 ++++++++++--
 arch/mips/include/asm/mach-bcm63xx/gpio.h         |    2 --
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c
index 997fcaa..97e3730 100644
--- a/arch/mips/bcm63xx/gpio.c
+++ b/arch/mips/bcm63xx/gpio.c
@@ -117,11 +117,11 @@ static struct gpio_chip bcm63xx_gpio_chip = {
 	.get			= bcm63xx_gpio_get,
 	.set			= bcm63xx_gpio_set,
 	.base			= 0,
-	.ngpio			= BCM63XX_GPIO_COUNT,
 };
 
 int __init bcm63xx_gpio_init(void)
 {
-	printk(KERN_INFO "registering %d GPIOs\n", BCM63XX_GPIO_COUNT);
+	bcm63xx_gpio_chip.ngpio = bcm63xx_gpio_count();
+	printk(KERN_INFO "registering %d GPIOs\n", bcm63xx_gpio_chip.ngpio);
 	return gpiochip_add(&bcm63xx_gpio_chip);
 }
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
index 7f5d8e8..76a0b72 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
@@ -5,8 +5,16 @@
 
 int __init bcm63xx_gpio_init(void);
 
-/* all helpers will BUG() if gpio count is >= 37. */
-#define BCM63XX_GPIO_COUNT	37
+static inline unsigned long bcm63xx_gpio_count(void)
+{
+	switch (bcm63xx_get_cpu_id()) {
+	case BCM6358_CPU_ID:
+		return 40;
+	case BCM6348_CPU_ID:
+	default:
+		return 37;
+	}
+}
 
 #define GPIO_DIR_OUT	0x0
 #define GPIO_DIR_IN	0x1
diff --git a/arch/mips/include/asm/mach-bcm63xx/gpio.h b/arch/mips/include/asm/mach-bcm63xx/gpio.h
index 033c997..7cda8c0 100644
--- a/arch/mips/include/asm/mach-bcm63xx/gpio.h
+++ b/arch/mips/include/asm/mach-bcm63xx/gpio.h
@@ -3,8 +3,6 @@
 
 #include <bcm63xx_gpio.h>
 
-#define NR_BUILTIN_GPIO		BCM63XX_GPIO_COUNT
-
 #define gpio_to_irq(gpio)	NULL
 
 #define gpio_get_value __gpio_get_value
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/8] bcm63xx: fix gpio set.
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
  2009-06-03 14:02 ` [PATCH 1/8] bcm63xx: register gpiochip in prom Maxime Bizon
  2009-06-03 14:02 ` [PATCH 2/8] bcm63xx: register correct number of gpio for 6358 Maxime Bizon
@ 2009-06-03 14:02 ` Maxime Bizon
  2009-06-03 14:02 ` [PATCH 4/8] bcm63xx: restore spinlock in gpio Maxime Bizon
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

Previously set gpio value can not be read back from register, we're
reading pin value instead. Keep cached value and always use it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 arch/mips/bcm63xx/gpio.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c
index 97e3730..77636aa 100644
--- a/arch/mips/bcm63xx/gpio.c
+++ b/arch/mips/bcm63xx/gpio.c
@@ -18,12 +18,14 @@
 #include <bcm63xx_io.h>
 #include <bcm63xx_regs.h>
 
+static u32 gpio_out_low, gpio_out_high;
+
 static void bcm63xx_gpio_set(struct gpio_chip *chip,
 				unsigned gpio, int val)
 {
 	u32 reg;
 	u32 mask;
-	u32 tmp;
+	u32 *v;
 	unsigned long flags;
 
 	if (gpio >= chip->ngpio)
@@ -32,18 +34,19 @@ static void bcm63xx_gpio_set(struct gpio_chip *chip,
 	if (gpio < 32) {
 		reg = GPIO_DATA_LO_REG;
 		mask = 1 << gpio;
+		v = &gpio_out_low;
 	} else {
 		reg = GPIO_DATA_HI_REG;
 		mask = 1 << (gpio - 32);
+		v = &gpio_out_high;
 	}
 
 	local_irq_save(flags);
-	tmp = bcm_gpio_readl(reg);
 	if (val)
-		tmp |= mask;
+		*v |= mask;
 	else
-		tmp &= ~mask;
-	bcm_gpio_writel(tmp, reg);
+		*v &= ~mask;
+	bcm_gpio_writel(*v, reg);
 	local_irq_restore(flags);
 }
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/8] bcm63xx: restore spinlock in gpio.
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
                   ` (2 preceding siblings ...)
  2009-06-03 14:02 ` [PATCH 3/8] bcm63xx: fix gpio set Maxime Bizon
@ 2009-06-03 14:02 ` Maxime Bizon
  2009-06-03 14:02 ` [PATCH 5/8] bcm63xx: request gpio before using it in bcm63xx_pcmcia Maxime Bizon
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

gpiolib does not do any locking around chip callbacks, local_irq_save
is enough for now but try to stay future-proof.

Fix indentation too.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 arch/mips/bcm63xx/gpio.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c
index 77636aa..53e4664 100644
--- a/arch/mips/bcm63xx/gpio.c
+++ b/arch/mips/bcm63xx/gpio.c
@@ -18,10 +18,11 @@
 #include <bcm63xx_io.h>
 #include <bcm63xx_regs.h>
 
+static DEFINE_SPINLOCK(bcm63xx_gpio_lock);
 static u32 gpio_out_low, gpio_out_high;
 
 static void bcm63xx_gpio_set(struct gpio_chip *chip,
-				unsigned gpio, int val)
+			     unsigned gpio, int val)
 {
 	u32 reg;
 	u32 mask;
@@ -41,13 +42,13 @@ static void bcm63xx_gpio_set(struct gpio_chip *chip,
 		v = &gpio_out_high;
 	}
 
-	local_irq_save(flags);
+	spin_lock_irqsave(&bcm63xx_gpio_lock, flags);
 	if (val)
 		*v |= mask;
 	else
 		*v &= ~mask;
 	bcm_gpio_writel(*v, reg);
-	local_irq_restore(flags);
+	spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags);
 }
 
 static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio)
@@ -70,7 +71,7 @@ static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio)
 }
 
 static int bcm63xx_gpio_set_direction(struct gpio_chip *chip,
-					unsigned gpio, int dir)
+				      unsigned gpio, int dir)
 {
 	u32 reg;
 	u32 mask;
@@ -88,14 +89,14 @@ static int bcm63xx_gpio_set_direction(struct gpio_chip *chip,
 		mask = 1 << (gpio - 32);
 	}
 
-	local_irq_save(flags);
+	spin_lock_irqsave(&bcm63xx_gpio_lock, flags);
 	tmp = bcm_gpio_readl(reg);
 	if (dir == GPIO_DIR_IN)
 		tmp &= ~mask;
 	else
 		tmp |= mask;
 	bcm_gpio_writel(tmp, reg);
-	local_irq_restore(flags);
+	spin_unlock_irqrestore(&bcm63xx_gpio_lock, flags);
 
 	return 0;
 }
@@ -106,7 +107,7 @@ static int bcm63xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
 }
 
 static int bcm63xx_gpio_direction_output(struct gpio_chip *chip,
-					unsigned gpio, int value)
+					 unsigned gpio, int value)
 {
 	bcm63xx_gpio_set(chip, gpio, value);
 	return bcm63xx_gpio_set_direction(chip, gpio, GPIO_DIR_OUT);
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/8] bcm63xx: request gpio before using it in bcm63xx_pcmcia.
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
                   ` (3 preceding siblings ...)
  2009-06-03 14:02 ` [PATCH 4/8] bcm63xx: restore spinlock in gpio Maxime Bizon
@ 2009-06-03 14:02 ` Maxime Bizon
  2009-06-03 14:02 ` [PATCH 6/8] bcm63xx: add missing null entry in bcm63xx_pcmcia pci device table Maxime Bizon
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

Make sure the gpio is requested and its direction set to input before
using it.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/pcmcia/bcm63xx_pcmcia.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c
index 3a0b7fc..6c7f20c 100644
--- a/drivers/pcmcia/bcm63xx_pcmcia.c
+++ b/drivers/pcmcia/bcm63xx_pcmcia.c
@@ -409,9 +409,18 @@ static int bcm63xx_drv_pcmcia_probe(struct platform_device *pdev)
 	val |= 3 << PCMCIA_C2_HOLD_SHIFT;
 	pcmcia_writel(skt, val, PCMCIA_C2_REG);
 
+	/* request and setup ready gpio */
+	ret = gpio_request(skt->pd->ready_gpio, "bcm63xx_pcmcia");
+	if (ret < 0)
+		goto err;
+
+	ret = gpio_direction_input(skt->pd->ready_gpio);
+	if (ret < 0)
+		goto err_gpio;
+
 	ret = pcmcia_register_socket(sock);
 	if (ret)
-		goto err;
+		goto err_gpio;
 
 	/* start polling socket */
 	mod_timer(&skt->timer,
@@ -420,6 +429,9 @@ static int bcm63xx_drv_pcmcia_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, skt);
 	return 0;
 
+err_gpio:
+	gpio_free(skt->pd->ready_gpio);
+
 err:
 	if (skt->io_base)
 		iounmap(skt->io_base);
@@ -442,6 +454,7 @@ static int bcm63xx_drv_pcmcia_remove(struct platform_device *pdev)
 	iounmap(skt->io_base);
 	res = skt->reg_res;
 	release_mem_region(res->start, res->end - res->start + 1);
+	gpio_free(skt->pd->ready_gpio);
 	kfree(skt);
 	return 0;
 }
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/8] bcm63xx: add missing null entry in bcm63xx_pcmcia pci device table.
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
                   ` (4 preceding siblings ...)
  2009-06-03 14:02 ` [PATCH 5/8] bcm63xx: request gpio before using it in bcm63xx_pcmcia Maxime Bizon
@ 2009-06-03 14:02 ` Maxime Bizon
  2009-06-03 14:02 ` [PATCH 7/8] bcm63xx: fix bcm63xx_pcmcia device removal Maxime Bizon
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

The PCI device table in bcm63xx_pcmcia lacks the final null
entry. Spotted by build system when building it as module.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/pcmcia/bcm63xx_pcmcia.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c
index 6c7f20c..48928b8 100644
--- a/drivers/pcmcia/bcm63xx_pcmcia.c
+++ b/drivers/pcmcia/bcm63xx_pcmcia.c
@@ -492,6 +492,8 @@ static struct pci_device_id bcm63xx_cb_table[] = {
 		.class		= PCI_CLASS_BRIDGE_CARDBUS << 8,
 		.class_mask	= ~0,
 	},
+
+	{ },
 };
 
 MODULE_DEVICE_TABLE(pci, bcm63xx_cb_table);
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 7/8] bcm63xx: fix bcm63xx_pcmcia device removal.
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
                   ` (5 preceding siblings ...)
  2009-06-03 14:02 ` [PATCH 6/8] bcm63xx: add missing null entry in bcm63xx_pcmcia pci device table Maxime Bizon
@ 2009-06-03 14:02 ` Maxime Bizon
  2009-06-03 14:02 ` [PATCH 8/8] bcm63xx: fix oops when removing bcm63xx_enet module Maxime Bizon
  2009-08-18 12:24 ` More updates to bcm63xx Ralf Baechle
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

Add missing platform_set_drvdata(pdev, NULL) before releasing private
data.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/pcmcia/bcm63xx_pcmcia.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c
index 48928b8..2981aff 100644
--- a/drivers/pcmcia/bcm63xx_pcmcia.c
+++ b/drivers/pcmcia/bcm63xx_pcmcia.c
@@ -455,6 +455,7 @@ static int bcm63xx_drv_pcmcia_remove(struct platform_device *pdev)
 	res = skt->reg_res;
 	release_mem_region(res->start, res->end - res->start + 1);
 	gpio_free(skt->pd->ready_gpio);
+	platform_set_drvdata(pdev, NULL);
 	kfree(skt);
 	return 0;
 }
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 8/8] bcm63xx: fix oops when removing bcm63xx_enet module.
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
                   ` (6 preceding siblings ...)
  2009-06-03 14:02 ` [PATCH 7/8] bcm63xx: fix bcm63xx_pcmcia device removal Maxime Bizon
@ 2009-06-03 14:02 ` Maxime Bizon
  2009-08-18 12:24 ` More updates to bcm63xx Ralf Baechle
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Bizon @ 2009-06-03 14:02 UTC (permalink / raw)
  To: linux-mips, Ralf Baechle; +Cc: Florian Fainelli, Maxime Bizon

SET_NETDEV_DEV has to be called before registering netdevice, not
after, otherwise we get unbalanced kobject get/put when unregistering.

This patch also adds missing platform_set_drvdata(pdev, NULL) before
freiing netdevice.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
 drivers/net/bcm63xx_enet.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
index 660ffa2..09d2709 100644
--- a/drivers/net/bcm63xx_enet.c
+++ b/drivers/net/bcm63xx_enet.c
@@ -1788,6 +1788,7 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
 	netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
 
 	SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops);
+	SET_NETDEV_DEV(dev, &pdev->dev);
 
 	ret = register_netdev(dev);
 	if (ret)
@@ -1797,7 +1798,6 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, dev);
 	priv->pdev = pdev;
 	priv->net_dev = dev;
-	SET_NETDEV_DEV(dev, &pdev->dev);
 
 	return 0;
 
@@ -1877,6 +1877,7 @@ static int __devexit bcm_enet_remove(struct platform_device *pdev)
 	clk_disable(priv->mac_clk);
 	clk_put(priv->mac_clk);
 
+	platform_set_drvdata(pdev, NULL);
 	free_netdev(dev);
 	return 0;
 }
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: More updates to bcm63xx
  2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
                   ` (7 preceding siblings ...)
  2009-06-03 14:02 ` [PATCH 8/8] bcm63xx: fix oops when removing bcm63xx_enet module Maxime Bizon
@ 2009-08-18 12:24 ` Ralf Baechle
  2009-08-18 14:31   ` Maxime Bizon
  8 siblings, 1 reply; 14+ messages in thread
From: Ralf Baechle @ 2009-08-18 12:24 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Florian Fainelli

On Wed, Jun 03, 2009 at 04:02:19PM +0200, Maxime Bizon wrote:

> Yet another list of cleanup and fixes for the bcm63xx tree, please
> fold them into the existing patches.

I folded all 8 patches into the existing patches for the linux-bcm63xx tree.

Thanks!

  Ralf

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: More updates to bcm63xx
  2009-08-18 12:24 ` More updates to bcm63xx Ralf Baechle
@ 2009-08-18 14:31   ` Maxime Bizon
  2009-08-18 14:37     ` Ralf Baechle
  0 siblings, 1 reply; 14+ messages in thread
From: Maxime Bizon @ 2009-08-18 14:31 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, Florian Fainelli


On Tue, 2009-08-18 at 13:24 +0100, Ralf Baechle wrote:

Hi Ralf,

> I folded all 8 patches into the existing patches for the linux-bcm63xx
> tree

The bcm63xx tree seems wrong.

The patch from Florian that adds support for 6338 & 6345 is merged with
commit BCM63XX: Add integrated ethernet mac support.

The final patch that adds the board code is gone.

-- 
Maxime

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: More updates to bcm63xx
  2009-08-18 14:31   ` Maxime Bizon
@ 2009-08-18 14:37     ` Ralf Baechle
  0 siblings, 0 replies; 14+ messages in thread
From: Ralf Baechle @ 2009-08-18 14:37 UTC (permalink / raw)
  To: Maxime Bizon; +Cc: linux-mips, Florian Fainelli

On Tue, Aug 18, 2009 at 04:31:27PM +0200, Maxime Bizon wrote:

> > I folded all 8 patches into the existing patches for the linux-bcm63xx
> > tree
> 
> The bcm63xx tree seems wrong.
> 
> The patch from Florian that adds support for 6338 & 6345 is merged with
> commit BCM63XX: Add integrated ethernet mac support.
> 
> The final patch that adds the board code is gone.

I'm just folding some of the patches together.  I'm aware something went
wrong with the ethernet support and I'm sorting that out now.

  Ralf

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-08-18 14:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-03 14:02 More updates to bcm63xx Maxime Bizon
2009-06-03 14:02 ` [PATCH 1/8] bcm63xx: register gpiochip in prom Maxime Bizon
2009-06-03 14:02 ` [PATCH 2/8] bcm63xx: register correct number of gpio for 6358 Maxime Bizon
2009-06-03 14:02 ` [PATCH 3/8] bcm63xx: fix gpio set Maxime Bizon
2009-06-03 14:02 ` [PATCH 4/8] bcm63xx: restore spinlock in gpio Maxime Bizon
2009-06-03 14:02 ` [PATCH 5/8] bcm63xx: request gpio before using it in bcm63xx_pcmcia Maxime Bizon
2009-06-03 14:02 ` [PATCH 6/8] bcm63xx: add missing null entry in bcm63xx_pcmcia pci device table Maxime Bizon
2009-06-03 14:02 ` [PATCH 7/8] bcm63xx: fix bcm63xx_pcmcia device removal Maxime Bizon
2009-06-03 14:02 ` [PATCH 8/8] bcm63xx: fix oops when removing bcm63xx_enet module Maxime Bizon
2009-08-18 12:24 ` More updates to bcm63xx Ralf Baechle
2009-08-18 14:31   ` Maxime Bizon
2009-08-18 14:37     ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2009-06-02 23:47 Maxime Bizon
2009-06-03  6:06 ` Ralf Baechle

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).