From patchwork Wed Sep 28 18:21:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Tull X-Patchwork-Id: 9354691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AEB2060757 for ; Wed, 28 Sep 2016 18:35:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FBA329790 for ; Wed, 28 Sep 2016 18:35:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94504297A4; Wed, 28 Sep 2016 18:35:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE81A29790 for ; Wed, 28 Sep 2016 18:35:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bpJfR-0001NO-Bg; Wed, 28 Sep 2016 18:33:17 +0000 Received: from mail-bn3nam01on0054.outbound.protection.outlook.com ([104.47.33.54] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bpJVn-00015y-HP for linux-arm-kernel@lists.infradead.org; Wed, 28 Sep 2016 18:23:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.onmicrosoft.com; s=selector1-opensource-altera-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GlrGay8xWX3kVzpvNZ+L2bwcOj/dhczsE6o2c4O1AKI=; b=Mp2aQeDGotn7TVs0NGSOAp4YdSc8deem84o+KnIkvcFl5IOPZ6PMNCChhP0+a0ZPRaR11tgiHYPS7Hs0Tt7rnyHtbppIWBRLoC2Vi7jtF742x3m98MJbAXMFzKlxfUeVgEq4tAAlOvNAG8rZzonnxBdNoFsIpPE6CZo8ZWWcyL8= Received: from BLUPR0301CA0039.namprd03.prod.outlook.com (10.162.113.177) by BY1PR0301MB1271.namprd03.prod.outlook.com (10.161.205.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Wed, 28 Sep 2016 18:22:56 +0000 Received: from BY2FFO11FD040.protection.gbl (2a01:111:f400:7c0c::121) by BLUPR0301CA0039.outlook.office365.com (2a01:111:e400:5259::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5 via Frontend Transport; Wed, 28 Sep 2016 18:22:54 +0000 Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; ni.com; dkim=pass (signature was verified) header.d=altera.onmicrosoft.com; ni.com; dmarc=none action=none header.from=opensource.altera.com; Received-SPF: Fail (protection.outlook.com: domain of opensource.altera.com does not designate 66.35.236.236 as permitted sender) receiver=protection.outlook.com; client-ip=66.35.236.236; helo=sj-itexedge04.altera.priv.altera.com; Received: from sj-itexedge04.altera.priv.altera.com (66.35.236.236) by BY2FFO11FD040.mail.protection.outlook.com (10.1.14.225) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.629.5 via Frontend Transport; Wed, 28 Sep 2016 18:22:48 +0000 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (207.46.163.88) by webmail.altera.com (66.35.236.236) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 28 Sep 2016 11:21:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.onmicrosoft.com; s=selector1-opensource-altera-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GlrGay8xWX3kVzpvNZ+L2bwcOj/dhczsE6o2c4O1AKI=; b=Mp2aQeDGotn7TVs0NGSOAp4YdSc8deem84o+KnIkvcFl5IOPZ6PMNCChhP0+a0ZPRaR11tgiHYPS7Hs0Tt7rnyHtbppIWBRLoC2Vi7jtF742x3m98MJbAXMFzKlxfUeVgEq4tAAlOvNAG8rZzonnxBdNoFsIpPE6CZo8ZWWcyL8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=atull@opensource.altera.com; Received: from linuxheads99.altera.com (64.129.157.38) by BLUPR03MB1508.namprd03.prod.outlook.com (10.163.81.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Wed, 28 Sep 2016 18:22:04 +0000 From: Alan Tull To: Rob Herring Subject: [PATCH v19 11/12] fpga: add altera freeze bridge support Date: Wed, 28 Sep 2016 13:21:59 -0500 Message-ID: <20160928182200.15800-12-atull@opensource.altera.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20160928182200.15800-1-atull@opensource.altera.com> References: <20160928182200.15800-1-atull@opensource.altera.com> MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BY2PR1001CA0078.namprd10.prod.outlook.com (10.164.163.46) To BLUPR03MB1508.namprd03.prod.outlook.com (10.163.81.26) X-MS-Office365-Filtering-Correlation-Id: 7e3eaae7-0cae-4fff-3f0f-08d3e7cc76fc X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1508; 2:GrTsFX2g3ctqNoYIvYC1CeKIGBs8Pfk/6xHm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KOqJOi3lfOhLXU/glRDV0fU+4a5nv+aSeKkv+cYbQj3ke9FmSbQyEHuJs0jLhR9nJqDcbPJpC02/bwrFPnIYfI+sDHVA35SspVgcU21mQKbg2y2g1KwQnVN46JCHZs0kPUQrmMovctyhLs4dClln0Za72jJVeDNxr/BXQCFU9oE=; 4:aXk8Vh49OPgdRg+qTLBCgf/6G0DISzMMuhzcI8moWk8LMOmMAH4qZO4l2NvFZVtEeQ1Ocyt8OMVbh3k3mhVa95C4ZnWrOkxuYK3MNnvSxX3UiAyOEIVU4hhE1u+4d/p2q8aFGYMYWZbO4Ds7WusgYbwNalGRwy3VhsW2+Sv3M76h0gaT9SdmuqXe6mn+MQRNciD5jGFglwWytfkLNND5Y2ixXSxKU/CQ7rUpdPJTfBCoAPs2nziDfsK1zjkS/MLTh2DtHg2N18Eok6KM3haXYHRjMEDxqO5TVNtAK/KtDAGjbIxqItPLruWjCGi8lU9oDs/CdNt51cHmPEbDphtZvECSq9dc9XJ2uYcGGXxDSEXpVMBAN2cYW8iaLIWG/zh7s57A4xCvEoZdMESWnXOqNd+ek3VpJ0zrChoOrnBB7PlDMt+dUrYDEPRsUNYC+609n2DJ0OtSXI5zL+a20VED3KKR/pWcCjAu+wIAIrQaGU5C48oT5YAzx+DZOhu4/4ExmKIaA9O542ynkLpzV4v16g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030)(80048183373757); UriScan:(250305191791016)(22074186197030)(80048183373757); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BLUPR03MB1508; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1508; BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13024025)(13023025)(13015025)(13017025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BY1PR0301MB1271; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1271; X-Forefront-PRVS: 0079056367 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(53416004)(97736004)(189998001)(107886002)(19580405001)(86362001)(33646002)(19580395003)(5660300001)(7416002)(2950100002)(42882006)(76176999)(110136003)(15975445007)(101416001)(77096005)(5003940100001)(4326007)(106356001)(92566002)(50986999)(66066001)(2906002)(42186005)(48376002)(1076002)(105586002)(50466002)(47776003)(586003)(6116002)(3846002)(50226002)(229853001)(69596002)(4001430100002)(81156014)(81166006)(7736002)(7846002)(305945005)(8676002)(8666005)(68736007)(7059030)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1508; H:linuxheads99.altera.com; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: opensource.altera.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1; BLUPR03MB1508; 23:BwI6VolmY2vhWa+oUPvKhG1JmVCNG1/qXqo8/D1N2?= =?us-ascii?Q?TmlTkcgSNMILX16AkJagJFtABZuzCMrbdaSZ7O3COmIttSv7tCWDE0JFmftx?= =?us-ascii?Q?GO6wjAx2jbswK1fsdv9MJg5vL/P15Qif7NbK2rYTGIK9nLanWu8dEncD6LpQ?= =?us-ascii?Q?psnB/dAXAWz/mIQxeFjYEGVU5zhdmuPhxClkm7tfihFI4NgS7CLiWqeN4G5j?= =?us-ascii?Q?AOisSKufvaf/olsCjc/1AQKgiC9YbE31wEbtiHUTInE7lXDKVDg0aycHIP4Q?= =?us-ascii?Q?3zgwO71C9ZADLZhV1AAcx6a0OyWMbcxeJ35IJrTx8peGByqEBu+Y3AnYBIQZ?= =?us-ascii?Q?umCs4NCCYOl72Uvn4DXUDr5fxeE8YU/tyNtuDr4MbcxRQQRY6W4fymR10Rrc?= =?us-ascii?Q?O621M3Fy60fvXAavSVwA3AYvcnbSfbyFjvkoPlZ00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yaf3dCfYL/UEhgCBce9Ztd8mR9NKKyH2HGyYc2YDV34KJMOspDQbJpLJ0aMxZh2/6OZ2U9nH1tHAPCbJu1ZmiFEAqw5D4/02GXpK4GBsl9WkmUyNxaSddQp4Uxv+hupcgFoibll6QYQWmSL+mecug3Ohq/VA2stzzlYCBwPVchLIrHXCB93yz+ijnnhelOJsl2EH4tURm8qY1xeufNUttDDJEHZfHuR72RRMAO4beG136dVhyHl7jKKWpfjBdsX3mD4OA2jwVGLwzM7Zj7ou8nBfmbGpi9PJO291+ncc8juzI//+IZh4CLHN9a23U5UxOdy73R3C0g==; 5:UX+i7fOOXud3HZJoJ5yoLUk7NVy/jJ8k5OwyCA4tqv3EJI7hCVb+deXs6tqS1pOZ8oZVrC0FsSGsEixko10qkUbzWU3cPeEVWseYn7Ni1wIv08at7/2wsTfC4r/QqRjmMiSnEhx2xSBaXjws5DO7hg==; 24:59pI7q0/K/G+z56DOBS09IWfRc0CCWPRXpsnMfuJdV7bQsg02vrYf+QPgoT6usnhcHZHfIh4JZzFQS6FUxx5iNCjhk9AYLZDyP5LArGmE7E=; 7:Q+aiPlp+jhBRbLA0nIVuW75zKPLpjgM1JeClN6Tx9IpIZ8pxpCkI8QcylC9kSHyRB31QQ1eD18YwJHzj6+Sz5+ixDTUWUsBMxYRFC/Ez8jjor6JutLZET2OwQS6WdNZ3xCdd/Z7dZYdm6Ifr+MrIvZK1Gv/lS8z6/QX3r/qZ7t6QTitWaUCuSPoQdek8WJ0sRJANOgAmagYQVd9gOf9gPgsmge756W/n9HbB+xvF3wyuJSXZAlewaVPyUCMlzCg1KXr8REwSLYsEGBGP1XYbzHrtnlaqY260KCyfYIv9y4Yt1oOCtGOR/RJE26FVf9xj SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1508 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.35.236.236; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(50986999)(626004)(110136003)(2906002)(33646002)(76176999)(5660300001)(19580395003)(19580405001)(50226002)(305945005)(3720700001)(5003940100001)(48376002)(4326007)(86362001)(16796002)(7416002)(50466002)(229853001)(53416004)(85426001)(68736007)(4001430100002)(92566002)(66066001)(106466001)(189998001)(1076002)(8666005)(87936001)(15975445007)(336002)(81166006)(77096005)(47776003)(586003)(356003)(97736004)(105606002)(2950100002)(107886002)(8676002)(8936002)(42882006)(3846002)(7736002)(6116002)(956001)(7846002)(81156014)(6070500001)(7099028)(7059030)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0301MB1271; H:sj-itexedge04.altera.priv.altera.com; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:0; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD040; 1:OJW0GO/v0ceHIXyjswni5euB9/SWjTvp50C9q1VBdCnBMmN5AHgEi7AjBquvbXZWTE2obgByhrfgmrzbfuhjuQyVKJwWwvu8u46zLrp9XDvDeekxmoyuvoq0ZVdqjfvt5RssoypRC0TNs9aRlqqCk0usoIPxxVURE48gQQpxfhBWF2ewegKZ8m7BJ6nElMvx1fZBgW0Eta27KUtFqzkTMttnVKMFkU6Kad4vWPELc7fLBa1IDTisZMAKNpTpXX2vWnFJpo3ybhxyicWCKSxzfiT8Umq49FlMPhSc2vSEqtTWOU99CSn0ZAugw0kHm9piUeQM/R7VN+VUT45mWBl7N/SYj4Q38mvpImRwCO9afm2c01QurdviDW249KiFUNrYt9CgfugqfzNAqSMG2yZuXIwQGWpLiS3ZuOdqvMAv6V7uLH6A0LvW3NVqy6m0GJMYynhJAm3HdoKq11zfX8b9PTdqkKBTpuxa93ca2bp8PooyFWvW3EzTrAhBRKmUL13wjJw2L/zm3VfKd2YitM7NOO2BHCEdXsUgGhNnkAdJ4eCcjkjKQ0EHSbkCBG14VxEQcPLow+sa6tKVA74BU9Z9GFU+e9ao4MyR2mTlB3rKP50= X-MS-Exchange-Transport-CrossTenantHeadersStripped: BY2FFO11FD040.protection.gbl X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1271; 2:Nm5BEYXlkC+IwEJPYR7/8JN9ksMGWKWrQ1HEBX9Ejkns9W6IUZWjQkkSPR1uUM0oOjfx8wpK/EWUF+qIcL/mFjV2zJ3dM4L5JiDyPT26jPwvdEkVs28xsdjUZ7NG/PrnJaL+qa2xcF8ROgROBRKp4qKF1jZQYU4adKIEE9nnHVXuLkYOuVg7GeGAs31URYlR; 3:eWzXlJ1NEcZJFG3But63fGS6wzqKDLYcEOceTcLr/nlaR5JedflWEdLzEWWxyuAN3Kwg75MRKYQBU6doo9P1kmoAt1i06dSPcQS0qiMCpFdYToyhVqnpSI/6tKekNABmIrLebYM6zXT3p2ATbHgwjl1VyvBadVAjQMPpZM+80fVbhswprDilTFq/ZFkrzzoBHyokbW3TXQzxiTDc4yyRm2aSoYTIdm7Kzr5af0Ea8DO1Glyf8Oox4Y1zHLN+vXjf X-DkimResult-Test: Passed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(3001016); SRVR:BY1PR0301MB1271; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1271; 25:Y28Q4z0HcFH9fWunhoMla+ZSe7YZ0kb0QgbHbu5AN2hqrpeSrYHXpnMwHPfakU9NeNKchmkRgfSyVI82Zztk7GDEPgOGksMU08FnCUaxVpslL1vyteqTl3Z9dPFIPy1KtHFpE5Wsxy4J3wrdmmfZfzNVAa/VsX5+dGbfOIbGpwKu2eJ9ApT8w59nqfI74jzoTMxr7nHgt9m3euTfRVj2fVcq1doERyN308KtfdCWwR/SQUIb2m0PUZJdh2H6Ze0bH5ZOUIYAm2pnvBY5HT6ckSV0ojHRfyk9KzYodbpVGHMwR8jdhJ5iSd1CfqANHY80qZ2157nYF4om3cDUn5vANnpNkOj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2T0K+C64O1r7ioWm5e71TDb9TmF1UBkcivW9zpPTOurbXK+XFN7TXAnPKUDH9FUTf1VIqXzGbf+Mgf4rucJ67Kp0cGB3BAkKsiTIa5OxwIRRDyr/veNeh2narwktXEuQNNWVoacTf7jAsNHpBDTlvZugpy81hX+MyyzRY839nFO5m3lAym7cshGGYmghBFAd8YPmW4oSasyL1lWh0cQC0+vVFrXTvfbNm8Cp8FZTMc06qVldVpDVu0l1oBqelC39MDdkjTj9fCtLP6o1L+WWO9yExCUllKHkC7MR6yQD/m7zQ7A9jcQxqAp60wJbntdK8P5OUePrRScKMqnpdNDgxog20u3kObc96UvcHuAaVhtH8VjqVJiV5Glol87shBqGinxGD0o9FKT3kfVaB0vdP0X5iGQKuprkI7xHJdnHcubdv52SNXNm6BhVO1afD4k9w4rT6d1SKSVM9HDfmiJATMjghsFuALQPk/nR2im8J1098X0zHY6cvXQ9Xs07NrgIm2XBgoB5hEeS2uE65RnlldnvM7rC7nqv+ii11qU2yZ01R/wF98= X-Forefront-PRVS: 0079056367 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB1271; 23:EmiCA58ngo2LlzQ5+GQTcW6G3IWuq/ObGq8jjzX?= =?us-ascii?Q?tQzujF9j0hro1QRec5JmtpUna199tORy47DjcwFbtCfc6GTgsVIK49qAqzmM?= =?us-ascii?Q?Hx47HjzdL/kvY1D5i1EZ4f04z+wTKG3qGgf953eKtMlOBZ7mhWQ0pelPj46z?= =?us-ascii?Q?ec9n02yOZUqRAJiTBtZHngRwyzksD8dy4s4513KeOKHd/EaVWLOpcnNVjYHM?= =?us-ascii?Q?boipqPidlSatO0i2Jj3ZrWtHA+IJTqrPhwc92+k5TNiYWSIQrWUmVL0VzuuE?= =?us-ascii?Q?0zHuvKIAopbOGrMy0PtT1tk7K77niVYeNHJvVDTJhtkZxpr+I52sY0IXxhly?= =?us-ascii?Q?YlOHvdFPKN+uPckRmCF19KiSHxrFCnWbDba0Jv3H3Oh1ex8p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cqhsIMMCAY/+TmxG/+6R8/QG/MBmG98rwuH8/YOL/OAj?= =?us-ascii?Q?iw9e2i6SvAC5NP4ge181UrmuLDkqbt77AltrnWeLwaQkTuHOA6ECKRrjXajH?= =?us-ascii?Q?RgSppL40w9tMXB+KdsELUbWs7xLCe4ZeNKDWR6823BU37TYs7uncyravP4KB?= =?us-ascii?Q?hDKVet1mrORw2M8j0HTuXr5QGCuy6JpFzTRwX+ELdHf2vbm3gXTFE?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1271; 6:GJfUJhwi+VxVfV9Zv4ivCTcHhfar0o556w9TB1G4kdfIvM9E0KerzzeUucOGRykJC3/R6ihq6GItJl4UBvzoq9pI8fV4B+ASMOo0STis8ejgX4agOz1bFjVFCVcYjyuVuFTYUw56gPzNlADem3WpxllNkvrZr4DtuwSmqjzYrMHWcVYgkvc75XfjRA/Y67McAYZ6WyklBL8VgUjfx0usV0M/KJE45nWKZuBRrAYejXwopm/WsooKlpzEZQZe/scXlrtAg0sX6fJLCE+hZQ+IAN+ubMCAwc3RPWmMV9fyedfysrpK0WKMozg3DD2+H30B1erpBAxyGhPjrrDLrYmx+w==; 5:dqI5clyqeherBVh+luYuxFEnGfABAG11AHzjSEfePvViKCDA/HZ+s9ykC82O/jIdZDyrToofjr7rdedUI9cGUs2uPNwR1B2zwK+KZCJe1Pz+/F47qtf/pXpuDY7rLo2p2j42WMcHh5lyXBfbaxYQbA==; 24:jZ2F3c/veupx8XijnUqVL0OI2aeQocXxshzbrSs+jklYpfmmYNLORqGirus+6O54NllPqqnlCYF0nc+hXVgkfT17RlUbHZORMAWgyAls80I=; 7:iWVeK2daxT8z8E7f9eXmgAJktkxeeq2fCnhFhGoJNKorT5MK/3UKSHVVCAfLSn4Nm9Vus+qpZiE4NAmWR8vQsZGBVycfL0onnXio9rYN1B/A2uwjPZHJ/FyNGLDyPp6T/WFzXUJGgwhzT93UJuMOtPzUIGREecLOUcZ1JbRdaiWIAxy5nt0peTXfywzPsX2oEmj/v2zJdnwagrvaXPr6TowcsPTcFEgMbvmgNOT7HouQ5COHT/mFqwQUAOHE6Rmn1LRG2wAxunISedlPxhdN0w== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2016 18:22:48.8485 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a; Ip=[66.35.236.236]; Helo=[sj-itexedge04.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1271 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160928_112320_766894_5287A73C X-CRM114-Status: UNSURE ( 5.22 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Moritz Fischer , delicious.quinoa@gmail.com, Ian Campbell , Alan Tull , Greg Kroah-Hartman , Josh Cartwright , Michal Simek , linux-kernel@vger.kernel.org, Cyril Chemparathy , devicetree@vger.kernel.org, Dinh Nguyen , Jon Masters , Matthew Gerlach , Frank Rowand , Walter Goossens , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add a low level driver for Altera Freeze Bridges to the FPGA Bridge framework. A freeze bridge is a bridge that exists in the FPGA fabric to isolate one region of the FPGA from the busses while that one region is being reprogrammed. Signed-off-by: Alan Tull Signed-off-by: Matthew Gerlach --- v19: added in v19 of patchset as it needs for fpga info struct --- drivers/fpga/Kconfig | 9 ++ drivers/fpga/Makefile | 1 + drivers/fpga/altera-freeze-bridge.c | 273 ++++++++++++++++++++++++++++++++++++ 3 files changed, 283 insertions(+) create mode 100644 drivers/fpga/altera-freeze-bridge.c diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index 55d97d2..0d1887f 100644 --- a/drivers/fpga/Kconfig +++ b/drivers/fpga/Kconfig @@ -46,6 +46,15 @@ config SOCFPGA_FPGA_BRIDGE Say Y to enable drivers for FPGA bridges for Altera SOCFPGA devices. +config ALTERA_FREEZE_BRIDGE + tristate "Altera FPGA Freeze Bridge" + depends on ARCH_SOCFPGA && FPGA_BRIDGE + help + Say Y to enable drivers for Altera FPGA Freeze bridges. A + freeze bridge is a bridge that exists in the FPGA fabric to + isolate one region of the FPGA from the busses while that + region is being reprogrammed. + endif # FPGA endmenu diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile index e658436..a6f874d 100644 --- a/drivers/fpga/Makefile +++ b/drivers/fpga/Makefile @@ -12,6 +12,7 @@ obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA) += zynq-fpga.o # FPGA Bridge Drivers obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o obj-$(CONFIG_SOCFPGA_FPGA_BRIDGE) += altera-hps2fpga.o altera-fpga2sdram.o +obj-$(CONFIG_ALTERA_FREEZE_BRIDGE) += altera-freeze-bridge.o # High Level Interfaces obj-$(CONFIG_FPGA_REGION) += fpga-region.o diff --git a/drivers/fpga/altera-freeze-bridge.c b/drivers/fpga/altera-freeze-bridge.c new file mode 100644 index 0000000..8dcd9fb --- /dev/null +++ b/drivers/fpga/altera-freeze-bridge.c @@ -0,0 +1,273 @@ +/* + * FPGA Freeze Bridge Controller + * + * Copyright (C) 2016 Altera Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ +#include +#include +#include +#include +#include +#include + +#define FREEZE_CSR_STATUS_OFFSET 0 +#define FREEZE_CSR_CTRL_OFFSET 4 +#define FREEZE_CSR_ILLEGAL_REQ_OFFSET 8 +#define FREEZE_CSR_REG_VERSION 12 + +#define FREEZE_CSR_SUPPORTED_VERSION 2 + +#define FREEZE_CSR_STATUS_FREEZE_REQ_DONE BIT(0) +#define FREEZE_CSR_STATUS_UNFREEZE_REQ_DONE BIT(1) + +#define FREEZE_CSR_CTRL_FREEZE_REQ BIT(0) +#define FREEZE_CSR_CTRL_RESET_REQ BIT(1) +#define FREEZE_CSR_CTRL_UNFREEZE_REQ BIT(2) + +#define FREEZE_BRIDGE_NAME "freeze" + +struct altera_freeze_br_data { + struct device *dev; + void __iomem *base_addr; + bool enable; +}; + +/* + * Poll status until status bit is set or we have a timeout. + */ +static int altera_freeze_br_req_ack(struct altera_freeze_br_data *priv, + u32 timeout, u32 req_ack) +{ + struct device *dev = priv->dev; + void __iomem *csr_illegal_req_addr = priv->base_addr + + FREEZE_CSR_ILLEGAL_REQ_OFFSET; + u32 status, illegal, ctrl; + int ret = -ETIMEDOUT; + + do { + illegal = readl(csr_illegal_req_addr); + if (illegal) { + dev_err(dev, "illegal request detected 0x%x", illegal); + + writel(1, csr_illegal_req_addr); + + illegal = readl(csr_illegal_req_addr); + if (illegal) + dev_err(dev, "illegal request not cleared 0x%x", + illegal); + + ret = -EINVAL; + break; + } + + status = readl(priv->base_addr + FREEZE_CSR_STATUS_OFFSET); + dev_dbg(dev, "%s %x %x\n", __func__, status, req_ack); + status &= req_ack; + if (status) { + ctrl = readl(priv->base_addr + FREEZE_CSR_CTRL_OFFSET); + dev_dbg(dev, "%s request %x acknowledged %x %x\n", + __func__, req_ack, status, ctrl); + ret = 0; + break; + } + + udelay(1); + } while (timeout--); + + if (ret == -ETIMEDOUT) + dev_err(dev, "%s timeout waiting for 0x%x\n", + __func__, req_ack); + + return ret; +} + +static int altera_freeze_br_do_freeze(struct altera_freeze_br_data *priv, + u32 timeout) +{ + struct device *dev = priv->dev; + void __iomem *csr_ctrl_addr = priv->base_addr + + FREEZE_CSR_CTRL_OFFSET; + u32 status; + int ret; + + status = readl(priv->base_addr + FREEZE_CSR_STATUS_OFFSET); + + dev_dbg(dev, "%s %d %d\n", __func__, status, readl(csr_ctrl_addr)); + + if (status & FREEZE_CSR_STATUS_FREEZE_REQ_DONE) { + dev_dbg(dev, "%s bridge already disabled %d\n", + __func__, status); + return 0; + } else if (!(status & FREEZE_CSR_STATUS_UNFREEZE_REQ_DONE)) { + dev_err(dev, "%s bridge not enabled %d\n", __func__, status); + return -EINVAL; + } + + writel(FREEZE_CSR_CTRL_FREEZE_REQ, csr_ctrl_addr); + + ret = altera_freeze_br_req_ack(priv, timeout, + FREEZE_CSR_STATUS_FREEZE_REQ_DONE); + + if (ret) + writel(0, csr_ctrl_addr); + else + writel(FREEZE_CSR_CTRL_RESET_REQ, csr_ctrl_addr); + + return ret; +} + +static int altera_freeze_br_do_unfreeze(struct altera_freeze_br_data *priv, + u32 timeout) +{ + struct device *dev = priv->dev; + void __iomem *csr_ctrl_addr = priv->base_addr + + FREEZE_CSR_CTRL_OFFSET; + u32 status; + int ret; + + writel(0, csr_ctrl_addr); + + status = readl(priv->base_addr + FREEZE_CSR_STATUS_OFFSET); + + dev_dbg(dev, "%s %d %d\n", __func__, status, readl(csr_ctrl_addr)); + + if (status & FREEZE_CSR_STATUS_UNFREEZE_REQ_DONE) { + dev_dbg(dev, "%s bridge already enabled %d\n", + __func__, status); + return 0; + } else if (!(status & FREEZE_CSR_STATUS_FREEZE_REQ_DONE)) { + dev_err(dev, "%s bridge not frozen %d\n", __func__, status); + return -EINVAL; + } + + writel(FREEZE_CSR_CTRL_UNFREEZE_REQ, csr_ctrl_addr); + + ret = altera_freeze_br_req_ack(priv, timeout, + FREEZE_CSR_STATUS_UNFREEZE_REQ_DONE); + + status = readl(priv->base_addr + FREEZE_CSR_STATUS_OFFSET); + + dev_dbg(dev, "%s %d %d\n", __func__, status, readl(csr_ctrl_addr)); + + writel(0, csr_ctrl_addr); + + return ret; +} + +/* + * enable = 1 : allow traffic through the bridge + * enable = 0 : disable traffic through the bridge + */ +static int altera_freeze_br_enable_set(struct fpga_bridge *bridge, + bool enable) +{ + struct altera_freeze_br_data *priv = bridge->priv; + struct fpga_image_info *info = bridge->info; + u32 timeout = 0; + int ret; + + if (enable) { + if (info) + timeout = info->enable_timeout_us; + + ret = altera_freeze_br_do_unfreeze(bridge->priv, timeout); + } else { + if (info) + timeout = info->disable_timeout_us; + + ret = altera_freeze_br_do_freeze(bridge->priv, timeout); + } + + if (!ret) + priv->enable = enable; + + return ret; +} + +static int altera_freeze_br_enable_show(struct fpga_bridge *bridge) +{ + struct altera_freeze_br_data *priv = bridge->priv; + + return priv->enable; +} + +static struct fpga_bridge_ops altera_freeze_br_br_ops = { + .enable_set = altera_freeze_br_enable_set, + .enable_show = altera_freeze_br_enable_show, +}; + +static const struct of_device_id altera_freeze_br_of_match[] = { + { .compatible = "altr,freeze-bridge-controller", }, + {}, +}; +MODULE_DEVICE_TABLE(of, altera_freeze_br_of_match); + +static int altera_freeze_br_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct device_node *np = pdev->dev.of_node; + struct altera_freeze_br_data *priv; + struct resource *res; + u32 status, revision; + + if (!np) + return -ENODEV; + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->dev = dev; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + priv->base_addr = devm_ioremap_resource(dev, res); + if (IS_ERR(priv->base_addr)) + return PTR_ERR(priv->base_addr); + + status = readl(priv->base_addr + FREEZE_CSR_STATUS_OFFSET); + if (status & FREEZE_CSR_STATUS_UNFREEZE_REQ_DONE) + priv->enable = 1; + + revision = readl(priv->base_addr + FREEZE_CSR_REG_VERSION); + if (revision != FREEZE_CSR_SUPPORTED_VERSION) + dev_warn(dev, + "%s Freeze Controller unexpected revision %d != %d\n", + __func__, revision, FREEZE_CSR_SUPPORTED_VERSION); + + return fpga_bridge_register(dev, FREEZE_BRIDGE_NAME, + &altera_freeze_br_br_ops, priv); +} + +static int altera_freeze_br_remove(struct platform_device *pdev) +{ + fpga_bridge_unregister(&pdev->dev); + + return 0; +} + +static struct platform_driver altera_freeze_br_driver = { + .probe = altera_freeze_br_probe, + .remove = altera_freeze_br_remove, + .driver = { + .name = "altera_freeze_br", + .of_match_table = of_match_ptr(altera_freeze_br_of_match), + }, +}; + +module_platform_driver(altera_freeze_br_driver); + +MODULE_DESCRIPTION("Altera Freeze Bridge"); +MODULE_AUTHOR("Alan Tull "); +MODULE_LICENSE("GPL v2");