Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-05-23 Thread Prabhakar Kushwaha

> -Original Message-
> From: Peng Ma
> Sent: Wednesday, March 27, 2019 2:53 PM
> To: Prabhakar Kushwaha ; Shengzhou Liu
> ; Ruchika Gupta 
> Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
> ; York Sun ;
> bmeng...@gmail.com; s...@denx.de; m...@marvell.com; Andy Tang
> ; u-boot@lists.denx.de; Peng Ma 
> Subject: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc
> socs
> 
> This patch is to support Freescale sata driver with dts initialized.
> Also resolved the following problems.
> 
> = WARNING == This board
> does not use CONFIG_DM_SCSI. Please update the storage controller to use
> CONFIG_DM_SCSI before the v2019.07 release.
> Failure to update by the deadline may result in board removal.
> See doc/driver-model/MIGRATION.txt for more info.
> 
> 
> Signed-off-by: Peng Ma 

This patch has been applied to u-boot-mpc85xx, awaiting upstream.

--pk
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-05-22 Thread Stefan Roese

On 23.05.19 06:58, Prabhakar Kushwaha wrote:




 drivers/ata/Kconfig|   10 +
 drivers/ata/Makefile   |1 +
 drivers/ata/fsl_ahci.c | 1030



 drivers/ata/fsl_sata.h |1 +
 4 files changed, 1042 insertions(+)
 create mode 100644 drivers/ata/fsl_ahci.c


Will this patch series replace the old fsl_sata.c driver? If yes,
could you remove this driver as well in this series?

[Peng Ma]
Hi Stefan,

fsl_sata.c used to Non DM sata driver for some powerpc socs.
Currently We only have one board that supports dts initialization. I
will remove this old driver When all of our powerpc socs support DM.


I see, thanks. I just wanted to know, if this new SATA driver is a
meant as a replacement for the old non-DM driver.

[Peng Ma]
Hi Stefan,

I am so sorry to reply late, Other Non dts powerpc board need the old
sata driver, so the new Sata driver does not replace the so far.


Just curious: Which are the "other non dts powerpc boards"? Are there still
many? Is there a plan to move them to DT as well? Or should they perhaps be
dropped from mainline if not converted to DT? What's stopping the conversion
here?



There are too many powerpc platforms  which are not migrated to DT.

My suggestion will be to have sata driver supporting both.  Once
all PowerPC platform using this SATA driver migrated, it can be
dropped.


I'm fine with this. Please go ahead.

Thanks,
Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-05-22 Thread Prabhakar Kushwaha
Hi Stefan,

> -Original Message-
> From: Stefan Roese 
> Sent: Wednesday, May 15, 2019 2:53 PM
> To: Peng Ma ; Prabhakar Kushwaha
> ; Shengzhou Liu ;
> Ruchika Gupta 
> Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
> ; York Sun ;
> bmeng...@gmail.com; m...@marvell.com; Andy Tang ;
> u-boot@lists.denx.de
> Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale
> powerpc socs
> 
> On 15.05.19 11:04, Peng Ma wrote:
> >
> >
> >> -Original Message-
> >> From: Stefan Roese 
> >> Sent: 2019年3月27日 18:48
> >> To: Peng Ma ; Prabhakar Kushwaha
> >> ; Shengzhou Liu
> ;
> >> Ruchika Gupta 
> >> Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
> >> ; York Sun ;
> >> bmeng...@gmail.com; m...@marvell.com; Andy Tang
> ;
> >> u-boot@lists.denx.de
> >> Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for
> >> Freescale powerpc socs
> >>
> >> On 27.03.19 11:41, Peng Ma wrote:
> >>>
> >>>
>  -Original Message-
>  From: Stefan Roese 
>  Sent: 2019年3月27日 18:01
>  To: Peng Ma ; Prabhakar Kushwaha
>  ; Shengzhou Liu
> >> ;
>  Ruchika Gupta 
>  Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
>  ; York Sun ;
>  bmeng...@gmail.com; m...@marvell.com; Andy Tang
> >> ;
>  u-boot@lists.denx.de
>  Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for
>  Freescale powerpc socs
> 
>  On 27.03.19 10:23, Peng Ma wrote:
> > This patch is to support Freescale sata driver with dts initialized.
> > Also resolved the following problems.
> >
> > = WARNING == This
> >> board
>  does
> > not use CONFIG_DM_SCSI. Please update the storage controller to
> > use CONFIG_DM_SCSI before the v2019.07 release.
> > Failure to update by the deadline may result in board removal.
> > See doc/driver-model/MIGRATION.txt for more info.
> > 
> >
> > Signed-off-by: Peng Ma 
> > ---
> > depends on:
> > -
>  https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fp
>  at
>  chw
> 
> >>
> ork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99168data
> 
> >>
> =02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef
> 
> >>
> 3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072
> 
> >>
> 966sdata=3Z33Z5raG%2BnbtSUpz2kPCGpefk1byOgy0%2Br3R4DUFU8%
>  3Dreserved=0
> > -
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > pa
> > tc
> >
> 
> >>
> hwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99167d
>  ata
> >
> 
> >>
> =02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef
>  3%7C686e
> >
> 
> >>
> a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072966
>  sdata=sr
> > %2BCh4UioJw0kuhOiLhc3F6keRhIH8Wflt%2BvMJnHtsY%3Dreserve
> >> d=
>  0
> >
> > drivers/ata/Kconfig|   10 +
> > drivers/ata/Makefile   |1 +
> > drivers/ata/fsl_ahci.c | 1030
>  
> > drivers/ata/fsl_sata.h |1 +
> > 4 files changed, 1042 insertions(+)
> > create mode 100644 drivers/ata/fsl_ahci.c
> 
>  Will this patch series replace the old fsl_sata.c driver? If yes,
>  could you remove this driver as well in this series?
> >>> [Peng Ma]
> >>> Hi Stefan,
> >>>
> >>> fsl_sata.c used to Non DM sata driver for some powerpc socs.
> >>> Currently We only have one board that supports dts initialization. I
> >>> will remove this old driver When all of our powerpc socs support DM.
> >>
> >> I see, thanks. I just wanted to know, if this new SATA driver is a
> >> meant as a replacement for the old non-DM driver.
> > [Peng Ma]
> > Hi Stefan,
> >
> > I am so sorry to reply late, Other Non dts powerpc board need the old
> > sata driver, so the new Sata driver does not replace the so far.
> 
> Just curious: Which are the "other non dts powerpc boards"? Are there still
> many? Is there a plan to move them to DT as well? Or should they perhaps be
> dropped from mainline if not converted to DT? What's stopping the conversion
> here?
> 

There are too many powerpc platforms  which are not migrated to DT.

My suggestion will be to have sata driver supporting both.  Once all PowerPC 
platform using this SATA driver migrated, it can be dropped. 

--pk.


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-05-15 Thread Stefan Roese

On 15.05.19 11:04, Peng Ma wrote:




-Original Message-
From: Stefan Roese 
Sent: 2019年3月27日 18:48
To: Peng Ma ; Prabhakar Kushwaha
; Shengzhou Liu ;
Ruchika Gupta 
Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
; York Sun ;
bmeng...@gmail.com; m...@marvell.com; Andy Tang ;
u-boot@lists.denx.de
Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale
powerpc socs

On 27.03.19 11:41, Peng Ma wrote:




-Original Message-
From: Stefan Roese 
Sent: 2019年3月27日 18:01
To: Peng Ma ; Prabhakar Kushwaha
; Shengzhou Liu

;

Ruchika Gupta 
Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
; York Sun ;
bmeng...@gmail.com; m...@marvell.com; Andy Tang

;

u-boot@lists.denx.de
Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for
Freescale powerpc socs

On 27.03.19 10:23, Peng Ma wrote:

This patch is to support Freescale sata driver with dts initialized.
Also resolved the following problems.

= WARNING == This

board

does

not use CONFIG_DM_SCSI. Please update the storage controller to use
CONFIG_DM_SCSI before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.


Signed-off-by: Peng Ma 
---
depends on:
-

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpat
chw


ork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99168data



=02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef



3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072



966sdata=3Z33Z5raG%2BnbtSUpz2kPCGpefk1byOgy0%2Br3R4DUFU8%

3Dreserved=0

-
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpa
tc




hwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99167d

ata





=02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef

3%7C686e





a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072966

sdata=sr

%2BCh4UioJw0kuhOiLhc3F6keRhIH8Wflt%2BvMJnHtsY%3Dreserve

d=

0


drivers/ata/Kconfig|   10 +
drivers/ata/Makefile   |1 +
drivers/ata/fsl_ahci.c | 1030



drivers/ata/fsl_sata.h |1 +
4 files changed, 1042 insertions(+)
create mode 100644 drivers/ata/fsl_ahci.c


Will this patch series replace the old fsl_sata.c driver? If yes,
could you remove this driver as well in this series?

[Peng Ma]
Hi Stefan,

fsl_sata.c used to Non DM sata driver for some powerpc socs. Currently
We only have one board that supports dts initialization. I will remove
this old driver When all of our powerpc socs support DM.


I see, thanks. I just wanted to know, if this new SATA driver is a meant as a
replacement for the old non-DM driver.

[Peng Ma]
Hi Stefan,

I am so sorry to reply late, Other Non dts powerpc board need the
old sata driver, so the new
Sata driver does not replace the so far.


Just curious: Which are the "other non dts powerpc boards"? Are there
still many? Is there a plan to move them to DT as well? Or should
they perhaps be dropped from mainline if not converted to DT? What's
stopping the conversion here?

Thanks,
Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-05-15 Thread Peng Ma


>-Original Message-
>From: Stefan Roese 
>Sent: 2019年3月27日 18:48
>To: Peng Ma ; Prabhakar Kushwaha
>; Shengzhou Liu ;
>Ruchika Gupta 
>Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
>; York Sun ;
>bmeng...@gmail.com; m...@marvell.com; Andy Tang ;
>u-boot@lists.denx.de
>Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale
>powerpc socs
>
>On 27.03.19 11:41, Peng Ma wrote:
>>
>>
>>> -Original Message-
>>> From: Stefan Roese 
>>> Sent: 2019年3月27日 18:01
>>> To: Peng Ma ; Prabhakar Kushwaha
>>> ; Shengzhou Liu
>;
>>> Ruchika Gupta 
>>> Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
>>> ; York Sun ;
>>> bmeng...@gmail.com; m...@marvell.com; Andy Tang
>;
>>> u-boot@lists.denx.de
>>> Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for
>>> Freescale powerpc socs
>>>
>>> On 27.03.19 10:23, Peng Ma wrote:
 This patch is to support Freescale sata driver with dts initialized.
 Also resolved the following problems.

 = WARNING == This
>board
>>> does
 not use CONFIG_DM_SCSI. Please update the storage controller to use
 CONFIG_DM_SCSI before the v2019.07 release.
 Failure to update by the deadline may result in board removal.
 See doc/driver-model/MIGRATION.txt for more info.
 

 Signed-off-by: Peng Ma 
 ---
 depends on:
-
>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpat
>>> chw
>>>
>ork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99168data
>>>
>=02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef
>>>
>3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072
>>>
>966sdata=3Z33Z5raG%2BnbtSUpz2kPCGpefk1byOgy0%2Br3R4DUFU8%
>>> 3Dreserved=0
-
 https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpa
 tc

>>>
>hwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99167d
>>> ata

>>>
>=02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef
>>> 3%7C686e

>>>
>a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072966
>>> sdata=sr
 %2BCh4UioJw0kuhOiLhc3F6keRhIH8Wflt%2BvMJnHtsY%3Dreserve
>d=
>>> 0

drivers/ata/Kconfig|   10 +
drivers/ata/Makefile   |1 +
drivers/ata/fsl_ahci.c | 1030
>>> 
drivers/ata/fsl_sata.h |1 +
4 files changed, 1042 insertions(+)
create mode 100644 drivers/ata/fsl_ahci.c
>>>
>>> Will this patch series replace the old fsl_sata.c driver? If yes,
>>> could you remove this driver as well in this series?
>> [Peng Ma]
>> Hi Stefan,
>>
>> fsl_sata.c used to Non DM sata driver for some powerpc socs. Currently
>> We only have one board that supports dts initialization. I will remove
>> this old driver When all of our powerpc socs support DM.
>
>I see, thanks. I just wanted to know, if this new SATA driver is a meant as a
>replacement for the old non-DM driver.
[Peng Ma] 
Hi Stefan,

I am so sorry to reply late, Other Non dts powerpc board need the old sata 
driver, so the new
Sata driver does not replace the so far.

Best Regards,
Peng
>
>Thanks,
>Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-04-07 Thread Prabhakar Kushwaha

> -Original Message-
> From: Peng Ma
> Sent: Wednesday, March 27, 2019 2:53 PM
> To: Prabhakar Kushwaha ; Shengzhou Liu
> ; Ruchika Gupta 
> Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
> ; York Sun ;
> bmeng...@gmail.com; s...@denx.de; m...@marvell.com; Andy Tang
> ; u-boot@lists.denx.de; Peng Ma 
> Subject: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc
> socs
> 
> This patch is to support Freescale sata driver with dts initialized.
> Also resolved the following problems.
> 
> = WARNING == This board
> does not use CONFIG_DM_SCSI. Please update the storage controller to use
> CONFIG_DM_SCSI before the v2019.07 release.
> Failure to update by the deadline may result in board removal.
> See doc/driver-model/MIGRATION.txt for more info.
> 
> 
> Signed-off-by: Peng Ma 
> ---
> depends on:
>   - https://patchwork.ozlabs.org/project/uboot/list/?series=99168
>   - https://patchwork.ozlabs.org/project/uboot/list/?series=99167
> 
>  drivers/ata/Kconfig|   10 +
>  drivers/ata/Makefile   |1 +
>  drivers/ata/fsl_ahci.c | 1030 
>  drivers/ata/fsl_sata.h |1 +
>  4 files changed, 1042 insertions(+)
>  create mode 100644 drivers/ata/fsl_ahci.c
> 

New driver is getting added in drivers/ata.

I request driver/ata maintainer to review

--pk
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-03-27 Thread Stefan Roese

On 27.03.19 11:41, Peng Ma wrote:




-Original Message-
From: Stefan Roese 
Sent: 2019年3月27日 18:01
To: Peng Ma ; Prabhakar Kushwaha
; Shengzhou Liu ;
Ruchika Gupta 
Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
; York Sun ;
bmeng...@gmail.com; m...@marvell.com; Andy Tang ;
u-boot@lists.denx.de
Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale
powerpc socs

On 27.03.19 10:23, Peng Ma wrote:

This patch is to support Freescale sata driver with dts initialized.
Also resolved the following problems.

= WARNING == This board

does

not use CONFIG_DM_SCSI. Please update the storage controller to use
CONFIG_DM_SCSI before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.


Signed-off-by: Peng Ma 
---
depends on:
-

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw
ork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99168data
=02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef
3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072
966sdata=3Z33Z5raG%2BnbtSUpz2kPCGpefk1byOgy0%2Br3R4DUFU8%
3Dreserved=0

-
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc


hwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99167d
ata



=02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef
3%7C686e



a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072966
sdata=sr

%2BCh4UioJw0kuhOiLhc3F6keRhIH8Wflt%2BvMJnHtsY%3Dreserved=

0


   drivers/ata/Kconfig|   10 +
   drivers/ata/Makefile   |1 +
   drivers/ata/fsl_ahci.c | 1030



   drivers/ata/fsl_sata.h |1 +
   4 files changed, 1042 insertions(+)
   create mode 100644 drivers/ata/fsl_ahci.c


Will this patch series replace the old fsl_sata.c driver? If yes, could you 
remove
this driver as well in this series?

[Peng Ma]
Hi Stefan,

fsl_sata.c used to Non DM sata driver for some powerpc socs. Currently
We only have one board that supports dts initialization. I will remove
this old driver
When all of our powerpc socs support DM.


I see, thanks. I just wanted to know, if this new SATA driver is a
meant as a replacement for the old non-DM driver.

Thanks,
Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-03-27 Thread Peng Ma


>-Original Message-
>From: Stefan Roese 
>Sent: 2019年3月27日 18:01
>To: Peng Ma ; Prabhakar Kushwaha
>; Shengzhou Liu ;
>Ruchika Gupta 
>Cc: Yinbo Zhu ; s...@chromium.org; Jagdish Gediya
>; York Sun ;
>bmeng...@gmail.com; m...@marvell.com; Andy Tang ;
>u-boot@lists.denx.de
>Subject: Re: [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale
>powerpc socs
>
>On 27.03.19 10:23, Peng Ma wrote:
>> This patch is to support Freescale sata driver with dts initialized.
>> Also resolved the following problems.
>>
>> = WARNING == This board
>does
>> not use CONFIG_DM_SCSI. Please update the storage controller to use
>> CONFIG_DM_SCSI before the v2019.07 release.
>> Failure to update by the deadline may result in board removal.
>> See doc/driver-model/MIGRATION.txt for more info.
>> 
>>
>> Signed-off-by: Peng Ma 
>> ---
>> depends on:
>>  -
>https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw
>ork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99168data
>=02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef
>3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072
>966sdata=3Z33Z5raG%2BnbtSUpz2kPCGpefk1byOgy0%2Br3R4DUFU8%
>3Dreserved=0
>>  -
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
>>
>hwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D99167d
>ata
>>
>=02%7C01%7Cpeng.ma%40nxp.com%7C71e43bd30bf24799586f08d6b29b1ef
>3%7C686e
>>
>a1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636892776652072966
>sdata=sr
>> %2BCh4UioJw0kuhOiLhc3F6keRhIH8Wflt%2BvMJnHtsY%3Dreserved=
>0
>>
>>   drivers/ata/Kconfig|   10 +
>>   drivers/ata/Makefile   |1 +
>>   drivers/ata/fsl_ahci.c | 1030
>
>>   drivers/ata/fsl_sata.h |1 +
>>   4 files changed, 1042 insertions(+)
>>   create mode 100644 drivers/ata/fsl_ahci.c
>
>Will this patch series replace the old fsl_sata.c driver? If yes, could you 
>remove
>this driver as well in this series?
[Peng Ma] 
Hi Stefan,

fsl_sata.c used to Non DM sata driver for some powerpc socs. Currently
We only have one board that supports dts initialization. I will remove this old 
driver
When all of our powerpc socs support DM.

Best Regards,
Peng
>
>Thanks,
>Stefan
>
>> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index
>> 49a056e941..efac29c709 100644
>> --- a/drivers/ata/Kconfig
>> +++ b/drivers/ata/Kconfig
>> @@ -59,6 +59,16 @@ config DWC_AHCI
>>Enable this driver to support Sata devices through
>>Synopsys DWC AHCI module.
>>
>> +config FSL_AHCI
>> +bool "Enable Freescale AHCI driver support"
>> +select SCSI_AHCI
>> +depends on AHCI
>> +depends on DM_SCSI
>> +help
>> +  Enable this driver to support Sata devices found in
>> +  some Freescale PowerPC SoCs.
>> +
>> +
>>   config DWC_AHSATA
>>  bool "Enable DWC AHSATA driver support"
>>  select LIBATA
>> diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile index
>> 10bed53bb3..93aabf34c7 100644
>> --- a/drivers/ata/Makefile
>> +++ b/drivers/ata/Makefile
>> @@ -4,6 +4,7 @@
>>   # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
>>
>>   obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o
>> +obj-$(CONFIG_FSL_AHCI) += fsl_ahci.o
>>   obj-$(CONFIG_AHCI) += ahci-uclass.o
>>   obj-$(CONFIG_AHCI_PCI) += ahci-pci.o
>>   obj-$(CONFIG_SCSI_AHCI) += ahci.o
>> diff --git a/drivers/ata/fsl_ahci.c b/drivers/ata/fsl_ahci.c new file
>> mode 100644 index 00..16c6f7a335
>> --- /dev/null
>> +++ b/drivers/ata/fsl_ahci.c
>> @@ -0,0 +1,1030 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +/*
>> + * NXP PPC SATA platform driver
>> + *
>> + * (C) Copyright 2019 NXP, Inc.
>> + *
>> + */
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include "fsl_sata.h"
>> +
>> +struct fsl_ahci_priv {
>> +u32 base;
>> +u32 flag;
>> +u32 number;
>> +fsl_sata_t *fsl_sata;
>> +};
>> +
>> +static int fsl_ahci_bind(struct udevice *dev) {
>> +return device_bind_driver(dev, "fsl_ahci_scsi", "fsl_ahci_scsi",
>> +NULL); }
>> +
>> +static int fsl_ahci_ofdata_to_platdata(struct udevice *dev) {
>> +struct fsl_ahci_priv *priv = dev_get_priv(dev);
>> +
>> +priv->number = dev_read_u32_default(dev, "sata-number", -1);
>> +priv->flag = dev_read_u32_default(dev, "sata-fpdma", -1);
>> +
>> +priv->base = dev_read_addr(dev);
>> +if (priv->base == FDT_ADDR_T_NONE)
>> +return -EINVAL;
>> +
>> +return 0;
>> +}
>> +
>> +static int ata_wait_register(unsigned __iomem *addr, u32 mask,
>> + u32 val, u32 timeout_msec)
>> +{
>> +int i;
>> +
>> +for (i = 0; ((in_le32(addr) & mask) != val) && i < timeout_msec; i++)
>> +mdelay(1);
>> +
>> +return (i < timeout_msec) ? 0 : -1;
>> +}
>> +
>> +static void fsl_sata_dump_sfis(struct 

Re: [U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-03-27 Thread Stefan Roese

On 27.03.19 10:23, Peng Ma wrote:

This patch is to support Freescale sata driver with dts initialized.
Also resolved the following problems.

= WARNING ==
This board does not use CONFIG_DM_SCSI. Please update
the storage controller to use CONFIG_DM_SCSI before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.


Signed-off-by: Peng Ma 
---
depends on:
- https://patchwork.ozlabs.org/project/uboot/list/?series=99168
- https://patchwork.ozlabs.org/project/uboot/list/?series=99167

  drivers/ata/Kconfig|   10 +
  drivers/ata/Makefile   |1 +
  drivers/ata/fsl_ahci.c | 1030 
  drivers/ata/fsl_sata.h |1 +
  4 files changed, 1042 insertions(+)
  create mode 100644 drivers/ata/fsl_ahci.c


Will this patch series replace the old fsl_sata.c driver? If yes,
could you remove this driver as well in this series?

Thanks,
Stefan
 

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 49a056e941..efac29c709 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -59,6 +59,16 @@ config DWC_AHCI
  Enable this driver to support Sata devices through
  Synopsys DWC AHCI module.
  
+config FSL_AHCI

+   bool "Enable Freescale AHCI driver support"
+   select SCSI_AHCI
+   depends on AHCI
+   depends on DM_SCSI
+   help
+ Enable this driver to support Sata devices found in
+ some Freescale PowerPC SoCs.
+
+
  config DWC_AHSATA
bool "Enable DWC AHSATA driver support"
select LIBATA
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 10bed53bb3..93aabf34c7 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -4,6 +4,7 @@
  # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
  
  obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o

+obj-$(CONFIG_FSL_AHCI) += fsl_ahci.o
  obj-$(CONFIG_AHCI) += ahci-uclass.o
  obj-$(CONFIG_AHCI_PCI) += ahci-pci.o
  obj-$(CONFIG_SCSI_AHCI) += ahci.o
diff --git a/drivers/ata/fsl_ahci.c b/drivers/ata/fsl_ahci.c
new file mode 100644
index 00..16c6f7a335
--- /dev/null
+++ b/drivers/ata/fsl_ahci.c
@@ -0,0 +1,1030 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * NXP PPC SATA platform driver
+ *
+ * (C) Copyright 2019 NXP, Inc.
+ *
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "fsl_sata.h"
+
+struct fsl_ahci_priv {
+   u32 base;
+   u32 flag;
+   u32 number;
+   fsl_sata_t *fsl_sata;
+};
+
+static int fsl_ahci_bind(struct udevice *dev)
+{
+   return device_bind_driver(dev, "fsl_ahci_scsi", "fsl_ahci_scsi", NULL);
+}
+
+static int fsl_ahci_ofdata_to_platdata(struct udevice *dev)
+{
+   struct fsl_ahci_priv *priv = dev_get_priv(dev);
+
+   priv->number = dev_read_u32_default(dev, "sata-number", -1);
+   priv->flag = dev_read_u32_default(dev, "sata-fpdma", -1);
+
+   priv->base = dev_read_addr(dev);
+   if (priv->base == FDT_ADDR_T_NONE)
+   return -EINVAL;
+
+   return 0;
+}
+
+static int ata_wait_register(unsigned __iomem *addr, u32 mask,
+u32 val, u32 timeout_msec)
+{
+   int i;
+
+   for (i = 0; ((in_le32(addr) & mask) != val) && i < timeout_msec; i++)
+   mdelay(1);
+
+   return (i < timeout_msec) ? 0 : -1;
+}
+
+static void fsl_sata_dump_sfis(struct sata_fis_d2h *s)
+{
+   printf("Status FIS dump:\n\r");
+   printf("fis_type:  %02x\n\r", s->fis_type);
+   printf("pm_port_i: %02x\n\r", s->pm_port_i);
+   printf("status:%02x\n\r", s->status);
+   printf("error: %02x\n\r", s->error);
+   printf("lba_low:   %02x\n\r", s->lba_low);
+   printf("lba_mid:   %02x\n\r", s->lba_mid);
+   printf("lba_high:  %02x\n\r", s->lba_high);
+   printf("device:%02x\n\r", s->device);
+   printf("lba_low_exp:   %02x\n\r", s->lba_low_exp);
+   printf("lba_mid_exp:   %02x\n\r", s->lba_mid_exp);
+   printf("lba_high_exp:  %02x\n\r", s->lba_high_exp);
+   printf("res1:  %02x\n\r", s->res1);
+   printf("sector_count:  %02x\n\r", s->sector_count);
+   printf("sector_count_exp:  %02x\n\r", s->sector_count_exp);
+}
+
+static void fsl_sata_dump_regs(fsl_sata_reg_t __iomem *reg)
+{
+   printf("\n\rSATA:   %08x\n\r", (u32)reg);
+   printf("CQR:%08x\n\r", in_le32(>cqr));
+   printf("CAR:%08x\n\r", in_le32(>car));
+   printf("CCR:%08x\n\r", in_le32(>ccr));
+   printf("CER:%08x\n\r", in_le32(>cer));
+   printf("CQR:%08x\n\r", in_le32(>cqr));
+   printf("DER:%08x\n\r", 

[U-Boot] [PATCH 1/4] ata: fsl_ahci: Add sata DM support for Freescale powerpc socs

2019-03-27 Thread Peng Ma
This patch is to support Freescale sata driver with dts initialized.
Also resolved the following problems.

= WARNING ==
This board does not use CONFIG_DM_SCSI. Please update
the storage controller to use CONFIG_DM_SCSI before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.


Signed-off-by: Peng Ma 
---
depends on:
- https://patchwork.ozlabs.org/project/uboot/list/?series=99168
- https://patchwork.ozlabs.org/project/uboot/list/?series=99167

 drivers/ata/Kconfig|   10 +
 drivers/ata/Makefile   |1 +
 drivers/ata/fsl_ahci.c | 1030 
 drivers/ata/fsl_sata.h |1 +
 4 files changed, 1042 insertions(+)
 create mode 100644 drivers/ata/fsl_ahci.c

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 49a056e941..efac29c709 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -59,6 +59,16 @@ config DWC_AHCI
  Enable this driver to support Sata devices through
  Synopsys DWC AHCI module.
 
+config FSL_AHCI
+   bool "Enable Freescale AHCI driver support"
+   select SCSI_AHCI
+   depends on AHCI
+   depends on DM_SCSI
+   help
+ Enable this driver to support Sata devices found in
+ some Freescale PowerPC SoCs.
+
+
 config DWC_AHSATA
bool "Enable DWC AHSATA driver support"
select LIBATA
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 10bed53bb3..93aabf34c7 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -4,6 +4,7 @@
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 
 obj-$(CONFIG_DWC_AHCI) += dwc_ahci.o
+obj-$(CONFIG_FSL_AHCI) += fsl_ahci.o
 obj-$(CONFIG_AHCI) += ahci-uclass.o
 obj-$(CONFIG_AHCI_PCI) += ahci-pci.o
 obj-$(CONFIG_SCSI_AHCI) += ahci.o
diff --git a/drivers/ata/fsl_ahci.c b/drivers/ata/fsl_ahci.c
new file mode 100644
index 00..16c6f7a335
--- /dev/null
+++ b/drivers/ata/fsl_ahci.c
@@ -0,0 +1,1030 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * NXP PPC SATA platform driver
+ *
+ * (C) Copyright 2019 NXP, Inc.
+ *
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "fsl_sata.h"
+
+struct fsl_ahci_priv {
+   u32 base;
+   u32 flag;
+   u32 number;
+   fsl_sata_t *fsl_sata;
+};
+
+static int fsl_ahci_bind(struct udevice *dev)
+{
+   return device_bind_driver(dev, "fsl_ahci_scsi", "fsl_ahci_scsi", NULL);
+}
+
+static int fsl_ahci_ofdata_to_platdata(struct udevice *dev)
+{
+   struct fsl_ahci_priv *priv = dev_get_priv(dev);
+
+   priv->number = dev_read_u32_default(dev, "sata-number", -1);
+   priv->flag = dev_read_u32_default(dev, "sata-fpdma", -1);
+
+   priv->base = dev_read_addr(dev);
+   if (priv->base == FDT_ADDR_T_NONE)
+   return -EINVAL;
+
+   return 0;
+}
+
+static int ata_wait_register(unsigned __iomem *addr, u32 mask,
+u32 val, u32 timeout_msec)
+{
+   int i;
+
+   for (i = 0; ((in_le32(addr) & mask) != val) && i < timeout_msec; i++)
+   mdelay(1);
+
+   return (i < timeout_msec) ? 0 : -1;
+}
+
+static void fsl_sata_dump_sfis(struct sata_fis_d2h *s)
+{
+   printf("Status FIS dump:\n\r");
+   printf("fis_type:   %02x\n\r", s->fis_type);
+   printf("pm_port_i:  %02x\n\r", s->pm_port_i);
+   printf("status: %02x\n\r", s->status);
+   printf("error:  %02x\n\r", s->error);
+   printf("lba_low:%02x\n\r", s->lba_low);
+   printf("lba_mid:%02x\n\r", s->lba_mid);
+   printf("lba_high:   %02x\n\r", s->lba_high);
+   printf("device: %02x\n\r", s->device);
+   printf("lba_low_exp:%02x\n\r", s->lba_low_exp);
+   printf("lba_mid_exp:%02x\n\r", s->lba_mid_exp);
+   printf("lba_high_exp:   %02x\n\r", s->lba_high_exp);
+   printf("res1:   %02x\n\r", s->res1);
+   printf("sector_count:   %02x\n\r", s->sector_count);
+   printf("sector_count_exp:   %02x\n\r", s->sector_count_exp);
+}
+
+static void fsl_sata_dump_regs(fsl_sata_reg_t __iomem *reg)
+{
+   printf("\n\rSATA:   %08x\n\r", (u32)reg);
+   printf("CQR:%08x\n\r", in_le32(>cqr));
+   printf("CAR:%08x\n\r", in_le32(>car));
+   printf("CCR:%08x\n\r", in_le32(>ccr));
+   printf("CER:%08x\n\r", in_le32(>cer));
+   printf("CQR:%08x\n\r", in_le32(>cqr));
+   printf("DER:%08x\n\r", in_le32(>der));
+   printf("CHBA:   %08x\n\r", in_le32(>chba));
+   printf("HStatus:%08x\n\r", in_le32(>hstatus));
+   printf("HControl:   %08x\n\r",