Message ID | 20190820065938.20722-1-xiaowei.bao@nxp.com |
---|---|
State | Superseded |
Delegated to: | Prabhakar Kushwaha |
Headers | show |
Series | [U-Boot,v5,1/5] spl: dm: disable SPI DM flash for non-DM SPL | expand |
Hi Xiaowei, > From: Chuanhua Han <chuanhua.han@nxp.com> > > This patch solves the problem that spiboot cannot be performed in > non-DM SPL. I've posted recently a set of patches to move setting of DM_SPI_FLASH to Kconfig: https://patchwork.ozlabs.org/cover/1146494/ Please rebase your work on top of it. > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > --- > Changes in v5: > - No change. > Changes in v4: > - No change. > Changes in v3: > - Add a cover-letter for this patch set. > Changes in v2: > - No change. > > include/config_uncmd_spl.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h > index c2f9735..da94b3d 100644 > --- a/include/config_uncmd_spl.h > +++ b/include/config_uncmd_spl.h > @@ -15,6 +15,7 @@ > #undef CONFIG_DM_GPIO > #undef CONFIG_DM_I2C > #undef CONFIG_DM_SPI > +#undef CONFIG_DM_SPI_FLASH > #endif > > #undef CONFIG_DM_WARN Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
> -----Original Message----- > From: Lukasz Majewski <lukma@denx.de> > Sent: 2019年8月20日 15:14 > To: Xiaowei Bao <xiaowei.bao@nxp.com> > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > Pan <jiafei.pan@nxp.com>; Pan Jiafei <Jiafei.Pan@freescale.com>; Chuanhua > Han <chuanhua.han@nxp.com> > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > non-DM SPL > > Hi Xiaowei, > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > This patch solves the problem that spiboot cannot be performed in > > non-DM SPL. > > I've posted recently a set of patches to move setting of DM_SPI_FLASH to > Kconfig: > https://patchwork.ozlabs.org/cover/1146494/ > > Please rebase your work on top of it. Did this set of patches merge to the u-boot mainline? Do I need to depend on your patches? If yes, please provide the full patches link, I can't see the contents of this set of patches. > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > --- > > Changes in v5: > > - No change. > > Changes in v4: > > - No change. > > Changes in v3: > > - Add a cover-letter for this patch set. > > Changes in v2: > > - No change. > > > > include/config_uncmd_spl.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h > > index c2f9735..da94b3d 100644 > > --- a/include/config_uncmd_spl.h > > +++ b/include/config_uncmd_spl.h > > @@ -15,6 +15,7 @@ > > #undef CONFIG_DM_GPIO > > #undef CONFIG_DM_I2C > > #undef CONFIG_DM_SPI > > +#undef CONFIG_DM_SPI_FLASH > > #endif > > > > #undef CONFIG_DM_WARN > > > > Best regards, > > Lukasz Majewski > > -- > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > lukma@denx.de
On Tue, 20 Aug 2019 07:27:39 +0000 Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > -----Original Message----- > > From: Lukasz Majewski <lukma@denx.de> > > Sent: 2019年8月20日 15:14 > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > Pan <jiafei.pan@nxp.com>; Pan Jiafei <Jiafei.Pan@freescale.com>; > > Chuanhua Han <chuanhua.han@nxp.com> > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > for non-DM SPL > > > > Hi Xiaowei, > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > This patch solves the problem that spiboot cannot be performed in > > > non-DM SPL. > > > > I've posted recently a set of patches to move setting of > > DM_SPI_FLASH to Kconfig: > > https://patchwork.ozlabs.org/cover/1146494/ > > > > Please rebase your work on top of it. > Did this set of patches merge to the u-boot mainline? Those patches were not yet accepted to mainline. > Do I need to > depend on your patches? It would be best to avoid duplicating the effort. > If yes, please provide the full patches link, > I can't see the contents of this set of patches. When you open the link: https://patchwork.ozlabs.org/cover/1146494/ On top left you have: "Related" -> "show" After clicking on it you will see the list of patches. You may also want to use "Series" on top right and download the whole patch series. > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > --- > > > Changes in v5: > > > - No change. > > > Changes in v4: > > > - No change. > > > Changes in v3: > > > - Add a cover-letter for this patch set. > > > Changes in v2: > > > - No change. > > > > > > include/config_uncmd_spl.h | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/include/config_uncmd_spl.h > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d 100644 > > > --- a/include/config_uncmd_spl.h > > > +++ b/include/config_uncmd_spl.h > > > @@ -15,6 +15,7 @@ > > > #undef CONFIG_DM_GPIO > > > #undef CONFIG_DM_I2C > > > #undef CONFIG_DM_SPI > > > +#undef CONFIG_DM_SPI_FLASH > > > #endif > > > > > > #undef CONFIG_DM_WARN > > > > > > > > Best regards, > > > > Lukasz Majewski > > > > -- > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > lukma@denx.de Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
> -----Original Message----- > From: Lukasz Majewski <lukma@denx.de> > Sent: 2019年8月20日 15:43 > To: Xiaowei Bao <xiaowei.bao@nxp.com> > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > Pan <jiafei.pan@nxp.com>; Pan Jiafei <Jiafei.Pan@freescale.com>; Chuanhua > Han <chuanhua.han@nxp.com> > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > non-DM SPL > > On Tue, 20 Aug 2019 07:27:39 +0000 > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > -----Original Message----- > > > From: Lukasz Majewski <lukma@denx.de> > > > Sent: 2019年8月20日 15:14 > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou > Liu > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > > Pan <jiafei.pan@nxp.com>; Pan Jiafei <Jiafei.Pan@freescale.com>; > > > Chuanhua Han <chuanhua.han@nxp.com> > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > > for non-DM SPL > > > > > > Hi Xiaowei, > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > This patch solves the problem that spiboot cannot be performed in > > > > non-DM SPL. > > > > > > I've posted recently a set of patches to move setting of > > > DM_SPI_FLASH to Kconfig: > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > Please rebase your work on top of it. > > Did this set of patches merge to the u-boot mainline? > > Those patches were not yet accepted to mainline. > > > Do I need to > > depend on your patches? > > It would be best to avoid duplicating the effort. > > > If yes, please provide the full patches link, I can't see the contents > > of this set of patches. > > When you open the link: > https://patchwork.ozlabs.org/cover/1146494/ > > On top left you have: > "Related" -> "show" > > After clicking on it you will see the list of patches. > > You may also want to use "Series" on top right and download the whole patch > series. I have check these set of patches, it don't impact my patches, my patches implemented the ESPI DM driver of POWERPC. > > > > > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > > --- > > > > Changes in v5: > > > > - No change. > > > > Changes in v4: > > > > - No change. > > > > Changes in v3: > > > > - Add a cover-letter for this patch set. > > > > Changes in v2: > > > > - No change. > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d 100644 > > > > --- a/include/config_uncmd_spl.h > > > > +++ b/include/config_uncmd_spl.h > > > > @@ -15,6 +15,7 @@ > > > > #undef CONFIG_DM_GPIO > > > > #undef CONFIG_DM_I2C > > > > #undef CONFIG_DM_SPI > > > > +#undef CONFIG_DM_SPI_FLASH > > > > #endif > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > Best regards, > > > > > > Lukasz Majewski > > > > > > -- > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > > lukma@denx.de > > > > Best regards, > > Lukasz Majewski > > -- > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > lukma@denx.de
On Tue, 20 Aug 2019 07:51:18 +0000 Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > -----Original Message----- > > From: Lukasz Majewski <lukma@denx.de> > > Sent: 2019年8月20日 15:43 > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > Pan <jiafei.pan@nxp.com>; Pan Jiafei <Jiafei.Pan@freescale.com>; > > Chuanhua Han <chuanhua.han@nxp.com> > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > for non-DM SPL > > > > On Tue, 20 Aug 2019 07:27:39 +0000 > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > -----Original Message----- > > > > From: Lukasz Majewski <lukma@denx.de> > > > > Sent: 2019年8月20日 15:14 > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > > Shengzhou > > Liu > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > > Jiafei Pan <jiafei.pan@nxp.com>; Pan Jiafei > > > > <Jiafei.Pan@freescale.com>; Chuanhua Han <chuanhua.han@nxp.com> > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > flash for non-DM SPL > > > > > > > > Hi Xiaowei, > > > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > This patch solves the problem that spiboot cannot be > > > > > performed in non-DM SPL. > > > > > > > > I've posted recently a set of patches to move setting of > > > > DM_SPI_FLASH to Kconfig: > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > Please rebase your work on top of it. > > > Did this set of patches merge to the u-boot mainline? > > > > Those patches were not yet accepted to mainline. > > > > > Do I need to > > > depend on your patches? > > > > It would be best to avoid duplicating the effort. > > > > > If yes, please provide the full patches link, I can't see the > > > contents of this set of patches. > > > > When you open the link: > > https://patchwork.ozlabs.org/cover/1146494/ > > > > On top left you have: > > "Related" -> "show" > > > > After clicking on it you will see the list of patches. > > > > You may also want to use "Series" on top right and download the > > whole patch series. > I have check these set of patches, it don't impact my patches, my > patches implemented the ESPI DM driver of POWERPC. But you add: +#undef CONFIG_DM_SPI_FLASH for SPL, Which is problematic as explained in the patch set. > > > > > > > > > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > > > --- > > > > > Changes in v5: > > > > > - No change. > > > > > Changes in v4: > > > > > - No change. > > > > > Changes in v3: > > > > > - Add a cover-letter for this patch set. > > > > > Changes in v2: > > > > > - No change. > > > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d 100644 > > > > > --- a/include/config_uncmd_spl.h > > > > > +++ b/include/config_uncmd_spl.h > > > > > @@ -15,6 +15,7 @@ > > > > > #undef CONFIG_DM_GPIO > > > > > #undef CONFIG_DM_I2C > > > > > #undef CONFIG_DM_SPI > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > #endif > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > > > > > Best regards, > > > > > > > > Lukasz Majewski > > > > > > > > -- > > > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > Best regards, > > > > Lukasz Majewski > > > > -- > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > lukma@denx.de Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
> -----Original Message----- > From: Lukasz Majewski <lukma@denx.de> > Sent: 2019年8月20日 16:20 > To: Xiaowei Bao <xiaowei.bao@nxp.com> > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > non-DM SPL > > On Tue, 20 Aug 2019 07:51:18 +0000 > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > -----Original Message----- > > > From: Lukasz Majewski <lukma@denx.de> > > > Sent: 2019年8月20日 15:43 > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou > Liu > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > > Pan <jiafei.pan@nxp.com>; Pan Jiafei <Jiafei.Pan@freescale.com>; > > > Chuanhua Han <chuanhua.han@nxp.com> > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > > for non-DM SPL > > > > > > On Tue, 20 Aug 2019 07:27:39 +0000 > > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > > > -----Original Message----- > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > Sent: 2019年8月20日 15:14 > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > Shengzhou > > > Liu > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > > > Jiafei Pan <jiafei.pan@nxp.com>; Pan Jiafei > > > > > <Jiafei.Pan@freescale.com>; Chuanhua Han > <chuanhua.han@nxp.com> > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > > flash for non-DM SPL > > > > > > > > > > Hi Xiaowei, > > > > > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > > > This patch solves the problem that spiboot cannot be performed > > > > > > in non-DM SPL. > > > > > > > > > > I've posted recently a set of patches to move setting of > > > > > DM_SPI_FLASH to Kconfig: > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > Please rebase your work on top of it. > > > > Did this set of patches merge to the u-boot mainline? > > > > > > Those patches were not yet accepted to mainline. > > > > > > > Do I need to > > > > depend on your patches? > > > > > > It would be best to avoid duplicating the effort. > > > > > > > If yes, please provide the full patches link, I can't see the > > > > contents of this set of patches. > > > > > > When you open the link: > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > On top left you have: > > > "Related" -> "show" > > > > > > After clicking on it you will see the list of patches. > > > > > > You may also want to use "Series" on top right and download the > > > whole patch series. > > I have check these set of patches, it don't impact my patches, my > > patches implemented the ESPI DM driver of POWERPC. > > But you add: > > +#undef CONFIG_DM_SPI_FLASH > > for SPL, Which is problematic as explained in the patch set. Can I modify the patches like this? diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h index da94b3d..c2f9735 100644 --- a/include/config_uncmd_spl.h +++ b/include/config_uncmd_spl.h @@ -15,7 +15,6 @@ #undef CONFIG_DM_GPIO #undef CONFIG_DM_I2C #undef CONFIG_DM_SPI -#undef CONFIG_DM_SPI_FLASH #endif #undef CONFIG_DM_WARN diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h index 98bb334..b45ec4a 100644 --- a/include/configs/T208xQDS.h +++ b/include/configs/T208xQDS.h @@ -10,6 +10,13 @@ #ifndef __T208xQDS_H #define __T208xQDS_H +/* SPI Flash Configs */ +#if defined(CONFIG_SPL_BUILD) +#undef CONFIG_DM_SPI +#undef CONFIG_DM_SPI_FLASH +#undef CONFIG_SPI_FLASH_MTD +#endif + > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > --- > > > > > > Changes in v5: > > > > > > - No change. > > > > > > Changes in v4: > > > > > > - No change. > > > > > > Changes in v3: > > > > > > - Add a cover-letter for this patch set. > > > > > > Changes in v2: > > > > > > - No change. > > > > > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d 100644 > > > > > > --- a/include/config_uncmd_spl.h > > > > > > +++ b/include/config_uncmd_spl.h > > > > > > @@ -15,6 +15,7 @@ > > > > > > #undef CONFIG_DM_GPIO > > > > > > #undef CONFIG_DM_I2C > > > > > > #undef CONFIG_DM_SPI > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > #endif > > > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Lukasz Majewski > > > > > > > > > > -- > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > Wolfgang > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > Best regards, > > > > > > Lukasz Majewski > > > > > > -- > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > > lukma@denx.de > > > > Best regards, > > Lukasz Majewski > > -- > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > lukma@denx.de
On Tue, 20 Aug 2019 09:00:40 +0000 Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > -----Original Message----- > > From: Lukasz Majewski <lukma@denx.de> > > Sent: 2019年8月20日 16:20 > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > for non-DM SPL > > > > On Tue, 20 Aug 2019 07:51:18 +0000 > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > -----Original Message----- > > > > From: Lukasz Majewski <lukma@denx.de> > > > > Sent: 2019年8月20日 15:43 > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > > Shengzhou > > Liu > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > > Jiafei Pan <jiafei.pan@nxp.com>; Pan Jiafei > > > > <Jiafei.Pan@freescale.com>; Chuanhua Han <chuanhua.han@nxp.com> > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > flash for non-DM SPL > > > > > > > > On Tue, 20 Aug 2019 07:27:39 +0000 > > > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > -----Original Message----- > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > Sent: 2019年8月20日 15:14 > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > Shengzhou > > > > Liu > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; Pan > > > > > > Jiafei <Jiafei.Pan@freescale.com>; Chuanhua Han > > <chuanhua.han@nxp.com> > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > > > flash for non-DM SPL > > > > > > > > > > > > Hi Xiaowei, > > > > > > > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > > > > > This patch solves the problem that spiboot cannot be > > > > > > > performed in non-DM SPL. > > > > > > > > > > > > I've posted recently a set of patches to move setting of > > > > > > DM_SPI_FLASH to Kconfig: > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > Please rebase your work on top of it. > > > > > Did this set of patches merge to the u-boot mainline? > > > > > > > > Those patches were not yet accepted to mainline. > > > > > > > > > Do I need to > > > > > depend on your patches? > > > > > > > > It would be best to avoid duplicating the effort. > > > > > > > > > If yes, please provide the full patches link, I can't see the > > > > > contents of this set of patches. > > > > > > > > When you open the link: > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > On top left you have: > > > > "Related" -> "show" > > > > > > > > After clicking on it you will see the list of patches. > > > > > > > > You may also want to use "Series" on top right and download the > > > > whole patch series. > > > I have check these set of patches, it don't impact my patches, my > > > patches implemented the ESPI DM driver of POWERPC. > > > > But you add: > > > > +#undef CONFIG_DM_SPI_FLASH > > > > for SPL, Which is problematic as explained in the patch set. > Can I modify the patches like this? > diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h > index da94b3d..c2f9735 100644 > --- a/include/config_uncmd_spl.h > +++ b/include/config_uncmd_spl.h > @@ -15,7 +15,6 @@ > #undef CONFIG_DM_GPIO > #undef CONFIG_DM_I2C > #undef CONFIG_DM_SPI > -#undef CONFIG_DM_SPI_FLASH > #endif > > #undef CONFIG_DM_WARN > diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h > index 98bb334..b45ec4a 100644 > --- a/include/configs/T208xQDS.h > +++ b/include/configs/T208xQDS.h > @@ -10,6 +10,13 @@ > #ifndef __T208xQDS_H > #define __T208xQDS_H > > +/* SPI Flash Configs */ > +#if defined(CONFIG_SPL_BUILD) > +#undef CONFIG_DM_SPI > +#undef CONFIG_DM_SPI_FLASH > +#undef CONFIG_SPI_FLASH_MTD > +#endif The whole point is to avoid adding the above code. The rationale for this can be found in the commit message: https://patchwork.ozlabs.org/patch/1146375/ > + > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > > > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > --- > > > > > > > Changes in v5: > > > > > > > - No change. > > > > > > > Changes in v4: > > > > > > > - No change. > > > > > > > Changes in v3: > > > > > > > - Add a cover-letter for this patch set. > > > > > > > Changes in v2: > > > > > > > - No change. > > > > > > > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d 100644 > > > > > > > --- a/include/config_uncmd_spl.h > > > > > > > +++ b/include/config_uncmd_spl.h > > > > > > > @@ -15,6 +15,7 @@ > > > > > > > #undef CONFIG_DM_GPIO > > > > > > > #undef CONFIG_DM_I2C > > > > > > > #undef CONFIG_DM_SPI > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > #endif > > > > > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > -- > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > Wolfgang > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > Best regards, > > > > > > > > Lukasz Majewski > > > > > > > > -- > > > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > Best regards, > > > > Lukasz Majewski > > > > -- > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > lukma@denx.de Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
> -----Original Message----- > From: Lukasz Majewski <lukma@denx.de> > Sent: 2019年8月20日 17:50 > To: Xiaowei Bao <xiaowei.bao@nxp.com> > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > non-DM SPL > > On Tue, 20 Aug 2019 09:00:40 +0000 > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > -----Original Message----- > > > From: Lukasz Majewski <lukma@denx.de> > > > Sent: 2019年8月20日 16:20 > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou > Liu > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > > for non-DM SPL > > > > > > On Tue, 20 Aug 2019 07:51:18 +0000 > > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > > > -----Original Message----- > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > Sent: 2019年8月20日 15:43 > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > Shengzhou > > > Liu > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > > > Jiafei Pan <jiafei.pan@nxp.com>; Pan Jiafei > > > > > <Jiafei.Pan@freescale.com>; Chuanhua Han > <chuanhua.han@nxp.com> > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > > flash for non-DM SPL > > > > > > > > > > On Tue, 20 Aug 2019 07:27:39 +0000 Xiaowei Bao > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > Sent: 2019年8月20日 15:14 > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > Shengzhou > > > > > Liu > > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; Pan > > > > > > > Jiafei <Jiafei.Pan@freescale.com>; Chuanhua Han > > > <chuanhua.han@nxp.com> > > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > > > > flash for non-DM SPL > > > > > > > > > > > > > > Hi Xiaowei, > > > > > > > > > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > > > > > > > This patch solves the problem that spiboot cannot be > > > > > > > > performed in non-DM SPL. > > > > > > > > > > > > > > I've posted recently a set of patches to move setting of > > > > > > > DM_SPI_FLASH to Kconfig: > > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > > > Please rebase your work on top of it. > > > > > > Did this set of patches merge to the u-boot mainline? > > > > > > > > > > Those patches were not yet accepted to mainline. > > > > > > > > > > > Do I need to > > > > > > depend on your patches? > > > > > > > > > > It would be best to avoid duplicating the effort. > > > > > > > > > > > If yes, please provide the full patches link, I can't see the > > > > > > contents of this set of patches. > > > > > > > > > > When you open the link: > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > On top left you have: > > > > > "Related" -> "show" > > > > > > > > > > After clicking on it you will see the list of patches. > > > > > > > > > > You may also want to use "Series" on top right and download the > > > > > whole patch series. > > > > I have check these set of patches, it don't impact my patches, my > > > > patches implemented the ESPI DM driver of POWERPC. > > > > > > But you add: > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > for SPL, Which is problematic as explained in the patch set. > > Can I modify the patches like this? > > diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h > > index da94b3d..c2f9735 100644 > > --- a/include/config_uncmd_spl.h > > +++ b/include/config_uncmd_spl.h > > @@ -15,7 +15,6 @@ > > #undef CONFIG_DM_GPIO > > #undef CONFIG_DM_I2C > > #undef CONFIG_DM_SPI > > -#undef CONFIG_DM_SPI_FLASH > > #endif > > > > #undef CONFIG_DM_WARN > > diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h > > index 98bb334..b45ec4a 100644 > > --- a/include/configs/T208xQDS.h > > +++ b/include/configs/T208xQDS.h > > @@ -10,6 +10,13 @@ > > #ifndef __T208xQDS_H > > #define __T208xQDS_H > > > > +/* SPI Flash Configs */ > > +#if defined(CONFIG_SPL_BUILD) > > +#undef CONFIG_DM_SPI > > +#undef CONFIG_DM_SPI_FLASH > > +#undef CONFIG_SPI_FLASH_MTD > > +#endif > > The whole point is to avoid adding the above code. > > The rationale for this can be found in the commit message: > https://patchwork.ozlabs.org/patch/1146375/ Hi Lukasz, thanks for your comments, ask a question, I modify my driver like this: diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c index fd5ac97..54be036 100644 --- a/drivers/spi/fsl_espi.c +++ b/drivers/spi/fsl_espi.c @@ -367,6 +367,7 @@ void espi_setup_slave(struct fsl_spi_slave *fsl) * 10), spi_freq);/* Set eSPI BRG clock source */ } #ifndef CONFIG_DM_SPI +#if !CONFIG_IS_ENABLED(DM_SPI) int spi_cs_is_valid(unsigned int bus, unsigned int cs) { diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig index 7a1c580..cf53e54 100644 --- a/configs/T2080QDS_SPIFLASH_defconfig +++ b/configs/T2080QDS_SPIFLASH_defconfig @@ -80,3 +80,5 @@ CONFIG_DM_SPI=y CONFIG_DM_SPI_FLASH=y +CONFIG_SPL_DM_SPI=y +CONFIG_SPL_DM_SPI_FLASH=y When I compile the driver with SPL mode, the DM or non DM mode cod will be compiled together, I think CONFIG_IS_ENABLED(DM_SPI) is 0 or 1, so the DM code or non DM code will be compiled, but not both, this make me confused, do I miss something, could you tell me the reason? Thanks a lot. > > > + > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > > > > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > --- > > > > > > > > Changes in v5: > > > > > > > > - No change. > > > > > > > > Changes in v4: > > > > > > > > - No change. > > > > > > > > Changes in v3: > > > > > > > > - Add a cover-letter for this patch set. > > > > > > > > Changes in v2: > > > > > > > > - No change. > > > > > > > > > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d 100644 > > > > > > > > --- a/include/config_uncmd_spl.h > > > > > > > > +++ b/include/config_uncmd_spl.h > > > > > > > > @@ -15,6 +15,7 @@ > > > > > > > > #undef CONFIG_DM_GPIO > > > > > > > > #undef CONFIG_DM_I2C > > > > > > > > #undef CONFIG_DM_SPI > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > #endif > > > > > > > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > > Wolfgang > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Lukasz Majewski > > > > > > > > > > -- > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > Wolfgang > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > Best regards, > > > > > > Lukasz Majewski > > > > > > -- > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > > lukma@denx.de > > > > Best regards, > > Lukasz Majewski > > -- > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > lukma@denx.de
On Thu, 22 Aug 2019 01:56:48 +0000 Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > -----Original Message----- > > From: Lukasz Majewski <lukma@denx.de> > > Sent: 2019年8月20日 17:50 > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > for non-DM SPL > > > > On Tue, 20 Aug 2019 09:00:40 +0000 > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > -----Original Message----- > > > > From: Lukasz Majewski <lukma@denx.de> > > > > Sent: 2019年8月20日 16:20 > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > > Shengzhou > > Liu > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > > Jiafei Pan <jiafei.pan@nxp.com>; Chuanhua Han > > > > <chuanhua.han@nxp.com> Subject: Re: [U-Boot] [PATCH v5 1/5] > > > > spl: dm: disable SPI DM flash for non-DM SPL > > > > > > > > On Tue, 20 Aug 2019 07:51:18 +0000 > > > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > -----Original Message----- > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > Sent: 2019年8月20日 15:43 > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > Shengzhou > > > > Liu > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; Pan > > > > > > Jiafei <Jiafei.Pan@freescale.com>; Chuanhua Han > > <chuanhua.han@nxp.com> > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > > > flash for non-DM SPL > > > > > > > > > > > > On Tue, 20 Aug 2019 07:27:39 +0000 Xiaowei Bao > > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > > Sent: 2019年8月20日 15:14 > > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > > Shengzhou > > > > > > Liu > > > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; > > > > > > > > Pan Jiafei <Jiafei.Pan@freescale.com>; Chuanhua Han > > > > <chuanhua.han@nxp.com> > > > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable > > > > > > > > SPI DM flash for non-DM SPL > > > > > > > > > > > > > > > > Hi Xiaowei, > > > > > > > > > > > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > > > > > > > > > This patch solves the problem that spiboot cannot be > > > > > > > > > performed in non-DM SPL. > > > > > > > > > > > > > > > > I've posted recently a set of patches to move setting of > > > > > > > > DM_SPI_FLASH to Kconfig: > > > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > > > > > Please rebase your work on top of it. > > > > > > > Did this set of patches merge to the u-boot mainline? > > > > > > > > > > > > Those patches were not yet accepted to mainline. > > > > > > > > > > > > > Do I need to > > > > > > > depend on your patches? > > > > > > > > > > > > It would be best to avoid duplicating the effort. > > > > > > > > > > > > > If yes, please provide the full patches link, I can't see > > > > > > > the contents of this set of patches. > > > > > > > > > > > > When you open the link: > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > On top left you have: > > > > > > "Related" -> "show" > > > > > > > > > > > > After clicking on it you will see the list of patches. > > > > > > > > > > > > You may also want to use "Series" on top right and download > > > > > > the whole patch series. > > > > > I have check these set of patches, it don't impact my > > > > > patches, my patches implemented the ESPI DM driver of > > > > > POWERPC. > > > > > > > > But you add: > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > for SPL, Which is problematic as explained in the patch set. > > > Can I modify the patches like this? > > > diff --git a/include/config_uncmd_spl.h > > > b/include/config_uncmd_spl.h index da94b3d..c2f9735 100644 > > > --- a/include/config_uncmd_spl.h > > > +++ b/include/config_uncmd_spl.h > > > @@ -15,7 +15,6 @@ > > > #undef CONFIG_DM_GPIO > > > #undef CONFIG_DM_I2C > > > #undef CONFIG_DM_SPI > > > -#undef CONFIG_DM_SPI_FLASH > > > #endif > > > > > > #undef CONFIG_DM_WARN > > > diff --git a/include/configs/T208xQDS.h > > > b/include/configs/T208xQDS.h index 98bb334..b45ec4a 100644 > > > --- a/include/configs/T208xQDS.h > > > +++ b/include/configs/T208xQDS.h > > > @@ -10,6 +10,13 @@ > > > #ifndef __T208xQDS_H > > > #define __T208xQDS_H > > > > > > +/* SPI Flash Configs */ > > > +#if defined(CONFIG_SPL_BUILD) > > > +#undef CONFIG_DM_SPI > > > +#undef CONFIG_DM_SPI_FLASH > > > +#undef CONFIG_SPI_FLASH_MTD > > > +#endif > > > > The whole point is to avoid adding the above code. > > > > The rationale for this can be found in the commit message: > > https://patchwork.ozlabs.org/patch/1146375/ > Hi Lukasz, thanks for your comments, ask a question, I modify my > driver like this: diff --git a/drivers/spi/fsl_espi.c > b/drivers/spi/fsl_espi.c index fd5ac97..54be036 100644 > --- a/drivers/spi/fsl_espi.c > +++ b/drivers/spi/fsl_espi.c > @@ -367,6 +367,7 @@ void espi_setup_slave(struct fsl_spi_slave *fsl) > * 10), spi_freq);/* Set eSPI BRG > clock source */ } > > #ifndef CONFIG_DM_SPI > +#if !CONFIG_IS_ENABLED(DM_SPI) > int spi_cs_is_valid(unsigned int bus, unsigned int cs) > { > > diff --git a/configs/T2080QDS_SPIFLASH_defconfig > b/configs/T2080QDS_SPIFLASH_defconfig index 7a1c580..cf53e54 100644 > --- a/configs/T2080QDS_SPIFLASH_defconfig > +++ b/configs/T2080QDS_SPIFLASH_defconfig > @@ -80,3 +80,5 @@ CONFIG_DM_SPI=y > CONFIG_DM_SPI_FLASH=y > +CONFIG_SPL_DM_SPI=y > +CONFIG_SPL_DM_SPI_FLASH=y > > When I compile the driver with SPL mode, the DM or non DM mode cod > will be compiled together, I think CONFIG_IS_ENABLED(DM_SPI) is 0 or > 1, so the DM code or non DM code will be compiled, but not both, this > make me confused, do I miss something, could you tell me the reason? > Thanks a lot. So the CONFIG_IS_ENABLED(FOO) is true if: 1. The CONFIG_FOO is defined in Kconfig files (if it is defined in ./include/configs/<board.h> then CONFIG_IS_ENABLED will return false, which is wrong). 2. The CONFIG_IS_ENABLED(FOO) is true if in Kconfig you have defined CONFIG_FOO 3. CONFIG_IS_ENABLED(FOO) is true if in Kconfig you have defined CONFIG_SPL_FOO So the CONFIG_IS_ENABLED(FOO) shall be used in conjunction with CONFIG_DM_FOO (SPI in your case). > > > > > > + > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > > > > > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > --- > > > > > > > > > Changes in v5: > > > > > > > > > - No change. > > > > > > > > > Changes in v4: > > > > > > > > > - No change. > > > > > > > > > Changes in v3: > > > > > > > > > - Add a cover-letter for this patch set. > > > > > > > > > Changes in v2: > > > > > > > > > - No change. > > > > > > > > > > > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > > > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d > > > > > > > > > 100644 --- a/include/config_uncmd_spl.h > > > > > > > > > +++ b/include/config_uncmd_spl.h > > > > > > > > > @@ -15,6 +15,7 @@ > > > > > > > > > #undef CONFIG_DM_GPIO > > > > > > > > > #undef CONFIG_DM_I2C > > > > > > > > > #undef CONFIG_DM_SPI > > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > > #endif > > > > > > > > > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > > > > > > > > > > > Wolfgang > > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > -- > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > Wolfgang > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > Best regards, > > > > > > > > Lukasz Majewski > > > > > > > > -- > > > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > Best regards, > > > > Lukasz Majewski > > > > -- > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > lukma@denx.de Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
> -----Original Message----- > From: Lukasz Majewski <lukma@denx.de> > Sent: 2019年8月23日 4:48 > To: Xiaowei Bao <xiaowei.bao@nxp.com> > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > non-DM SPL > > On Thu, 22 Aug 2019 01:56:48 +0000 > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > -----Original Message----- > > > From: Lukasz Majewski <lukma@denx.de> > > > Sent: 2019年8月20日 17:50 > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou > Liu > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > > for non-DM SPL > > > > > > On Tue, 20 Aug 2019 09:00:40 +0000 > > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > > > -----Original Message----- > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > Sent: 2019年8月20日 16:20 > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > Shengzhou > > > Liu > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > > > Jiafei Pan <jiafei.pan@nxp.com>; Chuanhua Han > > > > > <chuanhua.han@nxp.com> Subject: Re: [U-Boot] [PATCH v5 1/5] > > > > > spl: dm: disable SPI DM flash for non-DM SPL > > > > > > > > > > On Tue, 20 Aug 2019 07:51:18 +0000 Xiaowei Bao > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > Sent: 2019年8月20日 15:43 > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > Shengzhou > > > > > Liu > > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; Pan > > > > > > > Jiafei <Jiafei.Pan@freescale.com>; Chuanhua Han > > > <chuanhua.han@nxp.com> > > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > > > > flash for non-DM SPL > > > > > > > > > > > > > > On Tue, 20 Aug 2019 07:27:39 +0000 Xiaowei Bao > > > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > > > Sent: 2019年8月20日 15:14 > > > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > > > Shengzhou > > > > > > > Liu > > > > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; > > > > > > > > > Pan Jiafei <Jiafei.Pan@freescale.com>; Chuanhua Han > > > > > <chuanhua.han@nxp.com> > > > > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable > > > > > > > > > SPI DM flash for non-DM SPL > > > > > > > > > > > > > > > > > > Hi Xiaowei, > > > > > > > > > > > > > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > > > > > > > > > > > This patch solves the problem that spiboot cannot be > > > > > > > > > > performed in non-DM SPL. > > > > > > > > > > > > > > > > > > I've posted recently a set of patches to move setting of > > > > > > > > > DM_SPI_FLASH to Kconfig: > > > > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > > > > > > > Please rebase your work on top of it. > > > > > > > > Did this set of patches merge to the u-boot mainline? > > > > > > > > > > > > > > Those patches were not yet accepted to mainline. > > > > > > > > > > > > > > > Do I need to > > > > > > > > depend on your patches? > > > > > > > > > > > > > > It would be best to avoid duplicating the effort. > > > > > > > > > > > > > > > If yes, please provide the full patches link, I can't see > > > > > > > > the contents of this set of patches. > > > > > > > > > > > > > > When you open the link: > > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > > > On top left you have: > > > > > > > "Related" -> "show" > > > > > > > > > > > > > > After clicking on it you will see the list of patches. > > > > > > > > > > > > > > You may also want to use "Series" on top right and download > > > > > > > the whole patch series. > > > > > > I have check these set of patches, it don't impact my patches, > > > > > > my patches implemented the ESPI DM driver of POWERPC. > > > > > > > > > > But you add: > > > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > > > for SPL, Which is problematic as explained in the patch set. > > > > Can I modify the patches like this? > > > > diff --git a/include/config_uncmd_spl.h > > > > b/include/config_uncmd_spl.h index da94b3d..c2f9735 100644 > > > > --- a/include/config_uncmd_spl.h > > > > +++ b/include/config_uncmd_spl.h > > > > @@ -15,7 +15,6 @@ > > > > #undef CONFIG_DM_GPIO > > > > #undef CONFIG_DM_I2C > > > > #undef CONFIG_DM_SPI > > > > -#undef CONFIG_DM_SPI_FLASH > > > > #endif > > > > > > > > #undef CONFIG_DM_WARN > > > > diff --git a/include/configs/T208xQDS.h > > > > b/include/configs/T208xQDS.h index 98bb334..b45ec4a 100644 > > > > --- a/include/configs/T208xQDS.h > > > > +++ b/include/configs/T208xQDS.h > > > > @@ -10,6 +10,13 @@ > > > > #ifndef __T208xQDS_H > > > > #define __T208xQDS_H > > > > > > > > +/* SPI Flash Configs */ > > > > +#if defined(CONFIG_SPL_BUILD) > > > > +#undef CONFIG_DM_SPI > > > > +#undef CONFIG_DM_SPI_FLASH > > > > +#undef CONFIG_SPI_FLASH_MTD > > > > +#endif > > > > > > The whole point is to avoid adding the above code. > > > > > > The rationale for this can be found in the commit message: > > > https://patchwork.ozlabs.org/patch/1146375/ > > Hi Lukasz, thanks for your comments, ask a question, I modify my > > driver like this: diff --git a/drivers/spi/fsl_espi.c > > b/drivers/spi/fsl_espi.c index fd5ac97..54be036 100644 > > --- a/drivers/spi/fsl_espi.c > > +++ b/drivers/spi/fsl_espi.c > > @@ -367,6 +367,7 @@ void espi_setup_slave(struct fsl_spi_slave *fsl) > > * 10), spi_freq);/* Set eSPI BRG > clock > > source */ } > > > > #ifndef CONFIG_DM_SPI > > +#if !CONFIG_IS_ENABLED(DM_SPI) > > int spi_cs_is_valid(unsigned int bus, unsigned int cs) { > > > > diff --git a/configs/T2080QDS_SPIFLASH_defconfig > > b/configs/T2080QDS_SPIFLASH_defconfig index 7a1c580..cf53e54 100644 > > --- a/configs/T2080QDS_SPIFLASH_defconfig > > +++ b/configs/T2080QDS_SPIFLASH_defconfig > > @@ -80,3 +80,5 @@ CONFIG_DM_SPI=y > > CONFIG_DM_SPI_FLASH=y > > +CONFIG_SPL_DM_SPI=y > > +CONFIG_SPL_DM_SPI_FLASH=y > > > > When I compile the driver with SPL mode, the DM or non DM mode cod > > will be compiled together, I think CONFIG_IS_ENABLED(DM_SPI) is 0 or > > 1, so the DM code or non DM code will be compiled, but not both, this > > make me confused, do I miss something, could you tell me the reason? > > Thanks a lot. > > So the CONFIG_IS_ENABLED(FOO) is true if: > > 1. The CONFIG_FOO is defined in Kconfig files (if it is defined > in ./include/configs/<board.h> then CONFIG_IS_ENABLED will return false, > which is wrong). > > 2. The CONFIG_IS_ENABLED(FOO) is true if in Kconfig you have defined > CONFIG_FOO > > 3. CONFIG_IS_ENABLED(FOO) is true if in Kconfig you have defined > CONFIG_SPL_FOO > > So the CONFIG_IS_ENABLED(FOO) shall be used in conjunction with > CONFIG_DM_FOO (SPI in your case). Thanks a lot, got it. > > > > > > > > > > > + > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > > > > > > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > --- > > > > > > > > > > Changes in v5: > > > > > > > > > > - No change. > > > > > > > > > > Changes in v4: > > > > > > > > > > - No change. > > > > > > > > > > Changes in v3: > > > > > > > > > > - Add a cover-letter for this patch set. > > > > > > > > > > Changes in v2: > > > > > > > > > > - No change. > > > > > > > > > > > > > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > > > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > > > > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d > > > > > > > > > > 100644 --- a/include/config_uncmd_spl.h > > > > > > > > > > +++ b/include/config_uncmd_spl.h > > > > > > > > > > @@ -15,6 +15,7 @@ > > > > > > > > > > #undef CONFIG_DM_GPIO #undef CONFIG_DM_I2C > #undef > > > > > > > > > > CONFIG_DM_SPI > > > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > > > #endif > > > > > > > > > > > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > > > > > > > > > > > > > Wolfgang > > > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > > Wolfgang > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Lukasz Majewski > > > > > > > > > > -- > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > Wolfgang > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > Best regards, > > > > > > Lukasz Majewski > > > > > > -- > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > > lukma@denx.de > > > > Best regards, > > Lukasz Majewski > > -- > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > lukma@denx.de
Hi Lukasz, My patches depends on your patches https://patchwork.ozlabs.org/project/uboot/list/?series=129069, do you have plan to update it? I saw that the status is "changes required", any comments? Thanks Xiaowei > -----Original Message----- > From: Lukasz Majewski <lukma@denx.de> > Sent: 2019年8月23日 4:48 > To: Xiaowei Bao <xiaowei.bao@nxp.com> > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > non-DM SPL > > On Thu, 22 Aug 2019 01:56:48 +0000 > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > -----Original Message----- > > > From: Lukasz Majewski <lukma@denx.de> > > > Sent: 2019年8月20日 17:50 > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou > Liu > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei > > > Pan <jiafei.pan@nxp.com>; Chuanhua Han <chuanhua.han@nxp.com> > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > > for non-DM SPL > > > > > > On Tue, 20 Aug 2019 09:00:40 +0000 > > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > > > -----Original Message----- > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > Sent: 2019年8月20日 16:20 > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > Shengzhou > > > Liu > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > > > Jiafei Pan <jiafei.pan@nxp.com>; Chuanhua Han > > > > > <chuanhua.han@nxp.com> Subject: Re: [U-Boot] [PATCH v5 1/5] > > > > > spl: dm: disable SPI DM flash for non-DM SPL > > > > > > > > > > On Tue, 20 Aug 2019 07:51:18 +0000 Xiaowei Bao > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > Sent: 2019年8月20日 15:43 > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > Shengzhou > > > > > Liu > > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; Pan > > > > > > > Jiafei <Jiafei.Pan@freescale.com>; Chuanhua Han > > > <chuanhua.han@nxp.com> > > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > > > > flash for non-DM SPL > > > > > > > > > > > > > > On Tue, 20 Aug 2019 07:27:39 +0000 Xiaowei Bao > > > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > > > Sent: 2019年8月20日 15:14 > > > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > > > Shengzhou > > > > > > > Liu > > > > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; > > > > > > > > > Pan Jiafei <Jiafei.Pan@freescale.com>; Chuanhua Han > > > > > <chuanhua.han@nxp.com> > > > > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable > > > > > > > > > SPI DM flash for non-DM SPL > > > > > > > > > > > > > > > > > > Hi Xiaowei, > > > > > > > > > > > > > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > > > > > > > > > > > This patch solves the problem that spiboot cannot be > > > > > > > > > > performed in non-DM SPL. > > > > > > > > > > > > > > > > > > I've posted recently a set of patches to move setting of > > > > > > > > > DM_SPI_FLASH to Kconfig: > > > > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > > > > > > > Please rebase your work on top of it. > > > > > > > > Did this set of patches merge to the u-boot mainline? > > > > > > > > > > > > > > Those patches were not yet accepted to mainline. > > > > > > > > > > > > > > > Do I need to > > > > > > > > depend on your patches? > > > > > > > > > > > > > > It would be best to avoid duplicating the effort. > > > > > > > > > > > > > > > If yes, please provide the full patches link, I can't see > > > > > > > > the contents of this set of patches. > > > > > > > > > > > > > > When you open the link: > > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > > > On top left you have: > > > > > > > "Related" -> "show" > > > > > > > > > > > > > > After clicking on it you will see the list of patches. > > > > > > > > > > > > > > You may also want to use "Series" on top right and download > > > > > > > the whole patch series. > > > > > > I have check these set of patches, it don't impact my patches, > > > > > > my patches implemented the ESPI DM driver of POWERPC. > > > > > > > > > > But you add: > > > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > > > for SPL, Which is problematic as explained in the patch set. > > > > Can I modify the patches like this? > > > > diff --git a/include/config_uncmd_spl.h > > > > b/include/config_uncmd_spl.h index da94b3d..c2f9735 100644 > > > > --- a/include/config_uncmd_spl.h > > > > +++ b/include/config_uncmd_spl.h > > > > @@ -15,7 +15,6 @@ > > > > #undef CONFIG_DM_GPIO > > > > #undef CONFIG_DM_I2C > > > > #undef CONFIG_DM_SPI > > > > -#undef CONFIG_DM_SPI_FLASH > > > > #endif > > > > > > > > #undef CONFIG_DM_WARN > > > > diff --git a/include/configs/T208xQDS.h > > > > b/include/configs/T208xQDS.h index 98bb334..b45ec4a 100644 > > > > --- a/include/configs/T208xQDS.h > > > > +++ b/include/configs/T208xQDS.h > > > > @@ -10,6 +10,13 @@ > > > > #ifndef __T208xQDS_H > > > > #define __T208xQDS_H > > > > > > > > +/* SPI Flash Configs */ > > > > +#if defined(CONFIG_SPL_BUILD) > > > > +#undef CONFIG_DM_SPI > > > > +#undef CONFIG_DM_SPI_FLASH > > > > +#undef CONFIG_SPI_FLASH_MTD > > > > +#endif > > > > > > The whole point is to avoid adding the above code. > > > > > > The rationale for this can be found in the commit message: > > > https://patchwork.ozlabs.org/patch/1146375/ > > Hi Lukasz, thanks for your comments, ask a question, I modify my > > driver like this: diff --git a/drivers/spi/fsl_espi.c > > b/drivers/spi/fsl_espi.c index fd5ac97..54be036 100644 > > --- a/drivers/spi/fsl_espi.c > > +++ b/drivers/spi/fsl_espi.c > > @@ -367,6 +367,7 @@ void espi_setup_slave(struct fsl_spi_slave *fsl) > > * 10), spi_freq);/* Set eSPI BRG > clock > > source */ } > > > > #ifndef CONFIG_DM_SPI > > +#if !CONFIG_IS_ENABLED(DM_SPI) > > int spi_cs_is_valid(unsigned int bus, unsigned int cs) { > > > > diff --git a/configs/T2080QDS_SPIFLASH_defconfig > > b/configs/T2080QDS_SPIFLASH_defconfig index 7a1c580..cf53e54 100644 > > --- a/configs/T2080QDS_SPIFLASH_defconfig > > +++ b/configs/T2080QDS_SPIFLASH_defconfig > > @@ -80,3 +80,5 @@ CONFIG_DM_SPI=y > > CONFIG_DM_SPI_FLASH=y > > +CONFIG_SPL_DM_SPI=y > > +CONFIG_SPL_DM_SPI_FLASH=y > > > > When I compile the driver with SPL mode, the DM or non DM mode cod > > will be compiled together, I think CONFIG_IS_ENABLED(DM_SPI) is 0 or > > 1, so the DM code or non DM code will be compiled, but not both, this > > make me confused, do I miss something, could you tell me the reason? > > Thanks a lot. > > So the CONFIG_IS_ENABLED(FOO) is true if: > > 1. The CONFIG_FOO is defined in Kconfig files (if it is defined > in ./include/configs/<board.h> then CONFIG_IS_ENABLED will return false, > which is wrong). > > 2. The CONFIG_IS_ENABLED(FOO) is true if in Kconfig you have defined > CONFIG_FOO > > 3. CONFIG_IS_ENABLED(FOO) is true if in Kconfig you have defined > CONFIG_SPL_FOO > > So the CONFIG_IS_ENABLED(FOO) shall be used in conjunction with > CONFIG_DM_FOO (SPI in your case). > > > > > > > > > > > + > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Pan Jiafei <Jiafei.Pan@freescale.com> > > > > > > > > > > Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > --- > > > > > > > > > > Changes in v5: > > > > > > > > > > - No change. > > > > > > > > > > Changes in v4: > > > > > > > > > > - No change. > > > > > > > > > > Changes in v3: > > > > > > > > > > - Add a cover-letter for this patch set. > > > > > > > > > > Changes in v2: > > > > > > > > > > - No change. > > > > > > > > > > > > > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > > > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > > > > > > b/include/config_uncmd_spl.h index c2f9735..da94b3d > > > > > > > > > > 100644 --- a/include/config_uncmd_spl.h > > > > > > > > > > +++ b/include/config_uncmd_spl.h > > > > > > > > > > @@ -15,6 +15,7 @@ > > > > > > > > > > #undef CONFIG_DM_GPIO #undef CONFIG_DM_I2C > #undef > > > > > > > > > > CONFIG_DM_SPI > > > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > > > #endif > > > > > > > > > > > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > > > > > > > > > > > > > Wolfgang > > > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > > Wolfgang > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Lukasz Majewski > > > > > > > > > > -- > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > Wolfgang > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > Best regards, > > > > > > Lukasz Majewski > > > > > > -- > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > > lukma@denx.de > > > > Best regards, > > Lukasz Majewski > > -- > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > lukma@denx.de
Hi Xiaowei, > Hi Lukasz, > > My patches depends on your patches > https://patchwork.ozlabs.org/project/uboot/list/?series=129069, do > you have plan to update it? I saw that the status is "changes > required", any comments? There was some discussion regarding this work with Frieder (CC'ed), who has prepared similar patch set. Some portions of this series: spi: Split CONFIG_DM_SPI* to CONFIG_{SPL_TPL}DM_SPI* has been applied. However, I don't know if Frieder is going (or already has) to prepare new version of this patch set. > > Thanks > Xiaowei > > > -----Original Message----- > > From: Xiaowei Bao > > Sent: 2019年10月21日 11:51 > > To: Lukasz Majewski <lukma@denx.de> > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou Liu > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar X > > <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; Jiafei Pan > > <jiafei.pan@nxp.com>; Peng Ma <peng.ma@nxp.com> > > Subject: RE: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash > > for non-DM SPL > > > > Hi Lukasz, > > > > My patches depends on your patches > > https://patchwork.ozlabs.org/project/uboot/list/?series=129069, do > > you have plan to update it? I saw that the status is "changes > > required", any comments? > > > > Thanks > > Xiaowei > > > > > -----Original Message----- > > > From: Lukasz Majewski <lukma@denx.de> > > > Sent: 2019年8月23日 4:48 > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; Shengzhou > > > Liu <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > Jiafei Pan <jiafei.pan@nxp.com>; Chuanhua Han > > > <chuanhua.han@nxp.com> Subject: Re: [U-Boot] [PATCH v5 1/5] spl: > > > dm: disable SPI DM flash for non-DM SPL > > > > > > On Thu, 22 Aug 2019 01:56:48 +0000 > > > Xiaowei Bao <xiaowei.bao@nxp.com> wrote: > > > > > > > > -----Original Message----- > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > Sent: 2019年8月20日 17:50 > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > > > Shengzhou > > > Liu > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; Prabhakar > > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; u-boot@lists.denx.de; > > > > > Jiafei Pan <jiafei.pan@nxp.com>; Chuanhua Han > > > > > <chuanhua.han@nxp.com> > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM > > > > > flash for non-DM SPL > > > > > > > > > > On Tue, 20 Aug 2019 09:00:40 +0000 Xiaowei Bao > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > Sent: 2019年8月20日 16:20 > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > Cc: wd@denx.de; Ruchika Gupta <ruchika.gupta@nxp.com>; > > > Shengzhou > > > > > Liu > > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > Prabhakar > > > > > > > Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > > u-boot@lists.denx.de; Jiafei Pan <jiafei.pan@nxp.com>; > > > > > > > Chuanhua Han <chuanhua.han@nxp.com> Subject: Re: [U-Boot] > > > > > > > [PATCH v5 1/5] spl: dm: disable SPI DM flash for non-DM > > > > > > > SPL > > > > > > > > > > > > > > On Tue, 20 Aug 2019 07:51:18 +0000 Xiaowei Bao > > > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > > > Sent: 2019年8月20日 15:43 > > > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > > > Cc: wd@denx.de; Ruchika Gupta > > > > > > > > > <ruchika.gupta@nxp.com>; > > > > > Shengzhou > > > > > > > Liu > > > > > > > > > <shengzhou.liu@nxp.com>; jagan@amarulasolutions.com; > > > > > > > > > Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; > > > > > > > > > u-boot@lists.denx.de; Jiafei Pan > > > > > > > > > <jiafei.pan@nxp.com>; Pan Jiafei > > > > > > > > > <Jiafei.Pan@freescale.com>; Chuanhua Han > > > > > <chuanhua.han@nxp.com> > > > > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable > > > > > > > > > SPI DM flash for non-DM SPL > > > > > > > > > > > > > > > > > > On Tue, 20 Aug 2019 07:27:39 +0000 Xiaowei Bao > > > > > > > > > <xiaowei.bao@nxp.com> wrote: > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > > > From: Lukasz Majewski <lukma@denx.de> > > > > > > > > > > > Sent: 2019年8月20日 15:14 > > > > > > > > > > > To: Xiaowei Bao <xiaowei.bao@nxp.com> > > > > > > > > > > > Cc: wd@denx.de; Ruchika Gupta > > > > > > > > > > > <ruchika.gupta@nxp.com>; > > > > > > > Shengzhou > > > > > > > > > Liu > > > > > > > > > > > <shengzhou.liu@nxp.com>; > > > > > > > > > > > jagan@amarulasolutions.com; Prabhakar Kushwaha > > > > > > > > > > > <prabhakar.kushwaha@nxp.com>; > > > > > > > > > > > u-boot@lists.denx.de; Jiafei Pan > > > > > > > > > > > <jiafei.pan@nxp.com>; Pan Jiafei > > > > > > > > > > > <Jiafei.Pan@freescale.com>; Chuanhua Han > > > > > > > <chuanhua.han@nxp.com> > > > > > > > > > > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: > > > > > > > > > > > disable SPI DM flash for non-DM SPL > > > > > > > > > > > > > > > > > > > > > > Hi Xiaowei, > > > > > > > > > > > > > > > > > > > > > > > From: Chuanhua Han <chuanhua.han@nxp.com> > > > > > > > > > > > > > > > > > > > > > > > > This patch solves the problem that spiboot > > > > > > > > > > > > cannot be performed in non-DM SPL. > > > > > > > > > > > > > > > > > > > > > > I've posted recently a set of patches to move > > > > > > > > > > > setting of DM_SPI_FLASH to Kconfig: > > > > > > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > > > > > > > > > > > Please rebase your work on top of it. > > > > > > > > > > Did this set of patches merge to the u-boot > > > > > > > > > > mainline? > > > > > > > > > > > > > > > > > > Those patches were not yet accepted to mainline. > > > > > > > > > > > > > > > > > > > Do I need to > > > > > > > > > > depend on your patches? > > > > > > > > > > > > > > > > > > It would be best to avoid duplicating the effort. > > > > > > > > > > > > > > > > > > > If yes, please provide the full patches link, I > > > > > > > > > > can't see the contents of this set of patches. > > > > > > > > > > > > > > > > > > When you open the link: > > > > > > > > > https://patchwork.ozlabs.org/cover/1146494/ > > > > > > > > > > > > > > > > > > On top left you have: > > > > > > > > > "Related" -> "show" > > > > > > > > > > > > > > > > > > After clicking on it you will see the list of patches. > > > > > > > > > > > > > > > > > > You may also want to use "Series" on top right and > > > > > > > > > download the whole patch series. > > > > > > > > I have check these set of patches, it don't impact my > > > > > > > > patches, my patches implemented the ESPI DM driver of > > POWERPC. > > > > > > > > > > > > > > But you add: > > > > > > > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > > > > > > > for SPL, Which is problematic as explained in the patch > > > > > > > set. > > > > > > Can I modify the patches like this? > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > > b/include/config_uncmd_spl.h index da94b3d..c2f9735 100644 > > > > > > --- a/include/config_uncmd_spl.h > > > > > > +++ b/include/config_uncmd_spl.h > > > > > > @@ -15,7 +15,6 @@ > > > > > > #undef CONFIG_DM_GPIO > > > > > > #undef CONFIG_DM_I2C > > > > > > #undef CONFIG_DM_SPI > > > > > > -#undef CONFIG_DM_SPI_FLASH > > > > > > #endif > > > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > diff --git a/include/configs/T208xQDS.h > > > > > > b/include/configs/T208xQDS.h index 98bb334..b45ec4a 100644 > > > > > > --- a/include/configs/T208xQDS.h > > > > > > +++ b/include/configs/T208xQDS.h > > > > > > @@ -10,6 +10,13 @@ > > > > > > #ifndef __T208xQDS_H > > > > > > #define __T208xQDS_H > > > > > > > > > > > > +/* SPI Flash Configs */ > > > > > > +#if defined(CONFIG_SPL_BUILD) > > > > > > +#undef CONFIG_DM_SPI > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > +#undef CONFIG_SPI_FLASH_MTD > > > > > > +#endif > > > > > > > > > > The whole point is to avoid adding the above code. > > > > > > > > > > The rationale for this can be found in the commit message: > > > > > https://patchwork.ozlabs.org/patch/1146375/ > > > > Hi Lukasz, thanks for your comments, ask a question, I modify my > > > > driver like this: diff --git a/drivers/spi/fsl_espi.c > > > > b/drivers/spi/fsl_espi.c index fd5ac97..54be036 100644 > > > > --- a/drivers/spi/fsl_espi.c > > > > +++ b/drivers/spi/fsl_espi.c > > > > @@ -367,6 +367,7 @@ void espi_setup_slave(struct fsl_spi_slave > > > > *fsl) > > > > * 10), spi_freq);/* Set eSPI > > > > BRG > > > clock > > > > source */ } > > > > > > > > #ifndef CONFIG_DM_SPI > > > > +#if !CONFIG_IS_ENABLED(DM_SPI) > > > > int spi_cs_is_valid(unsigned int bus, unsigned int cs) { > > > > > > > > diff --git a/configs/T2080QDS_SPIFLASH_defconfig > > > > b/configs/T2080QDS_SPIFLASH_defconfig index 7a1c580..cf53e54 > > > > 100644 --- a/configs/T2080QDS_SPIFLASH_defconfig > > > > +++ b/configs/T2080QDS_SPIFLASH_defconfig > > > > @@ -80,3 +80,5 @@ CONFIG_DM_SPI=y > > > > CONFIG_DM_SPI_FLASH=y > > > > +CONFIG_SPL_DM_SPI=y > > > > +CONFIG_SPL_DM_SPI_FLASH=y > > > > > > > > When I compile the driver with SPL mode, the DM or non DM mode > > > > cod will be compiled together, I think > > > > CONFIG_IS_ENABLED(DM_SPI) is 0 or 1, so the DM code or non DM > > > > code will be compiled, but not both, this make me confused, do > > > > I miss something, could you tell me the reason? Thanks a lot. > > > > > > So the CONFIG_IS_ENABLED(FOO) is true if: > > > > > > 1. The CONFIG_FOO is defined in Kconfig files (if it is defined in > > > ./include/configs/<board.h> then CONFIG_IS_ENABLED will return > > > false, which is wrong). > > > > > > 2. The CONFIG_IS_ENABLED(FOO) is true if in Kconfig you have > > > defined CONFIG_FOO > > > > > > 3. CONFIG_IS_ENABLED(FOO) is true if in Kconfig you have defined > > > CONFIG_SPL_FOO > > > > > > So the CONFIG_IS_ENABLED(FOO) shall be used in conjunction with > > > CONFIG_DM_FOO (SPI in your case). > > > > > > > > > > > > > > > > > > > > > + > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Pan Jiafei > > > > > > > > > > > > <Jiafei.Pan@freescale.com> Signed-off-by: > > > > > > > > > > > > Chuanhua Han <chuanhua.han@nxp.com> --- > > > > > > > > > > > > Changes in v5: > > > > > > > > > > > > - No change. > > > > > > > > > > > > Changes in v4: > > > > > > > > > > > > - No change. > > > > > > > > > > > > Changes in v3: > > > > > > > > > > > > - Add a cover-letter for this patch set. > > > > > > > > > > > > Changes in v2: > > > > > > > > > > > > - No change. > > > > > > > > > > > > > > > > > > > > > > > > include/config_uncmd_spl.h | 1 + > > > > > > > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > > > > > > > > > > > > > > > diff --git a/include/config_uncmd_spl.h > > > > > > > > > > > > b/include/config_uncmd_spl.h index > > > > > > > > > > > > c2f9735..da94b3d 100644 --- > > > > > > > > > > > > a/include/config_uncmd_spl.h +++ > > > > > > > > > > > > b/include/config_uncmd_spl.h @@ -15,6 +15,7 @@ > > > > > > > > > > > > #undef CONFIG_DM_GPIO #undef CONFIG_DM_I2C > > > #undef > > > > > > > > > > > > CONFIG_DM_SPI > > > > > > > > > > > > +#undef CONFIG_DM_SPI_FLASH > > > > > > > > > > > > #endif > > > > > > > > > > > > > > > > > > > > > > > > #undef CONFIG_DM_WARN > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing > > > > > > > > > > > Director: > > > > > > > Wolfgang > > > > > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, > > > > > > > > > > > D-82194 Groebenzell, Germany Phone: > > > > > > > > > > > (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 > > > > > > > > > > > Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing > > > > > > > > > Director: > > > > > Wolfgang > > > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > > > > > Lukasz Majewski > > > > > > > > > > > > > > -- > > > > > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > > Wolfgang > > > > > > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > > > > > > Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > > > > > > > > > Best regards, > > > > > > > > > > Lukasz Majewski > > > > > > > > > > -- > > > > > > > > > > DENX Software Engineering GmbH, Managing Director: > > > > > Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, > > > > > D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: > > > > > (+49)-8142-66989-80 Email: lukma@denx.de > > > > > > > > > > > > Best regards, > > > > > > Lukasz Majewski > > > > > > -- > > > > > > DENX Software Engineering GmbH, Managing Director: Wolfgang > > Denk > > > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, > > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: > > > lukma@denx.de Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Hi Lukasz, hi Xiaowei, On 22.10.19 14:20, Lukasz Majewski wrote: > Hi Xiaowei, > >> Hi Lukasz, >> >> My patches depends on your patches >> https://patchwork.ozlabs.org/project/uboot/list/?series=129069, do >> you have plan to update it? I saw that the status is "changes >> required", any comments? > > There was some discussion regarding this work with Frieder (CC'ed), > who has prepared similar patch set. > > Some portions of this series: > spi: Split CONFIG_DM_SPI* to CONFIG_{SPL_TPL}DM_SPI* > > has been applied. > > However, I don't know if Frieder is going (or already has) to prepare > new version of this patch set. I have sent one part of the necessary changes: [1]. The latest version of the whole conversion can be found here: [2]. I need to test these changes with buildman before I send the remaining parts. I hope I will find some time to do this in the next days. Regards, Frieder [1] https://patchwork.ozlabs.org/patch/1162265/ [2] https://github.com/fschrempf/u-boot/commits/spi_flash_kconfig_cleanup
> -----Original Message----- > From: Schrempf Frieder <frieder.schrempf@kontron.de> > Sent: 2019年10月22日 21:03 > To: Lukasz Majewski <lukma@denx.de>; Xiaowei Bao > <xiaowei.bao@nxp.com>; u-boot@lists.denx.de > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > non-DM SPL > > Hi Lukasz, hi Xiaowei, > > On 22.10.19 14:20, Lukasz Majewski wrote: > > Hi Xiaowei, > > > >> Hi Lukasz, > >> > >> My patches depends on your patches > >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpat > >> > chwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D129069&am > p;d > >> > ata=02%7C01%7Cxiaowei.bao%40nxp.com%7Cd125df94364d44ecb97508d7 > 56f03935%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6370734 > 62083854046&sdata=H%2FbP2%2BlrtoktSegAIkwWImNoNJSGxN4wzTb > wAe1oMk0%3D&reserved=0, do you have plan to update it? I saw that > the status is "changes required", any comments? > > > > There was some discussion regarding this work with Frieder (CC'ed), > > who has prepared similar patch set. > > > > Some portions of this series: > > spi: Split CONFIG_DM_SPI* to CONFIG_{SPL_TPL}DM_SPI* > > > > has been applied. > > > > However, I don't know if Frieder is going (or already has) to prepare > > new version of this patch set. > > I have sent one part of the necessary changes: [1]. > The latest version of the whole conversion can be found here: [2]. > I need to test these changes with buildman before I send the remaining parts. > I hope I will find some time to do this in the next days. > Thanks Lukasz and Schrempf, got it. > Regards, > Frieder > > [1] > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch > work.ozlabs.org%2Fpatch%2F1162265%2F&data=02%7C01%7Cxiaowei. > bao%40nxp.com%7Cd125df94364d44ecb97508d756f03935%7C686ea1d3bc2 > b4c6fa92cd99c5c301635%7C0%7C0%7C637073462083854046&sdata= > 80bOgepTBhXP%2FpDRMBAeNezJV4akrOoH04%2F8A%2BUjMOo%3D& > reserved=0 > [2] > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. > com%2Ffschrempf%2Fu-boot%2Fcommits%2Fspi_flash_kconfig_cleanup&am > p;data=02%7C01%7Cxiaowei.bao%40nxp.com%7Cd125df94364d44ecb97508 > d756f03935%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63707 > 3462083854046&sdata=f%2BZDhMDbg8Hx%2F3ISB1D10yI2OT0HpPTu6 > ZANAlGS5bU%3D&reserved=0
> -----Original Message----- > From: Xiaowei Bao > Sent: 2019年10月23日 11:26 > To: Schrempf Frieder <frieder.schrempf@kontron.de>; Lukasz Majewski > <lukma@denx.de>; u-boot@lists.denx.de > Subject: RE: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > non-DM SPL > > > > > -----Original Message----- > > From: Schrempf Frieder <frieder.schrempf@kontron.de> > > Sent: 2019年10月22日 21:03 > > To: Lukasz Majewski <lukma@denx.de>; Xiaowei Bao > > <xiaowei.bao@nxp.com>; u-boot@lists.denx.de > > Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for > > non-DM SPL > > > > Hi Lukasz, hi Xiaowei, > > > > On 22.10.19 14:20, Lukasz Majewski wrote: > > > Hi Xiaowei, > > > > > >> Hi Lukasz, > > >> > > >> My patches depends on your patches > > >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fp > > >> at > > >> > > > chwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D129069&am > > p;d > > >> > > > ata=02%7C01%7Cxiaowei.bao%40nxp.com%7Cd125df94364d44ecb97508d7 > > > 56f03935%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6370734 > > > 62083854046&sdata=H%2FbP2%2BlrtoktSegAIkwWImNoNJSGxN4wzTb > > wAe1oMk0%3D&reserved=0, do you have plan to update it? I saw that > > the status is "changes required", any comments? > > > > > > There was some discussion regarding this work with Frieder (CC'ed), > > > who has prepared similar patch set. > > > > > > Some portions of this series: > > > spi: Split CONFIG_DM_SPI* to CONFIG_{SPL_TPL}DM_SPI* > > > > > > has been applied. > > > > > > However, I don't know if Frieder is going (or already has) to > > > prepare new version of this patch set. > > > > I have sent one part of the necessary changes: [1]. > > The latest version of the whole conversion can be found here: [2]. > > I need to test these changes with buildman before I send the remaining > parts. > > I hope I will find some time to do this in the next days. > > > > > Thanks Lukasz and Schrempf, got it. Hi Frieder, Do you complete the test of changes, I have some patches depend on your patches, Thanks a lot. Best regards Xiaowei > > > Regards, > > Frieder > > > > [1] > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc > > h > work.ozlabs.org%2Fpatch%2F1162265%2F&data=02%7C01%7Cxiaowei. > > > bao%40nxp.com%7Cd125df94364d44ecb97508d756f03935%7C686ea1d3bc2 > > > b4c6fa92cd99c5c301635%7C0%7C0%7C637073462083854046&sdata= > > > 80bOgepTBhXP%2FpDRMBAeNezJV4akrOoH04%2F8A%2BUjMOo%3D& > > reserved=0 > > [2] > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. > > > com%2Ffschrempf%2Fu-boot%2Fcommits%2Fspi_flash_kconfig_cleanup&am > > > p;data=02%7C01%7Cxiaowei.bao%40nxp.com%7Cd125df94364d44ecb97508 > > > d756f03935%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63707 > > > 3462083854046&sdata=f%2BZDhMDbg8Hx%2F3ISB1D10yI2OT0HpPTu6 > > ZANAlGS5bU%3D&reserved=0 > > >
Hi Xiaowei, On 24.12.19 04:01, Xiaowei Bao wrote: > > >> -----Original Message----- >> From: Xiaowei Bao >> Sent: 2019年10月23日 11:26 >> To: Schrempf Frieder <frieder.schrempf@kontron.de>; Lukasz Majewski >> <lukma@denx.de>; u-boot@lists.denx.de >> Subject: RE: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for >> non-DM SPL >> >> >> >>> -----Original Message----- >>> From: Schrempf Frieder <frieder.schrempf@kontron.de> >>> Sent: 2019年10月22日 21:03 >>> To: Lukasz Majewski <lukma@denx.de>; Xiaowei Bao >>> <xiaowei.bao@nxp.com>; u-boot@lists.denx.de >>> Subject: Re: [U-Boot] [PATCH v5 1/5] spl: dm: disable SPI DM flash for >>> non-DM SPL >>> >>> Hi Lukasz, hi Xiaowei, >>> >>> On 22.10.19 14:20, Lukasz Majewski wrote: >>>> Hi Xiaowei, >>>> >>>>> Hi Lukasz, >>>>> >>>>> My patches depends on your patches >>>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fp >>>>> at >>>>> >>> >> chwork.ozlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D129069&am >>> p;d >>>>> >>> >> ata=02%7C01%7Cxiaowei.bao%40nxp.com%7Cd125df94364d44ecb97508d7 >>> >> 56f03935%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6370734 >>> >> 62083854046&sdata=H%2FbP2%2BlrtoktSegAIkwWImNoNJSGxN4wzTb >>> wAe1oMk0%3D&reserved=0, do you have plan to update it? I saw that >>> the status is "changes required", any comments? >>>> >>>> There was some discussion regarding this work with Frieder (CC'ed), >>>> who has prepared similar patch set. >>>> >>>> Some portions of this series: >>>> spi: Split CONFIG_DM_SPI* to CONFIG_{SPL_TPL}DM_SPI* >>>> >>>> has been applied. >>>> >>>> However, I don't know if Frieder is going (or already has) to >>>> prepare new version of this patch set. >>> >>> I have sent one part of the necessary changes: [1]. >>> The latest version of the whole conversion can be found here: [2]. >>> I need to test these changes with buildman before I send the remaining >> parts. >>> I hope I will find some time to do this in the next days. >>> >> >> >> Thanks Lukasz and Schrempf, got it. > > Hi Frieder, > > Do you complete the test of changes, I have some patches depend on your patches, > Thanks a lot. Sorry, the CONFIG_SPI_FLASH_MTD is merged, but the other remaining patches for CONFIG_DM_SPI_FLASH, etc. are not. The last time I tried to get them ready I once again got caught in an endless loop of fixing Kconfig issues and testing. If you need some of the fixes, you could try adding them to your own patchset and test and resend them. Regards, Frieder > > Best regards > Xiaowei > > >> >>> Regards, >>> Frieder >>> >>> [1] >>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc >>> h >> work.ozlabs.org%2Fpatch%2F1162265%2F&data=02%7C01%7Cxiaowei. >>> >> bao%40nxp.com%7Cd125df94364d44ecb97508d756f03935%7C686ea1d3bc2 >>> >> b4c6fa92cd99c5c301635%7C0%7C0%7C637073462083854046&sdata= >>> >> 80bOgepTBhXP%2FpDRMBAeNezJV4akrOoH04%2F8A%2BUjMOo%3D& >>> reserved=0 >>> [2] >>> >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. >>> >> com%2Ffschrempf%2Fu-boot%2Fcommits%2Fspi_flash_kconfig_cleanup&am >>> >> p;data=02%7C01%7Cxiaowei.bao%40nxp.com%7Cd125df94364d44ecb97508 >>> >> d756f03935%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63707 >>> >> 3462083854046&sdata=f%2BZDhMDbg8Hx%2F3ISB1D10yI2OT0HpPTu6 >>> ZANAlGS5bU%3D&reserved=0 >> >> >> >
diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h index c2f9735..da94b3d 100644 --- a/include/config_uncmd_spl.h +++ b/include/config_uncmd_spl.h @@ -15,6 +15,7 @@ #undef CONFIG_DM_GPIO #undef CONFIG_DM_I2C #undef CONFIG_DM_SPI +#undef CONFIG_DM_SPI_FLASH #endif #undef CONFIG_DM_WARN