Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260619
b: refs/heads/master
c: aab74d3
h: refs/heads/master
i:
  260617: edb0c79
  260615: 1a7869f
v: v3
  • Loading branch information
Changhwan Youn authored and Kukjin Kim committed Jul 20, 2011
1 parent 80f27bf commit 4ee241e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 2 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: e807acbc6fd1d5ff115f9a8eae0c1af6cf1c46c6
refs/heads/master: aab74d3e753649defa52ea43cbec1e91ebb4cc8e
10 changes: 10 additions & 0 deletions trunk/arch/arm/mach-exynos4/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <asm/proc-fns.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/gic.h>

#include <plat/cpu.h>
#include <plat/clock.h>
Expand Down Expand Up @@ -160,11 +161,20 @@ void __init exynos4_init_clocks(int xtal)
exynos4_setup_clocks();
}

static void exynos4_gic_irq_eoi(struct irq_data *d)
{
struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);

gic_data->cpu_base = S5P_VA_GIC_CPU +
(EXYNOS4_GIC_BANK_OFFSET * smp_processor_id());
}

void __init exynos4_init_irq(void)
{
int irq;

gic_init(0, IRQ_LOCALTIMER, S5P_VA_GIC_DIST, S5P_VA_GIC_CPU);
gic_arch_extn.irq_eoi = exynos4_gic_irq_eoi;

for (irq = 0; irq < MAX_COMBINER_NR; irq++) {

Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/arm/mach-exynos4/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

#include <mach/hardware.h>
#include <mach/map.h>
#include <asm/hardware/gic.h>

.macro disable_fiq
Expand All @@ -18,6 +19,10 @@
.macro get_irqnr_preamble, base, tmp
ldr \base, =gic_cpu_base_addr
ldr \base, [\base]
mrc p15, 0, \tmp, c0, c0, 5
and \tmp, \tmp, #3
cmp \tmp, #1
addeq \base, \base, #EXYNOS4_GIC_BANK_OFFSET
.endm

.macro arch_ret_to_user, tmp1, tmp2
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-exynos4/include/mach/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@

#define EXYNOS4_PA_GIC_CPU 0x10480000
#define EXYNOS4_PA_GIC_DIST 0x10490000
#define EXYNOS4_GIC_BANK_OFFSET 0x8000

#define EXYNOS4_PA_COREPERI 0x10500000
#define EXYNOS4_PA_TWD 0x10500600
Expand Down
27 changes: 26 additions & 1 deletion trunk/arch/arm/mach-exynos4/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,39 @@ static void __iomem *scu_base_addr(void)

static DEFINE_SPINLOCK(boot_lock);

static void __cpuinit exynos4_gic_secondary_init(void)
{
void __iomem *dist_base = S5P_VA_GIC_DIST +
(EXYNOS4_GIC_BANK_OFFSET * smp_processor_id());
void __iomem *cpu_base = S5P_VA_GIC_CPU +
(EXYNOS4_GIC_BANK_OFFSET * smp_processor_id());
int i;

/*
* Deal with the banked PPI and SGI interrupts - disable all
* PPI interrupts, ensure all SGI interrupts are enabled.
*/
__raw_writel(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR);
__raw_writel(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET);

/*
* Set priority on PPI and SGI interrupts
*/
for (i = 0; i < 32; i += 4)
__raw_writel(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4);

__raw_writel(0xf0, cpu_base + GIC_CPU_PRIMASK);
__raw_writel(1, cpu_base + GIC_CPU_CTRL);
}

void __cpuinit platform_secondary_init(unsigned int cpu)
{
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
exynos4_gic_secondary_init();

/*
* let the primary processor know we're out of the
Expand Down

0 comments on commit 4ee241e

Please sign in to comment.