aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-06-18 20:11:32 -0400
committerFlorian Fainelli <f.fainelli@gmail.com>2015-09-14 18:44:18 -0400
commitd52fad262041217be0a0e7049253186ec9cfb2a6 (patch)
treebf8d98f7b5aa484ef0d830548ff36c60b71bfa97 /drivers/soc
parent1f3e9a6edae4f1168a4baaeb4c55d4eb5a8f7501 (diff)
soc: add stubs for brcmstb SoC's
Used on BCM7xxx Set-Top Box chips (e.g., BCM7445). Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/Kconfig1
-rw-r--r--drivers/soc/Makefile1
-rw-r--r--drivers/soc/brcmstb/Kconfig9
-rw-r--r--drivers/soc/brcmstb/Makefile1
-rw-r--r--drivers/soc/brcmstb/common.c33
5 files changed, 45 insertions, 0 deletions
diff --git a/drivers/soc/Kconfig b/drivers/soc/Kconfig
index 96ddecb92254..c9c0fcce98a7 100644
--- a/drivers/soc/Kconfig
+++ b/drivers/soc/Kconfig
@@ -1,5 +1,6 @@
1menu "SOC (System On Chip) specific Drivers" 1menu "SOC (System On Chip) specific Drivers"
2 2
3source "drivers/soc/brcmstb/Kconfig"
3source "drivers/soc/mediatek/Kconfig" 4source "drivers/soc/mediatek/Kconfig"
4source "drivers/soc/qcom/Kconfig" 5source "drivers/soc/qcom/Kconfig"
5source "drivers/soc/sunxi/Kconfig" 6source "drivers/soc/sunxi/Kconfig"
diff --git a/drivers/soc/Makefile b/drivers/soc/Makefile
index 0b12d777d3c4..4e27f10367f0 100644
--- a/drivers/soc/Makefile
+++ b/drivers/soc/Makefile
@@ -2,6 +2,7 @@
2# Makefile for the Linux Kernel SOC specific device drivers. 2# Makefile for the Linux Kernel SOC specific device drivers.
3# 3#
4 4
5obj-$(CONFIG_SOC_BRCMSTB) += brcmstb/
5obj-$(CONFIG_MACH_DOVE) += dove/ 6obj-$(CONFIG_MACH_DOVE) += dove/
6obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ 7obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/
7obj-$(CONFIG_ARCH_QCOM) += qcom/ 8obj-$(CONFIG_ARCH_QCOM) += qcom/
diff --git a/drivers/soc/brcmstb/Kconfig b/drivers/soc/brcmstb/Kconfig
new file mode 100644
index 000000000000..39cab3bd544d
--- /dev/null
+++ b/drivers/soc/brcmstb/Kconfig
@@ -0,0 +1,9 @@
1menuconfig SOC_BRCMSTB
2 bool "Broadcom STB SoC drivers"
3 depends on ARM
4 help
5 Enables drivers for the Broadcom Set-Top Box (STB) series of chips.
6 This option alone enables only some support code, while the drivers
7 can be enabled individually within this menu.
8
9 If unsure, say N.
diff --git a/drivers/soc/brcmstb/Makefile b/drivers/soc/brcmstb/Makefile
new file mode 100644
index 000000000000..183280e39f80
--- /dev/null
+++ b/drivers/soc/brcmstb/Makefile
@@ -0,0 +1 @@
obj-y += common.o
diff --git a/drivers/soc/brcmstb/common.c b/drivers/soc/brcmstb/common.c
new file mode 100644
index 000000000000..c262c029b1b8
--- /dev/null
+++ b/drivers/soc/brcmstb/common.c
@@ -0,0 +1,33 @@
1/*
2 * Copyright © 2014 NVIDIA Corporation
3 * Copyright © 2015 Broadcom Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#include <linux/of.h>
16
17#include <soc/brcmstb/common.h>
18
19static const struct of_device_id brcmstb_machine_match[] = {
20 { .compatible = "brcm,brcmstb", },
21 { }
22};
23
24bool soc_is_brcmstb(void)
25{
26 struct device_node *root;
27
28 root = of_find_node_by_path("/");
29 if (!root)
30 return false;
31
32 return of_match_node(brcmstb_machine_match, root) != NULL;
33}