All of lore.kernel.org
 help / color / mirror / Atom feed
* [cip-dev] Altera CIP branch vs. Denali NAND driver
@ 2018-07-06  6:09 Jan Kiszka
  2018-07-06  7:52 ` 小口琢夫 / KOGUCHI,TAKUO
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2018-07-06  6:09 UTC (permalink / raw)
  To: cip-dev

Hi Koguchi-san,

we have been using two commits [1][2] from the linux-cip-cyclonev branch
at cip-playground to add denali support for an Arria 10 design here that
uses 4.4-cip. However, it turned out that ECC is not working properly
with that BSP driver. Are you aware of this?

Meanwhile I started the endeavor to backport the upstream denali driver
to 4.4 which /seems/ to work (upstream definitely works) but is a >110
commit long queue and ignores other NAND drivers. Lot's of mtd/nand
subsystem changes unfortunately makes it unpalatable for cip upstream.
But I wonder if there is common interest in a solution that is
maintained - maybe in cip-playground - by more than a single product
crew on our side.

Best regards,
Jan

[1]
https://gitlab.com/cip-playground/linux-cip-cyclonev/commit/d6459dde24c46991b1976f780e74d02b9ebbed2e
[2]
https://gitlab.com/cip-playground/linux-cip-cyclonev/commit/c9bc5beb34d70efc11370cafb3f087657a80f112

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-06  6:09 [cip-dev] Altera CIP branch vs. Denali NAND driver Jan Kiszka
@ 2018-07-06  7:52 ` 小口琢夫 / KOGUCHI,TAKUO
  2018-07-06  8:05   ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: 小口琢夫 / KOGUCHI,TAKUO @ 2018-07-06  7:52 UTC (permalink / raw)
  To: cip-dev

Hi Jan,

> at cip-playground to add denali support for an Arria 10 design here that
> uses 4.4-cip. However, it turned out that ECC is not working properly
> with that BSP driver. Are you aware of this?
Unfortunately I have been testing Denali NAND driver(with ECC enabled) only on two kinds of custom boards with cyclone5.
I had two problems using this driver;
(1) On one board, I need to add one to en_lo in function nand_onfi_timing_set before writing to RDWR_EN_LO_CNT.
 Without this, NAND was not detected.
(2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by denali_hw_init. (I do not remember the actual value off the top of my head). Without this, it resulted in ECC errors as far as I remember.

Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good idea even for the playground, though I am not quite sure.

Takuo Koguchi


> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Sent: Friday, July 06, 2018 3:10 PM
> To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>
> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev <cip-dev@lists.cip-project.org>
> Subject: [!]Altera CIP branch vs. Denali NAND driver
> 
> Hi Koguchi-san,
> 
> we have been using two commits [1][2] from the linux-cip-cyclonev branch
> at cip-playground to add denali support for an Arria 10 design here that
> uses 4.4-cip. However, it turned out that ECC is not working properly
> with that BSP driver. Are you aware of this?
> 
> Meanwhile I started the endeavor to backport the upstream denali driver
> to 4.4 which /seems/ to work (upstream definitely works) but is a >110
> commit long queue and ignores other NAND drivers. Lot's of mtd/nand
> subsystem changes unfortunately makes it unpalatable for cip upstream.
> But I wonder if there is common interest in a solution that is
> maintained - maybe in cip-playground - by more than a single product
> crew on our side.
> 
> Best regards,
> Jan
> 
> [1]
> https://clicktime.symantec.com/a/1/eB5fOHT2UDhywWydtoIvmvsHOebpJ2pbGUjuC-Me_xI=?d=jJWU0
> v6xiQhYCrKoK-hDT033fNX5TCId2Df2oX2qOuT3umPLKzKpWO8sqEBeh6VYCIZ2BNYZRnlpHXnwbYRzzXTi6aAT
> 2o0MRphqts7xqE-v8WvMPyYkVHS4m3QCV8jtyiqnw8NRgmuLMcSclezm8Y645ezRIONWT5kDX56AbwXFcYcWpq3
> EOtd8LVq_ZCyEKS37CW-NjcgxLadlLqAsKlQl-vlYt3ODGGSiFke5UauaA1AWeuTXBZ4yJD_bbGfNbsVfGGnmeg
> 07wv8im_P36lOy-SXkGM4wd3EKrxOutuyc28GPotTuA-7oThEY96mmXu_6ilgoGb0q4HKLbWOiX7ZzSNYBluHfz
> YUN1k3EjIN_6WfiYq5AXKb5aJhuRcdURbA%3D&u=https%3A%2F%2Fgitlab.com%2Fcip-playground%2Flin
> ux-cip-cyclonev%2Fcommit%2Fd6459dde24c46991b1976f780e74d02b9ebbed2e
> [2]
> https://clicktime.symantec.com/a/1/vuGtYXFhvkHicbAkms0pft_vrkR_th-16RSqIzH-lCw=?d=jJWU0
> v6xiQhYCrKoK-hDT033fNX5TCId2Df2oX2qOuT3umPLKzKpWO8sqEBeh6VYCIZ2BNYZRnlpHXnwbYRzzXTi6aAT
> 2o0MRphqts7xqE-v8WvMPyYkVHS4m3QCV8jtyiqnw8NRgmuLMcSclezm8Y645ezRIONWT5kDX56AbwXFcYcWpq3
> EOtd8LVq_ZCyEKS37CW-NjcgxLadlLqAsKlQl-vlYt3ODGGSiFke5UauaA1AWeuTXBZ4yJD_bbGfNbsVfGGnmeg
> 07wv8im_P36lOy-SXkGM4wd3EKrxOutuyc28GPotTuA-7oThEY96mmXu_6ilgoGb0q4HKLbWOiX7ZzSNYBluHfz
> YUN1k3EjIN_6WfiYq5AXKb5aJhuRcdURbA%3D&u=https%3A%2F%2Fgitlab.com%2Fcip-playground%2Flin
> ux-cip-cyclonev%2Fcommit%2Fc9bc5beb34d70efc11370cafb3f087657a80f112
> 
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-06  7:52 ` 小口琢夫 / KOGUCHI,TAKUO
@ 2018-07-06  8:05   ` Jan Kiszka
  2018-07-06  8:21     ` Marek Vasut
  2018-07-06  8:53     ` 小口琢夫 / KOGUCHI,TAKUO
  0 siblings, 2 replies; 14+ messages in thread
From: Jan Kiszka @ 2018-07-06  8:05 UTC (permalink / raw)
  To: cip-dev

On 2018-07-06 09:52, ???? / KOGUCHI?TAKUO wrote:
> Hi Jan,
> 
>> at cip-playground to add denali support for an Arria 10 design here that
>> uses 4.4-cip. However, it turned out that ECC is not working properly
>> with that BSP driver. Are you aware of this?
> Unfortunately I have been testing Denali NAND driver(with ECC enabled) only on two kinds of custom boards with cyclone5.
> I had two problems using this driver;
> (1) On one board, I need to add one to en_lo in function nand_onfi_timing_set before writing to RDWR_EN_LO_CNT.
>  Without this, NAND was not detected.

That was apparently not an issue for us.

> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by denali_hw_init. (I do not remember the actual value off the top of my head). Without this, it resulted in ECC errors as far as I remember.

We are using upstream U-boot (Marek sorted out the BSP U-boot
differences for us). I suppose you were using the Altera's version,
right? Marek, any comment on this tuning?

> 
> Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good idea even for the playground, though I am not quite sure.

I know, but this is related to the fact that the backport started as
proof-of-concept and targets that single device only so far. This would
have to be resolved when we wanted broader use, but it only makes sense
if there is interest.

Thanks,
Jan

> 
> Takuo Koguchi
> 
> 
>> -----Original Message-----
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>> Sent: Friday, July 06, 2018 3:10 PM
>> To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>
>> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev <cip-dev@lists.cip-project.org>
>> Subject: [!]Altera CIP branch vs. Denali NAND driver
>>
>> Hi Koguchi-san,
>>
>> we have been using two commits [1][2] from the linux-cip-cyclonev branch
>> at cip-playground to add denali support for an Arria 10 design here that
>> uses 4.4-cip. However, it turned out that ECC is not working properly
>> with that BSP driver. Are you aware of this?
>>
>> Meanwhile I started the endeavor to backport the upstream denali driver
>> to 4.4 which /seems/ to work (upstream definitely works) but is a >110
>> commit long queue and ignores other NAND drivers. Lot's of mtd/nand
>> subsystem changes unfortunately makes it unpalatable for cip upstream.
>> But I wonder if there is common interest in a solution that is
>> maintained - maybe in cip-playground - by more than a single product
>> crew on our side.
>>
>> Best regards,
>> Jan
>>
>> [1]
>> https://clicktime.symantec.com/a/1/eB5fOHT2UDhywWydtoIvmvsHOebpJ2pbGUjuC-Me_xI=?d=jJWU0
>> v6xiQhYCrKoK-hDT033fNX5TCId2Df2oX2qOuT3umPLKzKpWO8sqEBeh6VYCIZ2BNYZRnlpHXnwbYRzzXTi6aAT
>> 2o0MRphqts7xqE-v8WvMPyYkVHS4m3QCV8jtyiqnw8NRgmuLMcSclezm8Y645ezRIONWT5kDX56AbwXFcYcWpq3
>> EOtd8LVq_ZCyEKS37CW-NjcgxLadlLqAsKlQl-vlYt3ODGGSiFke5UauaA1AWeuTXBZ4yJD_bbGfNbsVfGGnmeg
>> 07wv8im_P36lOy-SXkGM4wd3EKrxOutuyc28GPotTuA-7oThEY96mmXu_6ilgoGb0q4HKLbWOiX7ZzSNYBluHfz
>> YUN1k3EjIN_6WfiYq5AXKb5aJhuRcdURbA%3D&u=https%3A%2F%2Fgitlab.com%2Fcip-playground%2Flin
>> ux-cip-cyclonev%2Fcommit%2Fd6459dde24c46991b1976f780e74d02b9ebbed2e
>> [2]
>> https://clicktime.symantec.com/a/1/vuGtYXFhvkHicbAkms0pft_vrkR_th-16RSqIzH-lCw=?d=jJWU0
>> v6xiQhYCrKoK-hDT033fNX5TCId2Df2oX2qOuT3umPLKzKpWO8sqEBeh6VYCIZ2BNYZRnlpHXnwbYRzzXTi6aAT
>> 2o0MRphqts7xqE-v8WvMPyYkVHS4m3QCV8jtyiqnw8NRgmuLMcSclezm8Y645ezRIONWT5kDX56AbwXFcYcWpq3
>> EOtd8LVq_ZCyEKS37CW-NjcgxLadlLqAsKlQl-vlYt3ODGGSiFke5UauaA1AWeuTXBZ4yJD_bbGfNbsVfGGnmeg
>> 07wv8im_P36lOy-SXkGM4wd3EKrxOutuyc28GPotTuA-7oThEY96mmXu_6ilgoGb0q4HKLbWOiX7ZzSNYBluHfz
>> YUN1k3EjIN_6WfiYq5AXKb5aJhuRcdURbA%3D&u=https%3A%2F%2Fgitlab.com%2Fcip-playground%2Flin
>> ux-cip-cyclonev%2Fcommit%2Fc9bc5beb34d70efc11370cafb3f087657a80f112
>>
>> --
>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>> Corporate Competence Center Embedded Linux

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-06  8:05   ` Jan Kiszka
@ 2018-07-06  8:21     ` Marek Vasut
  2018-07-06  8:34       ` Jan Kiszka
  2018-07-06  8:53     ` 小口琢夫 / KOGUCHI,TAKUO
  1 sibling, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2018-07-06  8:21 UTC (permalink / raw)
  To: cip-dev

On 07/06/2018 10:05 AM, Jan Kiszka wrote:
> On 2018-07-06 09:52, ???? / KOGUCHI?TAKUO wrote:
>> Hi Jan,

Hello everyone,

>>> at cip-playground to add denali support for an Arria 10 design here that
>>> uses 4.4-cip. However, it turned out that ECC is not working properly
>>> with that BSP driver. Are you aware of this?
>> Unfortunately I have been testing Denali NAND driver(with ECC enabled) only on two kinds of custom boards with cyclone5.
>> I had two problems using this driver;
>> (1) On one board, I need to add one to en_lo in function nand_onfi_timing_set before writing to RDWR_EN_LO_CNT.
>>  Without this, NAND was not detected.
> 
> That was apparently not an issue for us.
> 
>> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by denali_hw_init. (I do not remember the actual value off the top of my head). Without this, it resulted in ECC errors as far as I remember.
> 
> We are using upstream U-boot (Marek sorted out the BSP U-boot
> differences for us). I suppose you were using the Altera's version,
> right? Marek, any comment on this tuning?

This is selected based on the DT compatible value in mainline U-Boot,
instead of being hardcoded into the binary, see

http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mtd/nand/denali_dt.c;h=65a7797f0f3819aace32ea4f8a8a8b5d504b5a62;hb=HEAD#l21

>> Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good idea even for the playground, though I am not quite sure.
> 
> I know, but this is related to the fact that the backport started as
> proof-of-concept and targets that single device only so far. This would
> have to be resolved when we wanted broader use, but it only makes sense
> if there is interest.
> 
> Thanks,
> Jan
> 
>>
>> Takuo Koguchi
>>
>>
>>> -----Original Message-----
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>> Sent: Friday, July 06, 2018 3:10 PM
>>> To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>
>>> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev <cip-dev@lists.cip-project.org>
>>> Subject: [!]Altera CIP branch vs. Denali NAND driver
>>>
>>> Hi Koguchi-san,
>>>
>>> we have been using two commits [1][2] from the linux-cip-cyclonev branch
>>> at cip-playground to add denali support for an Arria 10 design here that
>>> uses 4.4-cip. However, it turned out that ECC is not working properly
>>> with that BSP driver. Are you aware of this?
>>>
>>> Meanwhile I started the endeavor to backport the upstream denali driver
>>> to 4.4 which /seems/ to work (upstream definitely works) but is a >110
>>> commit long queue and ignores other NAND drivers. Lot's of mtd/nand
>>> subsystem changes unfortunately makes it unpalatable for cip upstream.
>>> But I wonder if there is common interest in a solution that is
>>> maintained - maybe in cip-playground - by more than a single product
>>> crew on our side.
>>>
>>> Best regards,
>>> Jan
>>>
>>> [1]
>>> https://clicktime.symantec.com/a/1/eB5fOHT2UDhywWydtoIvmvsHOebpJ2pbGUjuC-Me_xI=?d=jJWU0
>>> v6xiQhYCrKoK-hDT033fNX5TCId2Df2oX2qOuT3umPLKzKpWO8sqEBeh6VYCIZ2BNYZRnlpHXnwbYRzzXTi6aAT
>>> 2o0MRphqts7xqE-v8WvMPyYkVHS4m3QCV8jtyiqnw8NRgmuLMcSclezm8Y645ezRIONWT5kDX56AbwXFcYcWpq3
>>> EOtd8LVq_ZCyEKS37CW-NjcgxLadlLqAsKlQl-vlYt3ODGGSiFke5UauaA1AWeuTXBZ4yJD_bbGfNbsVfGGnmeg
>>> 07wv8im_P36lOy-SXkGM4wd3EKrxOutuyc28GPotTuA-7oThEY96mmXu_6ilgoGb0q4HKLbWOiX7ZzSNYBluHfz
>>> YUN1k3EjIN_6WfiYq5AXKb5aJhuRcdURbA%3D&u=https%3A%2F%2Fgitlab.com%2Fcip-playground%2Flin
>>> ux-cip-cyclonev%2Fcommit%2Fd6459dde24c46991b1976f780e74d02b9ebbed2e
>>> [2]
>>> https://clicktime.symantec.com/a/1/vuGtYXFhvkHicbAkms0pft_vrkR_th-16RSqIzH-lCw=?d=jJWU0
>>> v6xiQhYCrKoK-hDT033fNX5TCId2Df2oX2qOuT3umPLKzKpWO8sqEBeh6VYCIZ2BNYZRnlpHXnwbYRzzXTi6aAT
>>> 2o0MRphqts7xqE-v8WvMPyYkVHS4m3QCV8jtyiqnw8NRgmuLMcSclezm8Y645ezRIONWT5kDX56AbwXFcYcWpq3
>>> EOtd8LVq_ZCyEKS37CW-NjcgxLadlLqAsKlQl-vlYt3ODGGSiFke5UauaA1AWeuTXBZ4yJD_bbGfNbsVfGGnmeg
>>> 07wv8im_P36lOy-SXkGM4wd3EKrxOutuyc28GPotTuA-7oThEY96mmXu_6ilgoGb0q4HKLbWOiX7ZzSNYBluHfz
>>> YUN1k3EjIN_6WfiYq5AXKb5aJhuRcdURbA%3D&u=https%3A%2F%2Fgitlab.com%2Fcip-playground%2Flin
>>> ux-cip-cyclonev%2Fcommit%2Fc9bc5beb34d70efc11370cafb3f087657a80f112
>>>
>>> --
>>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>>> Corporate Competence Center Embedded Linux
> 


-- 
Best regards,
Marek Vasut

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-06  8:21     ` Marek Vasut
@ 2018-07-06  8:34       ` Jan Kiszka
  2018-07-06  8:50         ` Marek Vasut
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2018-07-06  8:34 UTC (permalink / raw)
  To: cip-dev

On 2018-07-06 10:21, Marek Vasut wrote:
> On 07/06/2018 10:05 AM, Jan Kiszka wrote:
>> On 2018-07-06 09:52, ???? / KOGUCHI?TAKUO wrote:
>>> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by denali_hw_init. (I do not remember the actual value off the top of my head). Without this, it resulted in ECC errors as far as I remember.
>>
>> We are using upstream U-boot (Marek sorted out the BSP U-boot
>> differences for us). I suppose you were using the Altera's version,
>> right? Marek, any comment on this tuning?
> 
> This is selected based on the DT compatible value in mainline U-Boot,
> instead of being hardcoded into the binary, see
> 
> http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mtd/nand/denali_dt.c;h=65a7797f0f3819aace32ea4f8a8a8b5d504b5a62;hb=HEAD#l21
> 

Hmm, aren't the DT bindings different between upstream and the Altera
BSP (thus also the cip-playground patches)? Or were we using a different
DT for mainline U-boot than for the CIP kernel, Marek?

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-06  8:34       ` Jan Kiszka
@ 2018-07-06  8:50         ` Marek Vasut
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2018-07-06  8:50 UTC (permalink / raw)
  To: cip-dev

On 07/06/2018 10:34 AM, Jan Kiszka wrote:
> On 2018-07-06 10:21, Marek Vasut wrote:
>> On 07/06/2018 10:05 AM, Jan Kiszka wrote:
>>> On 2018-07-06 09:52, ???? / KOGUCHI?TAKUO wrote:
>>>> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by denali_hw_init. (I do not remember the actual value off the top of my head). Without this, it resulted in ECC errors as far as I remember.
>>>
>>> We are using upstream U-boot (Marek sorted out the BSP U-boot
>>> differences for us). I suppose you were using the Altera's version,
>>> right? Marek, any comment on this tuning?
>>
>> This is selected based on the DT compatible value in mainline U-Boot,
>> instead of being hardcoded into the binary, see
>>
>> http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mtd/nand/denali_dt.c;h=65a7797f0f3819aace32ea4f8a8a8b5d504b5a62;hb=HEAD#l21
>>
> 
> Hmm, aren't the DT bindings different between upstream and the Altera
> BSP (thus also the cip-playground patches)? Or were we using a different
> DT for mainline U-boot than for the CIP kernel, Marek?

Mainline U-Boot is importing the DTS from mainline Linux, so it is
mostly in sync with DT properties used by Linux. U-Boot is using it's
own DT blob and this is not being passed to Linux, Linux also has it's own.

It is quite possible the Altera BSP invented some additional non
standard DT properties.

-- 
Best regards,
Marek Vasut

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-06  8:05   ` Jan Kiszka
  2018-07-06  8:21     ` Marek Vasut
@ 2018-07-06  8:53     ` 小口琢夫 / KOGUCHI,TAKUO
  2018-07-06 11:20       ` Jan Kiszka
  1 sibling, 1 reply; 14+ messages in thread
From: 小口琢夫 / KOGUCHI,TAKUO @ 2018-07-06  8:53 UTC (permalink / raw)
  To: cip-dev

Hi Jan,

> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Sent: Friday, July 06, 2018 5:06 PM
> > (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by denali_hw_init.
> (I do not remember the actual value off the top of my head). Without this, it resulted in
> ECC errors as far as I remember.
> 
> We are using upstream U-boot (Marek sorted out the BSP U-boot
> differences for us). I suppose you were using the Altera's version,
> right? Marek, any comment on this tuning?
Yes. I am using u-boot which came with Altera SoCSDK for the custom boards.

> 
> >
> > Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good idea even
> for the playground, though I am not quite sure.
> 
> I know, but this is related to the fact that the backport started as
> proof-of-concept and targets that single device only so far. This would
> have to be resolved when we wanted broader use, but it only makes sense
> if there is interest.
>
At lease I am interested.

Takuo Koguchi

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-06  8:53     ` 小口琢夫 / KOGUCHI,TAKUO
@ 2018-07-06 11:20       ` Jan Kiszka
  2018-07-12  1:47         ` 小口琢夫 / KOGUCHI,TAKUO
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2018-07-06 11:20 UTC (permalink / raw)
  To: cip-dev

On 2018-07-06 10:53, ???? / KOGUCHI?TAKUO wrote:
> Hi Jan,
> 
>> -----Original Message-----
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>> Sent: Friday, July 06, 2018 5:06 PM
>>> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by denali_hw_init.
>> (I do not remember the actual value off the top of my head). Without this, it resulted in
>> ECC errors as far as I remember.
>>
>> We are using upstream U-boot (Marek sorted out the BSP U-boot
>> differences for us). I suppose you were using the Altera's version,
>> right? Marek, any comment on this tuning?
> Yes. I am using u-boot which came with Altera SoCSDK for the custom boards.
> 
>>
>>>
>>> Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good idea even
>> for the playground, though I am not quite sure.
>>
>> I know, but this is related to the fact that the backport started as
>> proof-of-concept and targets that single device only so far. This would
>> have to be resolved when we wanted broader use, but it only makes sense
>> if there is interest.
>>
> At lease I am interested.

That's a good start! To help the discussion, I just pushed our
work-in-progress branch here:

http://git.kiszka.org/?p=linux.git;a=shortlog;h=refs/heads/denali-cip-backport

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-06 11:20       ` Jan Kiszka
@ 2018-07-12  1:47         ` 小口琢夫 / KOGUCHI,TAKUO
  2018-07-12  5:36           ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: 小口琢夫 / KOGUCHI,TAKUO @ 2018-07-12  1:47 UTC (permalink / raw)
  To: cip-dev

Jan,
I have tried to build denali-cip-backport and spent some time. It does not work yet on my boards.
I saw "nand: timed out while waiting for chip to become ready" several times and the probe function failed.
Sorry to say, I will not able to continue this effort for now.
When I would make a progress, I will let you know.

Best Regards,

Takuo

> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Sent: Friday, July 06, 2018 8:21 PM
> To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>; Marek Vasut <marex@denx.de>
> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev <cip-dev@lists.cip-project.org>
> Subject: [!]Re: Altera CIP branch vs. Denali NAND driver
> 
> On 2018-07-06 10:53, ???? / KOGUCHI?TAKUO wrote:
> > Hi Jan,
> >
> >> -----Original Message-----
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >> Sent: Friday, July 06, 2018 5:06 PM
> >>> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by
> denali_hw_init.
> >> (I do not remember the actual value off the top of my head). Without this, it resulted
> in
> >> ECC errors as far as I remember.
> >>
> >> We are using upstream U-boot (Marek sorted out the BSP U-boot
> >> differences for us). I suppose you were using the Altera's version,
> >> right? Marek, any comment on this tuning?
> > Yes. I am using u-boot which came with Altera SoCSDK for the custom boards.
> >
> >>
> >>>
> >>> Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good idea
> even
> >> for the playground, though I am not quite sure.
> >>
> >> I know, but this is related to the fact that the backport started as
> >> proof-of-concept and targets that single device only so far. This would
> >> have to be resolved when we wanted broader use, but it only makes sense
> >> if there is interest.
> >>
> > At lease I am interested.
> 
> That's a good start! To help the discussion, I just pushed our
> work-in-progress branch here:
> 
> https://clicktime.symantec.com/a/1/F8dAar5oXXL8ThwUCaqkcZWZ4mzqV2UK6LFuZQ8TuME=?d=EXT8h
> pgpr56TSRvXnP65tXaLN2CmPa-z5_-z-jES6Avk7IHyojYPdGlFS55ZRmMK3wgYGo6wDmN5xCrI8DyPN0X5kLeM
> irO_Aq3Yk6V0A5dp7VJNu2I0P-6Fv0f0VQ8cgamsxMALkTpiaihP39xTkygbp0CEvtis80ATkWGXpYLqsbPZ92t
> jlqKb8zYq28fZzg5m2JU5EEFU7uyN5GISKV03Msk8EBE883MXcBV5HS3sQZ87_-uBu0lRIvjdjai5s1UWLxlgb9
> kjj51qXxSOGkoRuYsPHD_aaP-FSs5yOj1DCMS8moiRA2M8JWJYjL9mTCv9ebr3wau_UEtuMoXGGIVqQVoEwOWFL
> qUf-wX9qa2ad1QUhQ0JLBk86NNP8a4rPNMTZRkYUw%3D%3D&u=http%3A%2F%2Fgit.kiszka.org%2F%3Fp%3D
> linux.git%3Ba%3Dshortlog%3Bh%3Drefs%2Fheads%2Fdenali-cip-backport
> 
> Jan
> 
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-12  1:47         ` 小口琢夫 / KOGUCHI,TAKUO
@ 2018-07-12  5:36           ` Jan Kiszka
  2018-07-12  6:37             ` 小口琢夫 / KOGUCHI,TAKUO
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2018-07-12  5:36 UTC (permalink / raw)
  To: cip-dev

On 2018-07-12 03:47, ???? / KOGUCHI?TAKUO wrote:
> Jan,
> I have tried to build denali-cip-backport and spent some time. It does not work yet on my boards.
> I saw "nand: timed out while waiting for chip to become ready" several times and the probe function failed.
> Sorry to say, I will not able to continue this effort for now.
> When I would make a progress, I will let you know.
> 

Yeah, I wouldn't be surprised if I missed some patch that makes a
difference on your board. But upstream 4.14+ works fine for you, right?

Thanks for trying out nevertheless!

Jan

> Best Regards,
> 
> Takuo
> 
>> -----Original Message-----
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>> Sent: Friday, July 06, 2018 8:21 PM
>> To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>; Marek Vasut <marex@denx.de>
>> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev <cip-dev@lists.cip-project.org>
>> Subject: [!]Re: Altera CIP branch vs. Denali NAND driver
>>
>> On 2018-07-06 10:53, ???? / KOGUCHI?TAKUO wrote:
>>> Hi Jan,
>>>
>>>> -----Original Message-----
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>> Sent: Friday, July 06, 2018 5:06 PM
>>>>> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by
>> denali_hw_init.
>>>> (I do not remember the actual value off the top of my head). Without this, it resulted
>> in
>>>> ECC errors as far as I remember.
>>>>
>>>> We are using upstream U-boot (Marek sorted out the BSP U-boot
>>>> differences for us). I suppose you were using the Altera's version,
>>>> right? Marek, any comment on this tuning?
>>> Yes. I am using u-boot which came with Altera SoCSDK for the custom boards.
>>>
>>>>
>>>>>
>>>>> Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good idea
>> even
>>>> for the playground, though I am not quite sure.
>>>>
>>>> I know, but this is related to the fact that the backport started as
>>>> proof-of-concept and targets that single device only so far. This would
>>>> have to be resolved when we wanted broader use, but it only makes sense
>>>> if there is interest.
>>>>
>>> At lease I am interested.
>>
>> That's a good start! To help the discussion, I just pushed our
>> work-in-progress branch here:
>>
>> https://clicktime.symantec.com/a/1/F8dAar5oXXL8ThwUCaqkcZWZ4mzqV2UK6LFuZQ8TuME=?d=EXT8h
>> pgpr56TSRvXnP65tXaLN2CmPa-z5_-z-jES6Avk7IHyojYPdGlFS55ZRmMK3wgYGo6wDmN5xCrI8DyPN0X5kLeM
>> irO_Aq3Yk6V0A5dp7VJNu2I0P-6Fv0f0VQ8cgamsxMALkTpiaihP39xTkygbp0CEvtis80ATkWGXpYLqsbPZ92t
>> jlqKb8zYq28fZzg5m2JU5EEFU7uyN5GISKV03Msk8EBE883MXcBV5HS3sQZ87_-uBu0lRIvjdjai5s1UWLxlgb9
>> kjj51qXxSOGkoRuYsPHD_aaP-FSs5yOj1DCMS8moiRA2M8JWJYjL9mTCv9ebr3wau_UEtuMoXGGIVqQVoEwOWFL
>> qUf-wX9qa2ad1QUhQ0JLBk86NNP8a4rPNMTZRkYUw%3D%3D&u=http%3A%2F%2Fgit.kiszka.org%2F%3Fp%3D
>> linux.git%3Ba%3Dshortlog%3Bh%3Drefs%2Fheads%2Fdenali-cip-backport
>>
>> Jan
>>
>> --
>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>> Corporate Competence Center Embedded Linux


-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-12  5:36           ` Jan Kiszka
@ 2018-07-12  6:37             ` 小口琢夫 / KOGUCHI,TAKUO
  2018-09-14 10:45               ` 小口琢夫 / KOGUCHI,TAKUO
  0 siblings, 1 reply; 14+ messages in thread
From: 小口琢夫 / KOGUCHI,TAKUO @ 2018-07-12  6:37 UTC (permalink / raw)
  To: cip-dev

Jan,

> Yeah, I wouldn't be surprised if I missed some patch that makes a
> difference on your board. But upstream 4.14+ works fine for you, right?
Oops, I should have done it before hand!
I tried 4.17.0-rc2 on my cyclone5 board just now.
It was better than denali-cip-backport but it did not work either. It found Bad block table but
>timeout while waiting for irq 0x4
>nand_bbt: error reading BBT
and cannot mount the file system on it.

I will have to investigating this shortly...

Takuo


> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@siemens.com>
> Sent: Thursday, July 12, 2018 2:36 PM
> To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>; Marek Vasut <marex@denx.de>
> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev <cip-dev@lists.cip-project.org>
> Subject: [!]Re: Altera CIP branch vs. Denali NAND driver
> 
> On 2018-07-12 03:47, ???? / KOGUCHI?TAKUO wrote:
> > Jan,
> > I have tried to build denali-cip-backport and spent some time. It does not work yet on
> my boards.
> > I saw "nand: timed out while waiting for chip to become ready" several times and the probe
> function failed.
> > Sorry to say, I will not able to continue this effort for now.
> > When I would make a progress, I will let you know.
> >
> 
> Yeah, I wouldn't be surprised if I missed some patch that makes a
> difference on your board. But upstream 4.14+ works fine for you, right?
> 
> Thanks for trying out nevertheless!
> 
> Jan
> 
> > Best Regards,
> >
> > Takuo
> >
> >> -----Original Message-----
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >> Sent: Friday, July 06, 2018 8:21 PM
> >> To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>; Marek Vasut
> <marex@denx.de>
> >> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev
> <cip-dev@lists.cip-project.org>
> >> Subject: [!]Re: Altera CIP branch vs. Denali NAND driver
> >>
> >> On 2018-07-06 10:53, ???? / KOGUCHI?TAKUO wrote:
> >>> Hi Jan,
> >>>
> >>>> -----Original Message-----
> >>>> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>>> Sent: Friday, July 06, 2018 5:06 PM
> >>>>> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by
> >> denali_hw_init.
> >>>> (I do not remember the actual value off the top of my head). Without this, it resulted
> >> in
> >>>> ECC errors as far as I remember.
> >>>>
> >>>> We are using upstream U-boot (Marek sorted out the BSP U-boot
> >>>> differences for us). I suppose you were using the Altera's version,
> >>>> right? Marek, any comment on this tuning?
> >>> Yes. I am using u-boot which came with Altera SoCSDK for the custom boards.
> >>>
> >>>>
> >>>>>
> >>>>> Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good idea
> >> even
> >>>> for the playground, though I am not quite sure.
> >>>>
> >>>> I know, but this is related to the fact that the backport started as
> >>>> proof-of-concept and targets that single device only so far. This would
> >>>> have to be resolved when we wanted broader use, but it only makes sense
> >>>> if there is interest.
> >>>>
> >>> At lease I am interested.
> >>
> >> That's a good start! To help the discussion, I just pushed our
> >> work-in-progress branch here:
> >>
> >>
> https://clicktime.symantec.com/a/1/F8dAar5oXXL8ThwUCaqkcZWZ4mzqV2UK6LFuZQ8TuME=?d=EXT8h
> >>
> pgpr56TSRvXnP65tXaLN2CmPa-z5_-z-jES6Avk7IHyojYPdGlFS55ZRmMK3wgYGo6wDmN5xCrI8DyPN0X5kLeM
> >>
> irO_Aq3Yk6V0A5dp7VJNu2I0P-6Fv0f0VQ8cgamsxMALkTpiaihP39xTkygbp0CEvtis80ATkWGXpYLqsbPZ92t
> >>
> jlqKb8zYq28fZzg5m2JU5EEFU7uyN5GISKV03Msk8EBE883MXcBV5HS3sQZ87_-uBu0lRIvjdjai5s1UWLxlgb9
> >>
> kjj51qXxSOGkoRuYsPHD_aaP-FSs5yOj1DCMS8moiRA2M8JWJYjL9mTCv9ebr3wau_UEtuMoXGGIVqQVoEwOWFL
> >>
> qUf-wX9qa2ad1QUhQ0JLBk86NNP8a4rPNMTZRkYUw%3D%3D&u=http%3A%2F%2Fgit.kiszka.org%2F%3Fp%3D
> >> linux.git%3Ba%3Dshortlog%3Bh%3Drefs%2Fheads%2Fdenali-cip-backport
> >>
> >> Jan
> >>
> >> --
> >> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> >> Corporate Competence Center Embedded Linux
> 
> 
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-07-12  6:37             ` 小口琢夫 / KOGUCHI,TAKUO
@ 2018-09-14 10:45               ` 小口琢夫 / KOGUCHI,TAKUO
  2018-09-14 16:44                 ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: 小口琢夫 / KOGUCHI,TAKUO @ 2018-09-14 10:45 UTC (permalink / raw)
  To: cip-dev

Jan,

Have you been making progress with this?
I have confirmed that;
(1) linux-4.13 and linux-4.14 works on my board without any modification to the denali driver.
(2) linux-4.15 to linux-4.19-rc3 need a single extra line. I do not know a better fix.

If you have an update, I would like to try it on my board.

Best regard,

Takuo

---------------------------------
From: Takuo Koguchi <takuo.koguchi.sw@hitachi.com>
Date: Fri, 14 Sep 2018 18:38:43 +0900
Subject: [PATCH] MTD NAND Denali fix for Cyclonev

Reading back DMA_ENABLE register just after enabling it, this is removed
by commit: [586a2c52909df453ed1b6239283744b0851ccf81]
mtd: nand: denali: squash denali_enable_dma() helper into caller

Without this denali_wait_for_irq timeout for INTR__DMA_CMD_COMP.

Signed-off-by: Takuo Koguchi <takuo.koguchi.sw@hitachi.com>
---
 drivers/mtd/nand/raw/denali.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index 67b2065..4ba997b 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -596,6 +596,7 @@ static int denali_dma_xfer(struct denali_nand_info *denali, void *buf,
 	}
 
 	iowrite32(DMA_ENABLE__FLAG, denali->reg + DMA_ENABLE);
+	ioread32(denali->reg + DMA_ENABLE);
 
 	denali_reset_irq(denali);
 	denali->setup_dma(denali, dma_addr, page, write);
-- 
2.1.4


---------------------------------
> -----Original Message-----
> From: ???? / KOGUCHI?TAKUO
> Sent: Thursday, July 12, 2018 3:37 PM
> To: 'Jan Kiszka' <jan.kiszka@siemens.com>; Marek Vasut <marex@denx.de>
> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev <cip-dev@lists.cip-project.org>
> Subject: RE: [!]Re: Altera CIP branch vs. Denali NAND driver
> 
> Jan,
> 
> > Yeah, I wouldn't be surprised if I missed some patch that makes a
> > difference on your board. But upstream 4.14+ works fine for you, right?
> Oops, I should have done it before hand!
> I tried 4.17.0-rc2 on my cyclone5 board just now.
> It was better than denali-cip-backport but it did not work either. It found Bad block table
> but
> >timeout while waiting for irq 0x4
> >nand_bbt: error reading BBT
> and cannot mount the file system on it.
> 
> I will have to investigating this shortly...
> 
> Takuo
> 
> 
> > -----Original Message-----
> > From: Jan Kiszka <jan.kiszka@siemens.com>
> > Sent: Thursday, July 12, 2018 2:36 PM
> > To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>; Marek Vasut <marex@denx.de>
> > Cc: Henning Schild <henning.schild@siemens.com>; cip-dev <cip-dev@lists.cip-project.org>
> > Subject: [!]Re: Altera CIP branch vs. Denali NAND driver
> >
> > On 2018-07-12 03:47, ???? / KOGUCHI?TAKUO wrote:
> > > Jan,
> > > I have tried to build denali-cip-backport and spent some time. It does not work yet on
> > my boards.
> > > I saw "nand: timed out while waiting for chip to become ready" several times and the
> probe
> > function failed.
> > > Sorry to say, I will not able to continue this effort for now.
> > > When I would make a progress, I will let you know.
> > >
> >
> > Yeah, I wouldn't be surprised if I missed some patch that makes a
> > difference on your board. But upstream 4.14+ works fine for you, right?
> >
> > Thanks for trying out nevertheless!
> >
> > Jan
> >
> > > Best Regards,
> > >
> > > Takuo
> > >
> > >> -----Original Message-----
> > >> From: Jan Kiszka <jan.kiszka@siemens.com>
> > >> Sent: Friday, July 06, 2018 8:21 PM
> > >> To: ???? / KOGUCHI?TAKUO <takuo.koguchi.sw@hitachi.com>; Marek Vasut
> > <marex@denx.de>
> > >> Cc: Henning Schild <henning.schild@siemens.com>; cip-dev
> > <cip-dev@lists.cip-project.org>
> > >> Subject: [!]Re: Altera CIP branch vs. Denali NAND driver
> > >>
> > >> On 2018-07-06 10:53, ???? / KOGUCHI?TAKUO wrote:
> > >>> Hi Jan,
> > >>>
> > >>>> -----Original Message-----
> > >>>> From: Jan Kiszka <jan.kiszka@siemens.com>
> > >>>> Sent: Friday, July 06, 2018 5:06 PM
> > >>>>> (2) Bootloader needs to set SPARE_AREA_SKIP_BYTES properly, which is used by
> > >> denali_hw_init.
> > >>>> (I do not remember the actual value off the top of my head). Without this, it resulted
> > >> in
> > >>>> ECC errors as far as I remember.
> > >>>>
> > >>>> We are using upstream U-boot (Marek sorted out the BSP U-boot
> > >>>> differences for us). I suppose you were using the Altera's version,
> > >>>> right? Marek, any comment on this tuning?
> > >>> Yes. I am using u-boot which came with Altera SoCSDK for the custom boards.
> > >>>
> > >>>>
> > >>>>>
> > >>>>> Regarding to Denali Driver backport, "ignores other NAND drivers" is not a  good
> idea
> > >> even
> > >>>> for the playground, though I am not quite sure.
> > >>>>
> > >>>> I know, but this is related to the fact that the backport started as
> > >>>> proof-of-concept and targets that single device only so far. This would
> > >>>> have to be resolved when we wanted broader use, but it only makes sense
> > >>>> if there is interest.
> > >>>>
> > >>> At lease I am interested.
> > >>
> > >> That's a good start! To help the discussion, I just pushed our
> > >> work-in-progress branch here:
> > >>
> > >>
> >
> https://clicktime.symantec.com/a/1/F8dAar5oXXL8ThwUCaqkcZWZ4mzqV2UK6LFuZQ8TuME=?d=EXT8h
> > >>
> >
> pgpr56TSRvXnP65tXaLN2CmPa-z5_-z-jES6Avk7IHyojYPdGlFS55ZRmMK3wgYGo6wDmN5xCrI8DyPN0X5kLeM
> > >>
> >
> irO_Aq3Yk6V0A5dp7VJNu2I0P-6Fv0f0VQ8cgamsxMALkTpiaihP39xTkygbp0CEvtis80ATkWGXpYLqsbPZ92t
> > >>
> >
> jlqKb8zYq28fZzg5m2JU5EEFU7uyN5GISKV03Msk8EBE883MXcBV5HS3sQZ87_-uBu0lRIvjdjai5s1UWLxlgb9
> > >>
> >
> kjj51qXxSOGkoRuYsPHD_aaP-FSs5yOj1DCMS8moiRA2M8JWJYjL9mTCv9ebr3wau_UEtuMoXGGIVqQVoEwOWFL
> > >>
> >
> qUf-wX9qa2ad1QUhQ0JLBk86NNP8a4rPNMTZRkYUw%3D%3D&u=http%3A%2F%2Fgit.kiszka.org%2F%3Fp%3D
> > >> linux.git%3Ba%3Dshortlog%3Bh%3Drefs%2Fheads%2Fdenali-cip-backport
> > >>
> > >> Jan
> > >>
> > >> --
> > >> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> > >> Corporate Competence Center Embedded Linux
> >
> >
> > --
> > Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> > Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-09-14 10:45               ` 小口琢夫 / KOGUCHI,TAKUO
@ 2018-09-14 16:44                 ` Jan Kiszka
  2018-09-14 21:15                   ` 小口琢夫 / KOGUCHI,TAKUO
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2018-09-14 16:44 UTC (permalink / raw)
  To: cip-dev

On 14.09.18 12:45, ???? / KOGUCHI?TAKUO wrote:
> Jan,
> 
> Have you been making progress with this?
> I have confirmed that;
> (1) linux-4.13 and linux-4.14 works on my board without any modification to the denali driver.
> (2) linux-4.15 to linux-4.19-rc3 need a single extra line. I do not know a better fix.
> 
> If you have an update, I would like to try it on my board.

Marek may be able to comment on the details of your change better than I.

We are using the queue now with some extensions. I need to dig them out and will 
try to refresh the queue I published.

Thanks,
Jan

> 
> Best regard,
> 
> Takuo
> 
> ---------------------------------
> From: Takuo Koguchi <takuo.koguchi.sw@hitachi.com>
> Date: Fri, 14 Sep 2018 18:38:43 +0900
> Subject: [PATCH] MTD NAND Denali fix for Cyclonev
> 
> Reading back DMA_ENABLE register just after enabling it, this is removed
> by commit: [586a2c52909df453ed1b6239283744b0851ccf81]
> mtd: nand: denali: squash denali_enable_dma() helper into caller
> 
> Without this denali_wait_for_irq timeout for INTR__DMA_CMD_COMP.
> 
> Signed-off-by: Takuo Koguchi <takuo.koguchi.sw@hitachi.com>
> ---
>   drivers/mtd/nand/raw/denali.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
> index 67b2065..4ba997b 100644
> --- a/drivers/mtd/nand/raw/denali.c
> +++ b/drivers/mtd/nand/raw/denali.c
> @@ -596,6 +596,7 @@ static int denali_dma_xfer(struct denali_nand_info *denali, void *buf,
>   	}
>   
>   	iowrite32(DMA_ENABLE__FLAG, denali->reg + DMA_ENABLE);
> +	ioread32(denali->reg + DMA_ENABLE);
>   
>   	denali_reset_irq(denali);
>   	denali->setup_dma(denali, dma_addr, page, write);
> 


-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* [cip-dev] Altera CIP branch vs. Denali NAND driver
  2018-09-14 16:44                 ` Jan Kiszka
@ 2018-09-14 21:15                   ` 小口琢夫 / KOGUCHI,TAKUO
  0 siblings, 0 replies; 14+ messages in thread
From: 小口琢夫 / KOGUCHI,TAKUO @ 2018-09-14 21:15 UTC (permalink / raw)
  To: cip-dev

Hi Jan,

Masaharu Yamada the maintainer of denali driver was reported this on 2018-09-12 by another user and the same fix likely comes to soon!
https://www.spinics.net/lists/linux-mtd/msg01718.html

Takuo

2018/09/15 1:44?Jan Kiszka <jan.kiszka at siemens.com<mailto:jan.kiszka@siemens.com>>????:

On 14.09.18 12:45, ???? / KOGUCHI?TAKUO wrote:
Jan,
Have you been making progress with this?
I have confirmed that;
(1) linux-4.13 and linux-4.14 works on my board without any modification to the denali driver.
(2) linux-4.15 to linux-4.19-rc3 need a single extra line. I do not know a better fix.
If you have an update, I would like to try it on my board.

Marek may be able to comment on the details of your change better than I.

We are using the queue now with some extensions. I need to dig them out and will try to refresh the queue I published.

Thanks,
Jan

Best regard,
Takuo
---------------------------------
From: Takuo Koguchi <takuo.koguchi.sw at hitachi.com<mailto:takuo.koguchi.sw@hitachi.com>>
Date: Fri, 14 Sep 2018 18:38:43 +0900
Subject: [PATCH] MTD NAND Denali fix for Cyclonev
Reading back DMA_ENABLE register just after enabling it, this is removed
by commit: [586a2c52909df453ed1b6239283744b0851ccf81]
mtd: nand: denali: squash denali_enable_dma() helper into caller
Without this denali_wait_for_irq timeout for INTR__DMA_CMD_COMP.
Signed-off-by: Takuo Koguchi <takuo.koguchi.sw at hitachi.com<mailto:takuo.koguchi.sw@hitachi.com>>
---
 drivers/mtd/nand/raw/denali.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index 67b2065..4ba997b 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -596,6 +596,7 @@ static int denali_dma_xfer(struct denali_nand_info *denali, void *buf,
     }
       iowrite32(DMA_ENABLE__FLAG, denali->reg + DMA_ENABLE);
+    ioread32(denali->reg + DMA_ENABLE);
       denali_reset_irq(denali);
     denali->setup_dma(denali, dma_addr, page, write);


--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20180914/38ae23aa/attachment.html>

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

end of thread, other threads:[~2018-09-14 21:15 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06  6:09 [cip-dev] Altera CIP branch vs. Denali NAND driver Jan Kiszka
2018-07-06  7:52 ` 小口琢夫 / KOGUCHI,TAKUO
2018-07-06  8:05   ` Jan Kiszka
2018-07-06  8:21     ` Marek Vasut
2018-07-06  8:34       ` Jan Kiszka
2018-07-06  8:50         ` Marek Vasut
2018-07-06  8:53     ` 小口琢夫 / KOGUCHI,TAKUO
2018-07-06 11:20       ` Jan Kiszka
2018-07-12  1:47         ` 小口琢夫 / KOGUCHI,TAKUO
2018-07-12  5:36           ` Jan Kiszka
2018-07-12  6:37             ` 小口琢夫 / KOGUCHI,TAKUO
2018-09-14 10:45               ` 小口琢夫 / KOGUCHI,TAKUO
2018-09-14 16:44                 ` Jan Kiszka
2018-09-14 21:15                   ` 小口琢夫 / KOGUCHI,TAKUO

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.