Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
1
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
a0a4d17
Documentation
LICENSES
arch
block
certs
crypto
drivers
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
connector
counter
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma-buf
dma
edac
eisa
extcon
firewire
firmware
fpga
fsi
gnss
gpio
gpu
greybus
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband
input
interconnect
iommu
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
most
mtd
mux
net
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
oprofile
parisc
parport
pci
pcmcia
Kconfig
Makefile
at91_cf.c
bcm63xx_pcmcia.c
bcm63xx_pcmcia.h
cardbus.c
cirrus.h
cistpl.c
cs.c
cs_internal.h
db1xxx_ss.c
ds.c
electra_cf.c
i82092.c
i82092aa.h
i82365.c
i82365.h
max1600.c
max1600.h
o2micro.h
omap_cf.c
pcmcia_cis.c
pcmcia_resource.c
pd6729.c
pd6729.h
pxa2xx_balloon3.c
pxa2xx_base.c
pxa2xx_base.h
pxa2xx_cm_x255.c
pxa2xx_cm_x270.c
pxa2xx_cm_x2xx.c
pxa2xx_colibri.c
pxa2xx_e740.c
pxa2xx_hx4700.c
pxa2xx_mainstone.c
pxa2xx_palmld.c
pxa2xx_palmtc.c
pxa2xx_palmtx.c
pxa2xx_sharpsl.c
pxa2xx_stargate2.c
pxa2xx_trizeps4.c
pxa2xx_viper.c
pxa2xx_vpac270.c
ricoh.h
rsrc_iodyn.c
rsrc_mgr.c
rsrc_nonstatic.c
sa1100_generic.c
sa1100_generic.h
sa1100_h3600.c
sa1100_simpad.c
sa1111_badge4.c
sa1111_generic.c
sa1111_generic.h
sa1111_jornada720.c
sa1111_lubbock.c
sa1111_neponset.c
sa11xx_base.c
sa11xx_base.h
soc_common.c
soc_common.h
socket_sysfs.c
tcic.c
tcic.h
ti113x.h
topic.h
vg468.h
vrc4171_card.c
vrc4173_cardu.c
vrc4173_cardu.h
xxs1500_ss.c
yenta_socket.c
yenta_socket.h
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sfi
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging
target
tc
tee
thermal
thunderbolt
tty
uio
usb
vdpa
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
drivers
/
pcmcia
/
cs_internal.h
Copy path
Blame
Blame
Latest commit
History
History
175 lines (141 loc) · 5.03 KB
Breadcrumbs
linux
/
drivers
/
pcmcia
/
cs_internal.h
Top
File metadata and controls
Code
Blame
175 lines (141 loc) · 5.03 KB
Raw
/* SPDX-License-Identifier: GPL-2.0-only */ /* * cs_internal.h -- definitions internal to the PCMCIA core modules * * The initial developer of the original code is David A. Hinds * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. * * (C) 1999 David A. Hinds * (C) 2003 - 2010 Dominik Brodowski * * This file contains definitions _only_ needed by the PCMCIA core modules. * It must not be included by PCMCIA socket drivers or by PCMCIA device * drivers. */ #ifndef _LINUX_CS_INTERNAL_H #define _LINUX_CS_INTERNAL_H #include <linux/kref.h> /* Flags in client state */ #define CLIENT_WIN_REQ(i) (0x1<<(i)) /* Flag to access all functions */ #define BIND_FN_ALL 0xff /* Each card function gets one of these guys */ typedef struct config_t { struct kref ref; unsigned int state; struct resource io[MAX_IO_WIN]; /* io ports */ struct resource mem[MAX_WIN]; /* mem areas */ } config_t; struct cis_cache_entry { struct list_head node; unsigned int addr; unsigned int len; unsigned int attr; unsigned char cache[]; }; struct pccard_resource_ops { int (*validate_mem) (struct pcmcia_socket *s); int (*find_io) (struct pcmcia_socket *s, unsigned int attr, unsigned int *base, unsigned int num, unsigned int align, struct resource **parent); struct resource* (*find_mem) (unsigned long base, unsigned long num, unsigned long align, int low, struct pcmcia_socket *s); int (*init) (struct pcmcia_socket *s); void (*exit) (struct pcmcia_socket *s); }; /* Flags in config state */ #define CONFIG_LOCKED 0x01 #define CONFIG_IRQ_REQ 0x02 #define CONFIG_IO_REQ 0x04 /* Flags in socket state */ #define SOCKET_PRESENT 0x0008 #define SOCKET_INUSE 0x0010 #define SOCKET_IN_RESUME 0x0040 #define SOCKET_SUSPEND 0x0080 #define SOCKET_WIN_REQ(i) (0x0100<<(i)) #define SOCKET_CARDBUS 0x8000 #define SOCKET_CARDBUS_CONFIG 0x10000 /* * Stuff internal to module "pcmcia_rsrc": */ extern int static_init(struct pcmcia_socket *s); extern struct resource *pcmcia_make_resource(resource_size_t start, resource_size_t end, unsigned long flags, const char *name); /* * Stuff internal to module "pcmcia_core": */ /* socket_sysfs.c */ extern int pccard_sysfs_add_socket(struct device *dev); extern void pccard_sysfs_remove_socket(struct device *dev); /* cardbus.c */ int cb_alloc(struct pcmcia_socket *s); void cb_free(struct pcmcia_socket *s); /* * Stuff exported by module "pcmcia_core" to module "pcmcia" */ struct pcmcia_callback{ struct module *owner; int (*add) (struct pcmcia_socket *s); int (*remove) (struct pcmcia_socket *s); void (*requery) (struct pcmcia_socket *s); int (*validate) (struct pcmcia_socket *s, unsigned int *i); int (*suspend) (struct pcmcia_socket *s); int (*early_resume) (struct pcmcia_socket *s); int (*resume) (struct pcmcia_socket *s); }; /* cs.c */ extern struct rw_semaphore pcmcia_socket_list_rwsem; extern struct list_head pcmcia_socket_list; extern struct class pcmcia_socket_class; int pccard_register_pcmcia(struct pcmcia_socket *s, struct pcmcia_callback *c); struct pcmcia_socket *pcmcia_get_socket_by_nr(unsigned int nr); void pcmcia_parse_uevents(struct pcmcia_socket *socket, unsigned int events); #define PCMCIA_UEVENT_EJECT 0x0001 #define PCMCIA_UEVENT_INSERT 0x0002 #define PCMCIA_UEVENT_SUSPEND 0x0004 #define PCMCIA_UEVENT_RESUME 0x0008 #define PCMCIA_UEVENT_REQUERY 0x0010 struct pcmcia_socket *pcmcia_get_socket(struct pcmcia_socket *skt); void pcmcia_put_socket(struct pcmcia_socket *skt); /* * Stuff internal to module "pcmcia". */ /* ds.c */ extern struct bus_type pcmcia_bus_type; struct pcmcia_device; /* pcmcia_resource.c */ extern int pcmcia_release_configuration(struct pcmcia_device *p_dev); extern int pcmcia_validate_mem(struct pcmcia_socket *s); extern struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align, int low, struct pcmcia_socket *s); void pcmcia_cleanup_irq(struct pcmcia_socket *s); int pcmcia_setup_irq(struct pcmcia_device *p_dev); /* cistpl.c */ extern const struct bin_attribute pccard_cis_attr; int pcmcia_read_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, u_int len, void *ptr); int pcmcia_write_cis_mem(struct pcmcia_socket *s, int attr, u_int addr, u_int len, void *ptr); void release_cis_mem(struct pcmcia_socket *s); void destroy_cis_cache(struct pcmcia_socket *s); int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, cisdata_t code, void *parse); int pcmcia_replace_cis(struct pcmcia_socket *s, const u8 *data, const size_t len); int pccard_validate_cis(struct pcmcia_socket *s, unsigned int *count); int verify_cis_cache(struct pcmcia_socket *s); int pccard_get_first_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple); int pccard_get_next_tuple(struct pcmcia_socket *s, unsigned int function, tuple_t *tuple); int pccard_get_tuple_data(struct pcmcia_socket *s, tuple_t *tuple); #endif /* _LINUX_CS_INTERNAL_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
You can’t perform that action at this time.