9
0
Fork 0
Commit Graph

12 Commits

Author SHA1 Message Date
Juergen Beisert fe366aa8ec Adapt the i.MX23 MCI driver to the v2 i.MX23 patch series
The i.MX23 v2 architecture patch series was sligthly modified to easify
the i.MX28 architecture addition later on. So, we need now an index to
query the SSP clock frequency.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:16:10 +02:00
Juergen Beisert 32fc00e72f Make the clock calculation easier to read and correct
Due to a wrong rounding while calculating the clock divider the requested clock
of 25 MHz resulted into a 48 MHz clock. With this patch a clock frequency
below or equal the requested one will be set.
By using 'div' and 'rate' as vars, its also easier to check against the data
sheet.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:15:36 +02:00
Eric Bénard 7c9016431b mci-core: add more tested SD Cards
note :
- Transcend 16GiB fails (no log)
- Micron 8GiB eMMC fails (hangs after : Detecting a 4.0 revision card)

Signed-off-by: Eric Bénard <eric@eukrea.com>
2010-10-14 13:07:14 +02:00
Juergen Beisert 869baba658 mci: mark 'old Canon SD 16 MiB' as working
This card is working since 'mci: handle SD cards < 2.0 correctly'

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Jürgen Beisert <jbe@pengutronix.de>
2010-10-11 15:17:43 +02:00
Sascha Hauer be2be409c0 mci: align write buffer if necessary
Most SD controllers need some kind of alignment for writing
blocks. Instead of coding this in every driver, align write
blocks to a 4 byte alignment in the mci layer. For DMA
accesses we may need bigger alignment, but let's solve this
problem when we have it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:13 +02:00
Sascha Hauer f78e8f84fe mci: handle SD cards < 2.0 correctly
With SD cards older than 2.0 the sd_send_if_cond() fails. Do
not assume it's an MMC card in this case. Instead, assume
it's a MMC card if sd_send_op_cond() fails.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:13 +02:00
Sascha Hauer b98c977cf0 mci: print error code on failure
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:22:09 +02:00
Sascha Hauer 84c7dc4df2 mci: Add i.MX esdhc support
This adds a driver for the esdhc controller found on Freescale
i.MX25/35/51 SoCs.

This code is based on the U-Boot driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:10:44 +02:00
Sascha Hauer 5492d01eaa mci: Add i.MX27/31 driver
Add i.MX27/31 driver

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:27 +02:00
Juergen Beisert 3bf1bd9b33 Add S3C2440 MCI card support
Adding MCI card support for S3C2440 CPUs. This is for reference only, as there
is currently no user in the barebox tree. Maybe one with access to the A9M2440
development kit can check it on his/her system.
Checked here with my own S3C2440 based system which is not in the barebox tree.

Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:27 +02:00
Juergen Beisert 916a1ca70a Add i.MX23 MCI card support
Adding MCI card support for STM378x/i.MX23 CPUs. This is for reference only,
as this architecture is currently not part of barebox (but will coming soon).
Its tested on the i.MX23 based ChumbyOne.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:27 +02:00
Juergen Beisert 7051227d2e Add MCI card support to barebox
This adds the basic framework to handle MCI cards in barebox.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-11 13:08:27 +02:00