Skip to contentSkip to conversation

parisc-linux.org kernel

parisc-linux Joel Soete 2 participants 2 messages Apr 16, 2003

lore
Share & tools
lore

Joel Soete

author
#0 lore raw
Quoted 9 lines

-- Original Message --
Subject: Re: [parisc-linux] parisc-linux.org kernel
From: Alan Cox <[email protected]>
To: Joel Soete <[email protected]>
Cc: Grant Grundler <[email protected]>,
[email protected]
Date: 15 Apr 2003 16:54:32 +0100

Quoted 9 lines
Quoted 7 lines · Joel Soete
Quoted 1 line

ide_get_legacy(int n) [n=0/1] for interfaces.

And so I still have to add
#if defined(CONFIG_SUPERIO)
# define ide_get_legacy(x) superio_get_ide_irq()
#else
# define ide_get_legacy(x) ... (still have to find what)

well: clearer this morning, it would just have to become
# define ide_get_legacy((x)) (x)?15:14

Quoted 3 lines
Quoted 1 line

#endif

What do you need to know if the legacy irq is to come from superio.

If I well understand the question: nothing because superio_get_ide_irq() is defined in arch/parisc/kernel/superio.c as:
...
int
superio_get_ide_irq(void)

{
        if (sio_dev.irq_region)
                return sio_dev.irq_region->data.irqbase + IDE_IRQ;
        else
                return 0;
}

sio_dev being a global var:
...

static struct superio_device sio_dev = {
        iosapic_irq: -1
};

which is define in include/asm-parisc/superio.h as:
...

struct superio_device {
        u16 fdc_base;
        u16 sp1_base;
        u16 sp2_base;
        u16 pp_base;
        u16 acpi_base;
        int iosapic_irq;
        int iosapic_irq_enabled;
        struct irq_region *irq_region;
        struct pci_dev *lio_pdev;       /* pci device for legacy IO fn */
};

...

Quoted 1 line

Should be we be asking ide_get_legacy(struct pci_device *pdev) ?

IMHO it would be difficult this way; what do you thing?

Quoted 3 lines

I just want to understand this so I (or you) do it right

You have certainly more experience and a broader view (over different platform) than I (up to you)

Is this actually help?

Joel

---------------------------------
Vous surfez avec une ligne classique ? Economisez jusqu'à 25% avec Tiscali Complete ! Offre spéciale : première année d'abonnement offerte. ... Plus d'info sur http://complete.tiscali.be

#1 lore raw
Quoted 5 lines · Joel Soete

If I well understand the question: nothing because superio_get_ide_irq() is defined in arch/parisc/kernel/superio.c as:

Quoted 1 line

Should be we be asking ide_get_legacy(struct pci_device *pdev) ?

IMHO it would be difficult this way; what do you thing?

Ok so some people need to know the device, some the legacy (0/1) and some nothing at all. I guess I pass both 8)