Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp764138ybh; Thu, 12 Mar 2020 10:40:04 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvoAri5dOsIcIAz/q6TsS/zIyI0RBUeWkR5oeO4pKwKuEg19w9t6/60kkz7K1rz2hXNrfa1 X-Received: by 2002:aca:5057:: with SMTP id e84mr3633644oib.120.1584034804109; Thu, 12 Mar 2020 10:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584034804; cv=none; d=google.com; s=arc-20160816; b=FQpcZZMFcjwn/eLmHJpNR74OWehYl8/oKHhYk88s3fpOQ2d1DQukyCJMlid815yolf 51XbWpweqRUgzsdgfsd/KDkPA/trQYhxUdSbZa7MnMjDi1kMnj2jZvUM+BRZfTIp05nV myKnxi6q1XbLzH3cRmz032QwkhrH8nWVxfxWcLIGAcJYdz12GNIusej9z37Kkb2+eZUi NVq/V2IONobCDwRr49TXCkpc9DDiL/LlSsfELYnMng1cKHIls7oPshVhj+jsh+PfAJNs 0hEFSHp4fFEX5qW8M/SurcnTa3TYokvRbas6nhBocv7DbOMX5HrBI94DcILfjxOk2PgP Be+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to:subject:cc:to:from :date; bh=R0WvVzfOqkr7+ti3f3TxCeGgqUAQt4A9bcHHdBdjI6g=; b=hWv3TI9YK7HEN6Pdxe/iiDvrx0RUKZHjxK7PVWByy0qIEXBu8PkaIAgwpq/ZiBDgJA OHEgZDwDDLgRngkXPtmIvE+l9ZsEWWImOZ8jJeD09JvEYLZh1nDTxupgrwNEzBk2M49F zSpyfizhbLpT5wOs9UeyEiRRMvSV1chVGMoJmxhN+Fnwrfz45yohP24Yip1W46qVOG9G 8ELp+NCkgI5vbjG2gF2aVjF8J24njll77dfKCOnA9KLVDMW3Ys4UY2ubS2X7H9FVESQT VajMJtYr4qgc3+OQRwqUL51RayJ4rXXRwbl/nJTbNg0MXogxZYwAkIOUH7exJ+lQ06yp 0wTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w134si3017770oif.238.2020.03.12.10.39.51; Thu, 12 Mar 2020 10:40:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726646AbgCLRjV (ORCPT + 99 others); Thu, 12 Mar 2020 13:39:21 -0400 Received: from foss.arm.com ([217.140.110.172]:38918 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726127AbgCLRjU (ORCPT ); Thu, 12 Mar 2020 13:39:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DDB8430E; Thu, 12 Mar 2020 10:39:19 -0700 (PDT) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 633BB3F6CF; Thu, 12 Mar 2020 10:39:19 -0700 (PDT) Date: Thu, 12 Mar 2020 17:39:17 +0000 From: Mark Brown To: Neil Armstrong Cc: broonie@kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Mark Brown , Sunny Luo , Yixun Lan Subject: Applied "spi: meson-spicc: support max 80MHz clock" to the spi tree In-Reply-To: <20200312133131.26430-5-narmstrong@baylibre.com> Message-Id: X-Patchwork-Hint: ignore Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch spi: meson-spicc: support max 80MHz clock has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 3196816ff64bb3a21fbda89e7355b6b87c3f50a0 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Thu, 12 Mar 2020 14:31:26 +0100 Subject: [PATCH] spi: meson-spicc: support max 80MHz clock The SPICC controller in Meson-AXG is capable of running at 80M clock. The ASIC IP is improved and the clock is actually running higher than previous old SoCs. Signed-off-by: Neil Armstrong Signed-off-by: Yixun Lan Signed-off-by: Sunny Luo Link: https://lore.kernel.org/r/20200312133131.26430-5-narmstrong@baylibre.com Signed-off-by: Mark Brown --- drivers/spi/spi-meson-spicc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c index bd434d9055d9..710b4e780daa 100644 --- a/drivers/spi/spi-meson-spicc.c +++ b/drivers/spi/spi-meson-spicc.c @@ -35,7 +35,6 @@ * to have a CS go down over the full transfer */ -#define SPICC_MAX_FREQ 30000000 #define SPICC_MAX_BURST 128 /* Register Map */ @@ -132,6 +131,7 @@ #define SPICC_FIFO_HALF 10 struct meson_spicc_data { + unsigned int max_speed_hz; bool has_oen; bool has_enhance_clk_div; }; @@ -693,11 +693,9 @@ static int meson_spicc_probe(struct platform_device *pdev) master->transfer_one = meson_spicc_transfer_one; master->use_gpio_descriptors = true; - /* Setup max rate according to the Meson GX datasheet */ - if ((rate >> 2) > SPICC_MAX_FREQ) - master->max_speed_hz = SPICC_MAX_FREQ; - else - master->max_speed_hz = rate >> 2; + /* Setup max rate according to the Meson datasheet */ + master->max_speed_hz = min_t(unsigned int, rate >> 1, + spicc->data->max_speed_hz); meson_spicc_oen_enable(spicc); @@ -737,9 +735,11 @@ static int meson_spicc_remove(struct platform_device *pdev) } static const struct meson_spicc_data meson_spicc_gx_data = { + .max_speed_hz = 30000000, }; static const struct meson_spicc_data meson_spicc_axg_data = { + .max_speed_hz = 80000000, .has_oen = true, .has_enhance_clk_div = true, }; -- 2.20.1