Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp630529rdb; Thu, 15 Feb 2024 10:14:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUZsZLO8tMQnkTx6RIBAoUBeU8Ehpe/d0h8PhuUILNJjosL0ITeI0V3feA77hA8bEVwvQVeEKMmUIKWW9gWr2xklkhOZDgdotbhtjO/cg== X-Google-Smtp-Source: AGHT+IG5LDMs8joaSHVPDvAKLN3EpgcB0+uD4kyLBzIN7WjZVnyb/+IoObJy93US5VA0DpnRecOd X-Received: by 2002:a17:902:e807:b0:1db:68cc:61fd with SMTP id u7-20020a170902e80700b001db68cc61fdmr3211058plg.18.1708020876104; Thu, 15 Feb 2024 10:14:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708020876; cv=pass; d=google.com; s=arc-20160816; b=ckZj/QkzieldxEQRSS/cFKnh+/tLwN/wuwr8n5iWfEGVECqlWRQeS0lASZLomdrIxf 9xlVvTFcQgq+c1cnQbGsq6UxEL2FEDL2m9MqakoLcbErYnKFfr5pMPcn7rwFlZEbTxbW YjIiLe7lKCIGgFSAzjTKXkb3L/KKWgTKOcSl95g8wJEOf8mUPnXiPvBOeHPSDpXMvgXs d149N9yR2qUGyEXp8h0o5SR3yFEL6T+uR6uADqJLwksAJT+rzZE8Z0zO2n/ntVOeMNXz f0L1ATmMgM6yitfiXZ9TGgW8zU8RlV115Rb2nOaGkfhQ+FApaXNsWvpxkPjcvNiBwc5X yqaQ== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m15-20020a170902f64f00b001db4cb15c67si1499596plg.498.2024.02.15.10.14.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 10:14:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67257-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67257-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B411FB27AA5 for ; Thu, 15 Feb 2024 16:04:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B4131353F0; Thu, 15 Feb 2024 16:02:46 +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 Content-Transfer-Encoding: 8bit Replace custom unit definitions that are available via units.h. Signed-off-by: Andy Shevchenko --- 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 { -- 2.43.0.rc1.1.gbec44491f096