As we are using cpu_pm to save and restore context, we must also save and restore the GPIO sysconfig register. This is needed because we are not calling PM runtime functions at all with cpu_pm. We need to save the sysconfig on idle as it's value can get reconfigured by PM runtime and can be different from the init time value. Device specific flags like "ti,no-idle-on-init" can affect the init value.
Showing the changes to include/linux/platform_data (1 of 2 files). Show all
Unified · Split
| @@ -85,6 +85,7 @@ · 84 unmodified lines | ||
| 85 | 85 | * omap2+ specific GPIO registers |
| 86 | 86 | */ |
| 87 | 87 | #define OMAP24XX_GPIO_REVISION 0x0000 |
| 88 | +#define OMAP24XX_GPIO_SYSCONFIG 0x0010 | |
| 88 | 89 | #define OMAP24XX_GPIO_IRQSTATUS1 0x0018 |
| 89 | 90 | #define OMAP24XX_GPIO_IRQSTATUS2 0x0028 |
| 90 | 91 | #define OMAP24XX_GPIO_IRQENABLE2 0x002c |
| @@ -108,6 +109,7 @@ · 17 unmodified lines | ||
| 108 | 109 | #define OMAP24XX_GPIO_SETDATAOUT 0x0094 |
| 109 | 110 | |
| 110 | 111 | #define OMAP4_GPIO_REVISION 0x0000 |
| 112 | +#define OMAP4_GPIO_SYSCONFIG 0x0010 | |
| 111 | 113 | #define OMAP4_GPIO_EOI 0x0020 |
| 112 | 114 | #define OMAP4_GPIO_IRQSTATUSRAW0 0x0024 |
| 113 | 115 | #define OMAP4_GPIO_IRQSTATUSRAW1 0x0028 |
| @@ -148,6 +150,7 @@ · 34 unmodified lines | ||
| 148 | 150 | #ifndef __ASSEMBLER__ |
| 149 | 151 | struct omap_gpio_reg_offs { |
| 150 | 152 | u16 revision; |
| 153 | + u16 sysconfig; | |
| 151 | 154 | u16 direction; |
| 152 | 155 | u16 datain; |
| 153 | 156 | u16 dataout; |