Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Pass clock provider's phandle to fdtbus_clock_co...
details: https://anonhg.NetBSD.org/src/rev/4dd06cfdd238
branches: trunk
changeset: 993407:4dd06cfdd238
user: aymeric <aymeric%NetBSD.org@localhost>
date: Sun Sep 09 07:21:17 2018 +0000
description:
Pass clock provider's phandle to fdtbus_clock_controller_func.decode()
and update callers.
This allows to accomodate clock managers whose clocks are identified
directly by a clock instead of a pair (clock provider, index).
ok jmcneill@ on port-arm
diffstat:
sys/arch/arm/broadcom/bcm2835_aux.c | 8 ++++----
sys/arch/arm/broadcom/bcm2835_cprman.c | 6 +++---
sys/arch/arm/nvidia/tegra124_car.c | 10 ++++++----
sys/arch/arm/nvidia/tegra210_car.c | 10 ++++++----
sys/arch/arm/rockchip/rk_cru.c | 6 +++---
sys/arch/arm/rockchip/rk_usb.c | 6 +++---
sys/arch/arm/samsung/exynos5410_clock.c | 9 +++++----
sys/arch/arm/samsung/exynos5422_clock.c | 9 +++++----
sys/arch/arm/sunxi/sunxi_ccu.c | 7 ++++---
sys/arch/arm/sunxi/sunxi_gates.c | 7 ++++---
sys/arch/arm/sunxi/sunxi_gmacclk.c | 9 +++++----
sys/dev/fdt/fdt_clock.c | 7 ++++---
sys/dev/fdt/fdtvar.h | 4 ++--
sys/dev/fdt/fixedclock.c | 8 ++++----
sys/dev/fdt/fixedfactorclock.c | 9 +++++----
15 files changed, 63 insertions(+), 52 deletions(-)
diffs (truncated from 486 to 300 lines):
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/broadcom/bcm2835_aux.c
--- a/sys/arch/arm/broadcom/bcm2835_aux.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_aux.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_aux.c,v 1.1 2017/12/10 21:38:26 skrll Exp $ */
+/* $NetBSD: bcm2835_aux.c,v 1.2 2018/09/09 07:21:17 aymeric Exp $ */
/*-
* Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_aux.c,v 1.1 2017/12/10 21:38:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_aux.c,v 1.2 2018/09/09 07:21:17 aymeric Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,7 +52,7 @@
static int bcmaux_match(device_t, cfdata_t, void *);
static void bcmaux_attach(device_t, device_t, void *);
-static struct clk *bcmaux_decode(device_t, const void *, size_t);
+static struct clk *bcmaux_decode(device_t, int, const void *, size_t);
static const struct fdtbus_clock_controller_func bcmaux_fdt_funcs = {
.decode = bcmaux_decode
@@ -154,7 +154,7 @@
}
static struct clk *
-bcmaux_decode(device_t dev, const void *data, size_t len)
+bcmaux_decode(device_t dev, int cc_phandle, const void *data, size_t len)
{
struct bcmaux_softc * const sc = device_private(dev);
u_int clkid;
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/broadcom/bcm2835_cprman.c
--- a/sys/arch/arm/broadcom/bcm2835_cprman.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_cprman.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_cprman.c,v 1.1 2017/12/10 21:38:26 skrll Exp $ */
+/* $NetBSD: bcm2835_cprman.c,v 1.2 2018/09/09 07:21:17 aymeric Exp $ */
/*-
* Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_cprman.c,v 1.1 2017/12/10 21:38:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_cprman.c,v 1.2 2018/09/09 07:21:17 aymeric Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -74,7 +74,7 @@
static struct clk *
-cprman_decode(device_t dev, const void *data, size_t len)
+cprman_decode(device_t dev, int cc_phandle, const void *data, size_t len)
{
struct cprman_softc * const sc = device_private(dev);
struct cprman_clk *clk;
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/nvidia/tegra124_car.c
--- a/sys/arch/arm/nvidia/tegra124_car.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/nvidia/tegra124_car.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra124_car.c,v 1.14 2017/07/21 01:01:22 jmcneill Exp $ */
+/* $NetBSD: tegra124_car.c,v 1.15 2018/09/09 07:21:17 aymeric Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra124_car.c,v 1.14 2017/07/21 01:01:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra124_car.c,v 1.15 2018/09/09 07:21:17 aymeric Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -53,7 +53,8 @@
static int tegra124_car_match(device_t, cfdata_t, void *);
static void tegra124_car_attach(device_t, device_t, void *);
-static struct clk *tegra124_car_clock_decode(device_t, const void *, size_t);
+static struct clk *tegra124_car_clock_decode(device_t, int, const void *,
+ size_t);
static const struct fdtbus_clock_controller_func tegra124_car_fdtclock_funcs = {
.decode = tegra124_car_clock_decode
@@ -959,7 +960,8 @@
}
static struct clk *
-tegra124_car_clock_decode(device_t dev, const void *data, size_t len)
+tegra124_car_clock_decode(device_t dev, int cc_phandle, const void *data,
+ size_t len)
{
struct tegra124_car_softc * const sc = device_private(dev);
struct tegra_clk *tclk;
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/nvidia/tegra210_car.c
--- a/sys/arch/arm/nvidia/tegra210_car.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/nvidia/tegra210_car.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra210_car.c,v 1.18 2018/07/16 23:11:47 christos Exp $ */
+/* $NetBSD: tegra210_car.c,v 1.19 2018/09/09 07:21:17 aymeric Exp $ */
/*-
* Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra210_car.c,v 1.18 2018/07/16 23:11:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra210_car.c,v 1.19 2018/09/09 07:21:17 aymeric Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -53,7 +53,8 @@
static int tegra210_car_match(device_t, cfdata_t, void *);
static void tegra210_car_attach(device_t, device_t, void *);
-static struct clk *tegra210_car_clock_decode(device_t, const void *, size_t);
+static struct clk *tegra210_car_clock_decode(device_t, int, const void *,
+ size_t);
static const struct fdtbus_clock_controller_func tegra210_car_fdtclock_funcs = {
.decode = tegra210_car_clock_decode
@@ -1069,7 +1070,8 @@
}
static struct clk *
-tegra210_car_clock_decode(device_t dev, const void *data, size_t len)
+tegra210_car_clock_decode(device_t dev, int cc_phandle, const void *data,
+ size_t len)
{
struct tegra210_car_softc * const sc = device_private(dev);
struct tegra_clk *tclk;
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/rockchip/rk_cru.c
--- a/sys/arch/arm/rockchip/rk_cru.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/rockchip/rk_cru.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_cru.c,v 1.6 2018/08/12 19:48:36 jmcneill Exp $ */
+/* $NetBSD: rk_cru.c,v 1.7 2018/09/09 07:21:17 aymeric Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
#include "opt_fdt_arm.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_cru.c,v 1.6 2018/08/12 19:48:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_cru.c,v 1.7 2018/09/09 07:21:17 aymeric Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -91,7 +91,7 @@
};
static struct clk *
-rk_cru_clock_decode(device_t dev, const void *data, size_t len)
+rk_cru_clock_decode(device_t dev, int cc_phandle, const void *data, size_t len)
{
struct rk_cru_softc * const sc = device_private(dev);
struct rk_cru_clk *clk;
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/rockchip/rk_usb.c
--- a/sys/arch/arm/rockchip/rk_usb.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/rockchip/rk_usb.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_usb.c,v 1.6 2018/08/12 18:00:32 jmcneill Exp $ */
+/* $NetBSD: rk_usb.c,v 1.7 2018/09/09 07:21:17 aymeric Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_usb.c,v 1.6 2018/08/12 18:00:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_usb.c,v 1.7 2018/09/09 07:21:17 aymeric Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -183,7 +183,7 @@
};
static struct clk *
-rk_usb_fdt_decode(device_t dev, const void *data, size_t len)
+rk_usb_fdt_decode(device_t dev, int cc_phandle, const void *data, size_t len)
{
struct rk_usb_softc * const sc = device_private(dev);
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/samsung/exynos5410_clock.c
--- a/sys/arch/arm/samsung/exynos5410_clock.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/samsung/exynos5410_clock.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos5410_clock.c,v 1.3 2018/07/02 20:24:55 jmcneill Exp $ */
+/* $NetBSD: exynos5410_clock.c,v 1.4 2018/09/09 07:21:18 aymeric Exp $ */
/*-
* Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exynos5410_clock.c,v 1.3 2018/07/02 20:24:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos5410_clock.c,v 1.4 2018/09/09 07:21:18 aymeric Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -45,7 +45,7 @@
#include <dev/fdt/fdtvar.h>
-static struct clk *exynos5410_clock_decode(device_t, const void *, size_t);
+static struct clk *exynos5410_clock_decode(device_t, int, const void *, size_t);
static const struct fdtbus_clock_controller_func exynos5410_car_fdtclock_funcs = {
.decode = exynos5410_clock_decode
@@ -549,7 +549,8 @@
}
static struct clk *
-exynos5410_clock_decode(device_t dev, const void *data, size_t len)
+exynos5410_clock_decode(device_t dev, int cc_phandle, const void *data,
+ size_t len)
{
struct exynos_clk *eclk;
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/samsung/exynos5422_clock.c
--- a/sys/arch/arm/samsung/exynos5422_clock.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/samsung/exynos5422_clock.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exynos5422_clock.c,v 1.12 2018/07/05 13:11:58 jmcneill Exp $ */
+/* $NetBSD: exynos5422_clock.c,v 1.13 2018/09/09 07:21:18 aymeric Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "locators.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exynos5422_clock.c,v 1.12 2018/07/05 13:11:58 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos5422_clock.c,v 1.13 2018/09/09 07:21:18 aymeric Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -47,7 +47,7 @@
#include <dev/fdt/fdtvar.h>
-static struct clk *exynos5422_clock_decode(device_t, const void *, size_t);
+static struct clk *exynos5422_clock_decode(device_t, int, const void *, size_t);
static const struct fdtbus_clock_controller_func exynos5422_car_fdtclock_funcs = {
.decode = exynos5422_clock_decode
@@ -726,7 +726,8 @@
}
static struct clk *
-exynos5422_clock_decode(device_t dev, const void *data, size_t len)
+exynos5422_clock_decode(device_t dev, int cc_phandle, const void *data,
+ size_t len)
{
struct exynos_clk *eclk;
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/sunxi/sunxi_ccu.c
--- a/sys/arch/arm/sunxi/sunxi_ccu.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/sunxi/sunxi_ccu.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_ccu.c,v 1.10 2018/04/28 15:21:24 jmcneill Exp $ */
+/* $NetBSD: sunxi_ccu.c,v 1.11 2018/09/09 07:21:18 aymeric Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
#include "opt_fdt_arm.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu.c,v 1.10 2018/04/28 15:21:24 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu.c,v 1.11 2018/09/09 07:21:18 aymeric Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -102,7 +102,8 @@
};
static struct clk *
-sunxi_ccu_clock_decode(device_t dev, const void *data, size_t len)
+sunxi_ccu_clock_decode(device_t dev, int cc_phandle, const void *data,
+ size_t len)
{
struct sunxi_ccu_softc * const sc = device_private(dev);
struct sunxi_ccu_clk *clk;
diff -r 9bfaea684d4b -r 4dd06cfdd238 sys/arch/arm/sunxi/sunxi_gates.c
--- a/sys/arch/arm/sunxi/sunxi_gates.c Sun Sep 09 03:12:51 2018 +0000
+++ b/sys/arch/arm/sunxi/sunxi_gates.c Sun Sep 09 07:21:17 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_gates.c,v 1.1 2017/07/08 11:12:24 jmcneill Exp $ */
Home |
Main Index |
Thread Index |
Old Index