History log of /freebsd-10.0-release/sys/arm/at91/at91_mci.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 248899 29-Mar-2013 ian

Remove a really noisy printf left over from debugging hardware errata.


# 239805 29-Aug-2012 imp

Make this work on the AT91SAM9G20:
o Disable multi-block operations: they sometimes fail.
o Don't use the PROOF bits yet: they hang the system hard.
o Disable the the multi-block operations for !rm9200, but it
still doesn't help.
o Fix writing < 12 bytes errata to actually work.
o Enable, for the moment, reporting extra bytes soaked up.


# 239804 29-Aug-2012 imp

When copying data, use memcpy instead of bcopy. It matches the
arguments better.
Also, set the need to use the workaround flag before we actually need
to use it, rather than after.


# 239785 28-Aug-2012 imp

Make AT91_MCI_ALLOW_OVERCLOCK a real option. Rename old use 30MHz to
this new option. Only try to use > 25MHz when our best frequency is <
15MHz and overclocking is enabled. Fix minor style chaff.


# 239780 28-Aug-2012 imp

Clip the upper end to 31MHz for slow clock speeds. On faster
machines, we wind up with a 66MHz clock, which is too fast.


# 239764 28-Aug-2012 imp

Move to using a flag instead of checking the CPU type each
transaction for the MCI1 rev 2.x write workarounds.


# 239763 28-Aug-2012 imp

Style: Move these routines to be before the forward declared functions
as is the normal practice.


# 239762 27-Aug-2012 imp

Bring in the multi-block patches for mci. These required extensive
restructuring of the driver. I've tried to preserve the other silicon
workarounds that we've added over the years, but haven't had a chance
to extensively test on other hardware. On my AT91RM9200 with 30MHz/1
wire/64 block transfers, I've been able to go from ~.66MB/s to
2.25MB/s in the simple tests I performed, almost a 3.5x improvement.
This cuts the boot time almost in half when everything else goes
right (timed from rtc message to login: prompt).

PR: 155214
Submitted by: Ian Lapore


# 239721 27-Aug-2012 imp

Add hint and sysctl support for 4 wire mode.

PR: 155241
Submitted by: Ian Lapore


# 239720 27-Aug-2012 imp

Minor style(9) nit.


# 239719 27-Aug-2012 imp

Don't puprosely overclock the SD bus to 30MHz, make the user
explicltly enable that. The driver chose to use 60MHz / 2 (30MHz)
most of the time rather than 60MHz / 4 (15MHz) based on the Linux
driver of the time. This pushes the spec a little in order to not
suffer the penalty of running at 15MHz. However, when other bus
masters are active in the system, and the user tries 4-wire mode, the
internal bus arbitration would fail with data loss as a result.

# Comments from PR were reworked to reflect my historical perspective

PR: 155214 (partial)
Submitted by: Ian Lepore


# 239623 23-Aug-2012 imp

Use proper resource type when freeing.

Submitted by: Ian Lapore (indirectly in a larger patch)


# 238376 11-Jul-2012 imp

Make the SoC stuff a little more modular, and start to move away from
having the CPU device that's a child of atmelarm that does stuff.

o Create a linker_set for the support fucntions for the SoCs.
o Rename soc_data to soc_info.
o Move the delay and reset function pointers to new soc_data struct
o Create elements for all known SoCs
o Add lookup of the SoC we found, and print a warning if it isn't one
we know about.


# 236989 13-Jun-2012 imp

Strip trailing whitespace before other changes.


# 236658 06-Jun-2012 imp

Enhance the Atmel SoC chip identification routines to account for more
SoC variants. Fold the AT91SAM9XE chips into the AT91SAM9260
handling, where appropriate. The following SoCs/SoC families are recognized:
at91cap9, at91rm9200, at91sam9260, at91sam9261, at91sam9263,
at91sam9g10, at91sam9g20, at91sam9g45, at91sam9n12, at91sam9rl,
at91sam9x5
and the following variations are also recognized:
at91rm9200_bga, at91rm9200_pqfp, at91sam9xe, at91sam9g45, at91sam9m10,
at91sam9g46, at91sam9m11, at91sam9g15, at91sam9g25, at91sam9g35,
at91sam9x25, at91sam9x35
This is only the identification routine: no additional Atmel devices
are supported at this time.

# With these changes, I'm able to boot to the point of identification
# on a few different Atmel SoCs that we don't yet support using the
# KB920X config file -- someday tht will be an ATMEL config file...


# 236373 01-Jun-2012 imp

Revert debug and other immature code accidentally committed in r236372.


# 236372 01-Jun-2012 imp

Initialize the clocks before we call cninit() so that the serial
console so initialized will work upon return from cninit. While this
is the very next line, other platforms setup all this stuff before
calling cninit. Also, initialize the SDRAM base register in the inner
block in at91_ramsize().


# 234560 21-Apr-2012 marius

- Add support for MCI1 revision 2xx controllers and a work-around for their
"Data Write Operation and number of bytes" erratum.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.


# 225882 30-Sep-2011 kevlo

Remove pointless semicolons after label


# 213496 06-Oct-2010 cognet

if_ate.c:

* Support for sam9 "EMAC" controller.
* Support for rmii interface to phy.

at91.c & at91sam9.c:

* Eliminate separate at91sam9.c file.
* Add new devices to at91sam9_devs table.

at91_machdep.c & at at91sam9_machdep.c:

* Automatic chip type determination.
* Remove compile time chip dependencies.
* Eliminate separate at91sam9_machdep.c file.

at91_pmc.c:

* Corrected support for all of the sam926? and sam9g20 chips.
* Remove compile time chip dependencies.

My apologies to Greg for taking so long to take care of it.


# 194015 11-Jun-2009 avg

strict kobj signatures: number of fixes for arm architecture

no functional changes should result

Reviewed by: imp, current@
Approved by: jhb (mentor)


# 187606 22-Jan-2009 imp

Move to having a caps flag. Newer versions of the AT91 family don't
need the bouncing, so save a few copies in that case. Also convert
4-bit code selection to using it.


# 187603 22-Jan-2009 imp

Don't over-commit the DMA. Use the passed in size of the transfer
rather than a fixed 512... This fixes the mount root problem on at91.
Prior to the SD card reorg, all data transfers were 512 bytes, so we
didn't notice.


# 187600 22-Jan-2009 imp

Remove now-redundant declaration.


# 187548 21-Jan-2009 imp

o The f_max is really at91_master_clock / 2, not 30MHz, so compute it as such.
o Only set 4-bit caps on those boards that have 4-bit caps (this means that
because we don't set wire4 yet, this forces us to always use 1-bit bus).
o Don't test wire4 when setting up the bus width, since bad things will
happen if we do.

# This likely won't fix the busted at91 sd card support, but these are
# needful changes for correctness.


# 187476 20-Jan-2009 mav

Implement MMCBR_IVAR_CAPS. It should better be implemented, or results
can be unpredictable.

PR: arm/128987


# 185265 24-Nov-2008 imp

Tweak the disclaimer section of the license to match COPYRIGHT, for
better or worse. Ok'd by folks that have additional copyrights to the
files in cases where there's joint authorship.


# 185049 18-Nov-2008 stas

- Fix two minor errors in at91 code.

PR: arm/128959
Submitted by: Bjorn Konig <bkoenig@alpha-tierchen.de>
Approved by: kib (mentor)


# 184452 29-Oct-2008 mav

Allow card reader bridge driver to report maximum supported transfer size.
sdhci supports up to 65535 blocks transfers, at91_mci - one block.

Enable multiblock operations disabled before to follow at91_mci driver
limitations.

Reviewed by: imp@


# 183670 07-Oct-2008 imp

Use bus_get_dma_tag() instead of NULL here. Not really needed for atmel
at the moment, but it is more correct.


# 183479 30-Sep-2008 imp

Properly implement read only. Also, the caps implementation is wrong
here, so I'm backing it out.


# 183451 28-Sep-2008 imp

Implement MMCBR_IVAR_CAPS for AT91 MCI device.

Submitted by: mav@ (well, not this one, but the base impl was)


# 182807 05-Sep-2008 imp

Turn some lame pseudo-code into a less lame comment.


# 172195 16-Sep-2007 imp

Kill overly verbose messages about setting bus width.

Approved by: re@ (blanket)


# 166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@


# 165781 04-Jan-2007 ticso

MFp4: Read access require PDC to be setup first otherwise we might get
overrun errors.
Write access however need cmd first, so keep the existing order
for them.


# 163517 20-Oct-2006 imp

MMC/SD bridge driver (host adapter) for AT91RM9200's MCI interface.
This interface also appears in the AT91SAM9260 and '61 as well as the
AVR32 based micros from Atmel. We don't yet support write protect or
hot-swap in this bridge driver.