From patchwork Wed Dec 10 08:38:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 419450 X-Patchwork-Delegate: sjg@chromium.org 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 09C261400B7 for ; Wed, 10 Dec 2014 19:38:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A38014B766; Wed, 10 Dec 2014 09:38:17 +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 Edm2QDvFur5V; Wed, 10 Dec 2014 09:38:17 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B0E24B74D; Wed, 10 Dec 2014 09:38:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E2FD84B75A for ; Wed, 10 Dec 2014 09:38:14 +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 JdGqGyN3dwmn for ; Wed, 10 Dec 2014 09:38:14 +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-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by theia.denx.de (Postfix) with ESMTPS id 71A124B73A for ; Wed, 10 Dec 2014 09:38:10 +0100 (CET) Received: by mail-pa0-f54.google.com with SMTP id fb1so2393686pad.27 for ; Wed, 10 Dec 2014 00:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=AgEeVwUHlEs8j/OWVG4uPrGVkH7GUYQrecEJ4p/t5f0=; b=VZtGXtnFSYXoTk8wVeCWY66685BDgFuozDbZid4UPRoWMh6liY0D7RMW2PN4J5lLaZ rqhpyznSe40fDpW9xixJqiBL/B8pX56NfhSH2TTZcwKcl0Fo5vk+Hbdr9iOk0AdmumAv SSWs0Yww+YMeStQ+2uFiQuW56nwz0O2bfR/UxQEd66Zf4gG7po4vJrKDCX37y9oKg4xr oBigGhZQ52oPLE7Awlrtxz6oxkYKweDkR9l+aPMtkGM3qO5hG1thb45coS2H2ODwPQk3 Kop3zZZeKig7gr1Ghzjtz26CP/87CyHEazDZVUAQaSzW89NtknjCvjt30NGYWtSF1XjZ Pcpw== X-Received: by 10.70.37.4 with SMTP id u4mr4914093pdj.3.1418200688786; Wed, 10 Dec 2014 00:38:08 -0800 (PST) Received: from localhost ([106.120.101.38]) by mx.google.com with ESMTPSA id fu1sm3462616pbb.91.2014.12.10.00.38.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Dec 2014 00:38:08 -0800 (PST) From: Bin Meng To: Simon Glass , Jagannadha Sutradharudu Teki , U-Boot Mailing List Date: Wed, 10 Dec 2014 16:38:02 +0800 Message-Id: <1418200682-4826-1-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.8.2.1 Subject: [U-Boot] [PATCH v3 2/2] x86: ich-spi: Set the tx operation mode for ich 7 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de ICH 7 SPI controller only supports byte program (02h) for SST flash. Word program (ADh) is not supported. Signed-off-by: Bin Meng --- Split from my v2 patch @ http://patchwork.ozlabs.org/patch/405753/ This needs to be applied after Jagan's new patch series: http://patchwork.ozlabs.org/patch/419154/ drivers/spi/ich.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index c38df08..0379444 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -141,9 +141,14 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, ich->slave.max_write_size = ctlr.databytes; ich->speed = max_hz; - /* ICH 7 SPI controller only supports array read command */ - if (ctlr.ich_version == 7) + /* + * ICH 7 SPI controller only supports array read command + * and byte program command for SST flash + */ + if (ctlr.ich_version == 7) { ich->slave.op_mode_rx = SPI_OPM_RX_AS; + ich->slave.op_mode_tx = SPI_OPM_TX_BP; + } return &ich->slave; }