Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1541652 > unrolled thread

[PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300

Started byFlorian Fainelli <f.fainelli@gmail.com>
First post2016-12-14 03:40 +0100
Last post2016-12-14 17:50 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300 Florian Fainelli <f.fainelli@gmail.com> - 2016-12-14 03:40 +0100
    Re: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver  for TS-7300 Moritz Fischer <moritz.fischer@ettus.com> - 2016-12-14 07:20 +0100
      Re: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver  for TS-7300 Florian Fainelli <f.fainelli@gmail.com> - 2016-12-14 19:50 +0100
    RE: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver  for TS-7300 Hartley Sweeten <HartleyS@visionengravers.com> - 2016-12-14 17:50 +0100

#1541652 — [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2016-12-14 03:40 +0100
Subject[PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300
Message-ID<sO7E5-FN-1@gated-at.bofh.it>
Register the TS-7300 FPGA manager device drivers which allows us to load
bitstreams into the on-board Altera Cyclone II FPGA.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm/mach-ep93xx/ts72xx.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 3b39ea353d30..acf72ea670ef 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -230,6 +230,28 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
 	.phy_id		= 1,
 };
 
+#if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
+
+/* Relative to EP93XX_CS1_PHYS_BASE */
+#define TS73XX_FPGA_LOADER_BASE		0x03c00000
+
+static struct resource ts73xx_fpga_resources[] = {
+	{
+		.start	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE,
+		.end	= EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct platform_device ts73xx_fpga_device = {
+	.name	= "ts73xx-fpga-mgr",
+	.id	= -1,
+	.resource = ts73xx_fpga_resources,
+	.num_resources = ARRAY_SIZE(ts73xx_fpga_resources),
+};
+
+#endif
+
 static void __init ts72xx_init_machine(void)
 {
 	ep93xx_init_devices();
@@ -238,6 +260,10 @@ static void __init ts72xx_init_machine(void)
 	platform_device_register(&ts72xx_wdt_device);
 
 	ep93xx_register_eth(&ts72xx_eth_data, 1);
+#if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
+	if (board_is_ts7300())
+		platform_device_register(&ts73xx_fpga_device);
+#endif
 }
 
 MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
-- 
2.9.3

[toc] | [next] | [standalone]


#1541712 — Re: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300

FromMoritz Fischer <moritz.fischer@ettus.com>
Date2016-12-14 07:20 +0100
SubjectRe: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300
Message-ID<sOb4Z-2Zj-1@gated-at.bofh.it>
In reply to#1541652
Hi Florian,

On Tue, Dec 13, 2016 at 6:35 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> Register the TS-7300 FPGA manager device drivers which allows us to load
> bitstreams into the on-board Altera Cyclone II FPGA.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  arch/arm/mach-ep93xx/ts72xx.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
> index 3b39ea353d30..acf72ea670ef 100644
> --- a/arch/arm/mach-ep93xx/ts72xx.c
> +++ b/arch/arm/mach-ep93xx/ts72xx.c
> @@ -230,6 +230,28 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
>         .phy_id         = 1,
>  };
>
> +#if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
> +
> +/* Relative to EP93XX_CS1_PHYS_BASE */
> +#define TS73XX_FPGA_LOADER_BASE                0x03c00000
> +
> +static struct resource ts73xx_fpga_resources[] = {
> +       {
> +               .start  = EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE,
> +               .end    = EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1,
> +               .flags  = IORESOURCE_MEM,
> +       },
> +};
> +
> +static struct platform_device ts73xx_fpga_device = {
> +       .name   = "ts73xx-fpga-mgr",
> +       .id     = -1,
> +       .resource = ts73xx_fpga_resources,
> +       .num_resources = ARRAY_SIZE(ts73xx_fpga_resources),
> +};
> +
> +#endif
> +
>  static void __init ts72xx_init_machine(void)
>  {
>         ep93xx_init_devices();
> @@ -238,6 +260,10 @@ static void __init ts72xx_init_machine(void)
>         platform_device_register(&ts72xx_wdt_device);
>
>         ep93xx_register_eth(&ts72xx_eth_data, 1);
> +#if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
> +       if (board_is_ts7300())
> +               platform_device_register(&ts73xx_fpga_device);
> +#endif
>  }
>
>  MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
> --
> 2.9.3
>

I think this is backwards, shouldn't this be your [PATCH 2/2]?
Otherwise you're using
the driver before you added it.

Thanks,

Moritz

[toc] | [prev] | [next] | [standalone]


#1542112 — Re: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2016-12-14 19:50 +0100
SubjectRe: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300
Message-ID<sOmMN-1X4-1@gated-at.bofh.it>
In reply to#1541712
On 12/13/2016 10:14 PM, Moritz Fischer wrote:
> Hi Florian,
> 
> On Tue, Dec 13, 2016 at 6:35 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>> Register the TS-7300 FPGA manager device drivers which allows us to load
>> bitstreams into the on-board Altera Cyclone II FPGA.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>>  arch/arm/mach-ep93xx/ts72xx.c | 26 ++++++++++++++++++++++++++
>>  1 file changed, 26 insertions(+)
>>
>> diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
>> index 3b39ea353d30..acf72ea670ef 100644
>> --- a/arch/arm/mach-ep93xx/ts72xx.c
>> +++ b/arch/arm/mach-ep93xx/ts72xx.c
>> @@ -230,6 +230,28 @@ static struct ep93xx_eth_data __initdata ts72xx_eth_data = {
>>         .phy_id         = 1,
>>  };
>>
>> +#if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
>> +
>> +/* Relative to EP93XX_CS1_PHYS_BASE */
>> +#define TS73XX_FPGA_LOADER_BASE                0x03c00000
>> +
>> +static struct resource ts73xx_fpga_resources[] = {
>> +       {
>> +               .start  = EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE,
>> +               .end    = EP93XX_CS1_PHYS_BASE + TS73XX_FPGA_LOADER_BASE + 1,
>> +               .flags  = IORESOURCE_MEM,
>> +       },
>> +};
>> +
>> +static struct platform_device ts73xx_fpga_device = {
>> +       .name   = "ts73xx-fpga-mgr",
>> +       .id     = -1,
>> +       .resource = ts73xx_fpga_resources,
>> +       .num_resources = ARRAY_SIZE(ts73xx_fpga_resources),
>> +};
>> +
>> +#endif
>> +
>>  static void __init ts72xx_init_machine(void)
>>  {
>>         ep93xx_init_devices();
>> @@ -238,6 +260,10 @@ static void __init ts72xx_init_machine(void)
>>         platform_device_register(&ts72xx_wdt_device);
>>
>>         ep93xx_register_eth(&ts72xx_eth_data, 1);
>> +#if IS_ENABLED(CONFIG_FPGA_MGR_TS73XX)
>> +       if (board_is_ts7300())
>> +               platform_device_register(&ts73xx_fpga_device);
>> +#endif
>>  }
>>
>>  MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
>> --
>> 2.9.3
>>
> 
> I think this is backwards, shouldn't this be your [PATCH 2/2]?
> Otherwise you're using
> the driver before you added it.

I can definitively re-order the patches, although I don't think this
really makes a difference, a driver without device does nothing, and
vice versa.
-- 
Florian

[toc] | [prev] | [next] | [standalone]


#1542040 — RE: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300

FromHartley Sweeten <HartleyS@visionengravers.com>
Date2016-12-14 17:50 +0100
SubjectRE: [PATCH v3 1/2] ARM: ep93xx: Register ts73xx-fpga manager driver for TS-7300
Message-ID<sOkUG-ju-23@gated-at.bofh.it>
In reply to#1541652
On Tuesday, December 13, 2016 7:36 PM, Florian Fainelli wrote:
>
> Register the TS-7300 FPGA manager device drivers which allows us to load
> bitstreams into the on-board Altera Cyclone II FPGA.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  arch/arm/mach-ep93xx/ts72xx.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)

For the ep93xx core change:

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web