net/fman: add a fm_enable_port function
This can be useful if one wants to disable an interface in u-boot because u-boot should not manage it but then later reenable it for FDT fixing or if the kernel uses this interface. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> [York Sun: fix conflict in fm_eth.h] Acked-by: York Sun <yorksun@freescale.com>
This commit is contained in:
parent
7e157b0ade
commit
f51d3b71d4
@ -37,6 +37,13 @@ void fman_disable_port(enum fm_port port)
|
||||
setbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
void fman_enable_port(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
||||
clrbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||
{
|
||||
if (is_device_disabled(port))
|
||||
|
@ -99,6 +99,7 @@ int fm_init_common(int index, struct ccsr_fman *reg);
|
||||
int fm_eth_initialize(struct ccsr_fman *reg, struct fm_eth_info *info);
|
||||
phy_interface_t fman_port_enet_if(enum fm_port port);
|
||||
void fman_disable_port(enum fm_port port);
|
||||
void fman_enable_port(enum fm_port port);
|
||||
|
||||
struct fsl_enet_mac {
|
||||
void *base; /* MAC controller registers base address */
|
||||
|
@ -145,6 +145,14 @@ void fm_disable_port(enum fm_port port)
|
||||
fman_disable_port(port);
|
||||
}
|
||||
|
||||
void fm_enable_port(enum fm_port port)
|
||||
{
|
||||
int i = fm_port_to_index(port);
|
||||
|
||||
fm_info[i].enabled = 1;
|
||||
fman_enable_port(port);
|
||||
}
|
||||
|
||||
void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus)
|
||||
{
|
||||
int i = fm_port_to_index(port);
|
||||
|
@ -34,6 +34,13 @@ void fman_disable_port(enum fm_port port)
|
||||
setbits_be32(&gur->devdisr, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
void fman_enable_port(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
||||
clrbits_be32(&gur->devdisr, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
@ -42,6 +42,13 @@ void fman_disable_port(enum fm_port port)
|
||||
setbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
void fman_enable_port(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
||||
clrbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
@ -38,6 +38,13 @@ void fman_disable_port(enum fm_port port)
|
||||
setbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
void fman_enable_port(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
||||
clrbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
@ -44,6 +44,13 @@ void fman_disable_port(enum fm_port port)
|
||||
setbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
void fman_enable_port(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
||||
clrbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
@ -49,6 +49,13 @@ void fman_disable_port(enum fm_port port)
|
||||
setbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
void fman_enable_port(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void __iomem *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
||||
clrbits_be32(&gur->devdisr2, port_to_devdisr[port]);
|
||||
}
|
||||
|
||||
phy_interface_t fman_port_enet_if(enum fm_port port)
|
||||
{
|
||||
ccsr_gur_t *gur = (void __iomem *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
|
||||
|
@ -149,6 +149,7 @@ void fm_info_set_phy_address(enum fm_port port, int address);
|
||||
int fm_info_get_phy_address(enum fm_port port);
|
||||
void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus);
|
||||
void fm_disable_port(enum fm_port port);
|
||||
void fm_enable_port(enum fm_port port);
|
||||
void set_sgmii_phy(struct mii_dev *bus, enum fm_port base_port,
|
||||
unsigned int port_num, int phy_base_addr);
|
||||
int is_qsgmii_riser_card(struct mii_dev *bus, int phy_base_addr,
|
||||
|
Loading…
Reference in New Issue
Block a user