Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752162AbcJJUFm (ORCPT ); Mon, 10 Oct 2016 16:05:42 -0400 Received: from mail-by2nam01on0082.outbound.protection.outlook.com ([104.47.34.82]:27127 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751969AbcJJUFj (ORCPT ); Mon, 10 Oct 2016 16:05:39 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; armlinux.org.uk; dkim=fail (signature did not verify) header.d=altera.onmicrosoft.com;armlinux.org.uk; dmarc=none action=none header.from=opensource.altera.com; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=atull@opensource.altera.com; Date: Mon, 10 Oct 2016 13:29:48 -0500 From: atull X-X-Sender: atull@linuxheads99 To: Joshua Clayton CC: Moritz Fischer , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Fabio Estevam , Russell King , , , Subject: Re: [PATCH 1/3] fpga manager: Add cyclonespi driver for Altera fpgas In-Reply-To: <4b4432c04b4ea92a2af814e3d7866c33f2eb12ea.1475783742.git.stillcompiling@gmail.com> Message-ID: References: <4b4432c04b4ea92a2af814e3d7866c33f2eb12ea.1475783742.git.stillcompiling@gmail.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BLUPR0401CA0029.namprd04.prod.outlook.com (10.162.114.167) To CY1PR03MB1518.namprd03.prod.outlook.com (10.163.17.24) X-MS-Office365-Filtering-Correlation-Id: c673f096-74d8-4866-eca2-08d3f13b68bb X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1518;2:cLjjtAxK/WOOqzgYmsMjzpf/iB8Uih+3Ztse7gWBa2UC4PqbUhaYfN7r+LjLRPzmlmjoAemlCDtXqESg4kBKAU7c+LkGvVwl8KqEO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mz1x9urAGXkHTjcQ;20:FTBz9AGYnXQyh9vwEBy1uKcLE0ryjH62NvlronquXdxdKqfrzFJ2RyVT31t9nGaXLRw6NVEwVqiB/fa/P4/LZ9zTpovoWdxbXcZYU0mWpKzTMp8y0ABNxoIux014UEmSX+IzmAtOmyQMiHMvXEIugfy64mi5MbsEKdODlimFlL0=;4:ddoZQbC/yiP/gYfLSXPHOUYz+W4YZeY32RTnIE3LO3OHCmWdtqZCJSuiSV3B8Q+LYs9A6nJRBlBZIN4Xt1XEESbxGkQyx7tP8+h1HsTCHjBHRyFPpRQarcrzLYyTtOZ1T24G78UN5we/XV6F8q5Wz8ll8MtxeC/i54+hFS+BUbuuVf7fDcdRweLISI/BuGMnKkqu1Ljk5Fo98zTWswg1ULUcC+/YM8X5rVX8g9xnDZLIFqVvmD7h/iQcCEw+PFM5BSpc3xQ8olClIv74cq22i672p/nSsPJ+BPVNc1mZNzhOcd5cn+SQrlZDdbZn+uErZeO8r8HgqJMF/CVYjMFbhG2F9eD7jipl9Ez14sKbMSX6yWDl3un9wpei3vKBdpm4RgnxiL6hY56sdKxEstmmF/e13GxO30yRr++2ngfQeq8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026);SRVR:CY1PR03MB1518;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1518;BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(13023025)(13018025)(13017025)(13015025)(13024025)(5005006)(3002001)(10201501046)(6055026);SRVR:BY1PR0301MB1269;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1269; X-Forefront-PRVS: 0091C8F1EB X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(199003)(24454002)(305945005)(7736002)(189998001)(33716001)(23726003)(77096005)(6666003)(4001350100001)(8666005)(7416002)(97736004)(110136003)(83506001)(7846002)(5660300001)(86152002)(1411001)(50986999)(76176999)(54356999)(42186005)(92566002)(19580405001)(19580395003)(86362001)(575784001)(9686002)(6116002)(42882006)(53416004)(47776003)(69596002)(81166006)(6916009)(3846002)(2950100002)(586003)(68736007)(66066001)(2906002)(8676002)(81156014)(101416001)(105586002)(4326007)(106356001)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB1518;H:linuxheads99.altera.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;CY1PR03MB1518;23:wHi655/20VybY8KOZX5lnwv6r0d14rcExSRauArqH?= =?us-ascii?Q?7mwKEvAHmhunbCy8er95cXMfuY/ULF38wfQjZI8Y3xXSmv8UkGedLrrlpRuD?= =?us-ascii?Q?1td79BkiI5E++iUutWIBLKb5eUAUVl9KULbijOiMrHUXiz+/V0IqA5i3yO3s?= =?us-ascii?Q?BltJn/vsJOrv8jkTtA2mA/Uqz6yUlVhOXqXPuFeFzOdKrAO0zKpTZ75Sal1G?= =?us-ascii?Q?vMBrC7bWQCT6jnaLYi4sMO0Zx4Wo+zuBQpazVSw6hveVykDtXI4awDh9z9hi?= =?us-ascii?Q?qPuhh5WfQ2Plk6sj95dDePgPId/6g1zU4YL83cD9KQzbqjs+9/FNGNMIaamo?= =?us-ascii?Q?0epbKBNfHHc3em0aAe3kG78I0dS+VU2uEqkAPyx0eafMpSsUTiEi43/l8qqj?= =?us-ascii?Q?a2hkTJ5hrW7YvJ7ejnLkrnmayC7nCz3nOzpVlGF5pDIM2D4MUbkNYQrxH9YM?= =?us-ascii?Q?hRWH6vlnRvaiuVIIamdq9eMh6U9POKlHGKg/tea9OkLbCu/O0uiQ1yztuNLC?= =?us-ascii?Q?TgxPMWx8McWpdR2RdKrzYKUKZIFmW8ZVLCncR6hdiqzRIgnyV7+GQdpUgA0D?= =?us-ascii?Q?ODD/Q7nNNEy2SoD6h4QQBf9Q4/EroKzlD/jn3mZMtEDWQfi5FvDbwU5jAlkG?= =?us-ascii?Q?4r0PdgV3Vt3wrKWw/JH/WvMOLXv/LRaEcEk+EuhcQSvJqkSHcklgjVsjfCcq?= =?us-ascii?Q?DzDULazKHSbRThxYTIJE9olpad76mNw1Nhuzb7lmGCVgOmM2iWZKYsrHv7ve?= =?us-ascii?Q?uvsIKVl3hblMF+wm05NtfClt19vLXMnb8o0ri2zxJDsKiggnGCydx70YqEFm?= =?us-ascii?Q?Y821dgErPrPAyhRC4/0eQmfl+gIJ7tp0smNFdFR3flvuVq+hT66vfA6ZmrPQ?= =?us-ascii?Q?OaO9aGTmuCzLNr/1645i5msd7qXKwcoe2qLzwkDTR2PBxetR+zcYX5kJ/JJn?= =?us-ascii?Q?t7MJm7SN9XmzZ1chlakri0qy354rfF74kSxDI3e5gx8I7lJKIBEnzGhtODOQ?= =?us-ascii?Q?TVRByJw+JE3RDTtWa1MglZSz7sz5a4956T5e/WB9o1bPuSTKfEk/sL/9MC7E?= =?us-ascii?Q?I/lLC01qRN+VR+9yxB4sx7UgF638+36aNUbayGBVs36oeeALypuuqBUzDzkW?= =?us-ascii?Q?EgEcWt5PVzPCKTG5zU05JzPUlvhmrUmlgxygs5sh/8g9K1zD99Mq0UZ4urCR?= =?us-ascii?Q?POq52SJPyWo8+Ma0eoUqkncExmXJAmSbvlrmZ2FECQZKWVDgH8cFuawuNr6/?= =?us-ascii?Q?jNKu8Il/HmvHQtfCqWtRw+XWwW7i5yubnOPxbJt?= X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1518;6:dDjYHeIKVDglsEzK3gnsImryX2EQqus56JoeaQgm4e7A0Gy2fI03SCtcsdl41m91MpY7NHmNdFDIjyWoWbTm8XYNnWG5GOn6I7aJ+oCxpzZfD0L3h0/rZWoSxg8dOcaQj43h8jTPUSVCegNdOd1Q2WprRSI67eJDp4bUTl/lVFqb0sJ+ON6KqQyAXs0qD/MGJqyAeTALRfx6KH1JZfT/uYMueFxzHkgBZbzIv8Mkt+OhSLWqSkDZP04Af6dProkG38asW5x0OfztpY5/ZzXsgecp5GWjf8h8Icm+KtN8k5zaiKovq9aHZRZdPgtun1zXEtaJ/zR7JV910GgLqtX0vYbBVvSjkA/nfQElYcJbPWk=;5:JYXXi06j+LQ6uteD2S4tkL8Ttp5aSpsacSPuccVwkVVoSE62b+wdNFx9VaIgvFDg9s9LPQtF6KAzuCfW0WXKmIr8szO6ZNzKlG+WVD9mqIuEEFgEnqV41q9F8kSnnQ6xxtBzO8W8XTqmtMq7vzo3gg==;24:E/gY7s0Yu3RoYY3IeXfoPz31cBaCzw0IsqgYT+FIqCX++fumQ1mWoN9aT1ZhuSo4KdynwzTbKLKulLth7+ftB1FKlBLKNoPnTBZ9jBegEc8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1518;7:7Ag64AeaJiq1eWxZC5c6sbRm11EF7/kib5DLK8OnlbU8grL1zQf9BSfRSTaPHSh2nLWPksxYyDP37j4qOHZAEf2HPobdhxMv58iOjT8EwzYFJkzUQXhQtqJfm8dPMcdOeNh6rmb1Cw7/+MsVwfzcq6bAeH2huSLjdipW9Vm31I7sUzIyaW6W3YyahXh34TDzAfdCp40Jd/xB13abVn/PqeZaFSJhIR0yRBDDpW1kLlJ1jlVhnOph11fZNiJAhO2tXBCLiThBrKxx5XbihSxJRaUo3PpRk0RgeVzVjgORkaHCz8eHnh9e51c5DCQH9gjIdWFMqpTnOn+Wj25B27b/gaeya0divoiK0I6EjeP2giE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1518 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)(1109001)(1110001)(339900001)(199003)(24454002)(189002)(956001)(66066001)(4326007)(3720700001)(305945005)(8666005)(7846002)(6116002)(23726003)(19580405001)(9576002)(7736002)(3846002)(9686002)(8676002)(81156014)(81166006)(2906002)(68736007)(83506001)(1411001)(85426001)(47776003)(87936001)(92566002)(2950100002)(53416004)(42882006)(6916009)(189998001)(336002)(97736004)(50466002)(33716001)(19580395003)(50986999)(575784001)(6666003)(86362001)(106466001)(7416002)(86152002)(110136003)(4001350100001)(626004)(356003)(8936002)(77096005)(6070500001)(46406003)(586003)(5660300001)(76176999)(54356999)(105606002)(7099028)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0301MB1269;H:sj-itexedge04.altera.priv.altera.com;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:0;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD051;1:ZTbgpB2k2ASlhd5bE352Z12QnS2gQdKF6n5ADK2O1sfcXtUCUcDYK0PycgUMwq4PJJerNK0IvGY9w/0LSD0/SJqBk40oqTHmRFmB6T46A/dqH8gdtRQLHurlUn/MUG/+hfHKlXtUtqdzBiPkrNs7rkoo8E7j7sqsaHA/0L5MK0fzxLxnKrLotW6zbPQvnbz3HuR0ZZYhWp/ogYCR7T1bhJYroLxmAPysTYVD3P94GEWrgKi5SxB8CI2988qbIK6Kfku1WS/WA8mgehMSo4OgtgryKyg+JCnqNRKKYADGIW8gz43XwIXqI1ly9YMxWeLkBQFlzNtSi6Kcxy8GMp8pWysFP4BY9+DG7SzLN94kCOkYi0dAcSnNtxagJOHQXvoMqoumd9NVBkUU9celG2bvKIIYV7QpgsQraScZMp2u8HT7nk8BAVWu2F5ma1ron0yP5zl0bRMFtnS05DkM1ubszNYVXwNEBGw/w2WyGiJKCbxRBa2cvlH1hq2hstLjD+kJ9A7Wu1m1CCRUlcrVP6exUjUxkFkGBR4s0bXEHYVlXw4Lgu8AUjc6Dj5rQ1UNgAieTRSouvsdZtRWRzgWg31p4Q== X-MS-Exchange-Transport-CrossTenantHeadersStripped: BY2FFO11FD051.protection.gbl X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1269;2:pDKoNwt8xBJqsF0PiZ+iFEiwRO72iKKW2rW/pMmg92KqZvL5mAJZtTgeADXHP3ZVJ6uoJkcnRqNjjfK6mNyYe/b5rVZAXV5z/kZh2fsmD13zKbkXBGigr5H9DDjufXBgnRd/KqudKY5ZVUOKF2E5QmnuVG+yX0Zxd9Ts8fNoG3HrDTVrm2LfLAOBdTF1Fur0ouYrduskcAdXDPYPFumCNQ==;3:0lsrIEDTu5cn02jyOtYW0xaqrd69WdAr9MSYYvVVVspgoHc5wGPANn2a2g7dayUUxsQWnfB83ojPyNoRnSaGfzNmfL0Y6CMS8ABCAco1I0Md0LNMjqxv0HZXo+d16cpb4qg22TXQ1OOU3kl6MGjqbivKvjqm5QzRJdiTNQP1+3DFjkNiSjHaGILAO24go68Sa7aADRBocQNyPv/U4b+YUGONS8HzNI2k/xqHt6kckxn/Oqmi2hGuVMT59VoDg5Ptp9wDAwNO7VEOrGDOyxjF3Q==;25:EBDISUICoVvlIZ9gSY4ONrLOkNSaM45jjKwW0W/2KNBYATgOz9kv/KoQe97ubKO+yHBHPiIqIopHPLmgOMkWXS6CBzDOF/iz/MSqNrXPRv0uyfzLFhFUEj1vRXz/ljoMi6dtTB+1fRU5O+RRBfnC4j3t8fq7xajYF2eGuEd4jyWzCLUt4FTCrnihQ092LZnaVde9x37vl0IM07lPHvIqw1NPBCj6RH2PmEjfldvbC5D8SkfJoSIq9rhkv3WaTidlOcN5vfd4ulVzbOhVTyXj58FfCnJA8IEVP4i06gwVADhP6ZL5e3knjVM4ZuN+sx52XyI1vUSdYEW5iwnushNU/ew+j/xxtC2Jk6BFX4WgWE7DAW77fcqaWbP88vker2Jke+MK/5Qh+M9XrsQ5STrI5NdvIlYZ8/x+Bg0EkNUsJ9KIJaoUBCqOHh8LbUbdJNpe X-DkimResult-Test: Failed X-Microsoft-Antispam: UriScan:;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cCiorYtoisoL3Z9Tst98W+8PhCAdX3NF7PBMtwQ== X-Forefront-PRVS: 0091C8F1EB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0301MB1269;23:JvW42n/0KZV4szj8SVONkZ1niUOur0nLowxgsNr?= =?us-ascii?Q?BvSkoizoqKryKjCxtaPytGlR39PvaVdgujG/6zZ5BYyx59jAewWWJgVme9KO?= =?us-ascii?Q?12RgdDsLzdpd8KGIxDQPURCMlXlnwly+vpRqZ7TmfCv+pU2DfIW5ZQ79NbQm?= =?us-ascii?Q?IRYQvu/e7bnBVzlrzHK1lXrV6myE38ENvFduPAVUlGWaQ6NQ2MLy90VmR9C/?= =?us-ascii?Q?aMt8gKhz8uOP81n1pj3vAHNmQW5t1eGtdw/NiZPR9+tykuLxrZni/65iqRB6?= =?us-ascii?Q?E27IziO7DYwls/rGGTA7geWdpDF172Oqb8T7/Lt1LsRPxJUkR+MzFWIP9D6w?= =?us-ascii?Q?JN7s7SqYtTyzsX6lE5v53tf1aaK/L6/EQZXylA+WNNfiM3UmzI3uJsdWGV//?= =?us-ascii?Q?Y0jFaOkBNeqj29tkhrbDWgQ2iK+4FBTpQAJOGV3Yz+tUEO2vHMcYEYGf/z9v?= =?us-ascii?Q?VHHMyga3nG46WoUfRcVuvV0Su9MYyvsjTo+tQpm3BA0bau8T6s7+vsxa/LrX?= =?us-ascii?Q?QIeHnziNkQxP72RxAiw0AUyu7F72iDYlQejbFTgutlkbyNlesmS/imkCmoJt?= =?us-ascii?Q?gC9mMnJJSiVEvxhQfwDtGYP3/4Ohu+OJLEqpiP/iKFyFpKnHG8QlUwjcoF+Q?= =?us-ascii?Q?L1MtB45WjnQFrYaOo6CWKuD+C35JXThnvE8wODIuHDxAkNEAnS+WsN6lfUm9?= =?us-ascii?Q?AYrmmZ77/WkOCJrmbro1XGsqPQ9xAwzaTSD9ER3XiKzNp6BQUL9BSQLAtsF9?= =?us-ascii?Q?sLoHT6YPJTCVH2pwsjB80ZhCi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bKWFTPeBrx/PyPk9Hsgjj9Jua38CTHsvqOFAP/+Zn3mtgdj3aYggVLixN5w+h/RYpqvLGe3PiBvUrf1SUEinhCmZhf1x1T2Hs/bfR/PTRN8AQTnf4NJtvxBuyQwY3wVdRJ0McOh/ePSvyFRVmBl/CtkSa4m2x/5xKNOySC1Dpeu3NNpz+7a0ZIfYFZnlWjIo+o+Wa6mFwzoPu6kWz5ZsbK+Q+5gAVqProiUiTh9qj1BQp1R6VSAy0g=;5:l+FEVgoUM4lssoBb0UQ/X5MjBLI7t1BdDswooY3mMW414OhfJ5PvfRO9H2lRDQ4XyIUzDv6nKq1GYwvWaPm9sJzYLrFBVvQXM5tY9HqtUVjv/9lzmIcw31kzuT1DLCWXNZ46JpCTx+3fMm4vpu0008qV1G1T72mrYaSj036W4ok=;24:JWRq/a0GXmeAwE4aPjfHQiqHUVWnPoJRIOUc9SKYcYCx9Wgl66YzknZwAhWVVj9HgtMiADXCXxnHAnQbgrq2zak8aEpIdhdCnR9s61hDkxI= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1269;7:RnD9cWfl+WB8VqKVLaOS/hmAaDxuuHkTqNXOlFOCRITqjwYfprqGCtX4/WPgMYvehEfGLSbt8AVBQLo8dxki9+Bshcx0X2gehEFf7+fUTg3CutgvPYQedas9e4setronWemNiAVn01odkkeakGKiJAIgv5CCyHZCyJne67BSH1EhuFhOdG1h7CXekl+oOpNlbMLCJYNI59NPGw0LfyDPx/8ConcGYpUTlovf9qHAFY9s+cH3d24libCkKHbH0U33nrXjYaZ6i6VGLT6meTuJqpO5KiH72dYUP6IBuxBZ9qtfH96QVSz+ke8RU61nHJopwjIEySmRZVbq0BKrUUBlJg== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2016 18:29:44.7046 (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: BY1PR0301MB1269 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7877 Lines: 282 On Thu, 6 Oct 2016, Joshua Clayton wrote: > cyclonespi loads fpga firmware over spi, using the "passive serial" > interface on Altera Cyclone FPGAS. > > one of the simpler ways to set up an fpga at runtime. > The signal interface is close to unidirectional spi with lsb first. > > Signed-off-by: Joshua Clayton > --- > drivers/fpga/Kconfig | 6 ++ > drivers/fpga/Makefile | 1 + > drivers/fpga/cyclonespi.c | 173 ++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 180 insertions(+) > create mode 100644 drivers/fpga/cyclonespi.c > > diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig > index cd84934..ccad5b1 100644 > --- a/drivers/fpga/Kconfig > +++ b/drivers/fpga/Kconfig > @@ -13,6 +13,12 @@ config FPGA > Hi Joshua, This looks really good. Mostly minor comments. > if FPGA > > +config FPGA_MGR_CYCLONE_SPI Suggestions here and below to keep PS in the name of things. Such as FPGA_MGR_CYCLONE_PS_SPI. > + tristate "Altera Cyclone V SPI" "Altera Cyclone V Passive Serial over SPI" ? > + depends on SPI > + help > + FPGA manager driver support for Altera Cyclone V over SPI > + > config FPGA_MGR_SOCFPGA > tristate "Altera SOCFPGA FPGA Manager" > depends on ARCH_SOCFPGA > diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile > index 8d83fc6..c03f40de 100644 > --- a/drivers/fpga/Makefile > +++ b/drivers/fpga/Makefile > @@ -6,5 +6,6 @@ > obj-$(CONFIG_FPGA) += fpga-mgr.o > > # FPGA Manager Drivers > +obj-$(CONFIG_FPGA_MGR_CYCLONE_SPI) += cyclonespi.o cyclone-ps-spi.o and change name of c file. > obj-$(CONFIG_FPGA_MGR_SOCFPGA) += socfpga.o > obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA) += zynq-fpga.o > diff --git a/drivers/fpga/cyclonespi.c b/drivers/fpga/cyclonespi.c > new file mode 100644 > index 0000000..1ffa67c > --- /dev/null > +++ b/drivers/fpga/cyclonespi.c > @@ -0,0 +1,173 @@ > +/** > + * Copyright (c) 2015 United Western Technologies, Corporation > + * > + * Joshua Clayton > + * > + * Manage Altera fpga firmware that is loaded over spi. > + * Firmware must be in binary "rbf" format. > + * Works on Cyclone V. Should work on cyclone series. > + * May work on other Altera fpgas. > + * > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +MODULE_LICENSE("GPL"); > +MODULE_AUTHOR("Joshua Clayton "); > +MODULE_DESCRIPTION("Module to load Altera FPGA firmware over spi"); Please move these 3 MODULE_* lines to the bottom of this file. > + > +struct cyclonespi_conf { > + struct gpio_desc *reset; > + struct gpio_desc *status; > + struct spi_device *spi; > +}; > + > +static const struct of_device_id of_ef_match[] = { > + { .compatible = "altr,cyclonespi-fpga-mgr", }, > + {} > +}; > +MODULE_DEVICE_TABLE(of, of_ef_match); > + > +static enum fpga_mgr_states cyclonespi_state(struct fpga_manager *mgr) > +{ > + return mgr->state; fpga-mgr.c's fpga_mgr_register() reads the initial state from this function. Please return one of the values of enum fpga_mgr_states here. If state isn't known, then use FPGA_MGR_STATE_UNKNOWN. > +} > + > +static inline u32 revbit8x4(u32 n) > +{ > + n = ((n & 0xF0F0F0F0UL) >> 4) | ((n & 0x0F0F0F0FUL) << 4); > + n = ((n & 0xCCCCCCCCUL) >> 2) | ((n & 0x33333333UL) << 2); > + n = ((n & 0xAAAAAAAAUL) >> 1) | ((n & 0x55555555UL) << 1); > + return n; > +} > + > +static int cyclonespi_write_init(struct fpga_manager *mgr, u32 flags, > + const char *buf, size_t count) > +{ > + struct cyclonespi_conf *conf = (struct cyclonespi_conf *)mgr->priv; > + u32 *fw32 = (u32 *)buf; > + const u32 *fw_end = (u32 *)(buf + count); > + > + if (flags & FPGA_MGR_PARTIAL_RECONFIG) { > + dev_err(&mgr->dev, "Partial reconfiguration not supported.\n"); > + return -EINVAL; > + } > + > + gpiod_set_value(conf->reset, 0); > + udelay(50); Moritz brought up whether the delay/sleep values should be configurable. It looks like these are set values and have probably been increased for good measure. These could be macros named to contain symbol names in the datasheet's PS timing waveform, if that is where these are coming from. The timing diagram has the Tcf2st0 as 800nSec max and Tcf2st1 (below) as 40uSec. I guess either we are looking at different specs or you just found that you got better results if you padded the values out? I would normally suggest a convention of macro names that maps neatly to the value names in the datasheet such as CYCLONE_PS_TCF2ST0_USEC. The problem is the units. > + if (gpiod_get_value(conf->status) == 1) { > + dev_err(&mgr->dev, "Status pin should be low.\n"); > + return -EIO; > + } > + > + gpiod_set_value(conf->reset, 1); > + msleep(1); CYCLONE_PS_TCF2ST1_USEC? I'm not sure what to suggest because the units in the timing diagram I'm looking at are nanoseconds but this ended up being a mSec. > + if (gpiod_get_value(conf->status) == 0) { > + dev_err(&mgr->dev, "Status pin not ready.\n"); > + return -EIO; > + } > + > + /* set buffer to lsb first */ > + while (fw32 < fw_end) { > + *fw32 = revbit8x4(*fw32); > + fw32++; > + } > + > + return 0; > +} > + > +static int cyclonespi_write(struct fpga_manager *mgr, const char *buf, > + size_t count) Please fix checkpatch.pl warnings. Here and a few other places it says "CHECK: Alignment should match open parenthesis" > +{ > + struct cyclonespi_conf *conf = (struct cyclonespi_conf *)mgr->priv; > + const char *fw_data = buf; > + const char *fw_data_end = fw_data + count; > + > + while (fw_data < fw_data_end) { > + int ret; > + int stride = fw_data_end - fw_data; > + > + if (stride > SZ_4K) > + stride = SZ_4K; > + > + ret = spi_write(conf->spi, fw_data, stride); > + if (ret) { > + dev_err(&mgr->dev, "spi error in firmware write: %d\n", > + ret); > + return ret; > + } > + fw_data += stride; > + } > + > + return 0; > +} > + > +static int cyclonespi_write_complete(struct fpga_manager *mgr, u32 flags) > +{ > + struct cyclonespi_conf *conf = (struct cyclonespi_conf *)mgr->priv; > + > + if (gpiod_get_value(conf->status) == 0) { > + dev_err(&mgr->dev, "Error during configuration.\n"); > + return -EIO; > + } Does your hardware give you access to the CONF_DONE pin? If so, can you get better status info from that? > + > + return 0; > +} > + > +static const struct fpga_manager_ops cyclonespi_ops = { > + .state = cyclonespi_state, > + .write_init = cyclonespi_write_init, > + .write = cyclonespi_write, > + .write_complete = cyclonespi_write_complete, > +}; > + > +static int cyclonespi_probe(struct spi_device *spi) > +{ > + struct cyclonespi_conf *conf = devm_kzalloc(&spi->dev, sizeof(*conf), > + GFP_KERNEL); > + > + if (!conf) > + return -ENOMEM; > + > + conf->spi = spi; > + conf->reset = devm_gpiod_get(&spi->dev, "reset", GPIOD_OUT_LOW); > + if (IS_ERR(conf->reset)) { > + dev_err(&spi->dev, "Failed to get reset gpio: %ld\n", > + PTR_ERR(conf->reset)); > + return PTR_ERR(conf->reset); > + } > + > + conf->status = devm_gpiod_get(&spi->dev, "status", GPIOD_IN); > + if (IS_ERR(conf->status)) { > + dev_err(&spi->dev, "Failed to get status gpio: %ld\n", > + PTR_ERR(conf->status)); > + return PTR_ERR(conf->status); > + } > + > + return fpga_mgr_register(&spi->dev, "Altera SPI FPGA Manager", > + &cyclonespi_ops, conf); > +} > + > +static int cyclonespi_remove(struct spi_device *spi) > +{ > + fpga_mgr_unregister(&spi->dev); > + > + return 0; > +} > + > +static struct spi_driver cyclonespi_driver = { > + .driver = { > + .name = "cyclonespi", > + .owner = THIS_MODULE, > + .of_match_table = of_match_ptr(of_ef_match), > + }, > + .probe = cyclonespi_probe, > + .remove = cyclonespi_remove, > +}; > + > +module_spi_driver(cyclonespi_driver) > -- > 2.7.4 > >