linux/drivers/irqchip/irq-stm32mp-exti.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) Maxime Coquelin 2015
 * Copyright (C) STMicroelectronics 2017-2024
 * Author:  Maxime Coquelin <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/hwspinlock.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/irqdomain.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/pm.h>

#include <dt-bindings/interrupt-controller/arm-gic.h>

#define IRQS_PER_BANK

#define HWSPNLCK_TIMEOUT

#define EXTI_EnCIDCFGR(n)
#define EXTI_HWCFGR1

/* Register: EXTI_EnCIDCFGR(n) */
#define EXTI_CIDCFGR_CFEN_MASK
#define EXTI_CIDCFGR_CID_MASK
#define EXTI_CIDCFGR_CID_SHIFT

/* Register: EXTI_HWCFGR1 */
#define EXTI_HWCFGR1_CIDWIDTH_MASK

#define EXTI_CID1

struct stm32mp_exti_bank {};

struct stm32mp_exti_drv_data {};

struct stm32mp_exti_chip_data {};

struct stm32mp_exti_host_data {};

static const struct stm32mp_exti_bank stm32mp_exti_b1 =;

static const struct stm32mp_exti_bank stm32mp_exti_b2 =;

static const struct stm32mp_exti_bank stm32mp_exti_b3 =;

static const struct stm32mp_exti_bank *stm32mp_exti_banks[] =;

static struct irq_chip stm32mp_exti_chip;
static struct irq_chip stm32mp_exti_chip_direct;

#define EXTI_INVALID_IRQ
#define STM32MP_DESC_IRQ_SIZE

/*
 * Use some intentionally tricky logic here to initialize the whole array to
 * EXTI_INVALID_IRQ, but then override certain fields, requiring us to indicate
 * that we "know" that there are overrides in this structure, and we'll need to
 * disable that warning from W=1 builds.
 */
__diag_push();
__diag_ignore_all("-Woverride-init",
		  "logic to initialize all and then override some is OK");

static const u8 stm32mp1_desc_irq[] =;

static const u8 stm32mp13_desc_irq[] =;

__diag_pop();

static const struct stm32mp_exti_drv_data stm32mp1_drv_data =;

static const struct stm32mp_exti_drv_data stm32mp13_drv_data =;

static int stm32mp_exti_convert_type(struct irq_data *d, unsigned int type, u32 *rtsr, u32 *ftsr)
{}

static void stm32mp_chip_suspend(struct stm32mp_exti_chip_data *chip_data, u32 wake_active)
{}

static void stm32mp_chip_resume(struct stm32mp_exti_chip_data *chip_data, u32 mask_cache)
{}

/* directly set the target bit without reading first. */
static inline void stm32mp_exti_write_bit(struct irq_data *d, u32 reg)
{}

static inline u32 stm32mp_exti_set_bit(struct irq_data *d, u32 reg)
{}

static inline u32 stm32mp_exti_clr_bit(struct irq_data *d, u32 reg)
{}

static void stm32mp_exti_eoi(struct irq_data *d)
{}

static void stm32mp_exti_mask(struct irq_data *d)
{}

static void stm32mp_exti_unmask(struct irq_data *d)
{}

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

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

static int stm32mp_exti_set_affinity(struct irq_data *d, const struct cpumask *dest, bool force)
{}

static int stm32mp_exti_suspend(struct device *dev)
{}

static int stm32mp_exti_resume(struct device *dev)
{}

static int stm32mp_exti_retrigger(struct irq_data *d)
{}

static struct irq_chip stm32mp_exti_chip =;

static struct irq_chip stm32mp_exti_chip_direct =;

static int stm32mp_exti_domain_alloc(struct irq_domain *dm,
				     unsigned int virq,
				     unsigned int nr_irqs, void *data)
{}

static struct stm32mp_exti_chip_data *stm32mp_exti_chip_init(struct stm32mp_exti_host_data *h_data,
							     u32 bank_idx, struct device_node *node)
{}

static const struct irq_domain_ops stm32mp_exti_domain_ops =;

static void stm32mp_exti_check_rif(struct stm32mp_exti_host_data *host_data)
{}

static void stm32mp_exti_remove_irq(void *data)
{}

static int stm32mp_exti_probe(struct platform_device *pdev)
{}

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

static const struct dev_pm_ops stm32mp_exti_dev_pm_ops =;

static struct platform_driver stm32mp_exti_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();