2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2016-07-20 09:55:12 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2016 Atmel Corporation
|
|
|
|
* Wenyou.Yang <wenyou.yang@atmel.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <clk-uclass.h>
|
2017-05-17 23:18:03 +00:00
|
|
|
#include <dm.h>
|
2016-07-20 09:55:12 +00:00
|
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
|
|
|
static ulong at91_master_clk_get_rate(struct clk *clk)
|
|
|
|
{
|
|
|
|
return gd->arch.mck_rate_hz;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct clk_ops at91_master_clk_ops = {
|
|
|
|
.get_rate = at91_master_clk_get_rate,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct udevice_id at91_master_clk_match[] = {
|
2017-04-14 06:53:23 +00:00
|
|
|
{ .compatible = "atmel,at91rm9200-clk-master" },
|
2016-07-20 09:55:12 +00:00
|
|
|
{ .compatible = "atmel,at91sam9x5-clk-master" },
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
2020-06-25 04:10:04 +00:00
|
|
|
U_BOOT_DRIVER(atmel_at91rm9200_clk_master) = {
|
|
|
|
.name = "atmel_at91rm9200_clk_master",
|
2016-07-20 09:55:12 +00:00
|
|
|
.id = UCLASS_CLK,
|
|
|
|
.of_match = at91_master_clk_match,
|
|
|
|
.ops = &at91_master_clk_ops,
|
|
|
|
};
|