All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] ARM: LPC32xx: Ethernet support
@ 2012-02-27 17:46 ` Roland Stigge
  0 siblings, 0 replies; 12+ messages in thread
From: Roland Stigge @ 2012-02-27 17:46 UTC (permalink / raw)
  To: linux-arm-kernel, kevin.wells, w.sang, linux-kernel, arnd; +Cc: Roland Stigge

This patch adds ethernet support to the LPC32xx ARM architecture. The actual
driver in drivers/net is contained in a separate patch.

Signed-off-by: Roland Stigge <stigge@antcom.de>

---
 arch/arm/mach-lpc32xx/Kconfig              |   26 ++++++++++++++++++++++
 arch/arm/mach-lpc32xx/clock.c              |    2 -
 arch/arm/mach-lpc32xx/common.c             |   34 +++++++++++++++++++++++++++++
 arch/arm/mach-lpc32xx/common.h             |    4 +--
 arch/arm/mach-lpc32xx/include/mach/board.h |   32 +++++++++++++++++++++++++++
 arch/arm/mach-lpc32xx/irq.c                |    4 +++
 arch/arm/mach-lpc32xx/phy3250.c            |    2 +
 7 files changed, 101 insertions(+), 3 deletions(-)

--- linux-2.6.orig/arch/arm/mach-lpc32xx/Kconfig
+++ linux-2.6/arch/arm/mach-lpc32xx/Kconfig
@@ -29,5 +29,31 @@ config ARCH_LPC32XX_UART6_SELECT
 
 endmenu
 
+menu "LPC32XX chip components"
+
+config ARCH_LPC32XX_IRAM_FOR_NET
+	bool "Use IRAM for network buffers"
+	default n
+	help
+	  Say Y here to use the LPC internal fast IRAM (i.e. 256KB SRAM) as
+	  network buffer.  If the total combined required buffer sizes is
+	  larger than the size of IRAM, then SDRAM will be used instead.
+
+	  This can be enabled safely if the IRAM is not intended for other
+	  uses.
+
+config ARCH_LPC32XX_MII_SUPPORT
+	bool "Check to enable MII support or leave disabled for RMII support"
+	default n
+	help
+	  Say Y here to enable MII support, or N for RMII support. Regardless of
+	  which support is selected, the ethernet interface driver needs to be
+	  selected in the device driver networking section.
+
+	  The PHY3250 reference board uses RMII, so users of this board should
+	  say N.
+
+endmenu
+
 endif
 
--- linux-2.6.orig/arch/arm/mach-lpc32xx/clock.c
+++ linux-2.6/arch/arm/mach-lpc32xx/clock.c
@@ -1134,7 +1134,7 @@ static struct clk_lookup lookups[] = {
 	_REGISTER_CLOCK(NULL, "i2s1_ck", clk_i2s1)
 	_REGISTER_CLOCK("ts-lpc32xx", NULL, clk_tsc)
 	_REGISTER_CLOCK("dev:mmc0", NULL, clk_mmc)
-	_REGISTER_CLOCK("lpc-net.0", NULL, clk_net)
+	_REGISTER_CLOCK("lpc-eth.0", NULL, clk_net)
 	_REGISTER_CLOCK("dev:clcd", NULL, clk_lcd)
 	_REGISTER_CLOCK("lpc32xx_udc", "ck_usbd", clk_usbd)
 	_REGISTER_CLOCK("lpc32xx_rtc", NULL, clk_rtc)
--- linux-2.6.orig/arch/arm/mach-lpc32xx/common.c
+++ linux-2.6/arch/arm/mach-lpc32xx/common.c
@@ -186,6 +186,40 @@ struct platform_device lpc32xx_ohci_devi
 };
 
 /*
+ * Network Support
+ */
+static struct lpc_net_cfg lpc32xx_netdata = {
+	.phy_irq = -1,
+	.phy_mask = 0xFFFFFFF0,
+};
+
+static struct resource net_resources[] = {
+	[0] = {
+		.start = LPC32XX_ETHERNET_BASE,
+		.end = LPC32XX_ETHERNET_BASE + SZ_4K - 1,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_LPC32XX_ETHERNET,
+		.end = IRQ_LPC32XX_ETHERNET,
+		.flags = IORESOURCE_IRQ,
+	},
+};
+
+static u64 lpc32xx_mac_dma_mask = 0xffffffffUL;
+struct platform_device lpc32xx_net_device = {
+	.name = "lpc-eth",
+	.id = 0,
+	.dev = {
+		.dma_mask = &lpc32xx_mac_dma_mask,
+		.coherent_dma_mask = 0xffffffffUL,
+		.platform_data = &lpc32xx_netdata,
+	},
+	.num_resources = ARRAY_SIZE(net_resources),
+	.resource = net_resources,
+};
+
+/*
  * Returns the unique ID for the device
  */
 void lpc32xx_get_uid(u32 devid[4])
--- linux-2.6.orig/arch/arm/mach-lpc32xx/common.h
+++ linux-2.6/arch/arm/mach-lpc32xx/common.h
@@ -19,6 +19,7 @@
 #ifndef __LPC32XX_COMMON_H
 #define __LPC32XX_COMMON_H
 
+#include <mach/board.h>
 #include <linux/platform_device.h>
 
 /*
@@ -32,6 +33,7 @@ extern struct platform_device lpc32xx_ts
 extern struct platform_device lpc32xx_adc_device;
 extern struct platform_device lpc32xx_rtc_device;
 extern struct platform_device lpc32xx_ohci_device;
+extern struct platform_device lpc32xx_net_device;
 
 /*
  * Other arch specific structures and functions
@@ -67,8 +69,6 @@ extern u32 clk_get_pclk_div(void);
  */
 extern void lpc32xx_get_uid(u32 devid[4]);
 
-extern u32 lpc32xx_return_iram_size(void);
-
 /*
  * Pointers used for sizing and copying suspend function data
  */
--- /dev/null
+++ linux-2.6/arch/arm/mach-lpc32xx/include/mach/board.h
@@ -0,0 +1,32 @@
+/*
+ * arm/arch/mach-lpc32xx/include/mach/board.h
+ *
+ * Author: Kevin Wells <kevin.wells@nxp.com>
+ *
+ * Copyright (C) 2010 NXP Semiconductors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_BOARD_H
+#define __ASM_ARCH_BOARD_H
+
+/*
+ * Network configuration structure
+ */
+struct lpc_net_cfg {
+	int	phy_irq;        /* PHY IRQ number, or -1 for polling */
+	u32	phy_mask;       /* PHY mask value */
+};
+
+extern u32 lpc32xx_return_iram_size(void);
+
+#endif  /* __ASM_ARCH_BOARD_H */
--- linux-2.6.orig/arch/arm/mach-lpc32xx/irq.c
+++ linux-2.6/arch/arm/mach-lpc32xx/irq.c
@@ -150,6 +150,10 @@ static const struct lpc32xx_event_info l
 		.event_group = &lpc32xx_event_int_regs,
 		.mask = LPC32XX_CLKPWR_INTSRC_KEY_BIT,
 	},
+	[IRQ_LPC32XX_ETHERNET] = {
+		.event_group = &lpc32xx_event_int_regs,
+		.mask = LPC32XX_CLKPWR_INTSRC_MAC_BIT,
+	},
 	[IRQ_LPC32XX_USB_OTG_ATX] = {
 		.event_group = &lpc32xx_event_int_regs,
 		.mask = LPC32XX_CLKPWR_INTSRC_USBATXINT_BIT,
--- linux-2.6.orig/arch/arm/mach-lpc32xx/phy3250.c
+++ linux-2.6/arch/arm/mach-lpc32xx/phy3250.c
@@ -37,6 +37,7 @@
 
 #include <mach/hardware.h>
 #include <mach/platform.h>
+#include <mach/board.h>
 #include <mach/gpio-lpc32xx.h>
 #include "common.h"
 
@@ -278,6 +279,7 @@ static struct platform_device *phy3250_d
 	&lpc32xx_gpio_led_device,
 	&lpc32xx_adc_device,
 	&lpc32xx_ohci_device,
+	&lpc32xx_net_device,
 };
 
 static struct amba_device *amba_devs[] __initdata = {

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

* [PATCH v3] ARM: LPC32xx: Ethernet support
@ 2012-02-27 17:46 ` Roland Stigge
  0 siblings, 0 replies; 12+ messages in thread
From: Roland Stigge @ 2012-02-27 17:46 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds ethernet support to the LPC32xx ARM architecture. The actual
driver in drivers/net is contained in a separate patch.

Signed-off-by: Roland Stigge <stigge@antcom.de>

---
 arch/arm/mach-lpc32xx/Kconfig              |   26 ++++++++++++++++++++++
 arch/arm/mach-lpc32xx/clock.c              |    2 -
 arch/arm/mach-lpc32xx/common.c             |   34 +++++++++++++++++++++++++++++
 arch/arm/mach-lpc32xx/common.h             |    4 +--
 arch/arm/mach-lpc32xx/include/mach/board.h |   32 +++++++++++++++++++++++++++
 arch/arm/mach-lpc32xx/irq.c                |    4 +++
 arch/arm/mach-lpc32xx/phy3250.c            |    2 +
 7 files changed, 101 insertions(+), 3 deletions(-)

--- linux-2.6.orig/arch/arm/mach-lpc32xx/Kconfig
+++ linux-2.6/arch/arm/mach-lpc32xx/Kconfig
@@ -29,5 +29,31 @@ config ARCH_LPC32XX_UART6_SELECT
 
 endmenu
 
+menu "LPC32XX chip components"
+
+config ARCH_LPC32XX_IRAM_FOR_NET
+	bool "Use IRAM for network buffers"
+	default n
+	help
+	  Say Y here to use the LPC internal fast IRAM (i.e. 256KB SRAM) as
+	  network buffer.  If the total combined required buffer sizes is
+	  larger than the size of IRAM, then SDRAM will be used instead.
+
+	  This can be enabled safely if the IRAM is not intended for other
+	  uses.
+
+config ARCH_LPC32XX_MII_SUPPORT
+	bool "Check to enable MII support or leave disabled for RMII support"
+	default n
+	help
+	  Say Y here to enable MII support, or N for RMII support. Regardless of
+	  which support is selected, the ethernet interface driver needs to be
+	  selected in the device driver networking section.
+
+	  The PHY3250 reference board uses RMII, so users of this board should
+	  say N.
+
+endmenu
+
 endif
 
--- linux-2.6.orig/arch/arm/mach-lpc32xx/clock.c
+++ linux-2.6/arch/arm/mach-lpc32xx/clock.c
@@ -1134,7 +1134,7 @@ static struct clk_lookup lookups[] = {
 	_REGISTER_CLOCK(NULL, "i2s1_ck", clk_i2s1)
 	_REGISTER_CLOCK("ts-lpc32xx", NULL, clk_tsc)
 	_REGISTER_CLOCK("dev:mmc0", NULL, clk_mmc)
-	_REGISTER_CLOCK("lpc-net.0", NULL, clk_net)
+	_REGISTER_CLOCK("lpc-eth.0", NULL, clk_net)
 	_REGISTER_CLOCK("dev:clcd", NULL, clk_lcd)
 	_REGISTER_CLOCK("lpc32xx_udc", "ck_usbd", clk_usbd)
 	_REGISTER_CLOCK("lpc32xx_rtc", NULL, clk_rtc)
--- linux-2.6.orig/arch/arm/mach-lpc32xx/common.c
+++ linux-2.6/arch/arm/mach-lpc32xx/common.c
@@ -186,6 +186,40 @@ struct platform_device lpc32xx_ohci_devi
 };
 
 /*
+ * Network Support
+ */
+static struct lpc_net_cfg lpc32xx_netdata = {
+	.phy_irq = -1,
+	.phy_mask = 0xFFFFFFF0,
+};
+
+static struct resource net_resources[] = {
+	[0] = {
+		.start = LPC32XX_ETHERNET_BASE,
+		.end = LPC32XX_ETHERNET_BASE + SZ_4K - 1,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_LPC32XX_ETHERNET,
+		.end = IRQ_LPC32XX_ETHERNET,
+		.flags = IORESOURCE_IRQ,
+	},
+};
+
+static u64 lpc32xx_mac_dma_mask = 0xffffffffUL;
+struct platform_device lpc32xx_net_device = {
+	.name = "lpc-eth",
+	.id = 0,
+	.dev = {
+		.dma_mask = &lpc32xx_mac_dma_mask,
+		.coherent_dma_mask = 0xffffffffUL,
+		.platform_data = &lpc32xx_netdata,
+	},
+	.num_resources = ARRAY_SIZE(net_resources),
+	.resource = net_resources,
+};
+
+/*
  * Returns the unique ID for the device
  */
 void lpc32xx_get_uid(u32 devid[4])
--- linux-2.6.orig/arch/arm/mach-lpc32xx/common.h
+++ linux-2.6/arch/arm/mach-lpc32xx/common.h
@@ -19,6 +19,7 @@
 #ifndef __LPC32XX_COMMON_H
 #define __LPC32XX_COMMON_H
 
+#include <mach/board.h>
 #include <linux/platform_device.h>
 
 /*
@@ -32,6 +33,7 @@ extern struct platform_device lpc32xx_ts
 extern struct platform_device lpc32xx_adc_device;
 extern struct platform_device lpc32xx_rtc_device;
 extern struct platform_device lpc32xx_ohci_device;
+extern struct platform_device lpc32xx_net_device;
 
 /*
  * Other arch specific structures and functions
@@ -67,8 +69,6 @@ extern u32 clk_get_pclk_div(void);
  */
 extern void lpc32xx_get_uid(u32 devid[4]);
 
-extern u32 lpc32xx_return_iram_size(void);
-
 /*
  * Pointers used for sizing and copying suspend function data
  */
--- /dev/null
+++ linux-2.6/arch/arm/mach-lpc32xx/include/mach/board.h
@@ -0,0 +1,32 @@
+/*
+ * arm/arch/mach-lpc32xx/include/mach/board.h
+ *
+ * Author: Kevin Wells <kevin.wells@nxp.com>
+ *
+ * Copyright (C) 2010 NXP Semiconductors
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_BOARD_H
+#define __ASM_ARCH_BOARD_H
+
+/*
+ * Network configuration structure
+ */
+struct lpc_net_cfg {
+	int	phy_irq;        /* PHY IRQ number, or -1 for polling */
+	u32	phy_mask;       /* PHY mask value */
+};
+
+extern u32 lpc32xx_return_iram_size(void);
+
+#endif  /* __ASM_ARCH_BOARD_H */
--- linux-2.6.orig/arch/arm/mach-lpc32xx/irq.c
+++ linux-2.6/arch/arm/mach-lpc32xx/irq.c
@@ -150,6 +150,10 @@ static const struct lpc32xx_event_info l
 		.event_group = &lpc32xx_event_int_regs,
 		.mask = LPC32XX_CLKPWR_INTSRC_KEY_BIT,
 	},
+	[IRQ_LPC32XX_ETHERNET] = {
+		.event_group = &lpc32xx_event_int_regs,
+		.mask = LPC32XX_CLKPWR_INTSRC_MAC_BIT,
+	},
 	[IRQ_LPC32XX_USB_OTG_ATX] = {
 		.event_group = &lpc32xx_event_int_regs,
 		.mask = LPC32XX_CLKPWR_INTSRC_USBATXINT_BIT,
--- linux-2.6.orig/arch/arm/mach-lpc32xx/phy3250.c
+++ linux-2.6/arch/arm/mach-lpc32xx/phy3250.c
@@ -37,6 +37,7 @@
 
 #include <mach/hardware.h>
 #include <mach/platform.h>
+#include <mach/board.h>
 #include <mach/gpio-lpc32xx.h>
 #include "common.h"
 
@@ -278,6 +279,7 @@ static struct platform_device *phy3250_d
 	&lpc32xx_gpio_led_device,
 	&lpc32xx_adc_device,
 	&lpc32xx_ohci_device,
+	&lpc32xx_net_device,
 };
 
 static struct amba_device *amba_devs[] __initdata = {

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

* Re: [PATCH v3] ARM: LPC32xx: Ethernet support
  2012-02-27 17:46 ` Roland Stigge
@ 2012-02-27 18:08   ` Wolfram Sang
  -1 siblings, 0 replies; 12+ messages in thread
From: Wolfram Sang @ 2012-02-27 18:08 UTC (permalink / raw)
  To: Roland Stigge; +Cc: linux-arm-kernel, kevin.wells, linux-kernel, arnd

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

On Mon, Feb 27, 2012 at 06:46:02PM +0100, Roland Stigge wrote:
> This patch adds ethernet support to the LPC32xx ARM architecture. The actual
> driver in drivers/net is contained in a separate patch.
> 
> Signed-off-by: Roland Stigge <stigge@antcom.de>
> 
> ---

Please add below this dashed line what changed since the last version. This
makes reviewing easier.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* [PATCH v3] ARM: LPC32xx: Ethernet support
@ 2012-02-27 18:08   ` Wolfram Sang
  0 siblings, 0 replies; 12+ messages in thread
From: Wolfram Sang @ 2012-02-27 18:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 27, 2012 at 06:46:02PM +0100, Roland Stigge wrote:
> This patch adds ethernet support to the LPC32xx ARM architecture. The actual
> driver in drivers/net is contained in a separate patch.
> 
> Signed-off-by: Roland Stigge <stigge@antcom.de>
> 
> ---

Please add below this dashed line what changed since the last version. This
makes reviewing easier.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120227/6203f004/attachment.sig>

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

* Re: [PATCH v3] ARM: LPC32xx: Ethernet support
  2012-02-27 17:46 ` Roland Stigge
@ 2012-02-27 18:17   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 12+ messages in thread
From: Russell King - ARM Linux @ 2012-02-27 18:17 UTC (permalink / raw)
  To: Roland Stigge; +Cc: linux-arm-kernel, kevin.wells, w.sang, linux-kernel, arnd

On Mon, Feb 27, 2012 at 06:46:02PM +0100, Roland Stigge wrote:
> +menu "LPC32XX chip components"
> +
> +config ARCH_LPC32XX_IRAM_FOR_NET
> +	bool "Use IRAM for network buffers"
> +	default n

n is the default.

> +	help
> +	  Say Y here to use the LPC internal fast IRAM (i.e. 256KB SRAM) as
> +	  network buffer.  If the total combined required buffer sizes is
> +	  larger than the size of IRAM, then SDRAM will be used instead.
> +
> +	  This can be enabled safely if the IRAM is not intended for other
> +	  uses.
> +
> +config ARCH_LPC32XX_MII_SUPPORT
> +	bool "Check to enable MII support or leave disabled for RMII support"
> +	default n

Ditto.

> --- linux-2.6.orig/arch/arm/mach-lpc32xx/common.c
> +++ linux-2.6/arch/arm/mach-lpc32xx/common.c
> @@ -186,6 +186,40 @@ struct platform_device lpc32xx_ohci_devi
>  };
>  
>  /*
> + * Network Support
> + */
> +static struct lpc_net_cfg lpc32xx_netdata = {
> +	.phy_irq = -1,
> +	.phy_mask = 0xFFFFFFF0,
> +};
> +
> +static struct resource net_resources[] = {
> +	[0] = {
> +		.start = LPC32XX_ETHERNET_BASE,
> +		.end = LPC32XX_ETHERNET_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},

DEFINE_RES_MEM() ?

> +	[1] = {
> +		.start = IRQ_LPC32XX_ETHERNET,
> +		.end = IRQ_LPC32XX_ETHERNET,
> +		.flags = IORESOURCE_IRQ,
> +	},

DEFINE_RES_IRQ() ?

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

* [PATCH v3] ARM: LPC32xx: Ethernet support
@ 2012-02-27 18:17   ` Russell King - ARM Linux
  0 siblings, 0 replies; 12+ messages in thread
From: Russell King - ARM Linux @ 2012-02-27 18:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 27, 2012 at 06:46:02PM +0100, Roland Stigge wrote:
> +menu "LPC32XX chip components"
> +
> +config ARCH_LPC32XX_IRAM_FOR_NET
> +	bool "Use IRAM for network buffers"
> +	default n

n is the default.

> +	help
> +	  Say Y here to use the LPC internal fast IRAM (i.e. 256KB SRAM) as
> +	  network buffer.  If the total combined required buffer sizes is
> +	  larger than the size of IRAM, then SDRAM will be used instead.
> +
> +	  This can be enabled safely if the IRAM is not intended for other
> +	  uses.
> +
> +config ARCH_LPC32XX_MII_SUPPORT
> +	bool "Check to enable MII support or leave disabled for RMII support"
> +	default n

Ditto.

> --- linux-2.6.orig/arch/arm/mach-lpc32xx/common.c
> +++ linux-2.6/arch/arm/mach-lpc32xx/common.c
> @@ -186,6 +186,40 @@ struct platform_device lpc32xx_ohci_devi
>  };
>  
>  /*
> + * Network Support
> + */
> +static struct lpc_net_cfg lpc32xx_netdata = {
> +	.phy_irq = -1,
> +	.phy_mask = 0xFFFFFFF0,
> +};
> +
> +static struct resource net_resources[] = {
> +	[0] = {
> +		.start = LPC32XX_ETHERNET_BASE,
> +		.end = LPC32XX_ETHERNET_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},

DEFINE_RES_MEM() ?

> +	[1] = {
> +		.start = IRQ_LPC32XX_ETHERNET,
> +		.end = IRQ_LPC32XX_ETHERNET,
> +		.flags = IORESOURCE_IRQ,
> +	},

DEFINE_RES_IRQ() ?

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

* Re: [PATCH v3] ARM: LPC32xx: Ethernet support
  2012-02-27 18:08   ` Wolfram Sang
@ 2012-02-27 22:04     ` Roland Stigge
  -1 siblings, 0 replies; 12+ messages in thread
From: Roland Stigge @ 2012-02-27 22:04 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-arm-kernel, kevin.wells, linux-kernel, arnd

On 27/02/12 19:08, Wolfram Sang wrote:
> On Mon, Feb 27, 2012 at 06:46:02PM +0100, Roland Stigge wrote:
>> This patch adds ethernet support to the LPC32xx ARM architecture.
>> The actual driver in drivers/net is contained in a separate
>> patch.
>> 
>> Signed-off-by: Roland Stigge <stigge@antcom.de>
>> 
>> ---
> 
> Please add below this dashed line what changed since the last
> version. This makes reviewing easier.

OK, will do next time.

For the driver, some style fixes were applied, and the cmdline
"ethaddr" was removed, relying on the bootloader to set it correctly
(and it actually does, it actually needs to prepare TFTP booting).

The platform-support patch just adjusted to the small driver change:
driver name adjustment ("lpc-eth") for consistency.

Roland

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

* [PATCH v3] ARM: LPC32xx: Ethernet support
@ 2012-02-27 22:04     ` Roland Stigge
  0 siblings, 0 replies; 12+ messages in thread
From: Roland Stigge @ 2012-02-27 22:04 UTC (permalink / raw)
  To: linux-arm-kernel

On 27/02/12 19:08, Wolfram Sang wrote:
> On Mon, Feb 27, 2012 at 06:46:02PM +0100, Roland Stigge wrote:
>> This patch adds ethernet support to the LPC32xx ARM architecture.
>> The actual driver in drivers/net is contained in a separate
>> patch.
>> 
>> Signed-off-by: Roland Stigge <stigge@antcom.de>
>> 
>> ---
> 
> Please add below this dashed line what changed since the last
> version. This makes reviewing easier.

OK, will do next time.

For the driver, some style fixes were applied, and the cmdline
"ethaddr" was removed, relying on the bootloader to set it correctly
(and it actually does, it actually needs to prepare TFTP booting).

The platform-support patch just adjusted to the small driver change:
driver name adjustment ("lpc-eth") for consistency.

Roland

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

* RE: [PATCH v3] ARM: LPC32xx: Ethernet support
  2012-02-27 22:04     ` Roland Stigge
@ 2012-02-27 23:10       ` Kevin Wells
  -1 siblings, 0 replies; 12+ messages in thread
From: Kevin Wells @ 2012-02-27 23:10 UTC (permalink / raw)
  To: Roland Stigge, Wolfram Sang; +Cc: linux-arm-kernel, linux-kernel, arnd

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1246 bytes --]

>>> This patch adds ethernet support to the LPC32xx ARM architecture.
>>> The actual driver in drivers/net is contained in a separate
>>> patch.
>>> 
>>> Signed-off-by: Roland Stigge <stigge@antcom.de>
>>> 
>>> ---
>> 
>> Please add below this dashed line what changed since the last
>> version. This makes reviewing easier. 
>
>OK, will do next time.
>
>For the driver, some style fixes were applied, and the cmdline
>"ethaddr" was removed, relying on the bootloader to set it correctly
> (and it actually does, it actually needs to prepare TFTP booting).

I'm not sure I'd trust the bootloader to always set the MAC address
in hardware prior to calling the kernel. A lot of u-boot MAC drivers,
including the 32x0's, only set the MAC address on the call to
eth_init(), which is only called when the network interface is used.
If you do a MTD based kernel boot, the MAC address will probably be
invalid if you try to do a NFS mount for the filesystem.

>The platform-support patch just adjusted to the small driver change:
>driver name adjustment ("lpc-eth") for consistency.
>
>Roland
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* [PATCH v3] ARM: LPC32xx: Ethernet support
@ 2012-02-27 23:10       ` Kevin Wells
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin Wells @ 2012-02-27 23:10 UTC (permalink / raw)
  To: linux-arm-kernel

>>> This patch adds ethernet support to the LPC32xx ARM architecture.
>>> The actual driver in drivers/net is contained in a separate
>>> patch.
>>> 
>>> Signed-off-by: Roland Stigge <stigge@antcom.de>
>>> 
>>> ---
>> 
>> Please add below this dashed line what changed since the last
>> version. This makes reviewing easier. 
>
>OK, will do next time.
>
>For the driver, some style fixes were applied, and the cmdline
>"ethaddr" was removed, relying on the bootloader to set it correctly
> (and it actually does, it actually needs to prepare TFTP booting).

I'm not sure I'd trust the bootloader to always set the MAC address
in hardware prior to calling the kernel. A lot of u-boot MAC drivers,
including the 32x0's, only set the MAC address on the call to
eth_init(), which is only called when the network interface is used.
If you do a MTD based kernel boot, the MAC address will probably be
invalid if you try to do a NFS mount for the filesystem.

>The platform-support patch just adjusted to the small driver change:
>driver name adjustment ("lpc-eth") for consistency.
>
>Roland

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

* Re: [PATCH v3] ARM: LPC32xx: Ethernet support
  2012-02-27 23:10       ` Kevin Wells
@ 2012-02-28  6:38         ` Arnd Bergmann
  -1 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2012-02-28  6:38 UTC (permalink / raw)
  To: Kevin Wells; +Cc: Roland Stigge, Wolfram Sang, linux-arm-kernel, linux-kernel

On Monday 27 February 2012, Kevin Wells wrote:
> >
> >For the driver, some style fixes were applied, and the cmdline
> >"ethaddr" was removed, relying on the bootloader to set it correctly
> > (and it actually does, it actually needs to prepare TFTP booting).
> 
> I'm not sure I'd trust the bootloader to always set the MAC address
> in hardware prior to calling the kernel. A lot of u-boot MAC drivers,
> including the 32x0's, only set the MAC address on the call to
> eth_init(), which is only called when the network interface is used.
> If you do a MTD based kernel boot, the MAC address will probably be
> invalid if you try to do a NFS mount for the filesystem.

In the long run, the MAC address should probably be set by the boot
loader through the device tree that is passed to the kernel, overriding
the one in the registers when set.

When we do that, we won't need the command line argument any more.
Some drivers have it anyway, but IMHO the cleaner approach would
be having fewer methods to pass it.

	Arnd

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

* [PATCH v3] ARM: LPC32xx: Ethernet support
@ 2012-02-28  6:38         ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2012-02-28  6:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 27 February 2012, Kevin Wells wrote:
> >
> >For the driver, some style fixes were applied, and the cmdline
> >"ethaddr" was removed, relying on the bootloader to set it correctly
> > (and it actually does, it actually needs to prepare TFTP booting).
> 
> I'm not sure I'd trust the bootloader to always set the MAC address
> in hardware prior to calling the kernel. A lot of u-boot MAC drivers,
> including the 32x0's, only set the MAC address on the call to
> eth_init(), which is only called when the network interface is used.
> If you do a MTD based kernel boot, the MAC address will probably be
> invalid if you try to do a NFS mount for the filesystem.

In the long run, the MAC address should probably be set by the boot
loader through the device tree that is passed to the kernel, overriding
the one in the registers when set.

When we do that, we won't need the command line argument any more.
Some drivers have it anyway, but IMHO the cleaner approach would
be having fewer methods to pass it.

	Arnd

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

end of thread, other threads:[~2012-02-28  6:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 17:46 [PATCH v3] ARM: LPC32xx: Ethernet support Roland Stigge
2012-02-27 17:46 ` Roland Stigge
2012-02-27 18:08 ` Wolfram Sang
2012-02-27 18:08   ` Wolfram Sang
2012-02-27 22:04   ` Roland Stigge
2012-02-27 22:04     ` Roland Stigge
2012-02-27 23:10     ` Kevin Wells
2012-02-27 23:10       ` Kevin Wells
2012-02-28  6:38       ` Arnd Bergmann
2012-02-28  6:38         ` Arnd Bergmann
2012-02-27 18:17 ` Russell King - ARM Linux
2012-02-27 18:17   ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.