From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp5-g21.free.fr ([2a01:e0c:1:1599::14]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VpEKI-0004qf-Pe for barebox@lists.infradead.org; Sat, 07 Dec 2013 09:37:33 +0000 Received: from localhost.localdomain (unknown [82.233.81.124]) by smtp5-g21.free.fr (Postfix) with ESMTP id 7EF29D480E8 for ; Sat, 7 Dec 2013 10:37:05 +0100 (CET) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Sat, 7 Dec 2013 10:36:55 +0100 Message-Id: <1386409020-11914-2-git-send-email-eric@eukrea.com> In-Reply-To: <1386409020-11914-1-git-send-email-eric@eukrea.com> References: <1386409020-11914-1-git-send-email-eric@eukrea.com> 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/7] at91: introduce sama5d3's SMC support To: barebox@lists.infradead.org dGhlcmUgaXMgYSBuZXcgcmVnaXN0ZXIgKHRpbWluZ3MpIHZzIFNBTTkgYW5kIHRodXMgYSBuZXcg bWFwcGluZwoKU2lnbmVkLW9mZi1ieTogRXJpYyBCw6luYXJkIDxlcmljQGV1a3JlYS5jb20+Ci0t LQogYXJjaC9hcm0vbWFjaC1hdDkxL2dlbmVyaWMuaCAgICAgICAgICAgICAgICB8ICAgNyArKwog YXJjaC9hcm0vbWFjaC1hdDkxL2luY2x1ZGUvbWFjaC9zYW1hNV9zbWMuaCB8IDEyNCArKysrKysr KysrKysrKysrKysrKysKIGFyY2gvYXJtL21hY2gtYXQ5MS9zYW1hNV9zbWMuYyAgICAgICAgICAg ICAgfCAxNjEgKysrKysrKysrKysrKysrKysrKysrKysrKysrKwogMyBmaWxlcyBjaGFuZ2VkLCAy OTIgaW5zZXJ0a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ZXIgKi8KKwlzYW1hNXNtY19jc19yZWFkX21vZGUoYmFzZSwgY29uZmlnKTsK K30KKwordm9pZCBzYW1hNXNtY19yZWFkKGludCBpZCwgaW50IGNzLCBzdHJ1Y3Qgc2FtYTVfc21j X2NvbmZpZyAqY29uZmlnKQoreworCXNhbWE1c21jX2NzX3JlYWQoQVQ5MV9TTUNfQ1MoaWQsIGNz KSwgY29uZmlnKTsKK30KKworc3RhdGljIGludCBhdDkxc2FtYTVzbWNfcHJvYmUoc3RydWN0IGRl dmljZV9kICpkZXYpCit7CisJaW50IGlkID0gZGV2LT5pZDsKKworCWlmIChpZCA8IDApIHsKKwkJ aWQgPSAwOworCX0gZWxzZSBpZiAoaWQgPiAxKSB7CisJCWRldl93YXJuKGRldiwgImlkID4gMVxu Iik7CisJCXJldHVybiAtRUlPOworCX0KKworCXNtY19iYXNlX2FkZHJbaWRdID0gZGV2X3JlcXVl c3RfbWVtX3JlZ2lvbihkZXYsIDApOworCWlmICghc21jX2Jhc2VfYWRkcltpZF0pIHsKKwkJZGV2 X2VycihkZXYsICJJbXBvc3NpYmxlIHRvIHJlcXVlc3Qgc21jLiVkXG4iLCBpZCk7CisJCXJldHVy biAtRU5PTUVNOworCX0KKworCXJldHVybiAwOworfQorCitzdGF0aWMgc3RydWN0IGRyaXZlcl9k IGF0OTFzYW1hNXNtY19kcml2ZXIgPSB7CisJLm5hbWUgPSAiYXQ5MXNhbWE1LXNtYyIsCisJLnBy b2JlID0gYXQ5MXNhbWE1c21jX3Byb2JlLAorfTsKKworc3RhdGljIGludCBhdDkxc2FtYTVzbWNf aW5pdCh2b2lkKQoreworCXJldHVybiBwbGF0Zm9ybV9kcml2ZXJfcmVnaXN0ZXIoJmF0OTFzYW1h NXNtY19kcml2ZXIpOworfQorY29yZWRldmljZV9pbml0Y2FsbChhdDkxc2FtYTVzbWNfaW5pdCk7 Ci0tIAoxLjguMy4xCgoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX18KYmFyZWJveCBtYWlsaW5nIGxpc3QKYmFyZWJveEBsaXN0cy5pbmZyYWRlYWQub3JnCmh0 dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vYmFyZWJveAo=