Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1019741lqm; Thu, 2 May 2024 02:50:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXpFXkLAMfwfUp5a5WjJzuIZ9FdfgBUUzN467LXoYxptHvHYWxCQQyluIsZNDSJcUFi8kwV/A4LwJ3F/V8JoV3S/7RDUZabaZZH2+2rTg== X-Google-Smtp-Source: AGHT+IEmDLbKV41DlzIwJdEZMlQyk9UEQVYbA4kC8L/4Uc75h9wS3dIb63SIu6X7EuQiSy0cx6cp X-Received: by 2002:a05:6e02:1fcd:b0:36c:cda:e2fc with SMTP id dj13-20020a056e021fcd00b0036c0cdae2fcmr5263162ilb.16.1714643433478; Thu, 02 May 2024 02:50:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714643433; cv=pass; d=google.com; s=arc-20160816; b=J8oC19agnvMIFB/4rGd+WiLv79cQMDLqD+Miyh3ymkrCpGa3G0Ks3jWc2OwyWNQXrh o8J6rbfL/Oot+8SHdU7cz5Ipp9xF3zEc8w6X25mbn0mj37zBKjZW1mCH1iF77aC3jh87 psfvsn4H32vYSOYwh5OG2NaMufhommyxYrjpHuvhfGGujsv7KNFaESlX+M1n4aAkMyJW XJhe/q3+czYcPEUB+brJDCGINDqt2ww6D2OoG76/C880eYTPW+NBgFAICTqkSdkr3zuK IrE/qV/LAKBP1q/xyEWmZxqK8mjPP1QRdKap6MQ8xxDhayBOBz9Uqbu3CRuu6XV8BGF/ 2W6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0L3flH7yZNX51bFJ6y3B+1+jhZGz/TS681Tx1TYzzOY=; fh=GLc8xLDHGeKSl4+sgAUmfvNf06/r4CVLnfiWwAypNNM=; b=woZjiyAcFKUWZujEmI6U4UfWwolbqvbjaVhALGe1Q9jkx1BYKJy1GDauRYoRzPgPcC oDjrRlYBtjaym4MTIOPDSeHULFW2Ft3sY3Uy5VOzlK44PwLbj6rpXNDmPDwxmXdeacne ohY+BB0N+tRohBZ/m/WQhfkXDhUTiDoykjJ5545Fn0r69Z15BmYc5qklo2Ya9Wbh7z6t HcKqUdArkUx7Jgx3fxbdixnKj3dFp7rZL0THAfo2BBnN9tNZIkF8fev+SG/uYWn1gy3n QbVn+J3O2K8QUCaVqpgmbAEbpKQuLbG2CTLYwlxc/nD7n17D3WFm517ymsCL604/g3pE lm6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ZGqYpXF+; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-166249-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166249-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p23-20020a634f57000000b005f41aef11c5si683413pgl.528.2024.05.02.02.50.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:50:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166249-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ZGqYpXF+; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-166249-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166249-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1F09B281D55 for ; Thu, 2 May 2024 09:50:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5838D5645E; Thu, 2 May 2024 09:50:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="ZGqYpXF+" Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AB1E55C33 for ; Thu, 2 May 2024 09:50:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714643423; cv=none; b=NOHenf344aquF3e0PAClF+Y6P+fs0IKvbuYV6hFPgif8k3OaX6LmDwVvxyxSYCawi9JuaUnh1HKVaXcIDWvXg1EJGc8BRkGXGJNn+LvMLkPfl5eLs7FSagDdoBLk3zoTMYITPk8trBven8uk/MW+N++vnTc1+qPm7t18GcGERQg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714643423; c=relaxed/simple; bh=0JWiyOm7Ozvw+jRdtZ5s7Kqw86qKGc6L0YC4qTgpF0E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WwHpnQtgbWxHN173CH43epyRt80YIU/IZViC6+oCmiFh9SL0MKvmtv+IRVAPninnj0Qr4P9WD0R8j0OQ8E7AdNz03HwzBt2H4nsBnG0zpRfR9g5YJcC6oPPuhftlRETnILzlZPJgXnQf3JSPe7jT/6wsNtSp7SF7ZLhed4ZrSh4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=ZGqYpXF+; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1ec5387aed9so22845665ad.3 for ; Thu, 02 May 2024 02:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714643421; x=1715248221; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=0L3flH7yZNX51bFJ6y3B+1+jhZGz/TS681Tx1TYzzOY=; b=ZGqYpXF+nnoJEhgTquFu/m98uKm0DoxPbnU1x7kf2a1dRapq4ze9ky8B5iGgloKyOl RcmMGe7abWMqC7X+US4brJGhTTDfOA3A7JPx1DDAC+k217xfSkrDnyCjxOkK+FaP97qJ 82SVkZuGISn3IGL+dylMsPyHz9I6KtdWveWddk/JhprQdbxwBy3LZLerNkmtgg4Qtiy9 3YQbgcRndZUk4fiDYlsR8bJWYhqXhyjsedfcWExo8OJH837A6OWSMjsSoikTkyDaXZE/ eOLt3putyHsYIwcn1O0YXIZhJz7dE2muEOklbkcoy3fV6jvkfnLXKkiT5two+n1n/yk+ Zk/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714643421; x=1715248221; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0L3flH7yZNX51bFJ6y3B+1+jhZGz/TS681Tx1TYzzOY=; b=nIJNHwLqoNVksjJFQJusXQpnjZGHy3UtEnmNINqc+v/LKgrppTHU3j2vIVA+9iuMJC igf3pyuL1FisCR4whDFvA72nNv/KvGu/EJTAkM6nYw233snl26m9oZHuwa1+svb+NOLq Zi3vQF0cvG2zMUyMgJxj1SVXLFvkDUZw1qbBjgcj7Iqm+qAsea/N1atNdI6MMxFEpXqT 5oJCUqQyDDF7+NVoUtpxq+IjTbANTiv+AsXQ5LmyAvkU4WpHGUfawHhF9/+TAdETtdfE DFw3k5Wm4oquHR1lt/IfuG5zzJWkAnviPVUM9U9VziuANRdq6LQZXxUsX3jMBTAyMb58 3ZKg== X-Forwarded-Encrypted: i=1; AJvYcCV9bIHklhR5GLYvK39rUJBMnlemKhkGc1SkhbQSGSmN4FV74Bnko5ec2sswq4ekKuN4xu9nKcSd3LYUQ/SHbTiA9ldf7ZBWAv5b8KmH X-Gm-Message-State: AOJu0YzrAE7MTbpPJlnwww3WXLMsroLwa7Lph/rx1fCRApCnNcYGxb71 3B36HC1cWQITLSlkIfq7Uny2snPdwvYtGg0t7HqbmI4XwIM2t476AM13XSlfnwE= X-Received: by 2002:a17:902:c404:b0:1ec:3f2e:d8e2 with SMTP id k4-20020a170902c40400b001ec3f2ed8e2mr6671474plk.15.1714643421414; Thu, 02 May 2024 02:50:21 -0700 (PDT) Received: from sunil-laptop ([106.51.190.19]) by smtp.gmail.com with ESMTPSA id u2-20020a17090341c200b001e5e6877494sm852994ple.238.2024.05.02.02.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 02:50:20 -0700 (PDT) Date: Thu, 2 May 2024 15:20:08 +0530 From: Sunil V L To: Andy Shevchenko Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, acpica-devel@lists.linux.dev, Catalin Marinas , Will Deacon , Paul Walmsley , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Greg Kroah-Hartman , Jiri Slaby , Robert Moore , Conor Dooley , Andrew Jones , Marc Zyngier , Atish Kumar Patra , Andrei Warkentin , Haibo1 Xu , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= Subject: Re: [PATCH v5 17/17] serial: 8250: Add 8250_acpi driver Message-ID: References: <20240501121742.1215792-1-sunilvl@ventanamicro.com> <20240501121742.1215792-18-sunilvl@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 02, 2024 at 12:17:59PM +0300, Andy Shevchenko wrote: > On Wed, May 01, 2024 at 05:47:42PM +0530, Sunil V L wrote: > > RISC-V has non-PNP generic 16550A compatible UART which needs to be > > enumerated as ACPI platform device. Add driver support for such devices > > similar to 8250_of. > > ... > > > + * This driver is for generic 16550 compatible UART enumerated via ACPI > > + * platform bus instead of PNP bus like PNP0501. This is not a full > > This has to be told in the commit message. Anyway, we don't need a duplication > code, please use 8250_pnp. > Hi Andy, Thank you for the review!. Major issue with PNP0501 is, it gets enumerated in a different way which causes issue to get _DEP to work. pnpacpi_init() creates PNP data structures which gets skipped if the UART puts _DEP on the GSI provider (interrupt controller). In that case, we need to somehow reinitialize such PNP devices after interrupt controller gets probed. I tried a solution [1] but it required several functions to be moved out of __init. This driver is not a duplicate of 8250_pnp. It just relies on UART enumerated as platform device instead of using PNP interfaces. Isn't it better and simple to have an option to enumerate as platform device instead of PNP? [1] - https://patchwork.kernel.org/project/linux-pci/patch/20240415170113.662318-14-sunilvl@ventanamicro.com/ Thanks, Sunil > ... > > > + { "RSCV0003", 0 }, > > Does it have _CID to be PNP0501? > If not, add this ID to the 8250_pnp. > > ... > > P.S. > The code you submitted has a lot of small style issues, I can comment on them > if you want, but as I said this code is not needed at all. > > -- > With Best Regards, > Andy Shevchenko > >