diff options
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.c')
-rw-r--r-- | drivers/net/dsa/bcm_sf2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index e218887f18b7..e3ee27ce13dd 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c | |||
@@ -1133,6 +1133,20 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev) | |||
1133 | return 0; | 1133 | return 0; |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | static void bcm_sf2_sw_shutdown(struct platform_device *pdev) | ||
1137 | { | ||
1138 | struct bcm_sf2_priv *priv = platform_get_drvdata(pdev); | ||
1139 | |||
1140 | /* For a kernel about to be kexec'd we want to keep the GPHY on for a | ||
1141 | * successful MDIO bus scan to occur. If we did turn off the GPHY | ||
1142 | * before (e.g: port_disable), this will also power it back on. | ||
1143 | * | ||
1144 | * Do not rely on kexec_in_progress, just power the PHY on. | ||
1145 | */ | ||
1146 | if (priv->hw_params.num_gphy == 1) | ||
1147 | bcm_sf2_gphy_enable_set(priv->dev->ds, true); | ||
1148 | } | ||
1149 | |||
1136 | #ifdef CONFIG_PM_SLEEP | 1150 | #ifdef CONFIG_PM_SLEEP |
1137 | static int bcm_sf2_suspend(struct device *dev) | 1151 | static int bcm_sf2_suspend(struct device *dev) |
1138 | { | 1152 | { |
@@ -1158,10 +1172,12 @@ static const struct of_device_id bcm_sf2_of_match[] = { | |||
1158 | { .compatible = "brcm,bcm7445-switch-v4.0" }, | 1172 | { .compatible = "brcm,bcm7445-switch-v4.0" }, |
1159 | { /* sentinel */ }, | 1173 | { /* sentinel */ }, |
1160 | }; | 1174 | }; |
1175 | MODULE_DEVICE_TABLE(of, bcm_sf2_of_match); | ||
1161 | 1176 | ||
1162 | static struct platform_driver bcm_sf2_driver = { | 1177 | static struct platform_driver bcm_sf2_driver = { |
1163 | .probe = bcm_sf2_sw_probe, | 1178 | .probe = bcm_sf2_sw_probe, |
1164 | .remove = bcm_sf2_sw_remove, | 1179 | .remove = bcm_sf2_sw_remove, |
1180 | .shutdown = bcm_sf2_sw_shutdown, | ||
1165 | .driver = { | 1181 | .driver = { |
1166 | .name = "brcm-sf2", | 1182 | .name = "brcm-sf2", |
1167 | .of_match_table = bcm_sf2_of_match, | 1183 | .of_match_table = bcm_sf2_of_match, |