]> Pileus Git - ~andy/linux/log
~andy/linux
14 years agohwmon: (w83792d) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:56 +0000 (20:35 +0100)]
hwmon: (w83792d) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (w83791d) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:55 +0000 (20:35 +0100)]
hwmon: (w83791d) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Marc Hulsman <m.hulsman@tudelft.nl>
14 years agohwmon: (w83781d) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:54 +0000 (20:35 +0100)]
hwmon: (w83781d) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (tmp401/tmp421) Clean up detect functions
Jean Delvare [Wed, 9 Dec 2009 19:35:54 +0000 (20:35 +0100)]
hwmon: (tmp401/tmp421) Clean up detect functions

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Andre Prendel <andre.prendel@gmx.de>
14 years agohwmon: (lm90) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:53 +0000 (20:35 +0100)]
hwmon: (lm90) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (lm85) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:53 +0000 (20:35 +0100)]
hwmon: (lm85) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (lm83) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:52 +0000 (20:35 +0100)]
hwmon: (lm83) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (lm77) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:52 +0000 (20:35 +0100)]
hwmon: (lm77) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (adm1025) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:51 +0000 (20:35 +0100)]
hwmon: (adm1025) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (adm1021) Clean up detect function
Jean Delvare [Wed, 9 Dec 2009 19:35:51 +0000 (20:35 +0100)]
hwmon: (adm1021) Clean up detect function

As kind is now hard-coded to -1, there is room for code clean-ups.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: New driver for the National Semiconductor LM73
Adrien Demarez [Wed, 9 Dec 2009 19:35:50 +0000 (20:35 +0100)]
hwmon: New driver for the National Semiconductor LM73

The National Semiconductor LM73 is a single temperature sensor, much
like the famous LM75.

Signed-off-by: Adrien Demarez <adrien.demarez@bolloretelecom.eu>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (w83627hf) Stop using globals for I/O port numbers
Jean Delvare [Wed, 9 Dec 2009 19:35:49 +0000 (20:35 +0100)]
hwmon: (w83627hf) Stop using globals for I/O port numbers

Stop using global variables REG and VAL for I/O port numbers. This is
ugly and unsafe.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Rodolfo Giometti <giometti@linux.it>
14 years agohwmon: (w83627hf) Drop the force_addr module parameter
Jean Delvare [Wed, 9 Dec 2009 19:35:48 +0000 (20:35 +0100)]
hwmon: (w83627hf) Drop the force_addr module parameter

This module parameter is there to workaround broken BIOS. I'm not even
sure if it was used in the past 5 years, and it gets in the way of
converting the driver to the MFD infrastructure. So tell the users how
they can do the same from user-space.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Rodolfo Giometti <giometti@linux.it>
14 years agohwmon: (it87) Check for fan2 and fan3 availability
Jean Delvare [Wed, 9 Dec 2009 19:35:48 +0000 (20:35 +0100)]
hwmon: (it87) Check for fan2 and fan3 availability

The fan2 and fan3 input and output pins can be used as GPIOs. Check
their function before exposing their sysfs attributes and accessing
their registers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (it87) Verify the VID pin usage
Jean Delvare [Wed, 9 Dec 2009 19:35:47 +0000 (20:35 +0100)]
hwmon: (it87) Verify the VID pin usage

The VID input pins can alternatively be used as GPIOs. Make sure we
have at least 4 pins used for VID, otherwise don't bother reading and
exposing VID.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Adam Nielsen <a.nielsen@shikadi.net>
14 years agohwmon: Clarify autopwm trip points documentation
Jean Delvare [Wed, 9 Dec 2009 19:35:47 +0000 (20:35 +0100)]
hwmon: Clarify autopwm trip points documentation

Document the case of hybrid automatic fan speed control
implementations, where trip points are associated to both PWM output
channels and temperature input channels.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoMAINTAINERS: Add missing hwmon files
Jean Delvare [Wed, 9 Dec 2009 19:35:46 +0000 (20:35 +0100)]
MAINTAINERS: Add missing hwmon files

Add missing documentation and header files to the hardware monitoring
subsystem section.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (s3c-hwmon) Fix build error
Ben Dooks [Wed, 9 Dec 2009 19:35:45 +0000 (20:35 +0100)]
hwmon: (s3c-hwmon) Fix build error

The previous patch, commit be4c23c93c4828d36ac9e1a88410618a61676426 was
from the wrong tree and thus broke the current build which had the
channel configuration name changed.

Fix the following build errors:

drivers/hwmon/s3c-hwmon.c: In function 's3c_hwmon_probe':
drivers/hwmon/s3c-hwmon.c:326: warning: initialization from incompatible pointer type
drivers/hwmon/s3c-hwmon.c:331: error: dereferencing pointer to incomplete type
drivers/hwmon/s3c-hwmon.c:336: error: dereferencing pointer to incomplete type

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Wed, 9 Dec 2009 17:16:15 +0000 (18:16 +0100)]
Merge branch 'topic/asoc' into for-linus

14 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Wed, 9 Dec 2009 17:16:11 +0000 (18:16 +0100)]
Merge branch 'topic/hda' into for-linus

14 years agoMAINTAINERS: Add OMAP2/3 DSS and OMAPFB maintainer
Tomi Valkeinen [Tue, 22 Sep 2009 10:30:24 +0000 (13:30 +0300)]
MAINTAINERS: Add OMAP2/3 DSS and OMAPFB maintainer

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: SDP: Enable DSS2 for OMAP3 SDP board
Tomi Valkeinen [Wed, 9 Dec 2009 16:25:18 +0000 (18:25 +0200)]
OMAP: SDP: Enable DSS2 for OMAP3 SDP board

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP: DSS2: Taal DSI command mode panel driver
Tomi Valkeinen [Wed, 28 Oct 2009 09:31:05 +0000 (11:31 +0200)]
OMAP: DSS2: Taal DSI command mode panel driver

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: Add generic and Sharp panel drivers
Tomi Valkeinen [Wed, 9 Dec 2009 16:19:42 +0000 (18:19 +0200)]
OMAP: DSS2: Add generic and Sharp panel drivers

Add Generic panel (user for DVI output) and Sharp LS037V7DW01 LCD panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoMerge branch 'bkl-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 9 Dec 2009 16:07:51 +0000 (08:07 -0800)]
Merge branch 'bkl-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'bkl-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  mn10300: Remove the BKL from sys_execve
  m68knommu: Remove the BKL from sys_execve
  m68k: Remove the BKL from sys_execve
  h83000: Remove BKL from sys_execve
  frv: Remove the BKL from sys_execve
  blackfin: Remove the BKL from sys_execve
  um: Remove BKL from mmapper
  um: Remove BKL from random
  s390: Remove BKL from prng

14 years agoMerge branch 'bkl-drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 9 Dec 2009 16:07:38 +0000 (08:07 -0800)]
Merge branch 'bkl-drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'bkl-drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  agp: Remove the BKL from agp_open
  inifiband: Remove BKL from ipath_open()
  mips: Remove BKL from tb0219
  drivers: Remove BKL from scx200_gpio
  drivers: Remove BKL from pc8736x_gpio
  parisc: Remove BKL from eisa_eeprom
  rtc: Remove BKL from efirtc
  input: Remove BKL from hp_sdc_rtc
  hw_random: Remove BKL from core
  macintosh: Remove BKL from ans-lcd
  nvram: Drop the bkl from non-generic nvram_llseek()
  nvram: Drop the bkl from nvram_llseek()
  mem_class: Drop the bkl from memory_open()
  spi: Remove BKL from spidev_open
  drivers: Remove BKL from cs5535_gpio
  drivers: Remove BKL from misc_open

14 years agoMerge branch 'bkl-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 9 Dec 2009 16:07:17 +0000 (08:07 -0800)]
Merge branch 'bkl-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'bkl-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sys: Remove BKL from sys_reboot
  pm_qos: clean up racy global "name" variable
  pm_qos: remove BKL

14 years agoMerge branch 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 9 Dec 2009 15:58:15 +0000 (07:58 -0800)]
Merge branch 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing

* 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: (31 commits)
  kill-the-bkl/reiserfs: turn GFP_ATOMIC flag to GFP_NOFS in reiserfs_get_block()
  kill-the-bkl/reiserfs: drop the fs race watchdog from _get_block_create_0()
  kill-the-bkl/reiserfs: definitely drop the bkl from reiserfs_ioctl()
  kill-the-bkl/reiserfs: always lock the ioctl path
  kill-the-bkl/reiserfs: fix reiserfs lock to cpu_add_remove_lock dependency
  kill-the-bkl/reiserfs: Fix induced mm->mmap_sem to sysfs_mutex dependency
  kill-the-bkl/reiserfs: panic in case of lock imbalance
  kill-the-bkl/reiserfs: fix recursive reiserfs write lock in reiserfs_commit_write()
  kill-the-bkl/reiserfs: fix recursive reiserfs lock in reiserfs_mkdir()
  kill-the-bkl/reiserfs: fix "reiserfs lock" / "inode mutex" lock inversion dependency
  kill-the-bkl/reiserfs: move the concurrent tree accesses checks per superblock
  kill-the-bkl/reiserfs: acquire the inode mutex safely
  kill-the-bkl/reiserfs: unlock only when needed in search_by_key
  kill-the-bkl/reiserfs: use mutex_lock in reiserfs_mutex_lock_safe
  kill-the-bkl/reiserfs: factorize the locking in reiserfs_write_end()
  kill-the-bkl/reiserfs: reduce number of contentions in search_by_key()
  kill-the-bkl/reiserfs: don't hold the write recursively in reiserfs_lookup()
  kill-the-bkl/reiserfs: lock only once on reiserfs_get_block()
  kill-the-bkl/reiserfs: conditionaly release the write lock on fs_changed()
  kill-the-BKL/reiserfs: add reiserfs_cond_resched()
  ...

14 years agoALSA: ice1724 - aureon - modify WM8770 Master & DAC volume
Jaroslav Kysela [Wed, 9 Dec 2009 11:43:44 +0000 (12:43 +0100)]
ALSA: ice1724 - aureon - modify WM8770 Master & DAC volume

The volume levels in original implementation are incorrect and does
not match the dB scale. The real range is linear (in the sense of
the dB scale) from 0dB to -100dB. Remove logaritmic table and make
all volumes from range 0dB..100dB.

The tests are in RedHat's bugzilla #540817.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda/realtek: quirk for D945GCLF2 mainboard
David Santinoli [Wed, 9 Dec 2009 11:34:26 +0000 (12:34 +0100)]
ALSA: hda/realtek: quirk for D945GCLF2 mainboard

Quirk for the ALC662 found on the Intel D945GCLF2 (and possibly other)
mainboards.

Signed-off-by: David Santinoli <david@santinoli.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Terradici HDA controllers does not support 64-bit mode
Jaroslav Kysela [Wed, 9 Dec 2009 09:44:47 +0000 (10:44 +0100)]
ALSA: hda - Terradici HDA controllers does not support 64-bit mode

Confirmed from vendor and tests in RedHat bugzilla #536782 .

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: document: Add direct git link to grub hda-analyzer
Alexey Fisher [Wed, 9 Dec 2009 08:42:07 +0000 (09:42 +0100)]
ALSA: document: Add direct git link to grub hda-analyzer

Just to save some time, add direct git link to grub hda-analyzer

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoOMAP: DSS2: omapfb driver
Tomi Valkeinen [Tue, 4 Aug 2009 13:12:50 +0000 (16:12 +0300)]
OMAP: DSS2: omapfb driver

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: DSI driver
Tomi Valkeinen [Wed, 28 Oct 2009 09:59:56 +0000 (11:59 +0200)]
OMAP: DSS2: DSI driver

DSI (Display Serial Interface) driver implements MIPI DSI interface.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: SDI driver
Tomi Valkeinen [Wed, 5 Aug 2009 13:18:44 +0000 (16:18 +0300)]
OMAP: DSS2: SDI driver

SDI (Serial Display Interface) implements TI Flatlink 3G display
interface.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: RFBI driver
Tomi Valkeinen [Wed, 5 Aug 2009 13:18:31 +0000 (16:18 +0300)]
OMAP: DSS2: RFBI driver

RFBI (Remote FrameBuffer Interface) implements MIPI DBI interface.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: Video encoder driver
Tomi Valkeinen [Wed, 5 Aug 2009 13:18:06 +0000 (16:18 +0300)]
OMAP: DSS2: Video encoder driver

VENC (video encoder) driver implements OMAP's analog S-Video/Composite
TV-out.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP: DSS2: DPI driver
Tomi Valkeinen [Fri, 7 Aug 2009 10:15:50 +0000 (13:15 +0300)]
OMAP: DSS2: DPI driver

This implements MIPI DPI interface.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: DISPC
Tomi Valkeinen [Thu, 12 Nov 2009 09:41:42 +0000 (11:41 +0200)]
OMAP: DSS2: DISPC

This file implements DISPC (display controller) block of the OMAP DSS.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: Add more core files
Tomi Valkeinen [Fri, 7 Aug 2009 10:43:20 +0000 (13:43 +0300)]
OMAP: DSS2: Add more core files

Add more core files to DSS2.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: Display Subsystem Driver core
Tomi Valkeinen [Tue, 3 Nov 2009 09:23:50 +0000 (11:23 +0200)]
OMAP: DSS2: Display Subsystem Driver core

The core files of DSS2. DSS2 commits are split a bit artificially to
make the individual commits smaller, and DSS2 doesn't compile properly
without the rest of the core commits. This shouldn't be a problem, as no
configuration uses DSS2 yet.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: DSS2: Documentation for DSS2
Tomi Valkeinen [Tue, 4 Aug 2009 12:47:11 +0000 (15:47 +0300)]
OMAP: DSS2: Documentation for DSS2

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: Add support for VRFB rotation engine
Tomi Valkeinen [Fri, 7 Aug 2009 09:04:26 +0000 (12:04 +0300)]
OMAP: Add support for VRFB rotation engine

VRFB rotation engine is a block in OMAP2/3 that offers 12 independent
contexts that can be used for framebuffer rotation.

Each context has a backend area of real memory, where it stores the
pixels in undisclosed format. This memory is offered to users via 4
virtual memory areas, which see the same memory area in different
rotation angles (0, 90, 180 and 270 degrees).

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: Add VRAM manager
Tomi Valkeinen [Fri, 7 Aug 2009 09:01:55 +0000 (12:01 +0300)]
OMAP: Add VRAM manager

Add a Video RAM manager for OMAP 2 and 3 platforms. VRAM manager is used
to allocate large continuous blocks of SDRAM or SRAM. The features VRAM
manager has that are missing from dma_alloc_* functions are:

- Support for OMAP2's SRAM
- Allocate without ioremapping
- Allocate at defined physical addresses
- Allows larger VRAM area and larger allocations

The upcoming DSS2 uses VRAM manager.

VRAM area size can be defined in kernel config, board file or with
kernel boot parameters. Board file definition overrides kernel config,
and boot parameter overrides kernel config and board file.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
14 years agoOMAP: OMAPFB: add omapdss device
Tomi Valkeinen [Thu, 18 Jun 2009 10:02:39 +0000 (13:02 +0300)]
OMAP: OMAPFB: add omapdss device

The upcoming new display subsystem driver is divided to two devices,
omapdss and omapfb, of which omapdss handles the actual hardware.

This patch adds a dummy omapdss platform device for the current omapfb
driver, which is then used to get the clocks. This will make it possible
for the current and the new display drivers to co-exist.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP: OMAPFB: split omapfb.h
Tomi Valkeinen [Mon, 3 Aug 2009 12:06:36 +0000 (15:06 +0300)]
OMAP: OMAPFB: split omapfb.h

Split arch/arm/plat-omap/include/mach/omapfb.h into two files:

include/linux/omapfb.h - ioctls etc for userspace and some kernel
                         stuff for board files
drivers/video/omap/omapfb.h - for omapfb internal use

This cleans up omapfb.h and also makes it easier for the upcoming new
DSS driver to co-exist with the old driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
14 years agoOMAP2: Add funcs for writing SMS_ROT_* registers
Tomi Valkeinen [Fri, 7 Aug 2009 08:26:12 +0000 (11:26 +0300)]
OMAP2: Add funcs for writing SMS_ROT_* registers

SMS_ROT_* registers are used by VRFB rotation engine.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
14 years agox86: Print DMI_BOARD_NAME as well as DMI_PRODUCT_NAME from __show_regs()
Andy Isaacson [Tue, 8 Dec 2009 08:30:21 +0000 (00:30 -0800)]
x86: Print DMI_BOARD_NAME as well as DMI_PRODUCT_NAME from __show_regs()

Robert Hancock observes that DMI_BOARD_NAME is often more useful
than DMI_PRODUCT_NAME, especially on standalone motherboards.
So, print both.

Signed-off-by: Andy Isaacson <adi@hexapodia.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Robert Hancock <hancockrwd@gmail.com>
Cc: Richard Zidlicky <rz@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <20091208083021.GB27174@hexapodia.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: Factor duplicated code out of __show_regs() into show_regs_common()
Andy Isaacson [Tue, 8 Dec 2009 08:29:42 +0000 (00:29 -0800)]
x86: Factor duplicated code out of __show_regs() into show_regs_common()

Unify x86_32 and x86_64 implementations of __show_regs() header,
standardizing on the x86_64 format string in the process. Also,
32-bit will now call print_modules.

Signed-off-by: Andy Isaacson <adi@hexapodia.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Robert Hancock <hancockrwd@gmail.com>
Cc: Richard Zidlicky <rz@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <20091208082942.GA27174@hexapodia.org>
[ v2: resolved conflict ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agodrm/i915: Remove a debugging printk from hangcheck
Chris Wilson [Tue, 8 Dec 2009 22:12:06 +0000 (22:12 +0000)]
drm/i915: Remove a debugging printk from hangcheck

A residual bare printk survived the merger of the hang detector, remove
this debugging left-over.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agoarch/x86/kernel/microcode*: Use pr_fmt() and remove duplicated KERN_ERR prefix
Joe Perches [Wed, 9 Dec 2009 06:30:50 +0000 (22:30 -0800)]
arch/x86/kernel/microcode*: Use pr_fmt() and remove duplicated KERN_ERR prefix

- Use #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
- Remove "microcode: " prefix from each pr_<level>
- Fix duplicated KERN_ERR prefix
- Coalesce pr_<level> format strings
- Add a space after an exclamation point

No other change in output.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
LKML-Reference: <1260340250.27677.191.camel@Joe-Laptop.home>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'linus' into x86/urgent
Ingo Molnar [Wed, 9 Dec 2009 07:24:25 +0000 (08:24 +0100)]
Merge branch 'linus' into x86/urgent

Merge reason: We want to queue up a dependent patch.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agodrm/radeon/kms: make sure i2c id matches
Alex Deucher [Tue, 8 Dec 2009 19:30:49 +0000 (14:30 -0500)]
drm/radeon/kms: make sure i2c id matches

Entries in the i2c table aren't always ordered
by id.  This allows us to remove some quirks
that are no longer needed.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: make sure ss id matches
Alex Deucher [Tue, 8 Dec 2009 19:07:03 +0000 (14:07 -0500)]
drm/radeon/kms: make sure ss id matches

entries in the ss table aren't always ordered
by id.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: connector fixes
Alex Deucher [Tue, 8 Dec 2009 17:48:20 +0000 (12:48 -0500)]
drm/radeon/kms: connector fixes

- Don't add dac load detection property to DVI-D
- Make sure i2c info is valid before adding DP aux chan bus
- Don't create scaling_mode_property twice
- fix typo that prevented coherent and load detection from working
- add coherent prop to DP (for dp->dvi adapters)

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge branches 'timers-for-linus-ntp' and 'irq-core-for-linus' of git://git.kernel...
Linus Torvalds [Wed, 9 Dec 2009 03:30:19 +0000 (19:30 -0800)]
Merge branches 'timers-for-linus-ntp' and 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus-ntp' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ntp: Provide compability defines (You say MOD_NANO, I say ADJ_NANO)

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: do not execute DEBUG_SHIRQ when irq setup failed

14 years agodrm/ttm: fix memory leak noticed by kmemleak.
Dave Airlie [Tue, 8 Dec 2009 05:58:08 +0000 (15:58 +1000)]
drm/ttm: fix memory leak noticed by kmemleak.

If we don't need the zone we need to free it.

Acked-By: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge branch 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 9 Dec 2009 03:28:09 +0000 (19:28 -0800)]
Merge branch 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: Fix /proc/timer_list regression
  itimers: Fix racy writes to cpu_itimer fields
  timekeeping: Fix clock_gettime vsyscall time warp

14 years agodrm: disable all the possible outputs/crtcs before entering KMS mode
Zhao Yakui [Wed, 9 Dec 2009 03:23:42 +0000 (11:23 +0800)]
drm: disable all the possible outputs/crtcs before entering KMS mode

Sometimes we will use a crtc for integerated LVDS, which is different with
that assigned by BIOS. If we want to get flicker-free transitions,
then we could read out the current state for it and set our current state
accordingly.

But it is true that if we aren't reading current state out, we do need
to turn everything off before modesetting.  Otherwise the clocks can get very
angry and we get things worse than a flicker at boot.
In fact we also do the similar thing in UMS mode. We will disable all the
possible outputs/crtcs for the first modesetting.

So we disable all the possible outputs/crtcs before entering the KMS mode.
Before we configure connector/encoder/crtc, the function of
drm_helper_disable_unused_function can disable all the possible outputs/crtcs.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rafal Milecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 9 Dec 2009 03:27:08 +0000 (19:27 -0800)]
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  timers, init: Limit the number of per cpu calibration bootup messages
  posix-cpu-timers: optimize and document timer_create callback
  clockevents: Add missing include to pacify sparse
  x86: vmiclock: Fix printk format
  x86: Fix printk format due to variable type change
  sparc: fix printk for change of variable type
  clocksource/events: Fix fallout of generic code changes
  nohz: Allow 32-bit machines to sleep for more than 2.15 seconds
  nohz: Track last do_timer() cpu
  nohz: Prevent clocksource wrapping during idle
  nohz: Type cast printk argument
  mips: Use generic mult/shift factor calculation for clocks
  clocksource: Provide a generic mult/shift factor calculation
  clockevents: Use u32 for mult and shift factors
  nohz: Introduce arch_needs_cpu
  nohz: Reuse ktime in sub-functions of tick_check_idle.
  time: Remove xtime_cache
  time: Implement logarithmic time accumulation

14 years agoMerge branch 'timers-for-linus-hpet' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 9 Dec 2009 03:26:55 +0000 (19:26 -0800)]
Merge branch 'timers-for-linus-hpet' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus-hpet' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: hpet: Make WARN_ON understandable
  x86: arch specific support for remapping HPET MSIs
  intr-remap: generic support for remapping HPET MSIs
  x86, hpet: Simplify the HPET code
  x86, hpet: Disable per-cpu hpet timer if ARAT is supported

14 years agoi2c-pnx: Map I2C adapter number to platform ID number
Kevin Wells [Wed, 11 Nov 2009 23:34:17 +0000 (00:34 +0100)]
i2c-pnx: Map I2C adapter number to platform ID number

Map I2C adapter number to platform ID number

Signed-off-by: Kevin Wells <kevin.wells@nxp.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-omap: OMAP3: PM: (re)init for every transfer to support off-mode
Rajendra Nayak [Mon, 23 Nov 2009 16:59:18 +0000 (08:59 -0800)]
i2c-omap: OMAP3: PM: (re)init for every transfer to support off-mode

Because of OMAP off-mode, powerdomain can go off when I2C is idle.
Save enough state, and do a re-init for each transfer.

Additional save/restore state added by Jagadeesh Bhaskar Pakaravoor
(SYSC_REG) and Aaro Koskinen (wakeup sources.)

Also, The OMAP3430 TRM states:

"During active mode (I2Ci.I2C_CON[15] I2C_EN bit is set to 1), make no
changes to the I2Ci.I2C_SCLL and I2Ci.I2C_SCLH registers.  Changes may
result in unpredictable behavior."

Hence, the I2C_EN bit should be clearer when modifying these
registers. Please note that clearing the entire I2C_CON register to
disable the I2C module is safe, because the I2C_CON register is
re-configured for each transfer.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Jon Hunter <jon-hunter@ti.com>
Cc: Hu Tao <taohu@motorola.com>
Cc: Xiaolong Chen <A21785@motorola.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: i2c_dw_handle_tx_abort: Use dev_dbg() for NOACK cases
Shinya Kuribayashi [Mon, 16 Nov 2009 11:40:14 +0000 (20:40 +0900)]
i2c-designware: i2c_dw_handle_tx_abort: Use dev_dbg() for NOACK cases

In the case of no-ACKs, we don't want to see dev_err() messages in the
console, because some utilities like i2c-tools are capable of printing
decorated console output.  This patch will ease such situations.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Cosmetic cleanups
Shinya Kuribayashi [Fri, 6 Nov 2009 12:52:22 +0000 (21:52 +0900)]
i2c-designware: Cosmetic cleanups

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Tx abort cleanups
Shinya Kuribayashi [Fri, 6 Nov 2009 12:51:57 +0000 (21:51 +0900)]
i2c-designware: Tx abort cleanups

* ABRT_MASTER_DIS: Fix a typo.

* i2c_dw_handle_tx_abort: Return an appropriate error number
  depending on abort_source.

* i2c_dw_xfer: Add a missing abort_source initialization.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Skip RX_FULL and TX_EMPTY bits on tx abort errors
Shinya Kuribayashi [Fri, 6 Nov 2009 12:51:36 +0000 (21:51 +0900)]
i2c-designware: Skip RX_FULL and TX_EMPTY bits on tx abort errors

Suppose TX_ABRT occurs in the middle of processing i2c_msg msgs[], and
a STOP condition has already been generated on the bus.  In this case,
subsequent i2c_dw_xfer_msg() might initiate a new and unnecessary I2C
transaction, which we'd have to avoid.

Furthermore, anytime TX_ABRT is set, the contents of tx/rx buffers are
flushed, so we don't have to process RX_FULL and TX_EMPTY.

Disable interrupts, and skip them.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: i2c_dw_xfer_msg: Fix error handling procedures
Shinya Kuribayashi [Fri, 6 Nov 2009 12:51:18 +0000 (21:51 +0900)]
i2c-designware: i2c_dw_xfer_msg: Fix error handling procedures

Current error handling procedures are not good in two respects:

* Forgot to mark dev->cmd_complete as "completed" on errors

  Once an I2C transaction is initiated, wait_for_completion_
  interruptible_timeout() waits for dev->cmd_complete to be completed.
  We have to take care of it whenever an error is detected, otherwise
  we will have a needless HZ timeout.

* Forgot to disable interrupts

  In the previous patch, interrupt mask operations have been changed.
  We don't disable interrupts at the end of the interrupt handler any
  more, and try to keep RX_FULL (and TX_EMPTY if required) enabled
  during the transaction so that we can send longer data than the size
  of Tx/Rx FIFO.

  If an error is detected, we need to disable interrupts before
  quitting current transaction.

We can work around above points using dev->msg_err effectively.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Disable TX_EMPTY when all i2c_msg msgs has been processed
Shinya Kuribayashi [Fri, 6 Nov 2009 12:51:00 +0000 (21:51 +0900)]
i2c-designware: Disable TX_EMPTY when all i2c_msg msgs has been processed

Currently we disable TX_EMPTY interrupt when buf_len is zero, but this
is wrong.  (buf_len == 0) means that all transmit data in the current
i2c_msg message has been sent out, but that doesn't necessarily mean
all i2c_msg messages have been processed.

TX_EMPTY interrupt is used as the driving force of DW I2C transactions,
so we need to keep it enabled as long as i2c_msg messages are available.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Process all i2c_msg messages in the interrupt handler
Shinya Kuribayashi [Fri, 6 Nov 2009 12:50:40 +0000 (21:50 +0900)]
i2c-designware: Process all i2c_msg messages in the interrupt handler

Currently we process the first i2c_dw_xfer_msg() in i2c_dw_xfer(),
but in this case there is a possibility to be interrupted by certain
interrupts.  As described before in this patchset, we need to keep
providing new transmit data within a given time period, otherwise Tx
FIFO underrun takes place and STOP condition will be generated on the
bus, even if we have more bytes to be written.

In order to exclude all such possibilities, change TX_EMPTY interrupt
usage as below:

* DW_IC_INTR_DEFAULT_MASK: Define a default interrupt mask set, and
  put TX_EMPTY there.

* i2c_dw_xfer_init: Enable DW_IC_INTR_DEFAULT_MASK prior to initiating
  a new I2C transaction.  The first TX_EMPTY will be triggered shortly.
  With the help of it, we can make the first call to i2c_dw_xfer_msg()
  in the interrupt handler.

* i2c_dw_xfer_msg: Fixup intr_mask operation accordingly.  Make sure
  that TX_EMPTY operations need to be reversed.

* request_irq: Set IRQF_DISABLED so that we could load transmit data
  into Tx FIFO without being distracted by other interrupts.

* Remove i2c_dw_xfer_msg() in i2c_dw_xfer().

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: i2c_dw_read: Remove redundant target address checker
Shinya Kuribayashi [Fri, 6 Nov 2009 12:50:22 +0000 (21:50 +0900)]
i2c-designware: i2c_dw_read: Remove redundant target address checker

I2c_dw_xfer_msg() also has the same target address inconsistency check,
and furthermore it checks across all i2c_msg messages, while
i2c_dw_read() walks through i2c_msg messages only with_ I2C_M_RD flag.
That is, target address check in i2c_dw_read() is redundant and useless.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: i2c_dw_func: Set I2C_FUNC_SMBUS_foo bits
Shinya Kuribayashi [Fri, 6 Nov 2009 12:50:02 +0000 (21:50 +0900)]
i2c-designware: i2c_dw_func: Set I2C_FUNC_SMBUS_foo bits

Set proper I2C_FUNC_SMBUS_* bits so that the driver could be used with
some utilities requiring SMBus functionalities, such as i2c-tools.

Note that DW I2C core doesn't support I2C_FUNC_SMBUS_QUICK, as it's not
capable of zero-length data transactions.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Initialize byte count variables just prior to being used
Shinya Kuribayashi [Fri, 6 Nov 2009 12:49:39 +0000 (21:49 +0900)]
i2c-designware: Initialize byte count variables just prior to being used

As the driver and hardware always process the given data in parallel,
then it would be better to initialize tx_limit, rx_limit and rx_valid
variables just prior to being used.

This will help us to send / receive as much data as possible.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: i2c_dw_xfer_msg: Introduce a local "buf" pointer
Shinya Kuribayashi [Fri, 6 Nov 2009 12:49:14 +0000 (21:49 +0900)]
i2c-designware: i2c_dw_xfer_msg: Introduce a local "buf" pointer

While we have a local variable "buf_len" for dev->tx_buf_len, we don't
have such local variable for dev->tx_buf pointer.  While "buf_len" is
restored at first then updated when we start processing a new i2c_msg
(determined by STATUS_WRITE_IN_PROGRESS flag), ->tx_buf is different.

Such inconsistency makes the code slightly hard to follow.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Divide i2c_dw_xfer_msg into two functions
Shinya Kuribayashi [Fri, 6 Nov 2009 12:48:55 +0000 (21:48 +0900)]
i2c-designware: Divide i2c_dw_xfer_msg into two functions

We have some steps at the top of i2c_dw_xfer_msg() to set up a slave
address and enable DW I2C core.  And it's executed only when we don't
have STATUS_WRITE_IN_PROGRESS.

But we need to make sure that STATUS_WRITE_IN_PROGRESS only indicates
that we have a pending i2c_msg to process.  In other words, even if
STATUS_WRITE_IN_PROGRESS is not set, that doesn't mean we're at initial
state in the I2C transaction.

Since i2c_dw_xfer_msg() will be invoked again and again during a
transaction, those init steps have a possibility to be re-processed
needlessly.  For example, this issue easily takes place when processing
a combined transaction with a certain condition (the number of tx bytes
in the first i2c_msg, equals to the Tx FIFO depth).

Consequently we should not use STATUS_WRITE_IN_PROGRESS to determine
where we're at in an I2C transaction.  It would be better to separate
those initialization steps from i2c_dw_xfer_msg().

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Enable RX_FULL interrupt
Shinya Kuribayashi [Fri, 6 Nov 2009 12:48:33 +0000 (21:48 +0900)]
i2c-designware: Enable RX_FULL interrupt

Enable RX_FULL interrupt mask by default, and hook it in the interrupt
handler.  If requested amount of rx data (defined by IC_RX_TL) is not
available, we don't have to process i2c_dw_read().

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Set Tx/Rx FIFO threshold levels
Shinya Kuribayashi [Fri, 6 Nov 2009 12:48:12 +0000 (21:48 +0900)]
i2c-designware: Set Tx/Rx FIFO threshold levels

As a hardware feature, DW I2C core generates a STOP condition whenever
the Tx FIFO becomes empty (strictly speaking, whenever the last byte in
the Tx FIFO is sent out), even if we have more bytes to be written.

In other words, we must never make "Tx FIFO underrun" happen during
a transaction, except for the last byte.  For the safety's sake, we'd
make TX_EMPTY interrupt get triggered every time one byte is processed.

The Rx FIFO threshold needs to be set as well.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Process i2c_msg messages in the interrupt handler
Shinya Kuribayashi [Fri, 6 Nov 2009 12:47:51 +0000 (21:47 +0900)]
i2c-designware: Process i2c_msg messages in the interrupt handler

Symptom:
--------
When we're going to send/receive the longer size of data than the Tx
FIFO length, the I2C transaction will be divided into several separated
transactions, limited by the Tx FIFO length.

Details:
--------
As a hardware feature, DW I2C core generates a STOP condition whenever
the Tx FIFO becomes empty (strictly speaking, whenever the last byte in
the Tx FIFO is sent out), even if we have more bytes to be written.
Then, once a new transmit data is written to the Tx FIFO, DW I2C core
will initiate a new transaction, which leads to another START condition.

This explains how the transaction in question goes, and implies that
current tasklet-based dw_i2c_pump_msg() strategy couldn't meet the
timing constraint required for avoiding Tx FIFO underrun.

To avoid this scenario, we must keep providing new transmit data within
a given time period.  In case of Fast-mode + 32-byte Tx FIFO, for
instance, it takes about 22.5[us] to process single byte, and 720[us] in
total.

This patch removes the existing tasklet-based "pump" system, and move
its jobs into the interrupt handler.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: i2c_dw_xfer_msg: Fix i2c_msg search bug
Shinya Kuribayashi [Fri, 6 Nov 2009 12:47:30 +0000 (21:47 +0900)]
i2c-designware: i2c_dw_xfer_msg: Fix i2c_msg search bug

In case a work-in-progress i2c_msg has more bytes to be written, we
need to set STATUS_WRITE_IN_PROGRESS and exit from the msg_write_idx-
searching loop.  Otherwise, we will overtake the current msg_write_idx
without waiting for its transmission to be processed.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Improved _HCNT/_LCNT calculation
Shinya Kuribayashi [Fri, 6 Nov 2009 12:47:01 +0000 (21:47 +0900)]
i2c-designware: Improved _HCNT/_LCNT calculation

* Calculate with accurate conditional expressions from DW manuals.
* Round ic_clk by adding 0.5 as it's important at high ic_clk rate.
* Take into account "tHD;STA" issue for _HCNT calculation.
* Take into account "tf" for _LCNT calculation.
* Add "cond" and "offset" fot further correction requirements.

For _HCNT calculation, there's one issue needs to be carefully
considered; DesignWare I2C core doesn't seem to have solid strategy
to meet the tHD;STA timing spec.  If you configure _HCNT based on the
tHIGH timing spec, it easily results in violation of the tHD;STA spec.

After many trials, we came to the conclusion that the tHD;STA period
is proportional to (_HCNT + 3).  For the safety's sake, this should be
selected by default.

As for _LCNT calculation, DW I2C core has one characteristic behavior;
he starts counting the SCL CNTs for the LOW period of the SCL clock
(tLOW) as soon as it pulls the SCL line.  At that time, he doesn't take
into account the fall time of SCL signal (tf), IOW, he starts counting
CNTs without confirming the SCL input voltage has dropped to below VIL.

This characteristics becomes a problem on some platforms where tf is
considerably long, and results in violation of the tLOW timing spec.

To make the driver configurable as much as possible for various cases,
we'd have separated arguments "tf" and "offset", and for safety default
values should be 0.3 us and 0, respectively.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Remove an useless local variable "num"
Shinya Kuribayashi [Fri, 6 Nov 2009 12:46:29 +0000 (21:46 +0900)]
i2c-designware: Remove an useless local variable "num"

We couldn't know the original intent for this variable, but at this
point it's useless.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: i2c_dw_xfer_msg: Use "struct dw_i2c_dev" pointer
Shinya Kuribayashi [Fri, 6 Nov 2009 12:46:04 +0000 (21:46 +0900)]
i2c-designware: i2c_dw_xfer_msg: Use "struct dw_i2c_dev" pointer

We don't have to use "struct i2c_adapter" pointer here.
Let's use a local "struct dw_i2c_dev" pointer, instead.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: i2c_dw_read: Use "struct dw_i2c_dev" pointer
Shinya Kuribayashi [Fri, 6 Nov 2009 12:45:39 +0000 (21:45 +0900)]
i2c-designware: i2c_dw_read: Use "struct dw_i2c_dev" pointer

We don't have to use "struct i2c_adapter" pointer here.
Let's use a local "struct dw_i2c_dev" pointer, instead.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Use platform_get_irq helper
Shinya Kuribayashi [Fri, 6 Nov 2009 12:45:07 +0000 (21:45 +0900)]
i2c-designware: Use platform_get_irq helper

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Don't use the IC_CLR_INTR register to clear interrupts
Shinya Kuribayashi [Fri, 6 Nov 2009 12:44:37 +0000 (21:44 +0900)]
i2c-designware: Don't use the IC_CLR_INTR register to clear interrupts

We're strongly discouraged from using the IC_CLR_INTR register because
it clears all software-clearable interrupts asserted at the moment.

  stat = readl(IC_INTR_STAT);
    :
    :  <=== Interrupts asserted during this period will be lost
    :
  readl(IC_CLR_INTR);

Instead, use the separately-prepared IC_CLR_* registers.

At the same time, this patch adds all remaining interrupt definitions
available in the DesignWare I2C hardware.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoi2c-designware: Consolidate to use 32-bit word accesses
Shinya Kuribayashi [Fri, 6 Nov 2009 12:43:52 +0000 (21:43 +0900)]
i2c-designware: Consolidate to use 32-bit word accesses

This driver looks originally meant for armel machines where readw()/
writew() works perfectly fine with this hardware.  But that doens't
work for big-endian systems.

This patch converts all 8/16-bit-aware usages to 32-bit variants.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Tue, 8 Dec 2009 23:55:13 +0000 (15:55 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  hwrng: core - Prevent too-small buffer sizes
  hwrng: virtio-rng - Convert to new API
  hwrng: core - Replace u32 in driver API with byte array
  crypto: ansi_cprng - Move FIPS functions under CONFIG_CRYPTO_FIPS
  crypto: testmgr - Add ghash algorithm test before provide to users
  crypto: ghash-clmulni-intel - Put proper .data section in place
  crypto: ghash-clmulni-intel - Use gas macro for PCLMULQDQ-NI and PSHUFB
  crypto: aesni-intel - Use gas macro for AES-NI instructions
  x86: Generate .byte code for some new instructions via gas macro
  crypto: ghash-intel - Fix irq_fpu_usable usage
  crypto: ghash-intel - Add PSHUFB macros
  crypto: ghash-intel - Hard-code pshufb
  crypto: ghash-intel - Fix building failure on x86_32
  crypto: testmgr - Fix warning
  crypto: ansi_cprng - Fix test in get_prng_bytes
  crypto: hash - Remove cra_u.{digest,hash}
  crypto: api - Remove digest case from procfs show handler
  crypto: hash - Remove legacy hash/digest code
  crypto: ansi_cprng - Add FIPS wrapper
  crypto: ghash - Add PCLMULQDQ accelerated implementation

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Tue, 8 Dec 2009 23:55:00 +0000 (15:55 -0800)]
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:
  [WATCHDOG] iTCO_wdt.c - cleanup chipset documentation
  [WATCHDOG] iTCO_wdt: Add support for Intel Ibex Peak
  [WATCHDOG] CPUFREQ: S3C24XX Watchdog frequency scaling support.

14 years ago[IA64] Fix cut/paste detritus from unistd.h
Tony Luck [Tue, 8 Dec 2009 23:29:05 +0000 (15:29 -0800)]
[IA64] Fix cut/paste detritus from unistd.h

Build warning:
<stdin>:1523:2: warning: #warning syscall recvmmsg not implemented

Because when recvmmesg was added, the previous syscall define was
cut&pasted, and a spurious "rt_" left in the name of the define.

Signed-off-by: Tony Luck <tony.luck@intel.com>
14 years agoARM: S3C24XX: DMA: Use valid index when accessing array
Ramax Lo [Tue, 8 Dec 2009 15:42:41 +0000 (23:42 +0800)]
ARM: S3C24XX: DMA: Use valid index when accessing array

The DMA_CH_VALID bit used in the channel index should be masked out before
using it to access the channel array.

Signed-off-by: Ramax Lo <ramaxlo@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoMerge branch 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 8 Dec 2009 21:38:33 +0000 (13:38 -0800)]
Merge branch 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  cpumask: Use modern cpumask style in Xen

14 years agoMerge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 8 Dec 2009 21:38:21 +0000 (13:38 -0800)]
Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: UV RTC: Always enable RTC clocksource
  x86: UV RTC: Rename generic_interrupt to x86_platform_ipi
  x86: UV RTC: Clean up error handling
  x86: UV RTC: Add clocksource only boot option
  x86: UV RTC: Fix early expiry handling

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 8 Dec 2009 21:38:11 +0000 (13:38 -0800)]
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, mce: don't restart timer if disabled
  x86: Use -maccumulate-outgoing-args for sane mcount prologues
  x86: Prevent GCC 4.4.x (pentium-mmx et al) function prologue wreckage
  x86: AMD Northbridge: Verify NB's node is online
  x86 VSDO: Fix Kconfig help
  x86: Fix typo in Intel CPU cache size descriptor
  x86: Add new Intel CPU cache size descriptors

14 years agoMerge branch 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 8 Dec 2009 21:35:29 +0000 (13:35 -0800)]
Merge branch 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  vgacon: Add support for setting the default cursor state
  vc: Add support for hiding the cursor when creating VTs
  x86, setup: Store the boot cursor state

14 years agoMerge branch 'x86-reboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 8 Dec 2009 21:35:18 +0000 (13:35 -0800)]
Merge branch 'x86-reboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-reboot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86/reboot: Add pci_dev_put in reboot_fixup_32.c for consistency

14 years agoMerge branch 'x86-process-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 8 Dec 2009 21:34:53 +0000 (13:34 -0800)]
Merge branch 'x86-process-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-process-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86-64: merge the standard and compat start_thread() functions
  x86-64: make compat_start_thread() match start_thread()

14 years agoMerge branch 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 8 Dec 2009 21:34:17 +0000 (13:34 -0800)]
Merge branch 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: pat: Remove ioremap_default()
  x86: pat: Clean up req_type special case for reserve_memtype()
  x86: Relegate CONFIG_PAT and CONFIG_MTRR configurability to EMBEDDED

14 years agoMerge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 8 Dec 2009 21:27:33 +0000 (13:27 -0800)]
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (36 commits)
  x86, mm: Correct the implementation of is_untracked_pat_range()
  x86/pat: Trivial: don't create debugfs for memtype if pat is disabled
  x86, mtrr: Fix sorting of mtrr after subtracting
  x86: Move find_smp_config() earlier and avoid bootmem usage
  x86, platform: Change is_untracked_pat_range() to bool; cleanup init
  x86: Change is_ISA_range() into an inline function
  x86, mm: is_untracked_pat_range() takes a normal semiclosed range
  x86, mm: Call is_untracked_pat_range() rather than is_ISA_range()
  x86: UV SGI: Don't track GRU space in PAT
  x86: SGI UV: Fix BAU initialization
  x86, numa: Use near(er) online node instead of roundrobin for NUMA
  x86, numa, bootmem: Only free bootmem on NUMA failure path
  x86: Change crash kernel to reserve via reserve_early()
  x86: Eliminate redundant/contradicting cache line size config options
  x86: When cleaning MTRRs, do not fold WP into UC
  x86: remove "extern" from function prototypes in <asm/proto.h>
  x86, mm: Report state of NX protections during boot
  x86, mm: Clean up and simplify NX enablement
  x86, pageattr: Make set_memory_(x|nx) aware of NX support
  x86, sleep: Always save the value of EFER
  ...

Fix up conflicts (added both iommu_shutdown and is_untracked_pat_range)
to 'struct x86_platform_ops') in
arch/x86/include/asm/x86_init.h
arch/x86/kernel/x86_init.c

14 years agoMerge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 8 Dec 2009 21:25:10 +0000 (13:25 -0800)]
Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: ucode-amd: Move family check to microcde_amd.c's init function
  x86, ucode-amd: Ensure ucode update on suspend/resume after CPU off/online cycle
  x86: ucode-amd: Convert printk(KERN_*...) to pr_*(...)
  x86: ucode-amd: Don't warn when no ucode is available for a CPU revision
  x86: ucode-amd: Load ucode-patches once and not separately of each CPU
  x86, amd-ucode: Remove needless log messages

14 years agoMerge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 8 Dec 2009 21:24:20 +0000 (13:24 -0800)]
Merge branch 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-entry-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  core: Clean up user return notifers use of per_cpu