aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2014-12-15 16:59:43 -0500
committerKevin Hilman <khilman@linaro.org>2014-12-15 16:59:43 -0500
commit1888d2fa314033755026ceddee1fff8f80659fe4 (patch)
treeb0085323f5db6dca5f259b92038e27843c5a43a6 /include/linux
parent9d312cd12e89ce08add99fe66e8f6baeaca16d7d (diff)
parent661ea91b676bcca137c1c3fe838997925ce98060 (diff)
Merge tag 'omap-for-v3.19/fixes-for-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From: Tony Lindgren <tony@atomide.com> Subject: [GIT PULL] few fixes for the v3.19 merge window Fixes for a few issues found that would be good to get into -rc1: - Update SoC revision detection for am43x es1.2 - Fix regression with GPMC timings on 2430sdp for some versions of u-boot - Fix dra7 watchdog compatible property - Fix am437x-sk-evm LCD timings - Fix dra7 DSS clock muxing - Fix dra7-evm voltages - Remove a unused function prototype for am33xx_clk_init - Enable AHCI in the omap2plus_defconfig * tag 'omap-for-v3.19/fixes-for-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (1601 commits) ARM: omap2plus_defconfig: Enable AHCI_PLATFORM driver ARM: dts: am437x-sk-evm.dts: fix LCD timings ARM: dts: dra7-evm: Update SMPS7 (VDD_CORE) max voltage to match DM ARM: dts: dra7-evm: Fix typo in SMPS6 (VDD_GPU) max voltage ARM: OMAP2+: AM43x: Add ID for ES1.2 ARM: dts: am437x-sk: fix lcd enable pin mux data ARM: dts: Fix gpmc regression for omap 2430sdp smc91x hwmon: (tmp401) Detect TMP435 on all addresses it supports mfd: rtsx: Add func to split u32 into register mmc: sdhci-msm: Convert to mmc_send_tuning() mmc: sdhci-esdhc-imx: Convert to mmc_send_tuning() mmc: core: Let mmc_send_tuning() to take struct mmc_host* as parameter nios2: Make NIOS2_CMDLINE_IGNORE_DTB depend on CMDLINE_BOOL nios2: Add missing NR_CPUS to Kconfig nios2: asm-offsets: Remove unused definition TI_TASK nios2: Remove write-only struct member from nios2_timer nios2: Remove unused extern declaration of shm_align_mask nios2: include linux/type.h in io.h nios2: move include asm-generic/io.h to end of file nios2: remove include asm-generic/iomap.h from io.h ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/atmel-mci.h2
-rw-r--r--include/linux/blk-mq.h17
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/clk/ti.h15
-rw-r--r--include/linux/device-mapper.h2
-rw-r--r--include/linux/edac.h4
-rw-r--r--include/linux/eeprom_93cx6.h4
-rw-r--r--include/linux/efi.h6
-rw-r--r--include/linux/i2c/pmbus.h4
-rw-r--r--include/linux/iommu.h22
-rw-r--r--include/linux/libata.h4
-rw-r--r--include/linux/mbus.h1
-rw-r--r--include/linux/mfd/abx500/ab8500-sysctrl.h1
-rw-r--r--include/linux/mfd/arizona/registers.h50
-rw-r--r--include/linux/mfd/atmel-hlcdc.h85
-rw-r--r--include/linux/mfd/axp20x.h59
-rw-r--r--include/linux/mfd/core.h7
-rw-r--r--include/linux/mfd/dln2.h103
-rw-r--r--include/linux/mfd/max77686.h7
-rw-r--r--include/linux/mfd/max77693-private.h1
-rw-r--r--include/linux/mfd/rtsx_pci.h37
-rw-r--r--include/linux/mfd/samsung/core.h2
-rw-r--r--include/linux/mfd/samsung/s2mps13.h186
-rw-r--r--include/linux/mfd/syscon/imx6q-iomuxc-gpr.h39
-rw-r--r--include/linux/mfd/tc3589x.h8
-rw-r--r--include/linux/mmc/card.h23
-rw-r--r--include/linux/mmc/core.h3
-rw-r--r--include/linux/mmc/dw_mmc.h7
-rw-r--r--include/linux/mmc/host.h1
-rw-r--r--include/linux/mmc/mmc.h3
-rw-r--r--include/linux/mmc/sdhci.h18
-rw-r--r--include/linux/mmc/sdio_func.h2
-rw-r--r--include/linux/of.h11
-rw-r--r--include/linux/omap-gpmc.h199
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/platform_data/hsmmc-omap.h90
-rw-r--r--include/linux/platform_data/mmc-atmel-mci.h22
-rw-r--r--include/linux/platform_data/mmc-omap.h27
-rw-r--r--include/linux/platform_data/pxa_sdhci.h5
-rw-r--r--include/linux/platform_data/serial-omap.h3
-rw-r--r--include/linux/regmap.h7
-rw-r--r--include/linux/regulator/consumer.h6
-rw-r--r--include/linux/regulator/driver.h8
-rw-r--r--include/linux/regulator/of_regulator.h9
-rw-r--r--include/linux/reset-controller.h2
-rw-r--r--include/linux/reset.h7
-rw-r--r--include/linux/vexpress.h19
47 files changed, 1037 insertions, 104 deletions
diff --git a/include/linux/atmel-mci.h b/include/linux/atmel-mci.h
index 91b77f8d495d..9177947bf032 100644
--- a/include/linux/atmel-mci.h
+++ b/include/linux/atmel-mci.h
@@ -11,6 +11,7 @@
11 * @detect_pin: GPIO pin wired to the card detect switch 11 * @detect_pin: GPIO pin wired to the card detect switch
12 * @wp_pin: GPIO pin wired to the write protect sensor 12 * @wp_pin: GPIO pin wired to the write protect sensor
13 * @detect_is_active_high: The state of the detect pin when it is active 13 * @detect_is_active_high: The state of the detect pin when it is active
14 * @non_removable: The slot is not removable, only detect once
14 * 15 *
15 * If a given slot is not present on the board, @bus_width should be 16 * If a given slot is not present on the board, @bus_width should be
16 * set to 0. The other fields are ignored in this case. 17 * set to 0. The other fields are ignored in this case.
@@ -26,6 +27,7 @@ struct mci_slot_pdata {
26 int detect_pin; 27 int detect_pin;
27 int wp_pin; 28 int wp_pin;
28 bool detect_is_active_high; 29 bool detect_is_active_high;
30 bool non_removable;
29}; 31};
30 32
31/** 33/**
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index c9be1589415a..15f7034aa377 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -167,6 +167,23 @@ struct request *blk_mq_alloc_request(struct request_queue *q, int rw,
167 gfp_t gfp, bool reserved); 167 gfp_t gfp, bool reserved);
168struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag); 168struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, unsigned int tag);
169 169
170enum {
171 BLK_MQ_UNIQUE_TAG_BITS = 16,
172 BLK_MQ_UNIQUE_TAG_MASK = (1 << BLK_MQ_UNIQUE_TAG_BITS) - 1,
173};
174
175u32 blk_mq_unique_tag(struct request *rq);
176
177static inline u16 blk_mq_unique_tag_to_hwq(u32 unique_tag)
178{
179 return unique_tag >> BLK_MQ_UNIQUE_TAG_BITS;
180}
181
182static inline u16 blk_mq_unique_tag_to_tag(u32 unique_tag)
183{
184 return unique_tag & BLK_MQ_UNIQUE_TAG_MASK;
185}
186
170struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index); 187struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_index);
171struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int); 188struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int);
172 189
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index aac0f9ea952a..6d76b8b4aa2b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1136,7 +1136,6 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk)
1136/* 1136/*
1137 * tag stuff 1137 * tag stuff
1138 */ 1138 */
1139#define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED)
1140extern int blk_queue_start_tag(struct request_queue *, struct request *); 1139extern int blk_queue_start_tag(struct request_queue *, struct request *);
1141extern struct request *blk_queue_find_tag(struct request_queue *, int); 1140extern struct request *blk_queue_find_tag(struct request_queue *, int);
1142extern void blk_queue_end_tag(struct request_queue *, struct request *); 1141extern void blk_queue_end_tag(struct request_queue *, struct request *);
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h
index f75acbf70e96..74e5341463c9 100644
--- a/include/linux/clk/ti.h
+++ b/include/linux/clk/ti.h
@@ -254,13 +254,26 @@ extern const struct clk_ops ti_clk_mux_ops;
254void omap2_init_clk_hw_omap_clocks(struct clk *clk); 254void omap2_init_clk_hw_omap_clocks(struct clk *clk);
255int omap3_noncore_dpll_enable(struct clk_hw *hw); 255int omap3_noncore_dpll_enable(struct clk_hw *hw);
256void omap3_noncore_dpll_disable(struct clk_hw *hw); 256void omap3_noncore_dpll_disable(struct clk_hw *hw);
257int omap3_noncore_dpll_set_parent(struct clk_hw *hw, u8 index);
257int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, 258int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
258 unsigned long parent_rate); 259 unsigned long parent_rate);
260int omap3_noncore_dpll_set_rate_and_parent(struct clk_hw *hw,
261 unsigned long rate,
262 unsigned long parent_rate,
263 u8 index);
264long omap3_noncore_dpll_determine_rate(struct clk_hw *hw,
265 unsigned long rate,
266 unsigned long *best_parent_rate,
267 struct clk **best_parent_clk);
259unsigned long omap4_dpll_regm4xen_recalc(struct clk_hw *hw, 268unsigned long omap4_dpll_regm4xen_recalc(struct clk_hw *hw,
260 unsigned long parent_rate); 269 unsigned long parent_rate);
261long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw, 270long omap4_dpll_regm4xen_round_rate(struct clk_hw *hw,
262 unsigned long target_rate, 271 unsigned long target_rate,
263 unsigned long *parent_rate); 272 unsigned long *parent_rate);
273long omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw,
274 unsigned long rate,
275 unsigned long *best_parent_rate,
276 struct clk **best_parent_clk);
264u8 omap2_init_dpll_parent(struct clk_hw *hw); 277u8 omap2_init_dpll_parent(struct clk_hw *hw);
265unsigned long omap3_dpll_recalc(struct clk_hw *hw, unsigned long parent_rate); 278unsigned long omap3_dpll_recalc(struct clk_hw *hw, unsigned long parent_rate);
266long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate, 279long omap2_dpll_round_rate(struct clk_hw *hw, unsigned long target_rate,
@@ -278,6 +291,8 @@ int omap2_clk_disable_autoidle_all(void);
278void omap2_clk_enable_init_clocks(const char **clk_names, u8 num_clocks); 291void omap2_clk_enable_init_clocks(const char **clk_names, u8 num_clocks);
279int omap3_dpll4_set_rate(struct clk_hw *clk, unsigned long rate, 292int omap3_dpll4_set_rate(struct clk_hw *clk, unsigned long rate,
280 unsigned long parent_rate); 293 unsigned long parent_rate);
294int omap3_dpll4_set_rate_and_parent(struct clk_hw *hw, unsigned long rate,
295 unsigned long parent_rate, u8 index);
281int omap2_dflt_clk_enable(struct clk_hw *hw); 296int omap2_dflt_clk_enable(struct clk_hw *hw);
282void omap2_dflt_clk_disable(struct clk_hw *hw); 297void omap2_dflt_clk_disable(struct clk_hw *hw);
283int omap2_dflt_clk_is_enabled(struct clk_hw *hw); 298int omap2_dflt_clk_is_enabled(struct clk_hw *hw);
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index e1707de043ae..ca6d2acc5eb7 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -64,6 +64,7 @@ typedef int (*dm_request_endio_fn) (struct dm_target *ti,
64 union map_info *map_context); 64 union map_info *map_context);
65 65
66typedef void (*dm_presuspend_fn) (struct dm_target *ti); 66typedef void (*dm_presuspend_fn) (struct dm_target *ti);
67typedef void (*dm_presuspend_undo_fn) (struct dm_target *ti);
67typedef void (*dm_postsuspend_fn) (struct dm_target *ti); 68typedef void (*dm_postsuspend_fn) (struct dm_target *ti);
68typedef int (*dm_preresume_fn) (struct dm_target *ti); 69typedef int (*dm_preresume_fn) (struct dm_target *ti);
69typedef void (*dm_resume_fn) (struct dm_target *ti); 70typedef void (*dm_resume_fn) (struct dm_target *ti);
@@ -145,6 +146,7 @@ struct target_type {
145 dm_endio_fn end_io; 146 dm_endio_fn end_io;
146 dm_request_endio_fn rq_end_io; 147 dm_request_endio_fn rq_end_io;
147 dm_presuspend_fn presuspend; 148 dm_presuspend_fn presuspend;
149 dm_presuspend_undo_fn presuspend_undo;
148 dm_postsuspend_fn postsuspend; 150 dm_postsuspend_fn postsuspend;
149 dm_preresume_fn preresume; 151 dm_preresume_fn preresume;
150 dm_resume_fn resume; 152 dm_resume_fn resume;
diff --git a/include/linux/edac.h b/include/linux/edac.h
index e1e68da6f35c..da3b72e95db3 100644
--- a/include/linux/edac.h
+++ b/include/linux/edac.h
@@ -194,7 +194,8 @@ static inline char *mc_event_error_type(const unsigned int err_type)
194 * @MEM_DDR3: DDR3 RAM 194 * @MEM_DDR3: DDR3 RAM
195 * @MEM_RDDR3: Registered DDR3 RAM 195 * @MEM_RDDR3: Registered DDR3 RAM
196 * This is a variant of the DDR3 memories. 196 * This is a variant of the DDR3 memories.
197 * @MEM_DDR4: DDR4 RAM 197 * @MEM_LRDDR3 Load-Reduced DDR3 memory.
198 * @MEM_DDR4: Unbuffered DDR4 RAM
198 * @MEM_RDDR4: Registered DDR4 RAM 199 * @MEM_RDDR4: Registered DDR4 RAM
199 * This is a variant of the DDR4 memories. 200 * This is a variant of the DDR4 memories.
200 */ 201 */
@@ -216,6 +217,7 @@ enum mem_type {
216 MEM_XDR, 217 MEM_XDR,
217 MEM_DDR3, 218 MEM_DDR3,
218 MEM_RDDR3, 219 MEM_RDDR3,
220 MEM_LRDDR3,
219 MEM_DDR4, 221 MEM_DDR4,
220 MEM_RDDR4, 222 MEM_RDDR4,
221}; 223};
diff --git a/include/linux/eeprom_93cx6.h b/include/linux/eeprom_93cx6.h
index e50f98b0297a..eb0b1988050a 100644
--- a/include/linux/eeprom_93cx6.h
+++ b/include/linux/eeprom_93cx6.h
@@ -75,6 +75,10 @@ extern void eeprom_93cx6_read(struct eeprom_93cx6 *eeprom,
75 const u8 word, u16 *data); 75 const u8 word, u16 *data);
76extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom, 76extern void eeprom_93cx6_multiread(struct eeprom_93cx6 *eeprom,
77 const u8 word, __le16 *data, const u16 words); 77 const u8 word, __le16 *data, const u16 words);
78extern void eeprom_93cx6_readb(struct eeprom_93cx6 *eeprom,
79 const u8 byte, u8 *data);
80extern void eeprom_93cx6_multireadb(struct eeprom_93cx6 *eeprom,
81 const u8 byte, u8 *data, const u16 bytes);
78 82
79extern void eeprom_93cx6_wren(struct eeprom_93cx6 *eeprom, bool enable); 83extern void eeprom_93cx6_wren(struct eeprom_93cx6 *eeprom, bool enable);
80 84
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 0949f9c7e872..0238d612750e 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -547,6 +547,9 @@ void efi_native_runtime_setup(void);
547#define SMBIOS_TABLE_GUID \ 547#define SMBIOS_TABLE_GUID \
548 EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) 548 EFI_GUID( 0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
549 549
550#define SMBIOS3_TABLE_GUID \
551 EFI_GUID( 0xf2fd1544, 0x9794, 0x4a2c, 0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 )
552
550#define SAL_SYSTEM_TABLE_GUID \ 553#define SAL_SYSTEM_TABLE_GUID \
551 EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d ) 554 EFI_GUID( 0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d )
552 555
@@ -810,7 +813,8 @@ extern struct efi {
810 unsigned long mps; /* MPS table */ 813 unsigned long mps; /* MPS table */
811 unsigned long acpi; /* ACPI table (IA64 ext 0.71) */ 814 unsigned long acpi; /* ACPI table (IA64 ext 0.71) */
812 unsigned long acpi20; /* ACPI table (ACPI 2.0) */ 815 unsigned long acpi20; /* ACPI table (ACPI 2.0) */
813 unsigned long smbios; /* SM BIOS table */ 816 unsigned long smbios; /* SMBIOS table (32 bit entry point) */
817 unsigned long smbios3; /* SMBIOS table (64 bit entry point) */
814 unsigned long sal_systab; /* SAL system table */ 818 unsigned long sal_systab; /* SAL system table */
815 unsigned long boot_info; /* boot info table */ 819 unsigned long boot_info; /* boot info table */
816 unsigned long hcdp; /* HCDP table */ 820 unsigned long hcdp; /* HCDP table */
diff --git a/include/linux/i2c/pmbus.h b/include/linux/i2c/pmbus.h
index 69280db02c41..ee3c2aba2a8e 100644
--- a/include/linux/i2c/pmbus.h
+++ b/include/linux/i2c/pmbus.h
@@ -40,6 +40,10 @@
40 40
41struct pmbus_platform_data { 41struct pmbus_platform_data {
42 u32 flags; /* Device specific flags */ 42 u32 flags; /* Device specific flags */
43
44 /* regulator support */
45 int num_regulators;
46 struct regulator_init_data *reg_init_data;
43}; 47};
44 48
45#endif /* _PMBUS_H_ */ 49#endif /* _PMBUS_H_ */
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index e6a7c9ff72f2..b29a5982e1c3 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -22,6 +22,7 @@
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/err.h> 23#include <linux/err.h>
24#include <linux/types.h> 24#include <linux/types.h>
25#include <linux/scatterlist.h>
25#include <trace/events/iommu.h> 26#include <trace/events/iommu.h>
26 27
27#define IOMMU_READ (1 << 0) 28#define IOMMU_READ (1 << 0)
@@ -97,6 +98,8 @@ enum iommu_attr {
97 * @detach_dev: detach device from an iommu domain 98 * @detach_dev: detach device from an iommu domain
98 * @map: map a physically contiguous memory region to an iommu domain 99 * @map: map a physically contiguous memory region to an iommu domain
99 * @unmap: unmap a physically contiguous memory region from an iommu domain 100 * @unmap: unmap a physically contiguous memory region from an iommu domain
101 * @map_sg: map a scatter-gather list of physically contiguous memory chunks
102 * to an iommu domain
100 * @iova_to_phys: translate iova to physical address 103 * @iova_to_phys: translate iova to physical address
101 * @add_device: add device to iommu grouping 104 * @add_device: add device to iommu grouping
102 * @remove_device: remove device from iommu grouping 105 * @remove_device: remove device from iommu grouping
@@ -114,6 +117,8 @@ struct iommu_ops {
114 phys_addr_t paddr, size_t size, int prot); 117 phys_addr_t paddr, size_t size, int prot);
115 size_t (*unmap)(struct iommu_domain *domain, unsigned long iova, 118 size_t (*unmap)(struct iommu_domain *domain, unsigned long iova,
116 size_t size); 119 size_t size);
120 size_t (*map_sg)(struct iommu_domain *domain, unsigned long iova,
121 struct scatterlist *sg, unsigned int nents, int prot);
117 phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova); 122 phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova);
118 int (*add_device)(struct device *dev); 123 int (*add_device)(struct device *dev);
119 void (*remove_device)(struct device *dev); 124 void (*remove_device)(struct device *dev);
@@ -156,6 +161,9 @@ extern int iommu_map(struct iommu_domain *domain, unsigned long iova,
156 phys_addr_t paddr, size_t size, int prot); 161 phys_addr_t paddr, size_t size, int prot);
157extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, 162extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova,
158 size_t size); 163 size_t size);
164extern size_t default_iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
165 struct scatterlist *sg,unsigned int nents,
166 int prot);
159extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); 167extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova);
160extern void iommu_set_fault_handler(struct iommu_domain *domain, 168extern void iommu_set_fault_handler(struct iommu_domain *domain,
161 iommu_fault_handler_t handler, void *token); 169 iommu_fault_handler_t handler, void *token);
@@ -241,6 +249,13 @@ static inline int report_iommu_fault(struct iommu_domain *domain,
241 return ret; 249 return ret;
242} 250}
243 251
252static inline size_t iommu_map_sg(struct iommu_domain *domain,
253 unsigned long iova, struct scatterlist *sg,
254 unsigned int nents, int prot)
255{
256 return domain->ops->map_sg(domain, iova, sg, nents, prot);
257}
258
244#else /* CONFIG_IOMMU_API */ 259#else /* CONFIG_IOMMU_API */
245 260
246struct iommu_ops {}; 261struct iommu_ops {};
@@ -293,6 +308,13 @@ static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova,
293 return -ENODEV; 308 return -ENODEV;
294} 309}
295 310
311static inline size_t iommu_map_sg(struct iommu_domain *domain,
312 unsigned long iova, struct scatterlist *sg,
313 unsigned int nents, int prot)
314{
315 return -ENODEV;
316}
317
296static inline int iommu_domain_window_enable(struct iommu_domain *domain, 318static inline int iommu_domain_window_enable(struct iommu_domain *domain,
297 u32 wnd_nr, phys_addr_t paddr, 319 u32 wnd_nr, phys_addr_t paddr,
298 u64 size, int prot) 320 u64 size, int prot)
diff --git a/include/linux/libata.h b/include/linux/libata.h
index bd5fefeaf548..bfbc817c34ee 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1191,9 +1191,9 @@ extern void ata_scsi_unlock_native_capacity(struct scsi_device *sdev);
1191extern int ata_scsi_slave_config(struct scsi_device *sdev); 1191extern int ata_scsi_slave_config(struct scsi_device *sdev);
1192extern void ata_scsi_slave_destroy(struct scsi_device *sdev); 1192extern void ata_scsi_slave_destroy(struct scsi_device *sdev);
1193extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, 1193extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
1194 int queue_depth, int reason); 1194 int queue_depth);
1195extern int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev, 1195extern int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
1196 int queue_depth, int reason); 1196 int queue_depth);
1197extern struct ata_device *ata_dev_pair(struct ata_device *adev); 1197extern struct ata_device *ata_dev_pair(struct ata_device *adev);
1198extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); 1198extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
1199extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap); 1199extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap);
diff --git a/include/linux/mbus.h b/include/linux/mbus.h
index 550c88fb0267..611b69fa8594 100644
--- a/include/linux/mbus.h
+++ b/include/linux/mbus.h
@@ -61,6 +61,7 @@ static inline const struct mbus_dram_target_info *mv_mbus_dram_info(void)
61} 61}
62#endif 62#endif
63 63
64int mvebu_mbus_save_cpu_target(u32 *store_addr);
64void mvebu_mbus_get_pcie_mem_aperture(struct resource *res); 65void mvebu_mbus_get_pcie_mem_aperture(struct resource *res);
65void mvebu_mbus_get_pcie_io_aperture(struct resource *res); 66void mvebu_mbus_get_pcie_io_aperture(struct resource *res);
66int mvebu_mbus_add_window_remap_by_id(unsigned int target, 67int mvebu_mbus_add_window_remap_by_id(unsigned int target,
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h
index adba89d9c660..689312745b2f 100644
--- a/include/linux/mfd/abx500/ab8500-sysctrl.h
+++ b/include/linux/mfd/abx500/ab8500-sysctrl.h
@@ -12,7 +12,6 @@
12 12
13int ab8500_sysctrl_read(u16 reg, u8 *value); 13int ab8500_sysctrl_read(u16 reg, u8 *value);
14int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); 14int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value);
15void ab8500_restart(char mode, const char *cmd);
16 15
17#else 16#else
18 17
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h
index c0b075f6bc35..aacc10d7789c 100644
--- a/include/linux/mfd/arizona/registers.h
+++ b/include/linux/mfd/arizona/registers.h
@@ -125,6 +125,8 @@
125#define ARIZONA_MIC_BIAS_CTRL_1 0x218 125#define ARIZONA_MIC_BIAS_CTRL_1 0x218
126#define ARIZONA_MIC_BIAS_CTRL_2 0x219 126#define ARIZONA_MIC_BIAS_CTRL_2 0x219
127#define ARIZONA_MIC_BIAS_CTRL_3 0x21A 127#define ARIZONA_MIC_BIAS_CTRL_3 0x21A
128#define ARIZONA_HP_CTRL_1L 0x225
129#define ARIZONA_HP_CTRL_1R 0x226
128#define ARIZONA_ACCESSORY_DETECT_MODE_1 0x293 130#define ARIZONA_ACCESSORY_DETECT_MODE_1 0x293
129#define ARIZONA_HEADPHONE_DETECT_1 0x29B 131#define ARIZONA_HEADPHONE_DETECT_1 0x29B
130#define ARIZONA_HEADPHONE_DETECT_2 0x29C 132#define ARIZONA_HEADPHONE_DETECT_2 0x29C
@@ -279,8 +281,16 @@
279#define ARIZONA_AIF2_FRAME_CTRL_2 0x548 281#define ARIZONA_AIF2_FRAME_CTRL_2 0x548
280#define ARIZONA_AIF2_FRAME_CTRL_3 0x549 282#define ARIZONA_AIF2_FRAME_CTRL_3 0x549
281#define ARIZONA_AIF2_FRAME_CTRL_4 0x54A 283#define ARIZONA_AIF2_FRAME_CTRL_4 0x54A
284#define ARIZONA_AIF2_FRAME_CTRL_5 0x54B
285#define ARIZONA_AIF2_FRAME_CTRL_6 0x54C
286#define ARIZONA_AIF2_FRAME_CTRL_7 0x54D
287#define ARIZONA_AIF2_FRAME_CTRL_8 0x54E
282#define ARIZONA_AIF2_FRAME_CTRL_11 0x551 288#define ARIZONA_AIF2_FRAME_CTRL_11 0x551
283#define ARIZONA_AIF2_FRAME_CTRL_12 0x552 289#define ARIZONA_AIF2_FRAME_CTRL_12 0x552
290#define ARIZONA_AIF2_FRAME_CTRL_13 0x553
291#define ARIZONA_AIF2_FRAME_CTRL_14 0x554
292#define ARIZONA_AIF2_FRAME_CTRL_15 0x555
293#define ARIZONA_AIF2_FRAME_CTRL_16 0x556
284#define ARIZONA_AIF2_TX_ENABLES 0x559 294#define ARIZONA_AIF2_TX_ENABLES 0x559
285#define ARIZONA_AIF2_RX_ENABLES 0x55A 295#define ARIZONA_AIF2_RX_ENABLES 0x55A
286#define ARIZONA_AIF2_FORCE_WRITE 0x55B 296#define ARIZONA_AIF2_FORCE_WRITE 0x55B
@@ -2245,6 +2255,46 @@
2245#define ARIZONA_MICB3_ENA_WIDTH 1 /* MICB3_ENA */ 2255#define ARIZONA_MICB3_ENA_WIDTH 1 /* MICB3_ENA */
2246 2256
2247/* 2257/*
2258 * R549 (0x225) - HP Ctrl 1L
2259 */
2260#define ARIZONA_RMV_SHRT_HP1L 0x4000 /* RMV_SHRT_HP1L */
2261#define ARIZONA_RMV_SHRT_HP1L_MASK 0x4000 /* RMV_SHRT_HP1L */
2262#define ARIZONA_RMV_SHRT_HP1L_SHIFT 14 /* RMV_SHRT_HP1L */
2263#define ARIZONA_RMV_SHRT_HP1L_WIDTH 1 /* RMV_SHRT_HP1L */
2264#define ARIZONA_HP1L_FLWR 0x0004 /* HP1L_FLWR */
2265#define ARIZONA_HP1L_FLWR_MASK 0x0004 /* HP1L_FLWR */
2266#define ARIZONA_HP1L_FLWR_SHIFT 2 /* HP1L_FLWR */
2267#define ARIZONA_HP1L_FLWR_WIDTH 1 /* HP1L_FLWR */
2268#define ARIZONA_HP1L_SHRTI 0x0002 /* HP1L_SHRTI */
2269#define ARIZONA_HP1L_SHRTI_MASK 0x0002 /* HP1L_SHRTI */
2270#define ARIZONA_HP1L_SHRTI_SHIFT 1 /* HP1L_SHRTI */
2271#define ARIZONA_HP1L_SHRTI_WIDTH 1 /* HP1L_SHRTI */
2272#define ARIZONA_HP1L_SHRTO 0x0001 /* HP1L_SHRTO */
2273#define ARIZONA_HP1L_SHRTO_MASK 0x0001 /* HP1L_SHRTO */
2274#define ARIZONA_HP1L_SHRTO_SHIFT 0 /* HP1L_SHRTO */
2275#define ARIZONA_HP1L_SHRTO_WIDTH 1 /* HP1L_SHRTO */
2276
2277/*
2278 * R550 (0x226) - HP Ctrl 1R
2279 */
2280#define ARIZONA_RMV_SHRT_HP1R 0x4000 /* RMV_SHRT_HP1R */
2281#define ARIZONA_RMV_SHRT_HP1R_MASK 0x4000 /* RMV_SHRT_HP1R */
2282#define ARIZONA_RMV_SHRT_HP1R_SHIFT 14 /* RMV_SHRT_HP1R */
2283#define ARIZONA_RMV_SHRT_HP1R_WIDTH 1 /* RMV_SHRT_HP1R */
2284#define ARIZONA_HP1R_FLWR 0x0004 /* HP1R_FLWR */
2285#define ARIZONA_HP1R_FLWR_MASK 0x0004 /* HP1R_FLWR */
2286#define ARIZONA_HP1R_FLWR_SHIFT 2 /* HP1R_FLWR */
2287#define ARIZONA_HP1R_FLWR_WIDTH 1 /* HP1R_FLWR */
2288#define ARIZONA_HP1R_SHRTI 0x0002 /* HP1R_SHRTI */
2289#define ARIZONA_HP1R_SHRTI_MASK 0x0002 /* HP1R_SHRTI */
2290#define ARIZONA_HP1R_SHRTI_SHIFT 1 /* HP1R_SHRTI */
2291#define ARIZONA_HP1R_SHRTI_WIDTH 1 /* HP1R_SHRTI */
2292#define ARIZONA_HP1R_SHRTO 0x0001 /* HP1R_SHRTO */
2293#define ARIZONA_HP1R_SHRTO_MASK 0x0001 /* HP1R_SHRTO */
2294#define ARIZONA_HP1R_SHRTO_SHIFT 0 /* HP1R_SHRTO */
2295#define ARIZONA_HP1R_SHRTO_WIDTH 1 /* HP1R_SHRTO */
2296
2297/*
2248 * R659 (0x293) - Accessory Detect Mode 1 2298 * R659 (0x293) - Accessory Detect Mode 1
2249 */ 2299 */
2250#define ARIZONA_ACCDET_SRC 0x2000 /* ACCDET_SRC */ 2300#define ARIZONA_ACCDET_SRC 0x2000 /* ACCDET_SRC */
diff --git a/include/linux/mfd/atmel-hlcdc.h b/include/linux/mfd/atmel-hlcdc.h
new file mode 100644
index 000000000000..1279ab1644b5
--- /dev/null
+++ b/include/linux/mfd/atmel-hlcdc.h
@@ -0,0 +1,85 @@
1/*
2 * Copyright (C) 2014 Free Electrons
3 * Copyright (C) 2014 Atmel
4 *
5 * Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __LINUX_MFD_HLCDC_H
21#define __LINUX_MFD_HLCDC_H
22
23#include <linux/clk.h>
24#include <linux/regmap.h>
25
26#define ATMEL_HLCDC_CFG(i) ((i) * 0x4)
27#define ATMEL_HLCDC_SIG_CFG LCDCFG(5)
28#define ATMEL_HLCDC_HSPOL BIT(0)
29#define ATMEL_HLCDC_VSPOL BIT(1)
30#define ATMEL_HLCDC_VSPDLYS BIT(2)
31#define ATMEL_HLCDC_VSPDLYE BIT(3)
32#define ATMEL_HLCDC_DISPPOL BIT(4)
33#define ATMEL_HLCDC_DITHER BIT(6)
34#define ATMEL_HLCDC_DISPDLY BIT(7)
35#define ATMEL_HLCDC_MODE_MASK GENMASK(9, 8)
36#define ATMEL_HLCDC_PP BIT(10)
37#define ATMEL_HLCDC_VSPSU BIT(12)
38#define ATMEL_HLCDC_VSPHO BIT(13)
39#define ATMEL_HLCDC_GUARDTIME_MASK GENMASK(20, 16)
40
41#define ATMEL_HLCDC_EN 0x20
42#define ATMEL_HLCDC_DIS 0x24
43#define ATMEL_HLCDC_SR 0x28
44#define ATMEL_HLCDC_IER 0x2c
45#define ATMEL_HLCDC_IDR 0x30
46#define ATMEL_HLCDC_IMR 0x34
47#define ATMEL_HLCDC_ISR 0x38
48
49#define ATMEL_HLCDC_CLKPOL BIT(0)
50#define ATMEL_HLCDC_CLKSEL BIT(2)
51#define ATMEL_HLCDC_CLKPWMSEL BIT(3)
52#define ATMEL_HLCDC_CGDIS(i) BIT(8 + (i))
53#define ATMEL_HLCDC_CLKDIV_SHFT 16
54#define ATMEL_HLCDC_CLKDIV_MASK GENMASK(23, 16)
55#define ATMEL_HLCDC_CLKDIV(div) ((div - 2) << ATMEL_HLCDC_CLKDIV_SHFT)
56
57#define ATMEL_HLCDC_PIXEL_CLK BIT(0)
58#define ATMEL_HLCDC_SYNC BIT(1)
59#define ATMEL_HLCDC_DISP BIT(2)
60#define ATMEL_HLCDC_PWM BIT(3)
61#define ATMEL_HLCDC_SIP BIT(4)
62
63#define ATMEL_HLCDC_SOF BIT(0)
64#define ATMEL_HLCDC_SYNCDIS BIT(1)
65#define ATMEL_HLCDC_FIFOERR BIT(4)
66#define ATMEL_HLCDC_LAYER_STATUS(x) BIT((x) + 8)
67
68/**
69 * Structure shared by the MFD device and its subdevices.
70 *
71 * @regmap: register map used to access HLCDC IP registers
72 * @periph_clk: the hlcdc peripheral clock
73 * @sys_clk: the hlcdc system clock
74 * @slow_clk: the system slow clk
75 * @irq: the hlcdc irq
76 */
77struct atmel_hlcdc {
78 struct regmap *regmap;
79 struct clk *periph_clk;
80 struct clk *sys_clk;
81 struct clk *slow_clk;
82 int irq;
83};
84
85#endif /* __LINUX_MFD_HLCDC_H */
diff --git a/include/linux/mfd/axp20x.h b/include/linux/mfd/axp20x.h
index d0e31a2287ac..81589d176ae8 100644
--- a/include/linux/mfd/axp20x.h
+++ b/include/linux/mfd/axp20x.h
@@ -14,6 +14,8 @@
14enum { 14enum {
15 AXP202_ID = 0, 15 AXP202_ID = 0,
16 AXP209_ID, 16 AXP209_ID,
17 AXP288_ID,
18 NR_AXP20X_VARIANTS,
17}; 19};
18 20
19#define AXP20X_DATACACHE(m) (0x04 + (m)) 21#define AXP20X_DATACACHE(m) (0x04 + (m))
@@ -49,11 +51,13 @@ enum {
49#define AXP20X_IRQ3_EN 0x42 51#define AXP20X_IRQ3_EN 0x42
50#define AXP20X_IRQ4_EN 0x43 52#define AXP20X_IRQ4_EN 0x43
51#define AXP20X_IRQ5_EN 0x44 53#define AXP20X_IRQ5_EN 0x44
54#define AXP20X_IRQ6_EN 0x45
52#define AXP20X_IRQ1_STATE 0x48 55#define AXP20X_IRQ1_STATE 0x48
53#define AXP20X_IRQ2_STATE 0x49 56#define AXP20X_IRQ2_STATE 0x49
54#define AXP20X_IRQ3_STATE 0x4a 57#define AXP20X_IRQ3_STATE 0x4a
55#define AXP20X_IRQ4_STATE 0x4b 58#define AXP20X_IRQ4_STATE 0x4b
56#define AXP20X_IRQ5_STATE 0x4c 59#define AXP20X_IRQ5_STATE 0x4c
60#define AXP20X_IRQ6_STATE 0x4d
57 61
58/* ADC */ 62/* ADC */
59#define AXP20X_ACIN_V_ADC_H 0x56 63#define AXP20X_ACIN_V_ADC_H 0x56
@@ -116,6 +120,15 @@ enum {
116#define AXP20X_CC_CTRL 0xb8 120#define AXP20X_CC_CTRL 0xb8
117#define AXP20X_FG_RES 0xb9 121#define AXP20X_FG_RES 0xb9
118 122
123/* AXP288 specific registers */
124#define AXP288_PMIC_ADC_H 0x56
125#define AXP288_PMIC_ADC_L 0x57
126#define AXP288_ADC_TS_PIN_CTRL 0x84
127
128#define AXP288_PMIC_ADC_EN 0x84
129#define AXP288_FG_TUNE5 0xed
130
131
119/* Regulators IDs */ 132/* Regulators IDs */
120enum { 133enum {
121 AXP20X_LDO1 = 0, 134 AXP20X_LDO1 = 0,
@@ -169,12 +182,58 @@ enum {
169 AXP20X_IRQ_GPIO0_INPUT, 182 AXP20X_IRQ_GPIO0_INPUT,
170}; 183};
171 184
185enum axp288_irqs {
186 AXP288_IRQ_VBUS_FALL = 2,
187 AXP288_IRQ_VBUS_RISE,
188 AXP288_IRQ_OV,
189 AXP288_IRQ_FALLING_ALT,
190 AXP288_IRQ_RISING_ALT,
191 AXP288_IRQ_OV_ALT,
192 AXP288_IRQ_DONE = 10,
193 AXP288_IRQ_CHARGING,
194 AXP288_IRQ_SAFE_QUIT,
195 AXP288_IRQ_SAFE_ENTER,
196 AXP288_IRQ_ABSENT,
197 AXP288_IRQ_APPEND,
198 AXP288_IRQ_QWBTU,
199 AXP288_IRQ_WBTU,
200 AXP288_IRQ_QWBTO,
201 AXP288_IRQ_WBTO,
202 AXP288_IRQ_QCBTU,
203 AXP288_IRQ_CBTU,
204 AXP288_IRQ_QCBTO,
205 AXP288_IRQ_CBTO,
206 AXP288_IRQ_WL2,
207 AXP288_IRQ_WL1,
208 AXP288_IRQ_GPADC,
209 AXP288_IRQ_OT = 31,
210 AXP288_IRQ_GPIO0,
211 AXP288_IRQ_GPIO1,
212 AXP288_IRQ_POKO,
213 AXP288_IRQ_POKL,
214 AXP288_IRQ_POKS,
215 AXP288_IRQ_POKN,
216 AXP288_IRQ_POKP,
217 AXP288_IRQ_TIMER,
218 AXP288_IRQ_MV_CHNG,
219 AXP288_IRQ_BC_USB_CHNG,
220};
221
222#define AXP288_TS_ADC_H 0x58
223#define AXP288_TS_ADC_L 0x59
224#define AXP288_GP_ADC_H 0x5a
225#define AXP288_GP_ADC_L 0x5b
226
172struct axp20x_dev { 227struct axp20x_dev {
173 struct device *dev; 228 struct device *dev;
174 struct i2c_client *i2c_client; 229 struct i2c_client *i2c_client;
175 struct regmap *regmap; 230 struct regmap *regmap;
176 struct regmap_irq_chip_data *regmap_irqc; 231 struct regmap_irq_chip_data *regmap_irqc;
177 long variant; 232 long variant;
233 int nr_cells;
234 struct mfd_cell *cells;
235 const struct regmap_config *regmap_cfg;
236 const struct regmap_irq_chip *regmap_irq_chip;
178}; 237};
179 238
180#endif /* __LINUX_MFD_AXP20X_H */ 239#endif /* __LINUX_MFD_AXP20X_H */
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index 73e1709d4c09..a76bc100bf97 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -111,6 +111,13 @@ extern int mfd_add_devices(struct device *parent, int id,
111 struct resource *mem_base, 111 struct resource *mem_base,
112 int irq_base, struct irq_domain *irq_domain); 112 int irq_base, struct irq_domain *irq_domain);
113 113
114static inline int mfd_add_hotplug_devices(struct device *parent,
115 const struct mfd_cell *cells, int n_devs)
116{
117 return mfd_add_devices(parent, PLATFORM_DEVID_AUTO, cells, n_devs,
118 NULL, 0, NULL);
119}
120
114extern void mfd_remove_devices(struct device *parent); 121extern void mfd_remove_devices(struct device *parent);
115 122
116#endif 123#endif
diff --git a/include/linux/mfd/dln2.h b/include/linux/mfd/dln2.h
new file mode 100644
index 000000000000..004b24576da8
--- /dev/null
+++ b/include/linux/mfd/dln2.h
@@ -0,0 +1,103 @@
1#ifndef __LINUX_USB_DLN2_H
2#define __LINUX_USB_DLN2_H
3
4#define DLN2_CMD(cmd, id) ((cmd) | ((id) << 8))
5
6struct dln2_platform_data {
7 u16 handle; /* sub-driver handle (internally used only) */
8 u8 port; /* I2C/SPI port */
9};
10
11/**
12 * dln2_event_cb_t - event callback function signature
13 *
14 * @pdev - the sub-device that registered this callback
15 * @echo - the echo header field received in the message
16 * @data - the data payload
17 * @len - the data payload length
18 *
19 * The callback function is called in interrupt context and the data payload is
20 * only valid during the call. If the user needs later access of the data, it
21 * must copy it.
22 */
23
24typedef void (*dln2_event_cb_t)(struct platform_device *pdev, u16 echo,
25 const void *data, int len);
26
27/**
28 * dl2n_register_event_cb - register a callback function for an event
29 *
30 * @pdev - the sub-device that registers the callback
31 * @event - the event for which to register a callback
32 * @event_cb - the callback function
33 *
34 * @return 0 in case of success, negative value in case of error
35 */
36int dln2_register_event_cb(struct platform_device *pdev, u16 event,
37 dln2_event_cb_t event_cb);
38
39/**
40 * dln2_unregister_event_cb - unregister the callback function for an event
41 *
42 * @pdev - the sub-device that registered the callback
43 * @event - the event for which to register a callback
44 */
45void dln2_unregister_event_cb(struct platform_device *pdev, u16 event);
46
47/**
48 * dln2_transfer - issue a DLN2 command and wait for a response and the
49 * associated data
50 *
51 * @pdev - the sub-device which is issuing this transfer
52 * @cmd - the command to be sent to the device
53 * @obuf - the buffer to be sent to the device; it can be NULL if the user
54 * doesn't need to transmit data with this command
55 * @obuf_len - the size of the buffer to be sent to the device
56 * @ibuf - any data associated with the response will be copied here; it can be
57 * NULL if the user doesn't need the response data
58 * @ibuf_len - must be initialized to the input buffer size; it will be modified
59 * to indicate the actual data transferred;
60 *
61 * @return 0 for success, negative value for errors
62 */
63int dln2_transfer(struct platform_device *pdev, u16 cmd,
64 const void *obuf, unsigned obuf_len,
65 void *ibuf, unsigned *ibuf_len);
66
67/**
68 * dln2_transfer_rx - variant of @dln2_transfer() where TX buffer is not needed
69 *
70 * @pdev - the sub-device which is issuing this transfer
71 * @cmd - the command to be sent to the device
72 * @ibuf - any data associated with the response will be copied here; it can be
73 * NULL if the user doesn't need the response data
74 * @ibuf_len - must be initialized to the input buffer size; it will be modified
75 * to indicate the actual data transferred;
76 *
77 * @return 0 for success, negative value for errors
78 */
79
80static inline int dln2_transfer_rx(struct platform_device *pdev, u16 cmd,
81 void *ibuf, unsigned *ibuf_len)
82{
83 return dln2_transfer(pdev, cmd, NULL, 0, ibuf, ibuf_len);
84}
85
86/**
87 * dln2_transfer_tx - variant of @dln2_transfer() where RX buffer is not needed
88 *
89 * @pdev - the sub-device which is issuing this transfer
90 * @cmd - the command to be sent to the device
91 * @obuf - the buffer to be sent to the device; it can be NULL if the
92 * user doesn't need to transmit data with this command
93 * @obuf_len - the size of the buffer to be sent to the device
94 *
95 * @return 0 for success, negative value for errors
96 */
97static inline int dln2_transfer_tx(struct platform_device *pdev, u16 cmd,
98 const void *obuf, unsigned obuf_len)
99{
100 return dln2_transfer(pdev, cmd, obuf, obuf_len, NULL, NULL);
101}
102
103#endif
diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h
index 7e6dc4b2b795..553f7d09258a 100644
--- a/include/linux/mfd/max77686.h
+++ b/include/linux/mfd/max77686.h
@@ -131,13 +131,6 @@ enum max77686_opmode {
131 MAX77686_OPMODE_STANDBY, 131 MAX77686_OPMODE_STANDBY,
132}; 132};
133 133
134enum max77802_opmode {
135 MAX77802_OPMODE_OFF,
136 MAX77802_OPMODE_STANDBY,
137 MAX77802_OPMODE_LP,
138 MAX77802_OPMODE_NORMAL,
139};
140
141struct max77686_opmode_data { 134struct max77686_opmode_data {
142 int id; 135 int id;
143 int mode; 136 int mode;
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
index 582e67f34054..08dae01258b9 100644
--- a/include/linux/mfd/max77693-private.h
+++ b/include/linux/mfd/max77693-private.h
@@ -26,7 +26,6 @@
26 26
27#include <linux/i2c.h> 27#include <linux/i2c.h>
28 28
29#define MAX77693_NUM_IRQ_MUIC_REGS 3
30#define MAX77693_REG_INVALID (0xff) 29#define MAX77693_REG_INVALID (0xff)
31 30
32/* Slave addr = 0xCC: PMIC, Charger, Flash LED */ 31/* Slave addr = 0xCC: PMIC, Charger, Flash LED */
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index 74346d5e7899..0c12628e91c6 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -558,6 +558,7 @@
558#define SD_SAMPLE_POINT_CTL 0xFDA7 558#define SD_SAMPLE_POINT_CTL 0xFDA7
559#define SD_PUSH_POINT_CTL 0xFDA8 559#define SD_PUSH_POINT_CTL 0xFDA8
560#define SD_CMD0 0xFDA9 560#define SD_CMD0 0xFDA9
561#define SD_CMD_START 0x40
561#define SD_CMD1 0xFDAA 562#define SD_CMD1 0xFDAA
562#define SD_CMD2 0xFDAB 563#define SD_CMD2 0xFDAB
563#define SD_CMD3 0xFDAC 564#define SD_CMD3 0xFDAC
@@ -707,6 +708,14 @@
707#define PM_CTRL1 0xFF44 708#define PM_CTRL1 0xFF44
708#define PM_CTRL2 0xFF45 709#define PM_CTRL2 0xFF45
709#define PM_CTRL3 0xFF46 710#define PM_CTRL3 0xFF46
711#define SDIO_SEND_PME_EN 0x80
712#define FORCE_RC_MODE_ON 0x40
713#define FORCE_RX50_LINK_ON 0x20
714#define D3_DELINK_MODE_EN 0x10
715#define USE_PESRTB_CTL_DELINK 0x08
716#define DELAY_PIN_WAKE 0x04
717#define RESET_PIN_WAKE 0x02
718#define PM_WAKE_EN 0x01
710#define PM_CTRL4 0xFF47 719#define PM_CTRL4 0xFF47
711 720
712/* Memory mapping */ 721/* Memory mapping */
@@ -752,6 +761,14 @@
752#define PHY_DUM_REG 0x1F 761#define PHY_DUM_REG 0x1F
753 762
754#define LCTLR 0x80 763#define LCTLR 0x80
764#define LCTLR_EXT_SYNC 0x80
765#define LCTLR_COMMON_CLOCK_CFG 0x40
766#define LCTLR_RETRAIN_LINK 0x20
767#define LCTLR_LINK_DISABLE 0x10
768#define LCTLR_RCB 0x08
769#define LCTLR_RESERVED 0x04
770#define LCTLR_ASPM_CTL_MASK 0x03
771
755#define PCR_SETTING_REG1 0x724 772#define PCR_SETTING_REG1 0x724
756#define PCR_SETTING_REG2 0x814 773#define PCR_SETTING_REG2 0x814
757#define PCR_SETTING_REG3 0x747 774#define PCR_SETTING_REG3 0x747
@@ -967,4 +984,24 @@ static inline u8 *rtsx_pci_get_cmd_data(struct rtsx_pcr *pcr)
967 return (u8 *)(pcr->host_cmds_ptr); 984 return (u8 *)(pcr->host_cmds_ptr);
968} 985}
969 986
987static inline int rtsx_pci_update_cfg_byte(struct rtsx_pcr *pcr, int addr,
988 u8 mask, u8 append)
989{
990 int err;
991 u8 val;
992
993 err = pci_read_config_byte(pcr->pci, addr, &val);
994 if (err < 0)
995 return err;
996 return pci_write_config_byte(pcr->pci, addr, (val & mask) | append);
997}
998
999static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val)
1000{
1001 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val >> 24);
1002 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val >> 16);
1003 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val >> 8);
1004 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val);
1005}
1006
970#endif 1007#endif
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index 1825edacbda7..3fdb7cfbffb3 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -28,6 +28,7 @@
28#define MIN_800_MV 800000 28#define MIN_800_MV 800000
29#define MIN_750_MV 750000 29#define MIN_750_MV 750000
30#define MIN_600_MV 600000 30#define MIN_600_MV 600000
31#define MIN_500_MV 500000
31 32
32/* Macros to represent steps for LDO/BUCK */ 33/* Macros to represent steps for LDO/BUCK */
33#define STEP_50_MV 50000 34#define STEP_50_MV 50000
@@ -41,6 +42,7 @@ enum sec_device_type {
41 S5M8767X, 42 S5M8767X,
42 S2MPA01, 43 S2MPA01,
43 S2MPS11X, 44 S2MPS11X,
45 S2MPS13X,
44 S2MPS14X, 46 S2MPS14X,
45 S2MPU02, 47 S2MPU02,
46}; 48};
diff --git a/include/linux/mfd/samsung/s2mps13.h b/include/linux/mfd/samsung/s2mps13.h
new file mode 100644
index 000000000000..ce5dda8958fe
--- /dev/null
+++ b/include/linux/mfd/samsung/s2mps13.h
@@ -0,0 +1,186 @@
1/*
2 * s2mps13.h
3 *
4 * Copyright (c) 2014 Samsung Electronics Co., Ltd
5 * http://www.samsung.com
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#ifndef __LINUX_MFD_S2MPS13_H
20#define __LINUX_MFD_S2MPS13_H
21
22/* S2MPS13 registers */
23enum s2mps13_reg {
24 S2MPS13_REG_ID,
25 S2MPS13_REG_INT1,
26 S2MPS13_REG_INT2,
27 S2MPS13_REG_INT3,
28 S2MPS13_REG_INT1M,
29 S2MPS13_REG_INT2M,
30 S2MPS13_REG_INT3M,
31 S2MPS13_REG_ST1,
32 S2MPS13_REG_ST2,
33 S2MPS13_REG_PWRONSRC,
34 S2MPS13_REG_OFFSRC,
35 S2MPS13_REG_BU_CHG,
36 S2MPS13_REG_RTCCTRL,
37 S2MPS13_REG_CTRL1,
38 S2MPS13_REG_CTRL2,
39 S2MPS13_REG_RSVD1,
40 S2MPS13_REG_RSVD2,
41 S2MPS13_REG_RSVD3,
42 S2MPS13_REG_RSVD4,
43 S2MPS13_REG_RSVD5,
44 S2MPS13_REG_RSVD6,
45 S2MPS13_REG_CTRL3,
46 S2MPS13_REG_RSVD7,
47 S2MPS13_REG_RSVD8,
48 S2MPS13_REG_WRSTBI,
49 S2MPS13_REG_B1CTRL,
50 S2MPS13_REG_B1OUT,
51 S2MPS13_REG_B2CTRL,
52 S2MPS13_REG_B2OUT,
53 S2MPS13_REG_B3CTRL,
54 S2MPS13_REG_B3OUT,
55 S2MPS13_REG_B4CTRL,
56 S2MPS13_REG_B4OUT,
57 S2MPS13_REG_B5CTRL,
58 S2MPS13_REG_B5OUT,
59 S2MPS13_REG_B6CTRL,
60 S2MPS13_REG_B6OUT,
61 S2MPS13_REG_B7CTRL,
62 S2MPS13_REG_B7OUT,
63 S2MPS13_REG_B8CTRL,
64 S2MPS13_REG_B8OUT,
65 S2MPS13_REG_B9CTRL,
66 S2MPS13_REG_B9OUT,
67 S2MPS13_REG_B10CTRL,
68 S2MPS13_REG_B10OUT,
69 S2MPS13_REG_BB1CTRL,
70 S2MPS13_REG_BB1OUT,
71 S2MPS13_REG_BUCK_RAMP1,
72 S2MPS13_REG_BUCK_RAMP2,
73 S2MPS13_REG_LDO_DVS1,
74 S2MPS13_REG_LDO_DVS2,
75 S2MPS13_REG_LDO_DVS3,
76 S2MPS13_REG_B6OUT2,
77 S2MPS13_REG_L1CTRL,
78 S2MPS13_REG_L2CTRL,
79 S2MPS13_REG_L3CTRL,
80 S2MPS13_REG_L4CTRL,
81 S2MPS13_REG_L5CTRL,
82 S2MPS13_REG_L6CTRL,
83 S2MPS13_REG_L7CTRL,
84 S2MPS13_REG_L8CTRL,
85 S2MPS13_REG_L9CTRL,
86 S2MPS13_REG_L10CTRL,
87 S2MPS13_REG_L11CTRL,
88 S2MPS13_REG_L12CTRL,
89 S2MPS13_REG_L13CTRL,
90 S2MPS13_REG_L14CTRL,
91 S2MPS13_REG_L15CTRL,
92 S2MPS13_REG_L16CTRL,
93 S2MPS13_REG_L17CTRL,
94 S2MPS13_REG_L18CTRL,
95 S2MPS13_REG_L19CTRL,
96 S2MPS13_REG_L20CTRL,
97 S2MPS13_REG_L21CTRL,
98 S2MPS13_REG_L22CTRL,
99 S2MPS13_REG_L23CTRL,
100 S2MPS13_REG_L24CTRL,
101 S2MPS13_REG_L25CTRL,
102 S2MPS13_REG_L26CTRL,
103 S2MPS13_REG_L27CTRL,
104 S2MPS13_REG_L28CTRL,
105 S2MPS13_REG_L30CTRL,
106 S2MPS13_REG_L31CTRL,
107 S2MPS13_REG_L32CTRL,
108 S2MPS13_REG_L33CTRL,
109 S2MPS13_REG_L34CTRL,
110 S2MPS13_REG_L35CTRL,
111 S2MPS13_REG_L36CTRL,
112 S2MPS13_REG_L37CTRL,
113 S2MPS13_REG_L38CTRL,
114 S2MPS13_REG_L39CTRL,
115 S2MPS13_REG_L40CTRL,
116 S2MPS13_REG_LDODSCH1,
117 S2MPS13_REG_LDODSCH2,
118 S2MPS13_REG_LDODSCH3,
119 S2MPS13_REG_LDODSCH4,
120 S2MPS13_REG_LDODSCH5,
121};
122
123/* regulator ids */
124enum s2mps13_regulators {
125 S2MPS13_LDO1,
126 S2MPS13_LDO2,
127 S2MPS13_LDO3,
128 S2MPS13_LDO4,
129 S2MPS13_LDO5,
130 S2MPS13_LDO6,
131 S2MPS13_LDO7,
132 S2MPS13_LDO8,
133 S2MPS13_LDO9,
134 S2MPS13_LDO10,
135 S2MPS13_LDO11,
136 S2MPS13_LDO12,
137 S2MPS13_LDO13,
138 S2MPS13_LDO14,
139 S2MPS13_LDO15,
140 S2MPS13_LDO16,
141 S2MPS13_LDO17,
142 S2MPS13_LDO18,
143 S2MPS13_LDO19,
144 S2MPS13_LDO20,
145 S2MPS13_LDO21,
146 S2MPS13_LDO22,
147 S2MPS13_LDO23,
148 S2MPS13_LDO24,
149 S2MPS13_LDO25,
150 S2MPS13_LDO26,
151 S2MPS13_LDO27,
152 S2MPS13_LDO28,
153 S2MPS13_LDO29,
154 S2MPS13_LDO30,
155 S2MPS13_LDO31,
156 S2MPS13_LDO32,
157 S2MPS13_LDO33,
158 S2MPS13_LDO34,
159 S2MPS13_LDO35,
160 S2MPS13_LDO36,
161 S2MPS13_LDO37,
162 S2MPS13_LDO38,
163 S2MPS13_LDO39,
164 S2MPS13_LDO40,
165 S2MPS13_BUCK1,
166 S2MPS13_BUCK2,
167 S2MPS13_BUCK3,
168 S2MPS13_BUCK4,
169 S2MPS13_BUCK5,
170 S2MPS13_BUCK6,
171 S2MPS13_BUCK7,
172 S2MPS13_BUCK8,
173 S2MPS13_BUCK9,
174 S2MPS13_BUCK10,
175
176 S2MPS13_REGULATOR_MAX,
177};
178
179/*
180 * Default ramp delay in uv/us. Datasheet says that ramp delay can be
181 * controlled however it does not specify which register is used for that.
182 * Let's assume that default value will be set.
183 */
184#define S2MPS13_BUCK_RAMP_DELAY 12500
185
186#endif /* __LINUX_MFD_S2MPS13_H */
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
index ff44374a1a4e..c877cad61a13 100644
--- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
+++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
@@ -395,4 +395,43 @@
395#define IMX6SL_GPR1_FEC_CLOCK_MUX1_SEL_MASK (0x3 << 17) 395#define IMX6SL_GPR1_FEC_CLOCK_MUX1_SEL_MASK (0x3 << 17)
396#define IMX6SL_GPR1_FEC_CLOCK_MUX2_SEL_MASK (0x1 << 14) 396#define IMX6SL_GPR1_FEC_CLOCK_MUX2_SEL_MASK (0x1 << 14)
397 397
398/* For imx6sx iomux gpr register field define */
399#define IMX6SX_GPR1_VDEC_SW_RST_MASK (0x1 << 20)
400#define IMX6SX_GPR1_VDEC_SW_RST_RESET (0x1 << 20)
401#define IMX6SX_GPR1_VDEC_SW_RST_RELEASE (0x0 << 20)
402#define IMX6SX_GPR1_VADC_SW_RST_MASK (0x1 << 19)
403#define IMX6SX_GPR1_VADC_SW_RST_RESET (0x1 << 19)
404#define IMX6SX_GPR1_VADC_SW_RST_RELEASE (0x0 << 19)
405#define IMX6SX_GPR1_FEC_CLOCK_MUX_SEL_MASK (0x3 << 13)
406#define IMX6SX_GPR1_FEC_CLOCK_PAD_DIR_MASK (0x3 << 17)
407#define IMX6SX_GPR1_FEC_CLOCK_MUX_SEL_EXT (0x3 << 13)
408
409#define IMX6SX_GPR4_FEC_ENET1_STOP_REQ (0x1 << 3)
410#define IMX6SX_GPR4_FEC_ENET2_STOP_REQ (0x1 << 4)
411
412#define IMX6SX_GPR5_DISP_MUX_LDB_CTRL_MASK (0x1 << 3)
413#define IMX6SX_GPR5_DISP_MUX_LDB_CTRL_LCDIF1 (0x0 << 3)
414#define IMX6SX_GPR5_DISP_MUX_LDB_CTRL_LCDIF2 (0x1 << 3)
415
416#define IMX6SX_GPR5_CSI2_MUX_CTRL_MASK (0x3 << 27)
417#define IMX6SX_GPR5_CSI2_MUX_CTRL_EXT_PIN (0x0 << 27)
418#define IMX6SX_GPR5_CSI2_MUX_CTRL_CVD (0x1 << 27)
419#define IMX6SX_GPR5_CSI2_MUX_CTRL_VDAC_TO_CSI (0x2 << 27)
420#define IMX6SX_GPR5_CSI2_MUX_CTRL_GND (0x3 << 27)
421#define IMX6SX_GPR5_VADC_TO_CSI_CAPTURE_EN_MASK (0x1 << 26)
422#define IMX6SX_GPR5_VADC_TO_CSI_CAPTURE_EN_ENABLE (0x1 << 26)
423#define IMX6SX_GPR5_VADC_TO_CSI_CAPTURE_EN_DISABLE (0x0 << 26)
424#define IMX6SX_GPR5_CSI1_MUX_CTRL_MASK (0x3 << 4)
425#define IMX6SX_GPR5_CSI1_MUX_CTRL_EXT_PIN (0x0 << 4)
426#define IMX6SX_GPR5_CSI1_MUX_CTRL_CVD (0x1 << 4)
427#define IMX6SX_GPR5_CSI1_MUX_CTRL_VDAC_TO_CSI (0x2 << 4)
428#define IMX6SX_GPR5_CSI1_MUX_CTRL_GND (0x3 << 4)
429
430#define IMX6SX_GPR5_DISP_MUX_DCIC2_LCDIF2 (0x0 << 2)
431#define IMX6SX_GPR5_DISP_MUX_DCIC2_LVDS (0x1 << 2)
432#define IMX6SX_GPR5_DISP_MUX_DCIC2_MASK (0x1 << 2)
433#define IMX6SX_GPR5_DISP_MUX_DCIC1_LCDIF1 (0x0 << 1)
434#define IMX6SX_GPR5_DISP_MUX_DCIC1_LVDS (0x1 << 1)
435#define IMX6SX_GPR5_DISP_MUX_DCIC1_MASK (0x1 << 1)
436
398#endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */ 437#endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */
diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h
index e6088c2e2092..e1c12d84c26a 100644
--- a/include/linux/mfd/tc3589x.h
+++ b/include/linux/mfd/tc3589x.h
@@ -164,13 +164,10 @@ struct tc3589x_keypad_platform_data {
164 164
165/** 165/**
166 * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data 166 * struct tc3589x_gpio_platform_data - TC3589x GPIO platform data
167 * @gpio_base: first gpio number assigned to TC3589x. A maximum of
168 * %TC3589x_NR_GPIOS GPIOs will be allocated.
169 * @setup: callback for board-specific initialization 167 * @setup: callback for board-specific initialization
170 * @remove: callback for board-specific teardown 168 * @remove: callback for board-specific teardown
171 */ 169 */
172struct tc3589x_gpio_platform_data { 170struct tc3589x_gpio_platform_data {
173 int gpio_base;
174 void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base); 171 void (*setup)(struct tc3589x *tc3589x, unsigned gpio_base);
175 void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base); 172 void (*remove)(struct tc3589x *tc3589x, unsigned gpio_base);
176}; 173};
@@ -178,18 +175,13 @@ struct tc3589x_gpio_platform_data {
178/** 175/**
179 * struct tc3589x_platform_data - TC3589x platform data 176 * struct tc3589x_platform_data - TC3589x platform data
180 * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*) 177 * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*)
181 * @irq_base: base IRQ number. %TC3589x_NR_IRQS irqs will be used.
182 * @gpio: GPIO-specific platform data 178 * @gpio: GPIO-specific platform data
183 * @keypad: keypad-specific platform data 179 * @keypad: keypad-specific platform data
184 */ 180 */
185struct tc3589x_platform_data { 181struct tc3589x_platform_data {
186 unsigned int block; 182 unsigned int block;
187 int irq_base;
188 struct tc3589x_gpio_platform_data *gpio; 183 struct tc3589x_gpio_platform_data *gpio;
189 const struct tc3589x_keypad_platform_data *keypad; 184 const struct tc3589x_keypad_platform_data *keypad;
190}; 185};
191 186
192#define TC3589x_NR_GPIOS 24
193#define TC3589x_NR_IRQS TC3589x_INT_GPIO(TC3589x_NR_GPIOS)
194
195#endif 187#endif
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index b0692d28f8e6..4d69c00497bd 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -88,6 +88,9 @@ struct mmc_ext_csd {
88 unsigned int data_tag_unit_size; /* DATA TAG UNIT size */ 88 unsigned int data_tag_unit_size; /* DATA TAG UNIT size */
89 unsigned int boot_ro_lock; /* ro lock support */ 89 unsigned int boot_ro_lock; /* ro lock support */
90 bool boot_ro_lockable; 90 bool boot_ro_lockable;
91 bool ffu_capable; /* Firmware upgrade support */
92#define MMC_FIRMWARE_LEN 8
93 u8 fwrev[MMC_FIRMWARE_LEN]; /* FW version */
91 u8 raw_exception_status; /* 54 */ 94 u8 raw_exception_status; /* 54 */
92 u8 raw_partition_support; /* 160 */ 95 u8 raw_partition_support; /* 160 */
93 u8 raw_rpmb_size_mult; /* 168 */ 96 u8 raw_rpmb_size_mult; /* 168 */
@@ -509,24 +512,8 @@ static inline int mmc_card_broken_irq_polling(const struct mmc_card *c)
509 512
510#define mmc_dev_to_card(d) container_of(d, struct mmc_card, dev) 513#define mmc_dev_to_card(d) container_of(d, struct mmc_card, dev)
511 514
512#define mmc_list_to_card(l) container_of(l, struct mmc_card, node) 515extern int mmc_register_driver(struct device_driver *);
513#define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev) 516extern void mmc_unregister_driver(struct device_driver *);
514#define mmc_set_drvdata(c,d) dev_set_drvdata(&(c)->dev, d)
515
516/*
517 * MMC device driver (e.g., Flash card, I/O card...)
518 */
519struct mmc_driver {
520 struct device_driver drv;
521 int (*probe)(struct mmc_card *);
522 void (*remove)(struct mmc_card *);
523 int (*suspend)(struct mmc_card *);
524 int (*resume)(struct mmc_card *);
525 void (*shutdown)(struct mmc_card *);
526};
527
528extern int mmc_register_driver(struct mmc_driver *);
529extern void mmc_unregister_driver(struct mmc_driver *);
530 517
531extern void mmc_fixup_device(struct mmc_card *card, 518extern void mmc_fixup_device(struct mmc_card *card,
532 const struct mmc_fixup *table); 519 const struct mmc_fixup *table);
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index f206e29f94d7..cb2b0400d284 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -154,7 +154,8 @@ extern void mmc_start_bkops(struct mmc_card *card, bool from_exception);
154extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool, 154extern int __mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int, bool,
155 bool, bool); 155 bool, bool);
156extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); 156extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int);
157extern int mmc_send_ext_csd(struct mmc_card *card, u8 *ext_csd); 157extern int mmc_send_tuning(struct mmc_host *host);
158extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd);
158 159
159#define MMC_ERASE_ARG 0x00000000 160#define MMC_ERASE_ARG 0x00000000
160#define MMC_SECURE_ERASE_ARG 0x80000000 161#define MMC_SECURE_ERASE_ARG 0x80000000
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 001366927cf4..42b724e8d503 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -54,6 +54,7 @@ struct mmc_data;
54 * transfer is in progress. 54 * transfer is in progress.
55 * @use_dma: Whether DMA channel is initialized or not. 55 * @use_dma: Whether DMA channel is initialized or not.
56 * @using_dma: Whether DMA is in use for the current transfer. 56 * @using_dma: Whether DMA is in use for the current transfer.
57 * @dma_64bit_address: Whether DMA supports 64-bit address mode or not.
57 * @sg_dma: Bus address of DMA buffer. 58 * @sg_dma: Bus address of DMA buffer.
58 * @sg_cpu: Virtual address of DMA buffer. 59 * @sg_cpu: Virtual address of DMA buffer.
59 * @dma_ops: Pointer to platform-specific DMA callbacks. 60 * @dma_ops: Pointer to platform-specific DMA callbacks.
@@ -96,6 +97,7 @@ struct mmc_data;
96 * @quirks: Set of quirks that apply to specific versions of the IP. 97 * @quirks: Set of quirks that apply to specific versions of the IP.
97 * @irq_flags: The flags to be passed to request_irq. 98 * @irq_flags: The flags to be passed to request_irq.
98 * @irq: The irq value to be passed to request_irq. 99 * @irq: The irq value to be passed to request_irq.
100 * @sdio_id0: Number of slot0 in the SDIO interrupt registers.
99 * 101 *
100 * Locking 102 * Locking
101 * ======= 103 * =======
@@ -135,11 +137,11 @@ struct dw_mci {
135 struct mmc_command stop_abort; 137 struct mmc_command stop_abort;
136 unsigned int prev_blksz; 138 unsigned int prev_blksz;
137 unsigned char timing; 139 unsigned char timing;
138 struct workqueue_struct *card_workqueue;
139 140
140 /* DMA interface members*/ 141 /* DMA interface members*/
141 int use_dma; 142 int use_dma;
142 int using_dma; 143 int using_dma;
144 int dma_64bit_address;
143 145
144 dma_addr_t sg_dma; 146 dma_addr_t sg_dma;
145 void *sg_cpu; 147 void *sg_cpu;
@@ -154,7 +156,6 @@ struct dw_mci {
154 u32 stop_cmdr; 156 u32 stop_cmdr;
155 u32 dir_status; 157 u32 dir_status;
156 struct tasklet_struct tasklet; 158 struct tasklet_struct tasklet;
157 struct work_struct card_work;
158 unsigned long pending_events; 159 unsigned long pending_events;
159 unsigned long completed_events; 160 unsigned long completed_events;
160 enum dw_mci_state state; 161 enum dw_mci_state state;
@@ -193,6 +194,8 @@ struct dw_mci {
193 bool vqmmc_enabled; 194 bool vqmmc_enabled;
194 unsigned long irq_flags; /* IRQ flags */ 195 unsigned long irq_flags; /* IRQ flags */
195 int irq; 196 int irq;
197
198 int sdio_id0;
196}; 199};
197 200
198/* DMA ops for Internal/External DMAC interface */ 201/* DMA ops for Internal/External DMAC interface */
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index df0c15396bbf..9f322706f7cb 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -289,6 +289,7 @@ struct mmc_host {
289#define MMC_CAP2_HS400_1_2V (1 << 16) /* Can support HS400 1.2V */ 289#define MMC_CAP2_HS400_1_2V (1 << 16) /* Can support HS400 1.2V */
290#define MMC_CAP2_HS400 (MMC_CAP2_HS400_1_8V | \ 290#define MMC_CAP2_HS400 (MMC_CAP2_HS400_1_8V | \
291 MMC_CAP2_HS400_1_2V) 291 MMC_CAP2_HS400_1_2V)
292#define MMC_CAP2_HSX00_1_2V (MMC_CAP2_HS200_1_2V_SDR | MMC_CAP2_HS400_1_2V)
292#define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17) 293#define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17)
293 294
294 mmc_pm_flag_t pm_caps; /* supported pm features */ 295 mmc_pm_flag_t pm_caps; /* supported pm features */
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 1cd00b3a75b9..49ad7a943638 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -296,6 +296,7 @@ struct _mmc_csd {
296#define EXT_CSD_SANITIZE_START 165 /* W */ 296#define EXT_CSD_SANITIZE_START 165 /* W */
297#define EXT_CSD_WR_REL_PARAM 166 /* RO */ 297#define EXT_CSD_WR_REL_PARAM 166 /* RO */
298#define EXT_CSD_RPMB_MULT 168 /* RO */ 298#define EXT_CSD_RPMB_MULT 168 /* RO */
299#define EXT_CSD_FW_CONFIG 169 /* R/W */
299#define EXT_CSD_BOOT_WP 173 /* R/W */ 300#define EXT_CSD_BOOT_WP 173 /* R/W */
300#define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ 301#define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */
301#define EXT_CSD_PART_CONFIG 179 /* R/W */ 302#define EXT_CSD_PART_CONFIG 179 /* R/W */
@@ -332,6 +333,8 @@ struct _mmc_csd {
332#define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */ 333#define EXT_CSD_GENERIC_CMD6_TIME 248 /* RO */
333#define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */ 334#define EXT_CSD_CACHE_SIZE 249 /* RO, 4 bytes */
334#define EXT_CSD_PWR_CL_DDR_200_360 253 /* RO */ 335#define EXT_CSD_PWR_CL_DDR_200_360 253 /* RO */
336#define EXT_CSD_FIRMWARE_VERSION 254 /* RO, 8 bytes */
337#define EXT_CSD_SUPPORTED_MODE 493 /* RO */
335#define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */ 338#define EXT_CSD_TAG_UNIT_SIZE 498 /* RO */
336#define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */ 339#define EXT_CSD_DATA_TAG_SUPPORT 499 /* RO */
337#define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */ 340#define EXT_CSD_MAX_PACKED_WRITES 500 /* RO */
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index dba793e3a331..375af80bde7d 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -100,6 +100,12 @@ struct sdhci_host {
100#define SDHCI_QUIRK2_BROKEN_DDR50 (1<<7) 100#define SDHCI_QUIRK2_BROKEN_DDR50 (1<<7)
101/* Stop command (CMD12) can set Transfer Complete when not using MMC_RSP_BUSY */ 101/* Stop command (CMD12) can set Transfer Complete when not using MMC_RSP_BUSY */
102#define SDHCI_QUIRK2_STOP_WITH_TC (1<<8) 102#define SDHCI_QUIRK2_STOP_WITH_TC (1<<8)
103/* Controller does not support 64-bit DMA */
104#define SDHCI_QUIRK2_BROKEN_64_BIT_DMA (1<<9)
105/* need clear transfer mode register before send cmd */
106#define SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD (1<<10)
107/* Capability register bit-63 indicates HS400 support */
108#define SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 (1<<11)
103 109
104 int irq; /* Device IRQ */ 110 int irq; /* Device IRQ */
105 void __iomem *ioaddr; /* Mapped address */ 111 void __iomem *ioaddr; /* Mapped address */
@@ -130,6 +136,7 @@ struct sdhci_host {
130#define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ 136#define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */
131#define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */ 137#define SDHCI_SDR104_NEEDS_TUNING (1<<10) /* SDR104/HS200 needs tuning */
132#define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */ 138#define SDHCI_USING_RETUNING_TIMER (1<<11) /* Host is using a retuning timer for the card */
139#define SDHCI_USE_64_BIT_DMA (1<<12) /* Use 64-bit DMA */
133 140
134 unsigned int version; /* SDHCI spec. version */ 141 unsigned int version; /* SDHCI spec. version */
135 142
@@ -155,12 +162,19 @@ struct sdhci_host {
155 162
156 int sg_count; /* Mapped sg entries */ 163 int sg_count; /* Mapped sg entries */
157 164
158 u8 *adma_desc; /* ADMA descriptor table */ 165 void *adma_table; /* ADMA descriptor table */
159 u8 *align_buffer; /* Bounce buffer */ 166 void *align_buffer; /* Bounce buffer */
167
168 size_t adma_table_sz; /* ADMA descriptor table size */
169 size_t align_buffer_sz; /* Bounce buffer size */
160 170
161 dma_addr_t adma_addr; /* Mapped ADMA descr. table */ 171 dma_addr_t adma_addr; /* Mapped ADMA descr. table */
162 dma_addr_t align_addr; /* Mapped bounce buffer */ 172 dma_addr_t align_addr; /* Mapped bounce buffer */
163 173
174 unsigned int desc_sz; /* ADMA descriptor size */
175 unsigned int align_sz; /* ADMA alignment */
176 unsigned int align_mask; /* ADMA alignment mask */
177
164 struct tasklet_struct finish_tasklet; /* Tasklet structures */ 178 struct tasklet_struct finish_tasklet; /* Tasklet structures */
165 179
166 struct timer_list timer; /* Timer for timeouts */ 180 struct timer_list timer; /* Timer for timeouts */
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index 50f0bc952328..aab032a6ae61 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -84,8 +84,6 @@ struct sdio_driver {
84 struct device_driver drv; 84 struct device_driver drv;
85}; 85};
86 86
87#define to_sdio_driver(d) container_of(d, struct sdio_driver, drv)
88
89/** 87/**
90 * SDIO_DEVICE - macro used to describe a specific SDIO device 88 * SDIO_DEVICE - macro used to describe a specific SDIO device
91 * @vend: the 16 bit manufacturer code 89 * @vend: the 16 bit manufacturer code
diff --git a/include/linux/of.h b/include/linux/of.h
index 29f0adc5f3e4..c55b50018ac4 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -922,4 +922,15 @@ static inline int of_changeset_update_property(struct of_changeset *ocs,
922/* CONFIG_OF_RESOLVE api */ 922/* CONFIG_OF_RESOLVE api */
923extern int of_resolve_phandles(struct device_node *tree); 923extern int of_resolve_phandles(struct device_node *tree);
924 924
925/**
926 * of_device_is_system_power_controller - Tells if system-power-controller is found for device_node
927 * @np: Pointer to the given device_node
928 *
929 * return true if present false otherwise
930 */
931static inline bool of_device_is_system_power_controller(const struct device_node *np)
932{
933 return of_property_read_bool(np, "system-power-controller");
934}
935
925#endif /* _LINUX_OF_H */ 936#endif /* _LINUX_OF_H */
diff --git a/include/linux/omap-gpmc.h b/include/linux/omap-gpmc.h
new file mode 100644
index 000000000000..c2080eebbb47
--- /dev/null
+++ b/include/linux/omap-gpmc.h
@@ -0,0 +1,199 @@
1/*
2 * OMAP GPMC (General Purpose Memory Controller) defines
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 */
9
10/* Maximum Number of Chip Selects */
11#define GPMC_CS_NUM 8
12
13#define GPMC_CONFIG_WP 0x00000005
14
15#define GPMC_IRQ_FIFOEVENTENABLE 0x01
16#define GPMC_IRQ_COUNT_EVENT 0x02
17
18#define GPMC_BURST_4 4 /* 4 word burst */
19#define GPMC_BURST_8 8 /* 8 word burst */
20#define GPMC_BURST_16 16 /* 16 word burst */
21#define GPMC_DEVWIDTH_8BIT 1 /* 8-bit device width */
22#define GPMC_DEVWIDTH_16BIT 2 /* 16-bit device width */
23#define GPMC_MUX_AAD 1 /* Addr-Addr-Data multiplex */
24#define GPMC_MUX_AD 2 /* Addr-Data multiplex */
25
26/* bool type time settings */
27struct gpmc_bool_timings {
28 bool cycle2cyclediffcsen;
29 bool cycle2cyclesamecsen;
30 bool we_extra_delay;
31 bool oe_extra_delay;
32 bool adv_extra_delay;
33 bool cs_extra_delay;
34 bool time_para_granularity;
35};
36
37/*
38 * Note that all values in this struct are in nanoseconds except sync_clk
39 * (which is in picoseconds), while the register values are in gpmc_fck cycles.
40 */
41struct gpmc_timings {
42 /* Minimum clock period for synchronous mode (in picoseconds) */
43 u32 sync_clk;
44
45 /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */
46 u32 cs_on; /* Assertion time */
47 u32 cs_rd_off; /* Read deassertion time */
48 u32 cs_wr_off; /* Write deassertion time */
49
50 /* ADV signal timings corresponding to GPMC_CONFIG3 */
51 u32 adv_on; /* Assertion time */
52 u32 adv_rd_off; /* Read deassertion time */
53 u32 adv_wr_off; /* Write deassertion time */
54
55 /* WE signals timings corresponding to GPMC_CONFIG4 */
56 u32 we_on; /* WE assertion time */
57 u32 we_off; /* WE deassertion time */
58
59 /* OE signals timings corresponding to GPMC_CONFIG4 */
60 u32 oe_on; /* OE assertion time */
61 u32 oe_off; /* OE deassertion time */
62
63 /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */
64 u32 page_burst_access; /* Multiple access word delay */
65 u32 access; /* Start-cycle to first data valid delay */
66 u32 rd_cycle; /* Total read cycle time */
67 u32 wr_cycle; /* Total write cycle time */
68
69 u32 bus_turnaround;
70 u32 cycle2cycle_delay;
71
72 u32 wait_monitoring;
73 u32 clk_activation;
74
75 /* The following are only on OMAP3430 */
76 u32 wr_access; /* WRACCESSTIME */
77 u32 wr_data_mux_bus; /* WRDATAONADMUXBUS */
78
79 struct gpmc_bool_timings bool_timings;
80};
81
82/* Device timings in picoseconds */
83struct gpmc_device_timings {
84 u32 t_ceasu; /* address setup to CS valid */
85 u32 t_avdasu; /* address setup to ADV valid */
86 /* XXX: try to combine t_avdp_r & t_avdp_w. Issue is
87 * of tusb using these timings even for sync whilst
88 * ideally for adv_rd/(wr)_off it should have considered
89 * t_avdh instead. This indirectly necessitates r/w
90 * variations of t_avdp as it is possible to have one
91 * sync & other async
92 */
93 u32 t_avdp_r; /* ADV low time (what about t_cer ?) */
94 u32 t_avdp_w;
95 u32 t_aavdh; /* address hold time */
96 u32 t_oeasu; /* address setup to OE valid */
97 u32 t_aa; /* access time from ADV assertion */
98 u32 t_iaa; /* initial access time */
99 u32 t_oe; /* access time from OE assertion */
100 u32 t_ce; /* access time from CS asertion */
101 u32 t_rd_cycle; /* read cycle time */
102 u32 t_cez_r; /* read CS deassertion to high Z */
103 u32 t_cez_w; /* write CS deassertion to high Z */
104 u32 t_oez; /* OE deassertion to high Z */
105 u32 t_weasu; /* address setup to WE valid */
106 u32 t_wpl; /* write assertion time */
107 u32 t_wph; /* write deassertion time */
108 u32 t_wr_cycle; /* write cycle time */
109
110 u32 clk;
111 u32 t_bacc; /* burst access valid clock to output delay */
112 u32 t_ces; /* CS setup time to clk */
113 u32 t_avds; /* ADV setup time to clk */
114 u32 t_avdh; /* ADV hold time from clk */
115 u32 t_ach; /* address hold time from clk */
116 u32 t_rdyo; /* clk to ready valid */
117
118 u32 t_ce_rdyz; /* XXX: description ?, or use t_cez instead */
119 u32 t_ce_avd; /* CS on to ADV on delay */
120
121 /* XXX: check the possibility of combining
122 * cyc_aavhd_oe & cyc_aavdh_we
123 */
124 u8 cyc_aavdh_oe;/* read address hold time in cycles */
125 u8 cyc_aavdh_we;/* write address hold time in cycles */
126 u8 cyc_oe; /* access time from OE assertion in cycles */
127 u8 cyc_wpl; /* write deassertion time in cycles */
128 u32 cyc_iaa; /* initial access time in cycles */
129
130 /* extra delays */
131 bool ce_xdelay;
132 bool avd_xdelay;
133 bool oe_xdelay;
134 bool we_xdelay;
135};
136
137struct gpmc_settings {
138 bool burst_wrap; /* enables wrap bursting */
139 bool burst_read; /* enables read page/burst mode */
140 bool burst_write; /* enables write page/burst mode */
141 bool device_nand; /* device is NAND */
142 bool sync_read; /* enables synchronous reads */
143 bool sync_write; /* enables synchronous writes */
144 bool wait_on_read; /* monitor wait on reads */
145 bool wait_on_write; /* monitor wait on writes */
146 u32 burst_len; /* page/burst length */
147 u32 device_width; /* device bus width (8 or 16 bit) */
148 u32 mux_add_data; /* multiplex address & data */
149 u32 wait_pin; /* wait-pin to be used */
150};
151
152extern int gpmc_calc_timings(struct gpmc_timings *gpmc_t,
153 struct gpmc_settings *gpmc_s,
154 struct gpmc_device_timings *dev_t);
155
156struct gpmc_nand_regs;
157struct device_node;
158
159extern void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs);
160extern int gpmc_get_client_irq(unsigned irq_config);
161
162extern unsigned int gpmc_ticks_to_ns(unsigned int ticks);
163
164extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
165extern int gpmc_calc_divider(unsigned int sync_clk);
166extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t);
167extern int gpmc_cs_program_settings(int cs, struct gpmc_settings *p);
168extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
169extern void gpmc_cs_free(int cs);
170extern int gpmc_configure(int cmd, int wval);
171extern void gpmc_read_settings_dt(struct device_node *np,
172 struct gpmc_settings *p);
173
174extern void omap3_gpmc_save_context(void);
175extern void omap3_gpmc_restore_context(void);
176
177struct gpmc_timings;
178struct omap_nand_platform_data;
179struct omap_onenand_platform_data;
180
181#if IS_ENABLED(CONFIG_MTD_NAND_OMAP2)
182extern int gpmc_nand_init(struct omap_nand_platform_data *d,
183 struct gpmc_timings *gpmc_t);
184#else
185static inline int gpmc_nand_init(struct omap_nand_platform_data *d,
186 struct gpmc_timings *gpmc_t)
187{
188 return 0;
189}
190#endif
191
192#if IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2)
193extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
194#else
195#define board_onenand_data NULL
196static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
197{
198}
199#endif
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 1fa99a301817..97fb9f69aaed 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -522,6 +522,8 @@
522#define PCI_DEVICE_ID_AMD_15H_M10H_F3 0x1403 522#define PCI_DEVICE_ID_AMD_15H_M10H_F3 0x1403
523#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F3 0x141d 523#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F3 0x141d
524#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 0x141e 524#define PCI_DEVICE_ID_AMD_15H_M30H_NB_F4 0x141e
525#define PCI_DEVICE_ID_AMD_15H_M60H_NB_F3 0x1573
526#define PCI_DEVICE_ID_AMD_15H_M60H_NB_F4 0x1574
525#define PCI_DEVICE_ID_AMD_15H_NB_F0 0x1600 527#define PCI_DEVICE_ID_AMD_15H_NB_F0 0x1600
526#define PCI_DEVICE_ID_AMD_15H_NB_F1 0x1601 528#define PCI_DEVICE_ID_AMD_15H_NB_F1 0x1601
527#define PCI_DEVICE_ID_AMD_15H_NB_F2 0x1602 529#define PCI_DEVICE_ID_AMD_15H_NB_F2 0x1602
diff --git a/include/linux/platform_data/hsmmc-omap.h b/include/linux/platform_data/hsmmc-omap.h
new file mode 100644
index 000000000000..67bbcf0785f6
--- /dev/null
+++ b/include/linux/platform_data/hsmmc-omap.h
@@ -0,0 +1,90 @@
1/*
2 * MMC definitions for OMAP2
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11/*
12 * struct omap_hsmmc_dev_attr.flags possibilities
13 *
14 * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can
15 * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag
16 * should be set if this is the case. See for example Section 22.5.3
17 * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia
18 * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R).
19 *
20 * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers
21 * don't work correctly on some MMC controller instances on some
22 * OMAP3 SoCs; this flag should be set if this is the case. See
23 * for example Advisory 2.1.1.128 "MMC: Multiple Block Read
24 * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_
25 * Revision F (October 2010) (SPRZ278F).
26 */
27#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0)
28#define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1)
29#define OMAP_HSMMC_SWAKEUP_MISSING BIT(2)
30
31struct omap_hsmmc_dev_attr {
32 u8 flags;
33};
34
35struct mmc_card;
36
37struct omap_hsmmc_platform_data {
38 /* back-link to device */
39 struct device *dev;
40
41 /* set if your board has components or wiring that limits the
42 * maximum frequency on the MMC bus */
43 unsigned int max_freq;
44
45 /* Integrating attributes from the omap_hwmod layer */
46 u8 controller_flags;
47
48 /* Register offset deviation */
49 u16 reg_offset;
50
51 /*
52 * 4/8 wires and any additional host capabilities
53 * need to OR'd all capabilities (ref. linux/mmc/host.h)
54 */
55 u32 caps; /* Used for the MMC driver on 2430 and later */
56 u32 pm_caps; /* PM capabilities of the mmc */
57
58 /* switch pin can be for card detect (default) or card cover */
59 unsigned cover:1;
60
61 /* use the internal clock */
62 unsigned internal_clock:1;
63
64 /* nonremovable e.g. eMMC */
65 unsigned nonremovable:1;
66
67 /* eMMC does not handle power off when not in sleep state */
68 unsigned no_regulator_off_init:1;
69
70 /* we can put the features above into this variable */
71#define HSMMC_HAS_PBIAS (1 << 0)
72#define HSMMC_HAS_UPDATED_RESET (1 << 1)
73#define HSMMC_HAS_HSPE_SUPPORT (1 << 2)
74 unsigned features;
75
76 int switch_pin; /* gpio (card detect) */
77 int gpio_wp; /* gpio (write protect) */
78
79 int (*set_power)(struct device *dev, int power_on, int vdd);
80 void (*remux)(struct device *dev, int power_on);
81 /* Call back before enabling / disabling regulators */
82 void (*before_set_reg)(struct device *dev, int power_on, int vdd);
83 /* Call back after enabling / disabling regulators */
84 void (*after_set_reg)(struct device *dev, int power_on, int vdd);
85 /* if we have special card, init it using this callback */
86 void (*init_card)(struct mmc_card *card);
87
88 const char *name;
89 u32 ocr_mask;
90};
diff --git a/include/linux/platform_data/mmc-atmel-mci.h b/include/linux/platform_data/mmc-atmel-mci.h
new file mode 100644
index 000000000000..399a2d5a14bd
--- /dev/null
+++ b/include/linux/platform_data/mmc-atmel-mci.h
@@ -0,0 +1,22 @@
1#ifndef __MMC_ATMEL_MCI_H
2#define __MMC_ATMEL_MCI_H
3
4#include <linux/platform_data/dma-atmel.h>
5#include <linux/platform_data/dma-dw.h>
6
7/**
8 * struct mci_dma_data - DMA data for MCI interface
9 */
10struct mci_dma_data {
11#ifdef CONFIG_ARM
12 struct at_dma_slave sdata;
13#else
14 struct dw_dma_slave sdata;
15#endif
16};
17
18/* accessor macros */
19#define slave_data_ptr(s) (&(s)->sdata)
20#define find_slave_dev(s) ((s)->sdata.dma_dev)
21
22#endif /* __MMC_ATMEL_MCI_H */
diff --git a/include/linux/platform_data/mmc-omap.h b/include/linux/platform_data/mmc-omap.h
index 51e70cf25cbc..5c188f4e9bec 100644
--- a/include/linux/platform_data/mmc-omap.h
+++ b/include/linux/platform_data/mmc-omap.h
@@ -10,32 +10,8 @@
10 10
11#define OMAP_MMC_MAX_SLOTS 2 11#define OMAP_MMC_MAX_SLOTS 2
12 12
13/*
14 * struct omap_mmc_dev_attr.flags possibilities
15 *
16 * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can
17 * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag
18 * should be set if this is the case. See for example Section 22.5.3
19 * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia
20 * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R).
21 *
22 * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers
23 * don't work correctly on some MMC controller instances on some
24 * OMAP3 SoCs; this flag should be set if this is the case. See
25 * for example Advisory 2.1.1.128 "MMC: Multiple Block Read
26 * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_
27 * Revision F (October 2010) (SPRZ278F).
28 */
29#define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0)
30#define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1)
31#define OMAP_HSMMC_SWAKEUP_MISSING BIT(2)
32
33struct mmc_card; 13struct mmc_card;
34 14
35struct omap_mmc_dev_attr {
36 u8 flags;
37};
38
39struct omap_mmc_platform_data { 15struct omap_mmc_platform_data {
40 /* back-link to device */ 16 /* back-link to device */
41 struct device *dev; 17 struct device *dev;
@@ -106,9 +82,6 @@ struct omap_mmc_platform_data {
106 unsigned vcc_aux_disable_is_sleep:1; 82 unsigned vcc_aux_disable_is_sleep:1;
107 83
108 /* we can put the features above into this variable */ 84 /* we can put the features above into this variable */
109#define HSMMC_HAS_PBIAS (1 << 0)
110#define HSMMC_HAS_UPDATED_RESET (1 << 1)
111#define HSMMC_HAS_HSPE_SUPPORT (1 << 2)
112#define MMC_OMAP7XX (1 << 3) 85#define MMC_OMAP7XX (1 << 3)
113#define MMC_OMAP15XX (1 << 4) 86#define MMC_OMAP15XX (1 << 4)
114#define MMC_OMAP16XX (1 << 5) 87#define MMC_OMAP16XX (1 << 5)
diff --git a/include/linux/platform_data/pxa_sdhci.h b/include/linux/platform_data/pxa_sdhci.h
index 27d3156d093a..9e20c2fb4ffd 100644
--- a/include/linux/platform_data/pxa_sdhci.h
+++ b/include/linux/platform_data/pxa_sdhci.h
@@ -55,9 +55,4 @@ struct sdhci_pxa_platdata {
55 unsigned int quirks2; 55 unsigned int quirks2;
56 unsigned int pm_caps; 56 unsigned int pm_caps;
57}; 57};
58
59struct sdhci_pxa {
60 u8 clk_enable;
61 u8 power_mode;
62};
63#endif /* _PXA_SDHCI_H_ */ 58#endif /* _PXA_SDHCI_H_ */
diff --git a/include/linux/platform_data/serial-omap.h b/include/linux/platform_data/serial-omap.h
index c860c1b314c0..d09275f3cde3 100644
--- a/include/linux/platform_data/serial-omap.h
+++ b/include/linux/platform_data/serial-omap.h
@@ -38,9 +38,6 @@ struct omap_uart_port_info {
38 unsigned int dma_rx_timeout; 38 unsigned int dma_rx_timeout;
39 unsigned int autosuspend_timeout; 39 unsigned int autosuspend_timeout;
40 unsigned int dma_rx_poll_rate; 40 unsigned int dma_rx_poll_rate;
41 int DTR_gpio;
42 int DTR_inverted;
43 int DTR_present;
44 41
45 int (*get_context_loss_count)(struct device *); 42 int (*get_context_loss_count)(struct device *);
46 void (*enable_wakeup)(struct device *, bool); 43 void (*enable_wakeup)(struct device *, bool);
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index c5ed83f49c4e..4419b99d8d6e 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -27,6 +27,7 @@ struct spmi_device;
27struct regmap; 27struct regmap;
28struct regmap_range_cfg; 28struct regmap_range_cfg;
29struct regmap_field; 29struct regmap_field;
30struct snd_ac97;
30 31
31/* An enum of all the supported cache types */ 32/* An enum of all the supported cache types */
32enum regcache_type { 33enum regcache_type {
@@ -340,6 +341,8 @@ struct regmap *regmap_init_spmi_ext(struct spmi_device *dev,
340struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id, 341struct regmap *regmap_init_mmio_clk(struct device *dev, const char *clk_id,
341 void __iomem *regs, 342 void __iomem *regs,
342 const struct regmap_config *config); 343 const struct regmap_config *config);
344struct regmap *regmap_init_ac97(struct snd_ac97 *ac97,
345 const struct regmap_config *config);
343 346
344struct regmap *devm_regmap_init(struct device *dev, 347struct regmap *devm_regmap_init(struct device *dev,
345 const struct regmap_bus *bus, 348 const struct regmap_bus *bus,
@@ -356,6 +359,10 @@ struct regmap *devm_regmap_init_spmi_ext(struct spmi_device *dev,
356struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id, 359struct regmap *devm_regmap_init_mmio_clk(struct device *dev, const char *clk_id,
357 void __iomem *regs, 360 void __iomem *regs,
358 const struct regmap_config *config); 361 const struct regmap_config *config);
362struct regmap *devm_regmap_init_ac97(struct snd_ac97 *ac97,
363 const struct regmap_config *config);
364
365bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
359 366
360/** 367/**
361 * regmap_init_mmio(): Initialise register map 368 * regmap_init_mmio(): Initialise register map
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index f540b1496e2f..d17e1ff7ad01 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -101,6 +101,8 @@ struct regmap;
101 * Data passed is "struct pre_voltage_change_data" 101 * Data passed is "struct pre_voltage_change_data"
102 * ABORT_VOLTAGE_CHANGE Regulator voltage change failed for some reason. 102 * ABORT_VOLTAGE_CHANGE Regulator voltage change failed for some reason.
103 * Data passed is old voltage cast to (void *). 103 * Data passed is old voltage cast to (void *).
104 * PRE_DISABLE Regulator is about to be disabled
105 * ABORT_DISABLE Regulator disable failed for some reason
104 * 106 *
105 * NOTE: These events can be OR'ed together when passed into handler. 107 * NOTE: These events can be OR'ed together when passed into handler.
106 */ 108 */
@@ -115,6 +117,8 @@ struct regmap;
115#define REGULATOR_EVENT_DISABLE 0x80 117#define REGULATOR_EVENT_DISABLE 0x80
116#define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE 0x100 118#define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE 0x100
117#define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 119#define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200
120#define REGULATOR_EVENT_PRE_DISABLE 0x400
121#define REGULATOR_EVENT_ABORT_DISABLE 0x800
118 122
119/** 123/**
120 * struct pre_voltage_change_data - Data sent with PRE_VOLTAGE_CHANGE event 124 * struct pre_voltage_change_data - Data sent with PRE_VOLTAGE_CHANGE event
@@ -284,7 +288,7 @@ devm_regulator_get(struct device *dev, const char *id)
284static inline struct regulator *__must_check 288static inline struct regulator *__must_check
285regulator_get_exclusive(struct device *dev, const char *id) 289regulator_get_exclusive(struct device *dev, const char *id)
286{ 290{
287 return NULL; 291 return ERR_PTR(-ENODEV);
288} 292}
289 293
290static inline struct regulator *__must_check 294static inline struct regulator *__must_check
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index fc0ee0ce8325..5f1e9ca47417 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -243,6 +243,8 @@ enum regulator_type {
243 * 243 *
244 * @enable_time: Time taken for initial enable of regulator (in uS). 244 * @enable_time: Time taken for initial enable of regulator (in uS).
245 * @off_on_delay: guard time (in uS), before re-enabling a regulator 245 * @off_on_delay: guard time (in uS), before re-enabling a regulator
246 *
247 * @of_map_mode: Maps a hardware mode defined in a DeviceTree to a standard mode
246 */ 248 */
247struct regulator_desc { 249struct regulator_desc {
248 const char *name; 250 const char *name;
@@ -285,6 +287,8 @@ struct regulator_desc {
285 unsigned int enable_time; 287 unsigned int enable_time;
286 288
287 unsigned int off_on_delay; 289 unsigned int off_on_delay;
290
291 unsigned int (*of_map_mode)(unsigned int mode);
288}; 292};
289 293
290/** 294/**
@@ -301,6 +305,9 @@ struct regulator_desc {
301 * NULL). 305 * NULL).
302 * @regmap: regmap to use for core regmap helpers if dev_get_regulator() is 306 * @regmap: regmap to use for core regmap helpers if dev_get_regulator() is
303 * insufficient. 307 * insufficient.
308 * @ena_gpio_initialized: GPIO controlling regulator enable was properly
309 * initialized, meaning that >= 0 is a valid gpio
310 * identifier and < 0 is a non existent gpio.
304 * @ena_gpio: GPIO controlling regulator enable. 311 * @ena_gpio: GPIO controlling regulator enable.
305 * @ena_gpio_invert: Sense for GPIO enable control. 312 * @ena_gpio_invert: Sense for GPIO enable control.
306 * @ena_gpio_flags: Flags to use when calling gpio_request_one() 313 * @ena_gpio_flags: Flags to use when calling gpio_request_one()
@@ -312,6 +319,7 @@ struct regulator_config {
312 struct device_node *of_node; 319 struct device_node *of_node;
313 struct regmap *regmap; 320 struct regmap *regmap;
314 321
322 bool ena_gpio_initialized;
315 int ena_gpio; 323 int ena_gpio;
316 unsigned int ena_gpio_invert:1; 324 unsigned int ena_gpio_invert:1;
317 unsigned int ena_gpio_flags; 325 unsigned int ena_gpio_flags;
diff --git a/include/linux/regulator/of_regulator.h b/include/linux/regulator/of_regulator.h
index f9217965aaa3..763953f7e3b8 100644
--- a/include/linux/regulator/of_regulator.h
+++ b/include/linux/regulator/of_regulator.h
@@ -6,24 +6,29 @@
6#ifndef __LINUX_OF_REG_H 6#ifndef __LINUX_OF_REG_H
7#define __LINUX_OF_REG_H 7#define __LINUX_OF_REG_H
8 8
9struct regulator_desc;
10
9struct of_regulator_match { 11struct of_regulator_match {
10 const char *name; 12 const char *name;
11 void *driver_data; 13 void *driver_data;
12 struct regulator_init_data *init_data; 14 struct regulator_init_data *init_data;
13 struct device_node *of_node; 15 struct device_node *of_node;
16 const struct regulator_desc *desc;
14}; 17};
15 18
16#if defined(CONFIG_OF) 19#if defined(CONFIG_OF)
17extern struct regulator_init_data 20extern struct regulator_init_data
18 *of_get_regulator_init_data(struct device *dev, 21 *of_get_regulator_init_data(struct device *dev,
19 struct device_node *node); 22 struct device_node *node,
23 const struct regulator_desc *desc);
20extern int of_regulator_match(struct device *dev, struct device_node *node, 24extern int of_regulator_match(struct device *dev, struct device_node *node,
21 struct of_regulator_match *matches, 25 struct of_regulator_match *matches,
22 unsigned int num_matches); 26 unsigned int num_matches);
23#else 27#else
24static inline struct regulator_init_data 28static inline struct regulator_init_data
25 *of_get_regulator_init_data(struct device *dev, 29 *of_get_regulator_init_data(struct device *dev,
26 struct device_node *node) 30 struct device_node *node,
31 const struct regulator_desc *desc)
27{ 32{
28 return NULL; 33 return NULL;
29} 34}
diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h
index 41a4695fde08..ce6b962ffed4 100644
--- a/include/linux/reset-controller.h
+++ b/include/linux/reset-controller.h
@@ -12,11 +12,13 @@ struct reset_controller_dev;
12 * things to reset the device 12 * things to reset the device
13 * @assert: manually assert the reset line, if supported 13 * @assert: manually assert the reset line, if supported
14 * @deassert: manually deassert the reset line, if supported 14 * @deassert: manually deassert the reset line, if supported
15 * @status: return the status of the reset line, if supported
15 */ 16 */
16struct reset_control_ops { 17struct reset_control_ops {
17 int (*reset)(struct reset_controller_dev *rcdev, unsigned long id); 18 int (*reset)(struct reset_controller_dev *rcdev, unsigned long id);
18 int (*assert)(struct reset_controller_dev *rcdev, unsigned long id); 19 int (*assert)(struct reset_controller_dev *rcdev, unsigned long id);
19 int (*deassert)(struct reset_controller_dev *rcdev, unsigned long id); 20 int (*deassert)(struct reset_controller_dev *rcdev, unsigned long id);
21 int (*status)(struct reset_controller_dev *rcdev, unsigned long id);
20}; 22};
21 23
22struct module; 24struct module;
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 349f150ae12c..da5602bd77d7 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -10,6 +10,7 @@ struct reset_control;
10int reset_control_reset(struct reset_control *rstc); 10int reset_control_reset(struct reset_control *rstc);
11int reset_control_assert(struct reset_control *rstc); 11int reset_control_assert(struct reset_control *rstc);
12int reset_control_deassert(struct reset_control *rstc); 12int reset_control_deassert(struct reset_control *rstc);
13int reset_control_status(struct reset_control *rstc);
13 14
14struct reset_control *reset_control_get(struct device *dev, const char *id); 15struct reset_control *reset_control_get(struct device *dev, const char *id);
15void reset_control_put(struct reset_control *rstc); 16void reset_control_put(struct reset_control *rstc);
@@ -57,6 +58,12 @@ static inline int reset_control_deassert(struct reset_control *rstc)
57 return 0; 58 return 0;
58} 59}
59 60
61static inline int reset_control_status(struct reset_control *rstc)
62{
63 WARN_ON(1);
64 return 0;
65}
66
60static inline void reset_control_put(struct reset_control *rstc) 67static inline void reset_control_put(struct reset_control *rstc)
61{ 68{
62 WARN_ON(1); 69 WARN_ON(1);
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h
index a4c9547aae64..f8e76e08ebe4 100644
--- a/include/linux/vexpress.h
+++ b/include/linux/vexpress.h
@@ -15,8 +15,6 @@
15#define _LINUX_VEXPRESS_H 15#define _LINUX_VEXPRESS_H
16 16
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/platform_device.h>
19#include <linux/reboot.h>
20#include <linux/regmap.h> 18#include <linux/regmap.h>
21 19
22#define VEXPRESS_SITE_MB 0 20#define VEXPRESS_SITE_MB 0
@@ -24,13 +22,6 @@
24#define VEXPRESS_SITE_DB2 2 22#define VEXPRESS_SITE_DB2 2
25#define VEXPRESS_SITE_MASTER 0xf 23#define VEXPRESS_SITE_MASTER 0xf
26 24
27#define VEXPRESS_RES_FUNC(_site, _func) \
28{ \
29 .start = (_site), \
30 .end = (_func), \
31 .flags = IORESOURCE_BUS, \
32}
33
34/* Config infrastructure */ 25/* Config infrastructure */
35 26
36void vexpress_config_set_master(u32 site); 27void vexpress_config_set_master(u32 site);
@@ -58,16 +49,6 @@ struct regmap *devm_regmap_init_vexpress_config(struct device *dev);
58 49
59/* Platform control */ 50/* Platform control */
60 51
61unsigned int vexpress_get_mci_cardin(struct device *dev);
62u32 vexpress_get_procid(int site);
63void *vexpress_get_24mhz_clock_base(void);
64void vexpress_flags_set(u32 data); 52void vexpress_flags_set(u32 data);
65 53
66void vexpress_sysreg_early_init(void __iomem *base);
67int vexpress_syscfg_device_register(struct platform_device *pdev);
68
69/* Clocks */
70
71void vexpress_clk_init(void __iomem *sp810_base);
72
73#endif 54#endif