aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arc/Kconfig1
-rw-r--r--arch/arc/Makefile1
-rw-r--r--arch/arc/configs/tb10x_defconfig117
-rw-r--r--arch/arc/include/asm/serial.h10
-rw-r--r--arch/arc/plat-tb10x/Kconfig36
-rw-r--r--arch/arc/plat-tb10x/Makefile21
-rw-r--r--arch/arc/plat-tb10x/tb10x.c71
7 files changed, 257 insertions, 0 deletions
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 34974e230bad..491ae7923b10 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -77,6 +77,7 @@ menu "ARC Architecture Configuration"
77menu "ARC Platform/SoC/Board" 77menu "ARC Platform/SoC/Board"
78 78
79source "arch/arc/plat-arcfpga/Kconfig" 79source "arch/arc/plat-arcfpga/Kconfig"
80source "arch/arc/plat-tb10x/Kconfig"
80#New platform adds here 81#New platform adds here
81 82
82endmenu 83endmenu
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index f30e0a168343..183397fd289e 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -91,6 +91,7 @@ core-y += arch/arc/
91core-y += arch/arc/boot/dts/ 91core-y += arch/arc/boot/dts/
92 92
93core-$(CONFIG_ARC_PLAT_FPGA_LEGACY) += arch/arc/plat-arcfpga/ 93core-$(CONFIG_ARC_PLAT_FPGA_LEGACY) += arch/arc/plat-arcfpga/
94core-$(CONFIG_ARC_PLAT_TB10X) += arch/arc/plat-tb10x/
94 95
95drivers-$(CONFIG_OPROFILE) += arch/arc/oprofile/ 96drivers-$(CONFIG_OPROFILE) += arch/arc/oprofile/
96 97
diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig
new file mode 100644
index 000000000000..4fa5cd9f2202
--- /dev/null
+++ b/arch/arc/configs/tb10x_defconfig
@@ -0,0 +1,117 @@
1CONFIG_CROSS_COMPILE="arc-elf32-"
2# CONFIG_LOCALVERSION_AUTO is not set
3CONFIG_DEFAULT_HOSTNAME="tb10x"
4CONFIG_SYSVIPC=y
5CONFIG_POSIX_MQUEUE=y
6CONFIG_HIGH_RES_TIMERS=y
7CONFIG_BSD_PROCESS_ACCT=y
8CONFIG_BSD_PROCESS_ACCT_V3=y
9CONFIG_IKCONFIG=y
10CONFIG_IKCONFIG_PROC=y
11CONFIG_LOG_BUF_SHIFT=16
12CONFIG_BLK_DEV_INITRD=y
13CONFIG_INITRAMFS_SOURCE="../tb10x-rootfs.cpio"
14CONFIG_INITRAMFS_ROOT_UID=2100
15CONFIG_INITRAMFS_ROOT_GID=501
16# CONFIG_RD_GZIP is not set
17CONFIG_SYSCTL_SYSCALL=y
18CONFIG_KALLSYMS_ALL=y
19# CONFIG_AIO is not set
20CONFIG_EMBEDDED=y
21# CONFIG_COMPAT_BRK is not set
22CONFIG_SLAB=y
23CONFIG_MODULES=y
24CONFIG_MODULE_FORCE_LOAD=y
25CONFIG_MODULE_UNLOAD=y
26# CONFIG_BLOCK is not set
27CONFIG_ARC_PLAT_TB10X=y
28CONFIG_ARC_CACHE_LINE_SHIFT=5
29# CONFIG_ARC_HAS_RTSC is not set
30CONFIG_ARC_STACK_NONEXEC=y
31CONFIG_HZ=250
32CONFIG_ARC_BUILTIN_DTB_NAME="abilis_tb100_dvk"
33CONFIG_PREEMPT_VOLUNTARY=y
34# CONFIG_COMPACTION is not set
35# CONFIG_CROSS_MEMORY_ATTACH is not set
36CONFIG_NET=y
37CONFIG_PACKET=y
38CONFIG_UNIX=y
39CONFIG_INET=y
40CONFIG_IP_MULTICAST=y
41# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
42# CONFIG_INET_XFRM_MODE_TUNNEL is not set
43# CONFIG_INET_XFRM_MODE_BEET is not set
44# CONFIG_INET_LRO is not set
45# CONFIG_INET_DIAG is not set
46# CONFIG_IPV6 is not set
47# CONFIG_WIRELESS is not set
48# CONFIG_FIRMWARE_IN_KERNEL is not set
49CONFIG_PROC_DEVICETREE=y
50CONFIG_NETDEVICES=y
51# CONFIG_NET_CADENCE is not set
52# CONFIG_NET_VENDOR_BROADCOM is not set
53# CONFIG_NET_VENDOR_INTEL is not set
54# CONFIG_NET_VENDOR_MARVELL is not set
55# CONFIG_NET_VENDOR_MICREL is not set
56# CONFIG_NET_VENDOR_NATSEMI is not set
57# CONFIG_NET_VENDOR_SEEQ is not set
58CONFIG_STMMAC_ETH=y
59CONFIG_STMMAC_DEBUG_FS=y
60CONFIG_STMMAC_DA=y
61CONFIG_STMMAC_CHAINED=y
62# CONFIG_NET_VENDOR_WIZNET is not set
63# CONFIG_WLAN is not set
64# CONFIG_INPUT is not set
65# CONFIG_SERIO is not set
66# CONFIG_VT is not set
67CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
68# CONFIG_LEGACY_PTYS is not set
69# CONFIG_DEVKMEM is not set
70CONFIG_SERIAL_8250=y
71CONFIG_SERIAL_8250_CONSOLE=y
72CONFIG_SERIAL_8250_NR_UARTS=1
73CONFIG_SERIAL_8250_RUNTIME_UARTS=1
74CONFIG_SERIAL_8250_DW=y
75# CONFIG_HW_RANDOM is not set
76CONFIG_I2C=y
77# CONFIG_I2C_COMPAT is not set
78CONFIG_I2C_DESIGNWARE_PLATFORM=y
79CONFIG_GPIO_SYSFS=y
80# CONFIG_HWMON is not set
81# CONFIG_USB_SUPPORT is not set
82CONFIG_NEW_LEDS=y
83CONFIG_LEDS_CLASS=y
84CONFIG_LEDS_GPIO=y
85CONFIG_LEDS_TRIGGERS=y
86CONFIG_LEDS_TRIGGER_TIMER=y
87CONFIG_LEDS_TRIGGER_ONESHOT=y
88CONFIG_LEDS_TRIGGER_HEARTBEAT=y
89CONFIG_LEDS_TRIGGER_CPU=y
90CONFIG_LEDS_TRIGGER_GPIO=y
91CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
92CONFIG_LEDS_TRIGGER_TRANSIENT=y
93CONFIG_DMADEVICES=y
94CONFIG_DW_DMAC=y
95CONFIG_NET_DMA=y
96CONFIG_ASYNC_TX_DMA=y
97# CONFIG_IOMMU_SUPPORT is not set
98# CONFIG_DNOTIFY is not set
99CONFIG_PROC_KCORE=y
100CONFIG_TMPFS=y
101CONFIG_CONFIGFS_FS=y
102# CONFIG_MISC_FILESYSTEMS is not set
103# CONFIG_NETWORK_FILESYSTEMS is not set
104# CONFIG_ENABLE_WARN_DEPRECATED is not set
105CONFIG_MAGIC_SYSRQ=y
106CONFIG_STRIP_ASM_SYMS=y
107CONFIG_DEBUG_FS=y
108CONFIG_HEADERS_CHECK=y
109CONFIG_DEBUG_SECTION_MISMATCH=y
110CONFIG_DETECT_HUNG_TASK=y
111CONFIG_SCHEDSTATS=y
112CONFIG_TIMER_STATS=y
113CONFIG_DEBUG_INFO=y
114CONFIG_DEBUG_MEMORY_INIT=y
115CONFIG_DEBUG_STACKOVERFLOW=y
116# CONFIG_CRYPTO_ANSI_CPRNG is not set
117# CONFIG_CRYPTO_HW is not set
diff --git a/arch/arc/include/asm/serial.h b/arch/arc/include/asm/serial.h
index 4dff5a1e4128..602b0970a764 100644
--- a/arch/arc/include/asm/serial.h
+++ b/arch/arc/include/asm/serial.h
@@ -22,4 +22,14 @@
22 22
23#define BASE_BAUD (arc_get_core_freq() / 16) 23#define BASE_BAUD (arc_get_core_freq() / 16)
24 24
25/*
26 * This is definitely going to break early 8250 consoles on multi-platform
27 * images but hey, it won't add any code complexity for a debug feature of
28 * one broken driver.
29 */
30#ifdef CONFIG_ARC_PLAT_TB10X
31#undef BASE_BAUD
32#define BASE_BAUD (arc_get_core_freq() / 16 / 3)
33#endif
34
25#endif /* _ASM_ARC_SERIAL_H */ 35#endif /* _ASM_ARC_SERIAL_H */
diff --git a/arch/arc/plat-tb10x/Kconfig b/arch/arc/plat-tb10x/Kconfig
new file mode 100644
index 000000000000..4e121272c4e5
--- /dev/null
+++ b/arch/arc/plat-tb10x/Kconfig
@@ -0,0 +1,36 @@
1# Abilis Systems TB10x platform kernel configuration file
2#
3# Author: Christian Ruppert <christian.ruppert@abilis.com>
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# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18
19menuconfig ARC_PLAT_TB10X
20 bool "Abilis TB10x"
21 select COMMON_CLK
22 select PINCTRL
23 select PINMUX
24 select ARCH_REQUIRE_GPIOLIB
25 help
26 Support for platforms based on the TB10x home media gateway SOC by
27 Abilis Systems. TB10x is based on the ARC700 CPU architecture.
28 Say Y if you are building a kernel for one of the SOCs in this
29 series (e.g. TB100 or TB101). If in doubt say N.
30
31if ARC_PLAT_TB10X
32
33config GENERIC_GPIO
34 def_bool y
35
36endif
diff --git a/arch/arc/plat-tb10x/Makefile b/arch/arc/plat-tb10x/Makefile
new file mode 100644
index 000000000000..89611d25ef35
--- /dev/null
+++ b/arch/arc/plat-tb10x/Makefile
@@ -0,0 +1,21 @@
1# Abilis Systems TB10x platform Makefile
2#
3# Author: Christian Ruppert <christian.ruppert@abilis.com>
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# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18
19KBUILD_CFLAGS += -Iarch/arc/plat-tb10x/include
20
21obj-y += tb10x.o
diff --git a/arch/arc/plat-tb10x/tb10x.c b/arch/arc/plat-tb10x/tb10x.c
new file mode 100644
index 000000000000..d3567691c7e1
--- /dev/null
+++ b/arch/arc/plat-tb10x/tb10x.c
@@ -0,0 +1,71 @@
1/*
2 * Abilis Systems TB10x platform initialisation
3 *
4 * Copyright (C) Abilis Systems 2012
5 *
6 * Author: Christian Ruppert <christian.ruppert@abilis.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22
23#include <linux/init.h>
24#include <linux/of_platform.h>
25#include <linux/clk-provider.h>
26#include <linux/pinctrl/consumer.h>
27
28#include <asm/mach_desc.h>
29
30
31static void __init tb10x_platform_init(void)
32{
33 of_clk_init(NULL);
34 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
35}
36
37static void __init tb10x_platform_late_init(void)
38{
39 struct device_node *dn;
40
41 /*
42 * Pinctrl documentation recommends setting up the iomux here for
43 * all modules which don't require control over the pins themselves.
44 * Modules which need this kind of assistance are compatible with
45 * "abilis,simple-pinctrl", i.e. we can easily iterate over them.
46 * TODO: Does this recommended method work cleanly with pins required
47 * by modules?
48 */
49 for_each_compatible_node(dn, NULL, "abilis,simple-pinctrl") {
50 struct platform_device *pd = of_find_device_by_node(dn);
51 struct pinctrl *pctl;
52
53 pctl = pinctrl_get_select(&pd->dev, "abilis,simple-default");
54 if (IS_ERR(pctl)) {
55 int ret = PTR_ERR(pctl);
56 dev_err(&pd->dev, "Could not set up pinctrl: %d\n",
57 ret);
58 }
59 }
60}
61
62static const char *tb10x_compat[] __initdata = {
63 "abilis,arc-tb10x",
64 NULL,
65};
66
67MACHINE_START(TB10x, "tb10x")
68 .dt_compat = tb10x_compat,
69 .init_machine = tb10x_platform_init,
70 .init_late = tb10x_platform_late_init,
71MACHINE_END