Commit graph

135168 commits

Author SHA1 Message Date
Artem Bityutskiy 050c0c1bb2 mtd: redboot: remove useless code
We do not need to invoke 'mtd_can_have_bb()' before invoking
'mtd_block_isbad()' because the latter already handles the case when the MTD
device does not support bad blocks.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:24:14 +01:00
Artem Bityutskiy b25675722a mtd: nftlcore: remove out-of-date and now irrelevant piece of code
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:24:03 +01:00
Artem Bityutskiy bb4a09866f mtdoops: clean-up new MTD API usage
Let's remove useless 'mtd_can_have_bb()' function invocations.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:23:53 +01:00
Artem Bityutskiy 7918687644 mtd: mtdconcat: return -EOPNOTSUPP if block_markbad is undefined
The main 'mtd_block_markbad()' function returns -EOPNOTSUPP if the
'->block_markbad' method is undefined, and mtdconcat should do the same.
Fix this by simply removing the 'mtd_can_have_bb()' because it is  not
really necessary. It could be treated as an optimization, but this function is
expected to be used so rarely that it does not matter.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:23:43 +01:00
Artem Bityutskiy c4cc625ea5 mtd: sst25l: initialize writebufsize
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set writebufsize to the flash page size because it is the maximum amount of
data it writes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:23:22 +01:00
Artem Bityutskiy 81fefdf2ef mtd: spear_smi: initialize writebufsize
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set writebufsize to the flash page size because it is the maximum amount of
data it writes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:23:13 +01:00
Artem Bityutskiy fcc44a07da mtd: lart: initialize writebufsize
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set writebufsize to 4 because this drivers writes at max 4 bytes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:23:01 +01:00
Artem Bityutskiy 82c4c58d6f mtd: docg3: initialize writebufsize
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set it to be equivalent to mtd->writesize because this is the maximum amount
of data the driver writes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: stable@kernel.org [3.2+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:22:57 +01:00
Artem Bityutskiy 71f60fbebf mtd: doc2001plus: initialize writebufsize
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set it to be equivalent to mtd->writesize because this is the maximum amount
of data the driver writes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:22:51 +01:00
Artem Bityutskiy cca84b569e mtd: doc2001: initialize writebufsize
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set it to be equivalent to mtd->writesize because this is the maximum amount
of data the driver writes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:22:46 +01:00
Artem Bityutskiy cd1986a3c1 mtd: doc2000: initialize writebufsize
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set it to be equivalent to mtd->writesize because this is the maximum amount
of data the driver writes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:22:38 +01:00
Artem Bityutskiy b604387411 mtd: block2mtd: initialize writebufsize
The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

However, we forgot to set this parameter for block2mtd. Set it to PAGE_SIZE
because this is actually the amount of data we write at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Joern Engel <joern@lazybastard.org>
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:22:14 +01:00
Dan Carpenter 2c4ae276b1 mtd: docg4: fix printk() warnings
Gcc complains here:
drivers/mtd/nand/docg4.c: In function ‘probe_docg4’:
drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t’ [-Wformat]
drivers/mtd/nand/docg4.c:1277:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_t’ [-Wformat]

We have a standard way of printing these using a format string
extension.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:21:44 +01:00
Wolfram Sang 5289966ea5 mtd: nand: gpmi: use correct member for checking NAND_BBT_USE_FLASH
This has been moved from .options to .bbt_options meanwhile. So, it
currently checks for something totally different (NAND_OWN_BUFFERS) and
decides according to that.

Artem Bityutskiy: the options were moved in
a40f734 mtd: nand: consolidate redundant flash-based BBT flags

Artem Bityutskiy: CCing -stable

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org [3.2+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:21:33 +01:00
Brian Norris b54f47c8bc mtd: m25p80: set writebufsize
Using UBI on m25p80 can give messages like:

    UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit

We need to initialize writebufsize; I think "page_size" is the correct
"bufsize", although I'm not sure. Comments?

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org [2.6.38+]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:20:23 +01:00
Brian Norris 3ee5014185 mtd: mtdcore: remove unnecessary mtd->resume check
We don't need to to check for mtd->resume before calling mtd_resume().
mtd_resume() should take care of that.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:20:18 +01:00
Artem Bityutskiy 3c3c10bba1 mtd: add leading underscore to all mtd functions
This patch renames all MTD functions by adding a "_" prefix:

mtd->erase -> mtd->_erase
mtd->read_oob -> mtd->_read_oob
...

The reason is that we are re-working the MTD API and from now on it is
an error to use MTD function pointers directly - we have a corresponding
API call for every pointer. By adding a leading "_" we achieve the following:

1. Make sure we convert every direct pointer users
2. A leading "_" suggests that this interface is internal and it becomes
   less likely that people will use them directly
3. Make sure all the out-of-tree modules stop compiling and the owners
   spot the big API change and amend them.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:20:01 +01:00
Mike Dunn 570469f3bd mtd: nand: add support for diskonchip G4 nand flash device
This patch adds a driver for the M-Sys / Sandisk diskonchip G4 nand flash found
in various smartphones and PDAs, among them the Palm Treo680, HTC Prophet and
Wizard, Toshiba Portege G900, Asus P526, and O2 XDA Zinc.  It was tested on the
Treo 680, but should work generically.

Since v3, this patch adds power management functions, a scan of the factory bad
block table during initialization, several fixes, and more extensive testing.
Also, the platform data header file, which only contained partitioning
information, was removed.  Command-line partitioning can be used, at least until
an mtd parser is written for the saftl format with which these chips are
shipped.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:18:31 +01:00
Stefan Roese 58edc904bb mtd: minor coding style cleanup in mtdpart.c
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:16:24 +01:00
Axel Lin c9d1b75293 mtd: convert drivers/mtd/* to use module_spi_driver()
This patch converts the drivers in drivers/mtd/* to use the
module_spi_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:16:18 +01:00
Brian Norris df698621a5 mtd: nand: move SCANLASTPAGE handling to the correct code block
As nand_default_block_markbad() is becoming more complex, it helps to
have code appear only in its relevant codepath(s). Here, the calculation
of `ofs' based on NAND_BBT_SCANLASTPAGE is only useful on paths where we
write bad block markers to OOB. We move the condition/calculation closer
to the `write' operation and update the comment to more correctly
describe the operation.

The variable `wr_ofs' is also used to help isolate our calculation of
the "write" offset from the usage of `ofs' to represent the eraseblock
offset. This will become useful when we reorder operations in the next
patch.

This patch should make no functional change.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:16:04 +01:00
Brian Norris f0e0c09b88 mtd: mtdoops: kill Kconfig usage instructions
The mtdoops usage instructions found in Kconfig have been incorrect
since:

    commit 2e386e4bac
    mtd: mtdoops: refactor as a kmsg_dumper

mtdoops no longer uses a console. Now, if you build it into your kernel,
you add something like the following to your command line to select
partition X as your logging partition:

    mtdoops.mtddev=X

Anyway, it seems better to leave the documentation out of Kconfig.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:15:37 +01:00
Russell King - ARM Linux 4aa3179c07 mtd: sa11x0: remove definitions and code left for documentation purposes
/*
 * This is here for documentation purposes only - until these people
 * submit their machine types.  It will be gone January 2005.
 */

It's now seven years after that date, so let's remove this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:15:20 +01:00
Russell King - ARM Linux 41515ca262 mtd: sa11x0: Remove shutdown handler
Commit c4a9f88daf ([MTD] [NOR] fix ctrl-alt-del can't reboot for
intel flash bug) interferes with this work-around, causing MTD to
issue this warning:

	Flash device refused suspend due to active operation (state 0)

The commit makes our work-around in the map driver unnecessary, so
let's remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:15:01 +01:00
Shiraz Hashim 495c47d799 mtd: spear_smi: release memory region during remove
Driver must cleanup all held resources during remove. It wasn't
releasing requested memory region.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:14:36 +01:00
Shiraz Hashim f18dbbb1bf mtd: ST SPEAr: Add SMI driver for serial NOR flash
SPEAr platforms (spear3xx/spear6xx/spear13xx) provide SMI (Serial Memory
Interface) controller to access serial NOR flash. SMI provides a simple
interface for SPI/serial NOR flashes and has certain inbuilt commands
and features to support these flashes easily. It also makes it possible
to map an address range in order to directly access (read/write) the SNOR
over address bus. This patch intends to provide serial nor driver support
for spear platforms which are accessed through SMI.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:14:16 +01:00
Brian Norris 8544331998 mtd: nand: differentiate 1- vs. 2-byte writes when marking bad blocks
It seems that we have developed a bad-block-marking "feature" out of
pure laziness:

  "We write two bytes per location, so we dont have to mess with 16 bit
  access."

It's relatively simple to write a 1 byte at a time on x8 devices and 2
bytes at a time on x16 devices, so let's do it.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:12:34 +01:00
Brian Norris cdbec05086 mtd: nand: fix SCAN2NDPAGE check for BBM
nand_block_bad() doesn't check the correct pages when
NAND_BBT_SCAN2NDPAGE is enabled. It should scan both the OOB region of
both the 1st and 2nd page of each block.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:50 +01:00
Brian Norris 009184296d mtd: nand: erase block before marking bad
Many NAND flash systems (especially those with MLC NAND) cannot be
reliably written twice in a row. For instance, when marking a bad block,
the block may already have data written to it, and so we should attempt
to erase the block before writing a bad block marker to its OOB region.

We can ignore erase failures, since the block may be bad such that it
cannot be erased properly; we still attempt to write zeros to its spare
area.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:34 +01:00
Julia Lawall 152b861622 mtd: onenand: samsung: add missing iounmap
Add missing iounmap in error handling code, in a case where the function
already preforms iounmap on some other execution path.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
statement S,S1;
int ret;
@@
e = \(ioremap\|ioremap_nocache\)(...)
... when != iounmap(e)
if (<+...e...+>) S
... when any
    when != iounmap(e)
*if (...)
   { ... when != iounmap(e)
     return ...; }
... when any
iounmap(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:20 +01:00
Fabio Estevam 335a5f409e mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined
Fix the following build warning:

drivers/mtd/mtdcore.c: In function ‘mtd_release’:
drivers/mtd/mtdcore.c:110: warning: unused variable ‘mtd’

This happens when neither CONFIG_MTD_CHAR nor CONFIG_MTD_CHAR_MODULE are defined.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:16 +01:00
Alexander Stein 70d5098a4b mtd: mtdblock: call mtd_sync() only if opened for write
Because it is useless to call it if the device is opened in R/O mode, and also
harmful: on CFI NOR flash it may block for long time waiting for erase
operations to complete is another partition with a R/W file-system on this
chip.

Artem Bityutskiy: write commit message, amend the patch to match the latest
tree (we use mtd_sync(), not mtd->sync() nowadays).

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:11 +01:00
Xi Wang 2ff5e1532d mtd: pmc551: fix signedness bug in init_pmc551()
Since "length" is a u32, the error handling below didn't work when
fixup_pmc551() returns -ENODEV.

	if ((length = fixup_pmc551(PCI_Device)) <= 0)

This patch changes both the type of "length" and the return type of
fixup_pmc551() to int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:07 +01:00
Ira W. Snyder 30ec5a2cb1 mtd: cfi: AMD/Fujitsu compatibles: add panic write support
This allows the mtdoops driver to work on flash chips using the
AMD/Fujitsu compatible command set.

As the code comments note, the locks used throughout the normal code
paths in the driver are ignored, so that the chance of writing out the
kernel's last messages are maximized.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:11:03 +01:00
Linus Torvalds 8482a0abe9 SCSI fixes on 20120303
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPUrf8AAoJEDeqqVYsXL0Ma0cH/1hcV4G3U7ZNbKJsijl7eowP
 GON1pme9XvUIHxWibIEZhUaaycWhN3oaShdEO+IAYSVoRSC6pu1H+/Be8VgvVpdT
 +1N9a41sXmuMeTadwfdZJ6k0Gs9gtbuxfvO4Z6WRbrpjik5S/3ZP3A/US8jESbCW
 rOK9evTUCs+rBFXiyOwyz3Li335/zEbq3E3N14VgbA05vYvw3+AuNQ0e8zS2A9/D
 3yLiQfIPhVZmH5majf+4qqyvBqQ0Jacj5TZrKyRehYZpB1c+fHwTDRYBko9vWdEH
 Tojk/mz3hPu48BNJyawb0Kemei+hNGKyejj8jbjBT1cb8/FTOGeZsYRa83YA6Hg=
 =joKr
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

SCSI fixes from James Bottomley:
 "There's just a single fix in here: the osd max device number fix."

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576
2012-03-03 16:42:30 -08:00
Linus Torvalds 233ba2c5ff PARISC fixes on 20120303
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPUqnkAAoJEDeqqVYsXL0MyTwH/14R9sIt+IdQgMGje6Dys6U1
 3wxmNHcxNBB461212i+XVToH72GiPtUyWY8Q3LT+Qcq4Rab9oq8wDffxdgflDLja
 sZq9COLR8dmXJM0hduyuysCiNIlmuURV20uIMsDbYutBVtAKKqMd7ZrJBmkVh7xT
 slBJf+0lcD5IBYPYwf8lbxAI7E/C5TarMCIZk4z21I8ovF321RlGcyyo6NM62q/P
 wvLw4bJuW7nJa3q3B7BznzBcoHLmzo9tiY+CbtQlGhSdasDKJ8HuAegTVyofl6s8
 0/RTvaUcqTWUlFxXzLVDT+MCWAUP4GFR66tR2T5tygRi9st70TcpMzISiyZzKi8=
 =WzAJ
 -----END PGP SIGNATURE-----

Merge tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6

PARISC fixes from James Bottomley:
 "This is a set of build fixes to get the cross compiled architecture
  testbeds building again"

* tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
  [PARISC] don't unconditionally override CROSS_COMPILE for 64 bit.
  [PARISC] include <linux/prefetch.h> in drivers/parisc/iommu-helpers.h
  [PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional
2012-03-03 16:33:51 -08:00
Linus Torvalds 2ce3f2b3b1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull from Herbert Xu:
  "This push fixes a bug in mv_cesa that causes all hash operations
   that supply data on a final operation to fail."

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: mv_cesa - fix final callback not ignoring input data
2012-03-03 09:31:49 -08:00
Linus Torvalds 62d222b8c8 Four commits since v3.3-rc5:
15d1ad0 hwmon: (f75375s) Catch some attempts to write to r/o registers
 b17d656 hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
 edeea10 hwmon: (f75375s) Make pwm*_mode writable for the F75387
 331255d hwmon: (f75375s) Fix writes to the pwm* attribute for the F75387
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJPUShhAAoJEMsfJm/On5mBm74P/2fQB4aY+iseQRpnNjido+W1
 FUGL/Kb2FcWafHRvoLE7ddsMccj4rrvIbe81ad8R/HI9LFC/fUZijLwQA5Zb0IO9
 RE5KG3kVy5B0x0c2eP+NgMhrNWerKBfh3fdVQXNiqtS+r1cU2Vq1JMm5gDMK/5we
 yyqnqm4WbmMhb4Droj19h365yvMd0sckmO0nXnA0vHMCFDjNIFg6hf4IT7C0tGRM
 tFMhGiUJciDur7eoOhOhVWUF6hz2ug38stllO0s7E+5D97gU7VyRrdTh7qqomiKT
 CblZshuQXsRmwiRPHBAXFYgFTuPZf8SptaivhzIj7VDKqh5w7cjlXGmAJt7JP09s
 Pi4tTupUC7NPrQncM00LrvulFXJAVmucv9K7POnEjrJbAAH7msRNSMt+7JYrgsR4
 kRZQIQsosvquLcwR0GShypCi3G1g81CKTwfO4nHcbioPeFWSOM2a4YWjALmCLgUr
 FXtICHFJbTEPGbCkTfYwN5Rt7cwZbHg7VBX5oJsVsxv8YNG7Lc2mnDf1V1vGu88R
 O4WILvqeUIfveYbt8gucijJGTiaxNbcOmLgRVh5/LWgjHe1SSVC9EIK6lLtrtERC
 i3KdJ32Aigsoj7jDaEcCkOatyy5VK14xB1Y16KpbOOU2ITT7TT41SKWLeW6vCarE
 HA0WCE+4tPdYsEElU4K/
 =e4hU
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

hhwmon fixes for 3.3-rc6 from Guenter Roeck:

These patches are necessary for correct operation and management of
F75387.

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (f75375s) Catch some attempts to write to r/o registers
  hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
  hwmon: (f75375s) Make pwm*_mode writable for the F75387
  hwmon: (f75375s) Fix writes to the pwm* attribute for the F75387
2012-03-02 15:21:48 -08:00
Linus Torvalds d085a09cf3 fbdev fixes for 3.3
It includes:
 - two fixes for OMAP HDMI
 - one fix to make new OMAP functions behave as they are supposed to
 - one Kconfig dependency fix
 - two fixes for viafb for modesetting on VX900 hardware
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPUTAuAAoJECSVL5KnPj1PwIoP/3BosrH3mE7hDAXLI6EoXTmo
 SaePt271FV+RqlG5Tjd07IDceXaCz3zf+ZyS9sKZXvGi9QNMKKs52Ah0PeWDfalM
 MJVtRh2FBvaSKFvSqKjN3Fzv+bHpJZwekQBLDaHYHNdtQjWNW8Nnkth6n9xNDwau
 Xp5owI/p9ZECoCcj/D17LF59t8kiynqKdDOmhzZ1bp/c1LgL4waSXnP5/ToQxmcL
 zjUrvR4u3RNDqTxJmScswyDZq4u8qLx4fovhScoPe1OpU2cVXV69UdivzoF4A30c
 t02ZPEE+NM5tFfPMtUNn3zCEN+I893e4ABHoZlDfzS8Ab7JJjnDFduvUzJdSPa8H
 3kMZH7YmQhs1KhbrEcZPeBuxmZaNXpojRYmlbnw7w+kHtcaxVUxhR87TI8kYZIaS
 oqsTXmO+f9T8cMy3WbhUylj+uUpcBQYbIHd4QUhGFvylU24mrrJJQtwsPTFTElE7
 CBKPavbtFMkQepeXRX0Sig/xwVcKA7UUfdvirsD4BjfxZqsOxWeBCQN/scEDcSwo
 KOsLN4Kc4T3On3vNHc2fdq4f+sd2rlGeB9tH/NRtt7UBjGhxK+9lD5YmiavUopyH
 ectsoEMXg9FMQS1GwmQZwQx7r1QXRylBRgrHV/l1XwBU/QfQp3WFqBrVTFZkw4rg
 9U0wHlmQYnnU66rUChUt
 =+UnE
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-fixes-for-3.3-2' of git://github.com/schandinat/linux-2.6

fbdev fixes for 3.3 from Florian Tobias Schandinat

It includes:
 - two fixes for OMAP HDMI
 - one fix to make new OMAP functions behave as they are supposed to
 - one Kconfig dependency fix
 - two fixes for viafb for modesetting on VX900 hardware

* tag 'fbdev-fixes-for-3.3-2' of git://github.com/schandinat/linux-2.6:
  OMAPDSS: APPLY: make ovl_enable/disable synchronous
  OMAPDSS: panel-dvi: Add Kconfig dependency on I2C
  viafb: fix IGA1 modesetting on VX900
  viafb: select HW scaling on VX900 for IGA2
  OMAPDSS: HDMI: hot plug detect fix
  OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabled
2012-03-02 15:21:15 -08:00
Nikolaus Schulz 15d1ad0cc9 hwmon: (f75375s) Catch some attempts to write to r/o registers
It makes no sense to attempt to manually configure the fan in auto mode,
or set the duty cycle directly in closed loop mode.  The corresponding
registers are then read-only.  If the user tries it nonetheless, error out
with EINVAL instead of silently doing nothing.

Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
[guenter.roeck@ericsson.com: Minor formatting cleanup]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-02 12:02:23 -08:00
Nikolaus Schulz b17d6561ac hwmon: (f75375s) Properly map the F75387 automatic modes to pwm_enable
The F75387 supports automatic fan control using either PWM duty cycle or
RPM speed values.  Make the driver detect the latter mode, and expose the
different modes in sysfs as per pwm_enable, so that the user can switch
between them.

The interpretation of the pwm_enable attribute for the F75387 is adjusted
to be a superset of those values used for similar Fintek chips which do
not support automatic duty mode, with 2 mapping to automatic speed mode,
and moving automatic duty mode to the new value 4.

Toggling the duty mode via pwm_enable is currently denied for the F75387,
as the chip then simply reinterprets the fan configuration register values
according to the new mode, switching between RPM and PWM units, which
makes this a dangerous operation.

This patch introduces a new pwm mode into the driver. This is necessary
because the new mode (automatic pwm mode, 4) may already be enabled by the
BIOS, and the driver should not break existing functionality. This was seen
on at least one board.

Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-02 11:56:43 -08:00
Linus Torvalds 1f033c1a6e Merge git://www.linux-watchdog.org/linux-watchdog
Watchdog updates from Wim Van Sebroeck:

* git://www.linux-watchdog.org/linux-watchdog:
  watchdog: fix GETTIMEOUT ioctl in booke_wdt
  watchdog: update maintainers git entry
  watchdog: Fix typo in pnx4008_wdt.c
  watchdog: Fix typo in Kconfig
  watchdog: fix error in probe() of s3c2410_wdt (reset at booting)
  watchdog: hpwdt: clean up set_memory_x call for 32 bit
2012-03-01 18:27:43 -08:00
Linus Torvalds 13fb2d1037 A simple, driver specific fix. This device isn't widely used outside of
Marvell reference boards most of which are probably used with their BSPs
 rather than with mainline so low risk.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPR6XBAAoJEBus8iNuMP3dvjgP/1DKa3TUSNze7BqCspdPxzLr
 DCxfkfCpdBGX97EE7VTjp7XyrnsSESg5LQ1/r8tvJqwqm3DtC1/AhiROhoSRIDFe
 mAerCTiZCGrJQUURUfAw07cq5yyM/F9Shz6TH1EoPn8e/Dtw23Rkb4PrXCUYXgG8
 3ecPAQ11dDo+bTO/jFvnKEMaa3PpL8EFu8UIaiCGmGDuAHXEr1OALF83tDOkbl/j
 J7MvW0XcyhQQ+/chCn7oV13k9mApbsohNi3tcQdlpl533Zlf06TxW00jpqtoZyMf
 aP3Cl71uHgkr9hjU310R2rsJ3zocBl+QT+rWmiJ89gm/bawgNkycKYA9Q9pnyvuM
 Eoo56E96oWLB1ld8gGzCVB1gxCLSOeewFEAsNxZEx4PVnaa373waOCkXGXTBqCTD
 MM/BgM4z4fa2IwsjlX+UO6cz3Zpkhfx7KpTOoxjM9gXh2ovKSn5TjmuwowMqWo0r
 B52nRs3liglV5O2q4eMSe2TXFkfaYO9TTKwmUMPl+o7WfmqmgUuCthFOzZG3S4BE
 sWClFq2ASHdAGHoytJyJHMfjvqX8egD61aVrAQua0r13EvgNuxAk2lkxrxojCZOG
 KP2lLd6b2NKlyUZIcD9CYPz30QHgmSe9cOhM2LSmvLkL1tmMgeMhLt+oCIkG5mcs
 Peds63YpiarhWd7IwToJ
 =HVC8
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull from Mark Brown:
 "A simple, driver specific fix.  This device isn't widely used outside
  of Marvell reference boards most of which are probably used with their
  BSPs rather than with mainline so low risk."

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: fix the ldo configure according to 88pm860x spec
2012-03-01 18:26:48 -08:00
Linus Torvalds a223c52280 Merge branch 'i2c-embedded/for-3.3' of git://git.pengutronix.de/git/wsa/linux-2.6
i2c bugfix from Wolfram Sang:
  "This patch fixes a wrong assumption in the mxs-i2c-driver about a
   command queue being done.  Without it, we have seen races when the
   bus was under load."

* 'i2c-embedded/for-3.3' of git://git.pengutronix.de/git/wsa/linux-2.6:
  i2c: mxs: only flag completion when queue is completely done
2012-03-01 18:24:52 -08:00
Linus Torvalds cfa5555cab Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
DRM fixes from Dave Airlie:
  intel: fixes for output regression on 965GM, an oops and a machine
  hang

  radeon: uninitialised var (that gcc didn't warn about for some reason)
  + a couple of correctness fixes.

  exynos: fixes for various things, drop some chunks of unused code.

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/kms/vm: fix possible bug in radeon_vm_bo_rmv()
  drm/radeon: fix uninitialized variable
  drm/radeon/kms: fix radeon_dp_get_modes for LVDS bridges (v2)
  drm/i915: Remove use of the autoreported ringbuffer HEAD position
  drm/i915: Prevent a machine hang by checking crtc->active before loading lut
  drm/i915: fix operator precedence when enabling RC6p
  drm/i915: fix a sprite watermark computation to avoid divide by zero if xpos<0
  drm/i915: fix mode set on load pipe. (v2)
  drm/exynos: exynos_drm.h header file fixes
  drm/exynos: added panel physical size.
  drm/exynos: added postclose to release resource.
  drm/exynos: removed exynos_drm_fbdev_recreate function.
  drm/exynos: fixed page flip issue.
  drm/exynos: added possible_clones setup function.
  drm/exynos: removed pageflip_event_list init code when closed.
  drm/exynos: changed priority of mixer layers.
  drm/exynos: Fix typo in exynos_mixer.c
2012-03-01 18:23:43 -08:00
Linus Torvalds d7e53922aa Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPTq2iAAoJENkgDmzRrbjxrYEQAI9KNoASqsTd3v0R6Cnt2B78
 UVRgD/fbbObqHw7uONrAxf/oh5OJWgdC05MrkifJcPjb7TNJeaYxSHgchuGLg853
 kKKr2E9/laJ0+tYAmTTPKpZ11JPjIDvVAJ3Qg+WK3W+ILe2oFgzLALI9/Ilmfwj2
 /fRD0HxYZRU9/vuHXa79fnHazH8VakZClqqrdVqhlRXThiGFIgGs/74s3lmjSix3
 I0C/TtenpsLSKvWjUct6pLCS53xiDrxXMBDgd9SStjhjFbiAr0nIFdWekAcAZ5ln
 +qWP/cJY85bwzfsYPn4umynfBmmu5GSz1IMP9UZQBHaahQV2eVeKLTp3//qeTVsa
 3VCTwHXFnbxnrGzC/yPhA/Vudcx6ekuH2iwLmnnOQnii+A+mDZT/pMIiNZJNpTPD
 cxZxiBLHEsIOixEuDXiDw93tBCT2rtTaeFRcmd52YyOLtJStFHLEwwS4udYsTM9h
 KkQ2r3fXEslpRV7o65Vu7fHDLEzGvKUE2bolrhwmcMvUZ1rNwegogTwPnZ2KHFxt
 F/wHGsmc5gOYfFk97bxGQtQE5QZ7sQHdb/zk/10awTII/YlpY/28+trz9ljbhZmD
 dnn62TRtlqUB4qBGguXZiUc3nTN1+WO9yVrR+hW9enHHwxmnKXeaXu1k+IErl4yV
 N7iypO4+PtSsxKtNqBU4
 =6Q0J
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://github.com/rustyrussell/linux

Merge virtio pull request from Rusty Russell.

* tag 'for-linus' of git://github.com/rustyrussell/linux:
  virtio: balloon: leak / fill balloon across S4
2012-02-29 15:14:33 -08:00
Amit Shah 4eb05d562e virtio: balloon: leak / fill balloon across S4
commit e562966dba added support for S4 to
the balloon driver.  The freeze function did nothing to free the pages,
since reclaiming the pages from the host to immediately give them back
(if S4 was successful) seemed wasteful.  Also, if S4 wasn't successful,
the guest would have to re-fill the balloon.  On restore, the pages were
supposed to be marked freed and the free page counters were incremented
to reflect the balloon was totally deflated.

However, this wasn't done right.  The pages that were earlier taken away
from the guest during a balloon inflation operation were just shown as
used pages after a successful restore from S4.  Just a fancy way of
leaking lots of memory.

Instead of trying that, just leak the balloon on freeze and fill it on
restore/thaw paths.  This works properly now.  The optimisation to not
leak can be added later on after a bit of refactoring of the code.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-01 09:28:41 +10:30
Tomi Valkeinen a3d0e4aeca OMAPDSS: APPLY: make ovl_enable/disable synchronous
ovl->enable/disable are meant to be synchronous so that they can handle
the configuration of fifo sizes. The current kernel doesn't configure
fifo sizes yet, and so the code doesn't need to block to function (from
omapdss driver's perspective).

However, for the users of omapdss a non-blocking ovl->disable is
confusing, because they don't know when the memory area is not used
any more.

Furthermore, when the fifo size configuration is added in the next merge
window, the change from non-blocking to blocking could cause side
effects to the users of omapdss. So by making the functions block
already will keep them behaving in the same manner.

And, while not the main purpose of this patch, this will also remove the
compile warning:

drivers/video/omap2/dss/apply.c:350: warning:
'wait_pending_extra_info_updates' defined but not used

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-02-29 22:42:28 +00:00
Tomi Valkeinen c9043ff9e6 OMAPDSS: panel-dvi: Add Kconfig dependency on I2C
panel-dvi uses i2c, but the Kconfig didn't have dependency on I2C. Add
it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2012-02-29 22:42:28 +00:00
Linus Torvalds c5f2ac92c6 Another set of arm-soc bug fixes on top of v3.3-rc5. The few larger
bits are all for devices that still need to get set up in board code.
 
 Only three platforms are in this set of fixes: omap2+, pxa and lpc32xx.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUAT05lqGCrR//JCVInAQK+lhAAhWkKqdXyIswvg5p5Q1oOQziH1MGmXw87
 ufu/XgoKE7W8gr/oDfRgUPtzmlg0LVkm/ObvUr2JgNstvZpE6AU1irxLbhNxCbJt
 3UJCqc3XWJL08aC0N4s0fj8j2iYv/2ZmO9litBPH1NOhIk+hm3iVqrnSFpdwtcYm
 DZhOJg9WXRk93xYZx/CTTjxF+2pnd8XBmz7q6nJFKN6rRslbKuUpHlc6IlfXkQma
 btayG2EMWxmXsevOUq9oCGkbp9MozlOfuuSHCfZaUeDXVgf+DUfyx+ZppC/ZS14k
 cz9u7U+yRuhGX2lC+7lRC+Bek/i7c8NPTgVb1lRbvitnEzkUcz/8tkrztlSrC5ws
 49dKSZUq3jJMb8tl0xFxzKHIQfE+xTrJ7Mor4Tj72XCwIOEcIhAwMYEOCmjpMzER
 4g7IypNM0UFdN6/cywAYHX2X/pjjrQfJC1ridqzzUZjcw4b+FEsaWcp5+IV/Yi+D
 z41VdlrN0pK3AhDq9IMpDwHtbtOGYJFBl6QdLvLFwR9kEudvDt7cFGHZKT4hsE5L
 NqpASxZUfrcX5AQraZqnYMH8EJcOmxPOSp/iFWdOe4m3L1goE2R5oxIwg3ptIjYK
 Im2Ye6RrDVjF3bkyAdXXOxiu0OAo17Jt4vX+FvORug12mfxJGiWsdypSBXFDy5go
 ozkUx/YTHv0=
 =ElaK
 -----END PGP SIGNATURE-----

Merge tag 'fixes-3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Arnd Bergmann says:
 "Another set of arm-soc bug fixes on top of v3.3-rc5.  The few larger
  bits are all for devices that still need to get set up in board code.

  Only three platforms are in this set of fixes: omap2+, pxa and lpc32xx."

* tag 'fixes-3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (22 commits)
  ARM: LPC32xx: serial.c: Fixed loop limit
  ARM: LPC32xx: serial.c: HW bug workaround
  ARM: LPC32xx: irq.c: Clear latched event
  ARM: LPC32xx: Fix interrupt controller init
  ARM: LPC32xx: Fix irq on GPI_28
  ARM: OMAP2: fix mailbox init code
  ARM: OMAP2+: gpmc-smsc911x: add required smsc911x regulators
  ARM: OMAP1: Fix out-of-bounds array access for Innovator
  OMAP3 EVM: remove out-of-bounds array access of gpio_leds
  ARM: OMAP: Fix build error when mmc_omap is built as module
  ARM: OMAP: Fix kernel panic with HSMMC when twl4030_gpio is a module
  pxa/hx4700: add platform device and I2C info for AK4641 codec
  arch/arm/mach-pxa/: included linux/gpio.h twice
  arch/arm/mach-mmp/: some files include some headers twice
  ARM: pxa: fix error handling in pxa2xx_drv_pcmcia_probe
  ARM: pxa: fix including linux/gpio.h twice
  ARM: pxa: fix mixed declarations and code in sharpsl_pm
  ARM: pxa: fix wrong parsing gpio event on spitz
  ARM: OMAP2+: usb-host: fix compile warning
  ARM: OMAP4: Move the barrier memboclk_steal() as part of reserve callback
  ...
2012-02-29 11:24:39 -08:00