Lines Matching full:dt
3 * NAND Flash Controller Device Driver for DT
115 struct denali_dt *dt; in denali_dt_probe() local
121 dt = devm_kzalloc(dev, sizeof(*dt), GFP_KERNEL); in denali_dt_probe()
122 if (!dt) in denali_dt_probe()
124 denali = &dt->controller; in denali_dt_probe()
148 dt->clk = devm_clk_get_enabled(dev, "nand"); in denali_dt_probe()
149 if (IS_ERR(dt->clk)) in denali_dt_probe()
150 return PTR_ERR(dt->clk); in denali_dt_probe()
152 dt->clk_x = devm_clk_get_enabled(dev, "nand_x"); in denali_dt_probe()
153 if (IS_ERR(dt->clk_x)) in denali_dt_probe()
154 return PTR_ERR(dt->clk_x); in denali_dt_probe()
156 dt->clk_ecc = devm_clk_get_enabled(dev, "ecc"); in denali_dt_probe()
157 if (IS_ERR(dt->clk_ecc)) in denali_dt_probe()
158 return PTR_ERR(dt->clk_ecc); in denali_dt_probe()
160 dt->rst = devm_reset_control_get_optional_shared(dev, "nand"); in denali_dt_probe()
161 if (IS_ERR(dt->rst)) in denali_dt_probe()
162 return PTR_ERR(dt->rst); in denali_dt_probe()
164 dt->rst_reg = devm_reset_control_get_optional_shared(dev, "reg"); in denali_dt_probe()
165 if (IS_ERR(dt->rst_reg)) in denali_dt_probe()
166 return PTR_ERR(dt->rst_reg); in denali_dt_probe()
168 denali->clk_rate = clk_get_rate(dt->clk); in denali_dt_probe()
169 denali->clk_x_rate = clk_get_rate(dt->clk_x); in denali_dt_probe()
176 ret = reset_control_deassert(dt->rst_reg); in denali_dt_probe()
180 ret = reset_control_deassert(dt->rst); in denali_dt_probe()
203 platform_set_drvdata(pdev, dt); in denali_dt_probe()
210 reset_control_assert(dt->rst); in denali_dt_probe()
212 reset_control_assert(dt->rst_reg); in denali_dt_probe()
219 struct denali_dt *dt = platform_get_drvdata(pdev); in denali_dt_remove() local
221 denali_remove(&dt->controller); in denali_dt_remove()
222 reset_control_assert(dt->rst); in denali_dt_remove()
223 reset_control_assert(dt->rst_reg); in denali_dt_remove()
230 .name = "denali-nand-dt",
238 MODULE_DESCRIPTION("DT driver for Denali NAND controller");