* [RFC PATCHv1 1/5] pci: mvebu: enable driver usage on Kirkwood
2013-03-27 18:04 [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Thomas Petazzoni
@ 2013-03-27 18:05 ` Thomas Petazzoni
2013-03-27 18:05 ` [RFC PATCHv1 2/5] bus: mvebu: fix mistake in PCIe window target attribute for Kirkwood Thomas Petazzoni
` (4 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-03-27 18:05 UTC (permalink / raw)
To: Bjorn Helgaas, Grant Likely, Russell King
Cc: linux-pci, linux-arm-kernel, devicetree-discuss, Lior Amsalem,
Andrew Lunn, Jason Cooper, Arnd Bergmann, Maen Suleiman,
Thierry Reding, Gregory Clement, Ezequiel Garcia, Olof Johansson,
Tawfik Bayouk, Jason Gunthorpe, Mitch Bradley, Andrew Murray
We allow the pci-mvebu driver to be compiled on the Kirkwood platform,
and add the 'marvell,kirkwood-pcie' as a compatible string supported
by the driver.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
.../devicetree/bindings/pci/mvebu-pci.txt | 1 +
drivers/pci/host/Kconfig | 2 +-
drivers/pci/host/pci-mvebu.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pci/mvebu-pci.txt b/Documentation/devicetree/bindings/pci/mvebu-pci.txt
index eb69d92..f8d4058 100644
--- a/Documentation/devicetree/bindings/pci/mvebu-pci.txt
+++ b/Documentation/devicetree/bindings/pci/mvebu-pci.txt
@@ -4,6 +4,7 @@ Mandatory properties:
- compatible: one of the following values:
marvell,armada-370-pcie
marvell,armada-xp-pcie
+ marvell,kirkwood-pcie
- #address-cells, set to <3>
- #size-cells, set to <2>
- #interrupt-cells, set to <1>
diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index 6918fbc..1f1d67f 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -3,6 +3,6 @@ menu "PCI host controller drivers"
config PCI_MVEBU
bool "Marvell EBU PCIe controller"
- depends on ARCH_MVEBU
+ depends on ARCH_MVEBU || ARCH_KIRKWOOD
endmenu
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 289babd..8d6b5ea 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -901,6 +901,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
static const struct of_device_id mvebu_pcie_of_match_table[] = {
{ .compatible = "marvell,armada-xp-pcie", },
{ .compatible = "marvell,armada-370-pcie", },
+ { .compatible = "marvell,kirkwood-pcie", },
{},
};
MODULE_DEVICE_TABLE(of, mvebu_pcie_of_match_table);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [RFC PATCHv1 2/5] bus: mvebu: fix mistake in PCIe window target attribute for Kirkwood
2013-03-27 18:04 [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Thomas Petazzoni
2013-03-27 18:05 ` [RFC PATCHv1 1/5] pci: mvebu: enable driver usage " Thomas Petazzoni
@ 2013-03-27 18:05 ` Thomas Petazzoni
2013-04-03 10:52 ` Thomas Petazzoni
2013-03-27 18:05 ` [RFC PATCHv1 3/5] arm: mach-kirkwood: seperate PCIe window init from other windows Thomas Petazzoni
` (3 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2013-03-27 18:05 UTC (permalink / raw)
To: Bjorn Helgaas, Grant Likely, Russell King
Cc: linux-pci, linux-arm-kernel, devicetree-discuss, Lior Amsalem,
Andrew Lunn, Jason Cooper, Arnd Bergmann, Maen Suleiman,
Thierry Reding, Gregory Clement, Ezequiel Garcia, Olof Johansson,
Tawfik Bayouk, Jason Gunthorpe, Mitch Bradley, Andrew Murray
The target and attributes for the PCIe address decoding windows were
not correct on Kirkwood for the second PCIe interface.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Note: this patch should be merged with the existing mvebu-mbus driver.
---
drivers/bus/mvebu-mbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index 586d03e..4de2c6b 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -626,7 +626,7 @@ static const struct mvebu_mbus_soc_data armada_xp_mbus_data = {
static const struct mvebu_mbus_mapping kirkwood_map[] = {
MAPDEF("pcie0.0", 4, 0xe0, MAPDEF_PCIMASK),
- MAPDEF("pcie1.0", 8, 0xe0, MAPDEF_PCIMASK),
+ MAPDEF("pcie1.0", 4, 0xd0, MAPDEF_PCIMASK),
MAPDEF("sram", 3, 0x01, MAPDEF_NOMASK),
MAPDEF("nand", 1, 0x2f, MAPDEF_NOMASK),
{},
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [RFC PATCHv1 2/5] bus: mvebu: fix mistake in PCIe window target attribute for Kirkwood
2013-03-27 18:05 ` [RFC PATCHv1 2/5] bus: mvebu: fix mistake in PCIe window target attribute for Kirkwood Thomas Petazzoni
@ 2013-04-03 10:52 ` Thomas Petazzoni
2013-04-03 10:57 ` Jason Cooper
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2013-04-03 10:52 UTC (permalink / raw)
To: Jason Cooper, Arnd Bergmann
Cc: Bjorn Helgaas, Grant Likely, Russell King, Lior Amsalem,
Andrew Lunn, Olof Johansson, linux-pci, devicetree-discuss,
Thierry Reding, Jason Gunthorpe, Maen Suleiman, Ezequiel Garcia,
Gregory Clement, Andrew Murray, Tawfik Bayouk, linux-arm-kernel,
Mitch Bradley
Jason (Cooper),
Do you mind taking this patch in your mvebu/drivers branch, next to the
patch adding the mvebu-mbus driver? Or do you want a new mvebu-mbus
driver patch that contains this fix and would replace the one you have
already merged in mvebu/drivers?
Thanks!
Thomas
On Wed, 27 Mar 2013 19:05:01 +0100, Thomas Petazzoni wrote:
> The target and attributes for the PCIe address decoding windows were
> not correct on Kirkwood for the second PCIe interface.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> Note: this patch should be merged with the existing mvebu-mbus driver.
> ---
> drivers/bus/mvebu-mbus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
> index 586d03e..4de2c6b 100644
> --- a/drivers/bus/mvebu-mbus.c
> +++ b/drivers/bus/mvebu-mbus.c
> @@ -626,7 +626,7 @@ static const struct mvebu_mbus_soc_data armada_xp_mbus_data = {
>
> static const struct mvebu_mbus_mapping kirkwood_map[] = {
> MAPDEF("pcie0.0", 4, 0xe0, MAPDEF_PCIMASK),
> - MAPDEF("pcie1.0", 8, 0xe0, MAPDEF_PCIMASK),
> + MAPDEF("pcie1.0", 4, 0xd0, MAPDEF_PCIMASK),
> MAPDEF("sram", 3, 0x01, MAPDEF_NOMASK),
> MAPDEF("nand", 1, 0x2f, MAPDEF_NOMASK),
> {},
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC PATCHv1 2/5] bus: mvebu: fix mistake in PCIe window target attribute for Kirkwood
2013-04-03 10:52 ` Thomas Petazzoni
@ 2013-04-03 10:57 ` Jason Cooper
2013-04-03 11:05 ` Thomas Petazzoni
0 siblings, 1 reply; 14+ messages in thread
From: Jason Cooper @ 2013-04-03 10:57 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Arnd Bergmann, Bjorn Helgaas, Grant Likely, Russell King,
Lior Amsalem, Andrew Lunn, Olof Johansson, linux-pci,
devicetree-discuss, Thierry Reding, Jason Gunthorpe,
Maen Suleiman, Ezequiel Garcia, Gregory Clement, Andrew Murray,
Tawfik Bayouk, linux-arm-kernel, Mitch Bradley
Thomas,
On Wed, Apr 03, 2013 at 12:52:47PM +0200, Thomas Petazzoni wrote:
> Jason (Cooper),
>
> Do you mind taking this patch in your mvebu/drivers branch, next to the
> patch adding the mvebu-mbus driver? Or do you want a new mvebu-mbus
> driver patch that contains this fix and would replace the one you have
> already merged in mvebu/drivers?
Thanks for pointing this out. I'll put it in mvebu/drivers as you
suggested. I'll need to rebase mvebu/soc on it. But I haven't done the
PR yet, so not a big deal.
thx,
Jason.
> On Wed, 27 Mar 2013 19:05:01 +0100, Thomas Petazzoni wrote:
> > The target and attributes for the PCIe address decoding windows were
> > not correct on Kirkwood for the second PCIe interface.
> >
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > ---
> > Note: this patch should be merged with the existing mvebu-mbus driver.
> > ---
> > drivers/bus/mvebu-mbus.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
> > index 586d03e..4de2c6b 100644
> > --- a/drivers/bus/mvebu-mbus.c
> > +++ b/drivers/bus/mvebu-mbus.c
> > @@ -626,7 +626,7 @@ static const struct mvebu_mbus_soc_data armada_xp_mbus_data = {
> >
> > static const struct mvebu_mbus_mapping kirkwood_map[] = {
> > MAPDEF("pcie0.0", 4, 0xe0, MAPDEF_PCIMASK),
> > - MAPDEF("pcie1.0", 8, 0xe0, MAPDEF_PCIMASK),
> > + MAPDEF("pcie1.0", 4, 0xd0, MAPDEF_PCIMASK),
> > MAPDEF("sram", 3, 0x01, MAPDEF_NOMASK),
> > MAPDEF("nand", 1, 0x2f, MAPDEF_NOMASK),
> > {},
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC PATCHv1 2/5] bus: mvebu: fix mistake in PCIe window target attribute for Kirkwood
2013-04-03 10:57 ` Jason Cooper
@ 2013-04-03 11:05 ` Thomas Petazzoni
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-04-03 11:05 UTC (permalink / raw)
To: Jason Cooper
Cc: Arnd Bergmann, Bjorn Helgaas, Grant Likely, Russell King,
Lior Amsalem, Andrew Lunn, Olof Johansson, linux-pci,
devicetree-discuss, Thierry Reding, Jason Gunthorpe,
Maen Suleiman, Ezequiel Garcia, Gregory Clement, Andrew Murray,
Tawfik Bayouk, linux-arm-kernel, Mitch Bradley
Dear Jason Cooper,
On Wed, 3 Apr 2013 06:57:57 -0400, Jason Cooper wrote:
> Thanks for pointing this out. I'll put it in mvebu/drivers as you
> suggested. I'll need to rebase mvebu/soc on it. But I haven't done the
> PR yet, so not a big deal.
Ok, thanks. I'll finalize the cleanup of the kirkwood PCIe branch in
order to be able to submit a version that hopefully should be
acceptable.
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFC PATCHv1 3/5] arm: mach-kirkwood: seperate PCIe window init from other windows
2013-03-27 18:04 [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Thomas Petazzoni
2013-03-27 18:05 ` [RFC PATCHv1 1/5] pci: mvebu: enable driver usage " Thomas Petazzoni
2013-03-27 18:05 ` [RFC PATCHv1 2/5] bus: mvebu: fix mistake in PCIe window target attribute for Kirkwood Thomas Petazzoni
@ 2013-03-27 18:05 ` Thomas Petazzoni
2013-03-27 18:35 ` Jason Gunthorpe
2013-03-27 18:05 ` [RFC PATCHv1 4/5] arm: kirkwood: add SoC-level Device Tree data for PCIe interfaces Thomas Petazzoni
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2013-03-27 18:05 UTC (permalink / raw)
To: Bjorn Helgaas, Grant Likely, Russell King
Cc: linux-pci, linux-arm-kernel, devicetree-discuss, Lior Amsalem,
Andrew Lunn, Jason Cooper, Arnd Bergmann, Maen Suleiman,
Thierry Reding, Gregory Clement, Ezequiel Garcia, Olof Johansson,
Tawfik Bayouk, Jason Gunthorpe, Mitch Bradley, Andrew Murray
Since we are going to enable the usage of the mvebu PCIe driver on
Kirkwood, we need a way to disable the static addition of address
decoding windows currently done by the Kirkwood code. In order to do
this, we split the initialization of windows in two functions: one
function for the PCIe windows, and a second function for the other
windows.
Then, we have three cases:
* non-DT platforms: PCIe windows are always initialized statically,
by a call to kirkwood_setup_pcie_wins() in
mach-kirkwood/commonc:kirkwood_init().
* DT platforms that don't yet use the mvebu PCIe driver (example:
board-iconnect.c). The kirkwood_setup_pcie_wins() function is
called from mach-kirkwood/board-dt.c:kirkwood_dt_init(), because
needs_pcie_wins is true.
* DT platforms that use the mvebu PCIe driver (none as of this
patch). They will set needs_pcie_wins to false in
mach-kirkwood/board-dt.c:kirkwood_dt_init().
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/mach-kirkwood/board-dt.c | 5 +++++
arch/arm/mach-kirkwood/common.c | 7 ++++++-
arch/arm/mach-kirkwood/common.h | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index ea49476..1b4675f 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -72,6 +72,8 @@ static void __init kirkwood_of_clk_init(void)
static void __init kirkwood_dt_init(void)
{
+ int needs_pcie_wins = 1;
+
pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
/*
@@ -144,6 +146,9 @@ static void __init kirkwood_dt_init(void)
if (of_machine_is_compatible("usi,topkick"))
usi_topkick_init();
+ if (needs_pcie_wins)
+ kirkwood_setup_pcie_wins();
+
of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
}
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index c2cae69..9a5d65a 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -652,7 +652,7 @@ char * __init kirkwood_id(void)
}
}
-void __init kirkwood_setup_wins(void)
+void __init kirkwood_setup_pcie_wins(void)
{
/*
* The PCIe windows will no longer be statically allocated
@@ -678,6 +678,10 @@ void __init kirkwood_setup_wins(void)
KIRKWOOD_PCIE1_MEM_SIZE,
MVEBU_MBUS_NO_REMAP,
MVEBU_MBUS_PCI_MEM);
+}
+
+void __init kirkwood_setup_wins(void)
+{
mvebu_mbus_add_window("nand", KIRKWOOD_NAND_MEM_PHYS_BASE,
KIRKWOOD_NAND_MEM_SIZE);
mvebu_mbus_add_window("sram", KIRKWOOD_SRAM_PHYS_BASE,
@@ -710,6 +714,7 @@ void __init kirkwood_init(void)
writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG);
kirkwood_setup_wins();
+ kirkwood_setup_pcie_wins();
kirkwood_l2_init();
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index e24f743..de280f5 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -31,6 +31,7 @@ void kirkwood_init_early(void);
void kirkwood_init_irq(void);
void kirkwood_setup_wins(void);
+void kirkwood_setup_pcie_wins(void);
void kirkwood_enable_pcie(void);
void kirkwood_pcie_id(u32 *dev, u32 *rev);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [RFC PATCHv1 3/5] arm: mach-kirkwood: seperate PCIe window init from other windows
2013-03-27 18:05 ` [RFC PATCHv1 3/5] arm: mach-kirkwood: seperate PCIe window init from other windows Thomas Petazzoni
@ 2013-03-27 18:35 ` Jason Gunthorpe
2013-03-27 20:17 ` Thomas Petazzoni
0 siblings, 1 reply; 14+ messages in thread
From: Jason Gunthorpe @ 2013-03-27 18:35 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Bjorn Helgaas, Grant Likely, Russell King, linux-pci,
linux-arm-kernel, devicetree-discuss, Lior Amsalem, Andrew Lunn,
Jason Cooper, Arnd Bergmann, Maen Suleiman, Thierry Reding,
Gregory Clement, Ezequiel Garcia, Olof Johansson, Tawfik Bayouk,
Mitch Bradley, Andrew Murray
On Wed, Mar 27, 2013 at 07:05:02PM +0100, Thomas Petazzoni wrote:
This all looks really great to me, I hope to try it as well when I get
time. But just one small suggestion:
> diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
> index ea49476..1b4675f 100644
> +++ b/arch/arm/mach-kirkwood/board-dt.c
> @@ -72,6 +72,8 @@ static void __init kirkwood_of_clk_init(void)
>
> static void __init kirkwood_dt_init(void)
> {
> + int needs_pcie_wins = 1;
> +
> pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
>
> /*
> @@ -144,6 +146,9 @@ static void __init kirkwood_dt_init(void)
> if (of_machine_is_compatible("usi,topkick"))
> usi_topkick_init();
>
> + if (needs_pcie_wins)
> + kirkwood_setup_pcie_wins();
> +
> of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
> }
Moving the window setup into mach-kirkwood/pcie.c:kirkwood_pcie_init
would avoid this needs_pcie_wins thing since kirkwood_pcie_init will
naturally never be called once the other patches are applied.
Cheers,
Jason
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC PATCHv1 3/5] arm: mach-kirkwood: seperate PCIe window init from other windows
2013-03-27 18:35 ` Jason Gunthorpe
@ 2013-03-27 20:17 ` Thomas Petazzoni
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-03-27 20:17 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Bjorn Helgaas, Grant Likely, Russell King, linux-pci,
linux-arm-kernel, devicetree-discuss, Lior Amsalem, Andrew Lunn,
Jason Cooper, Arnd Bergmann, Maen Suleiman, Thierry Reding,
Gregory Clement, Ezequiel Garcia, Olof Johansson, Tawfik Bayouk,
Mitch Bradley, Andrew Murray
Dear Jason Gunthorpe,
On Wed, 27 Mar 2013 12:35:34 -0600, Jason Gunthorpe wrote:
> On Wed, Mar 27, 2013 at 07:05:02PM +0100, Thomas Petazzoni wrote:
>
> This all looks really great to me, I hope to try it as well when I get
> time. But just one small suggestion:
>
> > diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
> > index ea49476..1b4675f 100644
> > +++ b/arch/arm/mach-kirkwood/board-dt.c
> > @@ -72,6 +72,8 @@ static void __init kirkwood_of_clk_init(void)
> >
> > static void __init kirkwood_dt_init(void)
> > {
> > + int needs_pcie_wins = 1;
> > +
> > pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
> >
> > /*
> > @@ -144,6 +146,9 @@ static void __init kirkwood_dt_init(void)
> > if (of_machine_is_compatible("usi,topkick"))
> > usi_topkick_init();
> >
> > + if (needs_pcie_wins)
> > + kirkwood_setup_pcie_wins();
> > +
> > of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL);
> > }
>
> Moving the window setup into mach-kirkwood/pcie.c:kirkwood_pcie_init
> would avoid this needs_pcie_wins thing since kirkwood_pcie_init will
> naturally never be called once the other patches are applied.
Ah, yes, right. I now remember you made this suggestion when reviewing
the mvebu-mbus patch set, and I replied that I would do it when I'll
start working on using the pci-mvebu driver on Kirkwood. It looks like
it's time for me to honor this commitment :-)
Thanks for the feedback,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFC PATCHv1 4/5] arm: kirkwood: add SoC-level Device Tree data for PCIe interfaces
2013-03-27 18:04 [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Thomas Petazzoni
` (2 preceding siblings ...)
2013-03-27 18:05 ` [RFC PATCHv1 3/5] arm: mach-kirkwood: seperate PCIe window init from other windows Thomas Petazzoni
@ 2013-03-27 18:05 ` Thomas Petazzoni
2013-03-27 18:05 ` [RFC PATCHv1 5/5] arm: kirkwood: convert db-88f6281 to the Device Tree Thomas Petazzoni
2013-03-27 18:07 ` [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Arnd Bergmann
5 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-03-27 18:05 UTC (permalink / raw)
To: Bjorn Helgaas, Grant Likely, Russell King
Cc: linux-pci, linux-arm-kernel, devicetree-discuss, Lior Amsalem,
Andrew Lunn, Jason Cooper, Arnd Bergmann, Maen Suleiman,
Thierry Reding, Gregory Clement, Ezequiel Garcia, Olof Johansson,
Tawfik Bayouk, Jason Gunthorpe, Mitch Bradley, Andrew Murray
This commit adds Device Tree details to enable the PCIe interfaces on
Kirkwood.
Note: this commit is not correct. The 6281 Kirkwood has only one PCIe
interface, and the 6282 has two PCIe interfaces, so this Device Tree
change will require some modifications to take this into account.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/boot/dts/kirkwood.dtsi | 49 +++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 2c738d9..3d2cb12 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -19,6 +19,7 @@
ocp@f1000000 {
compatible = "simple-bus";
ranges = <0x00000000 0xf1000000 0x4000000
+ 0xe0000000 0xe0000000 0x8100000 /* PCIE */
0xf5000000 0xf5000000 0x0000400>;
#address-cells = <1>;
#size-cells = <1>;
@@ -201,5 +202,53 @@
clocks = <&gate_clk 4>;
status = "disabled";
};
+
+ pcie-controller {
+ compatible = "marvell,kirkwood-pcie";
+ status = "disabled";
+ device_type = "pci";
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ bus-range = <0x00 0xff>;
+
+ ranges = <0x82000000 0 0x00040000 0x00040000 0 0x00002000 /* Port 0.0 registers */
+ 0x82000000 0 0x00044000 0x00044000 0 0x00002000 /* Port 1.0 registers */
+ 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */
+ 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */
+
+ pcie@1,0 {
+ device_type = "pci";
+ assigned-addresses = <0x82000800 0 0x00040000 0 0x2000>;
+ reg = <0x0800 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ #interrupt-cells = <1>;
+ ranges;
+ interrupt-map-mask = <0 0 0 0>;
+ interrupt-map = <0 0 0 0 &intc 9>;
+ marvell,pcie-port = <0>;
+ marvell,pcie-lane = <0>;
+ clocks = <&gate_clk 2>;
+ status = "disabled";
+ };
+
+ pcie@2,0 {
+ device_type = "pci";
+ assigned-addresses = <0x82001000 0 0x00044000 0 0x2000>;
+ reg = <0x1000 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+ #interrupt-cells = <1>;
+ ranges;
+ interrupt-map-mask = <0 0 0 0>;
+ interrupt-map = <0 0 0 0 &intc 10>;
+ marvell,pcie-port = <1>;
+ marvell,pcie-lane = <0>;
+ clocks = <&gate_clk 18>;
+ status = "disabled";
+ };
+ };
};
};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [RFC PATCHv1 5/5] arm: kirkwood: convert db-88f6281 to the Device Tree
2013-03-27 18:04 [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Thomas Petazzoni
` (3 preceding siblings ...)
2013-03-27 18:05 ` [RFC PATCHv1 4/5] arm: kirkwood: add SoC-level Device Tree data for PCIe interfaces Thomas Petazzoni
@ 2013-03-27 18:05 ` Thomas Petazzoni
2013-03-27 18:07 ` [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Arnd Bergmann
5 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-03-27 18:05 UTC (permalink / raw)
To: Bjorn Helgaas, Grant Likely, Russell King
Cc: linux-pci, linux-arm-kernel, devicetree-discuss, Lior Amsalem,
Andrew Lunn, Jason Cooper, Arnd Bergmann, Maen Suleiman,
Thierry Reding, Gregory Clement, Ezequiel Garcia, Olof Johansson,
Tawfik Bayouk, Jason Gunthorpe, Mitch Bradley, Andrew Murray
This commit converts the db-88f6281 board to the Device Tree.
Note: this commit is not entirely correct. The db-88f6281 code was in
fact handling both the case of a board having the 6281 (one PCIe
interface) and the 6282 (two PCIe interfaces). For now, we make the
assumption that we have two PCIe interfaces (because that's the board
I have in my hands). We'll probably have to create two separate Device
Trees to distinguish between those two boards.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/kirkwood-db-88f6281.dts | 96 ++++++++++++++++++++++++
arch/arm/mach-kirkwood/Kconfig | 12 +--
arch/arm/mach-kirkwood/Makefile | 2 +-
arch/arm/mach-kirkwood/board-db88f6281-bp.c | 26 +++++++
arch/arm/mach-kirkwood/board-dt.c | 6 ++
arch/arm/mach-kirkwood/common.h | 6 ++
arch/arm/mach-kirkwood/db88f6281-bp-setup.c | 108 ---------------------------
8 files changed, 142 insertions(+), 115 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-db-88f6281.dts
create mode 100644 arch/arm/mach-kirkwood/board-db88f6281-bp.c
delete mode 100644 arch/arm/mach-kirkwood/db88f6281-bp-setup.c
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 9c62558..07ae76d 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -64,6 +64,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
kirkwood-km_kirkwood.dtb \
kirkwood-lschlv2.dtb \
kirkwood-lsxhl.dtb \
+ kirkwood-db-88f6281.dtb \
kirkwood-mplcec4.dtb \
kirkwood-ns2.dtb \
kirkwood-ns2lite.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-db-88f6281.dts b/arch/arm/boot/dts/kirkwood-db-88f6281.dts
new file mode 100644
index 0000000..8fceee9
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-db-88f6281.dts
@@ -0,0 +1,96 @@
+/*
+ * Marvell DB-88F6281-BP Development Board Setup
+ *
+ * Saeed Bishara <saeed@marvell.com>
+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+/include/ "kirkwood-6281.dtsi"
+
+/ {
+ model = "Marvell DB-88F6281-BP Development Board";
+ compatible = "marvell,db-88f6281-bp", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x20000000>; /* 512 MB */
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ };
+
+ ocp@f1000000 {
+ pinctrl@10000 {
+ pmx_sdio_gpios: pmx-sdio-gpios {
+ marvell,pins = "mpp37", "mpp38";
+ marvell,function = "gpio";
+ };
+ };
+
+ serial@12000 {
+ pinctrl-0 = <&pmx_uart0>;
+ pinctrl-names = "default";
+ clock-frequency = <200000000>;
+ status = "ok";
+ };
+
+ nand@3000000 {
+ pinctrl-0 = <&pmx_nand>;
+ pinctrl-names = "default";
+ chip-delay = <25>;
+ status = "okay";
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0 0x100000>;
+ };
+
+ partition@100000 {
+ label = "uImage";
+ reg = <0x100000 0x400000>;
+ };
+
+ partition@500000 {
+ label = "root";
+ reg = <0x500000 0x1fb00000>;
+ };
+ };
+
+ sata@80000 {
+ nr-ports = <2>;
+ status = "okay";
+ };
+
+ ehci@50000 {
+ status = "okay";
+ };
+
+ mvsdio@90000 {
+ pinctrl-0 = <&pmx_sdio_gpios>;
+ pinctrl-names = "default";
+ wp-gpios = <&gpio1 5 0>;
+ cd-gpios = <&gpio1 6 0>;
+ status = "okay";
+ };
+
+ pcie-controller {
+ status = "okay";
+
+ pcie@1,0 {
+ status = "okay";
+ };
+
+ pcie@2,0 {
+ status = "okay";
+ };
+ };
+ };
+};
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 7b6a64b..56bbeb0 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -2,12 +2,6 @@ if ARCH_KIRKWOOD
menu "Marvell Kirkwood Implementations"
-config MACH_DB88F6281_BP
- bool "Marvell DB-88F6281-BP Development Board"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell DB-88F6281-BP Development Board.
-
config MACH_RD88F6192_NAS
bool "Marvell RD-88F6192-NAS Reference Board"
help
@@ -58,6 +52,12 @@ config ARCH_KIRKWOOD_DT
Say 'Y' here if you want your kernel to support the
Marvell Kirkwood using flattened device tree.
+config MACH_DB88F6281_BP_DT
+ bool "Marvell DB-88F6281-BP Development Board (Flattened Device Tree)"
+ help
+ Say 'Y' here if you want your kernel to support the Marvell
+ DB-88F6281-BP Development Board (Flattened Device Tree).
+
config MACH_GURUPLUG_DT
bool "Marvell GuruPlug Reference Board (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index d805f80..ea5a2f8 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,6 +1,5 @@
obj-y += common.o irq.o pcie.o mpp.o
-obj-$(CONFIG_MACH_DB88F6281_BP) += db88f6281-bp-setup.o
obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o
@@ -20,6 +19,7 @@ obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_T5325) += t5325-setup.o
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
+obj-$(CONFIG_MACH_DB88F6281_BP_DT) += board-db88f6281-bp.o
obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
obj-$(CONFIG_MACH_GURUPLUG_DT) += board-guruplug.o
obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o
diff --git a/arch/arm/mach-kirkwood/board-db88f6281-bp.c b/arch/arm/mach-kirkwood/board-db88f6281-bp.c
new file mode 100644
index 0000000..bffd160
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-db88f6281-bp.c
@@ -0,0 +1,26 @@
+/*
+ * arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+ *
+ * Saeed Bishara <saeed@marvell.com>
+ *
+ * Marvell DB-88F6281-BP Development 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/of.h>
+#include <linux/mv643xx_eth.h>
+#include "common.h"
+
+static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(8),
+};
+
+void __init db88f6281_init(void)
+{
+ kirkwood_ge00_init(&db88f6281_ge00_data);
+}
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 1b4675f..fbc0d8b 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -137,6 +137,11 @@ static void __init kirkwood_dt_init(void)
of_machine_is_compatible("lacie,netspace_mini_v2"))
ns2_init();
+ if (of_machine_is_compatible("marvell,db-88f6281-bp")) {
+ needs_pcie_wins = 0;
+ db88f6281_init();
+ }
+
if (of_machine_is_compatible("mpl,cec4"))
mplcec4_init();
@@ -170,6 +175,7 @@ static const char * const kirkwood_dt_board_compat[] = {
"lacie,netspace_v2",
"lacie,netspace_lite_v2",
"lacie,netspace_mini_v2",
+ "marvell,db-88f6281-bp",
"mpl,cec4",
"plathome,openblocks-a6",
"usi,topkick",
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index de280f5..410b1ff 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -120,6 +120,12 @@ void km_kirkwood_init(void);
static inline void km_kirkwood_init(void) {};
#endif
+#ifdef CONFIG_MACH_DB88F6281_BP_DT
+void db88f6281_init(void);
+#else
+static inline void db88f6281_init(void) {};
+#endif
+
#ifdef CONFIG_MACH_MPLCEC4_DT
void mplcec4_init(void);
#else
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
deleted file mode 100644
index 5a369fe..0000000
--- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/db88f6281-bp-setup.c
- *
- * Marvell DB-88F6281-BP Development 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/sizes.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 <linux/platform_data/mmc-mvsdio.h>
-#include "common.h"
-#include "mpp.h"
-
-static struct mtd_partition db88f6281_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 db88f6281_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(8),
-};
-
-static struct mv_sata_platform_data db88f6281_sata_data = {
- .n_ports = 2,
-};
-
-static struct mvsdio_platform_data db88f6281_mvsdio_data = {
- .gpio_write_protect = 37,
- .gpio_card_detect = 38,
-};
-
-static unsigned int db88f6281_mpp_config[] __initdata = {
- MPP0_NF_IO2,
- MPP1_NF_IO3,
- MPP2_NF_IO4,
- MPP3_NF_IO5,
- MPP4_NF_IO6,
- MPP5_NF_IO7,
- MPP18_NF_IO0,
- MPP19_NF_IO1,
- MPP37_GPIO,
- MPP38_GPIO,
- 0
-};
-
-static void __init db88f6281_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
- kirkwood_mpp_conf(db88f6281_mpp_config);
-
- kirkwood_nand_init(ARRAY_AND_SIZE(db88f6281_nand_parts), 25);
- kirkwood_ehci_init();
- kirkwood_ge00_init(&db88f6281_ge00_data);
- kirkwood_sata_init(&db88f6281_sata_data);
- kirkwood_uart0_init();
- kirkwood_sdio_init(&db88f6281_mvsdio_data);
-}
-
-static int __init db88f6281_pci_init(void)
-{
- if (machine_is_db88f6281_bp()) {
- u32 dev, rev;
-
- kirkwood_pcie_id(&dev, &rev);
- if (dev == MV88F6282_DEV_ID)
- kirkwood_pcie_init(KW_PCIE1 | KW_PCIE0);
- else
- kirkwood_pcie_init(KW_PCIE0);
- }
- return 0;
-}
-subsys_initcall(db88f6281_pci_init);
-
-MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
- /* Maintainer: Saeed Bishara <saeed@marvell.com> */
- .atag_offset = 0x100,
- .init_machine = db88f6281_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood
2013-03-27 18:04 [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Thomas Petazzoni
` (4 preceding siblings ...)
2013-03-27 18:05 ` [RFC PATCHv1 5/5] arm: kirkwood: convert db-88f6281 to the Device Tree Thomas Petazzoni
@ 2013-03-27 18:07 ` Arnd Bergmann
2013-03-27 18:11 ` Thomas Petazzoni
5 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2013-03-27 18:07 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Bjorn Helgaas, Grant Likely, Russell King, linux-pci,
linux-arm-kernel, devicetree-discuss, Lior Amsalem, Andrew Lunn,
Jason Cooper, Maen Suleiman, Thierry Reding, Gregory Clement,
Ezequiel Garcia, Olof Johansson, Tawfik Bayouk, Jason Gunthorpe,
Mitch Bradley, Andrew Murray
On Wednesday 27 March 2013, Thomas Petazzoni wrote:
> Here is a set of five patches that demonstrate that the mvebu PCIe
> driver can be used on Kirkwood with no modification at all. Those
> patches are not meant to be applied yet, the Device Trees are not
> completely correct yet (they don't take into account the fact that
> 6281 has one PCIe interface and 6282 has two PCIe interface).
>
> It took less than two hours to enable PCIe on Kirkwood (and in those
> two hours, the conversion of the DB-88F6281 board to the Device Tree
> has been done as well), and the result works fine:
>
> # /usr/sbin/lspci
> 00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 7846
> 00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 7846
> 01:00.0 SCSI storage controller: Marvell Technology Group Ltd. 88SX7042 PCI-e 4-port SATA-II (rev 02)
> 02:00.0 Ethernet controller: Intel Corporation 82572EI Gigabit Ethernet Controller (Copper) (rev 06)
>
> # cat /proc/cpuinfo | grep ^Hardware
> Hardware : Marvell Kirkwood (Flattened Device Tree)
Very nice!
> I've tested both the e1000e NIC card and the SATA 4 ports card and
> they work fine.
I assume it works with PIO, but does the SATA card use the I/O
space registers, or just memory space?
Arnd
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood
2013-03-27 18:07 ` [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood Arnd Bergmann
@ 2013-03-27 18:11 ` Thomas Petazzoni
2013-03-27 18:18 ` Thomas Petazzoni
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2013-03-27 18:11 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bjorn Helgaas, Grant Likely, Russell King, linux-pci,
linux-arm-kernel, devicetree-discuss, Lior Amsalem, Andrew Lunn,
Jason Cooper, Maen Suleiman, Thierry Reding, Gregory Clement,
Ezequiel Garcia, Olof Johansson, Tawfik Bayouk, Jason Gunthorpe,
Mitch Bradley, Andrew Murray
Dear Arnd Bergmann,
On Wed, 27 Mar 2013 18:07:50 +0000, Arnd Bergmann wrote:
> > # /usr/sbin/lspci
> > 00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 7846
> > 00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 7846
> > 01:00.0 SCSI storage controller: Marvell Technology Group Ltd. 88SX7042 PCI-e 4-port SATA-II (rev 02)
> > 02:00.0 Ethernet controller: Intel Corporation 82572EI Gigabit Ethernet Controller (Copper) (rev 06)
> >
> > # cat /proc/cpuinfo | grep ^Hardware
> > Hardware : Marvell Kirkwood (Flattened Device Tree)
>
> Very nice!
Yeah, I find it quite nice too :)
> > I've tested both the e1000e NIC card and the SATA 4 ports card and
> > they work fine.
>
> I assume it works with PIO, but does the SATA card use the I/O
> space registers, or just memory space?
Both cards only use memory space. I have a quick and dirty patch for
the e1000e driver that makes it read/write one particular register from
the I/O space to test that it works, but I haven't checked this yet on
Kirkwood. I don't expect much troubles, but who knows.
As I said, this patch set is for now just to show that it works, there
are some adjustments to be made here and there before those patches are
ready to be merged.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC PATCHv1 0/5] Use the mvebu PCIe driver on Kirkwood
2013-03-27 18:11 ` Thomas Petazzoni
@ 2013-03-27 18:18 ` Thomas Petazzoni
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2013-03-27 18:18 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Lior Amsalem, Andrew Lunn, Russell King, Jason Cooper,
Tawfik Bayouk, Olof Johansson, linux-pci, devicetree-discuss,
Thierry Reding, Grant Likely, Maen Suleiman, Ezequiel Garcia,
Andrew Murray, Bjorn Helgaas, Gregory Clement, Mitch Bradley,
linux-arm-kernel, Jason Gunthorpe
Arnd,
On Wed, 27 Mar 2013 19:11:14 +0100, Thomas Petazzoni wrote:
> > I assume it works with PIO, but does the SATA card use the I/O
> > space registers, or just memory space?
>
> Both cards only use memory space. I have a quick and dirty patch for
> the e1000e driver that makes it read/write one particular register from
> the I/O space to test that it works, but I haven't checked this yet on
> Kirkwood. I don't expect much troubles, but who knows.
Just to let you know, I've tested the e1000e with my small changes that
does one I/O access, and it seems to work properly. At least, I read
from the register the value I should be reading (and therefore writing
works, because the I/O space of the e1000e essentially has two
registers: one address register, and one data register, so you must
write one address in the address register before being able to read
something from the data register).
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread