aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/xtensa/Kconfig4
-rw-r--r--arch/xtensa/Makefile1
-rw-r--r--arch/xtensa/configs/s6105_defconfig530
-rw-r--r--arch/xtensa/platforms/s6105/Makefile3
-rw-r--r--arch/xtensa/platforms/s6105/device.c67
-rw-r--r--arch/xtensa/platforms/s6105/include/platform/gpio.h27
-rw-r--r--arch/xtensa/platforms/s6105/include/platform/hardware.h11
-rw-r--r--arch/xtensa/platforms/s6105/include/platform/serial.h8
-rw-r--r--arch/xtensa/platforms/s6105/setup.c61
9 files changed, 712 insertions, 0 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 0b7cd52d8b2..7bbc6c19289 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -156,6 +156,10 @@ config XTENSA_PLATFORM_XT2000
156 XT2000 is the name of Tensilica's feature-rich emulation platform. 156 XT2000 is the name of Tensilica's feature-rich emulation platform.
157 This hardware is capable of running a full Linux distribution. 157 This hardware is capable of running a full Linux distribution.
158 158
159config XTENSA_PLATFORM_S6105
160 bool "S6105"
161 select SERIAL_CONSOLE
162
159endchoice 163endchoice
160 164
161 165
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index 8f97a86041a..d0a8ba4b12c 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -25,6 +25,7 @@ export VARIANT
25 25
26platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 26platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
27platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss 27platform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss
28platform-$(CONFIG_XTENSA_PLATFORM_S6105) := s6105
28 29
29PLATFORM = $(platform-y) 30PLATFORM = $(platform-y)
30export PLATFORM 31export PLATFORM
diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig
new file mode 100644
index 00000000000..6e1deff4159
--- /dev/null
+++ b/arch/xtensa/configs/s6105_defconfig
@@ -0,0 +1,530 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.29-rc7-s6
4# Tue Mar 10 11:09:26 2009
5#
6# CONFIG_FRAME_POINTER is not set
7CONFIG_ZONE_DMA=y
8CONFIG_XTENSA=y
9CONFIG_RWSEM_XCHGADD_ALGORITHM=y
10CONFIG_GENERIC_FIND_NEXT_BIT=y
11CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_GPIO=y
14# CONFIG_ARCH_HAS_ILOG2_U32 is not set
15# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_NO_IOPORT=y
17CONFIG_HZ=100
18CONFIG_GENERIC_TIME=y
19CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
20
21#
22# General setup
23#
24CONFIG_EXPERIMENTAL=y
25CONFIG_BROKEN_ON_SMP=y
26CONFIG_LOCK_KERNEL=y
27CONFIG_INIT_ENV_ARG_LIMIT=32
28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
30CONFIG_SYSVIPC=y
31CONFIG_SYSVIPC_SYSCTL=y
32# CONFIG_POSIX_MQUEUE is not set
33# CONFIG_BSD_PROCESS_ACCT is not set
34# CONFIG_TASKSTATS is not set
35# CONFIG_AUDIT is not set
36
37#
38# RCU Subsystem
39#
40# CONFIG_CLASSIC_RCU is not set
41# CONFIG_TREE_RCU is not set
42CONFIG_PREEMPT_RCU=y
43# CONFIG_RCU_TRACE is not set
44# CONFIG_TREE_RCU_TRACE is not set
45# CONFIG_PREEMPT_RCU_TRACE is not set
46CONFIG_IKCONFIG=y
47CONFIG_IKCONFIG_PROC=y
48CONFIG_LOG_BUF_SHIFT=16
49# CONFIG_GROUP_SCHED is not set
50# CONFIG_CGROUPS is not set
51# CONFIG_SYSFS_DEPRECATED_V2 is not set
52# CONFIG_RELAY is not set
53# CONFIG_NAMESPACES is not set
54CONFIG_BLK_DEV_INITRD=y
55CONFIG_INITRAMFS_SOURCE=""
56CONFIG_CC_OPTIMIZE_FOR_SIZE=y
57CONFIG_SYSCTL=y
58CONFIG_EMBEDDED=y
59CONFIG_SYSCTL_SYSCALL=y
60CONFIG_KALLSYMS=y
61# CONFIG_KALLSYMS_ALL is not set
62# CONFIG_KALLSYMS_EXTRA_PASS is not set
63# CONFIG_HOTPLUG is not set
64CONFIG_PRINTK=y
65CONFIG_BUG=y
66CONFIG_ELF_CORE=y
67# CONFIG_COMPAT_BRK is not set
68CONFIG_BASE_FULL=y
69CONFIG_FUTEX=y
70CONFIG_ANON_INODES=y
71CONFIG_EPOLL=y
72CONFIG_SIGNALFD=y
73CONFIG_TIMERFD=y
74CONFIG_EVENTFD=y
75CONFIG_AIO=y
76CONFIG_VM_EVENT_COUNTERS=y
77CONFIG_SLAB=y
78# CONFIG_SLUB is not set
79# CONFIG_SLOB is not set
80# CONFIG_PROFILING is not set
81# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
82CONFIG_SLABINFO=y
83CONFIG_RT_MUTEXES=y
84CONFIG_BASE_SMALL=0
85# CONFIG_MODULES is not set
86CONFIG_BLOCK=y
87# CONFIG_LBD is not set
88# CONFIG_BLK_DEV_IO_TRACE is not set
89# CONFIG_BLK_DEV_BSG is not set
90# CONFIG_BLK_DEV_INTEGRITY is not set
91
92#
93# IO Schedulers
94#
95CONFIG_IOSCHED_NOOP=y
96# CONFIG_IOSCHED_AS is not set
97# CONFIG_IOSCHED_DEADLINE is not set
98CONFIG_IOSCHED_CFQ=y
99# CONFIG_DEFAULT_AS is not set
100# CONFIG_DEFAULT_DEADLINE is not set
101CONFIG_DEFAULT_CFQ=y
102# CONFIG_DEFAULT_NOOP is not set
103CONFIG_DEFAULT_IOSCHED="cfq"
104# CONFIG_FREEZER is not set
105# CONFIG_MMU is not set
106CONFIG_VARIANT_IRQ_SWITCH=y
107
108#
109# Processor type and features
110#
111# CONFIG_XTENSA_VARIANT_FSF is not set
112# CONFIG_XTENSA_VARIANT_DC232B is not set
113CONFIG_XTENSA_VARIANT_S6000=y
114# CONFIG_XTENSA_UNALIGNED_USER is not set
115CONFIG_PREEMPT=y
116# CONFIG_MATH_EMULATION is not set
117# CONFIG_HIGHMEM is not set
118# CONFIG_XTENSA_CALIBRATE_CCOUNT is not set
119CONFIG_SERIAL_CONSOLE=y
120# CONFIG_XTENSA_ISS_NETWORK is not set
121
122#
123# Bus options
124#
125# CONFIG_PCI is not set
126# CONFIG_ARCH_SUPPORTS_MSI is not set
127
128#
129# Platform options
130#
131# CONFIG_XTENSA_PLATFORM_ISS is not set
132# CONFIG_XTENSA_PLATFORM_XT2000 is not set
133CONFIG_XTENSA_PLATFORM_S6105=y
134CONFIG_XTENSA_CPU_CLOCK=300
135CONFIG_GENERIC_CALIBRATE_DELAY=y
136CONFIG_CMDLINE_BOOL=y
137CONFIG_CMDLINE="console=ttyS1,38400 debug bootmem_debug loglevel=7"
138CONFIG_SELECT_MEMORY_MODEL=y
139CONFIG_FLATMEM_MANUAL=y
140# CONFIG_DISCONTIGMEM_MANUAL is not set
141# CONFIG_SPARSEMEM_MANUAL is not set
142CONFIG_FLATMEM=y
143CONFIG_FLAT_NODE_MEM_MAP=y
144CONFIG_PAGEFLAGS_EXTENDED=y
145CONFIG_SPLIT_PTLOCK_CPUS=4
146# CONFIG_PHYS_ADDR_T_64BIT is not set
147CONFIG_ZONE_DMA_FLAG=1
148CONFIG_VIRT_TO_BUS=y
149
150#
151# Executable file formats
152#
153CONFIG_KCORE_ELF=y
154CONFIG_BINFMT_FLAT=y
155# CONFIG_BINFMT_ZFLAT is not set
156# CONFIG_BINFMT_SHARED_FLAT is not set
157# CONFIG_HAVE_AOUT is not set
158# CONFIG_BINFMT_MISC is not set
159CONFIG_NET=y
160
161#
162# Networking options
163#
164CONFIG_COMPAT_NET_DEV_OPS=y
165CONFIG_PACKET=y
166# CONFIG_PACKET_MMAP is not set
167CONFIG_UNIX=y
168# CONFIG_NET_KEY is not set
169CONFIG_INET=y
170# CONFIG_IP_MULTICAST is not set
171# CONFIG_IP_ADVANCED_ROUTER is not set
172CONFIG_IP_FIB_HASH=y
173# CONFIG_IP_PNP is not set
174# CONFIG_NET_IPIP is not set
175# CONFIG_NET_IPGRE is not set
176# CONFIG_ARPD is not set
177# CONFIG_SYN_COOKIES is not set
178# CONFIG_INET_AH is not set
179# CONFIG_INET_ESP is not set
180# CONFIG_INET_IPCOMP is not set
181# CONFIG_INET_XFRM_TUNNEL is not set
182# CONFIG_INET_TUNNEL is not set
183# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
184# CONFIG_INET_XFRM_MODE_TUNNEL is not set
185# CONFIG_INET_XFRM_MODE_BEET is not set
186# CONFIG_INET_LRO is not set
187# CONFIG_INET_DIAG is not set
188# CONFIG_TCP_CONG_ADVANCED is not set
189CONFIG_TCP_CONG_CUBIC=y
190CONFIG_DEFAULT_TCP_CONG="cubic"
191# CONFIG_TCP_MD5SIG is not set
192# CONFIG_IPV6 is not set
193# CONFIG_NETWORK_SECMARK is not set
194# CONFIG_NETFILTER is not set
195# CONFIG_IP_DCCP is not set
196# CONFIG_IP_SCTP is not set
197# CONFIG_TIPC is not set
198# CONFIG_ATM is not set
199# CONFIG_BRIDGE is not set
200# CONFIG_NET_DSA is not set
201# CONFIG_VLAN_8021Q is not set
202# CONFIG_DECNET is not set
203# CONFIG_LLC2 is not set
204# CONFIG_IPX is not set
205# CONFIG_ATALK is not set
206# CONFIG_X25 is not set
207# CONFIG_LAPB is not set
208# CONFIG_ECONET is not set
209# CONFIG_WAN_ROUTER is not set
210# CONFIG_NET_SCHED is not set
211# CONFIG_DCB is not set
212
213#
214# Network testing
215#
216# CONFIG_NET_PKTGEN is not set
217# CONFIG_HAMRADIO is not set
218# CONFIG_CAN is not set
219# CONFIG_IRDA is not set
220# CONFIG_BT is not set
221# CONFIG_AF_RXRPC is not set
222# CONFIG_PHONET is not set
223# CONFIG_WIRELESS is not set
224# CONFIG_WIMAX is not set
225# CONFIG_RFKILL is not set
226# CONFIG_NET_9P is not set
227
228#
229# Device Drivers
230#
231
232#
233# Generic Driver Options
234#
235CONFIG_STANDALONE=y
236CONFIG_PREVENT_FIRMWARE_BUILD=y
237# CONFIG_DEBUG_DRIVER is not set
238# CONFIG_DEBUG_DEVRES is not set
239# CONFIG_SYS_HYPERVISOR is not set
240# CONFIG_CONNECTOR is not set
241# CONFIG_MTD is not set
242# CONFIG_PARPORT is not set
243CONFIG_BLK_DEV=y
244# CONFIG_BLK_DEV_COW_COMMON is not set
245# CONFIG_BLK_DEV_LOOP is not set
246# CONFIG_BLK_DEV_NBD is not set
247CONFIG_BLK_DEV_RAM=y
248CONFIG_BLK_DEV_RAM_COUNT=16
249CONFIG_BLK_DEV_RAM_SIZE=4096
250# CONFIG_BLK_DEV_XIP is not set
251# CONFIG_CDROM_PKTCDVD is not set
252# CONFIG_ATA_OVER_ETH is not set
253# CONFIG_BLK_DEV_HD is not set
254# CONFIG_MISC_DEVICES is not set
255CONFIG_HAVE_IDE=y
256# CONFIG_IDE is not set
257
258#
259# SCSI device support
260#
261# CONFIG_RAID_ATTRS is not set
262# CONFIG_SCSI is not set
263# CONFIG_SCSI_DMA is not set
264# CONFIG_SCSI_NETLINK is not set
265# CONFIG_ATA is not set
266# CONFIG_MD is not set
267# CONFIG_NETDEVICES is not set
268# CONFIG_ISDN is not set
269# CONFIG_PHONE is not set
270
271#
272# Input device support
273#
274# CONFIG_INPUT is not set
275
276#
277# Hardware I/O ports
278#
279# CONFIG_SERIO is not set
280# CONFIG_GAMEPORT is not set
281
282#
283# Character devices
284#
285# CONFIG_VT is not set
286# CONFIG_DEVKMEM is not set
287# CONFIG_SERIAL_NONSTANDARD is not set
288
289#
290# Serial drivers
291#
292CONFIG_SERIAL_8250=y
293CONFIG_SERIAL_8250_CONSOLE=y
294CONFIG_SERIAL_8250_NR_UARTS=2
295CONFIG_SERIAL_8250_RUNTIME_UARTS=2
296# CONFIG_SERIAL_8250_EXTENDED is not set
297
298#
299# Non-8250 serial port support
300#
301CONFIG_SERIAL_CORE=y
302CONFIG_SERIAL_CORE_CONSOLE=y
303CONFIG_UNIX98_PTYS=y
304# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
305# CONFIG_LEGACY_PTYS is not set
306# CONFIG_IPMI_HANDLER is not set
307# CONFIG_HW_RANDOM is not set
308# CONFIG_RTC is not set
309# CONFIG_GEN_RTC is not set
310# CONFIG_R3964 is not set
311# CONFIG_RAW_DRIVER is not set
312# CONFIG_TCG_TPM is not set
313# CONFIG_I2C is not set
314# CONFIG_SPI is not set
315CONFIG_ARCH_REQUIRE_GPIOLIB=y
316CONFIG_GPIOLIB=y
317# CONFIG_DEBUG_GPIO is not set
318# CONFIG_GPIO_SYSFS is not set
319
320#
321# Memory mapped GPIO expanders:
322#
323
324#
325# I2C GPIO expanders:
326#
327
328#
329# PCI GPIO expanders:
330#
331
332#
333# SPI GPIO expanders:
334#
335# CONFIG_W1 is not set
336# CONFIG_POWER_SUPPLY is not set
337# CONFIG_HWMON is not set
338# CONFIG_THERMAL is not set
339# CONFIG_THERMAL_HWMON is not set
340# CONFIG_WATCHDOG is not set
341CONFIG_SSB_POSSIBLE=y
342
343#
344# Sonics Silicon Backplane
345#
346# CONFIG_SSB is not set
347
348#
349# Multifunction device drivers
350#
351# CONFIG_MFD_CORE is not set
352# CONFIG_MFD_SM501 is not set
353# CONFIG_HTC_PASIC3 is not set
354# CONFIG_MFD_TMIO is not set
355# CONFIG_REGULATOR is not set
356
357#
358# Multimedia devices
359#
360
361#
362# Multimedia core support
363#
364# CONFIG_VIDEO_DEV is not set
365# CONFIG_DVB_CORE is not set
366# CONFIG_VIDEO_MEDIA is not set
367
368#
369# Multimedia drivers
370#
371# CONFIG_DAB is not set
372
373#
374# Graphics support
375#
376# CONFIG_VGASTATE is not set
377# CONFIG_VIDEO_OUTPUT_CONTROL is not set
378# CONFIG_FB is not set
379# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
380
381#
382# Display device support
383#
384# CONFIG_DISPLAY_SUPPORT is not set
385# CONFIG_SOUND is not set
386# CONFIG_USB_SUPPORT is not set
387# CONFIG_MMC is not set
388# CONFIG_MEMSTICK is not set
389# CONFIG_NEW_LEDS is not set
390# CONFIG_ACCESSIBILITY is not set
391# CONFIG_RTC_CLASS is not set
392# CONFIG_DMADEVICES is not set
393# CONFIG_UIO is not set
394# CONFIG_STAGING is not set
395
396#
397# File systems
398#
399# CONFIG_EXT2_FS is not set
400# CONFIG_EXT3_FS is not set
401# CONFIG_EXT4_FS is not set
402# CONFIG_REISERFS_FS is not set
403# CONFIG_JFS_FS is not set
404# CONFIG_FS_POSIX_ACL is not set
405CONFIG_FILE_LOCKING=y
406# CONFIG_XFS_FS is not set
407# CONFIG_OCFS2_FS is not set
408# CONFIG_BTRFS_FS is not set
409# CONFIG_DNOTIFY is not set
410# CONFIG_INOTIFY is not set
411# CONFIG_QUOTA is not set
412# CONFIG_AUTOFS_FS is not set
413# CONFIG_AUTOFS4_FS is not set
414# CONFIG_FUSE_FS is not set
415
416#
417# CD-ROM/DVD Filesystems
418#
419# CONFIG_ISO9660_FS is not set
420# CONFIG_UDF_FS is not set
421
422#
423# DOS/FAT/NT Filesystems
424#
425# CONFIG_MSDOS_FS is not set
426# CONFIG_VFAT_FS is not set
427# CONFIG_NTFS_FS is not set
428
429#
430# Pseudo filesystems
431#
432CONFIG_PROC_FS=y
433CONFIG_PROC_SYSCTL=y
434CONFIG_SYSFS=y
435# CONFIG_TMPFS is not set
436# CONFIG_HUGETLB_PAGE is not set
437# CONFIG_CONFIGFS_FS is not set
438# CONFIG_MISC_FILESYSTEMS is not set
439# CONFIG_NETWORK_FILESYSTEMS is not set
440
441#
442# Partition Types
443#
444# CONFIG_PARTITION_ADVANCED is not set
445CONFIG_MSDOS_PARTITION=y
446# CONFIG_NLS is not set
447# CONFIG_DLM is not set
448
449#
450# Xtensa initrd options
451#
452# CONFIG_EMBEDDED_RAMDISK is not set
453
454#
455# Kernel hacking
456#
457CONFIG_PRINTK_TIME=y
458# CONFIG_ENABLE_WARN_DEPRECATED is not set
459# CONFIG_ENABLE_MUST_CHECK is not set
460CONFIG_FRAME_WARN=1024
461# CONFIG_MAGIC_SYSRQ is not set
462# CONFIG_UNUSED_SYMBOLS is not set
463# CONFIG_DEBUG_FS is not set
464# CONFIG_HEADERS_CHECK is not set
465CONFIG_DEBUG_KERNEL=y
466CONFIG_DEBUG_SHIRQ=y
467CONFIG_DETECT_SOFTLOCKUP=y
468# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
469CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
470# CONFIG_SCHED_DEBUG is not set
471# CONFIG_SCHEDSTATS is not set
472# CONFIG_TIMER_STATS is not set
473# CONFIG_DEBUG_OBJECTS is not set
474# CONFIG_DEBUG_SLAB is not set
475# CONFIG_DEBUG_RT_MUTEXES is not set
476# CONFIG_RT_MUTEX_TESTER is not set
477CONFIG_DEBUG_SPINLOCK=y
478CONFIG_DEBUG_MUTEXES=y
479CONFIG_DEBUG_SPINLOCK_SLEEP=y
480# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
481# CONFIG_DEBUG_KOBJECT is not set
482# CONFIG_DEBUG_INFO is not set
483# CONFIG_DEBUG_VM is not set
484CONFIG_DEBUG_NOMMU_REGIONS=y
485# CONFIG_DEBUG_WRITECOUNT is not set
486# CONFIG_DEBUG_MEMORY_INIT is not set
487# CONFIG_DEBUG_LIST is not set
488# CONFIG_DEBUG_SG is not set
489# CONFIG_DEBUG_NOTIFIERS is not set
490# CONFIG_BOOT_PRINTK_DELAY is not set
491# CONFIG_RCU_TORTURE_TEST is not set
492# CONFIG_BACKTRACE_SELF_TEST is not set
493# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
494# CONFIG_FAULT_INJECTION is not set
495# CONFIG_SYSCTL_SYSCALL_CHECK is not set
496
497#
498# Tracers
499#
500# CONFIG_PREEMPT_TRACER is not set
501# CONFIG_SCHED_TRACER is not set
502# CONFIG_CONTEXT_SWITCH_TRACER is not set
503# CONFIG_BOOT_TRACER is not set
504# CONFIG_TRACE_BRANCH_PROFILING is not set
505# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
506# CONFIG_SAMPLES is not set
507
508#
509# Security options
510#
511# CONFIG_KEYS is not set
512# CONFIG_SECURITY is not set
513# CONFIG_SECURITYFS is not set
514# CONFIG_SECURITY_FILE_CAPABILITIES is not set
515# CONFIG_CRYPTO is not set
516
517#
518# Library routines
519#
520CONFIG_GENERIC_FIND_LAST_BIT=y
521# CONFIG_CRC_CCITT is not set
522# CONFIG_CRC16 is not set
523# CONFIG_CRC_T10DIF is not set
524# CONFIG_CRC_ITU_T is not set
525# CONFIG_CRC32 is not set
526# CONFIG_CRC7 is not set
527# CONFIG_LIBCRC32C is not set
528CONFIG_PLIST=y
529CONFIG_HAS_IOMEM=y
530CONFIG_HAS_DMA=y
diff --git a/arch/xtensa/platforms/s6105/Makefile b/arch/xtensa/platforms/s6105/Makefile
new file mode 100644
index 00000000000..0be6194bcb7
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/Makefile
@@ -0,0 +1,3 @@
1# Makefile for the Stretch S6105 eval board
2
3obj-y := setup.o device.o
diff --git a/arch/xtensa/platforms/s6105/device.c b/arch/xtensa/platforms/s6105/device.c
new file mode 100644
index 00000000000..78b08be5a92
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/device.c
@@ -0,0 +1,67 @@
1/*
2 * s6105 platform devices
3 *
4 * Copyright (c) 2009 emlix GmbH
5 */
6
7#include <linux/kernel.h>
8#include <linux/init.h>
9#include <linux/platform_device.h>
10#include <linux/serial.h>
11#include <linux/serial_8250.h>
12
13#include <variant/hardware.h>
14
15#define UART_INTNUM 4
16
17static const signed char uart_irq_mappings[] = {
18 S6_INTC_UART(0),
19 S6_INTC_UART(1),
20 -1,
21};
22
23const signed char *platform_irq_mappings[NR_IRQS] = {
24 [UART_INTNUM] = uart_irq_mappings,
25};
26
27static struct plat_serial8250_port serial_platform_data[] = {
28 {
29 .membase = (void *)S6_REG_UART + 0x0000,
30 .mapbase = S6_REG_UART + 0x0000,
31 .irq = UART_INTNUM,
32 .uartclk = S6_SCLK,
33 .regshift = 2,
34 .iotype = SERIAL_IO_MEM,
35 .flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST,
36 },
37 {
38 .membase = (void *)S6_REG_UART + 0x1000,
39 .mapbase = S6_REG_UART + 0x1000,
40 .irq = UART_INTNUM,
41 .uartclk = S6_SCLK,
42 .regshift = 2,
43 .iotype = SERIAL_IO_MEM,
44 .flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST,
45 },
46 { },
47};
48
49static struct platform_device platform_devices[] = {
50 {
51 .name = "serial8250",
52 .id = PLAT8250_DEV_PLATFORM,
53 .dev = {
54 .platform_data = serial_platform_data,
55 },
56 },
57};
58
59static int __init device_init(void)
60{
61 int i;
62
63 for (i = 0; i < ARRAY_SIZE(platform_devices); i++)
64 platform_device_register(&platform_devices[i]);
65 return 0;
66}
67arch_initcall_sync(device_init);
diff --git a/arch/xtensa/platforms/s6105/include/platform/gpio.h b/arch/xtensa/platforms/s6105/include/platform/gpio.h
new file mode 100644
index 00000000000..fa11aa4b61e
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/include/platform/gpio.h
@@ -0,0 +1,27 @@
1#ifndef __ASM_XTENSA_S6105_GPIO_H
2#define __ASM_XTENSA_S6105_GPIO_H
3
4#define GPIO_BP_TEMP_ALARM 0
5#define GPIO_PB_RESET_IN 1
6#define GPIO_EXP_IRQ 2
7#define GPIO_TRIGGER_IRQ 3
8#define GPIO_RTC_IRQ 4
9#define GPIO_PHY_IRQ 5
10#define GPIO_IMAGER_RESET 6
11#define GPIO_SD_IRQ 7
12#define GPIO_MINI_BOOT_INH 8
13#define GPIO_BOARD_RESET 9
14#define GPIO_EXP_PRESENT 10
15#define GPIO_LED1_NGREEN 12
16#define GPIO_LED1_RED 13
17#define GPIO_LED0_NGREEN 14
18#define GPIO_LED0_NRED 15
19#define GPIO_SPI_CS0 16
20#define GPIO_SPI_CS1 17
21#define GPIO_SPI_CS3 19
22#define GPIO_SPI_CS4 20
23#define GPIO_SD_WP 21
24#define GPIO_BP_RESET 22
25#define GPIO_ALARM_OUT 23
26
27#endif /* __ASM_XTENSA_S6105_GPIO_H */
diff --git a/arch/xtensa/platforms/s6105/include/platform/hardware.h b/arch/xtensa/platforms/s6105/include/platform/hardware.h
new file mode 100644
index 00000000000..d628efac708
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/include/platform/hardware.h
@@ -0,0 +1,11 @@
1#ifndef __XTENSA_S6105_HARDWARE_H
2#define __XTENSA_S6105_HARDWARE_H
3
4#define PLATFORM_DEFAULT_MEM_START 0x40000000
5#define PLATFORM_DEFAULT_MEM_SIZE 0x08000000
6
7#define MAX_DMA_ADDRESS 0
8
9#define KERNELOFFSET (PLATFORM_DEFAULT_MEM_START + 0x1000)
10
11#endif /* __XTENSA_S6105_HARDWARE_H */
diff --git a/arch/xtensa/platforms/s6105/include/platform/serial.h b/arch/xtensa/platforms/s6105/include/platform/serial.h
new file mode 100644
index 00000000000..c8a771e5981
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/include/platform/serial.h
@@ -0,0 +1,8 @@
1#ifndef __ASM_XTENSA_S6105_SERIAL_H
2#define __ASM_XTENSA_S6105_SERIAL_H
3
4#include <variant/hardware.h>
5
6#define BASE_BAUD (S6_SCLK / 16)
7
8#endif /* __ASM_XTENSA_S6105_SERIAL_H */
diff --git a/arch/xtensa/platforms/s6105/setup.c b/arch/xtensa/platforms/s6105/setup.c
new file mode 100644
index 00000000000..ae041d5027a
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/setup.c
@@ -0,0 +1,61 @@
1/*
2 * s6105 control routines
3 *
4 * Copyright (c) 2009 emlix GmbH
5 */
6#include <linux/irq.h>
7#include <linux/io.h>
8#include <linux/gpio.h>
9
10#include <asm/bootparam.h>
11
12#include <variant/hardware.h>
13#include <platform/gpio.h>
14
15void platform_halt(void)
16{
17 local_irq_disable();
18 while (1)
19 ;
20}
21
22void platform_power_off(void)
23{
24 platform_halt();
25}
26
27void platform_restart(void)
28{
29 platform_halt();
30}
31
32void __init platform_setup(char **cmdline)
33{
34 unsigned long reg;
35
36 reg = readl(S6_REG_GREG1 + S6_GREG1_CLKGATE);
37 reg &= ~(1 << S6_GREG1_BLOCK_SB);
38 writel(reg, S6_REG_GREG1 + S6_GREG1_CLKGATE);
39
40 reg = readl(S6_REG_GREG1 + S6_GREG1_BLOCKENA);
41 reg |= 1 << S6_GREG1_BLOCK_SB;
42 writel(reg, S6_REG_GREG1 + S6_GREG1_BLOCKENA);
43
44 printk(KERN_NOTICE "S6105 on Stretch S6000 - "
45 "Copyright (C) 2009 emlix GmbH <info@emlix.com>\n");
46}
47
48void __init platform_init(bp_tag_t *first)
49{
50 gpio_request(GPIO_LED1_NGREEN, "led1_green");
51 gpio_request(GPIO_LED1_RED, "led1_red");
52 gpio_direction_output(GPIO_LED1_NGREEN, 1);
53}
54
55void platform_heartbeat(void)
56{
57 static unsigned int c;
58
59 if (!(++c & 0x4F))
60 gpio_direction_output(GPIO_LED1_RED, !(c & 0x10));
61}