linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kirkwood: add dir-665 support
@ 2011-04-27 16:34 Hirundo Cam
  2011-04-27 23:52 ` Hirundo Cam
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Hirundo Cam @ 2011-04-27 16:34 UTC (permalink / raw)
  To: linux-arm-kernel

This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
LEDs, GPIO, Buttons remains unknown.

To use this patch, u-boot must also be modified.

Signed-off-by: Hirundo Cam <camhirundo@gmail.com>
---
 arch/arm/mach-kirkwood/Kconfig            |    6 ++
 arch/arm/mach-kirkwood/Makefile           |    1 +
 arch/arm/mach-kirkwood/mv88f6281_dir665.c |  107 +++++++++++++++++++++++++++++
 arch/arm/tools/mach-types                 |    1 +
 4 files changed, 115 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-kirkwood/mv88f6281_dir665.c

diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 7fc603b..296d97f 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -26,6 +26,12 @@ config MACH_MV88F6281GTW_GE
 	  Say 'Y' here if you want your kernel to support the
 	  Marvell 88F6281 GTW GE Board.
 
+config MACH_MV88F6281_DIR665
+	bool "Marvell 88F6281 DIR665 Board"
+	help
+	  Say 'Y' here if you want your kernel to support the
+	  88F6281 DIR665 Board.
+
 config MACH_SHEEVAPLUG
 	bool "Marvell SheevaPlug Reference Board"
 	help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 5dcaa81..f86649f 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -3,6 +3,7 @@ obj-y				+= common.o addr-map.o irq.o pcie.o mpp.o
 obj-$(CONFIG_MACH_DB88F6281_BP)		+= db88f6281-bp-setup.o
 obj-$(CONFIG_MACH_RD88F6192_NAS)	+= rd88f6192-nas-setup.o
 obj-$(CONFIG_MACH_RD88F6281)		+= rd88f6281-setup.o
+obj-$(CONFIG_MACH_MV88F6281_DIR665)	+= mv88f6281_dir665.o
 obj-$(CONFIG_MACH_MV88F6281GTW_GE)	+= mv88f6281gtw_ge-setup.o
 obj-$(CONFIG_MACH_SHEEVAPLUG)		+= sheevaplug-setup.o
 obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG)	+= sheevaplug-setup.o
diff --git a/arch/arm/mach-kirkwood/mv88f6281_dir665.c b/arch/arm/mach-kirkwood/mv88f6281_dir665.c
new file mode 100644
index 0000000..41aa7ef
--- /dev/null
+++ b/arch/arm/mach-kirkwood/mv88f6281_dir665.c
@@ -0,0 +1,107 @@
+/*
+ * arch/arm/mach-kirkwood/mv88f6281_dir665.c
+ *
+ * Marvell 88F6281 DIR-665 Board Setup
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/pci.h>
+#include <linux/irq.h>
+#include <linux/mtd/physmap.h>
+#include <linux/timer.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/ethtool.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+#include <linux/spi/flash.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/orion_spi.h>
+#include <net/dsa.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/pci.h>
+#include <mach/kirkwood.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mv643xx_eth_platform_data mv88f6281_dir665_ge00_data = {
+	.phy_addr	= MV643XX_ETH_PHY_NONE,
+	.speed		= SPEED_1000,
+	.duplex		= DUPLEX_FULL,
+};
+
+static struct mv643xx_eth_platform_data mv88f6281_dir665_ge01_data = {
+	.phy_addr	= MV643XX_ETH_PHY_NONE,
+	.speed		= SPEED_1000,
+	.duplex		= DUPLEX_FULL,
+};
+
+static struct dsa_chip_data mv88f6281_dir665_switch_chip_data = {
+	.port_names[0]	= "lan4",
+	.port_names[1]	= "lan3",
+	.port_names[2]	= "lan2",
+	.port_names[3]	= "lan1",
+	.port_names[6]	= "cpu",
+};
+
+static struct dsa_platform_data mv88f6281_dir665_switch_plat_data = {
+	.nr_chips	= 1,
+	.chip		= &mv88f6281_dir665_switch_chip_data,
+};
+
+static const struct flash_platform_data mv88f6281_dir665_spi_slave_data = {
+	.type		= "mx25l12805d",
+};
+
+static struct spi_board_info __initdata mv88f6281_dir665_spi_slave_info[] = {
+	{
+		.modalias	= "m25p80",
+		.platform_data	= &mv88f6281_dir665_spi_slave_data,
+		.irq		= -1,
+		.max_speed_hz	= 50000000,
+		.bus_num	= 0,
+		.chip_select	= 0,
+	},
+};
+
+static void __init mv88f6281_dir665_init(void)
+{
+	/*
+	 * Basic setup. Needs to be called early.
+	 */
+	kirkwood_init();
+
+	kirkwood_ehci_init();
+	kirkwood_ge00_init(&mv88f6281_dir665_ge00_data);
+	kirkwood_ge01_init(&mv88f6281_dir665_ge01_data);
+	kirkwood_ge00_switch_init(&mv88f6281_dir665_switch_plat_data, NO_IRQ);
+	spi_register_board_info(mv88f6281_dir665_spi_slave_info,
+				ARRAY_SIZE(mv88f6281_dir665_spi_slave_info));
+	kirkwood_spi_init();
+	kirkwood_uart0_init();
+}
+
+static int __init mv88f6281_dir665_pci_init(void)
+{
+	if (machine_is_mv88f6281_dir665())
+		kirkwood_pcie_init(KW_PCIE0);
+
+	return 0;
+}
+subsys_initcall(mv88f6281_dir665_pci_init);
+
+MACHINE_START(MV88F6281_DIR665, "Marvell 88F6281 DIR665 Board")
+	.boot_params	= 0x00000100,
+	.init_machine	= mv88f6281_dir665_init,
+	.map_io		= kirkwood_map_io,
+	.init_irq	= kirkwood_init_irq,
+	.timer		= &kirkwood_timer,
+MACHINE_END
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 7ca41f0..02d008d 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -1099,3 +1099,4 @@ ecuv5			MACH_ECUV5		ECUV5			3421
 hsgx6d			MACH_HSGX6D		HSGX6D			3422
 dawad7			MACH_DAWAD7		DAWAD7			3423
 sam9repeater		MACH_SAM9REPEATER	SAM9REPEATER		3424
+mv88f6281_dir665	MACH_MV88F6281_DIR665	MV88F6281_DIR665	3425
-- 
1.7.3.5

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

* [PATCH] kirkwood: add dir-665 support
  2011-04-27 16:34 [PATCH] kirkwood: add dir-665 support Hirundo Cam
@ 2011-04-27 23:52 ` Hirundo Cam
  2011-05-03 15:55 ` Hirundo Cam
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 27+ messages in thread
From: Hirundo Cam @ 2011-04-27 23:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Russell and Nico,

2011/4/28 Hirundo Cam <camhirundo@gmail.com>
>
> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
> LEDs, GPIO, Buttons remains unknown.
>
> To use this patch, u-boot must also be modified.
>
> Signed-off-by: Hirundo Cam <camhirundo@gmail.com>

Could you please help to tell who can help on review and apply this patch?
Thanks.

Regards,
Hirundo Cam.

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

* [PATCH] kirkwood: add dir-665 support
  2011-04-27 16:34 [PATCH] kirkwood: add dir-665 support Hirundo Cam
  2011-04-27 23:52 ` Hirundo Cam
@ 2011-05-03 15:55 ` Hirundo Cam
  2011-05-03 20:51 ` mike at compulab.co.il
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 27+ messages in thread
From: Hirundo Cam @ 2011-05-03 15:55 UTC (permalink / raw)
  To: linux-arm-kernel

Hi  Robin, Nicolas, and Mike

2011/4/28 Hirundo Cam <camhirundo@gmail.com>:
> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
> LEDs, GPIO, Buttons remains unknown.
>
> To use this patch, u-boot must also be modified.
>
> Signed-off-by: Hirundo Cam <camhirundo@gmail.com>
> ---
> ?arch/arm/mach-kirkwood/Kconfig ? ? ? ? ? ?| ? ?6 ++
> ?arch/arm/mach-kirkwood/Makefile ? ? ? ? ? | ? ?1 +
> ?arch/arm/mach-kirkwood/mv88f6281_dir665.c | ?107 +++++++++++++++++++++++++++++
> ?arch/arm/tools/mach-types ? ? ? ? ? ? ? ? | ? ?1 +
> ?4 files changed, 115 insertions(+), 0 deletions(-)

I'm new to arm-linux mailing list. Since I have done a hack to DIR-665
which uses mv88f6281_A1 (kirkwood), then I'm willing to send a patch to kernel.

I've found you have commit kirkwood related patches in to kernel.
Would you help on review this patch?
Thanks.

regards,
Hirundo Cam.

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

* [PATCH] kirkwood: add dir-665 support
  2011-04-27 16:34 [PATCH] kirkwood: add dir-665 support Hirundo Cam
  2011-04-27 23:52 ` Hirundo Cam
  2011-05-03 15:55 ` Hirundo Cam
@ 2011-05-03 20:51 ` mike at compulab.co.il
  2011-05-04  2:36   ` Hirundo Cam
  2011-05-04  3:30   ` Hirundo Cam
  2011-05-03 21:14 ` Simon Guinot
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 27+ messages in thread
From: mike at compulab.co.il @ 2011-05-03 20:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Hirundo Cam,

I'm not Kirkwood expert, so my comments are quite general.

On Thu, Apr 28, 2011 at 12:34:46AM +0800, Hirundo Cam wrote:
> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
> LEDs, GPIO, Buttons remains unknown.
> 
> To use this patch, u-boot must also be modified.
> 
> Signed-off-by: Hirundo Cam <camhirundo@gmail.com>
> ---
>  arch/arm/mach-kirkwood/Kconfig            |    6 ++
>  arch/arm/mach-kirkwood/Makefile           |    1 +
>  arch/arm/mach-kirkwood/mv88f6281_dir665.c |  107 +++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types                 |    1 +
>  4 files changed, 115 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-kirkwood/mv88f6281_dir665.c
> 
> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
> index 7fc603b..296d97f 100644
> --- a/arch/arm/mach-kirkwood/Kconfig
> +++ b/arch/arm/mach-kirkwood/Kconfig
> @@ -26,6 +26,12 @@ config MACH_MV88F6281GTW_GE
>  	  Say 'Y' here if you want your kernel to support the
>  	  Marvell 88F6281 GTW GE Board.
>  
> +config MACH_MV88F6281_DIR665
> +	bool "Marvell 88F6281 DIR665 Board"
> +	help

Citing checkpatch.pl:
"WARNIING: please write a paragraph that describes the config symbol fully"

> +	  Say 'Y' here if you want your kernel to support the
> +	  88F6281 DIR665 Board.
> +
>  config MACH_SHEEVAPLUG
>  	bool "Marvell SheevaPlug Reference Board"
>  	help
> diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
> index 5dcaa81..f86649f 100644
> --- a/arch/arm/mach-kirkwood/Makefile
> +++ b/arch/arm/mach-kirkwood/Makefile
> @@ -3,6 +3,7 @@ obj-y				+= common.o addr-map.o irq.o pcie.o mpp.o
>  obj-$(CONFIG_MACH_DB88F6281_BP)		+= db88f6281-bp-setup.o
>  obj-$(CONFIG_MACH_RD88F6192_NAS)	+= rd88f6192-nas-setup.o
>  obj-$(CONFIG_MACH_RD88F6281)		+= rd88f6281-setup.o
> +obj-$(CONFIG_MACH_MV88F6281_DIR665)	+= mv88f6281_dir665.o
>  obj-$(CONFIG_MACH_MV88F6281GTW_GE)	+= mv88f6281gtw_ge-setup.o
>  obj-$(CONFIG_MACH_SHEEVAPLUG)		+= sheevaplug-setup.o
>  obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG)	+= sheevaplug-setup.o
> diff --git a/arch/arm/mach-kirkwood/mv88f6281_dir665.c b/arch/arm/mach-kirkwood/mv88f6281_dir665.c
> new file mode 100644
> index 0000000..41aa7ef
> --- /dev/null
> +++ b/arch/arm/mach-kirkwood/mv88f6281_dir665.c
> @@ -0,0 +1,107 @@
> +/*
> + * arch/arm/mach-kirkwood/mv88f6281_dir665.c
> + *
> + * Marvell 88F6281 DIR-665 Board Setup
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2.  This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <linux/pci.h>
> +#include <linux/irq.h>
> +#include <linux/mtd/physmap.h>
> +#include <linux/timer.h>
> +#include <linux/mv643xx_eth.h>
> +#include <linux/ethtool.h>
> +#include <linux/gpio.h>
> +#include <linux/leds.h>
> +#include <linux/input.h>
> +#include <linux/gpio_keys.h>
> +#include <linux/spi/flash.h>
> +#include <linux/spi/spi.h>
> +#include <linux/spi/orion_spi.h>
> +#include <net/dsa.h>
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach/pci.h>
> +#include <mach/kirkwood.h>
> +#include "common.h"
> +#include "mpp.h"

Please check what headers are actually needed. I belieive that
linux/input.h, linux/leds.h, linux/gpio.h and most probably many others
can be safely removed.

> +static struct mv643xx_eth_platform_data mv88f6281_dir665_ge00_data = {
> +	.phy_addr	= MV643XX_ETH_PHY_NONE,
> +	.speed		= SPEED_1000,
> +	.duplex		= DUPLEX_FULL,
> +};
> +
> +static struct mv643xx_eth_platform_data mv88f6281_dir665_ge01_data = {
> +	.phy_addr	= MV643XX_ETH_PHY_NONE,
> +	.speed		= SPEED_1000,
> +	.duplex		= DUPLEX_FULL,
> +};
> +
> +static struct dsa_chip_data mv88f6281_dir665_switch_chip_data = {
> +	.port_names[0]	= "lan4",
> +	.port_names[1]	= "lan3",
> +	.port_names[2]	= "lan2",
> +	.port_names[3]	= "lan1",
> +	.port_names[6]	= "cpu",
> +};
> +
> +static struct dsa_platform_data mv88f6281_dir665_switch_plat_data = {
> +	.nr_chips	= 1,
> +	.chip		= &mv88f6281_dir665_switch_chip_data,
> +};
> +
> +static const struct flash_platform_data mv88f6281_dir665_spi_slave_data = {
> +	.type		= "mx25l12805d",
> +};
> +
> +static struct spi_board_info __initdata mv88f6281_dir665_spi_slave_info[] = {
> +	{
> +		.modalias	= "m25p80",
> +		.platform_data	= &mv88f6281_dir665_spi_slave_data,
> +		.irq		= -1,
> +		.max_speed_hz	= 50000000,
> +		.bus_num	= 0,
> +		.chip_select	= 0,
> +	},
> +};
> +
> +static void __init mv88f6281_dir665_init(void)
> +{
> +	/*
> +	 * Basic setup. Needs to be called early.
> +	 */
> +	kirkwood_init();
> +
> +	kirkwood_ehci_init();
> +	kirkwood_ge00_init(&mv88f6281_dir665_ge00_data);
> +	kirkwood_ge01_init(&mv88f6281_dir665_ge01_data);
> +	kirkwood_ge00_switch_init(&mv88f6281_dir665_switch_plat_data, NO_IRQ);
> +	spi_register_board_info(mv88f6281_dir665_spi_slave_info,
> +				ARRAY_SIZE(mv88f6281_dir665_spi_slave_info));
> +	kirkwood_spi_init();
> +	kirkwood_uart0_init();
> +}
> +
> +static int __init mv88f6281_dir665_pci_init(void)
> +{
> +	if (machine_is_mv88f6281_dir665())
> +		kirkwood_pcie_init(KW_PCIE0);
> +
> +	return 0;
> +}
> +subsys_initcall(mv88f6281_dir665_pci_init);
> +
> +MACHINE_START(MV88F6281_DIR665, "Marvell 88F6281 DIR665 Board")
> +	.boot_params	= 0x00000100,
> +	.init_machine	= mv88f6281_dir665_init,
> +	.map_io		= kirkwood_map_io,
> +	.init_irq	= kirkwood_init_irq,
> +	.timer		= &kirkwood_timer,
> +MACHINE_END
> diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
> index 7ca41f0..02d008d 100644
> --- a/arch/arm/tools/mach-types
> +++ b/arch/arm/tools/mach-types
> @@ -1099,3 +1099,4 @@ ecuv5			MACH_ECUV5		ECUV5			3421
>  hsgx6d			MACH_HSGX6D		HSGX6D			3422
>  dawad7			MACH_DAWAD7		DAWAD7			3423
>  sam9repeater		MACH_SAM9REPEATER	SAM9REPEATER		3424
> +mv88f6281_dir665	MACH_MV88F6281_DIR665	MV88F6281_DIR665	3425

You should add the dir665 machine into the machine registry at
http://www.arm.linux.org.uk/developer/machines/ rather than modify the
mach-types file.

--
Sincerely yours,
Mike.

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

* [PATCH] kirkwood: add dir-665 support
  2011-04-27 16:34 [PATCH] kirkwood: add dir-665 support Hirundo Cam
                   ` (2 preceding siblings ...)
  2011-05-03 20:51 ` mike at compulab.co.il
@ 2011-05-03 21:14 ` Simon Guinot
       [not found] ` <1304496346-13557-1-git-send-email-camhirundo@gmail.com>
  2011-05-04  9:23 ` [PATCH] " Jean-Christophe PLAGNIOL-VILLARD
  5 siblings, 0 replies; 27+ messages in thread
From: Simon Guinot @ 2011-05-03 21:14 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hirundo,

On Thu, Apr 28, 2011 at 12:34:46AM +0800, Hirundo Cam wrote:
> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
> LEDs, GPIO, Buttons remains unknown.

You could use the GPIO sysfs API to discover the LEDs and buttons GPIOs.

> 
> To use this patch, u-boot must also be modified.

What kind of modifications ?

> 
> Signed-off-by: Hirundo Cam <camhirundo@gmail.com>
> ---
>  arch/arm/mach-kirkwood/Kconfig            |    6 ++
>  arch/arm/mach-kirkwood/Makefile           |    1 +
>  arch/arm/mach-kirkwood/mv88f6281_dir665.c |  107 +++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types                 |    1 +
>  4 files changed, 115 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-kirkwood/mv88f6281_dir665.c
> 
> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
> index 7fc603b..296d97f 100644
> --- a/arch/arm/mach-kirkwood/Kconfig
> +++ b/arch/arm/mach-kirkwood/Kconfig
> @@ -26,6 +26,12 @@ config MACH_MV88F6281GTW_GE
>  	  Say 'Y' here if you want your kernel to support the
>  	  Marvell 88F6281 GTW GE Board.
>  
> +config MACH_MV88F6281_DIR665
> +	bool "Marvell 88F6281 DIR665 Board"
> +	help
> +	  Say 'Y' here if you want your kernel to support the
> +	  88F6281 DIR665 Board.
> +

Probably than 'MV88F6281' should not be a part of the D-Link DIR665
machine name.

Regards,

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110503/71ffc192/attachment.sig>

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-03 20:51 ` mike at compulab.co.il
@ 2011-05-04  2:36   ` Hirundo Cam
  2011-05-04  2:54     ` Hirundo Cam
  2011-05-04  3:30   ` Hirundo Cam
  1 sibling, 1 reply; 27+ messages in thread
From: Hirundo Cam @ 2011-05-04  2:36 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike,

2011/5/4  <mike@compulab.co.il>:
> Hello Hirundo Cam,
>
> I'm not Kirkwood expert, so my comments are quite general.

That's O.K.. It still helped other thing

> On Thu, Apr 28, 2011 at 12:34:46AM +0800, Hirundo Cam wrote:
>> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
>> LEDs, GPIO, Buttons remains unknown.
>>
>> To use this patch, u-boot must also be modified.
>>
>> Signed-off-by: Hirundo Cam <camhirundo@gmail.com>
>> ---
>> ?arch/arm/mach-kirkwood/Kconfig ? ? ? ? ? ?| ? ?6 ++
>> ?arch/arm/mach-kirkwood/Makefile ? ? ? ? ? | ? ?1 +
>> ?arch/arm/mach-kirkwood/mv88f6281_dir665.c | ?107 +++++++++++++++++++++++++++++
>> ?arch/arm/tools/mach-types ? ? ? ? ? ? ? ? | ? ?1 +
>> ?4 files changed, 115 insertions(+), 0 deletions(-)
>> ?create mode 100644 arch/arm/mach-kirkwood/mv88f6281_dir665.c
>>
>> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
>> index 7fc603b..296d97f 100644
>> --- a/arch/arm/mach-kirkwood/Kconfig
>> +++ b/arch/arm/mach-kirkwood/Kconfig
>> @@ -26,6 +26,12 @@ config MACH_MV88F6281GTW_GE
>> ? ? ? ? Say 'Y' here if you want your kernel to support the
>> ? ? ? ? Marvell 88F6281 GTW GE Board.
>>
>> +config MACH_MV88F6281_DIR665
>> + ? ? bool "Marvell 88F6281 DIR665 Board"
>> + ? ? help
>
> Citing checkpatch.pl:
> "WARNIING: please write a paragraph that describes the config symbol fully"

I've used checkpatch. and get this WARNING too.
But I didn't understand how the paragraph is wrong.
This section just as other sections. Should I add
this line "Say 'Y' here if you want your kernel to support the" into
th paragraph?

> Please check what headers are actually needed. I belieive that
> linux/input.h, linux/leds.h, linux/gpio.h and most probably many others
> can be safely removed.

Shouldn't I keep these stuff for future discovered LED and GPIOs?


> You should add the dir665 machine into the machine registry at
> http://www.arm.linux.org.uk/developer/machines/ rather than modify the
> mach-types file.

Thanks for your information.

Regards,
Hirundo Cam.

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-04  2:36   ` Hirundo Cam
@ 2011-05-04  2:54     ` Hirundo Cam
  2011-05-04  3:00       ` Hirundo Cam
  2011-05-04  8:09       ` Simon Guinot
  0 siblings, 2 replies; 27+ messages in thread
From: Hirundo Cam @ 2011-05-04  2:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike and Simon,

I've send a machine submit to arm-linux, it generated the mach-types as

[stripped]
mx51_moray		MACH_MX51_MORAY		MX51_MORAY		3484
thales_cbc		MACH_THALES_CBC		THALES_CBC		3485
bluepoint		MACH_BLUEPOINT		BLUEPOINT		3486
dir665			MACH_DIR665		DIR665			3487

Is this correct for the DIR665 board using mv88f6281 chips?

Regards,
Hirundo Cam

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-04  2:54     ` Hirundo Cam
@ 2011-05-04  3:00       ` Hirundo Cam
  2011-05-04  6:32         ` Mike Rapoport
  2011-05-04  8:09       ` Simon Guinot
  1 sibling, 1 reply; 27+ messages in thread
From: Hirundo Cam @ 2011-05-04  3:00 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike and Simon

2011/5/4 Hirundo Cam <camhirundo@gmail.com>:
> Hi Mike and Simon,
>
> I've send a machine submit to arm-linux, it generated the mach-types as
>
> [stripped]
> mx51_moray ? ? ? ? ? ? ?MACH_MX51_MORAY ? ? ? ? MX51_MORAY ? ? ? ? ? ? ?3484
> thales_cbc ? ? ? ? ? ? ?MACH_THALES_CBC ? ? ? ? THALES_CBC ? ? ? ? ? ? ?3485
> bluepoint ? ? ? ? ? ? ? MACH_BLUEPOINT ? ? ? ? ?BLUEPOINT ? ? ? ? ? ? ? 3486
> dir665 ? ? ? ? ? ? ? ? ?MACH_DIR665 ? ? ? ? ? ? DIR665 ? ? ? ? ? ? ? ? ?3487
>
> Is this correct for the DIR665 board using mv88f6281 chips?

Is this implied that I could get rid of the modification to mach-type
in my patch?
Thanks!

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-03 20:51 ` mike at compulab.co.il
  2011-05-04  2:36   ` Hirundo Cam
@ 2011-05-04  3:30   ` Hirundo Cam
  2011-05-04  6:31     ` Mike Rapoport
  1 sibling, 1 reply; 27+ messages in thread
From: Hirundo Cam @ 2011-05-04  3:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike,

>> +config MACH_MV88F6281_DIR665
>> + ? ? bool "Marvell 88F6281 DIR665 Board"
>> + ? ? help
>
> Citing checkpatch.pl:
> "WARNIING: please write a paragraph that describes the config symbol fully"

I've removed Kconfig and re-add the Kconfig in my git repo.
(rm is 1 commit, and the add is the following commit)
And then I've found most of those paragraph is this Kconfig has the
same problem.
So I have no idea where the problem is .

Regards,
Hirundo Cam

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-04  3:30   ` Hirundo Cam
@ 2011-05-04  6:31     ` Mike Rapoport
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2011-05-04  6:31 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/04/11 06:30, Hirundo Cam wrote:
> Hi Mike,
> 
>>> +config MACH_MV88F6281_DIR665
>>> +     bool "Marvell 88F6281 DIR665 Board"
>>> +     help
>>
>> Citing checkpatch.pl:
>> "WARNIING: please write a paragraph that describes the config symbol fully"
> 
> I've removed Kconfig and re-add the Kconfig in my git repo.
> (rm is 1 commit, and the add is the following commit)
> And then I've found most of those paragraph is this Kconfig has the
> same problem.
> So I have no idea where the problem is .

checkpatch.pl expects more elaborate description of the Kconfig option in the
help text and warns if such description can't be found. Since your description
is much the same as for other boards in arch/arm/mach-kirkwood, I suppose you
can ignore this warning.

> Regards,
> Hirundo Cam


-- 
Sincerely yours,
Mike.

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-04  3:00       ` Hirundo Cam
@ 2011-05-04  6:32         ` Mike Rapoport
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2011-05-04  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/04/11 06:00, Hirundo Cam wrote:
> Hi Mike and Simon
> 
> 2011/5/4 Hirundo Cam <camhirundo@gmail.com>:
>> Hi Mike and Simon,
>>
>> I've send a machine submit to arm-linux, it generated the mach-types as
>>
>> [stripped]
>> mx51_moray              MACH_MX51_MORAY         MX51_MORAY              3484
>> thales_cbc              MACH_THALES_CBC         THALES_CBC              3485
>> bluepoint               MACH_BLUEPOINT          BLUEPOINT               3486
>> dir665                  MACH_DIR665             DIR665                  3487
>>
>> Is this correct for the DIR665 board using mv88f6281 chips?
> 
> Is this implied that I could get rid of the modification to mach-type
> in my patch?

Yes, as soon as mach-types update is pushed into the kernel.

> Thanks!


-- 
Sincerely yours,
Mike.

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

* [PATCH v2] kirkwood: add dir-665 support
       [not found] ` <1304496346-13557-1-git-send-email-camhirundo@gmail.com>
@ 2011-05-04  7:56   ` Hirundo Cam
  2011-05-04  8:16   ` Simon Guinot
  1 sibling, 0 replies; 27+ messages in thread
From: Hirundo Cam @ 2011-05-04  7:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

2011/5/4 Hirundo Cam <camhirundo@gmail.com>:
> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
> LEDs, GPIO, Buttons remains unknown.
>
> To use this patch, on board u-boot must also be recompiled and replaced.
>
> Signed-off-by: Hirundo Cam <camhirundo@gmail.com>
> ---
> Changes for V2
> ?- Remove mach-type and register a new machine to
> ? ?http://www.arm.linux.org.uk/developer/machines/
> ?- Replace mv88f6281_dir665 to dir665 according to Simon's suggestion.
> ?- Rename mv88f6281_dir665.c to dir665-setup.c
> ?- Remove include/leds.h, gpio.h, input.h, gpiokey.h according to Mike's
> ? ?suggestion.

Sorry for the duplicate mail. The latter one is the same as the older one.
Only the [PATCH v2] and [PATCH] field in subject is different.
Thanks!

Regards,
Hirundo Cam

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-04  2:54     ` Hirundo Cam
  2011-05-04  3:00       ` Hirundo Cam
@ 2011-05-04  8:09       ` Simon Guinot
  2011-05-04 13:51         ` Nicolas Pitre
  1 sibling, 1 reply; 27+ messages in thread
From: Simon Guinot @ 2011-05-04  8:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hirundo,

On Wed, May 04, 2011 at 10:54:52AM +0800, Hirundo Cam wrote:
> Hi Mike and Simon,
> 
> I've send a machine submit to arm-linux, it generated the mach-types as
> 
> [stripped]
> mx51_moray		MACH_MX51_MORAY		MX51_MORAY		3484
> thales_cbc		MACH_THALES_CBC		THALES_CBC		3485
> bluepoint		MACH_BLUEPOINT		BLUEPOINT		3486
> dir665			MACH_DIR665		DIR665			3487
> 
> Is this correct for the DIR665 board using mv88f6281 chips?

It looks correct.

Regards,

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110504/10e4319a/attachment.sig>

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

* [PATCH v2] kirkwood: add dir-665 support
       [not found] ` <1304496346-13557-1-git-send-email-camhirundo@gmail.com>
  2011-05-04  7:56   ` [PATCH v2] " Hirundo Cam
@ 2011-05-04  8:16   ` Simon Guinot
  2011-05-04  9:50     ` saeed bishara
  2011-05-05  0:11     ` Hirundo Cam
  1 sibling, 2 replies; 27+ messages in thread
From: Simon Guinot @ 2011-05-04  8:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hirundo,

On Wed, May 04, 2011 at 04:05:46PM +0800, Hirundo Cam wrote:
> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
> LEDs, GPIO, Buttons remains unknown.
> 
> To use this patch, on board u-boot must also be recompiled and replaced.

Just for curiosity, what is the problem the stock U-Boot ?

Regards,

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110504/36703340/attachment.sig>

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

* [PATCH] kirkwood: add dir-665 support
  2011-04-27 16:34 [PATCH] kirkwood: add dir-665 support Hirundo Cam
                   ` (4 preceding siblings ...)
       [not found] ` <1304496346-13557-1-git-send-email-camhirundo@gmail.com>
@ 2011-05-04  9:23 ` Jean-Christophe PLAGNIOL-VILLARD
  5 siblings, 0 replies; 27+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-05-04  9:23 UTC (permalink / raw)
  To: linux-arm-kernel

On 00:34 Thu 28 Apr     , Hirundo Cam wrote:
> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
> LEDs, GPIO, Buttons remains unknown.
> 
> To use this patch, u-boot must also be modified.
the kernel do not care about the bootloader

if the machine id is wrong you can use
devio to patch it

Best Regards,
J.

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

* [PATCH v2] kirkwood: add dir-665 support
  2011-05-04  8:16   ` Simon Guinot
@ 2011-05-04  9:50     ` saeed bishara
  2011-05-05  0:20       ` Hirundo Cam
  2011-05-05  0:11     ` Hirundo Cam
  1 sibling, 1 reply; 27+ messages in thread
From: saeed bishara @ 2011-05-04  9:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, May 4, 2011 at 11:16 AM, Simon Guinot <simon@sequanux.org> wrote:
> Hi Hirundo,
>
> On Wed, May 04, 2011 at 04:05:46PM +0800, Hirundo Cam wrote:
>> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
>> LEDs, GPIO, Buttons remains unknown.
Hirundo,
   if this board is very similar to mv88f6281gtw_ge, you should use
the same board setup file. it will be great if you specify the
differences between the two boards.
   please have a look at sheevaplug-setup.c to see how multiple boards
supported in same setup file.
saeed

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-04  8:09       ` Simon Guinot
@ 2011-05-04 13:51         ` Nicolas Pitre
  2011-05-05  0:23           ` Hirundo Cam
  2011-05-05 15:06           ` Simon Guinot
  0 siblings, 2 replies; 27+ messages in thread
From: Nicolas Pitre @ 2011-05-04 13:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 4 May 2011, Simon Guinot wrote:

> Hi Hirundo,
> 
> On Wed, May 04, 2011 at 10:54:52AM +0800, Hirundo Cam wrote:
> > Hi Mike and Simon,
> > 
> > I've send a machine submit to arm-linux, it generated the mach-types as
> > 
> > [stripped]
> > mx51_moray		MACH_MX51_MORAY		MX51_MORAY		3484
> > thales_cbc		MACH_THALES_CBC		THALES_CBC		3485
> > bluepoint		MACH_BLUEPOINT		BLUEPOINT		3486
> > dir665			MACH_DIR665		DIR665			3487
> > 
> > Is this correct for the DIR665 board using mv88f6281 chips?
> 
> It looks correct.

It may look correct, but I'll ask that you hang to it for a while as 
there is a desire to stop the addition of such board specific files to 
the kernel and move towards a solution such as device tree instead to 
represent those board details.

I think that Kirkwood is actually a good case for device tree as the 
differences between boards is really simple as it usually boils down to 
different GPIO usage and MPP assignments.  If someone would like to 
contribute to the DT effort on ARM then this would be a nice and easy 
target to convert over.


Nicolas

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

* [PATCH v2] kirkwood: add dir-665 support
  2011-05-04  8:16   ` Simon Guinot
  2011-05-04  9:50     ` saeed bishara
@ 2011-05-05  0:11     ` Hirundo Cam
  2011-05-05  7:50       ` Simon Guinot
  1 sibling, 1 reply; 27+ messages in thread
From: Hirundo Cam @ 2011-05-05  0:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Simon

2011/5/4 Simon Guinot <simon@sequanux.org>:
> Hi Hirundo,
>
> On Wed, May 04, 2011 at 04:05:46PM +0800, Hirundo Cam wrote:
>> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
>> LEDs, GPIO, Buttons remains unknown.
>>
>> To use this patch, on board u-boot must also be recompiled and replaced.
>
> Just for curiosity, what is the problem the stock U-Boot ?
>
> Regards,
>

Just as Jean-Christophe said,
I guess the mach-type id in origin u-boot which shipped with the
DIR-665 is differed.
Hence the u-boot must update to the new mach-type ID.

It is hard to find out which the origin mach-type has been used. I'm
not sure if hexdump
could help.

Anyway, I just replaced the u-boot and get it boot luckly.

Regards,
Hirundo Cam

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

* [PATCH v2] kirkwood: add dir-665 support
  2011-05-04  9:50     ` saeed bishara
@ 2011-05-05  0:20       ` Hirundo Cam
  2011-05-05  7:08         ` saeed bishara
  0 siblings, 1 reply; 27+ messages in thread
From: Hirundo Cam @ 2011-05-05  0:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Saeed and Nicolas,

2011/5/4 saeed bishara <saeed.bishara@gmail.com>:
> On Wed, May 4, 2011 at 11:16 AM, Simon Guinot <simon@sequanux.org> wrote:
>> Hi Hirundo,
>>
>> On Wed, May 04, 2011 at 04:05:46PM +0800, Hirundo Cam wrote:
>>> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
>>> LEDs, GPIO, Buttons remains unknown.
> Hirundo,

> ? if this board is very similar to mv88f6281gtw_ge, you should use
> the same board setup file. it will be great if you specify the
> differences between the two boards.

I have no mv88f6281gtw_ge board on hand.
However, After I've looked into the setup file of mv88f6281gtw_ge.
I've found that the NOR flash, ddr2 DRAM, switch chip, ethernet port define
are differ from mv88f6281gtw_ge.

I have no idea if we could use #if define to distinguish the different
boards use
the same SoC. While I want also made this adaptable in OpenWrt.

> ? please have a look at sheevaplug-setup.c to see how multiple boards
> supported in same setup file.
> saeed
>

Hum, I think Kernel will rely on the mach-type ID in u-boot to check
which board is in booting. If the original u-boot has changed
mach-type ID, I don't think us the same configuration file with
mv88f6281gtw_ge is good. At least I've tried kernel image compiled
with mv88f6281gtw_ge option but it seems kernel cannot be booted and
hanged in very early stage. Just like the mach-type ID doesn't match.

Regards,
Hirundo Cam

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-04 13:51         ` Nicolas Pitre
@ 2011-05-05  0:23           ` Hirundo Cam
  2011-05-05 15:06           ` Simon Guinot
  1 sibling, 0 replies; 27+ messages in thread
From: Hirundo Cam @ 2011-05-05  0:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nicolas,

> I think that Kirkwood is actually a good case for device tree as the
> differences between boards is really simple as it usually boils down to
> different GPIO usage and MPP assignments. ?If someone would like to
> contribute to the DT effort on ARM then this would be a nice and easy
> target to convert over.
>

Do you have any idea of how the device tree should be implemented?
For example, how the data structure and probing process should be used?
Is there any discussing thread related to this topic?
Thanks

Regards,
Hirundo Cam

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

* [PATCH v2] kirkwood: add dir-665 support
  2011-05-05  0:20       ` Hirundo Cam
@ 2011-05-05  7:08         ` saeed bishara
  2011-05-05 15:20           ` Hirundo Cam
  0 siblings, 1 reply; 27+ messages in thread
From: saeed bishara @ 2011-05-05  7:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 5, 2011 at 3:20 AM, Hirundo Cam <camhirundo@gmail.com> wrote:
> Hi Saeed and Nicolas,
>
> 2011/5/4 saeed bishara <saeed.bishara@gmail.com>:
>> On Wed, May 4, 2011 at 11:16 AM, Simon Guinot <simon@sequanux.org> wrote:
>>> Hi Hirundo,
>>>
>>> On Wed, May 04, 2011 at 04:05:46PM +0800, Hirundo Cam wrote:
>>>> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
>>>> LEDs, GPIO, Buttons remains unknown.
>> Hirundo,
>
>> ? if this board is very similar to mv88f6281gtw_ge, you should use
>> the same board setup file. it will be great if you specify the
>> differences between the two boards.
>
> I have no mv88f6281gtw_ge board on hand.
> However, After I've looked into the setup file of mv88f6281gtw_ge.
> I've found that the NOR flash, ddr2 DRAM, switch chip, ethernet port define
> are differ from mv88f6281gtw_ge.
the spi_slave_info in your patch is identical to the one in the
mv88f6281_gtw_ge. the board setup has nothing to do with ddr2.
regarding ethernet, and the other thinks that differ between the two
boards can be probed depending on the machine type.
>
> I have no idea if we could use #if define to distinguish the different
> boards use
> the same SoC. While I want also made this adaptable in OpenWrt.
you don't need to use #ifdef, you can use the machine_is_xxx()
function to distinguish between boards.
>
>> ? please have a look at sheevaplug-setup.c to see how multiple boards
>> supported in same setup file.
>> saeed
>>
>
> Hum, I think Kernel will rely on the mach-type ID in u-boot to check
> which board is in booting. If the original u-boot has changed
> mach-type ID, I don't think us the same configuration file with
> mv88f6281gtw_ge is good. At least I've tried kernel image compiled
> with mv88f6281gtw_ge option but it seems kernel cannot be booted and
> hanged in very early stage. Just like the mach-type ID doesn't match.
you shouldn't use the mach ID of mv88f6281_gtw_ge, you should have
your own one. eventually the mv88f6281gtw_ge-setup.c will include the
MACHINE_START(MV88F6281_DIR665, "Marvell 88F6281 DIR665 Board")
structure besides to the MV88F6281GTW_GE, and the two boards will
share
the same init function, the machine_is_mv88f6281gtw_ge() and
machine_is_mv88f6281_dir665() will be used to check which board is
running (in runtime).

anyway, I hope you can do it using the device tree as Nico suggested.
saeed
should have
>
> Regards,
> Hirundo Cam
>

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

* [PATCH v2] kirkwood: add dir-665 support
  2011-05-05  0:11     ` Hirundo Cam
@ 2011-05-05  7:50       ` Simon Guinot
  0 siblings, 0 replies; 27+ messages in thread
From: Simon Guinot @ 2011-05-05  7:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hirundo,

On Thu, May 05, 2011 at 08:11:01AM +0800, Hirundo Cam wrote:
> Hi Simon
> 
> 2011/5/4 Simon Guinot <simon@sequanux.org>:
> > Hi Hirundo,
> >
> > On Wed, May 04, 2011 at 04:05:46PM +0800, Hirundo Cam wrote:
> >> This patch is a hack to dir-665 by referencing mv88f6281gtw_ge board.
> >> LEDs, GPIO, Buttons remains unknown.
> >>
> >> To use this patch, on board u-boot must also be recompiled and replaced.
> >
> > Just for curiosity, what is the problem the stock U-Boot ?
> >
> > Regards,
> >
> 
> Just as Jean-Christophe said,
> I guess the mach-type id in origin u-boot which shipped with the
> DIR-665 is differed.
> Hence the u-boot must update to the new mach-type ID.

Not necessarily. If the stock U-Boot allow to save the environment
variables, you can use the following commands:

setenv arcNumber 3487; setenv mainlineLinux yes; saveenv; reset

> 
> It is hard to find out which the origin mach-type has been used. I'm
> not sure if hexdump
> could help.

Probably 527. To be sure, you could boot a kernel compiled with the
option CONFIG_DEBUG_LL enabled. If the kernel fail to find a valid
machine entry, the given number will be displayed.

> 
> Anyway, I just replaced the u-boot and get it boot luckly.

Yes, but it is a risky operation for a user.

Regards,

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110505/ed0a6893/attachment.sig>

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-04 13:51         ` Nicolas Pitre
  2011-05-05  0:23           ` Hirundo Cam
@ 2011-05-05 15:06           ` Simon Guinot
  2011-05-05 19:55             ` Nicolas Pitre
  1 sibling, 1 reply; 27+ messages in thread
From: Simon Guinot @ 2011-05-05 15:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nicolas,

On Wed, May 04, 2011 at 09:51:27AM -0400, Nicolas Pitre wrote:
> On Wed, 4 May 2011, Simon Guinot wrote:
> 
> > Hi Hirundo,
> > 
> > On Wed, May 04, 2011 at 10:54:52AM +0800, Hirundo Cam wrote:
> > > Hi Mike and Simon,
> > > 
> > > I've send a machine submit to arm-linux, it generated the mach-types as
> > > 
> > > [stripped]
> > > mx51_moray		MACH_MX51_MORAY		MX51_MORAY		3484
> > > thales_cbc		MACH_THALES_CBC		THALES_CBC		3485
> > > bluepoint		MACH_BLUEPOINT		BLUEPOINT		3486
> > > dir665			MACH_DIR665		DIR665			3487
> > > 
> > > Is this correct for the DIR665 board using mv88f6281 chips?
> > 
> > It looks correct.
> 
> It may look correct, but I'll ask that you hang to it for a while as 
> there is a desire to stop the addition of such board specific files to 
> the kernel and move towards a solution such as device tree instead to 
> represent those board details.

For my curiosity, how a device tree kernel will deal with ATAGs ?
Is there a compatibility layer planned ?

I mean... For now, the boards on market are not providing a device tree
capable bootloader. Without a compatibility layer, the kernel support
for this boards can't rely on device tree.

I assume it is the dir665 case.

> 
> I think that Kirkwood is actually a good case for device tree as the 
> differences between boards is really simple as it usually boils down to 
> different GPIO usage and MPP assignments.  If someone would like to 
> contribute to the DT effort on ARM then this would be a nice and easy 
> target to convert over.

I am still not familiar with the device tree format and usage but I will
have a look.

Regards,

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110505/228645f9/attachment-0001.sig>

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

* [PATCH v2] kirkwood: add dir-665 support
  2011-05-05  7:08         ` saeed bishara
@ 2011-05-05 15:20           ` Hirundo Cam
  0 siblings, 0 replies; 27+ messages in thread
From: Hirundo Cam @ 2011-05-05 15:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Saeed and Simon

Thanks for your suggestions.
I'll try it! However I might have a business travel for 1-2 weeks immediately.
I will try it ASAP after the business travel has been done.

Thanks!

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-05 15:06           ` Simon Guinot
@ 2011-05-05 19:55             ` Nicolas Pitre
  2011-05-06 15:41               ` Simon Guinot
  0 siblings, 1 reply; 27+ messages in thread
From: Nicolas Pitre @ 2011-05-05 19:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 5 May 2011, Simon Guinot wrote:

> Hi Nicolas,
> 
> On Wed, May 04, 2011 at 09:51:27AM -0400, Nicolas Pitre wrote:
> > On Wed, 4 May 2011, Simon Guinot wrote:
> > 
> > > Hi Hirundo,
> > > 
> > > On Wed, May 04, 2011 at 10:54:52AM +0800, Hirundo Cam wrote:
> > > > Hi Mike and Simon,
> > > > 
> > > > I've send a machine submit to arm-linux, it generated the mach-types as
> > > > 
> > > > [stripped]
> > > > mx51_moray		MACH_MX51_MORAY		MX51_MORAY		3484
> > > > thales_cbc		MACH_THALES_CBC		THALES_CBC		3485
> > > > bluepoint		MACH_BLUEPOINT		BLUEPOINT		3486
> > > > dir665			MACH_DIR665		DIR665			3487
> > > > 
> > > > Is this correct for the DIR665 board using mv88f6281 chips?
> > > 
> > > It looks correct.
> > 
> > It may look correct, but I'll ask that you hang to it for a while as 
> > there is a desire to stop the addition of such board specific files to 
> > the kernel and move towards a solution such as device tree instead to 
> > represent those board details.
> 
> For my curiosity, how a device tree kernel will deal with ATAGs ?

The kernel may use either.  The DTB is meant to supersede ATAGs.

> Is there a compatibility layer planned ?
> 
> I mean... For now, the boards on market are not providing a device tree
> capable bootloader. Without a compatibility layer, the kernel support
> for this boards can't rely on device tree.

There is a patch allowing for you to simply concatenate the appropriate 
DTB data to the kernel zImage.  With this the existing bootloaders can 
be used unchanged.


Nicolas

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-05 19:55             ` Nicolas Pitre
@ 2011-05-06 15:41               ` Simon Guinot
  2011-05-06 20:59                 ` Nicolas Pitre
  0 siblings, 1 reply; 27+ messages in thread
From: Simon Guinot @ 2011-05-06 15:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nicolas,

On Thu, May 05, 2011 at 03:55:39PM -0400, Nicolas Pitre wrote:
> On Thu, 5 May 2011, Simon Guinot wrote:
> 
> > Hi Nicolas,
> > 
> > On Wed, May 04, 2011 at 09:51:27AM -0400, Nicolas Pitre wrote:
> > > On Wed, 4 May 2011, Simon Guinot wrote:
> > > 
> > > > Hi Hirundo,
> > > > 
> > > > On Wed, May 04, 2011 at 10:54:52AM +0800, Hirundo Cam wrote:
> > > > > Hi Mike and Simon,
> > > > > 
> > > > > I've send a machine submit to arm-linux, it generated the mach-types as
> > > > > 
> > > > > [stripped]
> > > > > mx51_moray		MACH_MX51_MORAY		MX51_MORAY		3484
> > > > > thales_cbc		MACH_THALES_CBC		THALES_CBC		3485
> > > > > bluepoint		MACH_BLUEPOINT		BLUEPOINT		3486
> > > > > dir665			MACH_DIR665		DIR665			3487
> > > > > 
> > > > > Is this correct for the DIR665 board using mv88f6281 chips?
> > > > 
> > > > It looks correct.
> > > 
> > > It may look correct, but I'll ask that you hang to it for a while as 
> > > there is a desire to stop the addition of such board specific files to 
> > > the kernel and move towards a solution such as device tree instead to 
> > > represent those board details.
> > 
> > For my curiosity, how a device tree kernel will deal with ATAGs ?
> 
> The kernel may use either.  The DTB is meant to supersede ATAGs.

Ok. The board specific files are still needed to handle ATAGs (and "old"
bootloader version), how it is possible to stop the addition of this
files ?

> 
> > Is there a compatibility layer planned ?
> > 
> > I mean... For now, the boards on market are not providing a device tree
> > capable bootloader. Without a compatibility layer, the kernel support
> > for this boards can't rely on device tree.
> 
> There is a patch allowing for you to simply concatenate the appropriate 
> DTB data to the kernel zImage.  With this the existing bootloaders can 
> be used unchanged.

And I will end up with a kernel zImage per board...
It looks not very attractive.

Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110506/7fb7e60e/attachment.sig>

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

* [PATCH] kirkwood: add dir-665 support
  2011-05-06 15:41               ` Simon Guinot
@ 2011-05-06 20:59                 ` Nicolas Pitre
  0 siblings, 0 replies; 27+ messages in thread
From: Nicolas Pitre @ 2011-05-06 20:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 6 May 2011, Simon Guinot wrote:

> Hi Nicolas,
> 
> On Thu, May 05, 2011 at 03:55:39PM -0400, Nicolas Pitre wrote:
> > On Thu, 5 May 2011, Simon Guinot wrote:
> > 
> > > Hi Nicolas,
> > > 
> > > On Wed, May 04, 2011 at 09:51:27AM -0400, Nicolas Pitre wrote:
> > > > On Wed, 4 May 2011, Simon Guinot wrote:
> > > > 
> > > > > Hi Hirundo,
> > > > > 
> > > > > On Wed, May 04, 2011 at 10:54:52AM +0800, Hirundo Cam wrote:
> > > > > > Hi Mike and Simon,
> > > > > > 
> > > > > > I've send a machine submit to arm-linux, it generated the mach-types as
> > > > > > 
> > > > > > [stripped]
> > > > > > mx51_moray		MACH_MX51_MORAY		MX51_MORAY		3484
> > > > > > thales_cbc		MACH_THALES_CBC		THALES_CBC		3485
> > > > > > bluepoint		MACH_BLUEPOINT		BLUEPOINT		3486
> > > > > > dir665			MACH_DIR665		DIR665			3487
> > > > > > 
> > > > > > Is this correct for the DIR665 board using mv88f6281 chips?
> > > > > 
> > > > > It looks correct.
> > > > 
> > > > It may look correct, but I'll ask that you hang to it for a while as 
> > > > there is a desire to stop the addition of such board specific files to 
> > > > the kernel and move towards a solution such as device tree instead to 
> > > > represent those board details.
> > > 
> > > For my curiosity, how a device tree kernel will deal with ATAGs ?
> > 
> > The kernel may use either.  The DTB is meant to supersede ATAGs.
> 
> Ok. The board specific files are still needed to handle ATAGs (and "old"
> bootloader version), how it is possible to stop the addition of this
> files ?

Board specific files don't deal with ATAGs at all.  They merely provide 
static data for MPP configuration, GPIO definitions for LEDs or the 
like, flash partition layout, etc.  All this information may be encoded 
in a DTB which is passed to the kernel instead, and the kernel be 
generic for a variety of such configurations.

> > > Is there a compatibility layer planned ?
> > > 
> > > I mean... For now, the boards on market are not providing a device tree
> > > capable bootloader. Without a compatibility layer, the kernel support
> > > for this boards can't rely on device tree.
> > 
> > There is a patch allowing for you to simply concatenate the appropriate 
> > DTB data to the kernel zImage.  With this the existing bootloaders can 
> > be used unchanged.
> 
> And I will end up with a kernel zImage per board...
> It looks not very attractive.

If your bootloader can load an arbitrary blob of data into memory then 
you don't have to tie the DTB with zImage.


Nicolas

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

end of thread, other threads:[~2011-05-06 20:59 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 16:34 [PATCH] kirkwood: add dir-665 support Hirundo Cam
2011-04-27 23:52 ` Hirundo Cam
2011-05-03 15:55 ` Hirundo Cam
2011-05-03 20:51 ` mike at compulab.co.il
2011-05-04  2:36   ` Hirundo Cam
2011-05-04  2:54     ` Hirundo Cam
2011-05-04  3:00       ` Hirundo Cam
2011-05-04  6:32         ` Mike Rapoport
2011-05-04  8:09       ` Simon Guinot
2011-05-04 13:51         ` Nicolas Pitre
2011-05-05  0:23           ` Hirundo Cam
2011-05-05 15:06           ` Simon Guinot
2011-05-05 19:55             ` Nicolas Pitre
2011-05-06 15:41               ` Simon Guinot
2011-05-06 20:59                 ` Nicolas Pitre
2011-05-04  3:30   ` Hirundo Cam
2011-05-04  6:31     ` Mike Rapoport
2011-05-03 21:14 ` Simon Guinot
     [not found] ` <1304496346-13557-1-git-send-email-camhirundo@gmail.com>
2011-05-04  7:56   ` [PATCH v2] " Hirundo Cam
2011-05-04  8:16   ` Simon Guinot
2011-05-04  9:50     ` saeed bishara
2011-05-05  0:20       ` Hirundo Cam
2011-05-05  7:08         ` saeed bishara
2011-05-05 15:20           ` Hirundo Cam
2011-05-05  0:11     ` Hirundo Cam
2011-05-05  7:50       ` Simon Guinot
2011-05-04  9:23 ` [PATCH] " Jean-Christophe PLAGNIOL-VILLARD

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