diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-02-23 03:21:41 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-23 03:21:41 -0500 |
commit | 7acdbb3f35f4d08c0c4f7cfa306bc7006b6ba902 (patch) | |
tree | c76aeb5996fa8f39b838e9cc41f40f854db01912 /arch/microblaze/kernel | |
parent | 695884fb8acd9857e0e7120ccb2150e30f4b8fef (diff) | |
parent | f5412be599602124d2bdd49947b231dd77c0bf99 (diff) |
Merge branch 'linus' into x86/platform
Reason: Import mainline device tree changes on which further patches
depend on or conflict.
Trivial conflict in: drivers/spi/pxa2xx_spi_pci.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r-- | arch/microblaze/kernel/cpu/pvr.c | 4 | ||||
-rw-r--r-- | arch/microblaze/kernel/head.S | 29 | ||||
-rw-r--r-- | arch/microblaze/kernel/hw_exception_handler.S | 4 | ||||
-rw-r--r-- | arch/microblaze/kernel/setup.c | 4 |
4 files changed, 23 insertions, 18 deletions
diff --git a/arch/microblaze/kernel/cpu/pvr.c b/arch/microblaze/kernel/cpu/pvr.c index e01afa68273e..488c1ed24e38 100644 --- a/arch/microblaze/kernel/cpu/pvr.c +++ b/arch/microblaze/kernel/cpu/pvr.c | |||
@@ -27,7 +27,7 @@ | |||
27 | register unsigned tmp __asm__("r3"); \ | 27 | register unsigned tmp __asm__("r3"); \ |
28 | tmp = 0x0; /* Prevent warning about unused */ \ | 28 | tmp = 0x0; /* Prevent warning about unused */ \ |
29 | __asm__ __volatile__ ( \ | 29 | __asm__ __volatile__ ( \ |
30 | "mfs %0, rpvr" #pvrid ";" \ | 30 | "mfs %0, rpvr" #pvrid ";" \ |
31 | : "=r" (tmp) : : "memory"); \ | 31 | : "=r" (tmp) : : "memory"); \ |
32 | val = tmp; \ | 32 | val = tmp; \ |
33 | } | 33 | } |
@@ -54,7 +54,7 @@ int cpu_has_pvr(void) | |||
54 | if (!(flags & PVR_MSR_BIT)) | 54 | if (!(flags & PVR_MSR_BIT)) |
55 | return 0; | 55 | return 0; |
56 | 56 | ||
57 | get_single_pvr(0x00, pvr0); | 57 | get_single_pvr(0, pvr0); |
58 | pr_debug("%s: pvr0 is 0x%08x\n", __func__, pvr0); | 58 | pr_debug("%s: pvr0 is 0x%08x\n", __func__, pvr0); |
59 | 59 | ||
60 | if (pvr0 & PVR0_PVR_FULL_MASK) | 60 | if (pvr0 & PVR0_PVR_FULL_MASK) |
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index 42434008209e..778a5ce2e4fc 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S | |||
@@ -62,23 +62,32 @@ real_start: | |||
62 | andi r1, r1, ~2 | 62 | andi r1, r1, ~2 |
63 | mts rmsr, r1 | 63 | mts rmsr, r1 |
64 | /* | 64 | /* |
65 | * Here is checking mechanism which check if Microblaze has msr instructions | 65 | * According to Xilinx, msrclr instruction behaves like 'mfs rX,rpc' |
66 | * We load msr and compare it with previous r1 value - if is the same, | 66 | * if the msrclr instruction is not enabled. We use this to detect |
67 | * msr instructions works if not - cpu don't have them. | 67 | * if the opcode is available, by issuing msrclr and then testing the result. |
68 | * r8 == 0 - msr instructions are implemented | ||
69 | * r8 != 0 - msr instructions are not implemented | ||
68 | */ | 70 | */ |
69 | /* r8=0 - I have msr instr, 1 - I don't have them */ | 71 | msrclr r8, 0 /* clear nothing - just read msr for test */ |
70 | rsubi r0, r0, 1 /* set the carry bit */ | 72 | cmpu r8, r8, r1 /* r1 must contain msr reg content */ |
71 | msrclr r0, 0x4 /* try to clear it */ | ||
72 | /* read the carry bit, r8 will be '0' if msrclr exists */ | ||
73 | addik r8, r0, 0 | ||
74 | 73 | ||
75 | /* r7 may point to an FDT, or there may be one linked in. | 74 | /* r7 may point to an FDT, or there may be one linked in. |
76 | if it's in r7, we've got to save it away ASAP. | 75 | if it's in r7, we've got to save it away ASAP. |
77 | We ensure r7 points to a valid FDT, just in case the bootloader | 76 | We ensure r7 points to a valid FDT, just in case the bootloader |
78 | is broken or non-existent */ | 77 | is broken or non-existent */ |
79 | beqi r7, no_fdt_arg /* NULL pointer? don't copy */ | 78 | beqi r7, no_fdt_arg /* NULL pointer? don't copy */ |
80 | lw r11, r0, r7 /* Does r7 point to a */ | 79 | /* Does r7 point to a valid FDT? Load HEADER magic number */ |
81 | rsubi r11, r11, OF_DT_HEADER /* valid FDT? */ | 80 | /* Run time Big/Little endian platform */ |
81 | /* Save 1 as word and load byte - 0 - BIG, 1 - LITTLE */ | ||
82 | addik r11, r0, 0x1 /* BIG/LITTLE checking value */ | ||
83 | /* __bss_start will be zeroed later - it is just temp location */ | ||
84 | swi r11, r0, TOPHYS(__bss_start) | ||
85 | lbui r11, r0, TOPHYS(__bss_start) | ||
86 | beqid r11, big_endian /* DO NOT break delay stop dependency */ | ||
87 | lw r11, r0, r7 /* Big endian load in delay slot */ | ||
88 | lwr r11, r0, r7 /* Little endian load */ | ||
89 | big_endian: | ||
90 | rsubi r11, r11, OF_DT_HEADER /* Check FDT header */ | ||
82 | beqi r11, _prepare_copy_fdt | 91 | beqi r11, _prepare_copy_fdt |
83 | or r7, r0, r0 /* clear R7 when not valid DTB */ | 92 | or r7, r0, r0 /* clear R7 when not valid DTB */ |
84 | bnei r11, no_fdt_arg /* No - get out of here */ | 93 | bnei r11, no_fdt_arg /* No - get out of here */ |
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S index 25f6e07d8de8..782680de3121 100644 --- a/arch/microblaze/kernel/hw_exception_handler.S +++ b/arch/microblaze/kernel/hw_exception_handler.S | |||
@@ -147,10 +147,6 @@ | |||
147 | #if CONFIG_XILINX_MICROBLAZE0_USE_BARREL > 0 | 147 | #if CONFIG_XILINX_MICROBLAZE0_USE_BARREL > 0 |
148 | #define BSRLI(rD, rA, imm) \ | 148 | #define BSRLI(rD, rA, imm) \ |
149 | bsrli rD, rA, imm | 149 | bsrli rD, rA, imm |
150 | #elif CONFIG_XILINX_MICROBLAZE0_USE_DIV > 0 | ||
151 | #define BSRLI(rD, rA, imm) \ | ||
152 | ori rD, r0, (1 << imm); \ | ||
153 | idivu rD, rD, rA | ||
154 | #else | 150 | #else |
155 | #define BSRLI(rD, rA, imm) BSRLI ## imm (rD, rA) | 151 | #define BSRLI(rD, rA, imm) BSRLI ## imm (rD, rA) |
156 | /* Only the used shift constants defined here - add more if needed */ | 152 | /* Only the used shift constants defined here - add more if needed */ |
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index bb1558e4b283..9312fbb37efd 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c | |||
@@ -161,11 +161,11 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, | |||
161 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR | 161 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR |
162 | if (msr) | 162 | if (msr) |
163 | eprintk("!!!Your kernel has setup MSR instruction but " | 163 | eprintk("!!!Your kernel has setup MSR instruction but " |
164 | "CPU don't have it %d\n", msr); | 164 | "CPU don't have it %x\n", msr); |
165 | #else | 165 | #else |
166 | if (!msr) | 166 | if (!msr) |
167 | eprintk("!!!Your kernel not setup MSR instruction but " | 167 | eprintk("!!!Your kernel not setup MSR instruction but " |
168 | "CPU have it %d\n", msr); | 168 | "CPU have it %x\n", msr); |
169 | #endif | 169 | #endif |
170 | 170 | ||
171 | for (src = __ivt_start; src < __ivt_end; src++, dst++) | 171 | for (src = __ivt_start; src < __ivt_end; src++, dst++) |