Commit graph

17812 commits

Author SHA1 Message Date
Ralf Baechle
0bf3a9d82a [MTD] Nuke IVR leftovers
Support for the ITE8172 based boards was deleted a while ago so this is
dead code.

The Kconfig dependency on MIPS was wrong anyway, MIPS is a processor
architecture and nothing else; guesses on systems architecture are likely
to be wrong ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-11 16:30:26 +00:00
Kyungmin Park
66a1e421b9 [MTD] OneNAND: fix oob handling in recent oob patch
There are missing place in recent MTD oob patch

http://git.infradead.org/?p=mtd-2.6.git;a=commitdiff;h=7014568bad55c20b7ee4f439d78c9e875912d51f

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-11 10:46:20 +00:00
David Woodhouse
76ab40e465 [MTD] Fix ssfdc blksize typo
I will not commit even trivial and obvious one-line fixes without building.
I will not commit even trivial and obvious one-line fixes without building.
I will not commit even trivial and obvious one-line fixes without building.
I will not commit even trivial and obvious one-line fixes without building.
Only clever people can get away with that.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-11 09:43:38 +00:00
David Woodhouse
db06e2a93f [MTD] Fix SSFDC build for variable blocksize.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-10 11:48:54 +00:00
Randy Dunlap
dffbc42b5a [MTD] ESB2ROM uses PCI
ESB2ROM uses PCI interface functions.

With CONFIG_PCI=n:
drivers/mtd/maps/esb2rom.c: In function 'esb2rom_init_one':
drivers/mtd/maps/esb2rom.c:167: warning: implicit declaration of function 'pci_dev_get'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-10 11:43:21 +00:00
Vitaly Wool
a2c2fe4b24 [MTD] of_device-based physmap driver
inlined below is the patch that adds physmap driver for of_device.
It's an MTD part of the two-part support for flash/ROM devices based
on Open Firmware descriptions. The arch part (currently only PowerPC
which is no surprise) was introduced to powerpc folks earlier and
recently the older version of the powerpc part has been included into
the powerpc.git tree
(see http://www.kernel.org/git/?p=linux/kernel/git/paulus/powerpc.git;a=commitdiff;h=28f9ec349ae47c91768b7bc5607db4442c818e11).

 drivers/mtd/maps/Kconfig      |    9 +
 drivers/mtd/maps/Makefile     |    1
 drivers/mtd/maps/physmap_of.c |  255 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 265 insertions(+)

Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: Sergey Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-08 13:32:34 +00:00
Rod Whitby
f33665d931 [MTD] Support combined RedBoot FIS directory and configuration area
RedBoot supports storing the FIS directory and the RedBoot
configuration area in the same block of flash memory.  This is
not the most common RedBoot configuration, but it is used on
commercially available boards supported by the kernel.

A recent patch to mtd/redboot.c (http://lkml.org/lkml/2006/3/20/410)
which corrected the skipping of deleted table entries has exposed the
latent problem of the kernel redboot parser running off the end of the
FIS directory and interpreting the RedBoot configuration information
as table entries.

This patch terminates the table parsing when the first truly empty
entry is found (table entry deletion only clears the first byte of the
name, so two cleared bytes in a row indicates the end of the table),
thereby supporting the combined redboot FIS directory and RedBoot
configuration information flash layout scenario.

Signed-off-by: Rod Whitby <rod@whitby.id.au>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-08 13:28:26 +00:00
Andrew Victor
dd11b8cdf0 [MTD] NAND: Support for 16-bit bus-width on AT91.
Add support for 16-bit NAND bus-width for the AT91 NAND driver.

The 16-bit NAND is found on the Atmel AT91SAM9260-EK and AT91SAM9261-EK
boards.

Orignal Patch from Patrice Vilchez

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-08 13:25:17 +00:00
Artem Bityutskiy
4a0c50c07a [MTD] nandsim: bugfix in page addressing
Number of address bytes for 64-128 MiB NANDs is 4, not 5.

Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-08 13:22:54 +00:00
Timo Lindhorst
418b2e56b8 [MTD] NAND: use SmartMedia ECC byte order for ndfc
Select MTD_NAND_ECC_SMC (ECC byte order according to the Smart Media
Specification) if MTD_NAND_NDFC is used.
Using the wrong byte order causes fatal, unnoticed data damage.

For further information see:
http://lists.infradead.org/pipermail/linux-mtd/2006-November/016920.html

Signed-off-by: Timo Lindhorst <lindhors@linux.vnet.ibm.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-05 18:00:13 +00:00
Yoshinori Sato
0b47d65408 [MTD] redboot partition combined fis / config problem
Can't analyze FIS directory in CYGSEM_REDBOOT_FLASH_COMBINED_FIS_AND_CONFIG
really.

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-01 10:01:50 +00:00
Mariusz Kozlowski
7dcb483de3 [MTD] [NAND] Compile fix in rfc_from4.c
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-12-01 09:59:49 +00:00
David Woodhouse
bd3c97a7c7 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-01 09:56:43 +00:00
Haavard Skinnemoen
6c33cafc79 [MTD] bugfix: DataFlash is not bit writable
This patch fixes the
"jffs2_flash_writev(): Non-contiguous write to 00825300 with mtd_dataflash" bug.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-12-01 10:30:45 +02:00
David Woodhouse
c9ac597729 [MTD] Remove trailing whitespace
The newly-added cafe_ecc.c had a lot of it because of the way the lookup
table was auto-generated; clean up the other files too while we're at it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-30 08:17:38 +00:00
Francois Romieu
315917d23f [PATCH] r8169: Fix iteration variable sign
This changes the type of variable "i" in rtl8169_init_one()
from "unsigned int" to "int". "i" is checked for < 0 later,
which can never happen for "unsigned". This results in broken
error handling.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-29 13:45:07 -08:00
David Woodhouse
dd36f26735 [MTD] Use EXPORT_SYMBOL_GPL() for exported symbols.
While we're fixing up the newly-added symbol, change the neighbouring ones
too, for consistency and also to reflect the author's interpretation of
the GPL -- which is that _no_ non-GPL modules are permitted. The author
always intended his code to be released under the GPL, and believes that
any new interpretation of 'EXPORT_SYMBOL' as being any different from
'EXPORT_SYMBOL_GPL' is entirely invalid; the GPL requires that _all_
exports have the semantics of the new 'EXPORT_SYMBOL_GPL', which means the
extra four characters are entirely redundant.

But since those four extra characters trigger the check for illegal
modules in a way that just EXPORT_SYMBOL does not, it's useful to change
anyway. This action in no way indicates an admission that there is any
legal distinction between the two states, and in particular does not
indicate that the author believes that non-GPL modules may use symbols
exported with EXPORT_SYMBOL alone.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-29 16:33:03 +00:00
Artem Bityutskiy
9c74034f8f [MTD] return error code from get_mtd_device()
get_mtd_device() returns NULL in case of any failure. Teach it to return an
error code instead. Fix all users as well.

Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29 17:06:38 +02:00
Artem Bityutskiy
9fe912cea3 [MTD] add get and put methods
This patch adds get_device() and put_device() methods to the MTD description
structure (struct mtd_info). These methods are called by MTD whenever the MTD
device is get or put. They are needed when the underlying driver is something
smarter then just flash chip driver, for example UBI.

Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29 17:04:53 +02:00
Artem Bityutskiy
7799308f34 [MTD] add get_mtd_device_nm() function
This patch adds one more function to the MTD interface to make it possible to
open MTD devices by their names, not only numbers. This is very handy in many
situations. Also, MTD device number depend on load order and may vary, while
names are fixed.

Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29 17:04:31 +02:00
Thomas Gleixner
29072b9607 [MTD] NAND: add subpage write support
Many SLC NANDs support up to 4 writes at one NAND page. Add support
of this feature.

Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29 17:03:52 +02:00
Josh Boyer
f6a7ecb18d [MTD] add MTD_BLKDEVS Kconfig option
Add a MTD_BLKDEVS Kconfig option to cleanup the makefile a bit

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29 16:58:15 +02:00
Yoichi Yuasa
eb6cf7bb71 [MTD] fix map probe name for cstm_mips_ixx
This patch has fixed name of map probe for cstm_mips_ixx.c

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Artem Bityutskiy <dedekind@infradead.org>
2006-11-29 16:57:55 +02:00
Linus Torvalds
4f404caf67 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] libata: Fixup ata_sas_queuecmd to handle __ata_scsi_queuecmd failure
  [PATCH] ahci: AHCI mode SATA patch for Intel ICH9
  [PATCH] libata: don't schedule EH on wcache on/off if old EH
2006-11-28 20:54:40 -08:00
Joakim Tjernlund
967bf623e9 [PATCH] Fix Intel/Sharp command set erase suspend bug
When we sleep and wait for a suspended operation to be resumed, go
back and check until it's ready -- don't just continue after the first
time we're woken. This can cause file system corruption.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-28 17:26:50 -08:00
Andrew Morton
ce1060494a [MTD] Tidy bitrev usage in rtc_from4.c
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-29 00:19:14 +00:00
Timo Lindhorst
fc02919499 [MTD] [NAND] fix ifdef option in nand_ecc.c
Fix up the config option in the #ifdef statements in nand_ecc.c

Signed-off-by: Timo Lindhorst <lindhors@linux.vnet.ibm.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-29 00:11:39 +00:00
David Woodhouse
28bdd4a72d [MTD] [NAND] Update CAFÉ driver interrupt handler prototype
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-29 00:04:59 +00:00
David Woodhouse
103e40f633 Merge git://git.infradead.org/~kmpark/onenand-mtd-2.6 2006-11-29 00:03:10 +00:00
Burman Yan
95b93a0cd4 [MTD] replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28 23:47:21 +00:00
Randy Dunlap
998a43e72d [MTD] Fix printk format warning in physmap. (resources again)
Fix printk format warning:
drivers/mtd/maps/physmap.c:93: warning: long long unsigned int format, long unsigned int arg (arg 2)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28 23:40:46 +00:00
David Woodhouse
1aaaeabf36 Merge git://git.infradead.org/~dwmw2/cafe-2.6 2006-11-28 22:43:10 +00:00
Vitaly Wool
7014568bad [MTD] [NAND] remove len/ooblen confusion.
As was discussed between Ricard Wanderlöf, David Woodhouse, Artem 
Bityutskiy and me, the current API for reading/writing OOB is confusing. 

The thing that introduces confusion is the need to specify ops.len 
together with ops.ooblen for reads/writes that concern only OOB not data 
area. So, ops.len is overloaded: when ops.datbuf != NULL it serves to 
specify the length of the data read, and when ops.datbuf == NULL, it 
serves to specify the full OOB read length.

The patch inlined below is the slightly updated version of the previous 
patch serving the same purpose, but with the new Artem's comments taken 
into account.

Artem, BTW, thanks a lot for your valuable input!

Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28 22:39:03 +00:00
Richard Purdie
1918767299 [MTD] Allow variable block sizes in mtd_blkdevs
Currently, mtd_blkdevs enforces a block size of 512, even if the drivers
can seemingly request a different size. This patch fixes mtd_blkdevs so
block sizes other than 512 work correctly.

Signed-off-by: Richard Purdie <rpurdie@openedhand.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28 22:27:47 +00:00
Dave Olsen
90afffc8bd [MTD] [MAPS] Support for BIOS flash chips on the nvidia ck804 southbridge
Add support for accessing BIOS flash chips connected to the NVIDIA ck804 southbridge.

Signed-off-by: Ryan Jackson <rjackson@lnxi.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28 22:25:27 +00:00
Stefan Roese
4010db56c8 [MTD] [NAND] Fix endianess bug in ndfc.c
The writel() call accidentally clears all bits in the NDFC_CCR
register (endianess problem). Now __raw_writel() is used instead.

Tested on Bamboo with NAND on chip select 0 and chip select 1.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28 22:22:55 +00:00
Adrian Bunk
ddacff1f20 [MTD] make drivers/mtd/cmdlinepart.c:mtdpart_setup() static
This patch makes the needlessly global mtdpart_setup() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28 22:19:16 +00:00
Adrian Bunk
1605cd3d9c [MTD] [NAND] rtc_from4.c: use lib/bitrev.c
This patch converts drivers/mtd/nand/rtc_from4.c to use the new
lib/bitrev.c

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-11-28 22:18:52 +00:00
Brian King
08475a1920 [PATCH] libata: Fixup ata_sas_queuecmd to handle __ata_scsi_queuecmd failure
Fixes ata_sas_queuecmd to properly handle a failure from
__ata_scsi_queuecmd.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-11-28 03:51:55 -05:00
Jason Gaston
f33d625f40 [PATCH] ahci: AHCI mode SATA patch for Intel ICH9
This patch adds the Intel ICH9 AHCI controller DID's for SATA support.

Signed-off-by:  Jason Gaston <jason.d.gaston@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-11-28 03:45:13 -05:00
Tejun Heo
c31f571d9f [PATCH] libata: don't schedule EH on wcache on/off if old EH
Do not schedule EH for revalidation on wcache on/off if old EH.  Old
EH cannot handle it and will result in WARN_ON()'s and oops.

This closes bug #7412.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-11-28 03:45:13 -05:00
Linus Torvalds
137b529e4d Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [XFRM] STATE: Fix to respond error to get operation if no matching entry exists.
  [NET]: Re-fix of doc-comment in sock.h
  [6PACK]: Masking bug in 6pack driver.
  [NET]: Fix kfifo_alloc() error check.
  [UDP]: Make udp_encap_rcv use pskb_may_pull
  [NETFILTER]: H.323 conntrack: fix crash with CONFIG_IP_NF_CT_ACCT
2006-11-26 09:42:40 -08:00
Andrew de Quincey
221a09d5c4 V4L/DVB (4874): Fix oops on symbol rate==0
The tda10086 causes an oops (divide by zero) if a zero symbol rate is used;
this prevents this.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-26 11:02:43 -02:00
Hans Verkuil
f7668162a3 V4L/DVB (4885): Improve saa711x check
The old code would accept any device on the same i2c address as the
saa711x chips as an saa711x. However, this fails with saa717x chips,
which use that same address and so are misdetected as a saa7111. Now
check whether the chip is really a saa711x model.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-26 08:52:38 -02:00
Luca Risolia
5718bbd2d9 V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera
The patch fix bug 5748.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-26 08:52:37 -02:00
Ira Snyder
a5bbc7d94c V4L/DVB (4849): Add missing spin_unlock to saa6588 decoder driver
Sparse noticed a lock imbalance in read_from_buf(). Further inspection shows
that the lock should not be held when the function exits.
This adds a spin_unlock_irqrestore(), so that every exit path of the
read_from_buf() function is consistent. The unlock was missing on an error
path.

Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Signed-off-by: Hans J. Koch <koch@hjk-az.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-26 08:52:37 -02:00
Andrew de Quincey
30d9464c76 V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzag
Spotted by coverity/Adrian Bunk.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-26 08:52:37 -02:00
Oliver Endriss
bc495b66d0 V4L/DVB (4840): Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003
New module parameter diseqc_method for cards with subsystem-id 13c2:1003.
- 0: unreliable method, can be used by all board revisions (default)
- 1: reliable method, works for newer board layouts only
The parameter has no effect for cards with other subsystem-ids.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-26 08:52:37 -02:00
Andrew de Quincey
c4e46b9567 V4L/DVB (4831): Fix tuning on older budget DVBS cards.
Fixes to DISEQC on these cards inadvertently broke normal tone/voltage
signalling. This restores the necessary function.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-26 08:52:37 -02:00
Jean Delvare
95f6134e17 [6PACK]: Masking bug in 6pack driver.
Looks like a broken masking to me, binary not is used where bitwise
not was intended.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-11-25 15:16:50 -08:00