From patchwork Thu Aug 2 07:25:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 10459 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2D1782402A for ; Thu, 2 Aug 2012 07:19:08 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id F185AA1912A for ; Thu, 2 Aug 2012 07:19:07 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so8252009yhp.11 for ; Thu, 02 Aug 2012 00:19:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:x-auditid :from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-brightmail-tracker:x-tm-as-mml:x-gm-message-state; bh=Jl06ixMQb5olwqG2IRnCWpmQDAVbm9Shaox4u1vbN3I=; b=NC/MK9JMgpwqz5/bQfMjoa1EvsHRUJM0+FCiU+/1yPwl2CoJyvJpRIhVHknqjDbgtt HLigrnm1zkKN+gq6+dYAJbiCjhm46SZvfOjgNfIqRLR+6kpkEWBJN+VUugyPdA/40PtH 4PeryRoJLqCq9ORnXTlkvT7HmCSJJZcTdgFzDe9wyicFDnPCdzwaANL9EXYEA74tcpek KdzC1lekpLzzg8wvOsb9m7Qi/PJTdgex7sr97b0clSXPmtUXvOvA9FI/aB03SK/pQYmE TihnJyCdTyCrmd5UsZ0XNxx1NMectI/V7iEYlBOgoWkDG2jSK84UN3iRi+XI3nvS6m3o g3yQ== Received: by 10.50.46.132 with SMTP id v4mr1820600igm.25.1343891947491; Thu, 02 Aug 2012 00:19:07 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.87.40 with SMTP id u8csp239575igz; Thu, 2 Aug 2012 00:19:07 -0700 (PDT) Received: by 10.60.27.6 with SMTP id p6mr33865411oeg.37.1343891946969; Thu, 02 Aug 2012 00:19:06 -0700 (PDT) Received: from mailout1.samsung.com (mailout1.samsung.com. [203.254.224.24]) by mx.google.com with ESMTP id d7si5766644oea.52.2012.08.02.00.19.06; Thu, 02 Aug 2012 00:19:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.24 as permitted sender) client-ip=203.254.224.24; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.24 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm2.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8400DV19MFQTO0@mailout1.samsung.com>; Thu, 02 Aug 2012 16:19:05 +0900 (KST) X-AuditID: cbfee61b-b7f566d000005c8a-21-501a29e92690 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id FF.D5.23690.9E92A105; Thu, 02 Aug 2012 16:19:05 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M840099U9N7OKD0@mmp1.samsung.com>; Thu, 02 Aug 2012 16:19:05 +0900 (KST) From: Rajeshwari Shinde To: u-boot@lists.denx.de Cc: patches@linaro.org, alim.akhtar@samsung.com, sjg@chromium.org, mk7.kang@samsung.com, chander.kashyap@linaro.org, vapier@gentoo.org Subject: [PATCH 6/7 V4] EXYNOS5: Enable SPI Date: Thu, 02 Aug 2012 12:55:09 +0530 Message-id: <1343892310-21018-7-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1343892310-21018-1-git-send-email-rajeshwari.s@samsung.com> References: <1343892310-21018-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGJMWRmVeSWpSXmKPExsVy+t9jAd2XmlIBBpPm6lg8XH+TxWLK4S8s Dkwed67tYQtgjOKySUnNySxLLdK3S+DK2LBaq+C1QMW97bPYGxi7+LoYOTkkBEwkTnfNYoew xSQu3FvP1sXIxSEksIhR4k7TZEYIZyKTxNJNZ1lBqtgEjCS2npzGCGKLCEhI/Oq/ClbELNDB KHH42w6mLkYODmEBbYkLL61AalgEVCW+Lm1nArF5BTwkHn6awQSxTUHi2NSvYDM5BTwlLs5Z yQzSKgRU8+193gRG3gWMDKsYRVMLkguKk9JzjfSKE3OLS/PS9ZLzczcxgn3/THoH46oGi0OM AhyMSjy8K0slA4RYE8uKK3MPMUpwMCuJ8N6RkAoQ4k1JrKxKLcqPLyrNSS0+xCjNwaIkzmvi /dVfSCA9sSQ1OzW1ILUIJsvEwSnVwCjwh3fJjG63+WZCOkdLPtc82Jq1fVJV7nSuHVkbtn5P N7nnaT/3Yq0+V55T2wrOA3xv7FhUCieZyj3rO7n7orvx79cr5oQpM4fuLfm0TuD6xaUbA/7Y Xdxib5TBd/Sa8tV9Jdxd17N6koOSOKTP68Y8+rDxNfOp39ciHCps+466CpQbVEQIbVZiKc5I NNRiLipOBAA1gK3k+QEAAA== X-TM-AS-MML: No X-Gm-Message-State: ALoCoQn06kvxwWflSi3FmfOw7dOPLSNwPtsGXzKBOYxvoekKFowuOiY7/mBVSOpHBCaKos95SZOv This patch enables SPI driver for EXYNOS5. Signed-off-by: Rajeshwari Shinde --- Changes in V2: - None. Changes in V3: - Corrected the warning message. Changes in V4: - Rebased on Mainline u-boot.git. board/samsung/smdk5250/smdk5250.c | 4 ++++ include/configs/smdk5250.h | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index fae7d6f..7e20a3c 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -63,6 +64,9 @@ static int smc9115_pre_init(void) int board_init(void) { gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); +#ifdef CONFIG_EXYNOS_SPI + spi_init(); +#endif return 0; } diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index eb1466c..0f85be6 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -162,7 +162,7 @@ #undef CONFIG_CMD_IMLS #define CONFIG_IDENT_STRING " for SMDK5250" -#define CONFIG_ENV_IS_IN_MMC +/*#define CONFIG_ENV_IS_IN_MMC*/ #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_SECURE_BL1_ONLY @@ -211,6 +211,27 @@ #define CONFIG_ENV_SROM_BANK 1 #endif /*CONFIG_CMD_NET*/ +/* SPI */ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_SPI_FLASH + +#ifdef CONFIG_SPI_FLASH +#define CONFIG_EXYNOS_SPI +#define CONFIG_CMD_SF +#define CONFIG_CMD_SPI +#define CONFIG_SPI_FLASH_WINBOND +#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 +#define CONFIG_SF_DEFAULT_SPEED 50000000 +#define EXYNOS5_SPI_NUM_CONTROLLERS 5 +#endif + +#ifdef CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_SPI_MODE SPI_MODE_0 +#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE +#define CONFIG_ENV_SPI_BUS 1 +#define CONFIG_ENV_SPI_MAX_HZ 50000000 +#endif + /* Enable devicetree support */ #define CONFIG_OF_LIBFDT