diff options
author | David Woodhouse <dwmw2@infradead.org> | 2010-04-01 21:05:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-02 17:30:39 -0400 |
commit | 8626d3b4328061f5b82b11ae1d6918a0c3602f42 (patch) | |
tree | be2b509a0d47903ff2ac1d10255a760ade82daca /include/linux/mod_devicetable.h | |
parent | 9092c658bab215b2752fa59d2a36c05b74d1e9e9 (diff) |
phylib: Support phy module autoloading
We don't use the normal hotplug mechanism because it doesn't work. It will
load the module some time after the device appears, but that's not good
enough for us -- we need the driver loaded _immediately_ because otherwise
the NIC driver may just abort and then the phy 'device' goes away.
[bwh: s/phy/mdio/ in module alias, kerneldoc for struct mdio_device_id]
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mod_devicetable.h')
-rw-r--r-- | include/linux/mod_devicetable.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index f58e9d836f32..55f1f9c9506c 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -474,4 +474,30 @@ struct platform_device_id { | |||
474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
475 | }; | 475 | }; |
476 | 476 | ||
477 | #define MDIO_MODULE_PREFIX "mdio:" | ||
478 | |||
479 | #define MDIO_ID_FMT "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" | ||
480 | #define MDIO_ID_ARGS(_id) \ | ||
481 | (_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \ | ||
482 | ((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \ | ||
483 | ((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \ | ||
484 | ((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \ | ||
485 | ((_id)>>15) & 1, ((_id)>>14) & 1, ((_id)>>13) & 1, ((_id)>>12) & 1, \ | ||
486 | ((_id)>>11) & 1, ((_id)>>10) & 1, ((_id)>>9) & 1, ((_id)>>8) & 1, \ | ||
487 | ((_id)>>7) & 1, ((_id)>>6) & 1, ((_id)>>5) & 1, ((_id)>>4) & 1, \ | ||
488 | ((_id)>>3) & 1, ((_id)>>2) & 1, ((_id)>>1) & 1, (_id) & 1 | ||
489 | |||
490 | /** | ||
491 | * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus | ||
492 | * @phy_id: The result of | ||
493 | * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&PHYSID2)) & @phy_id_mask | ||
494 | * for this PHY type | ||
495 | * @phy_id_mask: Defines the significant bits of @phy_id. A value of 0 | ||
496 | * is used to terminate an array of struct mdio_device_id. | ||
497 | */ | ||
498 | struct mdio_device_id { | ||
499 | __u32 phy_id; | ||
500 | __u32 phy_id_mask; | ||
501 | }; | ||
502 | |||
477 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 503 | #endif /* LINUX_MOD_DEVICETABLE_H */ |