The NetBSD Project

CVS log for src/sys/dev/sdmmc/sdmmc_mem.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / sdmmc

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.75 / (download) - annotate - [select for diffs], Sat Apr 29 13:21:31 2023 UTC (10 months, 2 weeks ago) by jmcneill
Branch: MAIN
CVS Tags: triaxx-drm, thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.74: +4 -3 lines
Diff to previous 1.74 (colored)

sdmmc: Only check chipset WP status for SD cards.

The sdmmc_chip_write_protect callback returns the write protect switch
status from the controller (SDWP#). This signal does not exist for eMMC;
instead, write protect is signaled using card registers (CSD). So lets
skip asking the chipset for WP status on eMMC cards for each write
request.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Aug 3 07:54:39 2021 UTC (2 years, 7 months ago) by msaitoh
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-futex2-base, thorpej-futex2, netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.73: +4 -4 lines
Diff to previous 1.73 (colored)

 Use unsigned to avoid undefined behavior in sdmmc_mem_sd_switch().
Found by kUBSan.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Jun 13 09:50:02 2021 UTC (2 years, 9 months ago) by mlelstv
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.72: +6 -7 lines
Diff to previous 1.72 (colored)

Be less verbose normally and more when debugging.

Revision 1.72 / (download) - annotate - [select for diffs], Mon May 11 09:51:47 2020 UTC (3 years, 10 months ago) by jdc
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.71: +11 -5 lines
Diff to previous 1.71 (colored)

If the controller doesn't support switch func (opcode 6) then skip
setting this but continue with other settings.  This allows us to use
a card, albeit at a lower speed.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Jan 4 22:28:26 2020 UTC (4 years, 2 months ago) by mlelstv
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

Be less noisy for some commands.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Oct 28 06:31:39 2019 UTC (4 years, 4 months ago) by mlelstv
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

Whitespace police

Revision 1.69 / (download) - annotate - [select for diffs], Mon Oct 28 06:16:46 2019 UTC (4 years, 4 months ago) by mlelstv
Branch: MAIN
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored)

Add and use sdmmc_pause to avoid long-term busy waits.
Add sdio abort function.
Additional error messages.
Print parameters for SDIO devices.
Minor cosmetics.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Jun 6 20:50:46 2019 UTC (4 years, 9 months ago) by jmcneill
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Changes since 1.67: +24 -13 lines
Diff to previous 1.67 (colored)

If setting HS_TIMING fails, keep trying slower speeds instead of bailing
out.

Revision 1.67 / (download) - annotate - [select for diffs], Tue May 28 00:25:27 2019 UTC (4 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.66: +5 -2 lines
Diff to previous 1.66 (colored)

If a mem function fails to initialize, set the error flag so sdmmc doesn't try to use it anyway.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Nov 9 14:38:36 2018 UTC (5 years, 4 months ago) by jmcneill
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, isaki-audio2-base, isaki-audio2
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored)

Wait for data ready after eMMC flush cache commands

Revision 1.65 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:33 2018 UTC (5 years, 6 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.64: +4 -4 lines
Diff to previous 1.64 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.64 / (download) - annotate - [select for diffs], Wed Feb 7 14:42:07 2018 UTC (6 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.63: +10 -6 lines
Diff to previous 1.63 (colored)

Fix uninitialized variable use:
if there is an error, or if we are using a SPI controller,
sdmmc_mem_send_op_cond() doens't assign a value to *ocrp,
but it is used unconditionally in sdmmc_mem_enable() to see if we can switch
to low voltage.

In sdmmc_mem_send_op_cond(), if the new ocr is not returned by the
card for whatever reason, set *ocrp to the orig value.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Sep 12 13:43:37 2017 UTC (6 years, 6 months ago) by jmcneill
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.62: +14 -2 lines
Diff to previous 1.62 (colored)

For SD cards, send the SET_WR_BLK_ERASE_COUNT app command before a
multi-block write to improve write performance.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Aug 20 15:58:43 2017 UTC (6 years, 6 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20170825
Changes since 1.61: +4 -9 lines
Diff to previous 1.61 (colored)

make the sc_discard interface for the ld backend asynchronous and
signal completion through new callback lddiscardend. Use a standard
struct buf to pass disk address and range instead of two off_t values.

make lddiscard synchronous again. This is a requirement of the current
ffs discard code.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jul 16 17:11:46 2017 UTC (6 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base
Branch point for: perseant-stdc-iso10646
Changes since 1.60: +55 -7 lines
Diff to previous 1.60 (colored)

Add support for eMMC 4.5's optional cache feature. If a cache is present,
and the host controller reports the SMC_CAPS_POLLING capability (needed
to flush cache at shutdown), it will be automatically enabled and used.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Jun 24 23:25:01 2017 UTC (6 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.59: +2 -13 lines
Diff to previous 1.59 (colored)

Revert part of previous; the SD card spec recommends not to issue a DISCARD
command to the file system area.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Jun 24 23:07:35 2017 UTC (6 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.58: +155 -3 lines
Diff to previous 1.58 (colored)

Read SD status register and print card status when a new SD card is found:

  sdmmc0: SD card status: 4-bit, C10, U1, V10

If the SD status register reports discard support, set the DISCARD arg to
the ERASE operation to let the card know that the host doesn't care if the
erase is performed.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jun 24 11:27:33 2017 UTC (6 years, 8 months ago) by jmcneill
Branch: MAIN
Changes since 1.57: +67 -2 lines
Diff to previous 1.57 (colored)

Add discard support to ld@sdmmc using the ERASE (CMD38) command.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Jun 4 15:00:02 2017 UTC (6 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.56: +6 -2 lines
Diff to previous 1.56 (colored)

Give a hint to controllers in the command flags if we are performing a
transfer with an SDHC capable card. If the controller needs to adjust
command args, it can use this hint to understand how it is encoded.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Apr 11 23:26:33 2017 UTC (6 years, 11 months ago) by jmcneill
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, netbsd-8-base, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.55: +2 -5 lines
Diff to previous 1.55 (colored)

Remove a test that prevents tuning from happening on eMMC devices.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Feb 17 10:51:48 2017 UTC (7 years, 1 month ago) by nonaka
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq
Changes since 1.54: +8 -2 lines
Diff to previous 1.54 (colored)

sdhc(4): hardware reset support for Intel eMMC controller

Revision 1.54 / (download) - annotate - [select for diffs], Fri Feb 17 10:50:43 2017 UTC (7 years, 1 month ago) by nonaka
Branch: MAIN
Changes since 1.53: +49 -5 lines
Diff to previous 1.53 (colored)

sdhc(4), sdmmc(4): Added MMC HS DDR52 support.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Feb 17 10:48:19 2017 UTC (7 years, 1 month ago) by nonaka
Branch: MAIN
Changes since 1.52: +10 -10 lines
Diff to previous 1.52 (colored)

sdmmc(4): Use EXT_CSD[HS_TIMING] definitions.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Aug 11 01:33:25 2016 UTC (7 years, 7 months ago) by nonaka
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

Fix incorrect sector counts with MMC.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Mar 13 09:12:16 2016 UTC (8 years ago) by tsutsui
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Branch point for: pgoyette-localcount
Changes since 1.50: +4 -5 lines
Diff to previous 1.50 (colored)

Call the second sdmmc_mem_send_if_cond() only where it's necessary.

This makes SMC_CAPS_SPI_MODE devices (currently evbsh3 only) work again.
"Maybe ok" from nonaka@.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Dec 22 09:56:06 2015 UTC (8 years, 2 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.49: +4 -3 lines
Diff to previous 1.49 (colored)

Be graceful about command timeouts when probing.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Nov 29 23:38:47 2015 UTC (8 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.48: +28 -4 lines
Diff to previous 1.48 (colored)

Add some event counters to track transfer sizes.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Oct 29 22:37:15 2015 UTC (8 years, 4 months ago) by jmcneill
Branch: MAIN
Changes since 1.47: +33 -3 lines
Diff to previous 1.47 (colored)

After setting HS_TIMING value for HS200 or later, send repeated SEND_STATUS
command until the device is no longer busy or the SWITCH_ERROR bit is set.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Oct 6 14:32:51 2015 UTC (8 years, 5 months ago) by mlelstv
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

support hiding command timeout messages with a new command flag and use this
when probing for cards. Should fix PR 50302.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Aug 8 10:50:55 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.45: +16 -17 lines
Diff to previous 1.45 (colored)

eMMC fixes

Revision 1.45 / (download) - annotate - [select for diffs], Wed Aug 5 10:29:37 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.44: +55 -9 lines
Diff to previous 1.44 (colored)

Add support for sampling clock tuning, required for some UHS modes and
MMC HS200.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Aug 4 01:21:55 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.43: +62 -40 lines
Diff to previous 1.43 (colored)

ODROID-C1 has a bug where the card is not power-cycled when the board is
reset. If you had previously switched to 1.8V signaling level, upon reboot
the card will still be in 1.8V mode and you cannot detect it with an S18R
request.

A card in 1.8V mode will report UHS modes though, so if the card reports
SDR50, DDR50, or SDR104 capabilities, and the previous S18R request failed
to switch, use this as an opportunity to re-enable UHS support in the
subsystem and host controller drivers.

Revision 1.43 / (download) - annotate - [select for diffs], Tue Aug 4 00:32:05 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.42: +15 -4 lines
Diff to previous 1.42 (colored)

instead of trying to handle cards already in 1.8V mode, request host controller to switch to 3.3V signaling before starting the init sequence

Revision 1.42 / (download) - annotate - [select for diffs], Mon Aug 3 19:17:35 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.41: +8 -7 lines
Diff to previous 1.41 (colored)

Handle cards that are already in low voltage (1.8V) mode. Test correct
bit when determining the best SD transfer mode.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Aug 3 12:10:29 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored)

clear SMF_UHS_MODE flag before enabling card

Revision 1.40 / (download) - annotate - [select for diffs], Mon Aug 3 11:24:17 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

fix SDMMC_DEBUG build

Revision 1.39 / (download) - annotate - [select for diffs], Mon Aug 3 10:08:51 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.38: +125 -80 lines
Diff to previous 1.38 (colored)

Add support for DDR50 transfer modes.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Aug 3 05:32:50 2015 UTC (8 years, 7 months ago) by mlelstv
Branch: MAIN
Changes since 1.37: +4 -0 lines
Diff to previous 1.37 (colored)

use mutex locking for MP safety.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Aug 3 05:26:53 2015 UTC (8 years, 7 months ago) by mlelstv
Branch: MAIN
Changes since 1.36: +3 -2 lines
Diff to previous 1.36 (colored)

more debug output

Revision 1.36 / (download) - annotate - [select for diffs], Sun Aug 2 22:47:05 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.35: +10 -3 lines
Diff to previous 1.35 (colored)

Add support for eMMC 5.0 HS200 timings.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Aug 2 21:44:36 2015 UTC (8 years, 7 months ago) by jmcneill
Branch: MAIN
Changes since 1.34: +74 -8 lines
Diff to previous 1.34 (colored)

Add basic UHS-I support. SDR50 and SDR104 are supported, but not DDR50.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Feb 27 16:08:17 2015 UTC (9 years ago) by nonaka
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.33: +188 -132 lines
Diff to previous 1.33 (colored)

fix to simulate multi-segment dma transfer for pq3sdhc(4).

Revision 1.33 / (download) - annotate - [select for diffs], Sat Feb 7 04:13:26 2015 UTC (9 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Return an actual error. Reported by:
http://www.m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html#Report-4

Revision 1.32 / (download) - annotate - [select for diffs], Sun Dec 7 20:07:25 2014 UTC (9 years, 3 months ago) by jmcneill
Branch: MAIN
Changes since 1.31: +23 -14 lines
Diff to previous 1.31 (colored)

Fix high capacity (> 2GB) eMMC support, from OpenBSD.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Mar 19 15:26:42 2014 UTC (10 years ago) by nonaka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, nick-nhusb-base, netbsd-7-base
Branch point for: nick-nhusb, netbsd-7
Changes since 1.30: +75 -37 lines
Diff to previous 1.30 (colored)

Add a driver for Realtek RTS5209/RTS5229 Card Reader.
Ported from OpenBSD.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Oct 25 11:35:55 2013 UTC (10 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (colored)

Turn a few __unused into __diagused

Revision 1.29 / (download) - annotate - [select for diffs], Fri May 3 16:38:35 2013 UTC (10 years, 10 months ago) by matt
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.28: +6 -3 lines
Diff to previous 1.28 (colored)

Add support for the valid card types in eMMC v4.4 (needed by beaglebone
black).

Revision 1.28 / (download) - annotate - [select for diffs], Fri May 3 16:13:48 2013 UTC (10 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

Fix typo.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 20 03:51:04 2012 UTC (11 years, 3 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-pagecache-base8, agc-symver-base, agc-symver
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

fix off-by-one in switch function argument validation.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Dec 15 00:03:00 2012 UTC (11 years, 3 months ago) by jakllsch
Branch: MAIN
Changes since 1.25: +28 -8 lines
Diff to previous 1.25 (colored)

Correctly read the 512-bit-wide big-endian Switch Function Status register.
Some of this could/will also be useful for the SD Status register.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Dec 14 23:22:21 2012 UTC (11 years, 3 months ago) by jakllsch
Branch: MAIN
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

The Card Command Class (CCC) field is valid in both SD_CSD_CSDVER_1_0
and SD_CSD_CSDVER_2_0.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Oct 13 07:31:25 2012 UTC (11 years, 5 months ago) by kiyohara
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

Fix variable name for message of printf.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Jul 26 18:36:55 2012 UTC (11 years, 7 months ago) by matt
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

Fix a delay to a correct value.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 23 13:32:19 2012 UTC (11 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.21: +2 -4 lines
Diff to previous 1.21 (colored)

Responses are actually in host order (except SCR which is return in
big endian so that's convert to host order).

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jul 20 02:04:13 2012 UTC (11 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (colored)

Add use of watermark register when PIO to an ESDHC.  After every kill or
drain of watermask words, pause a bit to give time for the fifo to recover.
Always the command response in BE byteorder.  Rewrite __bitfield to deal
with this.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Feb 1 22:34:43 2012 UTC (12 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: netbsd-6
Changes since 1.19: +6 -2 lines
Diff to previous 1.19 (colored)

Use "opt_sdmmc.h" for SDMMC_DEBUG, etc.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jan 27 03:06:24 2012 UTC (12 years, 1 month ago) by matt
Branch: MAIN
Changes since 1.18: +11 -6 lines
Diff to previous 1.18 (colored)

Fix sdmmmc_mem_decode_scr for BE machines.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jan 21 19:44:31 2012 UTC (12 years, 1 month ago) by nonaka
Branch: MAIN
Changes since 1.17: +13 -14 lines
Diff to previous 1.17 (colored)

fix my license notice.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Feb 13 07:25:56 2011 UTC (13 years, 1 month ago) by nonaka
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

use MMC_CSD_CSDVER_EXT_CSD.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Feb 13 06:43:52 2011 UTC (13 years, 1 month ago) by nonaka
Branch: MAIN
Changes since 1.15: +24 -16 lines
Diff to previous 1.15 (colored)

- Don't switch MMC high-speed timing, if host controller isn't supported.
- Only check EXT_CSD STRUCTURE version when CSD version is 3.
- initialize width at sdmmc_function_alloc().

Revision 1.15 / (download) - annotate - [select for diffs], Sat Feb 5 15:45:21 2011 UTC (13 years, 1 month ago) by nonaka
Branch: MAIN
Changes since 1.14: +23 -19 lines
Diff to previous 1.14 (colored)

Don't switch SD high-speed timing, if host controller isn't supported.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Nov 13 13:52:11 2010 UTC (13 years, 4 months ago) by uebayasi
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.13: +2 -4 lines
Diff to previous 1.13 (colored)

Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Oct 7 12:24:23 2010 UTC (13 years, 5 months ago) by kiyohara
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3
Changes since 1.12: +302 -71 lines
Diff to previous 1.12 (colored)

Support High-Speed mode.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Oct 1 09:50:42 2010 UTC (13 years, 5 months ago) by kiyohara
Branch: MAIN
Changes since 1.11: +117 -6 lines
Diff to previous 1.11 (colored)

Use DMA bounce buffer, if DMA buffer is making by multiple segments.  A lot
of host controllers do not support to two or more segments.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Sep 23 12:03:27 2010 UTC (13 years, 5 months ago) by kiyohara
Branch: MAIN
Changes since 1.10: +7 -2 lines
Diff to previous 1.10 (colored)

Print bus width and clock for feature(High speed support).

Revision 1.10 / (download) - annotate - [select for diffs], Tue Sep 21 04:53:53 2010 UTC (13 years, 6 months ago) by kiyohara
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Fix build failure.
  A new variable width and value had been forgotten since r1.7.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Sep 20 09:42:32 2010 UTC (13 years, 6 months ago) by kiyohara
Branch: MAIN
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)

Clean up return/error in sdmem_mem_send_scr().

Revision 1.8 / (download) - annotate - [select for diffs], Mon Sep 20 09:34:47 2010 UTC (13 years, 6 months ago) by kiyohara
Branch: MAIN
Changes since 1.7: +7 -4 lines
Diff to previous 1.7 (colored)

Fix SCR data.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Sep 20 09:30:20 2010 UTC (13 years, 6 months ago) by kiyohara
Branch: MAIN
Changes since 1.6: +28 -6 lines
Diff to previous 1.6 (colored)

Support MMC 4,8-bit mode.
  It tested only 4bit on Marvell Sheevaplug.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Sep 20 09:19:31 2010 UTC (13 years, 6 months ago) by kiyohara
Branch: MAIN
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored)

Sync with POSTREAD before memcpy.

Revision 1.5 / (download) - annotate - [select for diffs], Sat May 1 21:14:39 2010 UTC (13 years, 10 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Initialise error variable to zero. If all the if's fail it exists the function
sdmmc_init returning the then still uninitialised variable.

gcc can't know if one of the if's is bound to happen.

Detected with -DDEBUG -DDIAGNOSTIC -DKGDB - ...

Revision 1.4 / (download) - annotate - [select for diffs], Tue Apr 6 15:10:09 2010 UTC (13 years, 11 months ago) by nonaka
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Branch point for: matt-nb5-mips64
Changes since 1.3: +541 -101 lines
Diff to previous 1.3 (colored)

- mention MMC SPI mode.
- support SD 4bit bus width mode.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Nov 28 10:00:24 2009 UTC (14 years, 3 months ago) by nonaka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.2: +10 -14 lines
Diff to previous 1.2 (colored)

Always sector size is treated as 512 bytes.

Revision 1.2 / (download) - annotate - [select for diffs], Sun May 24 12:59:54 2009 UTC (14 years, 9 months ago) by nonaka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base, jym-xensuspend-nbase
Branch point for: netbsd-5
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)

SDHC card was able to be used.

Revision 1.1 / (download) - annotate - [select for diffs], Tue Apr 21 03:00:30 2009 UTC (14 years, 11 months ago) by nonaka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Branch point for: yamt-nfs-mp, nick-hppapmap, jym-xensuspend

Added SD/MMC support from OpenBSD.
tested on i386, amd64 at current-users ML by pgoyette@.
tested on zaurus by myself.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>