From patchwork Wed Oct 6 07:18:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 234951 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o967GMic009775 for ; Wed, 6 Oct 2010 07:16:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932148Ab0JFHQa (ORCPT ); Wed, 6 Oct 2010 03:16:30 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:41999 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932110Ab0JFHQa (ORCPT ); Wed, 6 Oct 2010 03:16:30 -0400 Received: by pxi10 with SMTP id 10so1837508pxi.19 for ; Wed, 06 Oct 2010 00:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=zUZykkxjrZkQax2wAi8YjzR91RLf+MXNfDEXezfZc10=; b=FocfVbJAyAHj93nzFABBhCqrBpkdECSjV+Rwnrh5rh5iJvrg4ZCKzD6L8jTnIUay+j lasrHSD4bFr/jBfrkO+Cz9MP4XfcHOcNI5/fbXI3HMayXlmKaBspcfyfWVcth+rCRnYn lGrLq05w2n9p0vU61Bfx0VEXBUEM2qEW/US6I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=IOeuwNO+1+bC5ISyqoS3NUpd1+caMHJ2qP4XUGs8uW9V+BUI7LaVFMu+DrDzLk0QFL w23G752z4aPP9cloyIcjYPJyJVVsmkcJvUIoskIvtCuKm2CdefjWBkLXRZhOjZYLp99K Y2y/7Kq/62j1wOKQ4tQyWgxqzSUoTC/J/B5LA= Received: by 10.142.200.2 with SMTP id x2mr11246185wff.326.1286349389621; Wed, 06 Oct 2010 00:16:29 -0700 (PDT) Received: from [127.0.0.1] (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id x8sm515966wff.23.2010.10.06.00.16.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 06 Oct 2010 00:16:29 -0700 (PDT) From: Magnus Damm To: linux@arm.linux.org.uk Cc: grant.likely@secretlab.ca, Magnus Damm , lethal@linux-sh.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org Date: Wed, 06 Oct 2010 16:18:37 +0900 Message-Id: <20101006071837.28048.58439.sendpatchset@t400s> In-Reply-To: <20101006071731.28048.89938.sendpatchset@t400s> References: <20101006071731.28048.89938.sendpatchset@t400s> Subject: [PATCH 08/08] ARM: Dynamic IRQ demux for SH-Mobile Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 06 Oct 2010 07:16:31 +0000 (UTC) --- 0008/arch/arm/Kconfig +++ work/arch/arm/Kconfig 2010-10-06 14:43:07.000000000 +0900 @@ -1377,6 +1377,7 @@ config SPARSE_IRQ experimental until they have been independently verified. config DEFAULT_IRQ_DEMUX + default n if ARCH_SHMOBILE def_bool y source "mm/Kconfig" --- 0001/arch/arm/mach-shmobile/Makefile +++ work/arch/arm/mach-shmobile/Makefile 2010-10-06 14:36:27.000000000 +0900 @@ -4,6 +4,7 @@ # Common objects obj-y := timer.o console.o clock.o pm_runtime.o +obj-y += entry-irq-common.o # CPU objects obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o --- /dev/null +++ work/arch/arm/mach-shmobile/entry-irq-common.S 2010-10-06 14:38:29.000000000 +0900 @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2010 Magnus Damm + * Copyright (C) 2008 Renesas Solutions Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include +#include +#include + + .macro get_irqnr_preamble, base, tmp + ldr \base, =INTFLGA + .endm + + .macro get_irqnr_and_base, irqnr, irqstat, base, tmp + ldr \irqnr, [\base] + cmp \irqnr, #0 + beq 1000f + /* intevt to irq number */ + lsr \irqnr, \irqnr, #0x5 + subs \irqnr, \irqnr, #16 + +1000: + .endm + + __irq_svc shmobile_common + __irq_usr shmobile_common --- 0001/arch/arm/mach-shmobile/include/mach/common.h +++ work/arch/arm/mach-shmobile/include/mach/common.h 2010-10-06 14:39:29.000000000 +0900 @@ -5,6 +5,7 @@ extern struct sys_timer shmobile_timer; extern void shmobile_setup_console(void); struct clk; extern int clk_init(void); +extern char __irq_usr_shmobile_common[], __irq_svc_shmobile_common[]; extern void sh7367_init_irq(void); extern void sh7367_add_early_devices(void); --- 0001/arch/arm/mach-shmobile/include/mach/entry-macro.S +++ work/arch/arm/mach-shmobile/include/mach/entry-macro.S 2010-10-06 14:38:01.000000000 +0900 @@ -14,26 +14,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include .macro disable_fiq .endm - .macro get_irqnr_preamble, base, tmp - ldr \base, =INTFLGA - .endm - .macro arch_ret_to_user, tmp1, tmp2 .endm - - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - ldr \irqnr, [\base] - cmp \irqnr, #0 - beq 1000f - /* intevt to irq number */ - lsr \irqnr, \irqnr, #0x5 - subs \irqnr, \irqnr, #16 - -1000: - .endm --- 0001/arch/arm/mach-shmobile/intc-sh7367.c +++ work/arch/arm/mach-shmobile/intc-sh7367.c 2010-10-06 14:44:20.000000000 +0900 @@ -24,6 +24,8 @@ #include #include #include +#include +#include enum { UNUSED_INTCA = 0, @@ -431,6 +433,8 @@ void __init sh7367_init_irq(void) { void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); + setup_irq_stubs(__irq_usr_shmobile_common, __irq_svc_shmobile_common); + register_intc_controller(&intca_desc); register_intc_controller(&intcs_desc); --- 0001/arch/arm/mach-shmobile/intc-sh7372.c +++ work/arch/arm/mach-shmobile/intc-sh7372.c 2010-10-06 14:44:09.000000000 +0900 @@ -24,6 +24,8 @@ #include #include #include +#include +#include enum { UNUSED_INTCA = 0, @@ -580,6 +582,8 @@ void __init sh7372_init_irq(void) { void __iomem *intevtsa = ioremap_nocache(0xffd20100, PAGE_SIZE); + setup_irq_stubs(__irq_usr_shmobile_common, __irq_svc_shmobile_common); + register_intc_controller(&intca_desc); register_intc_controller(&intcs_desc); --- 0001/arch/arm/mach-shmobile/intc-sh7377.c +++ work/arch/arm/mach-shmobile/intc-sh7377.c 2010-10-06 14:44:28.000000000 +0900 @@ -24,6 +24,8 @@ #include #include #include +#include +#include enum { UNUSED_INTCA = 0, @@ -637,6 +639,8 @@ void __init sh7377_init_irq(void) { void __iomem *intevtsa = ioremap_nocache(INTEVTSA, PAGE_SIZE); + setup_irq_stubs(__irq_usr_shmobile_common, __irq_svc_shmobile_common); + register_intc_controller(&intca_desc); register_intc_controller(&intcs_desc);