From patchwork Wed Nov 16 04:03:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 695434 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 3tJW1J6Y7Tz9syB for ; Wed, 16 Nov 2016 15:07:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6101BB3861; Wed, 16 Nov 2016 05:05:39 +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 MILcVKUqpzr1; Wed, 16 Nov 2016 05:05:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 912A5B3885; Wed, 16 Nov 2016 05:05:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 71D9DB383E for ; Wed, 16 Nov 2016 05:05:05 +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 nj15ph5OW5K8 for ; Wed, 16 Nov 2016 05:05:05 +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-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by theia.denx.de (Postfix) with ESMTPS id 44206B383A for ; Wed, 16 Nov 2016 05:04:51 +0100 (CET) Received: by mail-pg0-f65.google.com with SMTP id x23so13485542pgx.3 for ; Tue, 15 Nov 2016 20:04:51 -0800 (PST) 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=BFdKl2k/FxvVN50vhnkhyNftPEoRTS3Us9vwRzLmkmw=; b=cD8u8u9NF0VgcA4STKf+vBjK61fZpMSQewnH/CHtBrUDkVgoAT/aWv6qDDZ5VipCNi vrjdpWNQuZmVD2QWUKGAr7lVqOE2NBcgpGQZy7aTpKcen4OurY3sTMn83MT+kFDI3eme kUBPsrqRF2YZMzLOjIb+L+RPhntUqBscuyWElQTD1tS+51eQCdcGmvxzV7oHG96YCrd8 hy4sSOXcg8rTqj3U0ocxgULqtYVA9WrRwIyVhduQEn3sl/hAaQ6u0h99dQbljZtYuEPY cffPoCEUw3IJhPpRkTUlYdCfGddz6r+gOXr30D8u5n6J/P4rIJs7t8RWcVYpDG6uzNgF g/tw== X-Gm-Message-State: ABUngvedp6zVhcyluSJVi9RQVvVROalRkFNClmYbVKWgY9KVgoxOmc4c7JvXINysDao3hA== X-Received: by 10.98.86.157 with SMTP id h29mr1607595pfj.25.1479269089461; Tue, 15 Nov 2016 20:04:49 -0800 (PST) Received: from localhost.localdomain ([115.97.183.210]) by smtp.gmail.com with ESMTPSA id q145sm25217663pfq.22.2016.11.15.20.04.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Nov 2016 20:04:48 -0800 (PST) From: Jagan Teki To: u-boot@lists.denx.de Date: Wed, 16 Nov 2016 09:33:07 +0530 Message-Id: <1479268992-26811-17-git-send-email-jagan@openedev.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1479268992-26811-1-git-send-email-jagan@openedev.com> References: <1479268992-26811-1-git-send-email-jagan@openedev.com> Cc: Michal Simek , Siva Durga Prasad Paladugu , Jagan Teki Subject: [U-Boot] [PATCH v6 16/21] spi: Remove dual flash options/flags 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. So, this patch remove the dual_flash options or flags in sf which are triggered from spi controller side. 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 Reviewed-by: Jagan Teki --- 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 cfecd53..d3a9975 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) }; /**