14 #define DRIVER_NAME "airport"
15 #define PFX DRIVER_NAME ": "
17 #include <linux/module.h>
18 #include <linux/kernel.h>
25 #define AIRPORT_IO_LEN (0x1000)
46 err = orinoco_lock(priv, &flags);
54 orinoco_unlock(priv, &flags);
57 pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
58 macio_get_of_node(mdev), 0, 0);
64 airport_resume(
struct macio_dev *mdev)
74 pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
75 macio_get_of_node(mdev), 0, 1);
80 priv->
hw.ops->lock_irqsave(&priv->
lock, &flags);
82 priv->
hw.ops->unlock_irqrestore(&priv->
lock, &flags);
88 airport_detach(
struct macio_dev *mdev)
107 pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
108 macio_get_of_node(mdev), 0, 0);
111 macio_set_drvdata(mdev,
NULL);
133 pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
134 macio_get_of_node(card->
mdev), 0, 0);
136 pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
137 macio_get_of_node(card->
mdev), 0, 1);
155 if (macio_resource_count(mdev) < 1 || macio_irq_count(mdev) < 1) {
162 airport_hard_reset,
NULL);
178 macio_set_drvdata(mdev, priv);
181 card->
irq = macio_irq(mdev, 0);
182 phys_addr = macio_resource_start(mdev, 0);
193 pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE,
194 macio_get_of_node(mdev), 0, 1);
220 airport_detach(mdev);
240 static struct macio_driver airport_driver = {
244 .of_match_table = airport_match,
246 .probe = airport_attach,
247 .remove = airport_detach,
248 .suspend = airport_suspend,
249 .resume = airport_resume,