Commit graph

20 commits

Author SHA1 Message Date
Pierre Ossman 759bdc7af4 sdio: store vendor strings
Store vendor strings found in CISTPL_VERS_1 so that function drivers
can access them.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23 21:28:01 +02:00
Pierre Ossman 1a632f8cdc sdio: split up common and function CIS parsing
Add a more clean separation between global, common CIS information
and the function specific one as we need the common information in
places where no specific function is specified.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23 20:44:22 +02:00
Pierre Ossman 35c66c1908 sdio: read and decode interesting parts of the CCCR
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23 20:12:18 +02:00
Pierre Ossman e29a7d73f4 mmc: basic SDIO device model
Add the sdio bus type and basic device handling.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23 19:45:31 +02:00
Pierre Ossman 5c4e6f1301 mmc: detect SDIO cards
Really basic init sequence for SDIO cards.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-09-23 19:40:07 +02:00
Pierre Ossman bd76631261 mmc: remove old card states
Remove card states that no longer make any sense.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 16:11:57 +02:00
Pierre Ossman aaac1b470b mmc: Move core functions to subdir
Create a "core" subdirectory to house the central bus handling
functions.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:18 +02:00
Pierre Ossman b855885e3b mmc: deprecate mmc bus topology
The classic MMC bus was defined as multi card bus
system, which is reflected in the design in the MMC
layer.

When SD showed up, the bus topology was abandoned
and a star topology (one card per host) was mandated.
MMC version 4 has followed this, officially deprecating
the bus topology.

As we do not have any known users of the bus
topology we can remove support for it. This will
simplify the code and rectify some incorrect
assumptions in the newer additions.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:18 +02:00
Pierre Ossman 9c2c0af950 mmc: add type field to cards
Split out the type of card into its own field as it hardly
qualifies as a state.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:16 +02:00
Pierre Ossman 85a18ad93e mmc: MMC sector based cards
Support for MMC 4.2 sector based cards. This tweaks the init a
bit and reads a new field out of the EXT_CSD.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:15 +02:00
Philip Langdale fba68bd2da mmc: Add support for SDHC cards
Thanks to the generous donation of an SDHC card by John Gilmore, and
the surprisingly enlightened decision by the SD Card Association to
publish useful specs, I've been able to bash out support for SDHC. The
changes are not too profound:

i) Add a card flag indicating the card uses block level addressing and
check it in the block driver. As we never took advantage of byte-level
addressing, this simply involves skipping the block -> byte
translation when sending commands.

ii) The layout of the CSD is changed - a set of fields are discarded
to make space for a larger C_SIZE. We did not reference any of the
discarded fields except those related to the C_SIZE.

iii) Read and write timeouts are fixed values and not calculated from
CSD values.

iv) Before invoking SEND_APP_OP_COND, we must invoke the new
SEND_IF_COND to inform the card we support SDHC.

Signed-off-by: Philipl Langdale <philipl@overt.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-02-04 20:54:07 +01:00
Pierre Ossman 7ccd266e67 mmc: Support for high speed SD cards
Modern SD cards support a clock speed of 50 MHz. Make sure we test for
this capability and do the song and dance required to activate it.

Activating high speed support actually modifies the TRAN_SPEED field
of the CSD. But as the spec says that the cards must report 50 MHz,
we might as well skip re-reading the CSD.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-01 18:53:37 +01:00
Philip Langdale bce40a36de [PATCH] mmc: Add support for mmc v4 high speed mode
This adds support for the high-speed modes defined by mmc v4
(assuming the host controller is up to it). On a TI sdhci controller,
it improves read speed from 1.3MBps to 2.3MBps. The TI controller can
only go up to 24MHz, but everything helps. Another person has taken
this basic patch and used it on a Nokia 770 to get a bigger boost
because that controller can run at 48MHZ.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-01 18:21:32 +01:00
Russell King 37be4e7809 [MMC] extend data timeout for writes
The CSD contains a "read2write factor" which determines the multiplier to
be applied to the read timeout to obtain the write timeout.  We were
ignoring this parameter, resulting in the possibility for writes being
timed out too early.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-02 17:24:59 +01:00
Russell King ce11a161c1 [MMC] Fix missing ','
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-04 12:40:39 +00:00
Russell King a6f6c96b65 [MMC] Improve MMC card block size selection
Select a block size for IO based on the read and write block size
combinations, and whether the card supports partial block reads
and/or partial block writes.

If we are able to satisfy block reads but not block writes, mark
the device read only.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-01-03 22:38:44 +00:00
Pierre Ossman b57c43ad81 [PATCH] sd: SCR register
Read the SD specific SCR register from the card.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:50 -07:00
Pierre Ossman a00fc09029 [PATCH] sd: read-only switch
Support for the read-only switch on SD cards which must be enforced by the
host.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:50 -07:00
Pierre Ossman 335eadf2ef [PATCH] sd: initialize SD cards
Support for the Secure Digital protocol in the MMC layer.

A summary of the legal issues surrounding SD cards, as understood by yours
truly:

Members of the Secure Digital Association, hereafter SDA, are required to sign
a NDA[1] before given access to any specifications.  It has been speculated
that including an SD implementation would forbid these members to redistribute
Linux.  This is the basic problem with SD support so it is unclear if it even
is a problem since it has no effect on those of us that aren't members.

The SDA doesn't seem to enforce these rules though since the patches included
here are based on documentation made public by some of the members.  The most
complete specs[2] are actually released by Sandisk, one of the founding
companies of the SDA.

Because of this the NDA is considered a non-issue by most involved in the
discussions concerning these patches.  It might be that the SDA is only
interested in protecting the so called "secure" bits of SD, which so far
hasn't been found in any public spec.  (The card is split into two sections,
one "normal" and one "secure" which has an access scheme similar to TPM:s).

(As a side note, Microsoft is working to make things easier for us since they
want to be able to include the source code for a SD driver in one of their
development kits.  HP is making sure that the new NDA will allow a Linux
implementation.  So far only the SDIO specs have been opened up[3].  More will
hopefully follow.)

 [1] http://www.sdcard.org/membership/images/ippolicy.pdf
 [2] http://www.sandisk.com/pdf/oem/ProdManualSDCardv1.9.pdf
 [3] http://www.sdcard.org/sdio/Simplified%20SDIO%20Card%20Specification.pdf

This patch contains the central parts of the SD support.  If no MMC cards are
found on a bus then the MMC layer proceeds looking for SD cards.  Helper
functions are extended to handle the special needs of SD cards.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:50 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00