[coreboot] Superiotool to devicetree.cb

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue Sep 29 19:54:40 CEST 2009


On 29.09.2009 19:47, Crankyadmin wrote:
> Hi,
>
> Below is my output of superiotool. Lets use the floppy as a example.
>
> Found Winbond W83627EHF/EF/EHG/EG (id=0x88, rev=0x63) at 0x2e
> Register dump:
> idx 20 21 22 23 24 25 26 27  28 29 2a 2b 2c 2d 2e 2f
> val 88 63 ff 00 80 00 00 ff  50 04 00 00 00 21 00 ff
> def 88 MM ff 00 MM 00 MM RR  50 04 00 RR 00 21 00 00
> LDN 0x00 (Floppy)
> idx 30 60 61 70 74 f0 f1 f2  f4 f5
> val 00 00 00 06 02 8e 00 ff  00 00
> def 01 03 f0 06 02 8e 00 ff  00 00
>   

The dump above has a line with "val" (the current value) and "def" (the
default). Anything which is not the default needs to be set manually to
get the configuration you have now. Please note that not all settings
have to be preserved, we suggest you look the differences up in the
datasheet and decide which ones to ignore.

> How does this turn into this:
>
> devicetree.cb
> ----->snip<-----
> device pnp 2e.0 on #floppy
>  io 0x60 = 0x3f0
>  irq 0x70 = 6
>  drq 0x74 = 2
> end
> ----->snip<-----
>   

Short summary:
io sets a two-byte value (e.g. idx 60+61)
irq and drq set one-byte values.
The driver for that chip decides where to write these values.

However, all of this interacts with the device tree, so you'd better be
careful when moving settings.

> BTW the way these to sets of information are unlikely to match, what
> I'm trying to collate is how do you get them to match. Any hints would
> be appreciated
>   

The best way would be to move the dts feature from v3 to v2. It is a lot
easier to understand and it has way more expressiveness and can actually
cover non-io and non-irq settings easily.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the coreboot mailing list