]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoMcBSP preamble patch for 34xx support v2.6.26-omap1
chandra shekhar [Fri, 8 Aug 2008 07:20:18 +0000 (12:50 +0530)]
McBSP preamble patch for 34xx support

this patch modifies the read write function to do
16/32 bit read write depending on CPU.

Signed-off-by: Chandra Shekhar< x0044955@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMcBSP preamble patch for 34xx support
chandra shekhar [Fri, 8 Aug 2008 06:05:14 +0000 (11:35 +0530)]
McBSP preamble patch for 34xx support

This Patch adds base address for all the instances on OMAP34xx and defines some
relevant register.
It also populates McBSP structure for all the instances for 34xx.

Signed-off-by: Chandra Shekhar< x0044955@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 GPTIMER: fix GPTIMER12 IRQ
Paul Walmsley [Fri, 8 Aug 2008 08:57:08 +0000 (02:57 -0600)]
OMAP3 GPTIMER: fix GPTIMER12 IRQ

GPTIMER12 IRQ is at IRQ 95 on OMAP3, unlike OMAP2.  (ref: OMAP34xx
Multimedia High Security (HS) Device Silicon Revision 3.0 Security
Addendum Rev. B, SWPU119B)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Update OneNAND support
Adrian Hunter [Wed, 6 Aug 2008 06:57:37 +0000 (09:57 +0300)]
ARM: OMAP: Update OneNAND support

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Add fields to GPMC for OMAP3
Adrian Hunter [Wed, 6 Aug 2008 06:56:51 +0000 (09:56 +0300)]
ARM: OMAP: Add fields to GPMC for OMAP3

Add fields wr_access and wr_data_mux_bus.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: OneNAND for OMAP3
Adrian Hunter [Wed, 6 Aug 2008 06:55:37 +0000 (09:55 +0300)]
ARM: OMAP: OneNAND for OMAP3

Update OneNAND support for OMAP3.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoFixes required for HSMMC driver to work as module
Madhusudhan Chikkature [Fri, 8 Aug 2008 04:13:42 +0000 (09:43 +0530)]
Fixes required for HSMMC driver to work as module

ARM: OMAP3: Fixes required to make HSMMC driver work as module.Complete the
previously applied patch.

This patch provides the necessary fixes to make the HSMMC driver work as
loadble module.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Romit Dasgupta <romit@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMA2EVM: update defconfig
Arun KS [Wed, 6 Aug 2008 11:24:58 +0000 (16:54 +0530)]
OMA2EVM: update defconfig

Update omap2evm defconfig

- Enable hsmmc support.

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2EVM: Adding hsmmc support
Arun KS [Wed, 6 Aug 2008 11:19:08 +0000 (16:49 +0530)]
OMAP2EVM: Adding hsmmc support

This patch enables high speed MMC support for OMAP2EVM board

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoPatch for I2C transmit overflow error
chandra shekhar [Thu, 7 Aug 2008 14:10:51 +0000 (19:40 +0530)]
Patch for I2C transmit overflow error

This patch is to fix I2C transmit overflow error.

Signed-off-by: Chandra Shekhar <x0044955@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoFix compile for twl4030 and 3430 lcd
Tony Lindgren [Wed, 6 Aug 2008 09:47:49 +0000 (12:47 +0300)]
Fix compile for twl4030 and 3430 lcd

Looks like recent patches broke compile.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP3: Update BeagleBoard defconfig
Dirk Behme [Tue, 5 Aug 2008 18:41:04 +0000 (20:41 +0200)]
ARM: OMAP3: Update BeagleBoard defconfig

Update BeagleBoard defconfig:

- Use MPU timer instead of 32k timer to work around serial hang issue
- Disable CONFIG_DEBUG_LL

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Acked-by: Syed Mohammed Khasim <khasim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoAdd early init for voltage controller configuration and off mode polarity.
ext Peter 'p2' De Schrijver [Wed, 6 Aug 2008 08:41:08 +0000 (11:41 +0300)]
Add early init for voltage controller configuration and off mode polarity.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMove voltage controller configuration to pm34xx.c
ext Peter 'p2' De Schrijver [Wed, 6 Aug 2008 08:41:07 +0000 (11:41 +0300)]
Move voltage controller configuration to pm34xx.c

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: mark init-only functions as __init
Paul Walmsley [Wed, 6 Aug 2008 06:43:51 +0000 (00:43 -0600)]
TWL4030: mark init-only functions as __init

Mark many functions in twl4030-core.c as __init.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2EVM: add LCD panel support
arun c [Wed, 6 Aug 2008 05:15:20 +0000 (10:45 +0530)]
OMAP2EVM: add LCD panel support

omap2evm LCD supports VGA and QVGA resolution, by default its in VGA mode.

Signed-off-by: Arun C <arunedarath@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoGet rid of old usb_init prototypes for OMAP3430
Felipe Balbi [Tue, 5 Aug 2008 14:05:51 +0000 (17:05 +0300)]
Get rid of old usb_init prototypes for OMAP3430

arch: omap: get rid of usb_init() protytpes

we now use usb_musb_init() and usb_ehci_init() functions

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoHSMMC fix for hotplug scenario with I/O in progress
Madhusudhan Chikkature [Fri, 25 Jul 2008 10:33:21 +0000 (16:03 +0530)]
HSMMC fix for hotplug scenario with I/O in progress

ARM: OMAP3: HSMMC fix for hotplug scenario.

This patch fixes the inconsistancy noted if the card is removed from the slot
duing an active I/O.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Romit Dasgupta <romit@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoHSMMC driver fix for core ret
Madhusudhan Chikkature [Fri, 25 Jul 2008 10:32:19 +0000 (16:02 +0530)]
HSMMC driver fix for core ret

ARM: OMAP3: HSMMC fix for core ret.

The core ret seem to be prevented by HSMMC CTO errors. This patch provides a
fix for the same.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoDynamic allocation for mcbsp devices. and related changes
chandra shekhar [Wed, 25 Jun 2008 14:58:35 +0000 (20:28 +0530)]
Dynamic allocation for mcbsp devices. and related changes

This patch provides dynamic allocation for mcbsp device.
no. of  mcbsp for each cpu is determined at runtime and accordingly memory is
allocated. id check macro definition has been changed.

Signed-off-by: chandra shekhar x0044955@ti.com
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTriton BCI driver for OMAP3430 - USB changes
Madhusudhan Chikkature [Tue, 22 Jul 2008 11:57:04 +0000 (17:27 +0530)]
Triton BCI driver for OMAP3430 - USB changes

This patch calls the functionality supported by the TWL4030 battery charger
interface driver
to enable/disable battery charging upon cable attach/detach.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTriton BCI driver for OMAP3430
Madhusudhan Chikkature [Tue, 22 Jul 2008 11:56:31 +0000 (17:26 +0530)]
Triton BCI driver for OMAP3430

ARM: OMAP: Triton Battery Charger Interface

This patch provides a OMAP Triton battery charger interface driver to moniter
the battery
through power class subsystem.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTriton BCI driver board/device setup for OMAP3430
Madhusudhan Chikkature [Tue, 22 Jul 2008 11:55:33 +0000 (17:25 +0530)]
Triton BCI driver board/device setup for OMAP3430

Device setup/board level initialization for the Triton battery charger
interface driver for the OMAP3430 SDP.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoFree HDQ clocks in error path
Madhusudhan Chikkature [Tue, 22 Jul 2008 12:03:58 +0000 (17:33 +0530)]
Free HDQ clocks in error path

ARM: OMAP3: Free HDQ clocks when a read is tried with no battery connected

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clock: combine clkdm, clkdm_name into union in struct clk
Paul Walmsley [Fri, 18 Jul 2008 08:22:54 +0000 (02:22 -0600)]
OMAP2/3 clock: combine clkdm, clkdm_name into union in struct clk

struct clk contains a struct clockdomain *clkdm and const char
*clkdm_name.  The clkdm_name is only used at initialization to look up
the appropriate clkdm pointer.  Combining these into a union saves
about 850 bytes on 3430SDP.  This patch should not cause any change in
kernel function.

Boot-tested on 3430SDP ES2; compile-tested with n800_defconfig.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
size:
   text    data     bss     dec     hex filename
3391555  157032  107136 3655723  37c82b vmlinux.3430sdp.orig
3391555  156176  107136 3654867  37c4d3 vmlinux.3430sdp
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clockdomains: combine pwrdm, pwrdm_name into union in struct clockdomain
Paul Walmsley [Fri, 18 Jul 2008 08:22:07 +0000 (02:22 -0600)]
OMAP2/3 clockdomains: combine pwrdm, pwrdm_name into union in struct clockdomain

struct clockdomain contains a struct powerdomain *pwrdm and const char
*pwrdm_name.  The pwrdm_name is only used at initialization to look up
the appropriate pwrdm pointer.  Combining these into a union saves
about 100 bytes on 3430SDP.  This patch should not cause any change in
kernel function.

Boot-tested on 3430SDP ES2.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
size:
   text    data     bss     dec     hex filename
3391587  157104  107136 3655827  37c893 vmlinux.3430sdp.orig
3391555  157032  107136 3655723  37c82b vmlinux.3430sdp
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP2: RTC board specific code: rebased
Girish. S. G [Fri, 27 Jun 2008 10:30:06 +0000 (16:00 +0530)]
ARM: OMAP2: RTC board specific code: rebased

This patch adds rtc-twl4030 driver specific code.

Signed-off-by: Girish S G <girishsg@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: add omap3_core_dpll_m2_set_rate()
Paul Walmsley [Tue, 8 Jul 2008 02:55:13 +0000 (20:55 -0600)]
OMAP3 clock: add omap3_core_dpll_m2_set_rate()

Add the omap3_core_dpll_m2_set_rate() function to the OMAP3 clock code,
which calls into the SRAM function omap3_sram_configure_core_dpll() to
change the CORE DPLL M2 divider.  (SRAM code is necessary since rate changes
on clocks upstream from the SDRC can glitch SDRAM accesses.)

Use this function for the set_rate function pointer in the dpll3_m2_ck
struct clk.  With this function in place, PM/OPP code should be able to
alter SDRAM speed via code similar to:

      clk_set_rate(&dpll3_m2_ck, target_rate).

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock/SRAM: fix CORE DPLL M2 divider mask
Paul Walmsley [Tue, 8 Jul 2008 02:55:11 +0000 (20:55 -0600)]
OMAP3 clock/SRAM: fix CORE DPLL M2 divider mask

3430ES2+ CORE DPLL M2 divider can divide by 1 to 31, unlike ES1, which
was more limited.  The SRAM code currently only supports dividing by 1
or 2, but we should mask off the full range of bits to guard against
the event that the previous contents of CM_CLKSEL_PLL1 included an M2
divider > 2.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 SRAM: remove unused functions; rename remainder
Paul Walmsley [Tue, 8 Jul 2008 02:55:10 +0000 (20:55 -0600)]
OMAP3 SRAM: remove unused functions; rename remainder

The only SRAM function currently used on OMAP3 is the CORE DPLL M2 divider
reprogramming function; remove the rest of the stubs.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2 SDRC: add timing data for Qimonda HYB18M512160AF-6
Paul Walmsley [Tue, 8 Jul 2008 02:55:08 +0000 (20:55 -0600)]
OMAP2 SDRC: add timing data for Qimonda HYB18M512160AF-6

Add timing data for the Qimonda HYB18M512160AF-6 SDRAM chip, used on
the OMAP3430SDP boards.

Thanks to Rajendra Nayak <rnayak@ti.com> for his help identifying
the chip used on 3430SDP.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2 SDRC: add timing data for Micron MT46H32M32LF-6
Paul Walmsley [Tue, 8 Jul 2008 02:54:59 +0000 (20:54 -0600)]
OMAP2 SDRC: add timing data for Micron MT46H32M32LF-6

Add timing data for the Micron MT46H32M32LF-6 SDRAM chip, used on the
OMAP3 Beagle and EVM boards.  Original timing data is from the Micron
datasheet PDF downloaded from:

http://download.micron.com/pdf/datasheets/dram/mobile/1gb_ddr_mobile_sdram_t48m.pdf

Thanks to Rajendra Nayak <rnayak@ti.com> for his help identifying
the chips used on Beagle & OMAP3EVM.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2 SDRC: add SDRAM timing parameter infrastructure
Paul Walmsley [Tue, 8 Jul 2008 02:54:47 +0000 (20:54 -0600)]
OMAP2 SDRC: add SDRAM timing parameter infrastructure

For a given SDRAM clock rate, SDRAM chips require memory controllers
to use a specific set of timing minimums and maximums to transfer data
reliably.  These parameters can be different for different memory chips
and can also potentially vary by board.

This patch adds the infrastructure for board-*.c files to pass this
timing data to the SDRAM controller init function.  The timing data is
specified in an 'omap_sdrc_params' structure, in terms of SDRC
controller register values.  An array of these structs, one per SDRC
target clock rate, is passed by the board-*.c file to
omap2_init_common_hw().

This patch does not define the values for different memory chips, nor
does it use the values for anything; those will come in subsequent patches.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2 SDRC: separate common OMAP2/3 code from OMAP2xxx code
Paul Walmsley [Tue, 8 Jul 2008 02:54:45 +0000 (20:54 -0600)]
OMAP2 SDRC: separate common OMAP2/3 code from OMAP2xxx code

Separate SDRC code common to OMAP2/3 from mach-omap2/sdrc2xxx.c to
mach-omap2/sdrc.c.  Rename the OMAP2xxx-specific functions to use an
'omap2xxx' prefix rather than an 'omap2' prefix, and use "sdrc" in the
function names rather than "memory."  Mark several functions
as static that should not be used outside the sdrc2xxx.c file.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2 SDRC: rename memory.c to sdrc2xxx.c
Paul Walmsley [Tue, 8 Jul 2008 02:54:43 +0000 (20:54 -0600)]
OMAP2 SDRC: rename memory.c to sdrc2xxx.c

Rename arch/arm/mach-omap2/memory.c to arch/arm/mach-omap2/sdrc2xxx.c, since
it contains exclusively SDRAM-related functions.  Most of the functions
are also OMAP2xxx-specific - those which are common will be separated out
in a following patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2 SDRC: move mach-omap2/memory.h into include/asm-arm/arch-omap/sdrc.h
Paul Walmsley [Tue, 8 Jul 2008 02:54:41 +0000 (20:54 -0600)]
OMAP2 SDRC: move mach-omap2/memory.h into include/asm-arm/arch-omap/sdrc.h

Move the contents of the arch/arm/mach-omap2/memory.h file to the
existing include/asm-arm/arch-omap/sdrc.h file, and remove memory.h.
Modify files which include memory.h to include asm/arch/sdrc.h instead.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoSmartReflex: fix sparse issues
Paul Walmsley [Fri, 18 Jul 2008 02:52:41 +0000 (20:52 -0600)]
SmartReflex: fix sparse issues

Fix sparse issues with smartreflex.c.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agomach-omap2: fix sparse warnings, some style issues for OMAP2 builds
Paul Walmsley [Fri, 18 Jul 2008 02:52:39 +0000 (20:52 -0600)]
mach-omap2: fix sparse warnings, some style issues for OMAP2 builds

This cleans up remaining sparse warnings for OMAP2 builds and fixes a
few CodingStyle issues.  This involves:

- removing casts where they don't belong,

- adding casts where they should be,

- marking internal functions as static,

- fixing some indentation in board-2430sdp-flash.c.

Patch should cause no change in kernel behavior.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agomach-omap2: mark casts between integers and pointers with __force
Paul Walmsley [Fri, 18 Jul 2008 02:52:37 +0000 (20:52 -0600)]
mach-omap2: mark casts between integers and pointers with __force

Mark casts between integers and pointers with __force to keep sparse
from complaining.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoAdd prototypes for public functions or declare private functions static:
Paul Walmsley [Fri, 18 Jul 2008 02:52:35 +0000 (20:52 -0600)]
Add prototypes for public functions or declare private functions static:

Fix the following sparse warnings:

arch/arm/mach-omap2/pm.c:58:6: warning: symbol 'omap2_block_sleep' was not declared. Should it be static?
arch/arm/mach-omap2/pm.c:63:6: warning: symbol 'omap2_allow_sleep' was not declared. Should it be static?
arch/arm/mach-omap2/pm.c:71:12: warning: symbol 'omap_pm_init' was not declared. Should it be static?

arch/arm/mach-omap2/pm34xx.c:49:6: warning: symbol '_omap_sram_idle' was not declared. Should it be static?

arch/arm/mach-omap2/prcm.c:96:5: warning: symbol 'cm_read_mod_reg' was not declared. Should it be static?
arch/arm/mach-omap2/prcm.c:103:6: warning: symbol 'cm_write_mod_reg' was not declared. Should it be static?
arch/arm/mach-omap2/prcm.c:110:5: warning: symbol 'cm_rmw_mod_reg_bits' was not declared. Should it be static?

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP3: Make I2C bus 2 configurable for BeagleBoard
Dirk Behme [Tue, 5 Aug 2008 11:09:15 +0000 (14:09 +0300)]
ARM: OMAP3: Make I2C bus 2 configurable for BeagleBoard

I2C2 at BeagleBoard is connected to expansion connector, i.e. unused if
nothing is connected to this connector. As internal OMAP3 pull up resistors
are not strong enough, enabled but unused I2C2 bus results in error messages
(e.g. I2C timeouts). I2C2 should be enabled only if something is connected to
I2C2 at board's expansion connector and this extension has additional pull up
resistors for I2C2 bus.

- Add configuration option for this
- Use configuration option in board-omap3beagle
- While being there, add OMAP3 to OMAP I2C help text

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoRid of product specific SDTI pin multiplexing.
Roman Tereshonkov [Tue, 5 Aug 2008 08:43:59 +0000 (11:43 +0300)]
Rid of product specific SDTI pin multiplexing.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoRemove double MODULE_ALIAS declaration.
Roman Tereshonkov [Thu, 26 Jun 2008 14:17:58 +0000 (17:17 +0300)]
Remove double MODULE_ALIAS declaration.

Only once MODULE_ALIAS declaration is enough.
Columns are counted from 0 to n_cols - 1.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 Beagle: Enable nand and jffs2 support in defconfig
steve@sakoman.com [Mon, 4 Aug 2008 15:58:38 +0000 (17:58 +0200)]
OMAP3 Beagle: Enable nand and jffs2 support in defconfig

Enable nand and jffs2 in defconfig

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Acked-by: Koen Kooi <koen at openembedded dot org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 Beagle: add nand support
steve@sakoman.com [Mon, 4 Aug 2008 15:58:22 +0000 (17:58 +0200)]
OMAP3 Beagle: add nand support

Add nand support to omap3beagle

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Acked-by: Koen Kooi <koen at openembedded dot org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agomtd omap2 nand driver: extend to work with omap3 boards
teerth@ti.com [Mon, 4 Aug 2008 15:58:07 +0000 (17:58 +0200)]
mtd omap2 nand driver: extend to work with omap3 boards

Dirk Behme <dirk.behme@gmail.com>

Extend omap2 mtd nand driver to work with ARCH_OMAP3 boards

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Acked-by: Koen Kooi <koen at openembedded dot org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP: MENELAUS: Code clean-up for menelaus
Carlos Eduardo Aguiar [Tue, 29 Jul 2008 16:44:35 +0000 (12:44 -0400)]
OMAP: MENELAUS: Code clean-up for menelaus

This patch removes a few errors and warnings reported by checkpatch.pl.

Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP: MENELAUS: Move menelaus register map to include/linux/i2c/menelaus.h
Carlos Eduardo Aguiar [Tue, 29 Jul 2008 16:44:31 +0000 (12:44 -0400)]
OMAP: MENELAUS: Move menelaus register map to include/linux/i2c/menelaus.h

This patch moves menelaus register map to include/linux/i2c/menelaus.h

Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP: MENELAUS: Move menelaus header to include/linux/i2c
Carlos Eduardo Aguiar [Tue, 29 Jul 2008 16:44:27 +0000 (12:44 -0400)]
OMAP: MENELAUS: Move menelaus header to include/linux/i2c

This patch moves menelaus header from include/asm-arm/arch-omap/
to include/linux/i2c/

It also includes menelaus' headers to include/linux/i2c

Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP: MENELAUS: Using macros instead of some constant magic numbers.
Carlos Eduardo Aguiar [Tue, 29 Jul 2008 16:44:23 +0000 (12:44 -0400)]
OMAP: MENELAUS: Using macros instead of some constant magic numbers.

This patch makes drivers/i2c/chips/menelaus.c file to use macros
instead of some constant magic numbers.

Signed-off-by: Carlos Eduardo Aguiar <carlos.aguiar@indt.org.br>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: convert old-style function documentation to current kerneldoc
Paul Walmsley [Mon, 4 Aug 2008 20:56:48 +0000 (14:56 -0600)]
TWL4030: convert old-style function documentation to current kerneldoc

Several functions use old-style function documentation; convert those to
use the current kerneldoc style.

Thanks to Felipe Balbi <felipe.balbi@nokia.com> for catching an error.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agobeagle LED fixes
David Brownell [Tue, 5 Aug 2008 06:56:15 +0000 (23:56 -0700)]
beagle LED fixes

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Koen Kooi <koen@openembedded.org>
Update and fix Beagle LED declarations:  gpios for USR0 and USR1
were swapped, and their names don't match docs or silksreen.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoSeparate i2c_board_info for n800 and n810
Riku Voipio [Tue, 22 Jul 2008 09:29:31 +0000 (12:29 +0300)]
Separate i2c_board_info for n800 and n810

n800 and n810 have different peripherals on the second i2c bus
(tea5761 on n800 and lm8323 on n810). Split the i2c_board_info to
common and hw specific to avoid probing nonexistent devices.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl4030-madc: Fix arbitrarily initialized function pointer
Viktor Rosendahl [Wed, 2 Jul 2008 13:36:36 +0000 (16:36 +0300)]
twl4030-madc: Fix arbitrarily initialized function pointer

req is an automatic variable and thus we cannot rely on it being initialized to
zero (I am leaving the 0!= NULL discussion aside). Other functions test
if this pointer is NULL, in order to determine whether it is a valid address or
not.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMTD: OMAP2-NAND: Fix partition reading from board info
Nishant Kamat [Thu, 3 Jul 2008 09:18:39 +0000 (04:18 -0500)]
MTD: OMAP2-NAND: Fix partition reading from board info

This patch fixes the omap2 nand driver code that allows
reading of partition data from board info.

The parse_mtd_partitions() function no longer returns a
negative error in case cmdline is not passed.
See commit: b0d06afb607

Signed-off-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: convert early interrupt mask/clear funcs to use array
Paul Walmsley [Tue, 22 Jul 2008 23:51:46 +0000 (17:51 -0600)]
TWL4030: convert early interrupt mask/clear funcs to use array

Mask/clear TWL module IMRs/ISRs by iterating through arrays rather than
using a block of cut-and-pasted commands.  Removes 1056 bytes of bloat.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: use symbolic ISR/IMR register names during twl_init_irq()
Paul Walmsley [Tue, 22 Jul 2008 23:51:45 +0000 (17:51 -0600)]
TWL4030: use symbolic ISR/IMR register names during twl_init_irq()

twl_init_irq() uses a bunch of magic numbers as register indices; this
has already led to several errors, fixed earlier in this patch series.
Now use descriptive macros instead of magic numbers.  This patch should
not change kernel behavior.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: move TWL module register defs into separate include files
Paul Walmsley [Tue, 22 Jul 2008 23:51:44 +0000 (17:51 -0600)]
TWL4030: move TWL module register defs into separate include files

twl_init_irq() uses "magic numbers" to access TWL module IMR and ISR
registers.  Symbolic constants are definitely preferred.

Rather than duplicating already existing symbolic constants in
twl4030-gpio.c and twl4030-pwrirq.c, move the existing constants out
into include files.  This patch should not change kernel behavior.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: change init-time IMR mask code to WARN if error
Paul Walmsley [Tue, 22 Jul 2008 23:51:42 +0000 (17:51 -0600)]
TWL4030: change init-time IMR mask code to WARN if error

twl_init_irq() prints error messages and returns if any interrupt mask
register writes fail.  Change this to generate a warning traceback and
to continue execution rather than skipping TWL init.  (These mask
writes should not fail at all unless either the I2C bus or the TWL4030
is somehow wedged.)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: use *_SIH_CTRL.COR bit to determine whether to read or write ISR to clear
Paul Walmsley [Tue, 22 Jul 2008 23:51:41 +0000 (17:51 -0600)]
TWL4030: use *_SIH_CTRL.COR bit to determine whether to read or write ISR to clear

TWL4030 interrupt status register bits can be cleared in one of two ways:
either by reading from the register, or by writing a 1 to the
appropriate bit(s) in the register.  This behavior can be altered at any
time by the <twlmodule>_SIH_CTRL.COR register bit ("clear-on-read").

The TWL4030 TRM is deeply confused as to whether COR=1 means that the
registers are cleared on reads, or cleared on writes.  Peter De
Schrijver <peter.de-schrijver> confirms that COR=1 means that the registers
are cleared on read.

So, for each TWL4030 SIH, check the value of the *_SIH_CTRL.COR bit, and if
it is 1, use reads to clear the ISRs; if it is 0, use writes.

Also, use WARN_ON() to warn if the read/write failed, and don't skip
the rest of the initialization on failure either.

Thanks to Peter for his help with this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: clear MADC interrupt status registers upon init
Paul Walmsley [Tue, 22 Jul 2008 23:51:30 +0000 (17:51 -0600)]
TWL4030: clear MADC interrupt status registers upon init

twl_init_irq() does not clear MADC interrupt status registers upon init -
fix.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: use correct register addresses for BCI IMR registers
Paul Walmsley [Tue, 22 Jul 2008 23:51:29 +0000 (17:51 -0600)]
TWL4030: use correct register addresses for BCI IMR registers

The existing code to mask and clear BCI interrupts in twl_init_irq() is
wrong.  It uses the wrong register offsets, it does not mask all of the
BCI IMR registers, and it does not clear all of the BCI ISR registers.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: clear TWL GPIO interrupt status registers
Paul Walmsley [Tue, 22 Jul 2008 23:51:27 +0000 (17:51 -0600)]
TWL4030: clear TWL GPIO interrupt status registers

twl_init_irq() does not clear the TWL GPIO ISR registers, but the PIH
ISR thinks that it has.  This causes any previously-latched GPIO interrupts
to be stuck on until twl4030-gpio.c initializes, often drowning the console in

    TWL4030 module irq 368 is disabled but can't be masked!

messages.  This seems to be a particular problem when booting on Beagle.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoTWL4030: remove superfluous PWR interrupt status clear before masking
Paul Walmsley [Tue, 22 Jul 2008 23:51:25 +0000 (17:51 -0600)]
TWL4030: remove superfluous PWR interrupt status clear before masking

twl_irq_init() clears PWR interrupt status bits, then masks the interrupts
off, then clears the PWR interrupt status bits again.  The first clear
seems unnecessary, so, remove it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoi2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds
Paul Walmsley [Fri, 18 Jul 2008 01:44:14 +0000 (19:44 -0600)]
i2c-omap: don't compile in OMAP15xx I2C ISR for non-OMAP15xx builds

Skip compiling OMAP15xx I2C ISR for non-OMAP15xx builds.  Saves 400 bytes
of text for most OMAP builds.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoi2c-omap: mark init-only functions as __init
Paul Walmsley [Fri, 18 Jul 2008 01:44:13 +0000 (19:44 -0600)]
i2c-omap: mark init-only functions as __init

Mark functions called only at init time as __init.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoi2c-omap: close suspected race between omap_i2c_idle() and omap_i2c_isr()
Paul Walmsley [Tue, 15 Jul 2008 19:00:18 +0000 (13:00 -0600)]
i2c-omap: close suspected race between omap_i2c_idle() and omap_i2c_isr()

omap_i2c_idle() sets an internal flag, "dev->idle", instructing its
ISR to decline interrupts.  It sets this flag before it actually masks
the interrupts on the I2C controller.  This is problematic, since an
I2C interrupt could arrive after dev->idle is set, but before the
interrupt source is masked.  When this happens, Linux disables the I2C
controller's IRQ, causing all future transactions on the bus to fail.

Symptoms, happening on about 7% of boots:

   irq 56: nobody cared (try booting with the "irqpoll" option)
   <warning traceback here>
   Disabling IRQ #56
   i2c_omap i2c_omap.1: controller timed out

In omap_i2c_idle(), this patch sets dev->idle only after the interrupt
mask write to the I2C controller has left the ARM write buffer.
That's probably the major offender.  For additional prophylaxis, in
omap_i2c_unidle(), the patch clears the dev->idle flag before
interrupts are enabled, rather than afterwards.

The patch has survived twenty-two reboots on the 3430SDP here without
wedging I2C1.  Not absolutely dispositive, but promising!

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agomusb_hdrc: Fixes before pulling from mainline tree
David Brownell [Mon, 4 Aug 2008 13:15:17 +0000 (16:15 +0300)]
musb_hdrc: Fixes before pulling from mainline tree

Latest musb_hdrc code wouldn't:
  * build ... because there's now a standard WARN() macro
  * build without false printf format warnings ... "%zd" is for ssize_t,
    while "%zu" is for size_t

Signed-off-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: don't wait for USBHOST IDLEST bit on usbhost_120m_fclk enable
Paul Walmsley [Mon, 4 Aug 2008 11:44:32 +0000 (14:44 +0300)]
OMAP3 clock: don't wait for USBHOST IDLEST bit on usbhost_120m_fclk enable

USBHOST on 3430ES2+ has both an initiator and a target CM_IDLEST bit.
Previously, usbhost_48m_fclk enable waited on the wrong bit -- now
fixed.  Also, it appears that USBHOST module readiness (in terms of
CM_IDLEST) only depends on usbhost_48m_fclk and usbhost_iclk.  So
don't wait on usbhost_120m_fck.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: fix 96MHz clocks
Paul Walmsley [Thu, 17 Jul 2008 02:13:04 +0000 (20:13 -0600)]
OMAP3 clock: fix 96MHz clocks

Fix some bugs in the OMAP3 clock tree pertaining to the 96MHz clocks.
The 96MHz portion of the clock tree should now have reasonable
fidelity to the 34xx TRM Rev I.

One remaining question mark: it's not clear exactly which 96MHz source
clock the USIM uses.  This patch sticks with the previous setting, which
seems reasonable.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoPROTECT_KEY register is in the PM_MASTER module not in the PM_RECEIVER module
Peter 'p2' De Schrijver [Wed, 16 Jul 2008 16:53:25 +0000 (19:53 +0300)]
PROTECT_KEY register is in the PM_MASTER module not in the PM_RECEIVER module

This patch fixes a write to the wrong address in the triton2 chip.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Wed, 16 Jul 2008 08:22:07 +0000 (11:22 +0300)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

15 years agoLinux 2.6.26 v2.6.26
Linus Torvalds [Sun, 13 Jul 2008 21:51:29 +0000 (14:51 -0700)]
Linux 2.6.26

15 years agodevcgroup: fix permission check when adding entry to child cgroup
Li Zefan [Sun, 13 Jul 2008 19:14:04 +0000 (12:14 -0700)]
devcgroup: fix permission check when adding entry to child cgroup

 # cat devices.list
 c 1:3 r
 # echo 'c 1:3 w' > sub/devices.allow
 # cat sub/devices.list
 c 1:3 w

As illustrated, the parent group has no write permission to /dev/null, so
it's child should not be allowed to add this write permission.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodevcgroup: always show positive major/minor num
Li Zefan [Sun, 13 Jul 2008 19:14:02 +0000 (12:14 -0700)]
devcgroup: always show positive major/minor num

 # echo "b $((0x7fffffff)):$((0x80000000)) rwm" > devices.allow
 # cat devices.list
 b 214748364:-21474836 rwm

though a major/minor number of 0x800000000 is meaningless, we
should not cast it to a negative value.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDocumentation/HOWTO: correct wrong kernel bugzilla FAQ URL
Jiri Pirko [Sun, 13 Jul 2008 19:13:59 +0000 (12:13 -0700)]
Documentation/HOWTO: correct wrong kernel bugzilla FAQ URL

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 13 Jul 2008 18:03:59 +0000 (11:03 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  cpusets, hotplug, scheduler: fix scheduler domain breakage

15 years agocpusets, hotplug, scheduler: fix scheduler domain breakage
Dmitry Adamushko [Sun, 13 Jul 2008 00:10:29 +0000 (02:10 +0200)]
cpusets, hotplug, scheduler: fix scheduler domain breakage

Commit f18f982ab ("sched: CPU hotplug events must not destroy scheduler
domains created by the cpusets") introduced a hotplug-related problem as
described below:

Upon CPU_DOWN_PREPARE,

  update_sched_domains() -> detach_destroy_domains(&cpu_online_map)

does the following:

/*
 * Force a reinitialization of the sched domains hierarchy. The domains
 * and groups cannot be updated in place without racing with the balancing
 * code, so we temporarily attach all running cpus to the NULL domain
 * which will prevent rebalancing while the sched domains are recalculated.
 */

The sched-domains should be rebuilt when a CPU_DOWN ops. has been
completed, effectively either upon CPU_DEAD{_FROZEN} (upon success) or
CPU_DOWN_FAILED{_FROZEN} (upon failure -- restore the things to their
initial state). That's what update_sched_domains() also does but only
for !CPUSETS case.

With f18f982ab, sched-domains' reinitialization is delegated to
CPUSETS code:

cpuset_handle_cpuhp() -> common_cpu_mem_hotplug_unplug() ->
rebuild_sched_domains()

Being called for CPU_UP_PREPARE and if its callback is called after
update_sched_domains()), it just negates all the work done by
update_sched_domains() -- i.e. a soon-to-be-offline cpu is included in
the sched-domains and that makes it visible for the load-balancer
while the CPU_DOWN ops. is in progress.

__migrate_live_tasks() moves the tasks off a 'dead' cpu (it's already
"offline" when this function is called).

try_to_wake_up() is called for one of these tasks from another CPU ->
the load-balancer (wake_idle()) picks up a "dead" CPU and places the
task on it. Then e.g. BUG_ON(rq->nr_running) detects this a bit later
-> oops.

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Tested-by: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Paul Menage <menage@google.com>
Cc: Max Krasnyansky <maxk@qualcomm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: miaox@cn.fujitsu.com
Cc: rostedt@goodmis.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 12 Jul 2008 21:34:31 +0000 (14:34 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: fix ldt limit for 64 bit

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Sat, 12 Jul 2008 21:34:11 +0000 (14:34 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] bsg: fix oops on remove
  [SCSI] fusion: default MSI to disabled for SPI and FC controllers
  [SCSI] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices
  [SCSI] mptspi: fix oops in mptspi_dv_renegotiate_work()
  [SCSI] erase invalid data returned by device

15 years agocifs: fix wksidarr declaration to be big-endian friendly
Jeff Layton [Sat, 12 Jul 2008 20:48:00 +0000 (13:48 -0700)]
cifs: fix wksidarr declaration to be big-endian friendly

The current definition of wksidarr works fine on little endian arches
(since cpu_to_le32 is a no-op there), but on big-endian arches, it fails
to compile with this error:

error: braced-group within expression allowed only inside a function

The problem is that this static declaration has cpu_to_le32 embedded
within it, and that expands into a function macro.  We need to use
__constant_cpu_to_le32() instead.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Steven French <sfrench@us.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocifs: fix inode leak in cifs_get_inode_info_unix
Jeff Layton [Sat, 12 Jul 2008 20:47:59 +0000 (13:47 -0700)]
cifs: fix inode leak in cifs_get_inode_info_unix

Try this:

    mount a share with unix extensions
    create a file on it
    umount the share

You'll get the following message in the ring buffer:

VFS: Busy inodes after unmount of cifs. Self-destruct in 5 seconds.  Have a
nice day...

...the problem is that cifs_get_inode_info_unix is creating and hashing
a new inode even when it's going to return error anyway. The first
lookup when creating a file returns an error so we end up leaking this
inode before we do the actual create. This appears to be a regression
caused by commit 0e4bbde94fdc33f5b3d793166b21bf768ca3e098.

The following patch seems to fix it for me, and fixes a minor
formatting nit as well.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Steven French <sfrench@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofrv: fix irqs_disabled() to return an int, not an unsigned long
David Howells [Sat, 12 Jul 2008 20:47:58 +0000 (13:47 -0700)]
frv: fix irqs_disabled() to return an int, not an unsigned long

Fix FRV irqs_disabled() to return an int, not an unsigned long to avoid
this warning:

kernel/sched.c: In function '__might_sleep':
kernel/sched.c:8198: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoOProfile kernel maintainership changes
Robert Richter [Sat, 12 Jul 2008 20:47:57 +0000 (13:47 -0700)]
OProfile kernel maintainership changes

Cc: Philippe Elie <phil.el@wanadoo.fr>
Cc: John Levon <levon@movementarian.org>
Cc: Maynard Johnson <maynardj@us.ibm.com>
Cc: Richard Purdie <rpurdie@openedhand.com>
Cc: Daniel Hansel <daniel.hansel@linux.vnet.ibm.com>
Cc: Jason Yeh <jason.yeh@amd.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc-pcf8563: add chip id
Jon Smirl [Sat, 12 Jul 2008 20:47:56 +0000 (13:47 -0700)]
rtc-pcf8563: add chip id

Add the rtc8564 chip entry

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc-fm3130: fix chip naming
Alessandro Zummo [Sat, 12 Jul 2008 20:47:55 +0000 (13:47 -0700)]
rtc-fm3130: fix chip naming

Fix chip naming from fm3031-rtc to fm3031

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoov7670: clean up ov7670_read semantics
Andres Salomon [Sat, 12 Jul 2008 20:47:54 +0000 (13:47 -0700)]
ov7670: clean up ov7670_read semantics

Cortland Setlow pointed out a bug in ov7670.c where the result from
ov7670_read() was just being checked for !0, rather than <0.  This made me
realize that ov7670_read's semantics were rather confusing; it both fills
in 'value' with the result, and returns it.  This is goes against general
kernel convention; so rather than fixing callers, let's fix the function.

This makes ov7670_read return <0 in the case of an error, and 0 upon
success. Thus, code like:

res = ov7670_read(...);
if (!res)
goto error;

..will work properly.

Signed-off-by: Cortland Setlow <csetlow@tower-research.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoserial8250: sanity check nr_uarts on all paths.
Eric W. Biederman [Sat, 12 Jul 2008 20:47:53 +0000 (13:47 -0700)]
serial8250: sanity check nr_uarts on all paths.

I had 8250.nr_uarts=16 in the boot line of a test kernel and I had a weird
mysterious crash in sysfs.  After taking an in-depth look I realized that
CONFIG_SERIAL_8250_NR_UARTS was set to 4 and I was walking off the end of
the serial8250_ports array.

Ouch!!!

Don't let this happen to someone else.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Alan Cox <alan@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofbdev: bugfix for multiprocess defio
Jaya Kumar [Sat, 12 Jul 2008 20:47:51 +0000 (13:47 -0700)]
fbdev: bugfix for multiprocess defio

This patch is a bugfix for how defio handles multiple processes manipulating
the same framebuffer.

Thanks to Bernard Blackham for identifying this bug.

It occurs when two applications mmap the same framebuffer and concurrently
write to the same page.  Normally, this doesn't occur since only a single
process mmaps the framebuffer.  The symptom of the bug is that the mapping
applications will hang.  The cause is that defio incorrectly tries to add the
same page twice to the pagelist.  The solution I have is to walk the pagelist
and check for a duplicate before adding.  Since I needed to walk the pagelist,
I now also keep the pagelist in sorted order.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: Bernard Blackham <bernard@largestprime.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/isdn/i4l/isdn_common.c fix small resource leak
Darren Jenkins [Sat, 12 Jul 2008 20:47:50 +0000 (13:47 -0700)]
drivers/isdn/i4l/isdn_common.c fix small resource leak

Coverity CID: 1356 RESOURCE_LEAK

I found a very old patch for this that was Acked but did not get applied
https://lists.linux-foundation.org/pipermail/kernel-janitors/2006-September/016362.html

There looks to be a small leak in isdn_writebuf_stub() in isdn_common.c, when
copy_from_user() returns an un-copied data length (length != 0).  The below
patch should be a minimally invasive fix.

Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/char/pcmcia/ipwireless/hardware.c fix resource leak
Darren Jenkins [Sat, 12 Jul 2008 20:47:49 +0000 (13:47 -0700)]
drivers/char/pcmcia/ipwireless/hardware.c fix resource leak

Coverity CID: 2172 RESOURCE_LEAK

When pool_allocate() tries to enlarge a packet, if it can not allocate enough
memory, it returns NULL without first freeing the old packet.

This patch just frees the packet first.

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago[SCSI] bsg: fix oops on remove
James Bottomley [Mon, 7 Jul 2008 20:50:01 +0000 (15:50 -0500)]
[SCSI] bsg: fix oops on remove

If you do a modremove of any sas driver, you run into an oops on
shutdown when the host is removed (coming from the host bsg device).
The root cause seems to be that there's a use after free of the
bsg_class_device:  In bsg_kref_release_function, this is used (to do a
put_device(bcg->parent) after bcg->release has been called.  In sas (and
possibly many other things) bcd->release frees the queue which contains
the bsg_class_device, so we get a put_device on unreferenced memory.
Fix this by taking a copy of the pointer to the parent before releasing
bsg.

Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] fusion: default MSI to disabled for SPI and FC controllers
James Bottomley [Fri, 11 Jul 2008 03:10:55 +0000 (22:10 -0500)]
[SCSI] fusion: default MSI to disabled for SPI and FC controllers

There's a fault on the FC controllers that makes them not respond
correctly to MSI.  The SPI controllers are fine, but are likely to be
onboard on older motherboards which don't handle MSI correctly, so
default both these cases to disabled.  Enable by setting the module
parameter mpt_msi_enable=1.

For the SAS case, enable MSI by default, but it can be disabled by
setting the module parameter mpt_msi_enable=0.

Cc: "Prakash, Sathya" <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years agox86: fix ldt limit for 64 bit
Michael Karcher [Fri, 11 Jul 2008 16:04:46 +0000 (18:04 +0200)]
x86: fix ldt limit for 64 bit

Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Sat, 12 Jul 2008 00:00:17 +0000 (17:00 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [PATCH] IPMI: return correct value from ipmi_write

15 years ago[PATCH] IPMI: return correct value from ipmi_write
Mark Rustad [Thu, 10 Jul 2008 19:27:11 +0000 (14:27 -0500)]
[PATCH] IPMI: return correct value from ipmi_write

This patch corrects the handling of write operations to the IPMI watchdog
to work as intended by returning the number of characters actually
processed. Without this patch, an "echo V >/dev/watchdog" enables the
watchdog if IPMI is providing the watchdog function.

Signed-off-by: Mark Rustad <MRustad@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years ago[SCSI] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices
Brian King [Fri, 11 Jul 2008 18:37:50 +0000 (13:37 -0500)]
[SCSI] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices

Currently, ipr does not support HDIO_GET_IDENTITY to SATA devices.
An oops occurs if userspace attempts to send the command. Since hald
issues the command, ensure we fail the ioctl in ipr. This is a
temporary solution to the oops. Once the ipr libata EH conversion
is upstream, ipr will fully support HDIO_GET_IDENTITY.

Tested-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 11 Jul 2008 18:37:55 +0000 (11:37 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata-acpi: don't call sleeping function from invalid context
  Added Targa Visionary 1000 IDE adapter to pata_sis.c
  libata-acpi: filter out DIPM enable

15 years agoFix reference counting race on log buffers
Dave Chinner [Fri, 11 Jul 2008 07:43:55 +0000 (17:43 +1000)]
Fix reference counting race on log buffers

When we release the iclog, we do an atomic_dec_and_lock to determine if
we are the last reference and need to trigger update of log headers and
writeout.  However, in xlog_state_get_iclog_space() we also need to
check if we have the last reference count there.  If we do, we release
the log buffer, otherwise we decrement the reference count.

But the compare and decrement in xlog_state_get_iclog_space() is not
atomic, so both places can see a reference count of 2 and neither will
release the iclog.  That leads to a filesystem hang.

Close the race by replacing the atomic_read() and atomic_dec() pair with
atomic_add_unless() to ensure that they are executed atomically.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Tim Shimmin <tes@sgi.com>
Tested-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolibata-acpi: don't call sleeping function from invalid context
Zhang Rui [Fri, 11 Jul 2008 13:42:03 +0000 (09:42 -0400)]
libata-acpi: don't call sleeping function from invalid context

The problem is introduced by commit
664d080c41463570b95717b5ad86e79dc1be0877.

acpi_evaluate_integer is a sleeping function,
and it should not be called with spin_lock_irqsave.
https://bugzilla.redhat.com/show_bug.cgi?id=451399

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>