• Pavel Fedin's avatar
    [PATCH] VIA8231 support for parallel port driver · 1eccda34
    Pavel Fedin authored
    This patch allows the kernel to configure port's mode without help of BIOS.
     It is needed on my machine because its firmware simply ignores the
    parallel port leaving in unidirectional SPP mode.
    
    Notes on usage:
    
    To configure the port you need to:
    
    - if parport_pc driver is compiled as a module: specify parport_pc
      init_mode=[spp|ps2|epp|ecp|ecpepp] in /etc/modules file (for Debian
      Linux).
    
    - if the driver is linked statically with the kernel: specify
      parport_init_mode=[spp|ps2|epp|ecp|ecpepp] in kernel's arguments.
    
    This patch is intended for use primarily on Pegasos machines but it will
    work on any computer with VIA8231 south bridge.  In this case it will
    override BIOS setting if you tell the driver to configure the port.  BIOS
    setting will be honored if you omit init_mode parameter.  Technical
    details:
    
    1.  On Pegasos standard port settings (set by OpenFirmware) are: IRQ=7,
        DMA=3, base address=0x3BC, mode is unidirectional SPP.
    
    2.  The patch changes only port mode, all other settings are preserved.
         So if you have a PC with VIA8231 and use driver to configure the port
        you'll still be able to change IRQ, DMA and base address in BIOS and
        these settings will be kept.
    
    3.  One exclusion: if you tell the driver to turn on EPP mode (specify
        epp or ecpepp value) and if default base address is 0x3BC (this is the
        case on Pegasos) the port will be moved to 0x378.  EPP port can't have
        0x3BC as the base.
    
    Known problems:
    
    1.  ECP+EPP mode is strange, it doesn't work even on several PC's i
        tested with Linux.  ECP mode is detected and EPP is not.  So if you get
        the same thing, it's not my fault.  I just have no time to deal with
        it, current result is enough for me.
    
    2.  Not all devices work on Pegasos, i tried my Genuis-HR6 parallel
        port scanner and parallel ZIP drive and both of them don't work.  ZIP
        drive is detected properly but then suddenly gets offline.  Scanner
        does not answer any command at all.  Without the patch the same thing
        happens.  Obviously Pegasos has some more problems which are not
        discovered and not fixed yet.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    1eccda34
via.h 893 Bytes