All of lore.kernel.org
 help / color / mirror / Atom feed
* Linux hang
@ 2017-12-06 17:02 Siegmund, Jan
  2017-12-07 11:00   ` [U-Boot] " Siegmund, Jan
  2017-12-08 13:52 ` Anatolij Gustschin
  0 siblings, 2 replies; 14+ messages in thread
From: Siegmund, Jan @ 2017-12-06 17:02 UTC (permalink / raw)
  To: linux-fpga


Hi all,
does anybody have an idea for the following problem.

* FPGA is programmed using an overlay
* FPGA writes to SDRAM via the FPGA2SDRAM-bridge
* Linux hangs and the watchdog resets the board (the FPGA stays programmed)
* After the reset and boot the FPGA is reprogrammed using the same overlay
* Now, the FPGA can write to the SDRAM without a problem

The environment:

*Board:   DE0-NANO-SoC
*U-Boot: 2017.11
*Kernel:  4.14.0-rc7 (review-v4.14-rc7-non-dt-support-v5.1 branch)

The overlay:

/dts-v1/;
/plugin/;

/ {
	fragment@0 {
		target-path = "/soc/base_fpga_region";
		#address-cells = <1>;
		#size-cells = <1>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <1>;
			fpga-bridges = <&fpga_bridge0 &fpga_bridge1>;
			firmware-name = "foo_base.rbf";

			fpga-bridge@ffc25080 {
				compatible = "altr,socfpga-fpga2sdram-bridge";
				reg = <0xffc25080 0x4>;
				bridge-enable = <1>;
			};

			foo@ff200000 {
				compatible= "altr,bar";
				interrupt-parent = <&intc>;
				interrupts = <0 40 4>;
			};

		};
	};
};

Thanks

^ permalink raw reply	[flat|nested] 14+ messages in thread

* WG: Linux hang
  2017-12-06 17:02 Linux hang Siegmund, Jan
@ 2017-12-07 11:00   ` Siegmund, Jan
  2017-12-08 13:52 ` Anatolij Gustschin
  1 sibling, 0 replies; 14+ messages in thread
From: Siegmund, Jan @ 2017-12-07 11:00 UTC (permalink / raw)
  To: u-boot; +Cc: linux-fpga

Hi all,
does anybody have an idea for the following problem?

* FPGA is programmed using an overlay
* FPGA writes to SDRAM via the FPGA2SDRAM-bridge
* Linux hangs and the watchdog resets the board (the FPGA stays programmed)
* After the reset and boot, the FPGA is reprogrammed using the same overlay
* Now, the FPGA can write to the SDRAM without a problem

The environment:

*Board:�� DE0-NANO-SoC
*U-Boot: 2017.11
*Kernel:� 4.14.0-rc7 (review-v4.14-rc7-non-dt-support-v5.1 branch)

The overlay:

/dts-v1/;
/plugin/;

/ {
������� fragment@0 {
��������������� target-path = "/soc/base_fpga_region";
��������������� #address-cells = <1>;
��������������� #size-cells = <1>;
��������������� __overlay__ {
����������������������� #address-cells = <1>;
����������������������� #size-cells = <1>;
����������������������� fpga-bridges = <&fpga_bridge0 &fpga_bridge1>;
����������������������� firmware-name = "foo_base.rbf";

����������������������� fpga-bridge@ffc25080 {
������������������������������� compatible = "altr,socfpga-fpga2sdram-bridge";
������������������������������� reg = <0xffc25080 0x4>;
������������������������������� bridge-enable = <1>;
����������������������� };

����������������������� foo@ff200000 {
������������������������������� compatible= "altr,bar";
������������������������������� interrupt-parent = <&intc>;
������������������������������� interrupts = <0 40 4>;
����������������������� };

��������������� };
������� };
};

Thanks

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] WG: Linux hang
@ 2017-12-07 11:00   ` Siegmund, Jan
  0 siblings, 0 replies; 14+ messages in thread
From: Siegmund, Jan @ 2017-12-07 11:00 UTC (permalink / raw)
  To: u-boot

Hi all,
does anybody have an idea for the following problem?

* FPGA is programmed using an overlay
* FPGA writes to SDRAM via the FPGA2SDRAM-bridge
* Linux hangs and the watchdog resets the board (the FPGA stays programmed)
* After the reset and boot, the FPGA is reprogrammed using the same overlay
* Now, the FPGA can write to the SDRAM without a problem

The environment:

*Board:   DE0-NANO-SoC
*U-Boot: 2017.11
*Kernel:  4.14.0-rc7 (review-v4.14-rc7-non-dt-support-v5.1 branch)

The overlay:

/dts-v1/;
/plugin/;

/ {
        fragment at 0 {
                target-path = "/soc/base_fpga_region";
                #address-cells = <1>;
                #size-cells = <1>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <1>;
                        fpga-bridges = <&fpga_bridge0 &fpga_bridge1>;
                        firmware-name = "foo_base.rbf";

                        fpga-bridge at ffc25080 {
                                compatible = "altr,socfpga-fpga2sdram-bridge";
                                reg = <0xffc25080 0x4>;
                                bridge-enable = <1>;
                        };

                        foo at ff200000 {
                                compatible= "altr,bar";
                                interrupt-parent = <&intc>;
                                interrupts = <0 40 4>;
                        };

                };
        };
};

Thanks

^ permalink raw reply	[flat|nested] 14+ messages in thread

* AW: Linux hang
  2017-12-07 11:00   ` [U-Boot] " Siegmund, Jan
@ 2017-12-07 14:01     ` Goldschmidt Simon
  -1 siblings, 0 replies; 14+ messages in thread
From: Goldschmidt Simon @ 2017-12-07 14:01 UTC (permalink / raw)
  To: Siegmund, Jan, u-boot; +Cc: linux-fpga


Pepperl+Fuchs GmbH, Mannheim
Geschaeftsfuehrer/Managing Directors: Dr.-Ing. Gunther Kegel (Vors./CEO), Werner Guthier, Mehmet Hatiboglu
Vorsitzender des Aufsichtsrats/Chairman of the supervisory board: Claus Michael
Registergericht/Register Court: AG Mannheim HRB 4713
On 2017-12-07 12:01, Siegmund, Jan wrote:
> Hi all,
> does anybody have an idea for the following problem?
>
> * FPGA is programmed using an overlay
> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
> * After the reset and boot, the FPGA is reprogrammed using the same overlay
> * Now, the FPGA can write to the SDRAM without a problem
> [..]

I haven't tried this method of programming the fpga yet (only
programmed from U-Boot for now). But reading the SPL source code, it
seems as the bridges are taken out of reset if the fpga is programmed
when the SPL runs. That's a difference. And it would mean using your
way of programming the fpga, the bridges might still be in reset.

Regards,
Simon

Wichtiger Hinweis:
Diese E-Mail einschliesslich ihrer Anhaenge enthaelt vertrauliche und rechtlich geschuetzte Informationen, die nur fuer den Adressaten bestimmt sind.
Sollten Sie nicht der bezeichnete Adressat sein, so teilen Sie dies bitte dem Absender umgehend mit und loeschen Sie diese Nachricht und ihre Anhaenge. Die unbefugte Weitergabe, das Anfertigen von Kopien und jede Veraenderung der E-Mail ist untersagt. Der Absender haftet nicht fuer Inhalte von veraenderten E-Mails.


Important Information:
This e-mail message including its attachments contains confidential and legally protected information solely intended for the addressee. If you are not the intended addressee of this message, please contact the addresser immediately and delete this message including its attachments. The unauthorized dissemination, copying and change of this e-mail are strictly forbidden. The addresser shall not be liable for the content of such changed e-mails.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] Linux hang
@ 2017-12-07 14:01     ` Goldschmidt Simon
  0 siblings, 0 replies; 14+ messages in thread
From: Goldschmidt Simon @ 2017-12-07 14:01 UTC (permalink / raw)
  To: u-boot


Pepperl+Fuchs GmbH, Mannheim
Geschaeftsfuehrer/Managing Directors: Dr.-Ing. Gunther Kegel (Vors./CEO), Werner Guthier, Mehmet Hatiboglu
Vorsitzender des Aufsichtsrats/Chairman of the supervisory board: Claus Michael
Registergericht/Register Court: AG Mannheim HRB 4713
On 2017-12-07 12:01, Siegmund, Jan wrote:
> Hi all,
> does anybody have an idea for the following problem?
>
> * FPGA is programmed using an overlay
> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
> * After the reset and boot, the FPGA is reprogrammed using the same overlay
> * Now, the FPGA can write to the SDRAM without a problem
> [..]

I haven't tried this method of programming the fpga yet (only
programmed from U-Boot for now). But reading the SPL source code, it
seems as the bridges are taken out of reset if the fpga is programmed
when the SPL runs. That's a difference. And it would mean using your
way of programming the fpga, the bridges might still be in reset.

Regards,
Simon

Wichtiger Hinweis:
Diese E-Mail einschliesslich ihrer Anhaenge enthaelt vertrauliche und rechtlich geschuetzte Informationen, die nur fuer den Adressaten bestimmt sind.
Sollten Sie nicht der bezeichnete Adressat sein, so teilen Sie dies bitte dem Absender umgehend mit und loeschen Sie diese Nachricht und ihre Anhaenge. Die unbefugte Weitergabe, das Anfertigen von Kopien und jede Veraenderung der E-Mail ist untersagt. Der Absender haftet nicht fuer Inhalte von veraenderten E-Mails.


Important Information:
This e-mail message including its attachments contains confidential and legally protected information solely intended for the addressee. If you are not the intended addressee of this message, please contact the addresser immediately and delete this message including its attachments. The unauthorized dissemination, copying and change of this e-mail are strictly forbidden. The addresser shall not be liable for the content of such changed e-mails.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Linux hang
  2017-12-07 11:00   ` [U-Boot] " Siegmund, Jan
@ 2017-12-07 19:19     ` Alan Tull
  -1 siblings, 0 replies; 14+ messages in thread
From: Alan Tull @ 2017-12-07 19:19 UTC (permalink / raw)
  To: Siegmund, Jan; +Cc: u-boot, linux-fpga, matthew.gerlach

On Thu, Dec 7, 2017 at 5:00 AM, Siegmund, Jan <jan.siegmund0@hm.edu> wrote:

Hi SIegmund,

> Hi all,
> does anybody have an idea for the following problem?
>
> * FPGA is programmed using an overlay
> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
> * After the reset and boot, the FPGA is reprogrammed using the same overlay
> * Now, the FPGA can write to the SDRAM without a problem
>
> The environment:
>
> *Board:   DE0-NANO-SoC
> *U-Boot: 2017.11
> *Kernel:  4.14.0-rc7 (review-v4.14-rc7-non-dt-support-v5.1 branch)
>
> The overlay:
>
> /dts-v1/;
> /plugin/;
>
> / {
>         fragment@0 {
>                 target-path = "/soc/base_fpga_region";
>                 #address-cells = <1>;
>                 #size-cells = <1>;
>                 __overlay__ {
>                         #address-cells = <1>;
>                         #size-cells = <1>;
>                         fpga-bridges = <&fpga_bridge0 &fpga_bridge1>;
>                         firmware-name = "foo_base.rbf";
>
>                         fpga-bridge@ffc25080 {
>                                 compatible = "altr,socfpga-fpga2sdram-bridge";
>                                 reg = <0xffc25080 0x4>;
>                                 bridge-enable = <1>;
>                         };

It's been a while since I've touched that bridge, but here's what I
can think of, hope it helps.

This overlay will add the bridge after programming.  It looks like it
should enable it since you have bridge-enable = <1>, so I'm not sure
why that's not working.

Would it make sense to add the f2s bridge before doing the fpga
programming?  You could add the f2s bridge in the base device tree and
add it to your fpga-bridges list so that that bridge is enabled after
the fpga is programmed.

Alan

>
>                         foo@ff200000 {
>                                 compatible= "altr,bar";
>                                 interrupt-parent = <&intc>;
>                                 interrupts = <0 40 4>;
>                         };
>
>                 };
>         };
> };
>
> Thanks--
> To unsubscribe from this list: send the line "unsubscribe linux-fpga" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] Linux hang
@ 2017-12-07 19:19     ` Alan Tull
  0 siblings, 0 replies; 14+ messages in thread
From: Alan Tull @ 2017-12-07 19:19 UTC (permalink / raw)
  To: u-boot

On Thu, Dec 7, 2017 at 5:00 AM, Siegmund, Jan <jan.siegmund0@hm.edu> wrote:

Hi SIegmund,

> Hi all,
> does anybody have an idea for the following problem?
>
> * FPGA is programmed using an overlay
> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
> * After the reset and boot, the FPGA is reprogrammed using the same overlay
> * Now, the FPGA can write to the SDRAM without a problem
>
> The environment:
>
> *Board:   DE0-NANO-SoC
> *U-Boot: 2017.11
> *Kernel:  4.14.0-rc7 (review-v4.14-rc7-non-dt-support-v5.1 branch)
>
> The overlay:
>
> /dts-v1/;
> /plugin/;
>
> / {
>         fragment at 0 {
>                 target-path = "/soc/base_fpga_region";
>                 #address-cells = <1>;
>                 #size-cells = <1>;
>                 __overlay__ {
>                         #address-cells = <1>;
>                         #size-cells = <1>;
>                         fpga-bridges = <&fpga_bridge0 &fpga_bridge1>;
>                         firmware-name = "foo_base.rbf";
>
>                         fpga-bridge at ffc25080 {
>                                 compatible = "altr,socfpga-fpga2sdram-bridge";
>                                 reg = <0xffc25080 0x4>;
>                                 bridge-enable = <1>;
>                         };

It's been a while since I've touched that bridge, but here's what I
can think of, hope it helps.

This overlay will add the bridge after programming.  It looks like it
should enable it since you have bridge-enable = <1>, so I'm not sure
why that's not working.

Would it make sense to add the f2s bridge before doing the fpga
programming?  You could add the f2s bridge in the base device tree and
add it to your fpga-bridges list so that that bridge is enabled after
the fpga is programmed.

Alan

>
>                         foo at ff200000 {
>                                 compatible= "altr,bar";
>                                 interrupt-parent = <&intc>;
>                                 interrupts = <0 40 4>;
>                         };
>
>                 };
>         };
> };
>
> Thanks--
> To unsubscribe from this list: send the line "unsubscribe linux-fpga" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [U-Boot] Linux hang
  2017-12-07 14:01     ` [U-Boot] " Goldschmidt Simon
@ 2017-12-07 19:58       ` Jan Siegmund
  -1 siblings, 0 replies; 14+ messages in thread
From: Jan Siegmund @ 2017-12-07 19:58 UTC (permalink / raw)
  To: u-boot; +Cc: linux-fpga

Am 07.12.2017 um 15:01 schrieb Goldschmidt Simon:
> On 2017-12-07 12:01, Siegmund, Jan wrote:
>> Hi all,
>> does anybody have an idea for the following problem?
>>
>> * FPGA is programmed using an overlay
>> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
>> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
>> * After the reset and boot, the FPGA is reprogrammed using the same overlay
>> * Now, the FPGA can write to the SDRAM without a problem
>> [..]
> 
> I haven't tried this method of programming the fpga yet (only
> programmed from U-Boot for now). But reading the SPL source code, it
> seems as the bridges are taken out of reset if the fpga is programmed
> when the SPL runs. That's a difference. And it would mean using your
> way of programming the fpga, the bridges might still be in reset.

Usually, the bridges specified in the DT Overlay are automatically 
disabled before programming and re-enabled after it. I can also write
to the lwHPS2FPGA bridge and the FPGA accepts the data, so I don't
consider this to be the problem. Besides, I am using the FPGA-to-SDRAM 
interface directly connected to the SDRAM subsystem of the HPS 
(https://www.altera.com/documentation/sfo1410143707420.html#sfo1410067640997) 
and the resets are only targeting lwHPS2FPGA, HPS2FPGA and FPGA2HPS.
But your idea could go in the right direction, because some registers 
are set differently, when the FPGA is already in user mode.

Thanks,
Jan

> Regards,
> Simon



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] Linux hang
@ 2017-12-07 19:58       ` Jan Siegmund
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Siegmund @ 2017-12-07 19:58 UTC (permalink / raw)
  To: u-boot

Am 07.12.2017 um 15:01 schrieb Goldschmidt Simon:
> On 2017-12-07 12:01, Siegmund, Jan wrote:
>> Hi all,
>> does anybody have an idea for the following problem?
>>
>> * FPGA is programmed using an overlay
>> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
>> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
>> * After the reset and boot, the FPGA is reprogrammed using the same overlay
>> * Now, the FPGA can write to the SDRAM without a problem
>> [..]
> 
> I haven't tried this method of programming the fpga yet (only
> programmed from U-Boot for now). But reading the SPL source code, it
> seems as the bridges are taken out of reset if the fpga is programmed
> when the SPL runs. That's a difference. And it would mean using your
> way of programming the fpga, the bridges might still be in reset.

Usually, the bridges specified in the DT Overlay are automatically 
disabled before programming and re-enabled after it. I can also write
to the lwHPS2FPGA bridge and the FPGA accepts the data, so I don't
consider this to be the problem. Besides, I am using the FPGA-to-SDRAM 
interface directly connected to the SDRAM subsystem of the HPS 
(https://www.altera.com/documentation/sfo1410143707420.html#sfo1410067640997) 
and the resets are only targeting lwHPS2FPGA, HPS2FPGA and FPGA2HPS.
But your idea could go in the right direction, because some registers 
are set differently, when the FPGA is already in user mode.

Thanks,
Jan

> Regards,
> Simon

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Linux hang
  2017-12-07 19:19     ` [U-Boot] " Alan Tull
@ 2017-12-07 20:14       ` Jan Siegmund
  -1 siblings, 0 replies; 14+ messages in thread
From: Jan Siegmund @ 2017-12-07 20:14 UTC (permalink / raw)
  To: Alan Tull; +Cc: u-boot, linux-fpga, matthew.gerlach

Am 07.12.2017 um 20:19 schrieb Alan Tull:
> On Thu, Dec 7, 2017 at 5:00 AM, Siegmund, Jan <jan.siegmund0@hm.edu> wrote:
> 
> Hi SIegmund,
> 
>> Hi all,
>> does anybody have an idea for the following problem?
>>
>> * FPGA is programmed using an overlay
>> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
>> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
>> * After the reset and boot, the FPGA is reprogrammed using the same overlay
>> * Now, the FPGA can write to the SDRAM without a problem
>>
>> The environment:
>>
>> *Board:   DE0-NANO-SoC
>> *U-Boot: 2017.11
>> *Kernel:  4.14.0-rc7 (review-v4.14-rc7-non-dt-support-v5.1 branch)
>>
>> The overlay:
>>
>> /dts-v1/;
>> /plugin/;
>>
>> / {
>>          fragment@0 {
>>                  target-path = "/soc/base_fpga_region";
>>                  #address-cells = <1>;
>>                  #size-cells = <1>;
>>                  __overlay__ {
>>                          #address-cells = <1>;
>>                          #size-cells = <1>;
>>                          fpga-bridges = <&fpga_bridge0 &fpga_bridge1>;
>>                          firmware-name = "foo_base.rbf";
>>
>>                          fpga-bridge@ffc25080 {
>>                                  compatible = "altr,socfpga-fpga2sdram-bridge";
>>                                  reg = <0xffc25080 0x4>;
>>                                  bridge-enable = <1>;
>>                          };
> 
> It's been a while since I've touched that bridge, but here's what I
> can think of, hope it helps.
> 
> This overlay will add the bridge after programming.  It looks like it
> should enable it since you have bridge-enable = <1>, so I'm not sure
> why that's not working.
> 
> Would it make sense to add the f2s bridge before doing the fpga
> programming?  You could add the f2s bridge in the base device tree and
> add it to your fpga-bridges list so that that bridge is enabled after
> the fpga is programmed.

Hi Alan,
this might be worth a try.

Thanks,
Jan

> 
> Alan
> 
>>
>>                          foo@ff200000 {
>>                                  compatible= "altr,bar";
>>                                  interrupt-parent = <&intc>;
>>                                  interrupts = <0 40 4>;
>>                          };
>>
>>                  };
>>          };
>> };
>>
>> Thanks
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] Linux hang
@ 2017-12-07 20:14       ` Jan Siegmund
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Siegmund @ 2017-12-07 20:14 UTC (permalink / raw)
  To: u-boot

Am 07.12.2017 um 20:19 schrieb Alan Tull:
> On Thu, Dec 7, 2017 at 5:00 AM, Siegmund, Jan <jan.siegmund0@hm.edu> wrote:
> 
> Hi SIegmund,
> 
>> Hi all,
>> does anybody have an idea for the following problem?
>>
>> * FPGA is programmed using an overlay
>> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
>> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
>> * After the reset and boot, the FPGA is reprogrammed using the same overlay
>> * Now, the FPGA can write to the SDRAM without a problem
>>
>> The environment:
>>
>> *Board:   DE0-NANO-SoC
>> *U-Boot: 2017.11
>> *Kernel:  4.14.0-rc7 (review-v4.14-rc7-non-dt-support-v5.1 branch)
>>
>> The overlay:
>>
>> /dts-v1/;
>> /plugin/;
>>
>> / {
>>          fragment at 0 {
>>                  target-path = "/soc/base_fpga_region";
>>                  #address-cells = <1>;
>>                  #size-cells = <1>;
>>                  __overlay__ {
>>                          #address-cells = <1>;
>>                          #size-cells = <1>;
>>                          fpga-bridges = <&fpga_bridge0 &fpga_bridge1>;
>>                          firmware-name = "foo_base.rbf";
>>
>>                          fpga-bridge at ffc25080 {
>>                                  compatible = "altr,socfpga-fpga2sdram-bridge";
>>                                  reg = <0xffc25080 0x4>;
>>                                  bridge-enable = <1>;
>>                          };
> 
> It's been a while since I've touched that bridge, but here's what I
> can think of, hope it helps.
> 
> This overlay will add the bridge after programming.  It looks like it
> should enable it since you have bridge-enable = <1>, so I'm not sure
> why that's not working.
> 
> Would it make sense to add the f2s bridge before doing the fpga
> programming?  You could add the f2s bridge in the base device tree and
> add it to your fpga-bridges list so that that bridge is enabled after
> the fpga is programmed.

Hi Alan,
this might be worth a try.

Thanks,
Jan

> 
> Alan
> 
>>
>>                          foo at ff200000 {
>>                                  compatible= "altr,bar";
>>                                  interrupt-parent = <&intc>;
>>                                  interrupts = <0 40 4>;
>>                          };
>>
>>                  };
>>          };
>> };
>>
>> Thanks
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Linux hang
  2017-12-06 17:02 Linux hang Siegmund, Jan
  2017-12-07 11:00   ` [U-Boot] " Siegmund, Jan
@ 2017-12-08 13:52 ` Anatolij Gustschin
  2017-12-11 16:23     ` [U-Boot] " Jan Siegmund
  1 sibling, 1 reply; 14+ messages in thread
From: Anatolij Gustschin @ 2017-12-08 13:52 UTC (permalink / raw)
  To: Siegmund, Jan; +Cc: linux-fpga

Hi,

On Wed, 6 Dec 2017 17:02:07 +0000
Siegmund, Jan jan.siegmund0@hm.edu wrote:

>Hi all,
>does anybody have an idea for the following problem.
>
>* FPGA is programmed using an overlay
>* FPGA writes to SDRAM via the FPGA2SDRAM-bridge
>* Linux hangs and the watchdog resets the board (the FPGA stays programmed)
>* After the reset and boot the FPGA is reprogrammed using the same overlay
>* Now, the FPGA can write to the SDRAM without a problem

Probably because configuration of the FPGA2SDRAM-bridge is different than
other bridges. There is an important step needed, setting APPLYCFG bit in
the STATICCFG register [1]. But this must be done when the DDR interface
is idle (no DRAM transfer from ARM-core or DMA) which is not the case when
Linux is running. Therefore, if you have designs that use fpga2sdram, you
have to program the FPGA under U-Boot. U-Boot fpga command runs APPLYCFG
setting code from OCRAM.

Anatolij

[1] https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Important_Note_about_FPGAHPS_SDRAM_Bridge

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Linux hang
  2017-12-08 13:52 ` Anatolij Gustschin
@ 2017-12-11 16:23     ` Jan Siegmund
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Siegmund @ 2017-12-11 16:23 UTC (permalink / raw)
  To: Anatolij Gustschin; +Cc: linux-fpga, u-boot

Am 08.12.2017 um 14:52 schrieb Anatolij Gustschin:
> Hi,
> 
> On Wed, 6 Dec 2017 17:02:07 +0000
> Siegmund, Jan jan.siegmund0@hm.edu wrote:
> 
>> Hi all,
>> does anybody have an idea for the following problem.
>>
>> * FPGA is programmed using an overlay
>> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
>> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
>> * After the reset and boot the FPGA is reprogrammed using the same overlay
>> * Now, the FPGA can write to the SDRAM without a problem
> 
> Probably because configuration of the FPGA2SDRAM-bridge is different than
> other bridges. There is an important step needed, setting APPLYCFG bit in
> the STATICCFG register [1]. But this must be done when the DDR interface
> is idle (no DRAM transfer from ARM-core or DMA) which is not the case when
> Linux is running. Therefore, if you have designs that use fpga2sdram, you
> have to program the FPGA under U-Boot. U-Boot fpga command runs APPLYCFG
> setting code from OCRAM.

Thanks, this has helped me a lot. But there was still something
missing. First, the FPGA needs to be programmed in U-Boot using the 
'fpga' command. Then 'bridge enable' has to be called. This command
does not only get the lwHPS2FPGA, HPS2FPGA and FPGA2HPS bridges out of 
reset, but also applies the SDRAM config, like you described.
Now, my SDRAM-to-FPGA interface works fine.

Regards,
Jan

> 
> Anatolij
> 
> [1] https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Important_Note_about_FPGAHPS_SDRAM_Bridge
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] Linux hang
@ 2017-12-11 16:23     ` Jan Siegmund
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Siegmund @ 2017-12-11 16:23 UTC (permalink / raw)
  To: u-boot

Am 08.12.2017 um 14:52 schrieb Anatolij Gustschin:
> Hi,
> 
> On Wed, 6 Dec 2017 17:02:07 +0000
> Siegmund, Jan jan.siegmund0 at hm.edu wrote:
> 
>> Hi all,
>> does anybody have an idea for the following problem.
>>
>> * FPGA is programmed using an overlay
>> * FPGA writes to SDRAM via the FPGA2SDRAM-bridge
>> * Linux hangs and the watchdog resets the board (the FPGA stays programmed)
>> * After the reset and boot the FPGA is reprogrammed using the same overlay
>> * Now, the FPGA can write to the SDRAM without a problem
> 
> Probably because configuration of the FPGA2SDRAM-bridge is different than
> other bridges. There is an important step needed, setting APPLYCFG bit in
> the STATICCFG register [1]. But this must be done when the DDR interface
> is idle (no DRAM transfer from ARM-core or DMA) which is not the case when
> Linux is running. Therefore, if you have designs that use fpga2sdram, you
> have to program the FPGA under U-Boot. U-Boot fpga command runs APPLYCFG
> setting code from OCRAM.

Thanks, this has helped me a lot. But there was still something
missing. First, the FPGA needs to be programmed in U-Boot using the 
'fpga' command. Then 'bridge enable' has to be called. This command
does not only get the lwHPS2FPGA, HPS2FPGA and FPGA2HPS bridges out of 
reset, but also applies the SDRAM config, like you described.
Now, my SDRAM-to-FPGA interface works fine.

Regards,
Jan

> 
> Anatolij
> 
> [1] https://support.criticallink.com/redmine/projects/mityarm-5cs/wiki/Important_Note_about_FPGAHPS_SDRAM_Bridge
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-12-11 16:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 17:02 Linux hang Siegmund, Jan
2017-12-07 11:00 ` WG: " Siegmund, Jan
2017-12-07 11:00   ` [U-Boot] " Siegmund, Jan
2017-12-07 14:01   ` AW: " Goldschmidt Simon
2017-12-07 14:01     ` [U-Boot] " Goldschmidt Simon
2017-12-07 19:58     ` Jan Siegmund
2017-12-07 19:58       ` Jan Siegmund
2017-12-07 19:19   ` Alan Tull
2017-12-07 19:19     ` [U-Boot] " Alan Tull
2017-12-07 20:14     ` Jan Siegmund
2017-12-07 20:14       ` [U-Boot] " Jan Siegmund
2017-12-08 13:52 ` Anatolij Gustschin
2017-12-11 16:23   ` Jan Siegmund
2017-12-11 16:23     ` [U-Boot] " Jan Siegmund

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.