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_domain_irq(fpga->irqdomain, bit); in cplds_irq_handler()
51 struct cplds *fpga = irq_data_get_irq_chip_data(d); in cplds_irq_mask() local
55 fpga->irq_mask &= ~bit; in cplds_irq_mask()
56 writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); in cplds_irq_mask()
61 struct cplds *fpga = irq_data_get_irq_chip_data(d); in cplds_irq_unmask() local
65 set = readl(fpga->base + FPGA_IRQ_SET_CLR); in cplds_irq_unmask()
66 writel(set & ~bit, fpga->base + FPGA_IRQ_SET_CLR); in cplds_irq_unmask()
68 fpga->irq_mask |= bit; in cplds_irq_unmask()
69 writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); in cplds_irq_unmask()
83 struct cplds *fpga = d->host_data; in cplds_irq_domain_map() local
86 irq_set_chip_data(irq, fpga); in cplds_irq_domain_map()
98 struct cplds *fpga = platform_get_drvdata(pdev); in cplds_resume() local
100 writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); in cplds_resume()
108 struct cplds *fpga; in cplds_probe() local
113 fpga = devm_kzalloc(&pdev->dev, sizeof(*fpga), GFP_KERNEL); in cplds_probe()
114 if (!fpga) in cplds_probe()
117 fpga->irq = platform_get_irq(pdev, 0); in cplds_probe()
118 if (fpga->irq <= 0) in cplds_probe()
119 return fpga->irq; in cplds_probe()
131 fpga->base = devm_ioremap_resource(&pdev->dev, res); in cplds_probe()
132 if (IS_ERR(fpga->base)) in cplds_probe()
133 return PTR_ERR(fpga->base); in cplds_probe()
135 platform_set_drvdata(pdev, fpga); in cplds_probe()
137 writel(fpga->irq_mask, fpga->base + FPGA_IRQ_MASK_EN); in cplds_probe()
138 writel(0, fpga->base + FPGA_IRQ_SET_CLR); in cplds_probe()
140 irqflags = irq_get_trigger_type(fpga->irq); in cplds_probe()
141 ret = devm_request_irq(&pdev->dev, fpga->irq, cplds_irq_handler, in cplds_probe()
142 irqflags, dev_name(&pdev->dev), fpga); in cplds_probe()
148 fpga->irq, ret); in cplds_probe()
152 irq_set_irq_wake(fpga->irq, 1); in cplds_probe()
154 fpga->irqdomain = irq_domain_add_legacy(pdev->dev.of_node, in cplds_probe()
158 fpga); in cplds_probe()
160 fpga->irqdomain = irq_domain_add_linear(pdev->dev.of_node, in cplds_probe()
163 fpga); in cplds_probe()
164 if (!fpga->irqdomain) in cplds_probe()
172 struct cplds *fpga = platform_get_drvdata(pdev); in cplds_remove() local
174 irq_set_chip_and_handler(fpga->irq, NULL, NULL); in cplds_remove()