Lines Matching refs:scu

768 	struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev);  in lpc18xx_pconf_get_gpio_pin_int()  local
783 ret = lpc18xx_get_pintsel(scu->base + LPC18XX_SCU_PINTSEL0, val, arg); in lpc18xx_pconf_get_gpio_pin_int()
787 return lpc18xx_get_pintsel(scu->base + LPC18XX_SCU_PINTSEL1, val, arg); in lpc18xx_pconf_get_gpio_pin_int()
878 struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev); in lpc18xx_pconf_get() local
888 reg = readl(scu->base + pin_cap->offset); in lpc18xx_pconf_get()
987 struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev); in lpc18xx_pconf_set_gpio_pin_int() local
1002 reg_val = readl(scu->base + reg_offset); in lpc18xx_pconf_set_gpio_pin_int()
1005 writel(reg_val, scu->base + reg_offset); in lpc18xx_pconf_set_gpio_pin_int()
1088 struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev); in lpc18xx_pconf_set() local
1100 reg = readl(scu->base + pin_cap->offset); in lpc18xx_pconf_set()
1117 writel(reg, scu->base + pin_cap->offset); in lpc18xx_pconf_set()
1144 struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev); in lpc18xx_pmx_get_func_groups() local
1146 *groups = scu->func[function].groups; in lpc18xx_pmx_get_func_groups()
1147 *num_groups = scu->func[function].ngroups; in lpc18xx_pmx_get_func_groups()
1155 struct lpc18xx_scu_data *scu = pinctrl_dev_get_drvdata(pctldev); in lpc18xx_pmx_set() local
1178 writel(LPC18XX_SCU_ANALOG_PIN_CFG, scu->base + pin->offset); in lpc18xx_pmx_set()
1185 reg = readl(scu->base + offset); in lpc18xx_pmx_set()
1187 writel(reg, scu->base + offset); in lpc18xx_pmx_set()
1193 writel(LPC18XX_SCU_ANALOG_PIN_CFG, scu->base + pin->offset); in lpc18xx_pmx_set()
1195 reg = readl(scu->base + LPC18XX_SCU_REG_ENAIO2); in lpc18xx_pmx_set()
1197 writel(reg, scu->base + LPC18XX_SCU_REG_ENAIO2); in lpc18xx_pmx_set()
1210 reg = readl(scu->base + pin->offset); in lpc18xx_pmx_set()
1212 writel(reg | func, scu->base + pin->offset); in lpc18xx_pmx_set()
1299 struct lpc18xx_scu_data *scu) in lpc18xx_create_group_func_map() argument
1310 scu->func[func].ngroups = ngroups; in lpc18xx_create_group_func_map()
1311 scu->func[func].groups = devm_kcalloc(dev, in lpc18xx_create_group_func_map()
1314 if (!scu->func[func].groups) in lpc18xx_create_group_func_map()
1318 scu->func[func].groups[i] = lpc18xx_pins[pins[i]].name; in lpc18xx_create_group_func_map()
1326 struct lpc18xx_scu_data *scu; in lpc18xx_scu_probe() local
1330 scu = devm_kzalloc(&pdev->dev, sizeof(*scu), GFP_KERNEL); in lpc18xx_scu_probe()
1331 if (!scu) in lpc18xx_scu_probe()
1335 scu->base = devm_ioremap_resource(&pdev->dev, res); in lpc18xx_scu_probe()
1336 if (IS_ERR(scu->base)) in lpc18xx_scu_probe()
1337 return PTR_ERR(scu->base); in lpc18xx_scu_probe()
1339 scu->clk = devm_clk_get(&pdev->dev, NULL); in lpc18xx_scu_probe()
1340 if (IS_ERR(scu->clk)) { in lpc18xx_scu_probe()
1342 return PTR_ERR(scu->clk); in lpc18xx_scu_probe()
1345 ret = lpc18xx_create_group_func_map(&pdev->dev, scu); in lpc18xx_scu_probe()
1351 ret = clk_prepare_enable(scu->clk); in lpc18xx_scu_probe()
1357 platform_set_drvdata(pdev, scu); in lpc18xx_scu_probe()
1359 scu->pctl = devm_pinctrl_register(&pdev->dev, &lpc18xx_scu_desc, scu); in lpc18xx_scu_probe()
1360 if (IS_ERR(scu->pctl)) { in lpc18xx_scu_probe()
1362 clk_disable_unprepare(scu->clk); in lpc18xx_scu_probe()
1363 return PTR_ERR(scu->pctl); in lpc18xx_scu_probe()