summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/cpu/interrupts.c
Commit message (Collapse)AuthorAgeFilesLines
* microblaze: intc: Clear interrupt codeMichal Simek2012-07-101-38/+50
| | | | | | | | | Clear and prepare for device-tree driven configuration. Remove CONFIG_SYS_INTC_0 definition Use dynamic allocation instead of static. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org>
* microblaze: avoid interrupt race conditionsStephan Linz2012-02-231-2/+2
| | | | | | | | | | | | | | The interrupt acknowledge action have to run after the registered interrupt handler. So we have a chance to bear out the corresponding interrupt request in the corresponding controller hardware. With this reordering, we optain a proper interrupt handling for level triggered interrupt sources -- for example the new axi_timer v1.02.a introduced in ISE 13.2. Signed-off-by: Stephan Linz <linz@li-pro.net> Acked-by: Michal Simek <monstr@monstr.eu>
* microblaze: Disabling interrupt should return 1 if was enabledMichal Simek2011-01-101-1/+4
| | | | | | | | | | Microblaze implement enable/disable interrupts through MSR that's why disable_interrupts function should return 1 when interrupt was enabled. Return 0 when interrupt was disabled. Signed-off-by: John Linn <john.linn@xilinx.com> Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Wolfgang Denk <wd@denx.de>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* microblaze: Fix interrupt handler codeMichal Simek2010-04-161-17/+11
| | | | | | | It is better to read ivr and react on it than do long parsing from two regs. Interrupt controller returs actual irq number. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Move FSL initialization to board.cMichal Simek2010-04-161-7/+0
| | | | | | Move FSL out of interrupt controller. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Move timer initialization to board.cMichal Simek2010-04-161-6/+0
| | | | | | | I would like to handle case where system doesn't contain intc that's why I need timer initialization out of intc code. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Move cpu/microblaze/* to arch/microblaze/cpu/*Peter Tyser2010-04-131-0/+220
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
OpenPOWER on IntegriCloud