xref: /titanic_41/usr/src/uts/common/sys/sdcard/sda_ioctl.h (revision 4bb7efa72ed531c10f097919636e67724ec4c25a)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_SYS_SDCARD_SDA_IOCTL_H
27 #define	_SYS_SDCARD_SDA_IOCTL_H
28 
29 #include <sys/types.h>
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 /*
36  * These IOCTLs are private between the sdcard cfgadm plugin, and the sda
37  * framework.
38  */
39 
40 typedef enum {
41 	SDA_CT_UNKNOWN,
42 	SDA_CT_MMC,
43 	SDA_CT_SDMEM,
44 	SDA_CT_SDHC,
45 	SDA_CT_SDCOMBO,
46 	SDA_CT_SDIO	/* expand on this later */
47 } sda_card_type_t;
48 
49 typedef struct {
50 
51 	sda_card_type_t	ci_type;
52 
53 	/* these are only valid for memory cards */
54 	uint32_t	ci_mfg;
55 	char		ci_oem[16];	/* mfg id */
56 	char		ci_pid[16];	/* ASCIIZ product */
57 	uint32_t	ci_serial;
58 	uint8_t		ci_month;
59 	uint8_t		ci_year;
60 	uint8_t		ci_major;
61 	uint8_t		ci_minor;
62 } sda_card_info_t;
63 
64 struct sda_ap_control {
65 	unsigned	cmd;
66 	size_t		size;
67 	void		*data;
68 };
69 
70 #ifdef	_KERNEL
71 struct sda_ap_control32 {
72 	unsigned	cmd;
73 	size32_t	size;
74 	caddr32_t	data;
75 };
76 #endif
77 
78 /* AP_CONTROL commands */
79 #define	SDA_CFGA_GET_CARD_INFO		1
80 #define	SDA_CFGA_GET_DEVICE_PATH	2
81 #define	SDA_CFGA_RESET_SLOT		3
82 
83 #ifdef	__cplusplus
84 }
85 #endif
86 
87 #endif	/* _SYS_SDCARD_SDA_IOCTL_H */
88