diff options
| -rw-r--r-- | drivers/spi/spi-qup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c index 810a7fae3479..e42ff613c0e0 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c | |||
| @@ -937,6 +937,10 @@ static int spi_qup_pm_suspend_runtime(struct device *device) | |||
| 937 | config = readl(controller->base + QUP_CONFIG); | 937 | config = readl(controller->base + QUP_CONFIG); |
| 938 | config |= QUP_CONFIG_CLOCK_AUTO_GATE; | 938 | config |= QUP_CONFIG_CLOCK_AUTO_GATE; |
| 939 | writel_relaxed(config, controller->base + QUP_CONFIG); | 939 | writel_relaxed(config, controller->base + QUP_CONFIG); |
| 940 | |||
| 941 | clk_disable_unprepare(controller->cclk); | ||
| 942 | clk_disable_unprepare(controller->iclk); | ||
| 943 | |||
| 940 | return 0; | 944 | return 0; |
| 941 | } | 945 | } |
| 942 | 946 | ||
| @@ -945,6 +949,15 @@ static int spi_qup_pm_resume_runtime(struct device *device) | |||
| 945 | struct spi_master *master = dev_get_drvdata(device); | 949 | struct spi_master *master = dev_get_drvdata(device); |
| 946 | struct spi_qup *controller = spi_master_get_devdata(master); | 950 | struct spi_qup *controller = spi_master_get_devdata(master); |
| 947 | u32 config; | 951 | u32 config; |
| 952 | int ret; | ||
| 953 | |||
| 954 | ret = clk_prepare_enable(controller->iclk); | ||
| 955 | if (ret) | ||
| 956 | return ret; | ||
| 957 | |||
| 958 | ret = clk_prepare_enable(controller->cclk); | ||
| 959 | if (ret) | ||
| 960 | return ret; | ||
| 948 | 961 | ||
| 949 | /* Disable clocks auto gaiting */ | 962 | /* Disable clocks auto gaiting */ |
| 950 | config = readl_relaxed(controller->base + QUP_CONFIG); | 963 | config = readl_relaxed(controller->base + QUP_CONFIG); |
