Skip to content
Snippets Groups Projects
Commit 11bcc584 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

mtd: rawnand: denali_dt: make the core clock optional


The "nand_x" and "ecc" clocks are currently optional. Make the core
clock optional in the same way. This will allow platforms with no clock
driver support to use this driver.

Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Marek Vasut <marex@denx.de> # On SoCFPGA Arria V
parent 33672c97
No related branches found
No related tags found
No related merge requests found
...@@ -91,7 +91,7 @@ static int denali_dt_probe(struct udevice *dev) ...@@ -91,7 +91,7 @@ static int denali_dt_probe(struct udevice *dev)
if (ret) if (ret)
ret = clk_get_by_index(dev, 0, &clk); ret = clk_get_by_index(dev, 0, &clk);
if (ret) if (ret)
return ret; clk.dev = NULL;
ret = clk_get_by_name(dev, "nand_x", &clk_x); ret = clk_get_by_name(dev, "nand_x", &clk_x);
if (ret) if (ret)
...@@ -101,9 +101,11 @@ static int denali_dt_probe(struct udevice *dev) ...@@ -101,9 +101,11 @@ static int denali_dt_probe(struct udevice *dev)
if (ret) if (ret)
clk_ecc.dev = NULL; clk_ecc.dev = NULL;
ret = clk_enable(&clk); if (clk.dev) {
if (ret) ret = clk_enable(&clk);
return ret; if (ret)
return ret;
}
if (clk_x.dev) { if (clk_x.dev) {
ret = clk_enable(&clk_x); ret = clk_enable(&clk_x);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment