[PATCH 4/4] mtd: nand: raw: atmel: Introduce optional debug commands

Mihai.Sain at microchip.com Mihai.Sain at microchip.com
Wed Mar 20 08:35:36 CET 2024


Hi Alex,

> > Also I recommend to print the master clock in MHz, and to print the master clock name/label from ccf driver:
> > https://github.com/u-boot/u-boot/blob/master/drivers/clk/at91/sama7g5.
> > c#L410
>
> Should be possible.  I could do this and send a v2?
>
>       Yes Please 😊
>       Also please note that older SAM9/SAMA5 series have no ccf drivers ☹
>       Only SAM9X6+ and SAMA7 series have ccf 😊

Okay I thought this would be easy, but it seems not.  This is what I came up with:

-                printf("mck clock rate: %lu\n", clk_get_rate(nc->mck));
+                printf("%s rate: %lu MHz\n",
+                       nc->mck->dev->name ? nc->mck->dev->name : "mck clock",
+                       clk_get_rate(nc->mck) / 1000000);

And this is the output on sam9x60 with CONFIG_CLK_CCF enabled:

    pmc at fffffc00 rate: 200 MHz

The corresponding line from `clk dump` is:

     200000000            5        |       |           |   `-- mck_div

That name, I don't get it where to get that one.

	You can revert to initial print and add MHz 😊
	MCK rate: 200 MHz
	Thanks.



More information about the U-Boot mailing list