Lines Matching full:fpga
36 struct cplds *fpga = d; in cplds_irq_handler() local
41 pending = readl(fpga->base + FPGA_IRQ_SET_CLR) & fpga->irq_mask; in cplds_irq_handler()
43 generic_handle_irq(irq_find_mapping(fpga->irqdomain, in cplds_irq_handler()
53 struct cplds *fpga = irq_data_get_irq_chip_data(d); in cplds_irq_mask() local
57 fpga->irq_mask &= ~bit; in cplds_irq_mask()
58 writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); in cplds_irq_mask()
63 struct cplds *fpga = irq_data_get_irq_chip_data(d); in cplds_irq_unmask() local
67 set = readl(fpga->base + FPGA_IRQ_SET_CLR); in cplds_irq_unmask()
68 writel(set & ~bit, fpga->base + FPGA_IRQ_SET_CLR); in cplds_irq_unmask()
70 fpga->irq_mask |= bit; in cplds_irq_unmask()
71 writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); in cplds_irq_unmask()
85 struct cplds *fpga = d->host_data; in cplds_irq_domain_map() local
88 irq_set_chip_data(irq, fpga); in cplds_irq_domain_map()
100 struct cplds *fpga = platform_get_drvdata(pdev); in cplds_resume() local
102 writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); in cplds_resume()
110 struct cplds *fpga; in cplds_probe() local
115 fpga = devm_kzalloc(&pdev->dev, sizeof(*fpga), GFP_KERNEL); in cplds_probe()
116 if (!fpga) in cplds_probe()
119 fpga->irq = platform_get_irq(pdev, 0); in cplds_probe()
120 if (fpga->irq <= 0) in cplds_probe()
121 return fpga->irq; in cplds_probe()
128 fpga->base = devm_ioremap_resource(&pdev->dev, res); in cplds_probe()
129 if (IS_ERR(fpga->base)) in cplds_probe()
130 return PTR_ERR(fpga->base); in cplds_probe()
132 platform_set_drvdata(pdev, fpga); in cplds_probe()
134 writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); in cplds_probe()
135 writel(0, fpga->base + FPGA_IRQ_SET_CLR); in cplds_probe()
137 irqflags = irq_get_trigger_type(fpga->irq); in cplds_probe()
138 ret = devm_request_irq(&pdev->dev, fpga->irq, cplds_irq_handler, in cplds_probe()
139 irqflags, dev_name(&pdev->dev), fpga); in cplds_probe()
145 fpga->irq, ret); in cplds_probe()
149 irq_set_irq_wake(fpga->irq, 1); in cplds_probe()
150 fpga->irqdomain = irq_domain_add_linear(pdev->dev.of_node, in cplds_probe()
152 &cplds_irq_domain_ops, fpga); in cplds_probe()
153 if (!fpga->irqdomain) in cplds_probe()
157 ret = irq_create_strict_mappings(fpga->irqdomain, base_irq, 0, in cplds_probe()
171 struct cplds *fpga = platform_get_drvdata(pdev); in cplds_remove() local
173 irq_set_chip_and_handler(fpga->irq, NULL, NULL); in cplds_remove()