Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-15 Thread Maxime Ripard
Hi Stefan, On Thu, Sep 15, 2022 at 01:30:02PM +0200, Stefan Wahren wrote: > Am 15.09.22 um 09:54 schrieb Maxime Ripard: > > On Wed, Sep 14, 2022 at 08:26:55PM +0200, Stefan Wahren wrote: > > > Am 14.09.22 um 20:14 schrieb Stephen Boyd: > > > > Quoting Stefan Wahren (2022-09-14 11:09:04) > > > > >

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-15 Thread Stefan Wahren
Hi Maxime, Am 15.09.22 um 09:54 schrieb Maxime Ripard: On Wed, Sep 14, 2022 at 08:26:55PM +0200, Stefan Wahren wrote: Am 14.09.22 um 20:14 schrieb Stephen Boyd: Quoting Stefan Wahren (2022-09-14 11:09:04) Am 14.09.22 um 20:05 schrieb Stephen Boyd: Quoting Stefan Wahren (2022-09-14 10:45:48)

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-15 Thread Maxime Ripard
Hi, On Wed, Sep 14, 2022 at 11:20:59AM -0700, Stephen Boyd wrote: > Quoting Stefan Wahren (2022-09-14 11:09:04) > > Am 14.09.22 um 20:05 schrieb Stephen Boyd: > > > Quoting Stefan Wahren (2022-09-14 10:45:48) > > >> Am 14.09.22 um 17:50 schrieb Stephen Boyd: > > >>> Furthermore, I wonder if even

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-15 Thread Maxime Ripard
On Wed, Sep 14, 2022 at 08:26:55PM +0200, Stefan Wahren wrote: > Am 14.09.22 um 20:14 schrieb Stephen Boyd: > > Quoting Stefan Wahren (2022-09-14 11:09:04) > > > Am 14.09.22 um 20:05 schrieb Stephen Boyd: > > > > Quoting Stefan Wahren (2022-09-14 10:45:48) > > > > > Am 14.09.22 um 17:50 schrieb

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-15 Thread Stefan Wahren
Hi Stephen, Am 14.09.22 um 20:20 schrieb Stephen Boyd: Quoting Stefan Wahren (2022-09-14 11:09:04) Am 14.09.22 um 20:05 schrieb Stephen Boyd: Quoting Stefan Wahren (2022-09-14 10:45:48) Am 14.09.22 um 17:50 schrieb Stephen Boyd: Furthermore, I wonder if even that part needs to be

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Stefan Wahren
Am 14.09.22 um 20:14 schrieb Stephen Boyd: Quoting Stefan Wahren (2022-09-14 11:09:04) Am 14.09.22 um 20:05 schrieb Stephen Boyd: Quoting Stefan Wahren (2022-09-14 10:45:48) Am 14.09.22 um 17:50 schrieb Stephen Boyd: Furthermore, I wonder if even that part needs to be implemented. Why not

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Stephen Boyd
Quoting Stefan Wahren (2022-09-14 11:09:04) > Am 14.09.22 um 20:05 schrieb Stephen Boyd: > > Quoting Stefan Wahren (2022-09-14 10:45:48) > >> Am 14.09.22 um 17:50 schrieb Stephen Boyd: > >>> Furthermore, I wonder if even that part needs to be implemented. Why > >>> not make a direct call to

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Stephen Boyd
Quoting Stefan Wahren (2022-09-14 11:09:04) > Am 14.09.22 um 20:05 schrieb Stephen Boyd: > > Quoting Stefan Wahren (2022-09-14 10:45:48) > >> Am 14.09.22 um 17:50 schrieb Stephen Boyd: > >>> Furthermore, I wonder if even that part needs to be implemented. Why > >>> not make a direct call to

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Stefan Wahren
Am 14.09.22 um 20:05 schrieb Stephen Boyd: Quoting Stefan Wahren (2022-09-14 10:45:48) Am 14.09.22 um 17:50 schrieb Stephen Boyd: Furthermore, I wonder if even that part needs to be implemented. Why not make a direct call to rpi_firmware_property() and get the max rate? All of that can live

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Stephen Boyd
Quoting Maxime Ripard (2022-09-14 09:15:02) > Hi Stephen, > > Thanks for reviewing that series > > On Wed, Sep 14, 2022 at 08:50:33AM -0700, Stephen Boyd wrote: > > Quoting Maxime Ripard (2022-08-15 08:31:24) > > > @@ -254,6 +255,33 @@ static int raspberrypi_fw_dumb_determine_rate(struct > > >

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Stephen Boyd
Quoting Stefan Wahren (2022-09-14 10:45:48) > Am 14.09.22 um 17:50 schrieb Stephen Boyd: > > > > Furthermore, I wonder if even that part needs to be implemented. Why > > not make a direct call to rpi_firmware_property() and get the max rate? > > All of that can live in the drm driver. Making it a

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Stefan Wahren
Hi, Am 14.09.22 um 17:50 schrieb Stephen Boyd: Quoting Maxime Ripard (2022-08-15 08:31:24) @@ -254,6 +255,33 @@ static int raspberrypi_fw_dumb_determine_rate(struct clk_hw *hw, return 0; } +unsigned long rpi_firmware_clk_get_max_rate(struct clk *clk) +{ + const struct

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Maxime Ripard
Hi Stephen, Thanks for reviewing that series On Wed, Sep 14, 2022 at 08:50:33AM -0700, Stephen Boyd wrote: > Quoting Maxime Ripard (2022-08-15 08:31:24) > > @@ -254,6 +255,33 @@ static int raspberrypi_fw_dumb_determine_rate(struct > > clk_hw *hw, > > return 0; > > } > > > > +unsigned

Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-09-14 Thread Stephen Boyd
Quoting Maxime Ripard (2022-08-15 08:31:24) > @@ -254,6 +255,33 @@ static int raspberrypi_fw_dumb_determine_rate(struct > clk_hw *hw, > return 0; > } > > +unsigned long rpi_firmware_clk_get_max_rate(struct clk *clk) > +{ > + const struct raspberrypi_clk_data *data; > +

[PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum

2022-08-15 Thread Maxime Ripard
The RaspberryPi firmware can be configured by the end user using the config.txt file. Some of these options will affect the kernel capabilities, and we thus need to be able to detect it to operate reliably. One of such parameters is the hdmi_enable_4kp60 parameter that will setup the clocks in a