diff options
| author | Bastian Hecht <hechtb@googlemail.com> | 2012-03-18 10:13:20 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-26 19:53:34 -0400 |
| commit | cfe781946dac7f5ff42e23cd7054c75e7201fbdc (patch) | |
| tree | 75d102cf44ab8d2fe190a67594fee88790005b88 /include/linux/mtd | |
| parent | 42d7fbe223ab878b23de9e3b0166f8cd665a2aa5 (diff) | |
mtd: sh_flctl: Add power management with QoS request
Adds power management code with fine granularity. Every flash control
command is enclosed by runtime_put()/get()s. To make sure that no
overhead is generated by too frequent power state switches, a quality of
service request is issued.
Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd')
| -rw-r--r-- | include/linux/mtd/sh_flctl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mtd/sh_flctl.h b/include/linux/mtd/sh_flctl.h index 8bcf299cb9bf..a38e1fa8af01 100644 --- a/include/linux/mtd/sh_flctl.h +++ b/include/linux/mtd/sh_flctl.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
| 24 | #include <linux/mtd/nand.h> | 24 | #include <linux/mtd/nand.h> |
| 25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
| 26 | #include <linux/pm_qos.h> | ||
| 26 | 27 | ||
| 27 | /* FLCTL registers */ | 28 | /* FLCTL registers */ |
| 28 | #define FLCMNCR(f) (f->reg + 0x0) | 29 | #define FLCMNCR(f) (f->reg + 0x0) |
| @@ -131,6 +132,7 @@ struct sh_flctl { | |||
| 131 | struct mtd_info mtd; | 132 | struct mtd_info mtd; |
| 132 | struct nand_chip chip; | 133 | struct nand_chip chip; |
| 133 | struct platform_device *pdev; | 134 | struct platform_device *pdev; |
| 135 | struct dev_pm_qos_request pm_qos; | ||
| 134 | void __iomem *reg; | 136 | void __iomem *reg; |
| 135 | 137 | ||
| 136 | uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */ | 138 | uint8_t done_buff[2048 + 64]; /* max size 2048 + 64 */ |
| @@ -149,6 +151,7 @@ struct sh_flctl { | |||
| 149 | unsigned page_size:1; /* NAND page size (0 = 512, 1 = 2048) */ | 151 | unsigned page_size:1; /* NAND page size (0 = 512, 1 = 2048) */ |
| 150 | unsigned hwecc:1; /* Hardware ECC (0 = disabled, 1 = enabled) */ | 152 | unsigned hwecc:1; /* Hardware ECC (0 = disabled, 1 = enabled) */ |
| 151 | unsigned holden:1; /* Hardware has FLHOLDCR and HOLDEN is set */ | 153 | unsigned holden:1; /* Hardware has FLHOLDCR and HOLDEN is set */ |
| 154 | unsigned qos_request:1; /* QoS request to prevent deep power shutdown */ | ||
| 152 | }; | 155 | }; |
| 153 | 156 | ||
| 154 | struct sh_flctl_platform_data { | 157 | struct sh_flctl_platform_data { |
