diff options
author | Sergii Boryshchenko <sergii.boryshchenko@globallogic.com> | 2017-11-30 14:53:52 +0200 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | 2019-01-29 06:07:21 +0100 |
commit | 458a449cfd8bc80c4cfb11b3f8fdf5eb5ac1e11b (patch) | |
tree | a78d4a7024b09af4905e44c2c60846f1f92a8d0c /drivers | |
parent | 47366cb13c58cc37faec306b364b56ae04294a32 (diff) | |
download | trusted-firmware-a-458a449cfd8bc80c4cfb11b3f8fdf5eb5ac1e11b.tar.gz |
rcar_gen3: drivers: cpld: fix power-off on reset
Method cpld_reset_cpu of bl31 is called from the Linux kernel and uses
GPIO6, GPIO2 pins as SPI bus lines to control the CPLD device. But in the
kernel GPIO6_8 pin are initialized to work in interrupt mode instead of
the input/output mode. This leads to the fact that the SPI bus becomes
non-functional. In this patch we switch the GPIO6_8 pin back to the
input-output mode.
Signed-off-by: Sergii Boryshchenko <sergii.boryshchenko@globallogic.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/renesas/rcar/cpld/ulcb_cpld.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/renesas/rcar/cpld/ulcb_cpld.c b/drivers/renesas/rcar/cpld/ulcb_cpld.c index 6b0361497e..4830853739 100644 --- a/drivers/renesas/rcar/cpld/ulcb_cpld.c +++ b/drivers/renesas/rcar/cpld/ulcb_cpld.c @@ -24,6 +24,9 @@ #define GPIO_INOUTSEL2 0xE6052004 #define GPIO_INOUTSEL6 0xE6055404 +/* General IO/Interrupt Switching Register */ +#define GPIO_IOINTSEL6 0xE6055400 + /* GPIO/perihperal function select */ #define PFC_GPSR2 0xE6060108 #define PFC_GPSR6 0xE6060118 @@ -93,6 +96,7 @@ static void cpld_init(void) gpio_pfc(PFC_GPSR2, SSTBZ); gpio_pfc(PFC_GPSR6, MOSI); + gpio_set_value(GPIO_IOINTSEL6, SCLK, 0); gpio_set_value(GPIO_OUTDT6, SCLK, 0); gpio_set_value(GPIO_OUTDT2, SSTBZ, 1); gpio_set_value(GPIO_OUTDT6, MOSI, 0); |