Commit Graph

696 Commits (24630dc68a499baec367d24285bc6b92207cc100)

Author SHA1 Message Date
Russell King c95a44329e Merge branch 'rmk-devel-mxc-pu-v2' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6 into devel 2008-12-17 20:05:39 +00:00
Russell King cd4348339c Merge branch 'hsmmc-init' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel 2008-12-17 20:03:39 +00:00
Marc Kleine-Budde df25f9da9f imxmmc: use readl/writel
Use readl/writel instead of direct pointer deref.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:17 +01:00
Marc Kleine-Budde 2507b0a333 imxmmc: Remove unused variables
This removes clkrt and cmdat from struct imxmci_host, they are
unused.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:16 +01:00
Marc Kleine-Budde 4b7c0e4cae imxmmc: Checkpatch cleanup
This cleans up the warnings issued by the checkpatch script
and remove the file history from the header

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2008-12-16 14:58:15 +01:00
Tony Lindgren 90c62bf08f omap mmc: Add low-level initialization for hsmmc controller
Add low-level initialization for hsmmc controller. Merged into
this patch patch are various improvments and board support by
Grazvydas Ignotas and David Brownell.

Also change wire4 to be wires, as some newer controllers support
8 data lines.

Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-12-10 17:37:17 -08:00
Tony Lindgren d88746652b omap mmc: Add better MMC low-level init
This will simplify the MMC low-level init, and make it more
flexible to add support for a newer MMC controller in the
following patches.

The patch rearranges platform data and gets rid of slot vs
controller confusion in the old data structures. Also fix
device id numbering in the clock code.

Some code snippets are based on an earlier patch by
Russell King <linux@arm.linux.org.uk>.

Cc: Pierre Ossman <drzeus-mmc@drzeus.cx>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2008-12-10 17:37:16 -08:00
Russell King 112243034c Merge branch 'clks' into devel 2008-11-30 17:46:52 +00:00
Russell King ee569c43e3 [ARM] amba drivers: don't pass a consumer clock name for devices with unique clocks
Where devices only have one consumer, passing a consumer clock ID
has no real benefit, and it only encourages wrong implementations of
the clk API.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-30 17:38:14 +00:00
Russell King fba670013d Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2008-11-29 19:35:07 +00:00
Russell King dcea83adc6 [ARM] Hide ISA DMA API when ISA_DMA_API is unset
When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
so there's no point in publishing the prototypes via asm/dma.h, nor
including the machine dependent parts of that API.

This allows us to remove a lot of mach/dma.h files which don't contain
any useful code.  Unfortunately though, some platforms put their own
private non-ISA definitions into mach/dma.h, so we leave these behind
and fix the appropriate #include statments.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-29 18:42:40 +00:00
Russell King 05678a96de [ARM] pxa: avoid polluting the kernel's namespace
Avoid unnecessarily pollution of the kernel's namespace by avoiding
mach/hardware.h.  Include this header file where necessary.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-28 16:04:54 +00:00
Russell King e0d8b13ae1 [ARM] pxa: don't pass a consumer clock name for devices with unique clocks
Where devices only have one consumer, passing a consumer clock ID
has no real benefit.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-27 12:38:23 +00:00
Kay Sievers d1b2686308 mmc: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-11-08 21:37:46 +01:00
Pierre Ossman 493890e75d mmc: increase SD write timeout for crappy cards
It seems that some cards are slightly out of spec and occasionally
will not be able to complete a write in the alloted 250 ms [1].
Incease the timeout slightly to allow even these cards to function
properly.

[1] http://lkml.org/lkml/2008/9/23/390

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-11-08 21:36:59 +01:00
Ben Dooks e856359685 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into s3c-moves2 2008-11-03 14:49:01 +00:00
Ben Dooks e3bd9ec5d8 [ARM] S3C24XX: Move mci.h to arch/arm/plat-s3c24xx/include/plat
Move mci.h to new position in arch/arm/plat-s3c24xx/include/plat
ready to clean out old include directories.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-30 10:17:16 +00:00
Linus Walleij 9e9430213f [ARM] 5322/1: Fix fastpath issue in mmci.c
Fix fastpath issues

Since mmci_request() can be called from a non-interrupt
context, and does, during kernel init, causing a host
of debug messages during boot if you enable spinlock debugging,
we need to use the spinlock calls that save IRQ flags and
restore them.

Signed-off-by: Linus Walleij <triad@df.lth.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-28 00:00:42 +00:00
Al Viro a5a1561f88 [PATCH] switch mmc
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-10-21 07:48:37 -04:00
Al Viro d4430d62fa [PATCH] beginning of methods conversion
To keep the size of changesets sane we split the switch by drivers;
to keep the damn thing bisectable we do the following:
	1) rename the affected methods, add ones with correct
prototypes, make (few) callers handle both.  That's this changeset.
	2) for each driver convert to new methods.  *ALL* drivers
are converted in this series.
	3) kill the old (renamed) methods.

Note that it _is_ a flagday; all in-tree drivers are converted and by the
end of this series no trace of old methods remain.  The only reason why
we do that this way is to keep the damn thing bisectable and allow per-driver
debugging if anything goes wrong.

New methods:
	open(bdev, mode)
	release(disk, mode)
	ioctl(bdev, mode, cmd, arg)		/* Called without BKL */
	compat_ioctl(bdev, mode, cmd, arg)
	locked_ioctl(bdev, mode, cmd, arg)	/* Called with BKL, legacy */

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-10-21 07:47:32 -04:00
Linus Torvalds 921974982a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  s3cmci: Add Ben Dooks/Simtec Electronics to header & copyright
  s3cmci: fix continual accesses to host->pio_ptr
  s3cmci: Support transfers which are not multiple of 32 bits.
  s3cmci: cpufreq support
  s3cmci: Make general protocol errors less noisy
  mmc_block: tell block layer there is no seek penalty
2008-10-20 10:17:42 -07:00
Russell King 2502991560 Merge branch 'fixes' into for-linus
Conflicts:

	arch/arm/mach-versatile/core.c
2008-10-15 23:16:07 +01:00
ben@fluff.org.uk 08c55e22df s3cmci: Add Ben Dooks/Simtec Electronics to header & copyright
Since the original authour (Thomas Kleffel) has been too busy to
merge the s3cmci driver and keep it up to date, I (mostly as part
of my role with Simtec Electronics) got the driver to a mergable
state and have been maintaining it since I think that I should
be added to the header. Also add a copyright statement for the
new work.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-15 18:06:00 +02:00
ben@fluff.org.uk 18280fff66 s3cmci: fix continual accesses to host->pio_ptr
The s3cmci driver uses the host->pio_ptr field to
point to the current position into the buffer for data
transfer. During the transfers it does the following:

	while (fifo_words--)
		*(host->pio_ptr++) = readl(from_ptr);

This is inefficent, as host->pio_ptr is not used in any
other part of the transfer but the compiler emits code
which does the following:

	while (fifo_words--) {
		u32 *ptr = host->pio_ptr;
		*ptr = readl(from_ptr);
		ptr++;
		host->pio_ptr = ptr;
	}

This is obviously a waste of a load and store each time
around the loop, which could be up to 16 times depending
on how much needs to be transfered.

Move the ptr accesses to outside the while loop so that
we do not end up reloading/re-writing the pointer.

Note, this seems to make the code 16 bytes larger.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-15 18:05:48 +02:00
Christer Weinigel 088a78af97 s3cmci: Support transfers which are not multiple of 32 bits.
To be able to do SDIO the s3cmci driver has to support non-word-sized
transfers.  Change pio_words into pio_bytes and fix up all the places
where it is used.

This variant of the patch will not overrun the buffer when reading an
odd number of bytes.  When writing, this variant will still read past
the end of the buffer, but since the driver can't support non-word-
aligned transfers anyway, this should not be a problem, since a
word-aligned transfer will never cross a page boundary.

This has been tested with a CSR SDIO Bluetooth Type A device on a
Samsung S3C24A0 processor.

Signed-off-by: Christer Weinigel <christer@weinigel.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-15 18:05:14 +02:00
ben@fluff.org.uk f87e6d00fb s3cmci: cpufreq support
Support for cpu frequency changing.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-15 18:04:52 +02:00
ben@fluff.org.uk 9c2e7e40bf s3cmci: Make general protocol errors less noisy
General errors, such as timeouts during probe do not need to
be sent to the console, so move them down to be included if the
debug is enabled.

Such errors include:
s3c2440-sdi s3c2440-sdi: s3cmci_request: no medium present

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-15 18:04:40 +02:00
Russell King 7e69a8c4d0 Merge branch 's3c-move' into devel
Conflicts:

	arch/arm/mach-versatile/core.c
2008-10-14 22:24:51 +01:00
Russell King b6825d2df5 Merge branch 'omap-all' into devel
Conflicts:

	arch/arm/mach-omap2/gpmc.c
	arch/arm/mach-omap2/irq.c
2008-10-14 22:24:42 +01:00
Pierre Ossman 8dddfe1926 mmc_block: tell block layer there is no seek penalty
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-14 20:04:46 +02:00
David Woodhouse e758936e02 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	include/asm-x86/statfs.h
2008-10-13 17:13:56 +01:00
Linus Torvalds 46b5e34029 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (24 commits)
  MMC: Use timeout values from CSR
  MMC: CSD and CID timeout values
  sdhci: 'scratch' may be used uninitialized
  mmc: explicitly mention SDIO support in Kconfig
  mmc: remove redundant "depends on"
  Fix comment in include/linux/mmc/host.h
  sdio: high-speed support
  mmc_block: hard code 512 byte block size
  sdhci: force high speed capability on some controllers
  mmc_block: filter out PC requests
  mmc_block: indicate strict ordering
  mmc_block: inform block layer about sector count restriction
  sdio: give sdio irq thread a host specific name
  sdio: make sleep on error interruptable
  sdhci: reduce card detection delay
  sdhci: let the controller wait for busy state to end
  atmel-mci: Add missing flush_dcache_page() in PIO transfer code
  atmel-mci: Don't overwrite error bits when NOTBUSY is set
  atmel-mci: Add experimental DMA support
  atmel-mci: support multiple mmc slots
  ...
2008-10-12 11:51:57 -07:00
Pierre Ossman 6ee6c6adf1 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/atmel-mci-2.6.28
Conflicts:
	drivers/mmc/host/atmel-mci.c
2008-10-12 11:08:46 +02:00
Matthew Fleming 162350eb75 MMC: Use timeout values from CSR
Hard-coded timeout values of 250ms for writes and 100ms for reads are
currently used for MMC transactions over SPI. The spec states that the
timeout values from the card should be used.

Signed-off-by: Matthew Fleming <matthew.fleming@imgtec.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:38 +02:00
Matthew Fleming 0d3e0460f3 MMC: CSD and CID timeout values
The MMC spec states that the timeout for accessing the CSD and CID
registers is 64 clock cycles.

Signed-off-by: Matthew Fleming <matthew.fleming@imgtec.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:37 +02:00
Steven Noonan 7244b85bd1 sdhci: 'scratch' may be used uninitialized
The variable 'scratch' is always initialized before it's used. The
conditional which is responsible for initialization of 'scratch' will
always evaluate 'true' when the first loop iteration occurs, and thus,
it's properly initialized. GCC doesn't see this, of course, so using
the uninitialized_var() macro seems to work for silencing this case.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:36 +02:00
Pierre Ossman 57105737f6 mmc: explicitly mention SDIO support in Kconfig
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:36 +02:00
Pierre Ossman 1ea4f444f3 mmc: remove redundant "depends on"
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:35 +02:00
Pierre Ossman d16f577004 sdio: high-speed support
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:34 +02:00
Pierre Ossman 0884669870 mmc_block: hard code 512 byte block size
We use 512 byte blocks on all cards, and newer cards support nothing
else, so hard code it and make the code less complex.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:33 +02:00
Pierre Ossman a4b7619377 sdhci: force high speed capability on some controllers
Some high speed capable controllers forget to set the high speed
capability bit. Make sure we enable the functionality anyway.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:32 +02:00
Pierre Ossman d6d8de3341 mmc_block: filter out PC requests
We do not support PC (SCSI) commands, so don't pretend we do by
letting them through.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:32 +02:00
Pierre Ossman 9102895411 mmc_block: indicate strict ordering
The MMC block driver services requests one at a time and in strict
order. Indicate this to the block layer so that it can handle barriers
in an efficient manner.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:31 +02:00
Pierre Ossman f3eb0aaa02 mmc_block: inform block layer about sector count restriction
Make sure we consider the maximum block count when we tell the block
layer about the maximum sector count. That way we don't have to chop
up the request ourselves.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:30 +02:00
Pierre Ossman 6501ff604a sdio: give sdio irq thread a host specific name
There is one thread per host controller so make sure they all get
unique names.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:30 +02:00
Pierre Ossman e633b7bcec sdio: make sleep on error interruptable
Make sure we can be woken from the forced sleep that is done on errors.
Removing a card often results in -ENOMEDIUM or -EILSEQ so we previously
locked up the removal process for a second.

We could completely exit on -ENOMEDIUM, but it might be a transient
glitch so treat it like any other error.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:28 +02:00
Pierre Ossman 04cf585d29 sdhci: reduce card detection delay
The card detection delay was added early when the behaviour of the
card interrupt was still very much unknown (i.e. before there was a
public specification). As it is now known that it is a debounced signal,
reduce the delay to something more sensible.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:28 +02:00
Pierre Ossman e809517f6f sdhci: let the controller wait for busy state to end
The sdhci controllers can interrupt us when the busy state from the
card has ended, saving CPU cycles and power.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2008-10-12 11:04:27 +02:00
Linus Torvalds 7cc4e87f91 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (236 commits)
  [ARM] 5300/1: fixup spitz reset during boot
  [ARM] 5295/1: make ZONE_DMA optional
  [ARM] 5239/1: Palm Zire 72 power management support
  [ARM] 5298/1: Drop desc_handle_irq()
  [ARM] 5297/1: [KS8695] Fix two compile-time warnings
  [ARM] 5296/1: [KS8695] Replace macro's with trailing underscores.
  [ARM] pxa: allow multi-machine PCMCIA builds
  [ARM] pxa: add preliminary CPUFREQ support for PXA3xx
  [ARM] pxa: add missing ACCR bit definitions to pxa3xx-regs.h
  [ARM] pxa: rename cpu-pxa.c to cpufreq-pxa2xx.c
  [ARM] pxa/zylonite: add support for USB OHCI
  [ARM] ohci-pxa27x: use ioremap() and offset for register access
  [ARM] ohci-pxa27x: introduce pxa27x_clear_otgph()
  [ARM] ohci-pxa27x: use platform_get_{irq,resource} for the resource
  [ARM] ohci-pxa27x: move OHCI controller specific registers into the driver
  [ARM] ohci-pxa27x: introduce flags to avoid direct access to OHCI registers
  [ARM] pxa: move I2S register and bit definitions into pxa2xx-i2s.c
  [ARM] pxa: simplify DMA register definitions
  [ARM] pxa: make additional DCSR bits valid for PXA3xx
  [ARM] pxa: move i2c register and bit definitions into i2c-pxa.c
  ...

Fixed up conflicts in
	arch/arm/mach-versatile/core.c
	sound/soc/pxa/pxa2xx-ac97.c
	sound/soc/pxa/pxa2xx-i2s.c
manually.
2008-10-11 10:09:45 -07:00
Linus Torvalds ef5bef357c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (37 commits)
  [SCSI] zfcp: fix double dbf id usage
  [SCSI] zfcp: wait on SCSI work to be finished before proceeding with init dev
  [SCSI] zfcp: fix erp list usage without using locks
  [SCSI] zfcp: prevent fc_remote_port_delete calls for unregistered rport
  [SCSI] zfcp: fix deadlock caused by shared work queue tasks
  [SCSI] zfcp: put threshold data in hba trace
  [SCSI] zfcp: Simplify zfcp data structures
  [SCSI] zfcp: Simplify get_adapter_by_busid
  [SCSI] zfcp: remove all typedefs and replace them with standards
  [SCSI] zfcp: attach and release SAN nameserver port on demand
  [SCSI] zfcp: remove unused references, declarations and flags
  [SCSI] zfcp: Update message with input from review
  [SCSI] zfcp: add queue_full sysfs attribute
  [SCSI] scsi_dh: suppress comparison warning
  [SCSI] scsi_dh: add Dell product information into rdac device handler
  [SCSI] qla2xxx: remove the unused SCSI_QLOGIC_FC_FIRMWARE option
  [SCSI] qla2xxx: fix printk format warnings
  [SCSI] qla2xxx: Update version number to 8.02.01-k8.
  [SCSI] qla2xxx: Ignore payload reserved-bits during RSCN processing.
  [SCSI] qla2xxx: Additional residual-count corrections during UNDERRUN handling.
  ...
2008-10-10 10:53:26 -07:00