Lines Matching refs:ofdev
162 static int fun_probe(struct platform_device *ofdev) in fun_probe() argument
171 fun = devm_kzalloc(&ofdev->dev, sizeof(*fun), GFP_KERNEL); in fun_probe()
175 io_res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in fun_probe()
176 fun->io_base = devm_ioremap_resource(&ofdev->dev, io_res); in fun_probe()
182 dev_err(&ofdev->dev, "can't find UPM\n"); in fun_probe()
186 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-addr-offset", in fun_probe()
189 dev_err(&ofdev->dev, "can't get UPM address offset\n"); in fun_probe()
194 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-cmd-offset", &size); in fun_probe()
196 dev_err(&ofdev->dev, "can't get UPM command offset\n"); in fun_probe()
201 prop = of_get_property(ofdev->dev.of_node, in fun_probe()
206 dev_err(&ofdev->dev, "too much multiple chips\n"); in fun_probe()
216 fun->rnb_gpio[i] = devm_gpiod_get_index_optional(&ofdev->dev, in fun_probe()
220 dev_err(&ofdev->dev, "RNB gpio #%d is invalid\n", i); in fun_probe()
227 fun->dev = &ofdev->dev; in fun_probe()
229 ret = fun_chip_init(fun, ofdev->dev.of_node, io_res); in fun_probe()
233 dev_set_drvdata(&ofdev->dev, fun); in fun_probe()
238 static int fun_remove(struct platform_device *ofdev) in fun_remove() argument
240 struct fsl_upm_nand *fun = dev_get_drvdata(&ofdev->dev); in fun_remove()