Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'misc' into for-linus

Conflicts:
arch/arm/mach-integrator/integrator_ap.c

+787 -539
+4
arch/arm/Kconfig
··· 212 212 you need to shrink the kernel to the minimal size. 213 213 214 214 215 + config GENERIC_BUG 216 + def_bool y 217 + depends on BUG 218 + 215 219 source "init/Kconfig" 216 220 217 221 source "kernel/Kconfig.freezer"
+9
arch/arm/boot/Makefile
··· 78 78 79 79 $(obj)/uImage: STARTADDR=$(LOADADDR) 80 80 81 + check_for_multiple_loadaddr = \ 82 + if [ $(words $(LOADADDR)) -gt 1 ]; then \ 83 + echo 'multiple load addresses: $(LOADADDR)'; \ 84 + echo 'This is incompatible with uImages'; \ 85 + echo 'Specify LOADADDR on the commandline to build an uImage'; \ 86 + false; \ 87 + fi 88 + 81 89 $(obj)/uImage: $(obj)/zImage FORCE 90 + @$(check_for_multiple_loadaddr) 82 91 $(call if_changed,uimage) 83 92 @echo ' Image $@ is ready' 84 93
+8
arch/arm/boot/compressed/Makefile
··· 139 139 ( echo "following symbols must have non local/private scope:" >&2; \ 140 140 echo "$$bad_syms" >&2; rm -f $@; false ) 141 141 142 + check_for_multiple_zreladdr = \ 143 + if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \ 144 + echo 'multiple zreladdrs: $(ZRELADDR)'; \ 145 + echo 'This needs CONFIG_AUTO_ZRELADDR to be set'; \ 146 + false; \ 147 + fi 148 + 142 149 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ 143 150 $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE 151 + @$(check_for_multiple_zreladdr) 144 152 $(call if_changed,ld) 145 153 @$(check_for_bad_syms) 146 154
+1 -1
arch/arm/common/pl330.c
··· 1546 1546 1547 1547 /* Start the next */ 1548 1548 case PL330_OP_START: 1549 - if (!_start(thrd)) 1549 + if (!_thrd_active(thrd) && !_start(thrd)) 1550 1550 ret = -EIO; 1551 1551 break; 1552 1552
+15 -4
arch/arm/configs/integrator_defconfig
··· 1 1 CONFIG_EXPERIMENTAL=y 2 2 CONFIG_SYSVIPC=y 3 + CONFIG_TINY_RCU=y 3 4 CONFIG_IKCONFIG=y 4 5 CONFIG_IKCONFIG_PROC=y 5 6 CONFIG_LOG_BUF_SHIFT=14 ··· 9 8 CONFIG_MODULE_UNLOAD=y 10 9 CONFIG_ARCH_INTEGRATOR=y 11 10 CONFIG_ARCH_INTEGRATOR_AP=y 11 + CONFIG_ARCH_INTEGRATOR_CP=y 12 12 CONFIG_CPU_ARM720T=y 13 13 CONFIG_CPU_ARM920T=y 14 + CONFIG_CPU_ARM922T=y 15 + CONFIG_CPU_ARM926T=y 16 + CONFIG_CPU_ARM1020=y 17 + CONFIG_CPU_ARM1022=y 18 + CONFIG_CPU_ARM1026=y 14 19 CONFIG_PCI=y 20 + CONFIG_NO_HZ=y 21 + CONFIG_HIGH_RES_TIMERS=y 22 + CONFIG_PREEMPT=y 23 + CONFIG_AEABI=y 15 24 CONFIG_LEDS=y 16 25 CONFIG_LEDS_CPU=y 17 26 CONFIG_ZBOOT_ROM_TEXT=0x0 18 27 CONFIG_ZBOOT_ROM_BSS=0x0 19 - CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp mem=32M" 28 + CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp" 20 29 CONFIG_CPU_FREQ=y 21 30 CONFIG_CPU_FREQ_GOV_POWERSAVE=y 22 31 CONFIG_CPU_FREQ_GOV_USERSPACE=y 23 32 CONFIG_CPU_FREQ_GOV_ONDEMAND=y 24 33 CONFIG_FPE_NWFPE=y 25 - CONFIG_PM=y 26 34 CONFIG_NET=y 27 35 CONFIG_PACKET=y 28 36 CONFIG_UNIX=y ··· 42 32 CONFIG_IP_PNP_BOOTP=y 43 33 # CONFIG_IPV6 is not set 44 34 CONFIG_MTD=y 45 - CONFIG_MTD_PARTITIONS=y 46 35 CONFIG_MTD_CMDLINE_PARTS=y 47 36 CONFIG_MTD_AFS_PARTS=y 48 37 CONFIG_MTD_CHAR=y ··· 49 40 CONFIG_MTD_CFI=y 50 41 CONFIG_MTD_CFI_ADV_OPTIONS=y 51 42 CONFIG_MTD_CFI_INTELEXT=y 43 + CONFIG_MTD_PHYSMAP=y 52 44 CONFIG_BLK_DEV_LOOP=y 53 45 CONFIG_BLK_DEV_RAM=y 54 46 CONFIG_BLK_DEV_RAM_SIZE=8192 ··· 66 56 CONFIG_FB_MATROX=y 67 57 CONFIG_FB_MATROX_MILLENIUM=y 68 58 CONFIG_FB_MATROX_MYSTIQUE=y 59 + CONFIG_RTC_CLASS=y 60 + CONFIG_RTC_DRV_PL030=y 69 61 CONFIG_EXT2_FS=y 70 62 CONFIG_TMPFS=y 71 63 CONFIG_JFFS2_FS=y ··· 80 68 CONFIG_PARTITION_ADVANCED=y 81 69 CONFIG_MAGIC_SYSRQ=y 82 70 CONFIG_DEBUG_KERNEL=y 83 - CONFIG_DEBUG_ERRORS=y
+17
arch/arm/include/asm/Kbuild
··· 1 1 include include/asm-generic/Kbuild.asm 2 2 3 3 header-y += hwcap.h 4 + 5 + generic-y += auxvec.h 6 + generic-y += bitsperlong.h 7 + generic-y += cputime.h 8 + generic-y += emergency-restart.h 9 + generic-y += errno.h 10 + generic-y += ioctl.h 11 + generic-y += irq_regs.h 12 + generic-y += kdebug.h 13 + generic-y += local.h 14 + generic-y += local64.h 15 + generic-y += percpu.h 16 + generic-y += poll.h 17 + generic-y += resource.h 18 + generic-y += sections.h 19 + generic-y += siginfo.h 20 + generic-y += sizes.h
-4
arch/arm/include/asm/auxvec.h
··· 1 - #ifndef __ASMARM_AUXVEC_H 2 - #define __ASMARM_AUXVEC_H 3 - 4 - #endif
-1
arch/arm/include/asm/bitsperlong.h
··· 1 - #include <asm-generic/bitsperlong.h>
+47 -10
arch/arm/include/asm/bug.h
··· 3 3 4 4 5 5 #ifdef CONFIG_BUG 6 - #ifdef CONFIG_DEBUG_BUGVERBOSE 7 - extern void __bug(const char *file, int line) __attribute__((noreturn)); 8 6 9 - /* give file/line information */ 10 - #define BUG() __bug(__FILE__, __LINE__) 11 - 7 + /* 8 + * Use a suitable undefined instruction to use for ARM/Thumb2 bug handling. 9 + * We need to be careful not to conflict with those used by other modules and 10 + * the register_undef_hook() system. 11 + */ 12 + #ifdef CONFIG_THUMB2_KERNEL 13 + #define BUG_INSTR_VALUE 0xde02 14 + #define BUG_INSTR_TYPE ".hword " 12 15 #else 13 - 14 - /* this just causes an oops */ 15 - #define BUG() do { *(int *)0 = 0; } while (1) 16 - 16 + #define BUG_INSTR_VALUE 0xe7f001f2 17 + #define BUG_INSTR_TYPE ".word " 17 18 #endif 19 + 20 + 21 + #define BUG() _BUG(__FILE__, __LINE__, BUG_INSTR_VALUE) 22 + #define _BUG(file, line, value) __BUG(file, line, value) 23 + 24 + #ifdef CONFIG_DEBUG_BUGVERBOSE 25 + 26 + /* 27 + * The extra indirection is to ensure that the __FILE__ string comes through 28 + * OK. Many version of gcc do not support the asm %c parameter which would be 29 + * preferable to this unpleasantness. We use mergeable string sections to 30 + * avoid multiple copies of the string appearing in the kernel image. 31 + */ 32 + 33 + #define __BUG(__file, __line, __value) \ 34 + do { \ 35 + BUILD_BUG_ON(sizeof(struct bug_entry) != 12); \ 36 + asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n" \ 37 + ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \ 38 + "2:\t.asciz " #__file "\n" \ 39 + ".popsection\n" \ 40 + ".pushsection __bug_table,\"a\"\n" \ 41 + "3:\t.word 1b, 2b\n" \ 42 + "\t.hword " #__line ", 0\n" \ 43 + ".popsection"); \ 44 + unreachable(); \ 45 + } while (0) 46 + 47 + #else /* not CONFIG_DEBUG_BUGVERBOSE */ 48 + 49 + #define __BUG(__file, __line, __value) \ 50 + do { \ 51 + asm volatile(BUG_INSTR_TYPE #__value); \ 52 + unreachable(); \ 53 + } while (0) 54 + #endif /* CONFIG_DEBUG_BUGVERBOSE */ 18 55 19 56 #define HAVE_ARCH_BUG 20 - #endif 57 + #endif /* CONFIG_BUG */ 21 58 22 59 #include <asm-generic/bug.h> 23 60
+4 -1
arch/arm/include/asm/cachetype.h
··· 7 7 #define CACHEID_VIPT (CACHEID_VIPT_ALIASING|CACHEID_VIPT_NONALIASING) 8 8 #define CACHEID_ASID_TAGGED (1 << 3) 9 9 #define CACHEID_VIPT_I_ALIASING (1 << 4) 10 + #define CACHEID_PIPT (1 << 5) 10 11 11 12 extern unsigned int cacheid; 12 13 ··· 17 16 #define cache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_ALIASING) 18 17 #define icache_is_vivt_asid_tagged() cacheid_is(CACHEID_ASID_TAGGED) 19 18 #define icache_is_vipt_aliasing() cacheid_is(CACHEID_VIPT_I_ALIASING) 19 + #define icache_is_pipt() cacheid_is(CACHEID_PIPT) 20 20 21 21 /* 22 22 * __LINUX_ARM_ARCH__ is the minimum supported CPU architecture ··· 28 26 #if __LINUX_ARM_ARCH__ >= 7 29 27 #define __CACHEID_ARCH_MIN (CACHEID_VIPT_NONALIASING |\ 30 28 CACHEID_ASID_TAGGED |\ 31 - CACHEID_VIPT_I_ALIASING) 29 + CACHEID_VIPT_I_ALIASING |\ 30 + CACHEID_PIPT) 32 31 #elif __LINUX_ARM_ARCH__ >= 6 33 32 #define __CACHEID_ARCH_MIN (~CACHEID_VIVT) 34 33 #else
-6
arch/arm/include/asm/cputime.h
··· 1 - #ifndef __ARM_CPUTIME_H 2 - #define __ARM_CPUTIME_H 3 - 4 - #include <asm-generic/cputime.h> 5 - 6 - #endif /* __ARM_CPUTIME_H */
+3
arch/arm/include/asm/device.h
··· 10 10 #ifdef CONFIG_DMABOUNCE 11 11 struct dmabounce_device_info *dmabounce; 12 12 #endif 13 + #ifdef CONFIG_IOMMU_API 14 + void *iommu; /* private IOMMU data */ 15 + #endif 13 16 }; 14 17 15 18 struct pdev_archdata {
-6
arch/arm/include/asm/emergency-restart.h
··· 1 - #ifndef _ASM_EMERGENCY_RESTART_H 2 - #define _ASM_EMERGENCY_RESTART_H 3 - 4 - #include <asm-generic/emergency-restart.h> 5 - 6 - #endif /* _ASM_EMERGENCY_RESTART_H */
-6
arch/arm/include/asm/errno.h
··· 1 - #ifndef _ARM_ERRNO_H 2 - #define _ARM_ERRNO_H 3 - 4 - #include <asm-generic/errno.h> 5 - 6 - #endif
+6 -5
arch/arm/include/asm/io.h
··· 80 80 81 81 extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, unsigned int); 82 82 extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int); 83 + extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached); 83 84 extern void __iounmap(volatile void __iomem *addr); 84 85 85 86 /* ··· 211 210 * IO port primitives for more information. 212 211 */ 213 212 #ifdef __mem_pci 214 - #define readb_relaxed(c) ({ u8 __v = __raw_readb(__mem_pci(c)); __v; }) 215 - #define readw_relaxed(c) ({ u16 __v = le16_to_cpu((__force __le16) \ 216 - __raw_readw(__mem_pci(c))); __v; }) 217 - #define readl_relaxed(c) ({ u32 __v = le32_to_cpu((__force __le32) \ 218 - __raw_readl(__mem_pci(c))); __v; }) 213 + #define readb_relaxed(c) ({ u8 __r = __raw_readb(__mem_pci(c)); __r; }) 214 + #define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \ 215 + __raw_readw(__mem_pci(c))); __r; }) 216 + #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \ 217 + __raw_readl(__mem_pci(c))); __r; }) 219 218 220 219 #define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c))) 221 220 #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \
-1
arch/arm/include/asm/ioctl.h
··· 1 - #include <asm-generic/ioctl.h>
-1
arch/arm/include/asm/irq_regs.h
··· 1 - #include <asm-generic/irq_regs.h>
-1
arch/arm/include/asm/kdebug.h
··· 1 - #include <asm-generic/kdebug.h>
-1
arch/arm/include/asm/local.h
··· 1 - #include <asm-generic/local.h>
-1
arch/arm/include/asm/local64.h
··· 1 - #include <asm-generic/local64.h>
+1 -2
arch/arm/include/asm/mach/arch.h
··· 34 34 unsigned int reserve_lp1 :1; /* never has lp1 */ 35 35 unsigned int reserve_lp2 :1; /* never has lp2 */ 36 36 unsigned int soft_reboot :1; /* soft reboot */ 37 - void (*fixup)(struct machine_desc *, 38 - struct tag *, char **, 37 + void (*fixup)(struct tag *, char **, 39 38 struct meminfo *); 40 39 void (*reserve)(void);/* reserve mem blocks */ 41 40 void (*map_io)(void);/* IO mapping function */
-6
arch/arm/include/asm/percpu.h
··· 1 - #ifndef __ARM_PERCPU 2 - #define __ARM_PERCPU 3 - 4 - #include <asm-generic/percpu.h> 5 - 6 - #endif
-1
arch/arm/include/asm/poll.h
··· 1 - #include <asm-generic/poll.h>
-6
arch/arm/include/asm/resource.h
··· 1 - #ifndef _ARM_RESOURCE_H 2 - #define _ARM_RESOURCE_H 3 - 4 - #include <asm-generic/resource.h> 5 - 6 - #endif
-1
arch/arm/include/asm/sections.h
··· 1 - #include <asm-generic/sections.h>
-6
arch/arm/include/asm/siginfo.h
··· 1 - #ifndef _ASMARM_SIGINFO_H 2 - #define _ASMARM_SIGINFO_H 3 - 4 - #include <asm-generic/siginfo.h> 5 - 6 - #endif
-21
arch/arm/include/asm/sizes.h
··· 1 - /* 2 - * This program is free software; you can redistribute it and/or modify 3 - * it under the terms of the GNU General Public License as published by 4 - * the Free Software Foundation; either version 2 of the License, or 5 - * (at your option) any later version. 6 - * 7 - * This program is distributed in the hope that it will be useful, 8 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 - * GNU General Public License for more details. 11 - * 12 - * You should have received a copy of the GNU General Public License 13 - * along with this program; if not, write to the Free Software 14 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 - */ 16 - /* Size definitions 17 - * Copyright (C) ARM Limited 1998. All rights reserved. 18 - */ 19 - #include <asm-generic/sizes.h> 20 - 21 - #define SZ_48M (SZ_32M + SZ_16M)
+2 -2
arch/arm/include/asm/system.h
··· 57 57 58 58 #ifndef __ASSEMBLY__ 59 59 60 + #include <linux/compiler.h> 60 61 #include <linux/linkage.h> 61 62 #include <linux/irqflags.h> 62 63 ··· 91 90 #define xchg(ptr,x) \ 92 91 ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) 93 92 94 - extern asmlinkage void __backtrace(void); 95 93 extern asmlinkage void c_backtrace(unsigned long fp, int pmode); 96 94 97 95 struct mm_struct; 98 96 extern void show_pte(struct mm_struct *mm, unsigned long addr); 99 97 extern void __show_regs(struct pt_regs *); 100 98 101 - extern int cpu_architecture(void); 99 + extern int __pure cpu_architecture(void); 102 100 extern void cpu_init(void); 103 101 104 102 void arm_machine_restart(char mode, const char *cmd);
-3
arch/arm/kernel/armksyms.c
··· 49 49 50 50 extern void fpundefinstr(void); 51 51 52 - 53 - EXPORT_SYMBOL(__backtrace); 54 - 55 52 /* platform dependent support */ 56 53 EXPORT_SYMBOL(__udelay); 57 54 EXPORT_SYMBOL(__const_udelay);
+2 -2
arch/arm/kernel/debug.S
··· 151 151 b printascii 152 152 ENDPROC(printhex2) 153 153 154 + hexbuf: .space 16 155 + 154 156 .ltorg 155 157 156 158 ENTRY(printascii) ··· 177 175 mov r0, #0 178 176 b 1b 179 177 ENDPROC(printch) 180 - 181 - hexbuf: .space 16
+39 -5
arch/arm/kernel/entry-armv.S
··· 24 24 #include <asm/unwind.h> 25 25 #include <asm/unistd.h> 26 26 #include <asm/tls.h> 27 + #include <asm/system.h> 27 28 28 29 #include "entry-header.S" 29 30 #include <asm/entry-macro-multi.S> ··· 263 262 ldr r0, [r4, #-4] 264 263 #else 265 264 ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2 266 - and r9, r0, #0xf800 267 - cmp r9, #0xe800 @ 32-bit instruction if xx >= 0 265 + cmp r0, #0xe800 @ 32-bit instruction if xx >= 0 268 266 ldrhhs r9, [r4] @ bottom 16 bits 269 267 orrhs r0, r9, r0, lsl #16 270 268 #endif ··· 440 440 #endif 441 441 beq call_fpe 442 442 @ Thumb instruction 443 - #if __LINUX_ARM_ARCH__ >= 7 443 + #if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7 444 + /* 445 + * Thumb-2 instruction handling. Note that because pre-v6 and >= v6 platforms 446 + * can never be supported in a single kernel, this code is not applicable at 447 + * all when __LINUX_ARM_ARCH__ < 6. This allows simplifying assumptions to be 448 + * made about .arch directives. 449 + */ 450 + #if __LINUX_ARM_ARCH__ < 7 451 + /* If the target CPU may not be Thumb-2-capable, a run-time check is needed: */ 452 + #define NEED_CPU_ARCHITECTURE 453 + ldr r5, .LCcpu_architecture 454 + ldr r5, [r5] 455 + cmp r5, #CPU_ARCH_ARMv7 456 + blo __und_usr_unknown 457 + /* 458 + * The following code won't get run unless the running CPU really is v7, so 459 + * coding round the lack of ldrht on older arches is pointless. Temporarily 460 + * override the assembler target arch with the minimum required instead: 461 + */ 462 + .arch armv6t2 463 + #endif 444 464 2: 445 465 ARM( ldrht r5, [r4], #2 ) 446 466 THUMB( ldrht r5, [r4] ) 447 467 THUMB( add r4, r4, #2 ) 448 - and r0, r5, #0xf800 @ mask bits 111x x... .... .... 449 - cmp r0, #0xe800 @ 32bit instruction if xx != 0 468 + cmp r5, #0xe800 @ 32bit instruction if xx != 0 450 469 blo __und_usr_unknown 451 470 3: ldrht r0, [r4] 452 471 add r2, r2, #2 @ r2 is PC + 2, make it PC + 4 453 472 orr r0, r0, r5, lsl #16 473 + 474 + #if __LINUX_ARM_ARCH__ < 7 475 + /* If the target arch was overridden, change it back: */ 476 + #ifdef CONFIG_CPU_32v6K 477 + .arch armv6k 454 478 #else 479 + .arch armv6 480 + #endif 481 + #endif /* __LINUX_ARM_ARCH__ < 7 */ 482 + #else /* !(CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7) */ 455 483 b __und_usr_unknown 456 484 #endif 457 485 UNWIND(.fnend ) ··· 605 577 movw_pc lr @ CP#13 606 578 movw_pc lr @ CP#14 (Debug) 607 579 movw_pc lr @ CP#15 (Control) 580 + 581 + #ifdef NEED_CPU_ARCHITECTURE 582 + .align 2 583 + .LCcpu_architecture: 584 + .word __cpu_architecture 585 + #endif 608 586 609 587 #ifdef CONFIG_NEON 610 588 .align 6
+18 -17
arch/arm/kernel/machine_kexec.c
··· 32 32 33 33 int machine_kexec_prepare(struct kimage *image) 34 34 { 35 + unsigned long page_list; 36 + void *reboot_code_buffer; 37 + page_list = image->head & PAGE_MASK; 38 + 39 + reboot_code_buffer = page_address(image->control_code_page); 40 + 41 + /* Prepare parameters for reboot_code_buffer*/ 42 + kexec_start_address = image->start; 43 + kexec_indirection_page = page_list; 44 + kexec_mach_type = machine_arch_type; 45 + kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET; 46 + 47 + /* copy our kernel relocation code to the control code page */ 48 + memcpy(reboot_code_buffer, 49 + relocate_new_kernel, relocate_new_kernel_size); 50 + 51 + flush_icache_range((unsigned long) reboot_code_buffer, 52 + (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); 35 53 return 0; 36 54 } 37 55 ··· 100 82 101 83 void machine_kexec(struct kimage *image) 102 84 { 103 - unsigned long page_list; 104 85 unsigned long reboot_code_buffer_phys; 105 86 void *reboot_code_buffer; 106 - 107 - 108 - page_list = image->head & PAGE_MASK; 109 87 110 88 /* we need both effective and real address here */ 111 89 reboot_code_buffer_phys = 112 90 page_to_pfn(image->control_code_page) << PAGE_SHIFT; 113 91 reboot_code_buffer = page_address(image->control_code_page); 114 92 115 - /* Prepare parameters for reboot_code_buffer*/ 116 - kexec_start_address = image->start; 117 - kexec_indirection_page = page_list; 118 - kexec_mach_type = machine_arch_type; 119 - kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET; 120 - 121 - /* copy our kernel relocation code to the control code page */ 122 - memcpy(reboot_code_buffer, 123 - relocate_new_kernel, relocate_new_kernel_size); 124 - 125 - 126 - flush_icache_range((unsigned long) reboot_code_buffer, 127 - (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); 128 93 printk(KERN_INFO "Bye!\n"); 129 94 130 95 if (kexec_reinit)
+1 -1
arch/arm/kernel/process.c
··· 319 319 printk("\n"); 320 320 printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); 321 321 __show_regs(regs); 322 - __backtrace(); 322 + dump_stack(); 323 323 } 324 324 325 325 ATOMIC_NOTIFIER_HEAD(thread_notify_head);
+33 -4
arch/arm/kernel/setup.c
··· 29 29 #include <linux/fs.h> 30 30 #include <linux/proc_fs.h> 31 31 #include <linux/memblock.h> 32 + #include <linux/bug.h> 33 + #include <linux/compiler.h> 32 34 33 35 #include <asm/unified.h> 34 36 #include <asm/cpu.h> ··· 44 42 #include <asm/cacheflush.h> 45 43 #include <asm/cachetype.h> 46 44 #include <asm/tlbflush.h> 45 + #include <asm/system.h> 47 46 48 47 #include <asm/prom.h> 49 48 #include <asm/mach/arch.h> ··· 117 114 struct outer_cache_fns outer_cache __read_mostly; 118 115 EXPORT_SYMBOL(outer_cache); 119 116 #endif 117 + 118 + /* 119 + * Cached cpu_architecture() result for use by assembler code. 120 + * C code should use the cpu_architecture() function instead of accessing this 121 + * variable directly. 122 + */ 123 + int __cpu_architecture __read_mostly = CPU_ARCH_UNKNOWN; 120 124 121 125 struct stack { 122 126 u32 irq[3]; ··· 220 210 "?(17)", 221 211 }; 222 212 223 - int cpu_architecture(void) 213 + static int __get_cpu_architecture(void) 224 214 { 225 215 int cpu_arch; 226 216 ··· 253 243 return cpu_arch; 254 244 } 255 245 246 + int __pure cpu_architecture(void) 247 + { 248 + BUG_ON(__cpu_architecture == CPU_ARCH_UNKNOWN); 249 + 250 + return __cpu_architecture; 251 + } 252 + 256 253 static int cpu_has_aliasing_icache(unsigned int arch) 257 254 { 258 255 int aliasing_icache; 259 256 unsigned int id_reg, num_sets, line_size; 257 + 258 + /* PIPT caches never alias. */ 259 + if (icache_is_pipt()) 260 + return 0; 260 261 261 262 /* arch specifies the register format */ 262 263 switch (arch) { ··· 303 282 /* ARMv7 register format */ 304 283 arch = CPU_ARCH_ARMv7; 305 284 cacheid = CACHEID_VIPT_NONALIASING; 306 - if ((cachetype & (3 << 14)) == 1 << 14) 285 + switch (cachetype & (3 << 14)) { 286 + case (1 << 14): 307 287 cacheid |= CACHEID_ASID_TAGGED; 288 + break; 289 + case (3 << 14): 290 + cacheid |= CACHEID_PIPT; 291 + break; 292 + } 308 293 } else { 309 294 arch = CPU_ARCH_ARMv6; 310 295 if (cachetype & (1 << 23)) ··· 327 300 printk("CPU: %s data cache, %s instruction cache\n", 328 301 cache_is_vivt() ? "VIVT" : 329 302 cache_is_vipt_aliasing() ? "VIPT aliasing" : 330 - cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown", 303 + cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown", 331 304 cache_is_vivt() ? "VIVT" : 332 305 icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" : 333 306 icache_is_vipt_aliasing() ? "VIPT aliasing" : 307 + icache_is_pipt() ? "PIPT" : 334 308 cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown"); 335 309 } 336 310 ··· 442 414 } 443 415 444 416 cpu_name = list->cpu_name; 417 + __cpu_architecture = __get_cpu_architecture(); 445 418 446 419 #ifdef MULTI_CPU 447 420 processor = *list->proc; ··· 890 861 } 891 862 892 863 if (mdesc->fixup) 893 - mdesc->fixup(mdesc, tags, &from, &meminfo); 864 + mdesc->fixup(tags, &from, &meminfo); 894 865 895 866 if (tags->hdr.tag == ATAG_CORE) { 896 867 if (meminfo.nr_banks != 0)
+13 -10
arch/arm/kernel/smp.c
··· 319 319 */ 320 320 platform_secondary_init(cpu); 321 321 322 - /* 323 - * Enable local interrupts. 324 - */ 325 322 notify_cpu_starting(cpu); 326 - local_irq_enable(); 327 - local_fiq_enable(); 328 - 329 - /* 330 - * Setup the percpu timer for this CPU. 331 - */ 332 - percpu_timer_setup(); 333 323 334 324 calibrate_delay(); 335 325 ··· 331 341 * before we continue. 332 342 */ 333 343 set_cpu_online(cpu, true); 344 + 345 + /* 346 + * Setup the percpu timer for this CPU. 347 + */ 348 + percpu_timer_setup(); 349 + 334 350 while (!cpu_active(cpu)) 335 351 cpu_relax(); 352 + 353 + /* 354 + * cpu_active bit is set, so it's safe to enalbe interrupts 355 + * now. 356 + */ 357 + local_irq_enable(); 358 + local_fiq_enable(); 336 359 337 360 /* 338 361 * OK, it's off to the idle thread for us
+21 -10
arch/arm/kernel/traps.c
··· 21 21 #include <linux/kdebug.h> 22 22 #include <linux/module.h> 23 23 #include <linux/kexec.h> 24 + #include <linux/bug.h> 24 25 #include <linux/delay.h> 25 26 #include <linux/init.h> 26 27 #include <linux/sched.h> ··· 272 271 spin_lock_irq(&die_lock); 273 272 console_verbose(); 274 273 bust_spinlocks(1); 274 + if (!user_mode(regs)) 275 + report_bug(regs->ARM_pc, regs); 275 276 ret = __die(str, err, thread, regs); 276 277 277 278 if (regs && kexec_should_crash(thread->task)) ··· 304 301 die(str, regs, err); 305 302 } 306 303 } 304 + 305 + #ifdef CONFIG_GENERIC_BUG 306 + 307 + int is_valid_bugaddr(unsigned long pc) 308 + { 309 + #ifdef CONFIG_THUMB2_KERNEL 310 + unsigned short bkpt; 311 + #else 312 + unsigned long bkpt; 313 + #endif 314 + 315 + if (probe_kernel_address((unsigned *)pc, bkpt)) 316 + return 0; 317 + 318 + return bkpt == BUG_INSTR_VALUE; 319 + } 320 + 321 + #endif 307 322 308 323 static LIST_HEAD(undef_hook); 309 324 static DEFINE_SPINLOCK(undef_lock); ··· 727 706 728 707 arm_notify_die("unknown data abort code", regs, &info, instr, 0); 729 708 } 730 - 731 - void __attribute__((noreturn)) __bug(const char *file, int line) 732 - { 733 - printk(KERN_CRIT"kernel BUG at %s:%d!\n", file, line); 734 - *(int *)0 = 0; 735 - 736 - /* Avoid "noreturn function does return" */ 737 - for (;;); 738 - } 739 - EXPORT_SYMBOL(__bug); 740 709 741 710 void __readwrite_bug(const char *fn) 742 711 {
+2 -1
arch/arm/kernel/vmlinux.lds.S
··· 21 21 #define ARM_CPU_KEEP(x) 22 22 #endif 23 23 24 - #if defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK) 24 + #if (defined(CONFIG_SMP_ON_UP) && !defined(CONFIG_DEBUG_SPINLOCK)) || \ 25 + defined(CONFIG_GENERIC_BUG) 25 26 #define ARM_EXIT_KEEP(x) x 26 27 #define ARM_EXIT_DISCARD(x) 27 28 #else
-6
arch/arm/lib/backtrace.S
··· 22 22 #define mask r7 23 23 #define offset r8 24 24 25 - ENTRY(__backtrace) 26 - mov r1, #0x10 27 - mov r0, fp 28 - 29 25 ENTRY(c_backtrace) 30 26 31 27 #if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK) 32 28 mov pc, lr 33 - ENDPROC(__backtrace) 34 29 ENDPROC(c_backtrace) 35 30 #else 36 31 stmfd sp!, {r4 - r8, lr} @ Save an extra register so we have a location... ··· 102 107 mov r1, frame 103 108 bl printk 104 109 no_frame: ldmfd sp!, {r4 - r8, pc} 105 - ENDPROC(__backtrace) 106 110 ENDPROC(c_backtrace) 107 111 108 112 .pushsection __ex_table,"a"
+8
arch/arm/lib/div64.S
··· 13 13 */ 14 14 15 15 #include <linux/linkage.h> 16 + #include <asm/unwind.h> 16 17 17 18 #ifdef __ARMEB__ 18 19 #define xh r0 ··· 45 44 */ 46 45 47 46 ENTRY(__do_div64) 47 + UNWIND(.fnstart) 48 48 49 49 @ Test for easy paths first. 50 50 subs ip, r4, #1 ··· 191 189 moveq yh, xh 192 190 moveq xh, #0 193 191 moveq pc, lr 192 + UNWIND(.fnend) 194 193 194 + UNWIND(.fnstart) 195 + UNWIND(.pad #4) 196 + UNWIND(.save {lr}) 197 + Ldiv0_64: 195 198 @ Division by 0: 196 199 str lr, [sp, #-8]! 197 200 bl __div0 ··· 207 200 mov xh, #0 208 201 ldr pc, [sp], #8 209 202 203 + UNWIND(.fnend) 210 204 ENDPROC(__do_div64)
+3 -3
arch/arm/mach-at91/Makefile.boot
··· 4 4 # INITRD_PHYS must be in RAM 5 5 6 6 ifeq ($(CONFIG_ARCH_AT91CAP9),y) 7 - zreladdr-y := 0x70008000 7 + zreladdr-y += 0x70008000 8 8 params_phys-y := 0x70000100 9 9 initrd_phys-y := 0x70410000 10 10 else ifeq ($(CONFIG_ARCH_AT91SAM9G45),y) 11 - zreladdr-y := 0x70008000 11 + zreladdr-y += 0x70008000 12 12 params_phys-y := 0x70000100 13 13 initrd_phys-y := 0x70410000 14 14 else 15 - zreladdr-y := 0x20008000 15 + zreladdr-y += 0x20008000 16 16 params_phys-y := 0x20000100 17 17 initrd_phys-y := 0x20410000 18 18 endif
+1 -1
arch/arm/mach-bcmring/Makefile.boot
··· 1 1 # Address where decompressor will be written and eventually executed. 2 2 # 3 3 # default to SDRAM 4 - zreladdr-y := $(CONFIG_BCM_ZRELADDR) 4 + zreladdr-y += $(CONFIG_BCM_ZRELADDR) 5 5 params_phys-y := 0x00000800 6 6
+2 -2
arch/arm/mach-bcmring/arch.c
··· 136 136 * 137 137 *****************************************************************************/ 138 138 139 - static void __init bcmring_fixup(struct machine_desc *desc, 140 - struct tag *t, char **cmdline, struct meminfo *mi) { 139 + static void __init bcmring_fixup(struct tag *t, char **cmdline, 140 + struct meminfo *mi) { 141 141 #ifdef CONFIG_BLK_DEV_INITRD 142 142 printk(KERN_NOTICE "bcmring_fixup\n"); 143 143 t->hdr.tag = ATAG_CORE;
+1 -1
arch/arm/mach-clps711x/Makefile.boot
··· 1 1 # The standard locations for stuff on CLPS711x type processors 2 - zreladdr-y := 0xc0028000 2 + zreladdr-y += 0xc0028000 3 3 params_phys-y := 0xc0000100 4 4 # Should probably have some agreement on these... 5 5 initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000
+1 -2
arch/arm/mach-clps711x/clep7312.c
··· 26 26 #include "common.h" 27 27 28 28 static void __init 29 - fixup_clep7312(struct machine_desc *desc, struct tag *tags, 30 - char **cmdline, struct meminfo *mi) 29 + fixup_clep7312(struct tag *tags, char **cmdline, struct meminfo *mi) 31 30 { 32 31 mi->nr_banks=1; 33 32 mi->bank[0].start = 0xc0000000;
+1 -2
arch/arm/mach-clps711x/edb7211-arch.c
··· 37 37 } 38 38 39 39 static void __init 40 - fixup_edb7211(struct machine_desc *desc, struct tag *tags, 41 - char **cmdline, struct meminfo *mi) 40 + fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi) 42 41 { 43 42 /* 44 43 * Bank start addresses are not present in the information
+1 -2
arch/arm/mach-clps711x/fortunet.c
··· 57 57 #define IMAGE_PARAMS_PHYS 0xC01F0000 58 58 59 59 static void __init 60 - fortunet_fixup(struct machine_desc *desc, struct tag *tags, 61 - char **cmdline, struct meminfo *mi) 60 + fortunet_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) 62 61 { 63 62 IMAGE_PARAMS *ip = phys_to_virt(IMAGE_PARAMS_PHYS); 64 63 *cmdline = phys_to_virt(ip->command_line);
+1 -2
arch/arm/mach-clps711x/p720t.c
··· 56 56 }; 57 57 58 58 static void __init 59 - fixup_p720t(struct machine_desc *desc, struct tag *tag, 60 - char **cmdline, struct meminfo *mi) 59 + fixup_p720t(struct tag *tag, char **cmdline, struct meminfo *mi) 61 60 { 62 61 /* 63 62 * Our bootloader doesn't setup any tags (yet).
+1 -1
arch/arm/mach-cns3xxx/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00C00000
+2 -2
arch/arm/mach-davinci/Makefile.boot
··· 2 2 ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) 3 3 $(error Cannot enable DaVinci and DA8XX platforms concurrently) 4 4 else 5 - zreladdr-y := 0xc0008000 5 + zreladdr-y += 0xc0008000 6 6 params_phys-y := 0xc0000100 7 7 initrd_phys-y := 0xc0800000 8 8 endif 9 9 else 10 - zreladdr-y := 0x80008000 10 + zreladdr-y += 0x80008000 11 11 params_phys-y := 0x80000100 12 12 initrd_phys-y := 0x80800000 13 13 endif
+1 -1
arch/arm/mach-dove/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+1 -1
arch/arm/mach-ebsa110/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000400 3 3 initrd_phys-y := 0x00800000 4 4
+5 -5
arch/arm/mach-ep93xx/Makefile.boot
··· 1 - zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00008000 1 + zreladdr-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) += 0x00008000 2 2 params_phys-$(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET) := 0x00000100 3 3 4 - zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0008000 4 + zreladdr-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) += 0xc0008000 5 5 params_phys-$(CONFIG_EP93XX_SDCE0_PHYS_OFFSET) := 0xc0000100 6 6 7 - zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0008000 7 + zreladdr-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) += 0xd0008000 8 8 params_phys-$(CONFIG_EP93XX_SDCE1_PHYS_OFFSET) := 0xd0000100 9 9 10 - zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0008000 10 + zreladdr-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) += 0xe0008000 11 11 params_phys-$(CONFIG_EP93XX_SDCE2_PHYS_OFFSET) := 0xe0000100 12 12 13 - zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0008000 13 + zreladdr-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) += 0xf0008000 14 14 params_phys-$(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET) := 0xf0000100
+1 -1
arch/arm/mach-exynos4/Makefile.boot
··· 1 - zreladdr-y := 0x40008000 1 + zreladdr-y += 0x40008000 2 2 params_phys-y := 0x40000100
+2 -2
arch/arm/mach-footbridge/Kconfig
··· 4 4 5 5 config ARCH_CATS 6 6 bool "CATS" 7 - select CLKSRC_I8253 8 7 select CLKEVT_I8253 8 + select CLKSRC_I8253 9 9 select FOOTBRIDGE_HOST 10 10 select ISA 11 11 select ISA_DMA ··· 61 61 62 62 config ARCH_NETWINDER 63 63 bool "NetWinder" 64 - select CLKSRC_I8253 65 64 select CLKEVT_I8253 65 + select CLKSRC_I8253 66 66 select FOOTBRIDGE_HOST 67 67 select ISA 68 68 select ISA_DMA
+1 -1
arch/arm/mach-footbridge/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000 4 4
+1 -2
arch/arm/mach-footbridge/cats-hw.c
··· 76 76 * hard reboots fail on early boards. 77 77 */ 78 78 static void __init 79 - fixup_cats(struct machine_desc *desc, struct tag *tags, 80 - char **cmdline, struct meminfo *mi) 79 + fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi) 81 80 { 82 81 screen_info.orig_video_lines = 25; 83 82 screen_info.orig_video_points = 16;
+1 -2
arch/arm/mach-footbridge/netwinder-hw.c
··· 631 631 * the parameter page. 632 632 */ 633 633 static void __init 634 - fixup_netwinder(struct machine_desc *desc, struct tag *tags, 635 - char **cmdline, struct meminfo *mi) 634 + fixup_netwinder(struct tag *tags, char **cmdline, struct meminfo *mi) 636 635 { 637 636 #ifdef CONFIG_ISAPNP 638 637 extern int isapnp_disable;
+2 -2
arch/arm/mach-gemini/Makefile.boot
··· 1 1 ifeq ($(CONFIG_GEMINI_MEM_SWAP),y) 2 - zreladdr-y := 0x00008000 2 + zreladdr-y += 0x00008000 3 3 params_phys-y := 0x00000100 4 4 initrd_phys-y := 0x00800000 5 5 else 6 - zreladdr-y := 0x10008000 6 + zreladdr-y += 0x10008000 7 7 params_phys-y := 0x10000100 8 8 initrd_phys-y := 0x10800000 9 9 endif
+1 -1
arch/arm/mach-h720x/Makefile.boot
··· 1 - zreladdr-$(CONFIG_ARCH_H720X) := 0x40008000 1 + zreladdr-$(CONFIG_ARCH_H720X) += 0x40008000 2 2
+5 -5
arch/arm/mach-imx/Makefile.boot
··· 1 - zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000 1 + zreladdr-$(CONFIG_ARCH_MX1) += 0x08008000 2 2 params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 3 3 initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 4 4 5 - zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 5 + zreladdr-$(CONFIG_MACH_MX21) += 0xC0008000 6 6 params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 7 7 initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 8 8 9 - zreladdr-$(CONFIG_ARCH_MX25) := 0x80008000 9 + zreladdr-$(CONFIG_ARCH_MX25) += 0x80008000 10 10 params_phys-$(CONFIG_ARCH_MX25) := 0x80000100 11 11 initrd_phys-$(CONFIG_ARCH_MX25) := 0x80800000 12 12 13 - zreladdr-$(CONFIG_MACH_MX27) := 0xA0008000 13 + zreladdr-$(CONFIG_MACH_MX27) += 0xA0008000 14 14 params_phys-$(CONFIG_MACH_MX27) := 0xA0000100 15 15 initrd_phys-$(CONFIG_MACH_MX27) := 0xA0800000 16 16 17 - zreladdr-$(CONFIG_ARCH_MX3) := 0x80008000 17 + zreladdr-$(CONFIG_ARCH_MX3) += 0x80008000 18 18 params_phys-$(CONFIG_ARCH_MX3) := 0x80000100 19 19 initrd_phys-$(CONFIG_ARCH_MX3) := 0x80800000
+1 -1
arch/arm/mach-integrator/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000 4 4
+4
arch/arm/mach-integrator/core.c
··· 126 126 { /* Bus clock */ 127 127 .con_id = "apb_pclk", 128 128 .clk = &dummy_apb_pclk, 129 + }, { 130 + /* Integrator/AP timer frequency */ 131 + .dev_id = "ap_timer", 132 + .clk = &clk24mhz, 129 133 }, { /* UART0 */ 130 134 .dev_id = "mb:16", 131 135 .clk = &uartclk,
-12
arch/arm/mach-integrator/include/mach/platform.h
··· 13 13 * along with this program; if not, write to the Free Software 14 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 15 */ 16 - /* DO NOT EDIT!! - this file automatically generated 17 - * from .s file by awk -f s2h.awk 18 - */ 19 16 /************************************************************************** 20 17 * * Copyright © ARM Limited 1998. All rights reserved. 21 18 * ***********************************************************************/ ··· 395 398 #define INTEGRATOR_TIMER0_BASE INTEGRATOR_CT_BASE 396 399 #define INTEGRATOR_TIMER1_BASE (INTEGRATOR_CT_BASE + 0x100) 397 400 #define INTEGRATOR_TIMER2_BASE (INTEGRATOR_CT_BASE + 0x200) 398 - 399 - #define TICKS_PER_uSEC 24 400 - 401 - /* 402 - * These are useconds NOT ticks. 403 - * 404 - */ 405 - #define mSEC_1 1000 406 - #define mSEC_10 (mSEC_1 * 10) 407 401 408 402 #define INTEGRATOR_CSR_BASE 0x10000000 409 403 #define INTEGRATOR_CSR_SIZE 0x10000000
+46 -40
arch/arm/mach-integrator/integrator_ap.c
··· 32 32 #include <linux/interrupt.h> 33 33 #include <linux/io.h> 34 34 #include <linux/mtd/physmap.h> 35 + #include <linux/clk.h> 35 36 #include <video/vga.h> 36 37 37 38 #include <mach/hardware.h> ··· 323 322 #define TIMER1_VA_BASE IO_ADDRESS(INTEGRATOR_TIMER1_BASE) 324 323 #define TIMER2_VA_BASE IO_ADDRESS(INTEGRATOR_TIMER2_BASE) 325 324 326 - /* 327 - * How long is the timer interval? 328 - */ 329 - #define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_10) 330 - #if TIMER_INTERVAL >= 0x100000 331 - #define TICKS2USECS(x) (256 * (x) / TICKS_PER_uSEC) 332 - #elif TIMER_INTERVAL >= 0x10000 333 - #define TICKS2USECS(x) (16 * (x) / TICKS_PER_uSEC) 334 - #else 335 - #define TICKS2USECS(x) ((x) / TICKS_PER_uSEC) 336 - #endif 337 - 338 325 static unsigned long timer_reload; 339 326 340 - static void integrator_clocksource_init(u32 khz) 327 + static void integrator_clocksource_init(unsigned long inrate) 341 328 { 342 329 void __iomem *base = (void __iomem *)TIMER2_VA_BASE; 343 330 u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC; 331 + unsigned long rate = inrate; 344 332 345 - if (khz >= 1500) { 346 - khz /= 16; 333 + if (rate >= 1500000) { 334 + rate /= 16; 347 335 ctrl |= TIMER_CTRL_DIV16; 348 336 } 349 337 ··· 340 350 writel(ctrl, base + TIMER_CTRL); 341 351 342 352 clocksource_mmio_init(base + TIMER_VALUE, "timer2", 343 - khz * 1000, 200, 16, clocksource_mmio_readl_down); 353 + rate, 200, 16, clocksource_mmio_readl_down); 344 354 } 345 355 346 356 static void __iomem * const clkevt_base = (void __iomem *)TIMER1_VA_BASE; ··· 364 374 { 365 375 u32 ctrl = readl(clkevt_base + TIMER_CTRL) & ~TIMER_CTRL_ENABLE; 366 376 367 - BUG_ON(mode == CLOCK_EVT_MODE_ONESHOT); 377 + /* Disable timer */ 378 + writel(ctrl, clkevt_base + TIMER_CTRL); 368 379 369 - if (mode == CLOCK_EVT_MODE_PERIODIC) { 370 - writel(ctrl, clkevt_base + TIMER_CTRL); 380 + switch (mode) { 381 + case CLOCK_EVT_MODE_PERIODIC: 382 + /* Enable the timer and start the periodic tick */ 371 383 writel(timer_reload, clkevt_base + TIMER_LOAD); 372 384 ctrl |= TIMER_CTRL_PERIODIC | TIMER_CTRL_ENABLE; 385 + writel(ctrl, clkevt_base + TIMER_CTRL); 386 + break; 387 + case CLOCK_EVT_MODE_ONESHOT: 388 + /* Leave the timer disabled, .set_next_event will enable it */ 389 + ctrl &= ~TIMER_CTRL_PERIODIC; 390 + writel(ctrl, clkevt_base + TIMER_CTRL); 391 + break; 392 + case CLOCK_EVT_MODE_UNUSED: 393 + case CLOCK_EVT_MODE_SHUTDOWN: 394 + case CLOCK_EVT_MODE_RESUME: 395 + default: 396 + /* Just leave in disabled state */ 397 + break; 373 398 } 374 399 375 - writel(ctrl, clkevt_base + TIMER_CTRL); 376 400 } 377 401 378 402 static int clkevt_set_next_event(unsigned long next, struct clock_event_device *evt) ··· 402 398 403 399 static struct clock_event_device integrator_clockevent = { 404 400 .name = "timer1", 405 - .shift = 34, 406 - .features = CLOCK_EVT_FEAT_PERIODIC, 401 + .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 407 402 .set_mode = clkevt_set_mode, 408 403 .set_next_event = clkevt_set_next_event, 409 404 .rating = 300, 410 - .cpumask = cpu_all_mask, 411 405 }; 412 406 413 407 static struct irqaction integrator_timer_irq = { ··· 415 413 .dev_id = &integrator_clockevent, 416 414 }; 417 415 418 - static void integrator_clockevent_init(u32 khz) 416 + static void integrator_clockevent_init(unsigned long inrate) 419 417 { 420 - struct clock_event_device *evt = &integrator_clockevent; 418 + unsigned long rate = inrate; 421 419 unsigned int ctrl = 0; 422 420 423 - if (khz * 1000 > 0x100000 * HZ) { 424 - khz /= 256; 421 + /* Calculate and program a divisor */ 422 + if (rate > 0x100000 * HZ) { 423 + rate /= 256; 425 424 ctrl |= TIMER_CTRL_DIV256; 426 - } else if (khz * 1000 > 0x10000 * HZ) { 427 - khz /= 16; 425 + } else if (rate > 0x10000 * HZ) { 426 + rate /= 16; 428 427 ctrl |= TIMER_CTRL_DIV16; 429 428 } 430 - 431 - timer_reload = khz * 1000 / HZ; 429 + timer_reload = rate / HZ; 432 430 writel(ctrl, clkevt_base + TIMER_CTRL); 433 431 434 - evt->irq = IRQ_TIMERINT1; 435 - evt->mult = div_sc(khz, NSEC_PER_MSEC, evt->shift); 436 - evt->max_delta_ns = clockevent_delta2ns(0xffff, evt); 437 - evt->min_delta_ns = clockevent_delta2ns(0xf, evt); 438 - 439 432 setup_irq(IRQ_TIMERINT1, &integrator_timer_irq); 440 - clockevents_register_device(evt); 433 + clockevents_config_and_register(&integrator_clockevent, 434 + rate, 435 + 1, 436 + 0xffffU); 441 437 } 442 438 443 439 /* ··· 443 443 */ 444 444 static void __init ap_init_timer(void) 445 445 { 446 - u32 khz = TICKS_PER_uSEC * 1000; 446 + struct clk *clk; 447 + unsigned long rate; 448 + 449 + clk = clk_get_sys("ap_timer", NULL); 450 + BUG_ON(IS_ERR(clk)); 451 + clk_enable(clk); 452 + rate = clk_get_rate(clk); 447 453 448 454 writel(0, TIMER0_VA_BASE + TIMER_CTRL); 449 455 writel(0, TIMER1_VA_BASE + TIMER_CTRL); 450 456 writel(0, TIMER2_VA_BASE + TIMER_CTRL); 451 457 452 - integrator_clocksource_init(khz); 453 - integrator_clockevent_init(khz); 458 + integrator_clocksource_init(rate); 459 + integrator_clockevent_init(rate); 454 460 } 455 461 456 462 static struct sys_timer ap_timer = {
+1 -1
arch/arm/mach-iop13xx/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+1 -1
arch/arm/mach-iop32x/Makefile.boot
··· 1 - zreladdr-y := 0xa0008000 1 + zreladdr-y += 0xa0008000 2 2 params_phys-y := 0xa0000100 3 3 initrd_phys-y := 0xa0800000
+1 -1
arch/arm/mach-iop33x/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+1 -1
arch/arm/mach-ixp2000/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3
+1 -1
arch/arm/mach-ixp23xx/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100
+1 -1
arch/arm/mach-ixp4xx/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3
+2 -1
arch/arm/mach-ixp4xx/common-pci.c
··· 397 397 local_write_config(PCI_BASE_ADDRESS_0, 4, PHYS_OFFSET); 398 398 local_write_config(PCI_BASE_ADDRESS_1, 4, PHYS_OFFSET + SZ_16M); 399 399 local_write_config(PCI_BASE_ADDRESS_2, 4, PHYS_OFFSET + SZ_32M); 400 - local_write_config(PCI_BASE_ADDRESS_3, 4, PHYS_OFFSET + SZ_48M); 400 + local_write_config(PCI_BASE_ADDRESS_3, 4, 401 + PHYS_OFFSET + SZ_32M + SZ_16M); 401 402 402 403 /* 403 404 * Enable CSR window at 64 MiB to allow PCI masters
+1 -1
arch/arm/mach-kirkwood/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+1 -1
arch/arm/mach-ks8695/Makefile.boot
··· 3 3 # PARAMS_PHYS must be within 4MB of ZRELADDR 4 4 # INITRD_PHYS must be in RAM 5 5 6 - zreladdr-y := 0x00008000 6 + zreladdr-y += 0x00008000 7 7 params_phys-y := 0x00000100 8 8 initrd_phys-y := 0x00800000
+1 -1
arch/arm/mach-lpc32xx/Makefile.boot
··· 1 - zreladdr-y := 0x80008000 1 + zreladdr-y += 0x80008000 2 2 params_phys-y := 0x80000100 3 3 initrd_phys-y := 0x82000000 4 4
+1 -1
arch/arm/mach-mmp/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000
+1 -1
arch/arm/mach-mmp/aspenite.c
··· 160 160 }, { 161 161 .name = "filesystem", 162 162 .offset = MTDPART_OFS_APPEND, 163 - .size = SZ_48M, 163 + .size = SZ_32M + SZ_16M, 164 164 .mask_flags = 0, 165 165 } 166 166 };
+1 -1
arch/arm/mach-mmp/ttc_dkb.c
··· 93 93 }, { 94 94 .name = "filesystem", 95 95 .offset = MTDPART_OFS_APPEND, 96 - .size = SZ_48M, 96 + .size = SZ_32M + SZ_16M, 97 97 .mask_flags = 0, 98 98 } 99 99 };
+1 -1
arch/arm/mach-msm/Makefile.boot
··· 1 - zreladdr-y := 0x10008000 1 + zreladdr-y += 0x10008000 2 2 params_phys-y := 0x10000100 3 3 initrd_phys-y := 0x10800000
+2 -2
arch/arm/mach-msm/board-halibut.c
··· 78 78 platform_add_devices(devices, ARRAY_SIZE(devices)); 79 79 } 80 80 81 - static void __init halibut_fixup(struct machine_desc *desc, struct tag *tags, 82 - char **cmdline, struct meminfo *mi) 81 + static void __init halibut_fixup(struct tag *tags, char **cmdline, 82 + struct meminfo *mi) 83 83 { 84 84 mi->nr_banks=1; 85 85 mi->bank[0].start = PHYS_OFFSET;
+2 -2
arch/arm/mach-msm/board-mahimahi.c
··· 53 53 platform_add_devices(devices, ARRAY_SIZE(devices)); 54 54 } 55 55 56 - static void __init mahimahi_fixup(struct machine_desc *desc, struct tag *tags, 57 - char **cmdline, struct meminfo *mi) 56 + static void __init mahimahi_fixup(struct tag *tags, char **cmdline, 57 + struct meminfo *mi) 58 58 { 59 59 mi->nr_banks = 2; 60 60 mi->bank[0].start = PHYS_OFFSET;
+2 -2
arch/arm/mach-msm/board-sapphire.c
··· 77 77 } 78 78 }; 79 79 80 - static void __init sapphire_fixup(struct machine_desc *desc, struct tag *tags, 81 - char **cmdline, struct meminfo *mi) 80 + static void __init sapphire_fixup(struct tag *tags, char **cmdline, 81 + struct meminfo *mi) 82 82 { 83 83 int smi_sz = parse_tag_smi((const struct tag *)tags); 84 84
+2 -2
arch/arm/mach-msm/board-trout.c
··· 48 48 msm_init_irq(); 49 49 } 50 50 51 - static void __init trout_fixup(struct machine_desc *desc, struct tag *tags, 52 - char **cmdline, struct meminfo *mi) 51 + static void __init trout_fixup(struct tag *tags, char **cmdline, 52 + struct meminfo *mi) 53 53 { 54 54 mi->nr_banks = 1; 55 55 mi->bank[0].start = PHYS_OFFSET;
+1 -1
arch/arm/mach-mv78xx0/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+3 -3
arch/arm/mach-mx5/Makefile.boot
··· 1 - zreladdr-$(CONFIG_ARCH_MX50) := 0x70008000 1 + zreladdr-$(CONFIG_ARCH_MX50) += 0x70008000 2 2 params_phys-$(CONFIG_ARCH_MX50) := 0x70000100 3 3 initrd_phys-$(CONFIG_ARCH_MX50) := 0x70800000 4 - zreladdr-$(CONFIG_ARCH_MX51) := 0x90008000 4 + zreladdr-$(CONFIG_ARCH_MX51) += 0x90008000 5 5 params_phys-$(CONFIG_ARCH_MX51) := 0x90000100 6 6 initrd_phys-$(CONFIG_ARCH_MX51) := 0x90800000 7 - zreladdr-$(CONFIG_ARCH_MX53) := 0x70008000 7 + zreladdr-$(CONFIG_ARCH_MX53) += 0x70008000 8 8 params_phys-$(CONFIG_ARCH_MX53) := 0x70000100 9 9 initrd_phys-$(CONFIG_ARCH_MX53) := 0x70800000
+1 -1
arch/arm/mach-mxs/Makefile.boot
··· 1 - zreladdr-y := 0x40008000 1 + zreladdr-y += 0x40008000
+1 -1
arch/arm/mach-netx/Makefile.boot
··· 1 - zreladdr-y := 0x80008000 1 + zreladdr-y += 0x80008000 2 2
+1 -1
arch/arm/mach-nomadik/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000 4 4
+1 -1
arch/arm/mach-nuc93x/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3
+1 -1
arch/arm/mach-omap1/Makefile.boot
··· 1 - zreladdr-y := 0x10008000 1 + zreladdr-y += 0x10008000 2 2 params_phys-y := 0x10000100 3 3 initrd_phys-y := 0x10800000
+1 -1
arch/arm/mach-omap2/Makefile.boot
··· 1 - zreladdr-y := 0x80008000 1 + zreladdr-y += 0x80008000 2 2 params_phys-y := 0x80000100 3 3 initrd_phys-y := 0x80800000
+1 -1
arch/arm/mach-orion5x/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+2 -2
arch/arm/mach-orion5x/common.c
··· 308 308 * Many orion-based systems have buggy bootloader implementations. 309 309 * This is a common fixup for bogus memory tags. 310 310 */ 311 - void __init tag_fixup_mem32(struct machine_desc *mdesc, struct tag *t, 312 - char **from, struct meminfo *meminfo) 311 + void __init tag_fixup_mem32(struct tag *t, char **from, 312 + struct meminfo *meminfo) 313 313 { 314 314 for (; t->hdr.size; t = tag_next(t)) 315 315 if (t->hdr.tag == ATAG_MEM &&
+1 -3
arch/arm/mach-orion5x/common.h
··· 53 53 struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); 54 54 int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); 55 55 56 - struct machine_desc; 57 56 struct meminfo; 58 57 struct tag; 59 - extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *, 60 - char **, struct meminfo *); 58 + extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *); 61 59 62 60 63 61 #endif
+1 -1
arch/arm/mach-pnx4008/Makefile.boot
··· 1 - zreladdr-y := 0x80008000 1 + zreladdr-y += 0x80008000 2 2 params_phys-y := 0x80000100 3 3 initrd_phys-y := 0x80800000 4 4
+1 -1
arch/arm/mach-prima2/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+1 -1
arch/arm/mach-pxa/Makefile.boot
··· 1 - zreladdr-y := 0xa0008000 1 + zreladdr-y += 0xa0008000 2 2
+2 -2
arch/arm/mach-pxa/cm-x300.c
··· 839 839 cm_x300_init_bl(); 840 840 } 841 841 842 - static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags, 843 - char **cmdline, struct meminfo *mi) 842 + static void __init cm_x300_fixup(struct tag *tags, char **cmdline, 843 + struct meminfo *mi) 844 844 { 845 845 /* Make sure that mi->bank[0].start = PHYS_ADDR */ 846 846 for (; tags->hdr.size; tags = tag_next(tags))
+2 -2
arch/arm/mach-pxa/corgi.c
··· 705 705 platform_add_devices(devices, ARRAY_SIZE(devices)); 706 706 } 707 707 708 - static void __init fixup_corgi(struct machine_desc *desc, 709 - struct tag *tags, char **cmdline, struct meminfo *mi) 708 + static void __init fixup_corgi(struct tag *tags, char **cmdline, 709 + struct meminfo *mi) 710 710 { 711 711 sharpsl_save_param(); 712 712 mi->nr_banks=1;
+1 -2
arch/arm/mach-pxa/eseries.c
··· 41 41 #include "clock.h" 42 42 43 43 /* Only e800 has 128MB RAM */ 44 - void __init eseries_fixup(struct machine_desc *desc, 45 - struct tag *tags, char **cmdline, struct meminfo *mi) 44 + void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi) 46 45 { 47 46 mi->nr_banks=1; 48 47 mi->bank[0].start = 0xa0000000;
+1 -2
arch/arm/mach-pxa/eseries.h
··· 1 - void __init eseries_fixup(struct machine_desc *desc, 2 - struct tag *tags, char **cmdline, struct meminfo *mi); 1 + void __init eseries_fixup(struct tag *tags, char **cmdline, struct meminfo *mi); 3 2 4 3 extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info; 5 4 extern struct pxaficp_platform_data e7xx_ficp_platform_data;
+2 -2
arch/arm/mach-pxa/poodle.c
··· 454 454 poodle_init_spi(); 455 455 } 456 456 457 - static void __init fixup_poodle(struct machine_desc *desc, 458 - struct tag *tags, char **cmdline, struct meminfo *mi) 457 + static void __init fixup_poodle(struct tag *tags, char **cmdline, 458 + struct meminfo *mi) 459 459 { 460 460 sharpsl_save_param(); 461 461 mi->nr_banks=1;
+1 -1
arch/arm/mach-pxa/saar.c
··· 540 540 }, { 541 541 .name = "filesystem", 542 542 .offset = MTDPART_OFS_APPEND, 543 - .size = SZ_48M, 543 + .size = SZ_32M + SZ_16M, 544 544 .mask_flags = 0, 545 545 } 546 546 };
+2 -2
arch/arm/mach-pxa/spitz.c
··· 970 970 spitz_i2c_init(); 971 971 } 972 972 973 - static void __init spitz_fixup(struct machine_desc *desc, 974 - struct tag *tags, char **cmdline, struct meminfo *mi) 973 + static void __init spitz_fixup(struct tag *tags, char **cmdline, 974 + struct meminfo *mi) 975 975 { 976 976 sharpsl_save_param(); 977 977 mi->nr_banks = 1;
+2 -2
arch/arm/mach-pxa/tosa.c
··· 960 960 platform_add_devices(devices, ARRAY_SIZE(devices)); 961 961 } 962 962 963 - static void __init fixup_tosa(struct machine_desc *desc, 964 - struct tag *tags, char **cmdline, struct meminfo *mi) 963 + static void __init fixup_tosa(struct tag *tags, char **cmdline, 964 + struct meminfo *mi) 965 965 { 966 966 sharpsl_save_param(); 967 967 mi->nr_banks=1;
+2 -2
arch/arm/mach-realview/Makefile.boot
··· 1 1 ifeq ($(CONFIG_REALVIEW_HIGH_PHYS_OFFSET),y) 2 - zreladdr-y := 0x70008000 2 + zreladdr-y += 0x70008000 3 3 params_phys-y := 0x70000100 4 4 initrd_phys-y := 0x70800000 5 5 else 6 - zreladdr-y := 0x00008000 6 + zreladdr-y += 0x00008000 7 7 params_phys-y := 0x00000100 8 8 initrd_phys-y := 0x00800000 9 9 endif
+1 -2
arch/arm/mach-realview/core.c
··· 517 517 /* 518 518 * Setup the memory banks. 519 519 */ 520 - void realview_fixup(struct machine_desc *mdesc, struct tag *tags, char **from, 521 - struct meminfo *meminfo) 520 + void realview_fixup(struct tag *tags, char **from, struct meminfo *meminfo) 522 521 { 523 522 /* 524 523 * Most RealView platforms have 512MB contiguous RAM at 0x70000000.
+2 -2
arch/arm/mach-realview/core.h
··· 63 63 extern int realview_eth_register(const char *name, struct resource *res); 64 64 extern int realview_usb_register(struct resource *res); 65 65 extern void realview_init_early(void); 66 - extern void realview_fixup(struct machine_desc *mdesc, struct tag *tags, 67 - char **from, struct meminfo *meminfo); 66 + extern void realview_fixup(struct tag *tags, char **from, 67 + struct meminfo *meminfo); 68 68 extern void (*realview_reset)(char); 69 69 70 70 #endif
+1
arch/arm/mach-realview/include/mach/board-pb1176.h
··· 70 70 71 71 #define REALVIEW_DC1176_GIC_CPU_BASE 0x10120000 /* GIC CPU interface, on devchip */ 72 72 #define REALVIEW_DC1176_GIC_DIST_BASE 0x10121000 /* GIC distributor, on devchip */ 73 + #define REALVIEW_DC1176_ROM_BASE 0x10200000 /* 16KiB NRAM preudo-ROM, on devchip */ 73 74 #define REALVIEW_PB1176_GIC_CPU_BASE 0x10040000 /* GIC CPU interface, on FPGA */ 74 75 #define REALVIEW_PB1176_GIC_DIST_BASE 0x10041000 /* GIC distributor, on FPGA */ 75 76 #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */
+38 -10
arch/arm/mach-realview/realview_pb1176.c
··· 26 26 #include <linux/amba/pl061.h> 27 27 #include <linux/amba/mmci.h> 28 28 #include <linux/amba/pl022.h> 29 + #include <linux/mtd/physmap.h> 30 + #include <linux/mtd/partitions.h> 29 31 #include <linux/io.h> 30 32 31 33 #include <mach/hardware.h> ··· 206 204 * RealView PB1176 platform devices 207 205 */ 208 206 static struct resource realview_pb1176_flash_resources[] = { 209 - [0] = { 207 + { 210 208 .start = REALVIEW_PB1176_FLASH_BASE, 211 209 .end = REALVIEW_PB1176_FLASH_BASE + REALVIEW_PB1176_FLASH_SIZE - 1, 212 210 .flags = IORESOURCE_MEM, 213 211 }, 214 - [1] = { 212 + #ifdef CONFIG_REALVIEW_PB1176_SECURE_FLASH 213 + { 215 214 .start = REALVIEW_PB1176_SEC_FLASH_BASE, 216 215 .end = REALVIEW_PB1176_SEC_FLASH_BASE + REALVIEW_PB1176_SEC_FLASH_SIZE - 1, 217 216 .flags = IORESOURCE_MEM, 218 217 }, 219 - }; 220 - #ifdef CONFIG_REALVIEW_PB1176_SECURE_FLASH 221 - #define PB1176_FLASH_BLOCKS 2 222 - #else 223 - #define PB1176_FLASH_BLOCKS 1 224 218 #endif 219 + }; 220 + 221 + static struct physmap_flash_data pb1176_rom_pdata = { 222 + .probe_type = "map_rom", 223 + .width = 4, 224 + .nr_parts = 0, 225 + }; 226 + 227 + static struct resource pb1176_rom_resources[] = { 228 + /* 229 + * This exposes the PB1176 DevChip ROM as an MTD ROM mapping. 230 + * The reference manual states that this is actually a pseudo-ROM 231 + * programmed in NVRAM. 232 + */ 233 + { 234 + .start = REALVIEW_DC1176_ROM_BASE, 235 + .end = REALVIEW_DC1176_ROM_BASE + SZ_16K - 1, 236 + .flags = IORESOURCE_MEM, 237 + } 238 + }; 239 + 240 + static struct platform_device pb1176_rom_device = { 241 + .name = "physmap-flash", 242 + .id = -1, 243 + .num_resources = ARRAY_SIZE(pb1176_rom_resources), 244 + .resource = pb1176_rom_resources, 245 + .dev = { 246 + .platform_data = &pb1176_rom_pdata, 247 + }, 248 + }; 225 249 226 250 static struct resource realview_pb1176_smsc911x_resources[] = { 227 251 [0] = { ··· 344 316 __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl); 345 317 } 346 318 347 - static void realview_pb1176_fixup(struct machine_desc *mdesc, 348 - struct tag *tags, char **from, 319 + static void realview_pb1176_fixup(struct tag *tags, char **from, 349 320 struct meminfo *meminfo) 350 321 { 351 322 /* ··· 365 338 #endif 366 339 367 340 realview_flash_register(realview_pb1176_flash_resources, 368 - PB1176_FLASH_BLOCKS); 341 + ARRAY_SIZE(realview_pb1176_flash_resources)); 342 + platform_device_register(&pb1176_rom_device); 369 343 realview_eth_register(NULL, realview_pb1176_smsc911x_resources); 370 344 platform_device_register(&realview_i2c_device); 371 345 realview_usb_register(realview_pb1176_isp1761_resources);
+3 -3
arch/arm/mach-realview/realview_pbx.c
··· 319 319 .init = realview_pbx_timer_init, 320 320 }; 321 321 322 - static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags, 323 - char **from, struct meminfo *meminfo) 322 + static void realview_pbx_fixup(struct tag *tags, char **from, 323 + struct meminfo *meminfo) 324 324 { 325 325 #ifdef CONFIG_SPARSEMEM 326 326 /* ··· 335 335 meminfo->bank[2].size = SZ_256M; 336 336 meminfo->nr_banks = 3; 337 337 #else 338 - realview_fixup(mdesc, tags, from, meminfo); 338 + realview_fixup(tags, from, meminfo); 339 339 #endif 340 340 } 341 341
+1 -1
arch/arm/mach-rpc/Makefile.boot
··· 1 - zreladdr-y := 0x10008000 1 + zreladdr-y += 0x10008000 2 2 params_phys-y := 0x10000100 3 3 initrd_phys-y := 0x18000000 4 4
+2 -2
arch/arm/mach-s3c2410/Makefile.boot
··· 1 1 ifeq ($(CONFIG_PM_H1940),y) 2 - zreladdr-y := 0x30108000 2 + zreladdr-y += 0x30108000 3 3 params_phys-y := 0x30100100 4 4 else 5 - zreladdr-y := 0x30008000 5 + zreladdr-y += 0x30008000 6 6 params_phys-y := 0x30000100 7 7 endif
+1 -2
arch/arm/mach-s3c2412/mach-smdk2413.c
··· 92 92 &s3c_device_usbgadget, 93 93 }; 94 94 95 - static void __init smdk2413_fixup(struct machine_desc *desc, 96 - struct tag *tags, char **cmdline, 95 + static void __init smdk2413_fixup(struct tag *tags, char **cmdline, 97 96 struct meminfo *mi) 98 97 { 99 98 if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) {
+2 -3
arch/arm/mach-s3c2412/mach-vstms.c
··· 129 129 &s3c_device_nand, 130 130 }; 131 131 132 - static void __init vstms_fixup(struct machine_desc *desc, 133 - struct tag *tags, char **cmdline, 134 - struct meminfo *mi) 132 + static void __init vstms_fixup(struct tag *tags, char **cmdline, 133 + struct meminfo *mi) 135 134 { 136 135 if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { 137 136 mi->nr_banks=1;
+1 -1
arch/arm/mach-s3c64xx/Makefile.boot
··· 1 - zreladdr-y := 0x50008000 1 + zreladdr-y += 0x50008000 2 2 params_phys-y := 0x50000100
+1 -1
arch/arm/mach-s5p64x0/Makefile.boot
··· 1 - zreladdr-y := 0x20008000 1 + zreladdr-y += 0x20008000 2 2 params_phys-y := 0x20000100
+1 -1
arch/arm/mach-s5pc100/Makefile.boot
··· 1 - zreladdr-y := 0x20008000 1 + zreladdr-y += 0x20008000 2 2 params_phys-y := 0x20000100
+1 -1
arch/arm/mach-s5pv210/Makefile.boot
··· 1 - zreladdr-y := 0x20008000 1 + zreladdr-y += 0x20008000 2 2 params_phys-y := 0x20000100
-1
arch/arm/mach-sa1100/Makefile
··· 45 45 obj-$(CONFIG_SA1100_SHANNON) += shannon.o 46 46 47 47 obj-$(CONFIG_SA1100_SIMPAD) += simpad.o 48 - led-$(CONFIG_SA1100_SIMPAD) += leds-simpad.o 49 48 50 49 # LEDs support 51 50 obj-$(CONFIG_LEDS) += $(led-y)
+3 -2
arch/arm/mach-sa1100/Makefile.boot
··· 1 - zreladdr-y := 0xc0008000 2 1 ifeq ($(CONFIG_ARCH_SA1100),y) 3 - zreladdr-$(CONFIG_SA1111) := 0xc0208000 2 + zreladdr-$(CONFIG_SA1111) += 0xc0208000 3 + else 4 + zreladdr-y += 0xc0008000 4 5 endif 5 6 params_phys-y := 0xc0000100 6 7 initrd_phys-y := 0xc0800000
+1 -2
arch/arm/mach-sa1100/assabet.c
··· 301 301 } 302 302 303 303 static void __init 304 - fixup_assabet(struct machine_desc *desc, struct tag *tags, 305 - char **cmdline, struct meminfo *mi) 304 + fixup_assabet(struct tag *tags, char **cmdline, struct meminfo *mi) 306 305 { 307 306 /* This must be done before any call to machine_has_neponset() */ 308 307 map_sa1100_gpio_regs();
+68 -20
arch/arm/mach-sa1100/include/mach/simpad.h
··· 48 48 #define GPIO_SMART_CARD GPIO_GPIO10 49 49 #define IRQ_GPIO_SMARD_CARD IRQ_GPIO10 50 50 51 - // CS3 Latch is write only, a shadow is necessary 51 + /*--- ucb1x00 GPIO ---*/ 52 + #define SIMPAD_UCB1X00_GPIO_BASE (GPIO_MAX + 1) 53 + #define SIMPAD_UCB1X00_GPIO_PROG1 (SIMPAD_UCB1X00_GPIO_BASE) 54 + #define SIMPAD_UCB1X00_GPIO_PROG2 (SIMPAD_UCB1X00_GPIO_BASE + 1) 55 + #define SIMPAD_UCB1X00_GPIO_UP (SIMPAD_UCB1X00_GPIO_BASE + 2) 56 + #define SIMPAD_UCB1X00_GPIO_DOWN (SIMPAD_UCB1X00_GPIO_BASE + 3) 57 + #define SIMPAD_UCB1X00_GPIO_LEFT (SIMPAD_UCB1X00_GPIO_BASE + 4) 58 + #define SIMPAD_UCB1X00_GPIO_RIGHT (SIMPAD_UCB1X00_GPIO_BASE + 5) 59 + #define SIMPAD_UCB1X00_GPIO_6 (SIMPAD_UCB1X00_GPIO_BASE + 6) 60 + #define SIMPAD_UCB1X00_GPIO_7 (SIMPAD_UCB1X00_GPIO_BASE + 7) 61 + #define SIMPAD_UCB1X00_GPIO_HEADSET (SIMPAD_UCB1X00_GPIO_BASE + 8) 62 + #define SIMPAD_UCB1X00_GPIO_SPEAKER (SIMPAD_UCB1X00_GPIO_BASE + 9) 52 63 53 - #define CS3BUSTYPE unsigned volatile long 64 + /*--- CS3 Latch ---*/ 65 + #define SIMPAD_CS3_GPIO_BASE (GPIO_MAX + 11) 66 + #define SIMPAD_CS3_VCC_5V_EN (SIMPAD_CS3_GPIO_BASE) 67 + #define SIMPAD_CS3_VCC_3V_EN (SIMPAD_CS3_GPIO_BASE + 1) 68 + #define SIMPAD_CS3_EN1 (SIMPAD_CS3_GPIO_BASE + 2) 69 + #define SIMPAD_CS3_EN0 (SIMPAD_CS3_GPIO_BASE + 3) 70 + #define SIMPAD_CS3_DISPLAY_ON (SIMPAD_CS3_GPIO_BASE + 4) 71 + #define SIMPAD_CS3_PCMCIA_BUFF_DIS (SIMPAD_CS3_GPIO_BASE + 5) 72 + #define SIMPAD_CS3_MQ_RESET (SIMPAD_CS3_GPIO_BASE + 6) 73 + #define SIMPAD_CS3_PCMCIA_RESET (SIMPAD_CS3_GPIO_BASE + 7) 74 + #define SIMPAD_CS3_DECT_POWER_ON (SIMPAD_CS3_GPIO_BASE + 8) 75 + #define SIMPAD_CS3_IRDA_SD (SIMPAD_CS3_GPIO_BASE + 9) 76 + #define SIMPAD_CS3_RS232_ON (SIMPAD_CS3_GPIO_BASE + 10) 77 + #define SIMPAD_CS3_SD_MEDIAQ (SIMPAD_CS3_GPIO_BASE + 11) 78 + #define SIMPAD_CS3_LED2_ON (SIMPAD_CS3_GPIO_BASE + 12) 79 + #define SIMPAD_CS3_IRDA_MODE (SIMPAD_CS3_GPIO_BASE + 13) 80 + #define SIMPAD_CS3_ENABLE_5V (SIMPAD_CS3_GPIO_BASE + 14) 81 + #define SIMPAD_CS3_RESET_SIMCARD (SIMPAD_CS3_GPIO_BASE + 15) 82 + 83 + #define SIMPAD_CS3_PCMCIA_BVD1 (SIMPAD_CS3_GPIO_BASE + 16) 84 + #define SIMPAD_CS3_PCMCIA_BVD2 (SIMPAD_CS3_GPIO_BASE + 17) 85 + #define SIMPAD_CS3_PCMCIA_VS1 (SIMPAD_CS3_GPIO_BASE + 18) 86 + #define SIMPAD_CS3_PCMCIA_VS2 (SIMPAD_CS3_GPIO_BASE + 19) 87 + #define SIMPAD_CS3_LOCK_IND (SIMPAD_CS3_GPIO_BASE + 20) 88 + #define SIMPAD_CS3_CHARGING_STATE (SIMPAD_CS3_GPIO_BASE + 21) 89 + #define SIMPAD_CS3_PCMCIA_SHORT (SIMPAD_CS3_GPIO_BASE + 22) 90 + #define SIMPAD_CS3_GPIO_23 (SIMPAD_CS3_GPIO_BASE + 23) 91 + 54 92 #define CS3_BASE 0xf1000000 55 93 56 - #define VCC_5V_EN 0x0001 // For 5V PCMCIA 57 - #define VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA 58 - #define EN1 0x0004 // This is only for EPROM's 59 - #define EN0 0x0008 // Both should be enable for 3.3V or 5V 60 - #define DISPLAY_ON 0x0010 61 - #define PCMCIA_BUFF_DIS 0x0020 62 - #define MQ_RESET 0x0040 63 - #define PCMCIA_RESET 0x0080 64 - #define DECT_POWER_ON 0x0100 65 - #define IRDA_SD 0x0200 // Shutdown for powersave 66 - #define RS232_ON 0x0400 67 - #define SD_MEDIAQ 0x0800 // Shutdown for powersave 68 - #define LED2_ON 0x1000 69 - #define IRDA_MODE 0x2000 // Fast/Slow IrDA mode 70 - #define ENABLE_5V 0x4000 // Enable 5V circuit 71 - #define RESET_SIMCARD 0x8000 94 + long simpad_get_cs3_ro(void); 95 + long simpad_get_cs3_shadow(void); 96 + void simpad_set_cs3_bit(int value); 97 + void simpad_clear_cs3_bit(int value); 72 98 73 - #define RS232_ENABLE 0x0440 74 - #define PCMCIAMASK 0x402f 99 + #define VCC_5V_EN 0x0001 /* For 5V PCMCIA */ 100 + #define VCC_3V_EN 0x0002 /* FOR 3.3V PCMCIA */ 101 + #define EN1 0x0004 /* This is only for EPROM's */ 102 + #define EN0 0x0008 /* Both should be enable for 3.3V or 5V */ 103 + #define DISPLAY_ON 0x0010 104 + #define PCMCIA_BUFF_DIS 0x0020 105 + #define MQ_RESET 0x0040 106 + #define PCMCIA_RESET 0x0080 107 + #define DECT_POWER_ON 0x0100 108 + #define IRDA_SD 0x0200 /* Shutdown for powersave */ 109 + #define RS232_ON 0x0400 110 + #define SD_MEDIAQ 0x0800 /* Shutdown for powersave */ 111 + #define LED2_ON 0x1000 112 + #define IRDA_MODE 0x2000 /* Fast/Slow IrDA mode */ 113 + #define ENABLE_5V 0x4000 /* Enable 5V circuit */ 114 + #define RESET_SIMCARD 0x8000 75 115 116 + #define PCMCIA_BVD1 0x01 117 + #define PCMCIA_BVD2 0x02 118 + #define PCMCIA_VS1 0x04 119 + #define PCMCIA_VS2 0x08 120 + #define LOCK_IND 0x10 121 + #define CHARGING_STATE 0x20 122 + #define PCMCIA_SHORT 0x40 76 123 124 + /*--- Battery ---*/ 77 125 struct simpad_battery { 78 126 unsigned char ac_status; /* line connected yes/no */ 79 127 unsigned char status; /* battery loading yes/no */
-100
arch/arm/mach-sa1100/leds-simpad.c
··· 1 - /* 2 - * linux/arch/arm/mach-sa1100/leds-simpad.c 3 - * 4 - * Author: Juergen Messerer <juergen.messerer@siemens.ch> 5 - */ 6 - #include <linux/init.h> 7 - 8 - #include <mach/hardware.h> 9 - #include <asm/leds.h> 10 - #include <asm/system.h> 11 - #include <mach/simpad.h> 12 - 13 - #include "leds.h" 14 - 15 - 16 - #define LED_STATE_ENABLED 1 17 - #define LED_STATE_CLAIMED 2 18 - 19 - static unsigned int led_state; 20 - static unsigned int hw_led_state; 21 - 22 - #define LED_GREEN (1) 23 - #define LED_MASK (1) 24 - 25 - extern void set_cs3_bit(int value); 26 - extern void clear_cs3_bit(int value); 27 - 28 - void simpad_leds_event(led_event_t evt) 29 - { 30 - switch (evt) 31 - { 32 - case led_start: 33 - hw_led_state = LED_GREEN; 34 - led_state = LED_STATE_ENABLED; 35 - break; 36 - 37 - case led_stop: 38 - led_state &= ~LED_STATE_ENABLED; 39 - break; 40 - 41 - case led_claim: 42 - led_state |= LED_STATE_CLAIMED; 43 - hw_led_state = LED_GREEN; 44 - break; 45 - 46 - case led_release: 47 - led_state &= ~LED_STATE_CLAIMED; 48 - hw_led_state = LED_GREEN; 49 - break; 50 - 51 - #ifdef CONFIG_LEDS_TIMER 52 - case led_timer: 53 - if (!(led_state & LED_STATE_CLAIMED)) 54 - hw_led_state ^= LED_GREEN; 55 - break; 56 - #endif 57 - 58 - #ifdef CONFIG_LEDS_CPU 59 - case led_idle_start: 60 - break; 61 - 62 - case led_idle_end: 63 - break; 64 - #endif 65 - 66 - case led_halted: 67 - break; 68 - 69 - case led_green_on: 70 - if (led_state & LED_STATE_CLAIMED) 71 - hw_led_state |= LED_GREEN; 72 - break; 73 - 74 - case led_green_off: 75 - if (led_state & LED_STATE_CLAIMED) 76 - hw_led_state &= ~LED_GREEN; 77 - break; 78 - 79 - case led_amber_on: 80 - break; 81 - 82 - case led_amber_off: 83 - break; 84 - 85 - case led_red_on: 86 - break; 87 - 88 - case led_red_off: 89 - break; 90 - 91 - default: 92 - break; 93 - } 94 - 95 - if (led_state & LED_STATE_ENABLED) 96 - set_cs3_bit(LED2_ON); 97 - else 98 - clear_cs3_bit(LED2_ON); 99 - } 100 -
-2
arch/arm/mach-sa1100/leds.c
··· 42 42 leds_event = adsbitsy_leds_event; 43 43 if (machine_is_pt_system3()) 44 44 leds_event = system3_leds_event; 45 - if (machine_is_simpad()) 46 - leds_event = simpad_leds_event; /* what about machine registry? including led, apm... -zecke */ 47 45 48 46 leds_event(led_start); 49 47 return 0;
-1
arch/arm/mach-sa1100/leds.h
··· 11 11 extern void graphicsmaster_leds_event(led_event_t evt); 12 12 extern void adsbitsy_leds_event(led_event_t evt); 13 13 extern void system3_leds_event(led_event_t evt); 14 - extern void simpad_leds_event(led_event_t evt);
+190 -27
arch/arm/mach-sa1100/simpad.c
··· 13 13 #include <linux/mtd/mtd.h> 14 14 #include <linux/mtd/partitions.h> 15 15 #include <linux/io.h> 16 + #include <linux/gpio.h> 16 17 17 18 #include <asm/irq.h> 18 19 #include <mach/hardware.h> ··· 29 28 30 29 #include <linux/serial_core.h> 31 30 #include <linux/ioport.h> 31 + #include <linux/input.h> 32 + #include <linux/gpio_keys.h> 33 + #include <linux/leds.h> 34 + #include <linux/i2c-gpio.h> 32 35 33 36 #include "generic.h" 34 37 35 - long cs3_shadow; 38 + /* 39 + * CS3 support 40 + */ 36 41 37 - long get_cs3_shadow(void) 42 + static long cs3_shadow; 43 + static spinlock_t cs3_lock; 44 + static struct gpio_chip cs3_gpio; 45 + 46 + long simpad_get_cs3_ro(void) 47 + { 48 + return readl(CS3_BASE); 49 + } 50 + EXPORT_SYMBOL(simpad_get_cs3_ro); 51 + 52 + long simpad_get_cs3_shadow(void) 38 53 { 39 54 return cs3_shadow; 40 55 } 56 + EXPORT_SYMBOL(simpad_get_cs3_shadow); 41 57 42 - void set_cs3(long value) 58 + static void __simpad_write_cs3(void) 43 59 { 44 - *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow = value; 60 + writel(cs3_shadow, CS3_BASE); 45 61 } 46 62 47 - void set_cs3_bit(int value) 63 + void simpad_set_cs3_bit(int value) 48 64 { 65 + unsigned long flags; 66 + 67 + spin_lock_irqsave(&cs3_lock, flags); 49 68 cs3_shadow |= value; 50 - *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow; 69 + __simpad_write_cs3(); 70 + spin_unlock_irqrestore(&cs3_lock, flags); 51 71 } 72 + EXPORT_SYMBOL(simpad_set_cs3_bit); 52 73 53 - void clear_cs3_bit(int value) 74 + void simpad_clear_cs3_bit(int value) 54 75 { 55 - cs3_shadow &= ~value; 56 - *(CS3BUSTYPE *)(CS3_BASE) = cs3_shadow; 57 - } 76 + unsigned long flags; 58 77 59 - EXPORT_SYMBOL(set_cs3_bit); 60 - EXPORT_SYMBOL(clear_cs3_bit); 78 + spin_lock_irqsave(&cs3_lock, flags); 79 + cs3_shadow &= ~value; 80 + __simpad_write_cs3(); 81 + spin_unlock_irqrestore(&cs3_lock, flags); 82 + } 83 + EXPORT_SYMBOL(simpad_clear_cs3_bit); 84 + 85 + static void cs3_gpio_set(struct gpio_chip *chip, unsigned offset, int value) 86 + { 87 + if (offset > 15) 88 + return; 89 + if (value) 90 + simpad_set_cs3_bit(1 << offset); 91 + else 92 + simpad_clear_cs3_bit(1 << offset); 93 + }; 94 + 95 + static int cs3_gpio_get(struct gpio_chip *chip, unsigned offset) 96 + { 97 + if (offset > 15) 98 + return simpad_get_cs3_ro() & (1 << (offset - 16)); 99 + return simpad_get_cs3_shadow() & (1 << offset); 100 + }; 101 + 102 + static int cs3_gpio_direction_input(struct gpio_chip *chip, unsigned offset) 103 + { 104 + if (offset > 15) 105 + return 0; 106 + return -EINVAL; 107 + }; 108 + 109 + static int cs3_gpio_direction_output(struct gpio_chip *chip, unsigned offset, 110 + int value) 111 + { 112 + if (offset > 15) 113 + return -EINVAL; 114 + cs3_gpio_set(chip, offset, value); 115 + return 0; 116 + }; 61 117 62 118 static struct map_desc simpad_io_desc[] __initdata = { 63 119 { /* MQ200 */ ··· 122 64 .pfn = __phys_to_pfn(0x4b800000), 123 65 .length = 0x00800000, 124 66 .type = MT_DEVICE 125 - }, { /* Paules CS3, write only */ 126 - .virtual = 0xf1000000, 127 - .pfn = __phys_to_pfn(0x18000000), 67 + }, { /* Simpad CS3 */ 68 + .virtual = CS3_BASE, 69 + .pfn = __phys_to_pfn(SA1100_CS3_PHYS), 128 70 .length = 0x00100000, 129 71 .type = MT_DEVICE 130 72 }, ··· 136 78 if (port->mapbase == (u_int)&Ser1UTCR0) { 137 79 if (state) 138 80 { 139 - clear_cs3_bit(RS232_ON); 140 - clear_cs3_bit(DECT_POWER_ON); 81 + simpad_clear_cs3_bit(RS232_ON); 82 + simpad_clear_cs3_bit(DECT_POWER_ON); 141 83 }else 142 84 { 143 - set_cs3_bit(RS232_ON); 144 - set_cs3_bit(DECT_POWER_ON); 85 + simpad_set_cs3_bit(RS232_ON); 86 + simpad_set_cs3_bit(DECT_POWER_ON); 145 87 } 146 88 } 147 89 } ··· 190 132 static struct mcp_plat_data simpad_mcp_data = { 191 133 .mccr0 = MCCR0_ADM, 192 134 .sclk_rate = 11981000, 135 + .gpio_base = SIMPAD_UCB1X00_GPIO_BASE, 193 136 }; 194 137 195 138 ··· 201 142 202 143 iotable_init(simpad_io_desc, ARRAY_SIZE(simpad_io_desc)); 203 144 204 - set_cs3_bit (EN1 | EN0 | LED2_ON | DISPLAY_ON | RS232_ON | 205 - ENABLE_5V | RESET_SIMCARD | DECT_POWER_ON); 206 - 145 + /* Initialize CS3 */ 146 + cs3_shadow = (EN1 | EN0 | LED2_ON | DISPLAY_ON | 147 + RS232_ON | ENABLE_5V | RESET_SIMCARD | DECT_POWER_ON); 148 + __simpad_write_cs3(); /* Spinlocks not yet initialized */ 207 149 208 150 sa1100_register_uart_fns(&simpad_port_fns); 209 151 sa1100_register_uart(0, 3); /* serial interface */ ··· 230 170 231 171 static void simpad_power_off(void) 232 172 { 233 - local_irq_disable(); // was cli 234 - set_cs3(0x800); /* only SD_MEDIAQ */ 173 + local_irq_disable(); 174 + cs3_shadow = SD_MEDIAQ; 175 + __simpad_write_cs3(); /* Bypass spinlock here */ 235 176 236 177 /* disable internal oscillator, float CS lines */ 237 178 PCFR = (PCFR_OPDE | PCFR_FP | PCFR_FS); 238 - /* enable wake-up on GPIO0 (Assabet...) */ 239 - PWER = GFER = GRER = 1; 179 + /* enable wake-up on GPIO0 */ 180 + PWER = GFER = GRER = PWER_GPIO0; 240 181 /* 241 182 * set scratchpad to zero, just in case it is used as a 242 183 * restart address by the bootloader. ··· 253 192 254 193 } 255 194 195 + /* 196 + * gpio_keys 197 + */ 198 + 199 + static struct gpio_keys_button simpad_button_table[] = { 200 + { KEY_POWER, IRQ_GPIO_POWER_BUTTON, 1, "power button" }, 201 + }; 202 + 203 + static struct gpio_keys_platform_data simpad_keys_data = { 204 + .buttons = simpad_button_table, 205 + .nbuttons = ARRAY_SIZE(simpad_button_table), 206 + }; 207 + 208 + static struct platform_device simpad_keys = { 209 + .name = "gpio-keys", 210 + .dev = { 211 + .platform_data = &simpad_keys_data, 212 + }, 213 + }; 214 + 215 + static struct gpio_keys_button simpad_polled_button_table[] = { 216 + { KEY_PROG1, SIMPAD_UCB1X00_GPIO_PROG1, 1, "prog1 button" }, 217 + { KEY_PROG2, SIMPAD_UCB1X00_GPIO_PROG2, 1, "prog2 button" }, 218 + { KEY_UP, SIMPAD_UCB1X00_GPIO_UP, 1, "up button" }, 219 + { KEY_DOWN, SIMPAD_UCB1X00_GPIO_DOWN, 1, "down button" }, 220 + { KEY_LEFT, SIMPAD_UCB1X00_GPIO_LEFT, 1, "left button" }, 221 + { KEY_RIGHT, SIMPAD_UCB1X00_GPIO_RIGHT, 1, "right button" }, 222 + }; 223 + 224 + static struct gpio_keys_platform_data simpad_polled_keys_data = { 225 + .buttons = simpad_polled_button_table, 226 + .nbuttons = ARRAY_SIZE(simpad_polled_button_table), 227 + .poll_interval = 50, 228 + }; 229 + 230 + static struct platform_device simpad_polled_keys = { 231 + .name = "gpio-keys-polled", 232 + .dev = { 233 + .platform_data = &simpad_polled_keys_data, 234 + }, 235 + }; 236 + 237 + /* 238 + * GPIO LEDs 239 + */ 240 + 241 + static struct gpio_led simpad_leds[] = { 242 + { 243 + .name = "simpad:power", 244 + .gpio = SIMPAD_CS3_LED2_ON, 245 + .active_low = 0, 246 + .default_trigger = "default-on", 247 + }, 248 + }; 249 + 250 + static struct gpio_led_platform_data simpad_led_data = { 251 + .num_leds = ARRAY_SIZE(simpad_leds), 252 + .leds = simpad_leds, 253 + }; 254 + 255 + static struct platform_device simpad_gpio_leds = { 256 + .name = "leds-gpio", 257 + .id = 0, 258 + .dev = { 259 + .platform_data = &simpad_led_data, 260 + }, 261 + }; 262 + 263 + /* 264 + * i2c 265 + */ 266 + static struct i2c_gpio_platform_data simpad_i2c_data = { 267 + .sda_pin = GPIO_GPIO21, 268 + .scl_pin = GPIO_GPIO25, 269 + .udelay = 10, 270 + .timeout = HZ, 271 + }; 272 + 273 + static struct platform_device simpad_i2c = { 274 + .name = "i2c-gpio", 275 + .id = 0, 276 + .dev = { 277 + .platform_data = &simpad_i2c_data, 278 + }, 279 + }; 256 280 257 281 /* 258 282 * MediaQ Video Device ··· 348 202 }; 349 203 350 204 static struct platform_device *devices[] __initdata = { 351 - &simpad_mq200fb 205 + &simpad_keys, 206 + &simpad_polled_keys, 207 + &simpad_mq200fb, 208 + &simpad_gpio_leds, 209 + &simpad_i2c, 352 210 }; 353 211 354 212 ··· 360 210 static int __init simpad_init(void) 361 211 { 362 212 int ret; 213 + 214 + spin_lock_init(&cs3_lock); 215 + 216 + cs3_gpio.label = "simpad_cs3"; 217 + cs3_gpio.base = SIMPAD_CS3_GPIO_BASE; 218 + cs3_gpio.ngpio = 24; 219 + cs3_gpio.set = cs3_gpio_set; 220 + cs3_gpio.get = cs3_gpio_get; 221 + cs3_gpio.direction_input = cs3_gpio_direction_input; 222 + cs3_gpio.direction_output = cs3_gpio_direction_output; 223 + ret = gpiochip_add(&cs3_gpio); 224 + if (ret) 225 + printk(KERN_WARNING "simpad: Unable to register cs3 GPIO device"); 363 226 364 227 pm_power_off = simpad_power_off; 365 228
+1 -1
arch/arm/mach-shark/Makefile.boot
··· 1 - zreladdr-y := 0x08008000 1 + zreladdr-y += 0x08008000 2 2
+1 -1
arch/arm/mach-shmobile/Makefile.boot
··· 1 1 __ZRELADDR := $(shell /bin/bash -c 'printf "0x%08x" \ 2 2 $$[$(CONFIG_MEMORY_START) + 0x8000]') 3 3 4 - zreladdr-y := $(__ZRELADDR) 4 + zreladdr-y += $(__ZRELADDR) 5 5 6 6 # Unsupported legacy stuff 7 7 #
+1 -1
arch/arm/mach-spear3xx/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+1 -1
arch/arm/mach-spear6xx/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+1 -1
arch/arm/mach-tcc8k/Makefile.boot
··· 1 - zreladdr-y := 0x20008000 1 + zreladdr-y += 0x20008000 2 2 params_phys-y := 0x20000100 3 3 initrd_phys-y := 0x20800000
+1 -1
arch/arm/mach-tegra/Makefile.boot
··· 1 - zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00008000 1 + zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) += 0x00008000 2 2 params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 3 3 initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 4 4
+2 -2
arch/arm/mach-tegra/board-harmony.c
··· 123 123 &harmony_audio_device, 124 124 }; 125 125 126 - static void __init tegra_harmony_fixup(struct machine_desc *desc, 127 - struct tag *tags, char **cmdline, struct meminfo *mi) 126 + static void __init tegra_harmony_fixup(struct tag *tags, char **cmdline, 127 + struct meminfo *mi) 128 128 { 129 129 mi->nr_banks = 2; 130 130 mi->bank[0].start = PHYS_OFFSET;
+2 -2
arch/arm/mach-tegra/board-paz00.c
··· 84 84 platform_device_register(&tegra_ehci3_device); 85 85 } 86 86 87 - static void __init tegra_paz00_fixup(struct machine_desc *desc, 88 - struct tag *tags, char **cmdline, struct meminfo *mi) 87 + static void __init tegra_paz00_fixup(struct tag *tags, char **cmdline, 88 + struct meminfo *mi) 89 89 { 90 90 mi->nr_banks = 1; 91 91 mi->bank[0].start = PHYS_OFFSET;
+2 -2
arch/arm/mach-tegra/board-trimslice.c
··· 126 126 platform_device_register(&tegra_ehci1_device); 127 127 } 128 128 129 - static void __init tegra_trimslice_fixup(struct machine_desc *desc, 130 - struct tag *tags, char **cmdline, struct meminfo *mi) 129 + static void __init tegra_trimslice_fixup(struct tag *tags, char **cmdline, 130 + struct meminfo *mi) 131 131 { 132 132 mi->nr_banks = 2; 133 133 mi->bank[0].start = PHYS_OFFSET;
+2 -2
arch/arm/mach-u300/Makefile.boot
··· 4 4 # INITRD_PHYS must be in RAM 5 5 6 6 ifdef CONFIG_MACH_U300_SINGLE_RAM 7 - zreladdr-y := 0x28E08000 7 + zreladdr-y += 0x28E08000 8 8 params_phys-y := 0x28E00100 9 9 else 10 - zreladdr-y := 0x48008000 10 + zreladdr-y += 0x48008000 11 11 params_phys-y := 0x48000100 12 12 endif 13 13
+1 -1
arch/arm/mach-ux500/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000 4 4
+1 -1
arch/arm/mach-versatile/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000 4 4
+1 -1
arch/arm/mach-vexpress/Makefile.boot
··· 1 - zreladdr-y := 0x60008000 1 + zreladdr-y += 0x60008000 2 2 params_phys-y := 0x60000100 3 3 initrd_phys-y := 0x60800000
+2 -7
arch/arm/mach-vexpress/hotplug.c
··· 13 13 #include <linux/smp.h> 14 14 15 15 #include <asm/cacheflush.h> 16 + #include <asm/system.h> 16 17 17 18 extern volatile int pen_release; 18 19 ··· 63 62 * code will have already disabled interrupts 64 63 */ 65 64 for (;;) { 66 - /* 67 - * here's the WFI 68 - */ 69 - asm(".word 0xe320f003\n" 70 - : 71 - : 72 - : "memory", "cc"); 65 + wfi(); 73 66 74 67 if (pen_release == cpu) { 75 68 /*
+1 -1
arch/arm/mach-vt8500/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x01000000
+1 -1
arch/arm/mach-w90x900/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3
+1 -1
arch/arm/mach-zynq/Makefile.boot
··· 1 - zreladdr-y := 0x00008000 1 + zreladdr-y += 0x00008000 2 2 params_phys-y := 0x00000100 3 3 initrd_phys-y := 0x00800000
+21
arch/arm/mm/ioremap.c
··· 289 289 } 290 290 EXPORT_SYMBOL(__arm_ioremap); 291 291 292 + /* 293 + * Remap an arbitrary physical address space into the kernel virtual 294 + * address space as memory. Needed when the kernel wants to execute 295 + * code in external memory. This is needed for reprogramming source 296 + * clocks that would affect normal memory for example. Please see 297 + * CONFIG_GENERIC_ALLOCATOR for allocating external memory. 298 + */ 299 + void __iomem * 300 + __arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached) 301 + { 302 + unsigned int mtype; 303 + 304 + if (cached) 305 + mtype = MT_MEMORY; 306 + else 307 + mtype = MT_MEMORY_NONCACHED; 308 + 309 + return __arm_ioremap_caller(phys_addr, size, mtype, 310 + __builtin_return_address(0)); 311 + } 312 + 292 313 void __iounmap(volatile void __iomem *io_addr) 293 314 { 294 315 void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
+16 -4
arch/arm/tools/mach-types
··· 12 12 # 13 13 # http://www.arm.linux.org.uk/developer/machines/?action=new 14 14 # 15 - # XXX: This is a cut-down version of the file; it contains only machines that 16 - # XXX: are in mainline or have been submitted to the machine database within 17 - # XXX: the last 12 months. If your entry is missing please email rmk at 18 - # XXX: <linux@arm.linux.org.uk> 15 + # This is a cut-down version of the file; it contains only machines that 16 + # are merged into mainline or have been edited in the machine database 17 + # within the last 12 months. References to machine_is_NAME() do not count! 19 18 # 20 19 # Last update: Sat May 7 08:48:24 2011 21 20 # ··· 64 65 h7202 ARCH_H7202 H7202 162 65 66 iq80321 ARCH_IQ80321 IQ80321 169 66 67 ks8695 ARCH_KS8695 KS8695 180 68 + karo ARCH_KARO KARO 190 67 69 smdk2410 ARCH_SMDK2410 SMDK2410 193 68 70 ceiva ARCH_CEIVA CEIVA 200 69 71 voiceblue MACH_VOICEBLUE VOICEBLUE 218 ··· 188 188 davinci_evm MACH_DAVINCI_EVM DAVINCI_EVM 901 189 189 palmz72 MACH_PALMZ72 PALMZ72 904 190 190 nxdb500 MACH_NXDB500 NXDB500 905 191 + apf9328 MACH_APF9328 APF9328 906 191 192 palmt5 MACH_PALMT5 PALMT5 917 192 193 palmtc MACH_PALMTC PALMTC 918 193 194 omap_apollon MACH_OMAP_APOLLON OMAP_APOLLON 919 ··· 272 271 ts_x09 MACH_TS209 TS209 1565 273 272 at91cap9adk MACH_AT91CAP9ADK AT91CAP9ADK 1566 274 273 mx31moboard MACH_MX31MOBOARD MX31MOBOARD 1574 274 + vision_ep9307 MACH_VISION_EP9307 VISION_EP9307 1578 275 275 terastation_pro2 MACH_TERASTATION_PRO2 TERASTATION_PRO2 1584 276 276 linkstation_pro MACH_LINKSTATION_PRO LINKSTATION_PRO 1585 277 277 e350 MACH_E350 E350 1596 278 278 ts409 MACH_TS409 TS409 1601 279 + rsi_ews MACH_RSI_EWS RSI_EWS 1609 279 280 cm_x300 MACH_CM_X300 CM_X300 1616 280 281 at91sam9g20ek MACH_AT91SAM9G20EK AT91SAM9G20EK 1624 281 282 smdk6410 MACH_SMDK6410 SMDK6410 1626 ··· 334 331 tavorevb MACH_TAVOREVB TAVOREVB 1827 335 332 saar MACH_SAAR SAAR 1828 336 333 at91sam9m10g45ek MACH_AT91SAM9M10G45EK AT91SAM9M10G45EK 1830 334 + usb_a9g20 MACH_USB_A9G20 USB_A9G20 1841 337 335 mxlads MACH_MXLADS MXLADS 1851 338 336 linkstation_mini MACH_LINKSTATION_MINI LINKSTATION_MINI 1858 339 337 afeb9260 MACH_AFEB9260 AFEB9260 1859 ··· 373 369 sheevaplug MACH_SHEEVAPLUG SHEEVAPLUG 2097 374 370 avengers_lite MACH_AVENGERS_LITE AVENGERS_LITE 2104 375 371 mx51_babbage MACH_MX51_BABBAGE MX51_BABBAGE 2125 372 + tx37 MACH_TX37 TX37 2127 376 373 rd78x00_masa MACH_RD78X00_MASA RD78X00_MASA 2135 377 374 dm355_leopard MACH_DM355_LEOPARD DM355_LEOPARD 2138 378 375 ts219 MACH_TS219 TS219 2139 ··· 384 379 magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162 385 380 btmavb101 MACH_BTMAVB101 BTMAVB101 2172 386 381 btmawb101 MACH_BTMAWB101 BTMAWB101 2173 382 + tx25 MACH_TX25 TX25 2177 387 383 omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178 388 384 anw6410 MACH_ANW6410 ANW6410 2183 389 385 imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187 ··· 429 423 raumfeld_connector MACH_RAUMFELD_CONNECTOR RAUMFELD_CONNECTOR 2414 430 424 raumfeld_speaker MACH_RAUMFELD_SPEAKER RAUMFELD_SPEAKER 2415 431 425 tnetv107x MACH_TNETV107X TNETV107X 2418 426 + mx51_m2id MACH_MX51_M2ID MX51_M2ID 2428 432 427 smdkv210 MACH_SMDKV210 SMDKV210 2456 433 428 omap_zoom3 MACH_OMAP_ZOOM3 OMAP_ZOOM3 2464 434 429 omap_3630sdp MACH_OMAP_3630SDP OMAP_3630SDP 2465 ··· 440 433 ts41x MACH_TS41X TS41X 2502 441 434 phy3250 MACH_PHY3250 PHY3250 2511 442 435 mini6410 MACH_MINI6410 MINI6410 2520 436 + tx51 MACH_TX51 TX51 2529 443 437 mx28evk MACH_MX28EVK MX28EVK 2531 444 438 smartq5 MACH_SMARTQ5 SMARTQ5 2534 445 439 davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548 446 440 mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 447 441 riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576 448 442 riot_x37 MACH_RIOT_X37 RIOT_X37 2578 443 + pca101 MACH_PCA101 PCA101 2595 449 444 capc7117 MACH_CAPC7117 CAPC7117 2612 450 445 icontrol MACH_ICONTROL ICONTROL 2624 446 + gplugd MACH_GPLUGD GPLUGD 2625 451 447 qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627 452 448 mx23evk MACH_MX23EVK MX23EVK 2629 453 449 ap4evb MACH_AP4EVB AP4EVB 2630 ··· 1123 1113 thales_adc MACH_THALES_ADC THALES_ADC 3492 1124 1114 ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 1125 1115 atdgp318 MACH_ATDGP318 ATDGP318 3494 1116 + smdk4212 MACH_SMDK4212 SMDK4212 3638 1117 + smdk4412 MACH_SMDK4412 SMDK4412 3765
+16 -19
drivers/pcmcia/sa1100_simpad.c
··· 15 15 #include <mach/simpad.h> 16 16 #include "sa1100_generic.h" 17 17 18 - extern long get_cs3_shadow(void); 19 - extern void set_cs3_bit(int value); 20 - extern void clear_cs3_bit(int value); 21 - 22 18 static struct pcmcia_irqs irqs[] = { 23 19 { 1, IRQ_GPIO_CF_CD, "CF_CD" }, 24 20 }; ··· 22 26 static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 23 27 { 24 28 25 - clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); 29 + simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); 26 30 27 31 skt->socket.pci_irq = IRQ_GPIO_CF_IRQ; 28 32 ··· 34 38 soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs)); 35 39 36 40 /* Disable CF bus: */ 37 - //set_cs3_bit(PCMCIA_BUFF_DIS); 38 - clear_cs3_bit(PCMCIA_RESET); 41 + /*simpad_set_cs3_bit(PCMCIA_BUFF_DIS);*/ 42 + simpad_clear_cs3_bit(PCMCIA_RESET); 39 43 } 40 44 41 45 static void ··· 43 47 struct pcmcia_state *state) 44 48 { 45 49 unsigned long levels = GPLR; 46 - long cs3reg = get_cs3_shadow(); 50 + long cs3reg = simpad_get_cs3_ro(); 47 51 48 52 state->detect=((levels & GPIO_CF_CD)==0)?1:0; 49 53 state->ready=(levels & GPIO_CF_IRQ)?1:0; 50 - state->bvd1=1; /* Not available on Simpad. */ 51 - state->bvd2=1; /* Not available on Simpad. */ 54 + state->bvd1 = 1; /* Might be cs3reg & PCMCIA_BVD1 */ 55 + state->bvd2 = 1; /* Might be cs3reg & PCMCIA_BVD2 */ 52 56 state->wrprot=0; /* Not available on Simpad. */ 53 - 54 - if((cs3reg & 0x0c) == 0x0c) { 57 + 58 + if ((cs3reg & (PCMCIA_VS1|PCMCIA_VS2)) == 59 + (PCMCIA_VS1|PCMCIA_VS2)) { 55 60 state->vs_3v=0; 56 61 state->vs_Xv=0; 57 62 } else { ··· 72 75 /* Murphy: see table of MIC2562a-1 */ 73 76 switch (state->Vcc) { 74 77 case 0: 75 - clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); 78 + simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); 76 79 break; 77 80 78 81 case 33: 79 - clear_cs3_bit(VCC_3V_EN|EN1); 80 - set_cs3_bit(VCC_5V_EN|EN0); 82 + simpad_clear_cs3_bit(VCC_3V_EN|EN1); 83 + simpad_set_cs3_bit(VCC_5V_EN|EN0); 81 84 break; 82 85 83 86 case 50: 84 - clear_cs3_bit(VCC_5V_EN|EN1); 85 - set_cs3_bit(VCC_3V_EN|EN0); 87 + simpad_clear_cs3_bit(VCC_5V_EN|EN1); 88 + simpad_set_cs3_bit(VCC_3V_EN|EN0); 86 89 break; 87 90 88 91 default: 89 92 printk(KERN_ERR "%s(): unrecognized Vcc %u\n", 90 93 __func__, state->Vcc); 91 - clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); 94 + simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); 92 95 local_irq_restore(flags); 93 96 return -1; 94 97 } ··· 107 110 static void simpad_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) 108 111 { 109 112 soc_pcmcia_disable_irqs(skt, irqs, ARRAY_SIZE(irqs)); 110 - set_cs3_bit(PCMCIA_RESET); 113 + simpad_set_cs3_bit(PCMCIA_RESET); 111 114 } 112 115 113 116 static struct pcmcia_low_level simpad_pcmcia_ops = {