From nobody Sat Feb 7 15:40:03 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13E231474C3; Mon, 12 Aug 2024 15:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477747; cv=none; b=CC98rkvobU+5haxstl0PE1MwkfYBK1bZnUdEBMT47gbDzK9VPH5t8vJta2QwjSu7iVQHC/etK40D4cC4en+0FWYak84eN9kcQ/ef5FmNNKf0osYL1XYZ/Z/64EFhbat9c6aARI5ohXXIcSzFBHS6WwcXxBqA6pNmczRcolBUHYM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477747; c=relaxed/simple; bh=QLYD+X6576Kj5K4QL4b16JOYtspAfRDomvmS6wFuHdk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nVs2JgtzmuZH9q+j1rbEjIutLByAwfifC4W5pl/P2JyJK2C6P9WVOBHq4kdF6iE6qgHVIrd1rFiBIsnvs+XXd2peq6EmQms/lqK3QWNrHJPtLTGEtwpFpEz7gy5ZlblxNQ7BlYjT/OVu2f5PPEpsrkrPhFy3e+xMXf/Y3l0Emdw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MR7KRmL8; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MR7KRmL8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723477746; x=1755013746; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QLYD+X6576Kj5K4QL4b16JOYtspAfRDomvmS6wFuHdk=; b=MR7KRmL8LyeFsKDieiHATVvavsKjFodRWABFS78IU6v5uAASuHYzwc4P Gs46IfpI81vubofOPz4fYs7tUxRTCMxfUWWDJrmVYqcwCVL6rPkiYOaTF V+YzS6BA789UPd7qVfn6wXBSys+w/dMw3/kmZfyvo2xgrDnWNrrPwxA9Q sevsiCxE/lR5fre/GiIVp99JaEM2OLlN763vE420FynY67sgSFayZfT7x f2MFoFN7IL06xj82JvOZTvz1ev7EVLhv2vSRCnWzn2eUtVh0/Ix3b+6Ki /hmt6NuuqJktBzxf97KThMz+F6nmmg3gqi8q6We6ggt4kigBGAn0siYaM g==; X-CSE-ConnectionGUID: 5JsgLmSlSsKETnDUG3p+Jg== X-CSE-MsgGUID: ClZhDoiZTtysz3J88WWW2w== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="46998236" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="46998236" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:49:06 -0700 X-CSE-ConnectionGUID: wu/d1wQQTSi3QFwEC2sPpw== X-CSE-MsgGUID: 59tjK9wqQWe6sHcKnjtDBw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="62959168" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 12 Aug 2024 08:49:03 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B698F15B; Mon, 12 Aug 2024 18:49:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Sunil V L Subject: [PATCH v1 1/7] serial: 8250_platform: Remove duplicate mapping Date: Mon, 12 Aug 2024 18:47:03 +0300 Message-ID: <20240812154901.1068407-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> References: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" UPF_IOREMAP is for serial core to map the resource on behalf of the driver. No need to perform this explicitly in the driver. Signed-off-by: Andy Shevchenko Reviewed-by: Sunil V L Tested-by: Sunil V L --- drivers/tty/serial/8250/8250_platform.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index 73002faaae4b..a0e71b03015a 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -142,12 +142,6 @@ static int serial8250_platform_probe(struct platform_d= evice *pdev) if (ret) return ret; =20 - if (uart.port.mapbase) { - uart.port.membase =3D devm_ioremap(dev, uart.port.mapbase, uart.port.map= size); - if (!uart.port.membase) - return -ENOMEM; - } - /* * The previous call may not set iotype correctly when reg-io-width * property is absent and it doesn't support IO port resource. --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Sat Feb 7 15:40:03 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C537618454A; Mon, 12 Aug 2024 15:49:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477749; cv=none; b=WSJFR8EaI7R3Q4X9lyxqMBriDp2gZpqoShS4l9KiITgv/z/P1cOn4p1xh41tVOVoVPkikEHyrDG5P8n69+c9hI9Ls0txFL+Ziw3U6BQZAO2SdFW9CITLQFOqDnsj0K7HtNxumyU45segQ/1PZTn7xwdynA/9NYl3ZHd32GX85Xo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477749; c=relaxed/simple; bh=5Kopdko6zXiOKrV9ZoEpPqmlwIIEK2D2CkanedEvgb4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YZbhduQXRYEvtoYUntfDLrXWTYqlQX1hDlzHLq713RBdy5I8lexwhqhdj9578pBK7ZW69JXPKBJC4QVsVa6LhnjAMmnpRPm3c7MCe9N2b98rxkNpdIJVcYfeNnW3/6Pnp275obMdNq0+ZM763hIMcj3ncSUMkBRE9dXaR9DxSRs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=hobEbXls; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hobEbXls" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723477748; x=1755013748; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5Kopdko6zXiOKrV9ZoEpPqmlwIIEK2D2CkanedEvgb4=; b=hobEbXlsHSNTAB8jU53pcoqb9eVgCvgT0EyOnId6/46RD3jFb73ogVTO omi+FY6U2SP4E6hKryPd/lbGI2SzEELoti0Vebdk2G3GndLFFGZ+5nkCi YMuqVe4yfQ6kYOG/UihvVXUkWnNLoqLspD6RkSneqEmQ3uAa/RLFstjj5 bYrw+cFvPpIAX0OkrR9LytQBVs3wqBtwhAaB1V+21zriO34e9ybE21Fxi FVpid+vckJoWPemz+iSIXsAbE3nrfp23wOrIwQsWeOiMW7LqsFHTnxf1x ikE51yotuWf/WE7s+1xw4g0neqDaXLaF5PnsPS2u/Dpjfgy7arQN0Gdef A==; X-CSE-ConnectionGUID: 8pRgTAd5SNmREqF1z6hqcw== X-CSE-MsgGUID: pH0+5OuMRZ+LXNPt6cushg== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="46998241" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="46998241" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:49:06 -0700 X-CSE-ConnectionGUID: jRPZp5AZRzmnAZqIztvv/g== X-CSE-MsgGUID: YR/2uDm6S3WaFL0wamAYnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="62959169" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 12 Aug 2024 08:49:03 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id CA726321; Mon, 12 Aug 2024 18:49:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Sunil V L Subject: [PATCH v1 2/7] serial: 8250_platform: Don't shadow error from serial8250_register_8250_port() Date: Mon, 12 Aug 2024 18:47:04 +0300 Message-ID: <20240812154901.1068407-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> References: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Don't shadow error from serial8250_register_8250_port() and return it as is. Signed-off-by: Andy Shevchenko Reviewed-by: Sunil V L Tested-by: Sunil V L --- drivers/tty/serial/8250/8250_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index a0e71b03015a..ffa2b7b690d3 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -150,7 +150,7 @@ static int serial8250_platform_probe(struct platform_de= vice *pdev) =20 line =3D serial8250_register_8250_port(&uart); if (line < 0) - return -ENODEV; + return line; =20 return 0; } --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Sat Feb 7 15:40:03 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4444A18562A; Mon, 12 Aug 2024 15:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477749; cv=none; b=IgabhvXV42A+Hwbm2SmA3nAdYyRN8BFXvdoC8xbNQX+AJZ1vEZe/D86XSTzJrKBpsOYb/7UF/WFHPkl8LXhFVzdL2rsAcjcLOOdBABdelTMQJJX8dGVNIWRYbq2nXhtn5Y3FhZ5yDlaQUvlm3I4A9BT7YGoylizkAkQp0OdLpBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477749; c=relaxed/simple; bh=oEGMPDmJEbbGQUvoEJPDdDF4HFm+Jp4H/O+URWqPCbQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Npvk4kOMS/ck9NsNuEJPM55uAs+9WJn94iWr2Wo/VfDmp+0e/FhzG2VvyCgd7xgU/XUgT0dv/vD+WFQA6GkZKL3oWo9lKqx4Y4Ol8qxccDPAlnNFhBbnuxZGS6x/eYRiJ6IoY9ovXWFJlu4NP5Yw7CzuU5Q/8Xc+ugFxlweCWgc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=X+tA8L6+; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="X+tA8L6+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723477748; x=1755013748; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oEGMPDmJEbbGQUvoEJPDdDF4HFm+Jp4H/O+URWqPCbQ=; b=X+tA8L6+Fw0EIIVCK+0rt7Y6S1YUdLQ+YWDGevVrMS0nHNJHGmmFnNmV u8RRe8IihMUZ6FW22PomEpD62DcUkUZPk7THK8toBJngSEiP2PYYD/4nJ Rhto0fsepV4gVQR5/dDibAAjplxX5RfiFQBPAtEAtVUTTYtqsoGkt8K5b v7zlgUx8TKnpKh47dWXhFGd1/u89uoKtIxQuCGlqfk7Td6P+tQpFvkSNw wt0YcwATbOqM/VL6JlLkgmvfvUTaB5SQbXb9LtB2PwnbcCfrrLi9bLzpW 0n5RzFeQgi9VEzWFjUNMrjvn5/OKXdVLTFS6w/qj/f9QdR0MfRBEGSdAj g==; X-CSE-ConnectionGUID: MQ1a7/PqRJKJhJ2W639XtA== X-CSE-MsgGUID: S7D34IPvQTupwlni+92QKQ== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="46998244" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="46998244" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:49:06 -0700 X-CSE-ConnectionGUID: yINk/hUzR5qX8nTFDGrzYw== X-CSE-MsgGUID: /X7vflvCT3a6ywGaeHos3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="62959170" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 12 Aug 2024 08:49:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D93783B5; Mon, 12 Aug 2024 18:49:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Sunil V L Subject: [PATCH v1 3/7] serial: 8250_platform: Use same check for ACPI in the whole driver Date: Mon, 12 Aug 2024 18:47:05 +0300 Message-ID: <20240812154901.1068407-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> References: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use has_acpi_companion() as 8250_core does to unify this across the driver modules. Signed-off-by: Andy Shevchenko Reviewed-by: Sunil V L Tested-by: Sunil V L --- drivers/tty/serial/8250/8250_platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index ffa2b7b690d3..937eea3ebdea 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -165,14 +165,13 @@ static int serial8250_probe(struct platform_device *d= ev) struct plat_serial8250_port *p =3D dev_get_platdata(&dev->dev); struct uart_8250_port uart; int ret, i, irqflag =3D 0; - struct fwnode_handle *fwnode =3D dev_fwnode(&dev->dev); =20 /* * Probe platform UART devices defined using standard hardware * discovery mechanism like ACPI or DT. Support only ACPI based * serial device for now. */ - if (!p && is_acpi_node(fwnode)) + if (!p && has_acpi_companion(&dev->dev)) return serial8250_platform_probe(dev); =20 memset(&uart, 0, sizeof(uart)); --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Sat Feb 7 15:40:03 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 564C9186E48; Mon, 12 Aug 2024 15:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477750; cv=none; b=SoL0cdJPrZMSydaitKyY305UM2J6sqWq+JiiqhYDf+a7NZ7v8OhFXC5GV17CkDe3A7BBKuV3SglvMYsVNzagLSnGNVpFgbKSDnnfo20Z68RbBGLfRIX6UHCUE767Xc4yP/zTZiPDunY4YBSjlXnNm39qE04OZFtT2BFk2VoOJtQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477750; c=relaxed/simple; bh=/uuspCGzw0/Czr7dXMEqBLtRtDHoVsJNY8Ej51BqTjc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZLuad+53+pT8CZBoDwURfDK/ISg/B1P4B+HxFR8flTbkghFRiQvC5Zqji62A9EaMLWUVjRck0gy4LtY4SL53BXsirrGB53fVAE/xsWpwXMOwDywyS/kQf7BPOX8FyPmLvnIjdlxzdUG97PNB1yI2q4gG5DqafATejB/joO0mdTI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=oFQ1+Ats; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="oFQ1+Ats" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723477750; x=1755013750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/uuspCGzw0/Czr7dXMEqBLtRtDHoVsJNY8Ej51BqTjc=; b=oFQ1+Atsvx8NP5zmLV8lKNiJ5GB1x1yUDdIlDEJOIeRqTil38McDFU+f /gXcUeRjJYbUciU7r1ACZ6MlaLlmD0Kq8UlRa9o1Hz4LKRVRrbULknUo+ Zbr+Ppz6IbnhNF/1727iheuuRIuJzn4shVDLuRnb0eC4NZ2sayZusErmG t6AuRtrCfQAjMDXh4ZjTILXm/8Q59GFba6lN/ivHngcLktGlqgUjdhyD8 qRED5AiKrwa9uV2wsqNcHvDjb1ZvCMylIF6E96izMA5Pg5w4tDm/4/hr2 CMO6xka3E9OECV2QzaN5PNJ7fS0fWESA0tZh0CJ29yj77ELmav/LPoeBC Q==; X-CSE-ConnectionGUID: rUcNXz2ETPOFX9M5p6eCxA== X-CSE-MsgGUID: qH8m83SKQdmxXIS4s3wROQ== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="46998250" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="46998250" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:49:06 -0700 X-CSE-ConnectionGUID: VAVfEBMHTOCHmrP/WpaHPA== X-CSE-MsgGUID: 940jORz9T8yoGkFu/w7jCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="62959171" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 12 Aug 2024 08:49:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E77E51F8; Mon, 12 Aug 2024 18:49:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Sunil V L Subject: [PATCH v1 4/7] serial: 8250_platform: Tidy up ACPI ID table Date: Mon, 12 Aug 2024 18:47:06 +0300 Message-ID: <20240812154901.1068407-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> References: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Tidy up ACPI ID table: - remove explicit driver_data initializer - drop comma in the terminator entry - use C comment style Signed-off-by: Andy Shevchenko Reviewed-by: Sunil V L Tested-by: Sunil V L --- drivers/tty/serial/8250/8250_platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index 937eea3ebdea..38c083e90a7d 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -261,8 +261,8 @@ static int serial8250_resume(struct platform_device *de= v) } =20 static const struct acpi_device_id acpi_platform_serial_table[] =3D { - { "RSCV0003", 0 }, // RISC-V Generic 16550A UART - { }, + { "RSCV0003" }, /* RISC-V Generic 16550A UART */ + { } }; MODULE_DEVICE_TABLE(acpi, acpi_platform_serial_table); =20 --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Sat Feb 7 15:40:03 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00A44187335; Mon, 12 Aug 2024 15:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477751; cv=none; b=q8RjZsEGcfeKxQpvryZIt8f6Rjc2/IAinqrTIS9Q6OcYzBfiZuu0R8Inl5il90Z+MBveiYQqhcAQJqfuLe79Div7AcpHaKIHbSn1u9qQxoLXZ7tmRUTfRQ7fTSFFWSJUxL7vQV+Iodog5BntnIahn47nqM0Bq6BY9ZmA0O+TPXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477751; c=relaxed/simple; bh=v1aKmaKDjfQ1nkB08b03HKu7SColpuAKnONgllNWMKk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QBjJ9856YjEBfYyQcWM7oqYUYdfH6TugEbY7M7WQVZwsXWfv5JYxBJXiTXPx6gHSZ+ypDgmerBPFoeecDIv5v7bcn4v/mp9VYt5RTW/P3QrqtNappYRnnQbr8yPV2SZXa3MfiIFjJllTS7x5cubjAnQs5yyA0ik5QEmPKga/uhw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mUmMqlbU; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mUmMqlbU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723477750; x=1755013750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=v1aKmaKDjfQ1nkB08b03HKu7SColpuAKnONgllNWMKk=; b=mUmMqlbU1gXDKfKtBi23tCe1geUAnxWLUSOj419G/kkn309s2IcJMBox 7XLX07lb0kjwdx1Bu0J1G0JacQh28eMh6IeVXgCCWfbbUl5kytbcne8Yx O4IY3XH4DUAJDGcLXrVZIUyKvT+1Vv7N0DYXV9UYGU/EcNsVEBPZZs8p7 zqy+t7T6fK3Wd5XS7buwE/85SaCfmmM2mHeHwh6EXy9305IHMl2Z1G2A7 SstEA11xgp4Ts8ab7TIcRuPzfXTFV6z4qFGFTE3MPk92mJipvvXWFNv78 1spNDxDRvr4M5EeXvGESro/FDQpOhQutY9hlUhGJhK1PDwBQ9rtIU3QEj w==; X-CSE-ConnectionGUID: vAGsGFJ1TV2a8fxkb8Olrg== X-CSE-MsgGUID: VQh6X89iQWGcWED08+IQng== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="46998258" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="46998258" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:49:08 -0700 X-CSE-ConnectionGUID: Ly4jLttLSSi9EMzABno8zw== X-CSE-MsgGUID: F5frStfRQe+xFBu2N06K3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="62959181" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 12 Aug 2024 08:49:06 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EF6DD45C; Mon, 12 Aug 2024 18:49:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Sunil V L Subject: [PATCH v1 5/7] serial: 8250_platform: Switch to use platform_get_mem_or_io() Date: Mon, 12 Aug 2024 18:47:07 +0300 Message-ID: <20240812154901.1068407-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> References: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Switch to use new platform_get_mem_or_io() instead of home grown analogue. Signed-off-by: Andy Shevchenko Reviewed-by: Sunil V L Tested-by: Sunil V L --- drivers/tty/serial/8250/8250_platform.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index 38c083e90a7d..4a26bab8c9bd 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -113,21 +113,23 @@ static int serial8250_platform_probe(struct platform_= device *pdev) unsigned char iotype; int ret, line; =20 - regs =3D platform_get_resource(pdev, IORESOURCE_IO, 0); - if (regs) { + regs =3D platform_get_mem_or_io(pdev, 0); + if (!regs) + return dev_err_probe(dev, -EINVAL, "no registers defined\n"); + + switch (resource_type(regs)) { + case IORESOURCE_IO: uart.port.iobase =3D regs->start; iotype =3D UPIO_PORT; - } else { - regs =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!regs) { - dev_err(dev, "no registers defined\n"); - return -EINVAL; - } - + break; + case IORESOURCE_MEM: uart.port.mapbase =3D regs->start; uart.port.mapsize =3D resource_size(regs); uart.port.flags =3D UPF_IOREMAP; iotype =3D UPIO_MEM; + break; + default: + return -EINVAL; } =20 /* Default clock frequency*/ --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Sat Feb 7 15:40:03 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCAE2187324; Mon, 12 Aug 2024 15:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477751; cv=none; b=Vxg/LD4Zd/9RV8IN1Ahlr3c4GD8jeBJI/z6tQgDsi6JLeBqtyRGBpbNJsbSlyK8KROr6yTABsBcF0cTvZmgo7Vn5krq9OdB5cTl8nj2FBSwyywQEJynTWv4OpY1/e9B+8Ve/SMMomrBSsqJExooOeFZeqxRMkuVwJgt3sWFlVZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477751; c=relaxed/simple; bh=4f2n6tDGiE+OAUIB4DKYZtverVwdklVZKXNEQN+AMCo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pL43+sivgMi2MHL4w30I40dTetX6+QbjwcxauFeVFUrbzwKYEoTaCsVAjhkfQb295VE40eF0eMzds1mH9/AhQbwwbZm5tZ9QeBGRSbKjdUuCOJYeyI2Te11inB3D/jE1AmQNuf53vXhb4Kv+7/yPyazXdZqdk6zktoxV9vJE4/w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JRpozE+m; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JRpozE+m" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723477750; x=1755013750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4f2n6tDGiE+OAUIB4DKYZtverVwdklVZKXNEQN+AMCo=; b=JRpozE+mr2KhjZpQclyBMnwDDLwUM2MkzQGSwtXoEYzd7fkHjLunZlFr A1OZEQevxDOdGfGXJxeQ/BHW8T2M+HeQ41QoBEg8FuGNjmcBhwE7nXEiZ 7WDdfl3ZFK+1V/Y5zG/VgN+Ah5BNOCwStGAHKJRoLCcNfiEtsjMmXTJDZ nk9buktZZV30Zks2L2MPPlZNF/Msun2vHRxEZGuHDUYweTuY5j6PYD27P 9Faa0QZSk9s2fzDAQXeqt6HzkcFWel1syRk/QKgYJq3oi5Sk8BG+xfNJa iyQ2FKSSdZj1ZbHu1C2Axz/PXKqipKQmIdOsseMkQFpLYJi4BupU6iyrZ g==; X-CSE-ConnectionGUID: 6+5KQFliRemg4df7iMw3yg== X-CSE-MsgGUID: 0OPoz2aSSSqQLV+kttzfHQ== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="46998253" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="46998253" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:49:08 -0700 X-CSE-ConnectionGUID: DL9kg1V8TH2p83PYWilVzQ== X-CSE-MsgGUID: /OFnkct1QHuvkTj5584ABQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="62959180" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa004.fm.intel.com with ESMTP; 12 Aug 2024 08:49:06 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 074736D3; Mon, 12 Aug 2024 18:49:02 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Sunil V L Subject: [PATCH v1 6/7] serial: 8250_platform: Refactor serial8250_probe() Date: Mon, 12 Aug 2024 18:47:08 +0300 Message-ID: <20240812154901.1068407-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> References: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make it clear that it supports two cases, pure platform device and ACPI. With this in mind, split serial8250_probe() to two functions and rename the ACPI case accordingly. Signed-off-by: Andy Shevchenko Reviewed-by: Sunil V L Tested-by: Sunil V L --- drivers/tty/serial/8250/8250_platform.c | 43 ++++++++++++++++--------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index 4a26bab8c9bd..f4a0731ff134 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -105,7 +105,7 @@ void __init serial8250_isa_init_ports(void) /* * Generic 16550A platform devices */ -static int serial8250_platform_probe(struct platform_device *pdev) +static int serial8250_probe_acpi(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; struct uart_8250_port uart =3D { }; @@ -157,25 +157,11 @@ static int serial8250_platform_probe(struct platform_= device *pdev) return 0; } =20 -/* - * Register a set of serial devices attached to a platform device. The - * list is terminated with a zero flags entry, which means we expect - * all entries to have at least UPF_BOOT_AUTOCONF set. - */ -static int serial8250_probe(struct platform_device *dev) +static int serial8250_probe_platform(struct platform_device *dev, struct p= lat_serial8250_port *p) { - struct plat_serial8250_port *p =3D dev_get_platdata(&dev->dev); struct uart_8250_port uart; int ret, i, irqflag =3D 0; =20 - /* - * Probe platform UART devices defined using standard hardware - * discovery mechanism like ACPI or DT. Support only ACPI based - * serial device for now. - */ - if (!p && has_acpi_companion(&dev->dev)) - return serial8250_platform_probe(dev); - memset(&uart, 0, sizeof(uart)); =20 if (share_irqs) @@ -219,6 +205,31 @@ static int serial8250_probe(struct platform_device *de= v) return 0; } =20 +/* + * Register a set of serial devices attached to a platform device. The + * list is terminated with a zero flags entry, which means we expect + * all entries to have at least UPF_BOOT_AUTOCONF set. + */ +static int serial8250_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct plat_serial8250_port *p; + + p =3D dev_get_platdata(dev); + if (p) + return serial8250_probe_platform(pdev, p); + + /* + * Probe platform UART devices defined using standard hardware + * discovery mechanism like ACPI or DT. Support only ACPI based + * serial device for now. + */ + if (has_acpi_companion(dev)) + return serial8250_probe_acpi(pdev); + + return 0; +} + /* * Remove serial ports registered against a platform device. */ --=20 2.43.0.rc1.1336.g36b5255a03ac From nobody Sat Feb 7 15:40:03 2026 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FE51186298; Mon, 12 Aug 2024 15:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477749; cv=none; b=LA/XnK5dy83pCSTEQ0+cX6heBNAcVseDqVwdro6HoQ/0DWD3vVnoXkQEqB/MJ/xYR/Hk2tYelKNVLiqjZfRlm9Or4bPoCQoY/mNiMO1WGNCdFcdMJ1JFybz0ZV03p5OjDV14/WCPZHnUNyS57/P7mGXwUsmLpSCe1NSaSmfkSho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723477749; c=relaxed/simple; bh=nTJueB6tgQfuqsoeCX67y92PwedAzw7ogpVO79oK5Kc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s4FoXfh4fXS6rqyBSqq9eyZt5VbFizBCT8b2k+/JsTY8mJb9NFRPgBuINqZrswNjNCMfqQNL7e9drCN1PA22h3otI4m+aVvE/eYSIFYiqwOE7hAtFjNsHvHu7/ae/Wen9QlIfS0hyGVBCuoF9EZxB/WH945zexCQvi2A88IbdYs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LuGryWLQ; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LuGryWLQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723477748; x=1755013748; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nTJueB6tgQfuqsoeCX67y92PwedAzw7ogpVO79oK5Kc=; b=LuGryWLQ1uncwVDd45NBBKbvft85zNVUArrpR6h+MoGF1Pphex2hUXk4 36/rBB7pZWDX+cZQ26i7sFtERfTn2wyA+fJ8AZIItB0F8z0BRRrad43In d1PFOvPc8O5XFG5O8tvJkuFN7LuTy+EtOErQnooA03Nt3SM25bZv0Yc1+ 8O79h+zPHuX/QcRB/K5wjA3uUrz//cgylrV6WqW7AlAdgfExwmt3Y3rXL NZivxA0Uj3tmmS0jcMDulvAq/ShkYWlCqHG7aaJc4DaHZkG/vIggHfC0X mnZHUOlIIGz+tFoFmV9Jjuk0c3lrmGTvpyhSj151AQJf4b/jFDFzIzHBB g==; X-CSE-ConnectionGUID: /nsK80HeQemny4YLCGIaHA== X-CSE-MsgGUID: YrVRa3D9SYOUSXmbVmVVdw== X-IronPort-AV: E=McAfee;i="6700,10204,11162"; a="21160808" X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="21160808" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2024 08:49:08 -0700 X-CSE-ConnectionGUID: bR+hjvaFQeiXfZ9FXCVycA== X-CSE-MsgGUID: bPeC7LZGTNukLtjl9AZbIA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,283,1716274800"; d="scan'208";a="58187005" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa010.jf.intel.com with ESMTP; 12 Aug 2024 08:49:07 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1064B858; Mon, 12 Aug 2024 18:49:03 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Sunil V L Subject: [PATCH v1 7/7] serial: 8250_platform: Unify comment style Date: Mon, 12 Aug 2024 18:47:09 +0300 Message-ID: <20240812154901.1068407-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> References: <20240812154901.1068407-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Unify comment style and fix indentation in some cases. While at it, add that it supports ACPI enumerated non-PNP devices. Signed-off-by: Andy Shevchenko Reviewed-by: Sunil V L Tested-by: Sunil V L --- drivers/tty/serial/8250/8250_platform.c | 35 ++++++++++++++----------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8= 250/8250_platform.c index f4a0731ff134..30b4d12ab05b 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -2,7 +2,9 @@ /* * Universal/legacy platform driver for 8250/16550-type serial ports * - * Supports: ISA-compatible 8250/16550 ports + * Supports: + * ISA-compatible 8250/16550 ports + * ACPI 8250/16550 ports * PNP 8250/16550 ports * "serial8250" platform devices */ @@ -24,9 +26,9 @@ =20 /* * Configuration: - * share_irqs Whether we pass IRQF_SHARED to request_irq(). + * share_irqs: Whether we pass IRQF_SHARED to request_irq(). * This option is unsafe when used on edge-triggered inter= rupts. - * skip_txen_test Force skip of txen test at init time. + * skip_txen_test: Force skip of txen test at init time. */ unsigned int share_irqs =3D SERIAL8250_SHARE_IRQS; unsigned int skip_txen_test; @@ -63,9 +65,9 @@ static void __init __serial8250_isa_init_ports(void) nr_uarts =3D UART_NR; =20 /* - * Set up initial isa ports based on nr_uart module param, or else + * Set up initial ISA ports based on nr_uart module param, or else * default to CONFIG_SERIAL_8250_RUNTIME_UARTS. Note that we do not - * need to increase nr_uarts when setting up the initial isa ports. + * need to increase nr_uarts when setting up the initial ISA ports. */ for (i =3D 0; i < nr_uarts; i++) serial8250_setup_port(i); @@ -132,11 +134,12 @@ static int serial8250_probe_acpi(struct platform_devi= ce *pdev) return -EINVAL; } =20 - /* Default clock frequency*/ + /* default clock frequency */ uart.port.uartclk =3D 1843200; uart.port.type =3D PORT_16550A; uart.port.dev =3D &pdev->dev; uart.port.flags |=3D UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; + ret =3D uart_read_and_validate_port_properties(&uart.port); /* no interrupt -> fall back to polling */ if (ret =3D=3D -ENXIO) @@ -206,8 +209,8 @@ static int serial8250_probe_platform(struct platform_de= vice *dev, struct plat_se } =20 /* - * Register a set of serial devices attached to a platform device. The - * list is terminated with a zero flags entry, which means we expect + * Register a set of serial devices attached to a platform device. + * The list is terminated with a zero flags entry, which means we expect * all entries to have at least UPF_BOOT_AUTOCONF set. */ static int serial8250_probe(struct platform_device *pdev) @@ -292,7 +295,7 @@ static struct platform_driver serial8250_isa_driver =3D= { =20 /* * This "device" covers _all_ ISA 8250-compatible serial devices listed - * in the table in include/asm/serial.h + * in the table in include/asm/serial.h. */ struct platform_device *serial8250_isa_devs; =20 @@ -321,8 +324,7 @@ static int __init serial8250_init(void) if (ret) goto unreg_uart_drv; =20 - serial8250_isa_devs =3D platform_device_alloc("serial8250", - PLAT8250_DEV_LEGACY); + serial8250_isa_devs =3D platform_device_alloc("serial8250", PLAT8250_DEV_= LEGACY); if (!serial8250_isa_devs) { ret =3D -ENOMEM; goto unreg_pnp; @@ -361,7 +363,7 @@ static void __exit serial8250_exit(void) /* * This tells serial8250_unregister_port() not to re-register * the ports (thereby making serial8250_isa_driver permanently - * in use.) + * in use). */ serial8250_isa_devs =3D NULL; =20 @@ -394,12 +396,13 @@ MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); =20 #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS #ifndef MODULE -/* This module was renamed to 8250_core in 3.7. Keep the old "8250" name - * working as well for the module options so we don't break people. We +/* + * This module was renamed to 8250_core in 3.7. Keep the old "8250" name + * working as well for the module options so we don't break people. We * need to keep the names identical and the convenient macros will happily * refuse to let us do that by failing the build with redefinition errors - * of global variables. So we stick them inside a dummy function to avoid - * those conflicts. The options still get parsed, and the redefined + * of global variables. So we stick them inside a dummy function to avoid + * those conflicts. The options still get parsed, and the redefined * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive. * * This is hacky. I'm sorry. --=20 2.43.0.rc1.1336.g36b5255a03ac