ARM: pcm043 micrell ksz8041nl phy support
PATCH 1/1 ARM: pcm043 micrell ksz8041nl phy support
Hi
This patch add the missing support for the phy used on the phytec pcm043 boards. Please consider for mainline. Tested on pcm043 hardware.
Best regards
Tim
--- drivers/net/fec.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-)
drivers/net/fec.c +39 -0
@@ -1128,6 +1128,44 @@ static phy_info_t phy_info_dp83848= { }, }; + +/* ------------------------------------------------------------------------- */ +/* support for the micrell ksz8041nl */ +#define MII_KSZ8041NL_ICSR 0x1b +#define MII_KSZ8041NL_CTL1 0x1e +static phy_cmd_t const phy_cmd_ksz8041nl_config[] = { + {mk_mii_read (MII_REG_CR ), mii_parse_cr }, + {mk_mii_read (MII_REG_ANAR ), mii_parse_anar }, + { mk_mii_end, } +}; +static phy_cmd_t const phy_cmd_ksz8041nl_startup[] = { + {mk_mii_write (MII_KSZ8041NL_ICSR ,0xff00 ),NULL }, + {mk_mii_write (MII_KSZ8041NL_CTL1 ,0x4000 ),NULL }, + {mk_mii_write (MII_REG_CR ,0x1200 ),NULL },/* autonegotiate */ + {mk_mii_read (MII_REG_SR ), mii_parse_sr }, + { mk_mii_end, } +}; +static phy_cmd_t const phy_cmd_ksz8041nl_ack_int[] = { +/* find out the current status */ + {mk_mii_read (MII_REG_SR ), mii_parse_sr }, +/* we only need to read ISR to acknowledge */ + {mk_mii_read (MII_KSZ8041NL_ICSR ),NULL }, + { mk_mii_end, } +}; +static phy_cmd_t const phy_cmd_ksz8041nl_shutdown[] = {/* disable interrupts */ + {mk_mii_write (MII_KSZ8041NL_ICSR ,0x0000 ),NULL }, + { mk_mii_end, } +}; + +static phy_info_t phy_info_ksz8041nl = { +0x0022151 , +"KSZ8041NL" , + .config = phy_cmd_ksz8041nl_config, + .startup = phy_cmd_ksz8041nl_startup, + .ack_int = phy_cmd_ksz8041nl_ack_int, + .shutdown = phy_cmd_ksz8041nl_shutdown, +}; +/* ------------------------------------------------------------------------- */ static phy_info_t const *const phy_info[] = {
@@ -1137,6 +1175,7 @@ static phy_info_t const * const phy_info[] = { &phy_info_am79c874, &phy_info_ks8721bl, &phy_info_dp83848, + &phy_info_ksz8041nl, NULL };
Signature · 1 line
1.7.0.4
PATCH 1/1 ARM: pcm043 micrell ksz8041nl phy support
Hi Tim,
Quoted 5 lines · Tim Sander
Hi
This patch add the missing support for the phy used on the phytec pcm043 boards. Please consider for mainline. Tested on pcm043 hardware.
Quoted 8 lines
Best regards
TimSigned-off-by Tim Sander <[email protected]>---
?drivers/net/fec.c | ? 39 +++++++++++++++++++++++++++++++++++++++ ?1 files changed, 39 insertions(+), 0 deletions(-)
As your patch touches drivers/net/fec.c you need to copy netdev mailing list.
Regards,
Fabio Estevam
PATCH 1/1 ARM: pcm043 micrell ksz8041nl phy support
Hi Fabio
Quoted 2 lines
As your patch touches
drivers/net/fec.cyou need to copy netdev mailing list.
Ah, thanks for that hint. I just realized i was working on an old git kernel branch, so its for 2.6.33... Alas
Tim