summaryrefslogtreecommitdiffstats
path: root/sys/arm/at91/at91_mci.c
Commit message (Collapse)AuthorAgeFilesLines
* Add FDT matching code.imp2014-02-091-1/+17
|
* Remove #include <machine/frame.h> from all the arm code that doesn'tian2013-10-271-1/+0
| | | | | | really need it. That would be almost everywhere it was included. Add it in a couple files that really do need it and were previously getting it by accident via another header.
* Remove a really noisy printf left over from debugging hardware errata.ian2013-03-291-2/+0
|
* Make this work on the AT91SAM9G20:imp2012-08-291-9/+22
| | | | | | | | | 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.
* When copying data, use memcpy instead of bcopy. It matches theimp2012-08-291-7/+7
| | | | | | arguments better. Also, set the need to use the workaround flag before we actually need to use it, rather than after.
* Make AT91_MCI_ALLOW_OVERCLOCK a real option. Rename old use 30MHz toimp2012-08-281-86/+89
| | | | | this new option. Only try to use > 25MHz when our best frequency is < 15MHz and overclocking is enabled. Fix minor style chaff.
* Clip the upper end to 31MHz for slow clock speeds. On fasterimp2012-08-281-5/+6
| | | | machines, we wind up with a 66MHz clock, which is too fast.
* Move to using a flag instead of checking the CPU type eachimp2012-08-281-2/+9
| | | | transaction for the MCI1 rev 2.x write workarounds.
* Style: Move these routines to be before the forward declared functionsimp2012-08-281-12/+12
| | | | as is the normal practice.
* Bring in the multi-block patches for mci. These required extensiveimp2012-08-281-193/+664
| | | | | | | | | | | | | 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
* Add hint and sysctl support for 4 wire mode.imp2012-08-271-7/+13
| | | | | PR: 155241 Submitted by: Ian Lapore
* Minor style(9) nit.imp2012-08-271-1/+2
|
* Don't puprosely overclock the SD bus to 30MHz, make the userimp2012-08-271-11/+91
| | | | | | | | | | | | | | 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
* Use proper resource type when freeing.imp2012-08-231-1/+1
| | | | Submitted by: Ian Lapore (indirectly in a larger patch)
* Make the SoC stuff a little more modular, and start to move away fromimp2012-07-111-1/+1
| | | | | | | | | | | 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.
* Strip trailing whitespace before other changes.imp2012-06-131-2/+2
|
* Enhance the Atmel SoC chip identification routines to account for moreimp2012-06-061-15/+9
| | | | | | | | | | | | | | | | | | 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...
* Revert debug and other immature code accidentally committed in r236372.imp2012-06-011-50/+10
|
* Initialize the clocks before we call cninit() so that the serialimp2012-06-011-10/+50
| | | | | | | 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().
* - Add support for MCI1 revision 2xx controllers and a work-around for theirmarius2012-04-221-7/+48
| | | | | | "Data Write Operation and number of bytes" erratum. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
* Remove pointless semicolons after labelkevlo2011-09-301-1/+1
|
* if_ate.c:cognet2010-10-061-25/+72
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* strict kobj signatures: number of fixes for arm architectureavg2009-06-111-1/+1
| | | | | | | no functional changes should result Reviewed by: imp, current@ Approved by: jhb (mentor)
* Move to having a caps flag. Newer versions of the AT91 family don'timp2009-01-231-13/+21
| | | | | need the bouncing, so save a few copies in that case. Also convert 4-bit code selection to using it.
* Don't over-commit the DMA. Use the passed in size of the transferimp2009-01-221-2/+1
| | | | | | 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.
* Remove now-redundant declaration.imp2009-01-221-1/+0
|
* o The f_max is really at91_master_clock / 2, not 30MHz, so compute it as such.imp2009-01-211-3/+6
| | | | | | | | | | 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.
* Implement MMCBR_IVAR_CAPS. It should better be implemented, or resultsmav2009-01-201-0/+4
| | | | | | can be unpredictable. PR: arm/128987
* Tweak the disclaimer section of the license to match COPYRIGHT, forimp2008-11-251-10/+11
| | | | | better or worse. Ok'd by folks that have additional copyrights to the files in cases where there's joint authorship.
* - Fix two minor errors in at91 code.stas2008-11-181-1/+1
| | | | | | PR: arm/128959 Submitted by: Bjorn Konig <bkoenig@alpha-tierchen.de> Approved by: kib (mentor)
* Allow card reader bridge driver to report maximum supported transfer size.mav2008-10-291-0/+4
| | | | | | | | | 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@
* Use bus_get_dma_tag() instead of NULL here. Not really needed for atmelimp2008-10-071-3/+3
| | | | at the moment, but it is more correct.
* Properly implement read only. Also, the caps implementation is wrongimp2008-09-301-5/+1
| | | | here, so I'm backing it out.
* Implement MMCBR_IVAR_CAPS for AT91 MCI device.imp2008-09-281-0/+5
| | | | Submitted by: mav@ (well, not this one, but the base impl was)
* Turn some lame pseudo-code into a less lame comment.imp2008-09-051-8/+1
|
* Kill overly verbose messages about setting bus width.imp2007-09-161-5/+2
| | | | Approved by: re@ (blanket)
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | 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@
* MFp4: Read access require PDC to be setup first otherwise we might getticso2007-01-051-3/+5
| | | | | | overrun errors. Write access however need cmd first, so keep the existing order for them.
* MMC/SD bridge driver (host adapter) for AT91RM9200's MCI interface.imp2006-10-201-0/+725
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.
OpenPOWER on IntegriCloud