beagleboard-validation:linux.git
8 years agoomap: Add back UART MDR1 check into uncompress.h
Tony Lindgren [Wed, 7 Jul 2010 11:22:36 +0000 (14:22 +0300)]
omap: Add back UART MDR1 check into uncompress.h

Recent DEBUG_LL and uncompress.h changes removed the check_port()
as pointed out by Cory Maccarrone <darkstar6262@gmail.com>.

This causes some boards to not boot, so add back the MDR1 register
check. The MDR1 register tells the mode of omap uart. Based on
an earlier patch by Cory Maccarrone <darkstar6262@gmail.com>.

Tested-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: Overo: Fix support for second ethernet port
Steve Sakoman [Wed, 7 Jul 2010 11:22:36 +0000 (14:22 +0300)]
omap: Overo: Fix support for second ethernet port

The original patch got truncated when applied from patchwork.kernel.org
as discussed at:

http://www.mail-archive.com/linux-omap@vger.kernel.org/msg28953.html

This patch supplies the missing chunks.

Signed-off-by: Steve Sakoman <sakoman@gmail.com>
[tony@atomide.com: added more info to the patch description]
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap2/3/4: serial: errata i202: fix for MDR1 access
Deepak K [Wed, 7 Jul 2010 09:47:46 +0000 (12:47 +0300)]
omap2/3/4: serial: errata i202: fix for MDR1 access

Errata i202 (OMAP3430 - 1.12, OMAP3630 - 1.6):
UART module MDR1 register access can cause a dummy underrun
condition which could result in a freeze in the case of IrDA
communication or if used as UART, corrupted data.

Workaround is as follows for everytime MDR1 register is changed:
* setup all required UART registers
* setup MDR1.MODE_SELECT bit field
* Wait 5 L4 clk cycles + 5 UART functional clock cycles
* Clear the Tx and RX fifo using FCR register

Note: The following step is not done as I am assuming it is not
needed due to reconfiguration being done and there is no halted
operation perse.
* Read if required, the RESUME register to resume halted operation

Based on an earlier patch at:
http://git.omapzoom.org/?p=kernel/omap.git;a=commitdiff;h=42d4a342c009bd9727c100abc8a4bc3063c22f0c

Signed-off-by: Deepak K <deepak.k@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap2/3/4: serial: introduce errata handling
Tony Lindgren [Wed, 7 Jul 2010 09:47:45 +0000 (12:47 +0300)]
omap2/3/4: serial: introduce errata handling

introduce silicon specific quirks as a errata handling mechanism

as a start UART_ERRATA_FIFO_FULL_ABORT is used to handle the override
for fifo full condition for rx and tx.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap2/3/4: serial: kill dev_attr_sleep_timeout sparse warn
Nishanth Menon [Wed, 7 Jul 2010 09:47:45 +0000 (12:47 +0300)]
omap2/3/4: serial: kill dev_attr_sleep_timeout sparse warn

Remove the following sparse warnings by declaring attr as static:
arch/arm/mach-omap2/serial.c:627:1: warning: symbol 'dev_attr_sleep_timeout'
was not declared. Should it be static?

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap2/3/4: serial: remove initialization sparse warnings
Nishanth Menon [Wed, 7 Jul 2010 09:47:45 +0000 (12:47 +0300)]
omap2/3/4: serial: remove initialization sparse warnings

Initialization of pointer should be done with NULL. Removes sparse
warnings:
arch/arm/mach-omap2/serial.c:566:17: warning: Using plain integer as NULL pointer
arch/arm/mach-omap2/serial.c:567:17: warning: Using plain integer as NULL pointer

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap3: serial: Add context save and restore for mcr
Govindraj R [Wed, 7 Jul 2010 10:39:50 +0000 (13:39 +0300)]
omap3: serial: Add context save and restore for mcr

Adds context save/restore for mcr register as state of mcr register
is lost after core off.

Signed-off-by: Govindraj R <govindraj.raja@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap4: Add OMAP4 Panda Support
David Anders [Tue, 6 Jul 2010 14:05:32 +0000 (17:05 +0300)]
omap4: Add OMAP4 Panda Support

Add initial support for the OMAP4 based Panda Board.

Signed-off-by: David Anders <x0132446@ti.com>
[tony@atomide.com: selected board by default in Kconfig]
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP4: Add GPIO LED support for SDP board
Hemanth V [Tue, 6 Jul 2010 14:05:31 +0000 (17:05 +0300)]
OMAP4: Add GPIO LED support for SDP board

This patch adds support for GPIO LEDs present on OMAP4
SDP and Blaze boards. This basically adds platform data
required by leds-gpio driver

Signed-off-by: Hemanth V <hemanthv@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap4: Board changes for 4430sdp tmp105 temperature sensor
Shubhrajyoti Datta [Tue, 6 Jul 2010 14:05:31 +0000 (17:05 +0300)]
omap4: Board changes for 4430sdp tmp105 temperature sensor

Adding board configuration for the tmp105
temperature sensor. The interface to the sensor
is I2C.

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap4: mmc: Fix the regulator resource for MMC2 on 4430sdp
Santosh Shilimkar [Tue, 6 Jul 2010 14:05:32 +0000 (17:05 +0300)]
omap4: mmc: Fix the regulator resource for MMC2 on 4430sdp

The MMC1 and MMC2 cards have seperate LDO supplies. Current code assumes
that they are powered by same LDO.

This patch fixes the same and has VAUX1 as supply to MMC2 card.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Tested-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: tsl2563 ALS support for Nokia N900
Ameya Palande [Tue, 6 Jul 2010 14:05:34 +0000 (17:05 +0300)]
omap: tsl2563 ALS support for Nokia N900

This commit will enable usage of tsl2563 ambient light sensor on Nokia N900.

Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: rx51: Add supply and data for the tpa6130a2 headphoneamplifier
Jarkko Nikula [Tue, 6 Jul 2010 14:05:33 +0000 (17:05 +0300)]
omap: rx51: Add supply and data for the tpa6130a2 headphoneamplifier

With these and upcoming change to tpa6130a2 driver it's possible to add
support for the TPA6130A2 headphone amplifier.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: rx51: Use REGULATOR_SUPPLY macro when initializingregulator consumers
Jarkko Nikula [Tue, 6 Jul 2010 14:05:33 +0000 (17:05 +0300)]
omap: rx51: Use REGULATOR_SUPPLY macro when initializingregulator consumers

There is REGULATOR_SUPPLY macro available for initializing the struct
regulator_consumer_supply so use it where applicable (all other supplies
than vdds_sdi) as it improves the readability.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: rx51: Add platform_data for tlv320aic3x with reset gpionumber
Jarkko Nikula [Tue, 6 Jul 2010 14:05:33 +0000 (17:05 +0300)]
omap: rx51: Add platform_data for tlv320aic3x with reset gpionumber

Proper operation of the tlv320aic3x audio codec requires that reset
sequencing is done in pair with supply voltages when using the regulator
framework. Add the codec reset gpio used in Nokia RX51 to tlv320aic3x
data.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: rx51: Set regulator V28 always on
Jarkko Nikula [Tue, 6 Jul 2010 14:05:32 +0000 (17:05 +0300)]
omap: rx51: Set regulator V28 always on

It seems that the battery cover sensor in Nokia N900 is powered from the
V28 domain. Now if this regulator is disabled it causes that the gpio 160
reads only zero which effectively causes uSD removal detection.

Currently the bootloader enabled V28 is kept on but this may change in the
future according to comment in
drivers/regulator/core.c: regulator_has_full_constraints.

Also if there are any consumers on the V28 domain doing regulator_enable
regulator_disable cycle the V28 will be disabled after that.

Prepare for these by defining the V28 as always_on regulator.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap3: pandora: add NAND and wifi support
Grazvydas Ignotas [Tue, 6 Jul 2010 14:05:31 +0000 (17:05 +0300)]
omap3: pandora: add NAND and wifi support

Add platform data for NAND and wifi, also setup all GPIOs
needed to use the wifi chip.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap3: pandora: update gpio-keys data
Grazvydas Ignotas [Tue, 6 Jul 2010 14:05:31 +0000 (17:05 +0300)]
omap3: pandora: update gpio-keys data

Update gpio-keys setup so it matches what is on default firmware.
Also make use of debounce feature in gpio-keys instead of setting it
explicitly, as gpio-keys is now capable of using hardware debounce on
OMAPs thanks to recent gpiolib changes.
Also fix a sparce warning along the way.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: zoom3: wlan board muxing
Ohad Ben-Cohen [Tue, 6 Jul 2010 14:05:34 +0000 (17:05 +0300)]
omap: zoom3: wlan board muxing

Add board muxing to support the wlan wl1271 chip that is
hardwired to mmc2 (third mmc controller) on the ZOOM3.

Signed-off-by: Ohad Ben-Cohen <ohadb@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: zoom2: wlan board muxing
Ohad Ben-Cohen [Tue, 6 Jul 2010 14:05:34 +0000 (17:05 +0300)]
omap: zoom2: wlan board muxing

Add board muxing to support the wlan wl1271 chip that is
hardwired to mmc2 (third mmc controller) on the ZOOM2.

Signed-off-by: Ohad Ben-Cohen <ohadb@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoMerge branch 'for_2.6.36' of git://git.pwsan.com/linux-2.6 into omap-for-linus
Tony Lindgren [Tue, 6 Jul 2010 09:18:25 +0000 (12:18 +0300)]
Merge branch 'for_2.6.36' of git://git.pwsan.com/linux-2.6 into omap-for-linus

8 years agoOMAP2: Devkit8000: Fix regulator for power supply
Thomas Weber [Mon, 5 Jul 2010 14:04:42 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Fix regulator for power supply

Devkit8000 uses the TPS65930 and not the TWL4030.
The TPS65930 uses only a subset of the power supplies
of the TWL4030.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Remove unused omap_board_config
Thomas Weber [Mon, 5 Jul 2010 14:04:42 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Remove unused omap_board_config

omap_board_config is no longer used and thats why empty.
This patch removes the empty omap_board_config.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Using gpio_is_valid macro
Thomas Weber [Mon, 5 Jul 2010 14:04:42 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Using gpio_is_valid macro

Using the macro gpio_is_valid for check of valid gpio pins.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Using the REGULATOR_SUPPLY macro
Thomas Weber [Mon, 5 Jul 2010 14:04:41 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Using the REGULATOR_SUPPLY macro

Replacing supplies with the REGULATOR_SUPPLY macro.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Remove en-/disable for tv panel
Thomas Weber [Mon, 5 Jul 2010 14:04:41 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Remove en-/disable for tv panel

devkit8000_panel_enable_tv and devkit8000_panel_disable_tv are already
done in DSS2 code. So they are no longer needed in board code.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Remove non existing vsim supply
Thomas Weber [Mon, 5 Jul 2010 14:04:41 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Remove non existing vsim supply

The Devkit8000 uses the cost reduced variant tps65930 of the twl4030.
The TPS65930 only has vdd1, vdd2, vpll1, vio, vmmc1, vdac and vaux2.

vaux2 is not used on Devkit8000.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Remove unneeded VDVI supply
Thomas Weber [Mon, 5 Jul 2010 14:04:41 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Remove unneeded VDVI supply

The VDVI power supply is no longer needed in
board code with the new DSS2 interface.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Setup LCD reset
Kan-Ru Chen [Mon, 5 Jul 2010 14:04:40 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Setup LCD reset

This patch corrects the LCD reset pin configuration.

Original code from early devkit8000 patch sets the TWL4030 GPIO_1
to EHCI_nOC and TWL4030_GPIO_MAX+1 to ledA. Indeed these two pins
are both LCD_PWREN. Setup the lcd reset_gpio properly so it can be
disabled when other display is turned on.

Signed-off-by: Kan-Ru Chen <kanru@0xlab.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Enable DVI-D output
Kan-Ru Chen [Mon, 5 Jul 2010 14:04:40 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Enable DVI-D output

This patch corrects the DVI-D output setup of Devkit8000

Devkit8000 has different DVI reset pin with the BeagleBoard.
On Devkit8000 the TWL4030 GPIO_7 is assigned to do the job.

Signed-off-by: Kan-Ru Chen <kanru@0xlab.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: change panel to generic panel
Thomas Weber [Mon, 5 Jul 2010 14:04:40 +0000 (17:04 +0300)]
OMAP2: Devkit8000: change panel to generic panel

Choose the generic panel for lcd code of Devkit8000.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP2: Devkit8000: Cleanup for power supplies
Thomas Weber [Mon, 5 Jul 2010 14:04:39 +0000 (17:04 +0300)]
OMAP2: Devkit8000: Cleanup for power supplies

Corrected the wrong power supplies in devkit8000 code.

Add supply for ads7846 to support the new regulator framework for
touchscreen.

Signed-off-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoRemoving dead MACH_OMAP2_H4_USB1
Christoph Egger [Mon, 5 Jul 2010 13:31:55 +0000 (16:31 +0300)]
Removing dead MACH_OMAP2_H4_USB1

MACH_OMAP2_H4_USB1 doesn't exist in Kconfig, therefore removing all
references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoRemoving dead MACH_OMAP_H4_OTG
Christoph Egger [Mon, 5 Jul 2010 13:31:55 +0000 (16:31 +0300)]
Removing dead MACH_OMAP_H4_OTG

MACH_OMAP_H4_OTG doesn't exist in Kconfig, therefore removing all
references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoRemoving dead APM
Christoph Egger [Mon, 5 Jul 2010 13:31:55 +0000 (16:31 +0300)]
Removing dead APM

APM doesn't exist in Kconfig, therefore removing all references for it
from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoReplacing LEDS_OMAP_DEBUG with OMAP_DEBUG_LEDS
Christoph Egger [Mon, 5 Jul 2010 13:31:54 +0000 (16:31 +0300)]
Replacing LEDS_OMAP_DEBUG with OMAP_DEBUG_LEDS

LEDS_OMAP_DEBUG doesn't exist in Kconfig, therefore replacing all
references for it with OMAP_DEBUG_LEDS from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoRemoving dead OMAP_STI
Christoph Egger [Mon, 5 Jul 2010 13:31:54 +0000 (16:31 +0300)]
Removing dead OMAP_STI

OMAP_STI doesn't exist in Kconfig, therefore removing all
references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoRemoving dead OMAP_DSP
Christoph Egger [Mon, 5 Jul 2010 13:31:54 +0000 (16:31 +0300)]
Removing dead OMAP_DSP

OMAP_DSP doesn't exist in Kconfig, therefore removing all
references for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
[tony@atomide.com: updated to apply on top of already queued patches]
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoRemoving dead OMAP_IR
Christoph Egger [Mon, 5 Jul 2010 13:31:53 +0000 (16:31 +0300)]
Removing dead OMAP_IR

OMAP_IR doesn't exist in Kconfig, therefore removing all references
for it from the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
[tony@atomide.com: updated for new mux code]
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoReplace dead OMAP_MUX_ERRORS with OMAP_MUX_WARNINGS
Christoph Egger [Mon, 5 Jul 2010 13:31:53 +0000 (16:31 +0300)]
Replace dead OMAP_MUX_ERRORS with OMAP_MUX_WARNINGS

OMAP_MUX_ERRORS doesn't exist in Kconfig, therefore replacing all
references for it with OMAP_MUX_WARNINGS in the source code.

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap2/3/4: Add Kconfig option to compile in typical omap features
Tony Lindgren [Mon, 5 Jul 2010 13:31:48 +0000 (16:31 +0300)]
omap2/3/4: Add Kconfig option to compile in typical omap features

This produces a sane config that's suitable for using as the
base for most omap2/3/4 boards.

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap2/3/4: Select all omaps and boards by default
Tony Lindgren [Mon, 5 Jul 2010 13:31:47 +0000 (16:31 +0300)]
omap2/3/4: Select all omaps and boards by default

Select all omaps and boards by default

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap2/3/4: Move Kconfig options to mach-omap2/Kconfig
Tony Lindgren [Mon, 5 Jul 2010 13:31:47 +0000 (16:31 +0300)]
omap2/3/4: Move Kconfig options to mach-omap2/Kconfig

Move omap2/3/4 specific Kconfig options to mach-omap2/Kconfig

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: Make omap specific features appear under Kconfig menu
Tony Lindgren [Mon, 5 Jul 2010 13:31:47 +0000 (16:31 +0300)]
omap: Make omap specific features appear under Kconfig menu

This will make Kconfig look nicer for selecting omap processor type

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: Use 32KiHZ timer by default
Tony Lindgren [Mon, 5 Jul 2010 13:31:46 +0000 (16:31 +0300)]
omap: Use 32KiHZ timer by default

Use 32KiHZ timer by default as this is available on all omaps
except 15xx based systems.

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoARM: Disable VGA console for ARM in most cases
Tony Lindgren [Mon, 5 Jul 2010 13:31:46 +0000 (16:31 +0300)]
ARM: Disable VGA console for ARM in most cases

Otherwise we have to disable it manually to avoid compile errors.

Now it's only enabled only for the selected machines as suggested
by Anton Vorontsov <cbouatmailru@gmail.com>:

$ git grep VGA_CONSOLE= arch/arm/configs/
arch/arm/configs/footbridge_defconfig:CONFIG_VGA_CONSOLE=y
arch/arm/configs/integrator_defconfig:CONFIG_VGA_CONSOLE=y
arch/arm/configs/netwinder_defconfig:CONFIG_VGA_CONSOLE=y

Note that the Kconfig entry no longer needs separate entries
for ARCH_ACORN, ARCH_EBSA110 ARCH_VERSATILE.

Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Remove old mux code
Tony Lindgren [Mon, 5 Jul 2010 13:31:40 +0000 (16:31 +0300)]
omap: mux: Remove old mux code

All mach-omap2 omaps should now use the new mux code.

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Convert 2420 platform init code to use new mux code
Tony Lindgren [Mon, 5 Jul 2010 13:31:40 +0000 (16:31 +0300)]
omap: mux: Convert 2420 platform init code to use new mux code

Convert 2420 platform init code to use new mux code

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Mux 2430 USB0HS_STP in board-2430.c
Tony Lindgren [Mon, 5 Jul 2010 13:31:39 +0000 (16:31 +0300)]
omap: mux: Mux 2430 USB0HS_STP in board-2430.c

Use new mux functions for that. There are no other known 2430 boards
that need this mux.

Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Mux Apollon LCD power in board-apollon.c
Tony Lindgren [Mon, 5 Jul 2010 13:31:39 +0000 (16:31 +0300)]
omap: mux: Mux Apollon LCD power in board-apollon.c

Use the new mux function for that.

Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Do keypad muxing in board-*.c files
Tony Lindgren [Mon, 5 Jul 2010 13:31:39 +0000 (16:31 +0300)]
omap: mux: Do keypad muxing in board-*.c files

This way we get pin muxing out of plat-omap and can convert H4 to use the
new mux functions.

Note that it should be safe to assume we can mux all the keypad pins
except on H4 which may have Menelaus connected.

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Make omap2 FS USB code use new mux functions
Tony Lindgren [Mon, 5 Jul 2010 13:31:38 +0000 (16:31 +0300)]
omap: mux: Make omap2 FS USB code use new mux functions

Make omap2 FS USB code use new mux functions. Do not mux usb2_tllse0
as it has multiple options.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Select POP package for 2430SDP
Tony Lindgren [Mon, 5 Jul 2010 13:31:38 +0000 (16:31 +0300)]
omap: mux: Select POP package for 2430SDP

Select POP package for 2430SDP

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Select POP package for N8X0
Tony Lindgren [Mon, 5 Jul 2010 13:31:38 +0000 (16:31 +0300)]
omap: mux: Select POP package for N8X0

Select POP package for N8X0

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Select POP package for Apollon
Tony Lindgren [Mon, 5 Jul 2010 13:31:37 +0000 (16:31 +0300)]
omap: mux: Select POP package for Apollon

Select POP package for Apollon

Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Select SIP package for H4
Tony Lindgren [Mon, 5 Jul 2010 13:31:37 +0000 (16:31 +0300)]
omap: mux: Select SIP package for H4

Select SIP package for H4

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Add data for 2430
Tony Lindgren [Mon, 5 Jul 2010 13:31:36 +0000 (16:31 +0300)]
omap: mux: Add data for 2430

Add data for 2430. Big thanks to Paul Walmsley <paul@pwsan.com>
for generating usable mux data out of TRMs.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Add data for 2420
Tony Lindgren [Mon, 5 Jul 2010 13:31:36 +0000 (16:31 +0300)]
omap: mux: Add data for 2420

Add data for 2420. Big thanks to Paul Walmsley <paul@pwsan.com>
for generating usable mux data out of TRMs.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Remove unncessary parens from mux34xx.c
Tony Lindgren [Mon, 5 Jul 2010 13:31:36 +0000 (16:31 +0300)]
omap: mux: Remove unncessary parens from mux34xx.c

Remove unncessary parens from mux34xx.c

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Allow compiling in new mux code on all mach-omap2 systems
Tony Lindgren [Mon, 5 Jul 2010 13:31:36 +0000 (16:31 +0300)]
omap: mux: Allow compiling in new mux code on all mach-omap2 systems

Allow compiling in new mux code on all mach-omap2 systems

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Renumber package defines to make room for older 24xx packages
Tony Lindgren [Mon, 5 Jul 2010 13:31:35 +0000 (16:31 +0300)]
omap: mux: Renumber package defines to make room for older 24xx packages

Only POP and SIP are known to exist for 2420, 2430 seems to only have
SIP package available.

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: mux: Fix omap_mux_init_gpio for omap24xx
Tony Lindgren [Mon, 5 Jul 2010 13:31:35 +0000 (16:31 +0300)]
omap: mux: Fix omap_mux_init_gpio for omap24xx

Looks like 24xx uses mode3 instead of mode4 for muxable GPIO pins.
This will be needed when 24xx mux code is converted to use the new
mux functions.

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: Move omap1 USB platform init code into mach-omap1/usb.c
Tony Lindgren [Mon, 5 Jul 2010 13:31:30 +0000 (16:31 +0300)]
omap: Move omap1 USB platform init code into mach-omap1/usb.c

Move omap1 FS USB platform init code into mach-omap1/usb.c

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: Enable interface clock for omap2 FS USB
Tony Lindgren [Mon, 5 Jul 2010 13:31:29 +0000 (16:31 +0300)]
omap: Enable interface clock for omap2 FS USB

Looks like this code was only working on boards that had
the usb_l4_ick enabled in the bootloader.

Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: Move omap2 FS USB platform init code into mach-omap2/usb-fs.c
Tony Lindgren [Mon, 5 Jul 2010 13:31:29 +0000 (16:31 +0300)]
omap: Move omap2 FS USB platform init code into mach-omap2/usb-fs.c

Move omap2 FS USB platform init code into mach-omap2/usb-fs.c. This will
allow further work later on to use omap hwmod for initializing the
device.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoomap: Separate out omap2 FS USB platform init functions
Tony Lindgren [Mon, 5 Jul 2010 13:31:28 +0000 (16:31 +0300)]
omap: Separate out omap2 FS USB platform init functions

We want to split old FS USB platform init code and stop doing pin multiplexing
under plat-omap. First move 24xx specific init code into omap2_usb[012]_init
functions.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
8 years agoOMAP: PM constraints: add omap_pm_set_min_clk_rate()
Paul Walmsley [Fri, 2 Jul 2010 15:33:50 +0000 (09:33 -0600)]
OMAP: PM constraints: add omap_pm_set_min_clk_rate()

Add omap_pm_set_min_clk_rate().  This constraint is meant for use by
device drivers to translate a certain device-specific performance
constraint (e.g., "minimum polygons per second") to a clock rate for
the driver's device, given the driver's intimate knowledge of the
device hardware (e.g., device type, device hardware revision, firmware
revision, etc.)  From a general PM core perspective, clock rate is
probably the closest general analog to "performance" that is
available, but the exact mapping from a use-case-specific performance
constraint to clock rate must be done by the driver.  Drivers intended for
upstream merging shouldn't hardcode specific clock rates in their code
without basing those rates on some performance criteria requested through
the driver's subsystem (ideally, from userspace).

Imre Deak <imre.deak@nokia.com> described the need and use-case for
this constraint, and discussed the implementation - thanks, Imre.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Imre Deak <imre.deak@nokia.com>
8 years agoOMAP: PM constraints: add return values; add requesting device param to omap_pm_set_m...
Paul Walmsley [Fri, 2 Jul 2010 15:33:49 +0000 (09:33 -0600)]
OMAP: PM constraints: add return values; add requesting device param to omap_pm_set_max_dev_wakeup_lat()

Add return values to the PM constraint functions.  This allows the PM
core to provide feedback to the caller if a constraint is not
possible.  Update the one upstream user of omap_pm_set_max_mpu_wakeup_lat()
to add a compatibility wrapper, needed until the driver is changed.

Update some of the documentation to conform more closely to kerneldoc style.

Add an additional device parameter to omap_pm_set_max_dev_wakeup_lat()
to identify the device requesting the constraint.  This is so repeated calls
to omap_pm_set_max_dev_wakeup_lat() with the same requesting device can
override the device's previously-set constraint.  Also, it allows the PM
core to make a decision as to whether or not the constraint should be
satisfied, based on the caller's identity.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP2+: hwmod/device: update documentation and copyright
Paul Walmsley [Fri, 2 Jul 2010 15:33:49 +0000 (09:33 -0600)]
OMAP2+: hwmod/device: update documentation and copyright

Update some minor documentation issues and update copyright for
omap_device/omap_hwmod code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Benoît Cousson <b-cousson@ti.com>
8 years agoOMAP: hwmod/device: add omap_{device,hwmod}_get_mpu_rt_va
Paul Walmsley [Fri, 2 Jul 2010 15:33:48 +0000 (09:33 -0600)]
OMAP: hwmod/device: add omap_{device,hwmod}_get_mpu_rt_va

Add omap_device_get_mpu_rt_va().  This is intended to be used by
device drivers (currently, via a struct platform_data function
pointer) to retrieve their corresponding device's virtual base address
that the MPU should use to access the device.  This is needed because
the omap_hwmod code does its own ioremap(), in order to gain access to
the module's OCP_SYSCONFIG register.

Add omap_hwmod_get_mpu_rt_va().  omap_device_get_mpu_rt_va() calls this
function to do the real work.

While here, rename struct omap_hwmod._rt_va to struct
omap_hwmod._mpu_rt_va, to reinforce that it refers to the MPU's
register target virtual address base (as opposed to, for example, the
L3's).

In the future, this belongs as a function in an omap_bus, so it is not
necessary to call this through a platform_data function pointer.

The use-case for this function was originally presented by Santosh
Shilimkar <santosh.shilimkar@ti.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
8 years agoOMAP2: hwmod data: add IVA1 (2420), IVA2 (2430) hwmods
Paul Walmsley [Fri, 2 Jul 2010 15:33:47 +0000 (09:33 -0600)]
OMAP2: hwmod data: add IVA1 (2420), IVA2 (2430) hwmods

Add IVA1 hwmod data for OMAP2420 and IVA2 hwmod data for 2430.  The data
is based on Benoît Cousson's hwmod data for the OMAP3 IVA blocks.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
8 years agoOMAP3: hwmod data: add data for OMAP3 IVA2
Kevin Hilman [Fri, 2 Jul 2010 15:33:46 +0000 (09:33 -0600)]
OMAP3: hwmod data: add data for OMAP3 IVA2

Add hwmod data for IVA2 module on OMAP3.

Naming of "iva" instead of "iva2" to be aligned with OMAP4 naming done
by Benoit Cousson.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP2&3: hwmod: Replace l3 -> l3_main
Kevin Hilman [Fri, 2 Jul 2010 15:33:46 +0000 (09:33 -0600)]
OMAP2&3: hwmod: Replace l3 -> l3_main

Replace all the struct that contain l3 with l3_main in order
to be consistent with the OMAP4 naming convention.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP: hwmod data: add class for IVA hwmods
Kevin Hilman [Fri, 2 Jul 2010 15:33:45 +0000 (09:33 -0600)]
OMAP: hwmod data: add class for IVA hwmods

Add a new hwmod class for IVA devices.  To be used when hwmods
are created for IVA2 on OMAP3.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP: PM: create omap_devices for MPU, DSP, L3
Kevin Hilman [Fri, 2 Jul 2010 15:33:45 +0000 (09:33 -0600)]
OMAP: PM: create omap_devices for MPU, DSP, L3

Create simple omap_devices for the main processors and busses.

This is required to support the forth-coming device-based OPP
approach, where OPPs are managed and tracked at the device level.

Also, move these common PM init functions into a common_pm_init call
that is called as a device_initcall().  The PM init is done at this level
to ensure that the driver core is initialized before initialized.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
[paul@pwsan.com: sparse warnings cleaned up; newly-created functions moved
 from mach-omap2/io.c to mach-omap2/pm.c; newly-created functions renamed
 to start with "omap2" rather than "omap"]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP: omap_device: ensure hwmod tracks attached omap_device pointer
Kevin Hilman [Fri, 2 Jul 2010 15:33:44 +0000 (09:33 -0600)]
OMAP: omap_device: ensure hwmod tracks attached omap_device pointer

The omap_hwmod struct has a field to track the omap_device that is
attached to it, but it was not being assigned.  Fix by assigning omap_device
pointer when omap_device is built.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
[paul@pwsan.com: use an array index rather than pointer arithmetic]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP4: hwmod: Enable omap_device build for OMAP4
Rajendra Nayak [Fri, 2 Jul 2010 15:33:44 +0000 (09:33 -0600)]
OMAP4: hwmod: Enable omap_device build for OMAP4

Enable omap_device layer support for OMAP4, so that drivers can
use them to enable/idle/shutdown devices.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP: hwmod: allow omap_hwmod_late_init() caller to skip module idle in _setup()
Paul Walmsley [Fri, 2 Jul 2010 15:33:43 +0000 (09:33 -0600)]
OMAP: hwmod: allow omap_hwmod_late_init() caller to skip module idle in _setup()

On kernels that don't use the omap_device_enable() calls to enable
devices, leave all on-chip devices enabled in hwmod _setup().
Otherwise, accesses to those devices are likely to fail, crashing the
system.  It's expected that kernels built without CONFIG_PM_RUNTIME
will be the primary use-case for this.  This functionality is
controlled by adding an extra parameter to omap_hwmod_late_init().

This patch is based on the patch "OMAP: hwmod: don't auto-disable
hwmod when !CONFIG_PM_RUNTIME" by Kevin Hilman
<khilman@deeprootsystems.com>.

Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP: hwmod: add non-locking versions of enable and idle functions
Kevin Hilman [Fri, 2 Jul 2010 15:33:42 +0000 (09:33 -0600)]
OMAP: hwmod: add non-locking versions of enable and idle functions

Some hwmods may need to be idled/enabled in atomic context, so
non-locking versions of these functions are required.

Most users should not need these and usage of theses should be
controlled to understand why access is being done in atomic context.
For this reason, the non-locking functions are only exposed at the
hwmod level and not at the omap-device level.

The use-case that led to the need for the non-locking versions is
hwmods that are enabled/idled from within the core idle/suspend path.
Since interrupts are already disabled here, the mutex-based locking in
hwmod can sleep and will cause potential deadlocks.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP2&3: hwmod: Remove _hwmod prefix in name string
Benoit Cousson [Fri, 2 Jul 2010 15:33:41 +0000 (09:33 -0600)]
OMAP2&3: hwmod: Remove _hwmod prefix in name string

In the lastest OMAP4 hwmod data file, the _hwmod was removed
in order to save some memory space and because it does not
bring a lot.
Align OMAP2420, 2430 and 3430 data files with the same convention.

Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP2/3: hwmod: L3 and L4 CORE/PER/WKUP hwmods don't have IDLEST
Kevin Hilman [Fri, 2 Jul 2010 15:33:41 +0000 (09:33 -0600)]
OMAP2/3: hwmod: L3 and L4 CORE/PER/WKUP hwmods don't have IDLEST

Since these hwmods do not have IDLEST, set the HWMOD_NO_IDLEST flag,
otherwise _enable() will fail due to failing _wait_target_ready().

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP24xx: CM: fix mask used for checking IDLEST status
Kevin Hilman [Fri, 2 Jul 2010 15:33:40 +0000 (09:33 -0600)]
OMAP24xx: CM: fix mask used for checking IDLEST status

On OMAP24xx, the polarity for the IDLEST bits is opposite of OMAP3.
The mask used to check this was using the bit position instead of the
bit mask.

This patch fixes the problem by using the bit mask instead of the bit
field.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP1: clock: some cleanup
Paul Walmsley [Fri, 2 Jul 2010 15:33:40 +0000 (09:33 -0600)]
OMAP1: clock: some cleanup

Convert most of the magic numbers in mach-omap1/clock_data.c to use
macros.  Clean up a few comments to conform with Documentation/CodingStyle.
Mark the current clkops_uart as being OMAP16xx-only, and add some comments
to indicate that it does not belong there, for future cleanup.

This patch should not cause any functional changes.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP1: OPP: add KConfig entry for 96MHz ARM rate (using a 12MHz oscillator)
Paul Walmsley [Fri, 2 Jul 2010 15:33:39 +0000 (09:33 -0600)]
OMAP1: OPP: add KConfig entry for 96MHz ARM rate (using a 12MHz oscillator)

Add KConfig entry for one of the OMAP1 DVFS rates that was missing it.
Based on the surrounding rate KConfigs and the oscillator frequency,
this patch marks it as valid for all OMAP1 platforms -- Richard,
Tuukka, Tony, perhaps you can comment if this does not look right?

In the long term, all of these CONFIG_OMAP_ARM_*MHZ should be removed.
The OPP settings should be associated with the platform information in
the structure data (perhaps by extending the omap_chip defines).  The
selection of which rates to use should be handled at runtime; rates
that are impossible due to xtal frequency mismatch or SoC-type
mismatch should not be included.  If implemented correctly, this
should save some CPU time and some memory on OMAP1 kernels.

Reported-by: Christoph Egger <siccegge@cs.fau.de>
Reported-by: The VAMOS Research Project <vamos@i4.informatik.uni-erlangen.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Tuukka Tikkanen <tuukka.tikkanen@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP: clock: add kerneldoc for structures; move flags closer to structs
Paul Walmsley [Fri, 2 Jul 2010 15:33:39 +0000 (09:33 -0600)]
OMAP: clock: add kerneldoc for structures; move flags closer to structs

Add kerneldoc for struct clk, struct clksel_rate, struct clksel.  Move
flag macros for struct clk.flags and struct clksel_rate.flags closer
to the structures.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoOMAP3: wait on IDLEST after enabling USBTLL fclk
Anand Gadiyar [Fri, 2 Jul 2010 15:33:37 +0000 (09:33 -0600)]
OMAP3: wait on IDLEST after enabling USBTLL fclk

We need to wait on the IDLEST bit after the clocks are enabled
before attempting to access any register.

Currently, the USBTLL i-clock ops uses the clkops_omap2_dflt_wait,
while the USBTLL f-clock ops uses clkops_omap2_dflt. If the
i-clock is enabled first, the clkops_omap2_dflt_wait is
short-circuited as the companion f-clock is not enabled.
This can cause a data abort if the IDLEST has not transitioned,
and we try to access a USBTLL register.

Since the USBTLL i-clock and f-clock could be enabled in any order,
this is a bug. Fix it by changing the clkops for the f-clock.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
8 years agoMerge branch 'v2.6.35-rc3-iommu-for-next' of git://gitorious.org/~doyu/lk/mainline...
Tony Lindgren [Fri, 2 Jul 2010 08:23:30 +0000 (11:23 +0300)]
Merge branch 'v2.6.35-rc3-iommu-for-next' of git://gitorious.org/~doyu/lk/mainline into omap-for-linus

8 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 30 Jun 2010 22:45:28 +0000 (15:45 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (22 commits)
  USB: gadget: f_mass_storage: stale common->fsg value bug fix
  USB: gadget: f_mass_storage: fixed fs descriptors not being updated
  USB: musb: Enable the maximum supported burst mode for DMA
  USB: musb: fix Blackfin ulpi stubs
  USB: MUSB: make non-OMAP platforms build with CONFIG_PM=y
  USB: musb_core: make disconnect and suspend interrupts work again
  USB: obey the sysfs power/wakeup setting
  USB: gadget eth: Fix calculate CRC32 in EEM
  USB: qcserial: fix a memory leak in qcprobe error path
  USB: gadget/printer, fix sleep inside atomic
  USB: isp1362-hcd, fix double lock
  USB: serial: ftdi: correct merge conflict with CONTEC id
  USB: fix oops in usb_sg_init()
  USB: s3c2410: deactivate endpoints before gadget unbinding
  USB: ehci-mxc: bail out on transceiver problems
  USB: otg/ulpi: bail out on read errors
  usb: musb: Fix a bug by making suspend interrupt available in device mode
  USB: r8a66597: Fix failure in change of status
  USB: xHCI: Fix bug in link TRB activation change.
  USB: gadget: g_fs: possible invalid pointer reference bug fixed
  ...

8 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Wed, 30 Jun 2010 22:45:06 +0000 (15:45 -0700)]
Merge git://git./linux/kernel/git/gregkh/tty-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  serial: cpm_uart: implement the cpm_uart_early_write() function for console poll

8 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 30 Jun 2010 22:44:21 +0000 (15:44 -0700)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  OMAP: hwmod: Fix the missing braces
  OMAP4: clock: Fix multi-omap boot with reset un-used clocks
  OMAP3: PM: fix IO daisy chain enable to use PM_WKEN reg
  omap: GPIO: fix auto-disable of debounce clock
  omap: DMTIMER: Ack pending interrupt always when stopping a timer
  omap: Stalker board: switch over to gpio_set_debounce
  omap: fix build failure due to missing include dma-mapping.h
  omap iommu: Fix Memory leak

8 years agoAdd mdr as maintainer of qla1280 driver.
Jes Sorensen [Wed, 30 Jun 2010 13:37:38 +0000 (15:37 +0200)]
Add mdr as maintainer of qla1280 driver.

As discussed with Mike Reed, add him as the maintainer of the qla1280
driver as I no longer have any hardware and he is actively looking
after it.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agofutex: futex_find_get_task remove credentails check
Michal Hocko [Wed, 30 Jun 2010 07:51:19 +0000 (09:51 +0200)]
futex: futex_find_get_task remove credentails check

futex_find_get_task is currently used (through lookup_pi_state) from two
contexts, futex_requeue and futex_lock_pi_atomic.  None of the paths
looks it needs the credentials check, though.  Different (e)uids
shouldn't matter at all because the only thing that is important for
shared futex is the accessibility of the shared memory.

The credentail check results in glibc assert failure or process hang (if
glibc is compiled without assert support) for shared robust pthread
mutex with priority inheritance if a process tries to lock already held
lock owned by a process with a different euid:

pthread_mutex_lock.c:312: __pthread_mutex_lock_full: Assertion `(-(e)) != 3 || !robust' failed.

The problem is that futex_lock_pi_atomic which is called when we try to
lock already held lock checks the current holder (tid is stored in the
futex value) to get the PI state.  It uses lookup_pi_state which in turn
gets task struct from futex_find_get_task.  ESRCH is returned either
when the task is not found or if credentials check fails.

futex_lock_pi_atomic simply returns if it gets ESRCH.  glibc code,
however, doesn't expect that robust lock returns with ESRCH because it
should get either success or owner died.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Darren Hart <dvhltc@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agoUSB: gadget: f_mass_storage: stale common->fsg value bug fix
Michal Nazarewicz [Fri, 25 Jun 2010 14:29:28 +0000 (16:29 +0200)]
USB: gadget: f_mass_storage: stale common->fsg value bug fix

On fsg_unbind the common->fsg pointer was not NULLed if the
unbound fsg_dev instance was the current one.  As an effect,
the incorrect pointer was preserved in all further operations
which caused do_set_interface to reference an invalid region.

This commit fixes this by raising an exception in fsg_bind
which will change the common->fsg pointer.  This also requires
an wait queue so that the thread in fsg_bind can wait till the
worker thread handles the exception.

This commit removes also a config and new_config fields of
fsg_common as they are no longer needed since fsg can be
used to determine whether function is active or not.

Moreover, this commit removes possible race condition where
the fsg field was modified in both the worker thread and
form various other contexts.  This is fixed by replacing
prev_fsg with new_fsg.  At this point, fsg is assigned only
in worker thread.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8 years agoUSB: gadget: f_mass_storage: fixed fs descriptors not being updated
Michal Nazarewicz [Fri, 25 Jun 2010 14:29:26 +0000 (16:29 +0200)]
USB: gadget: f_mass_storage: fixed fs descriptors not being updated

The full speed descriptors were copied to the usb_function structure
in the fsg_bind_config function before call to the usb_ep_autoconfig.
The usb_ep_autoconfig was called in fsg_bind using the original
descriptors.  In effect copied descriptors were not updated.

This patch changes the copy full speed descriptors after the call to
usb_op_autoconfig is performed.  This way, copied full speed
descriptors have updated values.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Reported-by: Dries Van Puymbroeck <Dries.VanPuymbroeck@dekimo.com>
Tested-by: Dries Van Puymbroeck <Dries.VanPuymbroeck@dekimo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8 years agoUSB: musb: Enable the maximum supported burst mode for DMA
Hema HK [Thu, 24 Jun 2010 17:37:09 +0000 (23:07 +0530)]
USB: musb: Enable the maximum supported burst mode for DMA

Setting MUSB Burst Mode 3 automatically enables support for
lower burst modes (BURST4, BURST8, BURST16 or bursts of unspecified
length). There is no need to set these burst modes based on the
packet size. Also enable the burst mode for both mode1 and mode0.

This is a fix for buggy hardware - having the lower burst modes
enabled can potentially cause lockups of the DMA engine used in
OMAP2/3/4 chips.

Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8 years agoUSB: musb: fix Blackfin ulpi stubs
Mike Frysinger [Thu, 24 Jun 2010 17:37:08 +0000 (23:07 +0530)]
USB: musb: fix Blackfin ulpi stubs

The new ulpi code defines fallback stubs for the Blackfin arch, but does
so incorrectly leading to a build failure:
drivers/usb/musb/musb_core.c:227: error: 'musb_ulpi_read' undeclared here (not in a function)
drivers/usb/musb/musb_core.c:228: error: 'musb_ulpi_write' undeclared here (not in a function)

Tweak the fallback stubs so that they do work as intended.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8 years agoUSB: MUSB: make non-OMAP platforms build with CONFIG_PM=y
Sergei Shtylyov [Thu, 24 Jun 2010 17:37:07 +0000 (23:07 +0530)]
USB: MUSB: make non-OMAP platforms build with CONFIG_PM=y

Attempt to build MUSB driver with CONFIG_PM=y (e.g. in the OTG mode) on DaVinci
results in these link errors:

drivers/built-in.o: In function `musb_restore_context':
led-triggers.c:(.text+0x714d8): undefined reference to
`musb_platform_restore_context'
drivers/built-in.o: In function `musb_save_context':
led-triggers.c:(.text+0x71788): undefined reference to
`musb_platform_save_context'

This turned out to be caused by commit 9957dd97ec5e98dd334f87ade1d9a0b24d1f86eb
(usb: musb: Fix compile error for omaps for musb_hdrc). Revert it, taking into
account the rename of CONFIG_ARCH_OMAP34XX into CONFIG_ARCH_OMAP3 (which that
commit fixed in a completely inappropriate way) and the recent addition of
OMAP4 support.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8 years agoUSB: musb_core: make disconnect and suspend interrupts work again
Sergei Shtylyov [Thu, 24 Jun 2010 17:37:06 +0000 (23:07 +0530)]
USB: musb_core: make disconnect and suspend interrupts work again

Commit 1c25fda4a09e8229800979986ef399401053b46e (usb: musb: handle irqs in the
order dictated by programming guide) forgot to get rid of the old 'STAGE0_MASK'
filter for calling musb_stage0_irq(), so now disconnect and suspend interrupts
are effectively ignored...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8 years agoUSB: obey the sysfs power/wakeup setting
Alan Stern [Tue, 22 Jun 2010 20:14:48 +0000 (16:14 -0400)]
USB: obey the sysfs power/wakeup setting

This patch (as1403) is a partial reversion of an earlier change
(commit 5f677f1d45b2bf08085bbba7394392dfa586fa8e "USB: fix remote
wakeup settings during system sleep").  After hearing from a user, I
realized that remote wakeup should be enabled during system sleep
whenever userspace allows it, and not only if a driver requests it
too.

Indeed, there could be a device with no driver, that does nothing but
generate a wakeup request when the user presses a button.  Such a
device should be allowed to do its job.

The problem fixed by the earlier patch -- device generating a wakeup
request for no reason, causing system suspend to abort -- was also
addressed by a later patch ("USB: don't enable remote wakeup by
default", accepted but not yet merged into mainline).  The device
won't be able to generate the bogus wakeup requests because it will be
disabled for remote wakeup by default.  Hence this reversion will not
re-introduce any old problems.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org> [.34]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
8 years agoUSB: gadget eth: Fix calculate CRC32 in EEM
Jiri Pinkava [Sun, 20 Jun 2010 18:05:52 +0000 (20:05 +0200)]
USB: gadget eth: Fix calculate CRC32 in EEM

CRC should be calculated for Ethernet frame, not for whole recievede EEM data.
This bug shows rarely, because in many times len == skb->len.

Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>