Paul Walmsley [Wed, 14 Nov 2007 08:30:15 +0000 (01:30 -0700)]
SRAM patcher: convert omap2_set_prcm to use runtime SRAM patcher
Use the runtime SRAM patcher to set register addresses in
omap2_set_prcm. The long symbol names are intended to help
disambiguate the symbols, now that they are global.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Wed, 14 Nov 2007 08:30:14 +0000 (01:30 -0700)]
SRAM patcher: convert sram_reprogram_sdrc to use runtime SRAM patcher
Use the runtime SRAM patcher to set register addresses in
sram_reprogram_sdrc. The long symbol names are intended to help
disambiguate the symbols, now that they are global.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Wed, 14 Nov 2007 08:30:13 +0000 (01:30 -0700)]
SRAM patcher: convert sram_ddr_init to use runtime SRAM patcher
Use the runtime SRAM patcher to set register addresses in
sram_ddr_init. The long symbol names are intended to help
disambiguate the symbols, now that they are global.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Wed, 14 Nov 2007 08:30:12 +0000 (01:30 -0700)]
SRAM patcher: convert omap24xx_sram_suspend to use runtime SRAM patcher
Use the runtime SRAM patcher to set register addresses in
omap24xx_sram_suspend. The long symbol names are intended to help
disambiguate the symbols, now that they are global.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Wed, 14 Nov 2007 08:30:11 +0000 (01:30 -0700)]
SRAM patcher: add SRAM virtual address patcher
Add omap_sram_patch_va(), which patches a virtual address into SRAM
code at runtime. This will be used in a future patch series to implement
part of multiboot support for OMAP2/3.
If CONFIG_OMAP_DEBUG_SRAM_PATCH is defined (the default), the code
will be very careful to ensure that the target location to patch is
valid. It will only overwrite a location if the location contains a
32-bit magic number, defined as SRAM_VA_MAGIC. Also, defining DEBUG
at the top of the file and enabling CONFIG_DEBUG_LL will log patch
locations and data via printk.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 12 Nov 2007 10:57:28 +0000 (03:57 -0700)]
3430 clock: add emulation clocks
Add clocks for the EMU domain for OMAP3430. Richard Woodruff mentions that
documentation for these clocks, beyond the register bit settings found
in the main 3430 TRM, can be found in several other documents: the 3430
Emulation TRM; also SPRU893 and SPRU928; and some documents from
ARM Ltd including CoreSight, ETM, and ARM debug v5 architecture.
Some information is also available in the ARM Cortex-A8 TRM, section 10.1.
Also, rename existing emul_* clocks to emu_* to conform with recent TRMs.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Paul Walmsley [Mon, 12 Nov 2007 10:57:27 +0000 (03:57 -0700)]
3430 clock: revise SmartReflex clocks
The two SmartReflex voltage controllers on OMAP3430 have one
functional clock each. These clocks appear to be independent of each
other. Encode them appropriately, replacing the previous 'sr_alwon_fck'
clock.
Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Jarkko Nikula [Wed, 7 Nov 2007 10:54:33 +0000 (12:54 +0200)]
ARM: OMAP: N800: Use I2C bus registration helper
Use 400 kHz bus clock for both busses since board components are rated
for it.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Jarkko Nikula [Wed, 7 Nov 2007 10:54:32 +0000 (12:54 +0200)]
ARM: OMAP: Use I2C bus registration helper
This patch starts using introduced I2C bus registration helper by cleaning
up registration currently done in various places and by doing necessary
board file modifications.
Patch modifies those board files that are merged upstream. Most of the
boards except osk and 2430sdp are configured to use 100 kHz I2C clock
until they are verified for higher clock.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Jarkko Nikula [Wed, 7 Nov 2007 10:54:31 +0000 (12:54 +0200)]
ARM: OMAP: Add helper module for board specific I2C bus registration
This helper module simplifies I2C bus registration for different OMAP
platforms by doing registration in one place only and to allow board
specific bus configuration like clock rate and number of busses configured.
Helper should cover OMAP processors from first to third generation.
This patch just adds the feature and current implementation cleanup and
board file modifications will be done in following patches.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Jarkko Nikula [Tue, 13 Nov 2007 13:53:14 +0000 (15:53 +0200)]
CBUS: Do not BUG_ON in retu-headset in case of spurious release event
There is a small chance that retu_headset_detect_timer can run twice
and pressed flag being zero in second run. Do nothing in that case instead
of throwing BUG_ON.
Double run can happen under very busy system assuming following scenario
1. Hook interrupt (run in softirq context, pressed flag = 1)
2. First retu_headset_enable_timer call
3. Busy system, retu raises an interrupt but cannot run hook interrupt for
300-350 ms
4. Second hook interrupt
5. First retu_headset_detect_timer call (pressed flag = 0)
6. Second retu_headset_enable_timer
7. Second retu_headset_detect_timer
-> pressed flag == 0 => BUG_ON
Patch also removes two debug messages since they are not needed very much
and removal cleans up code a bit.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
According with commit 255d01af9a990fd5166f04ed0cc0b30b7b67e81e
from Linux-OMAP tree, the BYTEBLOCK capability was removed by Pierre Ossman.
MMC_CAP_BYTEBLOCK is not defined causing the compile error:
drivers/mmc/host/omap.c: In function `mmc_omap_probe':
drivers/mmc/host/omap.c:1077: error: `MMC_CAP_BYTEBLOCK' undeclared (first use in this function)
drivers/mmc/host/omap.c:1077: error: (Each undeclared identifier is reported only once
drivers/mmc/host/omap.c:1077: error: for each function it appears in.)
Signed-off-by: Francisco Alecrim <francisco.alecrim@indt.org.br> Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br> Signed-off-by: Tony Lindgren <tony@atomide.com>
Hunyue Yau [Thu, 1 Nov 2007 22:40:49 +0000 (15:40 -0700)]
fix NULL pointer with MUSB and DMA on ISO ep
For the case of an isochonous endpoint, musb_write_fifo may be
called with a NULL buffer from musb_host_tx if DMA is enabled.
Remove DMA check and always supply a valid buffer as long as
the URB contains a valid buffer.
Signed-off-by: Hunyue Yau <hyau@mvista.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
OMAP: Update gpio expander code to the corret i2c adapter id
- Update gpio expander code to the corret i2c adapter id
- Due to changes on i2c binding style, the i2c adapter is 1
and not 0. (as configured on i2c_register_board_info)
Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br> Signed-off-by: Tony Lindgren <tony@atomide.com>
Kevin Hilman [Tue, 30 Oct 2007 11:34:49 +0000 (04:34 -0700)]
ARM: OMAP: Update PRCM rate-table entries for 2430
[resend with minor build fix and updated description]
Follow the lead of the TI kernels by removing PRCM #2 and adding PRCM
#3 and #4 to the rate-table entries. According to TI, having #2 and
#3 together is known to be a bad combination.
Also, change the default divider values for the PRCM #5a setting to
match those of the TI kernel. Using the smallest divider possible can
give significant power savings when using the data-driven idle modes.
Signed-off-by: Kevin Hilman <khilman@mvista.com> Acked-by: Richard Woodruff <r-woodruff2@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Jarkko Nikula [Wed, 31 Oct 2007 12:04:42 +0000 (14:04 +0200)]
CBUS: Fix reentrant issues in retu-headset driver
- Make headset bias and headset button detection enable/disable functions
reentrant. Protect also suspend/resume callbacks since they call
retu_headset_set_bias directly.
- Don't define flag variables as bit fields since bit operations may not be
atomic and we access one of them from interrupt. Now other flags don't
need any additional locking since they are not accessed from interrupt
context.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Tony Lindgren [Thu, 1 Nov 2007 08:28:54 +0000 (01:28 -0700)]
ARM: OMAP: Fix compile for omap1
Based on an earlier patch by Luís Vitório Cargnini, add a dummy define
for OMAP2_CTRL_BASE. Eventually this will get fixed by setting a base
address during boot.
Anand Gadiyar [Wed, 24 Oct 2007 07:10:21 +0000 (12:40 +0530)]
OMAP: DMA: Added support for DMA chaining
Added support for DMA chaining.
This patch depends on patches [1-3]
"OMAP: DMA: Cleanup of DMA Request Lines",
"OMAP: DMA: Added support for OMAP3" and
"OMAP: DMA: Added utility APIs for setting DMA global parameters".
Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Anand Gadiyar [Wed, 24 Oct 2007 07:08:51 +0000 (12:38 +0530)]
DMA: Added utility APIs for setting DMA global parameters
Added DMA utility APIs for setting FIFO depth, arbitration rate and channel priority.
This patch depends on patch [2/4] "OMAP: DMA: Added support for OMAP3".
Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Kevin Hilman [Wed, 17 Oct 2007 22:25:26 +0000 (15:25 -0700)]
ARM: OMAP: unlock flash device during boot
The bootloader may lock the flash device upon booting. This requires
the use of 'flash_unlock' on each partition before using them.
However, when booting from flash the MTD driver is unable to "mark
space as dirty" since the device is locked. This results lots of boot
warnings from the MTD layer.
The MTD driver for OMAP needs to unlock the device during init so
booting from flash can work without errors.
Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Fix clk_put functions mismatch in the release fn which would crash the kernel if
the WDT test is run multiple times with "CONFIG_WATCHDOG_NOWAYOUT" disabled.
Fix the shutdown function.Check for wdt users before calling disable.
Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Updated for path change to drivers/watchdog.
Linus Torvalds [Tue, 23 Oct 2007 16:56:11 +0000 (09:56 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
mlx4_core: Increase command timeout for INIT_HCA to 10 seconds
IPoIB/cm: Use common CQ for CM send completions
IB/uverbs: Fix checking of userspace object ownership
IB/mlx4: Sanity check userspace send queue sizes
IPoIB: Rewrite "if (!likely(...))" as "if (unlikely(!(...)))"
IB/ehca: Enable large page MRs by default
IB/ehca: Change meaning of hca_cap_mr_pgsize
IB/ehca: Fix ehca_encode_hwpage_size() and alloc_fmr()
IB/ehca: Fix masking error in {,re}reg_phys_mr()
IB/ehca: Supply QP token for SRQ base QPs
IPoIB: Use round_jiffies() for ah_reap_task
RDMA/cma: Fix deadlock destroying listen requests
RDMA/cma: Add locking around QP accesses
IB/mthca: Avoid alignment traps when writing doorbells
mlx4_core: Kill mlx4_write64_raw()
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest: (45 commits)
Use "struct boot_params" in example launcher
Loading bzImage directly.
Revert lguest magic and use hook in head.S
Update lguest documentation to reflect the new virtual block device name.
generalize lgread_u32/lgwrite_u32.
Example launcher handle guests not being ready for input
Update example launcher for virtio
Lguest support for Virtio
Remove old lguest I/O infrrasructure.
Remove old lguest bus and drivers.
Virtio helper routines for a descriptor ringbuffer implementation
Module autoprobing support for virtio drivers.
Virtio console driver
Block driver using virtio.
Net driver using virtio
Virtio interface
Boot with virtual == physical to get closer to native Linux.
Allow guest to specify syscall vector to use.
Rename "cr3" to "gpgdir" to avoid x86-specific naming.
Pagetables to use normal kernel types
...
Herbert Xu [Tue, 23 Oct 2007 03:26:25 +0000 (11:26 +0800)]
Fix synchronize_irq races with IRQ handler
As it is some callers of synchronize_irq rely on memory barriers
to provide synchronisation against the IRQ handlers. For example,
the tg3 driver does
tp->irq_sync = 1;
smp_mb();
synchronize_irq();
and then in the IRQ handler:
if (!tp->irq_sync)
netif_rx_schedule(dev, &tp->napi);
Unfortunately memory barriers only work well when they come in
pairs. Because we don't actually have memory barriers on the
IRQ path, the memory barrier before the synchronize_irq() doesn't
actually protect us.
In particular, synchronize_irq() may return followed by the
result of netif_rx_schedule being made visible.
This patch (mostly written by Linus) fixes this by using spin
locks instead of memory barries on the synchronize_irq() path.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 23 Oct 2007 15:57:35 +0000 (08:57 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Add Vitaly Bordug as PPC8xx maintainer
[POWERPC] 4xx: Enable EMAC on Bamboo board
[POWERPC] 4xx: Enable EMAC for PPC405 Walnut board
[POWERPC] 4xx: Fix timebase clock selection on Walnut
[POWERPC] 4xx: Enable EMAC on the PPC 440GP Ebony board
[POWERPC] 4xx: Split early debug output and early boot console for 44x
[POWERPC] 4xx: Enable NEW EMAC support for Sequoia 440EPx.
[POWERPC] 4xx: Add RGMII support for Sequoia 440EPx
Linus Torvalds [Tue, 23 Oct 2007 15:56:50 +0000 (08:56 -0700)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
[MTD] [NOR] Fix deadlock in Intel chip driver caused by get_chip recursion
[JFFS2] Fix return value from jffs2_write_end()
[MTD] [OneNAND] Fix wrong free the static address in onenand_sim
[MTD] [NAND] Replace -1 with -EBADMSG in nand error correction code
[RSLIB] BUG() when passing illegal parameters to decode_rs8() or decode_rs16()
[MTD] [NAND] treat any negative return value from correct() as an error
[MTD] [NAND] nandsim: bugfix in initialization
[MTD] Fix typo in Alauda config option help text.
[MTD] [NAND] add s3c2440-specific read_buf/write_buf
[MTD] [OneNAND] onenand-sim: fix kernel-doc and typos
[JFFS2] Tidy up fix for ACL/permissions problem.
Greg Ungerer [Tue, 23 Oct 2007 04:37:54 +0000 (14:37 +1000)]
m68knommu: cleanup m68knommu timer code
Reduce the function pointer mess of the m68knommu timer code by calling
directly to the local hardware's timer setup, and expose the local
common timer interrupt handler to the lower level hardware timer.
Ultimately this will save definitions of all these functions across all
the platform code to setup the function pointers (which for any given
m68knommu CPU family member can be only one set of hardware timer
functions).
Greg Ungerer [Tue, 23 Oct 2007 04:37:54 +0000 (14:37 +1000)]
m68knommu: fix syscall restart handling
Fix system call restart handling. We can call directly to the
restart handler, no need to back track through trap that isn't
even implemented on m68knommu.
Greg Ungerer [Tue, 23 Oct 2007 04:37:54 +0000 (14:37 +1000)]
m68knommu: local module/elf definitions
Up to now m68knommu has been using the asm-m68k/module.h instead of
defining its own. There are recent changes there that we don't need
(fixups specifically). We don't need much support here so it makes
sense to have an m68knommu specific one now.
Jiri Slaby [Tue, 23 Oct 2007 03:45:13 +0000 (20:45 -0700)]
Char: cyclades, fix potential NULL dereference
ztxdone is jumped to even if tty is NULL and tty_wakeup placed after
this label doesn't expect NULLed parameter, so this will cause an oops
in some situations (why they scheduled a wakeup there before remove
bottom half processing patch?).
wakeup only in the case when we have non-null tty struct.
Spotted by Adrian Bunk.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hugh Dickins [Tue, 23 Oct 2007 03:45:12 +0000 (20:45 -0700)]
fix mprotect vma_wants_writenotify prot
Fix mprotect bug in recent commit 3ed75eb8f1cd89565966599c4f77d2edb086d5b0
(setup vma->vm_page_prot by vm_get_page_prot()): the vma_wants_writenotify
case was setting the same prot as when not.
Nothing wrong with the use of protection_map[] in mmap_region(),
but use vm_get_page_prot() there too in the same ~VM_SHARED way.
Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: Coly Li <coyli@suse.de> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Williams [Tue, 23 Oct 2007 03:45:11 +0000 (20:45 -0700)]
md: raid5: fix clearing of biofill operations
ops_complete_biofill() runs outside of spin_lock(&sh->lock) and clears the
'pending' and 'ack' bits. Since the test_and_ack_op() macro only checks
against 'complete' it can get an inconsistent snapshot of pending work.
Move the clearing of these bits to handle_stripe5(), under the lock.
Signed-off-by: Dan Williams <dan.j.williams@intel.com> Tested-by: Joel Bertrand <joel.bertrand@systella.fr> Signed-off-by: Neil Brown <neilb@suse.de> Cc: Stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
NeilBrown [Tue, 23 Oct 2007 03:45:11 +0000 (20:45 -0700)]
md: fix an unsigned compare to allow creation of bitmaps with v1.0 metadata
As page->index is unsigned, this all becomes an unsigned comparison,
which almost always returns an error.
Signed-off-by: Neil Brown <neilb@suse.de> Cc: Stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Alexey Korolev [Mon, 22 Oct 2007 16:55:20 +0000 (17:55 +0100)]
[MTD] [NOR] Fix deadlock in Intel chip driver caused by get_chip recursion
This patch solves kernel deadlock issue seen on JFFF2 simultaneous
operations. Detailed investigation of the issue showed that the kernel
deadlock is caused by tons of recursive get_chip calls.
Signed-off-by: Alexey Korolev <akorolev@infradead.org> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
sctp fails to compile with
net/sctp/sm_make_chunk.c: In function 'sctp_pack_cookie':
net/sctp/sm_make_chunk.c:1516: error: implicit declaration of function 'sg_init_table'
net/sctp/sm_make_chunk.c:1517: error: implicit declaration of function 'sg_set_page'
use the proper include file.
SCTP maintainers Vlad Yasevich and Sridhar Samudrala are CCed.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>