All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 4/4] ARM: zynq: Enable DM for CFI NOR flash
Date: Wed, 26 Feb 2020 11:38:43 +0100	[thread overview]
Message-ID: <feaaff708a11c066dbda847031d7450165c000d0.1582713521.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <cover.1582713521.git.michal.simek@xilinx.com>

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>
---

Changes in v2:
- Add missing zynq cse nor conversion

 arch/arm/dts/zynq-cse-nor.dts      | 14 ++++++++++++++
 configs/xilinx_zynq_virt_defconfig |  1 +
 configs/zynq_cse_nor_defconfig     |  3 +++
 include/configs/zynq-common.h      |  2 --
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/zynq-cse-nor.dts b/arch/arm/dts/zynq-cse-nor.dts
index 4030851eb36d..197fbd717aae 100644
--- a/arch/arm/dts/zynq-cse-nor.dts
+++ b/arch/arm/dts/zynq-cse-nor.dts
@@ -71,6 +71,20 @@
 				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 at e2000000 {
+			u-boot,dm-pre-reloc;
+			compatible = "cfi-flash";
+			reg = <0xe2000000 0x2000000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
 	};
 };
 
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index 2e9f3a0f7508..08b43de103a1 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -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
diff --git a/configs/zynq_cse_nor_defconfig b/configs/zynq_cse_nor_defconfig
index e2b9454c15c8..3b4e2f93fa30 100644
--- a/configs/zynq_cse_nor_defconfig
+++ b/configs/zynq_cse_nor_defconfig
@@ -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
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 33fac35f6e32..1eaf65b0a2a1 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -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
-- 
2.25.1

  parent reply	other threads:[~2020-02-26 10:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 10:38 [PATCH v2 0/4] ARM: zynq: Switch to CFI DM driver Michal Simek
2020-02-26 10:38 ` [PATCH v2 1/4] nand: raw: Do not free xnand structure Michal Simek
2020-04-03 14:44   ` Jagan Teki
2020-02-26 10:38 ` [PATCH v2 2/4] nand: raw: zynq: Do not try to probe driver if nand flash is disabled Michal Simek
2020-04-03 14:44   ` Jagan Teki
2020-02-26 10:38 ` [PATCH v2 3/4] ARM: zynq: Do not report NOR flash detection failure Michal Simek
2020-02-26 10:38 ` Michal Simek [this message]
2020-04-06 11:00 ` [PATCH v2 0/4] ARM: zynq: Switch to CFI DM driver Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=feaaff708a11c066dbda847031d7450165c000d0.1582713521.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.