arm: omap: move intc to drivers/irqchip/
Subsystems (7)
cover arm: omap: move intc to drivers/irqchip/
Hi folks,
here's another rebase of the original series moving INTC to drivers.
There aren't many changes, only some fixes here and there because of recent changes to irq_domain and irqchip.
I have also added a patch to enable INTC address space protection so that only privileged modes can access INTC's address space.
Patches tested on top of v3.17-rc7 with a beagle bone black, the only plataform I have which still uses INTC.
Tony, if you can run your PM test cases on your side, I'd be really glad.
cheers
Felipe Balbi (35):
arm: omap: irq: make omap_irq_base global
arm: omap: irq: define INTC_ILR0 register
arm: omap: irq: start to remove irq_banks array
arm: omap: irq: add a global omap_nr_irqs variable
arm: omap: irq: remove rest of irq_banks usage
arm: omap: irq: remove unused macro
arm: omap: irq: switch over to intc_readl on omap_intc_handle_irq
arm: omap: irq: remove unnecessary base_addr argument
arm: omap: irq: rename omap3_intc_regs
arm: omap: irq: always define omap3 support
arm: omap: irq: reorganize code a little bit
arm: omap: irq: make intc_of_init static
arm: omap: irq: call set_handle_irq() from intc_of_init
arm: omap: irq: use IRQCHIP_DECLARE macro
arm: omap: irq: drop .handle_irq and .init_irq fields
arm: omap: irq: add specific compatibles for omap3 and am33xx devices
arm: omap: irq: use compatible flag to figure out number of IRQ lines
arm: boot: dts: am33xx/omap3: fix intc compatible flag
arm: omap: irq: drop ti,intc-size support
arm: boot: dts: omap2/3/am33xx: drop ti,intc-size
arm: omap: irq: move some more code around
arm: omap: irq: call set_handle_irq() from .init_irq
arm: omap: irq: drop omap3_intc_handle_irq()
arm: omap: irq: drop omap2_intc_handle_irq()
arm: omap: irq: remove unnecessary header
arm: omap: irq: remove nr_irqs argument
arm: omap: irq: introduce omap_nr_pending
arm: omap: irq: get rid of ifdef hack
arm: omap: intc: switch over to linear irq domain
irqchip: add irq-omap-intc.h header
arm: omap: irq: move irq.c to drivers/irqchip/
irq: intc: minor improvement to omap_irq_pending()
irq: intc: comment style cleanup
irq: intc: remove unnecesary of_address_to_resource() call
irq: intc: enable IP protection
arch/arm/boot/dts/am33xx.dtsi | 3 +- arch/arm/boot/dts/omap2.dtsi | 1 - arch/arm/boot/dts/omap3.dtsi | 3 +- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/Makefile | 3 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-am3517crane.c | 2 +- arch/arm/mach-omap2/board-am3517evm.c | 2 +- arch/arm/mach-omap2/board-cm-t35.c | 3 +- arch/arm/mach-omap2/board-cm-t3517.c | 2 +- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-generic.c | 14 - arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3logic.c | 3 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-omap3stalker.c | 2 +- arch/arm/mach-omap2/board-omap3touchbook.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 22 -- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 380 --------------------------- arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + drivers/irqchip/Kconfig | 5 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-omap-intc.c | 408 +++++++++++++++++++++++++++++ include/linux/irqchip/irq-omap-intc.h | 32 +++ 30 files changed, 468 insertions(+), 439 deletions(-) delete mode 100644 arch/arm/mach-omap2/irq.c create mode 100644 drivers/irqchip/irq-omap-intc.c create mode 100644 include/linux/irqchip/irq-omap-intc.h
Signature · 1 line
2.0.1.563.g66f467c
PATCH 1/35 arm: omap: irq: make omap_irq_base global
This is in preparation for removing the pointlessirq_banks array.
--- arch/arm/mach-omap2/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/irq.c +1 -1
@@ -68,6 +68,7 @@ static struct omap_irq_bank { };static struct irq_domain *domain; +static void __iomem *omap_irq_base;/* Structure to save interrupt controller context */ struct omap3_intc_regs {
@@ -161,7 +162,6 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)static void __init omap_init_irq (u32 base,int nr_irqs,struct device_node *node) { -void __iomem *omap_irq_base;unsigned long nr_of_irqs =0 ;unsigned int nr_banks =0 ;int i, j, irq_base;
Signature · 1 line
2.0.1.563.g66f467c
PATCH 2/35 arm: omap: irq: define INTC_ILR0 register
In reply to Felipe Balbithis is currently used as a hardcoded 0x100
offset.
--- arch/arm/mach-omap2/irq.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-omap2/irq.c +1 -0
@@ -41,6 +41,7 @@#define INTC_MIR_CLEAR0 0x0088#define INTC_MIR_SET0 0x008c#define INTC_PENDING_IRQ0 0x0098 +#define INTC_ILR0 0x0100/* Number of IRQ state bits in each MIR register */ #define IRQ_BITS_PER_REG 32
Signature · 1 line
2.0.1.563.g66f467c
PATCH 3/35 arm: omap: irq: start to remove irq_banks array
In reply to Felipe BalbiWe have a single bank in that array, this patch is in preparation to remove that array. It just shifts everything to a new set of functions for register IO while also removing old ones.
--- arch/arm/mach-omap2/irq.c | 64 ++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 37 deletions(-)
arch/arm/mach-omap2/irq.c +27 -37
@@ -82,21 +82,20 @@ struct omap3_intc_regs { };/* INTC bank register get/set */ - -static void intc_bank_write_reg (u32 val,struct omap_irq_bank *bank,u16 reg) +static void intc_writel (u32 reg,u32 val) { -writel_relaxed (val, bank->base_reg + reg); +writel_relaxed (val, omap_irq_base + reg); } -static u32 intc_bank_read_reg (struct omap_irq_bank *bank,u16 reg) +static u32 intc_readl (u32 reg) { -return readl_relaxed (bank->base_reg + reg); +return readl_relaxed (omap_irq_base + reg); }/* XXX: FIQ and additional INTC support (only MPU at the moment) */ static void omap_ack_irq (struct irq_data *d) { -intc_bank_write_reg (0x1 , &irq_banks[0 ],INTC_CONTROL ); +intc_writel (INTC_CONTROL ,0x1 ); }static void omap_mask_ack_irq (struct irq_data *d)
@@ -109,19 +108,19 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank) {unsigned long tmp; - tmp =intc_bank_read_reg (bank,INTC_REVISION ) &0xff ; + tmp =intc_readl (INTC_REVISION ) &0xff ;pr_info ("IRQ: Found an INTC at 0x%p (revision %ld.%ld) with %d interrupts\n" , bank->base_reg, tmp >>4 , tmp &0xf , bank->nr_irqs); - tmp =intc_bank_read_reg (bank,INTC_SYSCONFIG ); + tmp =intc_readl (INTC_SYSCONFIG ); tmp |=1 <<1 ;/* soft reset */ -intc_bank_write_reg (tmp, bank,INTC_SYSCONFIG ); +intc_writel (INTC_SYSCONFIG , tmp); -while (!(intc_bank_read_reg (bank,INTC_SYSSTATUS ) &0x1 )) +while (!(intc_readl (INTC_SYSSTATUS ) &0x1 ))/* Wait for reset to complete */ ;/* Enable autoidle */ -intc_bank_write_reg (1 <<0 , bank,INTC_SYSCONFIG ); +intc_writel (INTC_SYSCONFIG ,1 <<0 ); }int omap_irq_pending (void )
@@ -133,7 +132,7 @@ int omap_irq_pending(void)int irq;for (irq =0 ; irq < bank->nr_irqs; irq +=32 ) -if (intc_bank_read_reg (bank,INTC_PENDING_IRQ0 + +if (intc_readl (INTC_PENDING_IRQ0 + ((irq >>5 ) <<5 )))return 1 ; }
@@ -307,22 +306,20 @@ void omap_intc_save_context(void) {int ind =0 , i =0 ;for (ind =0 ; ind <ARRAY_SIZE (irq_banks); ind++) { -struct omap_irq_bank *bank = irq_banks + ind; intc_context[ind].sysconfig = -intc_bank_read_reg (bank,INTC_SYSCONFIG ); +intc_readl (INTC_SYSCONFIG ); intc_context[ind].protection = -intc_bank_read_reg (bank,INTC_PROTECTION ); +intc_readl (INTC_PROTECTION ); intc_context[ind].idle = -intc_bank_read_reg (bank,INTC_IDLE ); +intc_readl (INTC_IDLE ); intc_context[ind].threshold = -intc_bank_read_reg (bank,INTC_THRESHOLD ); +intc_readl (INTC_THRESHOLD );for (i =0 ; i <INTCPS_NR_IRQS ; i++) intc_context[ind].ilr[i] = -intc_bank_read_reg (bank, (0x100 +0x4 *i)); +intc_readl ((INTC_ILR0 +0x4 * i));for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) intc_context[ind].mir[i] = -intc_bank_read_reg (&irq_banks[0 ],INTC_MIR0 + - (0x20 * i)); +intc_readl (INTC_MIR0 + (0x20 * i)); } }
@@ -331,23 +328,16 @@ void omap_intc_restore_context(void)int ind =0 , i =0 ;for (ind =0 ; ind <ARRAY_SIZE (irq_banks); ind++) { -struct omap_irq_bank *bank = irq_banks + ind; -intc_bank_write_reg (intc_context[ind].sysconfig, - bank,INTC_SYSCONFIG ); -intc_bank_write_reg (intc_context[ind].sysconfig, - bank,INTC_SYSCONFIG ); -intc_bank_write_reg (intc_context[ind].protection, - bank,INTC_PROTECTION ); -intc_bank_write_reg (intc_context[ind].idle, - bank,INTC_IDLE ); -intc_bank_write_reg (intc_context[ind].threshold, - bank,INTC_THRESHOLD ); +intc_writel (INTC_SYSCONFIG , intc_context[ind].sysconfig); +intc_writel (INTC_PROTECTION , intc_context[ind].protection); +intc_writel (INTC_IDLE , intc_context[ind].idle); +intc_writel (INTC_THRESHOLD , intc_context[ind].threshold);for (i =0 ; i <INTCPS_NR_IRQS ; i++) -intc_bank_write_reg (intc_context[ind].ilr[i], - bank, (0x100 +0x4 *i)); +intc_writel (INTC_ILR0 +0x4 * i, + intc_context[ind].ilr[i]);for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) -intc_bank_write_reg (intc_context[ind].mir[i], - &irq_banks[0 ],INTC_MIR0 + (0x20 * i)); +intc_writel (INTC_MIR0 +0x20 * i, + intc_context[ind].mir[i]); }/* MIRs are saved and restore with other PRCM registers */ }
@@ -364,13 +354,13 @@ void omap3_intc_prepare_idle(void)* Disable autoidle as it can stall interrupt controller, * cf. errata ID i540 for 3430 (all revisions up to 3.1.x) */ -intc_bank_write_reg (0 , &irq_banks[0 ],INTC_SYSCONFIG ); +intc_writel (INTC_SYSCONFIG ,0 ); }void omap3_intc_resume_idle (void ) {/* Re-enable autoidle */ -intc_bank_write_reg (1 , &irq_banks[0 ],INTC_SYSCONFIG ); +intc_writel (INTC_SYSCONFIG ,1 ); } asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
Signature · 1 line
2.0.1.563.g66f467c
PATCH 4/35 arm: omap: irq: add a global omap_nr_irqs variable
In reply to Felipe Balbithis will cache number of irqs. Also in preparation for removal of irq_banks array.
--- arch/arm/mach-omap2/irq.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-omap2/irq.c +3 -0
@@ -70,6 +70,7 @@ static struct omap_irq_bank {static struct irq_domain *domain;static void __iomem *omap_irq_base; +static int omap_nr_irqs =96 ;/* Structure to save interrupt controller context */ struct omap3_intc_regs {
@@ -170,6 +171,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs,if (WARN_ON (!omap_irq_base))return ; + omap_nr_irqs = nr_irqs; + irq_base =irq_alloc_descs (-1 ,0 , nr_irqs,0 );if (irq_base <0 ) {pr_warn ("Couldn't allocate IRQ numbers\n" );
Signature · 1 line
2.0.1.563.g66f467c
PATCH 5/35 arm: omap: irq: remove rest of irq_banks usage
In reply to Felipe Balbinow we can finally remove the pointless irq_banks
array.
--- arch/arm/mach-omap2/irq.c | 128 +++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 81 deletions(-)
arch/arm/mach-omap2/irq.c +47 -81
@@ -49,8 +49,8 @@#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)#define INTCPS_SIR_IRQ_OFFSET 0x0040/* omap2/3 active interrupt offset */ #define ACTIVEIRQ_MASK 0x7f/* omap2/3 active interrupt bits */ +#define INTCPS_NR_ILR_REGS 128#define INTCPS_NR_MIR_REGS 3 -#define INTCPS_NR_IRQS 96/* * OMAP2 has a number of different interrupt controllers, each interrupt
@@ -58,15 +58,6 @@* fairly consistent for each bank, but not all registers are implemented * for each bank.. when in doubt, consult the TRM. */ -static struct omap_irq_bank { -void __iomem *base_reg; -unsigned int nr_irqs; -} __attribute__ ((aligned (4 ))) irq_banks[] = { - { -/* MPU INTC */ - .nr_irqs =96 , - }, -};static struct irq_domain *domain;static void __iomem *omap_irq_base;
@@ -78,7 +69,7 @@ struct omap3_intc_regs {u32 protection;u32 idle;u32 threshold; -u32 ilr[INTCPS_NR_IRQS ]; +u32 ilr[INTCPS_NR_ILR_REGS ];u32 mir[INTCPS_NR_MIR_REGS ]; };
@@ -105,13 +96,14 @@ static void omap_mask_ack_irq(struct irq_data *d)omap_ack_irq (d); } -static void __init omap_irq_bank_init_one (struct omap_irq_bank *bank) +static void __init omap_irq_soft_reset (void ) {unsigned long tmp; tmp =intc_readl (INTC_REVISION ) &0xff ; +pr_info ("IRQ: Found an INTC at 0x%p (revision %ld.%ld) with %d interrupts\n" , - bank->base_reg, tmp >>4 , tmp &0xf , bank->nr_irqs); + omap_irq_base, tmp >>4 , tmp &0xf , omap_nr_irqs); tmp =intc_readl (INTC_SYSCONFIG ); tmp |=1 <<1 ;/* soft reset */
@@ -126,17 +118,12 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)int omap_irq_pending (void ) { -int i; +int irq; -for (i =0 ; i <ARRAY_SIZE (irq_banks); i++) { -struct omap_irq_bank *bank = irq_banks + i; -int irq; - -for (irq =0 ; irq < bank->nr_irqs; irq +=32 ) -if (intc_readl (INTC_PENDING_IRQ0 + - ((irq >>5 ) <<5 ))) -return 1 ; - } +for (irq =0 ; irq < omap_nr_irqs; irq +=32 ) +if (intc_readl (INTC_PENDING_IRQ0 + + ((irq >>5 ) <<5 ))) +return 1 ;return 0 ; }
@@ -163,9 +150,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)static void __init omap_init_irq (u32 base,int nr_irqs,struct device_node *node) { -unsigned long nr_of_irqs =0 ; -unsigned int nr_banks =0 ; -int i, j, irq_base; +int j, irq_base; omap_irq_base =ioremap (base,SZ_4K );if (WARN_ON (!omap_irq_base))
@@ -180,31 +165,12 @@ static void __init omap_init_irq(u32 base, int nr_irqs, } domain =irq_domain_add_legacy (node, nr_irqs, irq_base,0 , - &irq_domain_simple_ops,NULL ); - -for (i =0 ; i <ARRAY_SIZE (irq_banks); i++) { -struct omap_irq_bank *bank = irq_banks + i; - - bank->nr_irqs = nr_irqs; - -/* Static mapping, never released */ - bank->base_reg =ioremap (base,SZ_4K ); -if (!bank->base_reg) { -pr_err ("Could not ioremap irq bank%i\n" , i); -continue ; - } - -omap_irq_bank_init_one (bank); + &irq_domain_simple_ops,NULL ); -for (j =0 ; j < bank->nr_irqs; j +=32 ) -omap_alloc_gc (bank->base_reg + j, j + irq_base,32 ); +omap_irq_soft_reset (); - nr_of_irqs += bank->nr_irqs; - nr_banks++; - } - -pr_info ("Total of %ld interrupts on %d active controller%s\n" , - nr_of_irqs, nr_banks, nr_banks >1 ?"s" :"" ); +for (j =0 ; j < omap_nr_irqs; j +=32 ) +omap_alloc_gc (omap_irq_base + j, j + irq_base,32 ); }void __init omap2_init_irq (void )
@@ -303,45 +269,45 @@ void __init omap_intc_of_init(void) }#if defined(CONFIG_ARCH_OMAP3 ) || defined(CONFIG_SOC_AM33XX ) -static struct omap3_intc_regs intc_context[ARRAY_SIZE (irq_banks)]; +static struct omap3_intc_regs intc_context;void omap_intc_save_context (void ) { -int ind =0 , i =0 ; -for (ind =0 ; ind <ARRAY_SIZE (irq_banks); ind++) { - intc_context[ind].sysconfig = -intc_readl (INTC_SYSCONFIG ); - intc_context[ind].protection = -intc_readl (INTC_PROTECTION ); - intc_context[ind].idle = -intc_readl (INTC_IDLE ); - intc_context[ind].threshold = -intc_readl (INTC_THRESHOLD ); -for (i =0 ; i <INTCPS_NR_IRQS ; i++) - intc_context[ind].ilr[i] = -intc_readl ((INTC_ILR0 +0x4 * i)); -for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) - intc_context[ind].mir[i] = -intc_readl (INTC_MIR0 + (0x20 * i)); - } +int i; + + intc_context.sysconfig = +intc_readl (INTC_SYSCONFIG ); + intc_context.protection = +intc_readl (INTC_PROTECTION ); + intc_context.idle = +intc_readl (INTC_IDLE ); + intc_context.threshold = +intc_readl (INTC_THRESHOLD ); + +for (i =0 ; i < omap_nr_irqs; i++) + intc_context.ilr[i] = +intc_readl ((INTC_ILR0 +0x4 * i)); +for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) + intc_context.mir[i] = +intc_readl (INTC_MIR0 + (0x20 * i)); }void omap_intc_restore_context (void ) { -int ind =0 , i =0 ; - -for (ind =0 ; ind <ARRAY_SIZE (irq_banks); ind++) { -intc_writel (INTC_SYSCONFIG , intc_context[ind].sysconfig); -intc_writel (INTC_PROTECTION , intc_context[ind].protection); -intc_writel (INTC_IDLE , intc_context[ind].idle); -intc_writel (INTC_THRESHOLD , intc_context[ind].threshold); -for (i =0 ; i <INTCPS_NR_IRQS ; i++) -intc_writel (INTC_ILR0 +0x4 * i, - intc_context[ind].ilr[i]); -for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) -intc_writel (INTC_MIR0 +0x20 * i, - intc_context[ind].mir[i]); - } +int i; + +intc_writel (INTC_SYSCONFIG , intc_context.sysconfig); +intc_writel (INTC_PROTECTION , intc_context.protection); +intc_writel (INTC_IDLE , intc_context.idle); +intc_writel (INTC_THRESHOLD , intc_context.threshold); + +for (i =0 ; i < omap_nr_irqs; i++) +intc_writel (INTC_ILR0 +0x4 * i, + intc_context.ilr[i]); + +for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) +intc_writel (INTC_MIR0 +0x20 * i, + intc_context.mir[i]);/* MIRs are saved and restore with other PRCM registers */ }
Signature · 1 line
2.0.1.563.g66f467c
PATCH 6/35 arm: omap: irq: remove unused macro
In reply to Felipe Balbino functional changes.
--- arch/arm/mach-omap2/irq.c | 2 -- 1 file changed, 2 deletions(-)
arch/arm/mach-omap2/irq.c +0 -2
@@ -42,8 +42,6 @@#define INTC_MIR_SET0 0x008c#define INTC_PENDING_IRQ0 0x0098#define INTC_ILR0 0x0100 -/* Number of IRQ state bits in each MIR register */ -#define IRQ_BITS_PER_REG 32#define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE)#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)
Signature · 1 line
2.0.1.563.g66f467c
PATCH 7/35 arm: omap: irq: switch over to intc_readl on omap_intc_handle_irq
In reply to Felipe Balbian almost blind conversion from readl_relaxed
to our newly introduced intc_readl().
While at that, also remove some hardcoded
register addresses.
--- arch/arm/mach-omap2/irq.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/irq.c +8 -6
@@ -41,11 +41,13 @@#define INTC_MIR_CLEAR0 0x0088#define INTC_MIR_SET0 0x008c#define INTC_PENDING_IRQ0 0x0098 +#define INTC_PENDING_IRQ1 0x00b8 +#define INTC_PENDING_IRQ2 0x00d8 +#define INTC_PENDING_IRQ3 0x00f8#define INTC_ILR0 0x0100#define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE)#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) -#define INTCPS_SIR_IRQ_OFFSET 0x0040/* omap2/3 active interrupt offset */ #define ACTIVEIRQ_MASK 0x7f/* omap2/3 active interrupt bits */ #define INTCPS_NR_ILR_REGS 128#define INTCPS_NR_MIR_REGS 3
@@ -192,26 +194,26 @@ static inline void omap_intc_handle_irq(void __iomem *base_addr, struct pt_regsint handled_irq =0 ; do { - irqnr = readl_relaxed(base_addr + 0x98); + irqnr = intc_readl(INTC_PENDING_IRQ0); if (irqnr) goto out; - irqnr = readl_relaxed(base_addr + 0xb8); + irqnr = intc_readl(INTC_PENDING_IRQ1); if (irqnr) goto out; - irqnr = readl_relaxed(base_addr + 0xd8); + irqnr = intc_readl(INTC_PENDING_IRQ2); #if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX) if (irqnr) goto out; - irqnr = readl_relaxed(base_addr + 0xf8); + irqnr = intc_readl(INTC_PENDING_IRQ3); #endif out: if (!irqnr) break; - irqnr = readl_relaxed(base_addr + INTCPS_SIR_IRQ_OFFSET); + irqnr = intc_readl(INTC_SIR); irqnr &= ACTIVEIRQ_MASK; if (irqnr) {
Signature · 1 line
2.0.1.563.g66f467c
PATCH 8/35 arm: omap: irq: remove unnecessary base_addr argument
In reply to Felipe Balbiomap_intc_handle_irq now had an unnecessarybase_addr argument. Let's remove it and fix
all callers.
--- arch/arm/mach-omap2/irq.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/irq.c +3 -7
@@ -46,8 +46,6 @@#define INTC_PENDING_IRQ3 0x00f8#define INTC_ILR0 0x0100 -#define OMAP2_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) -#define OMAP3_IRQ_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE)#define ACTIVEIRQ_MASK 0x7f/* omap2/3 active interrupt bits */ #define INTCPS_NR_ILR_REGS 128#define INTCPS_NR_MIR_REGS 3
@@ -188,7 +186,7 @@ void __init ti81xx_init_irq(void)omap_init_irq (OMAP34XX_IC_BASE ,128 ,NULL ); } -static inline void omap_intc_handle_irq (void __iomem *base_addr,struct pt_regs *regs) +static inline void omap_intc_handle_irq (struct pt_regs *regs) {u32 irqnr;int handled_irq =0 ;
@@ -232,8 +230,7 @@ out: asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs) { -void __iomem *base_addr =OMAP2_IRQ_BASE ; -omap_intc_handle_irq (base_addr, regs); +omap_intc_handle_irq (regs); } int __init intc_of_init(struct device_node *node,
@@ -334,7 +331,6 @@ void omap3_intc_resume_idle(void) asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs) { -void __iomem *base_addr =OMAP3_IRQ_BASE ; -omap_intc_handle_irq (base_addr, regs); +omap_intc_handle_irq (regs); }#endif /* CONFIG_ARCH_OMAP3 */
Signature · 1 line
2.0.1.563.g66f467c
PATCH 9/35 arm: omap: irq: rename omap3_intc_regs
In reply to Felipe Balbijust to make it clearer that it can
be used on all omaps.
--- arch/arm/mach-omap2/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/irq.c +2 -2
@@ -62,7 +62,7 @@ static void __iomem *omap_irq_base;static int omap_nr_irqs =96 ;/* Structure to save interrupt controller context */ -struct omap3_intc_regs { +struct omap_intc_regs {u32 sysconfig;u32 protection;u32 idle;
@@ -266,7 +266,7 @@ void __init omap_intc_of_init(void) }#if defined(CONFIG_ARCH_OMAP3 ) || defined(CONFIG_SOC_AM33XX ) -static struct omap3_intc_regs intc_context; +static struct omap_intc_regs intc_context;void omap_intc_save_context (void ) {
Signature · 1 line
2.0.1.563.g66f467c
PATCH 10/35 arm: omap: irq: always define omap3 support
In reply to Felipe Balbiremove ifdef around omap3 INTC support. This
will make it easier to reuse code for PM.
--- arch/arm/mach-omap2/irq.c | 2 -- 1 file changed, 2 deletions(-)
arch/arm/mach-omap2/irq.c +0 -2
@@ -265,7 +265,6 @@ void __init omap_intc_of_init(void)of_irq_init (irq_match); } -#if defined(CONFIG_ARCH_OMAP3 ) || defined(CONFIG_SOC_AM33XX )static struct omap_intc_regs intc_context;void omap_intc_save_context (void )
@@ -333,4 +332,3 @@ asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs {omap_intc_handle_irq (regs); } -#endif /* CONFIG_ARCH_OMAP3 */
Signature · 1 line
2.0.1.563.g66f467c
PATCH 11/35 arm: omap: irq: reorganize code a little bit
In reply to Felipe Balbino functional changes, just moving code around.
--- arch/arm/mach-omap2/irq.c | 133 +++++++++++++++++++++++----------------------- 1 file changed, 66 insertions(+), 67 deletions(-)
arch/arm/mach-omap2/irq.c +66 -67
@@ -57,10 +57,6 @@* for each bank.. when in doubt, consult the TRM. */ -static struct irq_domain *domain; -static void __iomem *omap_irq_base; -static int omap_nr_irqs =96 ; -/* Structure to save interrupt controller context */ struct omap_intc_regs {u32 sysconfig;
@@ -70,6 +66,11 @@ struct omap_intc_regs {u32 ilr[INTCPS_NR_ILR_REGS ];u32 mir[INTCPS_NR_MIR_REGS ]; }; +static struct omap_intc_regs intc_context; + +static struct irq_domain *domain; +static void __iomem *omap_irq_base; +static int omap_nr_irqs =96 ;/* INTC bank register get/set */ static void intc_writel (u32 reg,u32 val)
@@ -82,6 +83,61 @@ static u32 intc_readl(u32 reg)return readl_relaxed (omap_irq_base + reg); } +void omap_intc_save_context (void ) +{ +int i; + + intc_context.sysconfig = +intc_readl (INTC_SYSCONFIG ); + intc_context.protection = +intc_readl (INTC_PROTECTION ); + intc_context.idle = +intc_readl (INTC_IDLE ); + intc_context.threshold = +intc_readl (INTC_THRESHOLD ); + +for (i =0 ; i < omap_nr_irqs; i++) + intc_context.ilr[i] = +intc_readl ((INTC_ILR0 +0x4 * i)); +for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) + intc_context.mir[i] = +intc_readl (INTC_MIR0 + (0x20 * i)); +} + +void omap_intc_restore_context (void ) +{ +int i; + +intc_writel (INTC_SYSCONFIG , intc_context.sysconfig); +intc_writel (INTC_PROTECTION , intc_context.protection); +intc_writel (INTC_IDLE , intc_context.idle); +intc_writel (INTC_THRESHOLD , intc_context.threshold); + +for (i =0 ; i < omap_nr_irqs; i++) +intc_writel (INTC_ILR0 +0x4 * i, + intc_context.ilr[i]); + +for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) +intc_writel (INTC_MIR0 +0x20 * i, + intc_context.mir[i]); +/* MIRs are saved and restore with other PRCM registers */ +} + +void omap3_intc_prepare_idle (void ) +{ +/* +* Disable autoidle as it can stall interrupt controller, +* cf. errata ID i540 for 3430 (all revisions up to 3.1.x) +*/ +intc_writel (INTC_SYSCONFIG ,0 ); +} + +void omap3_intc_resume_idle (void ) +{ +/* Re-enable autoidle */ +intc_writel (INTC_SYSCONFIG ,1 ); +} +/* XXX: FIQ and additional INTC support (only MPU@the moment) */ static void omap_ack_irq (struct irq_data *d) {
@@ -125,6 +181,12 @@ int omap_irq_pending(void)return 0 ; } +void omap3_intc_suspend (void ) +{ +/* A pending interrupt would prevent OMAP from entering suspend */ +omap_ack_irq (NULL ); +} +static __init void omap_alloc_gc (void __iomem *base,unsigned int irq_start,unsigned int num) {
@@ -265,69 +327,6 @@ void __init omap_intc_of_init(void)of_irq_init (irq_match); } -static struct omap_intc_regs intc_context; - -void omap_intc_save_context (void ) -{ -int i; - - intc_context.sysconfig = -intc_readl (INTC_SYSCONFIG ); - intc_context.protection = -intc_readl (INTC_PROTECTION ); - intc_context.idle = -intc_readl (INTC_IDLE ); - intc_context.threshold = -intc_readl (INTC_THRESHOLD ); - -for (i =0 ; i < omap_nr_irqs; i++) - intc_context.ilr[i] = -intc_readl ((INTC_ILR0 +0x4 * i)); -for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) - intc_context.mir[i] = -intc_readl (INTC_MIR0 + (0x20 * i)); -} - -void omap_intc_restore_context (void ) -{ -int i; - -intc_writel (INTC_SYSCONFIG , intc_context.sysconfig); -intc_writel (INTC_PROTECTION , intc_context.protection); -intc_writel (INTC_IDLE , intc_context.idle); -intc_writel (INTC_THRESHOLD , intc_context.threshold); - -for (i =0 ; i < omap_nr_irqs; i++) -intc_writel (INTC_ILR0 +0x4 * i, - intc_context.ilr[i]); - -for (i =0 ; i <INTCPS_NR_MIR_REGS ; i++) -intc_writel (INTC_MIR0 +0x20 * i, - intc_context.mir[i]); -/* MIRs are saved and restore with other PRCM registers */ -} - -void omap3_intc_suspend (void ) -{ -/* A pending interrupt would prevent OMAP from entering suspend */ -omap_ack_irq (NULL ); -} - -void omap3_intc_prepare_idle (void ) -{ -/* -* Disable autoidle as it can stall interrupt controller, -* cf. errata ID i540 for 3430 (all revisions up to 3.1.x) -*/ -intc_writel (INTC_SYSCONFIG ,0 ); -} - -void omap3_intc_resume_idle (void ) -{ -/* Re-enable autoidle */ -intc_writel (INTC_SYSCONFIG ,1 ); -} - asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs) {omap_intc_handle_irq (regs);
Signature · 1 line
2.0.1.563.g66f467c
PATCH 12/35 arm: omap: irq: make intc_of_init static
In reply to Felipe Balbinobody uses that function outside of this file,
so we don't need to expose it.
--- arch/arm/mach-omap2/common.h | 10 ---------- arch/arm/mach-omap2/irq.c | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-)
arch/arm/mach-omap2/common.h +0 -10
@@ -229,16 +229,6 @@ extern void __iomem *omap4_get_l2cache_base(void);#endif struct device_node ; -#ifdef CONFIG_OF -int __init intc_of_init (struct device_node *node, -struct device_node *parent); -#else -int __init intc_of_init (struct device_node *node, -struct device_node *parent) -{ -return 0 ; -} -#endif #ifdef CONFIG_SMP extern void __iomem *omap4_get_scu_base (void );
arch/arm/mach-omap2/irq.c +1 -1
@@ -295,7 +295,7 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regsomap_intc_handle_irq (regs); } -int __init intc_of_init (struct device_node *node, +static int __init intc_of_init (struct device_node *node,struct device_node *parent) {struct resource res;
Signature · 1 line
2.0.1.563.g66f467c
PATCH 13/35 arm: omap: irq: call set_handle_irq() from intc_of_init
In reply to Felipe Balbithis will let us drop .handle_irq and .init_irq fields from our generic machine_descs.
--- arch/arm/mach-omap2/irq.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-omap2/irq.c +2 -0
@@ -314,6 +314,8 @@ static int __init intc_of_init(struct device_node *node,omap_init_irq (res.start, nr_irq,of_node_get (node)); +set_handle_irq (omap2_intc_handle_irq); +return 0 ; }
Signature · 1 line
2.0.1.563.g66f467c
Re: [PATCH 13/35] arm: omap: irq: call set_handle_irq() from intc_of_init
Hi,
Quoted 13 lines · Felipe Balbi
this will let us drop .handle_irq and .init_irq fields from our generic
machine_descs.Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/irq.c | 2 ++ 1 file changed, 2 insertions(+)arch/arm/mach-omap2/irq.c +0
-0
arch/arm/mach-omap2/irq.c static int __init intc_of_init(struct device_node *node, · line 321
Quoted 8 lines
arch/arm/mach-omap2/irq.c +2
-0@@ -314,6 +314,8 @@ static int __init intc_of_init(struct device_node *node,omap_init_irq (res.start, nr_irq,of_node_get (node)); +set_handle_irq (omap2_intc_handle_irq); +return 0 ; }
if you respin the patchset you may want to call omap_intc_handle_irq directly. It makes the review of the patchset less confusing.
(I was wondering why omap3 can call omap2_intc_handle_irq until I noticed, that your previous changes made both functions simple wrapper functions for omap_intc_handle_irq)
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/8e57e75d/attachment.sig>
Re: [PATCH 13/35] arm: omap: irq: call set_handle_irq() from intc_of_init
Quoted 28 lines · Sebastian Reichel
Hi,
Quoted 13 lines · Felipe Balbi
this will let us drop .handle_irq and .init_irq fields from our generic
machine_descs.Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/irq.c | 2 ++ 1 file changed, 2 insertions(+)arch/arm/mach-omap2/irq.c +0
-0arch/arm/mach-omap2/irq.c static int __init intc_of_init(struct device_node *node, · line 321
Quoted 8 lines
arch/arm/mach-omap2/irq.c +2
-0@@ -314,6 +314,8 @@ static int __init intc_of_init(struct device_node *node,omap_init_irq (res.start, nr_irq,of_node_get (node)); +set_handle_irq (omap2_intc_handle_irq); +return 0 ; }if you respin the patchset you may want to call
omap_intc_handle_irqdirectly. It makes the review of the patchset less confusing.
Quoted 3 lines
(I was wondering why omap3 can call
omap2_intc_handle_irquntil I noticed, that your previous changes made both functions simple wrapper functions foromap_intc_handle_irq)
this is done later for a reason. At this point, omap_intc_handle_irq() still misses proper annotations for asmlinkage and __exception_irq_entry.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/32c7ddf7/attachment.sig>
Re: [PATCH 13/35] arm: omap: irq: call set_handle_irq() from intc_of_init
Hi,
Quoted 29 lines · Felipe Balbi
Quoted 28 lines · Sebastian Reichel
Hi,
Quoted 13 lines · Felipe Balbi
this will let us drop .handle_irq and .init_irq fields from our generic
machine_descs.Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/irq.c | 2 ++ 1 file changed, 2 insertions(+)arch/arm/mach-omap2/irq.c +0
-0arch/arm/mach-omap2/irq.c static int __init intc_of_init(struct device_node *node, · line 321
Quoted 8 lines
arch/arm/mach-omap2/irq.c +2
-0@@ -314,6 +314,8 @@ static int __init intc_of_init(struct device_node *node,omap_init_irq (res.start, nr_irq,of_node_get (node)); +set_handle_irq (omap2_intc_handle_irq); +return 0 ; }if you respin the patchset you may want to call
omap_intc_handle_irqdirectly. It makes the review of the patchset less confusing.
Quoted 7 lines
Quoted 3 lines
(I was wondering why omap3 can call
omap2_intc_handle_irquntil I noticed, that your previous changes made both functions simple wrapper functions foromap_intc_handle_irq)this is done later for a reason. At this point,
omap_intc_handle_irq()still misses proper annotations for asmlinkage and__exception_irq_entry.
I guess that could be solved by moving the annotations to omap_intc_handle_irq and just keeping omap{23}_intc_handle_irq as a #define. Probably not worth the extra work, though.
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/4ddde5b3/attachment-0001.sig>
PATCH 14/35 arm: omap: irq: use IRQCHIP_DECLARE macro
In reply to Felipe BalbiIRQCHIP_DECLARE macro is used to declare the same of_device_id structure for irqchips, it's just a helper. No functional changes.
Note that we're temporarily including irqchip.h with its full path, until we move this driver to drivers/irqchip/.
--- arch/arm/mach-omap2/irq.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/irq.c +3 -5
@@ -26,6 +26,7 @@#include "soc.h" #include "iomap.h" #include "common.h" +#include "../../drivers/irqchip/irqchip.h" /* selected INTC register offsets */
@@ -319,14 +320,11 @@ static int __init intc_of_init(struct device_node *node,return 0 ; } -static struct of_device_id irq_match[]__initdata = { - { .compatible ="ti,omap2-intc" , .data = intc_of_init, }, - { } -}; +IRQCHIP_DECLARE (omap_intc,"ti,omap2-intc" , intc_of_init);void __init omap_intc_of_init (void ) { -of_irq_init (irq_match); +of_irq_init (&irqchip_of_match_omap_intc); } asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs)
Signature · 1 line
2.0.1.563.g66f467c
PATCH 15/35 arm: omap: irq: drop .handle_irq and .init_irq fields
In reply to Felipe Balbinow we can safely drop those fields from our machine_desc.
While at that, also drop the now unused omap_intc_of_init() definition.
--- arch/arm/mach-omap2/board-generic.c | 14 -------------- arch/arm/mach-omap2/common.h | 1 - arch/arm/mach-omap2/irq.c | 5 ----- 3 files changed, 20 deletions(-)
arch/arm/mach-omap2/board-generic.c +0 -14
@@ -52,8 +52,6 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)") .reserve = omap_reserve, .map_io = omap242x_map_io, .init_early = omap2420_init_early, - .init_irq = omap_intc_of_init, - .handle_irq = omap2_intc_handle_irq, .init_machine = omap_generic_init, .init_time = omap2_sync32k_timer_init, .dt_compat = omap242x_boards_compat,
@@ -71,8 +69,6 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)") .reserve = omap_reserve, .map_io = omap243x_map_io, .init_early = omap2430_init_early, - .init_irq = omap_intc_of_init, - .handle_irq = omap2_intc_handle_irq, .init_machine = omap_generic_init, .init_time = omap2_sync32k_timer_init, .dt_compat = omap243x_boards_compat,
@@ -91,8 +87,6 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") .reserve = omap_reserve, .map_io = omap3_map_io, .init_early = omap3430_init_early, - .init_irq = omap_intc_of_init, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap_generic_init, .init_late = omap3_init_late, .init_time = omap3_sync32k_timer_init,
@@ -109,8 +103,6 @@ DT_MACHINE_START(OMAP36XX_DT, "Generic OMAP36xx (Flattened Device Tree)") .reserve = omap_reserve, .map_io = omap3_map_io, .init_early = omap3630_init_early, - .init_irq = omap_intc_of_init, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap_generic_init, .init_late = omap3_init_late, .init_time = omap3_sync32k_timer_init,
@@ -128,8 +120,6 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)") .reserve = omap_reserve, .map_io = omap3_map_io, .init_early = omap3430_init_early, - .init_irq = omap_intc_of_init, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap_generic_init, .init_late = omap3_init_late, .init_time = omap3_secure_sync32k_timer_init,
@@ -146,8 +136,6 @@ DT_MACHINE_START(AM3517_DT, "Generic AM3517 (Flattened Device Tree)") .reserve = omap_reserve, .map_io = omap3_map_io, .init_early = am35xx_init_early, - .init_irq = omap_intc_of_init, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap_generic_init, .init_late = omap3_init_late, .init_time = omap3_gptimer_timer_init,
@@ -166,8 +154,6 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)") .reserve = omap_reserve, .map_io = am33xx_map_io, .init_early = am33xx_init_early, - .init_irq = omap_intc_of_init, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap_generic_init, .init_late = am33xx_init_late, .init_time = omap3_gptimer_timer_init,
arch/arm/mach-omap2/common.h +0 -1
@@ -221,7 +221,6 @@ void omap3_intc_prepare_idle(void);void omap3_intc_resume_idle (void );void omap2_intc_handle_irq (struct pt_regs *regs);void omap3_intc_handle_irq (struct pt_regs *regs); -void omap_intc_of_init (void );void omap_gic_of_init (void );#ifdef CONFIG_CACHE_L2X0
arch/arm/mach-omap2/irq.c +0 -5
@@ -322,11 +322,6 @@ static int __init intc_of_init(struct device_node *node,IRQCHIP_DECLARE (omap_intc,"ti,omap2-intc" , intc_of_init); -void __init omap_intc_of_init (void ) -{ -of_irq_init (&irqchip_of_match_omap_intc); -} - asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs) {omap_intc_handle_irq (regs);
Signature · 1 line
2.0.1.563.g66f467c
PATCH 16/35 arm: omap: irq: add specific compatibles for omap3 and am33xx devices
In reply to Felipe Balbiwith this, we can use a compatible flag to figure
out how many irq lines are wired up, no need for
our TI-specific ti,intc-size binding.
--- arch/arm/mach-omap2/irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/irq.c +3 -1
@@ -320,7 +320,9 @@ static int __init intc_of_init(struct device_node *node,return 0 ; } -IRQCHIP_DECLARE (omap_intc,"ti,omap2-intc" , intc_of_init); +IRQCHIP_DECLARE (omap2_intc,"ti,omap2-intc" , intc_of_init); +IRQCHIP_DECLARE (omap3_intc,"ti,omap3-intc" , intc_of_init); +IRQCHIP_DECLARE (am33xx_intc,"ti,am33xx-intc" , intc_of_init); asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs) {
Signature · 1 line
2.0.1.563.g66f467c
PATCH 17/35 arm: omap: irq: use compatible flag to figure out number of IRQ lines
In reply to Felipe Balbiso far, only am33xx has 128 lines, all other devices have only 96.
--- arch/arm/mach-omap2/irq.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-omap2/irq.c +3 -0
@@ -310,6 +310,9 @@ static int __init intc_of_init(struct device_node *node,return -EINVAL ; } +if (of_device_is_compatible (node,"ti,am33xx-intc" )) + nr_irq =128 ; +if (of_property_read_u32 (node,"ti,intc-size" , &nr_irq))pr_warn ("unable to get intc-size, default to %d\n" , nr_irq);
Signature · 1 line
2.0.1.563.g66f467c
PATCH 18/35 arm: boot: dts: am33xx/omap3: fix intc compatible flag
In reply to Felipe Balbithat way, our intc driver can figure out how
many IRQ lines INTC has.
--- arch/arm/boot/dts/am33xx.dtsi | 2 +- arch/arm/boot/dts/omap3.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +1 -1
@@ -133,7 +133,7 @@ }; intc: interrupt-controller at 48200000 { - compatible = "ti,omap2-intc"; + compatible = "ti,am33xx-intc"; interrupt-controller; #interrupt-cells = <1>; ti,intc-size = <128>;
arch/arm/boot/dts/omap3.dtsi +1 -1
@@ -140,7 +140,7 @@ }; intc: interrupt-controller at 48200000 { - compatible = "ti,omap2-intc"; + compatible = "ti,omap3-intc"; interrupt-controller; #interrupt-cells = <1>; ti,intc-size = <96>;
Signature · 1 line
2.0.1.563.g66f467c
PATCH 19/35 arm: omap: irq: drop ti,intc-size support
In reply to Felipe Balbiwe don't need that anymore since specific
devices are passing correct compatible flags.
--- arch/arm/mach-omap2/irq.c | 3 --- 1 file changed, 3 deletions(-)
arch/arm/mach-omap2/irq.c +0 -3
@@ -313,9 +313,6 @@ static int __init intc_of_init(struct device_node *node,if (of_device_is_compatible (node,"ti,am33xx-intc" )) nr_irq =128 ; -if (of_property_read_u32 (node,"ti,intc-size" , &nr_irq)) -pr_warn ("unable to get intc-size, default to %d\n" , nr_irq); -omap_init_irq (res.start, nr_irq,of_node_get (node));set_handle_irq (omap2_intc_handle_irq);
Signature · 1 line
2.0.1.563.g66f467c
Re: [PATCH 19/35] arm: omap: irq: drop ti,intc-size support
Hi,
Quoted 13 lines · Felipe Balbi
we don't need that anymore since specific
devices are passing correct compatible flags.Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/irq.c | 3 --- 1 file changed, 3 deletions(-)arch/arm/mach-omap2/irq.c +0
-0
arch/arm/mach-omap2/irq.c static int __init intc_of_init(struct device_node *node, · line 318
Quoted 6 lines
arch/arm/mach-omap2/irq.c +0
-3@@ -313,9 +313,6 @@ static int __init intc_of_init(struct device_node *node,if (of_device_is_compatible (node,"ti,am33xx-intc" )) nr_irq =128 ; -if (of_property_read_u32 (node,"ti,intc-size" , &nr_irq)) -pr_warn ("unable to get intc-size, default to %d\n" , nr_irq); -
keeping this code would avoid breaking the DT API. I suggest to change it to something like the following:
if (!of_property_read_u32(...))
dev_warn(dev, "ti,intc-size is deprecated, please update your DT file");
Apart from that the Documentation [0] should be updated (add deprecation notice for ti,intc-size and add new compatible values) and maybe moved to [1] (where other SoCs put their irq controller binding docs).
[0] Documentation/devicetree/bindings/arm/omap/intc.txt
[1] Documentation/devicetree/bindings/interrupt-controller/
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/ba474f43/attachment.sig>
PATCH 20/35 arm: boot: dts: omap2/3/am33xx: drop ti,intc-size
In reply to Felipe Balbiwe are now infering number of IRQ lines based
on correct compatible flag, which renders this
binding completely useless.
--- arch/arm/boot/dts/am33xx.dtsi | 1 - arch/arm/boot/dts/omap2.dtsi | 1 - arch/arm/boot/dts/omap3.dtsi | 1 - 3 files changed, 3 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +0 -1
@@ -136,7 +136,6 @@ compatible = "ti,am33xx-intc"; interrupt-controller; #interrupt-cells = <1>; - ti,intc-size = <128>; reg = <0x48200000 0x1000>; };
arch/arm/boot/dts/omap2.dtsi +0 -1
@@ -75,7 +75,6 @@ compatible = "ti,omap2-intc"; interrupt-controller; #interrupt-cells = <1>; - ti,intc-size = <96>; reg = <0x480FE000 0x1000>; };
arch/arm/boot/dts/omap3.dtsi +0 -1
@@ -143,7 +143,6 @@ compatible = "ti,omap3-intc"; interrupt-controller; #interrupt-cells = <1>; - ti,intc-size = <96>; reg = <0x48200000 0x1000>; };
Signature · 1 line
2.0.1.563.g66f467c
PATCH 21/35 arm: omap: irq: move some more code around
In reply to Felipe BalbiWe want .init_irq to call set_irq_handle() for
legacy platforms. Note that this code will also
be dropped once omap2/3 devices are completely
moved to DT.
--- arch/arm/mach-omap2/irq.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
arch/arm/mach-omap2/irq.c +15 -15
@@ -234,21 +234,6 @@ static void __init omap_init_irq(u32 base, int nr_irqs,omap_alloc_gc (omap_irq_base + j, j + irq_base,32 ); } -void __init omap2_init_irq (void ) -{ -omap_init_irq (OMAP24XX_IC_BASE ,96 ,NULL ); -} - -void __init omap3_init_irq (void ) -{ -omap_init_irq (OMAP34XX_IC_BASE ,96 ,NULL ); -} - -void __init ti81xx_init_irq (void ) -{ -omap_init_irq (OMAP34XX_IC_BASE ,128 ,NULL ); -} -static inline void omap_intc_handle_irq (struct pt_regs *regs) {u32 irqnr;
@@ -296,6 +281,21 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regsomap_intc_handle_irq (regs); } +void __init omap2_init_irq (void ) +{ +omap_init_irq (OMAP24XX_IC_BASE ,96 ,NULL ); +} + +void __init omap3_init_irq (void ) +{ +omap_init_irq (OMAP34XX_IC_BASE ,96 ,NULL ); +} + +void __init ti81xx_init_irq (void ) +{ +omap_init_irq (OMAP34XX_IC_BASE ,128 ,NULL ); +} +static int __init intc_of_init (struct device_node *node,struct device_node *parent) {
Signature · 1 line
2.0.1.563.g66f467c
PATCH 22/35 arm: omap: irq: call set_handle_irq() from .init_irq
In reply to Felipe Balbithe idea is that board-files won't need to set
.handle_irq on their machine_descs, which lets
us drop a little more pointless code.
--- arch/arm/mach-omap2/irq.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-omap2/irq.c +3 -0
@@ -284,16 +284,19 @@ asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regsvoid __init omap2_init_irq (void ) {omap_init_irq (OMAP24XX_IC_BASE ,96 ,NULL ); +set_handle_irq (omap2_intc_handle_irq); }void __init omap3_init_irq (void ) {omap_init_irq (OMAP34XX_IC_BASE ,96 ,NULL ); +set_handle_irq (omap2_intc_handle_irq); }void __init ti81xx_init_irq (void ) {omap_init_irq (OMAP34XX_IC_BASE ,128 ,NULL ); +set_handle_irq (omap2_intc_handle_irq); } static int __init intc_of_init(struct device_node *node,
Signature · 1 line
2.0.1.563.g66f467c
PATCH 23/35 arm: omap: irq: drop omap3_intc_handle_irq()
In reply to Felipe Balbinow that we're calling set_handle_irq() frominit_irq(), we can safely drop all callers toomap3_intc_handle_irq() and its definition.
--- arch/arm/mach-omap2/board-3430sdp.c | 1 - arch/arm/mach-omap2/board-am3517crane.c | 1 - arch/arm/mach-omap2/board-am3517evm.c | 1 - arch/arm/mach-omap2/board-cm-t35.c | 2 -- arch/arm/mach-omap2/board-cm-t3517.c | 1 - arch/arm/mach-omap2/board-devkit8000.c | 1 - arch/arm/mach-omap2/board-ldp.c | 1 - arch/arm/mach-omap2/board-omap3beagle.c | 1 - arch/arm/mach-omap2/board-omap3logic.c | 2 -- arch/arm/mach-omap2/board-omap3pandora.c | 1 - arch/arm/mach-omap2/board-omap3stalker.c | 1 - arch/arm/mach-omap2/board-omap3touchbook.c | 1 - arch/arm/mach-omap2/board-overo.c | 1 - arch/arm/mach-omap2/board-rx51.c | 1 - arch/arm/mach-omap2/common.h | 1 - arch/arm/mach-omap2/irq.c | 5 ----- 16 files changed, 22 deletions(-)
arch/arm/mach-omap2/board-3430sdp.c +0 -1
@@ -625,7 +625,6 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") .map_io = omap3_map_io, .init_early = omap3430_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap_3430sdp_init, .init_late = omap3430_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/board-am3517crane.c +0 -1
@@ -142,7 +142,6 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") .map_io = omap3_map_io, .init_early = am35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = am3517_crane_init, .init_late = am35xx_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/board-am3517evm.c +0 -1
@@ -366,7 +366,6 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") .map_io = omap3_map_io, .init_early = am35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = am3517_evm_init, .init_late = am35xx_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/board-cm-t35.c +0 -2
@@ -766,7 +766,6 @@ MACHINE_START(CM_T35, "Compulab CM-T35") .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = cm_t35_init, .init_late = omap35xx_init_late, .init_time = omap3_sync32k_timer_init,
@@ -779,7 +778,6 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730") .map_io = omap3_map_io, .init_early = omap3630_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = cm_t3730_init, .init_late = omap3630_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/board-cm-t3517.c +0 -1
@@ -329,7 +329,6 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517") .map_io = omap3_map_io, .init_early = am35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = cm_t3517_init, .init_late = am35xx_init_late, .init_time = omap3_gptimer_timer_init,
arch/arm/mach-omap2/board-devkit8000.c +0 -1
@@ -647,7 +647,6 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = devkit8000_init, .init_late = omap35xx_init_late, .init_time = omap3_secure_sync32k_timer_init,
arch/arm/mach-omap2/board-ldp.c +0 -1
@@ -422,7 +422,6 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board") .map_io = omap3_map_io, .init_early = omap3430_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap_ldp_init, .init_late = omap3430_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/board-omap3beagle.c +0 -1
@@ -588,7 +588,6 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") .map_io = omap3_map_io, .init_early = omap3_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap3_beagle_init, .init_late = omap3_init_late, .init_time = omap3_secure_sync32k_timer_init,
arch/arm/mach-omap2/board-omap3logic.c +0 -2
@@ -230,7 +230,6 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap3logic_init, .init_late = omap35xx_init_late, .init_time = omap3_sync32k_timer_init,
@@ -243,7 +242,6 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap3logic_init, .init_late = omap35xx_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/board-omap3pandora.c +0 -1
@@ -624,7 +624,6 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap3pandora_init, .init_late = omap35xx_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/board-omap3stalker.c +0 -1
@@ -426,7 +426,6 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap3_stalker_init, .init_late = omap35xx_init_late, .init_time = omap3_secure_sync32k_timer_init,
arch/arm/mach-omap2/board-omap3touchbook.c +0 -1
@@ -388,7 +388,6 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") .map_io = omap3_map_io, .init_early = omap3430_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = omap3_touchbook_init, .init_late = omap3430_init_late, .init_time = omap3_secure_sync32k_timer_init,
arch/arm/mach-omap2/board-overo.c +0 -1
@@ -564,7 +564,6 @@ MACHINE_START(OVERO, "Gumstix Overo") .map_io = omap3_map_io, .init_early = omap35xx_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = overo_init, .init_late = omap35xx_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/board-rx51.c +0 -1
@@ -134,7 +134,6 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") .map_io = omap3_map_io, .init_early = omap3430_init_early, .init_irq = omap3_init_irq, - .handle_irq = omap3_intc_handle_irq, .init_machine = rx51_init, .init_late = omap3430_init_late, .init_time = omap3_sync32k_timer_init,
arch/arm/mach-omap2/common.h +0 -1
@@ -220,7 +220,6 @@ void omap3_intc_suspend(void);void omap3_intc_prepare_idle (void );void omap3_intc_resume_idle (void );void omap2_intc_handle_irq (struct pt_regs *regs); -void omap3_intc_handle_irq (struct pt_regs *regs);void omap_gic_of_init (void );#ifdef CONFIG_CACHE_L2X0
arch/arm/mach-omap2/irq.c +0 -5
@@ -326,8 +326,3 @@ static int __init intc_of_init(struct device_node *node,IRQCHIP_DECLARE (omap2_intc,"ti,omap2-intc" , intc_of_init);IRQCHIP_DECLARE (omap3_intc,"ti,omap3-intc" , intc_of_init);IRQCHIP_DECLARE (am33xx_intc,"ti,am33xx-intc" , intc_of_init); - -asmlinkage void __exception_irq_entry omap3_intc_handle_irq(struct pt_regs *regs) -{ -omap_intc_handle_irq (regs); -}
Signature · 1 line
2.0.1.563.g66f467c
PATCH 24/35 arm: omap: irq: drop omap2_intc_handle_irq()
In reply to Felipe Balbithat was just a no-op wrapper around omap_intc_handle_irq anyway.
--- arch/arm/mach-omap2/common.h | 1 - arch/arm/mach-omap2/irq.c | 16 ++++++---------- 2 files changed, 6 insertions(+), 11 deletions(-)
arch/arm/mach-omap2/common.h +0 -1
@@ -219,7 +219,6 @@ void omap_intc_restore_context(void);void omap3_intc_suspend (void );void omap3_intc_prepare_idle (void );void omap3_intc_resume_idle (void ); -void omap2_intc_handle_irq (struct pt_regs *regs);void omap_gic_of_init (void );#ifdef CONFIG_CACHE_L2X0
arch/arm/mach-omap2/irq.c +6 -10
@@ -234,7 +234,8 @@ static void __init omap_init_irq(u32 base, int nr_irqs,omap_alloc_gc (omap_irq_base + j, j + irq_base,32 ); } -static inline void omap_intc_handle_irq (struct pt_regs *regs) +static asmlinkage void __exception_irq_entry +omap_intc_handle_irq (struct pt_regs *regs) {u32 irqnr;int handled_irq =0 ;
@@ -276,27 +277,22 @@ out:omap_ack_irq (NULL ); } -asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs) -{ -omap_intc_handle_irq (regs); -} -void __init omap2_init_irq (void ) {omap_init_irq (OMAP24XX_IC_BASE ,96 ,NULL ); -set_handle_irq (omap2_intc_handle_irq); +set_handle_irq (omap_intc_handle_irq); }void __init omap3_init_irq (void ) {omap_init_irq (OMAP34XX_IC_BASE ,96 ,NULL ); -set_handle_irq (omap2_intc_handle_irq); +set_handle_irq (omap_intc_handle_irq); }void __init ti81xx_init_irq (void ) {omap_init_irq (OMAP34XX_IC_BASE ,128 ,NULL ); -set_handle_irq (omap2_intc_handle_irq); +set_handle_irq (omap_intc_handle_irq); } static int __init intc_of_init(struct device_node *node,
@@ -318,7 +314,7 @@ static int __init intc_of_init(struct device_node *node,omap_init_irq (res.start, nr_irq,of_node_get (node)); -set_handle_irq (omap2_intc_handle_irq); +set_handle_irq (omap_intc_handle_irq);return 0 ; }
Signature · 1 line
2.0.1.563.g66f467c
PATCH 25/35 arm: omap: irq: remove unnecessary header
In reply to Felipe BalbiThere's no need for that header to be included.
--- arch/arm/mach-omap2/irq.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-omap2/irq.c +0 -1
@@ -24,7 +24,6 @@#include <linux/of_irq.h> #include "soc.h" -#include "iomap.h" #include "common.h" #include "../../drivers/irqchip/irqchip.h"
Signature · 1 line
2.0.1.563.g66f467c
PATCH 26/35 arm: omap: irq: remove nr_irqs argument
In reply to Felipe Balbiwe can set our global omap_nr_irqs early on
and drop the extra argument to omap_init_irq().
--- arch/arm/mach-omap2/irq.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)
arch/arm/mach-omap2/irq.c +13 -12
@@ -207,8 +207,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) IRQ_NOREQUEST | IRQ_NOPROBE, 0); } -static void __init omap_init_irq (u32 base,int nr_irqs, -struct device_node *node) +static void __init omap_init_irq (u32 base,struct device_node *node) {int j, irq_base;
@@ -216,15 +215,13 @@ static void __init omap_init_irq(u32 base, int nr_irqs,if (WARN_ON (!omap_irq_base))return ; - omap_nr_irqs = nr_irqs; - - irq_base =irq_alloc_descs (-1 ,0 , nr_irqs,0 ); + irq_base =irq_alloc_descs (-1 ,0 , omap_nr_irqs,0 );if (irq_base <0 ) {pr_warn ("Couldn't allocate IRQ numbers\n" ); irq_base =0 ; } - domain =irq_domain_add_legacy (node, nr_irqs, irq_base,0 , + domain =irq_domain_add_legacy (node, omap_nr_irqs, irq_base,0 , &irq_domain_simple_ops,NULL );omap_irq_soft_reset ();
@@ -278,19 +275,22 @@ out:void __init omap2_init_irq (void ) { -omap_init_irq (OMAP24XX_IC_BASE ,96 ,NULL ); + omap_nr_irqs =96 ; +omap_init_irq (OMAP24XX_IC_BASE ,NULL );set_handle_irq (omap_intc_handle_irq); }void __init omap3_init_irq (void ) { -omap_init_irq (OMAP34XX_IC_BASE ,96 ,NULL ); + omap_nr_irqs =96 ; +omap_init_irq (OMAP34XX_IC_BASE ,NULL );set_handle_irq (omap_intc_handle_irq); }void __init ti81xx_init_irq (void ) { -omap_init_irq (OMAP34XX_IC_BASE ,128 ,NULL ); + omap_nr_irqs =96 ; +omap_init_irq (OMAP34XX_IC_BASE ,NULL );set_handle_irq (omap_intc_handle_irq); }
@@ -298,7 +298,8 @@ static int __init intc_of_init(struct device_node *node, struct device_node *parent) {struct resource res; -u32 nr_irq =96 ; + + omap_nr_irqs =96 ;if (WARN_ON (!node))return -ENODEV ;
@@ -309,9 +310,9 @@ static int __init intc_of_init(struct device_node *node, }if (of_device_is_compatible (node,"ti,am33xx-intc" )) - nr_irq =128 ; + omap_nr_irqs =128 ; -omap_init_irq (res.start, nr_irq,of_node_get (node)); +omap_init_irq (res.start,of_node_get (node));set_handle_irq (omap_intc_handle_irq);
Signature · 1 line
2.0.1.563.g66f467c
PATCH 27/35 arm: omap: irq: introduce omap_nr_pending
In reply to Felipe Balbithat variable will tell us how many INTC_PENDING_IRQn registers we have. It'll be used on a following patch to cleanup omap_intc_handle_irq() a bit.
--- arch/arm/mach-omap2/irq.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/irq.c +8 -1
@@ -70,6 +70,7 @@ static struct omap_intc_regs intc_context;static struct irq_domain *domain;static void __iomem *omap_irq_base; +static int omap_nr_pending =3 ;static int omap_nr_irqs =96 ;/* INTC bank register get/set */
@@ -276,6 +277,7 @@ out:void __init omap2_init_irq (void ) { omap_nr_irqs =96 ; + omap_nr_pending =3 ;omap_init_irq (OMAP24XX_IC_BASE ,NULL );set_handle_irq (omap_intc_handle_irq); }
@@ -283,6 +285,7 @@ void __init omap2_init_irq(void)void __init omap3_init_irq (void ) { omap_nr_irqs =96 ; + omap_nr_pending =3 ;omap_init_irq (OMAP34XX_IC_BASE ,NULL );set_handle_irq (omap_intc_handle_irq); }
@@ -290,6 +293,7 @@ void __init omap3_init_irq(void)void __init ti81xx_init_irq (void ) { omap_nr_irqs =96 ; + omap_nr_pending =4 ;omap_init_irq (OMAP34XX_IC_BASE ,NULL );set_handle_irq (omap_intc_handle_irq); }
@@ -299,6 +303,7 @@ static int __init intc_of_init(struct device_node *node, {struct resource res; + omap_nr_pending =3 ; omap_nr_irqs =96 ;if (WARN_ON (!node))
@@ -309,8 +314,10 @@ static int __init intc_of_init(struct device_node *node,return -EINVAL ; } -if (of_device_is_compatible (node,"ti,am33xx-intc" )) +if (of_device_is_compatible (node,"ti,am33xx-intc" )) { omap_nr_irqs =128 ; + omap_nr_pending =4 ; + }omap_init_irq (res.start,of_node_get (node));
Signature · 1 line
2.0.1.563.g66f467c
PATCH 28/35 arm: omap: irq: get rid of ifdef hack
In reply to Felipe Balbiwe don't need the ifdef if we have omap_nr_pending telling us how many pending registers we have on current platform. This solves a possible problem where we could try to handle bogus interrupts on OMAP2 and OMAP3 if using single zImage kernel, because we would end up reading the following pending FIQ register.
--- arch/arm/mach-omap2/irq.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-)
arch/arm/mach-omap2/irq.c +7 -15
@@ -234,24 +234,16 @@ static void __init omap_init_irq(u32 base, struct device_node *node) static asmlinkage void __exception_irq_entryomap_intc_handle_irq (struct pt_regs *regs) { -u32 irqnr; +u32 irqnr =0 ;int handled_irq =0 ; +int i; do { - irqnr = intc_readl(INTC_PENDING_IRQ0); - if (irqnr) - goto out; - - irqnr = intc_readl(INTC_PENDING_IRQ1); - if (irqnr) - goto out; - - irqnr = intc_readl(INTC_PENDING_IRQ2); -#if IS_ENABLED(CONFIG_SOC_TI81XX) || IS_ENABLED(CONFIG_SOC_AM33XX) - if (irqnr) - goto out; - irqnr = intc_readl(INTC_PENDING_IRQ3); -#endif + for (i = 0; i < omap_nr_pending; i++) { + irqnr = intc_readl(INTC_PENDING_IRQ0 + (0x20 * i)); + if (irqnr) + goto out; + } out: if (!irqnr)
Signature · 1 line
2.0.1.563.g66f467c
PATCH 29/35 arm: omap: intc: switch over to linear irq domain
In reply to Felipe Balbinow that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of irq_alloc_domain_generic_chips() to allocate all generic irq chips for us.
--- arch/arm/mach-omap2/irq.c | 88 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 79 insertions(+), 9 deletions(-)
arch/arm/mach-omap2/irq.c +79 -9
@@ -188,14 +188,51 @@ void omap3_intc_suspend(void)omap_ack_irq (NULL ); } -static __init void -omap_alloc_gc (void __iomem *base,unsigned int irq_start,unsigned int num) +static int __init omap_alloc_gc_of (struct irq_domain *d,void __iomem *base) +{ +int ret; +int i; + + ret =irq_alloc_domain_generic_chips (d,32 ,1 ,"INTC" , + handle_level_irq,IRQ_NOREQUEST |IRQ_NOPROBE , +IRQ_LEVEL ,0 ); +if (ret) { +pr_warn ("Failed to allocate irq chips\n" ); +return ret; + } + +for (i =0 ; i < omap_nr_pending; i++) { +struct irq_chip_generic *gc; +struct irq_chip_type *ct; + + gc =irq_get_domain_generic_chip (d,32 * i); + gc->reg_base = base; + ct = gc->chip_types; + + ct->type =IRQ_TYPE_LEVEL_MASK ; + ct->handler = handle_level_irq; + + ct->chip.irq_ack = omap_mask_ack_irq; + ct->chip.irq_mask = irq_gc_mask_disable_reg; + ct->chip.irq_unmask = irq_gc_unmask_enable_reg; + + ct->chip.flags |=IRQCHIP_SKIP_SET_WAKE ; + + ct->regs.enable =INTC_MIR_CLEAR0 +32 * i; + ct->regs.disable =INTC_MIR_SET0 +32 * i; + } + +return 0 ; +} + +static void __init omap_alloc_gc_legacy (void __iomem *base, +unsigned int irq_start,unsigned int num) {struct irq_chip_generic *gc;struct irq_chip_type *ct; gc =irq_alloc_generic_chip ("INTC" ,1 , irq_start, base, - handle_level_irq); + handle_level_irq); ct = gc->chip_types; ct->chip.irq_ack = omap_mask_ack_irq; ct->chip.irq_mask = irq_gc_mask_disable_reg;
@@ -205,16 +242,36 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) ct->regs.enable =INTC_MIR_CLEAR0 ; ct->regs.disable =INTC_MIR_SET0 ;irq_setup_generic_chip (gc,IRQ_MSK (num),IRQ_GC_INIT_MASK_CACHE , -IRQ_NOREQUEST |IRQ_NOPROBE ,0 ); +IRQ_NOREQUEST |IRQ_NOPROBE ,0 ); } -static void __init omap_init_irq (u32 base,struct device_node *node) +static int __init omap_init_irq_of (struct device_node *node) +{ +int ret; + + omap_irq_base =of_iomap (node,0 ); +if (WARN_ON (!omap_irq_base)) +return -ENOMEM ; + + domain =irq_domain_add_linear (node, omap_nr_irqs, + &irq_generic_chip_ops,NULL ); + +omap_irq_soft_reset (); + + ret =omap_alloc_gc_of (domain, omap_irq_base); +if (ret <0 ) +irq_domain_remove (domain); + +return ret; +} + +static int __init omap_init_irq_legacy (u32 base) {int j, irq_base; omap_irq_base =ioremap (base,SZ_4K );if (WARN_ON (!omap_irq_base)) -return ; +return -ENOMEM ; irq_base =irq_alloc_descs (-1 ,0 , omap_nr_irqs,0 );if (irq_base <0 ) {
@@ -222,13 +279,23 @@ static void __init omap_init_irq(u32 base, struct device_node *node) irq_base =0 ; } - domain =irq_domain_add_legacy (node, omap_nr_irqs, irq_base,0 , + domain =irq_domain_add_legacy (NULL , omap_nr_irqs, irq_base,0 , &irq_domain_simple_ops,NULL );omap_irq_soft_reset ();for (j =0 ; j < omap_nr_irqs; j +=32 ) -omap_alloc_gc (omap_irq_base + j, j + irq_base,32 ); +omap_alloc_gc_legacy (omap_irq_base + j, j + irq_base,32 ); + +return 0 ; +} + +static int __init omap_init_irq (u32 base,struct device_node *node) +{ +if (node) +return omap_init_irq_of (node); +else +return omap_init_irq_legacy (base); } static asmlinkage void __exception_irq_entry
@@ -294,6 +361,7 @@ static int __init intc_of_init(struct device_node *node, struct device_node *parent) {struct resource res; +int ret; omap_nr_pending =3 ; omap_nr_irqs =96 ;
@@ -311,7 +379,9 @@ static int __init intc_of_init(struct device_node *node, omap_nr_pending =4 ; } -omap_init_irq (res.start,of_node_get (node)); + ret =omap_init_irq (-1 ,of_node_get (node)); +if (ret <0 ) +return ret;set_handle_irq (omap_intc_handle_irq);
Signature · 1 line
2.0.1.563.g66f467c
Tony Lindgren
maintainerRe: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Other than that, this whole series boots fine for me.
Regards,
Tony
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Hi,
Quoted 8 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Quoted 1 line
Other than that, this whole series boots fine for me.
good
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/536d4ba2/attachment.sig>
Tony Lindgren
maintainerRe: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.
Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling retention idle hangs too with this patch.
Maybe it's omap3_prcm_irq_setup that relies on 11 + OMAP_INTC_START? There may be other such issues remaining too but most should be already fixed up.
Regards,
Tony
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Quoted 13 lines · Tony Lindgren
Quoted 12 lines · Felipe Balbi
Hi,
Quoted 8 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Quoted 8 lines
Quoted 2 lines
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issues
lol.
OMAP4 has the same nonsense.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/e8707058/attachment.sig>
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Hi,
Quoted 20 lines · Felipe Balbi
Quoted 19 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.
Quoted 6 lines
Quoted 2 lines
Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issueslol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Anyway, here's a quick little hack to check if that's the reason for the regression:
arch/arm/boot/dts/omap3.dtsi +1 -0
@@ -97,6 +97,7 @@ prm: prm at 48306000 { compatible = "ti,omap3-prm"; reg = <0x48306000 0x4000>; + interrupts = <11>; prm_clocks: clocks { #address-cells = <1>;
arch/arm/mach-omap2/prm_common.c +13 -1
@@ -242,6 +242,11 @@ void omap_prcm_irq_complete(void) prcm_irq_setup->restore_irqen (prcm_irq_setup->saved_mask); } +static struct of_device_id tmp[] = { + { .compatible ="ti,omap3-prm" }, + { } +}; +/** * omap_prcm_register_chain_handler - initializes the prcm chained interrupt * handler based on provided parameters
@@ -254,17 +259,24 @@ void omap_prcm_irq_complete(void)*/ int omap_prcm_register_chain_handler (struct omap_prcm_irq_setup *irq_setup) { +struct device_node *node;int nr_regs;u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG ];int offset, i; +int irq;struct irq_chip_generic *gc;struct irq_chip_type *ct;if (!irq_setup)return -EINVAL ; + irq = irq_setup->irq; nr_regs = irq_setup->nr_regs; + node =of_find_matching_node (NULL , tmp); +if (node) + irq =of_irq_get (node,0 ); +if (prcm_irq_setup) {pr_err ("PRCM: already initialized; won't reinitialize\n" );return -EINVAL ;
@@ -298,7 +310,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)1 << (offset &0x1f ); } -irq_set_chained_handler (irq_setup->irq, omap_prcm_irq_handler); +irq_set_chained_handler (irq, omap_prcm_irq_handler); irq_setup->base_irq =irq_alloc_descs (-1 ,0 , irq_setup->nr_regs *32 ,0 );
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/4ebf1683/attachment.sig>
Tony Lindgren
maintainerRe: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 23 lines · Felipe Balbi
Quoted 21 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issues
Quoted 6 lines
Quoted 3 lines
lol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Not without similar changes, omap4+ has the same issue.. There's a RFC series from Nishant to fix some of this, and Tero is moving the PRCM into a driver.
Quoted 2 lines
Anyway, here's a quick little hack to check if that's the reason for the regression:
OK yeah that's along the same lines with Nishant's RFC series in thread "[RFC PATCH 0/7] ARM: OMAP4+: PRM: minor cleanups and dt support of interrupts"
FYI, it did not compile, needs to include linux/of_irq.h. But yes, it fixes the regression for me, Also now the whole series works for me :)
Regards,
Tony
Quoted 65 lines
arch/arm/boot/dts/omap3.dtsi +1
-0@@ -97,6 +97,7 @@ prm: prm at 48306000 { compatible = "ti,omap3-prm"; reg = <0x48306000 0x4000>; + interrupts = <11>; prm_clocks: clocks { #address-cells = <1>;arch/arm/mach-omap2/prm_common.c +13
-1@@ -242,6 +242,11 @@ void omap_prcm_irq_complete(void) prcm_irq_setup->restore_irqen (prcm_irq_setup->saved_mask); } +static struct of_device_id tmp[] = { + { .compatible ="ti,omap3-prm" }, + { } +}; +/** * omap_prcm_register_chain_handler - initializes the prcm chained interrupt * handler based on provided parameters @@ -254,17 +259,24 @@ void omap_prcm_irq_complete(void)*/ int omap_prcm_register_chain_handler (struct omap_prcm_irq_setup *irq_setup) { +struct device_node *node;int nr_regs;u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG ];int offset, i; +int irq;struct irq_chip_generic *gc;struct irq_chip_type *ct;if (!irq_setup)return -EINVAL ; + irq = irq_setup->irq; nr_regs = irq_setup->nr_regs; + node =of_find_matching_node (NULL , tmp); +if (node) + irq =of_irq_get (node,0 ); +if (prcm_irq_setup) {pr_err ("PRCM: already initialized; won't reinitialize\n" );return -EINVAL ;@@ -298,7 +310,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)1 << (offset &0x1f ); } -irq_set_chained_handler (irq_setup->irq, omap_prcm_irq_handler); +irq_set_chained_handler (irq, omap_prcm_irq_handler); irq_setup->base_irq =irq_alloc_descs (-1 ,0 , irq_setup->nr_regs *32 ,0 );Signature · 2 lines
-- balbi
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
HI,
Quoted 38 lines · Tony Lindgren
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 23 lines · Felipe Balbi
Quoted 21 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issuesQuoted 6 lines
Quoted 3 lines
lol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Not without similar changes, omap4+ has the same issue.. There's a RFC series from Nishant to fix some of this, and Tero is moving the PRCM into a driver.
Quoted 8 lines
Quoted 2 lines
Anyway, here's a quick little hack to check if that's the reason for the regression:
OK yeah that's along the same lines with Nishant's RFC series in thread "[RFC PATCH 0/7] ARM: OMAP4+: PRM: minor cleanups and dt support of interrupts"
FYI, it did not compile, needs to include
linux/of_irq.h. But yes,
I might have sent the wrong version as I had that same build error and fixed it localy.
Quoted 2 lines
it fixes the regression for me, Also now the whole series works for me :)
good to know.
What do you want to do now ? Wait for PRCM to become a driver ? Wait for Nishanth's series to get accepted ? I guess the same thing could be done for OMAP3 and AM33, then we would have a chance of having working wake from idle with the new irqchip.
cheers
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140730/a1333957/attachment.sig>
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Quoted 56 lines · Felipe Balbi
HI,
Quoted 38 lines · Tony Lindgren
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 23 lines · Felipe Balbi
Quoted 21 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issuesQuoted 6 lines
Quoted 3 lines
lol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Not without similar changes, omap4+ has the same issue.. There's a RFC series from Nishant to fix some of this, and Tero is moving the PRCM into a driver.
Quoted 8 lines
Quoted 2 lines
Anyway, here's a quick little hack to check if that's the reason for the regression:
OK yeah that's along the same lines with Nishant's RFC series in thread "[RFC PATCH 0/7] ARM: OMAP4+: PRM: minor cleanups and dt support of interrupts"
FYI, it did not compile, needs to include
linux/of_irq.h. But yes,I might have sent the wrong version as I had that same build error and fixed it localy.
Quoted 2 lines
it fixes the regression for me, Also now the whole series works for me :)
Quoted 6 lines
good to know.
What do you want to do now ? Wait for PRCM to become a driver ? Wait for Nishanth's series to get accepted ? I guess the same thing could be done for OMAP3 and AM33, then we would have a chance of having working wake from idle with the new irqchip.
I can repost the current series as it stands now once 17-rc1 comes out (without the build failure ofcourse).. if that helps to move it out of RFC status.
Signature · 3 lines
--- Regards, Nishanth Menon
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Hi,
Quoted 59 lines · Nishanth Menon
Quoted 58 lines · Felipe Balbi
HI,
Quoted 38 lines · Tony Lindgren
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 23 lines · Felipe Balbi
Quoted 21 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issuesQuoted 6 lines
Quoted 3 lines
lol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Not without similar changes, omap4+ has the same issue.. There's a RFC series from Nishant to fix some of this, and Tero is moving the PRCM into a driver.
Quoted 8 lines
Quoted 2 lines
Anyway, here's a quick little hack to check if that's the reason for the regression:
OK yeah that's along the same lines with Nishant's RFC series in thread "[RFC PATCH 0/7] ARM: OMAP4+: PRM: minor cleanups and dt support of interrupts"
FYI, it did not compile, needs to include
linux/of_irq.h. But yes,I might have sent the wrong version as I had that same build error and fixed it localy.
Quoted 2 lines
it fixes the regression for me, Also now the whole series works for me :)
good to know.
Quoted 8 lines
Quoted 4 lines
What do you want to do now ? Wait for PRCM to become a driver ? Wait for Nishanth's series to get accepted ? I guess the same thing could be done for OMAP3 and AM33, then we would have a chance of having working wake from idle with the new irqchip.
I can repost the current series as it stands now once 17-rc1 comes out (without the build failure ofcourse).. if that helps to move it out of RFC status.
That'd be great. It would be ever greater if you could add support for OMAP3 on that too.
cheers
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140730/5c7e0d66/attachment.sig>
Tony Lindgren
maintainerRe: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Quoted 67 lines · Felipe Balbi
Hi,
Quoted 64 lines · Nishanth Menon
Quoted 62 lines · Felipe Balbi
HI,
Quoted 38 lines · Tony Lindgren
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 23 lines · Felipe Balbi
Quoted 21 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issuesQuoted 6 lines
Quoted 3 lines
lol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Not without similar changes, omap4+ has the same issue.. There's a RFC series from Nishant to fix some of this, and Tero is moving the PRCM into a driver.
Quoted 8 lines
Quoted 2 lines
Anyway, here's a quick little hack to check if that's the reason for the regression:
OK yeah that's along the same lines with Nishant's RFC series in thread "[RFC PATCH 0/7] ARM: OMAP4+: PRM: minor cleanups and dt support of interrupts"
FYI, it did not compile, needs to include
linux/of_irq.h. But yes,I might have sent the wrong version as I had that same build error and fixed it localy.
Quoted 2 lines
it fixes the regression for me, Also now the whole series works for me :)
good to know.
What do you want to do now ? Wait for PRCM to become a driver ? Wait for Nishanth's series to get accepted ? I guess the same thing could be done for OMAP3 and AM33, then we would have a chance of having working wake from idle with the new irqchip.
Quoted 6 lines
Quoted 3 lines
I can repost the current series as it stands now once 17-rc1 comes out (without the build failure ofcourse).. if that helps to move it out of RFC status.
That'd be great. It would be ever greater if you could add support for OMAP3 on that too.
Yeah sounds good to me. Tero, does that work OK for your PRCM changes?
Regards,
Tony
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Quoted 68 lines · Tony Lindgren
Quoted 67 lines · Felipe Balbi
Hi,
Quoted 64 lines · Nishanth Menon
Quoted 62 lines · Felipe Balbi
HI,
Quoted 38 lines · Tony Lindgren
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 23 lines · Felipe Balbi
Quoted 21 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issuesQuoted 6 lines
Quoted 3 lines
lol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Not without similar changes, omap4+ has the same issue.. There's a RFC series from Nishant to fix some of this, and Tero is moving the PRCM into a driver.
Quoted 8 lines
Quoted 2 lines
Anyway, here's a quick little hack to check if that's the reason for the regression:
OK yeah that's along the same lines with Nishant's RFC series in thread "[RFC PATCH 0/7] ARM: OMAP4+: PRM: minor cleanups and dt support of interrupts"
FYI, it did not compile, needs to include
linux/of_irq.h. But yes,I might have sent the wrong version as I had that same build error and fixed it localy.
Quoted 2 lines
it fixes the regression for me, Also now the whole series works for me :)
good to know.
What do you want to do now ? Wait for PRCM to become a driver ? Wait for Nishanth's series to get accepted ? I guess the same thing could be done for OMAP3 and AM33, then we would have a chance of having working wake from idle with the new irqchip.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
I can repost the current series as it stands now once 17-rc1 comes out (without the build failure ofcourse).. if that helps to move it out of RFC status.
That'd be great. It would be ever greater if you could add support for OMAP3 on that too.
Yeah sounds good to me. Tero, does that work OK for your PRCM changes?
Well, this set seems to break PM. suspend-resume on omap3-beagle just hangs after this set is applied. Works fine without it with 3.16-rc5 tag.
-Tero
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Hi,
Quoted 73 lines · Tero Kristo
Quoted 72 lines · Tony Lindgren
Quoted 71 lines · Felipe Balbi
Hi,
Quoted 67 lines · Nishanth Menon
Quoted 56 lines · Felipe Balbi
HI,
Quoted 38 lines · Tony Lindgren
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 23 lines · Felipe Balbi
Quoted 21 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files, we can completely switch over to a linear irq domain and make use of
irq_alloc_domain_generic_chips()to allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issuesQuoted 6 lines
Quoted 3 lines
lol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Not without similar changes, omap4+ has the same issue.. There's a RFC series from Nishant to fix some of this, and Tero is moving the PRCM into a driver.
Quoted 8 lines
Quoted 2 lines
Anyway, here's a quick little hack to check if that's the reason for the regression:
OK yeah that's along the same lines with Nishant's RFC series in thread "[RFC PATCH 0/7] ARM: OMAP4+: PRM: minor cleanups and dt support of interrupts"
FYI, it did not compile, needs to include
linux/of_irq.h. But yes,I might have sent the wrong version as I had that same build error and fixed it localy.
Quoted 2 lines
it fixes the regression for me, Also now the whole series works for me :)
Quoted 6 lines
good to know.
What do you want to do now ? Wait for PRCM to become a driver ? Wait for Nishanth's series to get accepted ? I guess the same thing could be done for OMAP3 and AM33, then we would have a chance of having working wake from idle with the new irqchip.
I can repost the current series as it stands now once 17-rc1 comes out (without the build failure ofcourse).. if that helps to move it out of RFC status.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
That'd be great. It would be ever greater if you could add support for OMAP3 on that too.
Yeah sounds good to me. Tero, does that work OK for your PRCM changes?
Well, this set seems to break PM. suspend-resume on omap3-beagle just hangs after this set is applied. Works fine without it with 3.16-rc5 tag.
did you apply the quick little hack to prm3xxx.c ? prcm IRQ is hardcoded to 11, once we switch to a linear irq domain, irq_base may change.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140731/b1e3113a/attachment.sig>
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Quoted 79 lines · Felipe Balbi
Hi,
Quoted 76 lines · Tero Kristo
Quoted 75 lines · Tony Lindgren
Quoted 73 lines · Felipe Balbi
Hi,
Quoted 59 lines · Nishanth Menon
Quoted 58 lines · Felipe Balbi
HI,
Quoted 38 lines · Tony Lindgren
Quoted 26 lines · Felipe Balbi
Hi,
Quoted 23 lines · Felipe Balbi
Quoted 21 lines · Tony Lindgren
Quoted 9 lines · Felipe Balbi
Hi,
Quoted 6 lines · Tony Lindgren
Quoted 4 lines · Felipe Balbi
now that we don't need to support legacy board-files,
we can completely switch over to a linear irq domain
and make use of irq_alloc_domain_generic_chips() to
allocate all generic irq chips for us.Quoted 5 lines
Quoted 2 lines
This patch seems to somehow break off-idle for omap3 where it no longer wakes up.
Sure your bisection is correct ? This patch just switches from legacy irq domain to linear irq domain.
Yes, I tried it a few times. Just enabling
retention idle hangs too with this patch.Maybe it's
omap3_prcm_irq_setupthat relies on 11 +OMAP_INTC_START? There may be other such issuesQuoted 6 lines
Quoted 3 lines
lol.
OMAP4 has the same nonsense.
made me think why (if) OMAP4 works with that same setup. Does wake from OFF work with OMAP4 ?
Not without similar changes, omap4+ has the same issue.. There's a RFC series from Nishant to fix some of this, and Tero is moving the PRCM into a driver.
Quoted 8 lines
Quoted 2 lines
Anyway, here's a quick little hack to check if that's the reason for the regression:
OK yeah that's along the same lines with Nishant's RFC series in thread "[RFC PATCH 0/7] ARM: OMAP4+: PRM: minor cleanups and dt support of interrupts"
FYI, it did not compile, needs to include
linux/of_irq.h. But yes,I might have sent the wrong version as I had that same build error and fixed it localy.
Quoted 2 lines
it fixes the regression for me, Also now the whole series works for me :)
good to know.
Quoted 8 lines
Quoted 4 lines
What do you want to do now ? Wait for PRCM to become a driver ? Wait for Nishanth's series to get accepted ? I guess the same thing could be done for OMAP3 and AM33, then we would have a chance of having working wake from idle with the new irqchip.
I can repost the current series as it stands now once 17-rc1 comes out (without the build failure ofcourse).. if that helps to move it out of RFC status.
That'd be great. It would be ever greater if you could add support for OMAP3 on that too.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Yeah sounds good to me. Tero, does that work OK for your PRCM changes?
Well, this set seems to break PM. suspend-resume on omap3-beagle just hangs after this set is applied. Works fine without it with 3.16-rc5 tag.
did you apply the quick little hack to
prm3xxx.c? prcm IRQ is hardcoded to 11, once we switch to a linear irq domain,irq_basemay change.
Yea, with that hack it works. However, you should make that into a proper patch and add it to this series, otherwise you will be causing regressions. Just renaming that tmp into something meaningful for now should be enough for me at least.
-Tero
Re: [PATCH 29/35] arm: omap: intc: switch over to linear irq domain
Hi,
Quoted 22 lines · Tero Kristo
Quoted 22 lines
Quoted 22 lines
Quoted 21 lines
Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
I might have sent the wrong version as I had that same build error and fixed it localy.
Quoted 2 lines
it fixes the regression for me, Also now the whole series works for me :)
good to know.
What do you want to do now ? Wait for PRCM to become a driver ? Wait for Nishanth's series to get accepted ? I guess the same thing could be done for OMAP3 and AM33, then we would have a chance of having working wake from idle with the new irqchip.
Quoted 6 lines
Quoted 3 lines
I can repost the current series as it stands now once 17-rc1 comes out (without the build failure ofcourse).. if that helps to move it out of RFC status.
That'd be great. It would be ever greater if you could add support for OMAP3 on that too.
Yeah sounds good to me. Tero, does that work OK for your PRCM changes?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Well, this set seems to break PM. suspend-resume on omap3-beagle just hangs after this set is applied. Works fine without it with 3.16-rc5 tag.
did you apply the quick little hack to
prm3xxx.c? prcm IRQ is hardcoded to 11, once we switch to a linear irq domain,irq_basemay change.Yea, with that hack it works. However, you should make that into a proper patch and add it to this series, otherwise you will be causing regressions.
can you please read the thread ? Nishanth has a proper series properly doing that for OMAP4, I asking him to add OMAP3 and respin his series without RFC.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140801/eee3ae0d/attachment.sig>
PATCH 30/35 irqchip: add irq-omap-intc.h header
In reply to Felipe BalbiOMAP INTC irqchip driver will be moved under drivers/irqchip/ soon but we still have a dependency with mach-omap2 when it comes to idle functions.
In order to make it easy to share those function prototypes with OMAP PM code, we introduce this new header.
--- arch/arm/mach-omap2/board-3430sdp.c | 1 + arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 1 + arch/arm/mach-omap2/board-devkit8000.c | 1 + arch/arm/mach-omap2/board-ldp.c | 1 + arch/arm/mach-omap2/board-omap3beagle.c | 1 + arch/arm/mach-omap2/board-omap3logic.c | 1 + arch/arm/mach-omap2/board-omap3pandora.c | 1 + arch/arm/mach-omap2/board-omap3stalker.c | 1 + arch/arm/mach-omap2/board-omap3touchbook.c | 1 + arch/arm/mach-omap2/board-overo.c | 1 + arch/arm/mach-omap2/board-rx51.c | 1 + arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 9 --------- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 1 + arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + include/linux/irqchip/irq-omap-intc.h | 32 ++++++++++++++++++++++++++++++ 21 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 include/linux/irqchip/irq-omap-intc.h
arch/arm/mach-omap2/board-3430sdp.c +1 -0
@@ -27,6 +27,7 @@#include <linux/platform_data/spi-omap2-mcspi.h> #include <linux/platform_data/omap-twl4030.h> #include <linux/usb/phy.h> +#include <linux/irqchip/irq-omap-intc.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/board-am3517crane.c +1 -0
@@ -24,6 +24,7 @@#include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> +#include <linux/irqchip/irq-omap-intc.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/board-am3517evm.c +1 -0
@@ -27,6 +27,7 @@#include <linux/mmc/host.h> #include <linux/usb/musb.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/irqchip/irq-omap-intc.h> #include "am35xx.h" #include <asm/mach-types.h>
arch/arm/mach-omap2/board-cm-t35.c +1 -0
@@ -26,6 +26,7 @@#include <linux/delay.h> #include <linux/gpio.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/platform_data/at24.h> #include <linux/i2c/twl.h>
arch/arm/mach-omap2/board-cm-t3517.c +1 -0
@@ -34,6 +34,7 @@#include <linux/mtd/partitions.h> #include <linux/mmc/host.h> #include <linux/can/platform/ti_hecc.h> +#include <linux/irqchip/irq-omap-intc.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/board-devkit8000.c +1 -0
@@ -24,6 +24,7 @@#include <linux/gpio.h> #include <linux/input.h> #include <linux/gpio_keys.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h>
arch/arm/mach-omap2/board-ldp.c +1 -0
@@ -30,6 +30,7 @@#include <linux/mmc/host.h> #include <linux/usb/phy.h> #include <linux/platform_data/spi-omap2-mcspi.h> +#include <linux/irqchip/irq-omap-intc.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/board-omap3beagle.c +1 -0
@@ -27,6 +27,7 @@#include <linux/gpio_keys.h> #include <linux/pm_opp.h> #include <linux/cpu.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h>
arch/arm/mach-omap2/board-omap3logic.c +1 -0
@@ -23,6 +23,7 @@#include <linux/clk.h> #include <linux/io.h> #include <linux/gpio.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h>
arch/arm/mach-omap2/board-omap3pandora.c +1 -0
@@ -20,6 +20,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/platform_device.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/spi/spi.h> #include <linux/regulator/machine.h>
arch/arm/mach-omap2/board-omap3stalker.c +1 -0
@@ -23,6 +23,7 @@#include <linux/gpio.h> #include <linux/input.h> #include <linux/gpio_keys.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h>
arch/arm/mach-omap2/board-omap3touchbook.c +1 -0
@@ -23,6 +23,7 @@#include <linux/gpio.h> #include <linux/input.h> #include <linux/gpio_keys.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h>
arch/arm/mach-omap2/board-overo.c +1 -0
@@ -31,6 +31,7 @@#include <linux/regulator/machine.h> #include <linux/regulator/fixed.h> #include <linux/spi/spi.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h>
arch/arm/mach-omap2/board-rx51.c +1 -0
@@ -22,6 +22,7 @@#include <linux/usb/phy.h> #include <linux/usb/musb.h> #include <linux/platform_data/spi-omap2-mcspi.h> +#include <linux/irqchip/irq-omap-intc.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/board-ti8168evm.c +1 -0
@@ -15,6 +15,7 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h> +#include <linux/irqchip/irq-omap-intc.h> #include <linux/usb/musb.h> #include <asm/mach-types.h>
arch/arm/mach-omap2/common.h +0 -9
@@ -210,15 +210,6 @@ extern struct device *omap2_get_iva_device(void);extern struct device *omap2_get_l3_device (void );extern struct device *omap4_get_dsp_device (void ); -void omap2_init_irq (void ); -void omap3_init_irq (void ); -void ti81xx_init_irq (void ); -extern int omap_irq_pending (void ); -void omap_intc_save_context (void ); -void omap_intc_restore_context (void ); -void omap3_intc_suspend (void ); -void omap3_intc_prepare_idle (void ); -void omap3_intc_resume_idle (void );void omap_gic_of_init (void );#ifdef CONFIG_CACHE_L2X0
arch/arm/mach-omap2/cpuidle34xx.c +1 -0
@@ -27,6 +27,7 @@#include <linux/export.h> #include <linux/cpu_pm.h> #include <asm/cpuidle.h> +#include <linux/irqchip/irq-omap-intc.h> #include "powerdomain.h" #include "clockdomain.h"
arch/arm/mach-omap2/irq.c +1 -0
@@ -22,6 +22,7 @@#include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> +#include <linux/irqchip/irq-omap-intc.h> #include "soc.h" #include "common.h"
arch/arm/mach-omap2/pm24xx.c +1 -0
@@ -30,6 +30,7 @@#include <linux/time.h> #include <linux/gpio.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/irqchip/irq-omap-intc.h> #include <asm/fncpy.h>
arch/arm/mach-omap2/pm34xx.c +1 -0
@@ -30,6 +30,7 @@#include <linux/slab.h> #include <linux/omap-dma.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/irqchip/irq-omap-intc.h> #include <trace/events/power.h>
include/linux/irqchip/irq-omap-intc.h new file +32 -0
@@ -0,0 +1,32 @@ +/** +* irq-omap-intc.h - INTC Idle Functions +* +* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com +* +* Author: Felipe Balbi <[email protected]> +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 of +* the License as published by the Free Software Foundation. +* +* 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. +*/ + +#ifndef __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H +#define __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H + +void omap2_init_irq (void ); +void omap3_init_irq (void ); +void ti81xx_init_irq (void ); + +int omap_irq_pending (void ); +void omap_intc_save_context (void ); +void omap_intc_restore_context (void ); +void omap3_intc_suspend (void ); +void omap3_intc_prepare_idle (void ); +void omap3_intc_resume_idle (void ); + +#endif /* __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H */
Signature · 1 line
2.0.1.563.g66f467c
Tony Lindgren
maintainerRe: [PATCH 30/35] irqchip: add irq-omap-intc.h header
Quoted 31 lines · Felipe Balbi
OMAP INTC irqchip driver will be moved under
drivers/irqchip/soon but we still have a dependency with mach-omap2 when it comes to idle functions.In order to make it easy to share those function prototypes with OMAP PM code, we introduce this new header.
Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/board-3430sdp.c | 1 + arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 1 + arch/arm/mach-omap2/board-devkit8000.c | 1 + arch/arm/mach-omap2/board-ldp.c | 1 + arch/arm/mach-omap2/board-omap3beagle.c | 1 + arch/arm/mach-omap2/board-omap3logic.c | 1 + arch/arm/mach-omap2/board-omap3pandora.c | 1 + arch/arm/mach-omap2/board-omap3stalker.c | 1 + arch/arm/mach-omap2/board-omap3touchbook.c | 1 + arch/arm/mach-omap2/board-overo.c | 1 + arch/arm/mach-omap2/board-rx51.c | 1 + arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 9 --------- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 1 + arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + include/linux/irqchip/irq-omap-intc.h | 32 ++++++++++++++++++++++++++++++
...
include/linux/irqchip/irq-omap-intc.h line 23
Quoted 3 lines
include/linux/irqchip/irq-omap-intc.h new file +3
-0+void omap2_init_irq (void ); +void omap3_init_irq (void ); +void ti81xx_init_irq (void );
I think these will all go away with DT based booting? So it might be worth waiting for that rather than churn all these files, or..
include/linux/irqchip/irq-omap-intc.h line 30
Quoted 6 lines
include/linux/irqchip/irq-omap-intc.h new file +6
-0+int omap_irq_pending (void ); +void omap_intc_save_context (void ); +void omap_intc_restore_context (void ); +void omap3_intc_suspend (void ); +void omap3_intc_prepare_idle (void ); +void omap3_intc_resume_idle (void );
..how about we pass something like struct omap_intc_data as pdata and let the intc driver populate function pointers for these if runtime PM calls are not enough here?
That way we could have just minimal pdata header file.
Regards,
Tony
Re: [PATCH 30/35] irqchip: add irq-omap-intc.h header
Quoted 34 lines · Tony Lindgren
Quoted 31 lines · Felipe Balbi
OMAP INTC irqchip driver will be moved under
drivers/irqchip/soon but we still have a dependency with mach-omap2 when it comes to idle functions.In order to make it easy to share those function prototypes with OMAP PM code, we introduce this new header.
Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/board-3430sdp.c | 1 + arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 1 + arch/arm/mach-omap2/board-devkit8000.c | 1 + arch/arm/mach-omap2/board-ldp.c | 1 + arch/arm/mach-omap2/board-omap3beagle.c | 1 + arch/arm/mach-omap2/board-omap3logic.c | 1 + arch/arm/mach-omap2/board-omap3pandora.c | 1 + arch/arm/mach-omap2/board-omap3stalker.c | 1 + arch/arm/mach-omap2/board-omap3touchbook.c | 1 + arch/arm/mach-omap2/board-overo.c | 1 + arch/arm/mach-omap2/board-rx51.c | 1 + arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 9 --------- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 1 + arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + include/linux/irqchip/irq-omap-intc.h | 32 ++++++++++++++++++++++++++++++...
Quoted 7 lines
include/linux/irqchip/irq-omap-intc.h line 23
Quoted 3 lines
include/linux/irqchip/irq-omap-intc.h new file +3
-0+void omap2_init_irq (void ); +void omap3_init_irq (void ); +void ti81xx_init_irq (void );I think these will all go away with DT based booting? So it might be worth waiting for that rather than churn all these files, or..
you just asked me to rebase this series because now we had OMAP3 idle working with DT. And now, you're asking me to hold on to this series because not everything is DT-based yet.
This is the third time I rebase the series after a long hiatus and it always comes out to the same result -> "let's wait some more".
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/66ce25ba/attachment.sig>
Tony Lindgren
maintainerRe: [PATCH 30/35] irqchip: add irq-omap-intc.h header
Quoted 43 lines · Felipe Balbi
Quoted 34 lines · Tony Lindgren
Quoted 31 lines · Felipe Balbi
OMAP INTC irqchip driver will be moved under
drivers/irqchip/soon but we still have a dependency with mach-omap2 when it comes to idle functions.In order to make it easy to share those function prototypes with OMAP PM code, we introduce this new header.
Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/board-3430sdp.c | 1 + arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 1 + arch/arm/mach-omap2/board-devkit8000.c | 1 + arch/arm/mach-omap2/board-ldp.c | 1 + arch/arm/mach-omap2/board-omap3beagle.c | 1 + arch/arm/mach-omap2/board-omap3logic.c | 1 + arch/arm/mach-omap2/board-omap3pandora.c | 1 + arch/arm/mach-omap2/board-omap3stalker.c | 1 + arch/arm/mach-omap2/board-omap3touchbook.c | 1 + arch/arm/mach-omap2/board-overo.c | 1 + arch/arm/mach-omap2/board-rx51.c | 1 + arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 9 --------- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 1 + arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + include/linux/irqchip/irq-omap-intc.h | 32 ++++++++++++++++++++++++++++++...
Quoted 7 lines
include/linux/irqchip/irq-omap-intc.h line 23
Quoted 3 lines
include/linux/irqchip/irq-omap-intc.h new file +3
-0+void omap2_init_irq (void ); +void omap3_init_irq (void ); +void ti81xx_init_irq (void );I think these will all go away with DT based booting? So it might be worth waiting for that rather than churn all these files, or..
Quoted 3 lines
you just asked me to rebase this series because now we had OMAP3 idle working with DT. And now, you're asking me to hold on to this series because not everything is DT-based yet.
I just don't like the idea of patching all these board files that are going away anyways. If we need to do that, let's just add it to common.h that's already included by all the remaining board-*.c files. I know we should rather include the files directly, but in this case that's just extra churn.
The real problem is how to properly deal with the save and restore calls that idle code needs.
In any case, it seems we can merge quite a bit of this series already and then deal with the problem parts.
Quoted 2 lines
This is the third time I rebase the series after a long hiatus and it always comes out to the same result -> "let's wait some more".
Nope, it's always been "this series causes PM regressions" and few other minor comments. And we have not been in any position to really test that until with v3.16-rc4. And then you always run out of time and nobody else does anything :)
Regards,
Tony
Re: [PATCH 30/35] irqchip: add irq-omap-intc.h header
Quoted 44 lines · Tony Lindgren
Quoted 43 lines · Felipe Balbi
Quoted 41 lines · Tony Lindgren
Quoted 31 lines · Felipe Balbi
OMAP INTC irqchip driver will be moved under
drivers/irqchip/soon but we still have a dependency with mach-omap2 when it comes to idle functions.In order to make it easy to share those function prototypes with OMAP PM code, we introduce this new header.
Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/board-3430sdp.c | 1 + arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 1 + arch/arm/mach-omap2/board-devkit8000.c | 1 + arch/arm/mach-omap2/board-ldp.c | 1 + arch/arm/mach-omap2/board-omap3beagle.c | 1 + arch/arm/mach-omap2/board-omap3logic.c | 1 + arch/arm/mach-omap2/board-omap3pandora.c | 1 + arch/arm/mach-omap2/board-omap3stalker.c | 1 + arch/arm/mach-omap2/board-omap3touchbook.c | 1 + arch/arm/mach-omap2/board-overo.c | 1 + arch/arm/mach-omap2/board-rx51.c | 1 + arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 9 --------- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 1 + arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + include/linux/irqchip/irq-omap-intc.h | 32 ++++++++++++++++++++++++++++++...
include/linux/irqchip/irq-omap-intc.h line 23
Quoted 3 lines
include/linux/irqchip/irq-omap-intc.h new file +3
-0+void omap2_init_irq (void ); +void omap3_init_irq (void ); +void ti81xx_init_irq (void );I think these will all go away with DT based booting? So it might be worth waiting for that rather than churn all these files, or..
Quoted 6 lines
Quoted 3 lines
you just asked me to rebase this series because now we had OMAP3 idle working with DT. And now, you're asking me to hold on to this series because not everything is DT-based yet.
I just don't like the idea of patching all these board files that are going away anyways. If we need to do that, let's just add it
when are they going away ? Are we really gonna delay this series until those board-files eventually vanish ?
Quoted 6 lines
to
common.hthat's already included by all the remaining board-*.c files. I know we should rather include the files directly, but in this case that's just extra churn.The real problem is how to properly deal with the save and restore calls that idle code needs.
well, for system sleep we have callbacks from irq generic itself. The real problem is just with runtime PM.
Quoted 2 lines
In any case, it seems we can merge quite a bit of this series already and then deal with the problem parts.
sure, it at least some of those patches get merged, then it's less crap for me to rebase every now and again.
Quoted 4 lines
Quoted 2 lines
This is the third time I rebase the series after a long hiatus and it always comes out to the same result -> "let's wait some more".
Nope, it's always been "this series causes PM regressions"
you just said that we haven't been in any position to really test this, so can it be that the status has always been "this series causes PM regressions". We couldn't test that before, right ?
Quoted 3 lines
and few other minor comments. And we have not been in any position to really test that until with v3.16-rc4. And then you always run out of time and nobody else does anything :)
sure, I have other stuff to do as well.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/bfeb0b8f/attachment.sig>
Tony Lindgren
maintainerRe: [PATCH 30/35] irqchip: add irq-omap-intc.h header
Quoted 10 lines · Felipe Balbi
Quoted 5 lines · Tony Lindgren
Quoted 2 lines · Felipe Balbi
This is the third time I rebase the series after a long hiatus and it always comes out to the same result -> "let's wait some more".
Nope, it's always been "this series causes PM regressions"
you just said that we haven't been in any position to really test this, so can it be that the status has always been "this series causes PM regressions". We couldn't test that before, right ?
It's been working for legacy booting for years with the mainline kernel, but not for device tree based booting until with v3.16-rc4. I believe I tested your earlier series with my pending DT patches though.
Quoted 5 lines
Quoted 3 lines
and few other minor comments. And we have not been in any position to really test that until with v3.16-rc4. And then you always run out of time and nobody else does anything :)
sure, I have other stuff to do as well.
Right :) I and others can provide some help here, but it's the mr. patch author that needs to follow up on this series too :p
Regards,
Tony
Tony Lindgren
maintainerRe: [PATCH 30/35] irqchip: add irq-omap-intc.h header
In reply to Felipe BalbiQuoted 24 lines · Felipe Balbi
OMAP INTC irqchip driver will be moved under
drivers/irqchip/soon but we still have a dependency with mach-omap2 when it comes to idle functions.In order to make it easy to share those function prototypes with OMAP PM code, we introduce this new header.
Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/board-3430sdp.c | 1 + arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 1 + arch/arm/mach-omap2/board-devkit8000.c | 1 + arch/arm/mach-omap2/board-ldp.c | 1 + arch/arm/mach-omap2/board-omap3beagle.c | 1 + arch/arm/mach-omap2/board-omap3logic.c | 1 + arch/arm/mach-omap2/board-omap3pandora.c | 1 + arch/arm/mach-omap2/board-omap3stalker.c | 1 + arch/arm/mach-omap2/board-omap3touchbook.c | 1 + arch/arm/mach-omap2/board-overo.c | 1 + arch/arm/mach-omap2/board-rx51.c | 1 +
Quoted 8 lines
arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 9 --------- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 1 + arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + include/linux/irqchip/irq-omap-intc.h | 32 ++++++++++++++++++++++++++++++ 21 files changed, 51 insertions(+), 9 deletions(-)
I ended up setting up another branch without this patch at omap-for-v3.12/intc-v2. It now has dependency to the SoC changes from Nishant and the const cleanup fix from Uwe.
This patch is not needed, let's leave this out, the functions needed by the platform code won't need to be in a separate header file as they are only needed by the platform code.
If you have a chance, can you please repost the remainging patches to do the actual move to drivers, but without this patch? And if we are lucky we'll get an ack from the drivers/irqchip maintainers and I can apply those changes too into omap-for-v3.12/intc-v2 ;)
Regards,
Tony
Re: [PATCH 30/35] irqchip: add irq-omap-intc.h header
Hi,
Quoted 34 lines · Tony Lindgren
Quoted 24 lines · Felipe Balbi
OMAP INTC irqchip driver will be moved under
drivers/irqchip/soon but we still have a dependency with mach-omap2 when it comes to idle functions.In order to make it easy to share those function prototypes with OMAP PM code, we introduce this new header.
Signed-off-by Felipe Balbi <[email protected]>--- arch/arm/mach-omap2/board-3430sdp.c | 1 + arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 1 + arch/arm/mach-omap2/board-cm-t3517.c | 1 + arch/arm/mach-omap2/board-devkit8000.c | 1 + arch/arm/mach-omap2/board-ldp.c | 1 + arch/arm/mach-omap2/board-omap3beagle.c | 1 + arch/arm/mach-omap2/board-omap3logic.c | 1 + arch/arm/mach-omap2/board-omap3pandora.c | 1 + arch/arm/mach-omap2/board-omap3stalker.c | 1 + arch/arm/mach-omap2/board-omap3touchbook.c | 1 + arch/arm/mach-omap2/board-overo.c | 1 + arch/arm/mach-omap2/board-rx51.c | 1 +Quoted 8 lines
arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 9 --------- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 1 + arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + include/linux/irqchip/irq-omap-intc.h | 32 ++++++++++++++++++++++++++++++ 21 files changed, 51 insertions(+), 9 deletions(-)
Quoted 5 lines
I ended up setting up another branch without this patch at omap-for-v3.12/intc-v2. It now has dependency to the SoC changes from Nishant and the const cleanup fix from Uwe.
This patch is not needed, let's leave this out, the functions
so, if we don't add that header, we will have to include soc.h and common.h with full (relative) path from drivers/irqchip/irq-omap-intc.c. IOW:
#include "../../arch/arm/mach-omap2/common.h"
Neither soc.h nor common.h are part of the include path. I'd rather not go down that route and just add this extra header. Even if you ask me to move soc.h and common.h under <asm/mach/{soc,common}.h> we will already have to modify every board file anyway.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140915/6a18c2e2/attachment.sig>
PATCH 31/35 arm: omap: irq: move irq.c to drivers/irqchip/
In reply to Felipe BalbiJust move the code over as it has no dependencies
on arch/arm/ anymore.
--- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/Makefile | 3 +-- drivers/irqchip/Kconfig | 5 +++++ drivers/irqchip/Makefile | 1 + arch/arm/mach-omap2/irq.c => drivers/irqchip/irq-omap-intc.c | 9 +++++---- 5 files changed, 13 insertions(+), 6 deletions(-) rename arch/arm/mach-omap2/irq.c => drivers/irqchip/irq-omap-intc.c (98%)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -92,6 +92,7 @@ config ARCH_OMAP2PLUS select PINCTRL select SOC_BUS select TI_PRIV_EDMA + select OMAP_IRQCHIP help Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
arch/arm/mach-omap2/Makefile +1 -2
@@ -10,7 +10,6 @@ obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \ common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ omap_device.o sram.o drm.o -omap-2-3-common = irq.o hwmod-common = omap_hwmod.o omap_hwmod_reset.o \ omap_hwmod_common_data.o clock-common = clock.o clock_common_data.o \
@@ -20,7 +19,7 @@ secure-common = omap-smc.o omap-secure.o obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) obj-$(CONFIG_ARCH_OMAP4) += $(hwmod-common) $(secure-common) -obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common) +obj-$(CONFIG_SOC_AM33XX) += $(hwmod-common) obj-$(CONFIG_SOC_OMAP5) += $(hwmod-common) $(secure-common) obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common) obj-$(CONFIG_SOC_DRA7XX) += $(hwmod-common) $(secure-common)
drivers/irqchip/Kconfig +5 -0
@@ -53,6 +53,11 @@ config CLPS711X_IRQCHIP select SPARSE_IRQ default y +config OMAP_IRQCHIP + bool + select GENERIC_IRQ_CHIP + select IRQ_DOMAIN + config ORION_IRQCHIP bool select IRQ_DOMAIN
drivers/irqchip/Makefile +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_METAG_PERFCOUNTER_IRQS) += irq-metag.o obj-$(CONFIG_ARCH_MOXART) += irq-moxart.o obj-$(CONFIG_CLPS711X_IRQCHIP) += irq-clps711x.o obj-$(CONFIG_ORION_IRQCHIP) += irq-orion.o +obj-$(CONFIG_OMAP_IRQCHIP) += irq-omap-intc.o obj-$(CONFIG_ARCH_SUNXI) += irq-sun4i.o obj-$(CONFIG_ARCH_SUNXI) += irq-sunxi-nmi.o obj-$(CONFIG_ARCH_SPEAR3XX) += spear-shirq.o
drivers/irqchip/irq-omap-intc.c renamed from arch/arm/mach-omap2/irq.c +5 -4
@@ -17,16 +17,17 @@#include <linux/io.h> #include <asm/exception.h> -#include <asm/mach/irq.h> #include <linux/irqdomain.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/irqchip/irq-omap-intc.h> -#include "soc.h" -#include "common.h" -#include "../../drivers/irqchip/irqchip.h" +#include "irqchip.h" + +/* Define these here for now until we drop all board-files */ +#define OMAP24XX_IC_BASE 0x480fe000 +#define OMAP34XX_IC_BASE 0x48200000/* selected INTC register offsets */
Signature · 1 line
2.0.1.563.g66f467c
PATCH 32/35 irq: intc: minor improvement to omap_irq_pending()
In reply to Felipe BalbiWe already hold the number of Pending registers
in omap_nr_pending. Let's use that instead.
--- drivers/irqchip/irq-omap-intc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/irqchip/irq-omap-intc.c +3 -4
@@ -175,11 +175,10 @@ static void __init omap_irq_soft_reset(void)int omap_irq_pending (void ) { -int irq; +int i; -for (irq =0 ; irq < omap_nr_irqs; irq +=32 ) -if (intc_readl (INTC_PENDING_IRQ0 + - ((irq >>5 ) <<5 ))) +for (i =0 ; i < omap_nr_pending; i++) +if (intc_readl (INTC_PENDING_IRQ0 + (0x20 * i)))return 1 ;return 0 ; }
Signature · 1 line
2.0.1.563.g66f467c
PATCH 33/35 irq: intc: comment style cleanup
In reply to Felipe Balbino functional changes, just making sure comment
follows Coding Style.
--- drivers/irqchip/irq-omap-intc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/irqchip/irq-omap-intc.c +4 -2
@@ -327,9 +327,11 @@ out: } }while (irqnr); -/* If an irq is masked or deasserted while active, we will +/* +* If an irq is masked or deasserted while active, we will * keep ending up here with no irq handled. So remove it from -* the INTC with an ack.*/ +* the INTC with an ack. +*/ if (!handled_irq)omap_ack_irq (NULL ); }
Signature · 1 line
2.0.1.563.g66f467c
PATCH 34/35 irq: intc: remove unnecesary of_address_to_resource() call
In reply to Felipe Balbiof_iomap(), which is called from omap_init_irq_of(), already takes care of making sure we have a valid resource to deal with. Because of that, we can safely remove our explicit call to of_address_to_resource().
--- drivers/irqchip/irq-omap-intc.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/irqchip/irq-omap-intc.c +0 -6
@@ -363,7 +363,6 @@ void __init ti81xx_init_irq(void)static int __init intc_of_init (struct device_node *node,struct device_node *parent) { -struct resource res;int ret; omap_nr_pending =3 ;
@@ -372,11 +371,6 @@ static int __init intc_of_init(struct device_node *node,if (WARN_ON (!node))return -ENODEV ; -if (of_address_to_resource (node,0 , &res)) { -WARN (1 ,"unable to get intc registers\n" ); -return -EINVAL ; - } -if (of_device_is_compatible (node,"ti,am33xx-intc" )) { omap_nr_irqs =128 ; omap_nr_pending =4 ;
Signature · 1 line
2.0.1.563.g66f467c
PATCH 35/35 irq: intc: enable IP protection
In reply to Felipe BalbiWhen PROTECTION bit in enabled in PROTECTION
register, INTC's registers are only accessible
from privileged mode.
--- drivers/irqchip/irq-omap-intc.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/irqchip/irq-omap-intc.c +20 -2
@@ -52,6 +52,8 @@#define INTCPS_NR_ILR_REGS 128#define INTCPS_NR_MIR_REGS 3 +#define INTC_PROTECTION_ENABLE (1 << 0) +/* * OMAP2 has a number of different interrupt controllers, each interrupt * controller is identified as its own "bank". Register definitions are
@@ -291,12 +293,28 @@ static int __init omap_init_irq_legacy(u32 base)return 0 ; } +static void __init omap_irq_enable_protection (void ) +{ +u32 reg; + + reg =intc_readl (INTC_PROTECTION ); + reg |=INTC_PROTECTION_ENABLE ; +intc_writel (INTC_PROTECTION , reg); +} +static int __init omap_init_irq (u32 base,struct device_node *node) { +int ret; +if (node) -return omap_init_irq_of (node); + ret =omap_init_irq_of (node);else -return omap_init_irq_legacy (base); + ret =omap_init_irq_legacy (base); + +if (ret ==0 ) +omap_irq_enable_protection (); + +return ret; } static asmlinkage void __exception_irq_entry
Signature · 1 line
2.0.1.563.g66f467c
hi,
Quoted 5 lines · Felipe Balbi
Hi folks,
here's another rebase of the original series moving INTC to drivers.
Quoted 8 lines
There aren't many changes, only some fixes here and there because of recent changes to
irq_domainand irqchip.I have also added a patch to enable INTC address space protection so that only privileged modes can access INTC's address space.
Patches tested on top of v3.17-rc7 with a beagle bone black,
meant v3.16-rc7
Quoted 4 lines
the only plataform I have which still uses INTC.
Tony, if you can run your PM test cases on your side, I'd be really glad.
for convenience, a branch with all these patches on top of v3.16-rc7 is available at [1]:
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git omap-fix-intc
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140728/7482ad17/attachment.sig>
Hi,
Quoted 10 lines · Felipe Balbi
here's another rebase of the original series moving INTC to drivers.
There aren't many changes, only some fixes here and there because of recent changes to
irq_domainand irqchip.I have also added a patch to enable INTC address space protection so that only privileged modes can access INTC's address space.
Quoted 5 lines
Patches tested on top of v3.17-rc7 with a beagle bone black, the only plataform I have which still uses INTC.
Tony, if you can run your PM test cases on your side, I'd be really glad.
for the whole series except of "drop ti,intc-size support", which breaks the DT API.
I will give this a try on my N900 in the next days.
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140729/765a4b58/attachment.sig>
Tony Lindgren
maintainerQuoted 12 lines · Felipe Balbi
Hi folks,
here's another rebase of the original series moving INTC to drivers.
There aren't many changes, only some fixes here and there because of recent changes to
irq_domainand irqchip.I have also added a patch to enable INTC address space protection so that only privileged modes can access INTC's address space.
Quoted 5 lines
Patches tested on top of v3.17-rc7 with a beagle bone black, the only plataform I have which still uses INTC.
Tony, if you can run your PM test cases on your side, I'd be really glad.
With Nishants changes for the omap3 PRCM interrupt and the related .dts changes the PM works for me now with this series.
So I'm applying these into omap-for-v3.18/intc on top of Nishant's changes in omap-for-v3.18/soc thanks.
Regards,
Tony
Quoted 77 lines
cheers
Felipe Balbi (35):
arm: omap: irq: makeomap_irq_baseglobal
arm: omap: irq: defineINTC_ILR0register
arm: omap: irq: start to removeirq_banksarray
arm: omap: irq: add a globalomap_nr_irqsvariable
arm: omap: irq: remove rest ofirq_banksusage
arm: omap: irq: remove unused macro
arm: omap: irq: switch over tointc_readlonomap_intc_handle_irq
arm: omap: irq: remove unnecessarybase_addrargument
arm: omap: irq: renameomap3_intc_regs
arm: omap: irq: always define omap3 support
arm: omap: irq: reorganize code a little bit
arm: omap: irq: makeintc_of_initstatic
arm: omap: irq: callset_handle_irq()fromintc_of_init
arm: omap: irq: useIRQCHIP_DECLAREmacro
arm: omap: irq: drop .handle_irq and .init_irq fields
arm: omap: irq: add specific compatibles for omap3 and am33xx devices
arm: omap: irq: use compatible flag to figure out number of IRQ lines
arm: boot: dts: am33xx/omap3: fix intc compatible flag
arm: omap: irq: drop ti,intc-size support
arm: boot: dts: omap2/3/am33xx: drop ti,intc-size
arm: omap: irq: move some more code around
arm: omap: irq: callset_handle_irq()from .init_irq
arm: omap: irq: dropomap3_intc_handle_irq()
arm: omap: irq: dropomap2_intc_handle_irq()
arm: omap: irq: remove unnecessary header
arm: omap: irq: removenr_irqsargument
arm: omap: irq: introduceomap_nr_pending
arm: omap: irq: get rid of ifdef hack
arm: omap: intc: switch over to linear irq domain
irqchip: addirq-omap-intc.hheader
arm: omap: irq: moveirq.ctodrivers/irqchip/
irq: intc: minor improvement toomap_irq_pending()
irq: intc: comment style cleanup
irq: intc: remove unnecesaryof_address_to_resource()call
irq: intc: enable IP protectionarch/arm/boot/dts/am33xx.dtsi | 3 +- arch/arm/boot/dts/omap2.dtsi | 1 - arch/arm/boot/dts/omap3.dtsi | 3 +- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/Makefile | 3 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-am3517crane.c | 2 +- arch/arm/mach-omap2/board-am3517evm.c | 2 +- arch/arm/mach-omap2/board-cm-t35.c | 3 +- arch/arm/mach-omap2/board-cm-t3517.c | 2 +- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-generic.c | 14 - arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3logic.c | 3 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-omap3stalker.c | 2 +- arch/arm/mach-omap2/board-omap3touchbook.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 22 -- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 380 --------------------------- arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 + drivers/irqchip/Kconfig | 5 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-omap-intc.c | 408 +++++++++++++++++++++++++++++ include/linux/irqchip/irq-omap-intc.h | 32 +++ 30 files changed, 468 insertions(+), 439 deletions(-) delete mode 100644 arch/arm/mach-omap2/irq.c create mode 100644 drivers/irqchip/irq-omap-intc.c create mode 100644 include/linux/irqchip/irq-omap-intc.hSignature · 1 line
2.0.1.563.g66f467c
Quoted 83 lines · Felipe Balbi
Hi folks,
here's another rebase of the original series moving INTC to drivers.
There aren't many changes, only some fixes here and there because of recent changes to
irq_domainand irqchip.I have also added a patch to enable INTC address space protection so that only privileged modes can access INTC's address space.
Patches tested on top of v3.17-rc7 with a beagle bone black, the only plataform I have which still uses INTC.
Tony, if you can run your PM test cases on your side, I'd be really glad.
cheers
Felipe Balbi (35):
arm: omap: irq: makeomap_irq_baseglobal
arm: omap: irq: defineINTC_ILR0register
arm: omap: irq: start to removeirq_banksarray
arm: omap: irq: add a globalomap_nr_irqsvariable
arm: omap: irq: remove rest ofirq_banksusage
arm: omap: irq: remove unused macro
arm: omap: irq: switch over tointc_readlonomap_intc_handle_irq
arm: omap: irq: remove unnecessarybase_addrargument
arm: omap: irq: renameomap3_intc_regs
arm: omap: irq: always define omap3 support
arm: omap: irq: reorganize code a little bit
arm: omap: irq: makeintc_of_initstatic
arm: omap: irq: callset_handle_irq()fromintc_of_init
arm: omap: irq: useIRQCHIP_DECLAREmacro
arm: omap: irq: drop .handle_irq and .init_irq fields
arm: omap: irq: add specific compatibles for omap3 and am33xx devices
arm: omap: irq: use compatible flag to figure out number of IRQ lines
arm: boot: dts: am33xx/omap3: fix intc compatible flag
arm: omap: irq: drop ti,intc-size support
arm: boot: dts: omap2/3/am33xx: drop ti,intc-size
arm: omap: irq: move some more code around
arm: omap: irq: callset_handle_irq()from .init_irq
arm: omap: irq: dropomap3_intc_handle_irq()
arm: omap: irq: dropomap2_intc_handle_irq()
arm: omap: irq: remove unnecessary header
arm: omap: irq: removenr_irqsargument
arm: omap: irq: introduceomap_nr_pending
arm: omap: irq: get rid of ifdef hack
arm: omap: intc: switch over to linear irq domain
irqchip: addirq-omap-intc.hheader
arm: omap: irq: moveirq.ctodrivers/irqchip/
irq: intc: minor improvement toomap_irq_pending()
irq: intc: comment style cleanup
irq: intc: remove unnecesaryof_address_to_resource()call
irq: intc: enable IP protectionarch/arm/boot/dts/am33xx.dtsi | 3 +- arch/arm/boot/dts/omap2.dtsi | 1 - arch/arm/boot/dts/omap3.dtsi | 3 +- arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-omap2/Makefile | 3 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-am3517crane.c | 2 +- arch/arm/mach-omap2/board-am3517evm.c | 2 +- arch/arm/mach-omap2/board-cm-t35.c | 3 +- arch/arm/mach-omap2/board-cm-t3517.c | 2 +- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-generic.c | 14 - arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3logic.c | 3 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-omap3stalker.c | 2 +- arch/arm/mach-omap2/board-omap3touchbook.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/board-ti8168evm.c | 1 + arch/arm/mach-omap2/common.h | 22 -- arch/arm/mach-omap2/cpuidle34xx.c | 1 + arch/arm/mach-omap2/irq.c | 380 --------------------------- arch/arm/mach-omap2/pm24xx.c | 1 + arch/arm/mach-omap2/pm34xx.c | 1 +
Quoted 8 lines
drivers/irqchip/Kconfig | 5 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-omap-intc.c | 408 +++++++++++++++++++++++++++++ include/linux/irqchip/irq-omap-intc.h | 32 +++ 30 files changed, 468 insertions(+), 439 deletions(-) delete mode 100644 arch/arm/mach-omap2/irq.c create mode 100644 drivers/irqchip/irq-omap-intc.c create mode 100644 include/linux/irqchip/irq-omap-intc.h
For patches 32-35, please fix the subject line to:
irqchip: omap-intc: C...
With that changed, patches 30-35 are:
thx,
Jason.
Tony Lindgren
maintainerQuoted 9 lines · Jason Cooper
On Mon, Jul 28, 2014 at 04:15:48PM -0500, Felipe Balbi wrote:
For patches 32-35, please fix the subject line to:
irqchip: omap-intc: C...
With that changed, patches 30-35 are:
Acked-by Jason Cooper <[email protected]>
Great, thanks Jason for looking through them.
Felipe, can you please repost the missing patches with Jason's changes and leaving out patch 30/35 to avoid board-*.c file churn?
The branch to use for rebasing is omap-for-v3.18/intc-v2 that already contains the arch/arm/mach-omap2 related changes.
Regards,
Tony