Purna Chandra Mandal | 44da3a1 | 2016-01-28 15:30:17 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Microchip PIC32MZ[DA] Starter Kit board |
| 3 | * |
| 4 | * Copyright (C) 2015, Microchip Technology Inc. |
| 5 | * Purna Chandra Mandal <purna.mandal@microchip.com> |
| 6 | * |
| 7 | * SPDX-License-Identifier: GPL-2.0+ |
| 8 | * |
| 9 | */ |
| 10 | |
| 11 | #include <common.h> |
| 12 | #include <dm.h> |
| 13 | #include <clk.h> |
| 14 | #include <mach/pic32.h> |
| 15 | |
| 16 | #ifdef CONFIG_DISPLAY_BOARDINFO |
| 17 | int checkboard(void) |
| 18 | { |
| 19 | ulong rate = 0; |
| 20 | struct udevice *dev; |
| 21 | |
| 22 | printf("Core: %s\n", get_core_name()); |
| 23 | |
| 24 | if (!uclass_get_device(UCLASS_CLK, 0, &dev)) { |
| 25 | rate = clk_get_rate(dev); |
| 26 | printf("CPU Speed: %lu MHz\n", rate / 1000000); |
| 27 | } |
| 28 | |
| 29 | return 0; |
| 30 | } |
| 31 | #endif |