diff options
-rw-r--r-- | arch/arc/Kconfig | 1 | ||||
-rw-r--r-- | arch/arc/Makefile | 1 | ||||
-rw-r--r-- | arch/arc/configs/tb10x_defconfig | 117 | ||||
-rw-r--r-- | arch/arc/include/asm/serial.h | 10 | ||||
-rw-r--r-- | arch/arc/plat-tb10x/Kconfig | 36 | ||||
-rw-r--r-- | arch/arc/plat-tb10x/Makefile | 21 | ||||
-rw-r--r-- | arch/arc/plat-tb10x/tb10x.c | 71 |
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" | |||
77 | menu "ARC Platform/SoC/Board" | 77 | menu "ARC Platform/SoC/Board" |
78 | 78 | ||
79 | source "arch/arc/plat-arcfpga/Kconfig" | 79 | source "arch/arc/plat-arcfpga/Kconfig" |
80 | source "arch/arc/plat-tb10x/Kconfig" | ||
80 | #New platform adds here | 81 | #New platform adds here |
81 | 82 | ||
82 | endmenu | 83 | endmenu |
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/ | |||
91 | core-y += arch/arc/boot/dts/ | 91 | core-y += arch/arc/boot/dts/ |
92 | 92 | ||
93 | core-$(CONFIG_ARC_PLAT_FPGA_LEGACY) += arch/arc/plat-arcfpga/ | 93 | core-$(CONFIG_ARC_PLAT_FPGA_LEGACY) += arch/arc/plat-arcfpga/ |
94 | core-$(CONFIG_ARC_PLAT_TB10X) += arch/arc/plat-tb10x/ | ||
94 | 95 | ||
95 | drivers-$(CONFIG_OPROFILE) += arch/arc/oprofile/ | 96 | drivers-$(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 @@ | |||
1 | CONFIG_CROSS_COMPILE="arc-elf32-" | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | CONFIG_DEFAULT_HOSTNAME="tb10x" | ||
4 | CONFIG_SYSVIPC=y | ||
5 | CONFIG_POSIX_MQUEUE=y | ||
6 | CONFIG_HIGH_RES_TIMERS=y | ||
7 | CONFIG_BSD_PROCESS_ACCT=y | ||
8 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
9 | CONFIG_IKCONFIG=y | ||
10 | CONFIG_IKCONFIG_PROC=y | ||
11 | CONFIG_LOG_BUF_SHIFT=16 | ||
12 | CONFIG_BLK_DEV_INITRD=y | ||
13 | CONFIG_INITRAMFS_SOURCE="../tb10x-rootfs.cpio" | ||
14 | CONFIG_INITRAMFS_ROOT_UID=2100 | ||
15 | CONFIG_INITRAMFS_ROOT_GID=501 | ||
16 | # CONFIG_RD_GZIP is not set | ||
17 | CONFIG_SYSCTL_SYSCALL=y | ||
18 | CONFIG_KALLSYMS_ALL=y | ||
19 | # CONFIG_AIO is not set | ||
20 | CONFIG_EMBEDDED=y | ||
21 | # CONFIG_COMPAT_BRK is not set | ||
22 | CONFIG_SLAB=y | ||
23 | CONFIG_MODULES=y | ||
24 | CONFIG_MODULE_FORCE_LOAD=y | ||
25 | CONFIG_MODULE_UNLOAD=y | ||
26 | # CONFIG_BLOCK is not set | ||
27 | CONFIG_ARC_PLAT_TB10X=y | ||
28 | CONFIG_ARC_CACHE_LINE_SHIFT=5 | ||
29 | # CONFIG_ARC_HAS_RTSC is not set | ||
30 | CONFIG_ARC_STACK_NONEXEC=y | ||
31 | CONFIG_HZ=250 | ||
32 | CONFIG_ARC_BUILTIN_DTB_NAME="abilis_tb100_dvk" | ||
33 | CONFIG_PREEMPT_VOLUNTARY=y | ||
34 | # CONFIG_COMPACTION is not set | ||
35 | # CONFIG_CROSS_MEMORY_ATTACH is not set | ||
36 | CONFIG_NET=y | ||
37 | CONFIG_PACKET=y | ||
38 | CONFIG_UNIX=y | ||
39 | CONFIG_INET=y | ||
40 | CONFIG_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 | ||
49 | CONFIG_PROC_DEVICETREE=y | ||
50 | CONFIG_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 | ||
58 | CONFIG_STMMAC_ETH=y | ||
59 | CONFIG_STMMAC_DEBUG_FS=y | ||
60 | CONFIG_STMMAC_DA=y | ||
61 | CONFIG_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 | ||
67 | CONFIG_DEVPTS_MULTIPLE_INSTANCES=y | ||
68 | # CONFIG_LEGACY_PTYS is not set | ||
69 | # CONFIG_DEVKMEM is not set | ||
70 | CONFIG_SERIAL_8250=y | ||
71 | CONFIG_SERIAL_8250_CONSOLE=y | ||
72 | CONFIG_SERIAL_8250_NR_UARTS=1 | ||
73 | CONFIG_SERIAL_8250_RUNTIME_UARTS=1 | ||
74 | CONFIG_SERIAL_8250_DW=y | ||
75 | # CONFIG_HW_RANDOM is not set | ||
76 | CONFIG_I2C=y | ||
77 | # CONFIG_I2C_COMPAT is not set | ||
78 | CONFIG_I2C_DESIGNWARE_PLATFORM=y | ||
79 | CONFIG_GPIO_SYSFS=y | ||
80 | # CONFIG_HWMON is not set | ||
81 | # CONFIG_USB_SUPPORT is not set | ||
82 | CONFIG_NEW_LEDS=y | ||
83 | CONFIG_LEDS_CLASS=y | ||
84 | CONFIG_LEDS_GPIO=y | ||
85 | CONFIG_LEDS_TRIGGERS=y | ||
86 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
87 | CONFIG_LEDS_TRIGGER_ONESHOT=y | ||
88 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
89 | CONFIG_LEDS_TRIGGER_CPU=y | ||
90 | CONFIG_LEDS_TRIGGER_GPIO=y | ||
91 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
92 | CONFIG_LEDS_TRIGGER_TRANSIENT=y | ||
93 | CONFIG_DMADEVICES=y | ||
94 | CONFIG_DW_DMAC=y | ||
95 | CONFIG_NET_DMA=y | ||
96 | CONFIG_ASYNC_TX_DMA=y | ||
97 | # CONFIG_IOMMU_SUPPORT is not set | ||
98 | # CONFIG_DNOTIFY is not set | ||
99 | CONFIG_PROC_KCORE=y | ||
100 | CONFIG_TMPFS=y | ||
101 | CONFIG_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 | ||
105 | CONFIG_MAGIC_SYSRQ=y | ||
106 | CONFIG_STRIP_ASM_SYMS=y | ||
107 | CONFIG_DEBUG_FS=y | ||
108 | CONFIG_HEADERS_CHECK=y | ||
109 | CONFIG_DEBUG_SECTION_MISMATCH=y | ||
110 | CONFIG_DETECT_HUNG_TASK=y | ||
111 | CONFIG_SCHEDSTATS=y | ||
112 | CONFIG_TIMER_STATS=y | ||
113 | CONFIG_DEBUG_INFO=y | ||
114 | CONFIG_DEBUG_MEMORY_INIT=y | ||
115 | CONFIG_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 | |||
19 | menuconfig 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 | |||
31 | if ARC_PLAT_TB10X | ||
32 | |||
33 | config GENERIC_GPIO | ||
34 | def_bool y | ||
35 | |||
36 | endif | ||
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 | |||
19 | KBUILD_CFLAGS += -Iarch/arc/plat-tb10x/include | ||
20 | |||
21 | obj-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 | |||
31 | static 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 | |||
37 | static 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 | |||
62 | static const char *tb10x_compat[] __initdata = { | ||
63 | "abilis,arc-tb10x", | ||
64 | NULL, | ||
65 | }; | ||
66 | |||
67 | MACHINE_START(TB10x, "tb10x") | ||
68 | .dt_compat = tb10x_compat, | ||
69 | .init_machine = tb10x_platform_init, | ||
70 | .init_late = tb10x_platform_late_init, | ||
71 | MACHINE_END | ||