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
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<-----
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
Regards
Dave
On Tue, Sep 29, 2009 at 11:47 AM, Crankyadmin root@crankyadmin.net 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
How does this turn into this:
devicetree.cb ----->snip<----- device pnp 2e.0 on #floppy io 0x60 = 0x3f0
idx 60 & 61 (since it is io) the default is 03 f0 = 0x3f0. In your output it is set to 0 (val)
irq 0x70 = 6
idx 70 val & default = 6 in this case
drq 0x74 = 2
idx 74 val & default = 2
Short answer, look at the columns.
HTH, Myles
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
Carl-Daniel Hailfinger wrote:
The best way would be to move the dts feature from v3 to v2.
Maybe. Another possibility would be to simply change the current syntax:
io@0x60 = 0x3f0 irq@0x70 = 6 dma@0x74 = 2 # note dma not drq
I'm even tempted to not have the address in the mainboard spec. The component driver should know where to program IO, IRQ and DMA.
It is a lot easier to understand and it has way more expressiveness and can actually cover non-io and non-irq settings easily.
The latter argument could be a strong motivation for bringing dts into v2. I know I liked it, but we'll start with getting Kconfig right.
//Peter
Hi,
On Tue, Sep 29, 2009 at 06:47:26PM +0100, Crankyadmin wrote:
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
^^^^ Super I/O config register is 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)
^^^^ logical device number 0 (== 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
^^^^^ ^^ ^^ 0x3f0 6 2
How does this turn into this:
devicetree.cb ----->snip<----- device pnp 2e.0 on #floppy
^^^^ This is the config port (without "0x"), then a dot, then the LDN
io 0x60 = 0x3f0
I/O base, in register 0x60 of the Superio LDN 0 (in this case), 16 bit in size, thus it's in 0x60 and 0x61.
irq 0x70 = 6
The IRQ is in register 0x70, value is 6, see above
drq 0x74 = 2
Similar here.
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
You have to read the superio datasheet to get the correct existing LDNs and their registers/values etc. superiotool -d helps, but reading the respective datasheet is required of course, to make sure everything's OK.
Uwe.