···212212 you need to shrink the kernel to the minimal size.213213214214215215+config GENERIC_BUG216216+ def_bool y217217+ depends on BUG218218+215219source "init/Kconfig"216220217221source "kernel/Kconfig.freezer"
+9
arch/arm/boot/Makefile
···78787979$(obj)/uImage: STARTADDR=$(LOADADDR)80808181+check_for_multiple_loadaddr = \8282+if [ $(words $(LOADADDR)) -gt 1 ]; then \8383+ echo 'multiple load addresses: $(LOADADDR)'; \8484+ echo 'This is incompatible with uImages'; \8585+ echo 'Specify LOADADDR on the commandline to build an uImage'; \8686+ false; \8787+fi8888+8189$(obj)/uImage: $(obj)/zImage FORCE9090+ @$(check_for_multiple_loadaddr)8291 $(call if_changed,uimage)8392 @echo ' Image $@ is ready'8493
+8
arch/arm/boot/compressed/Makefile
···139139 ( echo "following symbols must have non local/private scope:" >&2; \140140 echo "$$bad_syms" >&2; rm -f $@; false )141141142142+check_for_multiple_zreladdr = \143143+if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \144144+ echo 'multiple zreladdrs: $(ZRELADDR)'; \145145+ echo 'This needs CONFIG_AUTO_ZRELADDR to be set'; \146146+ false; \147147+fi148148+142149$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \143150 $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE151151+ @$(check_for_multiple_zreladdr)144152 $(call if_changed,ld)145153 @$(check_for_bad_syms)146154
···11CONFIG_EXPERIMENTAL=y22CONFIG_SYSVIPC=y33+CONFIG_TINY_RCU=y34CONFIG_IKCONFIG=y45CONFIG_IKCONFIG_PROC=y56CONFIG_LOG_BUF_SHIFT=14···98CONFIG_MODULE_UNLOAD=y109CONFIG_ARCH_INTEGRATOR=y1110CONFIG_ARCH_INTEGRATOR_AP=y1111+CONFIG_ARCH_INTEGRATOR_CP=y1212CONFIG_CPU_ARM720T=y1313CONFIG_CPU_ARM920T=y1414+CONFIG_CPU_ARM922T=y1515+CONFIG_CPU_ARM926T=y1616+CONFIG_CPU_ARM1020=y1717+CONFIG_CPU_ARM1022=y1818+CONFIG_CPU_ARM1026=y1419CONFIG_PCI=y2020+CONFIG_NO_HZ=y2121+CONFIG_HIGH_RES_TIMERS=y2222+CONFIG_PREEMPT=y2323+CONFIG_AEABI=y1524CONFIG_LEDS=y1625CONFIG_LEDS_CPU=y1726CONFIG_ZBOOT_ROM_TEXT=0x01827CONFIG_ZBOOT_ROM_BSS=0x01919-CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp mem=32M"2828+CONFIG_CMDLINE="console=ttyAM0,38400n8 root=/dev/nfs ip=bootp"2029CONFIG_CPU_FREQ=y2130CONFIG_CPU_FREQ_GOV_POWERSAVE=y2231CONFIG_CPU_FREQ_GOV_USERSPACE=y2332CONFIG_CPU_FREQ_GOV_ONDEMAND=y2433CONFIG_FPE_NWFPE=y2525-CONFIG_PM=y2634CONFIG_NET=y2735CONFIG_PACKET=y2836CONFIG_UNIX=y···4232CONFIG_IP_PNP_BOOTP=y4333# CONFIG_IPV6 is not set4434CONFIG_MTD=y4545-CONFIG_MTD_PARTITIONS=y4635CONFIG_MTD_CMDLINE_PARTS=y4736CONFIG_MTD_AFS_PARTS=y4837CONFIG_MTD_CHAR=y···4940CONFIG_MTD_CFI=y5041CONFIG_MTD_CFI_ADV_OPTIONS=y5142CONFIG_MTD_CFI_INTELEXT=y4343+CONFIG_MTD_PHYSMAP=y5244CONFIG_BLK_DEV_LOOP=y5345CONFIG_BLK_DEV_RAM=y5446CONFIG_BLK_DEV_RAM_SIZE=8192···6656CONFIG_FB_MATROX=y6757CONFIG_FB_MATROX_MILLENIUM=y6858CONFIG_FB_MATROX_MYSTIQUE=y5959+CONFIG_RTC_CLASS=y6060+CONFIG_RTC_DRV_PL030=y6961CONFIG_EXT2_FS=y7062CONFIG_TMPFS=y7163CONFIG_JFFS2_FS=y···8068CONFIG_PARTITION_ADVANCED=y8169CONFIG_MAGIC_SYSRQ=y8270CONFIG_DEBUG_KERNEL=y8383-CONFIG_DEBUG_ERRORS=y
···334455#ifdef CONFIG_BUG66-#ifdef CONFIG_DEBUG_BUGVERBOSE77-extern void __bug(const char *file, int line) __attribute__((noreturn));8699-/* give file/line information */1010-#define BUG() __bug(__FILE__, __LINE__)1111-77+/*88+ * Use a suitable undefined instruction to use for ARM/Thumb2 bug handling.99+ * We need to be careful not to conflict with those used by other modules and1010+ * the register_undef_hook() system.1111+ */1212+#ifdef CONFIG_THUMB2_KERNEL1313+#define BUG_INSTR_VALUE 0xde021414+#define BUG_INSTR_TYPE ".hword "1215#else1313-1414-/* this just causes an oops */1515-#define BUG() do { *(int *)0 = 0; } while (1)1616-1616+#define BUG_INSTR_VALUE 0xe7f001f21717+#define BUG_INSTR_TYPE ".word "1718#endif1919+2020+2121+#define BUG() _BUG(__FILE__, __LINE__, BUG_INSTR_VALUE)2222+#define _BUG(file, line, value) __BUG(file, line, value)2323+2424+#ifdef CONFIG_DEBUG_BUGVERBOSE2525+2626+/*2727+ * The extra indirection is to ensure that the __FILE__ string comes through2828+ * OK. Many version of gcc do not support the asm %c parameter which would be2929+ * preferable to this unpleasantness. We use mergeable string sections to3030+ * avoid multiple copies of the string appearing in the kernel image.3131+ */3232+3333+#define __BUG(__file, __line, __value) \3434+do { \3535+ BUILD_BUG_ON(sizeof(struct bug_entry) != 12); \3636+ asm volatile("1:\t" BUG_INSTR_TYPE #__value "\n" \3737+ ".pushsection .rodata.str, \"aMS\", %progbits, 1\n" \3838+ "2:\t.asciz " #__file "\n" \3939+ ".popsection\n" \4040+ ".pushsection __bug_table,\"a\"\n" \4141+ "3:\t.word 1b, 2b\n" \4242+ "\t.hword " #__line ", 0\n" \4343+ ".popsection"); \4444+ unreachable(); \4545+} while (0)4646+4747+#else /* not CONFIG_DEBUG_BUGVERBOSE */4848+4949+#define __BUG(__file, __line, __value) \5050+do { \5151+ asm volatile(BUG_INSTR_TYPE #__value); \5252+ unreachable(); \5353+} while (0)5454+#endif /* CONFIG_DEBUG_BUGVERBOSE */18551956#define HAVE_ARCH_BUG2020-#endif5757+#endif /* CONFIG_BUG */21582259#include <asm-generic/bug.h>2360
···11-/*22- * This program is free software; you can redistribute it and/or modify33- * it under the terms of the GNU General Public License as published by44- * the Free Software Foundation; either version 2 of the License, or55- * (at your option) any later version.66- *77- * This program is distributed in the hope that it will be useful,88- * but WITHOUT ANY WARRANTY; without even the implied warranty of99- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1010- * GNU General Public License for more details.1111- *1212- * You should have received a copy of the GNU General Public License1313- * along with this program; if not, write to the Free Software1414- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA1515- */1616-/* Size definitions1717- * Copyright (C) ARM Limited 1998. All rights reserved.1818- */1919-#include <asm-generic/sizes.h>2020-2121-#define SZ_48M (SZ_32M + SZ_16M)
+2-2
arch/arm/include/asm/system.h
···57575858#ifndef __ASSEMBLY__59596060+#include <linux/compiler.h>6061#include <linux/linkage.h>6162#include <linux/irqflags.h>6263···9190#define xchg(ptr,x) \9291 ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))93929494-extern asmlinkage void __backtrace(void);9593extern asmlinkage void c_backtrace(unsigned long fp, int pmode);96949795struct mm_struct;9896extern void show_pte(struct mm_struct *mm, unsigned long addr);9997extern void __show_regs(struct pt_regs *);10098101101-extern int cpu_architecture(void);9999+extern int __pure cpu_architecture(void);102100extern void cpu_init(void);103101104102void arm_machine_restart(char mode, const char *cmd);
-3
arch/arm/kernel/armksyms.c
···49495050extern void fpundefinstr(void);51515252-5353-EXPORT_SYMBOL(__backtrace);5454-5552 /* platform dependent support */5653EXPORT_SYMBOL(__udelay);5754EXPORT_SYMBOL(__const_udelay);
···2424#include <asm/unwind.h>2525#include <asm/unistd.h>2626#include <asm/tls.h>2727+#include <asm/system.h>27282829#include "entry-header.S"2930#include <asm/entry-macro-multi.S>···263262 ldr r0, [r4, #-4]264263#else265264 ldrh r0, [r4, #-2] @ Thumb instruction at LR - 2266266- and r9, r0, #0xf800267267- cmp r9, #0xe800 @ 32-bit instruction if xx >= 0265265+ cmp r0, #0xe800 @ 32-bit instruction if xx >= 0268266 ldrhhs r9, [r4] @ bottom 16 bits269267 orrhs r0, r9, r0, lsl #16270268#endif···440440#endif441441 beq call_fpe442442 @ Thumb instruction443443-#if __LINUX_ARM_ARCH__ >= 7443443+#if CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7444444+/*445445+ * Thumb-2 instruction handling. Note that because pre-v6 and >= v6 platforms446446+ * can never be supported in a single kernel, this code is not applicable at447447+ * all when __LINUX_ARM_ARCH__ < 6. This allows simplifying assumptions to be448448+ * made about .arch directives.449449+ */450450+#if __LINUX_ARM_ARCH__ < 7451451+/* If the target CPU may not be Thumb-2-capable, a run-time check is needed: */452452+#define NEED_CPU_ARCHITECTURE453453+ ldr r5, .LCcpu_architecture454454+ ldr r5, [r5]455455+ cmp r5, #CPU_ARCH_ARMv7456456+ blo __und_usr_unknown457457+/*458458+ * The following code won't get run unless the running CPU really is v7, so459459+ * coding round the lack of ldrht on older arches is pointless. Temporarily460460+ * override the assembler target arch with the minimum required instead:461461+ */462462+ .arch armv6t2463463+#endif4444642:445465 ARM( ldrht r5, [r4], #2 )446466 THUMB( ldrht r5, [r4] )447467 THUMB( add r4, r4, #2 )448448- and r0, r5, #0xf800 @ mask bits 111x x... .... ....449449- cmp r0, #0xe800 @ 32bit instruction if xx != 0468468+ cmp r5, #0xe800 @ 32bit instruction if xx != 0450469 blo __und_usr_unknown4514703: ldrht r0, [r4]452471 add r2, r2, #2 @ r2 is PC + 2, make it PC + 4453472 orr r0, r0, r5, lsl #16473473+474474+#if __LINUX_ARM_ARCH__ < 7475475+/* If the target arch was overridden, change it back: */476476+#ifdef CONFIG_CPU_32v6K477477+ .arch armv6k454478#else479479+ .arch armv6480480+#endif481481+#endif /* __LINUX_ARM_ARCH__ < 7 */482482+#else /* !(CONFIG_ARM_THUMB && __LINUX_ARM_ARCH__ >= 6 && CONFIG_CPU_V7) */455483 b __und_usr_unknown456484#endif457485 UNWIND(.fnend )···605577 movw_pc lr @ CP#13606578 movw_pc lr @ CP#14 (Debug)607579 movw_pc lr @ CP#15 (Control)580580+581581+#ifdef NEED_CPU_ARCHITECTURE582582+ .align 2583583+.LCcpu_architecture:584584+ .word __cpu_architecture585585+#endif608586609587#ifdef CONFIG_NEON610588 .align 6
+18-17
arch/arm/kernel/machine_kexec.c
···32323333int machine_kexec_prepare(struct kimage *image)3434{3535+ unsigned long page_list;3636+ void *reboot_code_buffer;3737+ page_list = image->head & PAGE_MASK;3838+3939+ reboot_code_buffer = page_address(image->control_code_page);4040+4141+ /* Prepare parameters for reboot_code_buffer*/4242+ kexec_start_address = image->start;4343+ kexec_indirection_page = page_list;4444+ kexec_mach_type = machine_arch_type;4545+ kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;4646+4747+ /* copy our kernel relocation code to the control code page */4848+ memcpy(reboot_code_buffer,4949+ relocate_new_kernel, relocate_new_kernel_size);5050+5151+ flush_icache_range((unsigned long) reboot_code_buffer,5252+ (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);3553 return 0;3654}3755···1008210183void machine_kexec(struct kimage *image)10284{103103- unsigned long page_list;10485 unsigned long reboot_code_buffer_phys;10586 void *reboot_code_buffer;106106-107107-108108- page_list = image->head & PAGE_MASK;1098711088 /* we need both effective and real address here */11189 reboot_code_buffer_phys =11290 page_to_pfn(image->control_code_page) << PAGE_SHIFT;11391 reboot_code_buffer = page_address(image->control_code_page);11492115115- /* Prepare parameters for reboot_code_buffer*/116116- kexec_start_address = image->start;117117- kexec_indirection_page = page_list;118118- kexec_mach_type = machine_arch_type;119119- kexec_boot_atags = image->start - KEXEC_ARM_ZIMAGE_OFFSET + KEXEC_ARM_ATAGS_OFFSET;120120-121121- /* copy our kernel relocation code to the control code page */122122- memcpy(reboot_code_buffer,123123- relocate_new_kernel, relocate_new_kernel_size);124124-125125-126126- flush_icache_range((unsigned long) reboot_code_buffer,127127- (unsigned long) reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);12893 printk(KERN_INFO "Bye!\n");1299413095 if (kexec_reinit)
···2929#include <linux/fs.h>3030#include <linux/proc_fs.h>3131#include <linux/memblock.h>3232+#include <linux/bug.h>3333+#include <linux/compiler.h>32343335#include <asm/unified.h>3436#include <asm/cpu.h>···4442#include <asm/cacheflush.h>4543#include <asm/cachetype.h>4644#include <asm/tlbflush.h>4545+#include <asm/system.h>47464847#include <asm/prom.h>4948#include <asm/mach/arch.h>···117114struct outer_cache_fns outer_cache __read_mostly;118115EXPORT_SYMBOL(outer_cache);119116#endif117117+118118+/*119119+ * Cached cpu_architecture() result for use by assembler code.120120+ * C code should use the cpu_architecture() function instead of accessing this121121+ * variable directly.122122+ */123123+int __cpu_architecture __read_mostly = CPU_ARCH_UNKNOWN;120124121125struct stack {122126 u32 irq[3];···220210 "?(17)",221211};222212223223-int cpu_architecture(void)213213+static int __get_cpu_architecture(void)224214{225215 int cpu_arch;226216···253243 return cpu_arch;254244}255245246246+int __pure cpu_architecture(void)247247+{248248+ BUG_ON(__cpu_architecture == CPU_ARCH_UNKNOWN);249249+250250+ return __cpu_architecture;251251+}252252+256253static int cpu_has_aliasing_icache(unsigned int arch)257254{258255 int aliasing_icache;259256 unsigned int id_reg, num_sets, line_size;257257+258258+ /* PIPT caches never alias. */259259+ if (icache_is_pipt())260260+ return 0;260261261262 /* arch specifies the register format */262263 switch (arch) {···303282 /* ARMv7 register format */304283 arch = CPU_ARCH_ARMv7;305284 cacheid = CACHEID_VIPT_NONALIASING;306306- if ((cachetype & (3 << 14)) == 1 << 14)285285+ switch (cachetype & (3 << 14)) {286286+ case (1 << 14):307287 cacheid |= CACHEID_ASID_TAGGED;288288+ break;289289+ case (3 << 14):290290+ cacheid |= CACHEID_PIPT;291291+ break;292292+ }308293 } else {309294 arch = CPU_ARCH_ARMv6;310295 if (cachetype & (1 << 23))···327300 printk("CPU: %s data cache, %s instruction cache\n",328301 cache_is_vivt() ? "VIVT" :329302 cache_is_vipt_aliasing() ? "VIPT aliasing" :330330- cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown",303303+ cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown",331304 cache_is_vivt() ? "VIVT" :332305 icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" :333306 icache_is_vipt_aliasing() ? "VIPT aliasing" :307307+ icache_is_pipt() ? "PIPT" :334308 cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown");335309}336310···442414 }443415444416 cpu_name = list->cpu_name;417417+ __cpu_architecture = __get_cpu_architecture();445418446419#ifdef MULTI_CPU447420 processor = *list->proc;···890861 }891862892863 if (mdesc->fixup)893893- mdesc->fixup(mdesc, tags, &from, &meminfo);864864+ mdesc->fixup(tags, &from, &meminfo);894865895866 if (tags->hdr.tag == ATAG_CORE) {896867 if (meminfo.nr_banks != 0)
+13-10
arch/arm/kernel/smp.c
···319319 */320320 platform_secondary_init(cpu);321321322322- /*323323- * Enable local interrupts.324324- */325322 notify_cpu_starting(cpu);326326- local_irq_enable();327327- local_fiq_enable();328328-329329- /*330330- * Setup the percpu timer for this CPU.331331- */332332- percpu_timer_setup();333323334324 calibrate_delay();335325···331341 * before we continue.332342 */333343 set_cpu_online(cpu, true);344344+345345+ /*346346+ * Setup the percpu timer for this CPU.347347+ */348348+ percpu_timer_setup();349349+334350 while (!cpu_active(cpu))335351 cpu_relax();352352+353353+ /*354354+ * cpu_active bit is set, so it's safe to enalbe interrupts355355+ * now.356356+ */357357+ local_irq_enable();358358+ local_fiq_enable();336359337360 /*338361 * OK, it's off to the idle thread for us
+21-10
arch/arm/kernel/traps.c
···2121#include <linux/kdebug.h>2222#include <linux/module.h>2323#include <linux/kexec.h>2424+#include <linux/bug.h>2425#include <linux/delay.h>2526#include <linux/init.h>2627#include <linux/sched.h>···272271 spin_lock_irq(&die_lock);273272 console_verbose();274273 bust_spinlocks(1);274274+ if (!user_mode(regs))275275+ report_bug(regs->ARM_pc, regs);275276 ret = __die(str, err, thread, regs);276277277278 if (regs && kexec_should_crash(thread->task))···304301 die(str, regs, err);305302 }306303}304304+305305+#ifdef CONFIG_GENERIC_BUG306306+307307+int is_valid_bugaddr(unsigned long pc)308308+{309309+#ifdef CONFIG_THUMB2_KERNEL310310+ unsigned short bkpt;311311+#else312312+ unsigned long bkpt;313313+#endif314314+315315+ if (probe_kernel_address((unsigned *)pc, bkpt))316316+ return 0;317317+318318+ return bkpt == BUG_INSTR_VALUE;319319+}320320+321321+#endif307322308323static LIST_HEAD(undef_hook);309324static DEFINE_SPINLOCK(undef_lock);···727706728707 arm_notify_die("unknown data abort code", regs, &info, instr, 0);729708}730730-731731-void __attribute__((noreturn)) __bug(const char *file, int line)732732-{733733- printk(KERN_CRIT"kernel BUG at %s:%d!\n", file, line);734734- *(int *)0 = 0;735735-736736- /* Avoid "noreturn function does return" */737737- for (;;);738738-}739739-EXPORT_SYMBOL(__bug);740709741710void __readwrite_bug(const char *fn)742711{
···11# Address where decompressor will be written and eventually executed.22#33# default to SDRAM44-zreladdr-y := $(CONFIG_BCM_ZRELADDR)44+zreladdr-y += $(CONFIG_BCM_ZRELADDR)55params_phys-y := 0x0000080066
···11# The standard locations for stuff on CLPS711x type processors22- zreladdr-y := 0xc002800022+ zreladdr-y += 0xc002800033params_phys-y := 0xc000010044# Should probably have some agreement on these...55initrd_phys-$(CONFIG_ARCH_P720T) := 0xc0400000
···3737}38383939static void __init4040-fixup_edb7211(struct machine_desc *desc, struct tag *tags,4141- char **cmdline, struct meminfo *mi)4040+fixup_edb7211(struct tag *tags, char **cmdline, struct meminfo *mi)4241{4342 /*4443 * Bank start addresses are not present in the information
···33# PARAMS_PHYS must be within 4MB of ZRELADDR44# INITRD_PHYS must be in RAM5566- zreladdr-y := 0x0000800066+ zreladdr-y += 0x0000800077params_phys-y := 0x0000010088initrd_phys-y := 0x00800000
···308308 * Many orion-based systems have buggy bootloader implementations.309309 * This is a common fixup for bogus memory tags.310310 */311311-void __init tag_fixup_mem32(struct machine_desc *mdesc, struct tag *t,312312- char **from, struct meminfo *meminfo)311311+void __init tag_fixup_mem32(struct tag *t, char **from,312312+ struct meminfo *meminfo)313313{314314 for (; t->hdr.size; t = tag_next(t))315315 if (t->hdr.tag == ATAG_MEM &&
···301301}302302303303static void __init304304-fixup_assabet(struct machine_desc *desc, struct tag *tags,305305- char **cmdline, struct meminfo *mi)304304+fixup_assabet(struct tag *tags, char **cmdline, struct meminfo *mi)306305{307306 /* This must be done before any call to machine_has_neponset() */308307 map_sa1100_gpio_regs();
···289289}290290EXPORT_SYMBOL(__arm_ioremap);291291292292+/*293293+ * Remap an arbitrary physical address space into the kernel virtual294294+ * address space as memory. Needed when the kernel wants to execute295295+ * code in external memory. This is needed for reprogramming source296296+ * clocks that would affect normal memory for example. Please see297297+ * CONFIG_GENERIC_ALLOCATOR for allocating external memory.298298+ */299299+void __iomem *300300+__arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached)301301+{302302+ unsigned int mtype;303303+304304+ if (cached)305305+ mtype = MT_MEMORY;306306+ else307307+ mtype = MT_MEMORY_NONCACHED;308308+309309+ return __arm_ioremap_caller(phys_addr, size, mtype,310310+ __builtin_return_address(0));311311+}312312+292313void __iounmap(volatile void __iomem *io_addr)293314{294315 void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
+16-4
arch/arm/tools/mach-types
···1212#1313# http://www.arm.linux.org.uk/developer/machines/?action=new1414#1515-# XXX: This is a cut-down version of the file; it contains only machines that1616-# XXX: are in mainline or have been submitted to the machine database within1717-# XXX: the last 12 months. If your entry is missing please email rmk at1818-# XXX: <linux@arm.linux.org.uk>1515+# This is a cut-down version of the file; it contains only machines that1616+# are merged into mainline or have been edited in the machine database1717+# within the last 12 months. References to machine_is_NAME() do not count!1918#2019# Last update: Sat May 7 08:48:24 20112120#···6465h7202 ARCH_H7202 H7202 1626566iq80321 ARCH_IQ80321 IQ80321 1696667ks8695 ARCH_KS8695 KS8695 1806868+karo ARCH_KARO KARO 1906769smdk2410 ARCH_SMDK2410 SMDK2410 1936870ceiva ARCH_CEIVA CEIVA 2006971voiceblue MACH_VOICEBLUE VOICEBLUE 218···188188davinci_evm MACH_DAVINCI_EVM DAVINCI_EVM 901189189palmz72 MACH_PALMZ72 PALMZ72 904190190nxdb500 MACH_NXDB500 NXDB500 905191191+apf9328 MACH_APF9328 APF9328 906191192palmt5 MACH_PALMT5 PALMT5 917192193palmtc MACH_PALMTC PALMTC 918193194omap_apollon MACH_OMAP_APOLLON OMAP_APOLLON 919···272271ts_x09 MACH_TS209 TS209 1565273272at91cap9adk MACH_AT91CAP9ADK AT91CAP9ADK 1566274273mx31moboard MACH_MX31MOBOARD MX31MOBOARD 1574274274+vision_ep9307 MACH_VISION_EP9307 VISION_EP9307 1578275275terastation_pro2 MACH_TERASTATION_PRO2 TERASTATION_PRO2 1584276276linkstation_pro MACH_LINKSTATION_PRO LINKSTATION_PRO 1585277277e350 MACH_E350 E350 1596278278ts409 MACH_TS409 TS409 1601279279+rsi_ews MACH_RSI_EWS RSI_EWS 1609279280cm_x300 MACH_CM_X300 CM_X300 1616280281at91sam9g20ek MACH_AT91SAM9G20EK AT91SAM9G20EK 1624281282smdk6410 MACH_SMDK6410 SMDK6410 1626···334331tavorevb MACH_TAVOREVB TAVOREVB 1827335332saar MACH_SAAR SAAR 1828336333at91sam9m10g45ek MACH_AT91SAM9M10G45EK AT91SAM9M10G45EK 1830334334+usb_a9g20 MACH_USB_A9G20 USB_A9G20 1841337335mxlads MACH_MXLADS MXLADS 1851338336linkstation_mini MACH_LINKSTATION_MINI LINKSTATION_MINI 1858339337afeb9260 MACH_AFEB9260 AFEB9260 1859···373369sheevaplug MACH_SHEEVAPLUG SHEEVAPLUG 2097374370avengers_lite MACH_AVENGERS_LITE AVENGERS_LITE 2104375371mx51_babbage MACH_MX51_BABBAGE MX51_BABBAGE 2125372372+tx37 MACH_TX37 TX37 2127376373rd78x00_masa MACH_RD78X00_MASA RD78X00_MASA 2135377374dm355_leopard MACH_DM355_LEOPARD DM355_LEOPARD 2138378375ts219 MACH_TS219 TS219 2139···384379magx_zn5 MACH_MAGX_ZN5 MAGX_ZN5 2162385380btmavb101 MACH_BTMAVB101 BTMAVB101 2172386381btmawb101 MACH_BTMAWB101 BTMAWB101 2173382382+tx25 MACH_TX25 TX25 2177387383omap3_torpedo MACH_OMAP3_TORPEDO OMAP3_TORPEDO 2178388384anw6410 MACH_ANW6410 ANW6410 2183389385imx27_visstrim_m10 MACH_IMX27_VISSTRIM_M10 IMX27_VISSTRIM_M10 2187···429423raumfeld_connector MACH_RAUMFELD_CONNECTOR RAUMFELD_CONNECTOR 2414430424raumfeld_speaker MACH_RAUMFELD_SPEAKER RAUMFELD_SPEAKER 2415431425tnetv107x MACH_TNETV107X TNETV107X 2418426426+mx51_m2id MACH_MX51_M2ID MX51_M2ID 2428432427smdkv210 MACH_SMDKV210 SMDKV210 2456433428omap_zoom3 MACH_OMAP_ZOOM3 OMAP_ZOOM3 2464434429omap_3630sdp MACH_OMAP_3630SDP OMAP_3630SDP 2465···440433ts41x MACH_TS41X TS41X 2502441434phy3250 MACH_PHY3250 PHY3250 2511442435mini6410 MACH_MINI6410 MINI6410 2520436436+tx51 MACH_TX51 TX51 2529443437mx28evk MACH_MX28EVK MX28EVK 2531444438smartq5 MACH_SMARTQ5 SMARTQ5 2534445439davinci_dm6467tevm MACH_DAVINCI_DM6467TEVM DAVINCI_DM6467TEVM 2548446440mxt_td60 MACH_MXT_TD60 MXT_TD60 2550447441riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576448442riot_x37 MACH_RIOT_X37 RIOT_X37 2578443443+pca101 MACH_PCA101 PCA101 2595449444capc7117 MACH_CAPC7117 CAPC7117 2612450445icontrol MACH_ICONTROL ICONTROL 2624446446+gplugd MACH_GPLUGD GPLUGD 2625451447qsd8x50a_st1_5 MACH_QSD8X50A_ST1_5 QSD8X50A_ST1_5 2627452448mx23evk MACH_MX23EVK MX23EVK 2629453449ap4evb MACH_AP4EVB AP4EVB 2630···11231113thales_adc MACH_THALES_ADC THALES_ADC 349211241114ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 349311251115atdgp318 MACH_ATDGP318 ATDGP318 349411161116+smdk4212 MACH_SMDK4212 SMDK4212 363811171117+smdk4412 MACH_SMDK4412 SMDK4412 3765
+16-19
drivers/pcmcia/sa1100_simpad.c
···1515#include <mach/simpad.h>1616#include "sa1100_generic.h"17171818-extern long get_cs3_shadow(void);1919-extern void set_cs3_bit(int value); 2020-extern void clear_cs3_bit(int value);2121-2218static struct pcmcia_irqs irqs[] = {2319 { 1, IRQ_GPIO_CF_CD, "CF_CD" },2420};···2226static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt)2327{24282525- clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);2929+ simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);26302731 skt->socket.pci_irq = IRQ_GPIO_CF_IRQ;2832···3438 soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));35393640 /* Disable CF bus: */3737- //set_cs3_bit(PCMCIA_BUFF_DIS);3838- clear_cs3_bit(PCMCIA_RESET); 4141+ /*simpad_set_cs3_bit(PCMCIA_BUFF_DIS);*/4242+ simpad_clear_cs3_bit(PCMCIA_RESET);3943}40444145static void···4347 struct pcmcia_state *state)4448{4549 unsigned long levels = GPLR;4646- long cs3reg = get_cs3_shadow();5050+ long cs3reg = simpad_get_cs3_ro();47514852 state->detect=((levels & GPIO_CF_CD)==0)?1:0;4953 state->ready=(levels & GPIO_CF_IRQ)?1:0;5050- state->bvd1=1; /* Not available on Simpad. */5151- state->bvd2=1; /* Not available on Simpad. */5454+ state->bvd1 = 1; /* Might be cs3reg & PCMCIA_BVD1 */5555+ state->bvd2 = 1; /* Might be cs3reg & PCMCIA_BVD2 */5256 state->wrprot=0; /* Not available on Simpad. */5353-5454- if((cs3reg & 0x0c) == 0x0c) {5757+5858+ if ((cs3reg & (PCMCIA_VS1|PCMCIA_VS2)) ==5959+ (PCMCIA_VS1|PCMCIA_VS2)) {5560 state->vs_3v=0;5661 state->vs_Xv=0;5762 } else {···7275 /* Murphy: see table of MIC2562a-1 */7376 switch (state->Vcc) {7477 case 0:7575- clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);7878+ simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);7679 break;77807881 case 33: 7979- clear_cs3_bit(VCC_3V_EN|EN1);8080- set_cs3_bit(VCC_5V_EN|EN0);8282+ simpad_clear_cs3_bit(VCC_3V_EN|EN1);8383+ simpad_set_cs3_bit(VCC_5V_EN|EN0);8184 break;82858386 case 50:8484- clear_cs3_bit(VCC_5V_EN|EN1);8585- set_cs3_bit(VCC_3V_EN|EN0);8787+ simpad_clear_cs3_bit(VCC_5V_EN|EN1);8888+ simpad_set_cs3_bit(VCC_3V_EN|EN0);8689 break;87908891 default:8992 printk(KERN_ERR "%s(): unrecognized Vcc %u\n",9093 __func__, state->Vcc);9191- clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);9494+ simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);9295 local_irq_restore(flags);9396 return -1;9497 }···107110static void simpad_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)108111{109112 soc_pcmcia_disable_irqs(skt, irqs, ARRAY_SIZE(irqs));110110- set_cs3_bit(PCMCIA_RESET);113113+ simpad_set_cs3_bit(PCMCIA_RESET);111114}112115113116static struct pcmcia_low_level simpad_pcmcia_ops = {