SSB bus driver documentation?

Rafał Miłecki zajec5 at gmail.com
Tue Mar 8 06:01:04 EST 2011


OK, today that ssb code makes more sense to me, thanks for help.


I'd like to ask few more questions:
1) In case of PCI host we have b43_pci_bridge that loads ssb. What
about other hosts? I don't see any IDs table in sdio.c or pcmcia.c.
2) Could you say a word more about pcihost_wrapper? What is this for?
I can see we use that in pci bridge. What we can't call
ssb_bus_pcibus_register directly?
3) What is embedded.c?


I've also few comments to analyzed code. Could you check them, say if
it's OK/worth fixing that?

1) main.c::ssb_modinit
Hacks for bridge and gige (both being not modules) are not documented.
New developer have no idea why we call b43_pci_ssb_bridge_init and
ssb_gige_init. Tracking that calls lead to even more confusion.

2) ssb.h::ssb_bustype
SSB_BUSTYPE_SSB,
SSB_BUSTYPE_PCI,
SSB_BUSTYPE_PCMCIA,
SSB_BUSTYPE_SDIO,
I think first define is confusing. Is sounds like SSB being host for
SSB, or whatever... I think it should be sth like SSB_BUSTYPE_SYSTEM,
SSB_BUSTYPE_NONE, SSB_BUSTYPE_NATIVE, SSB_BUSTYPE_EMBEDDED, or sth.

3) main.c::ssb_ssb_ops
We keep all host-specific ops in separated files, but not in this
case. OK, it makes some sense as this one is not for host, but I think
it makes main.c more complicated and we can not compile SSB without
it. I think we could build every PC kernel without this, right?

4) scan.c::scan_switchcore
Why we don't have ops->switchcore? We could get rid of that switch
with simple pointer.

5) scan.c::scan_read32
I'm not sure about this yet... but do we need that here? Shouldn't
scan.c focus on just scanning? It's just one another "offset +=
current_coreidx * SSB_CORE_SIZE;" calculation.


I criticized scan.c::scan_read32, but could you say why do we need
that specific read at all? Why can't we use some ops->read32? I can
see sdio.c have some additional masking and is claims host, but didn't
analyze that yet.


-- 
Rafał



More information about the b43-dev mailing list