From nobody Sat Jul 24 11:56:00 2021 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A2C2A12B6AE7 for ; Sat, 24 Jul 2021 11:56:12 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.blih.net [212.83.155.74]) (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 (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GX4Qh2ZFXz4brH for ; Sat, 24 Jul 2021 11:56:11 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1627127763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FRmG7l5qa5tLGYSHGMK1Tt7xGLPwzWQcQVg/AKSCiIg=; b=gd+8ZK72V3l4Gcyf8vvbtyYbjN2r8LOsFljxXAdnFE6RgkH62octnXPkAX1TyKr6O0/ICd rnDJzFNQ8UV+fzhfhTg9LBXu0XUCPnZBKTOLWEbM1fi6Osh1qSNFLLYILY4qedqwIJokWY i0mIZCVebAaPS9Avegn7Zfs8wfJARcE= Received: from skull.home.blih.net (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 92ade2e1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 24 Jul 2021 11:56:03 +0000 (UTC) Date: Sat, 24 Jul 2021 13:56:00 +0200 From: Emmanuel Vadot To: =?ISO-8859-1?Q?S=F8ren?= Schmidt Cc: Free BSD , Sleep Walker Subject: Re: Quartz64 (RK3566) clock driver and patches. Message-Id: <20210724135600.752789eaa83309c8ab256e1e@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4GX4Qh2ZFXz4brH X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_RCPT(0.00)[]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On Sat, 24 Jul 2021 13:26:07 +0200 S=F8ren Schmidt wrote: > Hi=20 >=20 > As promised, the clk driver I did for the RK3566 used on the Pine Quartz6= 4 board: >=20 > https://people.freebsd.org/~sos/Q64/ >=20 > Included the buld script, kernel config and u-boot I have used to get the= re. That will be much easier to review on phab, or even github PR or git send-email, basically anything else that this raw diff. I've only glance at it a bit and swa this : Index: sys/arm64/rockchip/clk/rk_clk_fract.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/arm64/rockchip/clk/rk_clk_fract.c (revision 570) +++ sys/arm64/rockchip/clk/rk_clk_fract.c (working copy) @@ -191,8 +191,12 @@ if (sc->denominator =3D=3D 0) { printf("%s: %s denominator is zero!\n", clknode_get_name(clk), __func__); +#if 0 *freq =3D 0; return(EINVAL); +#else + return (0); +#endif which I don't understand why it's needed. I won't look/comment at all the clocks definition in this form. > I still use the ?all inclusive? DTS and not the shiny new ?official? one = (last wont boot :) ) thats for later? What does that mean ? > Next on is a driver for the RK817 PMIC used on the quartz64? >=20 > Enjoy! >=20 > -- > S=F8ren Schmidt > sos@deepcore.dk / sos@freebsd.org > "So much code to hack, so little time" Cheers, --=20 Emmanuel Vadot