Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941516AbcJ0TzL (ORCPT ); Thu, 27 Oct 2016 15:55:11 -0400 Received: from mail-sn1nam02on0069.outbound.protection.outlook.com ([104.47.36.69]:35328 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933829AbcJ0Ty1 (ORCPT ); Thu, 27 Oct 2016 15:54:27 -0400 X-Greylist: delayed 103320 seconds by postgrey-1.27 at vger.kernel.org; Thu, 27 Oct 2016 15:54:27 EDT 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; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=tthayer@opensource.altera.com; From: To: , , , , , , CC: , , , , , Thor Thayer Subject: [PATCHv2 2/4] misc: Add Altera Arria10 System Resource Control Date: Thu, 27 Oct 2016 15:00:24 -0500 Message-ID: <1477598426-28125-3-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477598426-28125-1-git-send-email-tthayer@opensource.altera.com> References: <1477598426-28125-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BY1PR14CA0008.namprd14.prod.outlook.com (10.161.91.18) To BN3PR03MB1400.namprd03.prod.outlook.com (10.163.34.19) X-MS-Office365-Filtering-Correlation-Id: da9d2d48-e14b-4765-ced8-08d3fea30c13 X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1400;2:Afpp6xcjwjkOu03cjFumFMK8DZIlOUuOjLXOAXIu/ALEM7pvo2BJotvWRvsT+7zUUTB64Xf5ixa0iUKxdq3GtgPzqhDNRN3mycweMrGf/FyFoHfV8H5nwYx2c0+yL+MCC7z2J5O6fJIQRF0d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Cg5gw7+dOLLr1rNEYcIT0E2ZmmAwEZwjHk8FVAQud296wcf94OIz0nxSukNdDvacTWsOfIeLJ3x4M6x7xyraydwImSrl3Trs0fpzBxbxZ0LBQNpp6EoOPzgbOjXMQA= X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1400;31:q8tTfEWxkU2ljIE0a8iu4zUPaBLHZmbyBocjVObF3JiDpL7F2jkO3J6DjKXRk2jCCKz0l1smDI1xjc8kZO7n89ePwopfRXHjOsXLTQ+FgCOq0Nj7of5bALltfn6nxOsAp7fplTQA1XJIWRfBufd725/yZf6uiI4EIOKeJ2VH5ujSmkwaC3tjjmil38dfkNlyrss6+BlT5JCkmfNqGexWFofzAY0XavEKk6Hs3SYhiSnDP0cXmulouNeM1ZFqM5ylmiVGy96Iq7a4HkROyRJJh8wU3Fgum0smolqDWsOQAPM=;20:3pP8PEb2DK1kUlDqFLpEJtF3v1AsBHRDoS2a1ofetjyAO6nZ+SbUBZDPsYpvIWvzl5VmdCU+Jw/CqvkmsFMm/Wwa9QW52m2Y9uEkGza468inhdVv/5Nov3BBY/vbFcEUSSfa8srEAqroAkrR/Nc/kozZmGZyPg+uAZ1xZBoFyLg= 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)(10201501046)(3002001)(6055026)(6046074)(6072074);SRVR:BN3PR03MB1400;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1400;BCL:0;PCL:0;RULEID:(6040176)(6045074)(601004)(2401047)(13018025)(5005006)(13017025)(8121501046)(13024025)(13023025)(13015025)(3002001)(10201501046)(6055026)(6046074)(6072074);SRVR:BY2PR03MB286;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB286; X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1400;4:YNU8zch2m0M0+xx08N8lb34JIUXieE8i1R0nM8L6DDw6Kyq7Sana5Bt45ncFQdDflP0uJ3IjWzNmz4TtrNJurZX6aYw8vCYsUO/WDzPybRhT+AdLIhDHhYHyvR9eO71HJBC6Gsom5k4J+ykSOGwiSYhIrQFNOIWAnmzpwt/bbZ+FFWc6jxE4ljJD05xp+ClyBmjWrXjyJwgwQUTk/4po2Lc9u62bhVQU40bKKu9l3+sarVafaMuog4NXG602wdUA1Jb0ldU/bV7oSfiwWmbwlx2JrX6tEDM1FL4fzjI0iMlq7adi/afG63qc3/oAASEJbU98cQiPgYXQlEIecmdTh8DKX8w3AbATT5kGgb7/QSnGUeQ14vVnY+wK/izLoAMDyz27oDPD2pFTg6GkDqSobTs6D9tj4fCz3PIQriG+j4CXdnj+wwvqd1myp6AIWu31+w+kOehf/PshB5Cni5PruUEn3kTDKAhT6Yqz4MzBe7F1+nTcynLpzvX25WyWT1gnzmzxwODI/e1AEnP82BQMl96KA2rnhnBsj9L3HLQDKXNy6IFjaovosGiexoxHbbCj4XOb/9eiRBoUaLzfbA3D50+PfOuU/dcIudL+AWYA0sIUWS+31kDBAcziUGZx4oc7 X-Forefront-PRVS: 0108A997B2 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(199003)(105586002)(81156014)(4001430100002)(50466002)(189998001)(92566002)(48376002)(229853001)(15975445007)(19580395003)(81166006)(77096005)(19580405001)(101416001)(76176999)(50986999)(107886002)(97736004)(66066001)(50226002)(5660300001)(305945005)(7846002)(68736007)(5003940100001)(7736002)(2950100002)(42882006)(47776003)(110136003)(7416002)(106356001)(6666003)(85782001)(69596002)(575784001)(586003)(86362001)(3846002)(6116002)(33646002)(2906002)(53416004)(4326007)(42186005)(8676002)(2004002)(85772001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR03MB1400;H:tthayer-HP-Z620-Ubuntu.altera.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;BN3PR03MB1400;23:PVNULGje/5NGPORf2jsWVrozpvtJnKJcu7Hc7jfbj?= =?us-ascii?Q?J0JpJjc8GmTSqmY5UUjFnlAjxayqlNbDYDMgCxqBRtOoFjoJQIXGXB7z2gUJ?= =?us-ascii?Q?Ex3b84pazWE0Rj/62SE2cI7BNyTtexbw3SEz+fC0HppkloVOBVUK+mEu302y?= =?us-ascii?Q?XHe7ylhi7wXi8TN7s7PrEAK7AZjuGyynUFk2iWmOUo3i2sYn/QSEO+F6vLD2?= =?us-ascii?Q?D3S0pBYnwsEqHtqZz5B33pmjKgn6grxM0RxGhwuOOJlxHB7taG0Kk/YLoHkA?= =?us-ascii?Q?JT5sjhzzT57HD7HYyGyDQU6by0KBSgSgfaNN1gNBxkgHL7UlZMwq/Kmsev9h?= =?us-ascii?Q?IZwuYXxHpaViotUDnCkpozxqDkucLS78th0j0F3hUN6RUSh+fdRIziCvjy4Q?= =?us-ascii?Q?/xLf/khFGvHyStzkkBqyrMAc1Eke9TTHAqq5lwpKZr2W9rV2Dckh/dJRb4KP?= =?us-ascii?Q?2zRjU9d/Omtl/tjRBBLivI2WhSUxzkMkqBRIVDBLUw1zofSEyG0KuRiuzG1/?= =?us-ascii?Q?+KWNoe4ft0SWMygRBWrYPoRjpluFTlOopdNVHlpU7mryaGXvWM659oyazPBc?= =?us-ascii?Q?dM2/bQd2FoHA+Otns+E8hB23IOj2OXaGl/0frcS7CXgH/QWB22Dlu9B94NPK?= =?us-ascii?Q?9RqbRWcoIpRAXsrK+497igxwAKZ+90S/+LsWcpgZOKWumwDXduf3XMn6R2nK?= =?us-ascii?Q?vfCFskUJOx+EXumbb7ZGioikq0gGqrThTx9jq+rsWK3XxUP+QuMpmu7/DknZ?= =?us-ascii?Q?uFEomWqQJaWG5ORC46R3hqI334fOGvGVzfQEX6m8Xv5kS+Eg7AxiU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i1tqlRkGctqNox+BQ2RGlp0nr6Bz6lZ9oYgQ8oHPHJevutLTKnsbZuBVfn7xEw6K0x92Bj9AyFvs8wIQ06y/EzQzyYXBOT6QPOltyMh6pBf++55IdY5qhniD3Ey2CnhQ==;24:nK56AWmpbt5XK85zXnajFb8rPH9cVVeRMdJFoVXZbPfpsVRXwdkGt8Q40vd3FlqbGIpWQ00sMFJYR/1/wQOz8WX4eQuqCviDbZdrz6YBQaQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1400;7:4O8D0M75O9zwXaZDZAehEzJ36nxQrFxJHvgDhBZu7J9wcyzVC2QQ5YaBANaNdCNFeZjoDqMlN9KNa+cg7Lcjo0h8YGpDPL7O2rktSYItqzdeyfvdwWrAtBBRBOl7WfqD7NclbMii7PKDwxNa3jypWF4moXu/4yU8AgtiMxxMGZBx2VqdKfN97lrwLgqeoCnn6trYh5L3EJ9p/eMwAgdwz4ufni6yRuLoNODdsJHcVkHpGqDfJJSBW2G4XlCzq8CX62WFltIGyReusUIm4GR8Z6PQlaD8Qt7NlOp2uyqc8DA1ZZEmDz9wUNPquTe6AApiR3DtEUEL9hMVFl4s08/33Be/sdpFXkeVKbVicX7BVNY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1400 X-EOPAttributedMessage: 0 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)(1109001)(1110001)(339900001)(199003)(189002)(81156014)(81166006)(50466002)(5003940100001)(2876002)(6116002)(48376002)(336002)(626004)(50226002)(92566002)(5660300001)(66066001)(7416002)(305945005)(8676002)(7736002)(956001)(3846002)(356003)(47776003)(8936002)(586003)(11100500001)(4326007)(2906002)(68736007)(7846002)(4001430100002)(2950100002)(86362001)(575784001)(97736004)(33646002)(5001770100001)(6070500001)(42882006)(6666003)(19580405001)(189998001)(85426001)(87936001)(107886002)(19580395003)(53416004)(229853001)(106466001)(3720700001)(15975445007)(77096005)(105606002)(76176999)(50986999)(86152002)(2201001)(7099028)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR03MB286;H:sj-itexedge03.altera.priv.altera.com;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:0;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD004;1:/lXJ5y1XZxAE/scKtFTqoQ87u2DzC3UpzGrqkhmtDtJP+/fHUXj2e6X31qN7H3/Rb+BjyQWGEsBAtlMJB9SyRlqbupS0W5hLnLLEx9/csGU1PNH6yJgix7e/HiG7WngXUXZPIzEdv8k8NlgV96J52CTrf38e5VTpzT1gZS4JD/IIHe05RF4ZOZUgt/FYv2m5oui6jq1rmzljeYV5wkA7T9Vc7RI8bCEhYvuZyxP+V0XYbi0QOSutgZuPThcf+gCoI0+tHClGtScQCbYWrCtxntW96Sjds/GRg1/nheNQF4qJ3TjvOWojDMGLqFrG3M0eKhMuNrAu8zmWFUGwva4TcV9O9QD6c1TPZPWHhVfX+LLAcHYaS/WApPL4f82LemC9eC0hJQ9qd0zhdhBchlBy+UHzwyml+EDaW2zxJR44Wxdu2erUkquzaP9p+sfU3/7PQsU4eAb1HGDzR/QsrRaQaU7gA8hpzcugm1ZSrarj3GlKUSCaYrcap8hq98wTIng5XHWaNwNi3JAAGNcJP+0DoetLXmi16A3iDdIN9ob6X3ZbxI2+xTV4pgy5itwQPcmwOpFUExzw0FPr8TC5dheUMCPuVotTCsUfXDpufxMsGNI= X-MS-Exchange-Transport-CrossTenantHeadersStripped: BY2FFO11FD004.protection.gbl X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB286;2:igDpffSF+tkxZQl4OhzC3YC/3HqfzeaGRTIkddQfkLvtyQXj01qm9vn5Iu1T2w09ojOJZWeuGOOQvU8zmEBWvAW0dlxgHgPzvMhIQILHHRvarOJbwYNWT/GgnA2Fq9g3mEgp03RODRnpS4InW/hjse9888DVqdiO3dAY4freFKCOgwum5jqdRMNJLOAwWIIqz0tdM99B/l91UNZJ5ADEVw==;3:O50nKhvi6SWMtRGLdC/5/nS9/E9a/1rSO5EslgrJmVCWhV70KOqe7+0vo7xH7jZy3HjmSrbxdys9d/QYWmSlWdpXmclsrdukmeiIlNE4jEQ2O7R5ID68adac0/+G9rxnrSus5nHQVLvRG/OsfJ37OMDtFppiHHMxrLsIXgYKOEfZOc15ya/JUliPk+HcQSNuowZjci/N87EQAqIY90dh9ya77Ry9IwZShlvCH7waJexxbDe8jut4Dd9vvb59qeFU5CqhSLIg6enn1aWXnz7jwg==;25:Ut/YLt3FyENmbyEZhpwIJeJLRLNG0iXKlmEeg29R3ZDAPwaWVigRHWrucW3x7LajhDIPoLXRiDTl0AwarQ13P08400zqAumddg0Kq15+Eja4sKRIcimaag3+pmPwwG0wqcjL0LVU1EWceWdrkiZOicS9PNuJXvgSnBGxl2BbuiTVbxEi/tHwcUBO7TzdH26shSFlnOkj6PmcqGurKq9MLT6R1YryDvSXLd1ExaaSsc4ul84gxLjCQCSwgBetIQVN4sxFTh2gc4L+7SVR4pwWGSEBRWMYpXoOScalsJql7MnX5tW9X4HtSZFWNjTuusEa9q5IjCR/bTbPZDCxivDnopcCYDMQwG6kYIfvl0nuFZ4OQYLnuMbYe6AYlmcqWMhNiBbfR/EsQl5P3fsa3kyEv8aJ70WIytNM9jNoHvgOoSKgeO2X00LK3pCkFUahbPsooRz4YFYIVTpk0KZFDQ6AGQ== X-DkimResult-Test: Failed X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(3002016);SRVR:BY2PR03MB286; X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB286;31:/CBEousTfx3abEZbGczsLpRGXlkOJgwlD7ESyJYUwP8VUKOVum3qPhOfDwf0x7apEYnNvAe1FNq5yQlDQ9i/pyNfzbJO0SWBy2awNMrJnJ41fpVnVNAREVbTRQ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qQQ6q+DsXDn2w== X-Forefront-PRVS: 0108A997B2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR03MB286;23:g3BSAnLVOQiorhO2nUDc75+sdOZgNfMO+/bwJN5hq2?= =?us-ascii?Q?ACIYRydSMX555yRFrfcgQTN7iYElcmQgdULvAOH3NgdXUDWZo7Iq9AXZx+Oh?= =?us-ascii?Q?4sGSKx3hy59tK2VA495Bzh+uSAmpJ81TX150BpeskpMRTZfBemRNUwAeG9de?= =?us-ascii?Q?Cw8pIkV5wmLYpfMjLE5kiCNLm/gJLXYcpVNtyndFLbZbUx1AVgk2TZc5MT2V?= =?us-ascii?Q?gm8cKvSB4E2/w7yHvPHc0fuyVCJm5IkiDUWZJpE2uSIwrrcvazdaBz7Opvpw?= =?us-ascii?Q?uVeQrSXZuAfBZP7E9qeQzLsCtC4i3PebqUlJueTZyfwgydgWoGEdJXV2+zbi?= =?us-ascii?Q?b1z+HBXNtNmzwoBrG1tDGACLw1qsCCjJeO01hDXPRXjhH1YkxXuf6R0GSQNm?= =?us-ascii?Q?d49sE70cNoaw2MUuuitz9ow9urPs9Q5lb7bIA5b2lIfOthU6dh+EhMtbRbHw?= =?us-ascii?Q?D/49tOv4ePDlkBQFqnR67XI94IG/X7DMUgMvDLlcDwe6DL0BMWYDxqlMstrF?= =?us-ascii?Q?ByjIjtcMGYUYqD33WSKPXxL6efFnpBOw3Ev6mEiuzRNR935jeoVk8oFNPWv1?= =?us-ascii?Q?gnbzx1254+2gPmRZtfDGR7FN+KDRPBQfne0JMSbtj9o2GUiOUw46oHbD3rIx?= =?us-ascii?Q?DHy7aZ8C6aAHF+9t0NQnv6dQGZAvKvb2MHBqWQ0ODLG5YziAWrWg/M96LkHe?= =?us-ascii?Q?do1DNqrA2Sa64KvSPim20HqNanFEI7ey4S4XR/t/JvaDHXQFV5WrNmZ4JDlH?= =?us-ascii?Q?6QhvgeNHDN5Nl9TMxPyAl+YkDBmlfek0cgXS9RMol2M7cSNu8p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a9aETwaSKpPXT7SJDnqNqFRF6KDyd0ausWhSWut1jG3Ar/PqjGDfCUrBaWpcROjsolUV6dSAXcvlsmyyaKfoP+n+z/wnJCsaAWcpZ2ruKFRV48CJM6wnrRS2ZDjcj2iEMsu6ud6kb2LsaDIWIRk4J1GmPXuhaXA0YbQXNE/Gy8GKrTz13AD029M3y94FGOP676Yv0Bm+ldF8Z6eRXXa92vRa3Rit5yU4/FBFn;5:6dt6dm1uEwYaMmP6P3Sl+ImyMxnpN8JfQhvA5KmfToIfqP0Rq+nmFRoVxfGP0VGS2ox/CtzwhFiR9uQ23U0WF0tSzDRqNny7K9fJMxkn7imbHlXoCyVx10Crd1tUTiZsbnpfbOMSCnLyMQftq3Qj8g==;24:AcZ9uLgMHJFX0iJm6DBjc7B+7Ozn61jfyAbfqYMCad7HwEjxVa3BuaKbVE7THgHVlK5M5OOMbHEs3vkHDxHkbvNF2rjyHyh2YF/Y3eQ94N4= X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB286;7:K5TkGH0qPyPfib1bwn0ij5ZSOhT8Rzj7iMAIjmPAXPiHYnaWM8roCkuKh1hRktkxO7Q+Rlmlcoz4E2gaEiDyuywLcFLdaPScEwaj6BFadj9oBvAm5/3a5DHU1/RthUepctbxnMaf4xU1FUaVx9EBPHzxeePxIpiD2uc0sHCOCzWnnFNp7f3whgWaEEhzpuJXTZs/rEunElfXEl6GEmQdnhOEexYaDJFTjOX5sOYRB5RrRkOLkQcBHYwxyljFQ3PwwOeoNkYyr6175Syx2gGkbWoTsvzbhcQyIJZdckoC9rJiKCfQ7nTf5OnpClYFDBpbdV0D6r86YcQwN9QAc5R0AA== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2016 19:54:22.2936 (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: BY2PR03MB286 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7786 Lines: 244 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. --- MAINTAINERS | 1 + drivers/misc/Kconfig | 7 ++ drivers/misc/Makefile | 1 + drivers/misc/altera-a10sr-monitor.c | 176 ++++++++++++++++++++++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 drivers/misc/altera-a10sr-monitor.c diff --git a/MAINTAINERS b/MAINTAINERS index 813ea85..1c5b0be 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -631,6 +631,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..838ec2c --- /dev/null +++ b/drivers/misc/altera-a10sr-monitor.c @@ -0,0 +1,176 @@ +/* + * 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) +{ + 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); + + 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 = "altr_a10sr_monitor", + .of_match_table = altr_a10sr_regs_of_match, + }, +}; + +builtin_platform_driver(altr_a10sr_regs_driver); -- 1.9.1