From patchwork Thu Oct 13 21:32:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tthayer@opensource.altera.com X-Patchwork-Id: 9375829 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 74EC3607FD for ; Thu, 13 Oct 2016 21:30:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60DD72A139 for ; Thu, 13 Oct 2016 21:30:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 543082A1F5; Thu, 13 Oct 2016 21:30:45 +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=ham 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 8B1F42A1F4 for ; Thu, 13 Oct 2016 21:30:44 +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 1bunXn-0007U1-IY; Thu, 13 Oct 2016 21:28:03 +0000 Received: from mail-by2nam01on0041.outbound.protection.outlook.com ([104.47.34.41] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bunWc-000721-Cx for linux-arm-kernel@lists.infradead.org; Thu, 13 Oct 2016 21:26:57 +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=xl5RuTiEudKAEI5x34ZF/vHsjRMvAtrPVXrnsUOs90o=; b=dIJLZJniHspnKKryiVb1Ro7+MJ+XopfHXNGD+qvmyMX+COIPyxJv7mmghSV6dsELMbwolhNqzXlRjjvS6DsgNCXxiy7njQghhkvrJkdO8iWgvSf4+zS1bN1PHkblCR1ihyWR1WwKh++Ze0tbhLWD8R915HPEZnabYnW5p/814vA= Received: from BN6PR03CA0039.namprd03.prod.outlook.com (10.175.124.25) by BLUPR03MB1361.namprd03.prod.outlook.com (10.163.80.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.659.11; Thu, 13 Oct 2016 21:26:26 +0000 Received: from BY2FFO11FD033.protection.gbl (2a01:111:f400:7c0c::164) by BN6PR03CA0039.outlook.office365.com (2603:10b6:404:10c::25) 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; Thu, 13 Oct 2016 21:26:26 +0000 Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; linux-m68k.org; dkim=fail (signature did not verify) header.d=altera.onmicrosoft.com; linux-m68k.org; 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 BY2FFO11FD033.mail.protection.outlook.com (10.1.14.218) 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; Thu, 13 Oct 2016 21:26:25 +0000 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (207.46.163.112) by webmail.altera.com (66.35.236.236) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 13 Oct 2016 14:25:24 -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=xl5RuTiEudKAEI5x34ZF/vHsjRMvAtrPVXrnsUOs90o=; b=Bm9urGzYby5ghUmk9Z0fPo/OJ7NYEf8g1icyvoliGrWT+/WyXxrG+Dsr917pztTEuIVQoYnT+1nEtUas6p+pcB3vM0FtgN0ivFtwKkst+sMYmjZ/Zz7oZmxk0/3k9hAnSRMVMNMCBskXZr8M+x6465cxVpFkq22eYX6b73DswZM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=tthayer@opensource.altera.com; Received: from tthayer-HP-Z620-Ubuntu.137.57.187.33 (64.129.157.38) by BN3PR03MB1398.namprd03.prod.outlook.com (10.163.34.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.12; Thu, 13 Oct 2016 21:26:18 +0000 From: To: , , , , , , Subject: [PATCH 2/4] misc: Add Altera Arria10 System Resource Control Date: Thu, 13 Oct 2016 16:32:07 -0500 Message-ID: <1476394329-31696-3-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1476394329-31696-1-git-send-email-tthayer@opensource.altera.com> References: <1476394329-31696-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: CY1PR20CA0082.namprd20.prod.outlook.com (10.163.250.50) To BN3PR03MB1398.namprd03.prod.outlook.com (10.163.34.17) X-MS-Office365-Filtering-Correlation-Id: 3d2435bb-9b18-4aa8-aa18-08d3f3af968e X-Microsoft-Exchange-Diagnostics-untrusted: 1; BN3PR03MB1398; 2:RPuPiZZ4oa3SxneEclpAKL16lzvSbs4+0UwD4c8Z+TivGUvhZ8P4lLITiHuaBfkLp4ML8vlqrfk5aJRErA0OU93/6aCyr2e/k4LV4/6K8oSZeGJzCVnIFz1uzeFBEss7Y3+beCgbq1PusaBHgGn0fPqxKhgu1oWahciWBbhRXu2KbYAIp6FdbEpRDRXBla2ZAVFLU3BMChOZ8A2CW3fceg==; 3:VpwMKOHgFwoWLbImNMLALi/NxmdTMbeJIP31jY5tezbOVW/cWwePMyXx97hkcnjXqeZl6HuOIiWTgINcsKTn7r+ME4cCvOlBDRwPtvLATGRB16FOFTEoc8EIuvvNeIMwq6cKPr4V08S/A4HqlteuJg==; 25:zTmhWS8JzKZ4n+EbyV7ouoqsV9dwzzZ2fF43+eqaeb9E6xY5JTMFwY2E1BIaSqPdELiM91gUNo0Tauznf5hYWJYJNX6eRv3mcYiDPo537NljlxWL9zODp1kS7nfq/vfAeCPpNqWA6Drs+ZLFoa2XAO8Uiptk6981LGQivh64gSviLtDON9hcuRPy2fCJpioA5QjEHQtjkr3FW+9JN1+FBGNL9G0udh17IHYaurW6LTiPgh5HaI2UfvBkxqvglsS4/xhaxhGHW3FvpjqTdBzhvX4BhnZalurdejnJV0CXXfN+k44GV82LxqZ2LKQcIYIGGUrUPE5bDtPeYXwogKTpI8B0fPosFE1guDdsaY75ZFrwVP+hpX//1FAxZbSxlIkBB4nGbEMfxHxjVJH10jdOf8ma/+6Vnlhj3U5RcRVQHHlRlsLSpdsP5G7s+8FaZajM2Hg7ryeznjloImXMeaS5vw== X-Microsoft-Antispam-Untrusted: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BN3PR03MB1398; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BN3PR03MB1398; 31:XryAyKQzZA4W4UTbFlLtyscnCSmhLYfGtyKNJcMjQIyoqz9OzbHQAY6YPSz+DAZ2orSEOQ4AP7KzJk1SKYmbICrd858xp9D8ZigLZRNwSqBC2N6DJ0mdj4Vco2qPj+YGk61oMulgGwQIAWQymZcRlHtSrgbpXiWypkDlEcjn4Rqz3c0tOozdgTswgD0hILXZdW9ykMR6Rp97vY8lAX52uknpfqsEur0CDIOSu+kA7qzjKtmFUJP6nn8dZEfDf2hI3yHFoXfSJlS+yVyl8D6XOQ==; 20:fUYw60HvVk92AKwcgQbxsdfxwIf+47329pbtAzwwbbpr1mveuGW5q7mcISErWKjA+mtRcAi0EYWwbMn2kNyJmonvKom6RJ1WsCO6LdU4GLci5pWb0VNrnQNvNFlgrVQSbDISJ8qqwV69x7yPIrPSUq1tXZzRQTXbV2e75AdOKRs= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(72170088055959)(22074186197030)(80048183373757); UriScan:(250305191791016)(72170088055959)(22074186197030)(80048183373757); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BN3PR03MB1398; BCL:0; PCL:0; RULEID:; SRVR:BN3PR03MB1398; BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(13018025)(5005006)(13015025)(13024025)(13017025)(13023025)(10201501046)(3002001)(6055026); SRVR:BLUPR03MB1361; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1361; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BN3PR03MB1398; 4:eOhpucXDdN9Eg3Vfwu2i39L2P+bMsGupgFjjxT6JobB7d4hY6E4hX0VdXbDsY+u0obzolDJ+lkLmDMsXLmfTFqpZZgjkbUH60+ZwuJPb+hhP7cd88Ok/p/1MOmo3B79p/R03jiP3gOa0M8dzrF8rWbL2pogX1tMPpP0saUaiRQUMIa4FwvuZTXJ7IJ1hNtWpOUW8iMUlpUMmLScNn69d+wRxY6cvicD58RuybWUQqABxtF3SSgLz+U8/mONTQDuT28vezssI64dvZC4KMf3ptPOiB090+W9qFS7bAtUzDUNqHTVH7U33xoNuTLxVDblLhhy+lMf2rv6hxbuGS4hdxQGcS7BRf0P5ZELIMP04dKLwsRo/FMGvviywhdnKVk1gJdefE+v3Hvill6Cm2gkQsyA1g2HAWalKp7SaTghDZZyTaNOVENPJYtDmghJVTMuEoAUMsU7/mDgDcoJJ7UeTHeDksl3qr+J4Oqr4fdfy8EFH5TMcNQsloxfmAFVaJ7jq94MvUMlj3VT+gDDIiUIVwOYcwGVRkiN76GMFCdzQHKPK5MEzD09Hj/EZ9f8EUxUw X-Forefront-PRVS: 0094E3478A X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(189002)(199003)(50986999)(229853001)(76176999)(105586002)(106356001)(8676002)(305945005)(85782001)(5660300001)(81166006)(7736002)(33646002)(81156014)(42186005)(15975445007)(48376002)(101416001)(97736004)(7416002)(77096005)(47776003)(68736007)(189998001)(19580405001)(5003940100001)(50226002)(575784001)(50466002)(86362001)(107886002)(2906002)(4001430100002)(7846002)(4326007)(19580395003)(3846002)(6116002)(6666003)(66066001)(92566002)(2950100002)(42882006)(110136003)(586003)(4720700003)(2004002)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB1398; H:tthayer-HP-Z620-Ubuntu.137.57.187.33; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:0; 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; BN3PR03MB1398; 23:hi86Q4S+VWcnFUjuQCkRra+GOBb2BH9vH4v6CkeW2?= =?us-ascii?Q?rxAdst2kGwaHgsxyXWM5Xa2DrVCUbf43te8L7x2onFckDu1Fnma1oJ8LuNPy?= =?us-ascii?Q?Y7xrJzz2924F+u53eOheKkrG/5KH8pqN4poc6BQLkQSC9h/PNo6fKpL3RrF8?= =?us-ascii?Q?FGo5IbMdZbyon3UvNDhcgdPwZTa4YEqkhf23Et273JAkG/voJD4X4/ZwbMWQ?= =?us-ascii?Q?1u5v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HlxhwTqUS?= =?us-ascii?Q?fJxCuHoNjsNQvvPwV1KSJguY9jEK67z4jTzYN4089zZ25/UsmVt3kNLxJetJ?= =?us-ascii?Q?fY45tuGBSkvz9N3Hy+nqv0BgN0DL7dgEjyk6mw+gI2ZEBqgoZJWO+E/28G91?= =?us-ascii?Q?V9qov8jcehGOjnc92xwuzTBvr40CtKt5MBXoOXoyZYhDqaKL1eOAHduUEtKt?= =?us-ascii?B?UT09?= X-Microsoft-Exchange-Diagnostics-untrusted: 1; BN3PR03MB1398; 6:baYpdtTuYMobtwVwsgP+41bRVd3/micBJ7Vwg1uI4DNkGi19swORFoE89aV81LTsJb8X29tVcU04ezXxVuaVJ1pFcbf5p3TKju40jPZvfys7xsCz+lcMQL8wxzRrXAD3rWDJgNN/TrRGe1KrR4pHOT9CBeWFWEL0amXeg4cxNxNiNPGFCgDjFl6xeQD0NgASxrvNg9rAwJpmx3M7F3juukzSuyGBP+lrW8Qok8oRDBik1NRWTga0ufZut5VZRgGJg7yiriUSAs4V96MQUBt3nK1DBlB/W1uiAWlNwjoWTdsMBp9JcG8uMrm668hwR3SKx/WI003ZtGaRAtXihl2UtNrKqlqrWiordALwzcK8mfc=; 5:Lqw0Du8O6YGv0JxdKBQLdLCf/ciKfIjZL69OaEvRUy/KtrRPvKBr0c7GcktFFQlZw6D/nOE2BkA3YYKaQtowXahr+/HO3m1g9h2SQwZBe6nAi1f4Zdp/eUZG9yGjGzwwFXLNQQxyQ3jhIldFV60CsA==; 24:uRcjhO9FMRxcTqZ1yVR4RBKGwufUIci7lbEUaor29H+HuCDhSCTr1p46+VTWABwNWYvdN/AVu6lD1dZzphaKhQjnLYuaT03oDEFSVvIqlEU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics-untrusted: 1; BN3PR03MB1398; 7:oz9WoXJqfRCctJPbyPYe9TsD5ivGnfLrSH8zM8tBKg1Jfu5i/xD/yvUFNLA85mv23Z+35QkTvvd9TALhlk1mnbUmeuo8XfPmsa8YrADSKCMqR7Dl/2s8VQoD6RbNi8KOmDSDWmCkQzwG5k6Nu+THkl6JorOyBtUF5S3Azw9B5zTQn61QTudzQ0IU94Pt9Xp/jrQdt5plJXJe1SoBpkw2qAveZyHiZAaJi8qXfav6kwk/V+OnG9wJYckUhYeVx346jPyafZ3C924gjKZp2hev36agAYhfErPXaoM7wzmh8mJLTMTQYpgqRz5F9GAcH3+uxRfRpC2HfkJlf4/PweBsxPr0EJk7kJzxWqyGCr+VHOg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1398 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)(189002)(199003)(2906002)(97736004)(4326007)(11100500001)(77096005)(92566002)(356003)(2876002)(19580395003)(189998001)(107886002)(15975445007)(6070500001)(5001770100001)(68736007)(2201001)(956001)(86152002)(626004)(50986999)(76176999)(19580405001)(336002)(8936002)(87936001)(5003940100001)(85426001)(8676002)(50226002)(5660300001)(81166006)(33646002)(6666003)(4720700003)(66066001)(575784001)(2950100002)(305945005)(50466002)(4001430100002)(81156014)(7846002)(86362001)(7736002)(48376002)(6116002)(3846002)(229853001)(105606002)(106466001)(47776003)(586003)(7416002)(3720700001)(42882006)(7099028)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1361; H:sj-itexedge04.altera.priv.altera.com; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:0; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD033; 1:4wTFn5AGJLYRv9bwuyaiESTnSEP2YXGMV9dMh7+B/vnfqoxO6lfQOZiy/m4buh8YmqYs+HgNKVzJShg9X4WBztegLXj5oy5sK0weT8y5Uv1ecYPAdgCSjul7fden43cm+UZ3XNDcU/uoH1tGzQ4U0UaV22TBCFSUo0dRX8vOnnlUVowDskv2H1awrzOCWwB1iE92+nK1mZSr4dzFq+mryfhq84ZKY7k99FMpOZjayVDiLsgn7kKpIhUr1fzZUaHIE4dfsX0wa+W4NpPLIoyVjJt1E4TZMez9n6IboOkvrGP431T0rfku2rPVP808Gx2oF7t9aEfO8wMMVV+tI+54/LgNi6v77SzmF34D5AWI16bG9Hs00JyesS7bHRq3D0KCiVuv61k+muum55/QYp2Uf55Eycuyt0djRz5xPuybmceYFE7WSjrFPqsbXdvAjUvuGnki85b9khvGT7Asj9BnIUB2fxDLmP1yys9mnb8RTpksVSnVNnBquXbQRnXEtN1daXUOISSWm1BFHscz8y90YDoZH5SkPPW290IavoS6JkzXqDhPi4NThpCo1iSFWbwTdoKEWyGdAPxu7D9h0fLQZA== X-MS-Exchange-Transport-CrossTenantHeadersStripped: BY2FFO11FD033.protection.gbl X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1361; 2:i9chW9K0vfHsF2ig8mg10kY3tsJm2ztfy9EhgDZzTvMoDlmmg00gdq2LRI2Gc1N+ar0knF4oIcvikZnhDGca0q/9U7YtIkEhI5ke+N0Qa1HgwbtajHYNdJjJYgQLPSYYuE6RgiLU4+yzJBct/Qy3U7gPJowPpiD5F6oxBrQOsCV4tFGqyya9LEkeIBr2Na56bS4603HGmttQSL1XfhJwNA==; 3:Z1CEamOLvfQ/WEOHJYGHLqkOMZArBq+Og2TvHOiQSsqM3iqb8vQDceguRIPeuk/UPiJUToEaLa9IcyEDs247Yzw2WD63JHbxBVu2Wuc5UdElB3DCUZ/POQWVdAXklwUmrpKAHUuzHoLxywbNC5db+lGUMAVDSQiSKmwpskVOYkbj0Y2x3exJYAaepdhQeRWHkXxQbvHFkK1aKbIuVK3kQJZ+4YHTmObDBzYZfRPXLhbd2ztVj8awRie0zCWi3nNkJKUj5LzkEVJyjYuYOz/jgw== X-DkimResult-Test: Failed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(3002016); SRVR:BLUPR03MB1361; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1361; 25:pj7UMU6HmPg/S8C/KAEVHNKvc0NBHh1cCrMQ2uHvFz5bE2y3XDgrEQ/qnPqdlpfRlNSRZzCEI+p32ELuDkdruKg5/lZd9gV1r0gE7il0uCQ1FX9wa88TSs1gmgfIRx49Rhq3msLRc1Uf2BgxoshzhoBatc82k+oRXksXKMC56HDX7DNLw64BoyR3z5BrBwl6rp0fERKHvvKDeqaiT/96jDXaCn0W00/sUeB4Y2JX2ZWHB6BL/6E5PEXgCo26AjS6+4QaIhZ+zNbJl/DIxQ3eC+W6QyPHj1bu9D3/K2dnuGjRh8Gy7xlCHizdlU8yPGjmwZPb4Hj6vO3rrd9PbQ5hTWvYF+gWekc4fBKcX5/xQ1oWUz+ANrw9O8ontVQc2VY8FENc1cUlLhd5uhxC4TLxjoEgQc6uKWImMwUWa+apIUTfQqJ8PzQLHVw/+05GJb88IVtIbZf0CN04Kti3/aggGp505/N737rEmmfY12/oJFmxR+/lCKmzORq0YQaHRCRO+979EpkqNZ2XBIAss6TXu3ua8K1G6+TrfGCtMq75+qTiS09j54yfgq6PpTZvyC+n3zY4wZosvNI+H7FEMnZ4O53DRH2srciCX0peDgStsHuheqGD1/xiVTawQAx+xjiK6aAlyaUfnIfbp3nNipn5TxtC52y6rMEPluKNZ1YvyP42Kf2VPyhn3s/mvk9pR8edUfrxsu80PHfSeJRhA0PBWf0EgioPArvHIpwfKqJNEWwLfsCiYowYCtCAZr0x9TMODx/ttxUjOBHqACQT1+atXlesI69TsA8PEHbwqKqjZtSyeMxfpD6HK578N6bL4tC8je64TAX4uixTZRJIkeRm3tGbnNqcTouCVmGzMMnkIQDolqU6QyYcRwoUsymbFbfi X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1361; 31:Wil2481cunHYp+uoKiA6vn/lZW+LYdrxWqk2no3djIYNYuhfwPcu//WkksQkShcavF09QEWHnuwXb1+zq3mksXMV4/Y8b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hVpvmDG5aeaUafkKYRVtVdASggZGuQwCUk= X-Forefront-PRVS: 0094E3478A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB1361; 23:xNXNMXUQtBeQ5uYuqeAcvfsUcXBBD50rcgrtlKDbA?= =?us-ascii?Q?ykTLBFdL5YEEPOhzSzlrNowU/ZovHkMSsNFaauuqxx+Y0WLpiSLdhVIL7YFF?= =?us-ascii?Q?zhz59fZdKMcyF8zeeqrWS6OQv0T8ebP1KjZwlsxtvZyV3lXGc0n57seJImai?= =?us-ascii?Q?tj3fN8ligcp3bFsHFPtaeJdOpupW57MwW9isNyG/Zc4buN49+sH2uIKCbQq4?= =?us-ascii?Q?lmK5/XyqB5n7xIrj14KaUjsFlXanjzvACo5evp4fMNHYpBRV2O/sCLPiLjFg?= =?us-ascii?Q?u/xuXTuWISWWQo54nYjcV05C4wHf1Z9I/JpX3PY2WmdtckAGWVi/DtNCiSDA?= =?us-ascii?Q?ivxIw76D31nDrZIHQ4Vp8P7XFXNrcqwPNjzO1XhUt5R8x9BPcbOe/a6j5ASb?= =?us-ascii?Q?rHep2NIJ8fE8ZyrkxhpnhpjTD1dBGnhbi17xs7gW8KqcR7JQlsa8095lMIqM?= =?us-ascii?Q?pKuDM3yLCQA2E+q5EUW7mj04/tlqOYu/OnRP53wiQo3jJVjIGw+2/Cbl3FUL?= =?us-ascii?Q?2bH3xoMrKn0fN08rGR5SfjWzxpFoj5CyuJyT8m1dTx24zHwbwk27Gfdq6n6R?= =?us-ascii?Q?R7+qy2qycClcZ/tc3+7HDO+1YYocvf7F6zAxWml13btoSwrKne4j4EfvQ9IK?= =?us-ascii?Q?YmbMSaZfRJJhJZVsF5l2Yb2ktzUGlmDHreD4F3g+KbwynLaFixZN4eERjOYT?= =?us-ascii?Q?HmQosDws0bHtO8tOGhmoFzPmseT4ttRSP+O5qbIgyhrxMtmeocKpNLPqqFHa?= =?us-ascii?Q?FHa2rV1cEzxVY0IAogS9WpIlHrsrEztjh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1Xyhb+QkET3HZMAI6mfAJZE/b3rm4AUmBZVTFWe6paUZ8gOc72PSdT/FajDgNLnOoUpMTrSXW+meFnfUyCwN/lwFNT9MN3/y3Vxx9iZ+O7CMIh3LBA6xmmkWb478nYWjhQYLcaHQZdrF0FaATlZyCzkCmN7+qGptA1T0OvHjQtMFa9qxarP1QVSFKS43MpCe+GEeXkV63otVLdWkVbUPNdIlHQ9T/v0tIDaM=; 5:HSyE1YTRgSn18o1koVb6AoZVx/MokJU129M6mqIdrCCqy/Ub3C+ODIoHTaG+cazIM671/6MWvI6m5n3FRrOqLWVDpELW48tQMQzooXKP6D9HwT5p2OsYqjGELtujRvyXBV996tQ5algLDMs+W0BEJw==; 24:S2WwxbUS7JP74/HrdsCmEfQzLBWsTjA8Cs8LntifYv9qdJVH0kvlGfgLWEyRePqA52QV7nmz2xLZRDHoh7xy0R/ueODwFIROfimKRwcB/FE= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB1361; 7:qr09+wNlv+rr6jloWU7xNUZC0CQEn99X5MvMj0SjZua6lDZY2pRX94oOy0bIwJ0AJrI1BDcblz6N2AkyQQ3uooujRIoNZGkFVjLkC/5iUswMSGq0o2l7sSuQPkGlAEK69Un4hbrZ65fnA6RV/WFmceMReSZ/ByEDOPQttwCfv1FUJHBNaGL8CKrzBV/gcypj0MowXOz1CwH0/8di5lCVSDD9f/YxrHFKScFVdyskgbH34v6d11V1U48JU1r8vEv2ruCaNDP/Pfqri9bxcFP8CpC/ZUyMxE3enLgGpV2YwWAGVYbGAtEK7LSbk6S5E0GyDSn6Lvr/Kzn/yG6UVPZ5Sw== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2016 21:26:25.5294 (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: BLUPR03MB1361 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161013_142654_946987_03384D33 X-CRM114-Status: UNSURE ( 4.74 ) 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: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, geert@linux-m68k.org, Thor Thayer , davem@davemloft.net, 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 From: Thor Thayer This patch adds the Altera Arria10 control & monitoring functions to the Arria10 System Resource chip. Signed-off-by: Thor Thayer --- MAINTAINERS | 1 + drivers/misc/Kconfig | 7 ++ drivers/misc/Makefile | 1 + drivers/misc/altera-a10sr-mon.c | 184 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 193 insertions(+) create mode 100644 drivers/misc/altera-a10sr-mon.c diff --git a/MAINTAINERS b/MAINTAINERS index 1cd38a7..a0919ec 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -625,6 +625,7 @@ M: Thor Thayer S: Maintained F: drivers/gpio/gpio-altera-a10sr.c F: drivers/mfd/altera-a10sr.c +F: drivers/misc/altera-a10sr-mon.c F: include/linux/mfd/altera-a10sr.h ALTERA TRIPLE SPEED ETHERNET DRIVER diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 64971ba..9dd33c4 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -766,6 +766,13 @@ config PANEL_BOOT_MESSAGE An empty message will only clear the display at driver init time. Any other printf()-formatted message is valid with newline and escape codes. +config ALTERA_A10SR_MON + tristate "Altera Arria10 System Resource Monitor" + depends on MFD_ALTERA_A10SR + help + This enables the System Resource monitor driver for the Altera + Arria10 DevKit. + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 3198336..fd69f0c 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -43,6 +43,7 @@ obj-y += ti-st/ obj-y += lis3lv02d/ obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/ +obj-$(CONFIG_ALTERA_A10SR_MON) += altera-a10sr-mon.o obj-$(CONFIG_INTEL_MEI) += mei/ obj-$(CONFIG_VMWARE_VMCI) += vmw_vmci/ obj-$(CONFIG_LATTICE_ECP3_CONFIG) += lattice-ecp3-config.o diff --git a/drivers/misc/altera-a10sr-mon.c b/drivers/misc/altera-a10sr-mon.c new file mode 100644 index 0000000..c07fb97 --- /dev/null +++ b/drivers/misc/altera-a10sr-mon.c @@ -0,0 +1,184 @@ +/* + * Copyright Altera Corporation (C) 2014-2016. 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 . + * + * Monitor driver for the Altera Arria10 MAX5 System Resource Chip + * Adapted from ics932s401.c + */ + +#include +#include +#include +#include +#include + +struct altr_a10sr_regs { + struct regmap *regmap; + struct attribute_group attr_grp; +}; + +static ssize_t a10sr_show(struct device *dev, + struct device_attribute *devattr, char *buf); +static ssize_t a10sr_store(struct device *dev, + struct device_attribute *devattr, const char *buf, + size_t count); + +/* Define FS entries */ +static DEVICE_ATTR(max5_version, 0444, a10sr_show, NULL); +static DEVICE_ATTR(max5_led, 0644, a10sr_show, a10sr_store); +static DEVICE_ATTR(max5_button, 0444, a10sr_show, NULL); +static DEVICE_ATTR(max5_button_irq, 0644, a10sr_show, a10sr_store); +static DEVICE_ATTR(max5_pg1, 0444, a10sr_show, NULL); +static DEVICE_ATTR(max5_pg2, 0444, a10sr_show, NULL); +static DEVICE_ATTR(max5_pg3, 0444, a10sr_show, NULL); +static DEVICE_ATTR(max5_fmcab, 0444, a10sr_show, NULL); +static DEVICE_ATTR(max5_hps_resets, 0644, a10sr_show, a10sr_store); +static DEVICE_ATTR(max5_per_resets, 0644, a10sr_show, a10sr_store); +static DEVICE_ATTR(max5_sfpa, 0644, a10sr_show, a10sr_store); +static DEVICE_ATTR(max5_sfpb, 0644, a10sr_show, a10sr_store); +static DEVICE_ATTR(max5_i2c_master, 0644, a10sr_show, a10sr_store); +static DEVICE_ATTR(max5_wm_rst, 0444, a10sr_show, NULL); +static DEVICE_ATTR(max5_wm_rst_key, 0444, a10sr_show, NULL); +static DEVICE_ATTR(max5_pmbus, 0644, a10sr_show, a10sr_store); + +static struct attribute *altr_a10sr_attr[] = { + &dev_attr_max5_version.attr, + &dev_attr_max5_led.attr, + &dev_attr_max5_button.attr, + &dev_attr_max5_button_irq.attr, + &dev_attr_max5_pg1.attr, + &dev_attr_max5_pg2.attr, + &dev_attr_max5_pg3.attr, + &dev_attr_max5_fmcab.attr, + &dev_attr_max5_hps_resets.attr, + &dev_attr_max5_per_resets.attr, + &dev_attr_max5_sfpa.attr, + &dev_attr_max5_sfpb.attr, + &dev_attr_max5_i2c_master.attr, + &dev_attr_max5_wm_rst.attr, + &dev_attr_max5_wm_rst_key.attr, + &dev_attr_max5_pmbus.attr, + NULL +}; + +static const struct attribute_group a10sr_attr_group = { + .attrs = altr_a10sr_attr, +}; + +static ssize_t a10sr_show(struct device *dev, struct device_attribute *devattr, + char *buf) +{ + int i, ret; + unsigned int val; + struct altr_a10sr_regs *a10sr_regs = dev_get_drvdata(dev); + + for (i = 0; i < ARRAY_SIZE(altr_a10sr_attr); i++) { + if (devattr == (struct device_attribute *)altr_a10sr_attr[i]) + break; + } + + if (i >= ARRAY_SIZE(altr_a10sr_attr)) + return -EINVAL; + + /* Shift because LS bit signifies Read/Write */ + i <<= 1; + ret = regmap_read(a10sr_regs->regmap, i, &val); + if (ret < 0) + return ret; + + return sprintf(buf, "0x%X\n", val); +} + +static ssize_t a10sr_store(struct device *dev, + struct device_attribute *devattr, const char *buf, + size_t count) +{ + struct altr_a10sr_regs *a10sr_regs = dev_get_drvdata(dev); + unsigned long val; + int i, ret; + + ret = kstrtol(buf, 0, &val); + if (ret < 0) + return ret; + + for (i = 0; i < ARRAY_SIZE(altr_a10sr_attr); i++) { + if (devattr == (struct device_attribute *)altr_a10sr_attr[i]) + break; + } + if (i >= ARRAY_SIZE(altr_a10sr_attr)) + return -EINVAL; + + /* Shift because LS bit signifies Read/Write */ + i <<= 1; + ret = regmap_write(a10sr_regs->regmap, i, val); + if (ret < 0) + return ret; + + return count; +} + +static int altr_a10sr_regs_probe(struct platform_device *pdev) +{ + int ret; + struct altr_a10sr_regs *a10regs; + struct altr_a10sr *a10sr = dev_get_drvdata(pdev->dev.parent); + + a10regs = devm_kzalloc(&pdev->dev, sizeof(*a10regs), GFP_KERNEL); + if (!a10regs) + return -ENOMEM; + + a10regs->regmap = a10sr->regmap; + a10regs->attr_grp = a10sr_attr_group; + + platform_set_drvdata(pdev, a10regs); + + ret = sysfs_create_group(&pdev->dev.kobj, &a10sr_attr_group); + if (ret) + goto err_mem; + + return 0; + +err_mem: + return ret; +} + +static int altr_a10sr_regs_remove(struct platform_device *pdev) +{ + struct altr_a10sr_regs *a10regs = platform_get_drvdata(pdev); + + sysfs_remove_group(&pdev->dev.kobj, &a10regs->attr_grp); + + return 0; +} + +static const struct of_device_id altr_a10sr_regs_of_match[] = { + { .compatible = "altr,a10sr-mon" }, + { }, +}; +MODULE_DEVICE_TABLE(of, altr_a10sr_regs_of_match); + +static struct platform_driver altr_a10sr_regs_driver = { + .probe = altr_a10sr_regs_probe, + .remove = altr_a10sr_regs_remove, + .driver = { + .name = "altr_a10sr_mon", + .of_match_table = altr_a10sr_regs_of_match, + }, +}; + +module_platform_driver(altr_a10sr_regs_driver); + +MODULE_LICENSE("GPL v2"); +MODULE_AUTHOR("Thor Thayer"); +MODULE_DESCRIPTION("Monitor Driver for Altera Arria10 System Resource Chip");