summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/mcbsp.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2009-09-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (257 commits) [ARM] Update mach-types ARM: 5636/1: Move vendor enum to AMBA include ARM: Fix pfn_valid() for sparse memory [ARM] orion5x: Add LaCie NAS 2Big Network support [ARM] pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume ARM: 5686/1: at91: Correct AC97 reset line in at91sam9263ek board ARM: 5640/1: This patch modifies the support of AC97 on the at91sam9263 ek board ARM: 5689/1: Update default config of HP Jornada 700-series machines ARM: 5691/1: fix cache aliasing issues between kmap() and kmap_atomic() with highmem ARM: 5688/1: ks8695_serial: disable_irq() lockup ARM: 5687/1: fix an oops with highmem ARM: 5684/1: Add nuc960 platform to w90x900 ARM: 5683/1: Add nuc950 platform to w90x900 ARM: 5682/1: Add cpu.c and dev.c and modify some files of w90p910 platform ARM: 5626/1: add suspend/resume functions to amba-pl011 serial driver ARM: 5625/1: fix hard coded 4K resource size in amba bus detection MMC: MMCI: convert realview MMC to use gpiolib ARM: 5685/1: Make MMCI driver compile without gpiolib ARM: implement highpte ARM: Show FIQ in /proc/interrupts on CONFIG_FIQ ... Fix up trivial conflict in arch/arm/kernel/signal.c. It was due to the TIF_NOTIFY_RESUME addition in commit d0420c83f ("KEYS: Extend TIF_NOTIFY_RESUME to (almost) all architectures") and follow-ups.
| * ARM: OMAP4: Add McBSP supportSyed Rafiuddin2009-07-281-1/+1
| | | | | | | | | | | | | | This patch creates McBSP support on OMAP4430 development platform. This patch includes corresponding base address changes for OMAP4. Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
* | ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stopJarkko Nikula2009-08-251-56/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functionality of functions omap_mcbsp_xmit_enable and omap_mcbsp_recv_enable can be merged into omap_mcbsp_start and omap_mcbsp_stop since API of those omap_mcbsp_start and omap_mcbsp_stop was changed recently allowing to start and stop individually the transmitter and receiver. This cleans up the code in arch/arm/plat-omap/mcbsp.c and in sound/soc/omap/omap-mcbsp.c which was the only user for those removed functions. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Use textual values in DMA operating mode sysfs filesJarkko Nikula2009-08-251-23/+25
| | | | | | | | | | | | | | | | | | | | | | | | Use more descriptive than numerical value when showing and storing the McBSP DMA operating mode. Show function is using similar syntax than e.g. the led triggers so that all possible values for store function are printed but with current value surrounded with square brackets. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Let element DMA mode hit retention alsoEero Nurkkala2009-08-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | The device no longer hits retention if element DMA mode is taken for at least the duration of the serial console timeout. Force element DMA mode to shut down through smartidle. Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Do not enable wakeups for no-idle modeEero Nurkkala2009-08-201-6/+7
| | | | | | | | | | | | | | | | | | | | | | When no-idle mode is taken, wakeups need not to be enabled. Moreover, CLOCKACTIVITY bits are unnecessary with this mode also. Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Configure NO IDLE mode for DMA mode different of thresholdEduardo Valentin2009-08-201-1/+9
| | | | | | | | | | | | | | | | Use dma mode property to configure NO IDLE or SMART IDLE of McBSPs. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Retain McBSP FCLK clockactivityEero Nurkkala2009-08-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | FCLK may get autogated so that it prevents the McBSP to work properly. It is the bit 9 that must be set for maintaining the McBSP FCLK. Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Change wakeup signalsEduardo Valentin2009-08-201-5/+2
| | | | | | | | | | | | | | | | | | Configure only XRDYEN and RRDYEN wakeup signals in order to get better power consumption. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Wakeups utilizedEero Nurkkala2009-08-201-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | This patch enables the smart idle mode while McBPS is being utilized. Once it's done, force idle mode is taken instead. Apart of it, it also configures what signals will wake mcbsp up. Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Add link DMA mode selectionPeter Ujfalusi2009-08-201-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | It adds a new sysfs file, where the user can configure the mcbsp mode to use. If the mcbsp channel is in use, it does not allow the change. Than in omap_pcm_open we can call the omap_mcbsp_get_opmode to get the mode, store it, than use it to implement the different modes. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Rename thres sysfs symbolsEduardo Valentin2009-08-201-10/+10
| | | | | | | | | | | | | | | | | | | | This patch renames the symbols that handles threshold sysfs properties. This way we can add more sysfs properties to them. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Create and export max_(r|t)x_thres propertyEduardo Valentin2009-08-201-0/+122
| | | | | | | | | | | | | | | | | | | | | | This patch export through sysfs two properties to configure maximum threshold for transmission and reception on each mcbsp instance. Also, it exports two helper functions to allow mcbsp users to read this values. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Add transmit/receive threshold handlerEduardo Valentin2009-08-201-0/+50
| | | | | | | | | | | | | | | | | | This patch adds a way to handle transmit/receive threshold. It export to mcbsp users a callback registration procedure. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Use appropriate value for startup delayEduardo Valentin2009-08-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Increasing startup delay value as worst case: CLKSRG*2 = 8000khz: (1/8000) * 2 * 2 usec Although, 100us may give enough time for two CLKSRG, due to some unknown PM related, clock gating etc. reason, this patch increases it to 500us. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | OMAP: McBSP: Provide functions for ASoC frame syncronizationEero Nurkkala2009-08-201-0/+52
| | | | | | | | | | | | | | | | | | | | | | ASoC has an annoying bug letting either L or R channel to be played on L channel. In other words, L and R channels can switch at random. This provides McBSP funtionality that may be used to fix this feature. Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ARM: OMAP: McBSP: Fix ASoC on OMAP1510 by fixing API of omap_mcbsp_start/stopJarkko Nikula2009-08-071-18/+32
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simultaneous audio playback and capture on OMAP1510 can cause that second stream is stalled if there is enough delay between startup of the audio streams. Current implementation of the omap_mcbsp_start is starting both transmitter and receiver at the same time and it is called only for firstly started audio stream from the OMAP McBSP based ASoC DAI driver. Since DMA request lines on OMAP1510 are edge sensitive, the DMA request is missed if there is no DMA transfer set up at that time when the first word after McBSP startup is transmitted. The problem hasn't noted before since later OMAPs are using level sensitive DMA request lines. Fix the problem by changing API of omap_mcbsp_start and omap_mcbsp_stop by allowing to start and stop individually McBSP transmitter and receiver logics. Then call those functions individually for both audio playback and capture streams. This ensures that DMA transfer is setup before transmitter or receiver is started. Thanks to Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> for detailed problem analysis and Peter Ujfalusi <peter.ujfalusi@nokia.com> for info about DMA request line behavior differences between the OMAP generations. Reported-and-tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: OMAP: McBSP: Fix legacy interrupts to clear their statusEero Nurkkala2009-05-251-6/+24
| | | | | | | | | | If XSYNCERR or RSYNCERR interrupts are enabled, they are never cleared causing the IRQ handler to be continuously called. This patch clears the IRQs in question in the event they are enabled and taken. Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] omap: mcbsp: convert to use fck/ick clocks directlyRussell King2009-02-081-53/+37
| | | | | | | | | | | | | Rather than introducing a special 'mcbsp_clk' with code behind it in mach-omap*/mcbsp.c to handle the SoC specifics, arrange for the mcbsp driver to be like any other driver. mcbsp requests its fck and ick clocks directly, and the SoC specific code deals with selecting the correct clock. There is one oddity to deal with - OMAP1 fiddles with the DSP clocks and DSP reset, so we move this to the two callback functions. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: Fix McBSP spin_lock deadlockStanley.Miao2009-01-291-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* ARM: OMAP: Fix ASoC by enabling writes to XCCR and RCCR McBSP registers, v3Tony Lindgren2009-01-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This patch enables writing to McBSP Transmit Configuration Control Register (XCCR) and Receive Configuration Control Register (RCCR) for 2430/34xx platforms. It also adds XCCR, RCCR entries in McBSP register configuration structure and bit definitions for both registers. If we enable the writing to CCR registers for 2430/34xx and don't set the default values (setting 0 as a consequence) in ASoC driver, the Transmit/Receive DMA mode gets disabled and the the transmission/reception doesn't happen, ending with a "write error: Input/Output error" when playing with 'aplay'. Also define dummy CCR registers for omap1. Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Fixes to omap_mcbsp_request functionJarkko Nikula2008-10-081-4/+9
| | | | | | | | | Bootloader may let McBSP logic running so make sure that block is idle before requesting IRQs. Also make sure that TX and RX waitqueues are initialized before request_irq. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Allocate McBSP devices dynamicallyChandra Shekhar2008-10-081-163/+225
| | | | | | | | | | | | | Based on Chandra's earlier patches in linux-omap tree. Note that omap1_mcbsp_check and omap2_mcbsp_check are no longer needed as there's now omap_mcbsp_check_valid_id() defined. Also some functions can now be marked __init. Signed-off-by: Chandra Shekhar <x0044955@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* Fix sections for omap-mcbsp platform driverUwe Kleine-König2008-10-081-3/+3
| | | | | | | | | | | | | | | | Don't use __init but __devinit to define probe function. A pointer to omap_mcbsp_probe is passed to the core via platform_driver_register and so the function must not disappear when the init code is freed. Using __init and having HOTPLUG=y the following probably oopses: echo -n omap-mcbsp.1 > /sys/bus/platform/driver/omap-mcbsp/unbind echo -n omap-mcbsp.1 > /sys/bus/platform/driver/omap-mcbsp/bind While at it move the remove function to the .devexit.text section. Signed-off-by: Uwe Kleine-König <ukleinek@strlen.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] omap: convert mcbsp to use ioremap()Russell King2008-09-051-15/+27
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] omap: fix virtual vs physical address space confusionsRussell King2008-09-041-2/+3
| | | | | | | | mcbsp is confused as to what takes a physical or virtual address. Fix the two instances where it gets it wrong. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-2/+2
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: McBSP: Prepare for splitting into omap1 and omap2 codeEduardo Valentin2008-07-031-409/+253
| | | | | | | | | | | | This patch transform mcbsp code to use platform data from arch/arm/plat-omap/devices.c It also gets ride of ifdefs on mcbsp.c code. To do it, a platform data structure was defined. Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: McBSP: Coding style cleanup on arch/arm/plat-omap/mcbsp.cEduardo Valentin2008-07-031-95/+102
| | | | | | | | | | This patch fix lots of warnings and errors reported by scripts/checkpatch.pl on arch/arm/plat-omap/mcbsp.c. Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
* ARM: OMAP: Request DSP memory for McBSPTony Lindgren2008-02-081-0/+11
| | | | | | | On OMAP1 some McBSP features depend on DSP. Also export polling functions as suggested by Luis Cargnini. Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] Misc minor interrupt handler cleanupsJeff Garzik2008-01-261-8/+12
| | | | | | | | | | | | | | | | mach-integrator/pci_v3.c: no need to reference 'irq' arg, its constant mach-omap1/pm.c: remove extra whitespace arch/arm/mach-sa1100/ssp.c: remove braces around single C stmt arch/arm/plat-omap/mcbsp.c: - remove pointless casts from void* - make longer lines more readable Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: plat-omap changes for 2430 SDPSyed Mohammed Khasim2007-05-051-5/+10
| | | | | | | | | This patch adds minimal OMAP2430 support to plat-omap files to get the kernel booting on 2430SDP. Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: Use linux/delay.h not asm/delay.hTony Lindgren2007-03-021-1/+1
| | | | | | Use linux/delay.h not asm/delay.h Signed-off-by: Tony Lindgren <tony@atomide.com>
* Initial blind fixup for arm for irq changesLinus Torvalds2006-10-061-2/+2
| | | | | | | Untested, but this should fix up the bulk of the totally mechanical issues, and should make the actual detail fixing easier. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* ARM: OMAP: Remove sys_ck and sys_clkout from McBSP for 24xxTony Lindgren2006-09-251-9/+0
| | | | | | | McBSP does not need sys_ck or sys_clkout. If the devices connected to McBSP need sys_clkout, they need to request it. Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] 3455/1: ARM: OMAP: 7/8 Misc updates, take 2Tony Lindgren2006-04-021-39/+306
| | | | | | | | | | | | | Patch from Tony Lindgren Update misc OMAP core code from linux-omap tree: - McBSP updates by Samuel Ortiz, Andrzej Zaborowski - Whitespace cleanups by Ladislav Michl - Other fixes by various linux-omap developers Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: OMAP: 4/4 Fix clock framework to use clk_enable/disable miscTony Lindgren2006-01-171-6/+6
| | | | | | | This patch fixes OMAP clock framework to use clk_enable/disable instead of clk_use/unuse as specified in include/linux/clk.h. Signed-off-by: Tony Lindgren <tony@atomide.com>
* [ARM] Move asm/hardware/clock.h to linux/clk.hRussell King2006-01-071-2/+1
| | | | | | | This is needs to be visible to other architectures using the AMBA bus and peripherals. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3142/1: OMAP 2/5: Update files common to omap1 and omap2Tony Lindgren2005-11-101-8/+14
| | | | | | | | | | | | | | | | Patch from Tony Lindgren This patch syncs the mainline kernel with linux-omap tree. The highlights of the patch are: - Serial port and framebuffer init improvments by Imre Deak - Common omap pin mux framework by Tony Lindgren - Common omap clock framework by Tony Lindren Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 2887/1: OMAP 2/4: Update files common to omap1 and omap2, take 2Tony Lindgren2005-09-071-3/+6
| | | | | | | | | | | | | | | | | | | | | Patch from Tony Lindgren This patch syncs the mainline kernel with linux-omap tree. The highlights of the patch are: - Clock updates by Tuukka Tikkanen, Juha Yrjola, Daniel Petrini and Tony Lindgren - DMA fixes by Imre Deak, Juha Yrjola and Daniel Petrini - Add support to dual-mode hardware timers by Lauri Leukkunen - GPIO support for 24xx by Paul Mundt - GPIO wake-up support by Tony Lindgren - Better GPIO interrupt handler to not lose interrupts by Ralph Walden and Ladislav Michl - Power Management updates by Tuukka Tikkanen - Make Power Management code use new SRAM functions by Tony Lindgren Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [PATCH] ARM: 2804/1: OMAP update 9/11: Update OMAP arch filesTony Lindgren2005-07-101-12/+85
| | | | | | | | | | Patch from Tony Lindgren This patch by various OMAP developers syncs the OMAP specific arch files with the linux-omap tree. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [PATCH] ARM: 2812/1: OMAP update 7c/11: Move arch-omap to plat-omapTony Lindgren2005-07-101-0/+685
Patch from Tony Lindgren This patch move common OMAP code from arch-omap to plat-omap directory. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>