kirkwood: combine support for openrd base/client support
Subsystems (2)
PATCH 1/1 kirkwood: combine support for openrd base/client support
Based on the work done by Dhaval Vasa to add OpenRD Base support (and the unmerged Client) support, this patch adds support for the Kirkwood OpenRD Client board.
I was 'inspired' by the work Hartley Sweeten had done in flattening mach-ep93xx into a single setup.c file; as there is really not much difference between the OpenRD Base and Client boards I think it is appropriate to do the same here.
arch/arm/mach-kirkwood/Kconfig +11 -0
@@ -38,12 +38,23 @@ config MACH_TS219 Say 'Y' here if you want your kernel to support the QNAP TS-119 and TS-219 Turbo NAS devices. +config MACH_OPENRD + bool + config MACH_OPENRD_BASE bool "Marvell OpenRD Base Board" + select MACH_OPENRD help Say 'Y' here if you want your kernel to support the Marvell OpenRD Base Board. +config MACH_OPENRD_CLIENT + bool "Marvell OpenRD Client Board" + select MACH_OPENRD + help + Say 'Y' here if you want your kernel to support the + Marvell OpenRD Client Board. + endmenu endif
arch/arm/mach-kirkwood/Makefile +1 -1
@@ -6,6 +6,6 @@ obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o obj-$(CONFIG_MACH_TS219) += ts219-setup.o -obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o +obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o
arch/arm/mach-kirkwood/openrd-setup.c new file +109 -0
109 lines not on this page · raw message
arch/arm/mach-kirkwood/openrd_base-setup.c deleted +0 -84
84 lines not on this page · raw message
PATCH 1/1 kirkwood: combine support for openrd base/client support
Hi,
Quoted 5 lines · Alexander Clouter
Based on the work done by Dhaval Vasa to add OpenRD Base support (and the unmerged Client) support, this patch adds support for the Kirkwood OpenRD Client board.
I should say this patch has only been testing on the OpenRD Client as I do not have the Base board available to tinker with.
Cheers
Signature · 2 lines
Alexander Clouter .sigmonster says: Money is better than poverty, if only for financial reasons.
PATCH 1/1 kirkwood: combine support for openrd base/client support
In reply to Alexander ClouterHi Alexander,
Quoted 127 lines
Based on the work done by Dhaval Vasa to add OpenRD Base support (and the unmerged Client) support, this patch adds support for the Kirkwood OpenRD Client board.
I was 'inspired' by the work Hartley Sweeten had done in flattening mach-ep93xx into a single
setup.cfile; as there is really not much difference between the OpenRD Base and Client boards I think it is appropriate to do the same here.Signed-off-by Alexander Clouter <[email protected]>arch/arm/mach-kirkwood/Kconfig +11
-0@@ -38,12 +38,23 @@ config MACH_TS219 Say 'Y' here if you want your kernel to support the QNAP TS-119 and TS-219 Turbo NAS devices. +config MACH_OPENRD + bool + config MACH_OPENRD_BASE bool "Marvell OpenRD Base Board" + select MACH_OPENRD help Say 'Y' here if you want your kernel to support the Marvell OpenRD Base Board. +config MACH_OPENRD_CLIENT + bool "Marvell OpenRD Client Board" + select MACH_OPENRD + help + Say 'Y' here if you want your kernel to support the + Marvell OpenRD Client Board. + endmenu endifarch/arm/mach-kirkwood/Makefile +1
-1@@ -6,6 +6,6 @@ obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o obj-$(CONFIG_MACH_TS219) += ts219-setup.o -obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o +obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o obj-$(CONFIG_CPU_IDLE) += cpuidle.oarch/arm/mach-kirkwood/openrd-setup.c new file +70
-0@@ -0,0 +1,109 @@ +/* +* arch/arm/mach-kirkwood/openrd-setup.c +* +* Marvell OpenRD (Base|Client) 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/mtd/partitions.h> +#include <linux/ata_platform.h> +#include <linux/mv643xx_eth.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <mach/kirkwood.h> +#include <plat/mvsdio.h> +#include "common.h" +#include "mpp.h" + +static struct mtd_partition openrd_nand_parts[] = { + { + .name ="u-boot" , + .offset =0 , + .size =SZ_1M + }, { + .name ="uImage" , + .offset =MTDPART_OFS_NXTBLK , + .size =SZ_4M + }, { + .name ="root" , + .offset =MTDPART_OFS_NXTBLK , + .size =MTDPART_SIZ_FULL + }, +}; + +static struct mv643xx_eth_platform_data openrd_ge00_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (8 ), +}; + +#ifdef CONFIG_MACH_OPENRD_CLIENT +static struct mv643xx_eth_platform_data openrd_ge01_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (18 ), +}; +#endif + +static struct mv_sata_platform_data openrd_sata_data = { + .n_ports =2 , +}; + +static struct mvsdio_platform_data openrd_mvsdio_data = { + .gpio_card_detect =29 ,/* MPP29 used as SD card detect */ +}; + +static unsigned int openrd_mpp_config[]__initdata = { +MPP29_GPIO , +0 +}; + +static void __init openrd_init (void ) +{ +/* +* Basic setup. Needs to be called early. +*/ +kirkwood_init (); +kirkwood_mpp_conf (openrd_mpp_config); +
arch/arm/mach-kirkwood/openrd-setup.c line 80
Quoted 10 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +10
-0+kirkwood_uart0_init (); +kirkwood_nand_init (ARRAY_AND_SIZE (openrd_nand_parts),25 ); + +kirkwood_ehci_init (); + +kirkwood_ge00_init (&openrd_ge00_data); +#ifdef CONFIG_MACH_OPENRD_CLIENT +if (machine_is_openrd_client ()) +kirkwood_ge01_init (&openrd_ge01_data); +#endif
shouldn't it be enough to have the if(machine_is.... statement? I didn't see why you test #ifdef, too?
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.html
I have to leave now, but on monday I will do the test of your patch on my openrd-base board!
Many thanks,
Dieter
PATCH 1/1 kirkwood: combine support for openrd base/client support
Alexander, Dieter,
I will test it on saturday.
- Dhaval
Quoted 157 lines · Dieter Kiermaier
Hi Alexander,
Quoted 127 lines
Based on the work done by Dhaval Vasa to add OpenRD Base support (and the unmerged Client) support, this patch adds support for the Kirkwood OpenRD Client board.
I was 'inspired' by the work Hartley Sweeten had done in flattening mach-ep93xx into a single
setup.cfile; as there is really not much difference between the OpenRD Base and Client boards I think it is appropriate to do the same here.Signed-off-by Alexander Clouter <[email protected]>arch/arm/mach-kirkwood/Kconfig +11
-0@@ -38,12 +38,23 @@ config MACH_TS219 Say 'Y' here if you want your kernel to support the QNAP TS-119 and TS-219 Turbo NAS devices. +config MACH_OPENRD + bool + config MACH_OPENRD_BASE bool "Marvell OpenRD Base Board" + select MACH_OPENRD help Say 'Y' here if you want your kernel to support the Marvell OpenRD Base Board. +config MACH_OPENRD_CLIENT + bool "Marvell OpenRD Client Board" + select MACH_OPENRD + help + Say 'Y' here if you want your kernel to support the + Marvell OpenRD Client Board. + endmenu endifarch/arm/mach-kirkwood/Makefile +1
-1@@ -6,6 +6,6 @@ obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o obj-$(CONFIG_MACH_TS219) += ts219-setup.o -obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o +obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o obj-$(CONFIG_CPU_IDLE) += cpuidle.oarch/arm/mach-kirkwood/openrd-setup.c new file +70
-0@@ -0,0 +1,109 @@ +/* +* arch/arm/mach-kirkwood/openrd-setup.c +* +* Marvell OpenRD (Base|Client) 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/mtd/partitions.h> +#include <linux/ata_platform.h> +#include <linux/mv643xx_eth.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <mach/kirkwood.h> +#include <plat/mvsdio.h> +#include "common.h" +#include "mpp.h" + +static struct mtd_partition openrd_nand_parts[] = { + { + .name ="u-boot" , + .offset =0 , + .size =SZ_1M + }, { + .name ="uImage" , + .offset =MTDPART_OFS_NXTBLK , + .size =SZ_4M + }, { + .name ="root" , + .offset =MTDPART_OFS_NXTBLK , + .size =MTDPART_SIZ_FULL + }, +}; + +static struct mv643xx_eth_platform_data openrd_ge00_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (8 ), +}; + +#ifdef CONFIG_MACH_OPENRD_CLIENT +static struct mv643xx_eth_platform_data openrd_ge01_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (18 ), +}; +#endif + +static struct mv_sata_platform_data openrd_sata_data = { + .n_ports =2 , +}; + +static struct mvsdio_platform_data openrd_mvsdio_data = { + .gpio_card_detect =29 ,/* MPP29 used as SD card detect */ +}; + +static unsigned int openrd_mpp_config[]__initdata = { +MPP29_GPIO , +0 +}; + +static void __init openrd_init (void ) +{ +/* +* Basic setup. Needs to be called early. +*/ +kirkwood_init (); +kirkwood_mpp_conf (openrd_mpp_config); +arch/arm/mach-kirkwood/openrd-setup.c line 80
Quoted 10 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +10
-0+kirkwood_uart0_init (); +kirkwood_nand_init (ARRAY_AND_SIZE (openrd_nand_parts),25 ); + +kirkwood_ehci_init (); + +kirkwood_ge00_init (&openrd_ge00_data); +#ifdef CONFIG_MACH_OPENRD_CLIENT +if (machine_is_openrd_client ()) +kirkwood_ge01_init (&openrd_ge01_data); +#endif shouldn't it be enough to have the if(machine_is.... statement? I didn't see why you test #ifdef, too?
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.htmlI have to leave now, but on monday I will do the test of your patch on my openrd-base board!
Many thanks,
DieterEmail Scanned for Virus & Dangerous Content by : www.CleanMailGateway.com
Signature · 15 lines
_____________________________________________________________________ Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated.Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. _____________________________________________________________________
PATCH 1/1 kirkwood: combine support for openrd base/client support
In reply to Dieter KiermaierAlexander, Dieter,
I will test it on Saturday. And take care of i2c, pcie inits.
- Dhaval
Quoted 157 lines · Dieter Kiermaier
Hi Alexander,
Quoted 127 lines
Based on the work done by Dhaval Vasa to add OpenRD Base support (and the unmerged Client) support, this patch adds support for the Kirkwood OpenRD Client board.
I was 'inspired' by the work Hartley Sweeten had done in flattening mach-ep93xx into a single
setup.cfile; as there is really not much difference between the OpenRD Base and Client boards I think it is appropriate to do the same here.Signed-off-by Alexander Clouter <[email protected]>arch/arm/mach-kirkwood/Kconfig +11
-0@@ -38,12 +38,23 @@ config MACH_TS219 Say 'Y' here if you want your kernel to support the QNAP TS-119 and TS-219 Turbo NAS devices. +config MACH_OPENRD + bool + config MACH_OPENRD_BASE bool "Marvell OpenRD Base Board" + select MACH_OPENRD help Say 'Y' here if you want your kernel to support the Marvell OpenRD Base Board. +config MACH_OPENRD_CLIENT + bool "Marvell OpenRD Client Board" + select MACH_OPENRD + help + Say 'Y' here if you want your kernel to support the + Marvell OpenRD Client Board. + endmenu endifarch/arm/mach-kirkwood/Makefile +1
-1@@ -6,6 +6,6 @@ obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o obj-$(CONFIG_MACH_TS219) += ts219-setup.o -obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o +obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o obj-$(CONFIG_CPU_IDLE) += cpuidle.oarch/arm/mach-kirkwood/openrd-setup.c new file +70
-0@@ -0,0 +1,109 @@ +/* +* arch/arm/mach-kirkwood/openrd-setup.c +* +* Marvell OpenRD (Base|Client) 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/mtd/partitions.h> +#include <linux/ata_platform.h> +#include <linux/mv643xx_eth.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <mach/kirkwood.h> +#include <plat/mvsdio.h> +#include "common.h" +#include "mpp.h" + +static struct mtd_partition openrd_nand_parts[] = { + { + .name ="u-boot" , + .offset =0 , + .size =SZ_1M + }, { + .name ="uImage" , + .offset =MTDPART_OFS_NXTBLK , + .size =SZ_4M + }, { + .name ="root" , + .offset =MTDPART_OFS_NXTBLK , + .size =MTDPART_SIZ_FULL + }, +}; + +static struct mv643xx_eth_platform_data openrd_ge00_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (8 ), +}; + +#ifdef CONFIG_MACH_OPENRD_CLIENT +static struct mv643xx_eth_platform_data openrd_ge01_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (18 ), +}; +#endif + +static struct mv_sata_platform_data openrd_sata_data = { + .n_ports =2 , +}; + +static struct mvsdio_platform_data openrd_mvsdio_data = { + .gpio_card_detect =29 ,/* MPP29 used as SD card detect */ +}; + +static unsigned int openrd_mpp_config[]__initdata = { +MPP29_GPIO , +0 +}; + +static void __init openrd_init (void ) +{ +/* +* Basic setup. Needs to be called early. +*/ +kirkwood_init (); +kirkwood_mpp_conf (openrd_mpp_config); +arch/arm/mach-kirkwood/openrd-setup.c line 80
Quoted 10 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +10
-0+kirkwood_uart0_init (); +kirkwood_nand_init (ARRAY_AND_SIZE (openrd_nand_parts),25 ); + +kirkwood_ehci_init (); + +kirkwood_ge00_init (&openrd_ge00_data); +#ifdef CONFIG_MACH_OPENRD_CLIENT +if (machine_is_openrd_client ()) +kirkwood_ge01_init (&openrd_ge01_data); +#endif shouldn't it be enough to have the if(machine_is.... statement? I didn't see why you test #ifdef, too?
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.htmlI have to leave now, but on monday I will do the test of your patch on my openrd-base board!
Many thanks,
DieterEmail Scanned for Virus & Dangerous Content by : www.CleanMailGateway.com
Signature · 15 lines
_____________________________________________________________________ Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated.Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. _____________________________________________________________________
PATCH 1/1 kirkwood: combine support for openrd base/client support
In reply to Dieter KiermaierHi,
Quoted 16 lines · Dieter Kiermaier
[snipped]
Quoted 13 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +13
-0+static void __init openrd_init (void ) +{ +/* +* Basic setup. Needs to be called early. +*/ +kirkwood_init (); +kirkwood_mpp_conf (openrd_mpp_config); + +kirkwood_uart0_init (); +kirkwood_nand_init (ARRAY_AND_SIZE (openrd_nand_parts),25 ); + +kirkwood_ehci_init (); +
Quoted 9 lines
arch/arm/mach-kirkwood/openrd-setup.c line 80
Quoted 5 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +5
-0+kirkwood_ge00_init (&openrd_ge00_data); +#ifdef CONFIG_MACH_OPENRD_CLIENT +if (machine_is_openrd_client ()) +kirkwood_ge01_init (&openrd_ge01_data); +#endif shouldn't it be enough to have the if(machine_is.... statement? I didn't see why you test #ifdef, too?
the struct 'openrd_ge01_data' is wrapped in
#ifdef CONFIG_MACH_OPENRD_CLIENT too and only exists if you want the board support for it. So although machine_is_openrd_client() will exist, the compiler will barf that openrd_ge01_data does not exist; the alternative is to have it grumble (when you do not want the Client support) that there is an un-used struct floating about.
I was under the impression the latter is considered worse than the former, I personally am not bothered either way.
Quoted 5 lines
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.html
I knew someone was going to say that :) Will do though, so 'watch this space'.
Cheers
Signature · 3 lines
Alexander Clouter
.sigmonster says: Vini, vidi, Linux!
-- Unknown sourcePATCH 1/1 kirkwood: combine support for openrd base/client support
Hi Alexander,
Quoted 35 lines
Hi,
Quoted 16 lines · Dieter Kiermaier
[snipped]
Quoted 13 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +13
-0+static void __init openrd_init (void ) +{ +/* +* Basic setup. Needs to be called early. +*/ +kirkwood_init (); +kirkwood_mpp_conf (openrd_mpp_config); + +kirkwood_uart0_init (); +kirkwood_nand_init (ARRAY_AND_SIZE (openrd_nand_parts),25 ); + +kirkwood_ehci_init (); +Quoted 9 lines
arch/arm/mach-kirkwood/openrd-setup.c line 80
Quoted 5 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +5
-0+kirkwood_ge00_init (&openrd_ge00_data); +#ifdef CONFIG_MACH_OPENRD_CLIENT +if (machine_is_openrd_client ()) +kirkwood_ge01_init (&openrd_ge01_data); +#endif shouldn't it be enough to have the if(machine_is.... statement? I didn't see why you test #ifdef, too?
the struct '
openrd_ge01_data' is wrapped in
#ifdefCONFIG_MACH_OPENRD_CLIENTtoo and only exists if you want the board support for it. So althoughmachine_is_openrd_client()will exist, the compiler will barf thatopenrd_ge01_datadoes not exist; the alternative is to have it grumble (when you do not want the Client support) that there is an un-used struct floating about.
Quoted 3 lines
I was under the impression the latter is considered worse than the former, I personally am not bothered either way.
Ah, ok. I didn't stumble over that. I just wonder why doing 2 times the same...
Quoted 10 lines
Quoted 5 lines
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.html
I knew someone was going to say that :) Will do though, so 'watch this space'.
Cheers
Many thanks and have a nice weekend,
Dieter
PATCH 1/1 kirkwood: combine support for openrd base/client support
In reply to Alexander ClouterQuoted 28 lines · Alexander Clouter
Hi,
Quoted 16 lines · Dieter Kiermaier
[snipped]
Quoted 13 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +13
-0+static void __init openrd_init (void ) +{ +/* +* Basic setup. Needs to be called early. +*/ +kirkwood_init (); +kirkwood_mpp_conf (openrd_mpp_config); + +kirkwood_uart0_init (); +kirkwood_nand_init (ARRAY_AND_SIZE (openrd_nand_parts),25 ); + +kirkwood_ehci_init (); +Quoted 9 lines
arch/arm/mach-kirkwood/openrd-setup.c line 80
Quoted 5 lines
arch/arm/mach-kirkwood/openrd-setup.c new file +5
-0+kirkwood_ge00_init (&openrd_ge00_data); +#ifdef CONFIG_MACH_OPENRD_CLIENT +if (machine_is_openrd_client ()) +kirkwood_ge01_init (&openrd_ge01_data); +#endif shouldn't it be enough to have the if(machine_is.... statement? I didn't see why you test #ifdef, too?
Quoted 4 lines
the struct '
openrd_ge01_data' is wrapped in
#ifdefCONFIG_MACH_OPENRD_CLIENTtoo and only exists if you want the board support for it. So althoughmachine_is_openrd_client()will exist, the compiler will barf thatopenrd_ge01_datadoes not exist;
Don't put a #ifdef on it either then.
Quoted 2 lines
the alternative is to have it grumble (when you do not want the Client support) that there is an un-used struct floating about.
That shouldn't happen. It will still be referenced by the
if (machine_is_openrd_client()) kirkwood_ge01_init(&openrd_ge01_data);
and when the Client support is not configured in, then the machine_is_openrd_client() is turned into a 0 which makes gcc nicely optimize the unused code and static data structures away.
Quoted 2 lines
I was under the impression the latter is considered worse than the former, I personally am not bothered either way.
Did you try the later?
Quoted 7 lines
Quoted 5 lines
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.html
I knew someone was going to say that :) Will do though, so 'watch this space'.
Being a separate issue, this probably should remain a separate patch. My position is that the missing PCI init call could go upstream now whereas the consolidation patch would need to wait for the next merge window.
Nicolas
PATCH 1/1 kirkwood: combine support for openrd base/client?support
Hi,
Quoted 10 lines · Nicolas Pitre
Quoted 4 lines · Alexander Clouter
the struct '
openrd_ge01_data' is wrapped in
#ifdefCONFIG_MACH_OPENRD_CLIENTtoo and only exists if you want the board support for it. So althoughmachine_is_openrd_client()will exist, the compiler will barf thatopenrd_ge01_datadoes not exist;Don't put a #ifdef on it either then.
Okay...
Quoted 12 lines
Quoted 2 lines
the alternative is to have it grumble (when you do not want the Client support) that there is an un-used struct floating about.
That shouldn't happen. It will still be referenced by the
if (machine_is_openrd_client()) kirkwood_ge01_init(&openrd_ge01_data);and when the Client support is not configured in, then the
machine_is_openrd_client()is turned into a 0 which makes gcc nicely optimize the unused code and static data structures away.
I pondered if the compiler did that but thought as the Linux kernel is littered with ifdef's anyway, a few more cannot hurt :)
Quoted 5 lines
Quoted 2 lines
I was under the impression the latter is considered worse than the former, I personally am not bothered either way.
Did you try the later?
Nope, but I just have now and you are quite right. All ifdef's nuked from orbit.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.html
Quoted 8 lines
Quoted 2 lines
I knew someone was going to say that :) Will do though, so 'watch this space'.
Being a separate issue, this probably should remain a separate patch. My position is that the missing PCI init call could go upstream now whereas the consolidation patch would need to wait for the next merge window.
That's fine with me, I was just throwing the patch out there to see how people felt about the consolidation and also as since August[1] the OpenRD Client had not been mentioned on the mailing list.
Cheers
[1] http://lkml.org/lkml/2009/8/19/115
Signature · 2 lines
Alexander Clouter .sigmonster says: Memory fault -- brain fried
PATCH 1/1 kirkwood: combine support for openrd base/client support
In reply to Dieter KiermaierHi,
Quoted 7 lines · Dieter Kiermaier
[snipped]
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.html
Well on my Client board I get:
----
northdown:~# dmesg | grep -i PCI pci 0000:00:00.0: reg 10 64bit mmio pref: [0xf1000000-0xf10fffff] pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff] pci 0000:00:00.0: supports D1 D2 PCI: bus0: Fast back to back transfers disabled
northdown:~# lspci -vvv
00:00.0 Memory controller: Marvell Technology Group Ltd. Device 6281 (rev 02)
Subsystem: Marvell Technology Group Ltd. Device 11ab
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 9
Region 0: Memory@<ignored> (64-bit, prefetchable)
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [60] Express (v1) Root Port (Slot-), MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <1us
ExtTag- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 unlimited
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
RootCap: CRSVisible-
RootSta: PME ReqID 0000, PMEStatus- PMEPending-
Capabilities: [100] Advanced Error Reporting <?>
----I guess it is working fine, however as there is no PCI(e) slot to use, I'm going to disable the call for the OpenRD Client as it's pointless; unless someone objects?
Cheers
Signature · 2 lines
Alexander Clouter .sigmonster says: Dyslexia means never having to say that you're ysror.
PATCH 1/1 kirkwood: combine support for openrd base/client support
Hi Alexander,
Quoted 49 lines
Hi,
Quoted 7 lines · Dieter Kiermaier
[snipped]
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.htmlWell on my Client board I get:
----northdown:~# dmesg | grep -i PCI pci 0000:00:00.0: reg 10 64bit mmio pref: [0xf1000000-0xf10fffff] pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff] pci 0000:00:00.0: supports D1 D2 PCI: bus0: Fast back to back transfers disablednorthdown:~# lspci -vvv 00:00.0 Memory controller: Marvell Technology Group Ltd. Device 6281 (rev 02) Subsystem: Marvell Technology Group Ltd. Device 11ab Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 9 Region 0: Memory at <ignored> (64-bit, prefetchable) Capabilities: [40] Power Management version 3 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Address: 0000000000000000 Data: 0000 Capabilities: [60] Express (v1) Root Port (Slot-), MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <1us ExtTag- RBE+ FLReset- DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend- LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 unlimited ClockPM+ Suprise- LLActRep- BwNot- LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk- ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible- RootCap: CRSVisible- RootSta: PME ReqID 0000, PMEStatus- PMEPending- Capabilities: [100] Advanced Error Reporting <?> ----
Quoted 3 lines
I guess it is working fine, however as there is no PCI(e) slot to use, I'm going to disable the call for the OpenRD Client as it's pointless; unless someone objects?
Hm, I guess on your client board there is the VGA controller connected to the PCIe port? So I would left the pcie init call active!
Dieter
Quoted 3 lines
Cheers
PATCH 1/1 kirkwood: combine support for openrd base/client support
Hi,
Quoted 48 lines · Dieter Kiermaier
Quoted 48 lines · Dieter Kiermaier
Quoted 7 lines
[snipped]
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.htmlWell on my Client board I get:
----northdown:~# dmesg | grep -i PCI pci 0000:00:00.0: reg 10 64bit mmio pref: [0xf1000000-0xf10fffff] pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff] pci 0000:00:00.0: supports D1 D2 PCI: bus0: Fast back to back transfers disablednorthdown:~# lspci -vvv 00:00.0 Memory controller: Marvell Technology Group Ltd. Device 6281 (rev 02) Subsystem: Marvell Technology Group Ltd. Device 11ab Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 9 Region 0: Memory at <ignored> (64-bit, prefetchable) Capabilities: [40] Power Management version 3 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Address: 0000000000000000 Data: 0000 Capabilities: [60] Express (v1) Root Port (Slot-), MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <1us ExtTag- RBE+ FLReset- DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend- LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 unlimited ClockPM+ Suprise- LLActRep- BwNot- LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk- ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible- RootCap: CRSVisible- RootSta: PME ReqID 0000, PMEStatus- PMEPending- Capabilities: [100] Advanced Error Reporting <?> ----
Quoted 7 lines
Quoted 3 lines
I guess it is working fine, however as there is no PCI(e) slot to use, I'm going to disable the call for the OpenRD Client as it's pointless; unless someone objects?
Hm, I guess on your client board there is the VGA controller connected to the PCIe port? So I would left the pcie init call active!
God knows *why* someone put a VGA port (and soundcard) on there mind you but yes it is there. It does not seem to actually be on the PCI bus mind you (according to 'lspci').
If you can point out where I should be looking, I will have a look and if I can find it I will enable it.
Cheers
Signature · 2 lines
Alexander Clouter .sigmonster says: American by birth; Texan by the grace of God.
PATCH 1/1 kirkwood: combine support for openrd base/client support
Alexander,
Quoted 58 lines
Hi,
Quoted 48 lines · Dieter Kiermaier
Quoted 48 lines · Dieter Kiermaier
Quoted 7 lines
[snipped]
Additionally it would be nice, if you could integrate the i2c / pcie init in your patch? Please see Simons patch at:
http://lists.infradead.org/pipermail/linux-arm-kernel/2009-October/001950.htmlWell on my Client board I get:
----northdown:~# dmesg | grep -i PCI pci 0000:00:00.0: reg 10 64bit mmio pref: [0xf1000000-0xf10fffff] pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1fffffff] pci 0000:00:00.0: supports D1 D2 PCI: bus0: Fast back to back transfers disablednorthdown:~# lspci -vvv 00:00.0 Memory controller: Marvell Technology Group Ltd. Device 6281 (rev 02) Subsystem: Marvell Technology Group Ltd. Device 11ab Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 9 Region 0: Memory at <ignored> (64-bit, prefetchable) Capabilities: [40] Power Management version 3 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME- Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Address: 0000000000000000 Data: 0000 Capabilities: [60] Express (v1) Root Port (Slot-), MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <1us ExtTag- RBE+ FLReset- DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend- LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 unlimited ClockPM+ Suprise- LLActRep- BwNot- LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk- ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible- RootCap: CRSVisible- RootSta: PME ReqID 0000, PMEStatus- PMEPending- Capabilities: [100] Advanced Error Reporting <?> ----Quoted 7 lines
Quoted 3 lines
I guess it is working fine, however as there is no PCI(e) slot to use, I'm going to disable the call for the OpenRD Client as it's pointless; unless someone objects?
Hm, I guess on your client board there is the VGA controller connected to the PCIe port? So I would left the pcie init call active!
Quoted 6 lines
God knows *why* someone put a VGA port (and soundcard) on there mind you but yes it is there. It does not seem to actually be on the PCI bus mind you (according to 'lspci').
If you can point out where I should be looking, I will have a look and if I can find it I will enable it.
I'm sorry, but I haven't an openrd-client board :( Maybe someone else can help us?
Dieter
Quoted 3 lines
Cheers
PATCH 1/1 kirkwood: combine support for openrd base/client support
Hello,
Quoted 5 lines · Dieter Kiermaier
Quoted 2 lines
If you can point out where I should be looking, I will have a look and if I can find it I will enable it.
I'm sorry, but I haven't an openrd-client board :( Maybe someone else can help us?
I have tested Alexander's patch on my openrd-client board, applied to Linus' tree. It boots and networking works fine.
I also added calls to initialise i2c and pcie based on the patch by Simon Kagstrom, and both devices appear to work. The diff I added is attached.
# i2cdetect -l i2c-0 i2c mv64xxx_i2c adapter I2C adapter
# lspci -v 00:00.0 Memory controller: Marvell Technology Group Ltd. Device 6281 (rev 02) Subsystem: Marvell Technology Group Ltd. Device 11ab Flags: bus master, fast devsel, latency 0, IRQ 9 Memory at <ignored> (64-bit, prefetchable) Capabilities: [40] Power Management version 3 Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [60] Express Root Port (Slot-), MSI 00 Capabilities: [100] Advanced Error Reporting
00:01.0 VGA compatible controller: XGI Technology Inc. (eXtreme Graphics Innovation) Z11/Z11M (prog-if 00 [VGA controller])
Flags: bus master, fast devsel, latency 0
BIST result: 00
Memory at e0000000 (32-bit, prefetchable) [size=64M] Memory at e4000000 (32-bit, non-prefetchable) [size=256K] I/O ports at f2000000 [size=128]
[virtual] Expansion ROM at e4040000 [disabled] [size=64K]
Capabilities: [40] Power Management version 2
Capabilities: [a0] Express Endpoint, MSI 01
Capabilities: [c0] MSI: Enable- Count=1/1 Maskable- 64bit-
Capabilities: [100] Advanced Error Reporting
Joel
--
Author: Joel Stanley <[email protected]> Date: Tue Oct 13 00:02:04 2009 +1030
Add pcie and i2c initalisation
(quoted diff) +0 -0
b/arch/arm/mach-kirkwood/openrd-setup.c
index 6bdeeab..d5504e2 100644
arch/arm/mach-kirkwood/openrd-setup.c +4 -0
@@ -80,6 +80,10 @@ static void __init openrd_init(void)#endif kirkwood_sata_init (&openrd_sata_data);kirkwood_sdio_init (&openrd_mvsdio_data); + +kirkwood_i2c_init (); + +kirkwood_pcie_init (); }#ifdef CONFIG_MACH_OPENRD_BASE
PATCH 1/1 kirkwood: combine support for openrd base/client ?support
Quoted 8 lines · Joel Stanley
Quoted 5 lines · Dieter Kiermaier
Quoted 2 lines
If you can point out where I should be looking, I will have a look and if I can find it I will enable it.
I'm sorry, but I haven't an openrd-client board :( Maybe someone else can help us?
Quoted 7 lines
I have tested Alexander's patch on my openrd-client board, applied to Linus' tree. It boots and networking works fine.
I also added calls to initialise i2c and pcie based on the patch by Simon Kagstrom, and both devices appear to work. The diff I added is attached.
Hmmm, seems to now be working for me too, I have updated from 32-rc2 to rc4 so that probably fixed something along the way I suppose.
Quoted 12 lines
Author: Joel Stanley <[email protected]> Date: Tue Oct 13 00:02:04 2009 +1030Add pcie and i2c initalisation
arch/arm/mach-kirkwood/openrd-setup.c +0
-0
arch/arm/mach-kirkwood/openrd-setup.c static void __init openrd_init(void) · line 89
Quoted 10 lines
arch/arm/mach-kirkwood/openrd-setup.c +4
-0@@ -80,6 +80,10 @@ static void __init openrd_init(void)#endif kirkwood_sata_init (&openrd_sata_data);kirkwood_sdio_init (&openrd_mvsdio_data); + +kirkwood_i2c_init (); + +kirkwood_pcie_init (); }#ifdef CONFIG_MACH_OPENRD_BASE
I think to match the coding style of the other kirkwood boards this should go in a seperate pci_init function:
----
static int __init openrd_base_pci_init(void)
{
kirkwood_pcie_init();
return 0;
}subsys_initcall(openrd_base_pci_init);
----
Well, included is my 'new' version with Nico's recommendation to remove the unnecessary ifdef's.
Cheers
Signature · 2 lines
Alexander Clouter .sigmonster says: Pie are not square. Pie are round. Cornbread are square.