sa11xx_pcic.c revision 1.1 1 1.1 rjs /* $NetBSD: sa11xx_pcic.c,v 1.1 2001/07/08 23:37:54 rjs Exp $ */
2 1.1 rjs
3 1.1 rjs /*
4 1.1 rjs * Copyright (c) 2001 IWAMOTO Toshihiro. All rights reserved.
5 1.1 rjs * Copyright (c) 1997 Marc Horowitz. All rights reserved.
6 1.1 rjs *
7 1.1 rjs * Redistribution and use in source and binary forms, with or without
8 1.1 rjs * modification, are permitted provided that the following conditions
9 1.1 rjs * are met:
10 1.1 rjs * 1. Redistributions of source code must retain the above copyright
11 1.1 rjs * notice, this list of conditions and the following disclaimer.
12 1.1 rjs * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 rjs * notice, this list of conditions and the following disclaimer in the
14 1.1 rjs * documentation and/or other materials provided with the distribution.
15 1.1 rjs * 3. All advertising materials mentioning features or use of this software
16 1.1 rjs * must display the following acknowledgement:
17 1.1 rjs * This product includes software developed by Marc Horowitz.
18 1.1 rjs * 4. The name of the author may not be used to endorse or promote products
19 1.1 rjs * derived from this software without specific prior written permission.
20 1.1 rjs *
21 1.1 rjs * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 1.1 rjs * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 1.1 rjs * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 1.1 rjs * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 1.1 rjs * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 1.1 rjs * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 1.1 rjs * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 1.1 rjs * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 1.1 rjs * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 1.1 rjs * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 1.1 rjs */
32 1.1 rjs
33 1.1 rjs /*
34 1.1 rjs * Common code for SA11x0 based PCMCIA modules
35 1.1 rjs */
36 1.1 rjs
37 1.1 rjs #include <sys/types.h>
38 1.1 rjs #include <sys/param.h>
39 1.1 rjs #include <sys/systm.h>
40 1.1 rjs #include <sys/device.h>
41 1.1 rjs #include <sys/callout.h>
42 1.1 rjs #include <sys/kernel.h>
43 1.1 rjs #include <sys/kthread.h>
44 1.1 rjs #include <sys/malloc.h>
45 1.1 rjs #include <uvm/uvm.h>
46 1.1 rjs
47 1.1 rjs #include <machine/bus.h>
48 1.1 rjs #include <machine/intr.h>
49 1.1 rjs
50 1.1 rjs #include <dev/pcmcia/pcmciareg.h>
51 1.1 rjs #include <dev/pcmcia/pcmciavar.h>
52 1.1 rjs #include <dev/pcmcia/pcmciachip.h>
53 1.1 rjs
54 1.1 rjs #include <arm/sa11x0/sa11x0_reg.h>
55 1.1 rjs #include <arm/sa11x0/sa11x0_var.h>
56 1.1 rjs #include <arm/sa11x0/sa11xx_pcicreg.h>
57 1.1 rjs #include <arm/sa11x0/sa11xx_pcicvar.h>
58 1.1 rjs
59 1.1 rjs static int sapcic_mem_alloc(pcmcia_chipset_handle_t, bus_size_t,
60 1.1 rjs struct pcmcia_mem_handle *);
61 1.1 rjs static void sapcic_mem_free(pcmcia_chipset_handle_t,
62 1.1 rjs struct pcmcia_mem_handle *);
63 1.1 rjs static int sapcic_mem_map(pcmcia_chipset_handle_t, int, bus_addr_t,
64 1.1 rjs bus_size_t, struct pcmcia_mem_handle *,
65 1.1 rjs bus_addr_t *, int *);
66 1.1 rjs static void sapcic_mem_unmap(pcmcia_chipset_handle_t, int);
67 1.1 rjs static int sapcic_io_alloc(pcmcia_chipset_handle_t, bus_addr_t,
68 1.1 rjs bus_size_t, bus_size_t,
69 1.1 rjs struct pcmcia_io_handle *);
70 1.1 rjs static void sapcic_io_free(pcmcia_chipset_handle_t,
71 1.1 rjs struct pcmcia_io_handle *);
72 1.1 rjs static int sapcic_io_map(pcmcia_chipset_handle_t, int,
73 1.1 rjs bus_addr_t, bus_size_t,
74 1.1 rjs struct pcmcia_io_handle *, int *);
75 1.1 rjs static void sapcic_io_unmap(pcmcia_chipset_handle_t, int);
76 1.1 rjs static void *sapcic_intr_establish(pcmcia_chipset_handle_t,
77 1.1 rjs struct pcmcia_function *, int,
78 1.1 rjs int (*)(void *), void *);
79 1.1 rjs static void sapcic_intr_disestablish(pcmcia_chipset_handle_t,
80 1.1 rjs void *);
81 1.1 rjs static void sapcic_socket_enable(pcmcia_chipset_handle_t);
82 1.1 rjs static void sapcic_socket_disable(pcmcia_chipset_handle_t);
83 1.1 rjs
84 1.1 rjs static void sapcic_event_thread(void *);
85 1.1 rjs
86 1.1 rjs static void sapcic_delay(int, const char *);
87 1.1 rjs
88 1.1 rjs #ifdef DEBUG
89 1.1 rjs #define DPRINTF(arg) printf arg
90 1.1 rjs #else
91 1.1 rjs #define DPRINTF(arg)
92 1.1 rjs #endif
93 1.1 rjs
94 1.1 rjs struct pcmcia_chip_functions sa11x0_pcmcia_functions = {
95 1.1 rjs sapcic_mem_alloc,
96 1.1 rjs sapcic_mem_free,
97 1.1 rjs sapcic_mem_map,
98 1.1 rjs sapcic_mem_unmap,
99 1.1 rjs
100 1.1 rjs sapcic_io_alloc,
101 1.1 rjs sapcic_io_free,
102 1.1 rjs sapcic_io_map,
103 1.1 rjs sapcic_io_unmap,
104 1.1 rjs
105 1.1 rjs sapcic_intr_establish,
106 1.1 rjs sapcic_intr_disestablish,
107 1.1 rjs
108 1.1 rjs sapcic_socket_enable,
109 1.1 rjs sapcic_socket_disable,
110 1.1 rjs };
111 1.1 rjs
112 1.1 rjs
113 1.1 rjs void
114 1.1 rjs sapcic_kthread_create(arg)
115 1.1 rjs void *arg;
116 1.1 rjs {
117 1.1 rjs struct sapcic_socket *so = arg;
118 1.1 rjs
119 1.1 rjs /* XXX attach card if already present */
120 1.1 rjs
121 1.1 rjs so->laststatus =(so->pcictag->read)(so, SAPCIC_STATUS_CARD);
122 1.1 rjs if (so->laststatus == SAPCIC_CARD_VALID) {
123 1.1 rjs printf("%s: card present\n",
124 1.1 rjs so->sc->sc_dev.dv_xname);
125 1.1 rjs
126 1.1 rjs pcmcia_card_attach(so->pcmcia);
127 1.1 rjs }
128 1.1 rjs
129 1.1 rjs if (kthread_create1(sapcic_event_thread, so, &so->event_thread,
130 1.1 rjs "%s,%d", so->sc->sc_dev.dv_xname, so->socket)) {
131 1.1 rjs printf("%s: unable to create event thread for socket %d\n",
132 1.1 rjs so->sc->sc_dev.dv_xname, so->socket);
133 1.1 rjs panic("sapcic_kthread_create");
134 1.1 rjs }
135 1.1 rjs }
136 1.1 rjs
137 1.1 rjs static void
138 1.1 rjs sapcic_event_thread(arg)
139 1.1 rjs void *arg;
140 1.1 rjs {
141 1.1 rjs struct sapcic_socket *so = arg;
142 1.1 rjs int newstatus, s;
143 1.1 rjs
144 1.1 rjs while (so->shutdown == 0) {
145 1.1 rjs /*
146 1.1 rjs * Serialize event processing on the PCIC. We may
147 1.1 rjs * sleep while we hold this lock.
148 1.1 rjs */
149 1.1 rjs (void) lockmgr(&so->sc->sc_lock, LK_EXCLUSIVE, NULL);
150 1.1 rjs
151 1.1 rjs /* sleep .25s to be enqueued chatterling interrupts */
152 1.1 rjs (void) tsleep((caddr_t)sapcic_event_thread, PWAIT,
153 1.1 rjs "pcicss", hz/4);
154 1.1 rjs
155 1.1 rjs s = splhigh();
156 1.1 rjs so->event = 0;
157 1.1 rjs
158 1.1 rjs /* we don't rely on interrupt type */
159 1.1 rjs newstatus = (so->pcictag->read)(so, SAPCIC_STATUS_CARD);
160 1.1 rjs splx(s);
161 1.1 rjs
162 1.1 rjs if (so->laststatus == newstatus) {
163 1.1 rjs /*
164 1.1 rjs * No events to process; release the PCIC lock.
165 1.1 rjs */
166 1.1 rjs (void) lockmgr(&so->sc->sc_lock, LK_RELEASE, NULL);
167 1.1 rjs (void) tsleep(&so->event, PWAIT, "pcicev", hz);
168 1.1 rjs continue;
169 1.1 rjs }
170 1.1 rjs
171 1.1 rjs so->laststatus = newstatus;
172 1.1 rjs switch (newstatus) {
173 1.1 rjs case SAPCIC_CARD_VALID:
174 1.1 rjs printf("%s: insertion event\n",
175 1.1 rjs so->sc->sc_dev.dv_xname);
176 1.1 rjs
177 1.1 rjs pcmcia_card_attach(so->pcmcia);
178 1.1 rjs break;
179 1.1 rjs
180 1.1 rjs case SAPCIC_CARD_INVALID:
181 1.1 rjs printf("%s: removal event\n",
182 1.1 rjs so->sc->sc_dev.dv_xname);
183 1.1 rjs
184 1.1 rjs pcmcia_card_detach(so->pcmcia, DETACH_FORCE);
185 1.1 rjs break;
186 1.1 rjs
187 1.1 rjs default:
188 1.1 rjs panic("sapcic_event_thread: unknown status %d",
189 1.1 rjs newstatus);
190 1.1 rjs }
191 1.1 rjs
192 1.1 rjs (void) lockmgr(&so->sc->sc_lock, LK_RELEASE, NULL);
193 1.1 rjs }
194 1.1 rjs
195 1.1 rjs so->event_thread = NULL;
196 1.1 rjs
197 1.1 rjs /* In case parent is waiting for us to exit. */
198 1.1 rjs wakeup(so->sc);
199 1.1 rjs
200 1.1 rjs kthread_exit(0);
201 1.1 rjs }
202 1.1 rjs
203 1.1 rjs static void
204 1.1 rjs sapcic_delay(timo, wmesg)
205 1.1 rjs int timo; /* in milliseconds */
206 1.1 rjs const char *wmesg;
207 1.1 rjs {
208 1.1 rjs #ifdef DIAGNOSTIC
209 1.1 rjs if (curproc == NULL)
210 1.1 rjs panic("sapcic_delay: called in interrupt context\n");
211 1.1 rjs #endif
212 1.1 rjs
213 1.1 rjs tsleep(sapcic_delay, PWAIT, wmesg, roundup(timo * hz, 1000) / 1000);
214 1.1 rjs }
215 1.1 rjs
216 1.1 rjs int
217 1.1 rjs sapcic_intr(arg)
218 1.1 rjs void *arg;
219 1.1 rjs {
220 1.1 rjs struct sapcic_socket *so = arg;
221 1.1 rjs
222 1.1 rjs so->event++;
223 1.1 rjs (so->pcictag->clear_intr)(so->socket);
224 1.1 rjs wakeup(&so->event);
225 1.1 rjs return 1;
226 1.1 rjs }
227 1.1 rjs
228 1.1 rjs static int
229 1.1 rjs sapcic_mem_alloc(pch, size, pmh)
230 1.1 rjs pcmcia_chipset_handle_t pch;
231 1.1 rjs bus_size_t size;
232 1.1 rjs struct pcmcia_mem_handle *pmh;
233 1.1 rjs {
234 1.1 rjs struct sapcic_socket *so = pch;
235 1.1 rjs
236 1.1 rjs /* All we need is bus space tag */
237 1.1 rjs memset(pmh, 0, sizeof(*pmh));
238 1.1 rjs pmh->memt = so->sc->sc_iot;
239 1.1 rjs return (0);
240 1.1 rjs }
241 1.1 rjs
242 1.1 rjs
243 1.1 rjs static void
244 1.1 rjs sapcic_mem_free(pch, pmh)
245 1.1 rjs pcmcia_chipset_handle_t pch;
246 1.1 rjs struct pcmcia_mem_handle *pmh;
247 1.1 rjs {
248 1.1 rjs }
249 1.1 rjs
250 1.1 rjs static int
251 1.1 rjs sapcic_mem_map(pch, kind, card_addr, size, pmh, offsetp, windowp)
252 1.1 rjs pcmcia_chipset_handle_t pch;
253 1.1 rjs int kind;
254 1.1 rjs bus_addr_t card_addr;
255 1.1 rjs bus_size_t size;
256 1.1 rjs struct pcmcia_mem_handle *pmh;
257 1.1 rjs bus_addr_t *offsetp;
258 1.1 rjs int *windowp;
259 1.1 rjs {
260 1.1 rjs struct sapcic_socket *so = pch;
261 1.1 rjs int error;
262 1.1 rjs bus_addr_t pa;
263 1.1 rjs
264 1.1 rjs pa = trunc_page(card_addr);
265 1.1 rjs *offsetp = card_addr - pa;
266 1.1 rjs size = round_page(card_addr + size) - pa;
267 1.1 rjs pmh->realsize = size;
268 1.1 rjs
269 1.1 rjs pa += SAPCIC_BASE_OFFSET;
270 1.1 rjs pa += SAPCIC_SOCKET_OFFSET * so->socket;
271 1.1 rjs
272 1.1 rjs switch (kind & ~PCMCIA_WIDTH_MEM_MASK) {
273 1.1 rjs case PCMCIA_MEM_ATTR:
274 1.1 rjs pa += SAPCIC_ATTR_OFFSET;
275 1.1 rjs break;
276 1.1 rjs case PCMCIA_MEM_COMMON:
277 1.1 rjs pa += SAPCIC_COMMON_OFFSET;
278 1.1 rjs break;
279 1.1 rjs default:
280 1.1 rjs panic("sapcic_mem_map: bogus kind\n");
281 1.1 rjs }
282 1.1 rjs
283 1.1 rjs error = bus_space_map(so->sc->sc_iot, pa, size, 0, &pmh->memh);
284 1.1 rjs if (! error)
285 1.1 rjs *windowp = (int)pmh->memh;
286 1.1 rjs return (error);
287 1.1 rjs }
288 1.1 rjs
289 1.1 rjs static void
290 1.1 rjs sapcic_mem_unmap(pch, window)
291 1.1 rjs pcmcia_chipset_handle_t pch;
292 1.1 rjs int window;
293 1.1 rjs {
294 1.1 rjs struct sapcic_socket *so = pch;
295 1.1 rjs
296 1.1 rjs bus_space_unmap(so->sc->sc_iot, (bus_addr_t)window, 4096); /* XXX */
297 1.1 rjs }
298 1.1 rjs
299 1.1 rjs static int
300 1.1 rjs sapcic_io_alloc(pch, start, size, align, pih)
301 1.1 rjs pcmcia_chipset_handle_t pch;
302 1.1 rjs bus_addr_t start;
303 1.1 rjs bus_size_t size;
304 1.1 rjs bus_size_t align;
305 1.1 rjs struct pcmcia_io_handle *pih;
306 1.1 rjs {
307 1.1 rjs struct sapcic_socket *so = pch;
308 1.1 rjs int error;
309 1.1 rjs bus_addr_t pa;
310 1.1 rjs
311 1.1 rjs memset(pih, 0, sizeof(*pih));
312 1.1 rjs pih->iot = so->sc->sc_iot;
313 1.1 rjs pih->addr = start;
314 1.1 rjs pih->size = size;
315 1.1 rjs
316 1.1 rjs pa = pih->addr;
317 1.1 rjs pa += SAPCIC_BASE_OFFSET;
318 1.1 rjs pa += SAPCIC_SOCKET_OFFSET * so->socket;
319 1.1 rjs
320 1.1 rjs DPRINTF(("sapcic_io_alloc: %x %x\n", (unsigned int)pa,
321 1.1 rjs (unsigned int)size));
322 1.1 rjs /* XXX Are we ignoring alignment constraints? */
323 1.1 rjs error = bus_space_map(so->sc->sc_iot, pa, size, 0, &pih->ioh);
324 1.1 rjs
325 1.1 rjs return (error);
326 1.1 rjs }
327 1.1 rjs
328 1.1 rjs static void
329 1.1 rjs sapcic_io_free(pch, pih)
330 1.1 rjs pcmcia_chipset_handle_t pch;
331 1.1 rjs struct pcmcia_io_handle *pih;
332 1.1 rjs {
333 1.1 rjs struct sapcic_socket *so = pch;
334 1.1 rjs
335 1.1 rjs bus_space_unmap(so->sc->sc_iot, pih->ioh, pih->size);
336 1.1 rjs }
337 1.1 rjs
338 1.1 rjs static int
339 1.1 rjs sapcic_io_map(pch, width, offset, size, pih, windowp)
340 1.1 rjs pcmcia_chipset_handle_t pch;
341 1.1 rjs int width;
342 1.1 rjs bus_addr_t offset;
343 1.1 rjs bus_size_t size;
344 1.1 rjs struct pcmcia_io_handle *pih;
345 1.1 rjs int *windowp;
346 1.1 rjs {
347 1.1 rjs return (0);
348 1.1 rjs }
349 1.1 rjs
350 1.1 rjs static void sapcic_io_unmap(pch, window)
351 1.1 rjs pcmcia_chipset_handle_t pch;
352 1.1 rjs int window;
353 1.1 rjs {
354 1.1 rjs }
355 1.1 rjs
356 1.1 rjs static void *
357 1.1 rjs sapcic_intr_establish(pch, pf, ipl, fct, arg)
358 1.1 rjs pcmcia_chipset_handle_t pch;
359 1.1 rjs struct pcmcia_function *pf;
360 1.1 rjs int ipl;
361 1.1 rjs int (*fct)(void *);
362 1.1 rjs void *arg;
363 1.1 rjs {
364 1.1 rjs struct sapcic_socket *so = pch;
365 1.1 rjs
366 1.1 rjs /* XXX need to check if something should be done here */
367 1.1 rjs
368 1.1 rjs return ((so->pcictag->intr_establish)(so, ipl, fct, arg));
369 1.1 rjs }
370 1.1 rjs
371 1.1 rjs static void
372 1.1 rjs sapcic_intr_disestablish(pch, ih)
373 1.1 rjs pcmcia_chipset_handle_t pch;
374 1.1 rjs void *ih;
375 1.1 rjs {
376 1.1 rjs struct sapcic_socket *so = pch;
377 1.1 rjs
378 1.1 rjs ((so->pcictag->intr_disestablish)(so, ih));
379 1.1 rjs }
380 1.1 rjs
381 1.1 rjs static void
382 1.1 rjs sapcic_socket_enable(pch)
383 1.1 rjs pcmcia_chipset_handle_t pch;
384 1.1 rjs {
385 1.1 rjs struct sapcic_socket *so = pch;
386 1.1 rjs int i;
387 1.1 rjs
388 1.1 rjs #if defined(DIAGNOSTIC) && defined(notyet)
389 1.1 rjs if (so->flags & PCIC_FLAG_ENABLED)
390 1.1 rjs printf("sapcic_socket_enable: enabling twice\n");
391 1.1 rjs #endif
392 1.1 rjs
393 1.1 rjs /* disable interrupts */
394 1.1 rjs
395 1.1 rjs /* power down the socket to reset it, clear the card reset pin */
396 1.1 rjs (so->pcictag->set_power)(so, SAPCIC_POWER_OFF);
397 1.1 rjs
398 1.1 rjs /*
399 1.1 rjs * wait 300ms until power fails (Tpf). Then, wait 100ms since
400 1.1 rjs * we are changing Vcc (Toff).
401 1.1 rjs */
402 1.1 rjs sapcic_delay(300 + 100, "pccen0");
403 1.1 rjs
404 1.1 rjs /* power up the socket */
405 1.1 rjs /* XXX voltage selection should be done in PCMCIA code */
406 1.1 rjs if (so->power_capability & SAPCIC_POWER_5V) {
407 1.1 rjs (so->pcictag->set_power)(so, SAPCIC_POWER_5V);
408 1.1 rjs (so->pcictag->write)(so, SAPCIC_CONTROL_POWERSELECT,
409 1.1 rjs SAPCIC_POWER_5V);
410 1.1 rjs } else {
411 1.1 rjs (so->pcictag->set_power)(so, SAPCIC_POWER_3V);
412 1.1 rjs (so->pcictag->write)(so, SAPCIC_CONTROL_POWERSELECT,
413 1.1 rjs SAPCIC_POWER_3V);
414 1.1 rjs }
415 1.1 rjs
416 1.1 rjs /* enable PCMCIA control lines */
417 1.1 rjs (so->pcictag->write)(so, SAPCIC_CONTROL_LINEENABLE, 1);
418 1.1 rjs
419 1.1 rjs /*
420 1.1 rjs * wait 100ms until power raise (Tpr) and 20ms to become
421 1.1 rjs * stable (Tsu(Vcc)).
422 1.1 rjs *
423 1.1 rjs * some machines require some more time to be settled
424 1.1 rjs * (300ms is added here).
425 1.1 rjs */
426 1.1 rjs sapcic_delay(100 + 20 + 300, "pccen1");
427 1.1 rjs
428 1.1 rjs /* honor nWAIT signal */
429 1.1 rjs (so->pcictag->write)(so, SAPCIC_CONTROL_WAITENABLE, 1);
430 1.1 rjs /* now make sure we have reset# active */
431 1.1 rjs (so->pcictag->write)(so, SAPCIC_CONTROL_RESET, 1);
432 1.1 rjs
433 1.1 rjs /*
434 1.1 rjs * hold RESET at least 10us, this is a min allow for slop in
435 1.1 rjs * delay routine.
436 1.1 rjs */
437 1.1 rjs delay(20);
438 1.1 rjs
439 1.1 rjs /* clear the reset flag */
440 1.1 rjs (so->pcictag->write)(so, SAPCIC_CONTROL_RESET, 0);
441 1.1 rjs
442 1.1 rjs /* wait 20ms as per pc card standard (r2.01) section 4.3.6 */
443 1.1 rjs sapcic_delay(20, "pccen2");
444 1.1 rjs
445 1.1 rjs /* wait for the chip to finish initializing */
446 1.1 rjs sapcic_delay(10, "pccen3");
447 1.1 rjs for(i = 100; i; i--) {
448 1.1 rjs if ((so->pcictag->read)(so, SAPCIC_STATUS_READY))
449 1.1 rjs break;
450 1.1 rjs sapcic_delay(100, "pccen4");
451 1.1 rjs }
452 1.1 rjs DPRINTF(("sapcic_socket_enable: wait ready %d\n", 100 - i));
453 1.1 rjs
454 1.1 rjs /* finally enable the interrupt */
455 1.1 rjs
456 1.1 rjs }
457 1.1 rjs
458 1.1 rjs static void
459 1.1 rjs sapcic_socket_disable(pch)
460 1.1 rjs pcmcia_chipset_handle_t pch;
461 1.1 rjs {
462 1.1 rjs struct sapcic_socket *so = pch;
463 1.1 rjs
464 1.1 rjs /* XXX mask card interrupts */
465 1.1 rjs
466 1.1 rjs /* power down the card */
467 1.1 rjs (so->pcictag->set_power)(so, SAPCIC_POWER_OFF);
468 1.1 rjs
469 1.1 rjs /* float controller lines */
470 1.1 rjs (so->pcictag->write)(so, SAPCIC_CONTROL_LINEENABLE, 0);
471 1.1 rjs }
472