Re: New resources - pls, explain :-(

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Fri, 6 Aug 1999 15:47:38 +0200 (CEST)


On Fri, 6 Aug 1999, Martin Mares wrote:
> > How does a device know the region is not in use, if the generic PCI code takes
> > care of that?
>
> Is there any reason for devices knowing that about regions?

Offb gets a pointer to a frame buffer from the Open Firmware device tree and
must use that only if the region is not already in use by a real device driver.

> I think that allocation of whole PCI devices (see pci_request_device()
> in my PCI patch posted on yesterday evening) should be enough.

Isn't it possible to have separate functionalities in the different resources
of one PCI device? Or are all PCI devices that cleanly designed they always use
the multifunction feature to separate different functionalities?

For Zorro devices, it's quite common to put different functionalities in one
resource. E.g. my Ariadne has Ethernet and 2 parallel ports in one 64 KB
resource:

struct AriadneBoard {
u_char Pad1[0x360];
struct Am79C960 Lance;
u_char Pad2[0xc88];
struct MC68230 PiT;
u_char Pad3[0x2fc0];
volatile u_short BootPROM[0x2000]; /* I guess it's here :-) */
volatile u_short RAM[0x4000]; /* Always access WORDs!! */
};

I wrote zorro_config_board(), which takes a `part' number, to mark a specific
functionality of a board in-use. That way zorro_find() can find a board for
which e.g. the Ethernet functionality is not yet in-use.

Hmm, and I thought the new resource system would allow me to get rid of
zorro_config_board()...

Greetings,

Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/