Lines Matching refs:scu

780 	struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev);  in lpc18xx_pconf_get()  local
790 reg = readl(scu->base + pin_cap->offset); in lpc18xx_pconf_get()
962 struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev); in lpc18xx_pconf_set() local
974 reg = readl(scu->base + pin_cap->offset); in lpc18xx_pconf_set()
991 writel(reg, scu->base + pin_cap->offset); in lpc18xx_pconf_set()
1018 struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev); in lpc18xx_pmx_get_func_groups() local
1020 *groups = scu->func[function].groups; in lpc18xx_pmx_get_func_groups()
1021 *num_groups = scu->func[function].ngroups; in lpc18xx_pmx_get_func_groups()
1029 struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev); in lpc18xx_pmx_set() local
1052 writel(LPC18XX_SCU_ANALOG_PIN_CFG, scu->base + pin->offset); in lpc18xx_pmx_set()
1059 reg = readl(scu->base + offset); in lpc18xx_pmx_set()
1061 writel(reg, scu->base + offset); in lpc18xx_pmx_set()
1067 writel(LPC18XX_SCU_ANALOG_PIN_CFG, scu->base + pin->offset); in lpc18xx_pmx_set()
1069 reg = readl(scu->base + LPC18XX_SCU_REG_ENAIO2); in lpc18xx_pmx_set()
1071 writel(reg, scu->base + LPC18XX_SCU_REG_ENAIO2); in lpc18xx_pmx_set()
1084 reg = readl(scu->base + pin->offset); in lpc18xx_pmx_set()
1086 writel(reg | func, scu->base + pin->offset); in lpc18xx_pmx_set()
1168 struct lpc18xx_scu_data *scu) in lpc18xx_create_group_func_map() argument
1180 scu->func[func].ngroups = ngroups; in lpc18xx_create_group_func_map()
1181 scu->func[func].groups = devm_kzalloc(dev, ngroups * in lpc18xx_create_group_func_map()
1183 if (!scu->func[func].groups) in lpc18xx_create_group_func_map()
1187 scu->func[func].groups[i] = lpc18xx_pins[pins[i]].name; in lpc18xx_create_group_func_map()
1195 struct lpc18xx_scu_data *scu; in lpc18xx_scu_probe() local
1199 scu = devm_kzalloc(&pdev->dev, sizeof(*scu), GFP_KERNEL); in lpc18xx_scu_probe()
1200 if (!scu) in lpc18xx_scu_probe()
1204 scu->base = devm_ioremap_resource(&pdev->dev, res); in lpc18xx_scu_probe()
1205 if (IS_ERR(scu->base)) in lpc18xx_scu_probe()
1206 return PTR_ERR(scu->base); in lpc18xx_scu_probe()
1208 scu->clk = devm_clk_get(&pdev->dev, NULL); in lpc18xx_scu_probe()
1209 if (IS_ERR(scu->clk)) { in lpc18xx_scu_probe()
1211 return PTR_ERR(scu->clk); in lpc18xx_scu_probe()
1214 ret = lpc18xx_create_group_func_map(&pdev->dev, scu); in lpc18xx_scu_probe()
1220 ret = clk_prepare_enable(scu->clk); in lpc18xx_scu_probe()
1226 platform_set_drvdata(pdev, scu); in lpc18xx_scu_probe()
1228 scu->pctl = pinctrl_register(&lpc18xx_scu_desc, &pdev->dev, scu); in lpc18xx_scu_probe()
1229 if (IS_ERR(scu->pctl)) { in lpc18xx_scu_probe()
1231 clk_disable_unprepare(scu->clk); in lpc18xx_scu_probe()
1232 return PTR_ERR(scu->pctl); in lpc18xx_scu_probe()
1240 struct lpc18xx_scu_data *scu = platform_get_drvdata(pdev); in lpc18xx_scu_remove() local
1242 pinctrl_unregister(scu->pctl); in lpc18xx_scu_remove()
1243 clk_disable_unprepare(scu->clk); in lpc18xx_scu_remove()