]> pilppa.com Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agoOMAP3 DSS: Fixed FIFO buffer register field sizes
Kalle Jokiniemi [Wed, 22 Oct 2008 06:47:06 +0000 (09:47 +0300)]
OMAP3 DSS: Fixed FIFO buffer register field sizes

The size status field in DISPC_[GFX | VID1 | VID2]_FIFO_SIZE_STATUS
register is 11 bits wide in OMAP3, but only 9 bits were read. Similarly,
the threshold field in DISPC_[GFX | VID1 | VID2]_FIFO_THRESHOLD register
is 12 bits wide, while only 9 bits were written in it.

This patch extends the bit field sizes used in setup_plane_fifo to
correspond to ones in OMAP3. In OMAP2 the extra bits are reserved, so no
harm should come from extending the bit fields.

Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: Remove CONFIG_OMAP_SYSOFFMODE flag
Kalle Jokiniemi [Fri, 17 Oct 2008 06:46:08 +0000 (09:46 +0300)]
OMAP3: Remove CONFIG_OMAP_SYSOFFMODE flag

Remove CONFIG_OMAP_SYSOFFMODE flag and do the full initialization of voltage
controller . Enabling automatic sending of OFF command and selecting wether
SYS_OFF_MODE signal is used should be determined dynamically. Hence they are
now not set in the initialization.

The sleep voltage for OFF mode is changed to default 1,2V for VDD1 and
1,15V for VDD2. Using the 0,9V setting causes hangup.

Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoalsa: add Beagleboard SoC configuration.
Felipe Contreras [Fri, 24 Oct 2008 19:02:57 +0000 (12:02 -0700)]
alsa: add Beagleboard SoC configuration.

This is exactly the same as the overo configuration. It might make sense
to have them in a single one.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
# CHANGED to not spew messages about beagle on non-beagle boards
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoomap: Add basic support for Pandora handheld console
Grazvydas Ignotas [Sat, 18 Oct 2008 21:55:15 +0000 (00:55 +0300)]
omap: Add basic support for Pandora handheld console

This patch adds support for basic features: nand, uarts, i2c,
mmc, rtc, and usb. Also includes defconfig.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP3: Fix get_irqnr_and_base to clear spurious interrupt bits
Tony Lindgren [Tue, 21 Oct 2008 17:51:40 +0000 (10:51 -0700)]
ARM: OMAP3: Fix get_irqnr_and_base to clear spurious interrupt bits

On omap24xx, INTCPS_SIR_IRQ_OFFSET bits [6:0] contains the current
active interrupt number.

However, on 34xx INTCPS_SIR_IRQ_OFFSET bits [31:7] also contains the
SPURIOUSIRQFLAG, which gets set if the interrupt sorting information
is invalid.

If the SPURIOUSIRQFLAG bits are not ignored, the interrupt code will
occasionally produce a bunch of confusing errors:

irq -33, desc: c02ddcc8, depth: 0, count: 0, unhandled: 0
->handle_irq():  c006f23c, handle_bad_irq+0x0/0x22c
->chip(): 00000000, 0x0
->action(): 00000000

Fix this by masking out only the ACTIVEIRQ bits. Also fix a
confusing comment.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoRevert "OMAP3: ack spurious IRQs in get_irqnr_and_base"
Tony Lindgren [Tue, 21 Oct 2008 22:04:30 +0000 (15:04 -0700)]
Revert "OMAP3: ack spurious IRQs in get_irqnr_and_base"

This reverts commit 3da0e10243d075b905dfa8f1b4a6cb3694ab2ce0.

The real bug behind this issue is the fact that we're not
masking out the SPURIOUSIRQFLAG bits [31:7] from the active
interrupt number. The following patch will replace this
patch with the fix.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix bootup crash for LDP platform
Vikram Pandita [Fri, 17 Oct 2008 23:08:04 +0000 (04:38 +0530)]
Fix bootup crash for LDP platform

Fix following bootup crash on LDP platform by enabling T2 USB driver for MUSB

Backtrace:
[<c001b9ac>] (musb_platform_init+0x0/0x120) from [<c001b0a8>] (musb_probe+0x208/0xb0c)
 r5:00000000 r4:c0222ad4
[<c001aea0>] (musb_probe+0x0/0xb0c) from [<c0142e80>] (platform_drv_probe+0x20/0x24)
[<c0142e60>] (platform_drv_probe+0x0/0x24) from [<c0142118>] (driver_probe_device+0xd0/0x17c)
[<c0142048>] (driver_probe_device+0x0/0x17c) from [<c0142210>] (__driver_attach+ 0x4c/0x70)
 r7:c0233214 r6:c0233214 r5:c02229ec r4:c0222940
[<c01421c4>] (__driver_attach+0x0/0x70) from [<c0141790>] (bus_for_each_dev+0x4c/0x84)
 r7:c0233214 r6:c01421c4 r5:c781de94 r4:00000000
[<c0141744>] (bus_for_each_dev+0x0/0x84) from [<c0141f60>] (driver_attach+0x20/0x28)
 r7:c78999c0 r6:c0234c60 r5:c0233214 r4:00000000
[<c0141f40>] (driver_attach+0x0/0x28) from [<c0141c1c>] (bus_add_driver+0xa8/0x214)
[<c0141b74>] (bus_add_driver+0x0/0x214) from [<c0142404>] (driver_register+0x98/0x120)
 r8:00000000 r7:00000000 r6:c0234c60 r5:c0233214 r4:c001e5c4
[<c014236c>] (driver_register+0x0/0x120) from [<c014303c>] (platform_driver_register+0x78/0x94)
[<c0142fc4>] (platform_driver_register+0x0/0x94) from [<c0143070>] (platform_driver_probe+0x18/0x68)
[<c0143058>] (platform_driver_probe+0x0/0x68) from [<c001ad38>] (musb_init+0x3c/0x54)
 r5:c001e510 r4:c001e5c4
[<c001acfc>] (musb_init+0x0/0x54) from [<c0022298>] (__exception_text_end+0x50/0x168)

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>
16 years agoOMAP3 clock: fix non-CORE DPLL rate assignment bugs
Paul Walmsley [Fri, 17 Oct 2008 22:18:42 +0000 (16:18 -0600)]
OMAP3 clock: fix non-CORE DPLL rate assignment bugs

Commit 8b1f0bd44fe490ec631230c8c040753a2bda8caa introduced a bug that
caused non-CORE DPLL rates to be incorrectly set on boot in
omap3_noncore_dpll_enable().  Debugged by Tomi Valkeinen
<tomi.valkeinen@nokia.com> - thanks Tomi.

Also fix omap3_noncore_dpll_set_rate() to assign clk->rate after a
DPLL reprogram.

Tested on 3430SDP.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Rick Bronson <rick@efn.org>
Cc: Timo Kokkonen <timo.t.kokkonen@nokia.com>
Cc: Sakari Poussa <sakari.poussa@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agon800: usb: fix num_eps and avoid BUG()
Felipe Balbi [Mon, 13 Oct 2008 12:35:45 +0000 (15:35 +0300)]
n800: usb: fix num_eps and avoid BUG()

num_eps is 16, not 32.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix whitespaces in smartreflex.c
Sanjeev Premi [Fri, 10 Oct 2008 14:05:28 +0000 (19:35 +0530)]
Fix whitespaces in smartreflex.c

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix compiler warnings in smartreflex.c
Sanjeev Premi [Fri, 10 Oct 2008 13:51:02 +0000 (19:21 +0530)]
Fix compiler warnings in smartreflex.c

Fix these compiler warnings:
smartreflex.c:126: warning: initialization makes integer from pointer without a cast
smartreflex.c:134: warning: initialization makes integer from pointer without a cast

Refreshed after updates from Felipe.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 NAND: move NAND_BLOCK_SIZE macro to board-3430sdp-flash.c
vimal singh [Tue, 7 Oct 2008 06:11:08 +0000 (11:41 +0530)]
OMAP3 NAND: move NAND_BLOCK_SIZE macro to board-3430sdp-flash.c

Sync nand.h with mainline kernel

Moving NAND_BLOCK_SIZE definition to board-3430sdp-flash.c

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agolm8323 pwm fixes
Timo Karjalainen [Thu, 2 Oct 2008 09:07:22 +0000 (12:07 +0300)]
lm8323 pwm fixes

This patch fixes two problems in LM8323 PWM control. One is that
locking is needed when setting and reading pwm->desired_brightness
asynchronously. The other is that LM8323 may stop a PWM script only
after the current instruction has finished. If it is a long RAMP,
the chip would keep executing the old instruction and new
settings were effectively ignored.

Signed-off-by: Timo Karjalainen <timo.o.karjalainen@nokia.com>
Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2: omap-keypad: Enable more than 6 rows
Peter Ujfalusi [Thu, 2 Oct 2008 05:28:49 +0000 (08:28 +0300)]
OMAP2: omap-keypad: Enable more than 6 rows

There is no reason to limit the GPIO rows to 6 for
OMAP2.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2: omap-keypad: interrupt disable fix
Peter Ujfalusi [Thu, 2 Oct 2008 05:28:48 +0000 (08:28 +0300)]
OMAP2: omap-keypad: interrupt disable fix

The GPIO interrupts has been disabled several times
after the first key press.
No need to disable - again - the interrupts in the omap_kp_scan_keypad
function on OMAP2.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoomap: get rid of a useless cast
Felipe Balbi [Tue, 30 Sep 2008 18:46:59 +0000 (21:46 +0300)]
omap: get rid of a useless cast

That cast was annyoing for quite a while. Now
omap_ctrl_base_get() returns void __iomem *
and __raw_read/write friends uses void __iomem *
so there's no need for casting.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoAdds MCBSP mux settings
Arun KS [Thu, 25 Sep 2008 07:34:28 +0000 (13:04 +0530)]
Adds MCBSP mux settings

Adding MCBSP port 1, 3, 4 and 5 ports mux settings for 2430.

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2EVM: Updates defconfig
Arun KS [Thu, 25 Sep 2008 05:37:16 +0000 (11:07 +0530)]
OMAP2EVM: Updates defconfig

Enables mcspi support in omap2evm defconfig

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2EVM : Add touchscreen support
Arun KS [Thu, 25 Sep 2008 05:36:03 +0000 (11:06 +0530)]
OMAP2EVM : Add touchscreen support

Adding ads7846 touchscreen support to omap2evm board

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoAdd MCSPI1 and gpio_85 Mux configuration
Arun KS [Thu, 25 Sep 2008 05:34:07 +0000 (11:04 +0530)]
Add MCSPI1 and gpio_85 Mux configuration

This patch adds mcspi1 and gpio_85 mux configuration for 2430.

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoomapfb: Remove casting and change coding style
arun c [Thu, 18 Sep 2008 12:49:31 +0000 (08:49 -0400)]
omapfb: Remove casting and change coding style

As sugested by RMK

Signed-off-by: Arun C <arunedarath@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoehci-omap: (mostly) cosmetic cleanups
David Brownell [Fri, 3 Oct 2008 07:03:33 +0000 (00:03 -0700)]
ehci-omap: (mostly) cosmetic cleanups

Various cleanups to the OMAP EHCI bus glue:

 - Whitespace fixes.

 - Busy-wait loops should really have timeouts, but lacking
   that ... at least cpu_relax() in the body.

 - Debug messages should end with newlines, so they don't
   break the next message; should not embed newlines; and
   should otherwise be clean and correctly spelled.

 - The probe() method should have initialized the SBRN value,
   so the driver didn't report "USB 0.0 started".

 - The MODULE_ALIAS() was missing its "platform:" prefix;
   doing it right means the module could hotplug/coldplug.

No real functional change except for the hotplug/coldplug thing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3: ack spurious IRQs in get_irqnr_and_base
Lauri Leukkunen [Wed, 15 Oct 2008 11:51:51 +0000 (14:51 +0300)]
OMAP3: ack spurious IRQs in get_irqnr_and_base

This prevents spurious interrupts from repeating unacked and
thus locking the system, while still allowing the spurious
bad irq error message to be show on console.

Signed-off-by: Lauri Leukkunen <lauri.leukkunen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoDisable CONFIG_USB_EHCI_HCD for boards that have it set
Tony Lindgren [Fri, 17 Oct 2008 21:08:47 +0000 (14:08 -0700)]
Disable CONFIG_USB_EHCI_HCD for boards that have it set

This is until the EHCI issues have been sorted out.

Signed-off-by: Tony Lindgren <tony@atomid.com>
16 years agoUpdate defconfigs for boards that have EHCI set
Tony Lindgren [Fri, 17 Oct 2008 21:01:15 +0000 (14:01 -0700)]
Update defconfigs for boards that have EHCI set

Update defconfigs for boards that have EHCI set

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix debugfs_create_*'s error checking method for arm/plat-omap
Zhaolei [Fri, 17 Oct 2008 10:07:31 +0000 (18:07 +0800)]
Fix debugfs_create_*'s error checking method for arm/plat-omap

debugfs_create_*() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Comparing to PATCH v1, because clk_debugfs_init is included in
"#if defined CONFIG_DEBUG_FS", we only need to check NULL return.
Thanks Li Zefan <lizf@cn.fujitsu.com>

debugfs_create_u8() and other function's return value's checking method are
also fixed in this patch.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoAdd MT_MEMORY_SO, mark L3 and L4 to use it
Nathan Monson [Thu, 16 Oct 2008 20:10:47 +0000 (13:10 -0700)]
Add MT_MEMORY_SO, mark L3 and L4 to use it

On Wed, Oct 8, 2008 at 11:36 AM, Nathan Monson <nmonson@gmail.com> wrote:
> "Felipe Contreras" <felipe.contreras@gmail.com> writes:
>> irq -33, desc: c0335cf8, depth: 0, count: 0, unhandled: 0
>
> On the BeagleBoard list, Pratheesh Gangadhar said that mapping I/O
> regions as Strongly Ordered suppresses this problem:
> http://groups.google.com/group/beagleboard/browse_thread/thread/23e1c95b4bfb09b5/70d12dca569ca503?show_docid=70d12dca569ca503

Pratheesh helped me make a patch against the latest linux-omap git to
try this.

With this patch, my IRQ -33 problems with the DSP have disappeared.
Before, I would end up in IRQ -33 loop after 10 invocations of the DSP
Bridge 'ping.out' utility.  I just finished running it 50,000 times
without error.

As stated before, this patch is just a workaround for testing
purposes, not a fix.  Who knows what performance side effects it
has...

Signed-off-by: Nathan Monson <nmonson@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-usb: rename twl4030_driver to twl4030_usb_driver.
Jagadeesh Bhaskar Pakaravoor [Tue, 14 Oct 2008 06:07:14 +0000 (11:37 +0530)]
twl4030-usb: rename twl4030_driver to twl4030_usb_driver.

The i2c_driver in twl4030-core.c and platform_driver of twl4030-usb.c
both has the name twl4030_driver. This leads to unnecessary confusion.

So rename the usb platform_driver appropriately to:
twl4030_usb_driver.

Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030 MMC card detction
David Brownell [Tue, 14 Oct 2008 19:01:43 +0000 (12:01 -0700)]
twl4030 MMC card detction

Replace stubbed-out card-detect support for twl4030 GPIOs with
a simpler platform_data mechanism.  As before, no current users.
Sanity tested by enabling this on Beagle; it booted OK with
root on MMC.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agosupport LED signals on Beagle
David Brownell [Mon, 13 Oct 2008 20:05:05 +0000 (13:05 -0700)]
support LED signals on Beagle

Export Beagle's third LED to the LED framework, now that it's
accessible through the twl4030-gpio code.

Claim the VBUS control, defaulting to OFF.  Boards that have an
EHCI connector (not rev B) will need to update this slightly.
(Ideally as part of adding hooks to the ehci-map code supporting
external power switching and overcurrent detection.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio supports LED signals
David Brownell [Mon, 13 Oct 2008 20:04:16 +0000 (13:04 -0700)]
twl4030-gpio supports LED signals

Expose the two TWL4030 LED signals as output-only GPIOs.  Boards
need to explicitly ask that this be done, to help avoid conflicts
on boards using these same pins to hook up to a vibrator motor.

Note that these are high drive open drain signals; LEDA is rated
for up to 160 mA (!), LEDB up to 60 mA.  Boards using one of these
signals to drive a bank of LCD backlight LEDs would probably want
to access the dedicated PWMs for brightness control, too; easy to
add such support later.

Example:  Beagle has one real LED here (PWM not necessary), and
one GPIO controlling VBUS output over EHCI (PWM not wanted).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agohsmmc.c glue uses standard GPIO calls
David Brownell [Mon, 13 Oct 2008 20:03:07 +0000 (13:03 -0700)]
hsmmc.c glue uses standard GPIO calls

Convert the hsmmc init code over to standard GPIO calls:
gpio_request(), gpio_free(), gpio_get_value_cansleep().

NOTE that this doesn't pass GPIO numbers in to hsmmc_init();
those values are still hard-wired.  (For the write protect
signal, the LACK of value is hard-wired...)  So the hsmmc
glue is still kind of problematic.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-gpio use new gpiolib hooks
David Brownell [Mon, 13 Oct 2008 20:02:18 +0000 (13:02 -0700)]
twl4030-gpio use new gpiolib hooks

Use the new gpiolib internal mechanism for tracking gpio usage,
making them power the GPIO module on/off, so that the standard
gpio_request()/gpio_free() calls can completely replace the
twl4030-specific versions.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agogpiolib request/free hooks
David Brownell [Mon, 13 Oct 2008 20:00:21 +0000 (13:00 -0700)]
gpiolib request/free hooks

Add a new internal mechanism to gpiolib to support low power
operations by letting gpio_chip instances see when their GPIOs
are in use.  When no GPIOs are active, chips may be able to
enter lower powered runtime states by disabling clocks and/or
power domains.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoSync mach-omap2/irq.c with mainline
Tony Lindgren [Thu, 16 Oct 2008 20:49:10 +0000 (13:49 -0700)]
Sync mach-omap2/irq.c with mainline

Remove now unncessary casts and use the same order for include files.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-usb updates/fixes
David Brownell [Thu, 16 Oct 2008 19:32:43 +0000 (12:32 -0700)]
twl4030-usb updates/fixes

Simplify handling of VBUS and ID status and the USB_PRES interrupt.
This seems to resolve the problems I previously saw on Beagle and
Overo boards.

 - Read the status directly, instead of trying to infer it from
   dodgey side effects of IRQ handling and trigger tweaking.

 - Stop trying to arrange those dodgey side effects; just leave
   the IRQ enabled at all times.

 - Check that status as part of driver probe, so the PHY can
   always be active by the time it's needed.  (BUGFIX!)

 - Re-sequence probe() to be less racey, and to avoid duplicating
   logic found elsewhere (notably irq handling and PHY activation).

 - Make the irq_chip be the exclusive owner of PWR_EDR (finally).

 - Get rid of needless work_struct ... in this irq handling thread,
   it's safe and cheap to call sysfs_notify() directly.

Stop enabling IRQs on the USB subchip.  There's no IRQ handler for
them, and since ALT_INT_REROUTE isn't being set they'll never
arrive ... so there's no point to enabling them.

Also add some comments about other things such an otg_transciever
driver should be doing, fixing minor omissions; and remove some
unnecessary file inclusions.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoremove some global twl4030 IRQ defines
David Brownell [Fri, 10 Oct 2008 21:23:01 +0000 (14:23 -0700)]
remove some global twl4030 IRQ defines

Disable more unnecessary TWL4030_*IRQ_* symbols.

We're not yet ready to remove them all from <linux/i2c/twl4030.h>
since various drivers still use those symbols (maybe indirectly)
not platform resources: twl4030_bci_battery.c, twl4030-madc.c,
twl4030-pwrbutton.c, and omap-twl4030keypad.c all need updates.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoreplace twl4030-gpio irq_chip
David Brownell [Fri, 10 Oct 2008 21:22:22 +0000 (14:22 -0700)]
replace twl4030-gpio irq_chip

Replace twl4030 GPIO IRQ handling with generic SIH support.
No change in functionality; but there's now one less kernel
thread tied up supporting this chip.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoremove twl4030-pwrirq.c
David Brownell [Fri, 10 Oct 2008 21:21:53 +0000 (14:21 -0700)]
remove twl4030-pwrirq.c

Replace twl4030-pwrirq with the more capable generic TWL SIH
support.

"More capable" includes standard support for IRQ trigger modes;
so make the RTC and USB transceiver drivers use genirq for that.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agonew sharable twl4030 SIH irq_chip
David Brownell [Fri, 10 Oct 2008 21:21:22 +0000 (14:21 -0700)]
new sharable twl4030 SIH irq_chip

Add TWL4030 infrastructure for shared SIH interrupts.

This is basically what the twl4030 GPIO IRQ code does, but
switching to a workqueue to handle each irqchip's mask/unmask
and set_type operations instead of a kthread that must figure
out what to do each time it wakes up.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agonew twl4030 SIH irq init
David Brownell [Fri, 10 Oct 2008 21:20:46 +0000 (14:20 -0700)]
new twl4030 SIH irq init

Switch to a different twl4030-irq SIH irq init scheme.  Its goal
is to remove some section issues while providing a data structure
that can be reused by generic SIH IRQ handling code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agocreate twl4030-irq.c
David Brownell [Fri, 10 Oct 2008 21:19:49 +0000 (14:19 -0700)]
create twl4030-irq.c

Split the IRQ support out of twl4030-core.c into twl4030-irq.c,
including some minor tidy-ups and a note_interrupt() paranoia
in case of flakiness with some PIH interrupt.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoAdd back missing irq define for INT_34XX_BENCH_MPU_EMUL
Tony Lindgren [Tue, 14 Oct 2008 21:11:27 +0000 (14:11 -0700)]
Add back missing irq define for INT_34XX_BENCH_MPU_EMUL

Looks like we lost this at some point, add it back to sync
with mainline tree.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoi2c-omap: fix I2C timeouts due to recursive omap_i2c_{un,}idle()
Paul Walmsley [Fri, 10 Oct 2008 16:58:30 +0000 (10:58 -0600)]
i2c-omap: fix I2C timeouts due to recursive omap_i2c_{un,}idle()

omap_i2c_unidle() and omap_i2c_idle() are called recursively during
omap_i2c_probe().  This is evidently unexpected and will wipe
out the I2C interrupt enable register the second time that
omap_i2c_idle() is called consecutively.  Any I2C transactions
following a probe of a bus with at least one device on it will then
time out.

Fix by moving omap_i2c_idle() further up in omap_i2c_probe().  Ensure
the I2C controller is marked as idle before the probe starts.  Also
attempt to catch future reappearances of this bug early in development
by warning in omap_i2c_{un,}idle() when they are called recursively.

Problem reported by David Brownell <david-b@pacbell.net>.

Tested on 3430SDP and 2430SDP.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Acked-by; Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoEnable CONFIG_GPIO_TWL4030=y
Sanjeev Premi [Fri, 10 Oct 2008 12:18:58 +0000 (17:48 +0530)]
Enable CONFIG_GPIO_TWL4030=y

Without this option, kernel builds would fail, with
errors similar to:

hsmmc.c:50: undefined reference to `twl4030_get_gpio_datain'
hsmmc.c:82: undefined reference to `twl4030_free_gpio'
hsmmc.c:63: undefined reference to `twl4030_request_gpio'
hsmmc.c:67: undefined reference to `twl4030_set_gpio_debounce'

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-pwrirq simplification, cleanup
David Brownell [Wed, 8 Oct 2008 14:22:30 +0000 (17:22 +0300)]
twl4030-pwrirq simplification, cleanup

I can't test the pwrbutton stuff, but rtc and musb behave...

With one issue:  the usb transceiver glue misbehaves on
startup if the device is connected.  (Again.)  I looked at
this a bit, and I think the issue is probably caused by
not actually using key USB registers ... IRQ trigger
mode state transitions are at best a fragile proxy for the
real state.

(This is similar to the GPIO patch I just sent, but simpler
except for the impact on the few drivers thinking oddly
about IRQs.  Those patches cover the key SIH modules, and
a similar one affects the PIH in twl4030-core.)

- Dave

================================
Streamline the "power irq" code, and some of the mechanisms
it uses:

 - Support IRQ masking, not just unmasking; simpler code.
 - Use the standard handle_edge_irq() handler for these edge IRQs.
 - Use generic_handle_irq() instead of a manual expansion thereof.
 - Provide a missing spinlock for the shared data.

In short, use more of the standard genirq code ... more correctly.

Also, update the drivers using the "power IRQ" accordingly:

 - Don't request IRQF_DISABLED if the handler makes I2C calls;
   and defend against lockdep forcing it on us.

 - Let the irq_chip handle IRQ mask/unmask; it handles mutual
   exclusion between drivers, among other things.

 - (Unrelated) remove useless MODULE_ALIAS in pwrbutton.

The USB transceiver driver still places some dodgey games with IRQ
enable/disable, and IRQ trigger flags.  At least some of them seem
like they'd be simplified by using USB transceiver registers ...
notably, startup code, which doesn't seem to check state before
it enters an irq-driven mode.

For the moment, these drivers still (wrongly) try to configure IRQ
trigger modes themselves ... again, that's something that an irq_chip
handles (but not yet, for this one).

NOTE:  tested (MUSB and RTC only) along with the init/retry hack
to make twl4030-pwrirq work around the i2c-omap timeout problems.

16 years agoMinor cosmetic clean-up for LDP for mainline
Tony Lindgren [Fri, 10 Oct 2008 11:44:25 +0000 (14:44 +0300)]
Minor cosmetic clean-up for LDP for mainline

Minor cosmetic clean-up for LDP for mainline

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFB: OMAP: DISPC: Allow multiple external IRQ handlers
Daniel Stone [Thu, 9 Oct 2008 10:06:43 +0000 (13:06 +0300)]
FB: OMAP: DISPC: Allow multiple external IRQ handlers

Previously, the only external (to dispc.c) IRQ handler was RFBI's
frame done handler.  dispc's IRQ framework was very dumb: you could only
have one handler, and the semantics of {request,free}_irq were odd, to
say the least.

The new framework allows multiple consumers to register arbitrary IRQ
masks.

Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFB: OMAP: Blizzard: Properly disable zoom when necessary
Siarhei Siamashka [Thu, 9 Oct 2008 09:52:14 +0000 (12:52 +0300)]
FB: OMAP: Blizzard: Properly disable zoom when necessary

The problem is related to the following notice in the documentation:
"Once a destructive window with up-scaling is created, it can only be
disabled by creating a background window.". With the current omapfb
driver code, if you try to do a partial screen update (show menu or
dialog) after a scaled screen update (video overlay), scaling setting
are not reset properly and you see this "magnifying glass" effect if a
part of new update overlaps previously scaled area.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoInput: Touchscreen: Make TSC2005 depend on SPI
Daniel Stone [Thu, 9 Oct 2008 09:52:13 +0000 (12:52 +0300)]
Input: Touchscreen: Make TSC2005 depend on SPI

Make Kconfig reflect reality.

Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: fix uninitialized warning
Hiroshi DOYU [Thu, 9 Oct 2008 11:38:00 +0000 (14:38 +0300)]
ARM: OMAP: fix uninitialized warning

warning: 'rev_name' may be used uninitialized in this function

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-core: fix a typo
Jagadeesh Bhaskar Pakaravoor [Thu, 9 Oct 2008 15:14:49 +0000 (20:44 +0530)]
twl4030-core: fix a typo

Fix a trivial typo.

Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix compiler warnings in gpmc.c
Sanjeev Premi [Fri, 10 Oct 2008 10:19:51 +0000 (15:49 +0530)]
Fix compiler warnings in gpmc.c

Fix these compiler warnings:

gpmc.c: In function 'gpmc_init':
gpmc.c:432: warning: 'return' with a value, in function returning void
gpmc.c:439: warning: 'return' with a value, in function returning void

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix IO address issue.
Roman Tereshonkov [Fri, 10 Oct 2008 09:05:09 +0000 (12:05 +0300)]
Fix IO address issue.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2xxx: move SRAM to fix boot hang
Paul Walmsley [Thu, 9 Oct 2008 23:22:22 +0000 (17:22 -0600)]
OMAP2xxx: move SRAM to fix boot hang

Commit 1c957036bbd912322793da676d05e169abf24782 breaks booting on
OMAP2; it causes the SRAM to be mapped on top of the L4 interconnect.
This causes the system to hang early in boot in omap_map_sram() during
the TLB flush. Fix by moving SRAM elsewhere in the memory map.

Reported by Jarkko Nikula <jarkko.nikula@nokia.com>.  This patch is a
collaboration with Tony Lindgren <tony@atomide.com> and
Kevin Hilman <khilman@deeprootsystems.com>.

Boot-tested on 2430SDP (by Paul) and N810 (by Jarkko).

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Måns Rullgård <mans@mansr.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Fri, 10 Oct 2008 08:20:57 +0000 (11:20 +0300)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

16 years agoLinux 2.6.27 v2.6.27
Linus Torvalds [Thu, 9 Oct 2008 22:13:53 +0000 (15:13 -0700)]
Linux 2.6.27

16 years agoDon't allow splice() to files opened with O_APPEND
Linus Torvalds [Thu, 9 Oct 2008 21:04:54 +0000 (14:04 -0700)]
Don't allow splice() to files opened with O_APPEND

This is debatable, but while we're debating it, let's disallow the
combination of splice and an O_APPEND destination.

It's not entirely clear what the semantics of O_APPEND should be, and
POSIX apparently expects pwrite() to ignore O_APPEND, for example.  So
we could make up any semantics we want, including the old ones.

But Miklos convinced me that we should at least give it some thought,
and that accepting writes at arbitrary offsets is wrong at least for
IS_APPEND() files (which always have O_APPEND set, even if the reverse
isn't true: you can obviously have O_APPEND set on a regular file).

So disallow O_APPEND entirely for now.  I doubt anybody cares, and this
way we have one less gray area to worry about.

Reported-and-argued-for-by: Miklos Szeredi <miklos@szeredi.hu>
Acked-by: Jens Axboe <ens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Thu, 9 Oct 2008 19:23:54 +0000 (12:23 -0700)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  hwmon: (abituguru3) Enable DMI probing feature on Abit AT8 32X
  hwmon: (abituguru3) Enable reading from AUX3 fan on Abit AT8 32X
  hwmon: (adt7473) Fix some bogosity in documentation file
  hwmon: Define sysfs interface for energy consumption register
  hwmon: (it87) Prevent power-off on Shuttle SN68PT
  eeepc-laptop: Fix hwmon interface

16 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Thu, 9 Oct 2008 19:23:35 +0000 (12:23 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] correct broken links and email addresses

16 years agoSLOB: fix bogus ksize calculation fix
Matt Mackall [Wed, 8 Oct 2008 19:51:57 +0000 (14:51 -0500)]
SLOB: fix bogus ksize calculation fix

This fixes the previous fix, which was completely wrong on closer
inspection. This version has been manually tested with a user-space
test harness and generates sane values. A nearly identical patch has
been boot-tested.

The problem arose from changing how kmalloc/kfree handled alignment
padding without updating ksize to match. This brings it in sync.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[CPUFREQ] correct broken links and email addresses
Németh Márton [Thu, 9 Oct 2008 12:59:17 +0000 (14:59 +0200)]
[CPUFREQ] correct broken links and email addresses

Replace the no longer working links and email address in the
documentation and in source code.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dave Jones <davej@redhat.com>
16 years agohwmon: (abituguru3) Enable DMI probing feature on Abit AT8 32X
Alistair John Strachan [Thu, 9 Oct 2008 13:33:59 +0000 (15:33 +0200)]
hwmon: (abituguru3) Enable DMI probing feature on Abit AT8 32X

Enable driver checking of the DMI product name (when enabled) on
an Abit AT8 32X, instead of falling back to a manual probe. This
eliminates false negatives and eventually will help avoid
unnecessary bus probes on unsupported mainboards.

Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk>
Tested-by: Daniel Exner <dex@dragonslave.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (abituguru3) Enable reading from AUX3 fan on Abit AT8 32X
Alistair John Strachan [Thu, 9 Oct 2008 13:33:59 +0000 (15:33 +0200)]
hwmon: (abituguru3) Enable reading from AUX3 fan on Abit AT8 32X

The table for the Abit AT8 32X was incorrectly missing an entry
for the sixth ("AUX3") fan. Add this entry, exporting the fan
reading to userspace.

Closes lm-sensors.org ticket #2339.

Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk>
Tested-by: Daniel Exner <dex@dragonslave.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (adt7473) Fix some bogosity in documentation file
Darrick J. Wong [Thu, 9 Oct 2008 13:33:58 +0000 (15:33 +0200)]
hwmon: (adt7473) Fix some bogosity in documentation file

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: Define sysfs interface for energy consumption register
Darrick J. Wong [Thu, 9 Oct 2008 13:33:58 +0000 (15:33 +0200)]
hwmon: Define sysfs interface for energy consumption register

Describe the sysfs files that were introduced in the ibmaem driver.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (it87) Prevent power-off on Shuttle SN68PT
Jean Delvare [Thu, 9 Oct 2008 13:33:58 +0000 (15:33 +0200)]
hwmon: (it87) Prevent power-off on Shuttle SN68PT

On the Shuttle SN68PT, FAN_CTL2 is apparently not connected to a fan,
but to something else. One user has reported instant system power-off
when changing the PWM2 duty cycle, so we disable it.

I use the board name string as the trigger in case the same board is
ever used in other systems.

This closes lm-sensors ticket #2349:
pwmconfig causes a hard poweroff
http://www.lm-sensors.org/ticket/2349

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoeeepc-laptop: Fix hwmon interface
Corentin Chary [Thu, 9 Oct 2008 13:33:57 +0000 (15:33 +0200)]
eeepc-laptop: Fix hwmon interface

Creates a name file in the sysfs directory, that
is needed for the libsensors library to work.
Also rename fan1_pwm to pwm1 and scale its value as needed.

This fixes bug #11520:
http://bugzilla.kernel.org/show_bug.cgi?id=11520

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 8 Oct 2008 18:41:10 +0000 (11:41 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Sibyte: Register PIO PATA device only for Swarm and Litte Sur

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 8 Oct 2008 18:40:19 +0000 (11:40 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  tcp: Fix tcp_hybla zero congestion window growth with small rho and large cwnd.
  net: Fix netdev_run_todo dead-lock
  tcp: Fix possible double-ack w/ user dma
  net: only invoke dev->change_rx_flags when device is UP
  netrom: Fix sock_orphan() use in nr_release
  ax25: Quick fix for making sure unaccepted sockets get destroyed.
  Revert "ax25: Fix std timer socket destroy handling."
  [Bluetooth] Add reset quirk for A-Link BlueUSB21 dongle
  [Bluetooth] Add reset quirk for new Targus and Belkin dongles
  [Bluetooth] Fix double frees on error paths of btusb and bpa10x drivers

16 years ago[MIPS] Sibyte: Register PIO PATA device only for Swarm and Litte Sur
Ralf Baechle [Wed, 8 Oct 2008 18:14:33 +0000 (19:14 +0100)]
[MIPS] Sibyte: Register PIO PATA device only for Swarm and Litte Sur

Symbol name spaghetti which is too complicated to cleanup on this stage
of the release cycle breaks the build on BCM1480 platforms.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agotcp: Fix tcp_hybla zero congestion window growth with small rho and large cwnd.
Daniele Lacamera [Tue, 7 Oct 2008 22:58:17 +0000 (15:58 -0700)]
tcp: Fix tcp_hybla zero congestion window growth with small rho and large cwnd.

Because of rounding, in certain conditions, i.e. when in congestion
avoidance state rho is smaller than 1/128 of the current cwnd, TCP
Hybla congestion control starves and the cwnd is kept constant
forever.

This patch forces an increment by one segment after #send_cwnd calls
without increments(newreno behavior).

Signed-off-by: Daniele Lacamera <root@danielinux.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Fix netdev_run_todo dead-lock
Herbert Xu [Tue, 7 Oct 2008 22:50:03 +0000 (15:50 -0700)]
net: Fix netdev_run_todo dead-lock

Benjamin Thery tracked down a bug that explains many instances
of the error

unregister_netdevice: waiting for %s to become free. Usage count = %d

It turns out that netdev_run_todo can dead-lock with itself if
a second instance of it is run in a thread that will then free
a reference to the device waited on by the first instance.

The problem is really quite silly.  We were trying to create
parallelism where none was required.  As netdev_run_todo always
follows a RTNL section, and that todo tasks can only be added
with the RTNL held, by definition you should only need to wait
for the very ones that you've added and be done with it.

There is no need for a second mutex or spinlock.

This is exactly what the following patch does.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Tue, 7 Oct 2008 22:32:20 +0000 (15:32 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6

16 years agotcp: Fix possible double-ack w/ user dma
Ali Saidi [Tue, 7 Oct 2008 22:31:19 +0000 (15:31 -0700)]
tcp: Fix possible double-ack w/ user dma

From: Ali Saidi <saidi@engin.umich.edu>

When TCP receive copy offload is enabled it's possible that
tcp_rcv_established() will cause two acks to be sent for a single
packet. In the case that a tcp_dma_early_copy() is successful,
copied_early is set to true which causes tcp_cleanup_rbuf() to be
called early which can send an ack. Further along in
tcp_rcv_established(), __tcp_ack_snd_check() is called and will
schedule a delayed ACK. If no packets are processed before the delayed
ack timer expires the packet will be acked twice.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: only invoke dev->change_rx_flags when device is UP
Patrick McHardy [Tue, 7 Oct 2008 22:26:48 +0000 (15:26 -0700)]
net: only invoke dev->change_rx_flags when device is UP

Jesper Dangaard Brouer <hawk@comx.dk> reported a bug when setting a VLAN
device down that is in promiscous mode:

When the VLAN device is set down, the promiscous count on the real
device is decremented by one by vlan_dev_stop(). When removing the
promiscous flag from the VLAN device afterwards, the promiscous
count on the real device is decremented a second time by the
vlan_change_rx_flags() callback.

The root cause for this is that the ->change_rx_flags() callback is
invoked while the device is down. The synchronization is meant to mirror
the behaviour of the ->set_rx_mode callbacks, meaning the ->open function
is responsible for doing a full sync on open, the ->close() function is
responsible for doing full cleanup on ->stop() and ->change_rx_flags()
is meant to do incremental changes while the device is UP.

Only invoke ->change_rx_flags() while the device is UP to provide the
intended behaviour.

Tested-by: Jesper Dangaard Brouer <jdb@comx.dk>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoSLOB: fix bogus ksize calculation
Matt Mackall [Tue, 7 Oct 2008 16:37:35 +0000 (11:37 -0500)]
SLOB: fix bogus ksize calculation

SLOB's ksize calculation was braindamaged and generally harmlessly
underreported the allocation size. But for very small buffers, it could
in fact overreport them, leading code depending on krealloc to overrun
the allocation and trample other data.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Tested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRevert "V4L/DVB (8904): cx88: add missing unlock_kernel"
Linus Torvalds [Tue, 7 Oct 2008 14:54:34 +0000 (07:54 -0700)]
Revert "V4L/DVB (8904): cx88: add missing unlock_kernel"

This reverts commit 135aedc38e812b922aa56096f36a3d72ffbcf2fb, as
requested by Hans Verkuil.

It was a patch for 2.6.28 where the BKL was pushed down from v4l core to
the drivers, not for 2.6.27!

Requested-by: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Tue, 7 Oct 2008 11:27:17 +0000 (14:27 +0300)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

16 years agotwl4030-gpio irq simplification
David Brownell [Mon, 6 Oct 2008 07:41:32 +0000 (00:41 -0700)]
twl4030-gpio irq simplification

Simplify and correct TWL4030 GPIO IRQ handling:

 - support mask() not just unmask()
 - use genirq handle_edge_irq() handler not custom hacks
 - let that handle (correct) accounting of chained IRQ counts
 - use the more efficient clear-on-read mechanism
 - don't misuse IRQ_LEVEL
 - remove some superfluous locking
 - locking fix:  all irq_chip data needs spinlock protection

Cleanups:
 - give the helper thread a more accurate name
 - don't name the NOP ack() method misleadingly
 - use generic_handle_irq(), not a manually unrolled version thereof
 - comment fixes

Note that the previous IRQ dispatch code was somewhat confused.
It seemed not to know that it was working with edge triggered
interrupts, much less ones which could be transparently acked.

(Also note that COR=1 doesn't enable Clear-On-Read for all modules;
some are documented as using COR=0 for that.  GPIO uses COR=1.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030-core irq simplification
David Brownell [Tue, 7 Oct 2008 03:43:35 +0000 (20:43 -0700)]
twl4030-core irq simplification

Simplify twl4030 IRQ handling by removing a needless custom flow
handler.  The top level IRQs, from the PIH, are well suited for
handle_simple_irq() ... they can't be acked or masked.

Switching resolves some issues with how IRQs were dispatched.
Notably, abuse of desc->status, IRQ accounting, and handling
of various faults.

In short, use standard genirq code.

Drivers that request_irq() to the PIH will need to pay more
attention to things like setting IRQF_DISABLED (since it's
no longer ignored), and making I2C calls from handlers (you'll
need a lockdep workaround).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030 "subdriver" irq tweaks
David Brownell [Tue, 7 Oct 2008 03:37:59 +0000 (20:37 -0700)]
twl4030 "subdriver" irq tweaks

Bugfixes to TWL subdriver irq handler setup ... lockdep
workarounds, remove IRQF_DISABLED.  NOPs with current code.

These changes are specific to the drivers which register
directly with the PIH irq_chip (in twl4030-core), and are
prerequsites to a cleanup patch for that PIH infrastructure.
(Unless you don't use these drivers.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agobeagle: two more GPIOs
David Brownell [Mon, 6 Oct 2008 20:17:35 +0000 (13:17 -0700)]
beagle: two more GPIOs

Request two more GPIOs on Beagle:  MMC write protect, DVI enable.

Also define the first OMAP3 GPIO mux config symbols, with a new
naming convention.  Examples:

  - GPIO42 is bidirectional, and uses external pull up/down (if any);
  - GPIO42_UP is bidirectional, with an internal pullup;
  - GPIO42_DOWN is bidirectional, with an internal pulldown.
  - GPIO42_OUT is output-only, and needs no pullup or pulldown.

All of those would be fully functional through the standard GPIO
interface as well as the legacy OMAP-only one, except GPIO42_OUT
which won't let you read the actual pin value after setting it.

There's no special off-mode support for these particular pins;
on Beagle they have external pullups or pulldowns.

(OMAP2 can use this naming convention too, except that since it
has no input-enable the "_OUT" convention can't be used there.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP3: Remove include of removed twl4030-rtc.h
Kevin Hilman [Mon, 6 Oct 2008 14:52:43 +0000 (17:52 +0300)]
ARM: OMAP3: Remove include of removed twl4030-rtc.h

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoLinux 2.6.27-rc9 v2.6.27-rc9
Linus Torvalds [Mon, 6 Oct 2008 23:39:58 +0000 (16:39 -0700)]
Linux 2.6.27-rc9

16 years agoMarker depmod fix core kernel list
Mathieu Desnoyers [Mon, 6 Oct 2008 13:30:12 +0000 (09:30 -0400)]
Marker depmod fix core kernel list

* Theodore Ts'o (tytso@mit.edu) wrote:
>
> I've been playing with adding some markers into ext4 to see if they
> could be useful in solving some problems along with Systemtap.  It
> appears, though, that as of 2.6.27-rc8, markers defined in code which is
> compiled directly into the kernel (i.e., not as modules) don't show up
> in Module.markers:
>
> kvm_trace_entryexit arch/x86/kvm/kvm-intel  %u %p %u %u %u %u %u %u
> kvm_trace_handler arch/x86/kvm/kvm-intel  %u %p %u %u %u %u %u %u
> kvm_trace_entryexit arch/x86/kvm/kvm-amd  %u %p %u %u %u %u %u %u
> kvm_trace_handler arch/x86/kvm/kvm-amd  %u %p %u %u %u %u %u %u
>
> (Note the lack of any of the kernel_sched_* markers, and the markers I
> added for ext4_* and jbd2_* are missing as wel.)
>
> Systemtap apparently depends on in-kernel trace_mark being recorded in
> Module.markers, and apparently it's been claimed that it used to be
> there.  Is this a bug in systemtap, or in how Module.markers is getting
> built?   And is there a file that contains the equivalent information
> for markers located in non-modules code?

I think the problem comes from "markers: fix duplicate modpost entry"
(commit d35cb360c29956510b2fe1a953bd4968536f7216)

Especially :

  -   add_marker(mod, marker, fmt);
  +   if (!mod->skip)
  +     add_marker(mod, marker, fmt);
    }
    return;
   fail:

Here is a fix that should take care if this problem.

Thanks for the bug report!

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tested-by: "Theodore Ts'o" <tytso@mit.edu>
CC: Greg KH <greg@kroah.com>
CC: David Smith <dsmith@redhat.com>
CC: Roland McGrath <roland@redhat.com>
CC: Sam Ravnborg <sam@ravnborg.org>
CC: Wenji Huang <wenji.huang@oracle.com>
CC: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
Linus Torvalds [Mon, 6 Oct 2008 21:30:02 +0000 (14:30 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  kgdb: call touch_softlockup_watchdog on resume
  kgdb, x86: Avoid invoking kgdb_nmicallback twice per NMI

16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 6 Oct 2008 21:29:16 +0000 (14:29 -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: gart iommu have direct mapping when agp is present too

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Mon, 6 Oct 2008 21:27:57 +0000 (14:27 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: workaround for bogus gcc warning in ide_sysfs_register_port()
  ide-cd: Optiarc DVD RW AD-7200A does play audio
  IDE: Fix platform device registration in Swarm IDE driver (v2)
  ide-dma: fix ide_build_dmatable() for TRM290
  ide-cd: temporary tray close fix

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Mon, 6 Oct 2008 21:27:39 +0000 (14:27 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] IP27: Fix build errors if CONFIG_MAPPED_KERNEL=y
  [MIPS] Fix CMP Kconfig configuration and mark as broken.

16 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Mon, 6 Oct 2008 21:27:15 +0000 (14:27 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (33 commits)
  V4L/DVB (9103): em28xx: HVR-900 B3C0 - fix audio clicking issue
  V4L/DVB (9099): em28xx: Add detection for K-WORLD DVB-T 310U
  V4L/DVB (9092): gspca: Bad init values for sonixj ov7660.
  V4L/DVB (9080): gspca: Add a delay after writing to the sonixj sensors.
  V4L/DVB (9075): gspca: Bad check of returned status in i2c_read() spca561.
  V4L/DVB (9053): fix buffer overflow in uvc-video
  V4L/DVB (9043): S5H1420: Fix size of shadow-array to avoid overflow
  V4L/DVB (9037): Fix support for Hauppauge Nova-S SE
  V4L/DVB (9029): Fix deadlock in demux code
  V4L/DVB (8979): sms1xxx: Add new USB product ID for Hauppauge WinTV MiniStick
  V4L/DVB (8978): sms1xxx: fix product name for Hauppauge WinTV MiniStick
  V4L/DVB (8967): Use correct XC3028L firmware for AMD ATI TV Wonder 600
  V4L/DVB (8963): s2255drv field count fix
  V4L/DVB (8961): zr36067: Fix RGBR pixel format
  V4L/DVB (8960): drivers/media/video/cafe_ccic.c needs mm.h
  V4L/DVB (8958): zr36067: Return proper bytes-per-line value
  V4L/DVB (8957): zr36067: Restore the default pixel format
  V4L/DVB (8955): bttv: Prevent NULL pointer dereference in radio_open
  V4L/DVB (8935): em28xx-cards: Remove duplicate entry (EM2800_BOARD_KWORLD_USB2800)
  V4L/DVB (8933): gspca: Disable light frquency for zc3xx cs2102 Kokom.
  ...

16 years agoatmel-mci: Initialize BLKR before sending data transfer command
Haavard Skinnemoen [Mon, 6 Oct 2008 18:09:53 +0000 (20:09 +0200)]
atmel-mci: Initialize BLKR before sending data transfer command

The atmel-mci driver sometimes fails data transfers like this:

   mmcblk0: error -5 transferring data
   end_request: I/O error, dev mmcblk0, sector 2749769
   end_request: I/O error, dev mmcblk0, sector 2749777

It turns out that this might be caused by the BLKR register (which
contains the block size and the number of blocks being transfered) being
initialized too late. This patch moves the initialization of BLKR so
that it contains the correct value before the block transfer command is
sent.

This error is difficult to reproduce, but if you insert a long delay
(mdelay(10) or thereabouts) between the calls to atmci_start_command()
and atmci_submit_data(), all transfers seem to fail without this patch,
while I haven't seen any failures with this patch.

Reported-by: Hein_Tibosch <hein_tibosch@yahoo.es>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonetrom: Fix sock_orphan() use in nr_release
Jarek Poplawski [Mon, 6 Oct 2008 19:54:57 +0000 (12:54 -0700)]
netrom: Fix sock_orphan() use in nr_release

While debugging another bug it was found that NetRom socks
are sometimes seen unorphaned in sk_free(). This patch moves
sock_orphan() in nr_release() to the beginning (like in ax25,
or rose).

Reported-and-tested-by: Bernard Pidoux f6bvp <f6bvp@free.fr>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoax25: Quick fix for making sure unaccepted sockets get destroyed.
David S. Miller [Mon, 6 Oct 2008 19:53:50 +0000 (12:53 -0700)]
ax25: Quick fix for making sure unaccepted sockets get destroyed.

Since we reverted 30902dc3cb0ea1cfc7ac2b17bcf478ff98420d74 ("ax25: Fix
std timer socket destroy handling.") we have to put some kind of fix
in to cure the issue whereby unaccepted connections do not get destroyed.

The approach used here is from Tihomir Heidelberg - 9a4gl

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoRevert "ax25: Fix std timer socket destroy handling."
David S. Miller [Mon, 6 Oct 2008 19:48:29 +0000 (12:48 -0700)]
Revert "ax25: Fix std timer socket destroy handling."

This reverts commit 30902dc3cb0ea1cfc7ac2b17bcf478ff98420d74.

It causes all kinds of problems, based upon a report by
Bernard (f6bvp) and analysis by Jarek Poplawski.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agokgdb: call touch_softlockup_watchdog on resume
Jason Wessel [Mon, 6 Oct 2008 18:50:59 +0000 (13:50 -0500)]
kgdb: call touch_softlockup_watchdog on resume

The softlockup watchdog needs to be touched when resuming the from the
kgdb stopped state to avoid the printk that a CPU is stuck if the
debugger was active for longer than the softlockup threshold.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agokgdb, x86: Avoid invoking kgdb_nmicallback twice per NMI
Jan Kiszka [Mon, 6 Oct 2008 18:50:59 +0000 (13:50 -0500)]
kgdb, x86: Avoid invoking kgdb_nmicallback twice per NMI

Stress-testing KVM's latest NMI support with kgdbts inside an SMP guest,
I came across spurious unhandled NMIs while running the singlestep test.
Looking closer at the code path each NMI takes when KGDB is enabled, I
noticed that kgdb_nmicallback is called twice per event: One time via
DIE_NMI_IPI notification, the second time on DIE_NMI. Removing the first
invocation cures the unhandled NMIs here.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
16 years agox86 ACPI: Blacklist two HP machines with buggy BIOSes
Rafael J. Wysocki [Mon, 6 Oct 2008 09:59:29 +0000 (11:59 +0200)]
x86 ACPI: Blacklist two HP machines with buggy BIOSes

There is a bug in the BIOSes of some HP boxes with AMD Turions which
connects IO-APIC pins with ACPI thermal trip points in such a way that
if the state of the IO-APIC is not as expected by the (buggy) BIOS, the
thermal trip points are set to insanely low values (usually all of them
become 16 degrees Celsius).  As a result, thermal throttling kicks in
and knock the system down to its shoes.

Unfortunately some of the recent IO-APIC changes made the bug show up.
To prevent this from happening, blacklist machines that are known to be
affected (nx6115 and 6715b in this particular case).

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=11516 listed as
a regression from 2.6.26.

On my box it was caused by:

commit 691874fa96d6349a8b60f8ea9c2bae52ece79941
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Tue May 27 21:19:51 2008 +0100

    x86: I/O APIC: timer through 8259A second-chance

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
and the whole story is described in this (huge) thread:

    http://marc.info/?l=linux-kernel&m=121358440508410&w=4

Matthew Garrett told us about that happening on the nx6125:

    http://marc.info/?l=linux-kernel&m=121396307411930&w=4

and then Maciej analysed the breakage on the basis of a DSDT from the
nx6325:

    http://marc.info/?l=linux-kernel&m=121401068718826&w=4

As far as the Dmitry's and Jason's boxes are concerned, I recognized the
symptoms and asked them to verify that the blacklisting helped.

It appears that the buggy BIOS code has been copy-pasted to the entire
range of machines, for no good reason.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Jason Vas Dias <jason.vas.dias@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoOMAP3 NAND: Enable support for nand driver on OMAP3430
Teerth Reddy [Tue, 26 Aug 2008 10:18:45 +0000 (15:48 +0530)]
OMAP3 NAND: Enable support for nand driver on OMAP3430

This patch enables the support for nand driver on 3430sdp

Signed-off-by: Teerth Reddy <teerth@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 NAND: Add NAND support on OMAP3430
Teerth Reddy [Thu, 11 Sep 2008 10:06:56 +0000 (15:36 +0530)]
OMAP3 NAND: Add NAND support on OMAP3430

This patch adds NAND support on 3430sdp board

[VS: updated for NAND_BLOCK_SIZE macros]

Signed-off-by: Teerth Reddy <teerth@ti.com>
Signed-off-by: Vimal Singh <vimal.singh@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>