From patchwork Sat Jun 27 18:31:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 489057 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 1402014027C for ; Sun, 28 Jun 2015 04:33:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 73BC44B663; Sat, 27 Jun 2015 20:33:02 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JdDP1EdBo7Mq; Sat, 27 Jun 2015 20:33:02 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4B7E74B670; Sat, 27 Jun 2015 20:32:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9B2FB4B61C for ; Sat, 27 Jun 2015 20:32:46 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YtDNl4ygtvG8 for ; Sat, 27 Jun 2015 20:32:46 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from s159.web-hosting.com (s159.web-hosting.com [68.65.121.203]) by theia.denx.de (Postfix) with ESMTPS id 527784B65F for ; Sat, 27 Jun 2015 20:32:45 +0200 (CEST) Received: from [123.236.183.246] (port=34647 helo=localhost.localdomain) by server159.web-hosting.com with esmtpsa (UNKNOWN:AES128-SHA256:128) (Exim 4.82) (envelope-from ) id 1Z8uuA-002feP-5G; Sat, 27 Jun 2015 14:32:43 -0400 From: Jagan Teki To: u-boot@lists.denx.de Date: Sun, 28 Jun 2015 00:01:59 +0530 Message-Id: <1435429920-32466-5-git-send-email-jteki@openedev.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435429920-32466-1-git-send-email-jteki@openedev.com> References: <1435429920-32466-1-git-send-email-jteki@openedev.com> X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server159.web-hosting.com X-AntiAbuse: Original Domain - lists.denx.de X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - openedev.com X-Get-Message-Sender-Via: server159.web-hosting.com: authenticated_id: jteki@openedev.com X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched Subject: [U-Boot] [PATCH 4/5] arm: ls102xa: Enable Driver Model SPI for ls1021atwr X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Haikun Wang Enable Driver Model SPI for ls1021atwr board. DSPI and QSPI only be enabled when boot from QSPI. DSPI and QSPI are compatible under Driver Model SPI. Signed-off-by: Haikun Wang Tested-by: Review Code-CDREVIEW Reviewed-by: Prabhakar Kushwaha Reviewed-by: Jagan Teki Tested-by: Haikun Wang --- Changes in v7: - Rebase to master Changes in v4: - Add defconfig patch in this series Changes in v3: - IS_ENABLED(CONFIG_XXX) is only work with configure option in Kconfig, and DM core code use IS_ENABLED(), so configure option in head file can't work, so remove CONFIG_OF_CONTROL CONFIG_OF_SEPARATE CONFIG_DM CONFIG_DM_SPI Changes in v2: - Move all changes inside of CONFIG_QSPI_BOOT include/configs/ls1021atwr.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 446d562..233b3d0 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -250,15 +250,20 @@ #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION -/* QSPI */ +/* SPI */ #ifdef CONFIG_QSPI_BOOT +/* QSPI */ #define CONFIG_FSL_QSPI #define QSPI0_AMBA_BASE 0x40000000 #define FSL_QSPI_FLASH_SIZE (1 << 24) #define FSL_QSPI_FLASH_NUM 2 +#define CONFIG_SPI_FLASH_STMICRO +/* DM SPI */ +#if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI) #define CONFIG_CMD_SF -#define CONFIG_SPI_FLASH_STMICRO +#define CONFIG_DM_SPI_FLASH +#endif #endif /*