From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.phytec.eu ([217.6.246.34] helo=root.phytec.de) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uou3B-0005V8-Cy for barebox@lists.infradead.org; Tue, 18 Jun 2013 11:26:16 +0000 Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id 976FABF0F5 for ; Tue, 18 Jun 2013 13:21:09 +0200 (CEST) From: =?UTF-8?q?Teresa=20G=C3=A1mez?= Date: Tue, 18 Jun 2013 13:25:46 +0200 Message-Id: <1371554747-9052-3-git-send-email-t.gamez@phytec.de> In-Reply-To: <1371554747-9052-1-git-send-email-t.gamez@phytec.de> References: <1371554747-9052-1-git-send-email-t.gamez@phytec.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/3] omap3_spi: Add CS check for AM33xx To: barebox@lists.infradead.org QU0zM3h4IGhhcyBvbmx5IDIgTWNTUEkgYnVzc2VzIGFuZCAyIENTIGZvciBlYWNoIGJ1cy4KQWRk ZWQgY29tbWVudCBhbmQgdGhlIGNoZWNrLgoKU2lnbmVkLW9mZi1ieTogVGVyZXNhIEfDoW1leiA8 dC5nYW1lekBwaHl0ZWMuZGU+Ci0tLQogZHJpdmVycy9zcGkvb21hcDNfc3BpLmMgfCAgIDIwICsr KysrKysrKysrKysrKysrLS0tCiAxIGZpbGVzIGNoYW5nZWQsIDE3IGluc2VydGlvbnMoKyksIDMg ZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zcGkvb21hcDNfc3BpLmMgYi9kcml2 ZXJzL3NwaS9vbWFwM19zcGkuYwppbmRleCBlNjU4MWRmLi4xZWIwZTZhIDEwMDY0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