* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
@ 2009-10-09 12:39 Alexander Clouter
2009-10-09 12:41 ` Alexander Clouter
2009-10-09 14:00 ` Dieter Kiermaier
0 siblings, 2 replies; 15+ messages in thread
From: Alexander Clouter @ 2009-10-09 12:39 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 0aca451..8e9ac7d 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -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
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 80ab0ec..5ad19dd 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -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
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
new file mode 100644
index 0000000..6bdeeab
--- /dev/null
+++ b/arch/arm/mach-kirkwood/openrd-setup.c
@@ -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);
+
+ 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
+ kirkwood_sata_init(&openrd_sata_data);
+ kirkwood_sdio_init(&openrd_mvsdio_data);
+}
+
+#ifdef CONFIG_MACH_OPENRD_BASE
+MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
+ /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */
+ .phys_io = KIRKWOOD_REGS_PHYS_BASE,
+ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
+ .boot_params = 0x00000100,
+ .init_machine = openrd_init,
+ .map_io = kirkwood_map_io,
+ .init_irq = kirkwood_init_irq,
+ .timer = &kirkwood_timer,
+MACHINE_END
+#endif
+
+#ifdef CONFIG_MACH_OPENRD_CLIENT
+MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
+ /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */
+ .phys_io = KIRKWOOD_REGS_PHYS_BASE,
+ .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
+ .boot_params = 0x00000100,
+ .init_machine = openrd_init,
+ .map_io = kirkwood_map_io,
+ .init_irq = kirkwood_init_irq,
+ .timer = &kirkwood_timer,
+MACHINE_END
+#endif
diff --git a/arch/arm/mach-kirkwood/openrd_base-setup.c b/arch/arm/mach-kirkwood/openrd_base-setup.c
deleted file mode 100644
index 947dfb8..0000000
--- a/arch/arm/mach-kirkwood/openrd_base-setup.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/openrd_base-setup.c
- *
- * Marvell OpenRD Base 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_base_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_base_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(8),
-};
-
-static struct mv_sata_platform_data openrd_base_sata_data = {
- .n_ports = 2,
-};
-
-static struct mvsdio_platform_data openrd_base_mvsdio_data = {
- .gpio_card_detect = 29, /* MPP29 used as SD card detect */
-};
-
-static unsigned int openrd_base_mpp_config[] __initdata = {
- MPP29_GPIO,
- 0
-};
-
-static void __init openrd_base_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
- kirkwood_mpp_conf(openrd_base_mpp_config);
-
- kirkwood_uart0_init();
- kirkwood_nand_init(ARRAY_AND_SIZE(openrd_base_nand_parts), 25);
-
- kirkwood_ehci_init();
-
- kirkwood_ge00_init(&openrd_base_ge00_data);
- kirkwood_sata_init(&openrd_base_sata_data);
- kirkwood_sdio_init(&openrd_base_mvsdio_data);
-}
-
-MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
- /* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */
- .phys_io = KIRKWOOD_REGS_PHYS_BASE,
- .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
- .boot_params = 0x00000100,
- .init_machine = openrd_base_init,
- .map_io = kirkwood_map_io,
- .init_irq = kirkwood_init_irq,
- .timer = &kirkwood_timer,
-MACHINE_END
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 12:39 [PATCH] [ARM] kirkwood: combine support for openrd base/client support Alexander Clouter
@ 2009-10-09 12:41 ` Alexander Clouter
2009-10-09 14:00 ` Dieter Kiermaier
1 sibling, 0 replies; 15+ messages in thread
From: Alexander Clouter @ 2009-10-09 12:41 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
* Alexander Clouter <alex@digriz.org.uk> [2009-10-09 13:39:56+0100]:
>
> 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
--
Alexander Clouter
.sigmonster says: Money is better than poverty, if only for financial reasons.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 12:39 [PATCH] [ARM] kirkwood: combine support for openrd base/client support Alexander Clouter
2009-10-09 12:41 ` Alexander Clouter
@ 2009-10-09 14:00 ` Dieter Kiermaier
2009-10-09 14:03 ` Dhaval Vasa
` (3 more replies)
1 sibling, 4 replies; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-09 14:00 UTC (permalink / raw)
To: linux-arm-kernel
Hi Alexander,
> 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.
>
> Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
>
> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
> index 0aca451..8e9ac7d 100644
> --- a/arch/arm/mach-kirkwood/Kconfig
> +++ b/arch/arm/mach-kirkwood/Kconfig
> @@ -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
> diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
> index 80ab0ec..5ad19dd 100644
> --- a/arch/arm/mach-kirkwood/Makefile
> +++ b/arch/arm/mach-kirkwood/Makefile
> @@ -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
> diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
> new file mode 100644
> index 0000000..6bdeeab
> --- /dev/null
> +++ b/arch/arm/mach-kirkwood/openrd-setup.c
> @@ -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);
> +
> + 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 14:00 ` Dieter Kiermaier
@ 2009-10-09 14:03 ` Dhaval Vasa
2009-10-09 14:03 ` Dhaval Vasa
` (2 subsequent siblings)
3 siblings, 0 replies; 15+ messages in thread
From: Dhaval Vasa @ 2009-10-09 14:03 UTC (permalink / raw)
To: linux-arm-kernel
Alexander, Dieter,
I will test it on saturday.
- Dhaval
Dieter Kiermaier wrote:
> Hi Alexander,
>
>
>> 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.
>>
>> Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
>>
>> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
>> index 0aca451..8e9ac7d 100644
>> --- a/arch/arm/mach-kirkwood/Kconfig
>> +++ b/arch/arm/mach-kirkwood/Kconfig
>> @@ -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
>> diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
>> index 80ab0ec..5ad19dd 100644
>> --- a/arch/arm/mach-kirkwood/Makefile
>> +++ b/arch/arm/mach-kirkwood/Makefile
>> @@ -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
>> diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
>> new file mode 100644
>> index 0000000..6bdeeab
>> --- /dev/null
>> +++ b/arch/arm/mach-kirkwood/openrd-setup.c
>> @@ -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);
>> +
>> + 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
>
>
> Email Scanned for Virus & Dangerous Content by : www.CleanMailGateway.com
>
>
--
_____________________________________________________________________
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.
_____________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 14:00 ` Dieter Kiermaier
2009-10-09 14:03 ` Dhaval Vasa
@ 2009-10-09 14:03 ` Dhaval Vasa
2009-10-09 14:05 ` Alexander Clouter
2009-10-09 15:24 ` [PATCH] [ARM] kirkwood: combine support for openrd base/client support Alexander Clouter
3 siblings, 0 replies; 15+ messages in thread
From: Dhaval Vasa @ 2009-10-09 14:03 UTC (permalink / raw)
To: linux-arm-kernel
Alexander, Dieter,
I will test it on Saturday. And take care of i2c, pcie inits.
- Dhaval
Dieter Kiermaier wrote:
> Hi Alexander,
>
>
>> 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.
>>
>> Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
>>
>> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
>> index 0aca451..8e9ac7d 100644
>> --- a/arch/arm/mach-kirkwood/Kconfig
>> +++ b/arch/arm/mach-kirkwood/Kconfig
>> @@ -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
>> diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
>> index 80ab0ec..5ad19dd 100644
>> --- a/arch/arm/mach-kirkwood/Makefile
>> +++ b/arch/arm/mach-kirkwood/Makefile
>> @@ -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
>> diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
>> new file mode 100644
>> index 0000000..6bdeeab
>> --- /dev/null
>> +++ b/arch/arm/mach-kirkwood/openrd-setup.c
>> @@ -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);
>> +
>> + 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
>
>
> Email Scanned for Virus & Dangerous Content by : www.CleanMailGateway.com
>
>
--
_____________________________________________________________________
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.
_____________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 14:00 ` Dieter Kiermaier
2009-10-09 14:03 ` Dhaval Vasa
2009-10-09 14:03 ` Dhaval Vasa
@ 2009-10-09 14:05 ` Alexander Clouter
2009-10-09 14:24 ` Dieter Kiermaier
2009-10-13 3:20 ` Nicolas Pitre
2009-10-09 15:24 ` [PATCH] [ARM] kirkwood: combine support for openrd base/client support Alexander Clouter
3 siblings, 2 replies; 15+ messages in thread
From: Alexander Clouter @ 2009-10-09 14:05 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
* Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-09 16:00:44+0200]:
>
> [snipped]
>
> > +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();
> > +
> > + 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.
> 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
--
Alexander Clouter
.sigmonster says: Vini, vidi, Linux!
-- Unknown source
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 14:05 ` Alexander Clouter
@ 2009-10-09 14:24 ` Dieter Kiermaier
2009-10-13 3:20 ` Nicolas Pitre
1 sibling, 0 replies; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-09 14:24 UTC (permalink / raw)
To: linux-arm-kernel
Hi Alexander,
> Hi,
>
> * Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-09 16:00:44+0200]:
> >
> > [snipped]
> >
> > > +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();
> > > +
> > > + 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.
>
Ah, ok. I didn't stumble over that. I just wonder why doing 2 times the same...
> > 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 14:00 ` Dieter Kiermaier
` (2 preceding siblings ...)
2009-10-09 14:05 ` Alexander Clouter
@ 2009-10-09 15:24 ` Alexander Clouter
2009-10-12 6:36 ` Dieter Kiermaier
3 siblings, 1 reply; 15+ messages in thread
From: Alexander Clouter @ 2009-10-09 15:24 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
* Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-09 16:00:44+0200]:
>
> [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
--
Alexander Clouter
.sigmonster says: Dyslexia means never having to say that you're ysror.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 15:24 ` [PATCH] [ARM] kirkwood: combine support for openrd base/client support Alexander Clouter
@ 2009-10-12 6:36 ` Dieter Kiermaier
2009-10-12 7:31 ` Alexander Clouter
0 siblings, 1 reply; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-12 6:36 UTC (permalink / raw)
To: linux-arm-kernel
Hi Alexander,
> Hi,
>
> * Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-09 16:00:44+0200]:
> >
> > [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 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 <?>
> ----
>
> 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
>
> Cheers
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-12 6:36 ` Dieter Kiermaier
@ 2009-10-12 7:31 ` Alexander Clouter
2009-10-12 7:46 ` Dieter Kiermaier
0 siblings, 1 reply; 15+ messages in thread
From: Alexander Clouter @ 2009-10-12 7:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
* Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-12 08:36:03+0200]:
>
> > * Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-09 16:00:44+0200]:
> > >
> > > [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 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 <?>
> > ----
> >
> > 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
--
Alexander Clouter
.sigmonster says: American by birth; Texan by the grace of God.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-12 7:31 ` Alexander Clouter
@ 2009-10-12 7:46 ` Dieter Kiermaier
2009-10-12 14:46 ` Joel Stanley
0 siblings, 1 reply; 15+ messages in thread
From: Dieter Kiermaier @ 2009-10-12 7:46 UTC (permalink / raw)
To: linux-arm-kernel
Alexander,
> Hi,
>
> * Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-12 08:36:03+0200]:
> >
> > > * Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-09 16:00:44+0200]:
> > > >
> > > > [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 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 <?>
> > > ----
> > >
> > > 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.
I'm sorry, but I haven't an openrd-client board :(
Maybe someone else can help us?
Dieter
>
> Cheers
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-12 7:46 ` Dieter Kiermaier
@ 2009-10-12 14:46 ` Joel Stanley
2009-10-13 14:41 ` [PATCH] [ARM] kirkwood: combine support for openrd base/client ?support Alexander Clouter
0 siblings, 1 reply; 15+ messages in thread
From: Joel Stanley @ 2009-10-12 14:46 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Mon, Oct 12, 2009 at 18:16, Dieter Kiermaier <dk-arm-linux@gmx.de> wrote:
>> 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 <joel@jms.id.au>
Date: Tue Oct 13 00:02:04 2009 +1030
Add pcie and i2c initalisation
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c
b/arch/arm/mach-kirkwood/openrd-setup.c
index 6bdeeab..d5504e2 100644
--- a/arch/arm/mach-kirkwood/openrd-setup.c
+++ b/arch/arm/mach-kirkwood/openrd-setup.c
@@ -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
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client support
2009-10-09 14:05 ` Alexander Clouter
2009-10-09 14:24 ` Dieter Kiermaier
@ 2009-10-13 3:20 ` Nicolas Pitre
2009-10-13 14:28 ` [PATCH] [ARM] kirkwood: combine support for openrd base/client?support Alexander Clouter
1 sibling, 1 reply; 15+ messages in thread
From: Nicolas Pitre @ 2009-10-13 3:20 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 9 Oct 2009, Alexander Clouter wrote:
> Hi,
>
> * Dieter Kiermaier <dk-arm-linux@gmx.de> [2009-10-09 16:00:44+0200]:
> >
> > [snipped]
> >
> > > +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();
> > > +
> > > + 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;
Don't put a #ifdef on it either then.
> 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 was under the impression the latter is considered worse than the
> former, I personally am not bothered either way.
Did you try the later?
> > 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client?support
2009-10-13 3:20 ` Nicolas Pitre
@ 2009-10-13 14:28 ` Alexander Clouter
0 siblings, 0 replies; 15+ messages in thread
From: Alexander Clouter @ 2009-10-13 14:28 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Nicolas Pitre <nico@fluxnic.net> wrote:
>
> On Fri, 9 Oct 2009, Alexander Clouter wrote:
>
>> 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;
>
> Don't put a #ifdef on it either then.
>
Okay...
>> 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 :)
>> 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.
>> > 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.
>
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
--
Alexander Clouter
.sigmonster says: Memory fault -- brain fried
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] [ARM] kirkwood: combine support for openrd base/client ?support
2009-10-12 14:46 ` Joel Stanley
@ 2009-10-13 14:41 ` Alexander Clouter
0 siblings, 0 replies; 15+ messages in thread
From: Alexander Clouter @ 2009-10-13 14:41 UTC (permalink / raw)
To: linux-arm-kernel
Joel Stanley <joel@jms.id.au> wrote:
>
> On Mon, Oct 12, 2009 at 18:16, Dieter Kiermaier <dk-arm-linux@gmx.de> wrote:
>>> 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.
>
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.
> Author: Joel Stanley <joel@jms.id.au>
> Date: Tue Oct 13 00:02:04 2009 +1030
>
> Add pcie and i2c initalisation
>
> diff --git a/arch/arm/mach-kirkwood/openrd-setup.c
> b/arch/arm/mach-kirkwood/openrd-setup.c
> index 6bdeeab..d5504e2 100644
> --- a/arch/arm/mach-kirkwood/openrd-setup.c
> +++ b/arch/arm/mach-kirkwood/openrd-setup.c
> @@ -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
--
Alexander Clouter
.sigmonster says: Pie are not square. Pie are round. Cornbread are square.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2009-10-13 14:41 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-09 12:39 [PATCH] [ARM] kirkwood: combine support for openrd base/client support Alexander Clouter
2009-10-09 12:41 ` Alexander Clouter
2009-10-09 14:00 ` Dieter Kiermaier
2009-10-09 14:03 ` Dhaval Vasa
2009-10-09 14:03 ` Dhaval Vasa
2009-10-09 14:05 ` Alexander Clouter
2009-10-09 14:24 ` Dieter Kiermaier
2009-10-13 3:20 ` Nicolas Pitre
2009-10-13 14:28 ` [PATCH] [ARM] kirkwood: combine support for openrd base/client?support Alexander Clouter
2009-10-09 15:24 ` [PATCH] [ARM] kirkwood: combine support for openrd base/client support Alexander Clouter
2009-10-12 6:36 ` Dieter Kiermaier
2009-10-12 7:31 ` Alexander Clouter
2009-10-12 7:46 ` Dieter Kiermaier
2009-10-12 14:46 ` Joel Stanley
2009-10-13 14:41 ` [PATCH] [ARM] kirkwood: combine support for openrd base/client ?support Alexander Clouter
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).