- /* set memory mapping selection */
- clrsetbits_le32(syscfg_base, MEM_MODE_MASK, mem_remap);
- } else {
- debug("%s: cannot find st,mem_remap property\n", __func__);
+ mem_remap = dev_read_u32_default(dev, "st,mem_remap", NOT_FOUND);
+ if (mem_remap != NOT_FOUND) {
+ /* set memory mapping selection */
+ clrsetbits_le32(syscfg_base, MEM_MODE_MASK, mem_remap);
+ } else {
+ dev_dbg(dev, "%s: cannot find st,mem_remap property\n", __func__);
+ }
+
+ swp_fmc = dev_read_u32_default(dev, "st,swp_fmc", NOT_FOUND);
+ if (swp_fmc != NOT_FOUND) {
+ /* set fmc swapping selection */
+ clrsetbits_le32(syscfg_base, SWP_FMC_MASK, swp_fmc << SWP_FMC_OFFSET);
+ } else {
+ dev_dbg(dev, "%s: cannot find st,swp_fmc property\n", __func__);
+ }
+
+ dev_dbg(dev, "syscfg %x = %x\n", (u32)syscfg_base, *syscfg_base);