From: Patrick Wildt <patrick@blueri.se>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 24/27] imx8m: soc: probe clock device in arch_cpu_init_dm
Date: Fri, 11 Oct 2019 00:35:01 +0200 [thread overview]
Message-ID: <20191010223501.GA15733@nox.fritz.box> (raw)
In-Reply-To: <20190827064033.28973-25-peng.fan@nxp.com>
On Tue, Aug 27, 2019 at 06:25:58AM +0000, Peng Fan wrote:
> Because we need to get cpu freq in print_cpuinfo at very early stage,
> so we need to make sure the ccm be probed.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> arch/arm/mach-imx/imx8m/soc.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
> index 3a54db4898..f904049120 100644
> --- a/arch/arm/mach-imx/imx8m/soc.c
> +++ b/arch/arm/mach-imx/imx8m/soc.c
> @@ -14,6 +14,7 @@
> #include <asm/mach-imx/boot_mode.h>
> #include <asm/mach-imx/syscounter.h>
> #include <asm/armv8/mmu.h>
> +#include <dm/uclass.h>
> #include <errno.h>
> #include <fdt_support.h>
> #include <fsl_wdog.h>
> @@ -228,6 +229,22 @@ static void imx_set_wdog_powerdown(bool enable)
> writew(enable, &wdog3->wmcr);
> }
>
> +int arch_cpu_init_dm(void)
> +{
> + struct udevice *dev;
> + int ret;
> +
> + ret = uclass_get_device_by_name(UCLASS_CLK,
> + "clock-controller at 30380000",
> + &dev);
> + if (ret < 0) {
> + printf("Failed to find clock node. Check device tree\n");
> + return ret;
> + }
> +
> + return 0;
> +}
> +
> int arch_cpu_init(void)
> {
> struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
> --
> 2.16.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
This commit broke my i.MX8MQ board. This is because the i.MX8MQ does
not yet have a DM-based clock driver like i.MX8MM, so requiring the
existence of such uclass device breaks i.MX8MQ. I would propse the
following commit, which make the whole function only available for
i.MX8MQ.
---
next prev parent reply other threads:[~2019-10-10 22:35 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 6:24 [U-Boot] [PATCH V3 00/27] i.MX8MM support Peng Fan
2019-08-27 6:24 ` [U-Boot] [PATCH V3 01/27] imx: mkimage_fit_atf: Fix FIT image for correct boot order Peng Fan
2019-08-27 6:24 ` [U-Boot] [PATCH V3 02/27] tools: imx8m_image: align spl bin image size Peng Fan
2019-08-27 6:24 ` [U-Boot] [PATCH V3 03/27] ddr: imx8m: fix ddr firmware location when enable SPL OF Peng Fan
2019-08-27 6:24 ` [U-Boot] [PATCH V3 04/27] imx8m: add image cfg for i.MX8MM lpddr4 Peng Fan
2019-08-27 6:24 ` [U-Boot] [PATCH V3 05/27] imx: add IMX8MQ kconfig entry Peng Fan
2019-08-27 6:24 ` [U-Boot] [PATCH V3 06/27] imx: add IMX8MM " Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 07/27] imx: imx8mm: add clock bindings header Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 08/27] imx: add i.MX8MM cpu type Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 09/27] imx: spl: add spl_board_boot_device for i.MX8MM Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 10/27] imx8m: imx-regs: drop unused register definitions Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 11/27] imx8m: update imx-regs for i.MX8MM Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 12/27] imx: add get_cpu_rev support " Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 13/27] imx8m: add pin header " Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 14/27] imx: add i.MX8MM PE property Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 15/27] imx8m: Fix MMU table issue for OPTEE memory Peng Fan
2020-03-04 14:34 ` Igor Opaniuk
2020-03-04 16:42 ` Igor Opaniuk
2020-03-05 0:50 ` Peng Fan
2020-03-05 10:36 ` Igor Opaniuk
2020-03-05 10:46 ` Peng Fan
2020-03-05 12:18 ` Igor Opaniuk
2019-08-27 6:25 ` [U-Boot] [PATCH V3 16/27] imx8m: set BYPASS ID SWAP to avoid AXI bus errors Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 17/27] imx8m: Configure trustzone region 0 for non-secure access Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 18/27] imx8m: soc: enable SCTR clock before timer init Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 19/27] imx8m: restrict reset_cpu Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 20/27] imx8m: rename clock to clock_imx8mq Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 21/27] imx8m: restructure clock.h Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 22/27] imx8m: add clk support for i.MX8MM Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 23/27] imx: mmc_env: update runtime SD/MMC boot env device Peng Fan
2019-08-27 6:25 ` [U-Boot] [PATCH V3 24/27] imx8m: soc: probe clock device in arch_cpu_init_dm Peng Fan
2019-08-28 15:20 ` Schrempf Frieder
2019-08-29 1:21 ` Peng Fan
2019-08-29 5:47 ` Schrempf Frieder
2019-10-10 22:35 ` Patrick Wildt [this message]
2019-08-27 6:26 ` [U-Boot] [PATCH V3 25/27] arm: dts: import i.MX8MM dtsi Peng Fan
2019-08-27 6:26 ` [U-Boot] [PATCH V3 26/27] arm: dts: add i.MX8MM pin func Peng Fan
2019-08-27 6:26 ` [U-Boot] [PATCH V3 27/27] imx: Add i.MX8MM EVK board support Peng Fan
2019-10-07 18:36 ` Tim Harvey
2019-10-09 2:50 ` Peng Fan
2019-10-09 15:32 ` Tim Harvey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191010223501.GA15733@nox.fritz.box \
--to=patrick@blueri.se \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox