1
0
Fork 0
Commit Graph

21094 Commits (031bd879f79d59d2f4fccd44377adf24fb977b5a)

Author SHA1 Message Date
Lorenzo Pieralisi 031bd879f7 ARM: mm: implement LoUIS API for cache maintenance ops
ARM v7 architecture introduced the concept of cache levels and related
control registers. New processors like A7 and A15 embed an L2 unified cache
controller that becomes part of the cache level hierarchy. Some operations in
the kernel like cpu_suspend and __cpu_disable do not require a flush of the
entire cache hierarchy to DRAM but just the cache levels belonging to the
Level of Unification Inner Shareable (LoUIS), which in most of ARM v7 systems
correspond to L1.

The current cache flushing API used in cpu_suspend and __cpu_disable,
flush_cache_all(), ends up flushing the whole cache hierarchy since for
v7 it cleans and invalidates all cache levels up to Level of Coherency
(LoC) which cripples system performance when used in hot paths like hotplug
and cpuidle.

Therefore a new kernel cache maintenance API must be added to cope with
latest ARM system requirements.

This patch adds flush_cache_louis() to the ARM kernel cache maintenance API.

This function cleans and invalidates all data cache levels up to the
Level of Unification Inner Shareable (LoUIS) and invalidates the instruction
cache for processors that support it (> v7).

This patch also creates an alias of the cache LoUIS function to flush_kern_all
for all processor versions prior to v7, so that the current cache flushing
behaviour is unchanged for those processors.

v7 cache maintenance code implements a cache LoUIS function that cleans and
invalidates the D-cache up to LoUIS and invalidates the I-cache, according
to the new API.

Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
2012-09-25 11:20:25 +01:00
Linus Torvalds 1568d9f425 Merge branch 'fixes-for-3.6' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull one more DMA-mapping fix from Marek Szyprowski:
 "This patch fixes very subtle bug (typical off-by-one error) which
  might appear in very rare circumstances."

* 'fixes-for-3.6' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  arm: mm: fix DMA pool affiliation check
2012-09-14 17:53:11 -07:00
Linus Torvalds 6a2a2b85db arm-soc: bug fixes for v3.6-rc
- A set of OMAP fixes, about half of them PM/clock related, the rest
   scattered over the platform code but all small and targeted to real bugs.
 - Two small i.MX fixes for SSI device clock setup.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQUYT/AAoJEIwa5zzehBx3m7UQAIW17Uzqfw+5KGhh0UMSVPuq
 XQznJRadYAlLwRK8O/K6aJ1TnHa21BrVSa8F2y9KHthM7YhGplzcluNMUtOGRCsM
 HUceddSqy7DQp7CcwAJSb+VHd5I1d7iVbEp3oU3BD0OGQM6J0ddfUUo6a2fnpETV
 E6JpHhllB7NXVq8Bx5gy/M9idaUdjxNyAEe62pjmVmvK2wi1l1323wiMYpcU8i9t
 wBPHRDvYAHLju1j9qVZQa8gZ6EEGqqCaSIbCmX3omuuFFkmZHRHJSqv428LKa8lN
 i8CfknJJTVDt+9RojJ+P4VuAMr+PWdZmL6cWS1dVz4KZsnG7eyfD3e4GczCd7UEd
 YKLLh/0B1Oo+dH+6kXK8RscC5P38zRxT3fmpZ6R7yePGuYQJHkuMaBq8Lg46blJR
 m+bTWrGoZByO1XCmebh2lCfu8PsuuksuTwr7Lu3ekDhZF5vDr9KFlmyts4lLTSaW
 zjWjoAJa8334w1rRRnR4eWllFRx62VJWkZiQU5jlV6V01/FedLB0/RxPMT6RRDiw
 DoCLPWIPe0ft2qgSTrPcbIVqcQcpzwVsPKq8OHcYUA6cILg7Q5Rix/V1FbVlw1ac
 ob63CBSA7vxoN5PlErLO7eAluEmQjM45drQ5d6THdkihM/uzZ44VJ/pwW67ZmahW
 jtH+5XOSNVsZU0dk/9dY
 =y6Db
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc bug fixes from Olof Johansson:

 - A set of OMAP fixes, about half of them PM/clock related, the rest
   scattered over the platform code but all small and targeted to real
   bugs.
 - Two small i.MX fixes for SSI device clock setup.

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: clk-imx35: Fix SSI clock registration
  ARM: clk-imx25: Fix SSI clock registration
  ARM: OMAP4: Fix array size for irq_target_cpu
  ARM: OMAP4: hwmod data: temporarily comment out data for the sl2if IP block
  ARM: OMAP: hwmod code: Disable module when hwmod enable fails
  ARM: OMAP3: hwmod data: fix iva2 reset info
  ARM: OMAP3xxx: clockdomain: fix software supervised wakeup/sleep
  ARM: OMAP2+: am33xx: Fix the timer fck clock naming convention
  ARM: OMAP: Config fix for omap3-touchbook board
  ARM: OMAP: sram: skip the first 16K on OMAP3 HS
  ARM: OMAP: sram: fix OMAP4 errata handling
  ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER
2012-09-13 19:10:50 +08:00
Olof Johansson 2bc733e8b4 ARM: i.MX: Fix SSI clock associations for i.MX25/i.MX35
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABCAAGBQJQTwn8AAoJEPFlmONMx+ezcuQP/iSJjSTecLvWH8c7cD9To+nv
 ItpQakHtabQZVEtQgfCb2uy8u1vKbIZcJ4FlqwDz6Q9AiV0SngXjHfR+PPO9mDuj
 4JmnF7ZnKtYcjBC/rhMAmiU+cVqrjY7WLwqz2FTEUc4OVC8m9xFIh0nhRSvQbngj
 MQdp4kBRriroaoF6ZgoanjhD/Xw0kEeERiAMbjlq7je+ZAZWYXj38tHg8BYp3Hrf
 ERVMXGoYgwglwNyooJHs5lAWTqKjSrXy+RAIQhV8yXOWE1Q+Jd7NE6ZOtn3VE20D
 8iO0WgjITi3xm+ewCzJT5UVcQmktGjpYTD5ePvbi0eilX1D8sL704QiOauJETcQq
 j4EHjgb+o53V9hyJt5Z3SWmJiyCsQRxlKagmbpJoRXWII08qR+Tgh2I8jgmCEAnw
 HTrA+IPZ1hFCUyQT7JZzDLak6nwOLQAc1S2H/GxyCOPhURZsFpLBdi9dqIyiMUdw
 KFw8T8GE5NgqXKB9osa3CGtjBfDtNWBTTRF+akQg9k1656HyWKxl24oSbX4kXsnC
 O9N4SSxjx7mL87elGV+jzIE61O2cTH5cTGA6Z7HAKQLAckLdF4+hd/NS8oOPtNOm
 K0r0EIt2U127I9OlpxvzosGjDgMzytGBP4NH0OmEovdvTX2Xh3uAyaiA/7rGWdoH
 /Tec1NLs0VbDv+jM2rKx
 =1cS3
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes

ARM: i.MX: Fix SSI clock associations for i.MX25/i.MX35

* tag 'imx-fixes' of git://git.pengutronix.de/git/imx/linux-2.6:
  ARM: clk-imx35: Fix SSI clock registration
  ARM: clk-imx25: Fix SSI clock registration
  + Linux 3.6-rc5
2012-09-12 22:00:07 -07:00
Linus Torvalds 8507876aaa Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
 "It's been a while...  so there's a little more here than normal.

  Mostly updates from Will for the breakpoint stuff, and plugging a few
  holes in the user access functions which crept in when domain support
  was disabled for ARMv7 CPUs."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7529/1: delay: set loops_per_jiffy when moving to timer-based loop
  ARM: 7528/1: uaccess: annotate [__]{get,put}_user functions with might_fault()
  ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS
  ARM: 7526/1: traps: send SIGILL if get_user fails on undef handling path
  ARM: 7521/1: Fix semihosting Kconfig text
  ARM: 7513/1: Make sure dtc is built before running it
  ARM: 7512/1: Fix XIP build due to PHYS_OFFSET definition moving
  ARM: 7499/1: mm: Fix vmalloc overlap check for !HIGHMEM
  ARM: 7503/1: mm: only flush both pmd entries for classic MMU
  ARM: 7502/1: contextidr: avoid using bfi instruction during notifier
  ARM: 7501/1: decompressor: reset ttbcr for VMSA ARMv7 cores
  ARM: 7497/1: hw_breakpoint: allow single-byte watchpoints on all addresses
  ARM: 7496/1: hw_breakpoint: don't rely on dfsr to show watchpoint access type
  ARM: Fix ioremap() of address zero
2012-09-13 09:05:22 +08:00
Fabio Estevam 4854005861 ARM: clk-imx35: Fix SSI clock registration
SSI block has two types of clock:

ipg: bus clock, the clock needed for accessing registers.
per: peripheral clock, the clock needed for generating the bit rate.

Currently SSI driver only supports slave mode and only need to handle
the ipg clock, because the peripheral clock comes from the master codec.

Only register the ipg clock and do not register the peripheral clock for ssi.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable@vger.kernel.org
2012-09-11 11:52:28 +02:00
Fabio Estevam 912bfe7652 ARM: clk-imx25: Fix SSI clock registration
SSI block has two types of clock:

ipg: bus clock, the clock needed for accessing registers.
per: peripheral clock, the clock needed for generating the bit rate.

Currently SSI driver only supports slave mode and only need to handle
the ipg clock, because the peripheral clock comes from the master codec.

Only register the ipg clock and do not register the peripheral clock for ssi.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable@vger.kernel.org
2012-09-11 11:52:28 +02:00
Thomas Petazzoni f3d8752497 arm: mm: fix DMA pool affiliation check
The __free_from_pool() function was changed in
e9da6e9905. Unfortunately, the test that
checks whether the provided (start,size) is within the DMA pool has
been improperly modified. It used to be:

  if (start < coherent_head.vm_start || end > coherent_head.vm_end)

Where coherent_head.vm_end was non-inclusive (i.e, it did not include
the first byte after the pool). The test has been changed to:

  if (start < pool->vaddr || start > pool->vaddr + pool->size)

So now pool->vaddr + pool->size is inclusive (i.e, it includes the
first byte after the pool), so the test should be >= instead of >.

This bug causes the following message when freeing the *first* DMA
coherent buffer that has been allocated, because its virtual address
is exactly equal to pool->vaddr + pool->size :

WARNING: at /home/thomas/projets/linux-2.6/arch/arm/mm/dma-mapping.c:463 __free_from_pool+0xa4/0xc0()
freeing wrong coherent size from pool

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Lior Amsalem <alior@marvell.com>
Cc: Maen Suleiman <maen@marvell.com>
Cc: Tawfik Bayouk <tawfik@marvell.com>
Cc: Shadi Ammouri <shadi@marvell.com>
Cc: Eran Ben-Avi <benavi@marvell.com>
Cc: Yehuda Yitschak <yehuday@marvell.com>
Cc: Nadav Haklai <nadavh@marvell.com>
[m.szyprowski: rebased onto v3.6-rc5 and resolved conflict]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-09-10 16:15:48 +02:00
Will Deacon beafa0de3d ARM: 7529/1: delay: set loops_per_jiffy when moving to timer-based loop
The delay functions may be called by some platforms between switching to
the timer-based delay loop but before calibration. In this case, the
initial loops_per_jiffy may not be suitable for the timer (although a
compromise may be achievable) and delay times may be considered too
inaccurate.

This patch updates loops_per_jiffy when switching to the timer-based
delay loop so that delays are consistent prior to calibration.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-09 17:28:48 +01:00
Will Deacon ad72907acd ARM: 7528/1: uaccess: annotate [__]{get,put}_user functions with might_fault()
The user access functions may generate a fault, resulting in invocation
of a handler that may sleep.

This patch annotates the accessors with might_fault() so that we print a
warning if they are invoked from atomic context and help lockdep keep
track of mmap_sem.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-09 17:28:48 +01:00
Russell King 8404663f81 ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS
The {get,put}_user macros don't perform range checking on the provided
__user address when !CPU_HAS_DOMAINS.

This patch reworks the out-of-line assembly accessors to check the user
address against a specified limit, returning -EFAULT if is is out of
range.

[will: changed get_user register allocation to match put_user]
[rmk: fixed building on older ARM architectures]

Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-09 17:28:47 +01:00
Linus Torvalds 32d687cad3 Merge branch 'fixes-for-3.6' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull DMA-mapping fixes from Marek Szyprowski:
 "Another set of fixes for ARM dma-mapping subsystem.

  Commit e9da6e9905 replaced custom consistent buffer remapping code
  with generic vmalloc areas.  It however introduced some regressions
  caused by limited support for allocations in atomic context.  This
  series contains fixes for those regressions.

  For some subplatforms the default, pre-allocated pool for atomic
  allocations turned out to be too small, so a function for setting its
  size has been added.

  Another set of patches adds support for atomic allocations to
  IOMMU-aware DMA-mapping implementation.

  The last part of this pull request contains two fixes for Contiguous
  Memory Allocator, which relax too strict requirements."

* 'fixes-for-3.6' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  ARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC
  ARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()
  ARM: dma-mapping: Refactor out to introduce __in_atomic_pool
  ARM: dma-mapping: atomic_pool with struct page **pages
  ARM: Kirkwood: increase atomic coherent pool size
  ARM: DMA-Mapping: print warning when atomic coherent allocation fails
  ARM: DMA-Mapping: add function for setting coherent pool size from platform code
  ARM: relax conditions required for enabling Contiguous Memory Allocator
  mm: cma: fix alignment requirements for contiguous regions
2012-09-08 16:22:43 -07:00
Olof Johansson f5a60d4efc Fixes for timer, sram, memory corruption, and one board
file that affect booting on various omaps. Then some PM
 related fixes for reset, sleep and wakeup.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQSRZ+AAoJEBvUPslcq6VzEicQAI2LzTL+kKlYjiXHXJJjkFPJ
 +3NJDw36thl4W9wA/tRyesqj8CDmpNRIZxoUtxeZqbDzn19erCiuEqLrmP9eAJdX
 eYmuDwGaoM6yOom8LswbfvXlDCVlkK4BtYLXMbhkgcNWXMbpk52f357RHPh3bN3I
 6Na2YwayB6cjmwRGXeWVEk+fDxPT+GbY3fsUZPg7BNZ14HdzEI+DOzfGJSO3cQPR
 NY5FpLSmLMkCkulyuuuMSznLuLRxjHsRgBwtPSJltsytJAcFwWnXLY5DqtQXCoZw
 vnltYP1QuUHXSTbXYGiU1nDd1ZBz3Z36g90/Xu3WeMUSh7rRzI38XUN3ouhbz3CP
 hKYWLl1LtDilKdYVZTeZRL7afwBbueNYf0HRLqscM1ZO7Iv4dTiOcCOivOp5K6K0
 OYX8Ac/Xyrd0J4Z9DVGkyMmGeLt6hOiEXr+rvm/3eKGZ2KuNenm0kyxhncYU810T
 O0ygecCkU0LGmJEBUEac3pRP7uNlmEFgvB/B62tfaoTAdwUcWw8v044pAkhJyI+k
 4KPP74Timohr0Bgqh0zhNi/ts3Ya9kFF7gPVK1aS+L6YHYy+oCmUcVVj5na/rvFo
 9KgunUtTX2ljAgMp7oRevFtlF6izhNDMYvY+iHjkERDQf5isksOw9WhWacgnhvrm
 cHV8QVMc6XLxo7Krk+4M
 =fUO5
 -----END PGP SIGNATURE-----

Merge tag 'omap-fixes-for-v3.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Fixes for timer, sram, memory corruption, and one board file that affect
booting on various omaps. Then some PM related fixes for reset, sleep
and wakeup.

* tag 'omap-fixes-for-v3.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4: Fix array size for irq_target_cpu
  ARM: OMAP4: hwmod data: temporarily comment out data for the sl2if IP block
  ARM: OMAP: hwmod code: Disable module when hwmod enable fails
  ARM: OMAP3: hwmod data: fix iva2 reset info
  ARM: OMAP3xxx: clockdomain: fix software supervised wakeup/sleep
  ARM: OMAP2+: am33xx: Fix the timer fck clock naming convention
  ARM: OMAP: Config fix for omap3-touchbook board
  ARM: OMAP: sram: skip the first 16K on OMAP3 HS
  ARM: OMAP: sram: fix OMAP4 errata handling
  ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER
2012-09-07 15:03:21 -07:00
Will Deacon 2b2040af0b ARM: 7526/1: traps: send SIGILL if get_user fails on undef handling path
get_user may fail to load from the provided __user address due to an
unhandled fault generated by the access.

In the case of the undefined instruction trap, this results in failure
to load the faulting instruction, in which case we should send SIGILL to
the task rather than continue with potentially uninitialised data.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-07 20:40:44 +01:00
Stephen Boyd 62194bdab8 ARM: 7521/1: Fix semihosting Kconfig text
It seems we were missing some text in the title for the
semihosting DEBUG_LL option. Add in the "/O" and fix up some
minor typos in the help text.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-07 20:40:44 +01:00
David Brown 70b0476a23 ARM: 7513/1: Make sure dtc is built before running it
'make dtbs' in a clean tree will try running the dtc before actually
building it.  Make these rules depend upon the scripts to build it.

Cc: <stable@vger.kernel.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-07 20:36:44 +01:00
Stephen Boyd b4ad51559c ARM: 7512/1: Fix XIP build due to PHYS_OFFSET definition moving
During the p2v changes, the PHYS_OFFSET #define moved into a
!__ASSEMBLY__ section. This causes a XIP build to fail with

 arch/arm/kernel/head.o: In function 'stext':
 arch/arm/kernel/head.S:146: undefined reference to 'PHYS_OFFSET'

Momentarily leave the #ifndef __ASSEMBLY__ section so we can
define PHYS_OFFSET for all compilation units.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-09-07 20:36:04 +01:00
Tony Lindgren 6ab019b62e Some hwmod, clockdomain, am335x fixes against v3.6-rc4.
Test logs can be found here:
 
    http://www.pwsan.com/omap/testlogs/omap_fixes_a_3.6rc/20120904110254/
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQR3ZZAAoJEMePsQ0LvSpLRwwQAJ/tvZhDwhBZ2/2XIn+SWWrU
 wS7MRkN+g3rsoQXjYI6n1BVCVj/qEpHpfZluaZy+09JrW2Db0pKtYGcJGF3U+TAb
 RrqOS9r2PnLrmkIpsYfigXRtDvyYuMHP/eN4WpSZywVeY8xxs7azOrCN+0pGCUYA
 DJ0ewAhini2SRGGcFqt7zXbkeOoPNGQZHpSChrN9m93fbqDqcJsk6mQ9H4Fd7oTm
 JY72d9MmgkqaGsA2hmQA25KD3NFi6u8cu/31nu+gTMZbmOA0ZYmHP8fqEk/pSyBU
 fPNIAnDs5RFYryntoQgVLQbOnhYYUIiuP+V2TBum44bG3sc0DEh4fBU/wDLNNy+H
 JBQEirZ5DYqO0sELyXC1aZtbpu5rz/lHiYPQrMlA3NXQkQKOnRtyGHsv5MO3L45R
 Gr+UyHq8nI8zB7kPIzxvlQ1mqzABUGmE8x8QlJy5PGbJW7naLaKzyUr7ULIvrekU
 fxhKmFR3I1zpXRuN5bSX/95RDSfUEJpEVpBYuhOOaXBj+T2L3tkc5zH5vJZlX2/t
 q3Qc0YXQ1/seToywVfJIqZGYceyeECdY1JCWeFwwdPBhQc8BPj/Dgor1Z460JRbg
 aJ5PTPl8q9G2aiMaB3exQkQH09CB0ZJ0oWHhkiMyxGUxGsTesuTKfriWQ7/X31AR
 GVLXEMQTvEPKJVSbiLdw
 =R0kV
 -----END PGP SIGNATURE-----

Merge tag 'omap-fixes-a-for-3.6rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into fixes

Some hwmod, clockdomain, am335x fixes against v3.6-rc4.

Test logs can be found here:

   http://www.pwsan.com/omap/testlogs/omap_fixes_a_3.6rc/20120904110254/
2012-09-05 10:09:31 -07:00
Tony Lindgren 580a7ce8fb Merge branch 'fixes-wakeupgen' into fixes 2012-09-05 10:06:08 -07:00
Linus Walleij e829c66745 ARM: gemini: fix the gemini build
Test-compiling obscure machines I notice that the gemini (which
by the way lacks a defconfig) is broken since some time back.
Adding a simple missing include makes it build again.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2012-09-04 22:17:34 -07:00
Olof Johansson f81a3a1f68 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
Two regression fixes and one boot-loader compatibility fix from Simon Horman.

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: armadillo800eva: enable rw rootfs mount
  ARM: shmobile: mackerel: fixup usb module order
  ARM: shmobile: armadillo800eva: fixup: sound card detection order
2012-09-04 21:41:35 -07:00
Tony Lindgren e534e871a9 ARM: OMAP4: Fix array size for irq_target_cpu
If NR_IRQS is less than MAX_IRQS, we end up writing past the
irq_target_cpu array in omap_wakeupgen_init():

/* Associate all the IRQs to boot CPU like GIC init does. */
for (i = 0; i < max_irqs; i++)
	irq_target_cpu[i] = boot_cpu;

This can happen if SPARSE_IRQ is enabled as by default NR_IRQS is
set to 16. Without this patch we're overwriting other data during
the boot.

Looks like a similar fix was posted by Benoit Cousson earlier
as "ARM: OMAP2+: wakeupgen: Fix wrong array size for irq_target_cpu"
but was lost.

Cc: stable@vger.kernel.org
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-04 17:22:45 -07:00
Paul Walmsley 8a94febc21 Merge branches 'clkdev_fixes_3.6rc', 'clkdm_fixes_3.6rc' and 'hwmod_data_fixes_a_3.6rc' into omap_fixes_a_3.6rc 2012-09-03 11:52:02 -06:00
Tero Kristo b360124ea0 ARM: OMAP4: hwmod data: temporarily comment out data for the sl2if IP block
The OMAP4 sl2if IP block requires some special programming for it to
enter idle. Without this programming, it will prevent the rest of
the chip from entering full chip idle.

This patch comments out the IP block data.

Later, once the appropriate support is available, this patch can be
reverted.

Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-09-03 11:50:53 -06:00
Misael Lopez Cruz 471a009b6d ARM: OMAP: hwmod code: Disable module when hwmod enable fails
Clock and module mode are explictly enable when hwmod is enabled. But if
the hwmod doesn't get ready on time, clocks are disabled but module is left
enabled.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-09-03 11:50:52 -06:00
Tero Kristo ed733619d8 ARM: OMAP3: hwmod data: fix iva2 reset info
IVA2 hwmod resets were missing the status bit offsets. Also, as the
hwmod itself didn't have prcm info at all, resetting iva hwmod was
accessing some bogus memory addresses. Added both infos to fix this.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-09-03 11:50:52 -06:00
Paul Walmsley bfb7dd25fc ARM: OMAP3xxx: clockdomain: fix software supervised wakeup/sleep
Commit 4da71ae6 ("OMAP: clockdomain: Arch specific funcs for
clkdm_clk_enable/disable") called the OMAP2xxx-specific functions for
clockdomain wakeup and sleep.  This would probably have broken
software-supervised clockdomain wakeup and sleep on OMAP3.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Jon Hunter <jon-hunter@ti.com>
Acked-by: Rajendra Nayak <rnayak@ti.com>
2012-09-03 11:50:43 -06:00
Vaibhav Hiremath 5776501390 ARM: OMAP2+: am33xx: Fix the timer fck clock naming convention
With commit ae6df418a2
Sub: ARM: OMAP2+: dmtimer: cleanup fclk usage)
The Timer functional clock naming convention has changed from
gptX_fck => timerXfck, and so as the timer init function
in mach-omap2/timer.c.
OMAP4 clocktree also has changed accordingly.

AM33xx Clock Tree has been merged during rc3-4 timeframe,
before above commit got merged, so similar change is required
for AM33xx as well (Change the gptX_fck => timerX_fck).

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-09-03 11:50:36 -06:00
Kuninori Morimoto 28e515878f ARM: shmobile: armadillo800eva: enable rw rootfs mount
armadillo800eva default boot loader is "hermit",
and it's tag->u.core.flags has flag when kernel boots.
Because of this, ${LINUX}/arch/arm/kernel/setup.c :: parse_tag_core()
didn't remove MS_RDONLY flag from root_mountflags.
Thus, the rootfs is mounted as "readonly".
This patch adds "rw" kernel parameter,
and enable read/write mounts for rootfs

Cc: Masahiro Nakai <nakai@atmark-techno.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2012-09-03 17:31:34 +09:00
Olof Johansson 3729d4a41d Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: marzen: fixup smsc911x id for regulator
2012-09-02 08:22:58 -07:00
Olof Johansson 3800bd392f Merge branch 'fixes-for-v3.6-v2' of git://git.infradead.org/users/jcooper/linux into fixes
* 'fixes-for-v3.6-v2' of git://git.infradead.org/users/jcooper/linux:
  ARM: Kirkwood: Fix 'SZ_1M' undeclared here for db88f6281-bp-setup.c
2012-09-02 08:21:25 -07:00
Andrew Lunn 4fd2057099 ARM: Kirkwood: Fix 'SZ_1M' undeclared here for db88f6281-bp-setup.c
Linux-next has failed to compile for kirkwood since 23 August with:

arch/arm/mach-kirkwood/db88f6281-bp-setup.c:29: error: 'SZ_1M' undeclared here (not in a function)
arch/arm/mach-kirkwood/db88f6281-bp-setup.c:33: error: 'SZ_4M' undeclared here (not in a function)

Add missing <linux/sizes.h>

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-08-31 15:45:30 +00:00
Kuninori Morimoto e26a6038d3 ARM: shmobile: mackerel: fixup usb module order
renesas_usbhs driver can play role as both Host and Gadget.
In case of Gadget, it requires not only renesas_usbhs
but also usb gadget module (like g_ether).
So, renesas_usbhs driver calls usb_add_gadget_udc() on probe time.

Because of this behavior,
Host port plays also Gadget role if kernel has both Host/Gadget support.

In mackerel case, from 0ada2da518
(ARM: mach-shmobile: mackerel: use renesas_usbhs instead of r8a66597_hcd)
usb0 plays Gadget role, and usb1 plays Host role,
and current mackerel board probes as usb1 -> usb0.
Thus, 1st installed usb gadget module (like g_ether) will be
assigned to usb1 (= usb Host port), and 2nd module to usb0 (= usb Gadget port).
It is very confusable for user.
This patch fixup usb modes probing order as usb0 -> usb1.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2012-08-31 15:29:49 +09:00
Kuninori Morimoto ee3c843d0f ARM: shmobile: armadillo800eva: fixup: sound card detection order
Since armadillo800eva has 2 sound cards,
and had reversed deferred probe order issue,
it was purposely registered in reverse order.

But it was solved by
1d29cfa574
(driver core: fixup reversed deferred probe order)

armadillo800eva board is expecting that
FSI-WM8978 is the 1st, and FSI-HDMI is the 2nd sound card.
This patch fixes it up

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2012-08-31 15:29:42 +09:00
Radek Pilar a17fb8f520 ARM: OMAP: Config fix for omap3-touchbook board
Fix inconsistency between mach-types and CONFIG_ name that prevents
touchbook board from booting.

Signed-off-by: Radek Pilar <mrkva@mrkva.eu>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30 13:54:52 -07:00
Aaro Koskinen b285673489 ARM: OMAP: sram: skip the first 16K on OMAP3 HS
In some OMAP3 HS devices (at least Nokia N9 and N950), the public SRAM
seems to conflict with secure portition of SRAM. When booting the 3.6-rc3
kernel (and also earlier) on these devices, the kernel gets tainted with
tons of the following warnings:

	[    6.894348] In-band Error seen by MPU  at address 0
	[...]
	[    6.894378] WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:162

Fix this by skipping the first 16K of the public SRAM. (Note that the
mapping could not be changed, as it resulted in secure monitor call
failure in save_secure_sram().)

This will leave 12K SRAM available that should be still sufficient. The
patch has been boot tested with vanilla 3.6-rc3 on N900, N950 and N9.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30 13:38:38 -07:00
Aaro Koskinen 528c28f5c1 ARM: OMAP: sram: fix OMAP4 errata handling
OMAP4-specific code should be executed only if we are running on
OMAP4. Otherwise it may break multi-OMAP kernels. Found by reading
the code.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30 13:37:11 -07:00
Igor Grinberg 45caae74d2 ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER
Currently, omap2_sync32k_clocksource_init() function initializes the 32K
timer as the system clock source regardless of the CONFIG_OMAP_32K_TIMER
setting.
Fix this by providing a default implementation for
!CONFIG_OMAP_32K_TIMER case.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-30 13:19:03 -07:00
Kuninori Morimoto 497dcf6fc3 ARM: shmobile: marzen: fixup smsc911x id for regulator
dummy_supplies for smsc911x are registered as "smsc911x".
smsc911x driver needs id = -1

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2012-08-30 14:10:08 +09:00
Hiroshi Doyu 479ed93a4b ARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC
Make use of the same atomic pool as DMA does, and skip a kernel page
mapping which can involve sleep'able operations at allocating a kernel
page table.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-08-28 21:01:07 +02:00
Hiroshi Doyu 665bad7bb9 ARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()
Support atomic allocation in __iommu_get_pages().

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
[moved __atomic_get_pages() under #ifdef CONFIG_ARM_DMA_USE_IOMMU
 to avoid unused fuction warning for no-IOMMU case]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-08-28 21:01:06 +02:00
Hiroshi Doyu 21d0a75951 ARM: dma-mapping: Refactor out to introduce __in_atomic_pool
Check the given range("start", "size") is included in "atomic_pool" or not.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-08-28 21:01:06 +02:00
Hiroshi Doyu 6b3fe47264 ARM: dma-mapping: atomic_pool with struct page **pages
struct page **pages is necessary to align with non atomic path in
__iommu_get_pages(). atomic_pool() has the intialized **pages instead
of just *page.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-08-28 21:01:05 +02:00
Marek Szyprowski cb01b633ee ARM: Kirkwood: increase atomic coherent pool size
The default 256 KiB coherent pool may be too small for some of the Kirkwood
devices, so increase it to make sure that devices will be able to allocate
their buffers with GFP_ATOMIC flag.

Suggested-by: Josh Coombs <josh.coombs@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
2012-08-28 21:01:04 +02:00
Marek Szyprowski fb71285f0c ARM: DMA-Mapping: print warning when atomic coherent allocation fails
Print a loud warning when system runs out of memory from atomic DMA
coherent pool to let users notice the potential problem.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-08-28 21:01:03 +02:00
Marek Szyprowski 6e5267aa54 ARM: DMA-Mapping: add function for setting coherent pool size from platform code
Some platforms might require to increase atomic coherent pool to make
sure that their device will be able to allocate all their buffers from
atomic context. This function can be also used to decrease atomic
coherent pool size if coherent allocations are not used for the given
sub-platform.

Suggested-by: Josh Coombs <josh.coombs@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-08-28 21:01:02 +02:00
Marek Szyprowski e092705bcd ARM: relax conditions required for enabling Contiguous Memory Allocator
Contiguous Memory Allocator requires only paging and MMU enabled not
particular CPU architectures, so there is no need for strict dependency
on CPU type. This enables to use CMA on some older ARM v5 systems which
also might need large contiguous blocks for the multimedia processing hw
modules.

Reported-by: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Prabhakar Lad <prabhakar.lad@ti.com>
2012-08-28 21:01:02 +02:00
Olof Johansson aa9f6d6b1b Merge branch 'armadillo800eva' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
* 'armadillo800eva' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: mach-shmobile: armadillo800eva: Enable power button as wakeup source
  ARM: mach-shmobile: armadillo800eva: Fix GPIO buttons descriptions
2012-08-27 17:07:45 -07:00
Olof Johansson 981ba65715 Fixes for AT91 related to:
- move to sparse IRQ: some drivers were forgotten
 - a DTS typo
 - the delay for removal of old at91_mci driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJQOykiAAoJEAf03oE53VmQS0MIALb4N+yRt6+Y3hjvFT386bYb
 aA24NJRRn3Lsyldc7lDpKQPsAUdlPWGp6SNdUlfSFFerI2tEtwzCKkSpvN/4vH6f
 e5LtlGSRKrzzDjaKl9cLJOKwm2rGPC37VjmdqFE4Mfcl3YzFGKLpvevq8uMBTCEz
 6GnODy7njBk62Zzky0NR4SOgrPdI9EO5XZijXWXCfwW6MHjxRBRZf+Hn+LcJvQ5N
 gLZfgMCtebsjb2x1pYP+4NfBQQLpx+sHy4on5IPlp1fEYaIaMXKCFGQNhTRqKSSD
 xSpBRV/XmzmAWvffQJiiRYR4CG6lKwvhGhuxBUn5z7dRIcSoiRQKB7oISWITZs4=
 =Itki
 -----END PGP SIGNATURE-----

Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes

Fixes for AT91 related to:
- move to sparse IRQ: some drivers were forgotten
- a DTS typo
- the delay for removal of old at91_mci driver

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91/feature-removal-schedule: delay at91_mci removal
  ARM: at91/dts: remove partial parameter in at91sam9g25ek.dts
  ARM: at91/clock: fix PLLA overclock warning
  ARM: at91: fix rtc-at91sam9 irq issue due to sparse irq support
  ARM: at91: fix system timer irq issue due to sparse irq support
2012-08-27 17:07:37 -07:00
Olof Johansson 314949321e Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas into fixes
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas:
  ARM: shmobile: sh73a0: fixup RELOC_BASE of intca_irq_pins_desc
2012-08-27 17:07:32 -07:00