lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200401153513.423683-1-mylene.josserand@collabora.com>
Date:   Wed,  1 Apr 2020 17:35:11 +0200
From:   Mylène Josserand 
        <mylene.josserand@...labora.com>
To:     heiko@...ech.de, linux-arm-kernel@...ts.infradead.org,
        mturquette@...libre.com, sboyd@...nel.org
Cc:     linux-kernel@...r.kernel.org, linux-rockchip@...ts.infradead.org,
        linux-clk@...r.kernel.org, mylene.josserand@...labora.com,
        kernel@...labora.com, kever.yang@...k-chips.com,
        geert@...ux-m68k.org
Subject: [PATCH v2 0/2] ARM: Add Rockchip rk3288w support

Hello everyone,

Here is my V2 of my patches that add the support for the Rockchip
RK3288w which is a revision of the RK3288. It is mostly the same SOC
except for, at least, one clock tree which is different.
This difference is only known by looking at the BSP kernel [1].

Currently, the mainline kernel will not hang on rk3288w but it is
probably by "chance" because we got an issue on a lower kernel version.

According to Rockchip's U-Boot [2], the rk3288w can be detected using
the HDMI revision number (= 0x1A) in this version of the SOC.
Not to rely on U-Boot about the compatible, the patch 01 will handle
the detection of the HDMI version.

In this V2, the revision's detection is done using soc_device
registration. Thanks to that, in case of other differences than the clock
tree, it will be possible to detect rk3288/rk3288w using the 'soc_device_match'
function.
The main issue was an ordering issue: my rk3288 driver was
registered too late to be able to act on the clock tree. This is fixed
by using an initcall in the clock driver. One possible way would be to
convert the clock driver into platform_driver but, as it is using
some common functions to all Rockchip's drivers, it would have been
necessary to update all others. Instead, using an initcall to post-pone
hclkvio clock's registration is enough to make everything work correctly
without a big change on the clock driver.

Changes since v1:
   - As suggested by Geert, update the HDMI detection by using all
   'soc_device' functions
   - Use 'soc_device_match' function to detect the revision in the
   clock driver
   - Create a function that registers hclkvio clocks later than others
   to be sure that RK3288 revision is read.

Best regards,
Mylène Josserand

[1] https://github.com/rockchip-linux/kernel/blob/develop-4.4/drivers/clk/rockchip/clk-rk3288.c#L960..L964
[2] https://github.com/rockchip-linux/u-boot/blob/next-dev/arch/arm/mach-rockchip/rk3288/rk3288.c#L378..L388

Mylène Josserand (2):
  soc: rockchip: Register a soc_device to retrieve revision
  clk: rockchip: rk3288: Handle clock tree for rk3288w

 drivers/clk/rockchip/clk-rk3288.c |  36 ++++++++-
 drivers/soc/rockchip/Makefile     |   1 +
 drivers/soc/rockchip/rk3288.c     | 125 ++++++++++++++++++++++++++++++
 3 files changed, 158 insertions(+), 4 deletions(-)
 create mode 100644 drivers/soc/rockchip/rk3288.c

-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ