Skip to content

Commit

Permalink
Merge branch 'samsung/board' into next/board
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnd Bergmann committed Oct 7, 2011
2 parents e2d7fbb + 31451af commit 127d4eb
Show file tree
Hide file tree
Showing 15 changed files with 251 additions and 150 deletions.
14 changes: 14 additions & 0 deletions arch/arm/mach-exynos4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ config SOC_EXYNOS4212
help
Enable EXYNOS4212 SoC support

config SOC_EXYNOS4412
bool
help
Enable EXYNOS4412 SoC support

config EXYNOS4_MCT
bool
default y
Expand Down Expand Up @@ -243,6 +248,15 @@ config MACH_SMDK4212
help
Machine support for Samsung SMDK4212

comment "EXYNOS4412 Boards"

config MACH_SMDK4412
bool "SMDK4412"
select SOC_EXYNOS4412
select MACH_SMDK4212
help
Machine support for Samsung SMDK4412

endmenu

comment "Configuration for HSMMC bus width"
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-exynos4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
obj-$(CONFIG_MACH_NURI) += mach-nuri.o
obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o

obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4212.o
obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4x12.o
obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o

# device support

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-exynos4/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ static unsigned long exynos4_fout_apll_get_rate(struct clk *clk)
if (soc_is_exynos4210())
return s5p_get_pll45xx(xtal_rate, __raw_readl(S5P_APLL_CON0),
pll_4508);
else if (soc_is_exynos4212())
else if (soc_is_exynos4212() || soc_is_exynos4412())
return s5p_get_pll35xx(xtal_rate, __raw_readl(S5P_APLL_CON0));
else
return 0;
Expand Down Expand Up @@ -1200,7 +1200,7 @@ void __init_or_cpufreq exynos4_setup_clocks(void)
vpllsrc = clk_get_rate(&clk_vpllsrc.clk);
vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0),
__raw_readl(S5P_VPLL_CON1), pll_4650c);
} else if (soc_is_exynos4212()) {
} else if (soc_is_exynos4212() || soc_is_exynos4412()) {
apll = s5p_get_pll35xx(xtal, __raw_readl(S5P_APLL_CON0));
mpll = s5p_get_pll35xx(xtal, __raw_readl(S5P_MPLL_CON0));
epll = s5p_get_pll36xx(xtal, __raw_readl(S5P_EPLL_CON0),
Expand Down
21 changes: 15 additions & 6 deletions arch/arm/mach-exynos4/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <mach/regs-irq.h>
#include <mach/regs-pmu.h>

unsigned int gic_bank_offset __read_mostly;

extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
unsigned int irq_start);
extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
Expand Down Expand Up @@ -191,27 +193,34 @@ void __init exynos4_init_clocks(int xtal)

if (soc_is_exynos4210())
exynos4210_register_clocks();
else if (soc_is_exynos4212())
else if (soc_is_exynos4212() || soc_is_exynos4412())
exynos4212_register_clocks();

exynos4_register_clocks();
exynos4_setup_clocks();
}

static void exynos4_gic_irq_eoi(struct irq_data *d)
static void exynos4_gic_irq_fix_base(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());
(gic_bank_offset * smp_processor_id());

gic_data->dist_base = S5P_VA_GIC_DIST +
(gic_bank_offset * smp_processor_id());
}

void __init exynos4_init_irq(void)
{
int irq;

gic_init(0, IRQ_SPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU);
gic_arch_extn.irq_eoi = exynos4_gic_irq_eoi;
gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000;

gic_init(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU);
gic_arch_extn.irq_eoi = exynos4_gic_irq_fix_base;
gic_arch_extn.irq_unmask = exynos4_gic_irq_fix_base;
gic_arch_extn.irq_mask = exynos4_gic_irq_fix_base;

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

Expand Down Expand Up @@ -250,7 +259,7 @@ static int __init exynos4_l2x0_cache_init(void)

if (soc_is_exynos4210())
__raw_writel(0x110, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL);
else if (soc_is_exynos4212())
else if (soc_is_exynos4212() || soc_is_exynos4412())
__raw_writel(0x120, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL);

/* L2X0 Prefetch Control */
Expand Down
29 changes: 24 additions & 5 deletions arch/arm/mach-exynos4/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,25 @@
.endm

.macro get_irqnr_preamble, base, tmp
ldr \base, =gic_cpu_base_addr
mov \tmp, #0

mrc p15, 0, \base, c0, c0, 5
and \base, \base, #3
cmp \base, #0
beq 1f

ldr \tmp, =gic_bank_offset
ldr \tmp, [\tmp]
cmp \base, #1
beq 1f

cmp \base, #2
addeq \tmp, \tmp, \tmp
addne \tmp, \tmp, \tmp, LSL #1

1: 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
add \base, \base, \tmp
.endm

.macro arch_ret_to_user, tmp1, tmp2
Expand Down Expand Up @@ -80,4 +93,10 @@
/* As above, this assumes that irqstat and base are preserved.. */

.macro test_for_ltirq, irqnr, irqstat, base, tmp
bic \irqnr, \irqstat, #0x1c00
mov \tmp, #0
cmp \irqnr, #28
moveq \tmp, #1
streq \irqstat, [\base, #GIC_CPU_EOI]
cmp \tmp, #0
.endm
2 changes: 2 additions & 0 deletions arch/arm/mach-exynos4/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#define IRQ_PPI(x) S5P_IRQ(x+16)

#define IRQ_MCT_LOCALTIMER IRQ_PPI(12)

/* SPI: Shared Peripheral Interrupt */

#define IRQ_SPI(x) S5P_IRQ(x+32)
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-exynos4/include/mach/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@

#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
5 changes: 3 additions & 2 deletions arch/arm/mach-exynos4/include/mach/regs-mct.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
#define EXYNOS4_MCT_G_INT_ENB EXYNOS4_MCTREG(0x248)
#define EXYNOS4_MCT_G_WSTAT EXYNOS4_MCTREG(0x24C)

#define EXYNOS4_MCT_L0_BASE EXYNOS4_MCTREG(0x300)
#define EXYNOS4_MCT_L1_BASE EXYNOS4_MCTREG(0x400)
#define _EXYNOS4_MCT_L_BASE EXYNOS4_MCTREG(0x300)
#define EXYNOS4_MCT_L_BASE(x) (_EXYNOS4_MCT_L_BASE + (0x100 * x))
#define EXYNOS4_MCT_L_MASK (0xffffff00)

#define MCT_L_TCNTB_OFFSET (0x00)
#define MCT_L_ICNTB_OFFSET (0x08)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-exynos4/mach-origen.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static void __init origen_machine_init(void)

MACHINE_START(ORIGEN, "ORIGEN")
/* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */
.boot_params = S5P_PA_SDRAM + 0x100,
.atag_offset = 0x100,
.init_irq = exynos4_init_irq,
.map_io = origen_map_io,
.init_machine = origen_machine_init,
Expand Down
Loading

0 comments on commit 127d4eb

Please sign in to comment.