xref: /freebsd/share/man/man4/altera_sdcard.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1*d432e92aSRobert Watson.\"-
2*d432e92aSRobert Watson.\" Copyright (c) 2012 Robert N. M. Watson
3*d432e92aSRobert Watson.\" All rights reserved.
4*d432e92aSRobert Watson.\"
5*d432e92aSRobert Watson.\" This software was developed by SRI International and the University of
6*d432e92aSRobert Watson.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
7*d432e92aSRobert Watson.\" ("CTSRD"), as part of the DARPA CRASH research programme.
8*d432e92aSRobert Watson.\"
9*d432e92aSRobert Watson.\" Redistribution and use in source and binary forms, with or without
10*d432e92aSRobert Watson.\" modification, are permitted provided that the following conditions
11*d432e92aSRobert Watson.\" are met:
12*d432e92aSRobert Watson.\" 1. Redistributions of source code must retain the above copyright
13*d432e92aSRobert Watson.\"    notice, this list of conditions and the following disclaimer.
14*d432e92aSRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright
15*d432e92aSRobert Watson.\"    notice, this list of conditions and the following disclaimer in the
16*d432e92aSRobert Watson.\"    documentation and/or other materials provided with the distribution.
17*d432e92aSRobert Watson.\"
18*d432e92aSRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19*d432e92aSRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20*d432e92aSRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21*d432e92aSRobert Watson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22*d432e92aSRobert Watson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23*d432e92aSRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24*d432e92aSRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25*d432e92aSRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26*d432e92aSRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27*d432e92aSRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28*d432e92aSRobert Watson.\" SUCH DAMAGE.
29*d432e92aSRobert Watson.\"
30*d432e92aSRobert Watson.Dd August 18, 2012
31*d432e92aSRobert Watson.Dt ALTERA_SDCARD 4
32*d432e92aSRobert Watson.Os
33*d432e92aSRobert Watson.Sh NAME
34*d432e92aSRobert Watson.Nm altera_sdcard
35*d432e92aSRobert Watson.Nd driver for the Altera University Program Secure Data Card IP Core
36*d432e92aSRobert Watson.Sh SYNOPSIS
37*d432e92aSRobert Watson.Cd "device altera_sdcard"
38*d432e92aSRobert Watson.Pp
39*d432e92aSRobert WatsonIn
40*d432e92aSRobert Watson.Pa /boot/device.hints :
41*d432e92aSRobert Watson.Cd hint.altera_sdcardc.0.at="nexus0"
42*d432e92aSRobert Watson.Cd hint.altera_sdcardc.0.maddr=0x7f008000
43*d432e92aSRobert Watson.Cd hint.altera_sdcardc.0.msize=0x400
44*d432e92aSRobert Watson.Sh DESCRIPTION
45*d432e92aSRobert WatsonThe
46*d432e92aSRobert Watson.Nm
47*d432e92aSRobert Watsondevice driver provides support for the Altera University Program Secure Data
48*d432e92aSRobert WatsonCard (SD Card) IP Core device.
49*d432e92aSRobert WatsonA controller device,
50*d432e92aSRobert Watson.Li altera_sdcardcX ,
51*d432e92aSRobert Watsonwill be attached during boot.
52*d432e92aSRobert WatsonInserted disks are presented as
53*d432e92aSRobert Watson.Xr disk 9
54*d432e92aSRobert Watsondevices,
55*d432e92aSRobert Watson.Li altera_sdcardX ,
56*d432e92aSRobert Watsoncorresponding to the controller number.
57*d432e92aSRobert Watson.Sh HARDWARE
58*d432e92aSRobert WatsonThe current version of the
59*d432e92aSRobert Watson.Nm
60*d432e92aSRobert Watsondriver supports the SD Card IP core as described in the August 2011 version of
61*d432e92aSRobert WatsonAltera's documentation.
62*d432e92aSRobert WatsonThe core supports only cards up to 2G (CSD 0); larger cards, or cards using
63*d432e92aSRobert Watsonnewer CSD versions, will not be detected.
64*d432e92aSRobert WatsonThe IP core has two key limitations: a lack of interrupt support, requiring
65*d432e92aSRobert Watsontimer-driven polling to detect I/O completion, and support for only single
66*d432e92aSRobert Watson512-byte block read and write operations at a time.
67*d432e92aSRobert WatsonThe combined effect of those two limits is that the system clock rate,
68*d432e92aSRobert Watson.Dv HZ ,
69*d432e92aSRobert Watsonmust be set to at least 200 in order to accomplish the maximum 100KB/s data
70*d432e92aSRobert Watsonrate supported by the IP core.
71*d432e92aSRobert Watson.Sh SEE ALSO
72*d432e92aSRobert Watson.Xr disk 9
73*d432e92aSRobert Watson.Rs
74*d432e92aSRobert Watson.%T Altera University Program Secure Data Card IP Core
75*d432e92aSRobert Watson.%D August 2011
76*d432e92aSRobert Watson.%I Altera Corporation - University Program
77*d432e92aSRobert Watson.%U ftp://ftp.altera.com/up/pub/Altera_Material/11.0/University_Program_IP_Cores/Memory/SD_Card_Interface_for_SoPC_Builder.pdf
78*d432e92aSRobert Watson.Re
79*d432e92aSRobert Watson.Sh HISTORY
80*d432e92aSRobert WatsonThe
81*d432e92aSRobert Watson.Nm
82*d432e92aSRobert Watsondevice driver first appeared in
83*d432e92aSRobert Watson.Fx 10.0 .
84*d432e92aSRobert Watson.Sh AUTHORS
85*d432e92aSRobert WatsonThe
86*d432e92aSRobert Watson.Nm
87*d432e92aSRobert Watsondevice driver and this manual page were
88*d432e92aSRobert Watsondeveloped by SRI International and the University of Cambridge Computer
89*d432e92aSRobert WatsonLaboratory under DARPA/AFRL contract
90*d432e92aSRobert Watson.Pq FA8750-10-C-0237
91*d432e92aSRobert Watson.Pq Do CTSRD Dc ,
92*d432e92aSRobert Watsonas part of the DARPA CRASH research programme.
93*d432e92aSRobert WatsonThis device driver was written by
94*d432e92aSRobert Watson.An Robert N. M. Watson .
95*d432e92aSRobert Watson.Sh BUGS
96*d432e92aSRobert Watson.Nm
97*d432e92aSRobert Watsoncontains a number of work-arounds for IP core bugs.
98*d432e92aSRobert WatsonPerhaps most critically,
99*d432e92aSRobert Watson.Nm
100*d432e92aSRobert Watsonignores the CRC error bit returned in the RR1 register, which appears to be
101*d432e92aSRobert Watsonunexpectedly set by the IP core.
102*d432e92aSRobert Watson.Pp
103*d432e92aSRobert Watson.Nm
104*d432e92aSRobert Watsonuses fixed polling intervals are used for card insertion/removal and
105*d432e92aSRobert WatsonI/O completion detection; an adaptive strategy might improve performance by
106*d432e92aSRobert Watsonreducing the latency to detecting completed I/O.
107*d432e92aSRobert WatsonHowever, in our experiments, using polling rates greater than 200 times a
108*d432e92aSRobert Watsonsecond did not improve performance.
109*d432e92aSRobert Watson.Pp
110*d432e92aSRobert Watson.Nm
111*d432e92aSRobert Watsonsupports only a
112*d432e92aSRobert Watson.Li nexus
113*d432e92aSRobert Watsonbus attachment, which is appropriate for system-on-chip busses such as
114*d432e92aSRobert WatsonAltera's Avalon bus.
115*d432e92aSRobert WatsonIf the IP core is configured off of another bus type, then additional bus
116*d432e92aSRobert Watsonattachments will be required.
117