clk: imx: add i.MX6UL clk driver
Subsystems (5)
PATCH 1/4 clk: imx: add i.MX6UL clk driver
Add i.MX6UL clk driver for i.MX6UL CLK driver model usage
---
drivers/clk/imx/Kconfig | 8 ++ drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-imx6ul.c | 270 +++++++++++++++++++++++++++++++++++ 3 files changed, 279 insertions(+) create mode 100644 drivers/clk/imx/clk-imx6ul.c
drivers/clk/imx/Kconfig +8 -0
@@ -14,6 +14,14 @@ config CLK_IMX6Q help This enables DM/DTS support for clock driver in i.MX6Q platforms. +config CLK_IMX6UL + bool "Clock support for i.MXUL" + depends on ARCH_MX6 + select CLK + select CLK_CCF + help + This enables DM/DTS support for clock driver in i.MX6UL platforms. + config CLK_IMX8 bool "Clock support for i.MX8" depends on ARCH_IMX8
drivers/clk/imx/Makefile +1 -0
@@ -4,6 +4,7 @@ obj-$(CONFIG_$(PHASE_)CLK_CCF) += clk-gate2.o clk-pllv3.o clk-pfd.o obj-$(CONFIG_$(PHASE_)CLK_IMX6Q) += clk-imx6q.o +obj-$(CONFIG_$(PHASE_)CLK_IMX6UL) += clk-imx6ul.o obj-$(CONFIG_CLK_IMX8) += clk-imx8.o ifdef CONFIG_CLK_IMX8
drivers/clk/imx/clk-imx6ul.c new file +270 -0
270 lines not on this page · raw message
Signature · 3 lines
2.43.0 base-commit: df2ed552f0b05591090369a7fe7ddc92439dea5c
PATCH 2/4 mtd: mxs_nand_dt: Move from clk_get/clk_enable to clk_bulk api
Make simple the clock registration and enable and allow later to add support for other platforms
---
drivers/mtd/nand/raw/mxs_nand_dt.c | 48 ++++-------------------------- 1 file changed, 5 insertions(+), 43 deletions(-)
drivers/mtd/nand/raw/mxs_nand_dt.c +5 -43
@@ -100,9 +100,7 @@ static int mxs_nand_dt_probe(struct udevice *dev)if (IS_ENABLED (CONFIG_CLK ) && (IS_ENABLED (CONFIG_IMX8 ) ||IS_ENABLED (CONFIG_IMX8M ))) { -/* Assigned clock already set clock */ -struct clk gpmi_clk; - +struct clk_bulk clk_bulk; info->gpmi_clk =devm_clk_get (dev,"gpmi_io" );if (IS_ERR (info->gpmi_clk)) {
@@ -111,47 +109,11 @@ static int mxs_nand_dt_probe(struct udevice *dev)return ret; } - ret =clk_enable (info->gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi io clk: %d\n" , ret); -return ret; - } - -if (IS_ENABLED (CONFIG_IMX8 )) { - ret =clk_get_by_name (dev,"gpmi_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_get_by_name (dev,"gpmi_bch" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_bch clk: %d\n" , ret); -return ret; - } - } - - ret =clk_get_by_name (dev,"gpmi_bch_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); + ret =clk_get_bulk (dev, &clk_bulk); +if (!ret) + ret =clk_enable_bulk (&clk_bulk);if (ret <0 ) { -debug ("Can't enable gpmi_bch_apb clk: %d\n" , ret); +debug ("Can't enable gpmi clks: %d\n" , ret);return ret; } }
Signature · 3 lines
2.43.0 base-commit: df2ed552f0b05591090369a7fe7ddc92439dea5c
Re: [PATCH 2/4] mtd: mxs_nand_dt: Move from clk_get/clk_enable to clk_bulk api
Quoted 60 lines · Michael Trimarchi
Make simple the clock registration and enable and allow later to add support for other platforms
Signed-off-by Michael Trimarchi <[email protected]>---
drivers/mtd/nand/raw/mxs_nand_dt.c| 48 ++++--------------------------1 file changed, 5 insertions(+), 43 deletions(-)drivers/mtd/nand/raw/mxs_nand_dt.c +1
-35@@ -100,9 +100,7 @@ static int mxs_nand_dt_probe(struct udevice *dev)if (IS_ENABLED (CONFIG_CLK ) && (IS_ENABLED (CONFIG_IMX8 ) ||IS_ENABLED (CONFIG_IMX8M ))) { -/* Assigned clock already set clock */ -struct clk gpmi_clk; - +struct clk_bulk clk_bulk; info->gpmi_clk =devm_clk_get (dev,"gpmi_io" );if (IS_ERR (info->gpmi_clk)) {@@ -111,47 +109,11 @@ static int mxs_nand_dt_probe(struct udevice *dev)return ret; } - ret =clk_enable (info->gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi io clk: %d\n" , ret); -return ret; - } - -if (IS_ENABLED (CONFIG_IMX8 )) { - ret =clk_get_by_name (dev,"gpmi_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_get_by_name (dev,"gpmi_bch" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_bch clk: %d\n" , ret); -return ret; - } - } -
drivers/mtd/nand/raw/mxs_nand_dt.c static int mxs_nand_dt_probe(struct udevice *dev) · line 114
Quoted 10 lines
drivers/mtd/nand/raw/mxs_nand_dt.c +3
-7- ret =clk_get_by_name (dev,"gpmi_bch_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); + ret =clk_get_bulk (dev, &clk_bulk); +if (!ret) + ret =clk_enable_bulk (&clk_bulk);
You enable clk bulk and together with a standalone gpmi_io clk?
Regards,
Peng
Quoted 10 lines
drivers/mtd/nand/raw/mxs_nand_dt.c +1
-1if (ret <0 ) { -debug ("Can't enable gpmi_bch_apb clk: %d\n" , ret); +debug ("Can't enable gpmi clks: %d\n" , ret);return ret; } }Signature · 3 lines
2.43.0 base-commit: df2ed552f0b05591090369a7fe7ddc92439dea5c
Re: [PATCH 2/4] mtd: mxs_nand_dt: Move from clk_get/clk_enable to clk_bulk api
Hi Peng
Quoted 66 lines · Peng Fan
Quoted 64 lines · Michael Trimarchi
Make simple the clock registration and enable and allow later to add support for other platforms
Signed-off-by Michael Trimarchi <[email protected]>---
drivers/mtd/nand/raw/mxs_nand_dt.c| 48 ++++--------------------------1 file changed, 5 insertions(+), 43 deletions(-)drivers/mtd/nand/raw/mxs_nand_dt.c +1
-39@@ -100,9 +100,7 @@ static int mxs_nand_dt_probe(struct udevice *dev)if (IS_ENABLED (CONFIG_CLK ) && (IS_ENABLED (CONFIG_IMX8 ) ||IS_ENABLED (CONFIG_IMX8M ))) { -/* Assigned clock already set clock */ -struct clk gpmi_clk; - +struct clk_bulk clk_bulk; info->gpmi_clk =devm_clk_get (dev,"gpmi_io" );if (IS_ERR (info->gpmi_clk)) {@@ -111,47 +109,11 @@ static int mxs_nand_dt_probe(struct udevice *dev)return ret; } - ret =clk_enable (info->gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi io clk: %d\n" , ret); -return ret; - } - -if (IS_ENABLED (CONFIG_IMX8 )) { - ret =clk_get_by_name (dev,"gpmi_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_get_by_name (dev,"gpmi_bch" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_bch clk: %d\n" , ret); -return ret; - } - } - - ret =clk_get_by_name (dev,"gpmi_bch_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch_apb clk: %d\n" , ret); -return ret;
Quoted 9 lines
drivers/mtd/nand/raw/mxs_nand_dt.c static int mxs_nand_dt_probe(struct udevice *dev) · line 114
Quoted 6 lines
drivers/mtd/nand/raw/mxs_nand_dt.c +3
-3- } - - ret =clk_enable (&gpmi_clk); + ret =clk_get_bulk (dev, &clk_bulk); +if (!ret) + ret =clk_enable_bulk (&clk_bulk);You enable clk bulk and together with a standalone
gpmi_ioclk?
I need to get and refer to the gpmi_io because it is used then by the driver. I think
that this does not change what was before. Am I missing?
Michael
Quoted 14 lines
Regards,
PengQuoted 10 lines
drivers/mtd/nand/raw/mxs_nand_dt.c +1
-2if (ret <0 ) { -debug ("Can't enable gpmi_bch_apb clk: %d\n" , ret); +debug ("Can't enable gpmi clks: %d\n" , ret);return ret; } } --2.43.0
base-commit:
df2ed552f0b05591090369a7fe7ddc92439dea5c
Signature · 11 lines
Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com
Re: [PATCH 2/4] mtd: mxs_nand_dt: Move from clk_get/clk_enable to clk_bulk api
Hi Peng
Quoted 9 lines · Michael Nazzareno Trimarchi
Hi Peng
Quoted 5 lines · Peng Fan
Quoted 3 lines · Michael Trimarchi
Make simple the clock registration and enable and allow later to add support for other platforms
Ok, I think that I need anyway to disable the gpmi_io clk because the driver should
handle it during nfc timing calculation
Michael
Quoted 106 lines
Quoted 61 lines
Quoted 61 lines
Signed-off-by Michael Trimarchi <[email protected]>---
drivers/mtd/nand/raw/mxs_nand_dt.c| 48 ++++--------------------------1 file changed, 5 insertions(+), 43 deletions(-)drivers/mtd/nand/raw/mxs_nand_dt.c +1
-39@@ -100,9 +100,7 @@ static int mxs_nand_dt_probe(struct udevice *dev)if (IS_ENABLED (CONFIG_CLK ) && (IS_ENABLED (CONFIG_IMX8 ) ||IS_ENABLED (CONFIG_IMX8M ))) { -/* Assigned clock already set clock */ -struct clk gpmi_clk; - +struct clk_bulk clk_bulk; info->gpmi_clk =devm_clk_get (dev,"gpmi_io" );if (IS_ERR (info->gpmi_clk)) {@@ -111,47 +109,11 @@ static int mxs_nand_dt_probe(struct udevice *dev)return ret; } - ret =clk_enable (info->gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi io clk: %d\n" , ret); -return ret; - } - -if (IS_ENABLED (CONFIG_IMX8 )) { - ret =clk_get_by_name (dev,"gpmi_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_get_by_name (dev,"gpmi_bch" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_bch clk: %d\n" , ret); -return ret; - } - } - - ret =clk_get_by_name (dev,"gpmi_bch_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch_apb clk: %d\n" , ret); -return ret;Quoted 9 lines
drivers/mtd/nand/raw/mxs_nand_dt.c static int mxs_nand_dt_probe(struct udevice *dev) · line 114
Quoted 6 lines
drivers/mtd/nand/raw/mxs_nand_dt.c +3
-3- } - - ret =clk_enable (&gpmi_clk); + ret =clk_get_bulk (dev, &clk_bulk); +if (!ret) + ret =clk_enable_bulk (&clk_bulk);You enable clk bulk and together with a standalone
gpmi_ioclk?I need to get and refer to the
gpmi_iobecause it is used then by the driver. I think
that this does not change what was before. Am I missing?Michael
Quoted 14 lines
Regards,
PengQuoted 10 lines
drivers/mtd/nand/raw/mxs_nand_dt.c +1
-2if (ret <0 ) { -debug ("Can't enable gpmi_bch_apb clk: %d\n" , ret); +debug ("Can't enable gpmi clks: %d\n" , ret);return ret; } } --2.43.0
base-commit:
df2ed552f0b05591090369a7fe7ddc92439dea5c--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com
Signature · 11 lines
Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com
Re: [PATCH 2/4] mtd: mxs_nand_dt: Move from clk_get/clk_enable to clk_bulk api
Hi Peng
Quoted 10 lines · Michael Nazzareno Trimarchi
Hi Peng
Quoted 5 lines · Michael Nazzareno Trimarchi
Hi Peng
Quoted 1 line · Peng Fan
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines · Michael Trimarchi
Quoted 3 lines
Make simple the clock registration and enable and allow later to add support for other platforms
Ok, I think that I need anyway to disable the
gpmi_ioclk because the driver should
handle it during nfc timing calculation
No it's ok this way, the driver expect the clock enabled
Michael
Quoted 124 lines
Michael
Quoted 101 lines
Quoted 61 lines
Quoted 61 lines
Signed-off-by Michael Trimarchi <[email protected]>---
drivers/mtd/nand/raw/mxs_nand_dt.c| 48 ++++--------------------------1 file changed, 5 insertions(+), 43 deletions(-)drivers/mtd/nand/raw/mxs_nand_dt.c +1
-39@@ -100,9 +100,7 @@ static int mxs_nand_dt_probe(struct udevice *dev)if (IS_ENABLED (CONFIG_CLK ) && (IS_ENABLED (CONFIG_IMX8 ) ||IS_ENABLED (CONFIG_IMX8M ))) { -/* Assigned clock already set clock */ -struct clk gpmi_clk; - +struct clk_bulk clk_bulk; info->gpmi_clk =devm_clk_get (dev,"gpmi_io" );if (IS_ERR (info->gpmi_clk)) {@@ -111,47 +109,11 @@ static int mxs_nand_dt_probe(struct udevice *dev)return ret; } - ret =clk_enable (info->gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi io clk: %d\n" , ret); -return ret; - } - -if (IS_ENABLED (CONFIG_IMX8 )) { - ret =clk_get_by_name (dev,"gpmi_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_apb clk: %d\n" , ret); -return ret; - } - - ret =clk_get_by_name (dev,"gpmi_bch" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch clk: %d\n" , ret); -return ret; - } - - ret =clk_enable (&gpmi_clk); -if (ret <0 ) { -debug ("Can't enable gpmi_bch clk: %d\n" , ret); -return ret; - } - } - - ret =clk_get_by_name (dev,"gpmi_bch_apb" , &gpmi_clk); -if (ret <0 ) { -debug ("Can't get gpmi_bch_apb clk: %d\n" , ret); -return ret;Quoted 9 lines
drivers/mtd/nand/raw/mxs_nand_dt.c static int mxs_nand_dt_probe(struct udevice *dev) · line 114
Quoted 6 lines
drivers/mtd/nand/raw/mxs_nand_dt.c +3
-3- } - - ret =clk_enable (&gpmi_clk); + ret =clk_get_bulk (dev, &clk_bulk); +if (!ret) + ret =clk_enable_bulk (&clk_bulk);You enable clk bulk and together with a standalone
gpmi_ioclk?I need to get and refer to the
gpmi_iobecause it is used then by the driver. I think
that this does not change what was before. Am I missing?Michael
Quoted 14 lines
Regards,
PengQuoted 10 lines
drivers/mtd/nand/raw/mxs_nand_dt.c +1
-2if (ret <0 ) { -debug ("Can't enable gpmi_bch_apb clk: %d\n" , ret); +debug ("Can't enable gpmi clks: %d\n" , ret);return ret; } } --2.43.0
base-commit:
df2ed552f0b05591090369a7fe7ddc92439dea5c--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________Quoted 5 lines
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com
Signature · 11 lines
Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com
PATCH 3/4 mtd: nand: Add support for EDO mode 1-5 to IMX6ULL platform
In reply to Michael TrimarchiThe clock driver allow to burst the performance of the nand controller. Make changes to let it use the new clock driver
---
drivers/mtd/nand/raw/mxs_nand.c | 12 ++++++++++++ drivers/mtd/nand/raw/mxs_nand_dt.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)
drivers/mtd/nand/raw/mxs_nand.c +12 -0
@@ -1507,8 +1507,20 @@ static void mxs_compute_timings(struct nand_chip *chip,writel (GPMI_CTRL1_CLEAR_MASK , &nand_info->gpmi_regs->hw_gpmi_ctrl1_clr);writel (ctrl1n, &nand_info->gpmi_regs->hw_gpmi_ctrl1_set); +/* Clock dividers do NOT guarantee a clean clock signal on its output +* during the change of the divide factor on i.MX6Q/UL/SX. On i.MX7/8, +* all clock dividers provide these guarantee. +*/ +if (IS_ENABLED (CONFIG_MX6ULL )) { +clk_disable (nand_info->gpmi_clk); + } +clk_set_rate (nand_info->gpmi_clk, clk_rate); +if (IS_ENABLED (CONFIG_MX6ULL )) { +clk_enable (nand_info->gpmi_clk); + } +/* Wait 64 clock cycles before using the GPMI after enabling the DLL */ dll_wait_time_us =USEC_PER_SEC / clk_rate *64 ;if (!dll_wait_time_us)
drivers/mtd/nand/raw/mxs_nand_dt.c +1 -1
@@ -99,7 +99,7 @@ static int mxs_nand_dt_probe(struct udevice *dev) info->use_minimum_ecc =dev_read_bool (dev,"fsl,use-minimum-ecc" );if (IS_ENABLED (CONFIG_CLK ) && - (IS_ENABLED (CONFIG_IMX8 ) ||IS_ENABLED (CONFIG_IMX8M ))) { + (IS_ENABLED (CONFIG_IMX8 ) ||IS_ENABLED (CONFIG_IMX8M ) ||IS_ENABLED (CONFIG_MX6ULL ))) {struct clk_bulk clk_bulk; info->gpmi_clk =devm_clk_get (dev,"gpmi_io" );
Signature · 3 lines
2.43.0 base-commit: df2ed552f0b05591090369a7fe7ddc92439dea5c
Fabio Estevam
reviewerRe: [PATCH 3/4] mtd: nand: Add support for EDO mode 1-5 to IMX6ULL platform
Quoted 2 lines · Michael Trimarchi
The clock driver allow to burst the performance of the nand
allows to boost....NAND
Quoted 14 lines
controller. Make changes to let it use the new clock driver
Signed-off-by Michael Trimarchi <[email protected]>---
drivers/mtd/nand/raw/mxs_nand.c | 12 ++++++++++++ drivers/mtd/nand/raw/mxs_nand_dt.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)drivers/mtd/nand/raw/mxs_nand.c +0
-0
drivers/mtd/nand/raw/mxs_nand.c static void mxs_compute_timings(struct nand_chip *chip, · line 1510
Quoted 4 lines
drivers/mtd/nand/raw/mxs_nand.c +1
-0@@ -1507,8 +1507,20 @@ static void mxs_compute_timings(struct nand_chip *chip,writel (GPMI_CTRL1_CLEAR_MASK , &nand_info->gpmi_regs->hw_gpmi_ctrl1_clr);writel (ctrl1n, &nand_info->gpmi_regs->hw_gpmi_ctrl1_set); +/* Clock dividers do NOT guarantee a clean clock signal on its output
their output.
drivers/mtd/nand/raw/mxs_nand.c static void mxs_compute_timings(struct nand_chip *chip, · line 1512
Quoted 2 lines
drivers/mtd/nand/raw/mxs_nand.c +2
-0+* during the change of the divide factor on i.MX6Q/UL/SX. On i.MX7/8, +* all clock dividers provide these guarantee.
this guarantee
drivers/mtd/nand/raw/mxs_nand.c static void mxs_compute_timings(struct nand_chip *chip, · line 1516
Quoted 4 lines
drivers/mtd/nand/raw/mxs_nand.c +4
-0+*/ +if (IS_ENABLED (CONFIG_MX6ULL )) { +clk_disable (nand_info->gpmi_clk); + }
Please remove { } for single-line statements.
drivers/mtd/nand/raw/mxs_nand.c static void mxs_compute_timings(struct nand_chip *chip, · line 1522
Quoted 6 lines
drivers/mtd/nand/raw/mxs_nand.c +4
-0+clk_set_rate (nand_info->gpmi_clk, clk_rate); +if (IS_ENABLED (CONFIG_MX6ULL )) { +clk_enable (nand_info->gpmi_clk); + }
Ditto.
Re: [PATCH 3/4] mtd: nand: Add support for EDO mode 1-5 to IMX6ULL platform
HI Fabio
Quoted 8 lines · Fabio Estevam
Quoted 2 lines · Michael Trimarchi
The clock driver allow to burst the performance of the nand
allows to boost....NAND
Ok
Quoted 17 lines
Quoted 17 lines
controller. Make changes to let it use the new clock driver
Signed-off-by Michael Trimarchi <[email protected]>---
drivers/mtd/nand/raw/mxs_nand.c | 12 ++++++++++++ drivers/mtd/nand/raw/mxs_nand_dt.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)drivers/mtd/nand/raw/mxs_nand.c +0
-0@@ -1507,8 +1507,20 @@ static void mxs_compute_timings(struct nand_chip *chip,writel (GPMI_CTRL1_CLEAR_MASK , &nand_info->gpmi_regs->hw_gpmi_ctrl1_clr);writel (ctrl1n, &nand_info->gpmi_regs->hw_gpmi_ctrl1_set);
Quoted 8 lines
drivers/mtd/nand/raw/mxs_nand.c static void mxs_compute_timings(struct nand_chip *chip, · line 1510
Quoted 1 line
drivers/mtd/nand/raw/mxs_nand.c +1
-0+/* Clock dividers do NOT guarantee a clean clock signal on its output their output.
drivers/mtd/nand/raw/mxs_nand.c static void mxs_compute_timings(struct nand_chip *chip, · line 1512
Quoted 2 lines
drivers/mtd/nand/raw/mxs_nand.c +2
-0+* during the change of the divide factor on i.MX6Q/UL/SX. On i.MX7/8, +* all clock dividers provide these guarantee. this guarantee
This comment coming from the kernel and I don't know if is english wrong
Quoted 7 lines
drivers/mtd/nand/raw/mxs_nand.c static void mxs_compute_timings(struct nand_chip *chip, · line 1516
Quoted 5 lines
drivers/mtd/nand/raw/mxs_nand.c +4
-0+*/ +if (IS_ENABLED (CONFIG_MX6ULL )) { +clk_disable (nand_info->gpmi_clk); + }Please remove { } for single-line statements.
Done
Quoted 9 lines
drivers/mtd/nand/raw/mxs_nand.c static void mxs_compute_timings(struct nand_chip *chip, · line 1522
Quoted 7 lines
drivers/mtd/nand/raw/mxs_nand.c +4
-0+clk_set_rate (nand_info->gpmi_clk, clk_rate); +if (IS_ENABLED (CONFIG_MX6ULL )) { +clk_enable (nand_info->gpmi_clk); + }Ditto.
Done
Michael
Signature · 11 lines
Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com
PATCH 4/4 configs/imx6ulz_smm_m2_defconfig: Enable clock framework
In reply to Michael TrimarchiAllow to use clock framework for the m2 platform. This allow to have better performance to nand controller
---
configs/imx6ulz_smm_m2_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/imx6ulz_smm_m2_defconfig +3 -0
@@ -43,6 +43,8 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y +CONFIG_CLK_COMPOSITE_CCF=y +CONFIG_CLK_IMX6UL=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x82000000 CONFIG_FASTBOOT_FLASH=y
@@ -50,6 +52,7 @@ CONFIG_FASTBOOT_UUU_SUPPORT=y CONFIG_SYS_I2C_MXC=y # CONFIG_MMC is not set CONFIG_MTD=y +CONFIG_DM_MTD=y CONFIG_MTD_RAW_NAND=y CONFIG_SYS_NAND_USE_FLASH_BBT=y CONFIG_NAND_MXS=y
Signature · 3 lines
2.43.0 base-commit: df2ed552f0b05591090369a7fe7ddc92439dea5c
Fabio Estevam
reviewerRe: [PATCH 4/4] configs/imx6ulz_smm_m2_defconfig: Enable clock framework
Quoted 3 lines · Michael Trimarchi
Allow to use clock framework for the m2 platform. This allow to have better performance to nand controller
Enable the clock framework on the m2 platform.
This helps to increase the NAND controller performance.
Quoted 20 lines
Signed-off-by Michael Trimarchi <[email protected]>---
configs/imx6ulz_smm_m2_defconfig | 3 +++ 1 file changed, 3 insertions(+)configs/imx6ulz_smm_m2_defconfig +2
-0@@ -43,6 +43,8 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y +CONFIG_CLK_COMPOSITE_CCF=y +CONFIG_CLK_IMX6UL=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x82000000 CONFIG_FASTBOOT_FLASH=y
configs/imx6ulz_smm_m2_defconfig CONFIG_FASTBOOT_UUU_SUPPORT=y · line 55
Quoted 4 lines
configs/imx6ulz_smm_m2_defconfig +1
-0@@ -50,6 +52,7 @@ CONFIG_FASTBOOT_UUU_SUPPORT=y CONFIG_SYS_I2C_MXC=y # CONFIG_MMC is not set CONFIG_MTD=y +CONFIG_DM_MTD=y
This change is not mentioned in the commit log.
Quoted 3 lines · Michael Trimarchi
Add i.MX6UL clk driver for i.MX6UL CLK driver model usage
Signed-off-by Michael Trimarchi <[email protected]>