From owner-dev-commits-src-main@freebsd.org Wed Jul 21 01:51:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D96B3657C62; Wed, 21 Jul 2021 01:51:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GTz8l2QpMz4TDF; Wed, 21 Jul 2021 01:51:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C4DA158E0; Wed, 21 Jul 2021 01:51:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16L1ppLI027241; Wed, 21 Jul 2021 01:51:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16L1pp0V027240; Wed, 21 Jul 2021 01:51:51 GMT (envelope-from git) Date: Wed, 21 Jul 2021 01:51:51 GMT Message-Id: <202107210151.16L1pp0V027240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 4c4a6884ad7f - main - cgem: Add support for the SiFive FU740 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c4a6884ad7fb18b0777597a4f6c2cdb235dccb6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2021 01:51:52 -0000 The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=4c4a6884ad7fb18b0777597a4f6c2cdb235dccb6 commit 4c4a6884ad7fb18b0777597a4f6c2cdb235dccb6 Author: Jessica Clarke AuthorDate: 2021-07-21 01:44:38 +0000 Commit: Jessica Clarke CommitDate: 2021-07-21 01:51:25 +0000 cgem: Add support for the SiFive FU740 Note that currently Linux's device tree uses the FU540's compatible string, as does upstream U-Boot, but the U-Boot shipped with the board based on an older patch series has the correct FU740 name. Thankfully they are the same, at least as far as software is concerned. Whilst here, fix a style(9) nit. Reviewed by: philip, kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31034 --- sys/dev/cadence/if_cgem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c index 0583e846458a..6001c5ba74a5 100644 --- a/sys/dev/cadence/if_cgem.c +++ b/sys/dev/cadence/if_cgem.c @@ -105,12 +105,13 @@ __FBSDID("$FreeBSD$"); #define HWTYPE_GENERIC_GEM 1 #define HWTYPE_ZYNQ 2 #define HWTYPE_ZYNQMP 3 -#define HWTYPE_SIFIVE_FU540 4 +#define HWTYPE_SIFIVE 4 static struct ofw_compat_data compat_data[] = { { "cdns,zynq-gem", HWTYPE_ZYNQ }, { "cdns,zynqmp-gem", HWTYPE_ZYNQMP }, - { "sifive,fu540-c000-gem", HWTYPE_SIFIVE_FU540 }, + { "sifive,fu540-c000-gem", HWTYPE_SIFIVE }, + { "sifive,fu740-c000-gem", HWTYPE_SIFIVE }, { "cdns,gem", HWTYPE_GENERIC_GEM }, { "cadence,gem", HWTYPE_GENERIC_GEM }, { NULL, 0 } @@ -1762,8 +1763,7 @@ cgem_attach(device_t dev) "could not retrieve reference clock.\n"); else if (clk_enable(sc->ref_clk) != 0) device_printf(dev, "could not enable clock.\n"); - } - else if (hwtype == HWTYPE_SIFIVE_FU540) { + } else if (hwtype == HWTYPE_SIFIVE) { if (clk_get_by_ofw_name(dev, 0, "pclk", &sc->ref_clk) != 0) device_printf(dev, "could not retrieve reference clock.\n");