mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-06 05:04:26 +00:00
e3e2470fdd
When using OF_PLATDATA, the bind process between devices and drivers is performed trying to match compatible string with driver names. However driver names are not strictly defined, and also there are different names used when declaring a driver with U_BOOT_DRIVER, the name of the symbol used in the linker list and the used in the struct driver_info. In order to make things a bit more clear, rename the drivers names. This will also help for further OF_PLATDATA improvements, such as checking for valid driver names. Signed-off-by: Walter Lozano <walter.lozano@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org> Add a fix for sandbox of-platdata to avoid using an invalid ANSI colour: Signed-off-by: Simon Glass <sjg@chromium.org>
33 lines
746 B
C
33 lines
746 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2016 Atmel Corporation
|
|
* Wenyou.Yang <wenyou.yang@atmel.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <clk-uclass.h>
|
|
#include <dm.h>
|
|
|
|
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[] = {
|
|
{ .compatible = "atmel,at91rm9200-clk-master" },
|
|
{ .compatible = "atmel,at91sam9x5-clk-master" },
|
|
{}
|
|
};
|
|
|
|
U_BOOT_DRIVER(atmel_at91rm9200_clk_master) = {
|
|
.name = "atmel_at91rm9200_clk_master",
|
|
.id = UCLASS_CLK,
|
|
.of_match = at91_master_clk_match,
|
|
.ops = &at91_master_clk_ops,
|
|
};
|