| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adoption of Linux commit:
| commit 1840518ae7de0e1eeb9075069cbe632fde16c88d
| Author: Richard Zhu <hongxing.zhu@nxp.com>
| Date: Mon Mar 15 16:17:47 2021 +0800
|
| clk: imx8mp: Remove the none exist pcie clocks
|
| In the i.MX8MP PCIe design, the PCIe PHY REF clock comes from external
| OSC or internal system PLL. It is configured in the IOMUX_GPR14 register
| directly, and can't be contolled by CCM at all.
| Remove the PCIE PHY clock from clock driver to clean up codes.
| There is only one PCIe in i.MX8MP, remove the none exist second PCIe
| related clocks.
| Remove the none exsits clocks IDs together.
|
| Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
| Reviewed-by: Jason Liu <jason.hui.liu@nxp.com>
| Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Needed for upcoming dts update to v5.13-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding -Wtype-limits to the build correctly detects that the
first branch (mfn < 0) is never taken as mfn is unsigned.
Import the Linux v5.11 bits that correctly checks the sign of the
sign/magnitude integer. Unlike Linux, we don't need to check
whether it's an i.MX1 or i.MX21 here, because an #ifdef earlier
normalizes the value to be aligned with the i.MX27's.
This however means that a multi-image barebox wasn't and will remain
not able to properly target both <= i.MX21 and newer SoCs at the same time.
This is just build-time tested.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
When CLK_SET_RATE_PARENT is set for a divider then clk_divider_bestdiv()
is called which returns the best parent rate. This best parent rate must
be fed into divider_get_val(), not the unchanged original parent rate.
Fixes: 47b432c697 ("clk: divider: export clk_div_mask() helper")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
<asm-generic/div64.h> isn't meant for direct usage as <asm/div64.h> may
override this on a per-architecture basis. We don't do that currently,
but in the future we might. Include the <linux/math64.h> instead.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
add "pll" and "oscillator" node to devicetree.
Signed-off-by: Du Huanpeng <u74147@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
| |
Linux logging this is justified, because it alerts to problems in the
boot firmware. barebox warning about it serves no real purpose other
than indicating that barebox was chainloaded. Make it a debug log
to not clutter the log.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Needed for the remoteproc driver on this SoC.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
strerrorp() is only used along with printf. We now have a format
specifier for printing error pointers directly, so use that and
remove strerrorp.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
| |
We have several macros for a oneline driver registration. Add some
missing and use them consistently where possible througout the tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
So far the clk_dump command can only print all clocks. With this patch
we can limit the output to ancestors and children of a given clock. This
makes it easier to find the desired information in big clock trees.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| | |
Fix typos.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This updates the clock driver to the Linux driver as of v5.9-rc1.
The patch is bigger than it needs to be, but this time care has been
taken to minimize the diff against the Linux driver to make future
updates easier.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add some function names used in Linux as define to the corresponding
functions in barebox. This is done to be able to use the Linux function
names in barebox in order to reduce the diff size between the barebox
and Linux clock drivers.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Needed for further clock driver updates, taken from Linux Kernel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Update clk-composite-8m to Linux as of v5.9-rc2. This is a combination
of Linux commits:
0e40198dc28b6 ("clk: imx: add imx8m_clk_hw_composite_bus")
f90b68d6c8b00 ("clk: imx: add mux ops for i.MX8M composite clk")
62668b68dc8e7 ("clk: imx: composite-8m: add imx8m_clk_hw_composite_core")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The CPU clock should never be disabled, mark it as critical as done in
the Kernel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
The printfs were never meant to go upstream. Remove them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| | |
arrays of pointers to strings should be of type const char * const *,
so that not only the arrays of pointers are const, but also the strings.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| | |
Use do_div() to avoid undefined references to `__aeabi_uldivmod'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The upstream implementation passes the clock's parent_names as an
address of a local array to the core. That's ok because data contained
in struct clk_init_data is duplicated and stored with a proper lifetime.
We don't have that in barebox, so the clock providers themselves are
responsible for allocating an array with suitable lifetime. Most at91
clk drivers did this by having a fixed size array in the clock's private
data struct.
Since 47475fa5e0e1 ("clk: at91: add sama5d2 audio PLL support"), we are
overflowing struct clk_programmable::parent_names on the sama5d2,
because there it has 6 parents, while only space for 5 were allocated.
Make the parent_names member of variable size to fix this and to avoid
such errors in future.
Fixes: 47475fa5e0e1 ("clk: at91: add sama5d2 audio PLL support")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
This is a port of the Linux kernel commit d3b70cd87e77 (clk: imx: imx8mm:
fix a53 cpu cloc). This allows the reparenting as specified in the new DTs
to succeed.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Changes in imx8mp.dtsi for v5.8-rc1 added some clock reparenting to the
device tree. IMX8MP_CLK_A53_CORE is reparented to IMX8MP_ARM_PLL_OUT.
The latter is not enabled in hardware, so the CPU clock is disabled
locking up the system. Mark IMX8MP_CLK_A53_CORE as critical so that the
new parent gets enabled before reparenting.
Fixes: abef60363d ("dts: update to v5.8-rc1")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Otherwise barebox is not able to resolve the clock from the device tree
node.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to Marc Zyngier, former employee at ARM, the company owns the
copyright for code created by its employees. Convert accordingly to SPDX
with the usual rearrangements. Also dropped Marc's email address which
doesn't work any more.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| | |
This adds clock support for the i.MX8MP, taken from Linux-5.7.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As the code comment describes, these #defines were only needed
temporarily till dts/ is synced vs Linux v5.8-rc1. This is now the case,
so drop them again.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
dt-compat.c implemented bindings for following compatibles:
atmel,at91rm9200-clk-main-osc
atmel,at91sam9x5-clk-main-rc-osc
atmel,at91rm9200-clk-main
atmel,at91sam9x5-clk-main
atmel,at91rm9200-clk-master
atmel,at91sam9x5-clk-master
atmel,at91rm9200-clk-peripheral
atmel,at91sam9x5-clk-peripheral
atmel,at91rm9200-clk-pll
atmel,sama5d3-clk-pll
atmel,at91sam9x5-clk-plldiv
atmel,at91rm9200-clk-programmable
atmel,at91sam9g45-clk-programmable
atmel,at91sam9x5-clk-programmable
atmel,at91sam9x5-clk-smd
atmel,at91rm9200-clk-system
atmel,at91sam9x5-clk-usb
atmel,at91sam9n12-clk-usb
atmel,at91rm9200-clk-usb
atmel,at91sam9x5-clk-utmi
With the recent v5.8-rc1 sync, we no longer have any device trees in
the barebox repository that use these. Unlike Linux, we don't need to
support probing from old device trees, so drop the now unused code.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This ports over a couple of changes that accrued upstream between v5.6,
when we last synchronized, and v5.8-rc1:
5bf7f4a24938 clk: at91: sam9x60: Don't use audio PLL
b0ecf1c6c6e8 clk: at91: usb: continue if clk_hw_round_rate() return zero
43b203d32b77 clk: at91: sam9x60: fix usb clock parents
d7a83d67a169 clk: at91: usb: use proper usbs_mask
9962fb0d1995 clk: at91: usb: introduce num_parents in driver's structure
12dc8d3be9d8 clk: at91: add at91sam9g45 pmc driver
0969b242f7b8 clk: at91: add sama5d3 pmc driver
143e04dab6b4 clk: at91: add at91sam9n12 pmc driver
02ff48e4d7f7 clk: at91: add at91rm9200 pmc driver
99e107439eea clk: at91: Add peripheral clock for PTC
f6363c437dc6 clk: at91: pmc: do not continue if compatible not located
7425f246f725 clk: at91: optimize pmc data allocation
99767cd4406f clk: at91: allow setting PCKx parent via DT
03a1ee1dad0e clk: at91: allow setting all PMC clock parents via DT
Besides fixes, mostly around sam9x60, this adds support for the new
a91 device tree clock bindings that were extended to the sama5d3 in v5.8-rc1.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Upstream of_clk_get_parent_name only resorts to node name as a fallback.
Instead, it uses the name supplied for registered clocks whenever
possible. On the sama5d2, this results in sckc@f8048050 and slowck,
respectively. So far, sckc@f8048050 in the parents array couldn't be
matched with any existing clock, leading to an inaccurate clock tree.
Port over the v5.8-rc1 state of the function to fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
When probing from the device tree use the device tree provided clock
lookups. So far we only used the clock lookups based on the physical
base address of the device, but these should go sooner or later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The USB clocks are missing, add them to make USB work as part of the
i.MX chipidea driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
The device tree clock lookups use the position in the clks array,
hence they must match. fec_sleep is a barebox specific clock and
is in between other clocks. Put the clock at the end of the array.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The enet_out clock gate is wrongly abstracted. The bit it is controlling
is not just a bit to enable the clock, it also controls the direction of
the ethernet reference clock. When the bit is cleared, the ethernet
reference clock must be fed into the SoC from an external oscillator;
when it's set then the ethernet reference clock is generated internally.
The correct setting depends on the board, so we must not set the bit
unconditionally during probe of the clock driver. Whether or not the
clock is enabled can be selected by the board by removing the clock from
the FEC in its dts.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
SECOND is the number of nanoseconds in a second, but we need
the number of microseconds for use in udelay. Use USEC_PER_SEC.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
During a bug hunt that ultimately turned out unrelated to the state
of the barebox at91 clk driver, I synchronized its state with Linux v5.6.
Bug fixes and clean up to minimize the diff were split out in separate
prior commits. This last commit imports the rest, which is basically
support for Microchip's new ARM926EJ-S SoC, the SAM9x60.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 7310b976 ("clk: at91: fix compilation errors in sama5d2.c") and
follow-up commit ca3077068c ("clk: at91: delete dead i2s/audio code")
had deleted the i2s/audio clock related parts of the upstream driver.
This was mostly due to unwillingness on my part to understand the code
enough for porting them and because I deemed them unnecessary to support
in barebox. The former has changed and the latter is not totally true as
audio PLL derived clocks may be muxed as inputs for programmable and
generated clocks.
Port them over and mimize the diff to upstream.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PLL input range needs to be able to allow 24 Mhz crystal as input
Update the range accordingly in plla characteristics struct
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Link: https://lkml.kernel.org/r/1568183622-7858-1-git-send-email-eugen.hristev@microchip.com
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Fixes: c561e41ce4d2 ("clk: at91: add sama5d2 PMC driver")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
[afa: ported to barebox from Linux commit 81a6b601f9f49]
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
It's just some static data that doesn't get changed after being used.
Mark it const everywhere.
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
[afa: ported to barebox from Linux commit 7b4c162e03d47e0]
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
While redundant in barebox, it makes our diff to the upstream driver
smaller when synchronizing, so add it back.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|