Commit Graph

14065 Commits

Author SHA1 Message Date
Will Deacon 9af386c8dc ARM: 6890/1: memmap: only free allocated memmap entries when using SPARSEMEM
The SPARSEMEM code allocates memmap entries only for sections which are
present (i.e. those which contain some valid memory). The membank checks
in free_unused_memmap do not take this into account and can incorrectly
attempt to free memory which is not allocated, resulting in a BUG() in
the bootmem code.

However, if memory is configured as follows:

    |<----section---->|<----hole---->|<----section---->|
    +--------+--------+--------------+--------+--------+
    | bank 0 | unused |              | bank 1 | unused |
    +--------+--------+--------------+--------+--------+

where a bank only occupies part of a section, the memmap allocated for
the remainder of the section *can* be freed.

This patch modifies the checks in free_unused_memmap so that only valid
memmap entries are considered for removal.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 10:52:00 +01:00
Victor Boivie 4394c12442 ARM: 6893/1: Allow for kernel command line concatenation
This patch allows the provided CONFIG_CMDLINE to be concatenated
with the one provided by the boot loader. This is useful to
merge the static values defined in CONFIG_CMDLINE with the
boot loader's (possibly) more dynamic values, such as startup
reasons and more.

Signed-off-by: Victor Boivie <victor.boivie@sonyericsson.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonyericsson.com>
Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 10:13:22 +01:00
Will Deacon c1b0db5660 ARM: 6889/1: futex: add SMP futex support when !CPU_USE_DOMAINS
This patch uses the load/store exclusive instructions to add SMP futex
support for ARM.

Since the ARM architecture does not provide instructions for
unprivileged exclusive memory accesses, we can only provide SMP futexes
when CPU domain support is disabled.

Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 10:11:44 +01:00
Mark A. Greer af3e4fd37a ARM: 6859/1: Add writethrough dcache support for ARM926EJS processor
The ARM kernel supports writethrough data cache via the
CONFIG_CPU_DCACHE_WRITETHROUGH option.  However, that
functionality wasn't implemented in the arch/arm/boot/compressed
code.  It is now necessary due to a new ARM926EJS processor
that has an issue with writeback data cache.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 10:07:00 +01:00
Russell King 111e9a5ce6 ARM: phys-to-virt: improve Kconfig help texts
Improve the Kconfig help texts for the phys-to-virt patching feature.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 10:02:42 +01:00
Russell King e8db89a242 ARM: Highmem: drop experimental status
Highmem on ARM has been around for a while now, without any major issues
being raised.  So, drop the experimental status of this feature.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 09:53:25 +01:00
Russell King bb2d8130dc ARM: SMP: drop experimental status
SMP on ARM has been around for a while now, without any major issues
being raised.  So, drop the experimental status of this feature.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 09:52:02 +01:00
Russell King be20902ba6 ARM: use ARM_DMA_ZONE_SIZE to adjust the zone sizes
Rather than each platform providing its own function to adjust the
zone sizes, use the new ARM_DMA_ZONE_SIZE definition to perform this
adjustment.  This ensures that the actual DMA zone size and the
ISA_DMA_THRESHOLD/MAX_DMA_ADDRESS definitions are consistent with
each other, and moves this complexity out of the platform code.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 08:36:53 +01:00
Russell King 2fb3ec5c95 ARM: Replace platform definition of ISA_DMA_THRESHOLD/MAX_DMA_ADDRESS
The values of ISA_DMA_THRESHOLD and MAX_DMA_ADDRESS are related; one is
the physical/bus address, the other is the virtual address.  Both need
to be kept in step, so rather than having platforms define both, allow
them to define a single macro which sets both of these macros
appropraitely.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 08:36:49 +01:00
Ingo Molnar 9cb5baba5e Merge commit 'v2.6.39-rc7' into sched/core 2011-05-12 09:36:18 +02:00
Kukjin Kim a73ddc61e8 ARM: S5P6442: Removing ARCH_S5P6442
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-05-12 08:10:53 +09:00
Rakesh Iyer baafb43537 Input: tegra-kbc - change wakeup logic to be all or nothing
Tegra hardware design cannot reliably support an arbitrary set of keys
waking up the system. Modify wakeup logic so either any key wakes the
system up or none will do.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-11 14:31:09 -07:00
Russell King 1cf02bbd51 Merge branch 'samsung-irq' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc-2.6 into devel-stable 2011-05-11 19:01:04 +01:00
Russell King 805499a6d5 Merge branch 'irq-davinci' of git://gitorious.org/linux-davinci/linux-davinci into devel-stable 2011-05-11 18:49:31 +01:00
Laurent Pinchart c56b2ddd5f omap: iommu: Return IRQ_HANDLED in fault handler when no fault occured
Commit d594f1f31a (omap: IOMMU: add
support to callback during fault handling) broke interrupt line sharing
between the OMAP3 ISP and its IOMMU. Because of this, every interrupt
generated by the OMAP3 ISP is handled by the IOMMU driver instead of
being passed to the OMAP3 ISP driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-11 10:47:50 -07:00
Russell King 254c44ea82 Merge branch 'gic-fasteoi' of git://linux-arm.org/linux-2.6-wd into devel-stable 2011-05-11 18:45:21 +01:00
Thomas Gleixner aac4dd1dab arm: davinci: Use generic irq chip
Simple conversion which simply uses the fact that the second irq chip
base address has offset 0x04 to the first one.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-and-Tested-by: Kevin Hilman <khilman@ti.com>
Tested-by: Sekhar Nori <nsekhar@ti.com>
2011-05-11 22:40:06 +05:30
Santosh Shilimkar 6ac77e469e ARM: GIC: Convert GIC library to use the IO relaxed operations
The GIC register accesses today make use of readl()/writel()
which prove to be very expensive when used along with mandatory
barriers. This mandatory barriers also introduces an un-necessary
and expensive l2x0_sync() operation. On Cortex-A9 MP cores, GIC
IO accesses from CPU are direct and doesn't go through L2X0 write
buffer.

A DSB before writel_relaxed() in gic_raise_softirq() is added to be
compliant with the Barrier Litmus document - the mailbox scenario.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
2011-05-11 16:04:17 +01:00
Will Deacon 1a01753ed9 ARM: gic: use handle_fasteoi_irq for SPIs
Currently, the gic uses handle_level_irq for handling SPIs (Shared
Peripheral Interrupts), requiring active interrupts to be masked at
the distributor level during IRQ handling.

On a virtualised system, only the CPU interfaces are virtualised in
hardware. Accesses to the distributor must be trapped by the
hypervisor, adding latency to the critical interrupt path in Linux.

This patch modifies the GIC code to use handle_fasteoi_irq for handling
interrupts, which only requires us to signal EOI to the CPU interface
when handling is complete. Cascaded IRQ handling is also updated to use
the chained IRQ enter/exit functions to honour the flow control of the
parent chip.

Note that commit 846afbd1 ("GIC: Dont disable INT in ack callback")
broke cascading interrupts by forgetting to add IRQ masking. This is
no longer an issue because the unmask call is now unnecessary.

Tested on Versatile Express and Realview EB (1176 w/ cascaded GICs).

Tested-and-reviewed-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Tested-and-acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2011-05-11 16:04:17 +01:00
Colin Cross 4bd66cfde5 ARM: tegra: irq: Add tegra_eoi
Implement irq_eoi to allow the GIC irq chip flow controller to
be changed to fasteoi.

Signed-off-by: Colin Cross <ccross@android.com>
2011-05-11 16:04:16 +01:00
Colin Cross d1d8c66668 ARM: tegra: irq: Move legacy_irq.c into irq.c
Now that irq.c is just an interface layer between the gic
and legacy_irq.c, move the contents of legacy_irq.c into
irq.c.

Signed-off-by: Colin Cross <ccross@android.com>
2011-05-11 16:04:16 +01:00
Colin Cross 4dda2d384b ARM: tegra: irq: Remove PM support
Tegra PM irq support is being improved, remove it for now
until the rest of the platform gets PM support.

Signed-off-by: Colin Cross <ccross@android.com>
2011-05-11 16:04:16 +01:00
Colin Cross 938fa349fb ARM: tegra: irq: convert to gic arch extensions
Replace the ugly hack that inserts legacy irq controller calls
into the irq call paths by reading and replacing the gic irq
chip with the new gic arch extensions.

Signed-off-by: Colin Cross <ccross@android.com>
2011-05-11 16:04:16 +01:00
Will Deacon 98022940c2 ARM: tegra: update GPIO chained IRQ handler to use entry/exit functions
This patch updates the Tegra gpio chained IRQ handler to use the chained
IRQ enter/exit functions in order to function correctly on primary
controllers with different methods of flow control.

This is required for the GIC to move to fasteoi interrupt handling.

Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2011-05-11 16:04:15 +01:00
Will Deacon adfed159ab ARM: nmk: update GPIO chained IRQ handler to entry/exit functions
This patch updates the Nomadik gpio chained IRQ handler to use the
chained IRQ enter/exit functions in order to function correctly on
primary controllers with different methods of flow control.

Cc: Rabin Vincent <rabin@rab.in>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2011-05-11 16:04:15 +01:00
Will Deacon 03dd765fe4 ARM: msm: update GPIO chained IRQ handler to use entry/exit functions
This patch updates the MSM gpio chained IRQ handler to use the chained
IRQ enter/exit functions in order to function correctly on primary
controllers with different methods of flow control.

Tested-and-reviewed-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Acked-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2011-05-11 16:04:15 +01:00
Will Deacon 0f43563f2d ARM: s5pv310: update IRQ combiner to use chained entry/exit functions
This patch updates the IRQ combiner chained IRQ handler code to use the
chained IRQ enter/exit functions in order to function correctly on
primary controllers with different methods of flow control.

This is required for the GIC to move to fasteoi interrupt handling.

Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2011-05-11 16:04:15 +01:00
Will Deacon ee14418259 ARM: omap: update GPIO chained IRQ handler to use entry/exit functions
This patch updates the OMAP gpio chained IRQ handler to use the chained
IRQ enter/exit functions in order to function correctly on primary
controllers with different methods of flow control.

Cc: Colin Cross <ccross@google.com>
Cc: Tony Lindgren <tony@atomide.com>
Tested-and-acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2011-05-11 16:04:15 +01:00
Grant Likely 9eb8f6743b arm/dt: Allow CONFIG_OF on ARM
Add some basic empty infrastructure for DT support on ARM.

v5: - Fix off-by-one error in size calculation of initrd
    - Stop mucking with cmd_line, and load command line from dt into
      boot_command_line instead which matches the behaviour of ATAGS booting
v3: - moved cmd_line export and initrd setup to this patch to make the
      series bisectable.
    - switched to alloc_bootmem_align() for allocation when
      unflattening the device tree.  memblock_alloc() was not the
      right interface.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-11 15:14:29 +02:00
Grant Likely 4c2896e88d arm/dt: Make __vet_atags also accept a dtb image
The dtb is passed to the kernel via register r2, which is the same
method that is used to pass an atags pointer.  This patch modifies
__vet_atags to not clear r2 when it encounters a dtb image.

v2: fixed bugs pointed out by Nicolas Pitre

Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-05-11 15:12:32 +02:00
Ryan Mallon b0ec5cf191 ARM: 6852/1: EP93xx: Remove ep93xx_gpio_dbg_show function
The interrupt printing functionality in the ep93xx gpio debugfs function
does not behave as expected. It prints [interrupt] beside all pins which
are capable of being interrupts, not just those which are currently
configured as interrupts.

The best solution is just to remove the custom ep93xx gpio debugfs
function all together. The generic gpiolib one is good enough.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-11 12:37:18 +01:00
Archit Taneja 179e045369 OMAP2PLUS: DSS2: Clean up omap_display_init()
Currently, omap_display_init() maintains arrays for hwmod name(oh_name) and the
correspnding platform_device name(dev_name) needed by omap_device_build().
A variable oh_count keeps a track of the number of devices to build from oh_name
based on what omap revision it is.

Clean this up by maintaining an array of omap_dss_hwmod_data struct which is
defined for each omap revision as suggested by Tomi Valkeinen. Assign the
corresponding omap_dss_hwmod_data array struct to the pointer curr_dss_hwmod in
omap_display_init().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:11 +03:00
Archit Taneja 6cb07b256a OMAP: DSS2: HDMI: Use dss_device clock configuration for HDMI PLL parameters
Move some of the configurable HDMI PLL parameters to dssdev.clock struct.
Cleanup the function hdmi_compute_pll() by using the parameters defined in the
board file and do some cosmetic modifications.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:20:10 +03:00
Tomi Valkeinen 4e9f99d75c OMAP: DSS2: Move nokia-dsi-panel.h to include/video/
arch/arm/plat-omap/include/plat/nokia-dsi-panel.h is an include for the
OMAP DSS panel driver for Nokia's DSI displays. A more logical place for
it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:10:07 +03:00
Tomi Valkeinen f8ae2f08d2 OMAP: DSS2: Move panel-generic-dpi.h to include/video/
arch/arm/plat-omap/include/plat/panel-generic-dpi.h is an include for
the OMAP DSS panel driver for generic DPI displays. A more logical place
for it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:08:51 +03:00
Tomi Valkeinen a0b38cc4d3 OMAP: DSS2: Move display.h to include/video/
arch/arm/plat-omap/include/plat/display.h is an include for the OMAP DSS
driver. A more logical place for it is in include/video.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2011-05-11 14:05:07 +03:00
Thomas Abraham f65680455d ARM: S3C2416: Add support for USB 2.0 High-Speed gadget controller
Add support for USB 2.0 High-Speed gadget controller driver for Samsung's
S3C2416 processor.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-10 14:16:54 -07:00
Thomas Abraham 4a98f59065 ARM: S3C24XX: Add plaform device definition for USB High-Speed gadget controller.
S3C2416, S3C2443 and S3C2450 includes a USB High-Speed Gadget controller module.
This patch adds the following for supporting this controller.

1. Definition for USB High-Speed controller base address.
2. Platform device instantiation.
3. Declaration for platform data structure.
4. Functionality to setup platform data for the controller.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-10 14:16:54 -07:00
Thomas Abraham 0a94c6b121 ARM: S3C2416: Add USB Phy register definitions
Add register definitions required to configure the USB Phy. The definitions
for PHYCTRL, PHYPWR, URSTCON and UCLKCON registers and corresponding bit
field definitions are added.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-10 14:16:54 -07:00
Greg Kroah-Hartman 8a1629c771 Merge branch 2.6.39-rc7 into usb-linus
This was needed to resolve a conflict in:
	drivers/usb/host/isp1760-hcd.c

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-10 13:30:45 -07:00
Justin P. Mattock 70f23fd66b treewide: fix a few typos in comments
- kenrel -> kernel
- whetehr -> whether
- ttt -> tt
- sss -> ss

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-05-10 10:16:21 +02:00
Mike Rapoport 9e18630b68 omap: musb: introduce default board config
Most boards use exactly the same configuration for musb initialization.
Create a default that can be shared amount different boards.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-09 08:15:31 -07:00
Thomas Gleixner bd7e388035 ARM: SAMSUNG: Convert irq-uart to generic irq chip
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 10:30:57 +02:00
Thomas Gleixner 2d2e1d3c40 ARM: SAMSUNG: Convert irq-vic-timer to generic irq chip
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 10:12:39 +02:00
Thomas Gleixner ad739dcff2 ARM: SAMSUNG: S5P: Convert irq-gpioint to generic irq chip
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-09 10:11:13 +02:00
Russell King 362607df9f Merge first four commits of 'zImage_fixes' of git://git.linaro.org/people/nico/linux into fixes 2011-05-07 08:34:40 +01:00
Russell King 7b76415375 Merge branch 'zImage_fixes' of git://git.linaro.org/people/nico/linux into devel-stable 2011-05-07 08:34:02 +01:00
Nicolas Pitre 8d7e4cc2c8 ARM: zImage: make sure no GOTOFF relocs are used with .bss symbols
To be able to relocate the .bss section at run time independently from
the rest of the code, we must make sure that no GOTOFF relocations are
used with .bss symbols.  This usually means that no global variables can
be marked static unless they're also const.

To enforce this, suffice to fail the build whenever a private symbol
is allocated to .bss and list those symbols for convenience.

The user_stack and user_stack_end labels in head.S were converted into
non exported symbols to remove false positives.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
2011-05-07 00:08:03 -04:00
Nicolas Pitre 8ea0de4b88 ARM: zImage: remove the static qualifier from global data variables
To be able to relocate the .bss section at run time independently from
the rest of the code, we must make sure that no GOTOFF relocations are
used with .bss symbols.  This usually means that no global variables can
be marked static unless they're also const.

Let's remove the static qualifier from current offenders, or turn them
into const variables when possible.  Next commit will ensure the build
fails if one of those is reintroduced due to otherwise enforced coding
standards for the kernel.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
2011-05-07 00:08:02 -04:00
Nicolas Pitre ccc1c7c6c2 ARM: zImage: don't ignore error returned from decompress()
If decompress() returns an error without calling error(), we must
not attempt to boot the resulting kernel.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
2011-05-07 00:08:01 -04:00
Nicolas Pitre e40f1e9fb3 ARM: zImage: simplify decompress_kernel()
The return value for decompress_kernel() is no longer used.  Furthermore,
this was obtained and stored in a variable called output_ptr which is
a complete misnomer for what is actually the size of the decompressed
kernel image.  Let's get rid of it.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
2011-05-07 00:08:00 -04:00
Nicolas Pitre 34cc1a8fe0 ARM: zImage: no need to get the decompressed size from the filesystem
In commit d239b1dc09 the hardcoded 4x estimate for the decompressed
kernel size was replaced by the exact Image file size and passed to
the linker as a symbol value.  Turns out that this is unneeded as the
size is already included at the end of the compressed piggy data.
For those compressed formats that don't include this data, the build
system already takes care of appending it using size_append in
scripts/Makefile.lib.  So let's use that instead.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
2011-05-07 00:07:59 -04:00
Nicolas Pitre ea9df3b168 ARM: zImage: the page table memory must be considered before relocation
For correctness, the initial page table located right before the
decompressed kernel should be considered when determining if relocation
is required.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
2011-05-07 00:07:58 -04:00
Nicolas Pitre adcc25915b ARM: zImage: make sure not to relocate on top of the relocation code
If the zImage load address is slightly below the relocation address,
there is a risk for the copied data to overwrite the copy loop or
cache flush code that the relocation process requires.  Always
bump the relocation address by the size of that code to avoid this
issue.

Noticed by Tony Lindgren <tony@atomide.com>.

While at it, let's start the copy from the restart symbol which makes
the above code size computation possible by the assembler directly
(same sections), given that we don't need to preserve the code before
that point anyway. And therefore we don't need to carry the _start
pointer in r5 anymore.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
2011-05-07 00:07:53 -04:00
Tony Lindgren 7c2527f0c4 ARM: zImage: Fix bad SP address after relocating kernel
Otherwise cache_clean_flush can overwrite some of the relocated
area depending on where the kernel image gets loaded. This fixes
booting on n900 after commit 6d7d0ae515
(ARM: 6750/1: improvements to compressed/head.S).

Thanks to Aaro Koskinen <aaro.koskinen@nokia.com> for debugging
the address of the relocated area that gets corrupted, and to
Nicolas Pitre <nicolas.pitre@linaro.org> for the other uncompress
related fixes.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-05-06 23:56:43 -04:00
Nicolas Pitre 3bd2cbb955 ARM: zImage: make sure the stack is 64-bit aligned
With ARMv5+ and EABI, the compiler expects a 64-bit aligned stack so
instructions like STRD and LDRD can be used.  Without this, mysterious
boot failures were seen semi randomly with the LZMA decompressor.

While at it, let's align .bss as well.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
CC: stable@kernel.org
2011-05-06 23:55:49 -04:00
Jiri Kosina 3d1c89b491 Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
This reverts commit b0c3af5ef0.

The driver has been rewritten in ARM tree.
2011-05-06 11:43:33 +02:00
Sergei Shtylyov 8ac764e347 DA8xx: move base address #define's to their proper place
Move DA8XX_MMCSD0_BASE, DA8XX_LCD_CNTRL_BASE,  and DA8XX_DDR2_CTL_BASE from
<mach/da8xx.h> to devices-da8xx.c as the latter file is the only place where
these macros are used.

While at it, restore sorting the base address macros by address value in
devices-da8xx.c...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2011-05-06 12:10:54 +05:30
Sergei Shtylyov e0c199d098 DA8xx: kill duplicate #define DA8XX_PLL1_BASE
Commit 044ca01521 (davinci: da850/omap-l138: add
support for SoC suspend) introduced DA8XX_PLL1_BASE despite PLL1 exists only on
DA850/OMAP-L138 and da850.c even already #define'd DA850_PLL1_BASE. Kill the
duplicate macro, renaming an existing reference to it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2011-05-06 12:10:54 +05:30
Sergei Shtylyov 5a9f68fd26 DA8xx: kill duplicate #define DA8XX_GPIO_BASE
DA8XX_GPIO_BASE is #define'd in both <mach/da8xx.h> and devices-da8xx.c;
moreover, it's not even used in the latter file...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2011-05-06 12:10:53 +05:30
Ingo Molnar 4d70230bb4 Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into perf/urgent 2011-05-06 08:11:28 +02:00
Linus Torvalds bfd412db9e Merge branch 'for-linus' of git://github.com/at91linux/linux-2.6-at91
* 'for-linus' of git://github.com/at91linux/linux-2.6-at91:
  at91: Add ARCH_ID and basic cpu macros definition for 5series chips family.
  arm: at91: fix compiler warning for eb01 board build
  arm: at91: minimal defconfig for at91x40 SoC
  ARM: at91: AT91CAP9 has a macb device
2011-05-05 21:27:57 -07:00
Joonyoung Shim 3185847957 ARM: S3C64XX: Remove gpio-bank-X header files
The gpio-bank-X header files of S3C64XX have definitions
which can be substituted by other common GPIO API.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-05-06 09:37:36 +09:00
Kukjin Kim 14587b8d4b ARM: exynos4_defconfig: Update for adding machines
This patch adds MACH_ARMLEX4210 and MACH_NURI in exynos4_defconfig.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-05-06 09:36:48 +09:00
Joonyoung Shim 3260ecd859 ARM: EXYNOS4: Add Atmel mXT touchscreen device to the NURI board
This patch is to support Atmel mXT touchscreen device to the NURI board.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-05-06 09:36:47 +09:00
Jaecheol Lee 3d73998558 ARM: EXYNOS4: CPUIDLE Support
This patch supports cpuidle framework for EXYNOS4210. Currently,
Only one idle state is possible to use, but more idle states can
be added following by this patch.

Signed-off-by: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-05-06 09:36:47 +09:00
Ingo Molnar 98bb318864 Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/urgent 2011-05-04 20:33:42 +02:00
Dominik Brodowski 2d06d8c49a [CPUFREQ] use dynamic debug instead of custom infrastructure
With dynamic debug having gained the capability to report debug messages
also during the boot process, it offers a far superior interface for
debug messages than the custom cpufreq infrastructure. As a first step,
remove the old cpufreq_debug_printk() function and replace it with a call
to the generic pr_debug() function.

How can dynamic debug be used on cpufreq? You need a kernel which has
CONFIG_DYNAMIC_DEBUG enabled.

To enabled debugging during runtime, mount debugfs and

$ echo -n 'module cpufreq +p' > /sys/kernel/debug/dynamic_debug/control

for debugging the complete "cpufreq" module. To achieve the same goal during
boot, append

	ddebug_query="module cpufreq +p"

as a boot parameter to the kernel of your choice.

For more detailled instructions, please see
Documentation/dynamic-debug-howto.txt

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Dave Jones <davej@redhat.com>
2011-05-04 11:50:57 -04:00
Russell King c93212f387 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into devel-stable 2011-05-03 21:09:11 +01:00
Nicolas Pitre f5178ddd2f ARM: PJ4: remove the ARMv6 compatible cache method entries
The Marvell PJ4 is ARMv7 capable, so we don't support it in
ARMv6 mode anymore.

Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Saeed Bishara <saeed.bishara@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
2011-05-03 15:39:05 -04:00
Konstantin Porotchkin 0ffd3c4805 ARM: Sync Marvell Dove defconfig with latest kernel
Re-generate defconfig for Marvell Dove platform

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2011-05-03 15:38:52 -04:00
Konstantin Porotchkin 7b769bb3e8 ARM: Moving Marvell Dove platform defaults to ARMv7
Disabled legacy support for ARMv6 architecture on Dove platform.
Latest Dove HW uses only ARMv7 model.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2011-05-03 15:38:12 -04:00
Mike Rapoport 9a3f39ff36 omap: move detection of NAND CS to common-board-devices
and reduce amount of copy/paste

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
CC: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 02:53:37 -07:00
Mike Rapoport fbd8071c18 omap: use common initialization for PMIC i2c bus
Introduce omap_pmic_init that registers i2c bus and PMIC device on that
bus and add omap2/3/4 wrappers for common cases.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 02:51:45 -07:00
Mike Rapoport 96974a249b omap: consolidate touch screen initialization among different boards
Add common-board-devices.c that will contain the code for peripheral
devices initializatoin shared between multiple boards.
Start small with touchscreen initialization.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 02:38:09 -07:00
Nishanth Menon d14f81741f OMAP3+: voltage: remove spurious pr_notice for debugfs
cat of debugfs entry for vp_volt provides voltage. The additional pr_notice
is just spam on console and provides no additional information.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 02:38:03 -07:00
Nishanth Menon 34549009a1 OMAP4: PM: remove redundant #ifdef CONFIG_PM
pm44xx.c is built only when CONFIG_PM is setup,
remove redundant CONFIG_PM check.

This also fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=25022

Reported-by: Martin Etti <ettl.martin@gmx.de>

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 02:38:03 -07:00
Aaro Koskinen 283a1c1f27 OMAP3+: smartreflex: delete debugfs entries on probe error
Delete created debugfs entries if probe fails.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-05-03 02:38:03 -07:00
Aaro Koskinen 833d78fc58 OMAP3+: smartreflex: delete instance from sr_list on probe error
If the probe fails, the node should be deleted from sr_list.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-05-03 02:38:03 -07:00
Aaro Koskinen 0c49cc167c OMAP3+: smartreflex: fix ioremap leak on probe error
Add missing iounmap() to error paths.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-05-03 02:38:02 -07:00
Aaro Koskinen da9e7392f4 OMAP3+: smartreflex: request the memory region
We are releasing the memory region, but never actually request it.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-05-03 02:38:02 -07:00
Aaro Koskinen 0bf6e2eca2 OMAP3+: smartreflex: fix sr_late_init() error path in probe
sr_late_init() will take care of freeing the resources.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-05-03 02:38:02 -07:00
Tony Lindgren e15d13f45e omap: Run make savedefconfig on omap2plus_defconfig to shrink it
After commit ffb63e3 (omap2/3/4: Select all omaps and boards by default)
many explicit settings can be dropped from the defconfig.

This shrinks it down a bit more and makes it easier
to patch later on.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 02:38:02 -07:00
omar ramirez 35f7b96105 OMAP3/4: l3: minor cleanup for parenthesis and extra spaces
Removing extra lines, spaces and unneeded parenthesis.
Collapsing an if statement to detect the type of error.

l3_smx:
- Fixing the message printed on error.

So now: 				looks like:
"No Error Error seen..."		"No Error seen..."
"In-Band Error Error seen..."	"In-Band Error seen..."

Other messages are self explanatory, no "Error" added to them.
(E.g.: "Address Hole seen...")

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 02:38:01 -07:00
omar ramirez 7529b70386 OMAP3/4: l3: fix omap3_l3_probe error path
l3_smx:
- Add missing free_irq and remove an empty goto label.

l3_noc:
- If kzalloc fails driver shouldn't continue with a NULL pointer.
- Add missing free_irq and remove empty goto labels.
- Safe to assume that if we reached the end point of execution
  without errors, then return value is 0, so replacing instead
  another goto.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 02:38:01 -07:00
Igor Grinberg 11383a9bcc arm: omap: gpmc-smsc911x: minor style fixes
replace "printk(KERN_ERR" by "pr_err("
and fix needlessly multi-lined #ifdef

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-03 00:38:58 -07:00
Linus Torvalds 625a3b6057 Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm: (47 commits)
  CLKDEV: Fix clkdev return value for NULL clk case
  ARM: 6891/1: prevent heap corruption in OABI semtimedop
  ARM: kprobes: Tidy-up kprobes-decode.c
  ARM: kprobes: Add emulation of hint instructions like NOP and WFI
  ARM: kprobes: Add emulation of SBFX, UBFX, BFI and BFC instructions
  ARM: kprobes: Add emulation of MOVW and MOVT instructions
  ARM: kprobes: Reject probing of undefined data processing instructions
  ARM: kprobes: Remove redundant code in space_1111
  ARM: kprobes: Fix emulation of PLD instructions
  ARM: kprobes: Reject probing of SETEND instructions
  ARM: kprobes: Consolidate stub decoding functions
  ARM: kprobes: Reject probing of all coprocessor instructions
  ARM: kprobes: Fix emulation of USAD8 instructions
  ARM: kprobes: Fix emulation of SMUAD, SMUSD and SMMUL instructions
  ARM: kprobes: Fix emulation of SXTB16, SXTB, SXTH, UXTB16, UXTB and UXTH instructions
  ARM: kprobes: Reject probing of undefined media instructions
  ARM: kprobes: Add emulation of RBIT instruction
  ARM: kprobes: Reject probing of LDRB instructions which load PC
  ARM: kprobes: Fix emulation of LDRD and STRD instructions
  ARM: kprobes: Reject probing of LDR/STR instructions which update PC unpredictably
  ...
2011-05-02 12:17:05 -07:00
Wolfram Sang 041f10d46f ARM: plat-stmp: remove plat
Now that both users of plat-stmp have been deleted in previous patches,
delete the platform, too.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-02 19:08:55 +01:00
Wolfram Sang f295dc6874 ARM: mach-stmp378x: remove mach
This mach has not seen any updates since the initial inclusion besides
generic cleanup. Furthermore:

- The i.MX23 covered in mach-mxs is just a renamed version of the
  STMP378x.

- mach-stmp378x has a lot of reinvented interfaces, leaking all sorts of
  mach-related includes into the drivers. One example is the dmaengine
  which does not use the linux dmaengine-API but some privately exported
  symbols. So drivers cannot be reused. mach-mxs does it better.

- There is only one board defined (which I couldn't find any trace of
  despite being a development board). It has been converted to
  mach-mxs in a previous patch.

Since the only user of this mach was converted, it means that
mach-stmp378x can go.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-02 19:08:55 +01:00
Wolfram Sang 7635965891 ARM: mach-stmp37xx: remove mach
This mach has not seen any updates since the initial inclusion besides
generic cleanup. Furthermore:

- It has a lot of reinvented interfaces, leaking all sorts of
  mach-related includes into the drivers. One example is the dmaengine
  which does not use the linux dmaengine-API but some privately exported
  symbols. So, drivers cannot be reused. mach-mxs is very similar and
  does it better.

- It can be doubted that this worked at all. Check the DMA routines in
  stmp37xx.c for copy/paste bugs. A lot of APBX-related stuff is
  actually writing into registers for APBH.

- There is only one board defined (which I couldn't find any trace of
  despite being a development board). In this board, only two devices
  have resources, the debug uart and the application uart. Neither of
  those have the needed custom drivers merged (and never will). debug
  uart is amba-pl011 which has an in-kernel driver without the
  mach-specific-stuff. appuart has a driver which was introduced for
  mach-mxs, and this one is reusable for a properly done mach.

So, this single board registers only unsupported devices and the
generic code looks suspicious and has poor design. Delete this
stuff. If there is interest, it is wiser to restart using
mach-mxs.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-02 19:08:55 +01:00
Wolfram Sang cde7c41fea ARM: configs: add defconfig for mach-mxs
Covers MX23, MX28 and STMP378x.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-02 19:08:55 +01:00
Wolfram Sang a98253e800 ARM: mach-mxs: add stmp378x-devb
STMP378x and MX23 are the same and just relabeled. There is a
mach-stmp378x, however, it has a lot of reinvented interfaces, leaking
all sorts of mach-specific functions into the drivers. One example is
the dmaengine which does not use the linux dmaengine-API but some
privately exported symbols. This makes generic use of the drivers
impossible. mach-mxs does it better, so convert the board to mach-mxs.
After that, it is possible to delete all stmp-specific code which should
ease further ARM-consolidation.

Compile tested only due to no hardware (seems not available anymore).

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-02 19:08:54 +01:00
Rafael J. Wysocki 85eb8c8d0b PM / Runtime: Generic clock manipulation rountines for runtime PM (v6)
Many different platforms and subsystems may want to disable device
clocks during suspend and enable them during resume which is going to
be done in a very similar way in all those cases.  For this reason,
provide generic routines for the manipulation of device clocks during
suspend and resume.

Convert the ARM shmobile platform to using the new routines.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-04-30 00:25:44 +02:00
Linus Torvalds 9748d4d2b4 Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  OMAP3+: voltage: remove initial voltage
  OMAP4: Intialize IVA Device in addition to DSP device.
  omap: rx51: mark reserved memory earlier
  OMAP3: l3: fix for "irq 10: nobody cared" message
  arm: omap2: enable smc instruction for sleep34xx
  OMAP2/3: hwmod: fix gpio-reset timeouts seen during bootup.
  OMAP3: PM: Do not rely on ROM code to restore CM_AUTOIDLE_PLL.AUTO_PERIPH_DPLL
  OMAP2+: PM: Fix the saving of CM_AUTOIDLE_PLL register on scratchpad area
  OMAP4: clock data: Change DSS clock aliases
  OMAP2+: hwmod data: Fix wrong dma_system end address
2011-04-29 07:54:48 -07:00
Dan Rosenberg 0f22072ab5 ARM: 6891/1: prevent heap corruption in OABI semtimedop
When CONFIG_OABI_COMPAT is set, the wrapper for semtimedop does not
bound the nsops argument.  A sufficiently large value will cause an
integer overflow in allocation size, followed by copying too much data
into the allocated buffer.  Fix this by restricting nsops to SEMOPM.
Untested.

Cc: stable@kernel.org
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-29 15:53:14 +01:00
Russell King 408133e9dc Merge branch 'kprobes' of git://git.linaro.org/people/nico/linux into fixes 2011-04-29 11:02:45 +01:00
Jon Medhurst cdc2536115 ARM: kprobes: Tidy-up kprobes-decode.c
- Remove coding standard violations reported by checkpatch.pl
- Delete comment about handling of conditional branches which is no
  longer true.
- Delete comment at end of file which lists all ARM instructions. This
  duplicates data available in the ARM ARM and seems like an
  unnecessary maintenance burden to keep this up to date and accurate.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:41:01 -04:00
Jon Medhurst 9425493078 ARM: kprobes: Add emulation of hint instructions like NOP and WFI
Being able to probe NOP instructions is useful for hard-coding probeable
locations and is used by the kprobes test code.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:41:01 -04:00
Jon Medhurst 20e8155e24 ARM: kprobes: Add emulation of SBFX, UBFX, BFI and BFC instructions
These bit field manipulation instructions occur several thousand
times in an ARMv7 kernel.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:41:00 -04:00
Jon Medhurst c9836777d5 ARM: kprobes: Add emulation of MOVW and MOVT instructions
The MOVW and MOVT instructions account for approximately 7% of all
instructions in a ARMv7 kernel as GCC uses them instead of a literal
pool.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:59 -04:00
Jon Medhurst f704a6e25b ARM: kprobes: Reject probing of undefined data processing instructions
The instruction decoding in space_cccc_000x needs to reject probing of
instructions with undefined patterns as they may in future become
defined and then emulated faultily - as has already happened with the
SMC instruction.

This fix is achieved by testing for the instruction patterns we want to
probe and making the the default fall-through paths reject probes. This
also allows us to remove some explicit tests for instructions that we
wish to reject, as that is now the default action.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:59 -04:00
Jon Medhurst 72c2bab2be ARM: kprobes: Remove redundant code in space_1111
The tests to explicitly reject probing CPS, RFE and SRS instructions
are redundant as the default case is now to reject undecoded patterns.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:59 -04:00
Jon Medhurst 41713d1396 ARM: kprobes: Fix emulation of PLD instructions
The PLD instructions wasn't being decoded correctly and the emulation
code wasn't adjusting PC correctly.

As the PLD instruction is only a performance hint we emulate it as a
simple nop, and we can broaden the instruction decoding to take into
account newer PLI and PLDW instructions.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:59 -04:00
Jon Medhurst f0aeb8bff0 ARM: kprobes: Reject probing of SETEND instructions
The emulation of SETEND was broken as it changed the endianess for
the running kprobes handling code. Rather than adding a new simulation
routine to fix this we'll just reject probing of SETEND as these should
be very rare in the kernel.

Note, the function emulate_none is now unused but it is left in the
source code as future patches will use it.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:59 -04:00
Jon Medhurst ac211c6994 ARM: kprobes: Consolidate stub decoding functions
Following the change to remove support for coprocessor instructions
we are left with three stub functions which can be consolidated.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:59 -04:00
Jon Medhurst fa1a03b429 ARM: kprobes: Reject probing of all coprocessor instructions
The kernel doesn't currently support VFP or Neon code, and probing of
code with CP15 operations is fraught with bad consequences. Therefore we
don't need the ability to probe coprocessor instructions and the code to
support this can be removed.

The removed code also had at least two bugs:
 - MRC into R15 should set CPSR not trash PC
 - LDC and STC which use PC as base register needed the address offset by 8

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:58 -04:00
Jon Medhurst c6e4ae3291 ARM: kprobes: Fix emulation of USAD8 instructions
The USAD8 instruction wasn't being explicitly decoded leading
to the incorrect emulation routine being called. It can be correctly
decoded in the same way as the signed multiply instructions so we move
the decoding there.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:58 -04:00
Jon Medhurst 038c3839c9 ARM: kprobes: Fix emulation of SMUAD, SMUSD and SMMUL instructions
The signed multiply instructions were being decoded incorrectly.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:58 -04:00
Jon Medhurst 8dd7cfbed8 ARM: kprobes: Fix emulation of SXTB16, SXTB, SXTH, UXTB16, UXTB and UXTH instructions
These sign extension instructions are encoded as extend-and-add
instructions where the register to add is specified as r15. The decoding
routines weren't checking for this and were using the incorrect
emulation code, giving incorrect results.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:58 -04:00
Jon Medhurst 780b5c1162 ARM: kprobes: Reject probing of undefined media instructions
The instructions space for media instructions contains some undefined
patterns. We need to reject probing of these because they may in future
become defined and the kprobes code may then emulate them faultily.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:58 -04:00
Jon Medhurst 0e384ed164 ARM: kprobes: Add emulation of RBIT instruction
The v6T2 RBIT instruction was accidentally being emulated correctly,
this patch adds correct decoding for the instruction.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:57 -04:00
Jon Medhurst 81ff5720b9 ARM: kprobes: Reject probing of LDRB instructions which load PC
These instructions are specified as UNPREDICTABLE.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:57 -04:00
Jon Medhurst 5c6b76fc7d ARM: kprobes: Fix emulation of LDRD and STRD instructions
The decoding of these instructions got the register indexed and
immediate indexed forms the wrong way around, causing incorrect
emulation.

Instructions like "LDRD Rx, [Rx]" were corrupting Rx because the base
register writeback was being performed unconditionally, overwriting the
value just loaded from memory. The fix is to only writeback the base
register when that form of the instruction is used. Note, now that we
reject probing writeback with PC the emulation code doesn't need the
check rn!=15.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:57 -04:00
Jon Medhurst 54823accfc ARM: kprobes: Reject probing of LDR/STR instructions which update PC unpredictably
Using PC as an base register with writeback is UNPREDICTABLE, as is non
word-sized loads or stores of PC. (We only really care about preventing
loads to PC but it keeps the code simpler if we also exclude stores.)

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:57 -04:00
Jon Medhurst 6823fc85fc ARM: kprobes: Fix emulation of LDRH, STRH, LDRSB and LDRSH instructions
The decoding of these instructions got the register indexed and
immediate indexed forms the wrong way around, causing incorrect
emulation.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:56 -04:00
Jon Medhurst ec58d7f237 ARM: kprobes: Reject probing of STREX and LDREX instructions
The emulation code for STREX and LDREX instructions is faulty, however,
rather than attempting to fix this we reject probes of these
instructions. We do this because they can never succeed in gaining
exclusive access as the exception framework clears the exclusivity
monitor when a probes breakpoint is hit. (This is a general problem
when probing all instructions executing between a LDREX and its
corresponding STREX and can lead to infinite retry loops.)

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:56 -04:00
Jon Medhurst ba48d40713 ARM: kprobes: Reject probing of undefined multiply instructions
The instructions space for 'Multiply and multiply-accumulate'
instructions contains some undefined patterns. We need to reject
probing of these because they may in future become defined and the
kprobes code may then emulate them faultily.

This has already happened with the new MLS instruction which this patch
also adds correct decoding for as well as tightening up other decoding
tests. (Before this patch the wrong emulation routine was being called
for MLS though it still produced correct results.)

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:56 -04:00
Jon Medhurst 75539aea4c ARM: kprobes: Fix error in comment
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:56 -04:00
Jon Medhurst 983ebd9365 ARM: kprobes: Reject probing of instructions which write to PC unpredictably.
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:55 -04:00
Jon Medhurst c412aba2a1 ARM: kprobes: Fix emulation of MRS instruction
The MRS instruction should set mode and interrupt bits in the read value
so it is simpler to use a new simulation routine (simulate_mrs) rather
than some modified emulation.

prep_emulate_rd12 is now unused and removed.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:55 -04:00
Jon Medhurst 51468ea91e ARM: kprobes: Reject probing MRS instructions which read SPSR
We need to reject probing of instructions which read SPSR because
we can't handle this as the value in SPSR is lost when the exception
handler for the probe breakpoint first runs.

This patch also fixes the bitmask for MRS instructions decoding to
include checking bits 5-7.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:55 -04:00
Jon Medhurst 896a74e19d ARM: kprobes: Fix emulation of Data-processing (immediate) instructions
Emulation of instructions like "ADD rd, rn, #<const>" would result in a
corrupted value for rd.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:55 -04:00
Jon Medhurst ad111ce466 ARM: kprobes: Fix emulation of CMP, CMN, TST and TEQ instructions.
Probing these instructions was corrupting R0 because the emulation code
didn't account for the fact that they don't write a result to a
register.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:55 -04:00
Jon Medhurst a539f5d46c ARM: kprobes: Remove redundant condition checks from simulation routines
Now we have the framework code handling conditionally executed
instructions we can remove redundant checks in individual simulation
routines.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:54 -04:00
Jon Medhurst 073090cb70 ARM: kprobes: Fix probing of conditionally executed instructions
When a kprobe is placed onto conditionally executed ARM instructions,
many of the emulation routines used to single step them produce corrupt
register results. Rather than fix all of these cases we modify the
framework which calls them to test the relevant condition flags and, if
the test fails, skip calling the emulation code.

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:54 -04:00
Viktor Rosendahl cf3cc1aa9b kprobes/arm: Fix ldrd/strd emulation
Currently emulate_ldrd and emulate_strd don't even have the adjustment
of the PC value, so in case of Rn == PC, it will not update the PC
incorrectly but instead load/store from the wrong address.  Let's add
both the adjustment of the PC value and the check for PC == PC.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2011-04-28 23:40:54 -04:00
Rafael J. Wysocki 1d2b71f61b PM / Runtime: Add subsystem data field to struct dev_pm_info
Some subsystems need to attach PM-related data to struct device and
they need to use devres for this purpose.  For their convenience
and to make code more straightforward, add a new field called
subsys_data to struct dev_pm_info and let subsystems use it for
attaching PM-related information to devices.

Convert the ARM shmobile platform to using the new field.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-04-29 00:36:53 +02:00
Kevin Hilman 638080c37a OMAP2+ / PM: move runtime PM implementation to use device power domains
In commit 7538e3db6e (PM: add support
for device power domains) a better way for handling platform-specific
power hooks was introduced.

Rather than using the platform_bus dev_pm_ops overrides
(platform_bus_set_pm_ops()), this patch moves the OMAP runtime PM
implementation over to using device power domains.

Since OMAP is the only user of platform_bus_set_pm_ops(), that
interface can be removed (and will be in a forthcoming patch.)

[rjw: Rebased on top of a previous change modifying the handling of
 power domains by the PM core so that power domain callbacks take
 precendence over subsystem-level PM callbacks.]

Signed-off-by: Kevin Hilman <khilman@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-04-29 00:36:42 +02:00
Rafael J. Wysocki 38ade3a1fa shmobile: Use power domains for platform runtime PM
shmobile platforms replace the runtime PM callbacks of the platform
bus type with their own routines, but this means that the callbacks
are replaced system-wide.  This may not be the right approach if the
platform devices on the system are not of the same type (e.g. some
of them belong to an SoC and the others are located in separate
chips), because in those cases they may require different handling.
Thus it is better to use power domains to override the platform bus
type's PM handling, as it generally is possible to use different
power domains for devices with different PM requirements.

Define a default power domain for shmobile in both the SH and ARM
falvors and use it to override the platform bus type's PM callbacks.
Since the suspend and hibernate callbacks of the new "default" power
domains need to be the same and the platform bus type's suspend and
hibernate callbacks for the time being, export those callbacks so
that can be used outside of the platform bus type code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-04-29 00:36:21 +02:00
Uwe Kleine-König 16dc062b42 ARM: 6888/1: remove ns9xxx port
The port is actually unmaintained and only received global
cleanups and a few build fixes since mid 2008.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-28 19:40:42 +01:00
Russell King ef26750009 Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes 2011-04-28 15:30:45 +01:00
Ben Hutchings 83a5d2d1b4 ARM: Fix .size directive for xscale_dma_a0_map_area
gas used to accept (and ignore?) .size directives which referred to
undefined symbols, as this does.  In binutils 2.21 these are treated
as fatal errors.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-28 17:56:31 +08:00
Rakesh Iyer 34abeeb235 Input: tegra-kbc - add ghost key filter
Add ghost key filtering support for the Nvidia Tegra matrix keyboard.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:19:14 -07:00
Stephen Boyd a8d2518c2a ARM: 6887/1: Mark broadcast_timer_setup() __cpuinit
This function is only called by percpu_timer_setup() which is
also __cpuinit marked. Thus it's safe to mark this function as
__cpuinit as well.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-27 22:02:47 +01:00
Sonny Rao 860ad7823f ARM: 6884/1: Fix infinite loop in ARM user perf_event backtrace code
The ARM user backtrace code can get into an infinite loop if it
runs into an invalid stack frame which points back to itself.
This situation has been observed in practice.  Fix it by capping
the number of entries in the backtrace.  This is also what other
architectures do in their backtrace code.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-27 22:02:46 +01:00
Tony Lindgren 3b1fb2ffec Merge branch 'for_tony_a_2.6.39rc' of git://git.pwsan.com/linux-2.6 into devel-fixes 2011-04-27 06:15:27 -07:00
Russell King 167f829752 Merge branch 'davinci-fixes' of git://gitorious.org/linux-davinci/linux-davinci into fixes 2011-04-27 08:44:34 +01:00
Russell King e04d6c53a5 Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes 2011-04-27 08:43:01 +01:00
Lucas De Marchi e9c549998d Revert wrong fixes for common misspellings
These changes were incorrectly fixed by codespell. They were now
manually corrected.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-04-26 23:31:11 -07:00
Nishanth Menon 3f126087ee OMAP3+: voltage: remove initial voltage
Blindly setting 1.2V in the initial structure may not even match the
default voltages stored in the voltage table which are supported for
the domain. For example, OMAP3430 core domain does not use 1.2V and
ends up generating a warning on the first transition.

Further, since omap2_set_init_voltage is called as part of the pm
framework's initialization sequence to configure the voltage required
for the current OPP, the call does(and has to) setup the system
voltage(curr_volt as a result) using the right mechanisms appropriate
for the system at that point of time. This also overrides
initialization we are currently doing in voltage.c making it
redundant. So, remove the wrong and redundant initialization.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-04-26 02:45:35 -07:00
Shweta Gulati 919686458f OMAP4: Intialize IVA Device in addition to DSP device.
OMAP4 has two different Devices IVA and DSP. DSP is bound
with IVA for DVFS. The registration of IVA dev in API
'omap2_init_processor_devices' was missing. Init dev for
'iva_dev' is added.

This also fixes the following error seen during boot as
omap2_set_init_voltage can now find the iva device

	omap2_set_init_voltage: Invalid parameters!
	omap2_set_init_voltage: Unable to put vdd_iva to its init voltage

Signed-off-by: Shweta Gulati <shweta.gulati@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-04-26 02:45:32 -07:00
Felipe Contreras 26a064d524 omap: rx51: mark reserved memory earlier
So that omap_vram_set_sdram_vram() is called before
omap_vram_reserve_sdram_memblock().

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-04-26 02:45:28 -07:00
omar ramirez bc16b3777e OMAP3: l3: fix for "irq 10: nobody cared" message
If an error occurs in the L3 on any other initiator than MPU,
the interrupt goes unhandled given that the 'base' register
was calculated with the initialized err_source value (which
coincidentally points to MPU) and not with the actual source
of the error.

Removed parenthesis that are not needed for the touched lines.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-04-26 02:24:50 -07:00
Oskar Andero 6ba5932ca4 arm: omap2: enable smc instruction for sleep34xx
This fixes broken build when using binutils 2.21.

Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-04-26 02:24:50 -07:00
Joe Perches 85ee7a1d39 treewide: cleanup continuations and remove logging message whitespace
Using C line continuation inside format strings is error prone.
Clean up the unintended whitespace introduced by misuse of \.
Neaten correctly used line continations as well for consistency.

drivers/scsi/arcmsr/arcmsr_hba.c has these errors as well,
but arcmsr needs a lot more work and the driver should likely be
moved to staging instead.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-26 10:24:37 +02:00
Jiri Kosina 07f9479a40 Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
2011-04-26 10:22:59 +02:00
Linus Torvalds 71e9e6a582 Merge branch 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson
* 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  rtc: fix coh901331 startup crash
  mach-ux500: fix i2c0 device setup regression
2011-04-25 19:00:55 -07:00
Frederic Weisbecker bf0b8f4b55 arm, hw_breakpoints: Fix racy access to ptrace breakpoints
While the tracer accesses ptrace breakpoints, the child task may
concurrently exit due to a SIGKILL and thus release its breakpoints
at the same time. We can then dereference some freed pointers.

To fix this, hold a reference on the child breakpoints before
manipulating them.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Link: http://lkml.kernel.org/r/1302284067-7860-5-git-send-email-fweisbec@gmail.com
2011-04-25 17:35:18 +02:00
Russell King - ARM Linux 45b146d746 ARM: Davinci: Fix I2C build errors
Several Davinci platforms select the I2C EEPROM support, but don't
select I2C support.  This causes I2C EEPROM support to be built into
the kernel, but I2C support may not be configured to be built in.
This leads to linker errors due to missing I2C symbols.

Arrange for I2C to be selected whenever EEPROM_AT24 is selected.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2011-04-25 14:19:32 +05:30
Sergei Shtylyov 9e7d24f622 DA830: fix SPI1 base address
Commit 54ce6883d2 (davinci: da8xx: add spi
resources and registration routine) wrongly assumed that SPI1 is mapped at
the same address on DA830/OMAP-L137 and DA850/OMAP-L138; actually, the base
address was valid only for the latter SoC. Teach the code to pass the correct
SPI1 memory resource for both SoCs...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2011-04-25 14:19:31 +05:30
Michael Williamson 336f402790 davinci: mityomapl138: Use auto-probe to determine attached PHY ID
Current board configurations involving the MityDSP-L138 and MityARM-1808
only have one attached PHY, but it's address may not be the same.  Default
the behavior to auto-probe for the PHY and use the first one found.

Signed-off-by: Michael Williamson <michael.williamson@criticallink.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2011-04-25 14:19:31 +05:30
Michael Williamson ad10e1051e davinci: mityomapl138: Use correct id for NAND controller
For the MityDSP-L138/MityARM-1808 SOMS, the NAND controller id (which needs
to correspond to the chipselect, and is used for controlling the HW ECC
computation) is not correct.  Fix it.

Signed-off-by: Michael Williamson <michael.williamson@criticallink.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2011-04-25 14:18:48 +05:30
Philipp Zabel e454d16320 ARM: pxa/magician: bq24022 regulator needs to be enabled
Add REGULATOR_CHANGE_STATUS flag to magician bq24022 regulator to enable charging.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-25 12:43:47 +08:00
Paul Parsons 745b1f4f62 ARM: pxa/hx4700: bq24022 regulator needs to be enabled
Add REGULATOR_CHANGE_STATUS flag to hx4700 bq24022 regulator. Without this
flag the bq24022 cannot be enabled and the battery will not charge.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Tested-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-25 12:43:47 +08:00
Rafael J. Wysocki bb072c3cf2 ARM / Samsung: Use struct syscore_ops for "core" power management
Replace sysdev classes and struct sys_device objects used for "core"
power management by Samsung platforms with struct syscore_ops objects
that are simpler.

This generally reduces the code size and the kernel memory footprint.
It also is necessary for removing sysdevs entirely from the kernel in
the future.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
2011-04-24 19:16:10 +02:00
Rafael J. Wysocki 2eaa03b5be ARM / PXA: Use struct syscore_ops for "core" power management
Replace sysdev classes and struct sys_device objects used for "core"
power management by the PXA platform code with struct syscore_ops
objects that are simpler.

This reduces the code size and the kernel memory footprint.  It also
is necessary for removing sysdevs entirely from the kernel in the
future.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-24 19:16:09 +02:00
Rafael J. Wysocki 905339807b ARM / SA1100: Use struct syscore_ops for "core" power management
Replace the sysdev class and struct sys_device used for power
management by the SA1100 interrupt-handling code with a
struct syscore_ops object which is simpler.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-24 19:16:09 +02:00
Rafael J. Wysocki b780805614 ARM / Integrator: Use struct syscore_ops for core PM
Replace the sysdev class and struct sys_device used for power
management by the Integrator interrupt-handling code with a
struct syscore_ops object which is simpler.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-24 19:16:08 +02:00
Rafael J. Wysocki 3c437ffd20 ARM / OMAP: Use struct syscore_ops for "core" power management
Replace the sysdev class and struct sys_device used for power
management in the OMAP's GPIO code with a struct syscore_ops object
which is simpler.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Kevin Hilman <khilman@ti.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-24 19:16:08 +02:00
Rafael J. Wysocki 328f5cc302 ARM: Use struct syscore_ops instead of sysdevs for PM in common code
Convert some ARM architecture's common code to using
struct syscore_ops objects for power management instead of sysdev
classes and sysdevs.

This simplifies the code and reduces the kernel's memory footprint.
It also is necessary for removing sysdevs from the kernel entirely in
the future.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-24 19:16:08 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9baeb7e47a at91: Add ARCH_ID and basic cpu macros definition for 5series chips family.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2011-04-23 11:03:07 +08:00
Greg Ungerer 91a2f4d3cd arm: at91: fix compiler warning for eb01 board build
Fix compiler warning when building for AT91EB01 board:

arch/arm/mach-at91/board-eb01.c:41: warning: initialisation from incompatible pointer type

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-04-23 11:03:07 +08:00
Greg Ungerer 0312e826a4 arm: at91: minimal defconfig for at91x40 SoC
A minimal defconfig for build testing the AT91x40 SoC.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-04-23 11:03:06 +08:00
Uwe Kleine-König 568aa7508c ARM: at91: AT91CAP9 has a macb device
commit

	ee621dd (net: atmel_macb Kconfig: remove long dependency line)

replaced a list of several explicit machines in the dependencies of MACB by
a single symbol that is selected by the respective machines. ee621dd missed
to let ARCH_AT91CAP9 select HAVE_NET_MACB though which is fixed here.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-04-23 10:43:34 +08:00
Linus Torvalds 8d082f8f3f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix unused warnings when !SND_HDA_NEEDS_RESUME
  ALSA: hda - Add a fix-up for Acer dmic with ALC271x codec
  ASoC: add a module alias to the FSI driver
  ALSA: emu10k1 - Fix "Music" controls to "Synth" controls in documents
  ARM: s3c2440: gta02; Register dfbmcs320 device for BT audio interface
  ASoC: codecs: JZ4740: Fix OOPS
  ASoC: Fix output PGA enabling in wm_hubs CODECs
  ASoC: sn95031: decorate function with __devexit_p()
  ASoC: SAMSUNG: Fix the inverted clocks handling for pcm driver
  ASoC: sst_platform: Fix lock acquring
  ASoC: fsi: driver safely remove for against irq
  ASoC: fsi: modify vague PM control on probe
  ASoC: fsi: take care in failing case of dai register
  MAINTAINERS: Update Samsung ASoC maintainer's id
  ASoC: WM8903: HP and Line out PGA/mixer DAPM fixes
  ASoC: Set left channel volume update bits for WM8994
  ASoC: fix config error path
  ASoC: check channel mismatch between cpu_dai and codec_dai
  ASoC: Tegra: Suspend/resume support
2011-04-22 14:59:07 -07:00
Mark Brown a9e3de6f9f Merge branch 'tegra' into for-2.6.40
Fix up merge with Harmony driver rename.

Conflicts:
	sound/soc/tegra/Kconfig
2011-04-21 12:00:27 +01:00
Stephen Warren 47912a657e ARM: Tegra: select MACH_HAS_SND_SOC_TEGRA_WM8903
CONFIG_SND_SOC_TEGRA_WM8903 is useful for many Tegra boards. To avoid the
ASoC tegra/Kconfig enumerating them all, instead have the Tegra machine
Kconfig select MACH_HAS_SND_SOC_TEGRA_WM8903 where appropriate, and have
SND_SOC_TEGRA_WM8903 depend on this.

[Redid ASoC diff so it applies. -- broonie]

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-21 11:57:31 +01:00
Ingo Molnar 42ac9e87fd Merge commit 'v2.6.39-rc4' into sched/core
Merge reason: Pick up upstream fixes.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-04-21 11:39:28 +02:00
Linus Torvalds f3e96492f6 Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6881/1: cputype.h uses __attribute_const__ which requires including kernel.h
  ARM: Add new syscalls
2011-04-20 17:40:45 -07:00
Avinash.H.M f95440ca5b OMAP2/3: hwmod: fix gpio-reset timeouts seen during bootup.
GPIO module expects the debounce clocks to be enabled during reset. It doesn't
reset properly and timeouts are seen, if this clock isn't enabled during
reset. Add the HWMOD_CONTROL_OPT_CLKS_IN_RESET flags to the GPIO HWMODs, with
which the debounce clocks are enabled during reset.

Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Avinash.H.M <avinashhm@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-04-20 12:43:56 -06:00
Eduardo Valentin a8ae645c01 OMAP3: PM: Do not rely on ROM code to restore CM_AUTOIDLE_PLL.AUTO_PERIPH_DPLL
As per OMAP3 erratum (i671), ROM code adds extra latencies while
restoring CM_AUTOIDLE_PLL register, if AUTO_PERIPH_DPLL is equal to 1.

This patch stores 0's in scratchpad content area corresponding to
AUTO_PERIPH_DPLL, to prevent ROM code to try to lock per DPLL, since
it won't respect proper programing scheme.

This register is then stored in prcm context. The saving and restore
is now done by kernel side.

Here follow the erratum description

DESCRIPTION

After OFF mode transition, among many restorations, the ROM Code restores the
CM_AUTOIDLE_PLL register, and after that, it tries to relock the PER DPLL.

In case the restoration data stored in scratchpad memory contains a field
CM_AUTOIDLE_PLL.AUTO_PERIPH_DPLL = 1, then the way the ROM Code restores and
locks the PER DPLL does not respect the PER DPLL programming scheme.

In that case, the DPLL might not lock. Meanwhile, when trying to lock the PER
DPLL, the ROM Code does not hang. Only extra latencies are introduced at
wake-up.

WORKAROUND

When saving the context-restore structure in scratchpad memory, in order to
respect the PER DPLL programming scheme, it is advised to store 0 in the
CM_AUTOIDLE_PLL.AUTO_PERIPH_DPLL field of the saved structure.

After wake-up, the application should store in CM_AUTOIDLE_PLL register the
right desired value.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-04-20 12:43:56 -06:00
Eduardo Valentin 8bc2e98bcb OMAP2+: PM: Fix the saving of CM_AUTOIDLE_PLL register on scratchpad area
The saving of CCR.CM_AUTOIDLE_PLL is done in scratchpad area.

However, in current code, the saving is done for CM_AUTOIDLE2_PLL
(offset 0x34) instead of CM_AUTOIDLE_PLL (offset 0x30).

This patch changes the code to save the correct register.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-04-20 12:43:56 -06:00
Tomi Valkeinen 2df122f52f OMAP4: clock data: Change DSS clock aliases
DSS driver has used fck and ick clocks on OMAP2/3 to get DSS HW up and
running, and also to get the pixel clock's source clock rate from the
fck.

On OMAP4 the clock data is set up in a different way, as there's no ick,
dss_fck points to a fake clock which just affects DSS's MODULEMODE, and
dss_dss_clk if the DSS_FCK.

>From DSS driver's point of view the dss_fck sounds like an ick, and
dss_dss_clk is the fck. While this is not entirely correct from HW point
of view, especially for the ick, configuring the clock aliases that way
makes DSS "just work" with OMAP4's clock setup.

In the (hopefully near) future DSS driver will be reworked to use
pm_runtime support which should clean up the clock code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-04-20 12:43:56 -06:00
Linus Walleij cf568c58eb mach-ux500: fix i2c0 device setup regression
Adding two sets of I2C devices to the same bus doesn't quite work,
atleast not anymore. Stash one array and determine how much of it
shall be added instead.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-04-20 18:43:53 +02:00
Mike Rapoport 21b42731e6 omap: convert boards that use SMSC911x to use gpmc-smsc911x
Convert boards that use SMSC911x to use gpmc-smsc911x.
Also allocate struct platform_device dynamically.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
[tony@atomide.com: folded in a fix from Igor Grindberg]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-04-20 08:54:09 -07:00
Mike Rapoport f0949f73a7 omap: gpmc-smsc911x: always set irq flags to IORESOURCE_IRQ_LOWLEVEL
SMSC911x devices attached to OMAP GPMC always use low level irqs.
Setting the appropriate flag in the irq resourse strucure allows using
.flags field in the omap_smsc911x_platform_data for driver specific
flags

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-04-20 08:53:59 -07:00
Kalle Jokiniemi 10299e2e4e ARM: RX-51: Enable isp1704 power on/off
The isp1704 usb tranceiver is used for charging and can be
disabled when not in use. Provide the powering routine to
the driver via platform data.

Also changed the indent of ".name" variable in rx51_charger_device
definition to use tabs same way as the new ".dev" variable indent.
Put this in the same patch since the indent fix is only needed
when there are multiple members in the struct definition.

Loosely based on earlier patches from Heikki Krogerus in
Nokia N900 maemo kernel.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com>
Acked-By: Heikki Krogerus <heikki.krogerus@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2011-04-20 17:48:50 +04:00
Kevin Hilman 5cf4c80a14 davinci: fix DEBUG_LL code for p2v changes
Fixup davinci UART low-level debug code for new ARM generic p2v changes.

Based on OMAP changes by Tony Lindgren

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-04-19 16:54:15 -07:00
Benoit Cousson 1286eeb2fd OMAP2+: hwmod data: Fix wrong dma_system end address
OMAP2420, 2430 and 3xxx were using the OMAP4 end address
that unfortunately is not located at the same base address.
Moreover the OMAP4 size was set to 256 instead of 4096.

Change all .pa_end to set them to .pa_start + 0xfff

Cc: "G, Manjunath Kondaiah" <manjugk@ti.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Reported-by: Michael Fillinger <m-fillinger@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-04-19 10:15:36 -06:00
Greg Kroah-Hartman 50ee9339c7 Merge 2.6.39-rc4 into usb-next
This is needed to help resolve some xhci issues and other minor
differences.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19 05:50:38 -07:00
Linus Torvalds e024f69de9 Merge branch 'for-39-rc4' of git://codeaurora.org/quic/kernel/davidb/linux-msm
* 'for-39-rc4' of git://codeaurora.org/quic/kernel/davidb/linux-msm:
  msm: timer: fix missing return value
  msm: Remove extraneous ffa device check
2011-04-18 15:44:29 -07:00
Fabio Estevam bcb22a94f6 ARM: mx5/mx53_loco: Fix build warning related to gpio_keys_button structure
Fix the following warning:

CC      arch/arm/mach-mx5/board-mx53_loco.o
arch/arm/mach-mx5/board-mx53_loco.c:203: warning: initialization discards qualifiers from pointer target type

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-18 19:51:14 +02:00
Mark Brown c6d46678a1 Merge branch 'tegra' into for-2.6.40 2011-04-18 18:08:22 +01:00
Stephen Warren 61a6d0764b ARM: Tegra: Add to tegra_wm8903_platform_data
Seaboard derivate Kaen has a GPIO to mute the headphone output. Add a field
to tegra_wm8903_platform_data so the board files can pass the GPIO number
for that to the ASoC machine driver.

Also, initialize this new field to a "not present" value for Harmony.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 17:55:58 +01:00
Stephen Warren 7b33af252f ASoC: Tegra: Rename pdev tegra-snd-harmony to tegra-snd-wm8903
Soon, this machine driver will be updated to handle a number of Tegra boards
using the WM8903 codec. Rename the platform device in advance to reflect this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 17:54:09 +01:00
Stephen Warren 4651d55668 ARM: Tegra: Rename harmony_audio.h -> tegra_wm8903_pdata.h
The audio driver will soon support more than just the Tegra Harmony board.
Rename the platform data header file and data type to reflect this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18 17:54:05 +01:00
Mark Brown fac56c2df5 Merge commit 'v2.6.39-rc3' into for-2.6.39 2011-04-18 17:12:14 +01:00
Kuninori Morimoto a7f800131f ARM: mach-shmobile: clock-sh7372: remove status check from fsidiv_recalc
clock status check is not needed in recalc function.
clk->rate will be 0 in clk_set_rate without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-18 18:35:45 +09:00
Linus Torvalds 59c87de883 Merge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung
* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: SAMSUNG: Fix warning 's3c_pm_show_resume_irqs' defined but not used
  ARM: SAMSUNG: Fix build failure in PM CRC check code
  ARM: S5P: Remove unused s3c_pm_check_resume_pin
2011-04-17 17:36:45 -07:00
Jonathan Cameron e9569c1511 ARM: 6881/1: cputype.h uses __attribute_const__ which requires including kernel.h
Issue manifests as:

In file included from arch/arm/mach-pxa/include/mach/hardware.h:62,
                  from arch/arm/mach-pxa/include/mach/gpio.h:28,
                  from /home/jic23/src/kernel/temp-remove/arch/arm/include/asm/gpio.h:5,
                  from include/linux/gpio.h:7,
                  from drivers/staging/iio/gyro/adis16080_core.c:8:
 /home/jic23/src/kernel/temp-remove/arch/arm/include/asm/cputype.h:57: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'read_cpuid_id'
...

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-16 21:42:59 +01:00
Stephen Boyd a35d4e5873 ARM: 6871/1: Use asm-generic/sizes.h
Commit d232b12 (asm-generic headers: add sizes.h, 2011-01-15)
introduced a generic sizes.h. Use that instead of the ARM specific
version.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-16 12:52:18 +01:00
Linus Torvalds e82e6f16a8 Merge branch 'for-linus' of git://android.git.kernel.org/kernel/tegra
* 'for-linus' of git://android.git.kernel.org/kernel/tegra:
  arm: tegra: fix error check in tegra2_clocks.c
  ARM: tegra: gpio: Fix unused variable warnings
2011-04-15 20:19:17 -07:00
Russell King 0d58a2824d ARM: Add new syscalls
Add syscalls for name_to_handle_at, open_by_handle_at, clock_adjtime
and syncfs.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-15 13:26:40 +01:00
Nicolas Pitre 88b9ef4526 ARM: 6879/1: fix personality test wrt usage of domain handlers
There are optional bits that may complement a personality ID.  It is
therefore wrong to simply test against the absolute current->personality
value to determine the effective personality.  The PER_LINUX_32BIT is
itself just PER_LINUX with one of those optional bits set.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-14 09:15:25 +01:00
Nicolas Pitre 5e143436d0 ARM: 6878/1: fix personality flag propagation across an exec
Our SET_PERSONALITY() implementation was overwriting all existing
personality flags, including ADDR_NO_RANDOMIZE, making them unavailable
to processes being exec'd after a call to personality() in user space.
This prevents the gdb test suite from running successfully.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-14 09:15:24 +01:00
Nicolas Pitre df5419a9a9 ARM: 6877/1: the ADDR_NO_RANDOMIZE personality flag should be honored with mmap()
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-14 09:15:24 +01:00
Stephen Boyd b025a3f836 ARM: 6876/1: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS
This config option isn't actually used anywhere and can be safely
removed. The last user was traps.c before commit 082f47a ([ARM]
always allow dump_stack() to produce a backtrace, 2007-07-05).

Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-14 09:15:24 +01:00
Peter Zijlstra 184748cc50 sched: Provide scheduler_ipi() callback in response to smp_send_reschedule()
For future rework of try_to_wake_up() we'd like to push part of that
function onto the CPU the task is actually going to run on.

In order to do so we need a generic callback from the existing scheduler IPI.

This patch introduces such a generic callback: scheduler_ipi() and
implements it as a NOP.

BenH notes: PowerPC might use this IPI on offline CPUs under rare conditions!

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20110405152728.744338123@chello.nl
2011-04-14 08:52:32 +02:00
Maurus Cuelenaere baab7307c7 ARM: SAMSUNG: Fix warning 's3c_pm_show_resume_irqs' defined but not used
s3c_pm_show_resume_irqs() is used by some s3c_pm_arch_show_resume_irqs()
implementations, which get included through mach/pm-core.h. Add __maybe_unused
to silence warnings when it isn't used (e.g. on S3C64XX platforms).

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-04-14 13:20:05 +09:00
Abhilash Kesavan 96cfb97dd4 ARM: SAMSUNG: Fix build failure in PM CRC check code
This patch fixes build error that occurs on enabling the Samsung
specific PM CRC check code. Missed removing this reference of
s3c_sleep_save_phys during move to generic cpu suspend/resume
support.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-04-14 13:19:49 +09:00
Abhilash Kesavan dc5b966214 ARM: S5P: Remove unused s3c_pm_check_resume_pin
The s3c_pm_check_resume_pin() is not being used and can be safely
removed to fix the build warning.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-04-14 13:19:40 +09:00
Joonyoung Shim 01da92f7f6 ARM: EXYNOS4: Add usb ehci device to the NURI board
This patch is to support usb ehci device to the NURI board.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 16:53:30 -07:00
Joonyoung Shim 8f1d169f99 ARM: EXYNOS4: Add usb host phy control
EXYNOS4 has 2 phys for usb host and usb device. This patch supports to
control usb host phy of EXYNOS4.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 16:50:44 -07:00
Joonyoung Shim 3e11266212 ARM: S5P: Add usb ehci device
This patch adds usb ehci device definition for samsung s5p cpus.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13 16:50:44 -07:00
Russell King a84bd2ee81 Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes 2011-04-13 23:32:13 +01:00
Lars-Peter Clausen 6caa15d0b8 ARM: s3c2440: gta02; Register dfbmcs320 device for BT audio interface
Register the dfbmcs320 device which provides the PCM DAI for the bluetooth
module.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-13 10:36:45 -07:00
Eric Miao 7db6a7fa09 ARM: pxa: convert incorrect IRQ_TO_IRQ() to irq_to_gpio()
This fixes the failure to register the IRQ_RTCAlrm alarm as a wakeup
event.  It is misinterpreted as a gpio irq not a PWER bitmask. Fixed
this by converting the incorrect IRQ_TO_IRQ() to a correct version of
irq_to_gpio().

Reported-by: Nick Bane <nickbane1@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-13 09:30:40 +08:00
Haojian Zhuang 83fd6c685b ARM: mmp: align NR_BUILTIN_GPIO with gpio interrupt number
Avoid to mismatch between NR_BUILTIN_GPIO and gpio interrupt number.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-12 23:26:39 +08:00
Haojian Zhuang a0a4dcbca7 ARM: pxa: align NR_BUILTIN_GPIO with GPIO interrupt number
Avoid to mismatch between NR_BUILTIN_GPIO and GPIO interrupt number

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-12 23:25:54 +08:00
Haojian Zhuang 6932613060 ARM: pxa: always clear LPM bits for PXA168 MFPR
Bit[9:7] should always be zero in PXA168.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2011-04-12 23:24:41 +08:00
Thomas Gleixner b5eee2fdef ARM: mxc: Add missing lockdep annotation
The irq_set_wake() function of the gpio irq_chip calls
enable/disable_irq_wake() on the demultiplex interrupt. That leads to
a lockdep warning "INFO: possible recursive locking detected" because
irq_set_type() is called under irq_desc->lock and the *_irq_wake()
calls take irq_desc->lock of the demux interrupt.

Tell lockdep that the gpio irqs are in a different lock class.

Documentation/SubmitChecklist:
 15: All codepaths have been exercised with all lockdep features enabled.

That's a non-optional requirement, AFAICT.

Reported-and-tested-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LAKML-Reference: alpine.LFD.2.00.1104041416290.19945@localhost6.localdomain6
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:48:17 +02:00
Dave Martin 0575b4b83e ARM: mxc: Correct data alignment in headsmp.S for CONFIG_THUMB2_KERNEL
Directives such as .long and .word do not magically cause the
assembler location counter to become aligned in gas.  As a
result, using these directives in code sections can result in
misaligned data words when building a Thumb-2 kernel
(CONFIG_THUMB2_KERNEL).

This is a Bad Thing, since the ABI permits the compiler to
assume that fundamental types of word size or above are word-
aligned when accessing them from C.  If the data is not really
word-aligned, this can cause impaired performance and stray
alignment faults in some circumstances.

In general, the following rules should be applied when using
data word declaration directives inside code sections:

    * .quad and .double:
         .align 3

    * .long, .word, .single, .float:
         .align (or .align 2)

    * .short:
        No explicit alignment required, since Thumb-2
        instructions are always 2 or 4 bytes in size.
        immediately after an instruction.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
LAKML-Reference: 1289913217-8672-1-git-send-email-dave.martin@linaro.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:48:10 +02:00
Uwe Kleine-König f61b9fc27e ARM: mxs/clock-mx28: fix up name##_set_rate
For the lcdif clock get_rate looks as follows:

	read div from HW_CLKCTRL_DIS_LCDIF.DIV
	return clk_get_rate(clk->parent) / div

with clk->parent being ref_pix_clk on my system.

ref_pix_clk's rate depends on HW_CLKCTRL_FRAC1.PIXFRAC.

The set_rate function for lcdif does:

	parent_rate = clk_get_rate(clk->parent);
	based on that calculate frac and div such that
	  parent_rate * 18 / frac / div is near the requested rate.
	HW_CLKCTRL_FRAC1.PIXFRAC is updated with frac
	HW_CLKCTRL_DIS_LCDIF.DIV is updated with div

For this calculation to be correct parent_rate needs to be
initialized not with the clock rate of lcdif's parent (i.e. ref_pix) but
that of its grandparent (i.e. ref_pix' parent == pll0_clk).

The obvious downside of this patch is that now set_rate(lcdif) changes
its parent's rate, too.  Still this is better than a wrong rate.

Acked-by: Shawn Guo <shawn.guo@freescale.com>
LAKML-Reference: 20110225084950.GA13684@S2101-09.ap.freescale.net
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:48:02 +02:00
Uwe Kleine-König 32a90b6e65 ARM: imx: fix usb related build failure for mach-vpr200
This was broken by

	4bd597b (ARM i.MX ehci: do ehci init in board specific functions)

and fixes:

  CC      arch/arm/mach-mx3/mach-vpr200.o
arch/arm/mach-mx3/mach-vpr200.c:263: error: unknown field 'flags' specified in initializer
arch/arm/mach-mx3/mach-vpr200.c:264: warning: initialization makes pointer from integer without a cast

by just applying the change to mach-vpr200.c that the other machine files
got by 4bd597b.

LAKML-Reference: 1302257029-17397-1-git-send-email-u.kleine-koenig@pengutronix.de
Acked-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-04-12 09:47:55 +02:00
Justin P. Mattock aec995900f ARM: 6872/1: arch:common:Makefile Remove unused config in the Makefile.
The patch below removes an unused config variable found by using a kernel
cleanup script.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-10 21:13:37 +01:00
Catalin Marinas c98c09773d ARM: 6868/1: Preserve the VFP state during fork
VFP registers d16-d31 are callee saved registers and must be preserved
during function calls, including fork(). The VFP configuration should
also be preserved. The patch copies the full VFP state to the child
process.

Reported-by: Paul Wright <paul.wright@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-10 21:13:37 +01:00
Catalin Marinas 2e82669acf ARM: 6867/1: Introduce THREAD_NOTIFY_COPY for copy_thread() hooks
This patch adds THREAD_NOTIFY_COPY for calling registered handlers
during the copy_thread() function call. It also changes the VFP handler
to use a switch statement rather than if..else and ignore this event.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-10 21:13:36 +01:00
Catalin Marinas 974508262e ARM: 6866/1: Do not restrict HIGHPTE to !OUTER_CACHE
The HIGHPTE config option depends on !OUTER_CACHE. However, there is no
set_pte_ext() function that does outer cache maintenance by physical
address, hence no need for such restriction.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-10 21:13:36 +01:00
Will Deacon 6759788b94 ARM: 6865/1: perf: ensure pass through zero is counted on overflow
Commit a737823d ("ARM: perf: ensure overflows aren't missed due to IRQ
latency") changed the way that event deltas are calculated on overflow
so that we don't miss events when the new count value overtakes the
previous one.

Unfortunately, we forget to count the event that passes through zero so
we end up being off by 1. This patch adds on the correction.

Reported-by: Chris Moore <moore@free.fr>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-10 21:13:35 +01:00
Will Deacon e89c0d7090 ARM: 6864/1: hw_breakpoint: clear DBGVCR out of reset
The DBGVCR, used for configuring vector catch debug events, is UNKNOWN
out of reset on ARMv7. When enabling monitor mode, this must be zeroed
to avoid UNPREDICTABLE behaviour.

This patch adds the zeroing code to the debug reset path.

Cc: stable <stable@kernel.org>
Reported-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-10 21:13:35 +01:00
Justin P. Mattock 6eab04a876 treewide: remove extra semicolons
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-10 17:01:05 +02:00
Joe Perches 06794eaeb7 treewide: Fix iomap resource size miscalculations
Convert off-by-1 r->end - r->start to resource_size(r)

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-10 17:01:04 +02:00
Joe Perches b0c3af5ef0 arm: mach-u300/gpio: Fix mem_region resource size miscalculations
Convert off-by-1 r->end - r->start to resource_size(r)

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-10 17:01:04 +02:00
Jesper Juhl 8620d81fad ARM: Remove duplicate linux/sched.h include from arch/arm/plat-iop/time.c
There's no need to include linux/sched.h more than once
in arch/arm/plat-iop/time.c

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-10 17:01:02 +02:00
Linus Torvalds 174457391a Merge branch 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  ARM: arch-shmobile: only run FSI init on respective boards
  ARM: arch-shmobile: only run HDMI init on respective boards
  ARM: mach-shmobile: Correctly check for CONFIG_MACH_MACKEREL
2011-04-07 12:49:01 -07:00
Kuninori Morimoto 6084c81e8a ARM: arch-shmobile: only run FSI init on respective boards
If several boards are enabled in the kernel configuration,
fsi_init_pm_clock() functions from board-ap4evb.c
will run on any of them. Prevent this by calling these functions from the
.init_machine() callback instead of using device_initcall().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 11:21:38 -07:00
Guennadi Liakhovetski 2ce51f8b93 ARM: arch-shmobile: only run HDMI init on respective boards
If several boards are enabled in the kernel configuration,
hdmi_init_pm_clock() functions from board-ap4evb.c and board-mackerel.c
will run on any of them. Prevent this by calling these functions from the
.init_machine() callback instead of using device_initcall().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 11:21:24 -07:00
Simon Horman 4a0f081d1b ARM: mach-shmobile: Correctly check for CONFIG_MACH_MACKEREL
I made a bit of a thinko when adding Mackerel to the boards
that support zboot using MMCIF.

Reported-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-04-06 11:08:20 -07:00
Santosh Shilimkar 43b3e18982 ARM: 6860/1: OMAP4: Move the privately used SMP boot functions to OMAP specific header.
Header files in arch/arm/*/include/mach included from
arch/arm/include/asm/*.h are there to provide necessary definitions for
either the rest of the kernel or the ARM specific parts.  They shouldn't
be polluted with *any* platform private stuff which is not absolutely
necessary to satisfy the rest of the kernel.

Hence move the OMAP specific SMP boot functions to different header
instead of keeping them in 'plat/smp.h' which gets included indirectly
by linux/smp.h

The patch is outcome of the discussion in below thread:
	http://www.spinics.net/lists/arm-kernel/msg120363.html

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-04 09:36:21 +01:00
Russell King 6a7861825f ARM: Only allow PM_SLEEP with CPUs which support suspend
Offering CONFIG_PM_SLEEP for CPUs which do not support suspend leads to
build errors, so only set CONFIG_ARCH_SUSPEND_POSSIBLE if we have a CPU
selected which supports suspend.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-02 10:15:28 +01:00
Russell King 29ea23ff90 ARM: Make consolidated PM sleep code depend on PM_SLEEP
CONFIG_PM is now set whenever we support either runtime PM in addition
to suspend and hibernate.  This causes build errors when runtime PM is
enabled on a platform, but the CPU does not have the appropriate support
for suspend.

So, switch this code to use CONFIG_PM_SLEEP rather than CONFIG_PM to
allow runtime PM to be enabled without causing build errors.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-02 10:08:55 +01:00
Nicolas Kaiser 906c3b616d arm: tegra: fix error check in tegra2_clocks.c
Checking 'rate < 0' doesn't work because 'rate' is unsigned.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Colin Cross <ccross@android.com>
2011-04-01 13:32:25 -07:00
David Brown 893b66c39d msm: timer: fix missing return value
Change af90f10d38 "ARM: 6759/1: smp: Select local timers vs broadcast
timer support runtime" missed a return statement, causing a compile
warning:

  arch/arm/mach-msm/timer.c:272: warning: 'return' with no value, in
  function returning non-void

Trivially return 0 for success when running on cpu 0 (to match the
comment and previous behavior).

Signed-off-by: David Brown <davidb@codeaurora.org>
2011-03-31 13:15:40 -07:00
David Brown 62f0988ee5 msm: Remove extraneous ffa device check
The qsd8x50 board file contains a few references to machine_is_...
macros that are otherwise unused, and contain no machine definition.
The recent purge of unused machine definitions breaks the compilation
of this target.

Since the machine cannot ever be used, just remove the bogus checks.

Signed-off-by: David Brown <davidb@codeaurora.org>
2011-03-31 13:15:40 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Colin Cross c8309ef6a4 ARM: tegra: gpio: Fix unused variable warnings
Change b0f18edaf6
(arm: tegra: Remove unused bogus irq enable/disable magic)
introduces warnings:
arch/arm/mach-tegra/gpio.c: In function 'tegra_gpio_resume':
arch/arm/mach-tegra/gpio.c:260: warning: unused variable 'i'
arch/arm/mach-tegra/gpio.c: In function 'tegra_gpio_suspend':
arch/arm/mach-tegra/gpio.c:283: warning: unused variable 'i'

Fix them, and fix a coding style issue on the same lines.

Signed-off-by: Colin Cross <ccross@android.com>
Acked-by: Erik Gilling <konkers@konkers.net>
2011-03-30 12:37:53 -07:00
Linus Torvalds 6aba74f279 Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  avr32: Fix missing irq namespace conversion
  powerpc: qe_ic: Rename get_irq_desc_data and get_irq_desc_chip
  genirq: Remove the now obsolete config options and select statements
  arm: versatile : Fix typo introduced in irq namespace cleanup
  sound: Fixup the last user of the old irq functions
  genirq: Remove obsolete comment
  genirq: Remove now obsolete set_irq_wake()
  sh: Fix irq cleanup fallout
  x86: apb_timer: Fixup genirq fallout
  genirq: Fix misnamed label in handle_edge_eoi_irq

Fix up crazy conflict in arch/powerpc/include/asm/qe_ic.h:

 - commit eead4d5c63 ("powerpc: qe_ic: Rename get_irq_desc_data and
   get_irq_desc_chip") made the helper functions use
   irq_desc_get_handler_data() instead of the legacy (and no longer
   existing) get_irq_desc_data.

 - commit d4db35e8dc ("powerpc/qe_ic: Fix another breakage from the
   irq_data conversion") used irq_desc_get_chip_data() instead.

According to Thomas, the former is the correct direct conversion, but it
does look like both should work (arch/powerpc/sysdev/qe_lib/qe_ic.c
seems to initialize both to the same thing), and the chip data in some
ways is the more logical.  Somebody should really decide on one of the
other.

This merge picks irq_desc_get_handler_data() as the straightforward pure
conversion to new names, as per Thomas.
2011-03-30 09:35:52 -07:00
Linus Torvalds 85eb1513c1 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (65 commits)
  ARM: 6826/1: Merge v6 and v7 DEBUG_LL DCC support
  ARM: 6838/1: etm: fix section mismatch warning
  ARM: 6837/1: remove unused pci_fixup_prpmc1100
  ARM: 6836/1: kprobes/fix emulation of LDR/STR instruction when Rn == PC
  Fix the broken build for Marvell Dove platform.
  ARM: 6835/1: perf: ensure overflows aren't missed due to IRQ latency
  ARM: 6834/1: perf: reset counters on all CPUs during initialisation
  ARM: 6833/1: perf: add required isbs() to ARMv7 backend
  ARM: 6825/1: kernel/sleep.S: fix Thumb2 compilation issues
  ARM: 6807/1: realview: Fix secondary GIC initialisation for EB with MPCore tile
  arm: mach-mx3: pcm043: add write-protect and card-detect for SD1
  eukrea_mbimxsd51: add SD Card detect
  eukrea_mbimxsd25-baseboard: add SD card detect
  mx3/eukrea_mbimxsd-baseboard: add SD card detect support
  mx3/eukrea_mbimxsd-baseboard: fix gpio request
  ARM: mxs/mx28evk: add mmc device
  ARM: mxs/mx23evk: add mmc device
  ARM: mxs: dynamically allocate mmc device
  ARM: mx51_efika: update platform data for new mfd changes
  mx2/iomux: Set direction for CSPI2 pins
  ...
2011-03-30 07:50:45 -07:00
Grant Likely e282326600 arm: versatile : Fix typo introduced in irq namespace cleanup
Commit 6845664(arm: Cleanup the irq namespace) introduces a typo
causing a build failure for the versatile platform.

[ tglx: Sorry, my bad. Have no idea how I fatfingered that ]

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
LKML-Reference: <20110330060229.27397.7628.stgit@ponder>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-30 12:02:15 +02:00
Russell King b43d151e96 Merge branches 'fixes' and 'devel-stable' into for-linus 2011-03-29 21:54:54 +01:00
Linus Torvalds 6b2a4f7a5b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (26 commits)
  mmc: SDHI should depend on SUPERH || ARCH_SHMOBILE
  mmc: tmio_mmc: Move some defines into a shared header
  mmc: tmio: support aggressive clock gating
  mmc: tmio: fix power-mode interpretation
  mmc: tmio: remove work-around for unmasked SDIO interrupts
  sh: fix SDHI IO address-range
  ARM: mach-shmobile: fix SDHI IO address-range
  mmc: tmio: only access registers above 0xff, if available
  mfd: remove now redundant sh_mobile_sdhi.h header
  sh: convert boards to use linux/mmc/sh_mobile_sdhi.h
  ARM: mach-shmobile: convert boards to use linux/mmc/sh_mobile_sdhi.h
  mmc: tmio: convert the SDHI MMC driver from MFD to a platform driver
  sh: ecovec: use the CONFIG_MMC_TMIO symbols instead of MFD
  mmc: tmio: split core functionality, DMA and MFD glue
  mmc: tmio: use PIO for short transfers
  mmc: tmio-mmc: Improve DMA stability on sh-mobile
  mmc: fix mmc_app_send_scr() for dma transfer
  mmc: sdhci-esdhc: enable esdhc on imx53
  mmc: sdhci-esdhc: use writel/readl as general APIs
  mmc: sdhci: add the abort CMDTYPE bits definition
  ...
2011-03-29 12:09:30 -07:00
Thomas Gleixner f38c02f3b3 arm: Fold irq_set_chip/irq_set_handler
Use irq_set_chip_and_handler() instead. Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:58 +02:00
Thomas Gleixner 9323f26186 arm: Reorder irq_set_ function calls
Reorder 
irq_set_chip()
irq_set_chip_data()
irq_set_handler()

to

irq_set_chip()
irq_set_handler()
irq_set_chip_data()

so the next patch can combine irq_set_chip() and irq_set_handler() to
irq_set_chip_and_handler().

Automated conversion with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:58 +02:00
Thomas Gleixner 6845664a6a arm: Cleanup the irq namespace
Convert to the new function names. Automated with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:57 +02:00
Thomas Gleixner 25a5662a13 arm: Use generic show_interrupts()
Use the generic version and just keep the arch specific output.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:57 +02:00
Thomas Gleixner cf0d6b76c1 arm: dove: Use proper irq accessor functions
Remove the obsolete desc_handle_irq() helper.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:57 +02:00
Thomas Gleixner fdea77b88e arm: gic: Use proper accessor functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:56 +02:00
Thomas Gleixner ac93cdbd6e arm: at91: Cleanup irq chip
Avoid the whole lazy disable dance in the demux handler by providing a
irq_disable() callback.

Use the proper accessor functions and tidy up gpio_irq_handler()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:56 +02:00
Thomas Gleixner 5093aec872 arm: davinci: Cleanup irq chip code
Make use of the new functionality which ensures that irq_set_type is
called with the chip masked. Unmask is only done when the interrupt is
not disabled.

Retrieve the trigger type from irq_data in unmask

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:56 +02:00
Thomas Gleixner d1735a2ebd arm: ep93xx: Use proper irq accessor functions
No need to write the flow type. Core code does already.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:56 +02:00
Thomas Gleixner a0b0f5ac78 arm: gemini: Use proper irq accessor functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:55 +02:00
Thomas Gleixner eb2d7188f9 arm: mxc: Use generic_handle_irq()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:55 +02:00
Thomas Gleixner ce4ed256b8 arm: vt8500: Use proper irq accessors
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:55 +02:00
Thomas Gleixner 70c4fa2265 arm: msm: Use proper irq accessor functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:54 +02:00
Thomas Gleixner 8c04a1769f arm: plat-omap: Cleanup irq_desc access
1) Core code stores the flow type already
2) Flow type is accessible in irq_data

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:54 +02:00
Thomas Gleixner d1118f68b6 arm: nomadik: Use local irq state
Store the enabled mask in the local state, so there is no need to
fiddle in the irq descriptor.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:54 +02:00
Thomas Gleixner e0fc5b3226 arm: stmp3xxx: Use generic_handle_irq()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:54 +02:00
Thomas Gleixner 7222f3912f arm: plat-samsung: Use proper irq accessor functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:53 +02:00
Thomas Gleixner e83bbb115e arm: Cleanup irq_desc access
Use the proper wrappers and use the flow type in irq_data.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:53 +02:00
Thomas Gleixner cf8d1581c4 arm: msm: Convert to new irq chip functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:53 +02:00
Thomas Gleixner 1b7a2d90c8 arm: Use irq flag setter function
Use the proper accessor function instead of fiddling in the status
bits directly.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
2011-03-29 14:47:52 +02:00
Thomas Gleixner 1475b85d08 arm: Use genirq lockdep helper to set lock class
Remove the open coded access to irq_desc which will fail on sparse irq
and use the proper wrappers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:52 +02:00
Thomas Gleixner b0f18edaf6 arm: tegra: Remove unused bogus irq enable/disable magic
The core code handles thees already.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Colin Cross <ccross@android.com>
Cc: linux-tegra@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
2011-03-29 14:47:52 +02:00
Thomas Gleixner 1738209a15 arm: h720x: Fix irq conversion fallout
The conversion missed, that one of the irq functions is called from
the init code. Split it out, so the irq number based call works.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:52 +02:00
Thomas Gleixner 4fe25e3898 arm: nomadik: Remove non existing cpu id check
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:51 +02:00
Thomas Gleixner 504f1dfecc arm: ns9xxx: Remove non exisiting machine checks
The machine id cleanup missed to remove the checks for now removed
ids.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:51 +02:00
Thomas Gleixner a40bd62153 arm: dove: Use correct GPIO_BASE and remove orion_gpio_init() leftover
commit 9eac6d0 (ARM: Remove dependency of plat-orion GPIO code on mach
directory includes) missed to convert one instance of
DOVE_GPIO_VIRT_BASE and left the orion_gpio_init() in mpp.c

Fix it up.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:51 +02:00
Thomas Gleixner a68e5e0b9f arm: at91: at572d940hf: Fix SDRAMC define
That wants to be AT91_SDRAMC0

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:50 +02:00
Thomas Gleixner f2e0bf2181 arm: footbridge: Make cksrc_dc21285_disable() void
This clocksource function needs to be void.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:50 +02:00
Thomas Gleixner 11f2cde116 arm: bios32: Remove non exisiting machine code
The id removal left this machine check in which breaks the build on
some platforms. Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:50 +02:00
Andres Salomon b5b4bc32b6 ARM: mx51_efika: fix build error due to new mfd changes
MFD changes in 4ec1b54c ('mfd: mfd_cell is now implicitly available to
mc13xxx drivers') changed the mc13xxx_platform_data struct layout.

At the time all users were changed, but this driver was introduced in
another tree at the same time.  This updates the mc13xxx_platform_data
user, fixing a build error.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-28 17:51:17 -07:00
Linus Torvalds e5217fb8ae Merge branches 'irq-cleanup-for-linus' and 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  vlynq: Convert irq functions

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq; Fix cleanup fallout
  genirq: Fix typo and remove unused variable
  genirq: Fix new kernel-doc warnings
  genirq: Add setter for AFFINITY_SET in irq_data state
  genirq: Provide setter inline for IRQD_IRQ_INPROGRESS
  genirq: Remove handle_IRQ_event
  arm: Ns9xxx: Remove private irq flow handler
  powerpc: cell: Use the core flow handler
  genirq: Provide edge_eoi flow handler
  genirq: Move INPROGRESS, MASKED and DISABLED state flags to irq_data
  genirq: Split irq_set_affinity() so it can be called with lock held.
  genirq: Add chip flag for restricting cpu_on/offline calls
  genirq: Add chip hooks for taking CPUs on/off line.
  genirq: Add irq disabled flag to irq_data state
  genirq: Reserve the irq when calling irq_set_chip()
2011-03-28 17:39:54 -07:00
Linus Torvalds bc5bbc4541 Merge branch 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson
* 'for-torvalds' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  mach-ux500: configure board for the TPS61052 regulator v2
  mach-ux500: provide ab8500 init vector
  mach-ux500: board support for AB8500 GPIO driver
  gpio: driver for 42 AB8500 GPIO pins
2011-03-28 15:14:45 -07:00
Stephen Boyd dfad549d98 ARM: 6826/1: Merge v6 and v7 DEBUG_LL DCC support
The inline assembly differences for v6 vs. v7 are purely
optimizations. On a v7 processor, an mrc with the pc sets the
condition codes to the 28-31 bits of the register being read. It
just so happens that the TX/RX full bits the DCC support code is
testing for are high enough in the register to be put into the
condition codes. On a v6 processor, this "feature" isn't
implemented and thus we have to do the usual read, mask, test
operations to check for TX/RX full. Thus, we can drop the v7
implementation and just use the v6 implementation for both.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-28 19:01:43 +01:00
Ming Lei 8e8806990c ARM: 6838/1: etm: fix section mismatch warning
The patch fixes the warning below:

WARNING: arch/arm/kernel/built-in.o(.data+0x27c): Section mismatch in reference from the variable etb_driver to the function .init.text:etb_probe()
The variable etb_driver references
the function __init etb_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

WARNING: arch/arm/kernel/built-in.o(.data+0x2cc): Section mismatch in reference from the variable etm_driver to the function .init.text:etm_probe()
The variable etm_driver references
the function __init etm_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-28 19:01:17 +01:00
Colin Cross 7f479c64a5 ARM: 6837/1: remove unused pci_fixup_prpmc1100
The PrPMC1100 machine was removed in 2.6.11, but left a reference to machine_is_prpmc1100 in arch/arm/kernel/bios32.c.  6f82f4db80 removed the machine type, which causes a build failure:

CC      arch/arm/kernel/bios32.o
arch/arm/kernel/bios32.c: In function 'pci_fixup_prpmc1100':
arch/arm/kernel/bios32.c:174: error: implicit declaration of function 'machine_is_prpmc1100'

Remove the unused pci_fixup_prpcm1100.

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-28 19:01:17 +01:00
Viktor Rosendahl 0652f06736 ARM: 6836/1: kprobes/fix emulation of LDR/STR instruction when Rn == PC
The Rn value from the emulation is unconditionally written back;
this is fine as long as Rn != PC because in that case, even if the
instruction isn't a write back instruction, it will only result in the
same value being written back.

In case Rn == PC, then the emulated instruction doesn't have the
actual PC value in Rn but an adjusted value; when this is written
back, it will result in the PC being incorrectly updated.

An altenative solution would be to check bits 24 and 22 to see whether
the instruction actually is a write back instruction or not. I think
it's enough to check whether Rn != PC,  because:
- it's looks cheaper than the alternative
- to my understaning it's not permitted to update the PC with a write
back instruction, so we don't lose any ability to emulate legal
instructions.
- in case of writing back for non write back instructions where Rn != PC, it doesn't matter because the values are the same.

Regarding the second point above, it would possibly be prudent to add
some checking to prep_emulate_ldr_str(), so that instructions with
both write back and Rn == PC would be rejected.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-28 19:01:16 +01:00
Russell King 255bae73b2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into fixes 2011-03-28 18:57:19 +01:00
Russell King 5f183860d5 Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable 2011-03-28 18:52:44 +01:00
Thomas Gleixner 6829310548 arm: Ns9xxx: Remove private irq flow handler
handle_prio_irq is almost identical with handle_fasteoi_irq. The
subtle differences are

1) The handler checks for IRQ_DISABLED after the device handler has
   been called. In case it's set it masks the interrupt.

2) When the handler sees IRQ_DISABLED on entry it masks the interupt
   in the same way as handle_fastoei_irq, but does not set the
   IRQ_PENDING flag.

3) Instead of gracefully handling a recursive interrupt it crashes the
   kernel.

#1 is just relevant when a device handler calls disable_irq_nosync()
   and it does not matter whether we mask the interrupt right away or
   not. We handle lazy masking for disable_irq anyway, so there is no
   real reason to have this extra mask in place.

#2 will prevent the resend of a pending interrupt, which can result in
   lost interrupts for edge type interrupts. For level type interrupts
   the resend is a noop in the generic code. According to the
   datasheet all interrupts are level type, so marking them as such
   will result in the exact same behaviour as the private
   handle_prio_irq implementation.

#3 is just stupid. Crashing the kernel instead of handling a problem
   gracefully is just wrong. With the current semantics- all handlers
   run with interrupts disabled - this is even more wrong.

Rename ack to eoi, remove the unused mask_ack, switch to
handle_fasteoi_irq and remove the private function.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
LKML-Reference: <20110202212552.299898447@linutronix.de>
2011-03-28 16:55:11 +02:00
Kukjin Kim 3e1d9874b4 ARM: Suspend: Fix dependency of ARCH_SUSPEND_POSSIBLE
The current mainline codes of ARCH_S5P64X0 and ARCH_S5P6442
can not support suspend to ram. So needs this for preventing
build error on them.

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:54 +09:00
Kukjin Kim 9d5fda6656 ARM: SAMSUNG: Fix CPU idmask
This patch fixes CPU idmask of S5P64X0 and EXYNOS4210
and its comparison method because just want to use CPU
id for it.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:54 +09:00
Thomas Abraham b9ab19f936 ARM: EXYNOS4: Fix addruart macro
Fix incorrect conditional execution of ldr instructions in
addruart macro.

Signed-off-by: Thomas Abraham <thomas.abraham@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:54 +09:00
Jeongtae Park 1af3c67212 ARM: EXYNOS4: Fix smsc9215 irq polarity on SMDKC210
This patch fixes smsc9215 irq ploarity configuration of SMDKC210.
We can change type of EINT(5) as HIGH, but it's better to change
IRQ output of smsc9215 as an active low because smsc's IRQ line
has been pull-up.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:54 +09:00
Jeongtae Park cd0527c25b ARM: EXYNOS4: Fix smsc9215 irq polarity on SMDKV310
This patch fixes smsc9215 irq ploarity configuration of SMDKV310.
We can change type of EINT(5) as HIGH, but it's better to change
IRQ output of smsc9215 as an active low because smsc's IRQ line
has been pull-up.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:54 +09:00
Kukjin Kim 94fc1d80d6 ARM: EXYNOS4: Fix build warning on regarding SATA_AHCI_PLATFORM
This patch fixes following build warnings.

warning: (MACH_ARMLEX4210) selects SATA_AHCI_PLATFORM
          which has unmet direct dependencies (ATA)

And adds EXYNOX4_DEV_AHCI for building machines which are
not suppoort for AHCI feature on board.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:54 +09:00
Huang Weiyi 768fe2c31f ARM: S5PV210: Remove duplicated inclusion
Remove duplicated #include('s) in
  arch/arm/mach-s5pv210/mach-smdkv210.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:53 +09:00
Vladimir Zapolskiy 912003e8f1 ARM: S5PV210: Fix security engine interrupt names
This change is intended to correct security subsystem interrupt names
for Samsung S5PV210 and S5PC110 SoCs.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:53 +09:00
Banajit Goswami 3814554d11 ARM: S5P64X0: Fix iodesc array size for S5P6450
The array size parameter of iotable_init for S5P6450 is incorrect.
Fix this by passing the correct length of s5p6450_iodesc table.

Signed-off-by: Banajit Goswami <banajit.g@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-03-28 16:17:53 +09:00
Linus Walleij fe67dfc874 mach-ux500: configure board for the TPS61052 regulator v2
This registers the TPS61052 regulator to the ux500 MOP/HREF boards.

Cc: Samuel Ortiz <samuel.ortiz@intel.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Ola Lilja <ola.o.lilja@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-03-28 08:54:23 +02:00
Bengt Jonsson dfa3a824de mach-ux500: provide ab8500 init vector
This adds an ab8500 regulator initialization vector for the
HREF/MOP500 series of boards. This also sets the display
regulator to be on at boot so we don't loose our splash
screen when the board comes up.

Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-03-28 08:47:19 +02:00
Bibek Basu 3ef374a22b mach-ux500: board support for AB8500 GPIO driver
This is the board support patch for ab8500 gpio driver
on mach-ux500.Patch implements 16 virtual
IRQ mapped to 16 interrupt capable AB8500 GPIOs.

Signed-off-by: Bibek Basu <bibek.basu@stericsson.com>
[Modify for header file placement]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2011-03-28 08:47:18 +02:00
Linus Torvalds 18bcd0c8cb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  regulator: Add MODULE_DEVICE_TABLE to max8997 and max8998
  regulator: fix tps6524x section mismatch
  regulator: Remove more wm831x-specific IRQ operations
  regulator: add ab8500 enable and raise time delays
  regulator: provide consumer interface for fall/rise time
  regulator: add set_voltage_time_sel infrastructure
  regulator: initialization for ab8500 regulators
  regulator: add support for USB voltage regulator
  regulator: switch the ab3100 to use enable_time()
  Regulator: add suspend-finish API for regulator core.
  regulator: fix typo in Kconfig
  regulator: Convert WM831x regulators to genirq
  regulator: If we fail when setting up a supply say which supply
2011-03-27 20:37:50 -07:00
Linus Torvalds 17c6dd8144 Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  hwspinlock: depend on OMAP4
  ARM: OMAP2+: Fix warnings for GPMC interrupt
  OMAP4: PandaBoard: remove unused power regulators
  arm: mach-omap2: omap_l3_smx: fix irq handler setup
  arm: mach-omap2: devices: fix omap3_l3_init() return value
2011-03-27 20:03:12 -07:00
Linus Torvalds a17d47300b Merge branch 'for-linus-1' of git://git.infradead.org/mtd-2.6
* 'for-linus-1' of git://git.infradead.org/mtd-2.6: (49 commits)
  mtd: mtdswap: fix compilation warning
  mtdswap: kill strict error handling option
  mtd: nand: enable software BCH ECC in nand simulator
  mtd: nand: add software BCH ECC support
  mtd: fix printf format warnings, mostly lack of %zd for size_t, in mtdswap
  mtd: sm_rtl: check kmalloc return value
  mtd: cfi: add support for AMIC flashes (e.g. A29L160AT)
  lib: add shared BCH ECC library
  mtd: mxc_nand: fix OOB corruption when page size > 2KiB
  mtd: DaVinci: Removed header file that is not required
  mtd: pxa3xx_nand: clean the keep configure code
  mtd: pxa3xx_nand: mtd scan id process could be defined by driver itself
  mtd: pxa3xx_nand: unify prepare command
  mtd: pxa3xx_nand: discard wait_for_event,write_cmd,__readid function
  mtd: pxa3xx_nand: rework irq logic
  mtd: pxa3xx_nand: make scan procedure more clear
  mtd: speedtest: fix integer overflow
  mtd: mxc_nand: fix read past buffer end
  mtd: omap3: nand: report corrected ecc errors
  jffs2: remove a trailing white space in commentaries
  ...
2011-03-27 19:40:56 -07:00
Konstantin Porotchkin dc7b602dd4 Fix the broken build for Marvell Dove platform.
Remove call to the old GPIO init function.
Fix old MPP control offset value.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Acked-by: Saeed Bishara <saeed.bishara@gmail.com>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2011-03-27 09:22:52 -04:00
Bengt Jonsson 79568b9412 regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom
hardware control settings pertaining to 8 external
signals, settings which are board-specific and need
be provided from the platform at startup.

Initialization added for regulators Vana, VextSupply1,
VextSupply2, VextSupply3, Vaux1, Vaux2, Vaux3, VTVout,
Vintcore12, Vaudio, Vdmic, Vamic1, Vamic2, VrefDDR.

Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-26 14:15:05 +00:00
Will Deacon a737823d37 ARM: 6835/1: perf: ensure overflows aren't missed due to IRQ latency
If a counter overflows during a perf stat profiling run it may overtake
the last known value of the counter:

    0        prev     new                0xffffffff
    |----------|-------|----------------------|

In this case, the number of events that have occurred is
(0xffffffff - prev) + new. Unfortunately, the event update code will
not realise an overflow has occurred and will instead report the event
delta as (new - prev) which may be considerably smaller than the real
count.

This patch adds an extra argument to armpmu_event_update which indicates
whether or not an overflow has occurred. If an overflow has occurred
then we use the maximum period of the counter to calculate the elapsed
events.

Acked-by: Jamie Iles <jamie@jamieiles.com>
Reported-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-26 10:06:09 +00:00
Will Deacon 574b69cbb6 ARM: 6834/1: perf: reset counters on all CPUs during initialisation
ARMv7 dictates that the interrupt-enable and count-enable registers for
each PMU counter are UNKNOWN following core reset.

This patch adds a new (optional) function pointer to struct arm_pmu for
resetting the PMU state during init. The reset function is called on
each CPU via an arch_initcall in the generic ARM perf_event code and
allows the PMU backend to write sane values to any UNKNOWN registers.

Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-26 10:06:09 +00:00
Will Deacon d25d3b4c4d ARM: 6833/1: perf: add required isbs() to ARMv7 backend
The ARMv7 architecture does not guarantee that effects from co-processor
writes are immediately visible to following instructions.

This patch adds two isbs to the ARMv7 perf code:

(1) Immediately after selecting an event register, so that the PMU state
    following this instruction is consistent with the new event.

(2) Immediately before writing to the PMCR, so that any previous writes
    to the PMU have taken effect before (typically) enabling the
    counters.

Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-26 10:06:09 +00:00
Nicolas Pitre fb4fe87d79 ARM: 6825/1: kernel/sleep.S: fix Thumb2 compilation issues
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-26 10:06:08 +00:00
Pawel Moll 0efc48ecaf ARM: 6807/1: realview: Fix secondary GIC initialisation for EB with MPCore tile
The second GIC, present when EB board is used with a MPCore tile,
was initialised starting with irq number 64, which made interrupts
64-95 in the primary GIC unusable.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-26 10:06:08 +00:00
Russell King 938c0ace3f Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable
Conflicts:
	arch/arm/mach-pxa/tosa.c
2011-03-26 10:03:03 +00:00
Linus Torvalds 0dd61be7ec Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (23 commits)
  genirq: Expand generic show_interrupts()
  gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handler
  gpio: Cleanup genirq namespace
  arm: ep93xx: Add basic interrupt info
  arm/gpio: Remove three copies of broken and racy debug code
  xtensa: Use generic show_interrupts()
  xtensa: Convert genirq namespace
  xtensa: Use generic IRQ Kconfig and set GENERIC_HARDIRQS_NO_DEPRECATED
  xtensa: Convert s6000 gpio irq_chip to new functions
  xtensa: Convert main irq_chip to new functions
  um: Use generic show_interrupts()
  um: Convert genirq namespace
  m32r: Use generic show_interrupts()
  m32r: Convert genirq namespace
  h8300: Use generic show_interrupts()
  h8300: Convert genirq namespace
  avr32: Cleanup eic_set_irq_type()
  avr32: Use generic show_interrupts()
  avr: Cleanup genirq namespace
  avr32: Use generic IRQ config, enable GENERIC_HARDIRQS_NO_DEPRECATED
  ...

Fix up trivial conflict in drivers/gpio/timbgpio.c
2011-03-25 20:24:05 -07:00
Artem Bityutskiy 7bf7e370d5 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus-1
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (9356 commits)
  [media] rc: update for bitop name changes
  fs: simplify iget & friends
  fs: pull inode->i_lock up out of writeback_single_inode
  fs: rename inode_lock to inode_hash_lock
  fs: move i_wb_list out from under inode_lock
  fs: move i_sb_list out from under inode_lock
  fs: remove inode_lock from iput_final and prune_icache
  fs: Lock the inode LRU list separately
  fs: factor inode disposal
  fs: protect inode->i_state with inode->i_lock
  lib, arch: add filter argument to show_mem and fix private implementations
  SLUB: Write to per cpu data when allocating it
  slub: Fix debugobjects with lockless fastpath
  autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
  autofs4 - remove autofs4_lock
  autofs4 - fix d_manage() return on rcu-walk
  autofs4 - fix autofs4_expire_indirect() traversal
  autofs4 - fix dentry leak in autofs4_expire_direct()
  autofs4 - reinstate last used update on access
  vfs - check non-mountpoint dentry might block in __follow_mount_rcu()
  ...

NOTE!

This merge commit was created to fix compilation error. The block
tree was merged upstream and removed the 'elv_queue_empty()'
function which the new 'mtdswap' driver is using. So a simple
merge of the mtd tree with upstream does not compile. And the
mtd tree has already be published, so re-basing it is not an option.

To fix this unfortunate situation, I had to merge upstream into the
mtd-2.6.git tree without committing, put the fixup patch on top of
this, and then commit this. The result is that we do not have commits
which do not compile.

In other words, this merge commit "merges" 3 things: the MTD tree, the
upstream tree, and the fixup patch.
2011-03-25 17:41:20 +02:00
Guennadi Liakhovetski 31d31fe768 ARM: mach-shmobile: fix SDHI IO address-range
SDHI registers occupy only a 0x100 byte large window, not 0x200 byte.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-03-25 10:39:51 -04:00
Guennadi Liakhovetski 17e75d8251 ARM: mach-shmobile: convert boards to use linux/mmc/sh_mobile_sdhi.h
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-03-25 10:39:38 -04:00
Wolfram Sang a10aabd5e3 arm: mach-mx3: pcm043: add write-protect and card-detect for SD1
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 13:33:55 +01:00
Eric Bénard ef560bfe01 eukrea_mbimxsd51: add SD Card detect
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 13:33:54 +01:00
Eric Bénard 01ea9aeae8 eukrea_mbimxsd25-baseboard: add SD card detect
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 13:33:53 +01:00
Eric Bénard d335cf9706 mx3/eukrea_mbimxsd-baseboard: add SD card detect support
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 13:33:52 +01:00
Eric Bénard da8db3aab5 mx3/eukrea_mbimxsd-baseboard: fix gpio request
without this patch, we get :
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x4c/0x104()
autorequest GPIO-4
.../...
[<c01bcfb0>] (platform_lcd_set_power+0x34/0x40) from [<c033954c>] (platform_lcd_probe+0xb8/0xd8)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 13:33:51 +01:00
Shawn Guo 5bb2c82842 ARM: mxs/mx28evk: add mmc device
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
[sha: updated to Uwes v4 version]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 13:33:28 +01:00
Shawn Guo 1b6f1e885e ARM: mxs/mx23evk: add mmc device
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
[sha: updated to Uwes v4 version]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 13:31:50 +01:00
Shawn Guo 47babe692e ARM: mxs: dynamically allocate mmc device
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
[ukleinek: fix naming to include complete device name in functions]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 08:36:55 +01:00
Andres Salomon 251290a607 ARM: mx51_efika: update platform data for new mfd changes
Note that this relies on stuff currently in mfd's next tree, but this
is also a newer driver.  I'm not sure which tree it should go through,
as it's a problem that shows up in next.

From: Andres Salomon <dilinger@queued.net>

MFD changes in c738892f cause the mc13xxx_platform_data struct
to change.  This changes one more (new) user of it, fixing a build
error.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 08:22:52 +01:00
Julien Boibessot 58d5ad5e3c mx2/iomux: Set direction for CSPI2 pins
Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-25 08:21:34 +01:00
David Rientjes b2b755b5f1 lib, arch: add filter argument to show_mem and fix private implementations
Commit ddd588b5dd ("oom: suppress nodes that are not allowed from
meminfo on oom kill") moved lib/show_mem.o out of lib/lib.a, which
resulted in build warnings on all architectures that implement their own
versions of show_mem():

	lib/lib.a(show_mem.o): In function `show_mem':
	show_mem.c:(.text+0x1f4): multiple definition of `show_mem'
	arch/sparc/mm/built-in.o:(.text+0xd70): first defined here

The fix is to remove __show_mem() and add its argument to show_mem() in
all implementations to prevent this breakage.

Architectures that implement their own show_mem() actually don't do
anything with the argument yet, but they could be made to filter nodes
that aren't allowed in the current context in the future just like the
generic implementation.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: James Bottomley <James.Bottomley@hansenpartnership.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-24 17:49:37 -07:00
Ryan Mallon 778b548ced arm: ep93xx: Add basic interrupt info
For the time being can we fix up the ep93xx gpio code with the amended
patch below. It keeps the information that the pin is also configured
as an interrupt and cleans the code up a bit.

[ tglx: Rebased it on the removal patch ]

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-25 00:02:51 +01:00
Thomas Gleixner b15f052cb8 arm/gpio: Remove three copies of broken and racy debug code
gpiolib plus two gpio implementations in arm fiddle in the guts of
irq_desc in a racy and buggy way. Remove the stuff. I already told the
gpio folks that we can provide that information in a proper way if
necessary.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
LKML-Reference: <20110324212508.931638262@linutronix.de>
2011-03-25 00:02:51 +01:00
Tejun Heo 0415b00d17 percpu: Always align percpu output section to PAGE_SIZE
Percpu allocator honors alignment request upto PAGE_SIZE and both the
percpu addresses in the percpu address space and the translated kernel
addresses should be aligned accordingly.  The calculation of the
former depends on the alignment of percpu output section in the kernel
image.

The linker script macros PERCPU_VADDR() and PERCPU() are used to
define this output section and the latter takes @align parameter.
Several architectures are using @align smaller than PAGE_SIZE breaking
percpu memory alignment.

This patch removes @align parameter from PERCPU(), renames it to
PERCPU_SECTION() and makes it always align to PAGE_SIZE.  While at it,
add PCPU_SETUP_BUG_ON() checks such that alignment problems are
reliably detected and remove percpu alignment comment recently added
in workqueue.c as the condition would trigger BUG way before reaching
there.

For um, this patch raises the alignment of percpu area.  As the area
is in .init, there shouldn't be any noticeable difference.

This problem was discovered by David Howells while debugging boot
failure on mn10300.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
Cc: David Howells <dhowells@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
2011-03-24 18:50:09 +01:00
Linus Torvalds 9598572536 Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  mmc: Add MMC_PROGRESS_*
  mmc, ARM: Rename SuperH Mobile ARM zboot helpers
  ARM: mach-shmobile: add coherent DMA mask to CEU camera devices
  ARM: mach-shmobile: Dynamic backlight control for Mackerel
2011-03-24 10:04:59 -07:00
Linus Torvalds 76d21c5635 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (442 commits)
  [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t
  [media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directly
  [media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTURE
  [media] v4l: soc-camera: Store negotiated buffer settings
  [media] rc: interim support for 32-bit NEC-ish scancodes
  [media] mceusb: topseed 0x0011 needs gen3 init for tx to work
  [media] lirc_zilog: error out if buffer read bytes != chunk size
  [media] lirc: silence some compile warnings
  [media] hdpvr: use same polling interval as other OS
  [media] ir-kbd-i2c: pass device code w/key in hauppauge case
  [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
  [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
  [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
  [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
  [media] rc-rc5-hauppauge-new: Add support for the old Black RC
  [media] rc-rc5-hauppauge-new: Add the old control to the table
  [media] rc-winfast: Fix the keycode tables
  [media] a800: Fix a few wrong IR key assignments
  [media] opera1: Use multimedia keys instead of an app-specific mapping
  [media] dw2102: Use multimedia keys instead of an app-specific mapping
  ...

Fix up trivial conflicts (remove/modify and some real conflicts) in:
	arch/arm/mach-omap2/devices.c
	drivers/staging/Kconfig
	drivers/staging/Makefile
	drivers/staging/dabusb/dabusb.c
	drivers/staging/dabusb/dabusb.h
	drivers/staging/easycap/easycap_ioctl.c
	drivers/staging/usbvideo/usbvideo.c
	drivers/staging/usbvideo/vicam.c
2011-03-24 09:50:13 -07:00
Linus Torvalds 6e50e9f9f4 Merge branch 'for-linus' of git://android.git.kernel.org/kernel/tegra
* 'for-linus' of git://android.git.kernel.org/kernel/tegra:
  ARM: tegra: harmony: initialize the TPS65862 PMIC
  ARM: tegra: update defconfig
  ARM: tegra: harmony: update PCI-e initialization sequence
  ARM: tegra: trimslice: enable MMC/SD slots
  ARM: tegra: enable new drivers in defconfig
  ARM: tegra: Add Toshiba AC100 support
  ARM: tegra: harmony: Set WM8903 gpio_base
  ARM: tegra: harmony: I2C-related portions of audio support
  ARM: tegra: harmony: register i2c devices
  ARM: tegra: seaboard: register i2c devices
  ARM: tegra: harmony: Beginnings of audio support
  ARM: tegra: create defines for SD-related GPIO names
  ARM: tegra: add devices.c entries for audio
2011-03-24 09:33:14 -07:00
Simon Horman 9d9659b6c0 mmc: Add MMC_PROGRESS_*
This is my second attempt to make this enum generally available.
The first attempt added MMCIF_PROGRESS_* to include/linux/mmc/sh_mmcif.h.
However this is not sufficiently generic as the enum will be
used by SDHI boot code.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-25 01:24:57 +09:00
Simon Horman a6558c2d07 mmc, ARM: Rename SuperH Mobile ARM zboot helpers
These headers and helpers will also be used for SDHI boot
so the mmcif name will start to make a lot less sense.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-03-25 01:24:57 +09:00
Linus Torvalds a6a1d6485e Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (90 commits)
  mfd: Push byte swaps out of wm8994 bulk read path
  mfd: Rename ab8500 gpadc header
  mfd: Constify WM8994 write path
  mfd: Push byte swap out of WM8994 bulk I/O
  mfd: Avoid copying data in WM8994 I2C write
  mfd: Remove copy from WM831x I2C write function
  mfd: Staticise WM8994 PM ops
  regulator: Add a subdriver for TI TPS6105x regulator portions v2
  mfd: Add a core driver for TI TPS61050/TPS61052 chips v2
  gpio: Add Tunnel Creek support to sch_gpio
  mfd: Add Tunnel Creek support to lpc_sch
  pci_ids: Add Intel Tunnel Creek LPC Bridge device ID.
  regulator: MAX8997/8966 support
  mfd: Add WM8994 bulk register write operation
  mfd: Append additional read write on 88pm860x
  mfd: Adopt mfd_data in 88pm860x input driver
  mfd: Adopt mfd_data in 88pm860x regulator
  mfd: Adopt mfd_data in 88pm860x led
  mfd: Adopt mfd_data in 88pm860x backlight
  mfd: Fix MAX8997 Kconfig entry typos
  ...
2011-03-24 07:59:01 -07:00
Linus Torvalds 4cc4d24efc Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: (140 commits)
  MAINTAINERS: de-orphan fbdev.
  MAINTAINERS: Add file pattern for fb dt bindings.
  video: Move sm501fb devicetree binding documentation to a better place.
  fbcon: fix situation where fbcon gets deinitialised and can't reinit.
  video, sm501: add OF binding to support SM501
  video, sm501: add edid and commandline support
  video, sm501: add I/O functions for use on powerpc
  video: Fix EDID macros H_SYNC_WIDTH and H_SYNC_OFFSET
  fbcon: Bugfix soft cursor detection in Tile Blitting
  video: add missing framebuffer_release in error path
  video: metronomefb: add __devexit_p around reference to metronomefb_remove
  video: hecubafb: add __devexit_p around reference to hecubafb_remove
  drivers:video:aty:radeon_base Fix typo occationally to occasionally
  atmel_lcdfb: add fb_blank function
  atmel_lcdfb: implement inverted contrast pwm
  video: s3c-fb: return proper error if clk_get fails
  uvesafb,vesafb: create WC or WB PAT-entries
  video: ffb: fix ffb_probe error path
  radeonfb: Let hwmon driver probe the "monid" I2C bus
  fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()
  ...
2011-03-24 07:56:52 -07:00
Linus Torvalds 2f284c8463 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (35 commits)
  ARM: Update (and cut down) mach-types
  ARM: 6771/1: vexpress: add support for multiple core tiles
  ARM: 6797/1: hw_breakpoint: Fix newlines in WARNings
  ARM: 6751/1: vexpress: select applicable errata workarounds in Kconfig
  ARM: 6753/1: omap4: Enable ARM local timers with OMAP4430 es1.0 exception
  ARM: 6759/1: smp: Select local timers vs broadcast timer support runtime
  ARM: pgtable: add pud-level code
  ARM: 6673/1: LPAE: use phys_addr_t instead of unsigned long for start of membanks
  ARM: Use long long format when printing meminfo physical addresses
  ARM: integrator: add Integrator/CP sched_clock support
  ARM: realview/vexpress: consolidate SMP bringup code
  ARM: realview/vexpress: consolidate localtimer support
  ARM: integrator/versatile: consolidate FPGA IRQ handling code
  ARM: rationalize versatile family Kconfig/Makefile
  ARM: realview: remove old AMBA device DMA definitions
  ARM: versatile: remove old AMBA device DMA definitions
  ARM: vexpress: use new init_early for clock tree and sched_clock init
  ARM: realview: use new init_early for clock tree and sched_clock init
  ARM: versatile: use new init_early for clock tree and sched_clock init
  ARM: integrator: use new init_early for clock tree init
  ...
2011-03-23 20:37:26 -07:00
Olaf Hering 93a72052be crash_dump: export is_kdump_kernel to modules, consolidate elfcorehdr_addr, setup_elfcorehdr and saved_max_pfn
The Xen PV drivers in a crashed HVM guest can not connect to the dom0
backend drivers because both frontend and backend drivers are still in
connected state.  To run the connection reset function only in case of a
crashdump, the is_kdump_kernel() function needs to be available for the PV
driver modules.

Consolidate elfcorehdr_addr, setup_elfcorehdr and saved_max_pfn into
kernel/crash_dump.c Also export elfcorehdr_addr to make is_kdump_kernel()
usable for modules.

Leave 'elfcorehdr' as early_param().  This changes powerpc from __setup()
to early_param().  It adds an address range check from x86 also on ia64
and powerpc.

[akpm@linux-foundation.org: additional #includes]
[akpm@linux-foundation.org: remove elfcorehdr_addr export]
[akpm@linux-foundation.org: fix for Tejun's mm/nobootmem.c changes]
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-23 19:47:19 -07:00
FUJITA Tomonori 8547727756 remove dma64_addr_t
There is no user now.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: David Miller <davem@davemloft.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-23 19:47:18 -07:00
Akinobu Mita 61f2e7b0f4 bitops: remove minix bitops from asm/bitops.h
minix bit operations are only used by minix filesystem and useless by
other modules.  Because byte order of inode and block bitmaps is different
on each architecture like below:

m68k:
	big-endian 16bit indexed bitmaps

h8300, microblaze, s390, sparc, m68knommu:
	big-endian 32 or 64bit indexed bitmaps

m32r, mips, sh, xtensa:
	big-endian 32 or 64bit indexed bitmaps for big-endian mode
	little-endian bitmaps for little-endian mode

Others:
	little-endian bitmaps

In order to move minix bit operations from asm/bitops.h to architecture
independent code in minix filesystem, this provides two config options.

CONFIG_MINIX_FS_BIG_ENDIAN_16BIT_INDEXED is only selected by m68k.
CONFIG_MINIX_FS_NATIVE_ENDIAN is selected by the architectures which use
native byte order bitmaps (h8300, microblaze, s390, sparc, m68knommu,
m32r, mips, sh, xtensa).  The architectures which always use little-endian
bitmaps do not select these options.

Finally, we can remove minix bit operations from asm/bitops.h for all
architectures.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Michal Simek <monstr@monstr.eu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-23 19:46:22 -07:00
Akinobu Mita f312eff816 bitops: remove ext2 non-atomic bitops from asm/bitops.h
As the result of conversions, there are no users of ext2 non-atomic bit
operations except for ext2 filesystem itself.  Now we can put them into
architecture independent code in ext2 filesystem, and remove from
asm/bitops.h for all architectures.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-23 19:46:21 -07:00
Akinobu Mita f6b57e322f arm: introduce little-endian bitops
Introduce little-endian bit operations by renaming native ext2 bit
operations.  The ext2 and minix bit operations are kept as wrapper macros
using little-endian bit operations to maintain bisectability until the
conversions are finished.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-23 19:46:13 -07:00
Linus Torvalds 4bbba111d9 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: HDA: Realtek: Avoid unnecessary volume control index on Surround/Side
  ASoC: Support !REGULATOR build for sgtl5000
  ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
  ALSA: hda - VIA: Correct stream names for VT1818S
  ALSA: hda - VIA: Fix codec type for VT1708BCE at the right timing
  ALSA: hda - VIA: Fix invalid A-A path volume adjust issue
  ALSA: hda - VIA: Add missing support for VT1718S in A-A path
  ALSA: hda - VIA: Fix independent headphone no sound issue
  ALSA: hda - VIA: Fix stereo mixer recording no sound issue
  ALSA: hda - Set EAPD for Realtek ALC665
  ALSA: usb - Remove trailing spaces from USB card name strings
  sound: read i_size with i_size_read()
  ASoC: Remove bogus check for register validity in debugfs write
  ASoC: mini2440: Fix uda134x codec problem.
2011-03-23 07:58:09 -07:00
Dinh Nguyen 0adf882b68 ARM: mx51: Implement code to allow mx51 to enter WFI
Implement code for MX51 that allows the SoC to enter WFI when
arch_idle is called.

This patch is also necessary for correctly suspending the system.

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:15 +01:00
Dinh Nguyen b6e89b2182 ARM: mx51: Add entry for gpc_dvfs_clk
For MX51 SRPG, we need to turn on the GPC clock in order to set the
SRPG registers.

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:15 +01:00
Dinh Nguyen 16f246e69b ARM: mx50: Add support to get the silicon revision
For MX50, the HW_ADADIG_DIGPROG register in the ANATOP module will
have the correct silicon revision:

Major       Minor   Description
0x50        0x0     TO1.0
0x50        0x1     TO1.1

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:15 +01:00
Lothar Waßmann 021ebc2da0 ARM: mxs: configure and register the second FEC device on TX28/STK5-V4
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:14 +01:00
Shawn Guo 5d18724588 ARM: mxc: fix buggy '.end' of IORESOURCE_MEM in device codes
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:14 +01:00
Huang Weiyi 65047a0f69 ARM i.MX: remove duplicated #include
Remove duplicated #include('s) in
  arch/arm/mach-mx5/mx51_efika.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:14 +01:00
Uwe Kleine-König 5658bff6c2 ARM: imx: let MACH_IMX27_VISSTRIM_M10 select IMX_HAVE_PLATFORM_IMX_SSI
mach-imx27_visstrim_m10.c uses imx27_add_imx_ssi() so it needs to select
IMX_HAVE_PLATFORM_IMX_SSI to fix:

	arch/arm/mach-imx/built-in.o: In function `visstrim_m10_board_init':
	mach-imx27_visstrim_m10.c:(.init.text+0x308): undefined reference to `imx_add_imx_ssi'
	mach-imx27_visstrim_m10.c:(.init.text+0x394): undefined reference to `imx27_imx_ssi_data'

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:14 +01:00
Julien Boibessot 0ff2593bf6 MX51: Add AUDMUX ports definitions
Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:13 +01:00
Jan Weitzel c124befc0d ARM: mxc: Add sched_clock to mxc platform
Add sched_clock using cyc_to_sched_clock and update_sched_clock
with HAVE_SCHED_CLOCK
tested on iMX27 and iMX35

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:13 +01:00
Jan Weitzel 93b20e4fdb ARM: mxc: Add dummy_get_cycles to avoid access before init is done
this is needed to use get_cycles with sched_clock. Accessing timer
without enabled clk will result in crash

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:08:12 +01:00
Fabio Estevam 350ac9ddce ARM: mx5/mx53_evk: Make the reset pin name more meaningful
As there is a mx53_smd board in the kernel, using SMD_FEC_PHY_RST as the pin name can be misleading when used
on a MX53_EVK board.

Change the pin name to reflect the board name.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:07:49 +01:00
Fabio Estevam 6ea6392cc4 ARM: mx5/mx53_evk: Use gpio_request_one in mx53_evk_fec_reset
Current code inside mx53_evk_fec_reset uses gpio_direction_output with initial value of the GPIO and also sets
the GPIO value via gpio_set_value right after. This is not needed.

By using gpio_request_one it is possible to set the direction and initial value in one shot.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:07:48 +01:00
Fabio Estevam ce191e415c ARM: mx5/babbage: Use gpio_request_one in babbage_fec_reset
Current code inside babbage_fec_reset uses gpio_direction_output with initial value of the GPIO and also sets
the GPIO value via gpio_set_value to the same level right after. This is not needed.

By using gpio_request_one it is possible to set the direction and initial value in one shot.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:07:48 +01:00
Frank Li 14fb20c9d2 ARM: mx53_loco: Add GPIO Keypad support
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:07:48 +01:00
Fabio Estevam 76422dbf3c ARM: mx51: Print silicon revision on boot
Having the silicon revision to appear on the boot log is a useful information.

MX31 and MX35 already show the silicon revision on boot.

Add support for displaying such information for MX51 as well.

Tested on a MX51EVK, where it shows:

CPU identified as i.MX51, silicon rev 3.0

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-23 15:07:47 +01:00