Commit Graph

130413 Commits

Author SHA1 Message Date
Russell King 39a80c7f37 [ARM] omap: watchdog: convert clocks to match by devid and conid
This eliminates the need for separate OMAP24xx and OMAP34xx clock
requesting code sections.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:16 +00:00
Russell King f1c2543738 [ARM] omap: provide a dummy clock node
By providing a dummy clock node, we can eliminate the SoC conditional
clock handing in the OMAP drivers, moving this knowledge out of the
driver and into the machine clock support code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:15 +00:00
Russell King 2b811bb56a [ARM] omap: remove pre-CLKDEV clk_get/clk_put
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:15 +00:00
Russell King 44dc9d027f [ARM] omap: convert OMAP3 to use clkdev
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:15 +00:00
Russell King 8ad8ff6548 [ARM] omap: convert OMAP2 to use clkdev
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:14 +00:00
Russell King d7e8f1f9d6 [ARM] omap: convert OMAP1 to use clkdev
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:13 +00:00
Russell King dbb674d57b [ARM] omap: allow double-registering of clocks
This stops things blowing up if a 'struct clk' to be passed more
than once to clk_register(), which will be required when we decouple
struct clk's from their names.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:12 +00:00
Russell King 1e98ffa85e [ARM] omap: ensure devname is set for dummy devices
This is needed to use these with the clkdev helpers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:12 +00:00
Russell King d5e6072b75 [ARM] omap: handle RATE_CKCTL via .set_rate/.round_rate methods
It makes no sense to have the CKCTL rate selection implemented as a flag
and a special exception in the top level set_rate/round_rate methods.
Provide CKCTL set_rate/round_rate methods, and use these for where ever
RATE_CKCTL is used and they're not already overridden.  This allows us
to remove the RATE_CKCTL flag.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:11 +00:00
Russell King 9a5fedac18 [ARM] omap: move propagate_rate() calls into generic omap clock code
propagate_rate() is recursive, so it makes sense to minimise the
amount of stack which is used for each recursion.  So, rather than
recursing back into it from the ->recalc functions if RATE_PROPAGATES
is set, do that test at the higher level.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:11 +00:00
Russell King a9e8820963 [ARM] omap: remove unnecessary calls to propagate_rate()
We've always called propagate_rate() in the parent function to
the .set_rate methods, so there's no point having the .set_rate
methods also call this heavy-weight function - it's mere
duplication of what's happening elsewhere.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:10 +00:00
Russell King c6af450852 [ARM] omap: move clock propagation into core omap clock code
Move the clock propagation calls for set_parent and set_rate into
the core omap clock code, rather than having these calls scattered
throughout the OMAP1 and OMAP2 implementations.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:50:10 +00:00
Russell King 2e777bf1f2 [ARM] omap: provide a standard clk_get_parent() implementation
which only has to return clk->parent.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:49:22 +00:00
Russell King ae8fce5c3b [ARM] omap: remove clk_deny_idle and clk_allow_idle
Nothing makes any use of these functions, so there's little point in
providing them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 17:46:15 +00:00
Russell King ebb8dca295 [ARM] omap: rearrange clock.h structure order
... to eliminate unnecessary padding.  We have rather a lot of these
structures, so eliminating unnecessary padding results in a saving of
1488 bytes.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 11:38:42 +00:00
Russell King eee5b19119 [ARM] omap: remove clk->owner
clk->owner is always NULL, so its existence doesn't serve any useful
function other than bloating the kernel by 992 bytes.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 11:38:41 +00:00
Russell King c1168dc31d [ARM] omap: don't use clkops_omap2_dflt_wait for non-ICLK/FCLK clocks
The original code in omap2_clk_wait_ready() used to check the low 8
bits to determine whether they were within the FCLKEN or ICLKEN
registers.  Specifically, the test is satisfied when these offsets
are used:

 CM_FCLKEN, CM_FCLKEN1, CM_CLKEN, OMAP24XX_CM_FCLKEN2, CM_ICLKEN,
 CM_ICLKEN1, CM_ICLKEN2, CM_ICLKEN3, OMAP24XX_CM_ICLKEN4
 OMAP3430_CM_CLKEN_PLL, OMAP3430ES2_CM_CLKEN2

If one of these offsets isn't used, omap2_clk_wait_ready() merely
returns without doing anything.  So we should use the non-wait clkops
version instead and eliminate that conditional.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 11:38:41 +00:00
Russell King bc51da4ee4 [ARM] omap: eliminate unnecessary conditionals in omap2_clk_wait_ready
Rather than employing run-time tests in omap2_clk_wait_ready() to
decide whether we need to wait for the clock to become ready, we
can set the .ops appropriately.

This change deals with the OMAP24xx and OMAP34xx conditionals only.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 11:38:40 +00:00
Russell King b36ee72420 [ARM] omap: add default .ops to all remaining OMAP2 clocks
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 11:38:40 +00:00
Russell King 57137181e3 [ARM] omap: kill PARENT_CONTROLS_CLOCK
PARENT_CONTROLS_CLOCK just makes enable/disable no-op, and is
functionally an alias for ALWAYS_ENABLED.  This can be handled
in the same way, using clkops_null.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 11:38:39 +00:00
Russell King 897dcded6f [ARM] omap: provide a NULL clock operations structure
... and use it for clocks which are ALWAYS_ENABLED.  These clocks
use a non-NULL enable_reg pointer for other purposes (such as
selecting clock rates.)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-08 11:38:39 +00:00
Russell King 548d849574 [ARM] omap: introduce clock operations structure
Collect up all the common enable/disable clock operation functions
into a separate operations structure.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-02 14:52:18 +00:00
Russell King db8ac47cfc [ARM] omap: remove VIRTUAL_CLOCK
Nothing tests the clock flags for this bit, so it serves no purpose.
Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-02-02 14:49:08 +00:00
Russell King de8696203e Merge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2009-02-01 17:53:26 +00:00
Uwe Kleine-König 807a96cd0e NVRAM depends on RTC_DRV_CMOS
drivers/char/nvram.c uses rtc_lock, that (on ARM) is only defined if
RTC_DRV_CMOS is enabled.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2009-01-31 01:21:59 +01:00
Uwe Kleine-König bcc8f3e01f rename platform_driver name "flash" to "sa1100-mtd"
"flash" is a very generic name for a platform_driver that is only
available on SA11x0.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Nicolas Pitre <nico@marvell.com>
2009-01-31 01:21:58 +01:00
Uwe Kleine-König b3c960b277 annotate that [fp, #-4] is the saved lr
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2009-01-31 01:21:56 +01:00
Uwe Kleine-König 6fd7ad96d6 Use __SPIN_LOCK_UNLOCKED to initialize bad_irq_desc.lock
SPIN_LOCK_UNLOCKED is deprecated as lockdep cannot properly work with
locks initialized with it.

This fix is necessary to compile the linux-rt tree for ARM.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Steven Rostedt <srostedt@redhat.com>
2009-01-31 01:21:55 +01:00
Kevin Hilman 0dc23d7048 ARM: OMAP: fix fault in enter_full_retention()
In omap24xx_cpu_suspend assembly routine, the r2 register which holds
the address of the SDRC_POWER reg is set to zero before the value is
written back triggering a fault due to writing to address zero.

It's hard to tell where this change was introduced since this file
has been moved and merged.

While this fix prevents a crash, suspend on my n810 is broken with
current kernels.  I never come out of suspend.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-01-29 09:27:00 -08:00
김규원 5461af5af5 ARM: OMAP: Mask interrupts when disabling interrupts, v2
By Ingo Molnar, interrupts are not masked by default.
(refer to 76d2160147)

But if interrupts are not masked, the processor can wake up while in
Suspend-to-RAM state by an external interrupt. For example, if an
OMAP3 board is connected to Host PC by USB and entered to Suspend-to-RAM
state, it wake up automatically by M_IRQ_92. The disable_irq() function
can't disable the interrupt in H/W level, So I modified
arch/arm/mach-omap2/irq.c

Signed-off-by: Kim Kyuwon <chammoru@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-01-29 09:27:00 -08:00
Aaro Koskinen df88acbbdc ARM: OMAP: gptimer min_delta_ns corrected
When 32 kHz timer is used the min_delta_ns should be initialized so
that it reflects the timer programming cost. A write to the timer
device will be usually posted, but it takes roughly 3 cycles before
it is effective. If the timer is reprogrammed before that, the CPU
will stall until the previous write completes. This was pointed out by
Richard Woodruff.

Since the lower bound for min_delta_ns is 1000, the change is visible
only with tick rates less than 3 MHz.

Also note that the old value is incorrect for 32 kHz also due to
a rounding error, and it can cause the timer queue to hang (due to
clockevent code trying to program the timer with zero ticks).

Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
Reviewed-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-01-29 09:27:00 -08:00
Tony Lindgren 0dffb5c57a ARM: OMAP: Fix hsmmc init, v2
The naming accidentally broke while changing the name for the
driver to not to conflict with the other mmc driver.

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-01-29 08:57:16 -08:00
Tony Lindgren 187e688d23 ARM: OMAP: Fix omap34xx revision detection for ES3.1
Fix omap34xx revision detection for ES3.1

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-01-29 08:57:16 -08:00
Jarkko Nikula a92fda194d ARM: OMAP: DMA: Fix uninitialized channel flags
This has similar symptoms than 66c23551b1
where just omap_request_dma, omap_dma_link_lch and omap_dma_unlink_lch
can cause incorrect dump_stack(). Here it can happen if channel has been
used before and the channel flags variable holds old status.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-01-29 08:57:12 -08:00
Juha Yrjola 320ce6f6fb ARM: OMAP: Fix race in OMAP2/3 DMA IRQ handling
CSR must be cleared before invoking the callback.

If the callback function starts a new, fast DMA transfer on the same
channel, the completion status might lost if CSR is cleared after
the callback invocation.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-01-29 08:57:12 -08:00
Stanley.Miao 06151158f2 ARM: OMAP: Fix McBSP spin_lock deadlock
A spin_lock deadlock will occur when omap_mcbsp_request() is invoked.

omap_mcbsp_request()
\- clk_enable(mcbsp->clk)         [takes and holds clockfw_lock]
    \- omap2_clk_enable()
       \- _omap2_clk_enable()
           \- omap_mcbsp_clk_enable()
              \- clk_enable(child clock)   [tries for clockfw_lock again]

mcbsp_clk is a virtual clock and it comprises several child clocks. when
enable mcbsp_clk in omap_mcbsp_request(), the enable function of mcbsp_clk
will enable its child clocks, then the deadlock occurs.

The solution is to remove the virtual clock and enable these child clocks in
omap_mcbsp_request() directly.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-01-29 08:57:12 -08:00
Linus Torvalds 18e352e4a7 Linux 2.6.29-rc3 2009-01-28 10:49:30 -08:00
Linus Torvalds c4568d6c7e Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup code
  powerpc/pseries: Correct VIO bus accounting problem in CMO env.
  powerpc: More printing warning fixes for the l64 to ll64 conversion
  powerpc: Remove arch/ppc cruft from Kconfig
  powerpc: Printing fix for l64 to ll64 conversion: phyp_dump.c
  powerpc/embedded6xx: Update defconfigs
  powerpc/8xx: Update defconfigs
  powerpc/86xx: Update defconfigs
  powerpc/83xx: Update defconfigs
  powerpc/85xx: Update defconfigs
  powerpc/mpc8313erdb: fix kernel panic because mdio device is not probed
  powerpc/4xx: Update multi-board PowerPC 4xx defconfigs
  powerpc/44x: Update PowerPC 44x defconfigs
  powerpc/40x: Update PowerPC 40x defconfigs
  powerpc/85xx: Fix typo in mpc8572ds dts
  powerpc/44x: Warp patches for the new NDFC driver
  powerpc/4xx: DTS: Add Add'l SDRAM0 Compatible and Interrupt Info
2009-01-28 09:01:42 -08:00
Nicolas Pitre 08e445bd6a [ARM] 5366/1: fix shared memory coherency with VIVT L1 + L2 caches
When there are multiple L1-aliasing userland mappings of the same physical
page, we currently remap each of them uncached, to prevent VIVT cache
aliasing issues. (E.g. writes to one of the mappings not being immediately
visible via another mapping.)  However, when we do this remapping, there
could still be stale data in the L2 cache, and an uncached mapping might
bypass L2 and go straight to RAM.  This would cause reads from such
mappings to see old data (until the dirty L2 line is eventually evicted.)

This issue is solved by forcing a L2 cache flush whenever the shared page
is made L1 uncacheable.

Ideally, we would make L1 uncacheable and L2 cacheable as L2 is PIPT. But
Feroceon does not support that combination, and the TEX=5 C=0 B=0 encoding
for XSc3 doesn't appear to work in practice.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-28 16:55:00 +00:00
Linus Torvalds 78a768b6ca Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68knommu: fix 5329 ColdFire periphal addressing
  uclinux: add process name to allocation error message
  m68knommu: correct the mii calculations for 532x ColdFire FEC
  m68knommu: add ColdFire M532x to the FEC configuration options
  m68knommu: fix syscall restarting
  m68knommu: remove the obsolete and long unused comempci chip support
  m68knommu: remove the no longer used PCI support option
  m68knommu: remove obsolete and unused eLIA board
  m68knommu: set NO_DMA
  m68knommu: fix cache flushing for the 527x ColdFire processors
  m68knommu: fix ColdFire 5272 serial baud rates in mcf.c
  m68knommu: use one exist from execption
2009-01-28 08:41:57 -08:00
Kumar Gala d8204ee2ad dmi: Fix build breakage
Commit d7b1956fed ("DMI: Introduce
dmi_first_match to make the interface more flexible") introduced compile
errors like the following when !CONFIG_DMI

    drivers/ata/sata_sil.c: In function 'sil_broken_system_poweroff':
    drivers/ata/sata_sil.c:713: error: implicit declaration of function 'dmi_first_match'
    drivers/ata/sata_sil.c:713: warning: initialization makes pointer from integer without a cast

We just need a dummy version of dmi_first_match() to fix this all up.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-28 07:50:14 -08:00
Eric Anholt 30b2363408 drm: Rip out the racy, unused vblank signal code.
Schedule a vblank signal, kill the process, and we'll go walking over freed
memory.  Given that no open-source userland exists using this, nor have I
ever heard of a consumer, just let this code die.

Signed-off-by: Eric Anholt <eric@anholt.net>
Requested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-28 07:50:14 -08:00
Russell King ecbab71c52 [ARM] call undefined instruction exception handler with irqs enabled
Aaro says:
> With spinlock debugs enabled I get might_sleep() warnings when using
> ptrace.

tracked down to a missing enable_irq before calling do_undefinstr().

Reported-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-28 10:19:53 +00:00
Russell King 9ce8bb55e3 [ARM] msm: fix build errors
arch/arm/mach-msm/board-halibut.c:45: error: implicit declaration of function 'MSM_GPIO_TO_INT'
arch/arm/mach-msm/board-halibut.c:45: error: initializer element is not constant
arch/arm/mach-msm/board-halibut.c:45: error: (near initialization for 'smc91x_resources[1].start')
arch/arm/mach-msm/board-halibut.c:46: error: initializer element is not constant
arch/arm/mach-msm/board-halibut.c:46: error: (near initialization for 'smc91x_resources[1].end')

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-28 10:19:52 +00:00
Russell King a71558d0ec [ARM] etherh: continue fixing build failure
Further to 483a2b3a31, also fix:

drivers/net/arm/etherh.c:649: error: 'eth_set_mac_addr' undeclared here (not in a function)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-01-28 10:19:52 +00:00
Gerhard Pircher 4c456a67f5 powerpc/mm: Fix handling of _PAGE_COHERENT in BAT setup code
_PAGE_COHERENT is now always set in _PAGE_RAM resp. PAGE_KERNEL.
Thus it has to be masked out, if the BAT mapping should be non
cacheable or CPU_FTR_NEED_COHERENT is not set.

This will work on normal SMP setups because we force-set
CPU_FTR_NEED_COHERENT as part of CPU_FTR_COMMON on SMP.

Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:52 +11:00
Robert Jennings 69b052e828 powerpc/pseries: Correct VIO bus accounting problem in CMO env.
In the VIO bus code the wrappers for dma alloc_coherent and free_coherent
calls are rounding to IOMMU_PAGE_SIZE.  Taking a look at the underlying
calls, the actual mapping is promoted to PAGE_SIZE.  Changing the
rounding in these two functions fixes under-reporting the entitlement
used by the system.  Without this change, the system could run out of
entitlement before it believes it has and incur mapping failures at the
firmware level.

Also in the VIO bus code, the wrapper for dma map_sg is not exiting in
an error path where it should.  Rather than fall through to code for the
success case, this patch adds the return that is needed in the error path.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:52 +11:00
Stephen Rothwell 4712fff9be powerpc: More printing warning fixes for the l64 to ll64 conversion
These are all powerpc specific drivers.

res.start in fsl_elbc_nand.c needs to be cast since it may be either 32
or 64 bit.  Thanks to Scott Wood for noticing.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Arnd Bergmann <arnd@arndb.de> call_edac bits in particular
Acked-by: Olof Johansson <olof@lixom.net> pasemi_nand peices
Acked-by: Scott Wood <scottwood@freescale.com> fsl_elbc fixes
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:52 +11:00
Josh Boyer 52c275fe70 powerpc: Remove arch/ppc cruft from Kconfig
Remove some leftover cruft from the arch/ppc days

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:51 +11:00
Stephen Rothwell 802bdea875 powerpc: Printing fix for l64 to ll64 conversion: phyp_dump.c
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-01-28 17:15:51 +11:00