soc: rockchip: rockchip_pm_config: set the real pin number to ATF

If the gpio base is started from 1000, The real pin
number is "gpio number - 1000".

Change-Id: If9b627ce9689105d0cdb7314869d598b4132f486
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
This commit is contained in:
shengfei Xu
2017-09-30 14:51:45 +08:00
committed by Huang, Tao
parent 727e0fe68d
commit ef06da2890

View File

@@ -126,6 +126,7 @@ static int __init pm_config_init(struct platform_device *pdev)
enum of_gpio_flags flags;
int i = 0;
int length;
int pin_num;
match_id = of_match_node(pm_match_table, pdev->dev.of_node);
if (!match_id)
@@ -171,9 +172,11 @@ static int __init pm_config_init(struct platform_device *pdev)
&flags);
if (!gpio_is_valid(gpio_temp[i]))
break;
/* get the real pin number */
pin_num = gpio_temp[i] - ARCH_GPIO_BASE;
sip_smc_set_suspend_mode(GPIO_POWER_CONFIG,
i,
gpio_temp[i]);
pin_num);
}
}
sip_smc_set_suspend_mode(GPIO_POWER_CONFIG, i, PM_INVALID_GPIO);