Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
ARM: 6482/2: Fix find_next_zero_bit and related assembly
ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context
ARM: avoid annoying <4>'s in printk output
SCSI: arm fas216: fix missing ';'
ARM: avoid marking decompressor .stack section as having contents
ARM: 6489/1: thumb2: fix incorrect optimisation in usracc
ARM: 6488/1: nomadik: prevent sched_clock() wraparound
ARM: 6484/1: fix compile warning in mm/init.c
ARM: 6473/1: Small update to ux500 specific L2 cache code
ARM: improve compiler's ability to optimize page tables
mx25: fix spi device registration typo
ARM i.MX27 eukrea: Fix compilation
ARM i.MX spi: fix compilation for i.MX21
ARM i.MX pcm037 eet: compile fixes
ARM i.MX: sdma is merged, so remove #ifdef SDMA_IS_MERGED
ARM mx3fb: check for DMA engine type
mach-pcm037_eet: Fix section mismatch for eet_init_devices()

+124 -54
+1 -1
arch/arm/boot/compressed/head.S
··· 1084 reloc_end: 1085 1086 .align 1087 - .section ".stack", "w" 1088 user_stack: .space 4096 1089 user_stack_end:
··· 1084 reloc_end: 1085 1086 .align 1087 + .section ".stack", "aw", %nobits 1088 user_stack: .space 4096 1089 user_stack_end:
+1 -1
arch/arm/boot/compressed/vmlinux.lds.in
··· 57 .bss : { *(.bss) } 58 _end = .; 59 60 - .stack (NOLOAD) : { *(.stack) } 61 62 .stab 0 : { *(.stab) } 63 .stabstr 0 : { *(.stabstr) }
··· 57 .bss : { *(.bss) } 58 _end = .; 59 60 + .stack : { *(.stack) } 61 62 .stab 0 : { *(.stab) } 63 .stabstr 0 : { *(.stabstr) }
+1 -1
arch/arm/include/asm/assembler.h
··· 238 @ Slightly optimised to avoid incrementing the pointer twice 239 usraccoff \instr, \reg, \ptr, \inc, 0, \cond, \abort 240 .if \rept == 2 241 - usraccoff \instr, \reg, \ptr, \inc, 4, \cond, \abort 242 .endif 243 244 add\cond \ptr, #\rept * \inc
··· 238 @ Slightly optimised to avoid incrementing the pointer twice 239 usraccoff \instr, \reg, \ptr, \inc, 0, \cond, \abort 240 .if \rept == 2 241 + usraccoff \instr, \reg, \ptr, \inc, \inc, \cond, \abort 242 .endif 243 244 add\cond \ptr, #\rept * \inc
+4
arch/arm/include/asm/mmu.h
··· 13 14 #ifdef CONFIG_CPU_HAS_ASID 15 #define ASID(mm) ((mm)->context.id & 255) 16 #else 17 #define ASID(mm) (0) 18 #endif
··· 13 14 #ifdef CONFIG_CPU_HAS_ASID 15 #define ASID(mm) ((mm)->context.id & 255) 16 + 17 + /* init_mm.context.id_lock should be initialized. */ 18 + #define INIT_MM_CONTEXT(name) \ 19 + .context.id_lock = __SPIN_LOCK_UNLOCKED(name.context.id_lock), 20 #else 21 #define ASID(mm) (0) 22 #endif
+3
arch/arm/include/asm/pgtable.h
··· 374 375 #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd))) 376 377 /* 378 * Conversion functions: convert a page and protection to a page entry, 379 * and a page entry and page directory to the page they refer to.
··· 374 375 #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd))) 376 377 + /* we don't need complex calculations here as the pmd is folded into the pgd */ 378 + #define pmd_addr_end(addr,end) (end) 379 + 380 /* 381 * Conversion functions: convert a page and protection to a page entry, 382 * and a page entry and page directory to the page they refer to.
+4 -2
arch/arm/lib/findbit.S
··· 174 */ 175 .L_found: 176 #if __LINUX_ARM_ARCH__ >= 5 177 - rsb r1, r3, #0 178 - and r3, r3, r1 179 clz r3, r3 180 rsb r3, r3, #31 181 add r0, r2, r3 ··· 190 addeq r2, r2, #1 191 mov r0, r2 192 #endif 193 mov pc, lr 194
··· 174 */ 175 .L_found: 176 #if __LINUX_ARM_ARCH__ >= 5 177 + rsb r0, r3, #0 178 + and r3, r3, r0 179 clz r3, r3 180 rsb r3, r3, #31 181 add r0, r2, r3 ··· 190 addeq r2, r2, #1 191 mov r0, r2 192 #endif 193 + cmp r1, r0 @ Clamp to maxbit 194 + movlo r0, r1 195 mov pc, lr 196
+1 -1
arch/arm/mach-aaec2000/include/mach/vmalloc.h
··· 11 #ifndef __ASM_ARCH_VMALLOC_H 12 #define __ASM_ARCH_VMALLOC_H 13 14 - #define VMALLOC_END 0xd0000000 15 16 #endif /* __ASM_ARCH_VMALLOC_H */
··· 11 #ifndef __ASM_ARCH_VMALLOC_H 12 #define __ASM_ARCH_VMALLOC_H 13 14 + #define VMALLOC_END 0xd0000000UL 15 16 #endif /* __ASM_ARCH_VMALLOC_H */
+1 -1
arch/arm/mach-bcmring/include/mach/vmalloc.h
··· 22 * 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles 23 * larger physical memory designs better. 24 */ 25 - #define VMALLOC_END 0xf0000000
··· 22 * 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles 23 * larger physical memory designs better. 24 */ 25 + #define VMALLOC_END 0xf0000000UL
+1 -1
arch/arm/mach-clps711x/include/mach/vmalloc.h
··· 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 - #define VMALLOC_END 0xd0000000
··· 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 + #define VMALLOC_END 0xd0000000UL
+1 -1
arch/arm/mach-ebsa110/include/mach/vmalloc.h
··· 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 */ 10 - #define VMALLOC_END 0xdf000000
··· 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 */ 10 + #define VMALLOC_END 0xdf000000UL
+1 -1
arch/arm/mach-footbridge/include/mach/vmalloc.h
··· 7 */ 8 9 10 - #define VMALLOC_END 0xf0000000
··· 7 */ 8 9 10 + #define VMALLOC_END 0xf0000000UL
+1 -1
arch/arm/mach-h720x/include/mach/vmalloc.h
··· 5 #ifndef __ARCH_ARM_VMALLOC_H 6 #define __ARCH_ARM_VMALLOC_H 7 8 - #define VMALLOC_END 0xd0000000 9 10 #endif
··· 5 #ifndef __ARCH_ARM_VMALLOC_H 6 #define __ARCH_ARM_VMALLOC_H 7 8 + #define VMALLOC_END 0xd0000000UL 9 10 #endif
-6
arch/arm/mach-imx/eukrea_mbimx27-baseboard.c
··· 250 .flags = IMXUART_HAVE_RTSCTS, 251 }; 252 253 - #if defined(CONFIG_TOUCHSCREEN_ADS7846) \ 254 - || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 255 - 256 #define ADS7846_PENDOWN (GPIO_PORTD | 25) 257 258 static void ads7846_dev_init(void) ··· 270 .get_pendown_state = ads7846_get_pendown_state, 271 .keep_vref_on = 1, 272 }; 273 - #endif 274 275 - #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) 276 static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = { 277 [0] = { 278 .modalias = "ads7846", ··· 289 .chipselect = eukrea_mbimx27_spi_cs, 290 .num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs), 291 }; 292 - #endif 293 294 static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = { 295 {
··· 250 .flags = IMXUART_HAVE_RTSCTS, 251 }; 252 253 #define ADS7846_PENDOWN (GPIO_PORTD | 25) 254 255 static void ads7846_dev_init(void) ··· 273 .get_pendown_state = ads7846_get_pendown_state, 274 .keep_vref_on = 1, 275 }; 276 277 static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = { 278 [0] = { 279 .modalias = "ads7846", ··· 294 .chipselect = eukrea_mbimx27_spi_cs, 295 .num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs), 296 }; 297 298 static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = { 299 {
+1 -1
arch/arm/mach-integrator/include/mach/vmalloc.h
··· 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 - #define VMALLOC_END 0xd0000000
··· 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 + #define VMALLOC_END 0xd0000000UL
+1 -1
arch/arm/mach-msm/include/mach/vmalloc.h
··· 16 #ifndef __ASM_ARCH_MSM_VMALLOC_H 17 #define __ASM_ARCH_MSM_VMALLOC_H 18 19 - #define VMALLOC_END 0xd0000000 20 21 #endif 22
··· 16 #ifndef __ASM_ARCH_MSM_VMALLOC_H 17 #define __ASM_ARCH_MSM_VMALLOC_H 18 19 + #define VMALLOC_END 0xd0000000UL 20 21 #endif 22
+2 -2
arch/arm/mach-mx25/devices-imx25.h
··· 42 #define imx25_add_mxc_nand(pdata) \ 43 imx_add_mxc_nand(&imx25_mxc_nand_data, pdata) 44 45 - extern const struct imx_spi_imx_data imx25_spi_imx_data[] __initconst; 46 #define imx25_add_spi_imx(id, pdata) \ 47 - imx_add_spi_imx(&imx25_spi_imx_data[id], pdata) 48 #define imx25_add_spi_imx0(pdata) imx25_add_spi_imx(0, pdata) 49 #define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata) 50 #define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata)
··· 42 #define imx25_add_mxc_nand(pdata) \ 43 imx_add_mxc_nand(&imx25_mxc_nand_data, pdata) 44 45 + extern const struct imx_spi_imx_data imx25_cspi_data[] __initconst; 46 #define imx25_add_spi_imx(id, pdata) \ 47 + imx_add_spi_imx(&imx25_cspi_data[id], pdata) 48 #define imx25_add_spi_imx0(pdata) imx25_add_spi_imx(0, pdata) 49 #define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata) 50 #define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata)
+2 -3
arch/arm/mach-mx3/mach-pcm037_eet.c
··· 14 15 #include <mach/common.h> 16 #include <mach/iomux-mx3.h> 17 18 #include <asm/mach-types.h> 19 ··· 60 }; 61 62 /* Platform Data for MXC CSPI */ 63 - #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) 64 static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; 65 66 static const struct spi_imx_master pcm037_spi1_pdata __initconst = { 67 .chipselect = pcm037_spi1_cs, 68 .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs), 69 }; 70 - #endif 71 72 /* GPIO-keys input device */ 73 static struct gpio_keys_button pcm037_gpio_keys[] = { ··· 170 }, 171 }; 172 173 - static int eet_init_devices(void) 174 { 175 if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET) 176 return 0;
··· 14 15 #include <mach/common.h> 16 #include <mach/iomux-mx3.h> 17 + #include <mach/spi.h> 18 19 #include <asm/mach-types.h> 20 ··· 59 }; 60 61 /* Platform Data for MXC CSPI */ 62 static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; 63 64 static const struct spi_imx_master pcm037_spi1_pdata __initconst = { 65 .chipselect = pcm037_spi1_cs, 66 .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs), 67 }; 68 69 /* GPIO-keys input device */ 70 static struct gpio_keys_button pcm037_gpio_keys[] = { ··· 171 }, 172 }; 173 174 + static int __init eet_init_devices(void) 175 { 176 if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET) 177 return 0;
+1 -1
arch/arm/mach-netx/include/mach/vmalloc.h
··· 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 - #define VMALLOC_END 0xd0000000
··· 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 + #define VMALLOC_END 0xd0000000UL
+1 -1
arch/arm/mach-omap1/include/mach/vmalloc.h
··· 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 - #define VMALLOC_END 0xd8000000
··· 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 + #define VMALLOC_END 0xd8000000UL
+1 -1
arch/arm/mach-omap2/include/mach/vmalloc.h
··· 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 - #define VMALLOC_END 0xf8000000
··· 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 */ 20 + #define VMALLOC_END 0xf8000000UL
+1 -1
arch/arm/mach-pnx4008/include/mach/vmalloc.h
··· 17 * The vmalloc() routines leaves a hole of 4kB between each vmalloced 18 * area for the same reason. ;) 19 */ 20 - #define VMALLOC_END 0xd0000000
··· 17 * The vmalloc() routines leaves a hole of 4kB between each vmalloced 18 * area for the same reason. ;) 19 */ 20 + #define VMALLOC_END 0xd0000000UL
+1 -1
arch/arm/mach-rpc/include/mach/vmalloc.h
··· 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 */ 10 - #define VMALLOC_END 0xdc000000
··· 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 */ 10 + #define VMALLOC_END 0xdc000000UL
+1 -1
arch/arm/mach-shark/include/mach/vmalloc.h
··· 1 /* 2 * arch/arm/mach-shark/include/mach/vmalloc.h 3 */ 4 - #define VMALLOC_END 0xd0000000
··· 1 /* 2 * arch/arm/mach-shark/include/mach/vmalloc.h 3 */ 4 + #define VMALLOC_END 0xd0000000UL
+3 -3
arch/arm/mach-ux500/cpu.c
··· 75 static inline void ux500_cache_wait(void __iomem *reg, unsigned long mask) 76 { 77 /* wait for the operation to complete */ 78 - while (readl(reg) & mask) 79 ; 80 } 81 82 static inline void ux500_cache_sync(void) 83 { 84 void __iomem *base = __io_address(UX500_L2CC_BASE); 85 - writel(0, base + L2X0_CACHE_SYNC); 86 ux500_cache_wait(base + L2X0_CACHE_SYNC, 1); 87 } 88 ··· 107 uint32_t l2x0_way_mask = (1<<16) - 1; /* Bitmask of active ways */ 108 109 /* invalidate all ways */ 110 - writel(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); 111 ux500_cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); 112 ux500_cache_sync(); 113 }
··· 75 static inline void ux500_cache_wait(void __iomem *reg, unsigned long mask) 76 { 77 /* wait for the operation to complete */ 78 + while (readl_relaxed(reg) & mask) 79 ; 80 } 81 82 static inline void ux500_cache_sync(void) 83 { 84 void __iomem *base = __io_address(UX500_L2CC_BASE); 85 + writel_relaxed(0, base + L2X0_CACHE_SYNC); 86 ux500_cache_wait(base + L2X0_CACHE_SYNC, 1); 87 } 88 ··· 107 uint32_t l2x0_way_mask = (1<<16) - 1; /* Bitmask of active ways */ 108 109 /* invalidate all ways */ 110 + writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); 111 ux500_cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); 112 ux500_cache_sync(); 113 }
+1 -1
arch/arm/mach-versatile/include/mach/vmalloc.h
··· 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */ 21 - #define VMALLOC_END 0xd8000000
··· 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */ 21 + #define VMALLOC_END 0xd8000000UL
+2 -2
arch/arm/mm/ioremap.c
··· 206 */ 207 if (pfn_valid(pfn)) { 208 printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory. This leads\n" 209 - KERN_WARNING "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n" 210 - KERN_WARNING "will fail in the next kernel release. Please fix your driver.\n"); 211 WARN_ON(1); 212 } 213
··· 206 */ 207 if (pfn_valid(pfn)) { 208 printk(KERN_WARNING "BUG: Your driver calls ioremap() on system memory. This leads\n" 209 + "to architecturally unpredictable behaviour on ARMv6+, and ioremap()\n" 210 + "will fail in the next kernel release. Please fix your driver.\n"); 211 WARN_ON(1); 212 } 213
-8
arch/arm/plat-mxc/devices/platform-imx-dma.c
··· 12 13 #include <mach/hardware.h> 14 #include <mach/devices-common.h> 15 - #ifdef SDMA_IS_MERGED 16 #include <mach/sdma.h> 17 - #else 18 - struct sdma_platform_data { 19 - int sdma_version; 20 - char *cpu_name; 21 - int to_version; 22 - }; 23 - #endif 24 25 struct imx_imx_sdma_data { 26 resource_size_t iobase;
··· 12 13 #include <mach/hardware.h> 14 #include <mach/devices-common.h> 15 #include <mach/sdma.h> 16 17 struct imx_imx_sdma_data { 18 resource_size_t iobase;
+1
arch/arm/plat-mxc/devices/platform-spi_imx.c
··· 27 imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K) 28 imx21_cspi_data_entry(0, 1), 29 imx21_cspi_data_entry(1, 2), 30 #endif 31 32 #ifdef CONFIG_ARCH_MX25
··· 27 imx_spi_imx_data_entry(MX21, CSPI, "imx21-cspi", _id, _hwid, SZ_4K) 28 imx21_cspi_data_entry(0, 1), 29 imx21_cspi_data_entry(1, 2), 30 + }; 31 #endif 32 33 #ifdef CONFIG_ARCH_MX25
+80 -9
arch/arm/plat-nomadik/timer.c
··· 3 * 4 * Copyright (C) 2008 STMicroelectronics 5 * Copyright (C) 2010 Alessandro Rubini 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2, as ··· 17 #include <linux/clk.h> 18 #include <linux/jiffies.h> 19 #include <linux/err.h> 20 #include <asm/mach/time.h> 21 22 #include <plat/mtu.h> 23 24 - void __iomem *mtu_base; /* ssigned by machine code */ 25 26 /* 27 * Kernel assumes that sched_clock can be called early ··· 51 /* 52 * Override the global weak sched_clock symbol with this 53 * local implementation which uses the clocksource to get some 54 - * better resolution when scheduling the kernel. We accept that 55 - * this wraps around for now, since it is just a relative time 56 - * stamp. (Inspired by OMAP implementation.) 57 */ 58 unsigned long long notrace sched_clock(void) 59 { 60 - return clocksource_cyc2ns(nmdk_clksrc.read( 61 - &nmdk_clksrc), 62 - nmdk_clksrc.mult, 63 - nmdk_clksrc.shift); 64 } 65 66 /* Clockevent device: use one-shot mode */ ··· 230 writel(0, mtu_base + MTU_BGLR(0)); 231 writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0)); 232 233 - /* Now the scheduling clock is ready */ 234 nmdk_clksrc.read = nmdk_read_timer; 235 236 if (clocksource_register(&nmdk_clksrc)) 237 pr_err("timer: failed to initialize clock source %s\n", 238 nmdk_clksrc.name); 239 240 /* Timer 1 is used for events */ 241
··· 3 * 4 * Copyright (C) 2008 STMicroelectronics 5 * Copyright (C) 2010 Alessandro Rubini 6 + * Copyright (C) 2010 Linus Walleij for ST-Ericsson 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License version 2, as ··· 16 #include <linux/clk.h> 17 #include <linux/jiffies.h> 18 #include <linux/err.h> 19 + #include <linux/cnt32_to_63.h> 20 + #include <linux/timer.h> 21 #include <asm/mach/time.h> 22 23 #include <plat/mtu.h> 24 25 + void __iomem *mtu_base; /* Assigned by machine code */ 26 27 /* 28 * Kernel assumes that sched_clock can be called early ··· 48 /* 49 * Override the global weak sched_clock symbol with this 50 * local implementation which uses the clocksource to get some 51 + * better resolution when scheduling the kernel. 52 + * 53 + * Because the hardware timer period may be quite short 54 + * (32.3 secs on the 133 MHz MTU timer selection on ux500) 55 + * and because cnt32_to_63() needs to be called at least once per 56 + * half period to work properly, a kernel keepwarm() timer is set up 57 + * to ensure this requirement is always met. 58 + * 59 + * Also the sched_clock timer will wrap around at some point, 60 + * here we set it to run continously for a year. 61 */ 62 + #define SCHED_CLOCK_MIN_WRAP 3600*24*365 63 + static struct timer_list cnt32_to_63_keepwarm_timer; 64 + static u32 sched_mult; 65 + static u32 sched_shift; 66 + 67 unsigned long long notrace sched_clock(void) 68 { 69 + u64 cycles; 70 + 71 + if (unlikely(!mtu_base)) 72 + return 0; 73 + 74 + cycles = cnt32_to_63(-readl(mtu_base + MTU_VAL(0))); 75 + /* 76 + * sched_mult is guaranteed to be even so will 77 + * shift out bit 63 78 + */ 79 + return (cycles * sched_mult) >> sched_shift; 80 + } 81 + 82 + /* Just kick sched_clock every so often */ 83 + static void cnt32_to_63_keepwarm(unsigned long data) 84 + { 85 + mod_timer(&cnt32_to_63_keepwarm_timer, round_jiffies(jiffies + data)); 86 + (void) sched_clock(); 87 + } 88 + 89 + /* 90 + * Set up a timer to keep sched_clock():s 32_to_63 algorithm warm 91 + * once in half a 32bit timer wrap interval. 92 + */ 93 + static void __init nmdk_sched_clock_init(unsigned long rate) 94 + { 95 + u32 v; 96 + unsigned long delta; 97 + u64 days; 98 + 99 + /* Find the apropriate mult and shift factors */ 100 + clocks_calc_mult_shift(&sched_mult, &sched_shift, 101 + rate, NSEC_PER_SEC, SCHED_CLOCK_MIN_WRAP); 102 + /* We need to multiply by an even number to get rid of bit 63 */ 103 + if (sched_mult & 1) 104 + sched_mult++; 105 + 106 + /* Let's see what we get, take max counter and scale it */ 107 + days = (0xFFFFFFFFFFFFFFFFLLU * sched_mult) >> sched_shift; 108 + do_div(days, NSEC_PER_SEC); 109 + do_div(days, (3600*24)); 110 + 111 + pr_info("sched_clock: using %d bits @ %lu Hz wrap in %lu days\n", 112 + (64 - sched_shift), rate, (unsigned long) days); 113 + 114 + /* 115 + * Program a timer to kick us at half 32bit wraparound 116 + * Formula: seconds per wrap = (2^32) / f 117 + */ 118 + v = 0xFFFFFFFFUL / rate; 119 + /* We want half of the wrap time to keep cnt32_to_63 warm */ 120 + v /= 2; 121 + pr_debug("sched_clock: prescaled timer rate: %lu Hz, " 122 + "initialize keepwarm timer every %d seconds\n", rate, v); 123 + /* Convert seconds to jiffies */ 124 + delta = msecs_to_jiffies(v*1000); 125 + setup_timer(&cnt32_to_63_keepwarm_timer, cnt32_to_63_keepwarm, delta); 126 + mod_timer(&cnt32_to_63_keepwarm_timer, round_jiffies(jiffies + delta)); 127 } 128 129 /* Clockevent device: use one-shot mode */ ··· 161 writel(0, mtu_base + MTU_BGLR(0)); 162 writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0)); 163 164 + /* Now the clock source is ready */ 165 nmdk_clksrc.read = nmdk_read_timer; 166 167 if (clocksource_register(&nmdk_clksrc)) 168 pr_err("timer: failed to initialize clock source %s\n", 169 nmdk_clksrc.name); 170 + 171 + nmdk_sched_clock_init(rate); 172 173 /* Timer 1 is used for events */ 174
+1 -1
drivers/scsi/arm/fas216.h
··· 345 * : SCpnt - Command to queue 346 * Returns : 0 - success, else error 347 */ 348 - extern int fas216_noqueue_command(struct Scsi_Host *, struct scsi_cmnd *) 349 350 /* Function: irqreturn_t fas216_intr (FAS216_Info *info) 351 * Purpose : handle interrupts from the interface to progress a command
··· 345 * : SCpnt - Command to queue 346 * Returns : 0 - success, else error 347 */ 348 + extern int fas216_noqueue_command(struct Scsi_Host *, struct scsi_cmnd *); 349 350 /* Function: irqreturn_t fas216_intr (FAS216_Info *info) 351 * Purpose : handle interrupts from the interface to progress a command
+4
drivers/video/mx3fb.c
··· 27 #include <linux/clk.h> 28 #include <linux/mutex.h> 29 30 #include <mach/hardware.h> 31 #include <mach/ipu.h> 32 #include <mach/mx3fb.h> ··· 1420 struct dma_chan_request *rq = arg; 1421 struct device *dev; 1422 struct mx3fb_platform_data *mx3fb_pdata; 1423 1424 if (!rq) 1425 return false;
··· 27 #include <linux/clk.h> 28 #include <linux/mutex.h> 29 30 + #include <mach/dma.h> 31 #include <mach/hardware.h> 32 #include <mach/ipu.h> 33 #include <mach/mx3fb.h> ··· 1419 struct dma_chan_request *rq = arg; 1420 struct device *dev; 1421 struct mx3fb_platform_data *mx3fb_pdata; 1422 + 1423 + if (!imx_dma_is_ipu(chan)) 1424 + return false; 1425 1426 if (!rq) 1427 return false;