xref: /openbmc/u-boot/drivers/clk/at91/sckc.c (revision 3335786a)
1 /*
2  * Copyright (C) 2016 Atmel Corporation
3  *               Wenyou.Yang <wenyou.yang@atmel.com>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #include <common.h>
9 #include <clk-uclass.h>
10 #include <dm/device.h>
11 #include <dm/root.h>
12 
13 DECLARE_GLOBAL_DATA_PTR;
14 
15 static int at91_sckc_clk_bind(struct udevice *dev)
16 {
17 	return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
18 }
19 
20 static const struct udevice_id at91_sckc_clk_match[] = {
21 	{ .compatible = "atmel,at91sam9x5-sckc" },
22 	{}
23 };
24 
25 U_BOOT_DRIVER(at91_sckc_clk) = {
26 	.name = "at91_sckc_clk",
27 	.id = UCLASS_CLK,
28 	.of_match = at91_sckc_clk_match,
29 	.bind = at91_sckc_clk_bind,
30 };
31