summaryrefslogtreecommitdiff
path: root/board/microchip/pic32mzda/pic32mzda.c
diff options
context:
space:
mode:
authorPurna Chandra Mandal <purna.mandal@microchip.com>2016-01-28 15:30:17 +0530
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2016-02-01 22:14:01 +0100
commit44da3a176c5bd48b7ed257454e3e551c956adb30 (patch)
tree2f981c2d3e879e86941de4eda6c7235ed58ebb39 /board/microchip/pic32mzda/pic32mzda.c
parentbe961fa15bcb01c5a50c184e3dcc3ab0379edddb (diff)
board: Add Microchip PIC32MZ[DA]-Starter-Kit board.
This adds support for Microchip PIC32MZ[DA] StarterKit board based on a PIC32MZ[DA] family of microcontroller. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'board/microchip/pic32mzda/pic32mzda.c')
-rw-r--r--board/microchip/pic32mzda/pic32mzda.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/board/microchip/pic32mzda/pic32mzda.c b/board/microchip/pic32mzda/pic32mzda.c
new file mode 100644
index 0000000000..afe2ab8b71
--- /dev/null
+++ b/board/microchip/pic32mzda/pic32mzda.c
@@ -0,0 +1,31 @@
+/*
+ * Microchip PIC32MZ[DA] Starter Kit board
+ *
+ * Copyright (C) 2015, Microchip Technology Inc.
+ * Purna Chandra Mandal <purna.mandal@microchip.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <clk.h>
+#include <mach/pic32.h>
+
+#ifdef CONFIG_DISPLAY_BOARDINFO
+int checkboard(void)
+{
+ ulong rate = 0;
+ struct udevice *dev;
+
+ printf("Core: %s\n", get_core_name());
+
+ if (!uclass_get_device(UCLASS_CLK, 0, &dev)) {
+ rate = clk_get_rate(dev);
+ printf("CPU Speed: %lu MHz\n", rate / 1000000);
+ }
+
+ return 0;
+}
+#endif