Lines Matching refs: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(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(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(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 ret = clk_prepare_enable(dt->clk); in denali_dt_probe()
172 ret = clk_prepare_enable(dt->clk_x); in denali_dt_probe()
176 ret = clk_prepare_enable(dt->clk_ecc); in denali_dt_probe()
180 denali->clk_rate = clk_get_rate(dt->clk); in denali_dt_probe()
181 denali->clk_x_rate = clk_get_rate(dt->clk_x); in denali_dt_probe()
188 ret = reset_control_deassert(dt->rst_reg); in denali_dt_probe()
192 ret = reset_control_deassert(dt->rst); in denali_dt_probe()
215 platform_set_drvdata(pdev, dt); in denali_dt_probe()
222 reset_control_assert(dt->rst); in denali_dt_probe()
224 reset_control_assert(dt->rst_reg); in denali_dt_probe()
226 clk_disable_unprepare(dt->clk_ecc); in denali_dt_probe()
228 clk_disable_unprepare(dt->clk_x); in denali_dt_probe()
230 clk_disable_unprepare(dt->clk); in denali_dt_probe()
237 struct denali_dt *dt = platform_get_drvdata(pdev); in denali_dt_remove() local
239 denali_remove(&dt->controller); in denali_dt_remove()
240 reset_control_assert(dt->rst); in denali_dt_remove()
241 reset_control_assert(dt->rst_reg); in denali_dt_remove()
242 clk_disable_unprepare(dt->clk_ecc); in denali_dt_remove()
243 clk_disable_unprepare(dt->clk_x); in denali_dt_remove()
244 clk_disable_unprepare(dt->clk); in denali_dt_remove()