Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754087AbbLJIos (ORCPT ); Thu, 10 Dec 2015 03:44:48 -0500 Received: from mail-am1on0127.outbound.protection.outlook.com ([157.56.112.127]:18670 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751136AbbLJIoq (ORCPT ); Thu, 10 Dec 2015 03:44:46 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=bhuvanchandra.dv@toradex.com; Reply-To: Subject: Re: [PATCH v2] spi-fsl-dspi: Fix CTAR Register access References: <1449726930-7378-1-git-send-email-bhuvanchandra.dv@toradex.com> <2295258.Vc5Dp4nsCT@ws-stein> To: Alexander Stein , CC: , , From: Bhuvanchandra DV Organization: Toradex Message-ID: <56693B5B.6060100@toradex.com> Date: Thu, 10 Dec 2015 14:14:11 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <2295258.Vc5Dp4nsCT@ws-stein> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [115.115.225.206] X-ClientProxiedBy: MAXPR01CA0056.INDPRD01.PROD.OUTLOOK.COM (25.164.146.156) To AMSPR05MB264.eurprd05.prod.outlook.com (10.242.95.27) X-Microsoft-Exchange-Diagnostics: 1;AMSPR05MB264;2:RSuHCVvacLANmc02tqJGmClkbbBMRps7pPg6SKgn1GQZDje+WkrJWQ7KRp/wH32gDCpXRKWfBK1P53ALMCBocuXO5kTVDofCPFUReiko7WFR6jdKB1w++f+jBwQyHOADtP3MCvuJGGCO/E1CI8DuXQ==;3:BroeGVIwx3dOBeJZsQIG1ntlgsjhHMYI07ScZYvdzABV4zn1Af/CNOkF0Poqsv/H6t7z9yqRBGp3ssdu08/JaqgQ9iHrWMQa8HL441vPjGUKM4cK3HF5muwc343Hkplg;25:KqWEAJZ9QWTRd73py+xKQ23r87drq9KIp5soPRiD7b5qNCSCrdPYS1vVhxX0dnnZfa6+Y1BbRTJtQ1TbNgFUg13BmIqqMLAJGk1WM9ClnxdBoWTebZvYo+YrD1RbOa1fpBk2Ikb8V00hLcET1TyDLslmto4aGkH8SYBrvygVTIWOKHyu7LRN2/xuuyJ44+ZPvwICXnujqdVWq3hyPBIAVMSrh0m+5DUR5zznwK5bFVyj6n938xkFVRT4DaN/ItOti7u3hjrNk6B3za9RPvGJ/Q==;20:mZiTdXGlfJetdJdPRGZxl6rym16W22lokSaTjHYKjKT2Ga7OrV7gVPoTStIE32YQu1XpM812jWHI7H5sRpIDVJotYQ4yRxeE39r3hcpW0lY994P/5WGb1OwPj9QXETGHLPOE2guApa10P4oCrYdRLEJW5hRzvEoTQRn8C5sKMd4bRkJRHSf+31Unvo88MpKnmbAaEe72o7t3WdBqM7Kkp6crdpAHghOPdZzzEMycPD3Rsf48j6jq8U5dLwho38diOh90qy3ywTvxaBfSfUrpZmwDVvRp/7OSVG14guJMfVC5LlHcAYgx/Q4rARtV4791un3WjHKvBjVa26/IO7f5Sg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AMSPR05MB264; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001);SRVR:AMSPR05MB264;BCL:0;PCL:0;RULEID:;SRVR:AMSPR05MB264; X-Microsoft-Exchange-Diagnostics: 1;AMSPR05MB264;4:K3o9++Je25DbKG69lOZ7jhOWLI+sdm/A0xewKSIDkBvQHG4QExDvT/X7U9cLdy94Hsd9L8lni89V36ESIvE3UV+VpHti16E5Utf1oXIqZ/R1ZQyNvqqrf7ZMQdAcRCGmHn5PDaS+rpf/f6ti/zhIk9MMJlVivmmQxLibHRgHd88Ye/q2zHAtfUxVamkBxWO07heLISHctS9MBl3doSESw9AQjAm+IP81hC3SRN5gR3EGlgLn3mLtCpdLWrWVsiojE7arCrWdtc2dwBCQvRCKTaT6MgLoJeuWq/n3N1tEIskCPaUlifMBWL3Ym8aZr3Rb/qRxO79V6dxaHNWOFIoD6Bt/WFbjuGlnU6OFzTLC/rmjz308Hbyq1OobfkJtuABD X-Forefront-PRVS: 078693968A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(189002)(24454002)(199003)(479174004)(377454003)(83506001)(43066003)(6116002)(86362001)(50466002)(5004730100002)(42186005)(36756003)(77096005)(76176999)(87266999)(54356999)(1096002)(64126003)(3846002)(23746002)(4001350100001)(50986999)(230700001)(80316001)(5008740100001)(87976001)(5001960100002)(65956001)(97736004)(66066001)(81156007)(53806999)(47776003)(65816999)(101416001)(122386002)(65806001)(5001770100001)(59896002)(230783001)(189998001)(586003)(40100003)(106356001)(2950100001)(99136001)(105586002)(33656002);DIR:OUT;SFP:1102;SCL:1;SRVR:AMSPR05MB264;H:[10.18.0.138];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;AMSPR05MB264;23:uPQzpBqme4VPOrpqBlWHYcs10lnQwH8B/W/MlV?= =?Windows-1252?Q?saXqLPC6Ae9DmrOVgauWsIDc7PqqroMCo84WTH+UPv8HYulPORlfYn3A?= =?Windows-1252?Q?k5yhaTaFNQeLYid2/aWVueuWWL4rbzuH+HlcSCen/x67K4IB2jwZM6Kv?= =?Windows-1252?Q?PiWdALTm+eaTMuhxwL0q21qwqucay6bpotONWN3Wnx2KYliwDcmxdDfp?= =?Windows-1252?Q?6uNQ/IBC8GfYsHtEoX42q9Gu3dBlFoTCBgiujvggO1GCxEgTzegj9+00?= =?Windows-1252?Q?o0qILk1CwSKk/fpSNpaS/vT14Z4EW9FMluHTZmI89U4Sr6gXuZJokF3V?= =?Windows-1252?Q?0aA5q8sryZb3QpZ2EsBtMNhaT6IItkgXlJr3LFSZ0lYC89yUVqu26Q4e?= =?Windows-1252?Q?utk1hEgmpUvl2yo3/UsLrY6LgkqOAJ7l2XBV0nBvQ1jJwSrOgJCu9OOg?= =?Windows-1252?Q?d3E4FmNCU/Nd/cyGsZMuHH8LLzCr/eJds2cKXH3IYuuwvwsGmmEvLzX0?= =?Windows-1252?Q?dYc9gVwSILFzWbbXJHNTr1yz4IHP2BntrsbsxiFiZnFsgQ7QYGU0jC1I?= =?Windows-1252?Q?iLmAUgddm5z+CN0I1+IET+aVZShaF3KU5OLNs/F62JOHaUu6rPz2OlLK?= =?Windows-1252?Q?ZZbm2gUqmvx9M0dp25T96FR5t18Lho21qFIOXf6I7KWG/QV0XimW5j45?= =?Windows-1252?Q?/G1Wr84aHYvUfzy9h2D2I+Dz22Ltqum8R+IDE7rFCDEEAtjidb8VrnsT?= =?Windows-1252?Q?qBqKHwInPdeRgTIzJMxHNW7ZonB7FHLgdvW6kCMMUpV1wN1B35PxGI2q?= =?Windows-1252?Q?gLbZ4Pc1aT67KsnDZYv/vsGuXX5+o7+TPx6HCrQWmPRoXynPpTW4i+vI?= =?Windows-1252?Q?clkf9/JaSoDL4LNaxq5u1+6/EaKnX5PfLkESsgK4ajcag1zRpV2oQi2j?= =?Windows-1252?Q?Jcm+cM2Vn//nj/Qtm8T6Daeyl/nFCy+PJAWysI8h7FnJALG2O8U7agmi?= =?Windows-1252?Q?qR6EkfODxSnDEvEUqS7PmwbwSP6dsIYBdIXI4AKt0979AN3QN8al9s6h?= =?Windows-1252?Q?mE2xEfFKZ2NDj8mDQtRKRVpdfubxvYXhZHGX3LO3tCUtP0wrz6eVQZI/?= =?Windows-1252?Q?maOTFOpNXqsTlGQYNdS25f9qTUP2h2DbN6/FLZOHay9R1vJo5sMelSBn?= =?Windows-1252?Q?f6KWwDKrZLsxEs0+nBrGAU4s3lKe8Ro8nzoIZQbxNB3EBfvUcx4ryBQd?= =?Windows-1252?Q?uHC75eDhYu0Z9fatekkRRTGGKN/RA7jOaGnmIhNzPHuPmFWATZWokE1M?= =?Windows-1252?Q?qF4Y7o64D+GtW+z0moZt9So0LNAKxFeiBJ2/M0rKdPn79+y/hyHznISS?= =?Windows-1252?Q?TIk7xPLn9ThEiGlVtedEA/M0e3HnILPbITZwo1ulsTH9g/9UMwNQQ=3D?= X-Microsoft-Exchange-Diagnostics: 1;AMSPR05MB264;5:51CfK2TQu6igt2cYZierCAEWyLzjDqeehtod0ZZ1/Tdyt0zLtiYS9ViKyQvIZVkpAV83/g6ajfyoEznSSyilhze61rthkOdU/ZGOqMAfjuWvmq2JVXVB/DbWoDl3+APJb7WTbz+uV/iDpupYeHBGlw==;24:aF14DINb8CcRbtXJBCnWBFj77kRFHRM1BdRrRCAnZ4oSnWIVSfcAmXYFp1wFFS+l8mkttCLZO95ds5G1tQNQINkcBdBjOUg31EX3G73+Ia4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2015 08:44:40.3080 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMSPR05MB264 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1511 Lines: 33 On 12/10/2015 12:45 PM, Alexander Stein wrote: > On Thursday 10 December 2015 11:25:30, Bhuvanchandra DV wrote: >> DSPI instances in Vybrid have a different amount of chip selects >> and CTARs (Clock and transfer Attributes Register). In case of >> DSPI1 we only have 2 CTAR registers and 4 CS. In present driver >> implementation CTAR offset is derived from CS instance which will >> lead to out of bound access if chip select instance is greater than >> CTAR register instance, hence use single CTAR0 register for all CS >> instances. Since we write the CTAR register anyway before each access, >> there is no value in using the additional CTAR registers. Also one >> should not program a value in CTAS for a CTAR register that is not >> present, hence configure CTAS to use CTAR0. > > Shouldn't the information put into struct fsl_dspi_devtype_data how much CTAR and CS the actual implementation has available? E.g. LS1021A has 6 CS and 4 CTAR I guess still this will not help us when CS instance greater than CTAR instance is selected. Other point to consider here is we are writing the CTAR register before every access, so for us there is no additional advantage of using multiple CTAR registers. > > Best regards, > Alexander > -- Best regards, Bhuvan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/