ARM: zynq: Enable DM for CFI NOR flash
authorMichal Simek <michal.simek@xilinx.com>
Tue, 25 Feb 2020 14:29:40 +0000 (15:29 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 6 Apr 2020 10:52:45 +0000 (12:52 +0200)
With multi defconfig NOR flash information about NOR should be taken from
DT that's why there is no reason to specify address and sizes via fixed
config.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/dts/zynq-cse-nor.dts
configs/xilinx_zynq_virt_defconfig
configs/zynq_cse_nor_defconfig
include/configs/zynq-common.h

index 4030851eb36dc335a53a7f23fae639862ce07c09..197fbd717aae165357cd14d6ebd15899e091ca8c 100644 (file)
                                reg = <0x100 0x100>;
                        };
                };
+
+               /*
+                * This is partially hack because it is normally subnode of smcc
+                * but for mini U-Boot there is no reason to enable SMCC driver
+                * which does almost nothing in NOR flash configuration that's
+                * why place cfi-flash directly here.
+                */
+               flash@e2000000 {
+                       u-boot,dm-pre-reloc;
+                       compatible = "cfi-flash";
+                       reg = <0xe2000000 0x2000000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+               };
        };
 };
 
index 2e9f3a0f7508e3b9506fac2232fe6c2456ea7d14..08b43de103a1d30dd58f79717f9d0f2b66d2be8e 100644 (file)
@@ -61,6 +61,7 @@ CONFIG_MMC_SDHCI_ZYNQ=y
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
+CONFIG_CFI_FLASH=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MTD_RAW_NAND=y
index e2b9454c15c88ccfc9de3c6152691d60b1fd8c83..3b4e2f93fa3067de3b8699f0ab493c0630eeccb6 100644 (file)
@@ -52,8 +52,11 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_DM_DEVICE_REMOVE is not set
 CONFIG_SPL_DM_SEQ_ALIAS=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
+CONFIG_CFI_FLASH=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
 # CONFIG_EFI_LOADER is not set
index 33fac35f6e32b09314003767a003b8959b28e64e..1eaf65b0a2a105ef8a63dc227365946395e6099c 100644 (file)
@@ -43,8 +43,6 @@
 
 /* NOR */
 #ifdef CONFIG_MTD_NOR_FLASH
-# define CONFIG_SYS_FLASH_BASE         0xE2000000
-# define CONFIG_SYS_FLASH_SIZE         (16 * 1024 * 1024)
 # define CONFIG_SYS_MAX_FLASH_BANKS    1
 # define CONFIG_SYS_MAX_FLASH_SECT     512
 # define CONFIG_SYS_FLASH_ERASE_TOUT   1000