Lines Matching refs:dev
157 int stm32_sdram_init(struct udevice *dev) in stm32_sdram_init() argument
159 struct stm32_sdram_params *params = dev_get_platdata(dev); in stm32_sdram_init()
254 static int stm32_fmc_ofdata_to_platdata(struct udevice *dev) in stm32_fmc_ofdata_to_platdata() argument
256 struct stm32_sdram_params *params = dev_get_platdata(dev); in stm32_fmc_ofdata_to_platdata()
267 ret = dev_read_phandle_with_args(dev, "st,syscfg", NULL, 0, 0, in stm32_fmc_ofdata_to_platdata()
270 dev_dbg(dev, "%s: can't find syscon device (%d)\n", __func__, ret); in stm32_fmc_ofdata_to_platdata()
274 mem_remap = dev_read_u32_default(dev, "st,mem_remap", NOT_FOUND); in stm32_fmc_ofdata_to_platdata()
279 dev_dbg(dev, "%s: cannot find st,mem_remap property\n", __func__); in stm32_fmc_ofdata_to_platdata()
282 swp_fmc = dev_read_u32_default(dev, "st,swp_fmc", NOT_FOUND); in stm32_fmc_ofdata_to_platdata()
287 dev_dbg(dev, "%s: cannot find st,swp_fmc property\n", __func__); in stm32_fmc_ofdata_to_platdata()
290 dev_dbg(dev, "syscfg %x = %x\n", (u32)syscfg_base, *syscfg_base); in stm32_fmc_ofdata_to_platdata()
293 dev_for_each_subnode(bank_node, dev) { in stm32_fmc_ofdata_to_platdata()
351 static int stm32_fmc_probe(struct udevice *dev) in stm32_fmc_probe() argument
353 struct stm32_sdram_params *params = dev_get_platdata(dev); in stm32_fmc_probe()
357 addr = dev_read_addr(dev); in stm32_fmc_probe()
362 params->family = dev_get_driver_data(dev); in stm32_fmc_probe()
367 ret = clk_get_by_index(dev, 0, &clk); in stm32_fmc_probe()
374 dev_err(dev, "failed to enable clock\n"); in stm32_fmc_probe()
378 ret = stm32_sdram_init(dev); in stm32_fmc_probe()
385 static int stm32_fmc_get_info(struct udevice *dev, struct ram_info *info) in stm32_fmc_get_info() argument