2002-09-30 12:04:58

by Alan

[permalink] [raw]
Subject: Re: NatSemi SCx200 patches for Linux-2.5

On Mon, 2002-09-30 at 12:23, Christer Weinigel wrote:
> How can I guarantee that the driver scx200.c is initialized before any
> other drivers that use the scx200_gpio functions (e.g. scx200_i2c.c)?
> I have put scx200.c in in arch/i386/kernel in the hope that this
> directory will always be initialized before anything else, but is this
> really true?

There are two ways. For built in code you can use the link order to
force ordering. In 2.4 thats your only real choice. For modules you need
to ensure there is a dependancy so modprobe loads the supporting module
first

Alan

2002-09-30 12:34:10

by Christer Weinigel

[permalink] [raw]
Subject: Re: NatSemi SCx200 patches for Linux-2.5

Alan Cox <[email protected]> writes:

> On Mon, 2002-09-30 at 12:23, Christer Weinigel wrote:
> > How can I guarantee that the driver scx200.c is initialized before any
> > other drivers that use the scx200_gpio functions (e.g. scx200_i2c.c)?
> > I have put scx200.c in in arch/i386/kernel in the hope that this
> > directory will always be initialized before anything else, but is this
> > really true?
>
> There are two ways. For built in code you can use the link order to
> force ordering. In 2.4 thats your only real choice. For modules you need
> to ensure there is a dependancy so modprobe loads the supporting module
> first

I'll just assume that it works then. With the current link order in
2.5 it works when compiled into the kernel and for the module case
there is an explicit dependency.

Now I just have to merge back a few things to the 2.4 code; I found a
few uglies and want to see if the link order trick works with 2.4.

/Christer

--
"Just how much can I get away with and still go to heaven?"

Freelance consultant specializing in device driver programming for Linux
Christer Weinigel <[email protected]> http://www.weinigel.se

2002-09-30 13:04:50

by Alan

[permalink] [raw]
Subject: Re: NatSemi SCx200 patches for Linux-2.5

> Now I just have to merge back a few things to the 2.4 code; I found a
> few uglies and want to see if the link order trick works with 2.4.

2.4 relies on it. Even IDE requires the trick works