Skip to content

Commit 167eeb4

Browse files
committed
Merge tag 'mvebu-fixes-3.13-2' of git://git.infradead.org/linux-mvebu into fixes
mvebu fixes for v3.13 (incremental #2) - allow building and booting DT and non-DT plat-orion SoCs - catch proper return value for kirkwood_pm_init() - properly check return of of_iomap to solve boot hangs (mirabox, others) - remove a compile warning on Armada 370 with non-SMP. * tag 'mvebu-fixes-3.13-2' of git://git.infradead.org/linux-mvebu: ARM: mvebu: fix compilation warning on Armada 370 (i.e. non-SMP) ARM: mvebu: Fix kernel hang in mvebu_soc_id_init() when of_iomap failed ARM: kirkwood: kirkwood_pm_init() should return void ARM: orion: provide C-style interrupt handler for MULTI_IRQ_HANDLER Signed-off-by: Olof Johansson <olof@lixom.net>
2 parents 3f7c730 + 19e61d4 commit 167eeb4

File tree

4 files changed

+52
-5
lines changed

4 files changed

+52
-5
lines changed

arch/arm/mach-kirkwood/pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/suspend.h>
1919
#include <linux/io.h>
2020
#include <mach/bridge-regs.h>
21+
#include "common.h"
2122

2223
static void __iomem *ddr_operation_base;
2324

@@ -65,9 +66,8 @@ static const struct platform_suspend_ops kirkwood_suspend_ops = {
6566
.valid = kirkwood_pm_valid_standby,
6667
};
6768

68-
int __init kirkwood_pm_init(void)
69+
void __init kirkwood_pm_init(void)
6970
{
7071
ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4);
7172
suspend_set_ops(&kirkwood_suspend_ops);
72-
return 0;
7373
}

arch/arm/mach-mvebu/mvebu-soc-id.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static int __init mvebu_soc_id_init(void)
8888
}
8989

9090
pci_base = of_iomap(child, 0);
91-
if (IS_ERR(pci_base)) {
91+
if (pci_base == NULL) {
9292
pr_err("cannot map registers\n");
9393
ret = -ENOMEM;
9494
goto res_ioremap;

arch/arm/plat-orion/irq.c

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,51 @@
1515
#include <linux/io.h>
1616
#include <linux/of_address.h>
1717
#include <linux/of_irq.h>
18+
#include <asm/exception.h>
1819
#include <plat/irq.h>
1920
#include <plat/orion-gpio.h>
21+
#include <mach/bridge-regs.h>
22+
23+
#ifdef CONFIG_MULTI_IRQ_HANDLER
24+
/*
25+
* Compiling with both non-DT and DT support enabled, will
26+
* break asm irq handler used by non-DT boards. Therefore,
27+
* we provide a C-style irq handler even for non-DT boards,
28+
* if MULTI_IRQ_HANDLER is set.
29+
*
30+
* Notes:
31+
* - this is prepared for Kirkwood and Dove only, update
32+
* accordingly if you add Orion5x or MV78x00.
33+
* - Orion5x uses different macro names and has only one
34+
* set of CAUSE/MASK registers.
35+
* - MV78x00 uses the same macro names but has a third
36+
* set of CAUSE/MASK registers.
37+
*
38+
*/
39+
40+
static void __iomem *orion_irq_base = IRQ_VIRT_BASE;
41+
42+
asmlinkage void
43+
__exception_irq_entry orion_legacy_handle_irq(struct pt_regs *regs)
44+
{
45+
u32 stat;
46+
47+
stat = readl_relaxed(orion_irq_base + IRQ_CAUSE_LOW_OFF);
48+
stat &= readl_relaxed(orion_irq_base + IRQ_MASK_LOW_OFF);
49+
if (stat) {
50+
unsigned int hwirq = __fls(stat);
51+
handle_IRQ(hwirq, regs);
52+
return;
53+
}
54+
stat = readl_relaxed(orion_irq_base + IRQ_CAUSE_HIGH_OFF);
55+
stat &= readl_relaxed(orion_irq_base + IRQ_MASK_HIGH_OFF);
56+
if (stat) {
57+
unsigned int hwirq = 32 + __fls(stat);
58+
handle_IRQ(hwirq, regs);
59+
return;
60+
}
61+
}
62+
#endif
2063

2164
void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
2265
{
@@ -35,6 +78,10 @@ void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
3578
ct->chip.irq_unmask = irq_gc_mask_set_bit;
3679
irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE,
3780
IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE);
81+
82+
#ifdef CONFIG_MULTI_IRQ_HANDLER
83+
set_handle_irq(orion_legacy_handle_irq);
84+
#endif
3885
}
3986

4087
#ifdef CONFIG_OF

drivers/irqchip/irq-armada-370-xp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@
5959
#define PCI_MSI_DOORBELL_END (32)
6060
#define PCI_MSI_DOORBELL_MASK 0xFFFF0000
6161

62-
static DEFINE_RAW_SPINLOCK(irq_controller_lock);
63-
6462
static void __iomem *per_cpu_int_base;
6563
static void __iomem *main_int_base;
6664
static struct irq_domain *armada_370_xp_mpic_domain;
@@ -239,6 +237,8 @@ static inline int armada_370_xp_msi_init(struct device_node *node,
239237
#endif
240238

241239
#ifdef CONFIG_SMP
240+
static DEFINE_RAW_SPINLOCK(irq_controller_lock);
241+
242242
static int armada_xp_set_affinity(struct irq_data *d,
243243
const struct cpumask *mask_val, bool force)
244244
{

0 commit comments

Comments
 (0)