Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374215
b: refs/heads/master
c: 863a08d
h: refs/heads/master
i:
  374213: 1f953b1
  374211: 2625888
  374207: 72b2e4d
v: v3
  • Loading branch information
Arnd Bergmann committed Apr 19, 2013
1 parent 72d37dd commit 608aa12
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 92c8e4962054a6cf5171b3d7a3a77b799ca62c10
refs/heads/master: 863a08dc8bc7ce32ecc9136671610a93a0dd68b1
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-exynos/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ void __init exynos4_init_irq(void)
#endif

if (!of_have_populated_dt())
combiner_init(S5P_VA_COMBINER_BASE, NULL, max_combiner_nr());
combiner_init(S5P_VA_COMBINER_BASE, NULL,
max_combiner_nr(), COMBINER_IRQ(0, 0));

/*
* The parameters of s5p_init_irq() are for VIC init.
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-exynos/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void exynos4212_register_clocks(void);

struct device_node;
void combiner_init(void __iomem *combiner_base, struct device_node *np,
unsigned int max_nr);
unsigned int max_nr, int irq_base);

extern struct smp_operations exynos_smp_ops;

Expand Down
23 changes: 13 additions & 10 deletions trunk/drivers/irqchip/exynos-combiner.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,27 +206,22 @@ static unsigned int combiner_lookup_irq(int group)

void __init combiner_init(void __iomem *combiner_base,
struct device_node *np,
unsigned int max_nr)
unsigned int max_nr,
int irq_base)
{
int i, irq, irq_base;
int i, irq;
unsigned int nr_irq;
struct combiner_chip_data *combiner_data;

nr_irq = max_nr * IRQ_IN_COMBINER;

irq_base = irq_alloc_descs(COMBINER_IRQ(0, 0), 1, nr_irq, 0);
if (IS_ERR_VALUE(irq_base)) {
irq_base = COMBINER_IRQ(0, 0);
pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base);
}

combiner_data = kcalloc(max_nr, sizeof (*combiner_data), GFP_KERNEL);
if (!combiner_data) {
pr_warning("%s: could not allocate combiner data\n", __func__);
return;
}

combiner_irq_domain = irq_domain_add_legacy(np, nr_irq, irq_base, 0,
combiner_irq_domain = irq_domain_add_simple(np, nr_irq, irq_base,
&combiner_irq_domain_ops, combiner_data);
if (WARN_ON(!combiner_irq_domain)) {
pr_warning("%s: irq domain init failed\n", __func__);
Expand All @@ -253,6 +248,7 @@ static int __init combiner_of_init(struct device_node *np,
{
void __iomem *combiner_base;
unsigned int max_nr = 20;
int irq_base = -1;

combiner_base = of_iomap(np, 0);
if (!combiner_base) {
Expand All @@ -266,7 +262,14 @@ static int __init combiner_of_init(struct device_node *np,
__func__, max_nr);
}

combiner_init(combiner_base, np, max_nr);
/*
* FIXME: This is a hardwired COMBINER_IRQ(0,0). Once all devices
* get their IRQ from DT, remove this in order to get dynamic
* allocation.
*/
irq_base = 160;

combiner_init(combiner_base, np, max_nr, irq_base);

return 0;
}
Expand Down

0 comments on commit 608aa12

Please sign in to comment.