From patchwork Mon Mar 11 16:08:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 226591 X-Patchwork-Delegate: trini@ti.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 CF1CC2C0386 for ; Tue, 12 Mar 2013 03:20:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9F1244A262; Mon, 11 Mar 2013 17:11:27 +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 Sb9PEIHq5ur6; Mon, 11 Mar 2013 17:11:27 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4315A4A23A; Mon, 11 Mar 2013 17:10:34 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A4B84A176 for ; Mon, 11 Mar 2013 17:09:16 +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 MCVmcVaEapPD for ; Mon, 11 Mar 2013 17:09:15 +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-qc0-f201.google.com (mail-qc0-f201.google.com [209.85.216.201]) by theia.denx.de (Postfix) with ESMTPS id CBAFB4A1F6 for ; Mon, 11 Mar 2013 17:09:00 +0100 (CET) Received: by mail-qc0-f201.google.com with SMTP id o22so322617qcr.0 for ; Mon, 11 Mar 2013 09:08:59 -0700 (PDT) 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=QyV5sV3JLlt6jKGeX98zvry+kqBDgd2xQGdKlsWVBwQ=; b=mlLTCiEFx3pwiOWRgCrryoXEydWa2OOMM7r2IlDX0bTWprmueaztQ2SvUSofU2g5yG tHvMNdOttM3B0CfwEJkJseg8zGt44owHvjFVqf70t+NkOpdUNPf8ToPZpDwfVtdg8NZj WAktTYAyvOUttfeLcJgs44zmIp+t5beBPXvBVKO1hOnB262H6PjkpZ/DAuFWHDW6jeUk 6YfsLNzW4zpgdGwPIdBTSCYw+4AAOaYYJLzpQH8gd3icHMFsR0JHE90fQ3/sKvL3glhM WCxcl7OfH54aM4BRmEYCswMbNA3qViMzr+UlfG+hg4WKXzKogJiegNL57Ie2US8vp/i1 fXRA== X-Received: by 10.236.126.194 with SMTP id b42mr8087935yhi.23.1363018139336; Mon, 11 Mar 2013 09:08:59 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id k21si1088164yhh.1.2013.03.11.09.08.59 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Mon, 11 Mar 2013 09:08:59 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 2F53731C26C; Mon, 11 Mar 2013 09:08:59 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 0CD5F160CF9; Mon, 11 Mar 2013 09:08:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 11 Mar 2013 09:08:07 -0700 Message-Id: <1363018093-28979-10-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1363018093-28979-1-git-send-email-sjg@chromium.org> References: <1363018093-28979-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQnZB7kAdsvk6oDSOf5NPM83JgTBm6vl0bfYNUIzjUcOZn5loSevHxXnpmlgZxVBEaLbOELSe0RTaLe6W9ysC9yEzgE5/k1zJ603mCm4dkBKUsBSEKNJ6nEmdWR0ukEesx1jM3ttirx6VjuKWudVesSAq0jqyV0BJaGS6BGFngTUHrMe43L5PAQEB68cQmKbCksApAOE Cc: Graeme Russ , Tom Warren Subject: [U-Boot] [PATCH v2 09/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 --- Changes in v2: None drivers/spi/ich.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 9f8eab2..15213d9 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -147,6 +147,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;