Lines Matching +full:port +full:- +full:mapping +full:- +full:mode

60  *	er	28-Jan-1997	Initial Entry
69 ** The mask acts as a flag used in mapping actual ISA IRQs (0 - 15)
70 ** to device IRQs (A - H).
83 ** The mask acts as a flag used in mapping actual ISA DMA
84 ** channels to device DMA channels (A - C).
218 ** CR00 - default value 0x28
221 ** 0x - 30ua pull-ups on nIDEEN, nHDCS0, NHDCS1
222 ** 11 - IRQ_H available as IRQ output,
224 ** 10 - nIDEEN, nHDCS0, nHDCS1 used to control IDE
247 ** CR01 - default value 0x9C
254 unsigned ppt_mode : 1; /* 1 = Printer mode, 0 = EPP */
257 unsigned lock_crx: 1; /* Lock CR00 - CR18 */
262 ** CR02 - default value 0x88
275 ** CR03 - default value 0x78
278 ** ------- ------- ------
283 ** CR03<6> CR03<5> Op Mode
284 ** ------- ------- -------
288 ** 1 1 AT Mode
294 unsigned fdc_mode2 : 1; /* 1 = Enhanced Mode 2 */
297 unsigned drvden : 1; /* 1 = high, 0 - output */
304 ** CR04 - default value 0x00
308 ** 00 - Standard and Bidirectional
309 ** 01 - EPP mode and SPP
310 ** 10 - ECP mode
311 ** In this mode, 2 drives can be supported
314 ** through the ECR register of ECP as mode 000.
315 ** 11 - ECP mode and EPP mode
316 ** In this mode, 2 drives can be supported
319 ** through the ECR register of ECP as mode 000.
320 ** In this mode, EPP can be selected through
321 ** the ECR register of ECP as mode 100.
324 ** 00 - Normal
325 ** 01 - PPFD1
326 ** 10 - PPFD2
327 ** 11 - Reserved
339 ** 0 - Use pins IRRX, IRTX
340 ** 1 - Use pins IRRX2, IRTX2
359 ** CR05 - default value 0x00
362 ** 00 - Densel output normal
363 ** 01 - Reserved
364 ** 10 - Densel output 1
365 ** 11 - Densel output 0
372 unsigned fdc_dma_mode : 1; /* 0 = burst, 1 = non-burst */
381 ** CR06 - default value 0xFF
394 ** CR07 - default value 0x00
397 ** 0 - Auto Powerdown disabled (default)
398 ** 1 - Auto Powerdown enabled
417 ** CR08 - default value 0x00
428 ** CR09 - default value 0x00
431 ** 00 - ADRx disabled
432 ** 01 - 1 byte decode A<3:0> = 0000b
433 ** 10 - 8 byte block decode A<3:0> = 0XXXb
434 ** 11 - 16 byte block decode A<3:0> = XXXXb
447 ** CR0A - default value 0x00
458 ** CR0B - default value 0x00
471 ** CR0C - default value 0x00
474 ** 000 - Standard (default)
475 ** 001 - IrDA (HPSIR)
476 ** 010 - Amplitude Shift Keyed IR @500 KHz
477 ** 011 - Reserved
478 ** 1xx - Reserved
494 ** CR0D - default value 0x03
496 ** Device ID Register - read only
506 ** CR0E - default value 0x02
508 ** Device Revision Register - read only
518 ** CR0F - default value 0x00
523 unsigned test0 : 1; /* Reserved - set to 0 */
524 unsigned test1 : 1; /* Reserved - set to 0 */
525 unsigned test2 : 1; /* Reserved - set to 0 */
526 unsigned test3 : 1; /* Reserved - set t0 0 */
527 unsigned test4 : 1; /* Reserved - set to 0 */
528 unsigned test5 : 1; /* Reserved - set t0 0 */
529 unsigned test6 : 1; /* Reserved - set t0 0 */
530 unsigned test7 : 1; /* Reserved - set to 0 */
535 ** CR10 - default value 0x00
545 unsigned ir_test : 1; /* Enable IR test mode */
550 ** CR11 - default value 0x00
562 ** CR12 - CR1D are reserved registers
566 ** CR1E - default value 0x80
569 ** 00 - GAMECS disabled
570 ** 01 - 1 byte decode ADR<3:0> = 0001b
571 ** 10 - 8 byte block decode ADR<3:0> = 0XXXb
572 ** 11 - 16 byte block decode ADR<3:0> = XXXXb
584 ** CR1F - default value 0x00
587 ** --- --- ------- ------- ----------
590 ** 2/1.6/1 MB 3.5" (3-mode)
596 ** pins - DRVDEN0 and DRVDEN1.
610 ** CR20 - default value 0x3C
613 ** - To disable this decode set Addr<9:8> = 0
614 ** - A<10> = 0, A<3:0> = 0XXXb to access.
626 ** CR21 - default value 0x3C
629 ** - To disable this decode set Addr<9:8> = 0
630 ** - A<10> = 0, A<3:0> = 0XXXb to access.
642 ** CR22 - default value 0x3D
645 ** - To disable this decode set Addr<9:8> = 0
646 ** - A<10> = 0, A<3:0> = 0110b to access.
658 ** CR23 - default value 0x00
660 ** Parallel Port Base Address Register
661 ** - To disable this decode set Addr<9:8> = 0
662 ** - A<10> = 0 to access.
663 ** - If EPP is enabled, A<2:0> = XXXb to access.
670 unsigned addr9_2 : 8; /* Parallel Port Addr<9:2> */
675 ** CR24 - default value 0x00
678 ** - To disable this decode set Addr<9:8> = 0
679 ** - A<10> = 0, A<2:0> = XXXb to access.
691 ** CR25 - default value 0x00
694 ** - To disable this decode set Addr<9:8> = 0
695 ** - A<10> = 0, A<2:0> = XXXb to access.
707 ** CR26 - default value 0x00
709 ** Parallel Port / FDC DMA Select Register
711 ** D3 - D0 DMA
712 ** D7 - D4 Selected
713 ** ------- --------
729 ** CR27 - default value 0x00
731 ** Parallel Port / FDC IRQ Select Register
733 ** D3 - D0 IRQ
734 ** D7 - D4 Selected
735 ** ------- --------
758 ** CR28 - default value 0x00
762 ** D3 - D0 IRQ
763 ** D7 - D4 Selected
764 ** ------- --------
792 ** CR29 - default value 0x00
796 ** D3 - D0 IRQ
797 ** D7 - D4 Selected
798 ** ------- --------
826 ** this we only define 1 alias here - for CR24 - as the serial
832 ** here - for CR21 - as the IDE address register.
879 int port,
927 * 28-Jan-1997
931 * er 01-May-1997 Fixed pointer conversion errors in
933 * er 28-Jan-1997 Initial version.
935 *--
996 { SMC37c669_DEVICE_IRQ_A, -1 },
997 { SMC37c669_DEVICE_IRQ_B, -1 },
1002 { SMC37c669_DEVICE_IRQ_H, -1 },
1003 { -1, -1 } /* End of table */
1013 { SMC37c669_DEVICE_IRQ_A, -1 },
1014 { SMC37c669_DEVICE_IRQ_B, -1 },
1019 { SMC37c669_DEVICE_IRQ_H, -1 },
1020 { -1, -1 } /* End of table */
1047 { SMC37c669_DEVICE_DRQ_C, -1 },
1048 { -1, -1 } /* End of table */
1062 int *port,
1117 **--
1133 ** Enter configuration mode in SMC37c669_detect()
1141 ** Exit configuration mode in SMC37c669_detect()
1158 ** file, it should call a platform-specific external routine at this in SMC37c669_detect()
1165 ** Put the chip back into configuration mode in SMC37c669_detect()
1173 ** Exit configuration mode in SMC37c669_detect()
1215 ** setting all of its mappings (port, irq, drq ...). A local
1217 ** just set each mapping to what the local copy says.
1225 **--
1231 ** Put the device into configuration mode in SMC37c669_enable_device()
1240 ** Enable the serial 1 IRQ mapping in SMC37c669_enable_device()
1252 ** Enable the serial 1 port base address mapping in SMC37c669_enable_device()
1269 ** Enable the serial 2 IRQ mapping in SMC37c669_enable_device()
1281 ** Enable the serial 2 port base address mapping in SMC37c669_enable_device()
1299 ** Enable the parallel port DMA channel mapping in SMC37c669_enable_device()
1314 ** Enable the parallel port IRQ mapping in SMC37c669_enable_device()
1329 ** Enable the parallel port base address mapping in SMC37c669_enable_device()
1347 ** Enable the floppy controller DMA channel mapping in SMC37c669_enable_device()
1362 ** Enable the floppy controller IRQ mapping in SMC37c669_enable_device()
1377 ** Enable the floppy controller base address mapping in SMC37c669_enable_device()
1393 ** Enable the IDE alternate status base address mapping in SMC37c669_enable_device()
1403 ** Enable the IDE controller base address mapping in SMC37c669_enable_device()
1417 ** Exit configuration mode and return in SMC37c669_enable_device()
1448 ** disabling all the function's mappings (port, irq, drq ...).
1453 **--
1460 ** Put the device into configuration mode in SMC37c669_disable_device()
1469 ** Disable the serial 1 IRQ mapping in SMC37c669_disable_device()
1478 ** Disable the serial 1 port base address mapping in SMC37c669_disable_device()
1493 ** Disable the serial 2 IRQ mapping in SMC37c669_disable_device()
1502 ** Disable the serial 2 port base address mapping in SMC37c669_disable_device()
1519 ** Disable the parallel port DMA channel mapping in SMC37c669_disable_device()
1531 ** Disable the parallel port IRQ mapping in SMC37c669_disable_device()
1543 ** Disable the parallel port base address mapping in SMC37c669_disable_device()
1560 ** Disable the floppy controller DMA channel mapping in SMC37c669_disable_device()
1572 ** Disable the floppy controller IRQ mapping in SMC37c669_disable_device()
1584 ** Disable the floppy controller base address mapping in SMC37c669_disable_device()
1599 ** Disable the IDE alternate status base address mapping in SMC37c669_disable_device()
1608 ** Disable the IDE controller base address mapping in SMC37c669_disable_device()
1621 ** Exit configuration mode and return in SMC37c669_disable_device()
1641 ** port:
1642 ** I/O port for the function to use
1667 **--
1671 int port, in SMC37c669_configure_device() argument
1685 cp->drq = drq; in SMC37c669_configure_device()
1688 cp->irq = irq; in SMC37c669_configure_device()
1690 if ( ( port & ~0xFFFF ) == 0 ) { in SMC37c669_configure_device()
1691 cp->port1 = port; in SMC37c669_configure_device()
1729 ** the port base address mapping. According to the SMC37c669
1730 ** specification, all of the port base address mappings are
1734 **--
1742 ** Enter configuration mode in SMC37c669_is_device_enabled()
1779 ** The mapping is not disabled, so assume that the function is in SMC37c669_is_device_enabled()
1785 ** Exit configuration mode in SMC37c669_is_device_enabled()
1806 ** port:
1807 ** I/O port returned
1822 ** The data pointed to by the port, irq, and drq parameters
1829 ** copy. Any unused parameters will be set to -1. Any
1833 **--
1837 int *port,
1848 *drq = cp->drq;
1852 *irq = cp->irq;
1855 if ( port != NULL ) {
1856 *port = cp->port1;
1884 **--
1889 printk( " Serial 0: Enabled [ Port 0x%x, IRQ %d ]\n", in SMC37c669_display_device_info()
1899 printk( " Serial 1: Enabled [ Port 0x%x, IRQ %d ]\n", in SMC37c669_display_device_info()
1909 printk( " Parallel: Enabled [ Port 0x%x, IRQ %d/%d ]\n", in SMC37c669_display_device_info()
1920 printk( " Floppy Ctrl: Enabled [ Port 0x%x, IRQ %d/%d ]\n", in SMC37c669_display_device_info()
1931 printk( " IDE 0: Enabled [ Port 0x%x, IRQ %d ]\n", in SMC37c669_display_device_info()
1947 ** and takes it out of, configuration mode.
1952 ** TRUE to enter configuration mode, FALSE to exit.
1960 ** The SMC37c669 controller may be left in configuration mode.
1962 **--
1969 ** To enter configuration mode, two writes in succession to the index in SMC37c669_config_mode()
1970 ** port are required. If a write to another address or port occurs in SMC37c669_config_mode()
1972 ** mode. Therefore, a spinlock is placed around the two writes to in SMC37c669_config_mode()
1976 wb( &SMC37c669->index_port, SMC37c669_CONFIG_ON_KEY ); in SMC37c669_config_mode()
1977 wb( &SMC37c669->index_port, SMC37c669_CONFIG_ON_KEY ); in SMC37c669_config_mode()
1981 wb( &SMC37c669->index_port, SMC37c669_CONFIG_OFF_KEY ); in SMC37c669_config_mode()
1991 ** device is already in configuration mode.
2006 **--
2011 wb(&SMC37c669->index_port, index); in SMC37c669_read_config()
2012 return rb(&SMC37c669->data_port); in SMC37c669_read_config()
2021 ** device is already in configuration mode.
2039 **--
2045 wb( &SMC37c669->index_port, index ); in SMC37c669_write_config()
2046 wb( &SMC37c669->data_port, data ); in SMC37c669_write_config()
2057 ** mode.
2072 **--
2086 ** Get serial port 1 base address in SMC37c669_init_local_config()
2096 ** Store local configuration information for serial port 1 in SMC37c669_init_local_config()
2104 ** Get serial port 2 base address in SMC37c669_init_local_config()
2109 ** Store local configuration information for serial port 2 in SMC37c669_init_local_config()
2117 ** Get parallel port base address in SMC37c669_init_local_config()
2122 ** Get IRQs for parallel port and floppy controller in SMC37c669_init_local_config()
2127 ** Get DRQs for parallel port and floppy controller in SMC37c669_init_local_config()
2132 ** Store local configuration information for parallel port in SMC37c669_init_local_config()
2200 **--
2240 ** Returns the translated IRQ, otherwise, returns -1.
2246 **--
2250 int i, translated_irq = -1; in SMC37c669_xlate_irq()
2256 …for ( i = 0; ( SMC37c669_irq_table[i].device_irq != -1 ) || ( SMC37c669_irq_table[i].isa_irq != -1… in SMC37c669_xlate_irq()
2267 …for ( i = 0; ( SMC37c669_irq_table[i].isa_irq != -1 ) || ( SMC37c669_irq_table[i].device_irq != -1… in SMC37c669_xlate_irq()
2292 ** Returns the translated DMA channel, otherwise, returns -1
2298 **--
2302 int i, translated_drq = -1; in SMC37c669_xlate_drq()
2308 …for ( i = 0; ( SMC37c669_drq_table[i].device_drq != -1 ) || ( SMC37c669_drq_table[i].isa_drq != -1… in SMC37c669_xlate_drq()
2319 …for ( i = 0; ( SMC37c669_drq_table[i].isa_drq != -1 ) || ( SMC37c669_drq_table[i].device_drq != -1… in SMC37c669_xlate_drq()
2335 ip->dva = &smc_ddb;
2336 ip->attr = ATTR$M_WRITE | ATTR$M_READ;
2337 ip->len[0] = 0x30;
2338 ip->misc = 0;
2344 int __init smcc669_open( struct FILE *fp, char *info, char *next, char *mode )
2348 ** Allow multiple readers but only one writer. ip->misc keeps track
2351 ip = fp->ip;
2353 if ( fp->mode & ATTR$M_WRITE ) {
2354 if ( ip->misc ) {
2358 ip->misc++;
2363 *fp->offset = xtoi( info );
2373 ip = fp->ip;
2374 if ( fp->mode & ATTR$M_WRITE ) {
2376 ip->misc--;
2392 ip = fp->ip;
2398 if ( !inrange( *fp->offset, 0, ip->len[0] ) )
2400 *buf++ = SMC37c669_read_config( *fp->offset );
2401 *fp->offset += 1;
2417 ip = fp->ip;
2423 if ( !inrange( *fp->offset, 0, ip->len[0] ) )
2425 SMC37c669_write_config( *fp->offset, *buf );
2426 *fp->offset += 1;
2441 printk("-- CR%02x : %02x\n", i, SMC37c669_read_config(i)); in SMC37c669_dump_registers()
2446 * = SMC_init - SMC37c669 Super I/O controller initialization =
2489 -1 in SMC669_Init()
2498 -1 in SMC669_Init()