From patchwork Tue Oct 16 10:58:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hatim Ali X-Patchwork-Id: 12271 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 7C9E8214A95 for ; Tue, 16 Oct 2012 11:06:00 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id F3DF5A18F8A for ; Tue, 16 Oct 2012 11:05:59 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so9244113iej.11 for ; Tue, 16 Oct 2012 04:05:59 -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=GJe37wt9B3eZNGfygMDTxKlK7ptoQ4IRMOMzTOmikwM=; b=WGnOFgDOOIofgxGjZEx62d445w/+SM2cxokg2S9dcySIaHT/4jCErCvlGchtMF8ZjA v/JUTyg4moBZIYLi1DJVwj+SMgEUfDafuKayOtzzHVB7F+SFyuzTM35fL07oTlQoKN/O Cruw7Phn9gfUMEeg2UPPsl89eQLhsuZyog0QVPASBX5g9TkPU6eLWnfKCzdVA9WDOLk8 PSq9TYm6YsRe1xZ+petcFwKGkKnEXqClIlFHNy3Ibh8C9wG3trcEJwh6H/4ZJGsZvgBA ldl0N2cnxE4JT2rM6o069kbQgio+eWZwqT3vNJk1q1jWMBHvnMlecJbRAlRktJsn5FMt cuHw== Received: by 10.50.161.169 with SMTP id xt9mr9884017igb.62.1350385559373; Tue, 16 Oct 2012 04:05:59 -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 n20csp709242igt; Tue, 16 Oct 2012 04:05:58 -0700 (PDT) Received: by 10.68.232.195 with SMTP id tq3mr45805314pbc.70.1350385558415; Tue, 16 Oct 2012 04:05:58 -0700 (PDT) Received: from mailout1.samsung.com (mailout1.samsung.com. [203.254.224.24]) by mx.google.com with ESMTP id oe3si26276770pbb.204.2012.10.16.04.05.58; Tue, 16 Oct 2012 04:05:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of hatim.rv@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 hatim.rv@samsung.com designates 203.254.224.24 as permitted sender) smtp.mail=hatim.rv@samsung.com Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MBZ00ISRG5SBMW0@mailout1.samsung.com> for patches@linaro.org; Tue, 16 Oct 2012 20:05:57 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F9.E0.07865.59F3D705; Tue, 16 Oct 2012 20:05:57 +0900 (KST) X-AuditID: cbfee61a-b7f976d000001eb9-bf-507d3f95fb94 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 56.E0.07865.F8F3D705; Tue, 16 Oct 2012 20:05:51 +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 <0MBZ0099QFZTVV60@mmp1.samsung.com> for patches@linaro.org; Tue, 16 Oct 2012 20:05:51 +0900 (KST) From: Hatim Ali To: u-boot@lists.denx.de Cc: promsoft@gmail.com, patches@linaro.org, sjg@chromium.org Subject: [PATCH 5/6 V5] EXYNOS5: Enable SPI Date: Tue, 16 Oct 2012 16:28:45 +0530 Message-id: <1350385126-19312-6-git-send-email-hatim.rv@samsung.com> X-Mailer: git-send-email 1.7.2.3 In-reply-to: <1350385126-19312-1-git-send-email-hatim.rv@samsung.com> References: <1350385126-19312-1-git-send-email-hatim.rv@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsWyRsSkVneqfW2AwYE2CYsph7+wODB63Lm2 hy2AMYrLJiU1J7MstUjfLoEr4+nZbuaCRsGKDVt/MjUw7uDrYuTkkBAwkXi+dx47hC0mceHe erYuRi4OIYGljBKvfq1hhyladPUcE0RiEaPEtLsgHWAOk8Tu1aeZQKrYBNQk1r/uZAOxRQQk JH71X2UEsZkFbCQ+X54MZgsLaEtsPz0bzGYRUJXoOf+CpYuRg4NXwEVi7lNPiGUKEq9urAVb zCngKvFoXQdYuRBQyamLk6BaBSS+TT4E1iohICux6QAzyDkSApfZJH7vmQl1tKTEwRU3WCYw Ci9gZFjFKJpakFxQnJSea6hXnJhbXJqXrpecn7uJERiEp/89k9rBuLLB4hCjAAejEg9vhnNN gBBrYllxZe4hRgkOZiURXlXb2gAh3pTEyqrUovz4otKc1OJDjD5Al0xklhJNzgdGSF5JvKGx ibmpsamlkZGZqSkOYSVx3maPlAAhgfTEktTs1NSC1CKYcUwcnFINjPV8i1SiYi+bHK09LTv/ zpWfEk7TXth3BvDN4JKoyp14Zrbs3hQjqcmHZiqZrEo8YevQs+Xggzk7VRemLdhtJLHg9Ty1 T3amEXWb3AJurjjT9+FErIPqmvTKZRF/E7JPZ0xqNtw4IWnbuSNPplQeuspRzWf345+M14q5 R6bcPH3A2tXV0tXjEL8SS3FGoqEWc1FxIgBF4CHsbwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xgG6/fW2AQetHFYsph7+wODB63Lm2 hy2AMaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzAUNfQ0sJcSSEvMTfVVsnFJ0DXLTMH aKySQlliTilQKCCxuFhJ3w7ThNAQN10LmMYIXd+QILgeIwM0kLCGMePp2W7mgkbBig1bfzI1 MO7g62Lk5JAQMJFYdPUcE4QtJnHh3nq2LkYuDiGBRYwS0+7OY4dymCR2rz4NVsUmoCax/nUn G4gtIiAh8av/KiOIzSxgI/H58mQwW1hAW2L76dlgNouAqkTP+RcsXYwcHLwCLhJzn3pCLFOQ eHVjLTuIzSngKvFoXQdYuRBQyamLkxgnMPIuYGRYxSiaWpBcUJyUnmuoV5yYW1yal66XnJ+7 iREc4s+kdjCubLA4xCjAwajEw5vhXBMgxJpYVlyZe4hRgoNZSYRX1bY2QIg3JbGyKrUoP76o NCe1+BCjD9BRE5mlRJPzgfGXVxJvaGxibmpsamliYWJmiUNYSZy32SMlQEggPbEkNTs1tSC1 CGYcEwenVAPjKT67k0bOqz4Eb2fsP8/9YF7oeuOJPivYP2j6a7C4/lneLNPENlFH54nMV3FG hmrXi/++zfSY43/A+tPcP/x/Fgb7H1BxUskO3DzHVoSL2Td5c+oz95/T10zjeFBpYjR9y7dO 8btt/F/MrFacrZt+4uWTv0dl6zVZd1rPkDsU5KS7+DXjg6VlSizFGYmGWsxFxYkAY4Yk6Z4C AAA= X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnV57HLFQR25O8MyRNY3lTHkU99NDtQAoddD8SQnN9cLPkEhjmn2OuT9Aa2UDTo5G1FlNmg 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 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