2005-09-14 20:14:21

by Alexey Dobriyan

[permalink] [raw]
Subject: [PATCH] Remove drivers/parport/parport_arc.c

From: Domen Puncer <[email protected]>

Remove nowhere referenced file (grep "parport_arc\." didn't find anything).

Signed-off-by: Domen Puncer <[email protected]>
Signed-off-by: Alexey Dobriyan <[email protected]>
---

drivers/parport/parport_arc.c | 139 ------------------------------------------
1 files changed, 139 deletions(-)

--- a/drivers/parport/parport_arc.c 2005-09-14 19:05:25.000000000 +0400
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,139 +0,0 @@
-/* Low-level parallel port routines for Archimedes onboard hardware
- *
- * Author: Phil Blundell <[email protected]>
- */
-
-/* This driver is for the parallel port hardware found on Acorn's old
- * range of Archimedes machines. The A5000 and newer systems have PC-style
- * I/O hardware and should use the parport_pc driver instead.
- *
- * The Acorn printer port hardware is very simple. There is a single 8-bit
- * write-only latch for the data port and control/status bits are handled
- * with various auxilliary input and output lines. The port is not
- * bidirectional, does not support any modes other than SPP, and has only
- * a subset of the standard printer control lines connected.
- */
-
-#include <linux/threads.h>
-#include <linux/delay.h>
-#include <linux/errno.h>
-#include <linux/interrupt.h>
-#include <linux/ioport.h>
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/parport.h>
-
-#include <asm/ptrace.h>
-#include <asm/io.h>
-#include <asm/arch/oldlatches.h>
-#include <asm/arch/irqs.h>
-
-#define DATA_ADDRESS 0x3350010
-
-/* This is equivalent to the above and only used for request_region. */
-#define PORT_BASE 0x80000000 | ((DATA_ADDRESS - IO_BASE) >> 2)
-
-/* The hardware can't read from the data latch, so we must use a soft
- copy. */
-static unsigned char data_copy;
-
-/* These are pretty simple. We know the irq is never shared and the
- kernel does all the magic that's required. */
-static void arc_enable_irq(struct parport *p)
-{
- enable_irq(p->irq);
-}
-
-static void arc_disable_irq(struct parport *p)
-{
- disable_irq(p->irq);
-}
-
-static void arc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
- parport_generic_irq(irq, (struct parport *) dev_id, regs);
-}
-
-static void arc_write_data(struct parport *p, unsigned char data)
-{
- data_copy = data;
- outb_t(data, DATA_LATCH);
-}
-
-static unsigned char arc_read_data(struct parport *p)
-{
- return data_copy;
-}
-
-static struct parport_operations parport_arc_ops =
-{
- .write_data = arc_write_data,
- .read_data = arc_read_data,
-
- .write_control = arc_write_control,
- .read_control = arc_read_control,
- .frob_control = arc_frob_control,
-
- .read_status = arc_read_status,
-
- .enable_irq = arc_enable_irq,
- .disable_irq = arc_disable_irq,
-
- .data_forward = arc_data_forward,
- .data_reverse = arc_data_reverse,
-
- .init_state = arc_init_state,
- .save_state = arc_save_state,
- .restore_state = arc_restore_state,
-
- .epp_write_data = parport_ieee1284_epp_write_data,
- .epp_read_data = parport_ieee1284_epp_read_data,
- .epp_write_addr = parport_ieee1284_epp_write_addr,
- .epp_read_addr = parport_ieee1284_epp_read_addr,
-
- .ecp_write_data = parport_ieee1284_ecp_write_data,
- .ecp_read_data = parport_ieee1284_ecp_read_data,
- .ecp_write_addr = parport_ieee1284_ecp_write_addr,
-
- .compat_write_data = parport_ieee1284_write_compat,
- .nibble_read_data = parport_ieee1284_read_nibble,
- .byte_read_data = parport_ieee1284_read_byte,
-
- .owner = THIS_MODULE,
-};
-
-/* --- Initialisation code -------------------------------- */
-
-static int parport_arc_init(void)
-{
- /* Archimedes hardware provides only one port, at a fixed address */
- struct parport *p;
- struct resource res;
- char *fake_name = "parport probe");
-
- res = request_region(PORT_BASE, 1, fake_name);
- if (res == NULL)
- return 0;
-
- p = parport_register_port (PORT_BASE, IRQ_PRINTERACK,
- PARPORT_DMA_NONE, &parport_arc_ops);
-
- if (!p) {
- release_region(PORT_BASE, 1);
- return 0;
- }
-
- p->modes = PARPORT_MODE_ARCSPP;
- p->size = 1;
- rename_region(res, p->name);
-
- printk(KERN_INFO "%s: Archimedes on-board port, using irq %d\n",
- p->irq);
-
- /* Tell the high-level drivers about the port. */
- parport_announce_port (p);
-
- return 1;
-}
-
-module_init(parport_arc_init)


2005-09-14 21:08:49

by Russell King

[permalink] [raw]
Subject: Re: [PATCH] Remove drivers/parport/parport_arc.c

On Thu, Sep 15, 2005 at 12:24:20AM +0400, Alexey Dobriyan wrote:
> From: Domen Puncer <[email protected]>
>
> Remove nowhere referenced file (grep "parport_arc\." didn't find anything).

Maybe Ian Molton might like to ensure that this is linked in to the
build.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2005-09-14 21:17:05

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] Remove drivers/parport/parport_arc.c

Russell King <[email protected]> wrote:
>
> On Thu, Sep 15, 2005 at 12:24:20AM +0400, Alexey Dobriyan wrote:
> > From: Domen Puncer <[email protected]>
> >
> > Remove nowhere referenced file (grep "parport_arc\." didn't find anything).
>
> Maybe Ian Molton might like to ensure that this is linked in to the
> build.
>

Yeah, except it's also unused in 2.4 and includes non-existent header
files. Probably it's an ex-parrot but it'd be worth an attempt to get it
to compile before we remove it.

2005-09-14 21:29:45

by Russell King

[permalink] [raw]
Subject: Re: [PATCH] Remove drivers/parport/parport_arc.c

On Wed, Sep 14, 2005 at 02:16:31PM -0700, Andrew Morton wrote:
> Russell King <[email protected]> wrote:
> >
> > On Thu, Sep 15, 2005 at 12:24:20AM +0400, Alexey Dobriyan wrote:
> > > From: Domen Puncer <[email protected]>
> > >
> > > Remove nowhere referenced file (grep "parport_arc\." didn't find anything).
> >
> > Maybe Ian Molton might like to ensure that this is linked in to the
> > build.
> >
>
> Yeah, except it's also unused in 2.4 and includes non-existent header
> files. Probably it's an ex-parrot but it'd be worth an attempt to get
> it to compile before we remove it.

True - I never had a machine which parport_arc was used on, so it
existed from the time when parport was initially written and remained
in that rather sad state. The only person I know who may have tinkered
with it would be Dave Gilbert.

However, it's now within the set of machines which Ian looks after, so
Ian should at least know of its impending demise.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core

2005-09-14 21:43:00

by Ian molton

[permalink] [raw]
Subject: Re: [PATCH] Remove drivers/parport/parport_arc.c

Andrew Morton wrote:
> Russell King <[email protected]> wrote:
>
>>On Thu, Sep 15, 2005 at 12:24:20AM +0400, Alexey Dobriyan wrote:
>>
>>>From: Domen Puncer <[email protected]>
>>>
>>>Remove nowhere referenced file (grep "parport_arc\." didn't find anything).
>>
>>Maybe Ian Molton might like to ensure that this is linked in to the
>>build.
>
> Yeah, except it's also unused in 2.4 and includes non-existent header
> files. Probably it's an ex-parrot but it'd be worth an attempt to get it
> to compile before we remove it.

Well unless the parport stuff changed to support ports where one cant
read the data latch, its still needed. It is true this hasnt ever
*worked* although the code looks ok (with the exception of the ECP/EPP
stuff thats in there).

I'll see if I can find some time for a bit of arm26 TLC once I've move
house (could be 6 months though) as I'll actually have enough space to
get the machine out of its packing box again...

2005-09-14 22:24:36

by Phil Blundell

[permalink] [raw]
Subject: Re: [PATCH] Remove drivers/parport/parport_arc.c

On Wed, 2005-09-14 at 22:42 +0100, Ian Molton wrote:
> Well unless the parport stuff changed to support ports where one cant
> read the data latch, its still needed.

I'm not sure I understand what you mean by that. Can you explain what
sort of potential changes to the "parport stuff" you were thinking of?

p.