safe/jmp/linux-2.6
14 years agoomap: serial: fix non-empty uart fifo read abort
vikram pandita [Sat, 12 Dec 2009 00:16:37 +0000 (16:16 -0800)]
omap: serial: fix non-empty uart fifo read abort

OMAP3xxx and OMAP4430 UART IP blocks have a restriction wrt RX FIFO.
Empty RX fifo read causes an abort.

OMAP3xxx:
UART IP revision >= 0x52 have this issue
MVR register format is:
Bits  Field Name  Description   Type  Reset
31:8   RESERVED  RO   0x0
7:4    MAJOR   Major revision number of the module.   RO   0x--
3:0    MINOR   Minor revision number of the module.   RO   0x--

OMAP4xxx:
All revisions have this issue
Revision id check is not used as the format of MVR resigster has changed
For omap4 MVR register reads as: 0x50410602 => Revision id = 0x0602
Format of MVR register on omap4 is: (Courtesy: Cousson, Benoit)
Bits  Field Name  Description   Type  Reset
31:30 SCHEME   Scheme revision number of module   RO   0x1
29:28 RESERVED    RO   0x1
27:16 FUNC   Function revision number of module   RO   0x041
15:11 RTL   Rtl revision number of module   RO   0x00
10:8  MAJOR  Major revision number of the module.   RO   0x6
7:6   CUSTOM   Custom revision number of the module.   RO   0x0
5:0   MINOR   Minor revision number of the module.   RO   0x02

Override the default 8250 read handler: mem_serial_in()
by a custom handler: serial_in_8250()
which makes sure that RX fifo is not read when empty

tested on zoom3(3630) board

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: Zoom2/3: Update hsmmc board config params
Madhusudhan Chikkature [Sat, 12 Dec 2009 00:16:37 +0000 (16:16 -0800)]
omap3: Zoom2/3: Update hsmmc board config params

Update the hsmmc zoom peripheral configuration to support:
Power saving mode
mmc2 8-bit support
Configure mmc2 as non removable

Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3 : Enable TWL4030 Keypad for Zoom2 and Zoom3 boards
manjugk manjugk [Sat, 12 Dec 2009 00:16:37 +0000 (16:16 -0800)]
omap3 : Enable TWL4030 Keypad for Zoom2 and Zoom3 boards

The TWL4030 keypad driver is not enabled by default for zoom2 and zoom3
boards.

This patch will enable the same for both zoom2 and zoom3 boards.

Tested on zoom2(3430) and zoom3(3630) boards.

Signed-off-by: Manjunatha GK <manjugk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: id code detection 3525 vs 3515
Sergey Lapin [Sat, 12 Dec 2009 00:16:37 +0000 (16:16 -0800)]
omap3: id code detection 3525 vs 3515

The runtime detection of OMAP3515 and OMAP3525
was reversed.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: rx51: Use wl1251 in SPI mode 3
Kalle Valo [Sat, 12 Dec 2009 00:16:37 +0000 (16:16 -0800)]
omap3: rx51: Use wl1251 in SPI mode 3

Otherwise Extreme Lower Power (ELP) wakeup doesn't work properly.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: zoom2/3: make MMC slot work again
Anand Gadiyar [Sat, 12 Dec 2009 00:16:36 +0000 (16:16 -0800)]
omap3: zoom2/3: make MMC slot work again

omap3: zoom2/3: make MMC slot work again

Commit 12f8dfb56 accidentally broke MMC on zoom2/3.
The .vmmc1 field of zoom_twldata was deleted. Restoring it
allows the MMC slot to work again

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: htcherald: Update defconfig to include mux support
Cory Maccarrone [Sat, 12 Dec 2009 00:16:36 +0000 (16:16 -0800)]
omap1: htcherald: Update defconfig to include mux support

The existing htcherald_defconfig did not include mux support, which
prevented USB and other functionality from working out of the box.
This change updates the defconfig to add it in.  It also aligns the
defconfig to the -rc8 kernel config.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: LCD_DMA: Use some define rather than a hexadecimal
Janusz Krzysztofik [Sat, 12 Dec 2009 00:16:36 +0000 (16:16 -0800)]
omap1: LCD_DMA: Use some define rather than a hexadecimal

The patch corrects the issue introduced with one of my earlier patches:
OMAP: DMA: Fix omapfb/lcdc on OMAP1510 broken when PM set[1]
as pointed out by OMAP subsystem maintainer.

Applies on top of my prevoius patch:
  OMAP: DMA: move LCD DMA related code from plat-omap to mach-omap1[2]

Tested on Amstrad Delta
Compile tested with omap_generic_2420_defconfig

[1] http://patchwork.kernel.org/patch/57922/
[2] http://patchwork.kernel.org/patch/61952/

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: header: remove unused data-type
vikram pandita [Sat, 12 Dec 2009 00:16:36 +0000 (16:16 -0800)]
omap: header: remove unused data-type

Remove unused data type omap_gpio_switch_config

Thereby also get rid of following sparse warnings:
arch/arm/plat-omap/include/plat/board.h :121:20:
warning: dubious bitfield without explicit `signed' or `unsigned'
arch/arm/plat-omap/include/plat/board.h :122:19:
warning: dubious bitfield without explicit `signed' or `unsigned'
arch/arm/plat-omap/include/plat/board.h :123:24:
warning: dubious bitfield without explicit `signed' or `unsigned'

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: arch/arm/plat-omap/devices.c - sort alphabetically
Ladislav Michl [Sat, 12 Dec 2009 00:16:36 +0000 (16:16 -0800)]
omap: arch/arm/plat-omap/devices.c - sort alphabetically

Comment in omap_init_devices asks to keep init calls and their
implementations in alphabetical order, so let it be that way.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Correcting GPMC_CONFIG1_DEVICETYPE_NAND
Vimal Singh [Sat, 12 Dec 2009 00:16:35 +0000 (16:16 -0800)]
omap: Correcting GPMC_CONFIG1_DEVICETYPE_NAND

For NAND devices '2' should be used with GPMC_CONFIG1_DEVICETYPE
instead of '1'.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP3: serial - allow platforms specify which UARTs to initialize
Mika Westerberg [Sat, 12 Dec 2009 00:16:35 +0000 (16:16 -0800)]
OMAP3: serial - allow platforms specify which UARTs to initialize

This patch adds new function: omap_serial_init_port(port) that can be
used to initialize only selected UARTs as serial ports. Platforms can
then in their board files call this function instead of omap_serial_init()
if they don't want to use all UARTs as serial ports.

Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: cm-t35: add mux initialization
Mike Rapoport [Sat, 12 Dec 2009 00:16:35 +0000 (16:16 -0800)]
omap3: cm-t35: add mux initialization

CM-T35 can be assembled with different set of peripherals thus making
certain interfaces available to user as GPIOs or dedicated pins. Because
of it CM-T35 bootloader sets up mux configuration only for pins
necessary to boot the system and the rest of the mux configuration is
done by the kernel. Besides, having mux configuration in the kernel
allows to minimize dependancy on bootloader.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP4: Sync up omap4430 defconfig
Santosh Shilimkar [Sat, 12 Dec 2009 00:16:35 +0000 (16:16 -0800)]
OMAP4: Sync up omap4430 defconfig

Enable minimum features to boot omap4430 on es1.0 samples. v2 versions
removes the "CONFIG_SYSFS_DEPRECATED_V2" since it's deprecated. Without
this older file system doesn't boot. One need to upgrade the filesystem
if getting stuck in first init function.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP4: Remove the secondary wait loop
Santosh Shilimkar [Sat, 12 Dec 2009 00:16:35 +0000 (16:16 -0800)]
OMAP4: Remove the secondary wait loop

The secondary cores wakes up in time so the wait loop is not
necessary anymore.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP4: AuxCoreBoot registers only accessible in secure mode
Santosh Shilimkar [Sat, 12 Dec 2009 00:16:35 +0000 (16:16 -0800)]
OMAP4: AuxCoreBoot registers only accessible in secure mode

The AuxCoreBoot0 and AuxCoreBoot1 can be only accessed in secure
mode. Replace the current code with secure monitor API's to access/modify
these registers.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP4: Fix SRAM base and size
Santosh Shilimkar [Sat, 12 Dec 2009 00:16:35 +0000 (16:16 -0800)]
OMAP4: Fix SRAM base and size

This patch fixes the public sram base address and available
size on OMAP4430.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP4: Fix cpu detection
Santosh Shilimkar [Sat, 12 Dec 2009 00:16:34 +0000 (16:16 -0800)]
OMAP4: Fix cpu detection

This patch fixes the OMAP4430 cpu detection. The IC rev detection is
done with hawkeye and rev. Note that rev does not map directly to
defined processor revision numbers as ES1.0 uses value 0.It also fixes
the SCM base address to read the correct ID_CODE register.

Also the cpu_is_omap44xx() and cpu_is_omap443x() correctly populated
instead of always being true

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: pandora: board file updates for .33
Grazvydas Ignotas [Sat, 12 Dec 2009 00:16:34 +0000 (16:16 -0800)]
omap3: pandora: board file updates for .33

Pandora board file updates:
- change keycodes of game buttons
  it was decided not to use ABXY layout by the developers.
- drop i2c bus 3 speed to 100kHz
  this is needed for battery monitoring chip to work reliably.
- drop pandora_lcd platform_device
  the older DSS driver was never functional on l-o or mainline
  kernels due to missing panel driver, so remove unneeded
  pandora_lcd platform_device. This also removes last OMAP_TAG
  from the board file.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: Defconfig file of Always Innovating OMAP3-based Touch Book
Gregoire Gentil [Sat, 12 Dec 2009 00:16:34 +0000 (16:16 -0800)]
omap3: Defconfig file of Always Innovating OMAP3-based Touch Book

Defconfig file of Always Innovating OMAP3-based Touch Book

Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: Board file of Always Innovating OMAP3-based Touch Book
Gregoire Gentil [Sat, 12 Dec 2009 00:16:34 +0000 (16:16 -0800)]
omap3: Board file of Always Innovating OMAP3-based Touch Book

Board file of Always Innovating OMAP3-based Touch Book

Signed-off-by: Gregoire Gentil <gregoire@gentil.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: I2C mux and clocks for omap7xx
Cory Maccarrone [Sat, 12 Dec 2009 00:16:34 +0000 (16:16 -0800)]
omap1: I2C mux and clocks for omap7xx

This change adds MUX pin configuration and clocks for I2C support
to OMAP 730 and 850-based devices.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: Add omap7xx USB support
Cory Maccarrone [Sat, 12 Dec 2009 00:16:34 +0000 (16:16 -0800)]
omap1: Add omap7xx USB support

This change implements USB client side support into the HTC
Herald board configuration.  It uses a similar, but updated
algorithm to initialize the USB as is used in the linwizard
project.

Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: DMA: move LCD related code from plat-omap to mach-omap1
Janusz Krzysztofik [Sat, 12 Dec 2009 00:16:33 +0000 (16:16 -0800)]
omap1: DMA: move LCD related code from plat-omap to mach-omap1

All of the LCD DMA code in plat-omap/dma.c appears to be OMAP1-only (and
apparently only is available on a subset of OMAP1 chips).

Move this code to mach-omap1/lcd_dma.c.

Tested on OMAP1510 Amstrad Delta.
Compile-tested with omap_generic_2420_defconfig.

Reported-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: Use gen_nand
Ladislav Michl [Sat, 12 Dec 2009 00:16:33 +0000 (16:16 -0800)]
omap1: Use gen_nand

Since omapnand driver never find its way into mainline, switch to gen_nand instead.
Following patch is compile tested only, but it is based on code I wrote for
NetStar board and runtime tested it there.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Cc: Imre Deak <imre.deak@nokia.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Kevin Hilman <kjh@hilman.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agosmc91x: remove OMAP specific bits
Ladislav Michl [Sat, 12 Dec 2009 00:16:33 +0000 (16:16 -0800)]
smc91x: remove OMAP specific bits

Now that all OMAP boards are using the board resources, we don't need
to keep the arch/board specific crap in the driver header.

Cc: linux-net@vger.kernel.org
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: use smc91x_platdata to setup smc91x
Ladislav Michl [Sat, 12 Dec 2009 00:16:33 +0000 (16:16 -0800)]
omap: use smc91x_platdata to setup smc91x

Use smc91x_platdata to setup smc91x, so we can get rid of OMAP specific stuff
in smc91x driver

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: mux: Add 36xx CBP package support
Tony Lindgren [Sat, 12 Dec 2009 00:16:33 +0000 (16:16 -0800)]
omap: mux: Add 36xx CBP package support

Add 36xx CBP package support

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: mux: Remove old mux code for 34xx
Tony Lindgren [Sat, 12 Dec 2009 00:16:33 +0000 (16:16 -0800)]
omap: mux: Remove old mux code for 34xx

Remove old mux code for 34xx

Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: mux: Replace omap_cfg_reg() with new style signal or gpio functions
Tony Lindgren [Sat, 12 Dec 2009 00:16:32 +0000 (16:16 -0800)]
omap: mux: Replace omap_cfg_reg() with new style signal or gpio functions

Replace omap_cfg_reg() with new style signal or gpio functions

Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Split i2c platform init for mach-omap1 and mach-omap2
Tony Lindgren [Sat, 12 Dec 2009 00:16:32 +0000 (16:16 -0800)]
omap: Split i2c platform init for mach-omap1 and mach-omap2

Otherwise we cannot limit new mux code to mach-omap2.
The same signal names should eventually work for other
omaps under mach-omap2.

Note that these pins don't need to be OMAP_PIN_INPUT_PULLUP,
just OMAP_PIN_INPUT is enough.

Cc: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: mux: Add debugfs support for new mux code
Tony Lindgren [Sat, 12 Dec 2009 00:16:32 +0000 (16:16 -0800)]
omap: mux: Add debugfs support for new mux code

Add debugfs support for new mux code

Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: mux: Add new style init functions to omap3 board-*.c files
Tony Lindgren [Sat, 12 Dec 2009 00:16:32 +0000 (16:16 -0800)]
omap: mux: Add new style init functions to omap3 board-*.c files

Add new style mux init functions to omap3 board-*.c files

So far Beagle has been confirmed to be a CBB package,
and CM-T35 a CUS package.

Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: mux: Add new style pin multiplexing data for 34xx
Tony Lindgren [Sat, 12 Dec 2009 00:16:32 +0000 (16:16 -0800)]
omap: mux: Add new style pin multiplexing data for 34xx

Add new style mux data for 34xx. This should also
work with 3630 easily by adding the processor subset
and ball data.

Note that this data is __initdata, and gets optimized
out except for the GPIO pins if CONFIG_OMAP_MUX
is not set.

Also note that this data uses omap3630 naming for
the SDMMC registers instead of 34xx naming with just
MMC.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: mux: Add new style pin multiplexing code for omap3
Tony Lindgren [Sat, 12 Dec 2009 00:16:32 +0000 (16:16 -0800)]
omap: mux: Add new style pin multiplexing code for omap3

Initially only for 34xx. This code allows us to:

- Make the code more generic as the omap internal signal
  names can stay the same across omap generations for some
  devices

- Map mux registers to GPIO registers that is needed for
  dynamic muxing of pins during off-idle

- Override bootloader mux values via kernel cmdline using
  omap_mux=some.signa1=0x1234,some.signal2=0x1234

- View and set the mux registers via debugfs if
  CONFIG_DEBUG_FS is enabled

Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap2: mux: intoduce omap_mux_{read,write}
Mike Rapoport [Sat, 12 Dec 2009 00:16:31 +0000 (16:16 -0800)]
omap2: mux: intoduce omap_mux_{read,write}

intoduce omap_mux_{read,write}

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoMerge branch 'for_2_6_33' of git://git.pwsan.com/linux-2.6 into omap-for-linus
Tony Lindgren [Sat, 12 Dec 2009 00:16:02 +0000 (16:16 -0800)]
Merge branch 'for_2_6_33' of git://git.pwsan.com/linux-2.6 into omap-for-linus

14 years agoARM: OMAP4: PM: Add init api for DPLL nodes
Rajendra Nayak [Wed, 9 Dec 2009 01:47:17 +0000 (18:47 -0700)]
ARM: OMAP4: PM: Add init api for DPLL nodes

An api at init for all dpll nodes seem to be
needed to reparent the dpll clk node to its
bypass clk in case the dpll is in bypass.
If not done this causes sequencing issues at init
during propogate_rate.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: Add support for OMAP4 dpll api's
Rajendra Nayak [Wed, 9 Dec 2009 01:47:16 +0000 (18:47 -0700)]
ARM: OMAP4: PM: Add support for OMAP4 dpll api's

Most of the dpll api's from dpll.c are reused for OMAP4.
This patch does extend a few api's for OMAP4 support.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: Move DPLL control apis to dpll.c
Rajendra Nayak [Wed, 9 Dec 2009 01:47:16 +0000 (18:47 -0700)]
ARM: OMAP4: PM: Move DPLL control apis to dpll.c

This patch moves all the dpll control api's to a
common file dpll.c. This is in preperation of omap4
support wherein most of these api's can be reused.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: Add dummy hooks for OMAP4 dpll api's
Rajendra Nayak [Tue, 8 Dec 2009 18:31:44 +0000 (00:01 +0530)]
ARM: OMAP4: PM: Add dummy hooks for OMAP4 dpll api's

This patch adds dummy hooks for OMAP4 dpll api's. Removes
dummy hooks for clkdev api's and enables CLKDEV
for OMAP4.
Also comments clockdomain calls from within the clock
framework as its not supported yet for OMAP4.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: OMAP4 clock tree and clkdev registration
Rajendra Nayak [Wed, 9 Dec 2009 01:46:28 +0000 (18:46 -0700)]
ARM: OMAP4: PM: OMAP4 clock tree and clkdev registration

This patch defines all the clock nodes in OMAP4430
platform. All the clock node structs and the clkdev table is
autogenerated using a python script (gen_clock_tree.py)
developed by Paul Walmsley, Benoit Cousson and Rajendra Nayak.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: Adds CM1/2 register field masks
Rajendra Nayak [Wed, 9 Dec 2009 01:24:54 +0000 (18:24 -0700)]
ARM: OMAP4: PM: Adds CM1/2 register field masks

This patch adds OMAP4 specific CM1 and CM2 module
register field masks. Auto generated using a python
script (gen_cm_shifts_and_mask.py) developed by Benoit
Cousson, Paul Walmsley and Rajendra Nayak.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: Adds PRM register shift and mask bits
Rajendra Nayak [Wed, 9 Dec 2009 01:24:52 +0000 (18:24 -0700)]
ARM: OMAP4: PM: Adds PRM register shift and mask bits

This patch adds OMAP4 specific PRM register bit field
shifts and masks. Auto generated using a python script
(gen_prm_shifts_and_mask.py) developed by Benoit Cousson,
Paul Walmsley and Rajendra Nayak.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: Adds PRM register defs for OMAP4
Rajendra Nayak [Wed, 9 Dec 2009 01:24:51 +0000 (18:24 -0700)]
ARM: OMAP4: PM: Adds PRM register defs for OMAP4

This patch adds OMAP4 specific PRM register defs. Auto generated
using a python script (gen_prm_4430_h.py) developed by Paul
Walmsley and Benoit Cousson.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: Adds CM1/2 register defs for OMAP4
Rajendra Nayak [Wed, 9 Dec 2009 01:24:50 +0000 (18:24 -0700)]
ARM: OMAP4: PM: Adds CM1/2 register defs for OMAP4

This patch adds OMAP4 specific CM1 and CM2 module
register defs. Autogenerated using a python scripts
(gen_cm1_4430_h.py,gen_cm2_4430_h.py) developed
by Paul Walmsley and Benoit Cousson.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: PRM/CM module offsets for OMAP4
Rajendra Nayak [Wed, 9 Dec 2009 01:24:49 +0000 (18:24 -0700)]
ARM: OMAP4: PM: PRM/CM module offsets for OMAP4

This patch adds the offsets for new modules in PRM
and CM for OMAP4
These are autogenerated using a python script (gen_prcm44xx_h.py)
developed by Paul Walmsley and Benoit Cousson.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoARM: OMAP4: PM: Fix the PRM and CM base addresses
Rajendra Nayak [Wed, 9 Dec 2009 01:24:49 +0000 (18:24 -0700)]
ARM: OMAP4: PM: Fix the PRM and CM base addresses

This patch fixes the PRM and CM base addresses and adds
a new CM2 base address for OMAP4

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoit Cousson <b-cousson@ti.com>
14 years agoOMAP: omap_device: track latency in nanoseconds
Kevin Hilman [Tue, 8 Dec 2009 23:34:26 +0000 (16:34 -0700)]
OMAP: omap_device: track latency in nanoseconds

Rather than having to do a usecs = nsecs / NSECS_PER_USEC to
track latency in usecs, just track it in nanoseconds.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP: omap_device: fix nsec/usec conversion in latency calculations
Kevin Hilman [Tue, 8 Dec 2009 23:34:25 +0000 (16:34 -0700)]
OMAP: omap_device: fix nsec/usec conversion in latency calculations

Use

   usecs = nsecs / NSEC_PER_USEC;

instead of

   usecs = nsecs * NSEC_PER_USEC;

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP: hwmod: warn on missing clockdomain
Kevin Hilman [Tue, 8 Dec 2009 23:34:24 +0000 (16:34 -0700)]
OMAP: hwmod: warn on missing clockdomain

WARN if a clock/hwmod is missing a clockdomain association since
resulting hwmod will not be able to correctly enable/disable clocks.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP: omap_device: use read_persistent_clock() instead of getnstimeofday()
Kevin Hilman [Tue, 8 Dec 2009 23:34:23 +0000 (16:34 -0700)]
OMAP: omap_device: use read_persistent_clock() instead of getnstimeofday()

During suspend and resume, when omap_device deactivation and
activation is happening, the timekeeping subsystem has likely already
been suspended.  Thus getnstimeofday() will fail and trigger a WARN().

Use read_persistent_clock() instead of getnstimeofday() to avoid this.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP: omap_device: use UINT_MAX for default wakeup latency limit
Kevin Hilman [Tue, 8 Dec 2009 23:34:22 +0000 (16:34 -0700)]
OMAP: omap_device: use UINT_MAX for default wakeup latency limit

The _dev_wakeup_lat_limit field of struct omap_device is u32, so use
UINT_MAX instead of INT_MAX for the default maximum.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP: omap_device: add to_omap_device() macro
Kevin Hilman [Tue, 8 Dec 2009 23:34:17 +0000 (16:34 -0700)]
OMAP: omap_device: add to_omap_device() macro

Following the model of to_platform_device(), add to_omap_device()
macro so a platform_device pointer can be converted into an
omap_device pointer.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP3 hwmod: drop most of the OCP_SYSCONFIG.CLOCKACTIVITY code
Paul Walmsley [Tue, 8 Dec 2009 23:34:17 +0000 (16:34 -0700)]
OMAP3 hwmod: drop most of the OCP_SYSCONFIG.CLOCKACTIVITY code

Earlier, the hwmod code had considered the OCP_SYSCONFIG.CLOCKACTIVITY
bits to be incremental power saving bits, controlling internal IP
block clock gates.  This was a misapprehension.  The CLOCKACTIVITY
bits are used to indicate, in advance, which clocks will be cut when
the module acknowledges an idle request.  This enables the IP block to
take whatever action is necessary to complete any in-progress work
before asserting its IdleAck.

In the current Linux-OMAP code, this implies that the clock framework
should be changing module CLOCKACTIVITY bits as module clocks are enabled
and disabled.  We don't do that yet, but in the future, we should.
This must wait until the clock tree is annotated with omap_hwmod pointers
(or vice-versa).  In the meantime, drop most of the hwmod code that
controls CLOCKACTIVITY bits to avoid confusion.

This patch has benefited from many illuminating discussions with (in
alphabetical order) Benoît Cousson <b-cousson@ti.com>, Rajendra Nayak
<rnayak@ti.com>, and Sebastien Sabatier <s-sabatier1@ti.com>.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Sebastien Sabatier <s-sabatier1@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
14 years agoOMAP hwmod: add names to module MPU IRQ lines
Paul Walmsley [Tue, 8 Dec 2009 23:34:16 +0000 (16:34 -0700)]
OMAP hwmod: add names to module MPU IRQ lines

Replace the existing u8 array of module MPU IRQ lines with a struct
that includes a name - similar to the existing struct
omap_hwmod_dma_info.  Device drivers can then use
platform_get_resource_byname() to retrieve specific IRQs without nasty
dependencies on array ordering.

Thanks to Benoît Cousson <b-cousson@ti.com> and Kevin Hilman
<khilman@deeprootsystems.com> for feedback on this approach.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling
Paul Walmsley [Tue, 8 Dec 2009 23:34:15 +0000 (16:34 -0700)]
OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling

This patch fills in the OCP_SYSCONFIG.AUTOIDLE handling in the OMAP
hwmod code.

After this patch, the hwmod code will set the module AUTOIDLE bit
(generally <module>.OCP_SYSCONFIG.AUTOIDLE) to 1 by default upon
enable.  If the hwmod flag HWMOD_NO_OCP_AUTOIDLE is set, AUTOIDLE will
be set to 0 upon enable.  Upon module disable, AUTOIDLE will be set to
1.

Enabling module autoidle should save some power.  The only reason to
not set the OCP_SYSCONFIG.AUTOIDLE bit is if there is a bug in the
module RTL, e.g., the MPUINTC block on OMAP3.

Comments from Kevin Hilman <khilman@deeprootsystems.com> inspired this patch,
and Kevin tested an earlier version of this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3 hwmod: reprogram OCP_SYSCONFIG register after setting SOFTRESET
Paul Walmsley [Tue, 8 Dec 2009 23:34:14 +0000 (16:34 -0700)]
OMAP3 hwmod: reprogram OCP_SYSCONFIG register after setting SOFTRESET

Reprogram the module's OCP_SYSCONFIG register after module reset (SOFTRESET
= 1).  This may not be needed, but the definition of the reset performed by
the SOFTRESET bit is unclear.

Kevin Hilman <khilman@deeprootsystems.com> tested an earlier version of
this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP clock/hwmod: fix off-by-one errors
Paul Walmsley [Tue, 8 Dec 2009 23:33:16 +0000 (16:33 -0700)]
OMAP clock/hwmod: fix off-by-one errors

Fix loop bailout off-by-one bugs reported by Juha Leppänen
<juha_motorsportcom@luukku.com>.

This second version incorporates comments from Russell King
<linux@arm.linux.org.uk>.  A new macro, 'omap_test_timeout', has
been created, with cleaner code, and existing code has been converted
to use it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Juha Leppänen <juha_motorsportcom@luukku.com>
Cc: Russell King <linux@arm.linux.org.uk>
14 years agoOMAP3: PM: Fix for MPU power domain MEM BANK position
Thara Gopinath [Tue, 8 Dec 2009 23:33:15 +0000 (16:33 -0700)]
OMAP3: PM: Fix for MPU power domain MEM BANK position

MPU power domain bank 0 bits are displayed in position of bank 1
in PWRSTS and PREPWRSTS registers. So read them from correct
position

Signed-off-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP3: SDRC: Place SDRC AC timing and MR changes in CORE DVFS SRAM code behind Kconfig
Paul Walmsley [Tue, 8 Dec 2009 23:33:14 +0000 (16:33 -0700)]
OMAP3: SDRC: Place SDRC AC timing and MR changes in CORE DVFS SRAM code behind Kconfig

The code that reprograms the SDRC memory controller during CORE DVFS,
mach-omap2/sram34xx.S:omap3_sram_configure_core_dpll(), does not
ensure that all L3 initiators are prevented from accessing the SDRAM
before modifying the SDRC AC timing and MR registers.  This can cause
memory to be corrupted or cause the SDRC to enter an unpredictable
state.  This patch places that code behind a Kconfig option,
CONFIG_OMAP3_SDRC_AC_TIMING for now, and adds a note explaining what
is going on.  Ideally the code can be added back in once supporting
code is present to ensure that other initiators aren't touching the
SDRAM.  At the very least, these registers should be reprogrammable
during kernel init to deal with buggy bootloaders.  Users who know
that all other system initiators will not be touching the SDRAM can
also re-enable this Kconfig option.

This is a modification of a patch originally written by Rajendra Nayak
<rnayak@ti.com> (the original is at http://patchwork.kernel.org/patch/51927/).
Rather than removing the code completely, this patch just comments it out.

Thanks to Benoît Cousson <b-cousson@ti.com> and Christophe Sucur
<c-sucur@ti.com> for explaining the technical basis for this and for
explaining what can be done to make this path work in future code.
Thanks to Richard Woodruff <r-woodruff2@ti.com>, Nishanth Menon
<nm@ti.com>, and Olof Johansson <olof@lixom.net> for their comments.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Christophe Sucur <c-sucur@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Olof Johansson <olof@lixom.net>
14 years agoOMAP2/3 powerdomain: return errors rather than returning the output of IS_ERR()
Roel Kluin [Tue, 8 Dec 2009 23:33:13 +0000 (16:33 -0700)]
OMAP2/3 powerdomain: return errors rather than returning the output of IS_ERR()

IS_ERR returns only 1 or 0, and the functions return a negative error
in other cases anyways.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP powerdomain: rearrange struct powerdomain to save some memory
Paul Walmsley [Tue, 8 Dec 2009 23:33:13 +0000 (16:33 -0700)]
OMAP powerdomain: rearrange struct powerdomain to save some memory

This patch rearranges the order of structure members in struct powerdomain
to avoid wasting memory due to alignment restrictions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP powerdomain/PM: use symbolic constants for the max number of power states
Paul Walmsley [Tue, 8 Dec 2009 23:33:12 +0000 (16:33 -0700)]
OMAP powerdomain/PM: use symbolic constants for the max number of power states

Replace some bare constants with power states.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP clockdomain/powerdomain: optimize out sleepdep code on OMAP24xx
Paul Walmsley [Tue, 8 Dec 2009 23:33:11 +0000 (16:33 -0700)]
OMAP clockdomain/powerdomain: optimize out sleepdep code on OMAP24xx

OMAP24xx chips don't support software-configurable sleep dependencies.
Test early for this so the compiler can redact the entire function body
on OMAP24xx.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP clockdomain/powerdomain: remove CONFIG_OMAP_DEBUG_{CLOCK,POWER}DOMAIN
Paul Walmsley [Tue, 8 Dec 2009 23:33:10 +0000 (16:33 -0700)]
OMAP clockdomain/powerdomain: remove CONFIG_OMAP_DEBUG_{CLOCK,POWER}DOMAIN

Avoid cluttering the Kconfig space with debug options that are rarely
used.  These can now be enabled and disabled by patching the "#undef DEBUG"
in the source files with "#define DEBUG", conforming to the practice for
the rest of the linux-omap code.

Also, while we're here, some lines in plat-omap/Kconfig use sets of
leading spaces when those lines should start with tabs.  Convert most
of them to use tabs.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
14 years agoOMAP2/3 PRCM: don't export prm_*(), cm_*() functions
Paul Walmsley [Tue, 8 Dec 2009 23:33:09 +0000 (16:33 -0700)]
OMAP2/3 PRCM: don't export prm_*(), cm_*() functions

Device drivers and loadable modules should not be calling these
prm_* and cm_* functions, so stop exporting them.  Only core code
and device driver integration code (in arch/arm/*omap*) should
call these functions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c
Paul Walmsley [Tue, 8 Dec 2009 23:29:38 +0000 (16:29 -0700)]
OMAP1 clock: convert mach-omap1/clock.h to mach-omap1/clock_data.c

The OMAP1 clock code currently #includes a large .h file full of static
data structures.  Instead, define the data in a .c file.

Russell King <linux@arm.linux.org.uk> proposed this new arrangement:

    http://marc.info/?l=linux-omap&m=125967425908895&w=2

This patch also deals with most of the flagrant checkpatch violations.

While here, separate the mpu_rate data structures out into their own
files, opp.h and opp_data.c.  In the long run, these mpu_rate tables
should be replaced with OPP code.

Also includes a patch from Felipe Balbi <felipe.balbi@nokia.com> to
mark omap1_clk_functions as __initdata to avoid a section warning:

    http://patchwork.kernel.org/patch/64366/

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Nishanth Menon <nm@ti.com>
14 years agoOMAP1 clock: convert test in disable_unused() to use ENABLE_ON_INIT
Paul Walmsley [Tue, 8 Dec 2009 23:29:37 +0000 (16:29 -0700)]
OMAP1 clock: convert test in disable_unused() to use ENABLE_ON_INIT

mach-omap1/clock.c:omap1_clk_disable_unused() contains a test that
assumes that the clock structures are available in the file's
namespace.  After a following patch, this will no longer be the case.
So we need to reimplement that test.  It turns out that we already
have a facility in the clock framework to handle this case - the
ENABLE_ON_INIT flag - used on OMAP2/3.  Remove the offending test and
mark the clocks that it was intended to catch as ENABLE_ON_INIT.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx*
Paul Walmsley [Tue, 8 Dec 2009 23:21:29 +0000 (16:21 -0700)]
OMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx*

The OMAP2 clock code currently #includes a large .h file full of static
data structures.  Instead, define the data in a .c file.

Russell King <linux@arm.linux.org.uk> proposed this new arrangement:

    http://marc.info/?l=linux-omap&m=125967425908895&w=2

This patch also deals with most of the flagrant checkpatch violations.

While here, separate the prcm_config data structures out into their own
files, opp2xxx.h and opp24{2,3}0_data.c, and only build in the OPP tables
for the target device.  This should save some memory.  In the long run,
these prcm_config tables should be replaced with OPP code.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Nishanth Menon <nm@ti.com>
14 years agoOMAP3 clock: convert clock34xx.h to clock34xx_data.c
Paul Walmsley [Tue, 8 Dec 2009 23:18:47 +0000 (16:18 -0700)]
OMAP3 clock: convert clock34xx.h to clock34xx_data.c

The OMAP3 clock code currently #includes a large .h file full of static
data structures.  Instead, define the data in a .c file.

Russell King <linux@arm.linux.org.uk> proposed this new arrangement:

    http://marc.info/?l=linux-omap&m=125967425908895&w=2

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Russell King <linux@arm.linux.org.uk>
14 years agoOMAP2xxx clock: remove implicit dependency between rate CPU flag and clkdev_omap...
Paul Walmsley [Tue, 8 Dec 2009 23:18:47 +0000 (16:18 -0700)]
OMAP2xxx clock: remove implicit dependency between rate CPU flag and clkdev_omap CPU flag

cpu_mask is reused in the OMAP2xxx clock code to match against both the
CPU-specific rate flags (e.g., RATE_IN_2420) and the OMAP clkdev integration
code CPU flags (e.g., CK_242X).  This means that any patch that renumbers the
CK_* macros, as the next patch does, will probably break.  This patch
separates the clkdev_omap and clksel_rate CPU type detection flags so
the CK_* macros can be renumbered freely.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP2/3: move SDRC macros to mach-omap2/sdrc.h
Paul Walmsley [Tue, 8 Dec 2009 23:18:47 +0000 (16:18 -0700)]
OMAP2/3: move SDRC macros to mach-omap2/sdrc.h

clock34xx.c contains some macros which probably belong in mach-omap2/sdrc.h.
Move those macros to mach-omap2/sdrc.h.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP2 clock: APLL code shouldn't rely on static clocks in its local namespace
Paul Walmsley [Tue, 8 Dec 2009 23:18:46 +0000 (16:18 -0700)]
OMAP2 clock: APLL code shouldn't rely on static clocks in its local namespace

Similar to the previous patch, the APLL code relied on the presence of the
static struct clks in its own namespace.  The APLL code didn't use them for
validation, however - it adjusted its own internal state depending on
the struct clk * that called it.  Now that static struct clks are
leaving the clock24xx.c namespace, use a more durable method: split the
omap2_clk_fixed_enable() function into omap2_clk_apll96_enable() and
omap2_clk_apll54_enable().  They still share a disable function.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoOMAP1/2/3 clock: remove paranoid checks in preparation for clock{,2xxx,3xxx}_data.c
Paul Walmsley [Tue, 8 Dec 2009 23:18:44 +0000 (16:18 -0700)]
OMAP1/2/3 clock: remove paranoid checks in preparation for clock{,2xxx,3xxx}_data.c

Some parts of the clock code took advantage of the fact that the statically
allocated clock tree was in clock{,24xx,34xx}.c's local namespace to do some
extra argument checks.  These are overzealous and are more difficult to
maintain when the clock tree is in a separate namespace, so, remove them.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
14 years agoMerge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
Linus Torvalds [Fri, 11 Dec 2009 05:55:17 +0000 (21:55 -0800)]
Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux

* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux:
  MAINTAINERS: Add OMAP2/3 DSS and OMAPFB maintainer
  OMAP: SDP: Enable DSS2 for OMAP3 SDP board
  OMAP: DSS2: Taal DSI command mode panel driver
  OMAP: DSS2: Add generic and Sharp panel drivers
  OMAP: DSS2: omapfb driver
  OMAP: DSS2: DSI driver
  OMAP: DSS2: SDI driver
  OMAP: DSS2: RFBI driver
  OMAP: DSS2: Video encoder driver
  OMAP: DSS2: DPI driver
  OMAP: DSS2: DISPC
  OMAP: DSS2: Add more core files
  OMAP: DSS2: Display Subsystem Driver core
  OMAP: DSS2: Documentation for DSS2
  OMAP: Add support for VRFB rotation engine
  OMAP: Add VRAM manager
  OMAP: OMAPFB: add omapdss device
  OMAP: OMAPFB: split omapfb.h
  OMAP2: Add funcs for writing SMS_ROT_* registers

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Thu, 10 Dec 2009 17:35:44 +0000 (09:35 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tj/wq

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: Add debugobjects support

14 years agoMerge branch 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
Linus Torvalds [Thu, 10 Dec 2009 17:35:02 +0000 (09:35 -0800)]
Merge branch 'bugfix' of git://git./linux/kernel/git/jeremy/xen

* 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen: try harder to balloon up under memory pressure.
  Xen balloon: fix totalram_pages counting.
  xen: explicitly create/destroy stop_machine workqueues outside suspend/resume region.
  xen: improve error handling in do_suspend.
  xen: don't leak IRQs over suspend/resume.
  xen: call clock resume notifier on all CPUs
  xen: use iret for return from 64b kernel to 32b usermode
  xen: don't call dpm_resume_noirq() with interrupts disabled.
  xen: register runstate info for boot CPU early
  xen: register runstate on secondary CPUs
  xen: register timer interrupt with IRQF_TIMER
  xen: correctly restore pfn_to_mfn_list_list after resume
  xen: restore runstate_info even if !have_vcpu_info_placement
  xen: re-register runstate area earlier on resume.
  xen: wait up to 5 minutes for device connetion
  xen: improvement to wait_for_devices()
  xen: fix is_disconnected_device/exists_disconnected_device
  xen/xenbus: make DEVICE_ATTR()s static

14 years agoMerge branch 'xen/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
Linus Torvalds [Thu, 10 Dec 2009 17:34:40 +0000 (09:34 -0800)]
Merge branch 'xen/fbdev' of git://git./linux/kernel/git/jeremy/xen

* 'xen/fbdev' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen pvfb: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers.
  fb-defio: Inhibit VM_IO flag to be set on vmalloc-ed framebuffers.
  fb-defio: If FBINFO_VIRTFB is defined, do not set VM_IO flag.
  Fix toogle whether xenbus driver should be built as module or part of kernel.

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Thu, 10 Dec 2009 17:33:59 +0000 (09:33 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: always use GFP_NOFS

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Thu, 10 Dec 2009 17:33:29 +0000 (09:33 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (47 commits)
  ext4: Fix potential fiemap deadlock (mmap_sem vs. i_data_sem)
  ext4: Do not override ext2 or ext3 if built they are built as modules
  jbd2: Export jbd2_log_start_commit to fix ext4 build
  ext4: Fix insufficient checks in EXT4_IOC_MOVE_EXT
  ext4: Wait for proper transaction commit on fsync
  ext4: fix incorrect block reservation on quota transfer.
  ext4: quota macros cleanup
  ext4: ext4_get_reserved_space() must return bytes instead of blocks
  ext4: remove blocks from inode prealloc list on failure
  ext4: wait for log to commit when umounting
  ext4: Avoid data / filesystem corruption when write fails to copy data
  ext4: Use ext4 file system driver for ext2/ext3 file system mounts
  ext4: Return the PTR_ERR of the correct pointer in setup_new_group_blocks()
  jbd2: Add ENOMEM checking in and for jbd2_journal_write_metadata_buffer()
  ext4: remove unused parameter wbc from __ext4_journalled_writepage()
  ext4: remove encountered_congestion trace
  ext4: move_extent_per_page() cleanup
  ext4: initialize moved_len before calling ext4_move_extents()
  ext4: Fix double-free of blocks with EXT4_IOC_MOVE_EXT
  ext4: use ext4_data_block_valid() in ext4_free_blocks()
  ...

14 years agoMerge branch 'for-linus' of git://git.open-osd.org/linux-open-osd
Linus Torvalds [Thu, 10 Dec 2009 17:32:24 +0000 (09:32 -0800)]
Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd

* 'for-linus' of git://git.open-osd.org/linux-open-osd:
  exofs: Multi-device mirror support
  exofs: Move all operations to an io_engine
  exofs: move osd.c to ios.c
  exofs: statfs blocks is sectors not FS blocks
  exofs: Prints on mount and unmout
  exofs: refactor exofs_i_info initialization into common helper
  exofs: dbg-print less
  exofs: More sane debug print
  trivial: some small fixes in exofs documentation

14 years agoMerge git://git.infradead.org/ubifs-2.6
Linus Torvalds [Thu, 10 Dec 2009 17:31:45 +0000 (09:31 -0800)]
Merge git://git.infradead.org/ubifs-2.6

* git://git.infradead.org/ubifs-2.6:
  UBIFS: fix return code in check_leaf
  UBI: flush wl before clearing update marker
  MAINTAINERS: change e-mail of Artem Bityutskiy
  UBIFS: remove manual O_SYNC handling
  UBIFS: support mounting of UBI volume character devices
  UBI: Add ubi_open_volume_path

14 years agoV4L/DVB (13592): max2165: 32bit build patch
David Wong [Thu, 3 Dec 2009 13:54:25 +0000 (10:54 -0300)]
V4L/DVB (13592): max2165: 32bit build patch

This patch drops usage of floating point variable for 32bit build

Signed-off-by: David T. L. Wong <davidtlwong@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoexofs: Multi-device mirror support
Boaz Harrosh [Mon, 16 Nov 2009 14:03:05 +0000 (16:03 +0200)]
exofs: Multi-device mirror support

This patch changes on-disk format, it is accompanied with a parallel
patch to mkfs.exofs that enables multi-device capabilities.

After this patch, old exofs will refuse to mount a new formatted FS and
new exofs will refuse an old format. This is done by moving the magic
field offset inside the FSCB. A new FSCB *version* field was added. In
the future, exofs will refuse to mount unmatched FSCB version. To
up-grade or down-grade an exofs one must use mkfs.exofs --upgrade option
before mounting.

Introduced, a new object that contains a *device-table*. This object
contains the default *data-map* and a linear array of devices
information, which identifies the devices used in the filesystem. This
object is only written to offline by mkfs.exofs. This is why it is kept
separate from the FSCB, since the later is written to while mounted.

Same partition number, same object number is used on all devices only
the device varies.

* define the new format, then load the device table on mount time make
  sure every thing is supported.

* Change I/O engine to now support Mirror IO, .i.e write same data
  to multiple devices, read from a random device to spread the
  read-load from multiple clients (TODO: stripe read)

Implementation notes:
 A few points introduced in previous patch should be mentioned here:

* Special care was made so absolutlly all operation that have any chance
  of failing are done before any osd-request is executed. This is to
  minimize the need for a data consistency recovery, to only real IO
  errors.

* Each IO state has a kref. It starts at 1, any osd-request executed
  will increment the kref, finally when all are executed the first ref
  is dropped. At IO-done, each request completion decrements the kref,
  the last one to return executes the internal _last_io() routine.
  _last_io() will call the registered io_state_done. On sync mode a
  caller does not supply a done method, indicating a synchronous
  request, the caller is put to sleep and a special io_state_done is
  registered that will awaken the caller. Though also in sync mode all
  operations are executed in parallel.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agoexofs: Move all operations to an io_engine
Boaz Harrosh [Sun, 8 Nov 2009 12:54:08 +0000 (14:54 +0200)]
exofs: Move all operations to an io_engine

In anticipation for multi-device operations, we separate osd operations
into an abstract I/O API. Currently only one device is used but later
when adding more devices, we will drive all devices in parallel according
to a "data_map" that describes how data is arranged on multiple devices.
The file system level operates, like before, as if there is one object
(inode-number) and an i_size. The io engine will split this to the same
object-number but on multiple device.

At first we introduce Mirror (raid 1) layout. But at the final outcome
we intend to fully implement the pNFS-Objects data-map, including
raid 0,4,5,6 over mirrored devices, over multiple device-groups. And
more. See: http://tools.ietf.org/html/draft-ietf-nfsv4-pnfs-obj-12

* Define an io_state based API for accessing osd storage devices
  in an abstract way.
  Usage:
First a caller allocates an io state with:
exofs_get_io_state(struct exofs_sb_info *sbi,
   struct exofs_io_state** ios);

Then calles one of:
exofs_sbi_create(struct exofs_io_state *ios);
exofs_sbi_remove(struct exofs_io_state *ios);
exofs_sbi_write(struct exofs_io_state *ios);
exofs_sbi_read(struct exofs_io_state *ios);
exofs_oi_truncate(struct exofs_i_info *oi, u64 new_len);

And when done
exofs_put_io_state(struct exofs_io_state *ios);

* Convert all source files to use this new API
* Convert from bio_alloc to bio_kmalloc
* In io engine we make use of the now fixed osd_req_decode_sense

There are no functional changes or on disk additions after this patch.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agoexofs: move osd.c to ios.c
Boaz Harrosh [Tue, 3 Nov 2009 14:46:00 +0000 (16:46 +0200)]
exofs: move osd.c to ios.c

If I do a "git mv" together with a massive code change
and commit in one patch, git looses the rename and
records a delete/new instead. This is bad because I want
a rename recorded so later rebased/cherry-picked patches
to the old name will work. Also the --follow is lost.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agoexofs: statfs blocks is sectors not FS blocks
Boaz Harrosh [Mon, 2 Nov 2009 16:19:24 +0000 (18:19 +0200)]
exofs: statfs blocks is sectors not FS blocks

Even though exofs has a 4k block size, statfs blocks
is in sectors (512 bytes).

Also if target returns 0 for capacity then make it
ULLONG_MAX. df does not like zero-size filesystems

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agoexofs: Prints on mount and unmout
Boaz Harrosh [Thu, 3 Sep 2009 17:38:02 +0000 (20:38 +0300)]
exofs: Prints on mount and unmout

It is important to print in the logs when a filesystem was
mounted and eventually unmounted.

Print the osd-device's osd_name and pid the FS was
mounted/unmounted on.

TODO: How to also print the namespace path the filesystem was
      mounted on?

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agoexofs: refactor exofs_i_info initialization into common helper
Boaz Harrosh [Tue, 4 Aug 2009 17:40:29 +0000 (20:40 +0300)]
exofs: refactor exofs_i_info initialization into common helper

There are two places that initialize inodes: exofs_iget() and
exofs_new_inode()

As more members of exofs_i_info that need initialization are
added this code will grow. (soon)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agoexofs: dbg-print less
Boaz Harrosh [Sun, 1 Nov 2009 16:28:14 +0000 (18:28 +0200)]
exofs: dbg-print less

Iner-loops printing is converted to EXOFS_DBG2 which is #defined
to nothing.

It is now almost bareable to just leave debug-on. Every operation
is printed once, with most relevant info (I hope).

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agoexofs: More sane debug print
Boaz Harrosh [Tue, 14 Jul 2009 08:06:08 +0000 (11:06 +0300)]
exofs: More sane debug print

debug prints should be somewhat useful without actually
reading the source code

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agotrivial: some small fixes in exofs documentation
Thadeu Lima de Souza Cascardo [Mon, 27 Jul 2009 16:26:32 +0000 (13:26 -0300)]
trivial: some small fixes in exofs documentation

Add exofs.txt to filesystems Documentation index and fix some typos,
identation and grammar.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
14 years agoMerge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Thu, 10 Dec 2009 03:57:06 +0000 (19:57 -0800)]
Merge branch 'acpica' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPICA: Update version to 20091112.
  ACPICA: Add additional module-level code support
  ACPICA: Deploy new create integer interface where appropriate
  ACPICA: New internal utility function to create Integer objects
  ACPICA: Add repair for predefined methods that must return sorted lists
  ACPICA: Fix possible fault if return Package objects contain NULL elements
  ACPICA: Add post-order callback to acpi_walk_namespace
  ACPICA: Change package length error message to an info message
  ACPICA: Reduce severity of predefined repair messages, Warning to Info
  ACPICA: Update version to 20091013
  ACPICA: Fix possible memory leak for Scope ASL operator
  ACPICA: Remove possibility of executing _REG methods twice
  ACPICA: Add repair for bad _MAT buffers
  ACPICA: Add repair for bad _BIF/_BIX packages

14 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Thu, 10 Dec 2009 03:53:11 +0000 (19:53 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (41 commits)
  hwmon: (adt7475) Add VID support for the ADT7476
  hwmon: (adt7475) Add an entry in MAINTAINERS
  hwmon: (adt7475) Add support for the ADT7476
  hwmon: (adt7475) Voltage attenuators can be bypassed
  hwmon: (adt7475) Print device information on probe
  hwmon: (adt7475) Handle alternative pin functions
  hwmon: (adt7475) Move sysfs files removal to a separate function
  hwmon: (adt7475) Add support for the ADT7490
  hwmon: (adt7475) Improve device detection
  hwmon: (adt7475) Add missing static marker
  hwmon: (adt7475) Rework voltage inputs handling
  hwmon: (adt7475) Implement pwm_use_point2_pwm_at_crit
  hwmon: (adt7475) New documentation
  hwmon: (adt7475) Add support for the ADT7473
  hwmon: (f71882fg) Add support for the f71889fg (version 2)
  hwmon: (f71882fg) Fix sysfs file removal
  hwmon: (f71882fg) Cleanup sysfs attr creation 2/2
  hwmon: (f71882fg) Cleanup sysfs attr creation 1/2
  hwmon: (thmc50) Stop using I2C_CLIENT_MODULE_PARM
  hwmon: Add Freescale MC13783 ADC driver
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Thu, 10 Dec 2009 03:52:13 +0000 (19:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ice1724 - aureon - modify WM8770 Master & DAC volume
  ALSA: hda/realtek: quirk for D945GCLF2 mainboard
  ALSA: hda - Terradici HDA controllers does not support 64-bit mode
  ALSA: document: Add direct git link to grub hda-analyzer
  ALSA: radio/sound/miro: fix build, cleanup depends/selects
  ALSA: hda - Generalize EAPD inversion check in patch_analog.c
  ASoC: Wrong variable returned on error
  ALSA: snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
  ALSA: hda - Exclude unusable ADCs for ALC88x
  ALSA: hda - Add missing Line-Out and PCM switches as slave
  ALSA: hda - iMac 9,1 sound patch.
  ALSA: opti93x: set MC indirect registers base from PnP data

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Thu, 10 Dec 2009 03:52:01 +0000 (19:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (51 commits)
  Input: appletouch - give up maintainership
  Input: dm355evm_kbd - switch to using sparse keymap library
  Input: wistron_btns - switch to using sparse keymap library
  Input: add generic support for sparse keymaps
  Input: fix memory leak in force feedback core
  Input: wistron - remove identification strings from DMI table
  Input: psmouse - remove identification strings from DMI tables
  Input: atkbd - remove identification strings from DMI table
  Input: i8042 - remove identification strings from DMI tables
  DMI: allow omitting ident strings in DMI tables
  Input: psmouse - do not carry DMI data around
  Input: matrix-keypad - switch to using dev_pm_ops
  Input: keyboard - fix lack of locking when traversing handler->h_list
  Input: gpio_keys - scan gpio state at probe and resume time
  Input: keyboard - add locking around event handling
  Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
  Input: xpad - add two new Xbox 360 devices
  Input: polled device - do not start polling if interval is zero
  Input: polled device - schedule first poll immediately
  Input: add S3C24XX touchscreen driver
  ...

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Thu, 10 Dec 2009 03:50:49 +0000 (19:50 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (345 commits)
  V4L/DVB (13542): ir-keytable: Allow dynamic table change
  V4L/DVB (13541): atbm8830: replace 64-bit division and floating point usage
  V4L/DVB (13540): ir-common: Cleanup get key evdev code
  V4L/DVB (13539): ir-common: add __func__ for debug messages
  V4L/DVB (13538): ir-common: Use a dynamic keycode table
  V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation
  V4L/DVB (13536): em28xx: Use the full RC5 code on HVR-950 Remote Controller
  V4L/DVB (13535): ir-common: Add a hauppauge new table with the complete RC5 code
  V4L/DVB (13534): ir-common: Remove some unused fields/structs
  V4L/DVB (13533): ir: use dynamic tables, instead of static ones
  V4L/DVB (13532): ir-common: Add infrastructure to use a dynamic keycode table
  V4L/DVB (13531): ir-common: rename the debug routine to allow exporting it
  V4L/DVB (13458): go7007: subdev conversion
  V4L/DVB (13457): s2250: subdev conversion
  V4L/DVB (13456): s2250: Change module structure
  V4L/DVB (13528): em28xx: add support for em2800 VC211A card
  em28xx: don't reduce scale to half size for em2800
  em28xx: don't load audio modules when AC97 is mis-detected
  em28xx: em2800 chips support max width of 640
  V4L/DVB (13523): dvb-bt8xx: fix compile warning
  ...

Fix up trivial conflicts due to spelling fixes from the trivial tree in
Documentation/video4linux/gspca.txt
drivers/media/video/cx18/cx18-mailbox.h

14 years agoMerge branch 'next-i2c' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Thu, 10 Dec 2009 03:46:12 +0000 (19:46 -0800)]
Merge branch 'next-i2c' of git://git.fluff.org/bjdooks/linux

* 'next-i2c' of git://git.fluff.org/bjdooks/linux: (25 commits)
  i2c-pnx: Map I2C adapter number to platform ID number
  i2c-omap: OMAP3: PM: (re)init for every transfer to support off-mode
  i2c-designware: i2c_dw_handle_tx_abort: Use dev_dbg() for NOACK cases
  i2c-designware: Cosmetic cleanups
  i2c-designware: Tx abort cleanups
  i2c-designware: Skip RX_FULL and TX_EMPTY bits on tx abort errors
  i2c-designware: i2c_dw_xfer_msg: Fix error handling procedures
  i2c-designware: Disable TX_EMPTY when all i2c_msg msgs has been processed
  i2c-designware: Process all i2c_msg messages in the interrupt handler
  i2c-designware: i2c_dw_read: Remove redundant target address checker
  i2c-designware: i2c_dw_func: Set I2C_FUNC_SMBUS_foo bits
  i2c-designware: Initialize byte count variables just prior to being used
  i2c-designware: i2c_dw_xfer_msg: Introduce a local "buf" pointer
  i2c-designware: Divide i2c_dw_xfer_msg into two functions
  i2c-designware: Enable RX_FULL interrupt
  i2c-designware: Set Tx/Rx FIFO threshold levels
  i2c-designware: Process i2c_msg messages in the interrupt handler
  i2c-designware: i2c_dw_xfer_msg: Fix i2c_msg search bug
  i2c-designware: Improved _HCNT/_LCNT calculation
  i2c-designware: Remove an useless local variable "num"
  ...

14 years agoMerge branch 's3c24xx-updates' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Thu, 10 Dec 2009 03:45:58 +0000 (19:45 -0800)]
Merge branch 's3c24xx-updates' of git://git.fluff.org/bjdooks/linux

* 's3c24xx-updates' of git://git.fluff.org/bjdooks/linux:
  ARM: S3C24XX: DMA: Use valid index when accessing array
  ARM: S3C: move s3c_pwm_remove to .devexit.text
  ARM: S3C24XX: Export s3c24xx_set_fiq for modules.
  ARM: S3C: move s3c_adc_remove to .devexit.text