platform, pnp and mmc bus
Pierre Ossman
drzeus-list at drzeus.cx
Fri Jan 28 17:00:20 PST 2005
I'm trying to make the necessary additions to HAL to allow it to detect
mmc cards. This has proven to be a bit more work than I first thought.
Step 1:
The MMC cards reside on their own bus, so I need to add a new bus type.
Using the other bus handlers in hal this wasn't too difficult.
Step 2:
Devices too deep in the sysfs structure are expected to have a parent
already in the hal tree. This was not true for my mmc controller since
it is a lpc device. So it seemed I had to fix that into the tree first.
Studying the platform bus handler I found that it is hardcoded to only
accept floppy drives. A couple of if:s around critical sections and I
got it accepting all platform devices.
This got it fairly up and running. I got the controller in the tree and
mmc cards, including their block devices, were correctly detected.
Then I ran into some more problems. The driver can also be used in PNP
mode, which means it shows up in the pnp bus. So I guess there'll be a:
Step 3:
Create a pnp bus handler.
Now for the actual questions. So far I've just been playing around to
get my stuff working and it's a bit of a mess. Has anyone looked at
these problems and perhaps already has a plan for handling them?
Otherwise I could continue working on it and get a more clean version.
The pnp is also a problem. It doesn't really correspond to a physical
bus (platform doesn't really either, but it's closer at least). But pnp
devices are in every case I can think of, devices that belong on the
platform bus. So should the pnp bus be a seperate bus in hal or should
we try to group it with the platform bus?
Rgds
Pierre
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list