From patchwork Fri Dec 18 07:29:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Getzendanner X-Patchwork-Id: 68625 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI7hEfp029789 for ; Fri, 18 Dec 2009 07:43:14 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NLXUP-0001rI-UJ; Fri, 18 Dec 2009 07:43:05 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NLXUO-0001rD-Lr for spi-devel-general@lists.sourceforge.net; Fri, 18 Dec 2009 07:43:04 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of students.olin.edu designates 4.21.175.49 as permitted sender) client-ip=4.21.175.49; envelope-from=James.Getzendanner@students.olin.edu; helo=EXCAS02.olin.edu; Received: from excas02.olin.edu ([4.21.175.49]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.69) id 1NLXUF-0002yG-Em for spi-devel-general@lists.sourceforge.net; Fri, 18 Dec 2009 07:43:04 +0000 Received: from EXVS01.olin.edu ([fe80::a9b0:642c:566b:e64f]) by EXCAS02.olin.edu ([fe80::3080:fc86:c3a:3a7c%10]) with mapi; Fri, 18 Dec 2009 02:29:54 -0500 From: James Getzendanner To: "uclinux-dist-devel@blackfin.uclinux.org" Date: Fri, 18 Dec 2009 02:29:53 -0500 Thread-Topic: [PATCH] Clear control bits in drivers/spi/spi_bfin5xx.c as necessary Thread-Index: Acp/s+Q40WJeCopNSbW06aKYDWcd0g== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1NLXUF-0002yG-Em Cc: "spi-devel-general@lists.sourceforge.net" Subject: [spi-devel-general] [PATCH] Clear control bits in drivers/spi/spi_bfin5xx.c as necessary X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net --- linux-2.6.32.1/drivers/spi/spi_bfin5xx.c.orig 2009-12-14 12:47:25.000000000 -0500 +++ linux-2.6.32.1/drivers/spi/spi_bfin5xx.c 2009-12-18 00:27:10.000000000 -0500 @@ -1051,10 +1051,16 @@ static int bfin_spi_setup(struct spi_dev /* translate common spi framework into our register */ if (spi->mode & SPI_CPOL) chip->ctl_reg |= CPOL; + else + chip->ctl_reg &= ~CPOL; if (spi->mode & SPI_CPHA) chip->ctl_reg |= CPHA; + else + chip->ctl_reg &= ~CPHA; if (spi->mode & SPI_LSB_FIRST) chip->ctl_reg |= LSBF; + else + chip->ctl_reg &= ~LSBF; /* we dont support running in slave mode (yet?) */ chip->ctl_reg |= MSTR; @@ -1106,6 +1112,7 @@ static int bfin_spi_setup(struct spi_dev bfin_spi_u8_cs_chg_writer : bfin_spi_u8_writer; chip->duplex = chip->cs_change_per_word ? bfin_spi_u8_cs_chg_duplex : bfin_spi_u8_duplex; + chip->ctl_reg &= ~SIZE; break; case 16: @@ -1117,6 +1124,7 @@ static int bfin_spi_setup(struct spi_dev bfin_spi_u16_cs_chg_writer : bfin_spi_u16_writer; chip->duplex = chip->cs_change_per_word ? bfin_spi_u16_cs_chg_duplex : bfin_spi_u16_duplex; + chip->ctl_reg |= SIZE; break; default: