linux/drivers/irqchip/irq-renesas-intc-irqpin.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Renesas INTC External IRQ Pin Driver
 *
 *  Copyright (C) 2013 Magnus Damm
 */

#include <linux/init.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>

#define INTC_IRQPIN_MAX

#define INTC_IRQPIN_REG_SENSE
#define INTC_IRQPIN_REG_PRIO
#define INTC_IRQPIN_REG_SOURCE
#define INTC_IRQPIN_REG_MASK
#define INTC_IRQPIN_REG_CLEAR
#define INTC_IRQPIN_REG_NR_MANDATORY
#define INTC_IRQPIN_REG_IRLM
#define INTC_IRQPIN_REG_NR

/* INTC external IRQ PIN hardware register access:
 *
 * SENSE is read-write 32-bit with 2-bits or 4-bits per IRQ (*)
 * PRIO is read-write 32-bit with 4-bits per IRQ (**)
 * SOURCE is read-only 32-bit or 8-bit with 1-bit per IRQ (***)
 * MASK is write-only 32-bit or 8-bit with 1-bit per IRQ (***)
 * CLEAR is write-only 32-bit or 8-bit with 1-bit per IRQ (***)
 *
 * (*) May be accessed by more than one driver instance - lock needed
 * (**) Read-modify-write access by one driver instance - lock needed
 * (***) Accessed by one driver instance only - no locking needed
 */

struct intc_irqpin_iomem {};

struct intc_irqpin_irq {};

struct intc_irqpin_priv {};

struct intc_irqpin_config {};

static unsigned long intc_irqpin_read32(void __iomem *iomem)
{}

static unsigned long intc_irqpin_read8(void __iomem *iomem)
{}

static void intc_irqpin_write32(void __iomem *iomem, unsigned long data)
{}

static void intc_irqpin_write8(void __iomem *iomem, unsigned long data)
{}

static inline unsigned long intc_irqpin_read(struct intc_irqpin_priv *p,
					     int reg)
{}

static inline void intc_irqpin_write(struct intc_irqpin_priv *p,
				     int reg, unsigned long data)
{}

static inline unsigned long intc_irqpin_hwirq_mask(struct intc_irqpin_priv *p,
						   int reg, int hw_irq)
{}

static inline void intc_irqpin_irq_write_hwirq(struct intc_irqpin_priv *p,
					       int reg, int hw_irq)
{}

static DEFINE_RAW_SPINLOCK(intc_irqpin_lock); /* only used by slow path */

static void intc_irqpin_read_modify_write(struct intc_irqpin_priv *p,
					  int reg, int shift,
					  int width, int value)
{}

static void intc_irqpin_mask_unmask_prio(struct intc_irqpin_priv *p,
					 int irq, int do_mask)
{}

static int intc_irqpin_set_sense(struct intc_irqpin_priv *p, int irq, int value)
{}

static void intc_irqpin_dbg(struct intc_irqpin_irq *i, char *str)
{}

static void intc_irqpin_irq_enable(struct irq_data *d)
{}

static void intc_irqpin_irq_disable(struct irq_data *d)
{}

static void intc_irqpin_shared_irq_enable(struct irq_data *d)
{}

static void intc_irqpin_shared_irq_disable(struct irq_data *d)
{}

static void intc_irqpin_irq_enable_force(struct irq_data *d)
{}

static void intc_irqpin_irq_disable_force(struct irq_data *d)
{}

#define INTC_IRQ_SENSE_VALID
#define INTC_IRQ_SENSE(x)

static unsigned char intc_irqpin_sense[IRQ_TYPE_SENSE_MASK + 1] =;

static int intc_irqpin_irq_set_type(struct irq_data *d, unsigned int type)
{}

static int intc_irqpin_irq_set_wake(struct irq_data *d, unsigned int on)
{}

static irqreturn_t intc_irqpin_irq_handler(int irq, void *dev_id)
{}

static irqreturn_t intc_irqpin_shared_irq_handler(int irq, void *dev_id)
{}

/*
 * This lock class tells lockdep that INTC External IRQ Pin irqs are in a
 * different category than their parents, so it won't report false recursion.
 */
static struct lock_class_key intc_irqpin_irq_lock_class;

/* And this is for the request mutex */
static struct lock_class_key intc_irqpin_irq_request_class;

static int intc_irqpin_irq_domain_map(struct irq_domain *h, unsigned int virq,
				      irq_hw_number_t hw)
{}

static const struct irq_domain_ops intc_irqpin_irq_domain_ops =;

static const struct intc_irqpin_config intc_irqpin_irlm_r8a777x =;

static const struct intc_irqpin_config intc_irqpin_rmobile =;

static const struct of_device_id intc_irqpin_dt_ids[] =;
MODULE_DEVICE_TABLE(of, intc_irqpin_dt_ids);

static int intc_irqpin_probe(struct platform_device *pdev)
{}

static void intc_irqpin_remove(struct platform_device *pdev)
{}

static int __maybe_unused intc_irqpin_suspend(struct device *dev)
{}

static SIMPLE_DEV_PM_OPS(intc_irqpin_pm_ops, intc_irqpin_suspend, NULL);

static struct platform_driver intc_irqpin_device_driver =;

static int __init intc_irqpin_init(void)
{}
postcore_initcall(intc_irqpin_init);

static void __exit intc_irqpin_exit(void)
{}
module_exit(intc_irqpin_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();