From patchwork Sun Oct 30 17:46:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 689001 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 3t6Q526dXwz9s9N for ; Mon, 31 Oct 2016 04:50:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E3C8FA75F1; Sun, 30 Oct 2016 18:49:19 +0100 (CET) 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 0ODWsyV_G2ir; Sun, 30 Oct 2016 18:49:19 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2666BA761D; Sun, 30 Oct 2016 18:49:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22B06A75FD for ; Sun, 30 Oct 2016 18:48:47 +0100 (CET) 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 lPSUIM_5xbYn for ; Sun, 30 Oct 2016 18:48:47 +0100 (CET) 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 mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by theia.denx.de (Postfix) with ESMTPS id C7643B3831 for ; Sun, 30 Oct 2016 18:48:06 +0100 (CET) Received: by mail-pf0-f193.google.com with SMTP id a136so3208827pfa.0 for ; Sun, 30 Oct 2016 10:48:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i1WSD9qKjO5DfSkPP3WQs3cFsHjVtKiRB/w3N8B1s4s=; b=benAAp1Xj+2sn6WSJNYJYWedvtgaQx/RMJ9ntJBim7+Lbg26pirHe1s4wSk4hBuC6U woa5bPUZw/eFztG5sj7qZuI4kGOQKXi6wxUjs5dSHxKFUxLoJLegCLDvqIdNlDU7lhc6 iFWZ8C7ka9n0rJb8RJlhR+7FEBzy1Rded0+Im7YVRbH3zGyCaFtMXnPRydo8MGbMJ2fO vllDI4/N/RWDKp9M2vBHcahcJudKLZYcjGcfJcR3f+A1Ui4YCO8ZxLkEXS006gK8JG5w nVQSgvj7xDN8UyoTFPkiu6FciiOROGz3xuyoFFWsWMRkCMkx7/9iVhOBFQp3ArFXpHlV 3FwQ== X-Gm-Message-State: ABUngvcogGSU3Kxlh6EQBUlVU7JANkPNbkS9nmQMmkR0guAtykbynmqt0LScREZqcpIjag== X-Received: by 10.98.55.67 with SMTP id e64mr42333665pfa.80.1477849685374; Sun, 30 Oct 2016 10:48:05 -0700 (PDT) Received: from Mr.J ([49.204.230.134]) by smtp.gmail.com with ESMTPSA id s7sm4138882pfg.32.2016.10.30.10.48.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 30 Oct 2016 10:48:04 -0700 (PDT) From: Jagan Teki To: u-boot@lists.denx.de Date: Sun, 30 Oct 2016 23:16:26 +0530 Message-Id: <1477849590-11954-18-git-send-email-jagan@openedev.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477849590-11954-1-git-send-email-jagan@openedev.com> References: <1477849590-11954-1-git-send-email-jagan@openedev.com> Cc: Michal Simek , Siva Durga Prasad Paladugu , Jagan Teki Subject: [U-Boot] [PATCH v5 17/21] spi: Remove dual flash code 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" Dual flash code in spi are usually take the spi controller to work with dual connected flash devices. Usually these dual connection operation's are referred to flash controller protocol rather with spi controller protocol, these are still present in flash side for the usage of spi-nor controllers. Cc: Simon Glass Cc: Bin Meng Cc: York Sun Cc: Vignesh R Cc: Mugunthan V N Cc: Michal Simek Cc: Siva Durga Prasad Paladugu Signed-off-by: Jagan Teki Reviewed-by: Simon Glass --- drivers/mtd/spi/sf.c | 4 ---- drivers/mtd/spi/spi_flash.c | 1 - include/spi.h | 6 ------ 3 files changed, 11 deletions(-) diff --git a/drivers/mtd/spi/sf.c b/drivers/mtd/spi/sf.c index 664e860..d5e175c 100644 --- a/drivers/mtd/spi/sf.c +++ b/drivers/mtd/spi/sf.c @@ -18,10 +18,6 @@ static int spi_flash_read_write(struct spi_slave *spi, unsigned long flags = SPI_XFER_BEGIN; int ret; -#ifdef CONFIG_SF_DUAL_FLASH - if (spi->flags & SPI_XFER_U_PAGE) - flags |= SPI_XFER_U_PAGE; -#endif if (data_len == 0) flags |= SPI_XFER_END; diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index b4001a5..708991c 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -1016,7 +1016,6 @@ int spi_flash_scan(struct spi_flash *flash) flash->name = info->name; flash->memory_map = spi->memory_map; - flash->dual_flash = spi->option; if (info->flags & SST_WR) flash->flags |= SNOR_F_SST_WR; diff --git a/include/spi.h b/include/spi.h index 4c17983..deb65ef 100644 --- a/include/spi.h +++ b/include/spi.h @@ -30,10 +30,6 @@ #define SPI_RX_DUAL BIT(12) /* receive with 2 wires */ #define SPI_RX_QUAD BIT(13) /* receive with 4 wires */ -/* SPI bus connection options - see enum spi_dual_flash */ -#define SPI_CONN_DUAL_SHARED (1 << 0) -#define SPI_CONN_DUAL_SEPARATED (1 << 1) - /* Header byte that marks the start of the message */ #define SPI_PREAMBLE_END_BYTE 0xec @@ -93,7 +89,6 @@ struct dm_spi_slave_platdata { * @max_write_size: If non-zero, the maximum number of bytes which can * be written at once, excluding command bytes. * @memory_map: Address of read-only SPI flash access. - * @option: Varies SPI bus options - separate, shared bus. * @flags: Indication of SPI flags. */ struct spi_slave { @@ -117,7 +112,6 @@ struct spi_slave { #define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END) #define SPI_XFER_MMAP BIT(2) /* Memory Mapped start */ #define SPI_XFER_MMAP_END BIT(3) /* Memory Mapped End */ -#define SPI_XFER_U_PAGE BIT(4) }; /**