From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Date: Wed, 13 Jan 2010 07:38:28 -0600 Subject: [U-Boot] [PATCH v4 10/12] SPEAr : emi controller initialization for CFI driver support Message-ID: <4B4DCCD4.5060109@windriver.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de SPEAr310 and SPEAr320 SoCs contain an EMI controller to interface Paraller NOR flashes. This patch adds the support for this IP The standard CFI driver is used to interface with NOR flashes Signed-off-by: Vipin --- board/spear/common/spr_misc.c | 60 ++++++++++++++++++++++++++++++++++ include/asm-arm/arch-spear/spr_emi.h | 54 ++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 0 deletions(-) create mode 100644 include/asm-arm/arch-spear/spr_emi.h diff --git a/board/spear/common/spr_misc.c b/board/spear/common/spr_misc.c index 9a6260f..08fb0bc 100755 --- a/board/spear/common/spr_misc.c +++ b/board/spear/common/spr_misc.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -78,6 +79,62 @@ int misc_init_r(void) return 0; } +#ifdef CONFIG_SPEAR_EMI +struct cust_emi_para { + unsigned int tap; + unsigned int tsdp; + unsigned int tdpw; + unsigned int tdpr; + unsigned int tdcs; + unsigned int control; +}; Maybe this should be packed ? + +/* EMI timing setting of m28w640hc of linux kernel */ +const struct cust_emi_para emi_timing_m28w640hc = { + .tap = 0x10, + .tsdp = 0x05, + .tdpw = 0x0a, + .tdpr = 0x0a, + .tdcs = 0x05, .control ? If this is a read-only register, add a comment. Tom