diff options
author | Teresa Remmet <t.remmet@phytec.de> | 2019-02-13 09:34:22 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-13 15:43:19 +0100 |
commit | 3518b9363a33a02a475856f9319a69bbcd9a8698 (patch) | |
tree | b3bcc71a13c30184f4b00ea4bb164c6d87bafdcd /drivers/bus | |
parent | 823d116529647af29ccfe8f7dcfc7f4ea43122fe (diff) | |
download | barebox-3518b9363a33a02a475856f9319a69bbcd9a8698.tar.gz barebox-3518b9363a33a02a475856f9319a69bbcd9a8698.tar.xz |
drivers: bus: Add ti-sysc bus driver
Adds minimal support for the sysc interconnect target module found
on many TI SoCs. With this device tree includes have been rearagned.
We need the driver to probe the child devices of the bus.
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/Kconfig | 8 | ||||
-rw-r--r-- | drivers/bus/Makefile | 1 | ||||
-rw-r--r-- | drivers/bus/ti-sysc.c | 37 |
3 files changed, 46 insertions, 0 deletions
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig index 202df59762..219982d878 100644 --- a/drivers/bus/Kconfig +++ b/drivers/bus/Kconfig @@ -6,6 +6,14 @@ config BUS_OMAP_GPMC depends on OMAP_GPMC bool "TI OMAP/AM33xx GPMC support" +config TI_SYSC + depends on ARCH_OMAP + bool "TI sysc interconnect target module driver" + default y + help + Generic driver for Texas Instruments interconnect target module + found on many TI SoCs. + config IMX_WEIM depends on ARCH_IMX bool "i.MX WEIM driver" diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index 4b7aa888ab..ba5cee4063 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -1,3 +1,4 @@ obj-$(CONFIG_BUS_OMAP_GPMC) += omap-gpmc.o obj-$(CONFIG_IMX_WEIM) += imx-weim.o obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o +obj-$(CONFIG_TI_SYSC) += ti-sysc.o diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c new file mode 100644 index 0000000000..af52d839bd --- /dev/null +++ b/drivers/bus/ti-sysc.c @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2019 Phytec Messtechnik GmbH, Teresa Remmet <t.remmet@phytec.de> + */ + +#include <common.h> +#include <init.h> +#include <of.h> +#include <linux/err.h> + +static int ti_sysc_probe(struct device_d *dev) +{ + int ret; + + ret = of_platform_populate(dev->device_node, + of_default_bus_match_table, dev); + if (ret) + dev_err(dev, "%s fail to create devices.\n", + dev->device_node->full_name); + return ret; +}; + +static struct of_device_id ti_sysc_dt_ids[] = { + { .compatible = "ti,sysc-omap4",}, + { .compatible = "ti,sysc-omap4-simple",}, + { .compatible = "ti,sysc-omap4-timer",}, + { .compatible = "ti,sysc-omap2",}, + { }, +}; + +static struct driver_d ti_sysc_driver = { + .name = "ti-sysc", + .probe = ti_sysc_probe, + .of_compatible = DRV_OF_COMPAT(ti_sysc_dt_ids), +}; + +postcore_platform_driver(ti_sysc_driver); |