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/kernel/perf_event.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-mx3/mach-mx31lilly.c | 33 | ||||
| -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/Kconfig | 2 | ||||
| -rw-r--r-- | arch/arm/mach-realview/include/mach/barriers.h | 8 | ||||
| -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 | 21 | ||||
| -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 |
20 files changed, 113 insertions, 61 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/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index c45768614c8a..de12536d687f 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
| @@ -201,7 +201,7 @@ armpmu_event_update(struct perf_event *event, | |||
| 201 | { | 201 | { |
| 202 | int shift = 64 - 32; | 202 | int shift = 64 - 32; |
| 203 | s64 prev_raw_count, new_raw_count; | 203 | s64 prev_raw_count, new_raw_count; |
| 204 | s64 delta; | 204 | u64 delta; |
| 205 | 205 | ||
| 206 | again: | 206 | again: |
| 207 | prev_raw_count = atomic64_read(&hwc->prev_count); | 207 | prev_raw_count = atomic64_read(&hwc->prev_count); |
diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c index d3d5877c750e..b2c7f512070f 100644 --- a/arch/arm/mach-mx3/mach-mx31lilly.c +++ b/arch/arm/mach-mx3/mach-mx31lilly.c | |||
| @@ -115,6 +115,8 @@ static struct platform_device physmap_flash_device = { | |||
| 115 | 115 | ||
| 116 | /* USB */ | 116 | /* USB */ |
| 117 | 117 | ||
| 118 | #if defined(CONFIG_USB_ULPI) | ||
| 119 | |||
| 118 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | 120 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ |
| 119 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 121 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) |
| 120 | 122 | ||
| @@ -244,10 +246,20 @@ static struct mxc_usbh_platform_data usbh2_pdata = { | |||
| 244 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | 246 | .flags = MXC_EHCI_POWER_PINS_ENABLED, |
| 245 | }; | 247 | }; |
| 246 | 248 | ||
| 247 | static struct platform_device *devices[] __initdata = { | 249 | static void lilly1131_usb_init(void) |
| 248 | &smsc91x_device, | 250 | { |
| 249 | &physmap_flash_device, | 251 | usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
| 250 | }; | 252 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); |
| 253 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
| 254 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
| 255 | |||
| 256 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | ||
| 257 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
| 258 | } | ||
| 259 | |||
| 260 | #else | ||
| 261 | static inline void lilly1131_usb_init(void) {} | ||
| 262 | #endif /* CONFIG_USB_ULPI */ | ||
| 251 | 263 | ||
| 252 | /* SPI */ | 264 | /* SPI */ |
| 253 | 265 | ||
| @@ -279,6 +291,11 @@ static struct spi_board_info mc13783_dev __initdata = { | |||
| 279 | .platform_data = &mc13783_pdata, | 291 | .platform_data = &mc13783_pdata, |
| 280 | }; | 292 | }; |
| 281 | 293 | ||
| 294 | static struct platform_device *devices[] __initdata = { | ||
| 295 | &smsc91x_device, | ||
| 296 | &physmap_flash_device, | ||
| 297 | }; | ||
| 298 | |||
| 282 | static int mx31lilly_baseboard; | 299 | static int mx31lilly_baseboard; |
| 283 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); | 300 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); |
| 284 | 301 | ||
| @@ -321,13 +338,7 @@ static void __init mx31lilly_board_init(void) | |||
| 321 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 338 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 322 | 339 | ||
| 323 | /* USB */ | 340 | /* USB */ |
| 324 | usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 341 | lilly1131_usb_init(); |
| 325 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
| 326 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
| 327 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
| 328 | |||
| 329 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | ||
| 330 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
| 331 | } | 342 | } |
| 332 | 343 | ||
| 333 | static void __init mx31lilly_timer_init(void) | 344 | static void __init mx31lilly_timer_init(void) |
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/Kconfig b/arch/arm/mach-realview/Kconfig index ee5e392430e8..b4575ae9648e 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
| @@ -18,6 +18,7 @@ config REALVIEW_EB_ARM11MP | |||
| 18 | bool "Support ARM11MPCore tile" | 18 | bool "Support ARM11MPCore tile" |
| 19 | depends on MACH_REALVIEW_EB | 19 | depends on MACH_REALVIEW_EB |
| 20 | select CPU_V6 | 20 | select CPU_V6 |
| 21 | select ARCH_HAS_BARRIERS if SMP | ||
| 21 | help | 22 | help |
| 22 | Enable support for the ARM11MPCore tile on the Realview platform. | 23 | Enable support for the ARM11MPCore tile on the Realview platform. |
| 23 | 24 | ||
| @@ -35,6 +36,7 @@ config MACH_REALVIEW_PB11MP | |||
| 35 | select CPU_V6 | 36 | select CPU_V6 |
| 36 | select ARM_GIC | 37 | select ARM_GIC |
| 37 | select HAVE_PATA_PLATFORM | 38 | select HAVE_PATA_PLATFORM |
| 39 | select ARCH_HAS_BARRIERS if SMP | ||
| 38 | help | 40 | help |
| 39 | Include support for the ARM(R) RealView MPCore Platform Baseboard. | 41 | Include support for the ARM(R) RealView MPCore Platform Baseboard. |
| 40 | PB11MPCore is a platform with an on-board ARM11MPCore and has | 42 | PB11MPCore is a platform with an on-board ARM11MPCore and has |
diff --git a/arch/arm/mach-realview/include/mach/barriers.h b/arch/arm/mach-realview/include/mach/barriers.h new file mode 100644 index 000000000000..0c5d749d7b5f --- /dev/null +++ b/arch/arm/mach-realview/include/mach/barriers.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | /* | ||
| 2 | * Barriers redefined for RealView ARM11MPCore platforms with L220 cache | ||
| 3 | * controller to work around hardware errata causing the outer_sync() | ||
| 4 | * operation to deadlock the system. | ||
| 5 | */ | ||
| 6 | #define mb() dsb() | ||
| 7 | #define rmb() dmb() | ||
| 8 | #define wmb() mb() | ||
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..101105e52610 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 | ||
| @@ -794,6 +813,8 @@ config ARM_L1_CACHE_SHIFT | |||
| 794 | 813 | ||
| 795 | config ARM_DMA_MEM_BUFFERABLE | 814 | config ARM_DMA_MEM_BUFFERABLE |
| 796 | bool "Use non-cacheable memory for DMA" if CPU_V6 && !CPU_V7 | 815 | bool "Use non-cacheable memory for DMA" if CPU_V6 && !CPU_V7 |
| 816 | depends on !(MACH_REALVIEW_PB1176 || REALVIEW_EB_ARM11MP || \ | ||
| 817 | MACH_REALVIEW_PB11MP) | ||
| 797 | default y if CPU_V6 || CPU_V7 | 818 | default y if CPU_V6 || CPU_V7 |
| 798 | help | 819 | help |
| 799 | Historically, the kernel has used strongly ordered mappings to | 820 | Historically, the kernel has used strongly ordered mappings to |
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" |
