From patchwork Wed Nov 2 14:32:56 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: 9409283 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 12D4660721 for ; Wed, 2 Nov 2016 14:29:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 007962A244 for ; Wed, 2 Nov 2016 14:29:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8E872A247; Wed, 2 Nov 2016 14:29:13 +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 F0BC92A244 for ; Wed, 2 Nov 2016 14:29:12 +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 1c1wVw-0004vw-Qn; Wed, 02 Nov 2016 14:27:40 +0000 Received: from mail-by2nam03on0079.outbound.protection.outlook.com ([104.47.42.79] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c1wVP-0004lo-1W for linux-arm-kernel@lists.infradead.org; Wed, 02 Nov 2016 14:27:11 +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=jv5Ugz5bQ31BriY/CosFpcn3ZLrEa1wS5azgwdNgobk=; b=qOzRHWKCw2t0TIduFQlXWJq+q3d+QBY90cOvfgNIAwQZQcQo9ZOxix7IxvtxDNUOqwNTO0qTAHyMmpNzYmbN41cFJQp8qMm5njVRkVjr4Kw4kqL2Qb60SoebfxczdWC734x7+e1QnuK5DX2JYkQwRGnKtP9c6lzmh0L9xIg0Sj8= Received: from DM2PR03CA0047.namprd03.prod.outlook.com (10.141.96.46) by SN2PR03MB2302.namprd03.prod.outlook.com (10.166.210.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Wed, 2 Nov 2016 14:26:42 +0000 Received: from BN1AFFO11FD047.protection.gbl (2a01:111:f400:7c10::164) by DM2PR03CA0047.outlook.office365.com (2a01:111:e400:2428::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12 via Frontend Transport; Wed, 2 Nov 2016 14:26:42 +0000 Authentication-Results: spf=fail (sender IP is 66.35.236.227) 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.227 as permitted sender) receiver=protection.outlook.com; client-ip=66.35.236.227; helo=sj-itexedge03.altera.priv.altera.com; Received: from sj-itexedge03.altera.priv.altera.com (66.35.236.227) by BN1AFFO11FD047.mail.protection.outlook.com (10.58.53.62) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.693.6 via Frontend Transport; Wed, 2 Nov 2016 14:26:41 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (207.46.163.48) by webmail.altera.com (66.35.236.227) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 2 Nov 2016 07:26:25 -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=jv5Ugz5bQ31BriY/CosFpcn3ZLrEa1wS5azgwdNgobk=; b=Bk8R/SYzuJlVc0m+J0mlwQbWo7vj+jj0gG3gm4bE6qqvj6vaopaKG5gr+xvza98epXx4npUR05W7V8+i+wBND8nUkpbD9576NPSwWyIr5P6F2Hbl7XlFny6xGAU5rf43hfirj/+dgakzZvPRw0zWiFsDEAeJ6hb9qnaOKsABTls= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=tthayer@opensource.altera.com; Received: from tthayer-HP-Z620-Ubuntu.altera.com (64.129.157.38) by BLUPR03MB1394.namprd03.prod.outlook.com (10.163.81.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Wed, 2 Nov 2016 14:26:37 +0000 From: To: , , , , , , Subject: [PATCHv3 2/4] misc: Add Altera Arria10 System Resource Control Date: Wed, 2 Nov 2016 09:32:56 -0500 Message-ID: <1478097178-24341-3-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478097178-24341-1-git-send-email-tthayer@opensource.altera.com> References: <1478097178-24341-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: SN1PR11CA0031.namprd11.prod.outlook.com (10.164.10.41) To BLUPR03MB1394.namprd03.prod.outlook.com (10.163.81.140) X-MS-Office365-Filtering-Correlation-Id: b01aa2c5-f285-4171-069f-08d4032c43ff X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1394; 2:uHR8aPole63eI+JDmGLtsJZ9xrc6qtUYiTI0yKPk+9HCDzK8XDOT3wyFvFXEpl7V8fL7jfCqzyte08yVRpgnmjz+o9UVvU8NpayrH57+f8g1YmezVqFmfgYBWECm5NKauWwwPfQdm7STbgDz0vokI8HBfVa+N0Yxl7jRJsYLaThSK7H+kTvcGkgctQcOTANE+6fMLiM5d+o9N7owFlU15g==; 3:3M2wY4cMJjwQysR8f6MXPOHJqCFggrR3cXsxE0wTnnrfyJ2mT5dQcXKWvtCHWxMxXan6UEeAZq+mFXxqb5/2e3TAFb+U6XK1oRZaZZAeAf/5E0z2O5uv4ilIBmg/cOsiFw6vLoDmLLKD6WIXY9WgEA== X-Microsoft-Antispam-Untrusted: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1394; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1394; 25:gQWsiS/rv2zIdEjGKQhkIcO02QG27iF/8lvRCyRouqEcsAboged1HFfzyRuYJswfWJhHYOzhJi5D4OOr+RwlEOsk72De2XPkTEvt9HbjRBo9zFpv5XQD036ULmOFuQb9sS7FFXz9ekNS06VwR/YZlPZKFss1l1vc1YNDftqLWeE/F8Nl4xyvjWllGFDiV8Kj+CWalapcsjWWaFo4rHjdBi7FitYR9NdRQ31tAuTSq3JNnipLJmC7ZqenuFZq6OB1jGm9E/RXeGEZcN6hBZXnHHWyT9rThkuespoUxQ5wdSjGYtAPXNCJWHsg0Ris0bW0k/eeDHr9ZDSvsPyOtSlS72153W89ws2yQ6G/Dx528sdjDeswTEvRDaL8PynpxKria4CSHIox2C/QaaURNC9vR3KC4rVDa33s4mHKQ/uKJUE4vcjG50hNbnU6LjGiz0v/yXa0YMIW8biuTCvvjke+RwRRBKipreY9S2nC15VhojBqDElJOO9mKUdDdxMg9LI6UY+u6YN+lF20kPz/q49+6uR0haYkb/IyEX4ZUVKQ99uO6XvKMqZUOulm7Vqdyn6nA+n4h7SI3S0QxfYpvDytZ2u8MCOfU7spo+BN/PHSD5Ruh0XsW92adhn1kd4bAaVoMokC/z/u5eQ7mwXf02j3+dacdpGzoh5XHRIKw3uvuY+VWa5IHghuA6cdeVqvmIL1BB861oaSbmKCnQmeoGycwsx6dDsEk6hEw3+ZHicdUXn+JfozAW/Zl96STJa60Jiy5oZt4aPT9LNsRoNJwsUV5tW7pbZo43GpPjHB8reOzfXn6Ky+gAg3weYGKSo55SXoIwYDzOCpT+kk/DKR6P7jBAyr2GeFciFw58mCcL/qk3s= X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1394; 31:zVRMYp3kTZZqyhwTrBZoPHa4tdU+Mtf6/Wq1kPm0Jyr2+yabsDqx1/xKBBJs+DF1q1tcZ2t3BKKWQl8RPjzop/ccQwH+97WCyglC2lpXknPIDs/Nfx8Qjou32G37xzNjmK1ONmkI/hZr7oR0+r4znkBhyI3JYnFNN8jzB8+t7Sfn6cHhWWlnGWFiWiZgFnJRPENZXyxSy0loM2Pc/y5i5hjLYm68o7L/FHxxi64KMFQ9HsWwAUxvhJOyE0YXHPvzkuXrnjVFjIsJFsAOFgmOtg==; 20:q/EJ3WLd5WEATjurfqVSoWZUYVa8mnxv8sHvfA1zi9PPYMVeVzP015RrGtKEX6P+99yrKIU7A7by7y2oI30fWSdfVq4acu97UeTugD5kq70X/K2HdbVpPs9WBi5DhBMUVZ7UureXpOR1NhHd+QoyORKEHo0rM/N4o/bXzIist6g= 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)(6045074)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6046074)(6072074); SRVR:BLUPR03MB1394; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1394; BCL:0; PCL:0; RULEID:(6045074)(6040176)(601004)(2401047)(13024025)(13023025)(13017025)(13015025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6046074)(6072074); SRVR:SN2PR03MB2302; BCL:0; PCL:0; RULEID:; SRVR:SN2PR03MB2302; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1394; 4:vth71JUS/iFR786N4mnCWizBj9zGu1027WLE5FrkuF5pnqxq0Y14taPrJXEadbt6FoapEQ/gD34vY8n9z+m80eX9v8vSZkoUTrhH8+RMhoig2RhZOzDqvaj2oXuxMJoIGFRGBTKgyC2GybTdQB5qGDtfnIEEmR6XUD4Irv/119KA+iCahP6l8bwEtwZjEnu1b5ms9lbc/FYlX3FBKUOwIp8+xeqaQ0GWz5miYdFASz8veZjeBfdLUXHVmcMn/SpFDio/XmN5s6mAio40XyTGhr8QUggTMJrt67Ez3n9K6QDxK5NcJPxdtrAZvAhXvPafo9b2ZfP9b2SvqRexo6qiZ8zpT77qsP+whYyooKPa9ggjlr/5qCr5ET+IQ5PpmAqYhS9eFnHSf2R2tgzbCqhzMAzLplBWQ5f/ttQgZQZMJZT+hmMAo4wQju6foIrD0Lv4J01YMSx0DaWqH31yhOOLyvWn0q2X9Y8zk5k5c0WII47eKnBx10zvsBfXQudQaPzGbz95nH6n7l1l60cgQgz5Il+ziTNeGBoqBKpbgxiZJuUeKSGZhhzbSUdcR7t/Lg7/yn8KMqw4oo3Z05TCPCw+hFB0uZIXsyUU+jZ4zn7v3SmMerp/FUiM2Q+IgRHyntBa X-Forefront-PRVS: 0114FF88F6 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(66066001)(50986999)(7416002)(5660300001)(47776003)(5003940100001)(6116002)(3846002)(110136003)(106356001)(2950100002)(586003)(53416004)(42882006)(7846002)(7736002)(42186005)(4326007)(305945005)(92566002)(105586002)(2906002)(101416001)(69596002)(97736004)(85782001)(81166006)(48376002)(86362001)(81156014)(33646002)(189998001)(15975445007)(19580395003)(50466002)(68736007)(6666003)(107886002)(8676002)(76176999)(19580405001)(4001430100002)(50226002)(229853001)(77096005)(2004002)(85772001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1394; H:tthayer-HP-Z620-Ubuntu.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; BLUPR03MB1394; 23:bwAi15SdKWD8EPwvdkh4InquWc/8MWu9AKQXr8OXV?= =?us-ascii?Q?vFLtpyS5co8tjlPr2C1igzdPwtNsH9LsRmi35n8XWaJARD7lm2OyEP3HWXRi?= =?us-ascii?Q?BZ2RQZMHZnOudwhTXZaqjvkDXzq0WAUtc7DOK7x4MDvETMkn8SwjSY0arBe/?= =?us-ascii?Q?Ebe2Ncn/xk1/uUlDAb9EivHBoOHWq+etMPOWqBYotZjbGjflynLO7795Z0A+?= =?us-ascii?Q?Ft8OmeMndNkRXYMKhnOOL9KjJR6Iz35ZY3oT7W4kEK37tW+M7+pBcLuU8Yub?= =?us-ascii?Q?ejiDfhTsTsq6QI9gUirq+8w3SNFT+uGJJHHN8dov3GK2QDkNhQdHs/oftOSB?= =?us-ascii?Q?vbiMqoeHrWyZR2d7+QR9Y3XimeEGfutqwGMM3UFBMTyroExRfO4VqvK+7kfS?= =?us-ascii?Q?KqsbK3B1QoVdtPC394ci/+oKTM3EV/MN0xLMLrgzonJeoQ4jq3uB5NpE1gwE?= =?us-ascii?Q?ugeSDJ/r1R+EuWKkFVyNjOwdLzro1cf8yYy02GW+r5rZhXJmo8w+imY4e+6W?= =?us-ascii?Q?I4Xr6BuJHuWKwmEZ0KgPsGV1+CRK0oCtTcq0VMi7IPjdwHzlqjyXIMC78Bf+?= =?us-ascii?Q?RDAAE3mw13sqN1baxr+rzJnAYweDmao3j/4hPNdLXg3EzyMRs3PWptRNRj3S?= =?us-ascii?Q?AxnrJ/Et/VSB75rj9ylf9V+gjap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kgS02wfSuSUZWzViIXmWoZvBvc1txFcZN7X0jRuO2etalN8/GbUZdz3pfZ3nBz4cZ39eVyrKg+NsI1hHeLd82PWC0IygZKXcmRwgL0VOSg; 5:EdoqynDa/eVKqZ/43YPZ7OvXyOXtFQPnv5n4PMyAdF7+1+dEuTsgJ/Y9eZ31BuT/YkIOGVZAnzcclSaxBLXpqSwR6uKQQ9V0VXvto4EqO/9rwoq9anZhru/ELvWT871m8aWhRjLOCiXgfZdSRauweA==; 24:PcB5HQvYLgQNMvAw4UcfdcnXP1Gv+xtd5TWyC5XIf5xqnvHar7BTPQdOmM+YAoalSfVrtytQuRlMB6Q9lSG2i+vc4a7CkMtq6+k7zX4vhSM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1394; 7:dOLCBd7w2ERPOfu+KN/kX7K6ygguC+K1vLUXT0Zi0i9hzWNqMQDg/DVwJd6WKv5QuKLvQ3mBbbix7XbaSttcdOWZNtLPwVV8Ud6Jlt8xep6/CAnGshqfzTkhUfgH3cn1Dx6CB+mh7BrBmuL3F/JrKBWJ6AWtEM12yYWRh0cWWkVgL8NCQYXPh/cpmgZN8Ad65n+2cM/OT5et1IrHUn3cuOurE5uyQ3mH+OSc5tlEmqfgod9msZwICpb/puqN5OGK/R9hZNZRvqlJPdz6queXzRzeX7PBrSCSlwzOFoAMe4UojT6eI+IHOi2qbzubz9bLX/BggwKz4t22YCmGpQHqIBGJLlYXerpu/ZCKVSMAWI0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1394 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1AFFO11FD047.protection.gbl X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.35.236.227; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(5660300001)(7416002)(50226002)(4326007)(2906002)(4001430100002)(11100500001)(2876002)(305945005)(7736002)(7846002)(5003940100001)(626004)(189998001)(8936002)(86362001)(15975445007)(77096005)(2201001)(86152002)(85426001)(87936001)(92566002)(5001770100001)(97736004)(6070500001)(107886002)(48376002)(336002)(50466002)(956001)(2950100002)(42882006)(229853001)(19580395003)(53416004)(19580405001)(106466001)(105606002)(33646002)(76176999)(50986999)(6666003)(3720700001)(8676002)(81156014)(81166006)(356003)(66066001)(6116002)(47776003)(68736007)(3846002)(586003)(7099028)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2302; H:sj-itexedge03.altera.priv.altera.com; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:0; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD047; 1:fcw06fVRb9lOlnFlpg/KUyA3KscVMIFYl8s5WKwMyvWdlYkV5H4lJYdGH7PsXP9cAj8JpY5XxZABUT+IkwQNlM9UTeuBN71p5rVbd2PfuvCQN9VUNv37XOSbloL6uMmbs1g72zYJSq2YkILI9AWfb/aWsztloPycONlqWQJ1HJpvFp/xKq40AcrZqwQsv9pDu5FfG9zBmNLGbrIBnNDRGS68OCjcGAgF/krHxssHilH/ERF1vP9BIbqm/bd70REcmQizsKUIUF5X1hhwXMCiLDR3i/e+USErrhKP+hka4iHZD2QqI6+b8c6vcyBSbWR6jTFUoA5a0lsQ2nb26TEiLPExHkFqER/rqsNFMZhBFIOPKKE0F2fO7t/8xymohG4pXhyvyr49hIPDpkxYS6+FokBMQrA6IghN9F8Zxga4KBs2eSo4g6okVMJPW7bdHwdMfpkRcqxJ+iMVh3R/sub1FzPqeqE4/HzJ0aZUFSG9N7IrGC5lKOIJeBfBka0ptKgObHV5JeLcogvQZVny/F2Mw1YxnGZGQXO/9tjBU7sQ/jdIBAMwjOT007LTCe+lXSjOdhQCTYnXVSOIng/ThjzpB/rJf3VSUqJG4gKKm1vBvX4= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2302; 2:1wGvM0TmUiEgo/3EVKJ+XSzj6awxxog0XBe9vQckySWAHfcYVkgxu9zY17122fp+4FKke7d5Sxx2VQAKDZchuRw33RDLDQXHErJzjEXqlfrG90B4J1gZ/Ohmz2jm+ulVeAx939CSpjpsQRSXW77QB4hJNFi5OKM6L2qFwbNjfD1aNJ44SHXWNovjx4pBYlsjcj5yulI69d32ax7svRA7lg==; 3:sC7lsFUCn7rrCMYNxSJTfxdboGlO1hxkB3ADO6fPZVAJqbV3Jbz0daXLUt6Dy79AVo6CIXc/OYDf0EJjmD0mEi2l6z8OU2n09xJJYcPR0xZp7hPsLUSvJM2yssOUau4Kfdyh1HR2dyq+BnEtsIuzCFSBeYdEXl4jus+Sd6dUkR/sNSWxrhMZlSHYLeEvAQQp3PG8MG+S2Py0CU5yW1LaZs/pnVcpK8HsxquBq6bzLplL7rBabps5NCZzIl8ngmXZyjbd7QwOeI6uL5nJOvxZLQ== X-DkimResult-Test: Failed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(3002016); SRVR:SN2PR03MB2302; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2302; 25:KGy9wNfPZ2Vk0K5jersO07Q8g7QcrDjj7RspW2DKBfHmKJro2RjPOo0I7ctG0CN0FlUepJX3cjPUipOpWju5WxATxcEog8uE3NVoNrZdFpLX+2m/bB4cFfWd78aZbTgKmKbrKhiBW4O1/Gr6h3DkklzXqCS9e6N6opWVCDlQnfR3HnWc7A4EwZ9hlLpJ7C3w1NHGHeYcmg4+l3DI2ib7d7x/k4+CU89I/NMklXwu7QsWcLZYfTmAfxBjZQUSdY0DCr9LN+ZazqNjZlfWSuDXvqv0tiTTlEN4UP+MAkHwVDkCKF4RFTx+Lz5JGN1lgaC+NFuoCJFk2U38bbbYnYsSmWtuy2xhXz84o7AEYGCsNWEhcJzeSPIudQ1VnApn6Pdt6orb8kU+LRlHMYxz6zIiofWl7mmMZ2G9XKQAONpsjs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u/pc7/dV6Pv7y3hNrm2Kcr4S7dCyR8EaR12OLlU= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2302; 7:U4cotzQZyQ2uglOBrGD2W26ssjjAnTX5Uh8E8dCdN3eCHthyrJBkwSaqfPLIggP2jU7cUI4rgBX8SGOZyJsgC4lxqCD0UFPRD9BufOe0aiUvp5UPj/yGNjvsqevrde1Lm7oYuXNCK4FMiCAFFb3OxZtd8MRXq+I25RIKaq0nx8nsA/I8yBBd8OZCUN3kWqxs6gyadKXFhx+4bVk8IaKava83A40fR89mo/qY9Ia3cQHSGUnsHI60mVDGw3qP15/Vpj7w3ldzk3F0/qzV0qf4YbpY4UoLgR7/LFZU6Zpqo2QalAI153NPIilaVu1iGohq//WLCVUucUPQg4mIyK6GhQ== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2016 14:26:41.5477 (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.227]; Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR03MB2302 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161102_072707_235265_AABBC792 X-CRM114-Status: UNSURE ( 5.01 ) 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 --- v2 Change compatible string and filename from -mon to -monitor Change CONFIG from module to builtin. Make wm_rst register writeable. v3 Remove unused ret variable. Shorten driver name (remove altr_). --- MAINTAINERS | 1 + drivers/misc/Kconfig | 7 ++ drivers/misc/Makefile | 1 + drivers/misc/altera-a10sr-monitor.c | 175 ++++++++++++++++++++++++++++++++++++ 4 files changed, 184 insertions(+) create mode 100644 drivers/misc/altera-a10sr-monitor.c diff --git a/MAINTAINERS b/MAINTAINERS index b180821..baf2404 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -635,6 +635,7 @@ M: Thor Thayer S: Maintained F: drivers/gpio/gpio-altera-a10sr.c F: drivers/mfd/altera-a10sr.c +F: drivers/misc/altera-a10sr-monitor.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..f42d459 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_MONITOR + bool "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..9f6e77a 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_MONITOR) += altera-a10sr-monitor.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-monitor.c b/drivers/misc/altera-a10sr-monitor.c new file mode 100644 index 0000000..66338e0 --- /dev/null +++ b/drivers/misc/altera-a10sr-monitor.c @@ -0,0 +1,175 @@ +/* + * Altera Arria10 DevKit System Resource Chip Monitor Driver + * + * Author: Thor Thayer + * + * Copyright Intel 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, 0644, a10sr_show, a10sr_store); +static DEVICE_ATTR(max5_wm_rst_key, 0644, a10sr_show, a10sr_store); +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 set by regmap for Read */ + 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 cleared by regmap for 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) +{ + 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); + + return sysfs_create_group(&pdev->dev.kobj, &a10sr_attr_group); +} + +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-monitor" }, + { }, +}; + +static struct platform_driver altr_a10sr_regs_driver = { + .probe = altr_a10sr_regs_probe, + .remove = altr_a10sr_regs_remove, + .driver = { + .name = "a10sr_monitor", + .of_match_table = altr_a10sr_regs_of_match, + }, +}; + +builtin_platform_driver(altr_a10sr_regs_driver);