From patchwork Thu Feb 15 16:02:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 201720 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp78033dyb; Thu, 15 Feb 2024 11:41:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVxBIBf8UU7ihSAOCOzstlm1oP4f+96g2tuzCF94hfzMtSPbecigGAuImGv4p2xtv3tlaTJu7oojA3DorP5LGJCYa0ncA== X-Google-Smtp-Source: AGHT+IHiiddflOyMcQXiaVh2sy8m9/cQZjoDX37SEcDOf3Td+7ZY50tyDBgRSnIqQ//tg7G/DRbk X-Received: by 2002:a17:906:370b:b0:a3d:254d:5aaa with SMTP id d11-20020a170906370b00b00a3d254d5aaamr2033652ejc.63.1708026088326; Thu, 15 Feb 2024 11:41:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708026088; cv=pass; d=google.com; s=arc-20160816; b=KLLXeT+8f+xArJmXWBmvUnRnq1mftgNii0gpH4BQc929Jya2WviAUyeQrzN7c/cI5z i2JjEDwX7uWYC0nN3JEA9O9q7Sy9a6LGbuzue2H8dANWwNsy5O0tW9d0e2g0L1wQ3GsK BWcJKjQOUJ4Vc9Dh9e7EWbT7nhEyc7yeo+X95pif0d7UfDKpwbCi+lRQkJqFPp5U2oPX MurZTKUobxorwJtV+pgAvoeZhUGyjc/i0gn7pVXVdkZ5bsLfmvWSOXYa2FqvgwMX7dB7 voeAQCStgYuuIQ+hVtoizYYX3UToWVho23KS39Zf4fpv2vgSh5nypaXhCr9ej7VbfR54 vpLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=OldPF9L+rY5w0i+Q9TdCR/46BzeuB7xYpR4MSBUWcOM=; fh=YAgezEXqsUq+pvDV68VSBvrjcIzrj3qB20PyjMqeSHk=; b=Zvy1uTAGsRpsuLhdZiMBGBM6gNsSOzEdZLL6ppbqfV2u41ucIXh0pjYhwETmBVqkuh PhTdhtRthVR3QtthBEdWkxV2rRh85+tIgDWtWp2MIbn8fJnlqNAptIyyvKe9KSXG6/Lu VQF/L7Np6SC9GZvrCB9hYUmASh6FTZYp2aN5rIbMNySe6UsFo4CEEXaT/h+z7E4u98sk 9dHj9rcQq+lLpM2E5SZpPhBAG6cZzDvXa199k6moi3D8FqHZ03/Cr3o7syVDkOzM51dA oRxH5yBzicjxxHYqK3rC0i9OzlrfDFiQRq+QwM/QqGAc2nPSpnorbj8HXlJ01OCGTg/P H1PA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AvvRB9ip; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-67257-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67257-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lo19-20020a170906fa1300b00a3d39b3cf35si880849ejb.331.2024.02.15.11.41.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 11:41:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67257-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AvvRB9ip; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-67257-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67257-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id BD8291F25F58 for ; Thu, 15 Feb 2024 16:04:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57F971353FE; Thu, 15 Feb 2024 16:02:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AvvRB9ip" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 12015134CDD; Thu, 15 Feb 2024 16:02:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012965; cv=none; b=n4QffQSPGyT9xO/96rst4auUuW8iY55SZVQD+P/QORNOqzkLXQsJbyYDONgjUUrGLga3cXJf39ZjhZp/BOWra6UvQWStUMxZS2/OskqVDBLpePezr/qpxom1BBNNnEiKm19SjqKYpJOvd8r9def0GGxWpKTLG0yzj+6KrU0O5jg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708012965; c=relaxed/simple; bh=ge/zuWB1BjZSun2O80x3sHKgvzwxKxsHTgxhF2+KWu8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WFcaeIqNmSp5ZUlgM5lkG5STL53/ScE4tSPsnXtmeHNKmN+lUEPziHkf4YAvrUElSsGQcNxxlDKnvxkjLOtZ0HWXXsjG0U+JyrQAQlLyob9QrvIs1sf3EaTe4nIIAMi4SsHaP9iOYYO88NQie541afqbGzExwfGCKcfTGUeYR5Q= 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=AvvRB9ip; arc=none smtp.client-ip=198.175.65.10 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708012965; x=1739548965; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ge/zuWB1BjZSun2O80x3sHKgvzwxKxsHTgxhF2+KWu8=; b=AvvRB9ipm2VovBhACaqhXNciyHsepHb41AXcPSPGv9LrvQAnruXGP7cW H+xROfhSo423E+WHmQeJwHcTQNBoB3JQp1kNckuLU5Asd7HLYmHSHz706 rHTFvutW8yL8lRE+/iH9jPmXdhSPr+H/6X6B/tO0zOy7OQkNNu7JOQ3pC LgqETMu+azO1QV1ucKfFMJerwIVpL5oz7WLfZmMXPjZZCkU77JmQcIlLV wAxffkxjhLZMtFCl2WUVfMCLd/9w5+x3KqGa40WCK00COZvvQH4mYMW3z /wxeAqQSLdJgdqcBhPaTqYDCtRq+nvXBufovhurMTD7mab43V/gr2yUal g==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="19525816" X-IronPort-AV: E=Sophos;i="6.06,162,1705392000"; d="scan'208";a="19525816" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2024 08:02:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="935684857" X-IronPort-AV: E=Sophos;i="6.06,162,1705392000"; d="scan'208";a="935684857" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 15 Feb 2024 08:02:37 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id DBD95204; Thu, 15 Feb 2024 18:02:35 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Al Cooper , Broadcom internal kernel review list , Jiri Slaby , Andy Shevchenko Subject: [PATCH v1 1/1] serial: 8250_bcm7271: Replace custom unit definitions Date: Thu, 15 Feb 2024 18:02:34 +0200 Message-ID: <20240215160234.653305-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790993952546123785 X-GMAIL-MSGID: 1790995163390447229 Replace custom unit definitions that are available via units.h. Signed-off-by: Andy Shevchenko Reviewed-by: Florian Fainelli --- drivers/tty/serial/8250/8250_bcm7271.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c index 504c4c020857..1532fa2e8ec4 100644 --- a/drivers/tty/serial/8250/8250_bcm7271.c +++ b/drivers/tty/serial/8250/8250_bcm7271.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "8250.h" @@ -187,21 +188,19 @@ #define TX_BUF_SIZE 4096 #define RX_BUF_SIZE 4096 #define RX_BUFS_COUNT 2 -#define KHZ 1000 -#define MHZ(x) ((x) * KHZ * KHZ) static const u32 brcmstb_rate_table[] = { - MHZ(81), - MHZ(108), - MHZ(64), /* Actually 64285715 for some chips */ - MHZ(48), + 81 * HZ_PER_MHZ, + 108 * HZ_PER_MHZ, + 64 * HZ_PER_MHZ, /* Actually 64285715 for some chips */ + 48 * HZ_PER_MHZ, }; static const u32 brcmstb_rate_table_7278[] = { - MHZ(81), - MHZ(108), + 81 * HZ_PER_MHZ, + 108 * HZ_PER_MHZ, 0, - MHZ(48), + 48 * HZ_PER_MHZ, }; struct brcmuart_priv {