From patchwork Tue Jul 31 10:42:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 10383 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 1CBCC24054 for ; Tue, 31 Jul 2012 10:36:37 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id DCBAAA18CB9 for ; Tue, 31 Jul 2012 10:36:36 +0000 (UTC) Received: by mail-yx0-f180.google.com with SMTP id q6so5750356yen.11 for ; Tue, 31 Jul 2012 03:36:36 -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=aR6Ndl/TosRy34XGVXRpYxzFphU9Aen2gfjI6wPN5Ek=; b=c8wnCAl1FlgpBbpJqCjVQTVERlpSEYJEbOOGNBIwgbYAnyoH2w9HNIyxDjMprFldJg RcKQpQShNx+2N4qwDYmraqOOlYX6406Ct7geK8Crn/yzEVTOC8goyXhR+MUvggFmzhyO NFxzOUnU+xms3cfds2VF94wR17flleLGlNyIieM9JE6WcF3NqTWehMrzvdG/Dewuv7Qh Vjl17bsuT6kh5nVP5H0vZ7g82RKevDLB2p7jjL2EF15XU0yU8daomuE++9NKzhWfCPEG cACSxawObL07tIvU11Pz5igCH/ZNeQTBcGB5jvzc4Gd6CH4G9+6pE9ba4s0N0hYdBdgb +eJg== Received: by 10.50.47.161 with SMTP id e1mr1592536ign.11.1343730996478; Tue, 31 Jul 2012 03:36:36 -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 u8csp135217igz; Tue, 31 Jul 2012 03:36:36 -0700 (PDT) Received: by 10.66.79.195 with SMTP id l3mr31383109pax.33.1343730995700; Tue, 31 Jul 2012 03:36:35 -0700 (PDT) Received: from mailout1.samsung.com (mailout1.samsung.com. [203.254.224.24]) by mx.google.com with ESMTP id ui8si12570pbc.315.2012.07.31.03.36.35; Tue, 31 Jul 2012 03:36:35 -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 <0M8000FS5TGWMA10@mailout1.samsung.com>; Tue, 31 Jul 2012 19:36:35 +0900 (KST) X-AuditID: cbfee61b-b7f566d000005c8a-a5-5017b533d3ed Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 9A.33.23690.335B7105; Tue, 31 Jul 2012 19:36:35 +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 <0M800037ATGJHE20@mmp1.samsung.com>; Tue, 31 Jul 2012 19:36:35 +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 Subject: [PATCH 7/8] EXYNOS5: Enable SPI Date: Tue, 31 Jul 2012 16:12:39 +0530 Message-id: <1343731360-31691-8-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1343731360-31691-1-git-send-email-rajeshwari.s@samsung.com> References: <1343731360-31691-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOJMWRmVeSWpSXmKPExsVy+t9jAV3jreIBBhMOcFs8XH+TxWLK4S8s Dkwed67tYQtgjOKySUnNySxLLdK3S+DKuHymj6VgFl/F9mW/WRoYe3i6GDk5JARMJO6+/s4E YYtJXLi3nq2LkYtDSGARo8TbG5+hnIlMEt1PzrCCVLEJGElsPTmNEcQWEZCQ+NV/Fcjm4GAW KJWYMjEPJCwsoCEx+c5sdhCbRUBVouXdOTCbV8BDord3AyPEMgWJY1O/go3kFPCUaJryiQXE FgKqae/vYprAyLuAkWEVo2hqQXJBcVJ6rpFecWJucWleul5yfu4mRrD3n0nvYFzVYHGIUYCD UYmH1+OkWIAQa2JZcWXuIUYJDmYlEV7WFeIBQrwpiZVVqUX58UWlOanFhxilOViUxHlNvL/6 CwmkJ5akZqemFqQWwWSZODilGhgnsLCGWcw5VNwhN9sj7cmu2yby6VKHbgaGCf1//3ZDTuNP 45vJ/ELz7Wt+vP+/uUFiTULz05q+9a05r1a/X/B0utgNM1aj/o9XLtrn9zmHeYU1G7c8sP+m XnTt/Zr64mtNBvcN3is0pCy7G8Izp7b/3r6ik+1Nq7fz5htIBvq9npia7bJkX6oSS3FGoqEW c1FxIgBaiXKW+gEAAA== X-TM-AS-MML: No X-Gm-Message-State: ALoCoQltzq7i49MrIkz/epxerP6mPNkXzOPb0ue7B80TwrBbM5yBfKuSB/JoqDfRp/0d9aVzLwRa This patch enables SPI driver for EXYNOS5. Signed-off-by: Rajeshwari Shinde --- board/samsung/smdk5250/smdk5250.c | 3 +++ include/configs/smdk5250.h | 23 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index a5816e4..2848c10 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -63,6 +63,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 27dab76..29b7ac6 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -167,7 +167,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 @@ -216,6 +216,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