Lines Matching refs:pdata
130 struct imx_tmu_plat *pdata = dev_get_plat(dev); in read_temperature() local
141 val = readl(&pdata->regs->regs_v3.tritsr); in read_temperature()
142 valid = val & (1 << (30 + pdata->id)); in read_temperature()
144 val = readl(&pdata->regs->regs_v2.tritsr); in read_temperature()
151 val = readl(&pdata->regs->regs_v1.site[pdata->id].tritsr); in read_temperature()
158 val = (val >> (pdata->id * 16)) & 0xff; in read_temperature()
179 struct imx_tmu_plat *pdata = dev_get_plat(dev); in imx_tmu_get_temp() local
187 while (cpu_tmp >= pdata->alert) { in imx_tmu_get_temp()
188 …re (%dC) has beyond alert (%dC), close to critical (%dC)", cpu_tmp, pdata->alert, pdata->critical); in imx_tmu_get_temp()
190 mdelay(pdata->polling_delay); in imx_tmu_get_temp()
210 struct imx_tmu_plat *pdata = dev_get_plat(dev); in imx_tmu_calibration() local
225 writel(range[0], &pdata->regs->regs_v1.ttr0cr); in imx_tmu_calibration()
226 writel(range[1], &pdata->regs->regs_v1.ttr1cr); in imx_tmu_calibration()
227 writel(range[2], &pdata->regs->regs_v1.ttr2cr); in imx_tmu_calibration()
228 writel(range[3], &pdata->regs->regs_v1.ttr3cr); in imx_tmu_calibration()
238 writel(val, &pdata->regs->regs_v1.ttcfgr); in imx_tmu_calibration()
240 writel(val, &pdata->regs->regs_v1.tscfgr); in imx_tmu_calibration()
252 struct imx_tmu_plat *pdata = dev_get_plat(dev); in imx_tmu_init() local
259 writel(0x0, &pdata->regs->regs_v3.ter); in imx_tmu_init()
262 writel(0x0, &pdata->regs->regs_v3.tier); in imx_tmu_init()
266 writel(0x0, &pdata->regs->regs_v2.ter); in imx_tmu_init()
269 writel(0x0, &pdata->regs->regs_v2.tier); in imx_tmu_init()
272 writel(TMR_DISABLE, &pdata->regs->regs_v1.tmr); in imx_tmu_init()
275 writel(TIER_DISABLE, &pdata->regs->regs_v1.tier); in imx_tmu_init()
278 writel(TMTMIR_DEFAULT, &pdata->regs->regs_v1.tmtmir); in imx_tmu_init()
281 imx_tmu_arch_init((void *)pdata->regs); in imx_tmu_init()
286 struct imx_tmu_plat *pdata = dev_get_plat(dev); in imx_tmu_enable_msite() local
292 if (!pdata->regs) in imx_tmu_enable_msite()
296 reg = readl(&pdata->regs->regs_v3.ter); in imx_tmu_enable_msite()
298 writel(reg, &pdata->regs->regs_v3.ter); in imx_tmu_enable_msite()
300 writel(pdata->id << 30, &pdata->regs->regs_v3.tps); in imx_tmu_enable_msite()
305 writel(reg, &pdata->regs->regs_v3.ter); in imx_tmu_enable_msite()
309 writel(reg, &pdata->regs->regs_v3.ter); in imx_tmu_enable_msite()
311 reg = readl(&pdata->regs->regs_v2.ter); in imx_tmu_enable_msite()
313 writel(reg, &pdata->regs->regs_v2.ter); in imx_tmu_enable_msite()
317 writel(reg, &pdata->regs->regs_v2.ter); in imx_tmu_enable_msite()
321 writel(reg, &pdata->regs->regs_v2.ter); in imx_tmu_enable_msite()
324 reg = readl(&pdata->regs->regs_v1.tmr); in imx_tmu_enable_msite()
326 writel(reg, &pdata->regs->regs_v1.tmr); in imx_tmu_enable_msite()
328 reg |= 1 << (15 - pdata->id); in imx_tmu_enable_msite()
330 writel(reg, &pdata->regs->regs_v1.tmr); in imx_tmu_enable_msite()
334 writel(reg, &pdata->regs->regs_v1.tmr); in imx_tmu_enable_msite()
342 struct imx_tmu_plat *pdata = dev_get_plat(dev); in imx_tmu_bind() local
355 pdata->zone_node = 1; in imx_tmu_bind()
358 pdata->critical = maxc * 1000; in imx_tmu_bind()
359 pdata->alert = (maxc - 10) * 1000; in imx_tmu_bind()
379 struct imx_tmu_plat *pdata = dev_get_plat(dev), *p_parent_data; in imx_tmu_parse_fdt() local
386 if (pdata->zone_node) { in imx_tmu_parse_fdt()
387 pdata->regs = (union tmu_regs *)dev_read_addr_ptr(dev); in imx_tmu_parse_fdt()
389 if (!pdata->regs) in imx_tmu_parse_fdt()
396 pdata->regs = p_parent_data->regs; in imx_tmu_parse_fdt()
408 pdata->id = args.args[0]; in imx_tmu_parse_fdt()
410 pdata->id = 0; in imx_tmu_parse_fdt()
412 debug("args.args_count %d, id %d\n", args.args_count, pdata->id); in imx_tmu_parse_fdt()
414 pdata->polling_delay = dev_read_u32_default(dev, "polling-delay", 1000); in imx_tmu_parse_fdt()
424 pdata->critical = ofnode_read_u32_default(trips_np, "temperature", 85); in imx_tmu_parse_fdt()
426 pdata->alert = ofnode_read_u32_default(trips_np, "temperature", 80); in imx_tmu_parse_fdt()
432 pdata->id, pdata->polling_delay, pdata->critical, pdata->alert); in imx_tmu_parse_fdt()
439 struct imx_tmu_plat *pdata = dev_get_plat(dev); in imx_tmu_probe() local
448 if (pdata->zone_node) { in imx_tmu_probe()