diff options
author | Simon Glass <sjg@chromium.org> | 2017-07-25 08:29:58 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-07-28 12:02:47 -0600 |
commit | 66de3eee7923d3eb4101ff2565afa48f4376a939 (patch) | |
tree | a76d8e1601fbcca8a5c4d21aa0d066d6d98e94ca /arch/arm/mach-tegra/tegra124/pmc.c | |
parent | 9b6b3c1b50bac5a1fe8870c2c19d62c118a79147 (diff) |
tegra: tegra124: Add a PMC syscon driver
The PMC can be modelled as a syscon peripheral. Add a driver for this
so that it can be accessed by drivers when needed. Enable it for tegra124
boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1
Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra124/pmc.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra124/pmc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra124/pmc.c b/arch/arm/mach-tegra/tegra124/pmc.c new file mode 100644 index 0000000000..be82acf11e --- /dev/null +++ b/arch/arm/mach-tegra/tegra124/pmc.c @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2017 Google, Inc + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <dm.h> +#include <syscon.h> + +static const struct udevice_id tegra124_syscon_ids[] = { + { .compatible = "nvidia,tegra124-pmc", .data = TEGRA_SYSCON_PMC }, +}; + +U_BOOT_DRIVER(syscon_tegra124) = { + .name = "tegra124_syscon", + .id = UCLASS_SYSCON, + .of_match = tegra124_syscon_ids, +}; |