From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dIddg-00057j-L2 for barebox@lists.infradead.org; Wed, 07 Jun 2017 16:16:58 +0000 From: Bastian Stender Date: Wed, 7 Jun 2017 18:15:51 +0200 Message-Id: <20170607161551.28713-1-bst@pengutronix.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] firmware: altera-serial: add support for Arria 10 To: barebox@lists.infradead.org Cc: Bastian Stender TWFrZSBGUEdBIHNwZWNpZmljIHNldHRpbmdzIGNvbmZpZ3VyYWJsZSAocGFkZGluZywgc3BpIGJp dHMgcGVyIHdvcmQsCmRlbGF5cykgYW5kIGFkZCBBcnJpYSAxMCBzdXBwb3J0LiBUaGUgQXJyaWEg MTAgY29tcGF0aWJsZSBpcyB0aGUgc2FtZQphcyBpbiB0aGUga2VybmVsIHBhdGNoICJmcGdhIG1h bmFnZXI6IEFkZCBhbHRlcmEtcHMtc3BpIGRyaXZlciBmb3IKQWx0ZXJhIEZQR0FzIiAoZHJpdmVy cy9mcGdhL2FsdGVyYS1wcy1zcGkuYykuIFRoZSBBcnJpYSA1IGNvbXBhdGlibGUKd29ya3MgdW5j aGFuZ2VkLgoKVGhpcyBwYXRjaCB3YXMgdGVzdGVkIHdpdGggQXJyaWEgNSBhbmQgQXJyaWEgMTAu CgpTaWduZWQtb2ZmLWJ5OiBCYXN0aWFuIFN0ZW5kZXIgPGJzdEBwZW5ndXRyb25peC5kZT4KLS0t CiAuLi4vYmluZGluZ3MvZmlybXdhcmUvYWx0cixwYXNzaXZlLXNlcmlhbC50eHQgICAgICB8ICAg MyArLQogZHJpd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