amd.c (db8c246937713e60b7628661ccc187eeb81f2bae) amd.c (116dffa0b543a2e560abd62a0b3207b1694f9ab9)
1/*
2 * Driver for AMD am79c PHYs
3 *
4 * Author: Heiko Schocher <hs@denx.de>
5 *
6 * Copyright (c) 2011 DENX Software Engineering GmbH
7 *
8 * This program is free software; you can redistribute it and/or modify it

--- 47 unchanged lines hidden (view full) ---

56 if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
57 err = phy_write(phydev, MII_AM79C_IR, MII_AM79C_IR_IMASK_INIT);
58 else
59 err = phy_write(phydev, MII_AM79C_IR, 0);
60
61 return err;
62}
63
1/*
2 * Driver for AMD am79c PHYs
3 *
4 * Author: Heiko Schocher <hs@denx.de>
5 *
6 * Copyright (c) 2011 DENX Software Engineering GmbH
7 *
8 * This program is free software; you can redistribute it and/or modify it

--- 47 unchanged lines hidden (view full) ---

56 if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
57 err = phy_write(phydev, MII_AM79C_IR, MII_AM79C_IR_IMASK_INIT);
58 else
59 err = phy_write(phydev, MII_AM79C_IR, 0);
60
61 return err;
62}
63
64static struct phy_driver am79c_driver = {
64static struct phy_driver am79c_driver[] = { {
65 .phy_id = PHY_ID_AM79C874,
66 .name = "AM79C874",
67 .phy_id_mask = 0xfffffff0,
68 .features = PHY_BASIC_FEATURES,
69 .flags = PHY_HAS_INTERRUPT,
70 .config_init = am79c_config_init,
71 .config_aneg = genphy_config_aneg,
72 .read_status = genphy_read_status,
73 .ack_interrupt = am79c_ack_interrupt,
74 .config_intr = am79c_config_intr,
75 .driver = { .owner = THIS_MODULE,},
65 .phy_id = PHY_ID_AM79C874,
66 .name = "AM79C874",
67 .phy_id_mask = 0xfffffff0,
68 .features = PHY_BASIC_FEATURES,
69 .flags = PHY_HAS_INTERRUPT,
70 .config_init = am79c_config_init,
71 .config_aneg = genphy_config_aneg,
72 .read_status = genphy_read_status,
73 .ack_interrupt = am79c_ack_interrupt,
74 .config_intr = am79c_config_intr,
75 .driver = { .owner = THIS_MODULE,},
76};
76} };
77
77
78static int __init am79c_init(void)
79{
80 return phy_driver_register(&am79c_driver);
81}
78module_phy_driver(am79c_driver);
82
79
83static void __exit am79c_exit(void)
84{
85 phy_driver_unregister(&am79c_driver);
86}
87
88module_init(am79c_init);
89module_exit(am79c_exit);
90
91static struct mdio_device_id __maybe_unused amd_tbl[] = {
92 { PHY_ID_AM79C874, 0xfffffff0 },
93 { }
94};
95
96MODULE_DEVICE_TABLE(mdio, amd_tbl);
80static struct mdio_device_id __maybe_unused amd_tbl[] = {
81 { PHY_ID_AM79C874, 0xfffffff0 },
82 { }
83};
84
85MODULE_DEVICE_TABLE(mdio, amd_tbl);