u-boot/board/microchip/pic32mzda/pic32mzda.c
Tom Rini d678a59d2d Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d, reversing
changes made to 2ee6f3a5f7.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-19 08:16:36 -06:00

41 lines
750 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Microchip PIC32MZ[DA] Starter Kit board
*
* Copyright (C) 2015, Microchip Technology Inc.
* Purna Chandra Mandal <purna.mandal@microchip.com>
*
*/
#include <common.h>
#include <dm.h>
#include <clk.h>
#include <init.h>
#include <malloc.h>
#include <dt-bindings/clock/microchip,clock.h>
#include <mach/pic32.h>
#ifdef CONFIG_DISPLAY_BOARDINFO
int checkboard(void)
{
ulong rate;
struct udevice *dev;
struct clk clk;
int ret;
printf("Core: %s\n", get_core_name());
if (uclass_get_device(UCLASS_CLK, 0, &dev))
return 0;
clk.id = PB7CLK;
ret = clk_request(dev, &clk);
if (ret < 0)
return 0;
rate = clk_get_rate(&clk);
printf("CPU Speed: %lu MHz\n", rate / 1000000);
return 0;
}
#endif