| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
1. Both mmc_read_ivar() and sdhci_read_ivar() use the expression
'*(int *)result = val' to assign to result which is uintptr_t *.
This does not work on big-endian 64 bit systems.
2. The media_size ivar is declared as 'off_t' which does not fit
into uintptr_t in 32bit systems, change this to long.
Submitted by: kanthms at netlogicmicro com (initial version)
|
|
|
|
|
|
| |
It was just a cosmetic issue, because that number is only reported in logs.
Reported by: Michael Butler on current@
|
|
|
|
|
|
|
| |
card being detected.
Reviewed by: imp
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
| |
reintroduced after HEAD is reopened for commits by re@.
Approved by: re (kib), attilio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.
Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.
For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.
Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.
Bump __FreeBSD_version in order to reflect the newbus lock introduction.
Reviewed by: ed, hps, jhb, imp, mav, scottl
No answer by: ariff, thompsa, yongari
Tested by: pho,
G. Trematerra <giovanni dot trematerra at gmail dot com>,
Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by: Yahoo! Incorporated
Approved by: re (ksmith)
|
| |
|
| |
|
|
|
|
|
|
| |
code.
o Use NULL in preference to 0 for a few pointers.
o default to bus timing normal, like we default to bus_width_1.
|
| |
|
|
|
|
| |
Make requests logging controllable by hw.mmc.debug sysctl.
|
|
|
|
|
|
| |
cards people have today support high speed mode, so the timing field
would be initialized to bus_timing_hs, but there are some slow
cards...
|
| |
|
|
|
|
|
| |
Also, report a few other things under boot verbose.
Small style nit to make new code look like old code in this file.
|
|
|
|
| |
bus frequency.
|
|
|
|
|
|
|
|
|
|
|
| |
Now it is possible to suspend/resume with inserted and active card.
To reinitialize card on resume and to detect card change while suspended,
implement bus rescan routines. It can also be used by controllers without
card presence detection signals or with multiple cards per slot support.
While there, cleanup msleep() usage. We have no any rights to exit without
"request done" signal from driver as it could lead to modify after free.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
constraints required by the card.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Erase operation gives card's logic information about unused areas to help it
implement wear-leveling with lower overhead comparing to usual writing.
Erase is much faster then write and does not depends on data bus speed.
Also as result of hitting in-card write logic optimizations I have measured
up to 50% performance boost on writing undersized blocks into preerased areas.
At the same time there are strict limitations on size and allignment of erase
operations. We can erase only blocks aligned to the erase sector size and
with size multiple of it. Different cards has different erase sector size
which usually varies from 64KB to 4MB. SD cards actually allow to erase
smaller blocks, but it is much more expensive as it is implemented via
read-erase-write sequence and so not sutable for the BIO_DELETE purposes.
Reviewed by: imp@
|
|
|
|
|
|
|
| |
There are lot of cards with uneven sizes and too strong rounding
will lead to very significant rounding errors.
Reviewed by: imp@
|
| |
|
|
|
|
|
|
| |
Move nested tertiary operator expressions into their own function.
Remove extra blank line.
cache sd->disk in 'd' to make the code easier to read.
|
| |
|
|
|
|
|
| |
log message in a way a bit more common for disk devices. Also it will allow
mmcsd driver to use MMC/SD specific commands when needed.
|
| |
|
|
|
|
|
|
|
| |
have in common right now is a memset. This saves a parameter to
these routines, as well as a level of indentation.
o Make mmc_get_bits a little clearer... It really only works on 128-bit
registers right now.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- add MMC support.
- add SDHC support.
- add 4 and 8 bit bus width support.
- add High Speed bus timing support.
|
|
|
|
| |
Make mmc_get_media_size now return an off_t and remove now useless cast.
|
|
|
|
|
| |
may need to ask the host controller for the right number to use
here...
|
|
|
|
|
|
|
|
|
| |
disabled by default because there's problems with it on AT91RM9200,
currently the only host controller in the tree. I've not had time to
track those problems to ground. I'm committing because this is
important for other host controllers that are in the pipeline.
Submitted by: mav@
|
| |
|
|
|
|
|
|
|
| |
do it for us. There may be commands we have to wait for that need to
set data.
Submitted by: mav@
|
|
|
|
|
|
|
|
|
| |
them):
#define<tab>
zero memory when we allocate it
Put device name in error message.
Submitted by: mav@
|
|
|
|
| |
Submitted by: mav@
|
|
|
|
| |
like them and they don't add enough to be worth standing out.
|
|
|
|
|
|
|
| |
the device in question, rather than the bus doing the requesting. Fix
it so that it is the bus.
Submitted by: mav@
|
| |
|
|
|
|
| |
Submitted by: mav@
|
|
|
|
| |
Submitted by: mav@
|
|
|
|
|
|
|
| |
device attach time. We may need to read this more often in the
future, but for now simplicity of implementation wins.
Submitted by: mav@
|
|
|
|
|
|
|
| |
for other things. Mask out the voltage only bits when returning the
Vdd mask for voltage computation.
Submitted by: mav@
|
|
|
|
|
|
| |
technology. Make mmc conform to that.
Submitted by: mav@
|
|
|
|
| |
Submitted by: mav@
|
|
|
|
|
|
|
|
|
|
|
| |
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.
I'd LOVE to do this rename in 7.0 so that we can eventually MFC the
new kthread_xxx() calls.
|
|
|
|
|
|
|
|
|
|
|
|
| |
application specific SEND_OP_COND (CMD55 + ACMD41), go ahead and allow
100 tries. This gives a timeout of a second rather than the ~100ms
the old style produces.
I've had one old 16MB SD card which needs the extra time. I've now
had reports from the field that other cards need this too.
Originally done at BSDcan 2007 while waiting to give my embedding
madness minitalk.
|