Lines Matching refs:dsp
81 struct k3_dsp_privdata *dsp = dev_get_priv(dev); in k3_dsp_prepare() local
82 struct k3_dsp_boot_data *data = dsp->data; in k3_dsp_prepare()
89 ret = ti_sci_proc_power_domain_on(&dsp->tsp); in k3_dsp_prepare()
106 struct k3_dsp_privdata *dsp = dev_get_priv(dev); in k3_dsp_unprepare() local
107 struct k3_dsp_boot_data *data = dsp->data; in k3_dsp_unprepare()
113 return ti_sci_proc_power_domain_off(&dsp->tsp); in k3_dsp_unprepare()
126 struct k3_dsp_privdata *dsp = dev_get_priv(dev); in k3_dsp_load() local
127 struct k3_dsp_boot_data *data = dsp->data; in k3_dsp_load()
132 ret = ti_sci_proc_request(&dsp->tsp); in k3_dsp_load()
139 dsp->tsp.proc_id); in k3_dsp_load()
159 ret = ti_sci_proc_set_config(&dsp->tsp, boot_vector, 0, 0); in k3_dsp_load()
164 ti_sci_proc_release(&dsp->tsp); in k3_dsp_load()
176 struct k3_dsp_privdata *dsp = dev_get_priv(dev); in k3_dsp_start() local
177 struct k3_dsp_boot_data *data = dsp->data; in k3_dsp_start()
182 ret = ti_sci_proc_request(&dsp->tsp); in k3_dsp_start()
187 ret = ti_sci_proc_power_domain_on(&dsp->tsp); in k3_dsp_start()
192 ret = reset_deassert(&dsp->dsp_rst); in k3_dsp_start()
195 ti_sci_proc_power_domain_off(&dsp->tsp); in k3_dsp_start()
199 ti_sci_proc_release(&dsp->tsp); in k3_dsp_start()
206 struct k3_dsp_privdata *dsp = dev_get_priv(dev); in k3_dsp_stop() local
210 ti_sci_proc_request(&dsp->tsp); in k3_dsp_stop()
211 reset_assert(&dsp->dsp_rst); in k3_dsp_stop()
212 ti_sci_proc_power_domain_off(&dsp->tsp); in k3_dsp_stop()
213 ti_sci_proc_release(&dsp->tsp); in k3_dsp_stop()
240 struct k3_dsp_privdata *dsp = dev_get_priv(dev); in k3_dsp_da_to_va() local
252 for (i = 0; i < dsp->num_mems; i++) { in k3_dsp_da_to_va()
253 bus_addr = dsp->mem[i].bus_addr; in k3_dsp_da_to_va()
254 dev_addr = dsp->mem[i].dev_addr; in k3_dsp_da_to_va()
255 size = dsp->mem[i].size; in k3_dsp_da_to_va()
259 va = dsp->mem[i].cpu_addr + offset; in k3_dsp_da_to_va()
265 va = dsp->mem[i].cpu_addr + offset; in k3_dsp_da_to_va()
318 struct k3_dsp_privdata *dsp = dev_get_priv(dev); in k3_dsp_of_get_memories() local
323 dsp->num_mems = ARRAY_SIZE(mem_names); in k3_dsp_of_get_memories()
324 dsp->mem = calloc(dsp->num_mems, sizeof(*dsp->mem)); in k3_dsp_of_get_memories()
325 if (!dsp->mem) in k3_dsp_of_get_memories()
328 for (i = 0; i < dsp->num_mems; i++) { in k3_dsp_of_get_memories()
332 dsp->mem[i].bus_addr = FDT_ADDR_T_NONE; in k3_dsp_of_get_memories()
333 dsp->mem[i].dev_addr = FDT_ADDR_T_NONE; in k3_dsp_of_get_memories()
334 dsp->mem[i].cpu_addr = NULL; in k3_dsp_of_get_memories()
335 dsp->mem[i].size = 0; in k3_dsp_of_get_memories()
339 dsp->mem[i].bus_addr = dev_read_addr_size_name(dev, mem_names[i], in k3_dsp_of_get_memories()
340 (fdt_addr_t *)&dsp->mem[i].size); in k3_dsp_of_get_memories()
341 if (dsp->mem[i].bus_addr == FDT_ADDR_T_NONE) { in k3_dsp_of_get_memories()
345 dsp->mem[i].cpu_addr = map_physmem(dsp->mem[i].bus_addr, in k3_dsp_of_get_memories()
346 dsp->mem[i].size, in k3_dsp_of_get_memories()
348 dsp->mem[i].dev_addr = dsp->mem[i].bus_addr & in k3_dsp_of_get_memories()
352 mem_names[i], &dsp->mem[i].bus_addr, in k3_dsp_of_get_memories()
353 dsp->mem[i].size, dsp->mem[i].cpu_addr, in k3_dsp_of_get_memories()
354 &dsp->mem[i].dev_addr); in k3_dsp_of_get_memories()
367 static int k3_dsp_of_to_priv(struct udevice *dev, struct k3_dsp_privdata *dsp) in k3_dsp_of_to_priv() argument
373 ret = reset_get_by_index(dev, 0, &dsp->dsp_rst); in k3_dsp_of_to_priv()
379 ret = ti_sci_proc_of_to_priv(dev, &dsp->tsp); in k3_dsp_of_to_priv()
387 dsp->data = (struct k3_dsp_boot_data *)dev_get_driver_data(dev); in k3_dsp_of_to_priv()
400 struct k3_dsp_privdata *dsp; in k3_dsp_probe() local
405 dsp = dev_get_priv(dev); in k3_dsp_probe()
407 ret = k3_dsp_of_to_priv(dev, dsp); in k3_dsp_probe()
420 reset_assert(&dsp->dsp_rst); in k3_dsp_probe()
429 struct k3_dsp_privdata *dsp = dev_get_priv(dev); in k3_dsp_remove() local
431 free(dsp->mem); in k3_dsp_remove()