Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp53653pxj; Thu, 3 Jun 2021 00:16:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvwG2CnmxLSvD/LyFw8HHUEGeinbeVCnYU81DYfQ4ShLfrYdItrfBSCncvBs/vmmtIFKdn X-Received: by 2002:a17:906:b104:: with SMTP id u4mr37143577ejy.211.1622704574352; Thu, 03 Jun 2021 00:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622704574; cv=none; d=google.com; s=arc-20160816; b=GZ815VvpJ7oWceTaVtSLKl+1N6WzVdCMrvPTMsIuBj7gyp9OXEtcVO224AE00zQd01 TjL+ZbP4YIN6ayeZ7t97PCSc3FrlfPHI+AM0x/4HPTwn2EfPxaz7n9MBcPTPkOno/+a4 cg91I5N3LFc2M+ch/BvKYn8Au5UhBI2tUuIOu+5XnZuHH0/QgvYYFRoZg768AK1sWvmW 1TdjtA+23MtSEaq7dRtFMpB5zgvF52lp1YX/WvNbjuFm14CLlh1KPH+VjG5u5sGFqSXq AZ9MVX2+sIMLC1LeMkyoUt2joCnD/fxkfeDBidMDm0tAkLGNKXCAu7XzNR1QRSndTFYL A+vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zvN781n8knVn4Wd00v8kKE8Ji4hphbFb5IYr/EE/CWk=; b=YkLnnK57HvpEaMw+SedjcqZmqiXVTh2zQ2j6t2OWXa/zoZc9xCUhF7RMp/4jrpaxlt JrPUxNX97Qwe0Hy8D1JXR6yop/agcAumiF5eLiIT4o9oXZgoxFoPetvIBHCXx4a6DmpN 3HriUo4W8s7e6C7M827WF69kM5FsUQEBA0mfRVWBaA0LhI3YaM9WCG2MwFpWUqQgT7zq JHJMlE29U0U38bChhVWjNrqv8BS1byaizec1izpVq5aD4IOK9czE76QAZXsqotStzZ1j hg4ebGvidiaf/EC9nhr5DDGIHa/HQ2tg91yzRxfA25p9re/NAK0dXOMgxDP6g53O6uJ7 7BaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gyTtmCJ8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gw26si1587482ejb.11.2021.06.03.00.15.44; Thu, 03 Jun 2021 00:16:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gyTtmCJ8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbhFCHP1 (ORCPT + 99 others); Thu, 3 Jun 2021 03:15:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:33466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbhFCHPZ (ORCPT ); Thu, 3 Jun 2021 03:15:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 78A9360230; Thu, 3 Jun 2021 07:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622704421; bh=NuHhNENlieeBM2HXwZyCbFcahLXbLDbLR/1wZf//oVI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gyTtmCJ8SGhUC8if/iKnyQoJrnTTj1xEY1+gunT+tFTzB6qHtI6xu2X1qwnJFPCgF hRS7EC8PNMeMh30F+EufuUr7lhOziXZWK/egBBfOTwBKZ0aFzrsTdByzZ8Xnt9+iO1 C31Lh2kXlQtdkpBxr5XDlsOS7dO0BSmbz70P96NY= Date: Thu, 3 Jun 2021 09:13:38 +0200 From: "gregkh@linuxfoundation.org" To: Raviteja Narayanam Cc: "linux@armlinux.org.uk" , "jslaby@suse.com" , Michal Simek , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" , git Subject: Re: Need suggestion for 'access_type' of AMBA pl011 serial driver Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 03, 2021 at 07:03:25AM +0000, Raviteja Narayanam wrote: > Hi, > > The uart peripheral on Xilinx Versal platform is ARM primecell. > Our environment is 32-bit access type but the ARM primecell uart in pl011 driver has default 16 bit access type. > (https://github.com/torvalds/linux/blob/master/drivers/tty/serial/amba-pl011.c#L2665 access_32b is false for 'vendor_arm') > This is causing asynchronous abort on our platform when any UART register is written from the pl011 driver. > > Need suggestion on how we can address this issue and if the below approach is fine. > > As this is platform specific issue, we can have a new device tree property (memory_access_type), specifying the 32 bit type. > In the probe function, override the behavior (uap->port.iotype) if this property is present in DT. > In this way, we can have support for our SOC, without breaking any legacy ones. There is no other way to determine what this device is other than platform data? Why not just set the vendor id in your device to a new one and provide a correct setting in that new vendor data structure, like all other devices for this chip have done before? If it is the same id, and works differently, then that is a hardware issue that you need to take up with your hardware designers to get fixed as that is obviously a problem. thanks, greg k-h