From nobody Sat Jul 24 12:10:56 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 8321112B9E75 for ; Sat, 24 Jul 2021 12:10:58 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GX4lk33t7z4fJq for ; Sat, 24 Jul 2021 12:10:58 +0000 (UTC) (envelope-from soren.schmidt@gmail.com) Received: by mail-wm1-x329.google.com with SMTP id u15-20020a05600c19cfb02902501bdb23cdso196501wmq.0 for ; Sat, 24 Jul 2021 05:10:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=YbVL100GVklGtFh6PBEZdym+mV4cp1djSOwMaPab9Jk=; b=XrNuAsJaCpyAFcBsumi9nVSb1WWBmG0fQx0/lDpSoqCSfVqzPner0rUJc6UHUC0+F/ JVLzfNXcrjtcHglHM2KoXRVOBKo70Z/ZbWEz+eXFcLVZhVdlmXQfTLutpVIYkBEeRZx9 PatLNh5UDlYGhlzxm3uArLK/pjhDe+5xYo3o/aOBnB1q84hrB7xfxTJng6UupNTwXWxz CGePcjewgz5iM8k4aEzfVisJu1kXdmriHeop/KVgBSXcjLPmInwfDGu+9yrKsyPNyTxR 89mYfScLf8HveGEsCR55KmDmFBL9eDfpL0SRdvp8wCdh0r8+p9dTUtRbGuZIbfrJ6IB5 E3Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=YbVL100GVklGtFh6PBEZdym+mV4cp1djSOwMaPab9Jk=; b=dmPi7TpU19+DNRziP9fIiMewxBTyXHgI4TwWBFyO2JeSzeUMGgP0wWOdwbEgdGd8jy 3evMFXY4KqCjVxfWUMbO/6ekLtEGJlCUL5wWP1qhuN5tewZuYMzZfOg5FQWZzpaRuwPJ 1PvYUm1BOvOwifxeGhXBPrcsOhGEUzHkK6SEFCQuhYhRkfXy5eFnJ4bK/WC/NOpdb5lG gc0NLqbIBNdAE9ZKa7CBy6wq5XmqH/rvP3FGQNhsf08ntHaRBV2PszJWoo3tGhOZQ0Ai iC6MUmSQ0K/hHIAEhxeNjdty//GAZj1DRAqn0KD53e4bS65VSc82uXGIany0tKdSh7hH xFXg== X-Gm-Message-State: AOAM531MFIsjT7Ia1PE0HogO6rVYsdDcs+UCpQMhpMq1U6VsYl/WVGeq r1AQgknT3eiTFDb8JTbdOA8= X-Google-Smtp-Source: ABdhPJzqy/qUAAsZKN1N0MXCIqRIqNa0DnnsdmPP7ZRqZYbsQ53vyD+wGiYlK+XRTIWHmWveQwdyKA== X-Received: by 2002:a05:600c:3581:: with SMTP id p1mr18685531wmq.150.1627128657025; Sat, 24 Jul 2021 05:10:57 -0700 (PDT) Received: from mac.deepcore.dk ([85.27.186.9]) by smtp.gmail.com with ESMTPSA id g138sm36371931wmg.32.2021.07.24.05.10.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Jul 2021 05:10:56 -0700 (PDT) From: =?utf-8?Q?S=C3=B8ren_Schmidt?= Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_E390B998-D9BF-4DB9-A54C-04DB7107F133" 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 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Quartz64 (RK3566) clock driver and patches. Date: Sat, 24 Jul 2021 14:10:56 +0200 In-Reply-To: <20210724135600.752789eaa83309c8ab256e1e@bidouilliste.com> Cc: Free BSD , Sleep Walker To: Emmanuel Vadot References: <20210724135600.752789eaa83309c8ab256e1e@bidouilliste.com> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Rspamd-Queue-Id: 4GX4lk33t7z4fJq 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)[]; TAGGED_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: Y --Apple-Mail=_E390B998-D9BF-4DB9-A54C-04DB7107F133 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 24 Jul 2021, at 13.56, Emmanuel Vadot wrote: >=20 > On Sat, 24 Jul 2021 13:26:07 +0200 > S=C3=B8ren Schmidt wrote: >=20 >> Hi=20 >>=20 >> As promised, the clk driver I did for the RK3566 used on the Pine = Quartz64 board: >>=20 >> https://people.freebsd.org/~sos/Q64/ = >>=20 >> Included the buld script, kernel config and u-boot I have used to get = there. >=20 > 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 >=20 > which I don't understand why it's needed. The denominator is defaulting to zero in the chip, and u-boot in its = current form doesn=E2=80=99t set a value -> panic.. > I won't look/comment at all the clocks definition in this form. I=E2=80=99m just sharing here in the good old fashioned way, I dont = force you to do anything :) >> I still use the ?all inclusive? DTS and not the shiny new ?official? = one (last wont boot :) ) thats for later? >=20 > What does that mean ? Good question, the dts derived from the DTB included with the rockchip = u-boot works just fine, but the latest greatest from the linux crowd = does not even produce the ---<>=E2=80=94- line, I havn=E2=80=99t = had time to look into it.. -- S=C3=B8ren Schmidt sos@deepcore.dk / sos@freebsd.org "So much code to hack, so little time" --Apple-Mail=_E390B998-D9BF-4DB9-A54C-04DB7107F133--