Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935887AbcJQQLA (ORCPT ); Mon, 17 Oct 2016 12:11:00 -0400 Received: from mail-bl2nam02on0086.outbound.protection.outlook.com ([104.47.38.86]:14272 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935723AbcJQQKN (ORCPT ); Mon, 17 Oct 2016 12:10:13 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; vger.kernel.org; dkim=pass (signature was verified) header.d=altera.onmicrosoft.com;vger.kernel.org; dmarc=none action=none header.from=opensource.altera.com; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=atull@opensource.altera.com; From: Alan Tull To: Rob Herring CC: Frank Rowand , Mark Rutland , Greg Kroah-Hartman , Moritz Fischer , Ian Campbell , Jon Masters , Michal Simek , Jonathan Corbet , "Cyril Chemparathy" , Matthew Gerlach , Dinh Nguyen , , , , , , Alan Tull , Matthew Gerlach Subject: [PATCH v20 08/10] ARM: socfpga: fpga bridge driver support Date: Mon, 17 Oct 2016 11:09:39 -0500 Message-ID: <20161017160941.4205-9-atull@opensource.altera.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161017160941.4205-1-atull@opensource.altera.com> References: <20161017160941.4205-1-atull@opensource.altera.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BLUPR16CA0005.namprd16.prod.outlook.com (10.164.14.15) To BN3PR03MB1512.namprd03.prod.outlook.com (10.163.35.150) X-MS-Office365-Filtering-Correlation-Id: 90466f3b-7a1e-4b20-4e4b-08d3f6a81050 X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1512;2:Fk1dpU8FV5AIWVEAKpkL8JBb44EA81yCZJ9jFYinuK8JtwI9rLgmfOM4rWSrmkLhJsOG7g1Z8MBnzYaMOdzR2I+zfb21uj75mDzBiyR93qyV5iTUQ283t/A2rRXYyeByiDpJGz+dmZorVvTfC4yKABjTkd37sz5RQPp+CitnFt5sCT9lC1O91UtSuz/f/Y7F8j6+Fa34dQN8MYcmpYtCEA==;3:MurVUdYc+SNjCVo8Zh7vF7fGk5w1xbRzTPX9N9B2zC5wsF05cV2p8stVdBwk8xlkfHZmAcrh47lIoOm0wjBP4y5AdzEiE9Qow6j6hE7UAARFT6FqmPQIkMD2sJ2ZPz1bDBYOugZ2JUYNUqQCdFGbXA==;25:9RnekyQjDoqr/XCTtza7036Yk1XtS0dEYKu/XnWyrf5qMhxb0aWeWI1g3fqD3lkj4u1JGLhZdJ2Mrd8bkbEAR0+Oj2nstKo9KQNnR7w8gObjWr6AC0FmLc9d5mmn9RDx1wGwbyoKd3gt6qak4Ehi9Na3tthYtBsAXbeuQpyNbaFHyCcWKl3kDTQy1bBbkk2ylzGDlBcYtH1FmAUFZMCuVpvWv3PZukIpHer5JNi967tHPIxnpi/h1XzW8ZnrTPQrP7kNRCNP0qVqEts/4fC0mzz+dB+1hyOUQD1RsCTx0mtDulh9Yd0q3fEAHIFu/9IF0BZMyLI9O6k242KWBT2ldm7SimBAi4z3LbAh9lMk0MmF7ptp2Pa8xrNIsftYu/F19JNYaCLNGO/qWB7IW3Pn1IRMEwPnNwSfnVh01O8AQmHhn7M0G31Pht8i2VbWtdPqOMjgH8c79LsAlFIVSBQHJA== X-Microsoft-Antispam-Untrusted: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1512; X-LD-Processed: fbd72e03-d4a5-4110-adce-614d51f2077a,ExtAddr X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1512;31:zhIewNUZswAOBELFtrvNNPp5GalKrz2De1C3g3hogkcvQKmnYhW4SwqDA924lgM0aZIp/5FhEktZJqT/rQ5Tkk1P5d7NEnkdQSiyKe1AgcjWMITi3gkmveDJGyyD+VC81sW1u86Z5TYVgo3FRwCypRZ4TVePwugwdehL/9z48De/FxRZdC4kWCJs+HejAY/XV1BWzBy895X623ZCiGbnulFrfmLHOi1bNUjb4LBTN7JfkiKDQg39qeWOXEUlQucM3DbaSiJ6YUkosoOlSgEfFuhI8M0/WvfV6PGilmDwzyU=;20:KwXkurSUIsQ8Z+stvcF5Y5QWhFU9jmYAL9uBwUU/1IoS9VnXKykVtPB8JI5CdZxFfw8ajbnMvYYV8hzGKKxnTEpBrYXZMyEIXYfn12lCqdA7h6os5iZADeOP1gUC1UMA4GMjSV7ozhMT+tn4dQ7JaafKYvDGoR/mxgccMwJRoNE= 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)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:BN3PR03MB1512;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1512;BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(13015025)(13024025)(13018025)(13023025)(13017025)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:BY1PR03MB1371;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1371; X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1512;4:nr6ALgClkZp5HroINZdzue2K2y1XlcsyzdaG37bQHfvgvO9l8hZvsbeySgc1RP6Ppc/DoODok8fHlOzMDf7zVb0aTRgasue2eIte4N8gwG74gRNLz5IPGXTLiG8Xynp955aa3QT/dlVdbRghBogYqT4n0qZR2YI1OrdmKlJIO+YqqaiLvCtKhMGFV3Q0qKEGkAoG1cW+HdcCXRIf595Le2AXPtjwk6tXlfanLnEKo7Q52mosZ1l7VGcp1qa4chS/M+//crI9Np01i6Zu35MwR/BF7RgrmScsfS4aj633wJJuMmdC/ZE1OeIP0MAGI6IqPC4nBJwFBzrxcyPwJOW1mJw+EbJarLEtjrNNXm9WCurTQOygy4QXv6O2RwrVNVaT4Ct5gUYmox4rChq72Zs4IqwwnVQa3Fu57siwjgY72sTrAD4Z12/RlFENEqrKVyhIcSOEZrgM03oaXJr0K45dzlrJ9SE8hRDZjxOuNiBlt5++5FO/nhhaEl9lFdfqEtPY6AkSClDAIqvNKHZNcA1f+pD+67Z77byAgdT5xV36ZoY= X-Forefront-PRVS: 0098BA6C6C X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(4326007)(8666005)(5660300001)(53416004)(8676002)(48376002)(50466002)(86362001)(575784001)(110136003)(42186005)(50226002)(50986999)(76176999)(4001430100002)(101416001)(33646002)(6666003)(2950100002)(42882006)(5003940100001)(229853001)(15975445007)(106356001)(77096005)(68736007)(66066001)(97736004)(7846002)(107886002)(7416002)(189998001)(7736002)(47776003)(92566002)(105586002)(586003)(6116002)(19580405001)(19580395003)(2906002)(81166006)(305945005)(1076002)(69596002)(3846002)(81156014)(7059030)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR03MB1512;H:linuxheads99.altera.com;FPR:;SPF:None;PTR:InfoNoRecords;A:0;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;BN3PR03MB1512;23:P36d1dhx9uaGz03vI8oQQi7nVbXhtELpYCI7WiXGG?= =?us-ascii?Q?ofC+VG64MFePNtt/2OoJJjf9KYY+wJu0J2vZ7H8HVIPZbxLNa18iyTcuxF+Q?= =?us-ascii?Q?kddzigk4htl/vv8S4VSBfKB0rpEWfhDFrTHzlkheWI0YiDO0g41BTEdocx2b?= =?us-ascii?Q?SgHHKWyn/i0qpPMmqfarg1mi1KrvPUthTkqnSUnjIhnHvDbOYm5NJ2v1LNdc?= =?us-ascii?Q?be+m4IJPbznKwse+zwIInCVmQ7RD6yn07GWjuFrBesoUnZ8sapYHcIDUa5PZ?= =?us-ascii?Q?7+IAVanpFgSipvYCwWhm2hUzlR8reo0M7VGMay4AnpOAB+Vt6aUT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+sdKU0xMA6ZsYqC3YxlWUsYI0rMT5KO9eteAVrVTDGRyta+ir+?= =?us-ascii?Q?JgO337cDNPPlub31fXS+AyvALOLxr3gM9ilFbMUi5oqcAiDI6Md0NJ4CD5Ns?= =?us-ascii?B?UT09?= X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1512;6:/2wzS6Np7XQhWH1yEbMptvQcvYfZyGGkxZZ0boWeIeAk8VCAT2aR03B+AXBKOjDx36iClPjLb5AqWEnN0cfduVa2AkbKI1nQVQlkNZ82jQlXI607/cIn3vGgf9OkI5cuyd5XPcksKIcSQy+K57Os3v/RxT3vmHZ5Xlr6FpzXd97aMUZBil2ZHeTKSMgBA7MIFv3NkaEtZSBK6svExM2G12pA7jAwNoyjvMeDff+5mo/j1l9m2MR4kAODQd/Ho9sLqk/zrs18NjfoquaeNVLfmT6Pm5pkb2u5wEvMH9vKW2zTkYgKUkdBscmb5/VqZTVzU62kpG8vLYwN/HuHsTcWmpLQwf1CA9UbsBd+UoJA1tU=;5:zXrEeFk39Swk/2dJO9WX3mqK67hBa6OnyAJf59B910S9o5JrPTE5og4P2B5hzmiGYMw2vuikt3WnsPY9BelC07SZTvo1Emu7xdqpO2e8bb/py7CD740f7RsrS6J83Q4fmYZ1bjdVKoVr/06T1PwvWA==;24:L3h4c2G2L5WxLZTpDV8GV3zxqvnJ9OyxT92ejFLjYYpWQBM9540dMcm/2OgeRb14YXohKM+iTx/np+vAYhjVhKoSle7MBOR23VflcUxS3mU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1512;7:YK03Nn9ZXShVjrfzuJIBt1vlyulQg4J8JwMcgnKMrFpkqRXezRqgtbvXPz6CIdHryZ2ExVfFm56moNnjo9IUFVu+8AWL9LxFZh7//z8fExkK2FKfGw40HxU1R4iyLGGL3LbVgKhqErQ17LeM4XiRtcSVE68tDIxVPyY62zJFu6JcfMjOy3AcMDFR65c/sP978B4esOyqhH/qhCQsbFwlPWXOX9ulbXV2qjFK0bg/1Iozm8k6gYKjc8RPJXaIIxWWQLcBv6jBpcy7A//EfAhEvhIXQEV7AMeXIP+5mWirSgeWy+s5vrdNMRjevOh+wDnxy9kpNePO3G6tHoRg/2PLXelyec8XUG3/EjS/q8/+4/U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1512 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)(189002)(199003)(4001430100002)(85426001)(6070500001)(97736004)(305945005)(7736002)(33646002)(76176999)(336002)(110136003)(105606002)(956001)(19580395003)(19580405001)(7416002)(53416004)(5660300001)(626004)(5003940100001)(11100500001)(66066001)(47776003)(2950100002)(42882006)(2906002)(6666003)(15975445007)(4326007)(77096005)(92566002)(586003)(1076002)(6116002)(3846002)(106466001)(229853001)(50986999)(81156014)(8676002)(81166006)(7846002)(8666005)(189998001)(8936002)(356003)(50226002)(48376002)(68736007)(3720700001)(107886002)(87936001)(575784001)(86362001)(50466002)(7099028)(7059030)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR03MB1371;H:sj-itexedge04.altera.priv.altera.com;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD027;1:7BVSTNlAH9p0APNILQtscglUmzPqeOZWNRe4yp3hBLHkaVkUzZWfn6IHXhB/Rbs04Mw14mHdd/AOJa/zvX2n+snEfCyfSqXQLTO0hmDKydcknpuSm9MLRRRiD0slT/3O41QYyjcvDh3M5Nq002ZgCJHtuIXlWqgBGXGwQqqWsfH90wS0TVYlhkDX0gUGkhc8gUXBm93TbtFRDNu6ximIzdmx/d2eCNQW7BHgCyijpU8h2lebyxMaVKnsTMaaNkH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G/3QdwCnYFv3SJ4RySaKR9v2AJcizIpV9kavaTGWtwjNPNIeTtb1Pdy0SBL7b+aTWQI6fs5O4UPLXNqrIU8SRqtcmrGc7Tjcq+H822w1j5EFs1lItc1ZY7i7pjTd/brp4AB7yI7bn40f9pYht1T3g96fwqq2vnC1QEkr1jvWFVM1SPiT8ITDNUpPk4QS4sRi/g0XyIbAsuNNqxVFimaTjVD4yOudAJ1rvsWonul3sJriKcZ6+edPtrWfcG9kxI8kCY60ace5W4WmmDXcbWs1/Irdfm+/PFF8Ac1EKRr9UV6gS06mcpdcW/wmxev2agh7LV9Wn/SO/TD3z8ubAGr+rfNKEGilsd2Y0svz2c0MrG2CvCp/OMSVPJCg== X-DkimResult-Test: Passed X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(3001016);SRVR:BY1PR03MB1371; X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1371;31:IMEl0Mh0rBZJzgdVVfvfQyLqzOdl5ZSVLPehlh8lUl8f9DbMsqSv2A3r2tC6ONRBa2FBiJAyMc7JBgQMrFpMa9RuFaJ4jdOgBDDJexrvXPKXCozi45h/AqI7g41i6J0MEsR0OdEBp0td4zKEtAjgV+Z/qW36IdLLKNXMOrvc5b+a2xT5lMpjyNMSBt1As5iYQM7FEkm6NfYmnGD5qqa1IUqACDexWcGEWBXG8mGNek9wycRkVrVULlWitWGFbSgBvtdkkDyG4vHojVfSE5nDxA==;20:q5Ug51PhbhrRuhsvvWKxXEWsxL6x78o/mi064Nve7i3HlPbt/uBO5RvLZ9TBqc3tHq4Dsq5G+NulD1+8c3bZUL30zzCK6NBvuA4O976juwvcjHSkiiXz6ezV6rAev64DGC5nD8z8wzNJw2ls3N15ArRzpi6+HYlwp69TEj1mV28= X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1371;4:9qWoXdSLllCZpkpBd3fXX63yWrHzeNLbegMbLEQv39N80Yu7vyswFZfLqpQ9D/8DAaiAqXj4UlIbc/KdFMp4PFY0Dg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ybWPLdMSScJLE+pH4e9ii7Y0MnVSIb?= =?us-ascii?Q?XmRechAqUts3MYm96q6VFE1XpA/tWsdWDTef4QY6mIJgCOB59lr+siOJW02e?= =?us-ascii?Q?rt5nIfKj+Lmi1VhySasrZMFHTzIuMMx81kuJujSETRHLrI4NIYPxjdF103LE?= =?us-ascii?Q?dGgAy+FV+RR0d7mj4aXYc3u4ydi5cEe2RYxLTQtGgJt7yx3bhW7ra1IMgIrO?= =?us-ascii?Q?SWCl9J8fy0XOuypVemNFQK0FAjMJsVUNWp3DI3xtWoSaupAlI4ZK5kPbGSGC?= =?us-ascii?Q?K5cIWLdo2mQJxmGLI2vKluM3cavFrnQnanSIK9CUZxIBLQAL4ts6IKCQsW8u?= =?us-ascii?Q?7ZrnYSgIuaAnJi4vTM2aH3eNxaUQKQ+slPU+7nUWbGRD6KhjkXCHpgIikUFQ?= =?us-ascii?Q?lPxZC0RYuivFMumEAiN2c/cqdOFl1uttaYf3OGy3m3L1A48gcgl+x/SUQ2JM?= =?us-ascii?Q?AUzCvw+iCkYKHIdzVfP4li7LeUe/OdV/CxG689jyo8OXGqshLUaoqX0egqmd?= =?us-ascii?Q?1+kTF8UOl57AbNkqcI7i0g+pHjXZTWuwdxLo4zMkmKL9pkQas42D8m/RANrK?= =?us-ascii?Q?54vaw6x204rbL9M/qZXMh7CsExkPwwCZip54z9ZL+I4jQMc1oIsupsLpkFwa?= =?us-ascii?Q?UupkYhxB2S+QkBNV/j4bbxKVvIt42v8PvF9WWwtNn9c7Mn/P5uyQePvaTq6E?= =?us-ascii?Q?Dej58y32a+JmGdycSkml+2BhPhGUcsicPKecEooXnjHH6wUMT3QtXsHdrjLb?= =?us-ascii?Q?uASLK5KTL0dgg0nwSuqIlnE8aKN900+ojS+YnYloJhDns6Asiri7449zGOio?= =?us-ascii?Q?NilDKzyzNEA55GzNxqoHsBpkgCwLn7X8bxcZNL8EwCkvapsza43Sg1rFSOgT?= =?us-ascii?Q?Ka5dG+ThOKj+eNwfng7wHHSefIpKqyChiHf3luUGYGjEQzI541r0NOJ1bus3?= =?us-ascii?Q?JrAuPkxmdPbU+E+eqNME07uw2tgHy78tsiPKOaZzLpTl5vezWqxg8L8PJs56?= =?us-ascii?Q?IyzolF7temQJ4D1PXftGbepuLkGT11DN2hTLYRr8HoFIiKm2XZSFMURW9mPe?= =?us-ascii?Q?36i2hbXpw4V/OytcgVZLGi8U9nCZHQWR2nqHV9vDeTGNd3LlhFpxN37GJwYU?= =?us-ascii?Q?npqPBp9eLZHddmHkT3B5pnf0o8jERBYW0U=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1371;6:qgqFamaEjqMmmW1ddVwY4cOB+fywakWQYeMOafOsdfHbGhpOhoHG2FTei3i9qN4LPAe3uB8w9kQCBSTOH9bJZ74nAS2xNJI5Htu2BA/cZF6nxGpzK/GnFRQfnYxErjGAO/ufAhfewCWNlAXJFp9Wg2NCRiStw7eOIHqVu4lurkHdHPunQjPCYfpWCVRjKGfycFvLQSglqGW9dXTmq2cbraNYc9lmntRLd0JLySCaTGtTpJpP4oU+spNVm6SAwpi4MNWMJtMWDsQGdIQtme/yJT1ouyr/9QSguwvlogynPQx8PKDoscTh2UdR1m/WsAxJfSynwZwpkKDr8xDWPQX8YvSraPhOqroOVgNPN+S0vNQ=;5:kvWQfvtGGt71VRrlfL9Ire1BRszUVnsFoLT9zmud2ACOX/wLepv5I8+LjuNllFW8IGwBMRlSzbp1p7E+03zP1DIYcMxyGqMuxknhj7Djcz4teDDZWjbFixW3dGt88gmRCgdHrDcX436EnVhzMh8jRw==;24:l68JAIvseNv6NHu/jTfeBp738GwQX1QFt1cu7RVR/N1GnEDkUUYw28sGwfMWsq7kYQW1D93cpzJlFxCtiadxfNJygqJNfBhcYGKZ30WXebE= X-Microsoft-Exchange-Diagnostics: 1;BY1PR03MB1371;7:ynGIFe2DROT9pw+D7Fn13jqjR0YpA5CGigZquJGIvZVt4UY1gB/7FPANXIPPpnnRIwochPtoc7SO5TRbmWn9+RGCTIIWC+AtUeLsZsBzfVw3q/Z+wl3cwZzrOKC5IP8p1A+35g9RvQMjp5vLoegSZGjH3GR9vVKBvRqbQ81g3Q9rot8HHTxkBSdf9xg+ei9Tcdnj8hyr9aZAUQo0SXmROGA+5qlvrc2aeAb1keyQGmQwop0UI1wdnMzN5IRacVCZSE6umRWZ7l66575i5N4Un2NOpgBaSWONgVThUQwQg6xLJXlk3XvxcTArXNeXKp9PSPTfx/SF9CdnXVl8gU3meg== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2016 16:10:07.3172 (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: BY1PR03MB1371 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 15702 Lines: 501 Supports Altera SOCFPGA bridges: * fpga2sdram * fpga2hps * hps2fpga * lwhps2fpga Allows enabling/disabling the bridges through the FPGA Bridge Framework API functions. The fpga2sdram driver only supports enabling and disabling of the ports that been configured early on. This is due to a hardware limitation where the read, write, and command ports on the fpga2sdram bridge can only be reconfigured while there are no transactions to the sdram, i.e. when running out of OCRAM before the kernel boots. Device tree property 'init-val' configures the driver to enable or disable the bridge during probe. If the property does not exist, the driver will leave the bridge in its current state. Signed-off-by: Alan Tull Signed-off-by: Matthew Gerlach Signed-off-by: Dinh Nguyen --- v2: Use resets instead of directly writing reset registers v12: Bump version to align with simple-fpga-bus version Get rid of the sysfs interface fpga2sdram: get configuration stored in handoff register v13: Remove unneeded WARN_ON Change property from init-val to bridge-enable Checkpatch cleanup Fix email address v14: use module_platform_driver remove unused struct field and some #defines don't really need exclamation points on error msgs *const* struct fpga_bridge_ops v15: No change in this patch for v15 of this patch set v16: No change in this patch for v16 of this patch set v17: No change to this patch for v17 of this patch set v18: Eliminate need to specify reset names since only one reset v19: Set bridge state before registering driver with framework Include fix for drivers sharing the l3_remap_value reg use devm_clk_get make tristate in Kconfig documentation of handoff registers v20: No change for this patch in v20 of patchset --- drivers/fpga/Kconfig | 7 ++ drivers/fpga/Makefile | 1 + drivers/fpga/altera-fpga2sdram.c | 180 +++++++++++++++++++++++++++++++ drivers/fpga/altera-hps2fpga.c | 221 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 409 insertions(+) create mode 100644 drivers/fpga/altera-fpga2sdram.c create mode 100644 drivers/fpga/altera-hps2fpga.c diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig index e0e1257..5605ad6 100644 --- a/drivers/fpga/Kconfig +++ b/drivers/fpga/Kconfig @@ -40,6 +40,13 @@ config FPGA_BRIDGE Say Y here if you want to support bridges connected between host processors and FPGAs or between FPGAs. +config SOCFPGA_FPGA_BRIDGE + tristate "Altera SoCFPGA FPGA Bridges" + depends on ARCH_SOCFPGA && FPGA_BRIDGE + help + Say Y to enable drivers for FPGA bridges for Altera SOCFPGA + devices. + endif # FPGA endmenu diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile index 8d746c3..e658436 100644 --- a/drivers/fpga/Makefile +++ b/drivers/fpga/Makefile @@ -11,6 +11,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 # High Level Interfaces obj-$(CONFIG_FPGA_REGION) += fpga-region.o diff --git a/drivers/fpga/altera-fpga2sdram.c b/drivers/fpga/altera-fpga2sdram.c new file mode 100644 index 0000000..7ab358e --- /dev/null +++ b/drivers/fpga/altera-fpga2sdram.c @@ -0,0 +1,180 @@ +/* + * FPGA to SDRAM Bridge Driver for Altera SoCFPGA Devices + * + * Copyright (C) 2013-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 . + */ + +/* + * This driver manages a bridge between an FPGA and the SDRAM used by the ARM + * host processor system (HPS). + * + * The bridge contains 4 read ports, 4 write ports, and 6 command ports. + * Reconfiguring these ports requires that no SDRAM transactions occur during + * reconfiguration. The code reconfiguring the ports cannot run out of SDRAM + * nor can the FPGA access the SDRAM during reconfiguration. This driver does + * not support reconfiguring the ports. The ports are configured by code + * running out of on chip ram before Linux is started and the configuration + * is passed in a handoff register in the system manager. + * + * This driver supports enabling and disabling of the configured ports, which + * allows for safe reprogramming of the FPGA, assuming that the new FPGA image + * uses the same port configuration. Bridges must be disabled before + * reprogramming the FPGA and re-enabled after the FPGA has been programmed. + */ + +#include +#include +#include +#include +#include +#include + +#define ALT_SDR_CTL_FPGAPORTRST_OFST 0x80 +#define ALT_SDR_CTL_FPGAPORTRST_PORTRSTN_MSK 0x00003fff +#define ALT_SDR_CTL_FPGAPORTRST_RD_SHIFT 0 +#define ALT_SDR_CTL_FPGAPORTRST_WR_SHIFT 4 +#define ALT_SDR_CTL_FPGAPORTRST_CTRL_SHIFT 8 + +/* + * From the Cyclone V HPS Memory Map document: + * These registers are used to store handoff information between the + * preloader and the OS. These 8 registers can be used to store any + * information. The contents of these registers have no impact on + * the state of the HPS hardware. + */ +#define SYSMGR_ISWGRP_HANDOFF3 (0x8C) + +#define F2S_BRIDGE_NAME "fpga2sdram" + +struct alt_fpga2sdram_data { + struct device *dev; + struct regmap *sdrctl; + int mask; +}; + +static int alt_fpga2sdram_enable_show(struct fpga_bridge *bridge) +{ + struct alt_fpga2sdram_data *priv = bridge->priv; + int value; + + regmap_read(priv->sdrctl, ALT_SDR_CTL_FPGAPORTRST_OFST, &value); + + return (value & priv->mask) == priv->mask; +} + +static inline int _alt_fpga2sdram_enable_set(struct alt_fpga2sdram_data *priv, + bool enable) +{ + return regmap_update_bits(priv->sdrctl, ALT_SDR_CTL_FPGAPORTRST_OFST, + priv->mask, enable ? priv->mask : 0); +} + +static int alt_fpga2sdram_enable_set(struct fpga_bridge *bridge, bool enable) +{ + return _alt_fpga2sdram_enable_set(bridge->priv, enable); +} + +struct prop_map { + char *prop_name; + u32 *prop_value; + u32 prop_max; +}; + +static const struct fpga_bridge_ops altera_fpga2sdram_br_ops = { + .enable_set = alt_fpga2sdram_enable_set, + .enable_show = alt_fpga2sdram_enable_show, +}; + +static const struct of_device_id altera_fpga_of_match[] = { + { .compatible = "altr,socfpga-fpga2sdram-bridge" }, + {}, +}; + +static int alt_fpga_bridge_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct alt_fpga2sdram_data *priv; + u32 enable; + struct regmap *sysmgr; + int ret = 0; + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->dev = dev; + + priv->sdrctl = syscon_regmap_lookup_by_compatible("altr,sdr-ctl"); + if (IS_ERR(priv->sdrctl)) { + dev_err(dev, "regmap for altr,sdr-ctl lookup failed.\n"); + return PTR_ERR(priv->sdrctl); + } + + sysmgr = syscon_regmap_lookup_by_compatible("altr,sys-mgr"); + if (IS_ERR(priv->sdrctl)) { + dev_err(dev, "regmap for altr,sys-mgr lookup failed.\n"); + return PTR_ERR(sysmgr); + } + + /* Get f2s bridge configuration saved in handoff register */ + regmap_read(sysmgr, SYSMGR_ISWGRP_HANDOFF3, &priv->mask); + + ret = fpga_bridge_register(dev, F2S_BRIDGE_NAME, + &altera_fpga2sdram_br_ops, priv); + if (ret) + return ret; + + dev_info(dev, "driver initialized with handoff %08x\n", priv->mask); + + if (!of_property_read_u32(dev->of_node, "bridge-enable", &enable)) { + if (enable > 1) { + dev_warn(dev, "invalid bridge-enable %u > 1\n", enable); + } else { + dev_info(dev, "%s bridge\n", + (enable ? "enabling" : "disabling")); + ret = _alt_fpga2sdram_enable_set(priv, enable); + if (ret) { + fpga_bridge_unregister(&pdev->dev); + return ret; + } + } + } + + return ret; +} + +static int alt_fpga_bridge_remove(struct platform_device *pdev) +{ + fpga_bridge_unregister(&pdev->dev); + + return 0; +} + +MODULE_DEVICE_TABLE(of, altera_fpga_of_match); + +static struct platform_driver altera_fpga_driver = { + .probe = alt_fpga_bridge_probe, + .remove = alt_fpga_bridge_remove, + .driver = { + .name = "altera_fpga2sdram_bridge", + .of_match_table = of_match_ptr(altera_fpga_of_match), + }, +}; + +module_platform_driver(altera_fpga_driver); + +MODULE_DESCRIPTION("Altera SoCFPGA FPGA to SDRAM Bridge"); +MODULE_AUTHOR("Alan Tull "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/fpga/altera-hps2fpga.c b/drivers/fpga/altera-hps2fpga.c new file mode 100644 index 0000000..63ff0e3 --- /dev/null +++ b/drivers/fpga/altera-hps2fpga.c @@ -0,0 +1,221 @@ +/* + * FPGA to/from HPS Bridge Driver for Altera SoCFPGA Devices + * + * Copyright (C) 2013-2016 Altera Corporation, All Rights Reserved. + * + * Includes this patch from the mailing list: + * fpga: altera-hps2fpga: fix HPS2FPGA bridge visibility to L3 masters + * Signed-off-by: Anatolij Gustschin + * + * 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 . + */ + +/* + * This driver manages bridges on a Altera SOCFPGA between the ARM host + * processor system (HPS) and the embedded FPGA. + * + * This driver supports enabling and disabling of the configured ports, which + * allows for safe reprogramming of the FPGA, assuming that the new FPGA image + * uses the same port configuration. Bridges must be disabled before + * reprogramming the FPGA and re-enabled after the FPGA has been programmed. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define ALT_L3_REMAP_OFST 0x0 +#define ALT_L3_REMAP_MPUZERO_MSK 0x00000001 +#define ALT_L3_REMAP_H2F_MSK 0x00000008 +#define ALT_L3_REMAP_LWH2F_MSK 0x00000010 + +#define HPS2FPGA_BRIDGE_NAME "hps2fpga" +#define LWHPS2FPGA_BRIDGE_NAME "lwhps2fpga" +#define FPGA2HPS_BRIDGE_NAME "fpga2hps" + +struct altera_hps2fpga_data { + const char *name; + struct reset_control *bridge_reset; + struct regmap *l3reg; + unsigned int remap_mask; + struct clk *clk; +}; + +static int alt_hps2fpga_enable_show(struct fpga_bridge *bridge) +{ + struct altera_hps2fpga_data *priv = bridge->priv; + + return reset_control_status(priv->bridge_reset); +} + +/* The L3 REMAP register is write only, so keep a cached value. */ +static unsigned int l3_remap_shadow; +static spinlock_t l3_remap_lock; + +static int _alt_hps2fpga_enable_set(struct altera_hps2fpga_data *priv, + bool enable) +{ + unsigned long flags; + int ret; + + /* bring bridge out of reset */ + if (enable) + ret = reset_control_deassert(priv->bridge_reset); + else + ret = reset_control_assert(priv->bridge_reset); + if (ret) + return ret; + + /* Allow bridge to be visible to L3 masters or not */ + if (priv->remap_mask) { + spin_lock_irqsave(&l3_remap_lock, flags); + l3_remap_shadow |= ALT_L3_REMAP_MPUZERO_MSK; + + if (enable) + l3_remap_shadow |= priv->remap_mask; + else + l3_remap_shadow &= ~priv->remap_mask; + + ret = regmap_write(priv->l3reg, ALT_L3_REMAP_OFST, + l3_remap_shadow); + spin_unlock_irqrestore(&l3_remap_lock, flags); + } + + return ret; +} + +static int alt_hps2fpga_enable_set(struct fpga_bridge *bridge, bool enable) +{ + return _alt_hps2fpga_enable_set(bridge->priv, enable); +} + +static const struct fpga_bridge_ops altera_hps2fpga_br_ops = { + .enable_set = alt_hps2fpga_enable_set, + .enable_show = alt_hps2fpga_enable_show, +}; + +static struct altera_hps2fpga_data hps2fpga_data = { + .name = HPS2FPGA_BRIDGE_NAME, + .remap_mask = ALT_L3_REMAP_H2F_MSK, +}; + +static struct altera_hps2fpga_data lwhps2fpga_data = { + .name = LWHPS2FPGA_BRIDGE_NAME, + .remap_mask = ALT_L3_REMAP_LWH2F_MSK, +}; + +static struct altera_hps2fpga_data fpga2hps_data = { + .name = FPGA2HPS_BRIDGE_NAME, +}; + +static const struct of_device_id altera_fpga_of_match[] = { + { .compatible = "altr,socfpga-hps2fpga-bridge", + .data = &hps2fpga_data }, + { .compatible = "altr,socfpga-lwhps2fpga-bridge", + .data = &lwhps2fpga_data }, + { .compatible = "altr,socfpga-fpga2hps-bridge", + .data = &fpga2hps_data }, + {}, +}; + +static int alt_fpga_bridge_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct altera_hps2fpga_data *priv; + const struct of_device_id *of_id; + u32 enable; + int ret; + + of_id = of_match_device(altera_fpga_of_match, dev); + priv = (struct altera_hps2fpga_data *)of_id->data; + + priv->bridge_reset = of_reset_control_get_by_index(dev->of_node, 0); + if (IS_ERR(priv->bridge_reset)) { + dev_err(dev, "Could not get %s reset control\n", priv->name); + return PTR_ERR(priv->bridge_reset); + } + + priv->l3reg = syscon_regmap_lookup_by_compatible("altr,l3regs"); + if (IS_ERR(priv->l3reg)) { + dev_err(dev, "regmap for altr,l3regs lookup failed\n"); + return PTR_ERR(priv->l3reg); + } + + priv->clk = devm_clk_get(dev, NULL); + if (IS_ERR(priv->clk)) { + dev_err(dev, "no clock specified\n"); + return PTR_ERR(priv->clk); + } + + ret = clk_prepare_enable(priv->clk); + if (ret) { + dev_err(dev, "could not enable clock\n"); + return -EBUSY; + } + + spin_lock_init(&l3_remap_lock); + + if (!of_property_read_u32(dev->of_node, "bridge-enable", &enable)) { + if (enable > 1) { + dev_warn(dev, "invalid bridge-enable %u > 1\n", enable); + } else { + dev_info(dev, "%s bridge\n", + (enable ? "enabling" : "disabling")); + + ret = _alt_hps2fpga_enable_set(priv, enable); + if (ret) { + fpga_bridge_unregister(&pdev->dev); + return ret; + } + } + } + + return fpga_bridge_register(dev, priv->name, &altera_hps2fpga_br_ops, + priv); +} + +static int alt_fpga_bridge_remove(struct platform_device *pdev) +{ + struct fpga_bridge *bridge = platform_get_drvdata(pdev); + struct altera_hps2fpga_data *priv = bridge->priv; + + fpga_bridge_unregister(&pdev->dev); + + clk_disable_unprepare(priv->clk); + clk_put(priv->clk); + + return 0; +} + +MODULE_DEVICE_TABLE(of, altera_fpga_of_match); + +static struct platform_driver alt_fpga_bridge_driver = { + .probe = alt_fpga_bridge_probe, + .remove = alt_fpga_bridge_remove, + .driver = { + .name = "altera_hps2fpga_bridge", + .of_match_table = of_match_ptr(altera_fpga_of_match), + }, +}; + +module_platform_driver(alt_fpga_bridge_driver); + +MODULE_DESCRIPTION("Altera SoCFPGA HPS to FPGA Bridge"); +MODULE_AUTHOR("Alan Tull "); +MODULE_LICENSE("GPL v2"); -- 2.10.1