summaryrefslogtreecommitdiffstats
path: root/arch/arm
AgeCommit message (Collapse)AuthorFilesLines
2012-05-21arm: missing checks of __get_user()/__put_user() return valuesAl Viro1-6/+6
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21Merge branch 'v3-removal' into for-linusRussell King19-1454/+10
Conflicts: arch/arm/boot/compressed/head.S
2012-05-21Merge branch 'misc' into for-linusRussell King37-174/+269
Conflicts: arch/arm/kernel/ptrace.c
2012-05-21Merge branches 'amba', 'devel-stable', 'fixes', 'mach-types', 'mmci', 'pci' ↵Russell King155-1125/+1570
and 'versatile' into for-linus
2012-05-21ARM: dma-mapping: use PMD size for section unmapVitaly Andrianov1-1/+1
The dma_contiguous_remap() function clears existing section maps using the wrong size (PGDIR_SIZE instead of PMD_SIZE). This is a bug which does not affect non-LPAE systems, where PGDIR_SIZE and PMD_SIZE are the same. On LPAE systems, however, this bug causes the kernel to hang at this point. This fix has been tested on both LPAE and non-LPAE kernel builds. Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-05-21ARM: integrate CMA with DMA-mapping subsystemMarek Szyprowski8-88/+366
This patch adds support for CMA to dma-mapping subsystem for ARM architecture. By default a global CMA area is used, but specific devices are allowed to have their private memory areas if required (they can be created with dma_declare_contiguous() function during board initialisation). Contiguous memory areas reserved for DMA are remapped with 2-level page tables on boot. Once a buffer is requested, a low memory kernel mapping is updated to to match requested memory access type. GFP_ATOMIC allocations are performed from special pool which is created early during boot. This way remapping page attributes is not needed on allocation time. CMA has been enabled unconditionally for ARMv6+ systems. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Michal Nazarewicz <mina86@mina86.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Rob Clark <rob.clark@linaro.org> Tested-by: Ohad Ben-Cohen <ohad@wizery.com> Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Tested-by: Robert Nelson <robertcnelson@gmail.com> Tested-by: Barry Song <Baohua.Song@csr.com>
2012-05-21ARM: dma-mapping: add support for IOMMU mapperMarek Szyprowski5-12/+747
This patch add a complete implementation of DMA-mapping API for devices which have IOMMU support. This implementation tries to optimize dma address space usage by remapping all possible physical memory chunks into a single dma address space chunk. DMA address space is managed on top of the bitmap stored in the dma_iommu_mapping structure stored in device->archdata. Platform setup code has to initialize parameters of the dma address space (base address, size, allocation precision order) with arm_iommu_create_mapping() function. To reduce the size of the bitmap, all allocations are aligned to the specified order of base 4 KiB pages. dma_alloc_* functions allocate physical memory in chunks, each with alloc_pages() function to avoid failing if the physical memory gets fragmented. In worst case the allocated buffer is composed of 4 KiB page chunks. dma_map_sg() function minimizes the total number of dma address space chunks by merging of physical memory chunks into one larger dma address space chunk. If requested chunk (scatter list entry) boundaries match physical page boundaries, most calls to dma_map_sg() requests will result in creating only one chunk in dma address space. dma_map_page() simply creates a mapping for the given page(s) in the dma address space. All dma functions also perform required cache operation like their counterparts from the arm linear physical memory mapping version. This patch contains code and fixes kindly provided by: - Krishna Reddy <vdumpa@nvidia.com>, - Andrzej Pietrasiewicz <andrzej.p@samsung.com>, - Hiroshi DOYU <hdoyu@nvidia.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: use alloc, mmap, free from dma_opsMarek Szyprowski3-66/+104
This patch converts dma_alloc/free/mmap_{coherent,writecombine} functions to use generic alloc/free/mmap methods from dma_map_ops structure. A new DMA_ATTR_WRITE_COMBINE DMA attribute have been introduced to implement writecombine methods. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: remove redundant code and do the cleanupMarek Szyprowski1-64/+24
This patch just performs a global cleanup in DMA mapping implementation for ARM architecture. Some of the tiny helper functions have been moved to the caller code, some have been merged together. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: move all dma bounce code to separate dma ops structureMarek Szyprowski3-120/+120
This patch removes dma bounce hooks from the common dma mapping implementation on ARM architecture and creates a separate set of dma_map_ops for dma bounce devices. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: implement dma sg methods on top of any generic dma opsMarek Szyprowski1-24/+19
This patch converts all dma_sg methods to be generic (independent of the current DMA mapping implementation for ARM architecture). All dma sg operations are now implemented on top of respective dma_map_page/dma_sync_single_for* operations from dma_map_ops structure. Before this patch there were custom methods for all scatter/gather related operations. They iterated over the whole scatter list and called cache related operations directly (which in turn checked if we use dma bounce code or not and called respective version). This patch changes them not to use such shortcut. Instead it provides similar loop over scatter list and calls methods from the device's dma_map_ops structure. This enables us to use device dependent implementations of cache related operations (direct linear or dma bounce) depending on the provided dma_map_ops structure. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: use asm-generic/dma-mapping-common.hMarek Szyprowski4-231/+115
This patch modifies dma-mapping implementation on ARM architecture to use common dma_map_ops structure and asm-generic/dma-mapping-common.h helpers. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: remove offset parameter to prepare for generic dma_opsMarek Szyprowski3-39/+45
This patch removes the need for the offset parameter in dma bounce functions. This is required to let dma-mapping framework on ARM architecture to use common, generic dma_map_ops based dma-mapping helpers. Background and more detailed explaination: dma_*_range_* functions are available from the early days of the dma mapping api. They are the correct way of doing a partial syncs on the buffer (usually used by the network device drivers). This patch changes only the internal implementation of the dma bounce functions to let them tunnel through dma_map_ops structure. The driver api stays unchanged, so driver are obliged to call dma_*_range_* functions to keep code clean and easy to understand. The only drawback from this patch is reduced detection of the dma api abuse. Let us consider the following code: dma_addr = dma_map_single(dev, ptr, 64, DMA_TO_DEVICE); dma_sync_single_range_for_cpu(dev, dma_addr+16, 0, 32, DMA_TO_DEVICE); Without the patch such code fails, because dma bounce code is unable to find the bounce buffer for the given dma_address. After the patch the above sync call will be equivalent to: dma_sync_single_range_for_cpu(dev, dma_addr, 16, 32, DMA_TO_DEVICE); which succeeds. I don't consider this as a real problem, because DMA API abuse should be caught by debug_dma_* function family. This patch lets us to simplify the internal low-level implementation without chaning the driver visible API. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: introduce DMA_ERROR_CODE constantMarek Szyprowski3-5/+7
Replace all uses of ~0 with DMA_ERROR_CODE, what should make the code easier to read. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: use pr_* instread of printkMarek Szyprowski1-8/+8
Replace all calls to printk with pr_* functions family. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21ARM: dma-mapping: use dma_mmap_from_coherent()Marek Szyprowski1-0/+3
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-05-21arm: Select core options instead of redefining themThomas Gleixner1-8/+2
HARDIRQS_SW_RESEND and GENERIC_IRQ_PROBE are already defined as config switches in the core Kconfig file. Select them instead of defining them in ARM. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21arm: Use generic time configAnna-Maria Gleixner1-16/+2
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de> Cc: Russell King <linux@arm.linux.org.uk> Link: http://lkml.kernel.org/r/20120518163104.760560327@glx-um.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21ARM: vexpress: Remove twice included header filesThomas Weber1-2/+0
Remove duplicates of - linux/device.h and - asm/hardware/gic.h Signed-off-by: Thomas Weber <thomas@tomweber.eu> Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2012-05-21ARM: vexpress: Device Tree updatesPawel Moll3-7/+28
* Added extra regs for A15 VGIC * Added A15 architected timer node * Split A5 and A9 TWD nodes into two separate ones for timer and watchdog; interrupt definitions fixed on the way * Fixed typo in A5 GIC compatible value All the changes courtesy of Marc Zyngier. Signed-off-by: Pawel Moll <pawel.moll@arm.com>
2012-05-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller5-22/+19
2012-05-20mfd: Remove confusing ab8500-i2c file and merge into ab8500-coreLee Jones1-1/+1
ab8500-i2c is used as core code to register the ab8500 device. After allocating ab8500 memory, it immediately calls into ab8500-core where the real initialisation takes place. This patch moves all core registration and memory allocation into the true ab8500-core file and removes ab8500-i2c completely. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-19Merge branch 'emev2' of ↵Olof Johansson10-0/+1023
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas into next/soc * 'emev2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas: mach-shmobile: Use DT_MACHINE for KZM9D V3 mach-shmobile: Emma Mobile EV2 DT support V3 mach-shmobile: KZM9D board Ethernet support V3 mach-shmobile: Emma Mobile EV2 GPIO support V3 mach-shmobile: Emma Mobile EV2 SMP support V3 mach-shmobile: KZM9D board support V3 mach-shmobile: Emma Mobile EV2 SoC base support V3 gpio: Emma Mobile GPIO driver V2
2012-05-20ARM: EXYNOS: Support suspend and resume for EXYNOS5250Jongpill Lee4-36/+110
This patch adds function for suspend and resume of Exynos5250. Signed-off-by: Jongpill Lee <boyko.lee@samsung.com> [kgene.kim@samsung.com: re-worked on top of v3.4-rc7] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-20ARM: EXYNOS: Add Clock register list for save and restoreJongpill Lee2-2/+67
This patch adds clock register list for save and restore. When system enter suspend mode and wakeup from suspend mode, All clock register is reset. So critical register should be saved and reset. Signed-off-by: Jongpill Lee <boyko.lee@samsung.com> [kgene.kim@samsung.com: re-worked on top of v3.4-rc7] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-20ARM: EXYNOS: Add PMU table for EXYNOS5250Jongpill Lee6-27/+265
This patch adds pmu table setting feature for EXYNOS5250. Signed-off-by: Jongpill Lee <boyko.lee@samsung.com> [kgene.kim@samsung.com: re-worked on top of v3.4-rc7] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-20ARM: EXYNOS: Rename of function for pm.cJongpill Lee1-27/+28
This patch changes the function name of pmc. to support new EXYNOS SoCs commonly. Signed-off-by: Jongpill Lee <boyko.lee@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-20ARM: EXYNOS: Remove GIC save & restore functionJongpill Lee1-83/+0
This patch removes GIC save & restore functino in pm.c. Because when enalbe CPU_PM feature, GIC driver execute save and restore function in CPU_PM notifier. So it is not needed to GIC save & restore function at pm.c file. Signed-off-by: Jongpill Lee <boyko.lee@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-20ARM: dts: Add node for interrupt combiner controller on EXYNOS5250Thomas Abraham1-0/+16
EXYNOS5250 includes a interrupt combiner controller that can group upto 8 interrupts from different sources and deliver a single combined interrupt to the GIC. Add a node for the interrupt combiner controller in the device tree source file. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-20ARM: S3C24XX: add support for second irq set of S3C2416Heiko Stuebner4-1/+116
The S3C2416 has a separate second interrupt register-set to support additional irqs. This patch adds the necessary constants and registers the irq handlers for it. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-20Merge branch 'next/devel-exynos5250-1' into next/devel-samsung-2Kukjin Kim30-367/+505
2012-05-20Merge branch 'next/devel-samsung' into next/devel-samsung-2Kukjin Kim38-804/+819
2012-05-18Merge branch 'board-specific' of git://github.com/hzhuang1/linux into ↵Olof Johansson12-45/+39
next/boards * 'board-specific' of git://github.com/hzhuang1/linux: ARM: pxa: hx4700: Add Synaptics NavPoint touchpad ARM: pxa: Use REGULATOR_SUPPLY macro
2012-05-18Merge branch 'soc-core' of ↵Olof Johansson1-3/+31
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas into next/soc Repeat pull of soc-core to bring in a bugfix. * 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas: ARM: mach-shmobile: sh73a0: fixup PINT/IRQ16-IRQ31 irq number conflict
2012-05-18gpio/lpc32xx: Add device tree supportRoland Stigge1-1/+8
This patch adds device tree support for gpio-lpc32xx.c. To register the various GPIO banks as (struct) gpio_chips via the same DT gpio-controller, we utilize the adjusted of_xlate API to manipulate the actually used struct gpio_chip. Signed-off-by: Roland Stigge <stigge@antcom.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-05-18gpio: Adjust of_xlate API to support multiple GPIO chipsGrant Likely1-2/+1
This patch changes the of_xlate API to make it possible for multiple gpio_chips to refer to the same device tree node. This is useful for banked GPIO controllers that use multiple gpio_chips for a single device. With this change the core code will try calling of_xlate on each gpio_chip that references the device_node and will return the gpio number for the first one to return 'true'. Tested-by: Roland Stigge <stigge@antcom.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-05-18Merge remote-tracking branch 'tip/perf/urgent' into perf/coreArnaldo Carvalho de Melo35-234/+397
Merge reason: We are going to queue up a dependent patch: "perf tools: Move parse event automated tests to separated object" That depends on: commit e7c72d8 perf tools: Add 'G' and 'H' modifiers to event parsing Conflicts: tools/perf/builtin-stat.c Conflicted with the recent 'perf_target' patches when checking the result of perf_evsel open routines to see if a retry is needed to cope with older kernels where the exclude guest/host perf_event_attr bits were not used. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-05-18ARM: mx31_3ds: Add sound supportPhilippe Rétornaz2-1/+22
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-18mx31moboard: Add sound supportPhilippe Rétornaz2-1/+20
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-18Merge branch 'at91/dt' into next/dtArnd Bergmann2-0/+43
This should help the merge with the at91 adc driver that is currently in the staging tree. * at91/dt: ARM: at91: Add ADC driver to at91sam9260/at91sam9g20 dtsi files Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-18ARM: at91: Add ADC driver to at91sam9260/at91sam9g20 dtsi filesNicolas Ferre2-0/+43
Now that the bulk of at91sam9g20-related nodes are located in at91sam9260.dtsi, we have to re-create the path to this ADC node for SoC specific parts. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-05-17Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-armLinus Torvalds3-18/+13
Pull ARM fixes from Russell King: "Small set of fixes again." * 'fixes' of git://git.linaro.org/people/rmk/linux-arm: ARM: 7419/1: vfp: fix VFP flushing regression on sigreturn path ARM: 7418/1: LPAE: fix access flag setup in mem_type_table ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS ARM: 7417/1: vfp: ensure preemption is disabled when enabling VFP access
2012-05-17arm: remove ability to select CONFIG_MCAPaul Gortmaker1-8/+0
It isn't clear to me why this ever existed, as I've never heard of an ARM board with an MCA bus. Regardless, the MCA bus support is going away, so remove the ability to select it from ARM. Cc: Russell King <linux@arm.linux.org.uk> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2012-05-18ARM: S3C64XX: use timekeeping wrapper on cpuidleDaniel Lezcano1-11/+1
The timekeeping is computed from the cpuidle core if we set the .en_core_tk_irqen flag. Let's use it and remove the duplicated code. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Tested-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-18ARM: S3C64XX: declare the states with the new api on cpuidleDaniel Lezcano1-19/+14
The states are now part of the cpuidle_driver structure, so we can declare the states in this structure directly. That saves us an extra variable declaration and a memcpy. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Tested-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-18mach-shmobile: Use DT_MACHINE for KZM9D V3Magnus Damm4-2/+36
Use DT_MACHINE_START() on the emev2 based KZM9D board. Also include a tiny DTS file to describe the board and update the Kconfig dependencies to select CONFIG_USE_OF. Update the SMP glue code to use OF for matching. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-05-18mach-shmobile: Emma Mobile EV2 DT support V3Magnus Damm3-1/+114
This is EMEV2 DT support V3. The support is limited to whatever devices that are complied in the kernel. At this point we have UARTs handled by "em-uart" and a timer handled by "em-sti". Clocks and SMP are not supported. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-05-18mach-shmobile: KZM9D board Ethernet support V3Magnus Damm1-1/+43
Tie in the on-board Ethernet controller on KZM9D and make use of the GPIO controller for external IRQ pin support. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-05-18mach-shmobile: Emma Mobile EV2 GPIO support V3Magnus Damm3-0/+207
Tie in the Emma Mobile GPIO driver "em-gio" to support the GPIOs on Emma Mobile EV2. A static IRQ range is used to allow boards to hook up their platform devices to the GPIOs. DT support is still on the TODO for the GPIO driver, so only platform device support is included here. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-05-18mach-shmobile: Emma Mobile EV2 SMP support V3Magnus Damm7-0/+165
This is V3 of Emma Mobile EV2 SMP support. At this point only the most basic form of SMP operation is supported. TWD and CPU Hotplug support is excluded. Tied to both the Emma Mobile EV2 and the KZM9D board due to the need to switch on board in platsmp.c and the newly introduced need for static mappings. The static mappings are needed to allow hardware acces early during boot when SMP is initialized. This early requirement forces us to also map in the SMU registers. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>