diff options
| -rw-r--r-- | arch/arm/Kconfig | 3 | ||||
| -rw-r--r-- | arch/arm/include/asm/mach/udc_pxa2xx.h | 4 | ||||
| -rw-r--r-- | arch/arm/include/asm/processor.h | 4 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/mioa701.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/z2.c | 26 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_pb1176.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_pb11mp.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_pba8.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-vexpress/ct-ca9x4.c | 3 | ||||
| -rw-r--r-- | arch/arm/mm/Kconfig | 19 | ||||
| -rw-r--r-- | arch/arm/mm/cache-v6.S | 18 | ||||
| -rw-r--r-- | arch/arm/mm/dma-mapping.c | 18 | ||||
| -rw-r--r-- | arch/arm/plat-pxa/Makefile | 3 | ||||
| -rw-r--r-- | drivers/power/z2_battery.c | 12 |
16 files changed, 78 insertions, 49 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1f254bd6c937..98922f7d2d12 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -955,7 +955,8 @@ config XSCALE_PMU | |||
| 955 | default y | 955 | default y |
| 956 | 956 | ||
| 957 | config CPU_HAS_PMU | 957 | config CPU_HAS_PMU |
| 958 | depends on CPU_V6 || CPU_V7 || XSCALE_PMU | 958 | depends on (CPU_V6 || CPU_V7 || XSCALE_PMU) && \ |
| 959 | (!ARCH_OMAP3 || OMAP3_EMU) | ||
| 959 | default y | 960 | default y |
| 960 | bool | 961 | bool |
| 961 | 962 | ||
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h index f3eabf1ecec3..833306ee9e7f 100644 --- a/arch/arm/include/asm/mach/udc_pxa2xx.h +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h | |||
| @@ -21,8 +21,8 @@ struct pxa2xx_udc_mach_info { | |||
| 21 | * here. Note that sometimes the signals go through inverters... | 21 | * here. Note that sometimes the signals go through inverters... |
| 22 | */ | 22 | */ |
| 23 | bool gpio_vbus_inverted; | 23 | bool gpio_vbus_inverted; |
| 24 | u16 gpio_vbus; /* high == vbus present */ | 24 | int gpio_vbus; /* high == vbus present */ |
| 25 | bool gpio_pullup_inverted; | 25 | bool gpio_pullup_inverted; |
| 26 | u16 gpio_pullup; /* high == pullup activated */ | 26 | int gpio_pullup; /* high == pullup activated */ |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 6a89567ffc5b..7bed3daf83b8 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
| @@ -91,7 +91,11 @@ extern void release_thread(struct task_struct *); | |||
| 91 | 91 | ||
| 92 | unsigned long get_wchan(struct task_struct *p); | 92 | unsigned long get_wchan(struct task_struct *p); |
| 93 | 93 | ||
| 94 | #if __LINUX_ARM_ARCH__ == 6 | ||
| 95 | #define cpu_relax() smp_mb() | ||
| 96 | #else | ||
| 94 | #define cpu_relax() barrier() | 97 | #define cpu_relax() barrier() |
| 98 | #endif | ||
| 95 | 99 | ||
| 96 | /* | 100 | /* |
| 97 | * Create a new kernel thread | 101 | * Create a new kernel thread |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index d60db87dde08..fa6a708b4099 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
| @@ -697,7 +697,7 @@ static struct i2c_board_info __initdata mioa701_pi2c_devices[] = { | |||
| 697 | }; | 697 | }; |
| 698 | 698 | ||
| 699 | /* Board I2C devices. */ | 699 | /* Board I2C devices. */ |
| 700 | static struct i2c_board_info __initdata mioa701_i2c_devices[] = { | 700 | static struct i2c_board_info mioa701_i2c_devices[] = { |
| 701 | { | 701 | { |
| 702 | I2C_BOARD_INFO("mt9m111", 0x5d), | 702 | I2C_BOARD_INFO("mt9m111", 0x5d), |
| 703 | }, | 703 | }, |
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index f5d1ae3db3a4..d303c6929d32 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
| @@ -3,8 +3,9 @@ | |||
| 3 | * | 3 | * |
| 4 | * Support for the Zipit Z2 Handheld device. | 4 | * Support for the Zipit Z2 Handheld device. |
| 5 | * | 5 | * |
| 6 | * Author: Ken McGuire | 6 | * Copyright (C) 2009-2010 Marek Vasut <marek.vasut@gmail.com> |
| 7 | * Created: Jan 25, 2009 | 7 | * |
| 8 | * Based on research and code by: Ken McGuire | ||
| 8 | * Based on mainstone.c as modified for the Zipit Z2. | 9 | * Based on mainstone.c as modified for the Zipit Z2. |
| 9 | * | 10 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
| @@ -157,21 +158,14 @@ static struct mtd_partition z2_flash_parts[] = { | |||
| 157 | { | 158 | { |
| 158 | .name = "U-Boot Bootloader", | 159 | .name = "U-Boot Bootloader", |
| 159 | .offset = 0x0, | 160 | .offset = 0x0, |
| 160 | .size = 0x20000, | 161 | .size = 0x40000, |
| 161 | }, | 162 | }, { |
| 162 | { | ||
| 163 | .name = "Linux Kernel", | ||
| 164 | .offset = 0x20000, | ||
| 165 | .size = 0x220000, | ||
| 166 | }, | ||
| 167 | { | ||
| 168 | .name = "Filesystem", | ||
| 169 | .offset = 0x240000, | ||
| 170 | .size = 0x5b0000, | ||
| 171 | }, | ||
| 172 | { | ||
| 173 | .name = "U-Boot Environment", | 163 | .name = "U-Boot Environment", |
| 174 | .offset = 0x7f0000, | 164 | .offset = 0x40000, |
| 165 | .size = 0x60000, | ||
| 166 | }, { | ||
| 167 | .name = "Flash", | ||
| 168 | .offset = 0x60000, | ||
| 175 | .size = MTDPART_SIZ_FULL, | 169 | .size = MTDPART_SIZ_FULL, |
| 176 | }, | 170 | }, |
| 177 | }; | 171 | }; |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 422ccd70d5f5..4425018fab82 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
| 33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
| 34 | #include <asm/pmu.h> | 34 | #include <asm/pmu.h> |
| 35 | #include <asm/pgtable.h> | ||
| 35 | #include <asm/hardware/gic.h> | 36 | #include <asm/hardware/gic.h> |
| 36 | #include <asm/hardware/cache-l2x0.h> | 37 | #include <asm/hardware/cache-l2x0.h> |
| 37 | #include <asm/localtimer.h> | 38 | #include <asm/localtimer.h> |
| @@ -457,7 +458,7 @@ static void __init realview_eb_init(void) | |||
| 457 | 458 | ||
| 458 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | 459 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") |
| 459 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 460 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 460 | .phys_io = REALVIEW_EB_UART0_BASE, | 461 | .phys_io = REALVIEW_EB_UART0_BASE & SECTION_MASK, |
| 461 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, | 462 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, |
| 462 | .boot_params = PHYS_OFFSET + 0x00000100, | 463 | .boot_params = PHYS_OFFSET + 0x00000100, |
| 463 | .fixup = realview_fixup, | 464 | .fixup = realview_fixup, |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 96568ebfa2bb..099a1f125cf8 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
| 33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
| 34 | #include <asm/pmu.h> | 34 | #include <asm/pmu.h> |
| 35 | #include <asm/pgtable.h> | ||
| 35 | #include <asm/hardware/gic.h> | 36 | #include <asm/hardware/gic.h> |
| 36 | #include <asm/hardware/cache-l2x0.h> | 37 | #include <asm/hardware/cache-l2x0.h> |
| 37 | 38 | ||
| @@ -351,7 +352,7 @@ static void __init realview_pb1176_init(void) | |||
| 351 | 352 | ||
| 352 | MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") | 353 | MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") |
| 353 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 354 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 354 | .phys_io = REALVIEW_PB1176_UART0_BASE, | 355 | .phys_io = REALVIEW_PB1176_UART0_BASE & SECTION_MASK, |
| 355 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, | 356 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, |
| 356 | .boot_params = PHYS_OFFSET + 0x00000100, | 357 | .boot_params = PHYS_OFFSET + 0x00000100, |
| 357 | .fixup = realview_pb1176_fixup, | 358 | .fixup = realview_pb1176_fixup, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 7fbefbbebaf0..0e07a5ccb75f 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
| 33 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
| 34 | #include <asm/pmu.h> | 34 | #include <asm/pmu.h> |
| 35 | #include <asm/pgtable.h> | ||
| 35 | #include <asm/hardware/gic.h> | 36 | #include <asm/hardware/gic.h> |
| 36 | #include <asm/hardware/cache-l2x0.h> | 37 | #include <asm/hardware/cache-l2x0.h> |
| 37 | #include <asm/localtimer.h> | 38 | #include <asm/localtimer.h> |
| @@ -373,7 +374,7 @@ static void __init realview_pb11mp_init(void) | |||
| 373 | 374 | ||
| 374 | MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") | 375 | MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") |
| 375 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 376 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 376 | .phys_io = REALVIEW_PB11MP_UART0_BASE, | 377 | .phys_io = REALVIEW_PB11MP_UART0_BASE & SECTION_MASK, |
| 377 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, | 378 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, |
| 378 | .boot_params = PHYS_OFFSET + 0x00000100, | 379 | .boot_params = PHYS_OFFSET + 0x00000100, |
| 379 | .fixup = realview_fixup, | 380 | .fixup = realview_fixup, |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index d3c113b3dfce..ac2f06f1ca50 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <asm/leds.h> | 31 | #include <asm/leds.h> |
| 32 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
| 33 | #include <asm/pmu.h> | 33 | #include <asm/pmu.h> |
| 34 | #include <asm/pgtable.h> | ||
| 34 | #include <asm/hardware/gic.h> | 35 | #include <asm/hardware/gic.h> |
| 35 | 36 | ||
| 36 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
| @@ -323,7 +324,7 @@ static void __init realview_pba8_init(void) | |||
| 323 | 324 | ||
| 324 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | 325 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") |
| 325 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 326 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 326 | .phys_io = REALVIEW_PBA8_UART0_BASE, | 327 | .phys_io = REALVIEW_PBA8_UART0_BASE & SECTION_MASK, |
| 327 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, | 328 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, |
| 328 | .boot_params = PHYS_OFFSET + 0x00000100, | 329 | .boot_params = PHYS_OFFSET + 0x00000100, |
| 329 | .fixup = realview_fixup, | 330 | .fixup = realview_fixup, |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index a235ba30996b..08fd683adc4c 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
| 32 | #include <asm/pmu.h> | 32 | #include <asm/pmu.h> |
| 33 | #include <asm/smp_twd.h> | 33 | #include <asm/smp_twd.h> |
| 34 | #include <asm/pgtable.h> | ||
| 34 | #include <asm/hardware/gic.h> | 35 | #include <asm/hardware/gic.h> |
| 35 | #include <asm/hardware/cache-l2x0.h> | 36 | #include <asm/hardware/cache-l2x0.h> |
| 36 | 37 | ||
| @@ -409,7 +410,7 @@ static void __init realview_pbx_init(void) | |||
| 409 | 410 | ||
| 410 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") | 411 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") |
| 411 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 412 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
| 412 | .phys_io = REALVIEW_PBX_UART0_BASE, | 413 | .phys_io = REALVIEW_PBX_UART0_BASE & SECTION_MASK, |
| 413 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, | 414 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, |
| 414 | .boot_params = PHYS_OFFSET + 0x00000100, | 415 | .boot_params = PHYS_OFFSET + 0x00000100, |
| 415 | .fixup = realview_pbx_fixup, | 416 | .fixup = realview_pbx_fixup, |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index 9b11eedba65f..6353459bb567 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include <linux/amba/clcd.h> | 10 | #include <linux/amba/clcd.h> |
| 11 | 11 | ||
| 12 | #include <asm/clkdev.h> | 12 | #include <asm/clkdev.h> |
| 13 | #include <asm/pgtable.h> | ||
| 13 | #include <asm/hardware/arm_timer.h> | 14 | #include <asm/hardware/arm_timer.h> |
| 14 | #include <asm/hardware/cache-l2x0.h> | 15 | #include <asm/hardware/cache-l2x0.h> |
| 15 | #include <asm/hardware/gic.h> | 16 | #include <asm/hardware/gic.h> |
| @@ -236,7 +237,7 @@ static void ct_ca9x4_init(void) | |||
| 236 | } | 237 | } |
| 237 | 238 | ||
| 238 | MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") | 239 | MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") |
| 239 | .phys_io = V2M_UART0, | 240 | .phys_io = V2M_UART0 & SECTION_MASK, |
| 240 | .io_pg_offst = (__MMIO_P2V(V2M_UART0) >> 18) & 0xfffc, | 241 | .io_pg_offst = (__MMIO_P2V(V2M_UART0) >> 18) & 0xfffc, |
| 241 | .boot_params = PHYS_OFFSET + 0x00000100, | 242 | .boot_params = PHYS_OFFSET + 0x00000100, |
| 242 | .map_io = ct_ca9x4_map_io, | 243 | .map_io = ct_ca9x4_map_io, |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 346ae14824a5..fc1b2fa59429 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
| @@ -735,6 +735,25 @@ config NEEDS_SYSCALL_FOR_CMPXCHG | |||
| 735 | Forget about fast user space cmpxchg support. | 735 | Forget about fast user space cmpxchg support. |
| 736 | It is just not possible. | 736 | It is just not possible. |
| 737 | 737 | ||
| 738 | config DMA_CACHE_RWFO | ||
| 739 | bool "Enable read/write for ownership DMA cache maintenance" | ||
| 740 | depends on CPU_V6 && SMP | ||
| 741 | default y | ||
| 742 | help | ||
| 743 | The Snoop Control Unit on ARM11MPCore does not detect the | ||
| 744 | cache maintenance operations and the dma_{map,unmap}_area() | ||
| 745 | functions may leave stale cache entries on other CPUs. By | ||
| 746 | enabling this option, Read or Write For Ownership in the ARMv6 | ||
| 747 | DMA cache maintenance functions is performed. These LDR/STR | ||
| 748 | instructions change the cache line state to shared or modified | ||
| 749 | so that the cache operation has the desired effect. | ||
| 750 | |||
| 751 | Note that the workaround is only valid on processors that do | ||
| 752 | not perform speculative loads into the D-cache. For such | ||
| 753 | processors, if cache maintenance operations are not broadcast | ||
| 754 | in hardware, other workarounds are needed (e.g. cache | ||
| 755 | maintenance broadcasting in software via FIQ). | ||
| 756 | |||
| 738 | config OUTER_CACHE | 757 | config OUTER_CACHE |
| 739 | bool | 758 | bool |
| 740 | 759 | ||
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index e46ecd847138..86aa689ef1aa 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
| @@ -211,8 +211,9 @@ v6_dma_inv_range: | |||
| 211 | mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line | 211 | mcrne p15, 0, r1, c7, c15, 1 @ clean & invalidate unified line |
| 212 | #endif | 212 | #endif |
| 213 | 1: | 213 | 1: |
| 214 | #ifdef CONFIG_SMP | 214 | #ifdef CONFIG_DMA_CACHE_RWFO |
| 215 | str r0, [r0] @ write for ownership | 215 | ldr r2, [r0] @ read for ownership |
| 216 | str r2, [r0] @ write for ownership | ||
| 216 | #endif | 217 | #endif |
| 217 | #ifdef HARVARD_CACHE | 218 | #ifdef HARVARD_CACHE |
| 218 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D line | 219 | mcr p15, 0, r0, c7, c6, 1 @ invalidate D line |
| @@ -234,7 +235,7 @@ v6_dma_inv_range: | |||
| 234 | v6_dma_clean_range: | 235 | v6_dma_clean_range: |
| 235 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | 236 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 |
| 236 | 1: | 237 | 1: |
| 237 | #ifdef CONFIG_SMP | 238 | #ifdef CONFIG_DMA_CACHE_RWFO |
| 238 | ldr r2, [r0] @ read for ownership | 239 | ldr r2, [r0] @ read for ownership |
| 239 | #endif | 240 | #endif |
| 240 | #ifdef HARVARD_CACHE | 241 | #ifdef HARVARD_CACHE |
| @@ -257,7 +258,7 @@ v6_dma_clean_range: | |||
| 257 | ENTRY(v6_dma_flush_range) | 258 | ENTRY(v6_dma_flush_range) |
| 258 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | 259 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 |
| 259 | 1: | 260 | 1: |
| 260 | #ifdef CONFIG_SMP | 261 | #ifdef CONFIG_DMA_CACHE_RWFO |
| 261 | ldr r2, [r0] @ read for ownership | 262 | ldr r2, [r0] @ read for ownership |
| 262 | str r2, [r0] @ write for ownership | 263 | str r2, [r0] @ write for ownership |
| 263 | #endif | 264 | #endif |
| @@ -283,9 +284,13 @@ ENTRY(v6_dma_map_area) | |||
| 283 | add r1, r1, r0 | 284 | add r1, r1, r0 |
| 284 | teq r2, #DMA_FROM_DEVICE | 285 | teq r2, #DMA_FROM_DEVICE |
| 285 | beq v6_dma_inv_range | 286 | beq v6_dma_inv_range |
| 287 | #ifndef CONFIG_DMA_CACHE_RWFO | ||
| 288 | b v6_dma_clean_range | ||
| 289 | #else | ||
| 286 | teq r2, #DMA_TO_DEVICE | 290 | teq r2, #DMA_TO_DEVICE |
| 287 | beq v6_dma_clean_range | 291 | beq v6_dma_clean_range |
| 288 | b v6_dma_flush_range | 292 | b v6_dma_flush_range |
| 293 | #endif | ||
| 289 | ENDPROC(v6_dma_map_area) | 294 | ENDPROC(v6_dma_map_area) |
| 290 | 295 | ||
| 291 | /* | 296 | /* |
| @@ -295,6 +300,11 @@ ENDPROC(v6_dma_map_area) | |||
| 295 | * - dir - DMA direction | 300 | * - dir - DMA direction |
| 296 | */ | 301 | */ |
| 297 | ENTRY(v6_dma_unmap_area) | 302 | ENTRY(v6_dma_unmap_area) |
| 303 | #ifndef CONFIG_DMA_CACHE_RWFO | ||
| 304 | add r1, r1, r0 | ||
| 305 | teq r2, #DMA_TO_DEVICE | ||
| 306 | bne v6_dma_inv_range | ||
| 307 | #endif | ||
| 298 | mov pc, lr | 308 | mov pc, lr |
| 299 | ENDPROC(v6_dma_unmap_area) | 309 | ENDPROC(v6_dma_unmap_area) |
| 300 | 310 | ||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 13fa536d82e6..9e7742f0a102 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
| @@ -24,15 +24,6 @@ | |||
| 24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
| 25 | #include <asm/sizes.h> | 25 | #include <asm/sizes.h> |
| 26 | 26 | ||
| 27 | /* Sanity check size */ | ||
| 28 | #if (CONSISTENT_DMA_SIZE % SZ_2M) | ||
| 29 | #error "CONSISTENT_DMA_SIZE must be multiple of 2MiB" | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT) | ||
| 33 | #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT) | ||
| 34 | #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT) | ||
| 35 | |||
| 36 | static u64 get_coherent_dma_mask(struct device *dev) | 27 | static u64 get_coherent_dma_mask(struct device *dev) |
| 37 | { | 28 | { |
| 38 | u64 mask = ISA_DMA_THRESHOLD; | 29 | u64 mask = ISA_DMA_THRESHOLD; |
| @@ -123,6 +114,15 @@ static void __dma_free_buffer(struct page *page, size_t size) | |||
| 123 | } | 114 | } |
| 124 | 115 | ||
| 125 | #ifdef CONFIG_MMU | 116 | #ifdef CONFIG_MMU |
| 117 | /* Sanity check size */ | ||
| 118 | #if (CONSISTENT_DMA_SIZE % SZ_2M) | ||
| 119 | #error "CONSISTENT_DMA_SIZE must be multiple of 2MiB" | ||
| 120 | #endif | ||
| 121 | |||
| 122 | #define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT) | ||
| 123 | #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT) | ||
| 124 | #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT) | ||
| 125 | |||
| 126 | /* | 126 | /* |
| 127 | * These are the page tables (2MB each) covering uncached, DMA consistent allocations | 127 | * These are the page tables (2MB each) covering uncached, DMA consistent allocations |
| 128 | */ | 128 | */ |
diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile index 6187edfbcb77..a17cc0c6a6b0 100644 --- a/arch/arm/plat-pxa/Makefile +++ b/arch/arm/plat-pxa/Makefile | |||
| @@ -2,8 +2,9 @@ | |||
| 2 | # Makefile for code common across different PXA processor families | 2 | # Makefile for code common across different PXA processor families |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-y := dma.o pmu.o | 5 | obj-y := dma.o |
| 6 | 6 | ||
| 7 | obj-$(CONFIG_ARCH_PXA) += pmu.o | ||
| 7 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o | 8 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o |
| 8 | obj-$(CONFIG_PXA3xx) += mfp.o | 9 | obj-$(CONFIG_PXA3xx) += mfp.o |
| 9 | obj-$(CONFIG_ARCH_MMP) += mfp.o | 10 | obj-$(CONFIG_ARCH_MMP) += mfp.o |
diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c index 9cca465436e3..85064a9f649e 100644 --- a/drivers/power/z2_battery.c +++ b/drivers/power/z2_battery.c | |||
| @@ -9,19 +9,13 @@ | |||
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/init.h> | ||
| 13 | #include <linux/kernel.h> | ||
| 14 | #include <linux/module.h> | 12 | #include <linux/module.h> |
| 15 | #include <linux/platform_device.h> | ||
| 16 | #include <linux/power_supply.h> | ||
| 17 | #include <linux/i2c.h> | ||
| 18 | #include <linux/spinlock.h> | ||
| 19 | #include <linux/interrupt.h> | ||
| 20 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
| 14 | #include <linux/i2c.h> | ||
| 21 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
| 22 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
| 23 | #include <asm/irq.h> | 17 | #include <linux/power_supply.h> |
| 24 | #include <asm/mach/irq.h> | 18 | #include <linux/slab.h> |
| 25 | #include <linux/z2_battery.h> | 19 | #include <linux/z2_battery.h> |
| 26 | 20 | ||
| 27 | #define Z2_DEFAULT_NAME "Z2" | 21 | #define Z2_DEFAULT_NAME "Z2" |
