1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2016 Atmel Corporation
4 * Wenyou.Yang <wenyou.yang@atmel.com>
8 #include <clk-uclass.h>
11 DECLARE_GLOBAL_DATA_PTR;
13 static ulong at91_master_clk_get_rate(struct clk *clk)
15 return gd->arch.mck_rate_hz;
18 static struct clk_ops at91_master_clk_ops = {
19 .get_rate = at91_master_clk_get_rate,
22 static const struct udevice_id at91_master_clk_match[] = {
23 { .compatible = "atmel,at91rm9200-clk-master" },
24 { .compatible = "atmel,at91sam9x5-clk-master" },
28 U_BOOT_DRIVER(at91_master_clk) = {
29 .name = "at91-master-clk",
31 .of_match = at91_master_clk_match,
32 .ops = &at91_master_clk_ops,