Lines Matching refs:spmx

82 	struct sirfsoc_pmx *spmx = pinctrl_dev_get_drvdata(pctldev);  in sirfsoc_dt_node_to_map()  local
106 dev_err(spmx->dev, "No child nodes passed via DT\n"); in sirfsoc_dt_node_to_map()
147 static void sirfsoc_pinmux_endisable(struct sirfsoc_pmx *spmx, in sirfsoc_pinmux_endisable() argument
157 muxval = readl(spmx->gpio_virtbase + in sirfsoc_pinmux_endisable()
163 writel(muxval, spmx->gpio_virtbase + in sirfsoc_pinmux_endisable()
171 readl(spmx->rsc_virtbase + mux->ctrlreg); in sirfsoc_pinmux_endisable()
174 writel(func_en_val, spmx->rsc_virtbase + mux->ctrlreg); in sirfsoc_pinmux_endisable()
182 struct sirfsoc_pmx *spmx; in sirfsoc_pinmux_set_mux() local
184 spmx = pinctrl_dev_get_drvdata(pmxdev); in sirfsoc_pinmux_set_mux()
185 sirfsoc_pinmux_endisable(spmx, selector, true); in sirfsoc_pinmux_set_mux()
214 struct sirfsoc_pmx *spmx; in sirfsoc_pinmux_request_gpio() local
220 spmx = pinctrl_dev_get_drvdata(pmxdev); in sirfsoc_pinmux_request_gpio()
222 muxval = readl(spmx->gpio_virtbase + in sirfsoc_pinmux_request_gpio()
225 writel(muxval, spmx->gpio_virtbase + in sirfsoc_pinmux_request_gpio()
283 struct sirfsoc_pmx *spmx; in sirfsoc_pinmux_probe() local
288 spmx = devm_kzalloc(&pdev->dev, sizeof(*spmx), GFP_KERNEL); in sirfsoc_pinmux_probe()
289 if (!spmx) in sirfsoc_pinmux_probe()
292 spmx->dev = &pdev->dev; in sirfsoc_pinmux_probe()
294 platform_set_drvdata(pdev, spmx); in sirfsoc_pinmux_probe()
296 spmx->gpio_virtbase = of_iomap(np, 0); in sirfsoc_pinmux_probe()
297 if (!spmx->gpio_virtbase) { in sirfsoc_pinmux_probe()
302 spmx->rsc_virtbase = sirfsoc_rsc_of_iomap(); in sirfsoc_pinmux_probe()
303 if (!spmx->rsc_virtbase) { in sirfsoc_pinmux_probe()
319 spmx->pmx = pinctrl_register(&sirfsoc_pinmux_desc, &pdev->dev, spmx); in sirfsoc_pinmux_probe()
320 if (IS_ERR(spmx->pmx)) { in sirfsoc_pinmux_probe()
322 ret = PTR_ERR(spmx->pmx); in sirfsoc_pinmux_probe()
331 iounmap(spmx->rsc_virtbase); in sirfsoc_pinmux_probe()
333 iounmap(spmx->gpio_virtbase); in sirfsoc_pinmux_probe()
341 struct sirfsoc_pmx *spmx = dev_get_drvdata(dev); in sirfsoc_pinmux_suspend_noirq() local
345 spmx->gpio_regs[i][j] = readl(spmx->gpio_virtbase + in sirfsoc_pinmux_suspend_noirq()
348 spmx->ints_regs[i] = readl(spmx->gpio_virtbase + in sirfsoc_pinmux_suspend_noirq()
350 spmx->paden_regs[i] = readl(spmx->gpio_virtbase + in sirfsoc_pinmux_suspend_noirq()
353 spmx->dspen_regs = readl(spmx->gpio_virtbase + SIRFSOC_GPIO_DSP_EN0); in sirfsoc_pinmux_suspend_noirq()
356 spmx->rsc_regs[i] = readl(spmx->rsc_virtbase + 4 * i); in sirfsoc_pinmux_suspend_noirq()
364 struct sirfsoc_pmx *spmx = dev_get_drvdata(dev); in sirfsoc_pinmux_resume_noirq() local
368 writel(spmx->gpio_regs[i][j], spmx->gpio_virtbase + in sirfsoc_pinmux_resume_noirq()
371 writel(spmx->ints_regs[i], spmx->gpio_virtbase + in sirfsoc_pinmux_resume_noirq()
373 writel(spmx->paden_regs[i], spmx->gpio_virtbase + in sirfsoc_pinmux_resume_noirq()
376 writel(spmx->dspen_regs, spmx->gpio_virtbase + SIRFSOC_GPIO_DSP_EN0); in sirfsoc_pinmux_resume_noirq()
379 writel(spmx->rsc_regs[i], spmx->rsc_virtbase + 4 * i); in sirfsoc_pinmux_resume_noirq()