Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Oct 2019 12:10:27 +0100
From:      Emmanuel Vadot <manu@bidouilliste.com>
To:        Sleep Walker <s199p.wa1k9r@gmail.com>
Cc:        freebsd-arm@freebsd.org, mmel@freebsd.org
Subject:   Re: FreeBSD 13-CURRENT download status on RK3399 SBC`s
Message-ID:  <20191028121027.8c89aef2a2809cd844ccad80@bidouilliste.com>
In-Reply-To: <CAHa8N8_s5Q2kgoMBnOtN3-QnJNaKWX13yDVOdVOOkcR-_Wfkjg@mail.gmail.com>
References:  <CAHa8N8_s5Q2kgoMBnOtN3-QnJNaKWX13yDVOdVOOkcR-_Wfkjg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 28 Oct 2019 13:57:57 +0300
Sleep Walker <s199p.wa1k9r@gmail.com> wrote:

> Hi All!
> 
> On Khadas-EDGE-V
> 
>    - mainline uboot U-Boot TPL 2019.10-rc3
>    - bootup from SD
>    - eth OK
>    - uart OK
>    - emmc OK
>    - sd OK
>    - USB 2.0 OK
>    -  USB 3.0 OK
>    - USB HID OK
>    - USB DISK OK

 Good to know that everything is working on this board too.

> 
> On Rock Pi4
> 
> UEFI booting, very cool.
> 
> But I can not log into the console.
> 
> it seems it keeps rebooting.
> 
> Here is the log:
> https://pastebin.com/JFX7Ssnz

 This is known. Let me try to describe the problem.
 So the sd and emmc clock have multiple possible parent, one of them is
the usb clock that is generated by the usb controller. The problem is
that when we create the clock domain of the CRU (Clock and Reset
Unit) the usb controller isn't probed yet because it needs clock from
the CRU. When a clock domain is finished (by calling clkdom_finit) we
need all the clocks to be present so we cannot add the unknown for now
usb clock.
 So to fix this issue we need a way to create a fake clock when the CRU
clock domain is created that will be later replaced by the usb
controller. There is multiple approch to this and I'm not yet sure
which one will work best.

 1) We allow to list non-existing clock as parent and don't throw
errors anymore at clkdom_finit but at some SYSINIT.
 This will work well with a big static kernel but not if the clock is
created by a kernel module.
 2) We create some fake clock domain where we can add clocks to it so
it became a somewhat valid parent (but not usable so you cannot select
it with clknode_set_parent for example) and when a clock domain is
finished we remove clock from the fake domain that are present in the
newly created one (as clock names are unique this should not cause
problem). The question is then what should we do when we still have
clock in the fake domain ?

 Maybe mmel@ have more ideas.

-- 
Emmanuel Vadot <manu@bidouilliste.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191028121027.8c89aef2a2809cd844ccad80>