cy.c (91314) | cy.c (92765) |
---|---|
1/*- 2 * cyclades cyclom-y serial driver 3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993 4 * 5 * Copyright (c) 1993 Andrew Herbert. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * | 1/*- 2 * cyclades cyclom-y serial driver 3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993 4 * 5 * Copyright (c) 1993 Andrew Herbert. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * |
30 * $FreeBSD: head/sys/dev/cy/cy.c 91314 2002-02-26 17:04:29Z bde $ | 30 * $FreeBSD: head/sys/dev/cy/cy.c 92765 2002-03-20 07:51:46Z alfred $ |
31 */ 32 33#include "opt_compat.h" 34#include "cy.h" 35 36/* 37 * TODO: 38 * Atomic COR change. --- 300 unchanged lines hidden (view full) --- 339 * Data area for output buffers. Someday we should build the output 340 * buffer queue without copying data. 341 */ 342 u_char obuf1[256]; 343 u_char obuf2[256]; 344}; 345 346/* PCI driver entry point. */ | 31 */ 32 33#include "opt_compat.h" 34#include "cy.h" 35 36/* 37 * TODO: 38 * Atomic COR change. --- 300 unchanged lines hidden (view full) --- 339 * Data area for output buffers. Someday we should build the output 340 * buffer queue without copying data. 341 */ 342 u_char obuf1[256]; 343 u_char obuf2[256]; 344}; 345 346/* PCI driver entry point. */ |
347int cyattach_common __P((cy_addr cy_iobase, int cy_align)); | 347int cyattach_common (cy_addr cy_iobase, int cy_align); |
348ointhand2_t siointr; 349 | 348ointhand2_t siointr; 349 |
350static int cy_units __P((cy_addr cy_iobase, int cy_align)); 351static int sioattach __P((struct isa_device *dev)); 352static void cd1400_channel_cmd __P((struct com_s *com, int cmd)); 353static void cd1400_channel_cmd_wait __P((struct com_s *com)); 354static void cd_etc __P((struct com_s *com, int etc)); 355static int cd_getreg __P((struct com_s *com, int reg)); 356static void cd_setreg __P((struct com_s *com, int reg, int val)); | 350static int cy_units (cy_addr cy_iobase, int cy_align); 351static int sioattach (struct isa_device *dev); 352static void cd1400_channel_cmd(struct com_s *com, int cmd); 353static void cd1400_channel_cmd_wait(struct com_s *com); 354static void cd_etc (struct com_s *com, int etc); 355static int cd_getreg (struct com_s *com, int reg); 356static void cd_setreg (struct com_s *com, int reg, int val); |
357static timeout_t siodtrwakeup; | 357static timeout_t siodtrwakeup; |
358static void comhardclose __P((struct com_s *com)); 359static void sioinput __P((struct com_s *com)); | 358static void comhardclose (struct com_s *com); 359static void sioinput (struct com_s *com); |
360#if 0 | 360#if 0 |
361static void siointr1 __P((struct com_s *com)); | 361static void siointr1 (struct com_s *com); |
362#endif | 362#endif |
363static int commctl __P((struct com_s *com, int bits, int how)); 364static int comparam __P((struct tty *tp, struct termios *t)); 365static void siopoll __P((void *arg)); 366static int sioprobe __P((struct isa_device *dev)); 367static void siosettimeout __P((void)); 368static int siosetwater __P((struct com_s *com, speed_t speed)); 369static int comspeed __P((speed_t speed, u_long cy_clock, 370 int *prescaler_io)); 371static void comstart __P((struct tty *tp)); 372static void comstop __P((struct tty *tp, int rw)); | 363static int commctl (struct com_s *com, int bits, int how); 364static int comparam (struct tty *tp, struct termios *t); 365static void siopoll (void *arg); 366static int sioprobe (struct isa_device *dev); 367static void siosettimeout (void); 368static int siosetwater (struct com_s *com, speed_t speed); 369static int comspeed (speed_t speed, u_long cy_clock, 370 int *prescaler_io); 371static void comstart (struct tty *tp); 372static void comstop (struct tty *tp, int rw); |
373static timeout_t comwakeup; | 373static timeout_t comwakeup; |
374static void disc_optim __P((struct tty *tp, struct termios *t, 375 struct com_s *com)); | 374static void disc_optim (struct tty *tp, struct termios *t, 375 struct com_s *com); |
376 377#ifdef CyDebug | 376 377#ifdef CyDebug |
378void cystatus __P((int unit)); | 378void cystatus (int unit); |
379#endif 380 381static char driver_name[] = "cy"; 382 383/* table and macro for fast conversion from a unit number to its com struct */ 384static struct com_s *p_com_addr[NSIO]; 385#define com_addr(unit) (p_com_addr[unit]) 386 --- 2580 unchanged lines hidden --- | 379#endif 380 381static char driver_name[] = "cy"; 382 383/* table and macro for fast conversion from a unit number to its com struct */ 384static struct com_s *p_com_addr[NSIO]; 385#define com_addr(unit) (p_com_addr[unit]) 386 --- 2580 unchanged lines hidden --- |