From patchwork Tue Jul 31 11:01:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajeshwari Shinde X-Patchwork-Id: 10392 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 3842523E23 for ; Tue, 31 Jul 2012 10:54:59 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id E5E99A18836 for ; Tue, 31 Jul 2012 10:54:58 +0000 (UTC) Received: by yhpp61 with SMTP id p61so5771341yhp.11 for ; Tue, 31 Jul 2012 03:54:58 -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=kbj5ITjZ9oB9cRPjR985Khw32bOc05Ta6NwGvHI5VMU=; b=ZmTrs/1O88Xlg1YwjXI5FxYo18ps4o3KqpC+fsSxx655xMceiQqHBFY27qkYhgvac6 YCD1Ub5L5ONEDthD0rL4LdSoKIWs79RlxY6hov+1JVEZPJxnH8URXnPJFBGDRWdfDEK8 z2db1zP8Wb+cIxZ0YzWJqx/CdIcjnM21p9UJOIE4IeHt34VsTM+faF0YUBApR0kcJKsK PSD81jaHnMUVo2KRQItiwnEbzlqGn6G0Wugb6Tbn6EkzWXrq4e/yCP3cXk0OT0yM34yi dFbn5q1vu1tThju4EJj6E7cDw4yws6QI0Ouz9JdcnjWK+9b/7Mm9y1UCs2AsDcd8ZU7B LVkw== Received: by 10.50.46.132 with SMTP id v4mr1583725igm.25.1343732098235; Tue, 31 Jul 2012 03:54:58 -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 u8csp135977igz; Tue, 31 Jul 2012 03:54:57 -0700 (PDT) Received: by 10.68.217.202 with SMTP id pa10mr13735431pbc.15.1343732097669; Tue, 31 Jul 2012 03:54:57 -0700 (PDT) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id tv8si140305pbc.89.2012.07.31.03.54.57; Tue, 31 Jul 2012 03:54:57 -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 <0M80003QKUB3X2K0@mailout3.samsung.com>; Tue, 31 Jul 2012 19:54:56 +0900 (KST) X-AuditID: cbfee61a-b7f616d000004b7e-de-5017b98022c5 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id A9.FA.19326.089B7105; Tue, 31 Jul 2012 19:54:56 +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 <0M800036CUB41W90@mmp1.samsung.com>; Tue, 31 Jul 2012 19:54:56 +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 V2] EXYNOS5: Enable SPI Date: Tue, 31 Jul 2012 16:31:00 +0530 Message-id: <1343732461-3092-8-git-send-email-rajeshwari.s@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1343732461-3092-1-git-send-email-rajeshwari.s@samsung.com> References: <1343732461-3092-1-git-send-email-rajeshwari.s@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGJMWRmVeSWpSXmKPExsVy+t9jAd2GneIBBt9WSFk8XH+TxWLK4S8s Dkwed67tYQtgjOKySUnNySxLLdK3S+DKOLGlj61gC1/F87mz2RoY5/F0MXJySAiYSLw7u5wJ whaTuHBvPVsXIxeHkMAiRom1n+4zQTgTmST2nvrHDlLFJmAksfXkNEYQW0RAQuJX/1Ugm4OD WaBUYsrEPJCwsIC2xNeW5cwgNouAqsS9C5PBWnkF3CW+tZ9jhVimIHFs6ldWkFZOAQ+JvrcZ IGEhoJLXF78yTWDkXcDIsIpRNLUguaA4KT3XUK84Mbe4NC9dLzk/dxMj2PfPpHYwrmywOMQo wMGoxMPrcVIsQIg1say4MvcQowQHs5IIL+sK8QAh3pTEyqrUovz4otKc1OJDjNIcLErivMbe X/2FBNITS1KzU1MLUotgskwcnFINjFUsMz07BRQPT8uPiNqaXzTh/7MXz7nav056FnzX04pv Qovue/nIuM6ARxoXlzsVSubxOniFF35WmRpw2ePMTakbObO2VCWU68SlGwYsnxa+7VaH/lrp +NyC7VOy7qYcy5xlefNQze7K1wbfUyTOXq5xXly7qiXmj3Tk2mhbvQURa+cI3Xrmo8RSnJFo qMVcVJwIAGnkdBz5AQAA X-TM-AS-MML: No X-Gm-Message-State: ALoCoQnVI/V+fZukKIm1PqgXBmbNBmFpHcs7E4nAdHe3XqTf8KG3LFyXRmfeDJLvDYnpYwknzHCM This patch enables SPI driver for EXYNOS5. Signed-off-by: Rajeshwari Shinde Acked-by: Simon Glass --- Changes in V2: - None. 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