From patchwork Mon Oct 22 11:52:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hatim Ali X-Patchwork-Id: 12399 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 135CD23EF8 for ; Mon, 22 Oct 2012 11:59:49 +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 92023A19432 for ; Mon, 22 Oct 2012 11:59:48 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so1913223iag.11 for ; Mon, 22 Oct 2012 04:59:48 -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=s9U5v6cbm6eCgg8ANweXT2aYZip/mWHtOHZ1Zj3KE48=; b=YF7pAPM0yDi3Zx2obZcW2vDL7rqMEVi6yrBan2p1sOQirY42fseOO5T1Z+natrI2cM GjUutiSQPvarYUHP3GZSuZF0+YVmX7tdIYsGUKZtV9aVmr0JA1Qn/neXmYF1oLy3gvDm 6CC8mQF5wwzfgIFMq4aCv01GLU2Te4/F/bMqsY7aJo113YZgsOBaSJWjIgqmTd1NC6w4 w6vDpjTIemKtXQAFSoRMhsBISvtmLe70WI3Sdm9bAHS3k8Ig+M02Q9Ci1twfYoLA6OiK BVLAb72Y93ywbdO8Zirv65hR68RX5m/77EAHoKiFlWVf4C2hQ6YevrEV0nIuGrLbB/4R hvhw== Received: by 10.50.140.97 with SMTP id rf1mr14171518igb.70.1350907188207; Mon, 22 Oct 2012 04:59:48 -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 n20csp218811igt; Mon, 22 Oct 2012 04:59:47 -0700 (PDT) Received: by 10.68.138.166 with SMTP id qr6mr29259322pbb.69.1350907187399; Mon, 22 Oct 2012 04:59:47 -0700 (PDT) Received: from mailout4.samsung.com (mailout4.samsung.com. [203.254.224.34]) by mx.google.com with ESMTP id pe8si13555015pbc.40.2012.10.22.04.59.47; Mon, 22 Oct 2012 04:59:47 -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 <0MCA004Q1MN2MKO0@mailout4.samsung.com> for patches@linaro.org; Mon, 22 Oct 2012 20:59:46 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 3A.1E.01231.23535805; Mon, 22 Oct 2012 20:59:46 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-5a-50853532f4d3 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F6.1E.01231.23535805; Mon, 22 Oct 2012 20:59:46 +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 <0MCA006A7MH2ZQ10@mmp1.samsung.com> for patches@linaro.org; Mon, 22 Oct 2012 20:59:46 +0900 (KST) From: Hatim Ali To: u-boot@lists.denx.de Cc: sjg@chromium.org, promsoft@gmail.com, patches@linaro.org Subject: [PATCH 5/6 V7] EXYNOS5: Enable SPI Date: Mon, 22 Oct 2012 17:22:08 +0530 Message-id: <1350906729-23749-6-git-send-email-hatim.rv@samsung.com> X-Mailer: git-send-email 1.7.2.3 In-reply-to: <1350906729-23749-1-git-send-email-hatim.rv@samsung.com> References: <1350906729-23749-1-git-send-email-hatim.rv@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsWyRsSkStfItDXAYPpecYsph7+wODB63Lm2 hy2AMYrLJiU1J7MstUjfLoEr49SO5YwFUwQqmt/8ZG9gvMPbxcjJISFgIvHyzERGCFtM4sK9 9WxdjFwcQgJLGSX6Gn+xwBTd2vSbBSKxiFFi2rzlzFAOk8Sqdy3MIFVsAmoS6193soHYIgIS Er/6r4KNZRawkVjScw/MFhbQlnh65QwriM0ioCqxrqcdzOYVcJFYO3seK8Q2BYlXN9ayg9ic Aq4S9/s7gOIcQMtcJOb3KkK0Ckh8m3yIBSQsISArsekA2DkSApfZJH4emM0GMUZS4uCKGywT GIUXMDKsYhRNLUguKE5KzzXUK07MLS7NS9dLzs/dxAgMwtP/nkntYFzZYHGIUYCDUYmHV0Oh NUCINbGsuDL3EKMEB7OSCO8VMaAQb0piZVVqUX58UWlOavEhRh+gSyYyS4km5wMjJK8k3tDY xNzU2NTSyMjM1BSHsJI4b7NHSoCQQHpiSWp2ampBahHMOCYOTqkGxqrLa2RO2hpaBvvO5/Rd zeLD9fhFzNJtW1ZdLq19+6JLozT/r3DRVp6WC45V/6YWP2/Y/k1yVUhRq6TyIc7p72+KKDmo tJ34u8P8+JrGSms/zpzW0AuF7slvzDfurZxWMfHA7gZFy8WHNlznXmKcWTkhIkvW0nLLMu5Y nlrDicwLMvVPLrxXqsRSnJFoqMVcVJwIAJpJh75vAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xgK6RaWuAwcG7fBZTDn9hcWD0uHNt D1sAY1QDo01GamJKapFCal5yfkpmXrqtkndwvHO8qZmBoa6hpYW5kkJeYm6qrZKLT4CuW2YO 0FglhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9RgZoIGENY8apHcsZC6YIVDS/+cne wHiHt4uRk0NCwETi1qbfLBC2mMSFe+vZuhi5OIQEFjFKTJu3nBnKYZJY9a6FGaSKTUBNYv3r TjYQW0RAQuJX/1VGEJtZwEZiSc89MFtYQFvi6ZUzrCA2i4CqxLqedjCbV8BFYu3seawQ2xQk Xt1Yyw5icwq4Stzv7wCKcwAtc5GY36s4gZF3ASPDKkbR1ILkguKk9FxDveLE3OLSvHS95Pzc TYzgEH8mtYNxZYPFIUYBDkYlHl4NhdYAIdbEsuLK3EOMEhzMSiK8V8SAQrwpiZVVqUX58UWl OanFhxh9gI6ayCwlmpwPjL+8knhDYxNzU2NTSxMLEzNLHMJK4rzNHikBQgLpiSWp2ampBalF MOOYODilGhiLBdTnLbV636nhIuWzysE6/Z9z++6cqzqmD+IcK9PW757+Pz7i3xnDm6tsjV4t 9pV78ffT43nLqxsO2Hw8EBHl2sGVEcMm1jBbYBEb98UV3okdqYd97Xb4s7juEfUx3Mv3d/Ji pbZfC5q+vpnS8TzpdpHo++fRC0RVT/zbJcqxknVt8M+DpWlKLMUZiYZazEXFiQBS4fd2ngIA AA== X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQkX3s9S8eQJprTOZXjIgIi9RRLF0jxlYEl8YOd1YsziKBE06SSkfXT6MUtJLYtqRgxNuJ2f From: Rajeshwari Shinde This patch enables SPI driver for EXYNOS5. Signed-off-by: Rajeshwari Shinde Signed-off-by: Hatim Ali Acked-by: Simon Glass --- Changes since v4: - Rebased on u-boot-samsung.git Changes since v5: No change Changes since v6: Removed unused define from the config file 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..604c61e 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -164,7 +164,6 @@ #undef CONFIG_CMD_IMLS #define CONFIG_IDENT_STRING " for SMDK5250" -#define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_SECURE_BL1_ONLY @@ -213,6 +212,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