From patchwork Wed Oct 17 04:58:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hatim Ali X-Patchwork-Id: 12287 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 F083223E29 for ; Wed, 17 Oct 2012 05:04:43 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8FF0CA182F0 for ; Wed, 17 Oct 2012 05:04:43 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so5031517iag.11 for ; Tue, 16 Oct 2012 22:04:43 -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 :dlp-filter:x-mtr:x-brightmail-tracker:x-brightmail-tracker :x-cfilter-loop:x-gm-message-state; bh=7oOt2+DD5iUYza/EYDckt5ZfnnqO5bCuVOrVpJ6UvNw=; b=R2qi8POpHfEa95G3CvCztAVNkfPUTWgj9IrBFeZP6ir87vZwMLEaGWEJUiCECErNxR NRUA9nJZqwlaLRqa1HKwJV8tbHb+ZnAlgv5nj/Aw/5BqF99myGCqImhNNn/Z6kga04uK fTe4TootXxZPOHCqHxHYKXwnBwKrltYFY2e6A6GylHAJP3liYh3OerDN1dwkgfw3l1CG tNepNhCT66XouhgnPRmxarQjZfkQlyN1BtzRYOKPfYF6kqQSlz7/gUVJezdOvsuC6Cnn M5ngCxA+yXM/aur6Qikhdwvb7BjorwRvlDD3kSPvVA7gPdO9vaFInqcISIyEWkHlSyrB Qnng== Received: by 10.50.152.137 with SMTP id uy9mr407627igb.62.1350450283368; Tue, 16 Oct 2012 22:04:43 -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.67.148 with SMTP id n20csp839736igt; Tue, 16 Oct 2012 22:04:43 -0700 (PDT) Received: by 10.66.85.133 with SMTP id h5mr47809606paz.10.1350450282606; Tue, 16 Oct 2012 22:04:42 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id m5si29239381paw.49.2012.10.16.22.04.42; Tue, 16 Oct 2012 22:04:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of hatim.rv@samsung.com designates 203.254.224.34 as permitted sender) client-ip=203.254.224.34; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of hatim.rv@samsung.com designates 203.254.224.34 as permitted sender) smtp.mail=hatim.rv@samsung.com Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MC000LEVU2KIGO0@mailout4.samsung.com> for patches@linaro.org; Wed, 17 Oct 2012 14:04:41 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 63.89.07865.96C3E705; Wed, 17 Oct 2012 14:04:41 +0900 (KST) X-AuditID: cbfee61a-b7f976d000001eb9-de-507e3c692a05 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 23.89.07865.96C3E705; Wed, 17 Oct 2012 14:04:41 +0900 (KST) Received: from hatim-linux.sisodomain.com ([107.108.73.95]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MC000DANTZD3GA0@mmp1.samsung.com> for patches@linaro.org; Wed, 17 Oct 2012 14:04:41 +0900 (KST) From: Hatim Ali To: u-boot@lists.denx.de Cc: promsoft@gmail.com, patches@linaro.org Subject: [PATCH 5/6 V6] EXYNOS5: Enable SPI Date: Wed, 17 Oct 2012 10:28:24 +0530 Message-id: <1350449905-10376-6-git-send-email-hatim.rv@samsung.com> X-Mailer: git-send-email 1.7.2.3 In-reply-to: <1350449905-10376-1-git-send-email-hatim.rv@samsung.com> References: <1350449905-10376-1-git-send-email-hatim.rv@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsWyRsSkWjfTpi7AYPpWJYsph7+wODB63Lm2 hy2AMYrLJiU1J7MstUjfLoErY+WOmUwF8wQr3m3tZ25gPM/XxcjJISFgIvHn5CoWCFtM4sK9 9WxdjFwcQgJLGSWmzd/IAlPUfmcvM4gtJLCIUaJhpz9E0SImiRWdvWBFbAJqEutfd7KB2CIC EhK/+q8ygtjMAloSe77OB4sLC2hLLNq1HmwQi4CqxL8XF8FqeAVcJKb+ecIIsUxB4tWNtewg NqeAq8Sfi3eA4hxAy1wk9jTqQbQKSHybfIgFJCwhICux6QAzyDkSAmfYJA5f3Ag1RlLi4Iob LBMYhRcwMqxiFE0tSC4oTkrPNdQrTswtLs1L10vOz93ECAzB0/+eSe1gXNlgcYhRgINRiYf3 w+zaACHWxLLiytxDjBIczEoivOaNQCHelMTKqtSi/Pii0pzU4kOMPkCXTGSWEk3OB8ZHXkm8 obGJuamxqaWRkZmpKQ5hJXHeZo+UACGB9MSS1OzU1ILUIphxTBycUg2M07QfakobJtloZEYf 2rFEdM+BA/2n9iRPD2Gu6vDnLNeOvyJ5b/72VTa6r++9/7MlNkVpc7hE3jPNWxsVnH5yCl1o Vntk+05QPPrSPOHc5d9Xvbl3wnuKwff5VfZVXWfEdssfz1WNt5usfvVs+oGY5DvFkaHPG3Sf zzvh9HfuxbC9duuqVRW4lFiKMxINtZiLihMBVQRJEm4CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42I5/e+xgG6mTV2Awd1WSYsph7+wODB63Lm2 hy2AMaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH aKySQlliTilQKCCxuFhJ3w7ThNAQN10LmMYIXd+QILgeIwM0kLCGMWPljplMBfMEK95t7Wdu YDzP18XIySEhYCLRfmcvM4QtJnHh3no2EFtIYBGjRMNO/y5GLhCbSWJFZy8LSIJNQE1i/etO sCIRAQmJX/1XGUFsZgEtiT1f54PFhQW0JRbtWg82lEVAVeLfi4tgNbwCLhJT/zxhhFimIPHq xlp2EJtTwFXiz8U7QHEOoGUuEnsa9SYw8i5gZFjFKJpakFxQnJSea6hXnJhbXJqXrpecn7uJ ERzgz6R2MK5ssDjEKMDBqMTD+2F2bYAQa2JZcWXuIUYJDmYlEV7zRqAQb0piZVVqUX58UWlO avEhRh+goyYyS4km5wOjL68k3tDYxNzU2NTSxMLEzBKHsJI4b7NHSoCQQHpiSWp2ampBahHM OCYOTqkGxjXebV5v9l0LEUx4fj4y6Pm5MsEm3clXf+qFxH3u23vVe2vtVRF5DW4eoSUsDGr3 uGU1Jv9gmlKUvGHFqtzDeny+TyP4gxdsV901eaPO9fvsv4JLT751enOCX+sQw564N91CkTdb i1d6y3j+5luyQ/bHl+3rymZtt4oQkQsXfTeB787bI+YLvJVYijMSDbWYi4oTAT58LZSdAgAA X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnaquTp+/9Ch8ocEmL0wVTnwCXF8w8xb78sCfRHkNkOAEDSALKzhvDfAdMdTw98e6W8rtWQ From: Rajeshwari Shinde This patch enables SPI driver for EXYNOS5. Signed-off-by: Rajeshwari Shinde Signed-off-by: Hatim Ali --- Changes since v4: - Rebased on u-boot-samsung.git Changes since v5: No change 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 a5816e4..069c9e8 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 9e3b55b..a9334cf 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -164,7 +164,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 @@ -213,6 +213,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 PXE Support */ #ifdef CONFIG_CMD_NET #define CONFIG_CMD_PXE