18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * linux/arch/sh/boards/se/7751/irq.c
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2000  Kazumoto Kojima
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Hitachi SolutionEngine Support.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * Modified for 7751 Solution Engine by
108c2ecf20Sopenharmony_ci * Ian da Silva and Jeremy Siegel, 2001.
118c2ecf20Sopenharmony_ci */
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#include <linux/init.h>
148c2ecf20Sopenharmony_ci#include <linux/irq.h>
158c2ecf20Sopenharmony_ci#include <asm/irq.h>
168c2ecf20Sopenharmony_ci#include <mach-se/mach/se7751.h>
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistatic struct ipr_data ipr_irq_table[] = {
198c2ecf20Sopenharmony_ci	{ 13, 3, 3, 2 },
208c2ecf20Sopenharmony_ci	/* Add additional entries here as drivers are added and tested. */
218c2ecf20Sopenharmony_ci};
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_cistatic unsigned long ipr_offsets[] = {
248c2ecf20Sopenharmony_ci	BCR_ILCRA,
258c2ecf20Sopenharmony_ci	BCR_ILCRB,
268c2ecf20Sopenharmony_ci	BCR_ILCRC,
278c2ecf20Sopenharmony_ci	BCR_ILCRD,
288c2ecf20Sopenharmony_ci	BCR_ILCRE,
298c2ecf20Sopenharmony_ci	BCR_ILCRF,
308c2ecf20Sopenharmony_ci	BCR_ILCRG,
318c2ecf20Sopenharmony_ci};
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_cistatic struct ipr_desc ipr_irq_desc = {
348c2ecf20Sopenharmony_ci	.ipr_offsets	= ipr_offsets,
358c2ecf20Sopenharmony_ci	.nr_offsets	= ARRAY_SIZE(ipr_offsets),
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci	.ipr_data	= ipr_irq_table,
388c2ecf20Sopenharmony_ci	.nr_irqs	= ARRAY_SIZE(ipr_irq_table),
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci	.chip = {
418c2ecf20Sopenharmony_ci		.name	= "IPR-se7751",
428c2ecf20Sopenharmony_ci	},
438c2ecf20Sopenharmony_ci};
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci/*
468c2ecf20Sopenharmony_ci * Initialize IRQ setting
478c2ecf20Sopenharmony_ci */
488c2ecf20Sopenharmony_civoid __init init_7751se_IRQ(void)
498c2ecf20Sopenharmony_ci{
508c2ecf20Sopenharmony_ci	register_ipr_controller(&ipr_irq_desc);
518c2ecf20Sopenharmony_ci}
52