kirkwood: add dir-665 support
Subsystems (2)
PATCH 1/1 kirkwood: add dir-665 support
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.
--- 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
arch/arm/mach-kirkwood/Kconfig +6 -0
@@ -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
arch/arm/mach-kirkwood/Makefile +1 -0
@@ -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
arch/arm/mach-kirkwood/mv88f6281_dir665.c new file +107 -0
107 lines not on this page · raw message
arch/arm/tools/mach-types +1 -0
@@ -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
Signature · 1 line
1.7.3.5
PATCH 1/1 kirkwood: add dir-665 support
Hi Russell and Nico,
2011/4/28 Hirundo Cam <[email protected]>
Quoted 7 lines
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. LEDs, GPIO, Buttons remains unknown.To use this patch, u-boot must also be modified.
Signed-off-by Hirundo Cam <[email protected]>
Could you please help to tell who can help on review and apply this patch? Thanks.
Regards,
Hirundo Cam.
PATCH 1/1 kirkwood: add dir-665 support
In reply to Hirundo CamHi Robin, Nicolas, and Mike
2011/4/28 Hirundo Cam <[email protected]>:
Quoted 5 lines
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. LEDs, GPIO, Buttons remains unknown.To use this patch, u-boot must also be modified.
Quoted 7 lines
Signed-off-by Hirundo Cam <[email protected]>---
?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.
PATCH 1/1 kirkwood: add dir-665 support
In reply to Hirundo CamHello Hirundo Cam,
I'm not Kirkwood expert, so my comments are quite general.
Quoted 19 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. LEDs, GPIO, Buttons remains unknown.To use this patch, u-boot must also be modified.
Signed-off-by Hirundo Cam <[email protected]>--- 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.carch/arm/mach-kirkwood/Kconfig +0
-0
arch/arm/mach-kirkwood/Kconfig config MACH_MV88F6281GTW_GE · line 31
Quoted 6 lines
arch/arm/mach-kirkwood/Kconfig +3
-0@@ -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"
Quoted 47 lines
arch/arm/mach-kirkwood/Kconfig +3
-0+ Say 'Y' here if you want your kernel to support the + 88F6281 DIR665 Board. + config MACH_SHEEVAPLUG bool "Marvell SheevaPlug Reference Board" helparch/arm/mach-kirkwood/Makefile +1
-0@@ -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.oarch/arm/mach-kirkwood/mv88f6281_dir665.c new file +23
-0@@ -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>
arch/arm/mach-kirkwood/mv88f6281_dir665.c line 33
Quoted 10 lines
arch/arm/mach-kirkwood/mv88f6281_dir665.c new file +10
-0+#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.
Quoted 78 lines
arch/arm/mach-kirkwood/mv88f6281_dir665.c new file +73
-0+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 arch/arm/tools/mach-types +0
-0
arch/arm/tools/mach-types ecuv5 MACH_ECUV5 ECUV5 3421 · line 1102
Quoted 4 lines
arch/arm/tools/mach-types +1
-0@@ -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.
PATCH 1/1 kirkwood: add dir-665 support
Hi Mike,
2011/5/4 <[email protected]>:
Quoted 3 lines
Hello Hirundo Cam,
I'm not Kirkwood expert, so my comments are quite general.
That's O.K.. It still helped other thing
Quoted 23 lines · Hirundo Cam
Quoted 22 lines
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. LEDs, GPIO, Buttons remains unknown.To use this patch, u-boot must also be modified.
Signed-off-by Hirundo Cam <[email protected]>---
?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.carch/arm/mach-kirkwood/Kconfig +0
-0@@ -26,6 +26,12 @@ config MACH_MV88F6281GTW_GE? ? ? ? Say 'Y' here if you want your kernel to support the ? ? ? ? Marvell 88F6281 GTW GE Board.
Quoted 6 lines
Quoted 3 lines
+config
MACH_MV88F6281_DIR665
+ ? ? bool "Marvell 88F6281 DIR665 Board"
+ ? ? helpCiting 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?
Quoted 3 lines
Please check what headers are actually needed. I belieive that
linux/input.h,linux/leds.h,linux/gpio.hand most probably many others can be safely removed.
Shouldn't I keep these stuff for future discovered LED and GPIOs?
Quoted 3 lines
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.
PATCH 1/1 kirkwood: add dir-665 support
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 3484thales_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
PATCH 1/1 kirkwood: add dir-665 support
Hi Mike and Simon
2011/5/4 Hirundo Cam <[email protected]>:
Quoted 11 lines
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? ? ? ? ? ? ?3484thales_cbc? ? ? ? ? ? ?MACH_THALES_CBC ? ? ? ?THALES_CBC? ? ? ? ? ? ?3485 bluepoint ? ? ? ? ? ? ?MACH_BLUEPOINT? ? ? ? ?BLUEPOINT ? ? ? ? ? ? ? 3486 dir665 ? ? ? ? ? ? ? ? ?MACH_DIR665 ? ? ? ? ? ? DIR665 ? ? ? ? ? ? ? ? ?3487Is 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!
PATCH 1/1 kirkwood: add dir-665 support
Quoted 13 lines · Hirundo Cam
Hi Mike and Simon
2011/5/4 Hirundo Cam <[email protected]>:
Quoted 10 lines
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
Quoted 4 lines
Quoted 1 line
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.
Quoted 1 line
Thanks!
Signature · 2 lines
Sincerely yours, Mike.
PATCH 1/1 kirkwood: add dir-665 support
In reply to Hirundo CamHi Hirundo,
Quoted 11 lines · Hirundo Cam
Hi Mike and Simon,
I've send a machine submit to arm-linux, it generated the mach-types as
[stripped]
mx51_morayMACH_MX51_MORAYMX51_MORAY3484thales_cbcMACH_THALES_CBCTHALES_CBC3485
bluepointMACH_BLUEPOINTBLUEPOINT 3486
dir665MACH_DIR665DIR665 3487Is 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>
PATCH 1/1 kirkwood: add dir-665 support
Quoted 13 lines · Simon Guinot
Hi Hirundo,
Quoted 10 lines · Hirundo Cam
Hi Mike and Simon,
I've send a machine submit to arm-linux, it generated the mach-types as
[stripped]
mx51_morayMACH_MX51_MORAYMX51_MORAY3484thales_cbcMACH_THALES_CBCTHALES_CBC3485
bluepointMACH_BLUEPOINTBLUEPOINT 3486
dir665MACH_DIR665DIR665 3487
Quoted 3 lines
Quoted 1 line
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
PATCH 1/1 kirkwood: add dir-665 support
Hi Nicolas,
Quoted 6 lines
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
PATCH 1/1 kirkwood: add dir-665 support
In reply to Nicolas PitreHi Nicolas,
Quoted 15 lines · Nicolas Pitre
Quoted 13 lines · Simon Guinot
Hi Hirundo,
Quoted 10 lines · Hirundo Cam
Hi Mike and Simon,
I've send a machine submit to arm-linux, it generated the mach-types as
[stripped]
mx51_morayMACH_MX51_MORAYMX51_MORAY3484thales_cbcMACH_THALES_CBCTHALES_CBC3485
bluepointMACH_BLUEPOINTBLUEPOINT 3486
dir665MACH_DIR665DIR665 3487
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
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.
Quoted 6 lines
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>
PATCH 1/1 kirkwood: add dir-665 support
Quoted 20 lines · Simon Guinot
Hi Nicolas,
Quoted 17 lines · Nicolas Pitre
Quoted 15 lines · Simon Guinot
Hi Hirundo,
Quoted 11 lines · Hirundo Cam
Hi Mike and Simon,
I've send a machine submit to arm-linux, it generated the mach-types as
[stripped]
mx51_morayMACH_MX51_MORAYMX51_MORAY3484thales_cbcMACH_THALES_CBCTHALES_CBC3485
bluepointMACH_BLUEPOINTBLUEPOINT 3486
dir665MACH_DIR665DIR665 3487Is this correct for the DIR665 board using mv88f6281 chips?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
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.
Quoted 5 lines
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
PATCH 1/1 kirkwood: add dir-665 support
Hi Nicolas,
Quoted 24 lines · Nicolas Pitre
Quoted 22 lines · Simon Guinot
Hi Nicolas,
Quoted 19 lines · Nicolas Pitre
Quoted 16 lines · Simon Guinot
Hi Hirundo,
Quoted 11 lines · Hirundo Cam
Hi Mike and Simon,
I've send a machine submit to arm-linux, it generated the mach-types as
[stripped]
mx51_morayMACH_MX51_MORAYMX51_MORAY3484thales_cbcMACH_THALES_CBCTHALES_CBC3485
bluepointMACH_BLUEPOINTBLUEPOINT 3486
dir665MACH_DIR665DIR665 3487Is this correct for the DIR665 board using mv88f6281 chips?
It looks correct.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
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 ?
Quoted 10 lines
Quoted 6 lines
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>
PATCH 1/1 kirkwood: add dir-665 support
Quoted 32 lines · Simon Guinot
Hi Nicolas,
Quoted 29 lines · Nicolas Pitre
Quoted 27 lines · Simon Guinot
Hi Nicolas,
Quoted 23 lines · Nicolas Pitre
Quoted 13 lines · Simon Guinot
Hi Hirundo,
Quoted 10 lines · Hirundo Cam
Hi Mike and Simon,
I've send a machine submit to arm-linux, it generated the mach-types as
[stripped]
mx51_morayMACH_MX51_MORAYMX51_MORAY3484thales_cbcMACH_THALES_CBCTHALES_CBC3485
bluepointMACH_BLUEPOINTBLUEPOINT 3486
dir665MACH_DIR665DIR665 3487Quoted 3 lines
Quoted 1 line
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.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
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.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
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.
Quoted 6 lines
Quoted 3 lines
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
PATCH 1/1 kirkwood: add dir-665 support
In reply to mike at compulab.co.ilHi Mike,
Quoted 6 lines
Quoted 3 lines
+config
MACH_MV88F6281_DIR665
+ ? ? bool "Marvell 88F6281 DIR665 Board"
+ ? ? helpCiting 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
PATCH 1/1 kirkwood: add dir-665 support
Quoted 6 lines · Hirundo Cam
Hi Mike,
Quoted 4 lines
Quoted 3 lines
arch/arm/mach-kirkwood/Kconfig +3
-0+config MACH_MV88F6281_DIR665 + bool "Marvell 88F6281 DIR665 Board" + help
Quoted 8 lines
Quoted 2 lines
Citing checkpatch.pl:
"WARNIING: please write a paragraph that describes the config symbol fully"I've removed
Kconfigand re-add theKconfigin my git repo. (rm is 1 commit, and the add is the following commit) And then I've found most of those paragraph is thisKconfighas 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.
Quoted 2 lines
Regards,
Hirundo Cam
Signature · 2 lines
Sincerely yours, Mike.
PATCH 1/1 kirkwood: add dir-665 support
In reply to Hirundo CamHi Hirundo,
Quoted 2 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. LEDs, GPIO, Buttons remains unknown.
You could use the GPIO sysfs API to discover the LEDs and buttons GPIOs.
Quoted 2 lines
To use this patch, u-boot must also be modified.
What kind of modifications ?
Quoted 15 lines
Signed-off-by Hirundo Cam <[email protected]>--- 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.carch/arm/mach-kirkwood/Kconfig +0
-0
arch/arm/mach-kirkwood/Kconfig config MACH_MV88F6281GTW_GE · line 34
Quoted 9 lines
arch/arm/mach-kirkwood/Kconfig +6
-0@@ -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>
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 kirkwood: add dir-665 support
Hi all,
2011/5/4 Hirundo Cam <[email protected]>:
Quoted 6 lines
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. LEDs, GPIO, Buttons remains unknown.To use this patch, on board u-boot must also be recompiled and replaced.
Signed-off-by Hirundo Cam <[email protected]>
Quoted 8 lines
---
Changes for V2
?- Remove mach-type and register a new machine to
? ?http://www.arm.linux.org.uk/developer/machines/
?- Replacemv88f6281_dir665to dir665 according to Simon's suggestion. ?- Renamemv88f6281_dir665.ctodir665-setup.c
?- Removeinclude/leds.h,gpio.h,input.h,gpiokey.haccording 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
PATCH v2 1/1 kirkwood: add dir-665 support
In reply to a message not in the archiveHi Hirundo,
Quoted 4 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. 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>
PATCH v2 1/1 kirkwood: add dir-665 support
Quoted 5 lines · Simon Guinot
Hi Hirundo,
Quoted 2 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. 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
PATCH v2 1/1 kirkwood: add dir-665 support
Hi Saeed and Nicolas,
2011/5/4 saeed bishara <[email protected]>:
Quoted 11 lines · Simon Guinot
Quoted 5 lines
Hi Hirundo,
Quoted 2 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. 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.
Quoted 4 lines
? please have a look at
sheevaplug-setup.cto 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
PATCH v2 1/1 kirkwood: add dir-665 support
Quoted 11 lines · Hirundo Cam
Hi Saeed and Nicolas,
2011/5/4 saeed bishara <[email protected]>:
Quoted 7 lines · Simon Guinot
Quoted 5 lines
Hi Hirundo,
Quoted 2 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. LEDs, GPIO, Buttons remains unknown.Hirundo,
Quoted 8 lines
Quoted 3 lines
? 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_geboard on hand.
However, After I've looked into the setup file ofmv88f6281gtw_ge. I've found that the NOR flash, ddr2 DRAM, switch chip, ethernet port define are differ frommv88f6281gtw_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.
Quoted 4 lines
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.
Quoted 6 lines
Quoted 5 lines
? please have a look at
sheevaplug-setup.cto see how multiple boards supported in same setup file.
saeed
Quoted 6 lines
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_geis good. At least I've tried kernel image compiled withmv88f6281gtw_geoption 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
Quoted 4 lines
Regards,
Hirundo Cam
PATCH v2 1/1 kirkwood: add dir-665 support
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!
PATCH v2 1/1 kirkwood: add dir-665 support
In reply to Simon GuinotHi Simon
2011/5/4 Simon Guinot <[email protected]>:
Quoted 12 lines
Hi Hirundo,
Quoted 4 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. 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
PATCH v2 1/1 kirkwood: add dir-665 support
Hi Hirundo,
Quoted 13 lines · Hirundo Cam
Hi Simon
2011/5/4 Simon Guinot <[email protected]>:
Quoted 10 lines
Hi Hirundo,
Quoted 4 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. 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 ?
Quoted 7 lines
Quoted 2 lines
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
Quoted 4 lines
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.
Quoted 2 lines
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>
PATCH 1/1 kirkwood: add dir-665 support
In reply to Hirundo CamQuoted 4 lines · Hirundo Cam
This patch is a hack to dir-665 by referencing
mv88f6281gtw_geboard. 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.