Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Mugunthan, On 16 March 2016 at 19:50, Jagan Teki <jagannadh.t...@gmail.com> wrote: > On 16 March 2016 at 09:14, Qianyu Gong <qianyu.g...@nxp.com> wrote: >> >>> -Original Message- >>> From: Jagan Teki [mailto:jagannadh.t...@gmail.com] >>> Sent: Tuesday, March 15, 2016 7:18 PM >>> To: Qianyu Gong <qianyu.g...@nxp.com>; Huan Wang <alison.w...@nxp.com> >>> Cc: york sun <york@nxp.com>; Tom Rini <tr...@konsulko.com>; Siva Durga >>> Prasad Paladugu <siva...@xilinx.com>; Michal Simek >>> <michal.si...@xilinx.com>; >>> u-boot@lists.denx.de; Stefan Roese <s...@denx.de>; Mingkai Hu >>> <mingkai...@nxp.com> >>> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support >>> >>> On 9 March 2016 at 13:37, Qianyu Gong <qianyu.g...@nxp.com> wrote: >>> > Hi Jagan, >>> > >>> >> -Original Message- >>> >> From: york sun >>> >> Sent: Tuesday, March 08, 2016 12:46 AM >>> >> To: Jagan Teki <jt...@openedev.com>; Huan Wang <alison.w...@nxp.com>; >>> >> Qianyu Gong <qianyu.g...@nxp.com> >>> >> Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu >>> >> <siva...@xilinx.com>; Stefan Roese <s...@denx.de>; Michal Simek >>> >> <michal.si...@xilinx.com>; Tom Rini <tr...@konsulko.com> >>> >> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support >>> >> >>> >> On 03/03/2016 01:06 PM, york sun wrote: >>> >> > On 02/29/2016 04:26 AM, Jagan Teki wrote: >>> >> >> Hi York, >>> >> >> >>> >> >> On 27 February 2016 at 02:14, york sun <york@nxp.com> wrote: >>> >> >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: >>> >> >>> >> >>> >> >>> >> >>>> >>> >> >>>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor >>> >> >>>> >>> >> >>> Jagan, >>> >> >>> >>> >> >>> I am getting there. Will test sf probe/read/write and probably >>> >> >>> boot on selected platforms. Is there any specific platform/test in >>> >> >>> your mind? >>> >> >> >>> >> >> Yes, these tests OK. and if possible please verify 'sf protect' as >>> >> >> well. >>> >> >> >>> >> > >>> >> > Jagan, >>> >> > >>> >> > Sorry for the delay. I am having issue with both ls1021aqds and >>> >> > ls1043aqds. Need to work with internal team to sort it out. >>> >> > >>> >> > My understanding the tests you need are for spi-nor, in my case, >>> >> > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I >>> >> > only have ls1021aqds and ls1043aqds with such support. >>> >> > >>> >> >>> >> Jagan, >>> >> >>> >> Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There >>> >> were some issues. They will post their findings (and possible fix) to >>> >> this thread. >>> >> >>> >> York >>> > >>> > I tested on LS1043AQDS board based on your spi-nor branch. The >>> 'spi_flash_probe' >>> > failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is >>> > not defined for the board but it could be selected if CONFIG_MTD && >>> CONFIG_DM_SPI, correct? >>> > >>> > So after I moved CONFIG_MTD to the defconfig file, the probing could work >>> > now. >>> > >>> > And there is another small effect on our Fman driver. It would like to >>> > read ucode blob from the QSPI flash. As the 'spi_flash_read' interface >>> > is changed, I've modified the address value to an offset value in flash. >>> >>> Qianyu, >>> >>> > Here are my patches: >>> > http://patchwork.ozlabs.org/patch/594872/ >>> > http://patchwork.ozlabs.org/patch/594873/ >>> > http://patchwork.ozlabs.org/patch/594874/ >>> >>> I have applied 3rd patch on my test branch, and remaining two will go in >>> another >>> time like once spi-nor got merged. >>> >>> Qianyu/Alison Wang, >>> >>> Please test this[1] branch for your new changes and let me know for any >>> issues. >>> >>> [1] >>> http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/spi-nor- >>> next >>> >>> -- >>> Jagan. >> >> Hi Jagan, >> >> Both DSPI and QSPI work well on LS1043ARDB/LS1043AQDS board. >> Thanks! > > thanks! > > Mugunthan/Alison Wang, > > Please use u-boot-spi/spi-nor-test for your testing. Please test this? thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi, Jagan, > On 9 March 2016 at 13:37, Qianyu Gong <qianyu.g...@nxp.com> wrote: > > Hi Jagan, > > > >> -Original Message- > >> From: york sun > >> Sent: Tuesday, March 08, 2016 12:46 AM > >> To: Jagan Teki <jt...@openedev.com>; Huan Wang <alison.w...@nxp.com>; > >> Qianyu Gong <qianyu.g...@nxp.com> > >> Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu > >> <siva...@xilinx.com>; Stefan Roese <s...@denx.de>; Michal Simek > >> <michal.si...@xilinx.com>; Tom Rini <tr...@konsulko.com> > >> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support > >> > >> On 03/03/2016 01:06 PM, york sun wrote: > >> > On 02/29/2016 04:26 AM, Jagan Teki wrote: > >> >> Hi York, > >> >> > >> >> On 27 February 2016 at 02:14, york sun <york@nxp.com> wrote: > >> >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: > >> > >> > >> > >> >>>> > >> >>>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor > >> >>>> > >> >>> Jagan, > >> >>> > >> >>> I am getting there. Will test sf probe/read/write and probably > >> >>> boot on selected platforms. Is there any specific platform/test > in your mind? > >> >> > >> >> Yes, these tests OK. and if possible please verify 'sf protect' as > well. > >> >> > >> > > >> > Jagan, > >> > > >> > Sorry for the delay. I am having issue with both ls1021aqds and > >> > ls1043aqds. Need to work with internal team to sort it out. > >> > > >> > My understanding the tests you need are for spi-nor, in my case, > >> > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I > >> > only have ls1021aqds and ls1043aqds with such support. > >> > > >> > >> Jagan, > >> > >> Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There > >> were some issues. They will post their findings (and possible fix) to > this thread. > >> > >> York > > > > I tested on LS1043AQDS board based on your spi-nor branch. The > 'spi_flash_probe' > > failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is > > not defined for the board but it could be selected if CONFIG_MTD && > CONFIG_DM_SPI, correct? > > > > So after I moved CONFIG_MTD to the defconfig file, the probing could > work now. > > > > And there is another small effect on our Fman driver. It would like to > > read ucode blob from the QSPI flash. As the 'spi_flash_read' interface > > is changed, I've modified the address value to an offset value in > flash. > > Qianyu, > > > Here are my patches: > > http://patchwork.ozlabs.org/patch/594872/ > > http://patchwork.ozlabs.org/patch/594873/ > > http://patchwork.ozlabs.org/patch/594874/ > > I have applied 3rd patch on my test branch, and remaining two will go in > another time like once spi-nor got merged. > > Qianyu/Alison Wang, > > Please test this[1] branch for your new changes and let me know for any > issues. > > [1] http://git.denx.de/?p=u-boot/u-boot- > spi.git;a=shortlog;h=refs/heads/spi-nor-next > > [Alison Wang] No problem on LS1021AQDS and LS1021ATWR. Thanks. Best Regards, Alison Wang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 16 March 2016 at 09:14, Qianyu Gong <qianyu.g...@nxp.com> wrote: > >> -Original Message- >> From: Jagan Teki [mailto:jagannadh.t...@gmail.com] >> Sent: Tuesday, March 15, 2016 7:18 PM >> To: Qianyu Gong <qianyu.g...@nxp.com>; Huan Wang <alison.w...@nxp.com> >> Cc: york sun <york@nxp.com>; Tom Rini <tr...@konsulko.com>; Siva Durga >> Prasad Paladugu <siva...@xilinx.com>; Michal Simek <michal.si...@xilinx.com>; >> u-boot@lists.denx.de; Stefan Roese <s...@denx.de>; Mingkai Hu >> <mingkai...@nxp.com> >> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support >> >> On 9 March 2016 at 13:37, Qianyu Gong <qianyu.g...@nxp.com> wrote: >> > Hi Jagan, >> > >> >> -Original Message- >> >> From: york sun >> >> Sent: Tuesday, March 08, 2016 12:46 AM >> >> To: Jagan Teki <jt...@openedev.com>; Huan Wang <alison.w...@nxp.com>; >> >> Qianyu Gong <qianyu.g...@nxp.com> >> >> Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu >> >> <siva...@xilinx.com>; Stefan Roese <s...@denx.de>; Michal Simek >> >> <michal.si...@xilinx.com>; Tom Rini <tr...@konsulko.com> >> >> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support >> >> >> >> On 03/03/2016 01:06 PM, york sun wrote: >> >> > On 02/29/2016 04:26 AM, Jagan Teki wrote: >> >> >> Hi York, >> >> >> >> >> >> On 27 February 2016 at 02:14, york sun <york@nxp.com> wrote: >> >> >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: >> >> >> >> >> >> >> >> >>>> >> >> >>>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor >> >> >>>> >> >> >>> Jagan, >> >> >>> >> >> >>> I am getting there. Will test sf probe/read/write and probably >> >> >>> boot on selected platforms. Is there any specific platform/test in >> >> >>> your mind? >> >> >> >> >> >> Yes, these tests OK. and if possible please verify 'sf protect' as >> >> >> well. >> >> >> >> >> > >> >> > Jagan, >> >> > >> >> > Sorry for the delay. I am having issue with both ls1021aqds and >> >> > ls1043aqds. Need to work with internal team to sort it out. >> >> > >> >> > My understanding the tests you need are for spi-nor, in my case, >> >> > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I >> >> > only have ls1021aqds and ls1043aqds with such support. >> >> > >> >> >> >> Jagan, >> >> >> >> Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There >> >> were some issues. They will post their findings (and possible fix) to >> >> this thread. >> >> >> >> York >> > >> > I tested on LS1043AQDS board based on your spi-nor branch. The >> 'spi_flash_probe' >> > failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is >> > not defined for the board but it could be selected if CONFIG_MTD && >> CONFIG_DM_SPI, correct? >> > >> > So after I moved CONFIG_MTD to the defconfig file, the probing could work >> > now. >> > >> > And there is another small effect on our Fman driver. It would like to >> > read ucode blob from the QSPI flash. As the 'spi_flash_read' interface >> > is changed, I've modified the address value to an offset value in flash. >> >> Qianyu, >> >> > Here are my patches: >> > http://patchwork.ozlabs.org/patch/594872/ >> > http://patchwork.ozlabs.org/patch/594873/ >> > http://patchwork.ozlabs.org/patch/594874/ >> >> I have applied 3rd patch on my test branch, and remaining two will go in >> another >> time like once spi-nor got merged. >> >> Qianyu/Alison Wang, >> >> Please test this[1] branch for your new changes and let me know for any >> issues. >> >> [1] >> http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/spi-nor- >> next >> >> -- >> Jagan. > > Hi Jagan, > > Both DSPI and QSPI work well on LS1043ARDB/LS1043AQDS board. > Thanks! thanks! Mugunthan/Alison Wang, Please use u-boot-spi/spi-nor-test for your testing. -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
> -Original Message- > From: Jagan Teki [mailto:jagannadh.t...@gmail.com] > Sent: Tuesday, March 15, 2016 7:18 PM > To: Qianyu Gong <qianyu.g...@nxp.com>; Huan Wang <alison.w...@nxp.com> > Cc: york sun <york@nxp.com>; Tom Rini <tr...@konsulko.com>; Siva Durga > Prasad Paladugu <siva...@xilinx.com>; Michal Simek <michal.si...@xilinx.com>; > u-boot@lists.denx.de; Stefan Roese <s...@denx.de>; Mingkai Hu > <mingkai...@nxp.com> > Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support > > On 9 March 2016 at 13:37, Qianyu Gong <qianyu.g...@nxp.com> wrote: > > Hi Jagan, > > > >> -Original Message- > >> From: york sun > >> Sent: Tuesday, March 08, 2016 12:46 AM > >> To: Jagan Teki <jt...@openedev.com>; Huan Wang <alison.w...@nxp.com>; > >> Qianyu Gong <qianyu.g...@nxp.com> > >> Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu > >> <siva...@xilinx.com>; Stefan Roese <s...@denx.de>; Michal Simek > >> <michal.si...@xilinx.com>; Tom Rini <tr...@konsulko.com> > >> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support > >> > >> On 03/03/2016 01:06 PM, york sun wrote: > >> > On 02/29/2016 04:26 AM, Jagan Teki wrote: > >> >> Hi York, > >> >> > >> >> On 27 February 2016 at 02:14, york sun <york@nxp.com> wrote: > >> >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: > >> > >> > >> > >> >>>> > >> >>>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor > >> >>>> > >> >>> Jagan, > >> >>> > >> >>> I am getting there. Will test sf probe/read/write and probably > >> >>> boot on selected platforms. Is there any specific platform/test in > >> >>> your mind? > >> >> > >> >> Yes, these tests OK. and if possible please verify 'sf protect' as well. > >> >> > >> > > >> > Jagan, > >> > > >> > Sorry for the delay. I am having issue with both ls1021aqds and > >> > ls1043aqds. Need to work with internal team to sort it out. > >> > > >> > My understanding the tests you need are for spi-nor, in my case, > >> > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I > >> > only have ls1021aqds and ls1043aqds with such support. > >> > > >> > >> Jagan, > >> > >> Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There > >> were some issues. They will post their findings (and possible fix) to this > >> thread. > >> > >> York > > > > I tested on LS1043AQDS board based on your spi-nor branch. The > 'spi_flash_probe' > > failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is > > not defined for the board but it could be selected if CONFIG_MTD && > CONFIG_DM_SPI, correct? > > > > So after I moved CONFIG_MTD to the defconfig file, the probing could work > > now. > > > > And there is another small effect on our Fman driver. It would like to > > read ucode blob from the QSPI flash. As the 'spi_flash_read' interface > > is changed, I've modified the address value to an offset value in flash. > > Qianyu, > > > Here are my patches: > > http://patchwork.ozlabs.org/patch/594872/ > > http://patchwork.ozlabs.org/patch/594873/ > > http://patchwork.ozlabs.org/patch/594874/ > > I have applied 3rd patch on my test branch, and remaining two will go in > another > time like once spi-nor got merged. > > Qianyu/Alison Wang, > > Please test this[1] branch for your new changes and let me know for any > issues. > > [1] > http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/spi-nor- > next > > -- > Jagan. Hi Jagan, Both DSPI and QSPI work well on LS1043ARDB/LS1043AQDS board. Thanks! Regards, Qianyu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Mugunthan, On 15 March 2016 at 16:48, Jagan Teki <jagannadh.t...@gmail.com> wrote: > On 9 March 2016 at 13:37, Qianyu Gong <qianyu.g...@nxp.com> wrote: >> Hi Jagan, >> >>> -Original Message- >>> From: york sun >>> Sent: Tuesday, March 08, 2016 12:46 AM >>> To: Jagan Teki <jt...@openedev.com>; Huan Wang <alison.w...@nxp.com>; >>> Qianyu Gong <qianyu.g...@nxp.com> >>> Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu <siva...@xilinx.com>; >>> Stefan Roese <s...@denx.de>; Michal Simek <michal.si...@xilinx.com>; Tom >>> Rini >>> <tr...@konsulko.com> >>> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support >>> >>> On 03/03/2016 01:06 PM, york sun wrote: >>> > On 02/29/2016 04:26 AM, Jagan Teki wrote: >>> >> Hi York, >>> >> >>> >> On 27 February 2016 at 02:14, york sun <york@nxp.com> wrote: >>> >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: >>> >>> >>> >>> >>>> >>> >>>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor >>> >>>> >>> >>> Jagan, >>> >>> >>> >>> I am getting there. Will test sf probe/read/write and probably boot >>> >>> on selected platforms. Is there any specific platform/test in your mind? >>> >> >>> >> Yes, these tests OK. and if possible please verify 'sf protect' as well. >>> >> >>> > >>> > Jagan, >>> > >>> > Sorry for the delay. I am having issue with both ls1021aqds and >>> > ls1043aqds. Need to work with internal team to sort it out. >>> > >>> > My understanding the tests you need are for spi-nor, in my case, >>> > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I only >>> > have ls1021aqds and ls1043aqds with such support. >>> > >>> >>> Jagan, >>> >>> Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There were some >>> issues. They will post their findings (and possible fix) to this thread. >>> >>> York >> >> I tested on LS1043AQDS board based on your spi-nor branch. The >> 'spi_flash_probe' >> failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is not >> defined >> for the board but it could be selected if CONFIG_MTD && CONFIG_DM_SPI, >> correct? >> >> So after I moved CONFIG_MTD to the defconfig file, the probing could work >> now. >> >> And there is another small effect on our Fman driver. It would like to read >> ucode blob >> from the QSPI flash. As the 'spi_flash_read' interface is changed, I've >> modified the address >> value to an offset value in flash. > > Qianyu, > >> Here are my patches: >> http://patchwork.ozlabs.org/patch/594872/ >> http://patchwork.ozlabs.org/patch/594873/ >> http://patchwork.ozlabs.org/patch/594874/ > > I have applied 3rd patch on my test branch, and remaining two will go > in another time like once spi-nor got merged. > > Qianyu/Alison Wang, > > Please test this[1] branch for your new changes and let me know for any > issues. > Please test this [1] branch on your hardware, dra72/74 look some build issues, please fix accordingly. [1] http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/spi-nor-next -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 9 March 2016 at 13:37, Qianyu Gong <qianyu.g...@nxp.com> wrote: > Hi Jagan, > >> -Original Message- >> From: york sun >> Sent: Tuesday, March 08, 2016 12:46 AM >> To: Jagan Teki <jt...@openedev.com>; Huan Wang <alison.w...@nxp.com>; >> Qianyu Gong <qianyu.g...@nxp.com> >> Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu <siva...@xilinx.com>; >> Stefan Roese <s...@denx.de>; Michal Simek <michal.si...@xilinx.com>; Tom Rini >> <tr...@konsulko.com> >> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support >> >> On 03/03/2016 01:06 PM, york sun wrote: >> > On 02/29/2016 04:26 AM, Jagan Teki wrote: >> >> Hi York, >> >> >> >> On 27 February 2016 at 02:14, york sun <york@nxp.com> wrote: >> >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: >> >> >> >> >>>> >> >>>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor >> >>>> >> >>> Jagan, >> >>> >> >>> I am getting there. Will test sf probe/read/write and probably boot >> >>> on selected platforms. Is there any specific platform/test in your mind? >> >> >> >> Yes, these tests OK. and if possible please verify 'sf protect' as well. >> >> >> > >> > Jagan, >> > >> > Sorry for the delay. I am having issue with both ls1021aqds and >> > ls1043aqds. Need to work with internal team to sort it out. >> > >> > My understanding the tests you need are for spi-nor, in my case, >> > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I only >> > have ls1021aqds and ls1043aqds with such support. >> > >> >> Jagan, >> >> Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There were some >> issues. They will post their findings (and possible fix) to this thread. >> >> York > > I tested on LS1043AQDS board based on your spi-nor branch. The > 'spi_flash_probe' > failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is not > defined > for the board but it could be selected if CONFIG_MTD && CONFIG_DM_SPI, > correct? > > So after I moved CONFIG_MTD to the defconfig file, the probing could work now. > > And there is another small effect on our Fman driver. It would like to read > ucode blob > from the QSPI flash. As the 'spi_flash_read' interface is changed, I've > modified the address > value to an offset value in flash. Qianyu, > Here are my patches: > http://patchwork.ozlabs.org/patch/594872/ > http://patchwork.ozlabs.org/patch/594873/ > http://patchwork.ozlabs.org/patch/594874/ I have applied 3rd patch on my test branch, and remaining two will go in another time like once spi-nor got merged. Qianyu/Alison Wang, Please test this[1] branch for your new changes and let me know for any issues. [1] http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/spi-nor-next -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Jagan, > -Original Message- > From: york sun > Sent: Tuesday, March 08, 2016 12:46 AM > To: Jagan Teki <jt...@openedev.com>; Huan Wang <alison.w...@nxp.com>; > Qianyu Gong <qianyu.g...@nxp.com> > Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu <siva...@xilinx.com>; > Stefan Roese <s...@denx.de>; Michal Simek <michal.si...@xilinx.com>; Tom Rini > <tr...@konsulko.com> > Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support > > On 03/03/2016 01:06 PM, york sun wrote: > > On 02/29/2016 04:26 AM, Jagan Teki wrote: > >> Hi York, > >> > >> On 27 February 2016 at 02:14, york sun <york@nxp.com> wrote: > >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: > > > > >>>> > >>>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor > >>>> > >>> Jagan, > >>> > >>> I am getting there. Will test sf probe/read/write and probably boot > >>> on selected platforms. Is there any specific platform/test in your mind? > >> > >> Yes, these tests OK. and if possible please verify 'sf protect' as well. > >> > > > > Jagan, > > > > Sorry for the delay. I am having issue with both ls1021aqds and > > ls1043aqds. Need to work with internal team to sort it out. > > > > My understanding the tests you need are for spi-nor, in my case, > > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I only > > have ls1021aqds and ls1043aqds with such support. > > > > Jagan, > > Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There were some > issues. They will post their findings (and possible fix) to this thread. > > York I tested on LS1043AQDS board based on your spi-nor branch. The 'spi_flash_probe' failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is not defined for the board but it could be selected if CONFIG_MTD && CONFIG_DM_SPI, correct? So after I moved CONFIG_MTD to the defconfig file, the probing could work now. And there is another small effect on our Fman driver. It would like to read ucode blob from the QSPI flash. As the 'spi_flash_read' interface is changed, I've modified the address value to an offset value in flash. Here are my patches: http://patchwork.ozlabs.org/patch/594872/ http://patchwork.ozlabs.org/patch/594873/ http://patchwork.ozlabs.org/patch/594874/ Regards, Qianyu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi, Jagan, > On 03/03/2016 01:06 PM, york sun wrote: > > On 02/29/2016 04:26 AM, Jagan Teki wrote: > >> Hi York, > >> > >> On 27 February 2016 at 02:14, york sunwrote: > >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: > > > > > Can you pls- test the dataflash changes? use u-boot-spi/spi-nor > > >>> Jagan, > >>> > >>> I am getting there. Will test sf probe/read/write and probably boot > >>> on selected platforms. Is there any specific platform/test in your > mind? > >> > >> Yes, these tests OK. and if possible please verify 'sf protect' as > well. > >> > > > > Jagan, > > > > Sorry for the delay. I am having issue with both ls1021aqds and > > ls1043aqds. Need to work with internal team to sort it out. > > > > My understanding the tests you need are for spi-nor, in my case, > > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I only > > have ls1021aqds and ls1043aqds with such support. > > > > Jagan, > > Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There were > some issues. They will post their findings (and possible fix) to this > thread. > [Alison Wang] I verified QSPI boot on LS1021AQDS and LS1021ATWR boards based on u-boot-spi/spi-nor branch. As we also support QSPI in SD boot, some modifications are needed for ls1021aqds_sdcard_qspi_defconfig and ls1021atwr_sdcard_qspi_defconfig. I submitted a set for the modifications, please help to review. http://patchwork.ozlabs.org/patch/594819/ http://patchwork.ozlabs.org/patch/594820/ BTW, I have a concern about so much debugging information. Could we print them only when debugging? drivers/mtd/spi-nor/m25p80.c: printf("m25p80: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x } chunk_len = %zu\n", buf, flash->command[0], flash->command[1], flash->command[2], flash->command[3], len); => run upqspiboot Speed: 1000, full duplex Using eTSEC3 device TFTP from server 10.192.208.233; our IP address is 10.193.20.116 Filename 'wh/ls1/u-boot-qspiboot-swap.bin'. Load address: 0x8200 Loading: ### 1.5 MiB/s done Bytes transferred = 508532 (7c274 hex) m25p80: erase d8 1 0 0 (1) m25p80: erase d8 2 0 0 (2) m25p80: erase d8 3 0 0 (3) m25p80: erase d8 4 0 0 (4) m25p80: erase d8 5 0 0 (5) m25p80: erase d8 6 0 0 (6) m25p80: erase d8 7 0 0 (7) m25p80: erase d8 8 0 0 (8) m25p80: erase d8 9 0 0 (9) SF: 589824 bytes @ 0x1 Erased: OK device 0 offset 0x1, size 0x8 m25p80: 0x8200 => cmd = { 0x02 0x01 } chunk_len = 64 m25p80: 0x8240 => cmd = { 0x02 0x010040 } chunk_len = 64 m25p80: 0x8280 => cmd = { 0x02 0x010080 } chunk_len = 64 m25p80: 0x82c0 => cmd = { 0x02 0x0100c0 } chunk_len = 64 m25p80: 0x82000100 => cmd = { 0x02 0x010100 } chunk_len = 64 m25p80: 0x82000140 => cmd = { 0x02 0x010140 } chunk_len = 64 m25p80: 0x82000180 => cmd = { 0x02 0x010180 } chunk_len = 64 m25p80: 0x820001c0 => cmd = { 0x02 0x0101c0 } chunk_len = 64 m25p80: 0x82000200 => cmd = { 0x02 0x010200 } chunk_len = 64 m25p80: 0x82000240 => cmd = { 0x02 0x010240 } chunk_len = 64 m25p80: 0x82000280 => cmd = { 0x02 0x010280 } chunk_len = 64 m25p80: 0x820002c0 => cmd = { 0x02 0x0102c0 } chunk_len = 64 m25p80: 0x82000300 => cmd = { 0x02 0x010300 } chunk_len = 64 m25p80: 0x82000340 => cmd = { 0x02 0x010340 } chunk_len = 64 m25p80: 0x82000380 => cmd = { 0x02 0x010380 } chunk_len = 64 m25p80: 0x820003c0 => cmd = { 0x02 0x0103c0 } chunk_len = 64 (So much..) Best Regards, Alison Wang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 03/03/2016 01:06 PM, york sun wrote: > On 02/29/2016 04:26 AM, Jagan Teki wrote: >> Hi York, >> >> On 27 February 2016 at 02:14, york sunwrote: >>> On 02/22/2016 10:18 AM, Jagan Teki wrote: Can you pls- test the dataflash changes? use u-boot-spi/spi-nor >>> Jagan, >>> >>> I am getting there. Will test sf probe/read/write and probably boot on >>> selected >>> platforms. Is there any specific platform/test in your mind? >> >> Yes, these tests OK. and if possible please verify 'sf protect' as well. >> > > Jagan, > > Sorry for the delay. I am having issue with both ls1021aqds and ls1043aqds. > Need > to work with internal team to sort it out. > > My understanding the tests you need are for spi-nor, in my case, fsl-qspi, > right? This is not for fsl-dspi or fsl-espi driver. I only have ls1021aqds and > ls1043aqds with such support. > Jagan, Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There were some issues. They will post their findings (and possible fix) to this thread. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 02/29/2016 04:26 AM, Jagan Teki wrote: > Hi York, > > On 27 February 2016 at 02:14, york sunwrote: >> On 02/22/2016 10:18 AM, Jagan Teki wrote: >>> Hi York, >>> >>> On 15 February 2016 at 02:16, Jagan Teki wrote: Compared to previous patch series this series adds spi-nor core with spi-nor controller drivers are of "mtd uclass" This is whole series for all spi-nor related changes, and while series tested on spansion spi-nor chip. Know issue: - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. Why this framework: Some of the SPI device drivers at drivers/spi not a real spi controllers, Unlike normal/generic SPI controllers they operates only with SPI-NOR flash devices. these were technically termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c The problem with these were resides at drivers/spi is entire SPI layer becomes SPI-NOR flash oriented which is absolutely a wrong indication where SPI layer getting effected more with flash operations - So this SPI-NOR core will resolve this issue by separating all SPI-NOR flash operations from spi layer and creats a generic layer called SPI-NOR core which can be used to interact SPI-NOR to SPI driver interface layer and the SPI-NOR controller driver. The idea is taken from Linux spi-nor framework. Before SPI-NOR: --- cmd/sf.c --- spi_flash.c --- sf_probe.c --- spi-uclass --- spi drivers --- SPI NOR chip --- After SPI-NOR: -- cmd/sf.c -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- SPI-NOR with MTD: -- cmd/sf.c -- MTD core -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- drivers/mtd/spi-nor/spi-nor.c: spi-nor core drivers/mtd/spi-nor/m25p80.c: mtd uclass driver which is an interface layer b/w spi-nor core drivers/spi drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) Changes for v6: - Fixed git bisectable issues, with buildman. - Fixed spi-nor compilation issues - newly designed changes. Changes for v5: - newly designed changes Testing: $ git clone git://git.denx.de/u-boot-spi.git $ cd u-boot-spi $ git checkout -b spi-nor origin/spi-nor Jagan Teki (76): mtd: Add m25p80 driver mtd: Add Kconfig entry for MTD_M25P80 mtd: Add SPI-NOR core support doc: device-tree-bindings: jedec,spi-nor mtd: spi-nor: Add Kconfig entry for MTD_SPI_NOR mtd: spi-nor: Add kconfig for MTD_SPI_NOR_USE_4K_SECTORS mtd: spi-nor: Add MTD support mtd: spi-nor: Add spi_nor support in m25p80 mtd: spi-nor: Add dm spi-nor probing mtd: spi-nor: Add spi_flash_probe for mtd-dm-spi-nor mtd: spi-nor: Add spi_flash_free for mtd-dm-spi-nor mtd: spi-nor: m25p80: Add spi_nor support for non-dm sf: Rename erase_size to erasesize sf: Use erasesize instead of sector_size sf: Use uint64_t for flash->size spi_flash: Use mtd_info operation for SPI-NOR spi_flash: Use spi_flash_t instead of struct spi_flash mtd: spi-nor: Move spi_read_then_write to spi layer spi: Rename spi_read_then_write to spi_write_then_read mtd: spi-nor: Rename SPI_FLASH_BAR to SPI_NOR_BAR mtd: spi-nor: Add Kconfig entry for SPI_NOR_BAR mtd: spi-nor: Copy spl files from drivers/mtd/spi mtd: spi-nor: spl: Follow ascending order of include headers mtd: spi-nor: fsl_espi_spl: Use mtd_info mtd: spi-nor: spi_spl_load: Use mtd_info mtd: spi-nor: Add flash vendor Kconfig entries arm: zynq: Kconfig: Select MTD uclass arm: zynq: Kconfig: Drop DM_SPI_FLASH defconfigs: zynq_microzed: Drop CONFIG_SPI_FLASH defconfig: zynq_microzed: Enable CONFIG_MTD_M25P80 defconfig: zynq_microzed: Enable CONFIG_MTD_SPI_NOR spl: Add
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 29 February 2016 at 18:04, Fabio Estevamwrote: > On Mon, Feb 29, 2016 at 9:27 AM, Jagan Teki wrote: > >> Please verify 'sf protect' as well if you haven't tested. > > I tested it last week and it worked fine. OK, thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Simon, On 27 February 2016 at 04:34, Simon Glasswrote: > Hi Jagan, > > On 26 February 2016 at 13:44, york sun wrote: >> On 02/22/2016 10:18 AM, Jagan Teki wrote: >>> Hi York, >>> >>> On 15 February 2016 at 02:16, Jagan Teki wrote: Compared to previous patch series this series adds spi-nor core with spi-nor controller drivers are of "mtd uclass" This is whole series for all spi-nor related changes, and while series tested on spansion spi-nor chip. Know issue: - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. Why this framework: Some of the SPI device drivers at drivers/spi not a real spi controllers, Unlike normal/generic SPI controllers they operates only with SPI-NOR flash devices. these were technically termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c The problem with these were resides at drivers/spi is entire SPI layer becomes SPI-NOR flash oriented which is absolutely a wrong indication where SPI layer getting effected more with flash operations - So this SPI-NOR core will resolve this issue by separating all SPI-NOR flash operations from spi layer and creats a generic layer called SPI-NOR core which can be used to interact SPI-NOR to SPI driver interface layer and the SPI-NOR controller driver. The idea is taken from Linux spi-nor framework. Before SPI-NOR: --- cmd/sf.c --- spi_flash.c --- sf_probe.c --- spi-uclass --- spi drivers --- SPI NOR chip --- After SPI-NOR: -- cmd/sf.c -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- SPI-NOR with MTD: -- cmd/sf.c -- MTD core -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- drivers/mtd/spi-nor/spi-nor.c: spi-nor core drivers/mtd/spi-nor/m25p80.c: mtd uclass driver which is an interface layer b/w spi-nor core drivers/spi drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) Changes for v6: - Fixed git bisectable issues, with buildman. - Fixed spi-nor compilation issues - newly designed changes. Changes for v5: - newly designed changes Testing: $ git clone git://git.denx.de/u-boot-spi.git $ cd u-boot-spi $ git checkout -b spi-nor origin/spi-nor Jagan Teki (76): mtd: Add m25p80 driver mtd: Add Kconfig entry for MTD_M25P80 mtd: Add SPI-NOR core support doc: device-tree-bindings: jedec,spi-nor mtd: spi-nor: Add Kconfig entry for MTD_SPI_NOR mtd: spi-nor: Add kconfig for MTD_SPI_NOR_USE_4K_SECTORS mtd: spi-nor: Add MTD support mtd: spi-nor: Add spi_nor support in m25p80 mtd: spi-nor: Add dm spi-nor probing mtd: spi-nor: Add spi_flash_probe for mtd-dm-spi-nor mtd: spi-nor: Add spi_flash_free for mtd-dm-spi-nor mtd: spi-nor: m25p80: Add spi_nor support for non-dm sf: Rename erase_size to erasesize sf: Use erasesize instead of sector_size sf: Use uint64_t for flash->size spi_flash: Use mtd_info operation for SPI-NOR spi_flash: Use spi_flash_t instead of struct spi_flash mtd: spi-nor: Move spi_read_then_write to spi layer spi: Rename spi_read_then_write to spi_write_then_read mtd: spi-nor: Rename SPI_FLASH_BAR to SPI_NOR_BAR mtd: spi-nor: Add Kconfig entry for SPI_NOR_BAR mtd: spi-nor: Copy spl files from drivers/mtd/spi mtd: spi-nor: spl: Follow ascending order of include headers mtd: spi-nor: fsl_espi_spl: Use mtd_info mtd: spi-nor: spi_spl_load: Use mtd_info mtd: spi-nor: Add flash vendor Kconfig entries arm: zynq: Kconfig: Select MTD uclass arm: zynq: Kconfig: Drop DM_SPI_FLASH defconfigs: zynq_microzed: Drop CONFIG_SPI_FLASH defconfig: zynq_microzed: Enable CONFIG_MTD_M25P80 defconfig: zynq_microzed: Enable
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Mon, Feb 29, 2016 at 9:27 AM, Jagan Tekiwrote: > Please verify 'sf protect' as well if you haven't tested. I tested it last week and it worked fine. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Fabio, On 24 February 2016 at 02:16, Fabio Estevamwrote: > On Tue, Feb 23, 2016 at 10:03 AM, Jagan Teki wrote: >> Hi Fabio, >> >> On 23 February 2016 at 00:22, Fabio Estevam wrote: >>> On Mon, Feb 22, 2016 at 3:17 PM, Jagan Teki wrote: >>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor >>> >>> Does not even build for me (mx6qsabresd_defconfig) : >> >> Please try again, I think I missed some changes. mean while I ran >> buildman again will update that one as well. > > Now it builds and basic sf commands work fine. Please verify 'sf protect' as well if you haven't tested. thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi York, On 27 February 2016 at 02:14, york sunwrote: > On 02/22/2016 10:18 AM, Jagan Teki wrote: >> Hi York, >> >> On 15 February 2016 at 02:16, Jagan Teki wrote: >>> Compared to previous patch series this series adds spi-nor >>> core with spi-nor controller drivers are of "mtd uclass" >>> >>> This is whole series for all spi-nor related changes, and while >>> series tested on spansion spi-nor chip. >>> >>> Know issue: >>> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >>> >>> Why this framework: >>> >>> Some of the SPI device drivers at drivers/spi not a real >>> spi controllers, Unlike normal/generic SPI controllers they >>> operates only with SPI-NOR flash devices. these were technically >>> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >>> >>> The problem with these were resides at drivers/spi is entire >>> SPI layer becomes SPI-NOR flash oriented which is absolutely >>> a wrong indication where SPI layer getting effected more with >>> flash operations - So this SPI-NOR core will resolve this issue >>> by separating all SPI-NOR flash operations from spi layer and >>> creats a generic layer called SPI-NOR core which can be used to >>> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >>> controller driver. The idea is taken from Linux spi-nor framework. >>> >>> Before SPI-NOR: >>> >>> --- >>> cmd/sf.c >>> --- >>> spi_flash.c >>> --- >>> sf_probe.c >>> --- >>> spi-uclass >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> After SPI-NOR: >>> >>> -- >>> cmd/sf.c >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> SPI-NOR with MTD: >>> >>> -- >>> cmd/sf.c >>> -- >>> MTD core >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >>> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >>> which is an interface layer b/w spi-nor core drivers/spi >>> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >>> >>> Changes for v6: >>> - Fixed git bisectable issues, with buildman. >>> - Fixed spi-nor compilation issues >>> - newly designed changes. >>> >>> Changes for v5: >>> - newly designed changes >>> >>> Testing: >>> $ git clone git://git.denx.de/u-boot-spi.git >>> $ cd u-boot-spi >>> $ git checkout -b spi-nor origin/spi-nor >>> >>> Jagan Teki (76): >>> mtd: Add m25p80 driver >>> mtd: Add Kconfig entry for MTD_M25P80 >>> mtd: Add SPI-NOR core support >>> doc: device-tree-bindings: jedec,spi-nor >>> mtd: spi-nor: Add Kconfig entry for MTD_SPI_NOR >>> mtd: spi-nor: Add kconfig for MTD_SPI_NOR_USE_4K_SECTORS >>> mtd: spi-nor: Add MTD support >>> mtd: spi-nor: Add spi_nor support in m25p80 >>> mtd: spi-nor: Add dm spi-nor probing >>> mtd: spi-nor: Add spi_flash_probe for mtd-dm-spi-nor >>> mtd: spi-nor: Add spi_flash_free for mtd-dm-spi-nor >>> mtd: spi-nor: m25p80: Add spi_nor support for non-dm >>> sf: Rename erase_size to erasesize >>> sf: Use erasesize instead of sector_size >>> sf: Use uint64_t for flash->size >>> spi_flash: Use mtd_info operation for SPI-NOR >>> spi_flash: Use spi_flash_t instead of struct spi_flash >>> mtd: spi-nor: Move spi_read_then_write to spi layer >>> spi: Rename spi_read_then_write to spi_write_then_read >>> mtd: spi-nor: Rename SPI_FLASH_BAR to SPI_NOR_BAR >>> mtd: spi-nor: Add Kconfig entry for SPI_NOR_BAR >>> mtd: spi-nor: Copy spl files from drivers/mtd/spi >>> mtd: spi-nor: spl: Follow ascending order of include headers >>> mtd: spi-nor: fsl_espi_spl: Use mtd_info >>> mtd: spi-nor: spi_spl_load: Use mtd_info >>> mtd: spi-nor: Add flash vendor Kconfig entries >>> arm: zynq: Kconfig: Select MTD uclass >>> arm: zynq: Kconfig: Drop DM_SPI_FLASH >>> defconfigs: zynq_microzed: Drop CONFIG_SPI_FLASH >>> defconfig: zynq_microzed: Enable CONFIG_MTD_M25P80 >>> defconfig: zynq_microzed: Enable CONFIG_MTD_SPI_NOR >>> spl: Add CONFIG_SPL_SPI_NOR_SUPPORT >>> configs: zynq: Use CONFIG_SPL_SPI_NOR_SUPPORT >>> configs: zynq: Use CONFIG_SPL_MTD_SUPPORT >>> mtd: spi-nor: Copy sf_dataflash >>> mtd:
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Jagan, On 26 February 2016 at 13:44, york sunwrote: > On 02/22/2016 10:18 AM, Jagan Teki wrote: >> Hi York, >> >> On 15 February 2016 at 02:16, Jagan Teki wrote: >>> Compared to previous patch series this series adds spi-nor >>> core with spi-nor controller drivers are of "mtd uclass" >>> >>> This is whole series for all spi-nor related changes, and while >>> series tested on spansion spi-nor chip. >>> >>> Know issue: >>> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >>> >>> Why this framework: >>> >>> Some of the SPI device drivers at drivers/spi not a real >>> spi controllers, Unlike normal/generic SPI controllers they >>> operates only with SPI-NOR flash devices. these were technically >>> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >>> >>> The problem with these were resides at drivers/spi is entire >>> SPI layer becomes SPI-NOR flash oriented which is absolutely >>> a wrong indication where SPI layer getting effected more with >>> flash operations - So this SPI-NOR core will resolve this issue >>> by separating all SPI-NOR flash operations from spi layer and >>> creats a generic layer called SPI-NOR core which can be used to >>> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >>> controller driver. The idea is taken from Linux spi-nor framework. >>> >>> Before SPI-NOR: >>> >>> --- >>> cmd/sf.c >>> --- >>> spi_flash.c >>> --- >>> sf_probe.c >>> --- >>> spi-uclass >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> After SPI-NOR: >>> >>> -- >>> cmd/sf.c >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> SPI-NOR with MTD: >>> >>> -- >>> cmd/sf.c >>> -- >>> MTD core >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >>> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >>> which is an interface layer b/w spi-nor core drivers/spi >>> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >>> >>> Changes for v6: >>> - Fixed git bisectable issues, with buildman. >>> - Fixed spi-nor compilation issues >>> - newly designed changes. >>> >>> Changes for v5: >>> - newly designed changes >>> >>> Testing: >>> $ git clone git://git.denx.de/u-boot-spi.git >>> $ cd u-boot-spi >>> $ git checkout -b spi-nor origin/spi-nor >>> >>> Jagan Teki (76): >>> mtd: Add m25p80 driver >>> mtd: Add Kconfig entry for MTD_M25P80 >>> mtd: Add SPI-NOR core support >>> doc: device-tree-bindings: jedec,spi-nor >>> mtd: spi-nor: Add Kconfig entry for MTD_SPI_NOR >>> mtd: spi-nor: Add kconfig for MTD_SPI_NOR_USE_4K_SECTORS >>> mtd: spi-nor: Add MTD support >>> mtd: spi-nor: Add spi_nor support in m25p80 >>> mtd: spi-nor: Add dm spi-nor probing >>> mtd: spi-nor: Add spi_flash_probe for mtd-dm-spi-nor >>> mtd: spi-nor: Add spi_flash_free for mtd-dm-spi-nor >>> mtd: spi-nor: m25p80: Add spi_nor support for non-dm >>> sf: Rename erase_size to erasesize >>> sf: Use erasesize instead of sector_size >>> sf: Use uint64_t for flash->size >>> spi_flash: Use mtd_info operation for SPI-NOR >>> spi_flash: Use spi_flash_t instead of struct spi_flash >>> mtd: spi-nor: Move spi_read_then_write to spi layer >>> spi: Rename spi_read_then_write to spi_write_then_read >>> mtd: spi-nor: Rename SPI_FLASH_BAR to SPI_NOR_BAR >>> mtd: spi-nor: Add Kconfig entry for SPI_NOR_BAR >>> mtd: spi-nor: Copy spl files from drivers/mtd/spi >>> mtd: spi-nor: spl: Follow ascending order of include headers >>> mtd: spi-nor: fsl_espi_spl: Use mtd_info >>> mtd: spi-nor: spi_spl_load: Use mtd_info >>> mtd: spi-nor: Add flash vendor Kconfig entries >>> arm: zynq: Kconfig: Select MTD uclass >>> arm: zynq: Kconfig: Drop DM_SPI_FLASH >>> defconfigs: zynq_microzed: Drop CONFIG_SPI_FLASH >>> defconfig: zynq_microzed: Enable CONFIG_MTD_M25P80 >>> defconfig: zynq_microzed: Enable CONFIG_MTD_SPI_NOR >>> spl: Add CONFIG_SPL_SPI_NOR_SUPPORT >>> configs: zynq: Use CONFIG_SPL_SPI_NOR_SUPPORT >>> configs: zynq: Use CONFIG_SPL_MTD_SUPPORT >>> mtd: spi-nor: Copy sf_dataflash >>> mtd:
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 02/22/2016 10:18 AM, Jagan Teki wrote: > Hi York, > > On 15 February 2016 at 02:16, Jagan Tekiwrote: >> Compared to previous patch series this series adds spi-nor >> core with spi-nor controller drivers are of "mtd uclass" >> >> This is whole series for all spi-nor related changes, and while >> series tested on spansion spi-nor chip. >> >> Know issue: >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> >> Why this framework: >> >> Some of the SPI device drivers at drivers/spi not a real >> spi controllers, Unlike normal/generic SPI controllers they >> operates only with SPI-NOR flash devices. these were technically >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> >> The problem with these were resides at drivers/spi is entire >> SPI layer becomes SPI-NOR flash oriented which is absolutely >> a wrong indication where SPI layer getting effected more with >> flash operations - So this SPI-NOR core will resolve this issue >> by separating all SPI-NOR flash operations from spi layer and >> creats a generic layer called SPI-NOR core which can be used to >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> controller driver. The idea is taken from Linux spi-nor framework. >> >> Before SPI-NOR: >> >> --- >> cmd/sf.c >> --- >> spi_flash.c >> --- >> sf_probe.c >> --- >> spi-uclass >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> After SPI-NOR: >> >> -- >> cmd/sf.c >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> SPI-NOR with MTD: >> >> -- >> cmd/sf.c >> -- >> MTD core >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> which is an interface layer b/w spi-nor core drivers/spi >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Changes for v6: >> - Fixed git bisectable issues, with buildman. >> - Fixed spi-nor compilation issues >> - newly designed changes. >> >> Changes for v5: >> - newly designed changes >> >> Testing: >> $ git clone git://git.denx.de/u-boot-spi.git >> $ cd u-boot-spi >> $ git checkout -b spi-nor origin/spi-nor >> >> Jagan Teki (76): >> mtd: Add m25p80 driver >> mtd: Add Kconfig entry for MTD_M25P80 >> mtd: Add SPI-NOR core support >> doc: device-tree-bindings: jedec,spi-nor >> mtd: spi-nor: Add Kconfig entry for MTD_SPI_NOR >> mtd: spi-nor: Add kconfig for MTD_SPI_NOR_USE_4K_SECTORS >> mtd: spi-nor: Add MTD support >> mtd: spi-nor: Add spi_nor support in m25p80 >> mtd: spi-nor: Add dm spi-nor probing >> mtd: spi-nor: Add spi_flash_probe for mtd-dm-spi-nor >> mtd: spi-nor: Add spi_flash_free for mtd-dm-spi-nor >> mtd: spi-nor: m25p80: Add spi_nor support for non-dm >> sf: Rename erase_size to erasesize >> sf: Use erasesize instead of sector_size >> sf: Use uint64_t for flash->size >> spi_flash: Use mtd_info operation for SPI-NOR >> spi_flash: Use spi_flash_t instead of struct spi_flash >> mtd: spi-nor: Move spi_read_then_write to spi layer >> spi: Rename spi_read_then_write to spi_write_then_read >> mtd: spi-nor: Rename SPI_FLASH_BAR to SPI_NOR_BAR >> mtd: spi-nor: Add Kconfig entry for SPI_NOR_BAR >> mtd: spi-nor: Copy spl files from drivers/mtd/spi >> mtd: spi-nor: spl: Follow ascending order of include headers >> mtd: spi-nor: fsl_espi_spl: Use mtd_info >> mtd: spi-nor: spi_spl_load: Use mtd_info >> mtd: spi-nor: Add flash vendor Kconfig entries >> arm: zynq: Kconfig: Select MTD uclass >> arm: zynq: Kconfig: Drop DM_SPI_FLASH >> defconfigs: zynq_microzed: Drop CONFIG_SPI_FLASH >> defconfig: zynq_microzed: Enable CONFIG_MTD_M25P80 >> defconfig: zynq_microzed: Enable CONFIG_MTD_SPI_NOR >> spl: Add CONFIG_SPL_SPI_NOR_SUPPORT >> configs: zynq: Use CONFIG_SPL_SPI_NOR_SUPPORT >> configs: zynq: Use CONFIG_SPL_MTD_SUPPORT >> mtd: spi-nor: Copy sf_dataflash >> mtd: dataflash: Remove unneeded spi data >> mtd: dataflash: Move flash id detection into jedec_probe >> mtd: dataflash: Fix add_dataflash return logic >> mtd: dataflash: Add UCLASS_MTD support >> mtd: dataflash: Use
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Tue, Feb 23, 2016 at 10:03 AM, Jagan Tekiwrote: > Hi Fabio, > > On 23 February 2016 at 00:22, Fabio Estevam wrote: >> On Mon, Feb 22, 2016 at 3:17 PM, Jagan Teki wrote: >> >>> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor >> >> Does not even build for me (mx6qsabresd_defconfig) : > > Please try again, I think I missed some changes. mean while I ran > buildman again will update that one as well. Now it builds and basic sf commands work fine. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Fabio, On 23 February 2016 at 00:22, Fabio Estevamwrote: > On Mon, Feb 22, 2016 at 3:17 PM, Jagan Teki wrote: > >> Can you pls- test the dataflash changes? use u-boot-spi/spi-nor > > Does not even build for me (mx6qsabresd_defconfig) : Please try again, I think I missed some changes. mean while I ran buildman again will update that one as well. -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Mon, Feb 22, 2016 at 3:17 PM, Jagan Tekiwrote: > Can you pls- test the dataflash changes? use u-boot-spi/spi-nor Does not even build for me (mx6qsabresd_defconfig) : CC drivers/misc/mxc_ocotp.o drivers/dfu/dfu_sf.c: In function ‘dfu_read_medium_sf’: drivers/dfu/dfu_sf.c:23:2: warning: passing argument 1 of ‘spi_flash_read’ from incompatible pointer type [enabled by default] In file included from include/dfu.h:17:0, from drivers/dfu/dfu_sf.c:11: include/spi_flash.h:33:19: note: expected ‘struct spi_flash_t *’ but argument is of type ‘struct spi_flash *’ drivers/dfu/dfu_sf.c: In function ‘find_sector’: drivers/dfu/dfu_sf.c:28:50: error: dereferencing pointer to incomplete type drivers/dfu/dfu_sf.c:29:19: error: dereferencing pointer to incomplete type drivers/dfu/dfu_sf.c: In function ‘dfu_write_medium_sf’: drivers/dfu/dfu_sf.c:39:26: error: dereferencing pointer to incomplete type drivers/dfu/dfu_sf.c:39:10: warning: passing argument 1 of ‘spi_flash_erase’ from incompatible pointer type [enabled by default] In file included from include/dfu.h:17:0, from drivers/dfu/dfu_sf.c:11: include/spi_flash.h:45:19: note: expected ‘struct spi_flash_t *’ but argument is of type ‘struct spi_flash *’ drivers/dfu/dfu_sf.c:44:10: warning: passing argument 1 of ‘spi_flash_write’ from incompatible pointer type [enabled by default] In file included from include/dfu.h:17:0, from drivers/dfu/dfu_sf.c:11: include/spi_flash.h:39:19: note: expected ‘struct spi_flash_t *’ but argument is of type ‘struct spi_flash *’ drivers/dfu/dfu_sf.c: In function ‘dfu_free_entity_sf’: drivers/dfu/dfu_sf.c:63:2: warning: passing argument 1 of ‘spi_flash_free’ from incompatible pointer type [enabled by default] In file included from include/dfu.h:17:0, from drivers/dfu/dfu_sf.c:11: include/spi_flash.h:87:6: note: expected ‘struct spi_flash_t *’ but argument is of type ‘struct spi_flash *’ drivers/dfu/dfu_sf.c: In function ‘dfu_fill_entity_sf’: drivers/dfu/dfu_sf.c:120:19: warning: assignment from incompatible pointer type [enabled by default] drivers/dfu/dfu_sf.c:126:38: error: dereferencing pointer to incomplete type drivers/dfu/dfu_sf.c:136:3: warning: passing argument 1 of ‘spi_flash_free’ from incompatible pointer type [enabled by default] In file included from include/dfu.h:17:0, from drivers/dfu/dfu_sf.c:11: include/spi_flash.h:87:6: note: expected ‘struct spi_flash_t *’ but argument is of type ‘struct spi_flash *’ make[2]: *** [drivers/dfu/dfu_sf.o] Error 1 make[1]: *** [drivers/dfu] Error 2 make[1]: *** Waiting for unfinished jobs ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 02/22/2016 10:18 AM, Jagan Teki wrote: > Hi York, > > On 15 February 2016 at 02:16, Jagan Tekiwrote: >> Compared to previous patch series this series adds spi-nor >> core with spi-nor controller drivers are of "mtd uclass" >> >> This is whole series for all spi-nor related changes, and while >> series tested on spansion spi-nor chip. >> >> Know issue: >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> >> Why this framework: >> >> Some of the SPI device drivers at drivers/spi not a real >> spi controllers, Unlike normal/generic SPI controllers they >> operates only with SPI-NOR flash devices. these were technically >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> >> The problem with these were resides at drivers/spi is entire >> SPI layer becomes SPI-NOR flash oriented which is absolutely >> a wrong indication where SPI layer getting effected more with >> flash operations - So this SPI-NOR core will resolve this issue >> by separating all SPI-NOR flash operations from spi layer and >> creats a generic layer called SPI-NOR core which can be used to >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> controller driver. The idea is taken from Linux spi-nor framework. >> >> Before SPI-NOR: >> >> --- >> cmd/sf.c >> --- >> spi_flash.c >> --- >> sf_probe.c >> --- >> spi-uclass >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> After SPI-NOR: >> >> -- >> cmd/sf.c >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> SPI-NOR with MTD: >> >> -- >> cmd/sf.c >> -- >> MTD core >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> which is an interface layer b/w spi-nor core drivers/spi >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Changes for v6: >> - Fixed git bisectable issues, with buildman. >> - Fixed spi-nor compilation issues >> - newly designed changes. >> >> Changes for v5: >> - newly designed changes >> >> Testing: >> $ git clone git://git.denx.de/u-boot-spi.git >> $ cd u-boot-spi >> $ git checkout -b spi-nor origin/spi-nor >> >> Jagan Teki (76): >> mtd: Add m25p80 driver >> mtd: Add Kconfig entry for MTD_M25P80 >> mtd: Add SPI-NOR core support >> doc: device-tree-bindings: jedec,spi-nor >> mtd: spi-nor: Add Kconfig entry for MTD_SPI_NOR >> mtd: spi-nor: Add kconfig for MTD_SPI_NOR_USE_4K_SECTORS >> mtd: spi-nor: Add MTD support >> mtd: spi-nor: Add spi_nor support in m25p80 >> mtd: spi-nor: Add dm spi-nor probing >> mtd: spi-nor: Add spi_flash_probe for mtd-dm-spi-nor >> mtd: spi-nor: Add spi_flash_free for mtd-dm-spi-nor >> mtd: spi-nor: m25p80: Add spi_nor support for non-dm >> sf: Rename erase_size to erasesize >> sf: Use erasesize instead of sector_size >> sf: Use uint64_t for flash->size >> spi_flash: Use mtd_info operation for SPI-NOR >> spi_flash: Use spi_flash_t instead of struct spi_flash >> mtd: spi-nor: Move spi_read_then_write to spi layer >> spi: Rename spi_read_then_write to spi_write_then_read >> mtd: spi-nor: Rename SPI_FLASH_BAR to SPI_NOR_BAR >> mtd: spi-nor: Add Kconfig entry for SPI_NOR_BAR >> mtd: spi-nor: Copy spl files from drivers/mtd/spi >> mtd: spi-nor: spl: Follow ascending order of include headers >> mtd: spi-nor: fsl_espi_spl: Use mtd_info >> mtd: spi-nor: spi_spl_load: Use mtd_info >> mtd: spi-nor: Add flash vendor Kconfig entries >> arm: zynq: Kconfig: Select MTD uclass >> arm: zynq: Kconfig: Drop DM_SPI_FLASH >> defconfigs: zynq_microzed: Drop CONFIG_SPI_FLASH >> defconfig: zynq_microzed: Enable CONFIG_MTD_M25P80 >> defconfig: zynq_microzed: Enable CONFIG_MTD_SPI_NOR >> spl: Add CONFIG_SPL_SPI_NOR_SUPPORT >> configs: zynq: Use CONFIG_SPL_SPI_NOR_SUPPORT >> configs: zynq: Use CONFIG_SPL_MTD_SUPPORT >> mtd: spi-nor: Copy sf_dataflash >> mtd: dataflash: Remove unneeded spi data >> mtd: dataflash: Move flash id detection into jedec_probe >> mtd: dataflash: Fix add_dataflash return logic >> mtd: dataflash: Add UCLASS_MTD support >> mtd: dataflash: Use
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi York, On 15 February 2016 at 02:16, Jagan Tekiwrote: > Compared to previous patch series this series adds spi-nor > core with spi-nor controller drivers are of "mtd uclass" > > This is whole series for all spi-nor related changes, and while > series tested on spansion spi-nor chip. > > Know issue: > - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. > > Why this framework: > > Some of the SPI device drivers at drivers/spi not a real > spi controllers, Unlike normal/generic SPI controllers they > operates only with SPI-NOR flash devices. these were technically > termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c > > The problem with these were resides at drivers/spi is entire > SPI layer becomes SPI-NOR flash oriented which is absolutely > a wrong indication where SPI layer getting effected more with > flash operations - So this SPI-NOR core will resolve this issue > by separating all SPI-NOR flash operations from spi layer and > creats a generic layer called SPI-NOR core which can be used to > interact SPI-NOR to SPI driver interface layer and the SPI-NOR > controller driver. The idea is taken from Linux spi-nor framework. > > Before SPI-NOR: > > --- > cmd/sf.c > --- > spi_flash.c > --- > sf_probe.c > --- > spi-uclass > --- > spi drivers > --- > SPI NOR chip > --- > > After SPI-NOR: > > -- > cmd/sf.c > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > SPI-NOR with MTD: > > -- > cmd/sf.c > -- > MTD core > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > drivers/mtd/spi-nor/spi-nor.c: spi-nor core > drivers/mtd/spi-nor/m25p80.c: mtd uclass driver > which is an interface layer b/w spi-nor core drivers/spi > drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) > > Changes for v6: > - Fixed git bisectable issues, with buildman. > - Fixed spi-nor compilation issues > - newly designed changes. > > Changes for v5: > - newly designed changes > > Testing: > $ git clone git://git.denx.de/u-boot-spi.git > $ cd u-boot-spi > $ git checkout -b spi-nor origin/spi-nor > > Jagan Teki (76): > mtd: Add m25p80 driver > mtd: Add Kconfig entry for MTD_M25P80 > mtd: Add SPI-NOR core support > doc: device-tree-bindings: jedec,spi-nor > mtd: spi-nor: Add Kconfig entry for MTD_SPI_NOR > mtd: spi-nor: Add kconfig for MTD_SPI_NOR_USE_4K_SECTORS > mtd: spi-nor: Add MTD support > mtd: spi-nor: Add spi_nor support in m25p80 > mtd: spi-nor: Add dm spi-nor probing > mtd: spi-nor: Add spi_flash_probe for mtd-dm-spi-nor > mtd: spi-nor: Add spi_flash_free for mtd-dm-spi-nor > mtd: spi-nor: m25p80: Add spi_nor support for non-dm > sf: Rename erase_size to erasesize > sf: Use erasesize instead of sector_size > sf: Use uint64_t for flash->size > spi_flash: Use mtd_info operation for SPI-NOR > spi_flash: Use spi_flash_t instead of struct spi_flash > mtd: spi-nor: Move spi_read_then_write to spi layer > spi: Rename spi_read_then_write to spi_write_then_read > mtd: spi-nor: Rename SPI_FLASH_BAR to SPI_NOR_BAR > mtd: spi-nor: Add Kconfig entry for SPI_NOR_BAR > mtd: spi-nor: Copy spl files from drivers/mtd/spi > mtd: spi-nor: spl: Follow ascending order of include headers > mtd: spi-nor: fsl_espi_spl: Use mtd_info > mtd: spi-nor: spi_spl_load: Use mtd_info > mtd: spi-nor: Add flash vendor Kconfig entries > arm: zynq: Kconfig: Select MTD uclass > arm: zynq: Kconfig: Drop DM_SPI_FLASH > defconfigs: zynq_microzed: Drop CONFIG_SPI_FLASH > defconfig: zynq_microzed: Enable CONFIG_MTD_M25P80 > defconfig: zynq_microzed: Enable CONFIG_MTD_SPI_NOR > spl: Add CONFIG_SPL_SPI_NOR_SUPPORT > configs: zynq: Use CONFIG_SPL_SPI_NOR_SUPPORT > configs: zynq: Use CONFIG_SPL_MTD_SUPPORT > mtd: spi-nor: Copy sf_dataflash > mtd: dataflash: Remove unneeded spi data > mtd: dataflash: Move flash id detection into jedec_probe > mtd: dataflash: Fix add_dataflash return logic > mtd: dataflash: Add UCLASS_MTD support > mtd: dataflash: Use spi_write_then_read > mtd: dataflash: Drop sf_internal.h > mtd: dataflash: Minor cleanups > mtd: Rename sf_dataflash.c to mtd_dataflash.c > mtd: spi-nor: Add Kconfig entry
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Mon, Feb 22, 2016 at 02:27:34PM +0530, Jagan Teki wrote: > Hi Simon, > > On 18 February 2016 at 00:30, Simon Glasswrote: > > Hi Jagan, > > > > On 14 February 2016 at 13:46, Jagan Teki wrote: > >> Compared to previous patch series this series adds spi-nor > >> core with spi-nor controller drivers are of "mtd uclass" > >> > >> This is whole series for all spi-nor related changes, and while > >> series tested on spansion spi-nor chip. > >> > >> Know issue: > >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. > >> > >> Why this framework: > >> > >> Some of the SPI device drivers at drivers/spi not a real > >> spi controllers, Unlike normal/generic SPI controllers they > >> operates only with SPI-NOR flash devices. these were technically > >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c > >> > >> The problem with these were resides at drivers/spi is entire > >> SPI layer becomes SPI-NOR flash oriented which is absolutely > >> a wrong indication where SPI layer getting effected more with > >> flash operations - So this SPI-NOR core will resolve this issue > >> by separating all SPI-NOR flash operations from spi layer and > >> creats a generic layer called SPI-NOR core which can be used to > >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR > >> controller driver. The idea is taken from Linux spi-nor framework. > >> > >> Before SPI-NOR: > >> > >> --- > >> cmd/sf.c > >> --- > >> spi_flash.c > >> --- > >> sf_probe.c > >> --- > >> spi-uclass > >> --- > >> spi drivers > >> --- > >> SPI NOR chip > >> --- > >> > >> After SPI-NOR: > >> > >> -- > >> cmd/sf.c > >> -- > >> spi-nor.c > >> --- > >> m25p80.cspi nor drivers > >> --- > >> spi-uclass SPI NOR chip > >> --- > >> spi drivers > >> --- > >> SPI NOR chip > >> --- > >> > >> SPI-NOR with MTD: > >> > >> -- > >> cmd/sf.c > >> -- > >> MTD core > >> -- > >> spi-nor.c > >> --- > >> m25p80.cspi nor drivers > >> --- > >> spi-uclass SPI NOR chip > >> --- > >> spi drivers > >> --- > >> SPI NOR chip > >> --- > >> > >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core > >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver > >> which is an interface layer b/w spi-nor core drivers/spi > >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) > >> > >> Changes for v6: > >> - Fixed git bisectable issues, with buildman. > >> - Fixed spi-nor compilation issues > >> - newly designed changes. > >> > >> Changes for v5: > >> - newly designed changes > >> > >> Testing: > >> $ git clone git://git.denx.de/u-boot-spi.git > >> $ cd u-boot-spi > >> $ git checkout -b spi-nor origin/spi-nor > > > > I see quite a large rodata increase at this commit. Is it necessary? > > > > 67: configs: Use CONFIG_SPI_NOR_MISC > >arm: (for 1/1 boards) all +2434.0 bss +56.0 rodata +1994.0 > > text +384.0 > > > > There are also bisectability problems (build errors for some commits) > > - e.g. chromebook_jerry. > > No bisectable issues now, made buildman test. > > And here is image size test: > http://paste.ubuntu.com/15169227/ > > Size of entire series (step 0) > http://paste.ubuntu.com/15169235/ Looks good, thanks. > Let me know for any issues, I'm planning to send the whole series > again for final review. Please note that we're ~22 days from release, so this is too late for v2016.03 but we can get it in right after release, if everyone is happy otherwise. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Simon, On 18 February 2016 at 00:30, Simon Glasswrote: > Hi Jagan, > > On 14 February 2016 at 13:46, Jagan Teki wrote: >> Compared to previous patch series this series adds spi-nor >> core with spi-nor controller drivers are of "mtd uclass" >> >> This is whole series for all spi-nor related changes, and while >> series tested on spansion spi-nor chip. >> >> Know issue: >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> >> Why this framework: >> >> Some of the SPI device drivers at drivers/spi not a real >> spi controllers, Unlike normal/generic SPI controllers they >> operates only with SPI-NOR flash devices. these were technically >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> >> The problem with these were resides at drivers/spi is entire >> SPI layer becomes SPI-NOR flash oriented which is absolutely >> a wrong indication where SPI layer getting effected more with >> flash operations - So this SPI-NOR core will resolve this issue >> by separating all SPI-NOR flash operations from spi layer and >> creats a generic layer called SPI-NOR core which can be used to >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> controller driver. The idea is taken from Linux spi-nor framework. >> >> Before SPI-NOR: >> >> --- >> cmd/sf.c >> --- >> spi_flash.c >> --- >> sf_probe.c >> --- >> spi-uclass >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> After SPI-NOR: >> >> -- >> cmd/sf.c >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> SPI-NOR with MTD: >> >> -- >> cmd/sf.c >> -- >> MTD core >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> which is an interface layer b/w spi-nor core drivers/spi >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Changes for v6: >> - Fixed git bisectable issues, with buildman. >> - Fixed spi-nor compilation issues >> - newly designed changes. >> >> Changes for v5: >> - newly designed changes >> >> Testing: >> $ git clone git://git.denx.de/u-boot-spi.git >> $ cd u-boot-spi >> $ git checkout -b spi-nor origin/spi-nor > > I see quite a large rodata increase at this commit. Is it necessary? > > 67: configs: Use CONFIG_SPI_NOR_MISC >arm: (for 1/1 boards) all +2434.0 bss +56.0 rodata +1994.0 > text +384.0 > > There are also bisectability problems (build errors for some commits) > - e.g. chromebook_jerry. No bisectable issues now, made buildman test. And here is image size test: http://paste.ubuntu.com/15169227/ Size of entire series (step 0) http://paste.ubuntu.com/15169235/ Let me know for any issues, I'm planning to send the whole series again for final review. thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Stefan/Siva/Mugunthan/Vikas/Others On 15 February 2016 at 02:16, Jagan Tekiwrote: > Compared to previous patch series this series adds spi-nor > core with spi-nor controller drivers are of "mtd uclass" > > This is whole series for all spi-nor related changes, and while > series tested on spansion spi-nor chip. > > Know issue: > - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. > > Why this framework: > > Some of the SPI device drivers at drivers/spi not a real > spi controllers, Unlike normal/generic SPI controllers they > operates only with SPI-NOR flash devices. these were technically > termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c > > The problem with these were resides at drivers/spi is entire > SPI layer becomes SPI-NOR flash oriented which is absolutely > a wrong indication where SPI layer getting effected more with > flash operations - So this SPI-NOR core will resolve this issue > by separating all SPI-NOR flash operations from spi layer and > creats a generic layer called SPI-NOR core which can be used to > interact SPI-NOR to SPI driver interface layer and the SPI-NOR > controller driver. The idea is taken from Linux spi-nor framework. > > Before SPI-NOR: > > --- > cmd/sf.c > --- > spi_flash.c > --- > sf_probe.c > --- > spi-uclass > --- > spi drivers > --- > SPI NOR chip > --- > > After SPI-NOR: > > -- > cmd/sf.c > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > SPI-NOR with MTD: > > -- > cmd/sf.c > -- > MTD core > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > drivers/mtd/spi-nor/spi-nor.c: spi-nor core > drivers/mtd/spi-nor/m25p80.c: mtd uclass driver > which is an interface layer b/w spi-nor core drivers/spi > drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) > > Changes for v6: > - Fixed git bisectable issues, with buildman. > - Fixed spi-nor compilation issues > - newly designed changes. > > Changes for v5: > - newly designed changes > > Testing: > $ git clone git://git.denx.de/u-boot-spi.git > $ cd u-boot-spi > $ git checkout -b spi-nor origin/spi-nor Please test this series? thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Thu, Feb 18, 2016 at 3:13 PM, Jagan Tekiwrote: > Hi Bin, > > On 18 February 2016 at 10:54, Bin Meng wrote: >> On Thu, Feb 18, 2016 at 1:13 PM, Bin Meng wrote: >>> Hi Jagan, >>> >>> On Thu, Feb 18, 2016 at 12:05 PM, Bin Meng wrote: Hi Jagan, On Wed, Feb 17, 2016 at 5:10 PM, Bin Meng wrote: > Hi Jagan, > > On Wed, Feb 17, 2016 at 3:38 PM, Jagan Teki wrote: >> Hi Bin, >> >> On 17 February 2016 at 13:07, Jagan Teki wrote: >>> Hi Bin, >>> >>> On 17 February 2016 at 10:52, Bin Meng wrote: Hi Jagan, On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: > On 15 February 2016 at 02:16, Jagan Teki wrote: >> Compared to previous patch series this series adds spi-nor >> core with spi-nor controller drivers are of "mtd uclass" >> >> This is whole series for all spi-nor related changes, and while >> series tested on spansion spi-nor chip. >> >> Know issue: >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> >> Why this framework: >> >> Some of the SPI device drivers at drivers/spi not a real >> spi controllers, Unlike normal/generic SPI controllers they >> operates only with SPI-NOR flash devices. these were technically >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> >> The problem with these were resides at drivers/spi is entire >> SPI layer becomes SPI-NOR flash oriented which is absolutely >> a wrong indication where SPI layer getting effected more with >> flash operations - So this SPI-NOR core will resolve this issue >> by separating all SPI-NOR flash operations from spi layer and >> creats a generic layer called SPI-NOR core which can be used to >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> controller driver. The idea is taken from Linux spi-nor framework. >> >> Before SPI-NOR: >> >> --- >> cmd/sf.c >> --- >> spi_flash.c >> --- >> sf_probe.c >> --- >> spi-uclass >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> After SPI-NOR: >> >> -- >> cmd/sf.c >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> SPI-NOR with MTD: >> >> -- >> cmd/sf.c >> -- >> MTD core >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> which is an interface layer b/w spi-nor core drivers/spi >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) > > Tested both DM and non-DM models > > Tested-by: Jagan Teki My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to the SPI flash correctly, however after "reset" U-Boot still shows: *** Warning - bad CRC, using default environment spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2 MiB *** Warning - bad CRC, using default environment Anything wrong? >>> >>> >> >> I'm not getting the warning, after saveenv. >> >> DRAM: ECC disabled 1 GiB >> MMC: >> spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 >> KiB, total 16 MiB >> In:serial@e0001000 >> Out: serial@e0001000 >> Err: serial@e0001000 >> Model: Zynq
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Bin, On 18 February 2016 at 10:54, Bin Mengwrote: > On Thu, Feb 18, 2016 at 1:13 PM, Bin Meng wrote: >> Hi Jagan, >> >> On Thu, Feb 18, 2016 at 12:05 PM, Bin Meng wrote: >>> Hi Jagan, >>> >>> On Wed, Feb 17, 2016 at 5:10 PM, Bin Meng wrote: Hi Jagan, On Wed, Feb 17, 2016 at 3:38 PM, Jagan Teki wrote: > Hi Bin, > > On 17 February 2016 at 13:07, Jagan Teki wrote: >> Hi Bin, >> >> On 17 February 2016 at 10:52, Bin Meng wrote: >>> Hi Jagan, >>> >>> On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: On 15 February 2016 at 02:16, Jagan Teki wrote: > Compared to previous patch series this series adds spi-nor > core with spi-nor controller drivers are of "mtd uclass" > > This is whole series for all spi-nor related changes, and while > series tested on spansion spi-nor chip. > > Know issue: > - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. > > Why this framework: > > Some of the SPI device drivers at drivers/spi not a real > spi controllers, Unlike normal/generic SPI controllers they > operates only with SPI-NOR flash devices. these were technically > termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c > > The problem with these were resides at drivers/spi is entire > SPI layer becomes SPI-NOR flash oriented which is absolutely > a wrong indication where SPI layer getting effected more with > flash operations - So this SPI-NOR core will resolve this issue > by separating all SPI-NOR flash operations from spi layer and > creats a generic layer called SPI-NOR core which can be used to > interact SPI-NOR to SPI driver interface layer and the SPI-NOR > controller driver. The idea is taken from Linux spi-nor framework. > > Before SPI-NOR: > > --- > cmd/sf.c > --- > spi_flash.c > --- > sf_probe.c > --- > spi-uclass > --- > spi drivers > --- > SPI NOR chip > --- > > After SPI-NOR: > > -- > cmd/sf.c > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > SPI-NOR with MTD: > > -- > cmd/sf.c > -- > MTD core > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > drivers/mtd/spi-nor/spi-nor.c: spi-nor core > drivers/mtd/spi-nor/m25p80.c: mtd uclass driver > which is an interface layer b/w spi-nor core drivers/spi > drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) Tested both DM and non-DM models Tested-by: Jagan Teki >>> >>> My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to >>> the SPI flash correctly, however after "reset" U-Boot still shows: *** >>> Warning - bad CRC, using default environment >>> >>> spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 >>> KiB, total 2 MiB >>> *** Warning - bad CRC, using default environment >>> >>> Anything wrong? >> >> > > I'm not getting the warning, after saveenv. > > DRAM: ECC disabled 1 GiB > MMC: > spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 > KiB, total 16 MiB > In:serial@e0001000 > Out: serial@e0001000 > Err: serial@e0001000 > Model: Zynq MicroZED Board > Tested on another x86 board, still see the 'bad CRC' warning, log below: U-Boot 2016.03-rc1-00254-gaba43ff (Feb 17 2016 - 17:03:54 +0800) CPU: x86,
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Thu, Feb 18, 2016 at 1:13 PM, Bin Mengwrote: > Hi Jagan, > > On Thu, Feb 18, 2016 at 12:05 PM, Bin Meng wrote: >> Hi Jagan, >> >> On Wed, Feb 17, 2016 at 5:10 PM, Bin Meng wrote: >>> Hi Jagan, >>> >>> On Wed, Feb 17, 2016 at 3:38 PM, Jagan Teki wrote: Hi Bin, On 17 February 2016 at 13:07, Jagan Teki wrote: > Hi Bin, > > On 17 February 2016 at 10:52, Bin Meng wrote: >> Hi Jagan, >> >> On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: >>> On 15 February 2016 at 02:16, Jagan Teki wrote: Compared to previous patch series this series adds spi-nor core with spi-nor controller drivers are of "mtd uclass" This is whole series for all spi-nor related changes, and while series tested on spansion spi-nor chip. Know issue: - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. Why this framework: Some of the SPI device drivers at drivers/spi not a real spi controllers, Unlike normal/generic SPI controllers they operates only with SPI-NOR flash devices. these were technically termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c The problem with these were resides at drivers/spi is entire SPI layer becomes SPI-NOR flash oriented which is absolutely a wrong indication where SPI layer getting effected more with flash operations - So this SPI-NOR core will resolve this issue by separating all SPI-NOR flash operations from spi layer and creats a generic layer called SPI-NOR core which can be used to interact SPI-NOR to SPI driver interface layer and the SPI-NOR controller driver. The idea is taken from Linux spi-nor framework. Before SPI-NOR: --- cmd/sf.c --- spi_flash.c --- sf_probe.c --- spi-uclass --- spi drivers --- SPI NOR chip --- After SPI-NOR: -- cmd/sf.c -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- SPI-NOR with MTD: -- cmd/sf.c -- MTD core -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- drivers/mtd/spi-nor/spi-nor.c: spi-nor core drivers/mtd/spi-nor/m25p80.c: mtd uclass driver which is an interface layer b/w spi-nor core drivers/spi drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >>> >>> Tested both DM and non-DM models >>> >>> Tested-by: Jagan Teki >> >> My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to >> the SPI flash correctly, however after "reset" U-Boot still shows: *** >> Warning - bad CRC, using default environment >> >> spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 >> KiB, total 2 MiB >> *** Warning - bad CRC, using default environment >> >> Anything wrong? > > I'm not getting the warning, after saveenv. DRAM: ECC disabled 1 GiB MMC: spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB In:serial@e0001000 Out: serial@e0001000 Err: serial@e0001000 Model: Zynq MicroZED Board >>> >>> Tested on another x86 board, still see the 'bad CRC' warning, log below: >>> >>> U-Boot 2016.03-rc1-00254-gaba43ff (Feb 17 2016 - 17:03:54 +0800) >>> >>> CPU: x86, vendor Intel, device 590h >>> DRAM: 256 MiB >>> MMC: Quark SDHCI: 0 >>> spi-nor: detected w25q64 with page size 256 Bytes, erase size 4 KiB, total >>> 8 MiB >>> *** Warning - bad CRC, using default environment
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Jagan, On Thu, Feb 18, 2016 at 12:05 PM, Bin Mengwrote: > Hi Jagan, > > On Wed, Feb 17, 2016 at 5:10 PM, Bin Meng wrote: >> Hi Jagan, >> >> On Wed, Feb 17, 2016 at 3:38 PM, Jagan Teki wrote: >>> Hi Bin, >>> >>> On 17 February 2016 at 13:07, Jagan Teki wrote: Hi Bin, On 17 February 2016 at 10:52, Bin Meng wrote: > Hi Jagan, > > On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: >> On 15 February 2016 at 02:16, Jagan Teki wrote: >>> Compared to previous patch series this series adds spi-nor >>> core with spi-nor controller drivers are of "mtd uclass" >>> >>> This is whole series for all spi-nor related changes, and while >>> series tested on spansion spi-nor chip. >>> >>> Know issue: >>> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >>> >>> Why this framework: >>> >>> Some of the SPI device drivers at drivers/spi not a real >>> spi controllers, Unlike normal/generic SPI controllers they >>> operates only with SPI-NOR flash devices. these were technically >>> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >>> >>> The problem with these were resides at drivers/spi is entire >>> SPI layer becomes SPI-NOR flash oriented which is absolutely >>> a wrong indication where SPI layer getting effected more with >>> flash operations - So this SPI-NOR core will resolve this issue >>> by separating all SPI-NOR flash operations from spi layer and >>> creats a generic layer called SPI-NOR core which can be used to >>> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >>> controller driver. The idea is taken from Linux spi-nor framework. >>> >>> Before SPI-NOR: >>> >>> --- >>> cmd/sf.c >>> --- >>> spi_flash.c >>> --- >>> sf_probe.c >>> --- >>> spi-uclass >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> After SPI-NOR: >>> >>> -- >>> cmd/sf.c >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> SPI-NOR with MTD: >>> >>> -- >>> cmd/sf.c >>> -- >>> MTD core >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >>> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >>> which is an interface layer b/w spi-nor core drivers/spi >>> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Tested both DM and non-DM models >> >> Tested-by: Jagan Teki > > My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to > the SPI flash correctly, however after "reset" U-Boot still shows: *** > Warning - bad CRC, using default environment > > spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 > KiB, total 2 MiB > *** Warning - bad CRC, using default environment > > Anything wrong? >>> >>> I'm not getting the warning, after saveenv. >>> >>> DRAM: ECC disabled 1 GiB >>> MMC: >>> spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 >>> KiB, total 16 MiB >>> In:serial@e0001000 >>> Out: serial@e0001000 >>> Err: serial@e0001000 >>> Model: Zynq MicroZED Board >>> >> >> Tested on another x86 board, still see the 'bad CRC' warning, log below: >> >> U-Boot 2016.03-rc1-00254-gaba43ff (Feb 17 2016 - 17:03:54 +0800) >> >> CPU: x86, vendor Intel, device 590h >> DRAM: 256 MiB >> MMC: Quark SDHCI: 0 >> spi-nor: detected w25q64 with page size 256 Bytes, erase size 4 KiB, total 8 >> MiB >> *** Warning - bad CRC, using default environment >> >> Model: Intel Galileo >> Net: >> Warning: eth_designware#0 (eth0) using random MAC address - 5a:58:ba:e9:22:fb >> eth0: eth_designware#0 >> Warning: eth_designware#1 (eth1) using random MAC address -
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Jagan, On Wed, Feb 17, 2016 at 5:10 PM, Bin Mengwrote: > Hi Jagan, > > On Wed, Feb 17, 2016 at 3:38 PM, Jagan Teki wrote: >> Hi Bin, >> >> On 17 February 2016 at 13:07, Jagan Teki wrote: >>> Hi Bin, >>> >>> On 17 February 2016 at 10:52, Bin Meng wrote: Hi Jagan, On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: > On 15 February 2016 at 02:16, Jagan Teki wrote: >> Compared to previous patch series this series adds spi-nor >> core with spi-nor controller drivers are of "mtd uclass" >> >> This is whole series for all spi-nor related changes, and while >> series tested on spansion spi-nor chip. >> >> Know issue: >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> >> Why this framework: >> >> Some of the SPI device drivers at drivers/spi not a real >> spi controllers, Unlike normal/generic SPI controllers they >> operates only with SPI-NOR flash devices. these were technically >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> >> The problem with these were resides at drivers/spi is entire >> SPI layer becomes SPI-NOR flash oriented which is absolutely >> a wrong indication where SPI layer getting effected more with >> flash operations - So this SPI-NOR core will resolve this issue >> by separating all SPI-NOR flash operations from spi layer and >> creats a generic layer called SPI-NOR core which can be used to >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> controller driver. The idea is taken from Linux spi-nor framework. >> >> Before SPI-NOR: >> >> --- >> cmd/sf.c >> --- >> spi_flash.c >> --- >> sf_probe.c >> --- >> spi-uclass >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> After SPI-NOR: >> >> -- >> cmd/sf.c >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> SPI-NOR with MTD: >> >> -- >> cmd/sf.c >> -- >> MTD core >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> which is an interface layer b/w spi-nor core drivers/spi >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) > > Tested both DM and non-DM models > > Tested-by: Jagan Teki My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to the SPI flash correctly, however after "reset" U-Boot still shows: *** Warning - bad CRC, using default environment spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2 MiB *** Warning - bad CRC, using default environment Anything wrong? >>> >>> >> >> I'm not getting the warning, after saveenv. >> >> DRAM: ECC disabled 1 GiB >> MMC: >> spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 >> KiB, total 16 MiB >> In:serial@e0001000 >> Out: serial@e0001000 >> Err: serial@e0001000 >> Model: Zynq MicroZED Board >> > > Tested on another x86 board, still see the 'bad CRC' warning, log below: > > U-Boot 2016.03-rc1-00254-gaba43ff (Feb 17 2016 - 17:03:54 +0800) > > CPU: x86, vendor Intel, device 590h > DRAM: 256 MiB > MMC: Quark SDHCI: 0 > spi-nor: detected w25q64 with page size 256 Bytes, erase size 4 KiB, total 8 > MiB > *** Warning - bad CRC, using default environment > > Model: Intel Galileo > Net: > Warning: eth_designware#0 (eth0) using random MAC address - 5a:58:ba:e9:22:fb > eth0: eth_designware#0 > Warning: eth_designware#1 (eth1) using random MAC address - c6:a3:69:ff:b7:2e > , eth1: eth_designware#1 > Hit any key to stop autoboot: 0 > => saveenv > Saving Environment to SPI Flash... > Erasing SPI flash...Writing to SPI flash...done > => reset > resetting ... > > > U-Boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Thu, Feb 18, 2016 at 4:21 AM, Tom Riniwrote: > On Wed, Feb 17, 2016 at 05:10:33PM +0800, Bin Meng wrote: >> Hi Jagan, >> >> On Wed, Feb 17, 2016 at 3:38 PM, Jagan Teki wrote: >> > Hi Bin, >> > >> > On 17 February 2016 at 13:07, Jagan Teki wrote: >> >> Hi Bin, >> >> >> >> On 17 February 2016 at 10:52, Bin Meng wrote: >> >>> Hi Jagan, >> >>> >> >>> On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: >> On 15 February 2016 at 02:16, Jagan Teki wrote: >> > Compared to previous patch series this series adds spi-nor >> > core with spi-nor controller drivers are of "mtd uclass" >> > >> > This is whole series for all spi-nor related changes, and while >> > series tested on spansion spi-nor chip. >> > >> > Know issue: >> > - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> > >> > Why this framework: >> > >> > Some of the SPI device drivers at drivers/spi not a real >> > spi controllers, Unlike normal/generic SPI controllers they >> > operates only with SPI-NOR flash devices. these were technically >> > termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> > >> > The problem with these were resides at drivers/spi is entire >> > SPI layer becomes SPI-NOR flash oriented which is absolutely >> > a wrong indication where SPI layer getting effected more with >> > flash operations - So this SPI-NOR core will resolve this issue >> > by separating all SPI-NOR flash operations from spi layer and >> > creats a generic layer called SPI-NOR core which can be used to >> > interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> > controller driver. The idea is taken from Linux spi-nor framework. >> > >> > Before SPI-NOR: >> > >> > --- >> > cmd/sf.c >> > --- >> > spi_flash.c >> > --- >> > sf_probe.c >> > --- >> > spi-uclass >> > --- >> > spi drivers >> > --- >> > SPI NOR chip >> > --- >> > >> > After SPI-NOR: >> > >> > -- >> > cmd/sf.c >> > -- >> > spi-nor.c >> > --- >> > m25p80.cspi nor drivers >> > --- >> > spi-uclass SPI NOR chip >> > --- >> > spi drivers >> > --- >> > SPI NOR chip >> > --- >> > >> > SPI-NOR with MTD: >> > >> > -- >> > cmd/sf.c >> > -- >> > MTD core >> > -- >> > spi-nor.c >> > --- >> > m25p80.cspi nor drivers >> > --- >> > spi-uclass SPI NOR chip >> > --- >> > spi drivers >> > --- >> > SPI NOR chip >> > --- >> > >> > drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> > drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> > which is an interface layer b/w spi-nor core drivers/spi >> > drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Tested both DM and non-DM models >> >> Tested-by: Jagan Teki >> >>> >> >>> My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to >> >>> the SPI flash correctly, however after "reset" U-Boot still shows: *** >> >>> Warning - bad CRC, using default environment >> >>> >> >>> spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 >> >>> KiB, total 2 MiB >> >>> *** Warning - bad CRC, using default environment >> >>> >> >>> Anything wrong? >> >> >> >> >> > >> > I'm not getting the warning, after saveenv. >> > >> > DRAM: ECC disabled 1 GiB >> > MMC: >> > spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 >> > KiB, total 16 MiB >> > In:serial@e0001000 >> > Out: serial@e0001000 >> > Err: serial@e0001000 >> > Model: Zynq MicroZED Board >> > >> >> Tested on another x86 board, still see the 'bad CRC' warning, log below: >> >> U-Boot 2016.03-rc1-00254-gaba43ff (Feb 17 2016 - 17:03:54 +0800) >> >> CPU: x86, vendor Intel, device 590h >> DRAM: 256 MiB >> MMC: Quark SDHCI: 0 >> spi-nor: detected w25q64 with page size 256 Bytes, erase size 4 KiB, total 8 >> MiB >> *** Warning - bad CRC, using default environment >> >> Model: Intel Galileo >> Net: >> Warning: eth_designware#0 (eth0) using random MAC address - 5a:58:ba:e9:22:fb >> eth0:
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Simon, On 18 February 2016 at 01:38, Jagan Tekiwrote: > Hi Simon, > > On 18 February 2016 at 00:30, Simon Glass wrote: >> Hi Jagan, >> >> On 14 February 2016 at 13:46, Jagan Teki wrote: >>> Compared to previous patch series this series adds spi-nor >>> core with spi-nor controller drivers are of "mtd uclass" >>> >>> This is whole series for all spi-nor related changes, and while >>> series tested on spansion spi-nor chip. >>> >>> Know issue: >>> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >>> >>> Why this framework: >>> >>> Some of the SPI device drivers at drivers/spi not a real >>> spi controllers, Unlike normal/generic SPI controllers they >>> operates only with SPI-NOR flash devices. these were technically >>> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >>> >>> The problem with these were resides at drivers/spi is entire >>> SPI layer becomes SPI-NOR flash oriented which is absolutely >>> a wrong indication where SPI layer getting effected more with >>> flash operations - So this SPI-NOR core will resolve this issue >>> by separating all SPI-NOR flash operations from spi layer and >>> creats a generic layer called SPI-NOR core which can be used to >>> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >>> controller driver. The idea is taken from Linux spi-nor framework. >>> >>> Before SPI-NOR: >>> >>> --- >>> cmd/sf.c >>> --- >>> spi_flash.c >>> --- >>> sf_probe.c >>> --- >>> spi-uclass >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> After SPI-NOR: >>> >>> -- >>> cmd/sf.c >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> SPI-NOR with MTD: >>> >>> -- >>> cmd/sf.c >>> -- >>> MTD core >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >>> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >>> which is an interface layer b/w spi-nor core drivers/spi >>> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >>> >>> Changes for v6: >>> - Fixed git bisectable issues, with buildman. >>> - Fixed spi-nor compilation issues >>> - newly designed changes. >>> >>> Changes for v5: >>> - newly designed changes >>> >>> Testing: >>> $ git clone git://git.denx.de/u-boot-spi.git >>> $ cd u-boot-spi >>> $ git checkout -b spi-nor origin/spi-nor >> >> I see quite a large rodata increase at this commit. Is it necessary? >> >> 67: configs: Use CONFIG_SPI_NOR_MISC >>arm: (for 1/1 boards) all +2434.0 bss +56.0 rodata +1994.0 >> text +384.0 >> >> There are also bisectability problems (build errors for some commits) >> - e.g. chromebook_jerry. > > Yes, this I missed defining SPI_NOR config will update that. u-boot-spi/spi-nor updated, let me know if you find any build issues. -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Wed, Feb 17, 2016 at 05:10:33PM +0800, Bin Meng wrote: > Hi Jagan, > > On Wed, Feb 17, 2016 at 3:38 PM, Jagan Tekiwrote: > > Hi Bin, > > > > On 17 February 2016 at 13:07, Jagan Teki wrote: > >> Hi Bin, > >> > >> On 17 February 2016 at 10:52, Bin Meng wrote: > >>> Hi Jagan, > >>> > >>> On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: > On 15 February 2016 at 02:16, Jagan Teki wrote: > > Compared to previous patch series this series adds spi-nor > > core with spi-nor controller drivers are of "mtd uclass" > > > > This is whole series for all spi-nor related changes, and while > > series tested on spansion spi-nor chip. > > > > Know issue: > > - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. > > > > Why this framework: > > > > Some of the SPI device drivers at drivers/spi not a real > > spi controllers, Unlike normal/generic SPI controllers they > > operates only with SPI-NOR flash devices. these were technically > > termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c > > > > The problem with these were resides at drivers/spi is entire > > SPI layer becomes SPI-NOR flash oriented which is absolutely > > a wrong indication where SPI layer getting effected more with > > flash operations - So this SPI-NOR core will resolve this issue > > by separating all SPI-NOR flash operations from spi layer and > > creats a generic layer called SPI-NOR core which can be used to > > interact SPI-NOR to SPI driver interface layer and the SPI-NOR > > controller driver. The idea is taken from Linux spi-nor framework. > > > > Before SPI-NOR: > > > > --- > > cmd/sf.c > > --- > > spi_flash.c > > --- > > sf_probe.c > > --- > > spi-uclass > > --- > > spi drivers > > --- > > SPI NOR chip > > --- > > > > After SPI-NOR: > > > > -- > > cmd/sf.c > > -- > > spi-nor.c > > --- > > m25p80.cspi nor drivers > > --- > > spi-uclass SPI NOR chip > > --- > > spi drivers > > --- > > SPI NOR chip > > --- > > > > SPI-NOR with MTD: > > > > -- > > cmd/sf.c > > -- > > MTD core > > -- > > spi-nor.c > > --- > > m25p80.cspi nor drivers > > --- > > spi-uclass SPI NOR chip > > --- > > spi drivers > > --- > > SPI NOR chip > > --- > > > > drivers/mtd/spi-nor/spi-nor.c: spi-nor core > > drivers/mtd/spi-nor/m25p80.c: mtd uclass driver > > which is an interface layer b/w spi-nor core drivers/spi > > drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) > > Tested both DM and non-DM models > > Tested-by: Jagan Teki > >>> > >>> My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to > >>> the SPI flash correctly, however after "reset" U-Boot still shows: *** > >>> Warning - bad CRC, using default environment > >>> > >>> spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 > >>> KiB, total 2 MiB > >>> *** Warning - bad CRC, using default environment > >>> > >>> Anything wrong? > >> > >> > > > > I'm not getting the warning, after saveenv. > > > > DRAM: ECC disabled 1 GiB > > MMC: > > spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 > > KiB, total 16 MiB > > In:serial@e0001000 > > Out: serial@e0001000 > > Err: serial@e0001000 > > Model: Zynq MicroZED Board > > > > Tested on another x86 board, still see the 'bad CRC' warning, log below: > > U-Boot 2016.03-rc1-00254-gaba43ff (Feb 17 2016 - 17:03:54 +0800) > > CPU: x86, vendor Intel, device 590h > DRAM: 256 MiB > MMC: Quark SDHCI: 0 > spi-nor: detected w25q64 with page size 256 Bytes, erase size 4 KiB, total 8 > MiB > *** Warning - bad CRC, using default environment > > Model: Intel Galileo > Net: > Warning: eth_designware#0 (eth0) using random MAC address - 5a:58:ba:e9:22:fb > eth0: eth_designware#0 > Warning: eth_designware#1 (eth1) using random MAC address - c6:a3:69:ff:b7:2e > , eth1: eth_designware#1 > Hit any key to stop autoboot: 0 > => saveenv > Saving Environment to SPI Flash... >
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Simon, On 18 February 2016 at 00:30, Simon Glasswrote: > Hi Jagan, > > On 14 February 2016 at 13:46, Jagan Teki wrote: >> Compared to previous patch series this series adds spi-nor >> core with spi-nor controller drivers are of "mtd uclass" >> >> This is whole series for all spi-nor related changes, and while >> series tested on spansion spi-nor chip. >> >> Know issue: >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> >> Why this framework: >> >> Some of the SPI device drivers at drivers/spi not a real >> spi controllers, Unlike normal/generic SPI controllers they >> operates only with SPI-NOR flash devices. these were technically >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> >> The problem with these were resides at drivers/spi is entire >> SPI layer becomes SPI-NOR flash oriented which is absolutely >> a wrong indication where SPI layer getting effected more with >> flash operations - So this SPI-NOR core will resolve this issue >> by separating all SPI-NOR flash operations from spi layer and >> creats a generic layer called SPI-NOR core which can be used to >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> controller driver. The idea is taken from Linux spi-nor framework. >> >> Before SPI-NOR: >> >> --- >> cmd/sf.c >> --- >> spi_flash.c >> --- >> sf_probe.c >> --- >> spi-uclass >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> After SPI-NOR: >> >> -- >> cmd/sf.c >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> SPI-NOR with MTD: >> >> -- >> cmd/sf.c >> -- >> MTD core >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> which is an interface layer b/w spi-nor core drivers/spi >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Changes for v6: >> - Fixed git bisectable issues, with buildman. >> - Fixed spi-nor compilation issues >> - newly designed changes. >> >> Changes for v5: >> - newly designed changes >> >> Testing: >> $ git clone git://git.denx.de/u-boot-spi.git >> $ cd u-boot-spi >> $ git checkout -b spi-nor origin/spi-nor > > I see quite a large rodata increase at this commit. Is it necessary? > > 67: configs: Use CONFIG_SPI_NOR_MISC >arm: (for 1/1 boards) all +2434.0 bss +56.0 rodata +1994.0 > text +384.0 > > There are also bisectability problems (build errors for some commits) > - e.g. chromebook_jerry. Yes, this I missed defining SPI_NOR config will update that. -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Simon, On 18 February 2016 at 00:44, Jagan Tekiwrote: > Hi Simon, > > On 18 February 2016 at 00:30, Simon Glass wrote: >> Hi Jagan, >> >> On 14 February 2016 at 13:46, Jagan Teki wrote: >>> Compared to previous patch series this series adds spi-nor >>> core with spi-nor controller drivers are of "mtd uclass" >>> >>> This is whole series for all spi-nor related changes, and while >>> series tested on spansion spi-nor chip. >>> >>> Know issue: >>> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >>> >>> Why this framework: >>> >>> Some of the SPI device drivers at drivers/spi not a real >>> spi controllers, Unlike normal/generic SPI controllers they >>> operates only with SPI-NOR flash devices. these were technically >>> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >>> >>> The problem with these were resides at drivers/spi is entire >>> SPI layer becomes SPI-NOR flash oriented which is absolutely >>> a wrong indication where SPI layer getting effected more with >>> flash operations - So this SPI-NOR core will resolve this issue >>> by separating all SPI-NOR flash operations from spi layer and >>> creats a generic layer called SPI-NOR core which can be used to >>> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >>> controller driver. The idea is taken from Linux spi-nor framework. >>> >>> Before SPI-NOR: >>> >>> --- >>> cmd/sf.c >>> --- >>> spi_flash.c >>> --- >>> sf_probe.c >>> --- >>> spi-uclass >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> After SPI-NOR: >>> >>> -- >>> cmd/sf.c >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> SPI-NOR with MTD: >>> >>> -- >>> cmd/sf.c >>> -- >>> MTD core >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >>> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >>> which is an interface layer b/w spi-nor core drivers/spi >>> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >>> >>> Changes for v6: >>> - Fixed git bisectable issues, with buildman. >>> - Fixed spi-nor compilation issues >>> - newly designed changes. >>> >>> Changes for v5: >>> - newly designed changes >>> >>> Testing: >>> $ git clone git://git.denx.de/u-boot-spi.git >>> $ cd u-boot-spi >>> $ git checkout -b spi-nor origin/spi-nor >> >> I see quite a large rodata increase at this commit. Is it necessary? > > If ie the case then we need to revert the vendor configs w/o add them > into CONFIG_SPI_NOR_MISC. > >> >> 67: configs: Use CONFIG_SPI_NOR_MISC >>arm: (for 1/1 boards) all +2434.0 bss +56.0 rodata +1994.0 >> text +384.0 I couldn't find rodata section for this commit[1] am I missing anything? [1] http://paste.ubuntu.com/15101966/ >> >> There are also bisectability problems (build errors for some commits) >> - e.g. chromebook_jerry. > > Did you pick u-boot-spi/spi-nor? thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Simon, On 18 February 2016 at 00:30, Simon Glasswrote: > Hi Jagan, > > On 14 February 2016 at 13:46, Jagan Teki wrote: >> Compared to previous patch series this series adds spi-nor >> core with spi-nor controller drivers are of "mtd uclass" >> >> This is whole series for all spi-nor related changes, and while >> series tested on spansion spi-nor chip. >> >> Know issue: >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> >> Why this framework: >> >> Some of the SPI device drivers at drivers/spi not a real >> spi controllers, Unlike normal/generic SPI controllers they >> operates only with SPI-NOR flash devices. these were technically >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> >> The problem with these were resides at drivers/spi is entire >> SPI layer becomes SPI-NOR flash oriented which is absolutely >> a wrong indication where SPI layer getting effected more with >> flash operations - So this SPI-NOR core will resolve this issue >> by separating all SPI-NOR flash operations from spi layer and >> creats a generic layer called SPI-NOR core which can be used to >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> controller driver. The idea is taken from Linux spi-nor framework. >> >> Before SPI-NOR: >> >> --- >> cmd/sf.c >> --- >> spi_flash.c >> --- >> sf_probe.c >> --- >> spi-uclass >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> After SPI-NOR: >> >> -- >> cmd/sf.c >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> SPI-NOR with MTD: >> >> -- >> cmd/sf.c >> -- >> MTD core >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> which is an interface layer b/w spi-nor core drivers/spi >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Changes for v6: >> - Fixed git bisectable issues, with buildman. >> - Fixed spi-nor compilation issues >> - newly designed changes. >> >> Changes for v5: >> - newly designed changes >> >> Testing: >> $ git clone git://git.denx.de/u-boot-spi.git >> $ cd u-boot-spi >> $ git checkout -b spi-nor origin/spi-nor > > I see quite a large rodata increase at this commit. Is it necessary? If ie the case then we need to revert the vendor configs w/o add them into CONFIG_SPI_NOR_MISC. > > 67: configs: Use CONFIG_SPI_NOR_MISC >arm: (for 1/1 boards) all +2434.0 bss +56.0 rodata +1994.0 > text +384.0 > > There are also bisectability problems (build errors for some commits) > - e.g. chromebook_jerry. Did you pick u-boot-spi/spi-nor? thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Jagan, On 14 February 2016 at 13:46, Jagan Tekiwrote: > Compared to previous patch series this series adds spi-nor > core with spi-nor controller drivers are of "mtd uclass" > > This is whole series for all spi-nor related changes, and while > series tested on spansion spi-nor chip. > > Know issue: > - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. > > Why this framework: > > Some of the SPI device drivers at drivers/spi not a real > spi controllers, Unlike normal/generic SPI controllers they > operates only with SPI-NOR flash devices. these were technically > termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c > > The problem with these were resides at drivers/spi is entire > SPI layer becomes SPI-NOR flash oriented which is absolutely > a wrong indication where SPI layer getting effected more with > flash operations - So this SPI-NOR core will resolve this issue > by separating all SPI-NOR flash operations from spi layer and > creats a generic layer called SPI-NOR core which can be used to > interact SPI-NOR to SPI driver interface layer and the SPI-NOR > controller driver. The idea is taken from Linux spi-nor framework. > > Before SPI-NOR: > > --- > cmd/sf.c > --- > spi_flash.c > --- > sf_probe.c > --- > spi-uclass > --- > spi drivers > --- > SPI NOR chip > --- > > After SPI-NOR: > > -- > cmd/sf.c > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > SPI-NOR with MTD: > > -- > cmd/sf.c > -- > MTD core > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > drivers/mtd/spi-nor/spi-nor.c: spi-nor core > drivers/mtd/spi-nor/m25p80.c: mtd uclass driver > which is an interface layer b/w spi-nor core drivers/spi > drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) > > Changes for v6: > - Fixed git bisectable issues, with buildman. > - Fixed spi-nor compilation issues > - newly designed changes. > > Changes for v5: > - newly designed changes > > Testing: > $ git clone git://git.denx.de/u-boot-spi.git > $ cd u-boot-spi > $ git checkout -b spi-nor origin/spi-nor I see quite a large rodata increase at this commit. Is it necessary? 67: configs: Use CONFIG_SPI_NOR_MISC arm: (for 1/1 boards) all +2434.0 bss +56.0 rodata +1994.0 text +384.0 There are also bisectability problems (build errors for some commits) - e.g. chromebook_jerry. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Jagan, On Wed, Feb 17, 2016 at 3:38 PM, Jagan Tekiwrote: > Hi Bin, > > On 17 February 2016 at 13:07, Jagan Teki wrote: >> Hi Bin, >> >> On 17 February 2016 at 10:52, Bin Meng wrote: >>> Hi Jagan, >>> >>> On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: On 15 February 2016 at 02:16, Jagan Teki wrote: > Compared to previous patch series this series adds spi-nor > core with spi-nor controller drivers are of "mtd uclass" > > This is whole series for all spi-nor related changes, and while > series tested on spansion spi-nor chip. > > Know issue: > - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. > > Why this framework: > > Some of the SPI device drivers at drivers/spi not a real > spi controllers, Unlike normal/generic SPI controllers they > operates only with SPI-NOR flash devices. these were technically > termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c > > The problem with these were resides at drivers/spi is entire > SPI layer becomes SPI-NOR flash oriented which is absolutely > a wrong indication where SPI layer getting effected more with > flash operations - So this SPI-NOR core will resolve this issue > by separating all SPI-NOR flash operations from spi layer and > creats a generic layer called SPI-NOR core which can be used to > interact SPI-NOR to SPI driver interface layer and the SPI-NOR > controller driver. The idea is taken from Linux spi-nor framework. > > Before SPI-NOR: > > --- > cmd/sf.c > --- > spi_flash.c > --- > sf_probe.c > --- > spi-uclass > --- > spi drivers > --- > SPI NOR chip > --- > > After SPI-NOR: > > -- > cmd/sf.c > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > SPI-NOR with MTD: > > -- > cmd/sf.c > -- > MTD core > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > drivers/mtd/spi-nor/spi-nor.c: spi-nor core > drivers/mtd/spi-nor/m25p80.c: mtd uclass driver > which is an interface layer b/w spi-nor core drivers/spi > drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) Tested both DM and non-DM models Tested-by: Jagan Teki >>> >>> My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to >>> the SPI flash correctly, however after "reset" U-Boot still shows: *** >>> Warning - bad CRC, using default environment >>> >>> spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 >>> KiB, total 2 MiB >>> *** Warning - bad CRC, using default environment >>> >>> Anything wrong? >> >> > > I'm not getting the warning, after saveenv. > > DRAM: ECC disabled 1 GiB > MMC: > spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 > KiB, total 16 MiB > In:serial@e0001000 > Out: serial@e0001000 > Err: serial@e0001000 > Model: Zynq MicroZED Board > Tested on another x86 board, still see the 'bad CRC' warning, log below: U-Boot 2016.03-rc1-00254-gaba43ff (Feb 17 2016 - 17:03:54 +0800) CPU: x86, vendor Intel, device 590h DRAM: 256 MiB MMC: Quark SDHCI: 0 spi-nor: detected w25q64 with page size 256 Bytes, erase size 4 KiB, total 8 MiB *** Warning - bad CRC, using default environment Model: Intel Galileo Net: Warning: eth_designware#0 (eth0) using random MAC address - 5a:58:ba:e9:22:fb eth0: eth_designware#0 Warning: eth_designware#1 (eth1) using random MAC address - c6:a3:69:ff:b7:2e , eth1: eth_designware#1 Hit any key to stop autoboot: 0 => saveenv Saving Environment to SPI Flash... Erasing SPI flash...Writing to SPI flash...done => reset resetting ... U-Boot 2016.03-rc1-00254-gaba43ff (Feb 17 2016 - 17:03:54 +0800) CPU: x86, vendor Intel, device 590h DRAM: 256 MiB MMC: Quark SDHCI: 0 spi-nor: detected w25q64 with page size 256 Bytes, erase size 4 KiB, total 8 MiB *** Warning - bad CRC, using default environment
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Bin, On 17 February 2016 at 10:57, Bin Mengwrote: > On Wed, Feb 17, 2016 at 1:22 PM, Bin Meng wrote: >> Hi Jagan, >> >> On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: >>> On 15 February 2016 at 02:16, Jagan Teki wrote: Compared to previous patch series this series adds spi-nor core with spi-nor controller drivers are of "mtd uclass" This is whole series for all spi-nor related changes, and while series tested on spansion spi-nor chip. Know issue: - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. Why this framework: Some of the SPI device drivers at drivers/spi not a real spi controllers, Unlike normal/generic SPI controllers they operates only with SPI-NOR flash devices. these were technically termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c The problem with these were resides at drivers/spi is entire SPI layer becomes SPI-NOR flash oriented which is absolutely a wrong indication where SPI layer getting effected more with flash operations - So this SPI-NOR core will resolve this issue by separating all SPI-NOR flash operations from spi layer and creats a generic layer called SPI-NOR core which can be used to interact SPI-NOR to SPI driver interface layer and the SPI-NOR controller driver. The idea is taken from Linux spi-nor framework. Before SPI-NOR: --- cmd/sf.c --- spi_flash.c --- sf_probe.c --- spi-uclass --- spi drivers --- SPI NOR chip --- After SPI-NOR: -- cmd/sf.c -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- SPI-NOR with MTD: -- cmd/sf.c -- MTD core -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- drivers/mtd/spi-nor/spi-nor.c: spi-nor core drivers/mtd/spi-nor/m25p80.c: mtd uclass driver which is an interface layer b/w spi-nor core drivers/spi drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >>> >>> Tested both DM and non-DM models >>> >>> Tested-by: Jagan Teki >> >> My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to >> the SPI flash correctly, however after "reset" U-Boot still shows: *** >> Warning - bad CRC, using default environment >> >> spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 >> KiB, total 2 MiB >> *** Warning - bad CRC, using default environment >> >> Anything wrong? >> > > Another testing on Intel Galileo shows that: it does NOT build for galileo. > > arch/x86/lib/built-in.o: In function `mrccache_update': > arch/x86/lib/mrccache.c:142: undefined reference to `spi_flash_erase_dm' > arch/x86/lib/mrccache.c:153: undefined reference to `spi_flash_write_dm' > > Did you run buildman for your whole series? Can you try the u-boot-spi/spi-nor tree again, I have fixed with the patch. BTW - I couldn't get any build error with buildman without the fix [1], am I missing anything? [1] http://paste.ubuntu.com/15099249/ thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Bin, On 17 February 2016 at 13:07, Jagan Tekiwrote: > Hi Bin, > > On 17 February 2016 at 10:52, Bin Meng wrote: >> Hi Jagan, >> >> On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: >>> On 15 February 2016 at 02:16, Jagan Teki wrote: Compared to previous patch series this series adds spi-nor core with spi-nor controller drivers are of "mtd uclass" This is whole series for all spi-nor related changes, and while series tested on spansion spi-nor chip. Know issue: - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. Why this framework: Some of the SPI device drivers at drivers/spi not a real spi controllers, Unlike normal/generic SPI controllers they operates only with SPI-NOR flash devices. these were technically termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c The problem with these were resides at drivers/spi is entire SPI layer becomes SPI-NOR flash oriented which is absolutely a wrong indication where SPI layer getting effected more with flash operations - So this SPI-NOR core will resolve this issue by separating all SPI-NOR flash operations from spi layer and creats a generic layer called SPI-NOR core which can be used to interact SPI-NOR to SPI driver interface layer and the SPI-NOR controller driver. The idea is taken from Linux spi-nor framework. Before SPI-NOR: --- cmd/sf.c --- spi_flash.c --- sf_probe.c --- spi-uclass --- spi drivers --- SPI NOR chip --- After SPI-NOR: -- cmd/sf.c -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- SPI-NOR with MTD: -- cmd/sf.c -- MTD core -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- drivers/mtd/spi-nor/spi-nor.c: spi-nor core drivers/mtd/spi-nor/m25p80.c: mtd uclass driver which is an interface layer b/w spi-nor core drivers/spi drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >>> >>> Tested both DM and non-DM models >>> >>> Tested-by: Jagan Teki >> >> My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to >> the SPI flash correctly, however after "reset" U-Boot still shows: *** >> Warning - bad CRC, using default environment >> >> spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 >> KiB, total 2 MiB >> *** Warning - bad CRC, using default environment >> >> Anything wrong? > > I'm not getting the warning, after saveenv. DRAM: ECC disabled 1 GiB MMC: spi-nor: detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB In:serial@e0001000 Out: serial@e0001000 Err: serial@e0001000 Model: Zynq MicroZED Board thanks! -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Bin, On 17 February 2016 at 10:52, Bin Mengwrote: > Hi Jagan, > > On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: >> On 15 February 2016 at 02:16, Jagan Teki wrote: >>> Compared to previous patch series this series adds spi-nor >>> core with spi-nor controller drivers are of "mtd uclass" >>> >>> This is whole series for all spi-nor related changes, and while >>> series tested on spansion spi-nor chip. >>> >>> Know issue: >>> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >>> >>> Why this framework: >>> >>> Some of the SPI device drivers at drivers/spi not a real >>> spi controllers, Unlike normal/generic SPI controllers they >>> operates only with SPI-NOR flash devices. these were technically >>> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >>> >>> The problem with these were resides at drivers/spi is entire >>> SPI layer becomes SPI-NOR flash oriented which is absolutely >>> a wrong indication where SPI layer getting effected more with >>> flash operations - So this SPI-NOR core will resolve this issue >>> by separating all SPI-NOR flash operations from spi layer and >>> creats a generic layer called SPI-NOR core which can be used to >>> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >>> controller driver. The idea is taken from Linux spi-nor framework. >>> >>> Before SPI-NOR: >>> >>> --- >>> cmd/sf.c >>> --- >>> spi_flash.c >>> --- >>> sf_probe.c >>> --- >>> spi-uclass >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> After SPI-NOR: >>> >>> -- >>> cmd/sf.c >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> SPI-NOR with MTD: >>> >>> -- >>> cmd/sf.c >>> -- >>> MTD core >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >>> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >>> which is an interface layer b/w spi-nor core drivers/spi >>> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Tested both DM and non-DM models >> >> Tested-by: Jagan Teki > > My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to > the SPI flash correctly, however after "reset" U-Boot still shows: *** > Warning - bad CRC, using default environment > > spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 > KiB, total 2 MiB > *** Warning - bad CRC, using default environment > > Anything wrong? I'm not getting the warning -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 17 February 2016 at 10:57, Bin Mengwrote: > On Wed, Feb 17, 2016 at 1:22 PM, Bin Meng wrote: >> Hi Jagan, >> >> On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: >>> On 15 February 2016 at 02:16, Jagan Teki wrote: Compared to previous patch series this series adds spi-nor core with spi-nor controller drivers are of "mtd uclass" This is whole series for all spi-nor related changes, and while series tested on spansion spi-nor chip. Know issue: - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. Why this framework: Some of the SPI device drivers at drivers/spi not a real spi controllers, Unlike normal/generic SPI controllers they operates only with SPI-NOR flash devices. these were technically termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c The problem with these were resides at drivers/spi is entire SPI layer becomes SPI-NOR flash oriented which is absolutely a wrong indication where SPI layer getting effected more with flash operations - So this SPI-NOR core will resolve this issue by separating all SPI-NOR flash operations from spi layer and creats a generic layer called SPI-NOR core which can be used to interact SPI-NOR to SPI driver interface layer and the SPI-NOR controller driver. The idea is taken from Linux spi-nor framework. Before SPI-NOR: --- cmd/sf.c --- spi_flash.c --- sf_probe.c --- spi-uclass --- spi drivers --- SPI NOR chip --- After SPI-NOR: -- cmd/sf.c -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- SPI-NOR with MTD: -- cmd/sf.c -- MTD core -- spi-nor.c --- m25p80.cspi nor drivers --- spi-uclass SPI NOR chip --- spi drivers --- SPI NOR chip --- drivers/mtd/spi-nor/spi-nor.c: spi-nor core drivers/mtd/spi-nor/m25p80.c: mtd uclass driver which is an interface layer b/w spi-nor core drivers/spi drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >>> >>> Tested both DM and non-DM models >>> >>> Tested-by: Jagan Teki >> >> My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to >> the SPI flash correctly, however after "reset" U-Boot still shows: *** >> Warning - bad CRC, using default environment >> >> spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 >> KiB, total 2 MiB >> *** Warning - bad CRC, using default environment >> >> Anything wrong? >> > > Another testing on Intel Galileo shows that: it does NOT build for galileo. > > arch/x86/lib/built-in.o: In function `mrccache_update': > arch/x86/lib/mrccache.c:142: undefined reference to `spi_flash_erase_dm' > arch/x86/lib/mrccache.c:153: undefined reference to `spi_flash_write_dm' > > Did you run buildman for your whole series? Yes this is the known issues, I mentioned on the cover letter. we need to fix this one. -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On Wed, Feb 17, 2016 at 1:22 PM, Bin Mengwrote: > Hi Jagan, > > On Wed, Feb 17, 2016 at 3:47 AM, Jagan Teki wrote: >> On 15 February 2016 at 02:16, Jagan Teki wrote: >>> Compared to previous patch series this series adds spi-nor >>> core with spi-nor controller drivers are of "mtd uclass" >>> >>> This is whole series for all spi-nor related changes, and while >>> series tested on spansion spi-nor chip. >>> >>> Know issue: >>> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >>> >>> Why this framework: >>> >>> Some of the SPI device drivers at drivers/spi not a real >>> spi controllers, Unlike normal/generic SPI controllers they >>> operates only with SPI-NOR flash devices. these were technically >>> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >>> >>> The problem with these were resides at drivers/spi is entire >>> SPI layer becomes SPI-NOR flash oriented which is absolutely >>> a wrong indication where SPI layer getting effected more with >>> flash operations - So this SPI-NOR core will resolve this issue >>> by separating all SPI-NOR flash operations from spi layer and >>> creats a generic layer called SPI-NOR core which can be used to >>> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >>> controller driver. The idea is taken from Linux spi-nor framework. >>> >>> Before SPI-NOR: >>> >>> --- >>> cmd/sf.c >>> --- >>> spi_flash.c >>> --- >>> sf_probe.c >>> --- >>> spi-uclass >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> After SPI-NOR: >>> >>> -- >>> cmd/sf.c >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> SPI-NOR with MTD: >>> >>> -- >>> cmd/sf.c >>> -- >>> MTD core >>> -- >>> spi-nor.c >>> --- >>> m25p80.cspi nor drivers >>> --- >>> spi-uclass SPI NOR chip >>> --- >>> spi drivers >>> --- >>> SPI NOR chip >>> --- >>> >>> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >>> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >>> which is an interface layer b/w spi-nor core drivers/spi >>> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) >> >> Tested both DM and non-DM models >> >> Tested-by: Jagan Teki > > My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to > the SPI flash correctly, however after "reset" U-Boot still shows: *** > Warning - bad CRC, using default environment > > spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 > KiB, total 2 MiB > *** Warning - bad CRC, using default environment > > Anything wrong? > Another testing on Intel Galileo shows that: it does NOT build for galileo. arch/x86/lib/built-in.o: In function `mrccache_update': arch/x86/lib/mrccache.c:142: undefined reference to `spi_flash_erase_dm' arch/x86/lib/mrccache.c:153: undefined reference to `spi_flash_write_dm' Did you run buildman for your whole series? Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
Hi Jagan, On Wed, Feb 17, 2016 at 3:47 AM, Jagan Tekiwrote: > On 15 February 2016 at 02:16, Jagan Teki wrote: >> Compared to previous patch series this series adds spi-nor >> core with spi-nor controller drivers are of "mtd uclass" >> >> This is whole series for all spi-nor related changes, and while >> series tested on spansion spi-nor chip. >> >> Know issue: >> - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. >> >> Why this framework: >> >> Some of the SPI device drivers at drivers/spi not a real >> spi controllers, Unlike normal/generic SPI controllers they >> operates only with SPI-NOR flash devices. these were technically >> termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c >> >> The problem with these were resides at drivers/spi is entire >> SPI layer becomes SPI-NOR flash oriented which is absolutely >> a wrong indication where SPI layer getting effected more with >> flash operations - So this SPI-NOR core will resolve this issue >> by separating all SPI-NOR flash operations from spi layer and >> creats a generic layer called SPI-NOR core which can be used to >> interact SPI-NOR to SPI driver interface layer and the SPI-NOR >> controller driver. The idea is taken from Linux spi-nor framework. >> >> Before SPI-NOR: >> >> --- >> cmd/sf.c >> --- >> spi_flash.c >> --- >> sf_probe.c >> --- >> spi-uclass >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> After SPI-NOR: >> >> -- >> cmd/sf.c >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> SPI-NOR with MTD: >> >> -- >> cmd/sf.c >> -- >> MTD core >> -- >> spi-nor.c >> --- >> m25p80.cspi nor drivers >> --- >> spi-uclass SPI NOR chip >> --- >> spi drivers >> --- >> SPI NOR chip >> --- >> >> drivers/mtd/spi-nor/spi-nor.c: spi-nor core >> drivers/mtd/spi-nor/m25p80.c: mtd uclass driver >> which is an interface layer b/w spi-nor core drivers/spi >> drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) > > Tested both DM and non-DM models > > Tested-by: Jagan Teki My test shows on Intel Crown Bay, ''saveenv" does write U-Boot env to the SPI flash correctly, however after "reset" U-Boot still shows: *** Warning - bad CRC, using default environment spi-nor: detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2 MiB *** Warning - bad CRC, using default environment Anything wrong? Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
On 15 February 2016 at 02:16, Jagan Tekiwrote: > Compared to previous patch series this series adds spi-nor > core with spi-nor controller drivers are of "mtd uclass" > > This is whole series for all spi-nor related changes, and while > series tested on spansion spi-nor chip. > > Know issue: > - arch/x86/lib/mrccache.c uses dm_spi_flash_ops, this need to fix. > > Why this framework: > > Some of the SPI device drivers at drivers/spi not a real > spi controllers, Unlike normal/generic SPI controllers they > operates only with SPI-NOR flash devices. these were technically > termed as SPI-NOR controllers, Ex: drivers/spi/fsl_qspi.c > > The problem with these were resides at drivers/spi is entire > SPI layer becomes SPI-NOR flash oriented which is absolutely > a wrong indication where SPI layer getting effected more with > flash operations - So this SPI-NOR core will resolve this issue > by separating all SPI-NOR flash operations from spi layer and > creats a generic layer called SPI-NOR core which can be used to > interact SPI-NOR to SPI driver interface layer and the SPI-NOR > controller driver. The idea is taken from Linux spi-nor framework. > > Before SPI-NOR: > > --- > cmd/sf.c > --- > spi_flash.c > --- > sf_probe.c > --- > spi-uclass > --- > spi drivers > --- > SPI NOR chip > --- > > After SPI-NOR: > > -- > cmd/sf.c > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > SPI-NOR with MTD: > > -- > cmd/sf.c > -- > MTD core > -- > spi-nor.c > --- > m25p80.cspi nor drivers > --- > spi-uclass SPI NOR chip > --- > spi drivers > --- > SPI NOR chip > --- > > drivers/mtd/spi-nor/spi-nor.c: spi-nor core > drivers/mtd/spi-nor/m25p80.c: mtd uclass driver > which is an interface layer b/w spi-nor core drivers/spi > drivers/mtd/spi-nor/fsl_qspi.c: spi-nor controller driver(mtd uclass) Tested both DM and non-DM models Tested-by: Jagan Teki -- Jagan. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot