From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31457C4345F for ; Thu, 2 May 2024 09:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=joTiJR23KZS0eQN9/vSGnme6WvV6m+Qxnm93sGFNuMc=; b=RvteHfdoDhSBVm f7gNk0HzOj3WnOTgQgWHPOTnbz84hZet4yuQXSkIWrHhyLANPl3TYq/O7jwCoQh2QbBk2q4akPiRY 8ARpdcQ/UKt7JPoNfqlkvE3oFDZmddJkdVcW7NX67oGKgaHKGpABNZf+P8UcRObBgIEb9NDM4nXou affvgxMHUhJRFAckGib4zgotl5DAc5MoS0QxyvZIuSbyZ/pXrVXbeGGfIyiPfiS6N+WvIN67IVCzJ RyWa6cdgl2HOI/4nB4xjGqx7iKvtyRYcpArvtN395mNrXFbg4335ujgD1hZgFVUVbb0U2w3kFtMBF v838rVNFHn8GSg7tyaXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2T58-0000000CDQJ-0ydv; Thu, 02 May 2024 09:50:26 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2T54-0000000CDPO-34Ib for linux-riscv@lists.infradead.org; Thu, 02 May 2024 09:50:24 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1e4266673bbso70047315ad.2 for ; Thu, 02 May 2024 02:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714643421; x=1715248221; darn=lists.infradead.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=V53ukG19owdCrmMUmjb7CSZlCaIoJuKneZg+YTkCPBWoeQolnOHprp6ew8/paQRmCT e4r7SJ8SyOFHIYVlRyO6BjqVYw5gnefBwxG4IQy6RLp2+ar+sdFUpLOmhULif4zhTU9j nhQQ7GTwcLyHtGz3Ns0ywjOAaapk5LVyXhcWMq1lhpi/9sYZ46J9ouv53dMy/fKdTyYq U3pvvS3dkEZbZ80LxKfZAXX53Af/jMT2T14hw5bYoWG8TFuzeZ2F4yZDsC+pN3ahyEgW U2ZyYbvIc2d03lQbUhmS9+475s/lKVQNhlTpeA6S9MmUmqcjCe2CuDfljIEnfGKbSQzH i2yg== 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=PRkFkN2LU+RrkiFEqf+fLL9OclKBbklC/XLjyBmqM7c95pGBT3stcPR+wgg4blNyuB TdxbHnkddp9NSClkODMOdHuvKAuaO9jAnmDO9jK/Xf3WGEA6FFI6akcGL77B2A2isMe0 nr8VjKi6r3Gzqhqhb1d5EaAKlWM6C9BBv3rcBC3SQ3X566epPPmDQf0cRhUqlftQ6+Kk wvsiW87n5hWbxOF4x4wnN9GWJkyBKCyrXSN5Ray9N79PyjuKE/wlimkBoN3duq+Lol1a HfgbxK4K9IeyHWrb9TbyanSZrs0KGVUzcsauor6esBPC7ljEzOBke9KjF6PWyDnGvNto X+WA== X-Forwarded-Encrypted: i=1; AJvYcCUuWcs+simIlo0EaFt60cfEzRDGZC8lFzQU8Cxj+QLDmS55+z8oX9QTMCd66fuXBUrsBRVgShgHoAbmHYJ+MaElvum6workfeUBoHefvxY9 X-Gm-Message-State: AOJu0YzpolVEnlH8WJrHh3dVGMS7FDLYpzdLX4yRLiKBLNxKGd5/5dtc 4NEPNKjyWlrlw5EK41pyco13muWDH9gw8pkkXnWcbaeVnf7yIXaItjD7+R2ZeSQ= X-Google-Smtp-Source: AGHT+IF3qps04ERKWX4kOxvSEDon6CGWqD+FZR4lIipoIhxGureiukZlSMZ76xOlV5hwocc8u3+KoQ== 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240502_025022_835699_FBC89B88 X-CRM114-Status: GOOD ( 24.45 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 > > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv