1 Parport 2 +++++++ 3 4 The ``parport`` code provides parallel-port su 5 includes the ability to share one port between 6 drivers. 7 8 You can pass parameters to the ``parport`` cod 9 detection of your hardware. This is particula 10 to use IRQs, since in general these can't be a 11 By default IRQs are not used even if they **ca 12 because there are a lot of people using the sa 13 parallel port and a sound card or network card 14 15 The ``parport`` code is split into two parts: 16 port-sharing) and architecture-dependent (whic 17 using the port). 18 19 20 Parport as modules 21 ================== 22 23 If you load the `parport`` code as a module, s 24 25 # insmod parport 26 27 to load the generic ``parport`` code. You the 28 architecture-dependent code with (for example) 29 30 # insmod parport_pc io=0x3bc,0x378,0x2 31 32 to tell the ``parport`` code that you want thr 33 0x3bc with no IRQ, one at 0x378 using IRQ 7, a 34 auto-detected IRQ. Currently, PC-style (``par 35 Amiga, Atari, and MFC3 hardware is supported. 36 37 PCI parallel I/O card support comes from ``par 38 addresses should not be specified for supporte 39 are automatically detected. 40 41 42 modprobe 43 -------- 44 45 If you use modprobe , you will find it useful 46 configuration file in /etc/modprobe.d/ directo 47 48 alias parport_lowlevel parport_pc 49 options parport_pc io=0x378,0x278 irq= 50 51 modprobe will load ``parport_pc`` (with the op 52 whenever a parallel port device driver (such a 53 54 Note that these are example lines only! You s 55 to specify any options to ``parport_pc`` in or 56 parallel port. 57 58 59 Parport probe [optional] 60 ------------------------ 61 62 In 2.2 kernels there was a module called ``par 63 for collecting IEEE 1284 device ID information 64 enhanced and now lives with the IEEE 1284 supp 65 port is detected, the devices that are connect 66 and information is logged like this:: 67 68 parport0: Printer, BJC-210 (Canon) 69 70 The probe information is available from files 71 72 73 Parport linked into the kernel statically 74 ========================================= 75 76 If you compile the ``parport`` code into the k 77 kernel boot parameters to get the same effect. 78 following to your LILO command line:: 79 80 parport=0x3bc parport=0x378,7 parport= 81 82 You can have many ``parport=...`` statements, 83 to add. Adding ``parport=0`` to the kernel co 84 parport support entirely. Adding ``parport=au 85 command-line will make ``parport`` use any IRQ 86 it auto-detects. 87 88 89 Files in /proc 90 ============== 91 92 If you have configured the ``/proc`` filesyste 93 see a new directory entry: ``/proc/sys/dev/par 94 directory entry for each parallel port for whi 95 configured. In each of those directories are 96 describing that parallel port. 97 98 The ``/proc/sys/dev/parport`` directory tree l 99 100 parport 101 |-- default 102 | |-- spintime 103 | `-- timeslice 104 |-- parport0 105 | |-- autoprobe 106 | |-- autoprobe0 107 | |-- autoprobe1 108 | |-- autoprobe2 109 | |-- autoprobe3 110 | |-- devices 111 | | |-- active 112 | | `-- lp 113 | | `-- timeslice 114 | |-- base-addr 115 | |-- irq 116 | |-- dma 117 | |-- modes 118 | `-- spintime 119 `-- parport1 120 |-- autoprobe 121 |-- autoprobe0 122 |-- autoprobe1 123 |-- autoprobe2 124 |-- autoprobe3 125 |-- devices 126 | |-- active 127 | `-- ppa 128 | `-- timeslice 129 |-- base-addr 130 |-- irq 131 |-- dma 132 |-- modes 133 `-- spintime 134 135 .. tabularcolumns:: |p{4.0cm}|p{13.5cm}| 136 137 ======================= ====================== 138 File Contents 139 ======================= ====================== 140 ``devices/active`` A list of the device d 141 will appear by the nam 142 the port (it might not 143 string "none" means th 144 using that port. 145 146 ``base-addr`` Parallel port's base a 147 has more than one in w 148 with tabs. These valu 149 meaning for some ports 150 151 ``irq`` Parallel port's IRQ, o 152 153 ``dma`` Parallel port's DMA ch 154 used. 155 156 ``modes`` Parallel port's hardwa 157 meaning: 158 159 - PCSPP 160 PC-style SPP r 161 162 - TRISTATE 163 Port is bidire 164 165 - COMPAT 166 Hardware accel 167 available and 168 169 - EPP 170 Hardware accel 171 is available a 172 173 - ECP 174 Hardware accel 175 is available a 176 177 - DMA 178 DMA is availab 179 180 Note that the current 181 advantage of COMPAT an 182 line to use. 183 184 ``autoprobe`` Any IEEE-1284 device I 185 acquired from the (non 186 187 ``autoprobe[0-3]`` IEEE 1284 device ID in 188 daisy-chain devices th 189 190 ``spintime`` The number of microsec 191 for the peripheral to 192 adjusting this improve 193 peripherals. This is 194 applies to all devices 195 196 ``timeslice`` The number of millisec 197 allowed to keep a port 198 and driver can ignore 199 200 ``default/*`` The defaults for spint 201 port is registered, it 202 When a new device is r 203 default timeslice. 204 ======================= ====================== 205 206 Device drivers 207 ============== 208 209 Once the parport code is initialised, you can 210 specific ports. Normally this happens automat 211 is loaded it will create one lp device for eac 212 override this, though, by using parameters eit 213 driver:: 214 215 # insmod lp parport=0,2 216 217 or on the LILO command line:: 218 219 lp=parport0 lp=parport2 220 221 Both the above examples would inform lp that y 222 the first parallel port, and /dev/lp1 to be th 223 with no lp device associated with the second p 224 that this is different to the way older kernel 225 be a static association between the I/O port a 226 name, so ``/dev/lp0`` was always the port at 0 227 case - if you only have one port, it will defa 228 regardless of base address. 229 230 Also: 231 232 * If you selected the IEEE 1284 support at co 233 ``lp=auto`` on the kernel command line, and 234 only for those ports that seem to have prin 235 236 * If you give PLIP the ``timid`` parameter, e 237 the command line, or with ``insmod plip tim 238 it will avoid any ports that seem to be in 239 240 * IRQ autoprobing works only for a few port t 241 242 Reporting printer problems with parport 243 ======================================= 244 245 If you are having problems printing, please go 246 try to narrow down where the problem area is. 247 248 When reporting problems with parport, really y 249 the messages that ``parport_pc`` spits out whe 250 several code paths: 251 252 - polling 253 - interrupt-driven, protocol in software 254 - interrupt-driven, protocol in hardware using 255 - interrupt-driven, protocol in hardware using 256 257 The kernel messages that ``parport_pc`` logs g 258 code path is being used. (They could be a lot 259 260 For normal printer protocol, having IEEE 1284 261 should not make a difference. 262 263 To turn off the 'protocol in hardware' code pa 264 ``CONFIG_PARPORT_PC_FIFO``. Note that when th 265 necessarily **used**; it depends on whether th 266 enabled by the BIOS, and detected by the drive 267 268 So, to start with, disable ``CONFIG_PARPORT_PC 269 with ``irq=none``. See if printing works then. 270 because this is the simplest code path. 271 272 If that works fine, try with ``io=0x378 irq=7` 273 hardware), to make it use interrupt-driven in- 274 275 If **that** works fine, then one of the hardwa 276 right. Enable ``CONFIG_FIFO`` (no, it isn't a 277 and yes, it should be), set the port to ECP mo 278 the DMA channel, and try with:: 279 280 io=0x378 irq=7 dma=none (for PIO) 281 io=0x378 irq=7 dma=3 (for DMA) 282 283 ---------- 284 285 philb@gnu.org 286 tim@cyberelk.net
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.