Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258231
b: refs/heads/master
c: b69874e
h: refs/heads/master
i:
  258229: 14ef529
  258227: 2310907
  258223: ffe811f
v: v3
  • Loading branch information
Russell King committed Jun 24, 2011
1 parent 8737038 commit 6dd3cca
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 72 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: 7f294e4983b67be802277d139522837b3ce5769f
refs/heads/master: b69874e4f530b0103e507f695c010d00cb85a4df
14 changes: 13 additions & 1 deletion trunk/arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,8 @@ __common_mmu_cache_on:
sub pc, lr, r0, lsr #32 @ properly flush pipeline
#endif

#define PROC_ENTRY_SIZE (4*5)

/*
* Here follow the relocatable cache support functions for the
* various processors. This is a generic hook for locating an
Expand Down Expand Up @@ -624,7 +626,7 @@ call_cache_fn: adr r12, proc_types
ARM( addeq pc, r12, r3 ) @ call cache function
THUMB( addeq r12, r3 )
THUMB( moveq pc, r12 ) @ call cache function
add r12, r12, #4*5
add r12, r12, #PROC_ENTRY_SIZE
b 1b

/*
Expand Down Expand Up @@ -794,6 +796,16 @@ proc_types:

.size proc_types, . - proc_types

/*
* If you get a "non-constant expression in ".if" statement"
* error from the assembler on this line, check that you have
* not accidentally written a "b" instruction where you should
* have written W(b).
*/
.if (. - proc_types) % PROC_ENTRY_SIZE != 0
.error "The size of one or more proc_types entries is wrong."
.endif

/*
* Turn off the Cache and MMU. ARMv3 does not support
* reading the control register, but ARMv4 does.
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/arm/include/asm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
* Do not include any C declarations in this file - it is included by
* assembler source.
*/
#ifndef __ASM_ASSEMBLER_H__
#define __ASM_ASSEMBLER_H__

#ifndef __ASSEMBLY__
#error "Only include this from assembly code"
#endif
Expand Down Expand Up @@ -290,3 +293,4 @@
.macro ldrusr, reg, ptr, inc, cond=al, rept=1, abort=9001f
usracc ldr, \reg, \ptr, \inc, \cond, \rept, \abort
.endm
#endif /* __ASM_ASSEMBLER_H__ */
2 changes: 2 additions & 0 deletions trunk/arch/arm/include/asm/entry-macro-multi.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <asm/assembler.h>

/*
* Interrupt handling. Preserves r7, r8, r9
*/
Expand Down
13 changes: 11 additions & 2 deletions trunk/arch/arm/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,17 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
offset -= 0x02000000;
offset += sym->st_value - loc;

/* only Thumb addresses allowed (no interworking) */
if (!(offset & 1) ||
/*
* For function symbols, only Thumb addresses are
* allowed (no interworking).
*
* For non-function symbols, the destination
* has no specific ARM/Thumb disposition, so
* the branch is resolved under the assumption
* that interworking is not required.
*/
if ((ELF32_ST_TYPE(sym->st_info) == STT_FUNC &&
!(offset & 1)) ||
offset <= (s32)0xff000000 ||
offset >= (s32)0x01000000) {
pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n",
Expand Down
99 changes: 50 additions & 49 deletions trunk/arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,54 +342,6 @@ static void __init feat_v6_fixup(void)
elf_hwcap &= ~HWCAP_TLS;
}

static void __init setup_processor(void)
{
struct proc_info_list *list;

/*
* locate processor in the list of supported processor
* types. The linker builds this table for us from the
* entries in arch/arm/mm/proc-*.S
*/
list = lookup_processor_type(read_cpuid_id());
if (!list) {
printk("CPU configuration botched (ID %08x), unable "
"to continue.\n", read_cpuid_id());
while (1);
}

cpu_name = list->cpu_name;

#ifdef MULTI_CPU
processor = *list->proc;
#endif
#ifdef MULTI_TLB
cpu_tlb = *list->tlb;
#endif
#ifdef MULTI_USER
cpu_user = *list->user;
#endif
#ifdef MULTI_CACHE
cpu_cache = *list->cache;
#endif

printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
proc_arch[cpu_architecture()], cr_alignment);

sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
elf_hwcap = list->elf_hwcap;
#ifndef CONFIG_ARM_THUMB
elf_hwcap &= ~HWCAP_THUMB;
#endif

feat_v6_fixup();

cacheid_init();
cpu_proc_init();
}

/*
* cpu_init - initialise one CPU.
*
Expand All @@ -405,6 +357,8 @@ void cpu_init(void)
BUG();
}

cpu_proc_init();

/*
* Define the placement constraint for the inline asm directive below.
* In Thumb-2, msr with an immediate value is not allowed.
Expand Down Expand Up @@ -441,6 +395,54 @@ void cpu_init(void)
: "r14");
}

static void __init setup_processor(void)
{
struct proc_info_list *list;

/*
* locate processor in the list of supported processor
* types. The linker builds this table for us from the
* entries in arch/arm/mm/proc-*.S
*/
list = lookup_processor_type(read_cpuid_id());
if (!list) {
printk("CPU configuration botched (ID %08x), unable "
"to continue.\n", read_cpuid_id());
while (1);
}

cpu_name = list->cpu_name;

#ifdef MULTI_CPU
processor = *list->proc;
#endif
#ifdef MULTI_TLB
cpu_tlb = *list->tlb;
#endif
#ifdef MULTI_USER
cpu_user = *list->user;
#endif
#ifdef MULTI_CACHE
cpu_cache = *list->cache;
#endif

printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
proc_arch[cpu_architecture()], cr_alignment);

sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
elf_hwcap = list->elf_hwcap;
#ifndef CONFIG_ARM_THUMB
elf_hwcap &= ~HWCAP_THUMB;
#endif

feat_v6_fixup();

cacheid_init();
cpu_init();
}

void __init dump_machine_table(void)
{
struct machine_desc *p;
Expand Down Expand Up @@ -913,7 +915,6 @@ void __init setup_arch(char **cmdline_p)
#endif
reserve_crashkernel();

cpu_init();
tcm_init();

#ifdef CONFIG_MULTI_IRQ_HANDLER
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,13 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
smp_store_cpu_info(cpu);

/*
* OK, now it's safe to let the boot CPU continue
* OK, now it's safe to let the boot CPU continue. Wait for
* the CPU migration code to notice that the CPU is online
* before we continue.
*/
set_cpu_online(cpu, true);
while (!cpu_active(cpu))
cpu_relax();

/*
* OK, it's off to the idle thread for us
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-h720x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ config ARCH_H7201
bool "gms30c7201"
depends on ARCH_H720X
select CPU_H7201
select ZONE_DMA
help
Say Y here if you are using the Hynix GMS30C7201 Reference Board

config ARCH_H7202
bool "hms30c7202"
select CPU_H7202
select ZONE_DMA
depends on ARCH_H720X
help
Say Y here if you are using the Hynix HMS30C7202 Reference Board
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/arm/mm/proc-sa1100.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*/
#define DCACHELINESIZE 32

__INIT
.section .text

/*
* cpu_sa1100_proc_init()
Expand All @@ -45,8 +45,6 @@ ENTRY(cpu_sa1100_proc_init)
mcr p15, 0, r0, c9, c0, 5 @ Allow read-buffer operations from userland
mov pc, lr

.section .text

/*
* cpu_sa1100_proc_fin()
*
Expand Down
16 changes: 10 additions & 6 deletions trunk/arch/arm/mm/proc-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -210,29 +210,33 @@ cpu_v7_name:

/* Suspend/resume support: derived from arch/arm/mach-s5pv210/sleep.S */
.globl cpu_v7_suspend_size
.equ cpu_v7_suspend_size, 4 * 8
.equ cpu_v7_suspend_size, 4 * 9
#ifdef CONFIG_PM_SLEEP
ENTRY(cpu_v7_do_suspend)
stmfd sp!, {r4 - r11, lr}
mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
mrc p15, 0, r5, c13, c0, 1 @ Context ID
mrc p15, 0, r6, c13, c0, 3 @ User r/o thread ID
stmia r0!, {r4 - r6}
mrc p15, 0, r6, c3, c0, 0 @ Domain ID
mrc p15, 0, r7, c2, c0, 0 @ TTB 0
mrc p15, 0, r8, c2, c0, 1 @ TTB 1
mrc p15, 0, r9, c1, c0, 0 @ Control register
mrc p15, 0, r10, c1, c0, 1 @ Auxiliary control register
mrc p15, 0, r11, c1, c0, 2 @ Co-processor access control
stmia r0, {r4 - r11}
stmia r0, {r6 - r11}
ldmfd sp!, {r4 - r11, pc}
ENDPROC(cpu_v7_do_suspend)

ENTRY(cpu_v7_do_resume)
mov ip, #0
mcr p15, 0, ip, c8, c7, 0 @ invalidate TLBs
mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache
ldmia r0, {r4 - r11}
ldmia r0!, {r4 - r6}
mcr p15, 0, r4, c13, c0, 0 @ FCSE/PID
mcr p15, 0, r5, c13, c0, 1 @ Context ID
mcr p15, 0, r6, c13, c0, 3 @ User r/o thread ID
ldmia r0, {r6 - r11}
mcr p15, 0, r6, c3, c0, 0 @ Domain ID
mcr p15, 0, r7, c2, c0, 0 @ TTB 0
mcr p15, 0, r8, c2, c0, 1 @ TTB 1
Expand Down Expand Up @@ -418,9 +422,9 @@ ENTRY(v7_processor_functions)
.word cpu_v7_dcache_clean_area
.word cpu_v7_switch_mm
.word cpu_v7_set_pte_ext
.word 0
.word 0
.word 0
.word cpu_v7_suspend_size
.word cpu_v7_do_suspend
.word cpu_v7_do_resume
.size v7_processor_functions, . - v7_processor_functions

.section ".rodata"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-iop/cp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
#include <linux/init.h>
#include <asm/traps.h>
#include <asm/ptrace.h>

static int cp6_trap(struct pt_regs *regs, unsigned int instr)
{
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,15 +1061,7 @@ static int __devinit mmci_probe(struct amba_device *dev,
}

mmc->ops = &mmci_ops;
/*
* The ARM and ST versions of the block have slightly different
* clock divider equations which means that the minimum divider
* differs too.
*/
if (variant->st_clkdiv)
mmc->f_min = DIV_ROUND_UP(host->mclk, 257);
else
mmc->f_min = DIV_ROUND_UP(host->mclk, 512);
mmc->f_min = (host->mclk + 511) / 512;
/*
* If the platform data supplies a maximum operating
* frequency, this takes precedence. Else, we fall back
Expand Down

0 comments on commit 6dd3cca

Please sign in to comment.