summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Jaszczyk <jaz@semihalf.com>2018-07-12 07:40:34 +0200
committerKonstantin Porotchkin <kostap@marvell.com>2018-09-03 14:45:20 +0300
commit2a9a98536ce82dbb047ba4948ce94f91dd4d10fb (patch)
treead99aeac6258bcf1ee455df234d8b948d914c25f
parent37b383ab3a3a1095416ffb6a5ca3bcc2eabd1e26 (diff)
mvebu: cp110: align all comphy_index arguments type
The biggest comphy index can be equal to 6 so there is no need to use uint64_t for storing it. Change-Id: I14c2b68e51678a560815963c72aed0c37068f926 Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com> Reviewed-on: http://vgitil04.il.marvell.com:8080/58021 Reviewed-by: Igal Liberman <igall@marvell.com> Tested-by: iSoC Platform CI <ykjenk@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
-rw-r--r--drivers/marvell/comphy/phy-comphy-cp110.c6
-rw-r--r--drivers/marvell/comphy/phy-comphy-cp110.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/marvell/comphy/phy-comphy-cp110.c b/drivers/marvell/comphy/phy-comphy-cp110.c
index 116a191e..bacfad78 100644
--- a/drivers/marvell/comphy/phy-comphy-cp110.c
+++ b/drivers/marvell/comphy/phy-comphy-cp110.c
@@ -2138,7 +2138,7 @@ int mvebu_cp110_comphy_digital_reset(uint64_t comphy_base,
return 0;
}
-int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint64_t comphy_index, uint64_t comphy_mode)
+int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint8_t comphy_index, uint64_t comphy_mode)
{
int mode = COMPHY_GET_MODE(comphy_mode);
int err = 0;
@@ -2171,7 +2171,7 @@ int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint64_t comphy_index, uin
err = mvebu_cp110_comphy_ap_power_on(comphy_base, comphy_index);
break;
default:
- ERROR("comphy%lld: unsupported comphy mode\n", comphy_index);
+ ERROR("comphy%d: unsupported comphy mode\n", comphy_index);
err = -EINVAL;
break;
}
@@ -2181,7 +2181,7 @@ int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint64_t comphy_index, uin
return err;
}
-int mvebu_cp110_comphy_power_off(uint64_t comphy_base, uint64_t comphy_index)
+int mvebu_cp110_comphy_power_off(uint64_t comphy_base, uint8_t comphy_index)
{
uintptr_t sd_ip_addr, comphy_ip_addr;
uint32_t mask, data;
diff --git a/drivers/marvell/comphy/phy-comphy-cp110.h b/drivers/marvell/comphy/phy-comphy-cp110.h
index 5d32f139..2dab73d1 100644
--- a/drivers/marvell/comphy/phy-comphy-cp110.h
+++ b/drivers/marvell/comphy/phy-comphy-cp110.h
@@ -5,9 +5,9 @@
* https://spdx.org/licenses
*/
-int mvebu_cp110_comphy_is_pll_locked(uint64_t comphy_base, uint64_t comphy_index);
-int mvebu_cp110_comphy_power_off(uint64_t comphy_base, uint64_t comphy_index);
-int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint64_t comphy_index, uint64_t comphy_mode);
+int mvebu_cp110_comphy_is_pll_locked(uint64_t comphy_base, uint8_t comphy_index);
+int mvebu_cp110_comphy_power_off(uint64_t comphy_base, uint8_t comphy_index);
+int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint8_t comphy_index, uint64_t comphy_mode);
int mvebu_cp110_comphy_xfi_rx_training(uint64_t comphy_base, uint8_t comphy_index);
int mvebu_cp110_comphy_digital_reset(uint64_t comphy_base, uint8_t comphy_index,
uint32_t comphy_mode, uint32_t command);