Move the register defines for the Atom (Bay Trail, Cherry Trail) PMC clocks to include/linux/platform_data/x86/pmc_atom.h. This is a preparation patch to extend the S0i3 readiness checks in drivers/platform/x86/pmc_atom.c with checking that the PMC clocks are off on suspend entry. Note these are added to include/linux/platform_data/x86/pmc_atom.h rather then to include/linux/platform_data/x86/clk-pmc-atom.h because the former already has all the other Atom PMC register defines.
Unified · Split
| @@ -11,23 +11,12 @@ · 10 unmodified lines | |||
| 11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
| 12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
| 13 | #include <linux/platform_data/x86/clk-pmc-atom.h> | 13 | #include <linux/platform_data/x86/clk-pmc-atom.h> |
| 14 | #include <linux/platform_data/x86/pmc_atom.h> | ||
| 14 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
| 15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 16 | 17 | ||
| 17 | #define PLT_CLK_NAME_BASE "pmc_plt_clk" | 18 | #define PLT_CLK_NAME_BASE "pmc_plt_clk" |
| 18 | 19 | ||
| 19 | #define PMC_CLK_CTL_OFFSET 0x60 | ||
| 20 | #define PMC_CLK_CTL_SIZE 4 | ||
| 21 | #define PMC_CLK_NUM 6 | ||
| 22 | #define PMC_CLK_CTL_GATED_ON_D3 0x0 | ||
| 23 | #define PMC_CLK_CTL_FORCE_ON 0x1 | ||
| 24 | #define PMC_CLK_CTL_FORCE_OFF 0x2 | ||
| 25 | #define PMC_CLK_CTL_RESERVED 0x3 | ||
| 26 | #define PMC_MASK_CLK_CTL GENMASK(1, 0) | ||
| 27 | #define PMC_MASK_CLK_FREQ BIT(2) | ||
| 28 | #define PMC_CLK_FREQ_XTAL (0 << 2) /* 25 MHz */ | ||
| 29 | #define PMC_CLK_FREQ_PLL (1 << 2) /* 19.2 MHz */ | ||
| 30 | |||
| 31 | struct clk_plt_fixed { | 20 | struct clk_plt_fixed { |
| 32 | struct clk_hw *clk; | 21 | struct clk_hw *clk; |
| 33 | struct clk_lookup *lookup; | 22 | struct clk_lookup *lookup; |
| @@ -43,6 +43,19 @@ · 42 unmodified lines | |||
| 43 | BIT_ORED_DEDICATED_IRQ_GPSC | \ | 43 | BIT_ORED_DEDICATED_IRQ_GPSC | \ |
| 44 | BIT_SHARED_IRQ_GPSS) | 44 | BIT_SHARED_IRQ_GPSS) |
| 45 | 45 | ||
| 46 | /* External clk generator settings */ | ||
| 47 | #define PMC_CLK_CTL_OFFSET 0x60 | ||
| 48 | #define PMC_CLK_CTL_SIZE 4 | ||
| 49 | #define PMC_CLK_NUM 6 | ||
| 50 | #define PMC_CLK_CTL_GATED_ON_D3 0x0 | ||
| 51 | #define PMC_CLK_CTL_FORCE_ON 0x1 | ||
| 52 | #define PMC_CLK_CTL_FORCE_OFF 0x2 | ||
| 53 | #define PMC_CLK_CTL_RESERVED 0x3 | ||
| 54 | #define PMC_MASK_CLK_CTL GENMASK(1, 0) | ||
| 55 | #define PMC_MASK_CLK_FREQ BIT(2) | ||
| 56 | #define PMC_CLK_FREQ_XTAL (0 << 2) /* 25 MHz */ | ||
| 57 | #define PMC_CLK_FREQ_PLL (1 << 2) /* 19.2 MHz */ | ||
| 58 | |||
| 46 | /* The timers accumulate time spent in sleep state */ | 59 | /* The timers accumulate time spent in sleep state */ |
| 47 | #define PMC_S0IR_TMR 0x80 | 60 | #define PMC_S0IR_TMR 0x80 |
| 48 | #define PMC_S0I1_TMR 0x84 | 61 | #define PMC_S0I1_TMR 0x84 |