tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: specific platform check in driver match routine

On 06/10/13 12:12, Martin Husemann wrote:
On Mon, Jun 10, 2013 at 11:51:27AM +0200, Frank Kardel wrote:
platform. E.g. isa bus based GPIO registers there are present on a
Soekris net6501 only.
Often in such cases the pci bridges have specific PCI IDs that can be used
to positively identify the system. You can use pci_find_device() then.
Another option (if you can identify the device by other means earlier)
is to create device-properties on the parent device and have the match
function check those.

I believe the Atom E6xx LPC bridge is common to all Atoms of the class. So that does
not seem to help identifying the system.

An option would be to transfer the oem_id and product id from the mpbios_scan to the properties of the mainbus device (likewise dig out similar information from the APCI scan).

The dmesg starts like this:
NetBSD 6.99.21 (GATEWAY) #12: Sun Jun  9 17:29:45 CEST 2013
total memory = 2047 MB
avail memory = 1971 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
Generic PC
mainbus0 (root)
acpi_probe: failed to initialize tables
mainbus0: Intel MP Specification (Version 1.4) (Soekris  net6501 )
cpu0 at mainbus0 apid 0: Genuine Intel(R) CPU        @ 1.60GHz, id 0x20661
cpu1 at mainbus0 apid 1: Genuine Intel(R) CPU        @ 1.60GHz, id 0x20661
mpbios: bus 0 is type PCI
mpbios: bus 64 is type ISA
ioapic0 at mainbus0 apid 0: pa 0xfec00000, version 20, 24 pins
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 0x8086 product 0x4114 (rev. 0x05)
pchb1 at pci0 dev 1 function 0: vendor 0x8086 product 0x8183 (rev. 0x00)
ppb0 at pci0 dev 23 function 0: vendor 0x8086 product 0x8184 (rev. 0x00)
ppb0: PCI Express 1.0 <Root Port of PCI-E Root Complex> x1 @ 2.5Gb/s

The "Soekris" "net6501" is only present (and mapped) in mpbios_scan().

Would generally adding device properties to mainbus make sense/be useful for other things?


Home | Main Index | Thread Index | Old Index