mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 09:56:40 +07:00
3ef374a22b
This is the board support patch for ab8500 gpio driver on mach-ux500.Patch implements 16 virtual IRQ mapped to 16 interrupt capable AB8500 GPIOs. Signed-off-by: Bibek Basu <bibek.basu@stericsson.com> [Modify for header file placement] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
59 lines
1.7 KiB
C
59 lines
1.7 KiB
C
/*
|
|
* Copyright (C) ST-Ericsson SA 2010
|
|
*
|
|
* Author: Rabin Vincent <rabin.vincent@stericsson.com>
|
|
* License terms: GNU General Public License (GPL) version 2
|
|
*/
|
|
|
|
#ifndef __MACH_IRQS_BOARD_MOP500_H
|
|
#define __MACH_IRQS_BOARD_MOP500_H
|
|
|
|
/* Number of AB8500 irqs is taken from header file */
|
|
#include <linux/mfd/ab8500.h>
|
|
|
|
#define MOP500_AB8500_IRQ_BASE IRQ_BOARD_START
|
|
#define MOP500_AB8500_IRQ_END (MOP500_AB8500_IRQ_BASE \
|
|
+ AB8500_NR_IRQS)
|
|
|
|
/* TC35892 */
|
|
#define TC35892_NR_INTERNAL_IRQS 8
|
|
#define TC35892_INT_GPIO(x) (TC35892_NR_INTERNAL_IRQS + (x))
|
|
#define TC35892_NR_GPIOS 24
|
|
#define TC35892_NR_IRQS TC35892_INT_GPIO(TC35892_NR_GPIOS)
|
|
|
|
#define MOP500_EGPIO_NR_IRQS TC35892_NR_IRQS
|
|
|
|
#define MOP500_EGPIO_IRQ_BASE MOP500_AB8500_IRQ_END
|
|
#define MOP500_EGPIO_IRQ_END (MOP500_EGPIO_IRQ_BASE \
|
|
+ MOP500_EGPIO_NR_IRQS)
|
|
/* STMPE1601 irqs */
|
|
#define STMPE_NR_INTERNAL_IRQS 9
|
|
#define STMPE_INT_GPIO(x) (STMPE_NR_INTERNAL_IRQS + (x))
|
|
#define STMPE_NR_GPIOS 24
|
|
#define STMPE_NR_IRQS STMPE_INT_GPIO(STMPE_NR_GPIOS)
|
|
|
|
#define MOP500_STMPE1601_IRQBASE MOP500_EGPIO_IRQ_END
|
|
#define MOP500_STMPE1601_IRQ(x) (MOP500_STMPE1601_IRQBASE + (x))
|
|
|
|
#define MOP500_STMPE1601_IRQ_END \
|
|
MOP500_STMPE1601_IRQ(STMPE_NR_INTERNAL_IRQS)
|
|
|
|
/* AB8500 virtual gpio IRQ */
|
|
#define AB8500_VIR_GPIO_NR_IRQS 16
|
|
|
|
#define MOP500_AB8500_VIR_GPIO_IRQ_BASE \
|
|
MOP500_STMPE1601_IRQ_END
|
|
#define MOP500_AB8500_VIR_GPIO_IRQ_END \
|
|
(MOP500_AB8500_VIR_GPIO_IRQ_BASE + AB8500_VIR_GPIO_NR_IRQS)
|
|
|
|
#define MOP500_NR_IRQS MOP500_AB8500_VIR_GPIO_IRQ_END
|
|
|
|
#define MOP500_IRQ_END MOP500_NR_IRQS
|
|
|
|
#if MOP500_IRQ_END > IRQ_BOARD_END
|
|
#undef IRQ_BOARD_END
|
|
#define IRQ_BOARD_END MOP500_IRQ_END
|
|
#endif
|
|
|
|
#endif
|