From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261651AbUJ0Fif (ORCPT ); Wed, 27 Oct 2004 01:38:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261652AbUJ0Fic (ORCPT ); Wed, 27 Oct 2004 01:38:32 -0400 Received: from mxc.rambler.ru ([81.19.66.31]:57609 "EHLO mxc.rambler.ru") by vger.kernel.org with ESMTP id S261651AbUJ0FiX (ORCPT ); Wed, 27 Oct 2004 01:38:23 -0400 Date: Wed, 27 Oct 2004 09:35:29 +0400 From: Pavel Fedin To: linux-kernel@vger.kernel.org Cc: luther@debian.org Subject: [PATCH] VIA8231 support for parallel port driver Message-Id: <20041027093529.15ff1a31.sonic_amiga@rambler.ru> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Wed__27_Oct_2004_09_35_29_+0400_K=O=7XCI59KiQ_1H" X-Auth-User: sonic_amiga, whoson: (null) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --Multipart=_Wed__27_Oct_2004_09_35_29_+0400_K=O=7XCI59KiQ_1H Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello, all! I already posted this patch but got no reply. Pribably it was missed by appropriate people so i try again. First let me introduce myself. I live in Moscow and own Pegasos-II PowerPC-based computer from Genesi (www.pegasosppc.com). I wrote a patch for parallel port driver in 2.6.8 kernel to handle VIA8231 southbridge used in this machine and i'd like to offer the patch for including into future kernels. 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. -- Best regards, Pavel Fedin, mailto:sonic_amiga@rambler.ru --Multipart=_Wed__27_Oct_2004_09_35_29_+0400_K=O=7XCI59KiQ_1H Content-Type: application/x-gzip; name="parport_pc-via8231.diff.gz" Content-Disposition: attachment; filename="parport_pc-via8231.diff.gz" Content-Transfer-Encoding: base64 H4sICFfvY0EAA3BhcnBvcnRfcGMtdmlhODIzMS5kaWZmAO1ae3PaSBL/Gz5Fh604YIQtCTAY26kQ jPdcl9ic7Tyuci6VkAY8FZC0GuHEleS7X/fMCCTAr7tU3W7OrgSJmZ6efv6mhbpWq8Fh6M2mLEjc hIfB9mcWB2xSi9zYnbKExWIr+ZpshTEfF2zTbNTMds1qgLnbqbc7lrVlpn9QNRumWaxWqw9hqHhZ Zs3cActCRp1GfYXXq1dQa+02jR2o0sVqwqtXRSjQ3wC5TSZsAlEYJwLcmIErBB8HzAceQHLFNGEY +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