From mboxrd@z Thu Jan 1 00:00:00 1970 From: ben.dooks@codethink.co.uk (Ben Dooks) Date: Tue, 15 May 2012 10:54:20 +0100 Subject: [PATCH 2/8] arm: mach-armada: add source files In-Reply-To: <20120515092750.GD6820@lunn.ch> References: <1337072084-21967-1-git-send-email-thomas.petazzoni@free-electrons.com> <1337072084-21967-3-git-send-email-thomas.petazzoni@free-electrons.com> <20120515092750.GD6820@lunn.ch> Message-ID: <4FB227CC.8090808@codethink.co.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 15/05/12 10:27, Andrew Lunn wrote: > >> diff --git a/arch/arm/mach-armada/irq.c b/arch/arm/mach-armada/irq.c >> new file mode 100644 >> index 0000000..7006429 >> --- /dev/null >> +++ b/arch/arm/mach-armada/irq.c >> @@ -0,0 +1,116 @@ >> +/* >> + * Marvall Armada SoC IRQ handling >> + * >> + * Copyright (C) 2012 Marvell >> + * >> + * Lior Amsalem >> + * Gregory CLEMENT >> + * Thomas Petazzoni >> + * >> + * This file is licensed under the terms of the GNU General Public >> + * License version 2. This program is licensed "as is" without any >> + * warranty of any kind, whether express or implied. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +/* Interrupt Controller Registers Map */ >> +#define ARMADA_INT_SET_MASK_OFFS (0xBC) >> +#define ARMADA_INT_CLEAR_MASK_OFFS (0xB8) >> + >> +#define ARMADA_INT_SET_ENABLE_OFFS (0xA30) >> +#define ARMADA_INT_CLEAR_ENABLE_OFFS (0xA34) >> + >> +#define ARMADA_CPU_INTACK_OFFS (0xB4) >> + >> +static void __iomem *per_cpu_int_base; >> +static void __iomem *main_int_base; >> +static struct irq_domain *armada_mpic_domain; >> + >> +static void armada_irq_mask(struct irq_data *d) >> +{ >> + writel(d->irq, per_cpu_int_base + ARMADA_INT_CLEAR_MASK_OFFS); >> +} >> + >> +static void armada_irq_unmask(struct irq_data *d) >> +{ >> + writel(d->irq, per_cpu_int_base + ARMADA_INT_SET_MASK_OFFS); >> +} > > All the other orion's use the generic-chip interrupt routines. Can > this device also use it? It would also allow you to use the generic DT > bindings. Possibly, but there'll need to be support for setting interrupt affinity added at some point, as this is used on multi-core systems. -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius