From patchwork Wed Aug 1 09:33:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 10437 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 E7E2B24048 for ; Wed, 1 Aug 2012 09:27:26 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id B83CAA18EE0 for ; Wed, 1 Aug 2012 09:27:26 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so6902136ghb.11 for ; Wed, 01 Aug 2012 02:27:26 -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=mHOvGh/tXpeKtDuodsnesJT0HXsAbv4tw5qtTdOnEKQ=; b=F/UNmI4EAUZ5X5AGaIUs9UwfBYRVZIB0I2PXunHkkMu1Ik1+BmPbfUJ3nfdlkXXinC WJ9C4wv2smSOBou+5LKMoP0pBh7O7LXJOAxg4FguZ9vqXrfP1t/RGzthjwC+sD0flTQo Zh23gZwiMuVVO4FQpFj+zr/oGLaI+amB09/t8suNL+spu2n/itwQDGR8Wh1A3KLk4wkN 1yRAKdiDLTEdWItn2ABKMxawWDahnplNjmoPjvKImGVgogCRK7o/cIRgCG9IAsxBh+HL k3Pjp33adlMcKfLkn6AqFQ/uWRcMYn7SJZJYtBHdOFW1HT2bUfbBWK6m0ntm/rU+lx6Y qpPw== Received: by 10.50.219.194 with SMTP id pq2mr3316144igc.25.1343813246292; Wed, 01 Aug 2012 02:27:26 -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 u8csp187716igz; Wed, 1 Aug 2012 02:27:25 -0700 (PDT) Received: by 10.66.75.201 with SMTP id e9mr38557952paw.54.1343813245568; Wed, 01 Aug 2012 02:27:25 -0700 (PDT) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id ky6si5187449pbc.138.2012.08.01.02.27.25; Wed, 01 Aug 2012 02:27:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.33 as permitted sender) client-ip=203.254.224.33; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of rajeshwari.s@samsung.com designates 203.254.224.33 as permitted sender) smtp.mail=rajeshwari.s@samsung.com Received: from epcpsbgm1.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M82003GGKWD1X40@mailout3.samsung.com>; Wed, 01 Aug 2012 18:27:24 +0900 (KST) X-AuditID: cbfee61a-b7f616d000004b7e-47-5018f67c2bec Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 55.C5.19326.C76F8105; Wed, 01 Aug 2012 18:27:24 +0900 (KST) Received: from rajeshwari-linux.sisodomain.com ([107.108.215.115]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M820029AKX8FS00@mmp2.samsung.com>; Wed, 01 Aug 2012 18:27:24 +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 6/7 V3] EXYNOS5: Enable SPI Date: Wed, 01 Aug 2012 15:03:31 +0530 Message-id: <1343813612-1587-7-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1343813612-1587-1-git-send-email-rajeshwari.s@samsung.com> References: <1343813612-1587-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKJMWRmVeSWpSXmKPExsVy+t9jQd2abxIBBlMm8Fo8XH+TxWLK4S8s Dkwed67tYQtgjOKySUnNySxLLdK3S+DKmHTBpWClQMWFvU/ZGxgf8nYxcnJICJhIXDrRyAJh i0lcuLeerYuRi0NIYDqjxMWPW9khnIlMEitbF7GBVLEJGElsPTmNEcQWEZCQ+NV/Fcjm4GAW KJWYMjEPJCwsoC3R0b4fbCiLgKrE9edXwWxeAXeJFVevMEMsU5A4NvUrK0grp4CHxPedYNOF gEpuvd3FOoGRdwEjwypG0dSC5ILipPRcQ73ixNzi0rx0veT83E2MYM8/k9rBuLLB4hCjAAej Eg/vRBOJACHWxLLiytxDjBIczEoivAU3gUK8KYmVValF+fFFpTmpxYcYpTlYlMR5jb2/+gsJ pCeWpGanphakFsFkmTg4pRoY9f+mi7vWlxZUJHZc499+pPmt/gvezqBZ9WUSf7tvvNLR/5jx T6VkmZOhaoP0H52j+qkWb9qZj7b+m7J5as3TKfVFNwI9G9+sf/z5P/stZWnNr5f5ryQ/OXW3 pObGHxXx0+/u6EdJxpd++h7e7CDzOObqnkdTeQ1y7bZXRD/TLX/24eJhG69SJZbijERDLeai 4kQAeV/Dd/gBAAA= X-TM-AS-MML: No X-Gm-Message-State: ALoCoQlzI4ZBvl7vUYWOURKhFjBsa7521frg87+4bKU220lYyUQTv5kJdJwpk/WZUj2GN4VVvc6n This patch enables SPI driver for EXYNOS5. Signed-off-by: Rajeshwari Shinde --- Changes in V2: - None. Changes in V3: - Corrected the warning message. 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 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