mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 10:04:26 +00:00
fix(drivers/marvell/comphy-3700): fix address overflow
Physical address has to be stored in 64-bit data type as Armada 3720 is 64-bit platform. Driver already uses uintptr_t type for this purpise. Change type of 'offset' variables in mvebu_a3700_comphy_usb3_power_on() and mvebu_a3700_comphy_sgmii_power_on() / off() functions to uintptr_t as in this variable is stored physical address of registers. Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I69581714f8899d21cc1a27005747708f0f1cd933
This commit is contained in:
parent
0694b81386
commit
c074f70ce5
1 changed files with 6 additions and 3 deletions
|
@ -364,7 +364,8 @@ static int mvebu_a3700_comphy_sgmii_power_on(uint8_t comphy_index,
|
|||
uint32_t comphy_mode)
|
||||
{
|
||||
int ret = 0;
|
||||
uint32_t mask, data, offset;
|
||||
uint32_t mask, data;
|
||||
uintptr_t offset;
|
||||
uintptr_t sd_ip_addr;
|
||||
int mode = COMPHY_GET_MODE(comphy_mode);
|
||||
int invert = COMPHY_GET_POLARITY_INVERT(comphy_mode);
|
||||
|
@ -576,7 +577,8 @@ static int mvebu_a3700_comphy_sgmii_power_on(uint8_t comphy_index,
|
|||
static int mvebu_a3700_comphy_sgmii_power_off(uint8_t comphy_index)
|
||||
{
|
||||
int ret = 0;
|
||||
uint32_t mask, data, offset;
|
||||
uintptr_t offset;
|
||||
uint32_t mask, data;
|
||||
|
||||
debug_enter();
|
||||
|
||||
|
@ -595,7 +597,8 @@ static int mvebu_a3700_comphy_usb3_power_on(uint8_t comphy_index,
|
|||
{
|
||||
int ret = 0;
|
||||
uintptr_t reg_base = 0;
|
||||
uint32_t mask, data, addr, cfg, ref_clk;
|
||||
uintptr_t addr;
|
||||
uint32_t mask, data, cfg, ref_clk;
|
||||
void (*usb3_reg_set)(uintptr_t addr, uint32_t reg_offset, uint16_t data,
|
||||
uint16_t mask);
|
||||
int invert = COMPHY_GET_POLARITY_INVERT(comphy_mode);
|
||||
|
|
Loading…
Add table
Reference in a new issue