mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 13:56:30 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
52 lines
1.1 KiB
C
52 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Micrel KSZ8873 PHY Driver for TI DaVinci
|
|
* (TMS320DM644x) based boards.
|
|
*
|
|
* Copyright (C) 2011 Heiko Schocher <hsdenx.de>
|
|
*
|
|
* based on:
|
|
* National Semiconductor DP83848 PHY Driver for TI DaVinci
|
|
* (TMS320DM644x) based boards.
|
|
*
|
|
* Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
|
|
*
|
|
* --------------------------------------------------------
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <miiphy.h>
|
|
#include <net.h>
|
|
#include <asm/arch/emac_defs.h>
|
|
#include <asm/io.h>
|
|
#include "../../../drivers/net/davinci_emac.h"
|
|
|
|
int ksz8873_is_phy_connected(int phy_addr)
|
|
{
|
|
u_int16_t dummy;
|
|
|
|
return davinci_eth_phy_read(phy_addr, MII_PHYSID1, &dummy);
|
|
}
|
|
|
|
int ksz8873_get_link_speed(int phy_addr)
|
|
{
|
|
emac_regs *emac = (emac_regs *)EMAC_BASE_ADDR;
|
|
|
|
/* we always have a link to the switch, 100 FD */
|
|
writel((EMAC_MACCONTROL_MIIEN_ENABLE |
|
|
EMAC_MACCONTROL_FULLDUPLEX_ENABLE),
|
|
&emac->MACCONTROL);
|
|
return 1;
|
|
}
|
|
|
|
|
|
int ksz8873_init_phy(int phy_addr)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
|
|
int ksz8873_auto_negotiate(int phy_addr)
|
|
{
|
|
return dp83848_get_link_speed(phy_addr);
|
|
}
|