linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] VIA8231 support for parallel port driver
@ 2004-10-27  5:35 Pavel Fedin
  2004-10-27  6:50 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Fedin @ 2004-10-27  5:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: luther

[-- Attachment #1: Type: text/plain, Size: 2524 bytes --]

 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

[-- Attachment #2: parport_pc-via8231.diff.gz --]
[-- Type: application/x-gzip, Size: 2711 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] VIA8231 support for parallel port driver
  2004-10-27  5:35 [PATCH] VIA8231 support for parallel port driver Pavel Fedin
@ 2004-10-27  6:50 ` Jeff Garzik
  2004-10-28  5:09   ` [PATCH] VIA8231 support for parallel port driver, rewritten Pavel Fedin
       [not found]   ` <20041027171758.7399d9db.akpm@osdl.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff Garzik @ 2004-10-27  6:50 UTC (permalink / raw)
  To: Pavel Fedin; +Cc: linux-kernel, luther

Can you consolidate it with the via 686 code?

Can you replace the magic numbers (0x3f0) with named constants?

	Jeff




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] VIA8231 support for parallel port driver, rewritten
  2004-10-27  6:50 ` Jeff Garzik
@ 2004-10-28  5:09   ` Pavel Fedin
       [not found]   ` <20041027171758.7399d9db.akpm@osdl.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Pavel Fedin @ 2004-10-28  5:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: luther

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

On Wed, 27 Oct 2004 02:50:16 -0400
Jeff Garzik <jgarzik@pobox.com> wrote:

> Can you consolidate it with the via 686 code?
> 
> Can you replace the magic numbers (0x3f0) with named constants?

 Here is the rewritten code. I've tested it on my Pegasos, it works. It also should work on 686a in the same manner, but i have no such an equipment.
 Functionality a little changed: you need to specify init_mode=ecp dma=auto arguments to enable DMA support because driver defaults to dma=none. All other things are the same as in previous version.

-- 
Best regards,
Pavel Fedin,									mailto:sonic_amiga@rambler.ru

[-- Attachment #2: parport_pc-via8231.diff.gz --]
[-- Type: application/x-gzip, Size: 4059 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] VIA8231 support for parallel port driver
       [not found]           ` <20041027231331.5b2b637d.akpm@osdl.org>
@ 2004-10-28  6:26             ` Pavel Fedin
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Fedin @ 2004-10-28  6:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, luther

[-- Attachment #1: Type: text/plain, Size: 348 bytes --]

On Wed, 27 Oct 2004 23:13:31 -0700
Andrew Morton <akpm@osdl.org> wrote:

> >   Too late, i already made new version as Jeff asked. Integrated with
> >  via686a code, duplicating parts removed.
> 
> You can simply edit the diff.

 Ok, here is edited version. Hope it's okay now.

-- 
Best regards,
Pavel Fedin,									mailto:sonic_amiga@rambler.ru

[-- Attachment #2: parport_pc-via8231.diff.gz --]
[-- Type: application/x-gzip, Size: 4066 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] VIA8231 support for parallel port driver
@ 2004-11-01  8:06 Pavel Fedin
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Fedin @ 2004-11-01  8:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: luther

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]

 Hello!
 Nobody replied so i thing message is lost again. I resend it.
 This is a rewritten version as Jeff asked (686a and 8231 code merged). Diff is mage against original 2.6.8 code.

-- 
Best regards,
Pavel Fedin,									mailto:sonic_amiga@rambler.ru

[-- Attachment #2: parport_pc-via8231.diff.gz --]
[-- Type: application/x-gzip, Size: 4066 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-01  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-27  5:35 [PATCH] VIA8231 support for parallel port driver Pavel Fedin
2004-10-27  6:50 ` Jeff Garzik
2004-10-28  5:09   ` [PATCH] VIA8231 support for parallel port driver, rewritten Pavel Fedin
     [not found]   ` <20041027171758.7399d9db.akpm@osdl.org>
     [not found]     ` <20041028093610.5a7e34b7.sonic_amiga@rambler.ru>
     [not found]       ` <20041027224530.464982fa.akpm@osdl.org>
     [not found]         ` <20041028100755.0158c2e6.sonic_amiga@rambler.ru>
     [not found]           ` <20041027231331.5b2b637d.akpm@osdl.org>
2004-10-28  6:26             ` [PATCH] VIA8231 support for parallel port driver Pavel Fedin
  -- strict thread matches above, loose matches on Subject: below --
2004-11-01  8:06 Pavel Fedin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).