blob: f6cac8eb90bfd542f70b07862a1e6e07808befb4 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Vikas Manochabf1ae442017-04-10 15:02:51 -07002/*
Patrice Chotard3bc599c2017-10-23 09:53:58 +02003 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
4 * Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics.
Vikas Manochabf1ae442017-04-10 15:02:51 -07005 */
6
7#include <common.h>
Vikas Manochad0b24c12017-04-10 15:02:55 -07008#include <clk.h>
Vikas Manocha910a52e2017-04-10 15:02:52 -07009#include <dm.h>
10#include <ram.h>
Vikas Manochabf1ae442017-04-10 15:02:51 -070011#include <asm/io.h>
Vikas Manochabf1ae442017-04-10 15:02:51 -070012
Patrice Chotard0b3f7892017-12-12 09:49:41 +010013#define MEM_MODE_MASK GENMASK(2, 0)
Radoslaw Pietrzyk246a5e52018-05-16 17:27:11 +020014#define SWP_FMC_OFFSET 10
15#define SWP_FMC_MASK GENMASK(SWP_FMC_OFFSET+1, SWP_FMC_OFFSET)
Patrice Chotard0b3f7892017-12-12 09:49:41 +010016#define NOT_FOUND 0xff
17
Patrice Chotard9242ece2017-07-18 17:37:24 +020018struct stm32_fmc_regs {
Patrice Chotard1421e0a2017-07-18 17:37:25 +020019 /* 0x0 */
20 u32 bcr1; /* NOR/PSRAM Chip select control register 1 */
21 u32 btr1; /* SRAM/NOR-Flash Chip select timing register 1 */
22 u32 bcr2; /* NOR/PSRAM Chip select Control register 2 */
23 u32 btr2; /* SRAM/NOR-Flash Chip select timing register 2 */
24 u32 bcr3; /* NOR/PSRAMChip select Control register 3 */
25 u32 btr3; /* SRAM/NOR-Flash Chip select timing register 3 */
26 u32 bcr4; /* NOR/PSRAM Chip select Control register 4 */
27 u32 btr4; /* SRAM/NOR-Flash Chip select timing register 4 */
28 u32 reserved1[24];
Patrice Chotard9242ece2017-07-18 17:37:24 +020029
Patrice Chotard1421e0a2017-07-18 17:37:25 +020030 /* 0x80 */
31 u32 pcr; /* NAND Flash control register */
32 u32 sr; /* FIFO status and interrupt register */
33 u32 pmem; /* Common memory space timing register */
34 u32 patt; /* Attribute memory space timing registers */
35 u32 reserved2[1];
36 u32 eccr; /* ECC result registers */
37 u32 reserved3[27];
38
39 /* 0x104 */
40 u32 bwtr1; /* SRAM/NOR-Flash write timing register 1 */
41 u32 reserved4[1];
42 u32 bwtr2; /* SRAM/NOR-Flash write timing register 2 */
43 u32 reserved5[1];
44 u32 bwtr3; /* SRAM/NOR-Flash write timing register 3 */
45 u32 reserved6[1];
46 u32 bwtr4; /* SRAM/NOR-Flash write timing register 4 */
47 u32 reserved7[8];
48
49 /* 0x140 */
50 u32 sdcr1; /* SDRAM Control register 1 */
51 u32 sdcr2; /* SDRAM Control register 2 */
52 u32 sdtr1; /* SDRAM Timing register 1 */
53 u32 sdtr2; /* SDRAM Timing register 2 */
54 u32 sdcmr; /* SDRAM Mode register */
55 u32 sdrtr; /* SDRAM Refresh timing register */
56 u32 sdsr; /* SDRAM Status register */
57};
Patrice Chotard9242ece2017-07-18 17:37:24 +020058
Patrice Chotard70166512017-07-18 17:37:29 +020059/*
60 * NOR/PSRAM Control register BCR1
61 * FMC controller Enable, only availabe for H7
62 */
63#define FMC_BCR1_FMCEN BIT(31)
64
Patrice Chotard9242ece2017-07-18 17:37:24 +020065/* Control register SDCR */
66#define FMC_SDCR_RPIPE_SHIFT 13 /* RPIPE bit shift */
67#define FMC_SDCR_RBURST_SHIFT 12 /* RBURST bit shift */
68#define FMC_SDCR_SDCLK_SHIFT 10 /* SDRAM clock divisor shift */
69#define FMC_SDCR_WP_SHIFT 9 /* Write protection shift */
70#define FMC_SDCR_CAS_SHIFT 7 /* CAS latency shift */
71#define FMC_SDCR_NB_SHIFT 6 /* Number of banks shift */
72#define FMC_SDCR_MWID_SHIFT 4 /* Memory width shift */
73#define FMC_SDCR_NR_SHIFT 2 /* Number of row address bits shift */
74#define FMC_SDCR_NC_SHIFT 0 /* Number of col address bits shift */
75
76/* Timings register SDTR */
77#define FMC_SDTR_TMRD_SHIFT 0 /* Load mode register to active */
78#define FMC_SDTR_TXSR_SHIFT 4 /* Exit self-refresh time */
79#define FMC_SDTR_TRAS_SHIFT 8 /* Self-refresh time */
80#define FMC_SDTR_TRC_SHIFT 12 /* Row cycle delay */
81#define FMC_SDTR_TWR_SHIFT 16 /* Recovery delay */
82#define FMC_SDTR_TRP_SHIFT 20 /* Row precharge delay */
83#define FMC_SDTR_TRCD_SHIFT 24 /* Row-to-column delay */
84
85#define FMC_SDCMR_NRFS_SHIFT 5
86
87#define FMC_SDCMR_MODE_NORMAL 0
88#define FMC_SDCMR_MODE_START_CLOCK 1
89#define FMC_SDCMR_MODE_PRECHARGE 2
90#define FMC_SDCMR_MODE_AUTOREFRESH 3
91#define FMC_SDCMR_MODE_WRITE_MODE 4
92#define FMC_SDCMR_MODE_SELFREFRESH 5
93#define FMC_SDCMR_MODE_POWERDOWN 6
94
95#define FMC_SDCMR_BANK_1 BIT(4)
96#define FMC_SDCMR_BANK_2 BIT(3)
97
98#define FMC_SDCMR_MODE_REGISTER_SHIFT 9
99
100#define FMC_SDSR_BUSY BIT(5)
101
Patrice Chotard1421e0a2017-07-18 17:37:25 +0200102#define FMC_BUSY_WAIT(regs) do { \
Patrice Chotard9242ece2017-07-18 17:37:24 +0200103 __asm__ __volatile__ ("dsb" : : : "memory"); \
Patrice Chotard1421e0a2017-07-18 17:37:25 +0200104 while (regs->sdsr & FMC_SDSR_BUSY) \
Patrice Chotard9242ece2017-07-18 17:37:24 +0200105 ; \
106 } while (0)
107
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700108struct stm32_sdram_control {
109 u8 no_columns;
110 u8 no_rows;
111 u8 memory_width;
112 u8 no_banks;
113 u8 cas_latency;
Vikas Manochabfea69a2017-04-10 15:03:03 -0700114 u8 sdclk;
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700115 u8 rd_burst;
116 u8 rd_pipe_delay;
117};
118
119struct stm32_sdram_timing {
120 u8 tmrd;
121 u8 txsr;
122 u8 tras;
123 u8 trc;
124 u8 trp;
Vikas Manochabfea69a2017-04-10 15:03:03 -0700125 u8 twr;
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700126 u8 trcd;
127};
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200128enum stm32_fmc_bank {
129 SDRAM_BANK1,
130 SDRAM_BANK2,
131 MAX_SDRAM_BANK,
132};
133
Patrice Chotard70166512017-07-18 17:37:29 +0200134enum stm32_fmc_family {
135 STM32F7_FMC,
136 STM32H7_FMC,
137};
138
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200139struct bank_params {
Patrice Chotardf39b90d2017-07-18 17:37:26 +0200140 struct stm32_sdram_control *sdram_control;
141 struct stm32_sdram_timing *sdram_timing;
Vikas Manochabfea69a2017-04-10 15:03:03 -0700142 u32 sdram_ref_count;
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200143 enum stm32_fmc_bank target_bank;
144};
145
146struct stm32_sdram_params {
147 struct stm32_fmc_regs *base;
148 u8 no_sdram_banks;
149 struct bank_params bank_params[MAX_SDRAM_BANK];
Patrice Chotard70166512017-07-18 17:37:29 +0200150 enum stm32_fmc_family family;
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700151};
Vikas Manochabf1ae442017-04-10 15:02:51 -0700152
153#define SDRAM_MODE_BL_SHIFT 0
154#define SDRAM_MODE_CAS_SHIFT 4
155#define SDRAM_MODE_BL 0
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700156
157int stm32_sdram_init(struct udevice *dev)
Vikas Manochabf1ae442017-04-10 15:02:51 -0700158{
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700159 struct stm32_sdram_params *params = dev_get_platdata(dev);
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200160 struct stm32_sdram_control *control;
161 struct stm32_sdram_timing *timing;
Patrice Chotard1421e0a2017-07-18 17:37:25 +0200162 struct stm32_fmc_regs *regs = params->base;
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200163 enum stm32_fmc_bank target_bank;
164 u32 ctb; /* SDCMR register: Command Target Bank */
165 u32 ref_count;
166 u8 i;
Vikas Manochabf1ae442017-04-10 15:02:51 -0700167
Patrice Chotard70166512017-07-18 17:37:29 +0200168 /* disable the FMC controller */
169 if (params->family == STM32H7_FMC)
170 clrbits_le32(&regs->bcr1, FMC_BCR1_FMCEN);
171
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200172 for (i = 0; i < params->no_sdram_banks; i++) {
173 control = params->bank_params[i].sdram_control;
174 timing = params->bank_params[i].sdram_timing;
175 target_bank = params->bank_params[i].target_bank;
176 ref_count = params->bank_params[i].sdram_ref_count;
Vikas Manochabf1ae442017-04-10 15:02:51 -0700177
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200178 writel(control->sdclk << FMC_SDCR_SDCLK_SHIFT
179 | control->cas_latency << FMC_SDCR_CAS_SHIFT
180 | control->no_banks << FMC_SDCR_NB_SHIFT
181 | control->memory_width << FMC_SDCR_MWID_SHIFT
182 | control->no_rows << FMC_SDCR_NR_SHIFT
183 | control->no_columns << FMC_SDCR_NC_SHIFT
184 | control->rd_pipe_delay << FMC_SDCR_RPIPE_SHIFT
185 | control->rd_burst << FMC_SDCR_RBURST_SHIFT,
186 &regs->sdcr1);
Vikas Manochabf1ae442017-04-10 15:02:51 -0700187
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200188 if (target_bank == SDRAM_BANK2)
189 writel(control->cas_latency << FMC_SDCR_CAS_SHIFT
190 | control->no_banks << FMC_SDCR_NB_SHIFT
191 | control->memory_width << FMC_SDCR_MWID_SHIFT
192 | control->no_rows << FMC_SDCR_NR_SHIFT
193 | control->no_columns << FMC_SDCR_NC_SHIFT,
194 &regs->sdcr2);
Vikas Manochabf1ae442017-04-10 15:02:51 -0700195
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200196 writel(timing->trcd << FMC_SDTR_TRCD_SHIFT
197 | timing->trp << FMC_SDTR_TRP_SHIFT
198 | timing->twr << FMC_SDTR_TWR_SHIFT
199 | timing->trc << FMC_SDTR_TRC_SHIFT
200 | timing->tras << FMC_SDTR_TRAS_SHIFT
201 | timing->txsr << FMC_SDTR_TXSR_SHIFT
202 | timing->tmrd << FMC_SDTR_TMRD_SHIFT,
203 &regs->sdtr1);
Vikas Manochabf1ae442017-04-10 15:02:51 -0700204
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200205 if (target_bank == SDRAM_BANK2)
206 writel(timing->trcd << FMC_SDTR_TRCD_SHIFT
207 | timing->trp << FMC_SDTR_TRP_SHIFT
208 | timing->twr << FMC_SDTR_TWR_SHIFT
209 | timing->trc << FMC_SDTR_TRC_SHIFT
210 | timing->tras << FMC_SDTR_TRAS_SHIFT
211 | timing->txsr << FMC_SDTR_TXSR_SHIFT
212 | timing->tmrd << FMC_SDTR_TMRD_SHIFT,
213 &regs->sdtr2);
Patrice Chotard70166512017-07-18 17:37:29 +0200214
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200215 if (target_bank == SDRAM_BANK1)
216 ctb = FMC_SDCMR_BANK_1;
217 else
218 ctb = FMC_SDCMR_BANK_2;
Vikas Manochabf1ae442017-04-10 15:02:51 -0700219
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200220 writel(ctb | FMC_SDCMR_MODE_START_CLOCK, &regs->sdcmr);
221 udelay(200); /* 200 us delay, page 10, "Power-Up" */
222 FMC_BUSY_WAIT(regs);
Vikas Manochabf1ae442017-04-10 15:02:51 -0700223
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200224 writel(ctb | FMC_SDCMR_MODE_PRECHARGE, &regs->sdcmr);
225 udelay(100);
226 FMC_BUSY_WAIT(regs);
Vikas Manochabf1ae442017-04-10 15:02:51 -0700227
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200228 writel((ctb | FMC_SDCMR_MODE_AUTOREFRESH | 7 << FMC_SDCMR_NRFS_SHIFT),
229 &regs->sdcmr);
230 udelay(100);
231 FMC_BUSY_WAIT(regs);
232
233 writel(ctb | (SDRAM_MODE_BL << SDRAM_MODE_BL_SHIFT
234 | control->cas_latency << SDRAM_MODE_CAS_SHIFT)
235 << FMC_SDCMR_MODE_REGISTER_SHIFT | FMC_SDCMR_MODE_WRITE_MODE,
236 &regs->sdcmr);
237 udelay(100);
238 FMC_BUSY_WAIT(regs);
239
240 writel(ctb | FMC_SDCMR_MODE_NORMAL, &regs->sdcmr);
241 FMC_BUSY_WAIT(regs);
242
243 /* Refresh timer */
244 writel(ref_count << 1, &regs->sdrtr);
245 }
Vikas Manochabf1ae442017-04-10 15:02:51 -0700246
Patrice Chotard70166512017-07-18 17:37:29 +0200247 /* enable the FMC controller */
248 if (params->family == STM32H7_FMC)
249 setbits_le32(&regs->bcr1, FMC_BCR1_FMCEN);
250
Vikas Manochabf1ae442017-04-10 15:02:51 -0700251 return 0;
252}
Vikas Manocha910a52e2017-04-10 15:02:52 -0700253
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700254static int stm32_fmc_ofdata_to_platdata(struct udevice *dev)
255{
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700256 struct stm32_sdram_params *params = dev_get_platdata(dev);
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200257 struct bank_params *bank_params;
Patrice Chotard0b3f7892017-12-12 09:49:41 +0100258 struct ofnode_phandle_args args;
259 u32 *syscfg_base;
260 u32 mem_remap;
Radoslaw Pietrzyk246a5e52018-05-16 17:27:11 +0200261 u32 swp_fmc;
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200262 ofnode bank_node;
263 char *bank_name;
264 u8 bank = 0;
Patrice Chotard0b3f7892017-12-12 09:49:41 +0100265 int ret;
266
Radoslaw Pietrzyk246a5e52018-05-16 17:27:11 +0200267 ret = dev_read_phandle_with_args(dev, "st,syscfg", NULL, 0, 0,
Patrice Chotard0b3f7892017-12-12 09:49:41 +0100268 &args);
Radoslaw Pietrzyk246a5e52018-05-16 17:27:11 +0200269 if (ret) {
270 dev_dbg(dev, "%s: can't find syscon device (%d)\n", __func__, ret);
271 } else {
Patrice Chotard0b3f7892017-12-12 09:49:41 +0100272 syscfg_base = (u32 *)ofnode_get_addr(args.node);
273
Radoslaw Pietrzyk246a5e52018-05-16 17:27:11 +0200274 mem_remap = dev_read_u32_default(dev, "st,mem_remap", NOT_FOUND);
275 if (mem_remap != NOT_FOUND) {
276 /* set memory mapping selection */
277 clrsetbits_le32(syscfg_base, MEM_MODE_MASK, mem_remap);
278 } else {
279 dev_dbg(dev, "%s: cannot find st,mem_remap property\n", __func__);
280 }
281
282 swp_fmc = dev_read_u32_default(dev, "st,swp_fmc", NOT_FOUND);
283 if (swp_fmc != NOT_FOUND) {
284 /* set fmc swapping selection */
285 clrsetbits_le32(syscfg_base, SWP_FMC_MASK, swp_fmc << SWP_FMC_OFFSET);
286 } else {
287 dev_dbg(dev, "%s: cannot find st,swp_fmc property\n", __func__);
288 }
289
290 dev_dbg(dev, "syscfg %x = %x\n", (u32)syscfg_base, *syscfg_base);
Patrice Chotard0b3f7892017-12-12 09:49:41 +0100291 }
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700292
Patrice Chotardf39b90d2017-07-18 17:37:26 +0200293 dev_for_each_subnode(bank_node, dev) {
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200294 /* extract the bank index from DT */
295 bank_name = (char *)ofnode_get_name(bank_node);
296 strsep(&bank_name, "@");
297 if (!bank_name) {
Masahiro Yamada9b643e32017-09-16 14:10:41 +0900298 pr_err("missing sdram bank index");
Patrice Chotardf39b90d2017-07-18 17:37:26 +0200299 return -EINVAL;
300 }
301
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200302 bank_params = &params->bank_params[bank];
303 strict_strtoul(bank_name, 10,
304 (long unsigned int *)&bank_params->target_bank);
Patrice Chotardf39b90d2017-07-18 17:37:26 +0200305
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200306 if (bank_params->target_bank >= MAX_SDRAM_BANK) {
Masahiro Yamada9b643e32017-09-16 14:10:41 +0900307 pr_err("Found bank %d , but only bank 0 and 1 are supported",
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200308 bank_params->target_bank);
Patrice Chotardf39b90d2017-07-18 17:37:26 +0200309 return -EINVAL;
310 }
311
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200312 debug("Find bank %s %u\n", bank_name, bank_params->target_bank);
313
314 params->bank_params[bank].sdram_control =
315 (struct stm32_sdram_control *)
316 ofnode_read_u8_array_ptr(bank_node,
317 "st,sdram-control",
318 sizeof(struct stm32_sdram_control));
319
320 if (!params->bank_params[bank].sdram_control) {
Masahiro Yamada9b643e32017-09-16 14:10:41 +0900321 pr_err("st,sdram-control not found for %s",
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200322 ofnode_get_name(bank_node));
323 return -EINVAL;
324 }
325
326
327 params->bank_params[bank].sdram_timing =
328 (struct stm32_sdram_timing *)
329 ofnode_read_u8_array_ptr(bank_node,
330 "st,sdram-timing",
331 sizeof(struct stm32_sdram_timing));
332
333 if (!params->bank_params[bank].sdram_timing) {
Masahiro Yamada9b643e32017-09-16 14:10:41 +0900334 pr_err("st,sdram-timing not found for %s",
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200335 ofnode_get_name(bank_node));
336 return -EINVAL;
337 }
338
339
340 bank_params->sdram_ref_count = ofnode_read_u32_default(bank_node,
Vikas Manochabfea69a2017-04-10 15:03:03 -0700341 "st,sdram-refcount", 8196);
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200342 bank++;
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700343 }
344
Patrice Chotardf303aaf2017-07-18 17:37:27 +0200345 params->no_sdram_banks = bank;
346 debug("%s, no of banks = %d\n", __func__, params->no_sdram_banks);
347
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700348 return 0;
349}
350
Vikas Manocha910a52e2017-04-10 15:02:52 -0700351static int stm32_fmc_probe(struct udevice *dev)
352{
Patrice Chotard1421e0a2017-07-18 17:37:25 +0200353 struct stm32_sdram_params *params = dev_get_platdata(dev);
Vikas Manochad0b24c12017-04-10 15:02:55 -0700354 int ret;
Patrice Chotard1421e0a2017-07-18 17:37:25 +0200355 fdt_addr_t addr;
356
357 addr = dev_read_addr(dev);
358 if (addr == FDT_ADDR_T_NONE)
359 return -EINVAL;
360
361 params->base = (struct stm32_fmc_regs *)addr;
Patrice Chotard70166512017-07-18 17:37:29 +0200362 params->family = dev_get_driver_data(dev);
Patrice Chotard1421e0a2017-07-18 17:37:25 +0200363
Patrice Chotard14a50e32017-05-30 15:06:31 +0200364#ifdef CONFIG_CLK
Vikas Manochad0b24c12017-04-10 15:02:55 -0700365 struct clk clk;
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700366
Vikas Manochad0b24c12017-04-10 15:02:55 -0700367 ret = clk_get_by_index(dev, 0, &clk);
368 if (ret < 0)
369 return ret;
370
371 ret = clk_enable(&clk);
372
373 if (ret) {
374 dev_err(dev, "failed to enable clock\n");
375 return ret;
376 }
377#endif
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700378 ret = stm32_sdram_init(dev);
379 if (ret)
380 return ret;
381
Vikas Manocha910a52e2017-04-10 15:02:52 -0700382 return 0;
383}
384
385static int stm32_fmc_get_info(struct udevice *dev, struct ram_info *info)
386{
Vikas Manocha910a52e2017-04-10 15:02:52 -0700387 return 0;
388}
389
390static struct ram_ops stm32_fmc_ops = {
391 .get_info = stm32_fmc_get_info,
392};
393
394static const struct udevice_id stm32_fmc_ids[] = {
Patrice Chotard70166512017-07-18 17:37:29 +0200395 { .compatible = "st,stm32-fmc", .data = STM32F7_FMC },
396 { .compatible = "st,stm32h7-fmc", .data = STM32H7_FMC },
Vikas Manocha910a52e2017-04-10 15:02:52 -0700397 { }
398};
399
400U_BOOT_DRIVER(stm32_fmc) = {
401 .name = "stm32_fmc",
402 .id = UCLASS_RAM,
403 .of_match = stm32_fmc_ids,
404 .ops = &stm32_fmc_ops,
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700405 .ofdata_to_platdata = stm32_fmc_ofdata_to_platdata,
Vikas Manocha910a52e2017-04-10 15:02:52 -0700406 .probe = stm32_fmc_probe,
Vikas Manocha6c9a1002017-04-10 15:02:56 -0700407 .platdata_auto_alloc_size = sizeof(struct stm32_sdram_params),
Vikas Manocha910a52e2017-04-10 15:02:52 -0700408};