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

58  *	er	28-Jan-1997	Initial Entry
67 ** The mask acts as a flag used in mapping actual ISA IRQs (0 - 15)
68 ** to device IRQs (A - H).
81 ** The mask acts as a flag used in mapping actual ISA DMA
82 ** channels to device DMA channels (A - C).
216 ** CR00 - default value 0x28
219 ** 0x - 30ua pull-ups on nIDEEN, nHDCS0, NHDCS1
220 ** 11 - IRQ_H available as IRQ output,
222 ** 10 - nIDEEN, nHDCS0, nHDCS1 used to control IDE
245 ** CR01 - default value 0x9C
252 unsigned ppt_mode : 1; /* 1 = Printer mode, 0 = EPP */
255 unsigned lock_crx: 1; /* Lock CR00 - CR18 */
260 ** CR02 - default value 0x88
273 ** CR03 - default value 0x78
276 ** ------- ------- ------
281 ** CR03<6> CR03<5> Op Mode
282 ** ------- ------- -------
286 ** 1 1 AT Mode
292 unsigned fdc_mode2 : 1; /* 1 = Enhanced Mode 2 */
295 unsigned drvden : 1; /* 1 = high, 0 - output */
302 ** CR04 - default value 0x00
306 ** 00 - Standard and Bidirectional
307 ** 01 - EPP mode and SPP
308 ** 10 - ECP mode
309 ** In this mode, 2 drives can be supported
312 ** through the ECR register of ECP as mode 000.
313 ** 11 - ECP mode and EPP mode
314 ** In this mode, 2 drives can be supported
317 ** through the ECR register of ECP as mode 000.
318 ** In this mode, EPP can be selected through
319 ** the ECR register of ECP as mode 100.
322 ** 00 - Normal
323 ** 01 - PPFD1
324 ** 10 - PPFD2
325 ** 11 - Reserved
337 ** 0 - Use pins IRRX, IRTX
338 ** 1 - Use pins IRRX2, IRTX2
357 ** CR05 - default value 0x00
360 ** 00 - Densel output normal
361 ** 01 - Reserved
362 ** 10 - Densel output 1
363 ** 11 - Densel output 0
370 unsigned fdc_dma_mode : 1; /* 0 = burst, 1 = non-burst */
379 ** CR06 - default value 0xFF
392 ** CR07 - default value 0x00
395 ** 0 - Auto Powerdown disabled (default)
396 ** 1 - Auto Powerdown enabled
415 ** CR08 - default value 0x00
426 ** CR09 - default value 0x00
429 ** 00 - ADRx disabled
430 ** 01 - 1 byte decode A<3:0> = 0000b
431 ** 10 - 8 byte block decode A<3:0> = 0XXXb
432 ** 11 - 16 byte block decode A<3:0> = XXXXb
445 ** CR0A - default value 0x00
456 ** CR0B - default value 0x00
469 ** CR0C - default value 0x00
472 ** 000 - Standard (default)
473 ** 001 - IrDA (HPSIR)
474 ** 010 - Amplitude Shift Keyed IR @500 KHz
475 ** 011 - Reserved
476 ** 1xx - Reserved
492 ** CR0D - default value 0x03
494 ** Device ID Register - read only
504 ** CR0E - default value 0x02
506 ** Device Revision Register - read only
516 ** CR0F - default value 0x00
521 unsigned test0 : 1; /* Reserved - set to 0 */
522 unsigned test1 : 1; /* Reserved - set to 0 */
523 unsigned test2 : 1; /* Reserved - set to 0 */
524 unsigned test3 : 1; /* Reserved - set t0 0 */
525 unsigned test4 : 1; /* Reserved - set to 0 */
526 unsigned test5 : 1; /* Reserved - set t0 0 */
527 unsigned test6 : 1; /* Reserved - set t0 0 */
528 unsigned test7 : 1; /* Reserved - set to 0 */
533 ** CR10 - default value 0x00
543 unsigned ir_test : 1; /* Enable IR test mode */
548 ** CR11 - default value 0x00
560 ** CR12 - CR1D are reserved registers
564 ** CR1E - default value 0x80
567 ** 00 - GAMECS disabled
568 ** 01 - 1 byte decode ADR<3:0> = 0001b
569 ** 10 - 8 byte block decode ADR<3:0> = 0XXXb
570 ** 11 - 16 byte block decode ADR<3:0> = XXXXb
582 ** CR1F - default value 0x00
585 ** --- --- ------- ------- ----------
588 ** 2/1.6/1 MB 3.5" (3-mode)
594 ** pins - DRVDEN0 and DRVDEN1.
608 ** CR20 - default value 0x3C
611 ** - To disable this decode set Addr<9:8> = 0
612 ** - A<10> = 0, A<3:0> = 0XXXb to access.
624 ** CR21 - default value 0x3C
627 ** - To disable this decode set Addr<9:8> = 0
628 ** - A<10> = 0, A<3:0> = 0XXXb to access.
640 ** CR22 - default value 0x3D
643 ** - To disable this decode set Addr<9:8> = 0
644 ** - A<10> = 0, A<3:0> = 0110b to access.
656 ** CR23 - default value 0x00
658 ** Parallel Port Base Address Register
659 ** - To disable this decode set Addr<9:8> = 0
660 ** - A<10> = 0 to access.
661 ** - If EPP is enabled, A<2:0> = XXXb to access.
668 unsigned addr9_2 : 8; /* Parallel Port Addr<9:2> */
673 ** CR24 - default value 0x00
676 ** - To disable this decode set Addr<9:8> = 0
677 ** - A<10> = 0, A<2:0> = XXXb to access.
689 ** CR25 - default value 0x00
692 ** - To disable this decode set Addr<9:8> = 0
693 ** - A<10> = 0, A<2:0> = XXXb to access.
705 ** CR26 - default value 0x00
707 ** Parallel Port / FDC DMA Select Register
709 ** D3 - D0 DMA
710 ** D7 - D4 Selected
711 ** ------- --------
727 ** CR27 - default value 0x00
729 ** Parallel Port / FDC IRQ Select Register
731 ** D3 - D0 IRQ
732 ** D7 - D4 Selected
733 ** ------- --------
756 ** CR28 - default value 0x00
760 ** D3 - D0 IRQ
761 ** D7 - D4 Selected
762 ** ------- --------
790 ** CR29 - default value 0x00
794 ** D3 - D0 IRQ
795 ** D7 - D4 Selected
796 ** ------- --------
824 ** this we only define 1 alias here - for CR24 - as the serial
830 ** here - for CR21 - as the IDE address register.
877 int port,
925 * 28-Jan-1997
929 * er 01-May-1997 Fixed pointer conversion errors in
931 * er 28-Jan-1997 Initial version.
933 *--
994 { SMC37c669_DEVICE_IRQ_A, -1 },
995 { SMC37c669_DEVICE_IRQ_B, -1 },
1000 { SMC37c669_DEVICE_IRQ_H, -1 },
1001 { -1, -1 } /* End of table */
1011 { SMC37c669_DEVICE_IRQ_A, -1 },
1012 { SMC37c669_DEVICE_IRQ_B, -1 },
1017 { SMC37c669_DEVICE_IRQ_H, -1 },
1018 { -1, -1 } /* End of table */
1045 { SMC37c669_DEVICE_DRQ_C, -1 },
1046 { -1, -1 } /* End of table */
1060 int *port,
1115 **--
1131 ** Enter configuration mode in SMC37c669_detect()
1139 ** Exit configuration mode in SMC37c669_detect()
1156 ** file, it should call a platform-specific external routine at this in SMC37c669_detect()
1163 ** Put the chip back into configuration mode in SMC37c669_detect()
1171 ** Exit configuration mode in SMC37c669_detect()
1213 ** setting all of its mappings (port, irq, drq ...). A local
1215 ** just set each mapping to what the local copy says.
1223 **--
1229 ** Put the device into configuration mode in SMC37c669_enable_device()
1238 ** Enable the serial 1 IRQ mapping in SMC37c669_enable_device()
1250 ** Enable the serial 1 port base address mapping in SMC37c669_enable_device()
1267 ** Enable the serial 2 IRQ mapping in SMC37c669_enable_device()
1279 ** Enable the serial 2 port base address mapping in SMC37c669_enable_device()
1297 ** Enable the parallel port DMA channel mapping in SMC37c669_enable_device()
1312 ** Enable the parallel port IRQ mapping in SMC37c669_enable_device()
1327 ** Enable the parallel port base address mapping in SMC37c669_enable_device()
1345 ** Enable the floppy controller DMA channel mapping in SMC37c669_enable_device()
1360 ** Enable the floppy controller IRQ mapping in SMC37c669_enable_device()
1375 ** Enable the floppy controller base address mapping in SMC37c669_enable_device()
1391 ** Enable the IDE alternate status base address mapping in SMC37c669_enable_device()
1401 ** Enable the IDE controller base address mapping in SMC37c669_enable_device()
1415 ** Exit configuration mode and return in SMC37c669_enable_device()
1446 ** disabling all the function's mappings (port, irq, drq ...).
1451 **--
1458 ** Put the device into configuration mode in SMC37c669_disable_device()
1467 ** Disable the serial 1 IRQ mapping in SMC37c669_disable_device()
1476 ** Disable the serial 1 port base address mapping in SMC37c669_disable_device()
1491 ** Disable the serial 2 IRQ mapping in SMC37c669_disable_device()
1500 ** Disable the serial 2 port base address mapping in SMC37c669_disable_device()
1517 ** Disable the parallel port DMA channel mapping in SMC37c669_disable_device()
1529 ** Disable the parallel port IRQ mapping in SMC37c669_disable_device()
1541 ** Disable the parallel port base address mapping in SMC37c669_disable_device()
1558 ** Disable the floppy controller DMA channel mapping in SMC37c669_disable_device()
1570 ** Disable the floppy controller IRQ mapping in SMC37c669_disable_device()
1582 ** Disable the floppy controller base address mapping in SMC37c669_disable_device()
1597 ** Disable the IDE alternate status base address mapping in SMC37c669_disable_device()
1606 ** Disable the IDE controller base address mapping in SMC37c669_disable_device()
1619 ** Exit configuration mode and return in SMC37c669_disable_device()
1639 ** port:
1640 ** I/O port for the function to use
1665 **--
1669 int port, in SMC37c669_configure_device() argument
1683 cp->drq = drq; in SMC37c669_configure_device()
1686 cp->irq = irq; in SMC37c669_configure_device()
1688 if ( ( port & ~0xFFFF ) == 0 ) { in SMC37c669_configure_device()
1689 cp->port1 = port; in SMC37c669_configure_device()
1727 ** the port base address mapping. According to the SMC37c669
1728 ** specification, all of the port base address mappings are
1732 **--
1740 ** Enter configuration mode in SMC37c669_is_device_enabled()
1777 ** The mapping is not disabled, so assume that the function is in SMC37c669_is_device_enabled()
1783 ** Exit configuration mode in SMC37c669_is_device_enabled()
1804 ** port:
1805 ** I/O port returned
1820 ** The data pointed to by the port, irq, and drq parameters
1827 ** copy. Any unused parameters will be set to -1. Any
1831 **--
1835 int *port,
1846 *drq = cp->drq;
1850 *irq = cp->irq;
1853 if ( port != NULL ) {
1854 *port = cp->port1;
1882 **--
1887 printk( " Serial 0: Enabled [ Port 0x%x, IRQ %d ]\n", in SMC37c669_display_device_info()
1897 printk( " Serial 1: Enabled [ Port 0x%x, IRQ %d ]\n", in SMC37c669_display_device_info()
1907 printk( " Parallel: Enabled [ Port 0x%x, IRQ %d/%d ]\n", in SMC37c669_display_device_info()
1918 printk( " Floppy Ctrl: Enabled [ Port 0x%x, IRQ %d/%d ]\n", in SMC37c669_display_device_info()
1929 printk( " IDE 0: Enabled [ Port 0x%x, IRQ %d ]\n", in SMC37c669_display_device_info()
1945 ** and takes it out of, configuration mode.
1950 ** TRUE to enter configuration mode, FALSE to exit.
1958 ** The SMC37c669 controller may be left in configuration mode.
1960 **--
1967 ** To enter configuration mode, two writes in succession to the index in SMC37c669_config_mode()
1968 ** port are required. If a write to another address or port occurs in SMC37c669_config_mode()
1970 ** mode. Therefore, a spinlock is placed around the two writes to in SMC37c669_config_mode()
1974 wb( &SMC37c669->index_port, SMC37c669_CONFIG_ON_KEY ); in SMC37c669_config_mode()
1975 wb( &SMC37c669->index_port, SMC37c669_CONFIG_ON_KEY ); in SMC37c669_config_mode()
1979 wb( &SMC37c669->index_port, SMC37c669_CONFIG_OFF_KEY ); in SMC37c669_config_mode()
1989 ** device is already in configuration mode.
2004 **--
2009 wb(&SMC37c669->index_port, index); in SMC37c669_read_config()
2010 return rb(&SMC37c669->data_port); in SMC37c669_read_config()
2019 ** device is already in configuration mode.
2037 **--
2043 wb( &SMC37c669->index_port, index ); in SMC37c669_write_config()
2044 wb( &SMC37c669->data_port, data ); in SMC37c669_write_config()
2055 ** mode.
2070 **--
2084 ** Get serial port 1 base address in SMC37c669_init_local_config()
2094 ** Store local configuration information for serial port 1 in SMC37c669_init_local_config()
2102 ** Get serial port 2 base address in SMC37c669_init_local_config()
2107 ** Store local configuration information for serial port 2 in SMC37c669_init_local_config()
2115 ** Get parallel port base address in SMC37c669_init_local_config()
2120 ** Get IRQs for parallel port and floppy controller in SMC37c669_init_local_config()
2125 ** Get DRQs for parallel port and floppy controller in SMC37c669_init_local_config()
2130 ** Store local configuration information for parallel port in SMC37c669_init_local_config()
2198 **--
2238 ** Returns the translated IRQ, otherwise, returns -1.
2244 **--
2248 int i, translated_irq = -1; in SMC37c669_xlate_irq()
2254 …for ( i = 0; ( SMC37c669_irq_table[i].device_irq != -1 ) || ( SMC37c669_irq_table[i].isa_irq != -1… in SMC37c669_xlate_irq()
2265 …for ( i = 0; ( SMC37c669_irq_table[i].isa_irq != -1 ) || ( SMC37c669_irq_table[i].device_irq != -1… in SMC37c669_xlate_irq()
2290 ** Returns the translated DMA channel, otherwise, returns -1
2296 **--
2300 int i, translated_drq = -1; in SMC37c669_xlate_drq()
2306 …for ( i = 0; ( SMC37c669_drq_table[i].device_drq != -1 ) || ( SMC37c669_drq_table[i].isa_drq != -1… in SMC37c669_xlate_drq()
2317 …for ( i = 0; ( SMC37c669_drq_table[i].isa_drq != -1 ) || ( SMC37c669_drq_table[i].device_drq != -1… in SMC37c669_xlate_drq()
2333 ip->dva = &smc_ddb;
2334 ip->attr = ATTR$M_WRITE | ATTR$M_READ;
2335 ip->len[0] = 0x30;
2336 ip->misc = 0;
2342 int __init smcc669_open( struct FILE *fp, char *info, char *next, char *mode )
2346 ** Allow multiple readers but only one writer. ip->misc keeps track
2349 ip = fp->ip;
2351 if ( fp->mode & ATTR$M_WRITE ) {
2352 if ( ip->misc ) {
2356 ip->misc++;
2361 *fp->offset = xtoi( info );
2371 ip = fp->ip;
2372 if ( fp->mode & ATTR$M_WRITE ) {
2374 ip->misc--;
2390 ip = fp->ip;
2396 if ( !inrange( *fp->offset, 0, ip->len[0] ) )
2398 *buf++ = SMC37c669_read_config( *fp->offset );
2399 *fp->offset += 1;
2415 ip = fp->ip;
2421 if ( !inrange( *fp->offset, 0, ip->len[0] ) )
2423 SMC37c669_write_config( *fp->offset, *buf );
2424 *fp->offset += 1;
2438 printk("-- CR%02x : %02x\n", i, SMC37c669_read_config(i)); in SMC37c669_dump_registers()
2442 * = SMC_init - SMC37c669 Super I/O controller initialization =
2485 -1 in SMC669_Init()
2494 -1 in SMC669_Init()