Subject: RE: QSPI help needed
From: Ashish Kumar <[email-masked]>
To: Han Xu <[email-masked]>, Peng Fan <[email-masked]>
Cc: Zening Wang <[email-masked]>, Rajan Srivastava <[email-masked]>, Rajat Srivastava <[email-masked]>
Date: Fri, 18 May 2018 04:42:53 +0000

Hello Han, Peng,

As requested by SPI maintainer Jagan Teki, he wants to convert  no DM or partial DM u-boot drivers to DM model.

fsl_qspi.c falls under partial category  since we have hash defines (CONFIG_DM_SPI) in our code.

Maintainer wants us to get rid of this CONFIG_DM_SPI define. I am not sure if non-DM code is used by i.mx series.

I believe it is not used by DN QSPI SoC.

Coming to code, please find attached patch were non-DM stuff is removed.

What are your thoughts on these changes ?

Also, Attaching maintainers mail for reference.

Regards

Ashish

From: Han Xu
Sent: Thursday, May 17, 2018 8:09 PM
To: Rajan Srivastava <[email-masked]>
Cc: Ashish Kumar <[email-masked]>; Zening Wang <[email-masked]>; Peng Fan <[email-masked]>
Subject: RE: QSPI help needed

Hi Rajan,

I am working remotely today and may take one day off tomorrow, Is that possible you send me the questions first? If needed we can schedule a meeting later.

Also CC Peng Fan who is working on U-boot DM.

From: Rajan Srivastava
Sent: Thursday, May 17, 2018 8:47 AM
To: Han Xu <[email-masked]<mailto:[email-masked]>>
Cc: Ashish Kumar <[email-masked]<mailto:[email-masked]>>; Zening Wang <[email-masked]<mailto:[email-masked]>>
Subject: RE: QSPI help needed

Hi Han,

Is it okay if we setup a meeting with you tomorrow for 30minutes to discuss the QSPI request (Ashish sent it in an email to you)?

Thank you,

Rajan

From: Zening Wang
Sent: Thursday, May 17, 2018 6:55 PM
To: Rajan Srivastava <[email-masked]<mailto:[email-masked]>>; Han Xu <[email-masked]<mailto:[email-masked]>>
Cc: Ashish Kumar <[email-masked]<mailto:[email-masked]>>
Subject: RE: QSPI help needed

Adding Han

From: Rajan Srivastava
Sent: Thursday, May 17, 2018 7:09 PM
To: Zening Wang <[email-masked]<mailto:[email-masked]>>
Cc: Ashish Kumar <[email-masked]<mailto:[email-masked]>>
Subject: QSPI help needed

Hi Zening,

DN is working on some QSPI clean-up for u-boot in open-source community. We want to have some discussions with Han Xu in Austin. Could you please connect us to him?

Regards,

Rajan

Subject: Re: mtd: spi-nor: new NXP FlexSPI driver location & framework to use ?
From: Jagan Teki <[email-masked]>
To: Ashish Kumar <[email-masked]>
Cc: Jagan Teki <[email-masked]>, York Sun <[email-masked]>, Prabhakar Kushwaha <[email-masked]>, Yogesh Narayan Gaur <[email-masked]>, Poonam Aggrwal <[email-masked]>, "[email-masked]" <[email-masked]>
Date: Mon, 14 May 2018 09:47:42 +0000

On Mon, May 14, 2018 at 2:42 PM, Ashish Kumar <[email-masked]> wrote:
>
>
>> -----Original Message-----
>> From: Jagan Teki [mailto:[email-masked]]
>> Sent: Friday, May 11, 2018 11:31 AM
>> To: Prabhakar Kushwaha <[email-masked]>
>> Cc: Jagan Teki <[email-masked]>; York Sun <[email-masked]>;
>> Yogesh Narayan Gaur <[email-masked]>; Poonam Aggrwal
>> <[email-masked]>; Ashish Kumar <[email-masked]>; u-
>> [email-masked]
>> Subject: Re: mtd: spi-nor: new NXP FlexSPI driver location & framework to use ?
>>
>> On Fri, May 11, 2018 at 11:08 AM, Prabhakar Kushwaha
>> <[email-masked]> wrote:
>> > Dear Jagan,
>> >
>> > NXP is coming up with new FlexSPI controller. It is similar to existing QSPI with
>> enhanced feature-set.
>> > We have the driver ready as per existing framework i.e. driver/spi.
>> >
>> > From recend discussion, we go to know about framework change.
>> > Migration of qspi drivers in u-boot-spi/drivers/mtd/spi-nor/
>> git://git.denx.de/u-boot-spi.git branch mtd-spinor-working.
>> >
>> > We are in dilemma for sending FlexSPI driver upstream.
>> > Do we follow existing framework i.e. driver/spi   or new proposed framework
>> i.e. u-boot-spi/drivers/mtd/spi-nor/
>> >
>> > Also, do we have any timeline of u-boot-spi/drivers/mtd/spi-nor/ to become
>> default.
>>
>> Idea is to move spi-nor, mtd-spinor-working is paused because of non-dm
>> drivers accessing. We are clear that we can't create another legacy layer to
>> access spi-nor for the sake of non-dm driver to work which eventually ended-up
>> another mess and also no one take care of non-dm conversion to dm if we give
>> such feasibility. So we exported a deadline for full SPI/SPI_FLASH DM conversion
>> till v2018.09. Once all these relevant conversion done, will try to move.
>>
> Hello Jagan,
>
> You have mentioned here https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit.denx.de%2F%3Fp%3Du-boot-spi.git%3Ba%3Dcommitdiff%3Bh%3Dc4e68d3aa8178f6aa63a79c4f8f459c0e3ed58e8&data=02%7C01%7Cashish.kumar%40nxp.com%7Ca4d32392ca7d4a0a5ead08d5b97fbeb3%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636618880665899108&sdata=yAOW42d%2F%2B6W47PCURhbnzyD3sfSVloRtafRz%2FBJmrRM%3D&reserved=0
>
> Snip from above link:
> +Partially converted:
> +       drivers/spi/atcspi200_spi.c
> +       drivers/spi/davinci_spi.c
> +       drivers/spi/fsl_dspi.c
> +       drivers/spi/fsl_qspi.c
>
> That fsl_qspi.c is partial converted to DM model, is there any guide line to follow for missing stuff ?

We should fully convert the driver into dm, no #ifdef CONFIG_DM_SPI