summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/intc.c
Commit message (Collapse)AuthorAgeFilesLines
* microblaze: intc: Remove unused headerMichal Simek2013-09-031-3/+0
| | | | | | | asm/irq.h is included in linux/irq.h asm/prom.h and linux/init.h is not needed Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: intc: Clean driver init functionMichal Simek2013-09-031-10/+19
| | | | | | | | - Use of_iomap - Use of_property_read_u32 - Fix printk Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: intc: Using irqchipMichal Simek2013-09-031-5/+7
| | | | | | | - Move init_IRQ to irq.c - Use IRQCHIP_DECLARE macro Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: intc: Update headerMichal Simek2013-09-031-1/+2
| | | | | | Update dates in header and add Xilinx to it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Remove selfmodified featureMichal Simek2013-09-031-28/+8
| | | | | | | | This was experimental feature which has never been widely used because it expects GCC behaviour. Also remove INTC_BASE and TIMER_BASE macros. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Set the default irq_domainDan Christensen2013-05-091-0/+2
| | | | | | | | | Register the irq_domain created during initialization as the default so that device drivers can pass NULL to irq_create_mapping and get a virtual irq to pass to request_irq. Signed-off-by: Dan Christensen <opello@opello.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Fix coding style issuesMichal Simek2013-02-121-2/+2
| | | | | | Fix coding style issues reported by checkpatch.pl. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Add static qualifiersMichal Simek2012-12-131-1/+1
| | | | | | | | | | | | | | | | Adding static to internal variables and functions. Sparse warnings: arch/microblaze/kernel/prom.c:55:6: warning: symbol 'stdout' was not declared. Should it be static? arch/microblaze/kernel/prom.c:57:12: warning: symbol 'early_init_dt_scan_chosen_serial' was not declared. Should it be static? CC arch/microblaze/kernel/prom.o arch/microblaze/kernel/intc.c:102:5: warning: symbol 'xintc_map' was not declared. Should it be static? CC arch/microblaze/kernel/intc.o Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Fix intc_enable_or_unmask functionMichal Simek2012-12-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Intc_enable_or_unmask() is called at the last stage of handle_level_irq(). This function enables the irq first (Write INTC.SIE) and clear ISR next (Write INTC.IAR). This would create problems that processor will get into a new interrupt as soon as SIE is written because the previous level interrupt has been captured by INTC. If the description bring some puzzles, here is the details of how interrupt is handled for MicroBlaze after Interrupt signal is detected: 1. disable INTC (INTC.CIE = 1) 2. Acknowledge INTC (INTC.IAR = 1) 3. gets into interrupt source's handler, for example, timer's handler 4. Timer is interrupt handler acknowledge Timer Interrupt Status (Timer.TCSR0[23] = 1), and return 5. Enable INTC (INTC.SIE = 1) 6. Acknowledge INTC (INTC.IAR = 1) INTC continue to capture source inputs even if INTC is disabled (INTC.IER == 1). So between the gap of step 2 and step 3, the level interrupt from source makes INTC captures a new interrupt and thus the INTC.ISR = 1 during step 3, 4, and 5. When INTC is enabled in step 5, INTC's interrupt output will go high immediately. In summary, the driver should issue step 6 before step 5. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds2012-03-271-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull arch/microblaze fixes from Michal Simek * 'next' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Handle TLB skip size dynamically microblaze: Introduce TLB skip size microblaze: Improve TLB calculation for small systems microblaze: Extend space for compiled-in FDT to 32kB microblaze: Clear all MSR flags on the first kernel instruction microblaze: Use node name instead of compatible string microblaze: Fix mapin_ram function microblaze: Highmem support microblaze: Use active regions microblaze: Show more detailed information about memory microblaze: Introduce fixmap microblaze: mm: Fix lowmem max memory size limits microblaze: mm: Use ZONE_DMA instead of ZONE_NORMAL microblaze: trivial: Fix typo fault in timer.c microblaze: Use vsprintf extention %pf with builtin_return_address microblaze: Add PVR version string for MB 8.20.b and 8.30.a microblaze: Fix makefile to work with latest toolchain microblaze: Fix typo in early_printk.c
| * microblaze: Use node name instead of compatible stringMichal Simek2012-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Change report in bootlog: Origin: xlnx,xps-intc-1.00.a #0 at 0xc8000000, num_irq=6, edge=0x4 xlnx,xps-timer-1.00.a #0 at 0xc8004000, irq=2 New: interrupt-controller #0 at 0xc8000000, num_irq=6, edge=0x4 system-timer #0 at 0xc8004000, irq=2 Signed-off-by: Michal Simek <monstr@monstr.eu>
* | irq_domain/microblaze: Convert microblaze to use irq_domainsGrant Likely2012-02-161-24/+37
|/ | | | | | | | | | | | | | This patch converts Microblaze to use the irq_domain remapper and get away from hard coding the offset between hwirq number and the linux irq number space. This also paves the way for multiple interrupt controllers. v2: Don't enable SPARSE_IRQ and keep NR_IRQS set to 33 Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Michal Simek <monstr@monstr.eu> Cc: Rob Herring <rob.herring@calxeda.com> Cc: John Williams <john.williams@petalogix.com> Cc: John Linn <john.linn@xilinx.com>
* microblaze: Change NO_IRQ to 0Michal Simek2012-01-051-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | As has been discussed many times[1], Using NO_IRQ set to anything other than 0 is bug waiting to happen since many drivers follow the pattern "if (!irq)" for testing whether or not an irq has been set. This patch changes the Microblaze NO_IRQ setting from -1 to 0 to bring it in line with most of the rest of the kernel. It also prepares for Microblaze eventually supporting multiple interrupt controllers by breaking the assumption that hwirq# == Linux IRQ#. The Linux IRQ number is just a cookie with no guarantee of a direct relationship with the hardware irq arrangement. At this point, Microblaze interrupt handling only supports only one instance of one kind of interrupt controller (xilinx_intc). This change shouldn't affect any architecture code outside of the interrupt controller driver and the irq_of mapping. Updated to 3.2 and to use irq_data.hwirq by Rob Herring. Tested and fixed by Michal Simek. [1] http://lkml.org/lkml/2005/11/21/221 Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: intc: Change variable nameMichal Simek2012-01-051-6/+5
| | | | | | | intr_type is mask - change name. s/intr_type/intr_mask/g Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Use of_find_compatible_node for timer and intcMichal Simek2012-01-051-13/+4
| | | | | | | Calling of_find_compatible_node instead of calling private code which does the same. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Do not show error message for 32 interrupt linesMichal Simek2011-07-271-1/+1
| | | | | | | | When interrupt controller uses 32 interrupts lines the kernel show error message about mismatch in kind-of-intr parameter because it exceeds u32. Recast fixs this issue. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Fix level/edge irq sensibilityMichal Simek2011-04-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches: "microblaze: Convert to new irq function names" sha (4adc192ec7d977c74c750320f289af9d61c1caca) and "microblaze: Use generic show_interrupts()" sha(9d61c18b25726306c9231428c17db42e3ff29ba7) should also setup edge/level in irq_set_chip_and_handler_name name parameter. Error log: ~ # cat /proc/interrupts CPU0 2: 2 Xilinx INTC-Xilinx INTC eth0 3: 2 Xilinx INTC-Xilinx INTC eth0 4: 241 Xilinx INTC-Xilinx INTC timer 6: 108 Xilinx INTC-Xilinx INTC serial Fixed: ~ # cat /proc/interrupts CPU0 2: 2 Xilinx INTC-level eth0 3: 2 Xilinx INTC-level eth0 4: 238 Xilinx INTC-edge timer 6: 108 Xilinx INTC-level serial Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Thomas Gleixner <tglx@linutronix.de> --- v2: Fix exchanged edge and level
* microblaze: Convert to new irq function namesThomas Gleixner2011-03-291-3/+3
| | | | | | | | Namespace conversion scripted with coccinelle. Also retrieve the irq type from irq_data in intc_enable_or_unmask() Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* microblaze: Convert irq_chip to new functionsThomas Gleixner2011-03-091-19/+19
| | | | | | | Use proper irq_desc wrappers while at it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Remove stale irq_chip.endThomas Gleixner2011-03-091-13/+0
| | | | | | | | | irq_chip.end got obsolete with the removal of __do_IRQ(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Tested-by: Michal Simek <monstr@monstr.eu> LKML-Reference: <20110203004210.240154507@linutronix.de>
* microblaze: Add support for little-endian MicroblazeMichal Simek2010-10-211-3/+6
| | | | | | | | | | | | | Microblaze little-endian toolchain exports __MICROBLAZEEL__ which is used in the kernel to identify little/big endian. The most of the changes are in loading values from DTB which is always big endian. Little endian platforms are based on new AXI bus which has impact to early uartlite initialization. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Remove additional compatible propertiesMichal Simek2010-10-211-3/+0
| | | | | | | Device-tree BSP generates longer compatible properties that's why we can remove extra/old one. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Use static const char * const where possibleJoe Perches2010-10-211-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Fix level interrupt ACKingsteve@digidescorp.com2009-12-141-1/+9
| | | | | | | | | Level interrupts need to be ack'd in the unmask handler, as in powerpc. Among other issues, this bug causes the system clock to appear to run at double-speed. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Sane handling of missing timer/intc in device treeJohn Williams2009-08-181-0/+2
| | | | | | | | | | This code path doesn't test any returned pointers for NULL, leading to a bad kernel page fault if there's no timer/intc found. Slightly better is to BUG(), but even better still would be a printk beforehand. Signed-off-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Fix kind-of-intr checking against number of interruptsMichal Simek2009-05-181-2/+2
| | | | | | + Fix typographic fault. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze_v8: Interrupt handling and timer supportMichal Simek2009-03-271-0/+172
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@elte.hu> Reviewed-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: John Linn <john.linn@xilinx.com> Acked-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
OpenPOWER on IntegriCloud