From patchwork Wed Dec 26 22:28:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 208231 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 A26712C00B4 for ; Thu, 27 Dec 2012 09:30:21 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D97714A018; Wed, 26 Dec 2012 23:30:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 4EHwaCXXOf3A; Wed, 26 Dec 2012 23:30:13 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D7EF44A0F6; Wed, 26 Dec 2012 23:29:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7C16B4A0AE for ; Wed, 26 Dec 2012 23:29:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 40hsHpF4mJ+e for ; Wed, 26 Dec 2012 23:29:22 +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-gg0-f201.google.com (mail-gg0-f201.google.com [209.85.161.201]) by theia.denx.de (Postfix) with ESMTPS id C968B4A0B9 for ; Wed, 26 Dec 2012 23:29:07 +0100 (CET) Received: by mail-gg0-f201.google.com with SMTP id o6so946256ggm.0 for ; Wed, 26 Dec 2012 14:29:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=FeZ7mY+ICoo5VzPtb59ldbTMqYexdDcqsfhAlojKSIM=; b=Gw8DUPW3FoJDd6Y1/XH9btQT1EkYO3vncfZrkH9CC7SBH3FuSSo+uul6W/Evl5ucjW Q/WL1/M/l7P7RpDoxWLy488GMZkPuPQzFJlITV3tplCmNdwFD07Sa41nY/RSdsLYRBIP tLV5KrqFXre9+bqClxdglSa4Fhh/aI9DrWgyxZBGRUGu7MvDJgk43jUfrRvZaC/YwDcA f2qro+9Qy09w/lk581vhS4utF1VajX06SQIYN5KD4+6BAotnEwPIz4u0RaX4kwNvwEJx 19MWD0kU+0oR2mFZ21dFgNO+rG7PcVSb913Bry33WT5z+YNIZU/1hau1jQH081aN7w5U Jabg== X-Received: by 10.236.115.105 with SMTP id d69mr8093387yhh.32.1356560946463; Wed, 26 Dec 2012 14:29:06 -0800 (PST) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id i27si2382274yhe.4.2012.12.26.14.29.06 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 26 Dec 2012 14:29:06 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 49DD9100047; Wed, 26 Dec 2012 14:29:06 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 0157B16266C; Wed, 26 Dec 2012 14:29:05 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Wed, 26 Dec 2012 14:28:28 -0800 Message-Id: <1356560913-2205-11-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1356560913-2205-1-git-send-email-sjg@chromium.org> References: <1356560913-2205-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkRspdvycEE0myFlS0CHU/pWlhO4YOLJovlBuyU+JnjUh1MPJCA8OLEPJ7JIdwjvz4OGPjJEHOflzVGeaIk9w4DUqTlzi1M/iqkM8rzFTyFs7qCQJe+xJQ6HMnATmdm+ahByPHJwSC9PKhIOkoq+AWzaidwqtjmzr0au58cIkNCEhjDQvb11DFkP6oqETXK6PRB9hKk Cc: Graeme Russ , Tom Warren Subject: [U-Boot] [PATCH 10/15] x86: spi: Set maximum write size for ICH X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 This SPI controller can only write 64 bytes at a time. Add this restriction in so that 'sf write' works correct for blocks larger than 64 bytes. Signed-off-by: Simon Glass --- drivers/spi/ich.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 31f9482..17defa4 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -166,6 +166,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, return NULL; } + /* + * Yes this controller can only write a small number of bytes at + * once! The limit is typically 64 bytes. + */ + ich->slave.max_write_size = ctlr.databytes; ich->speed = max_hz; return &ich->slave;