aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig16
-rw-r--r--arch/arm/Makefile1
-rw-r--r--arch/arm/common/vic.c99
-rw-r--r--arch/arm/configs/nhk8815_defconfig1316
-rw-r--r--arch/arm/mach-nomadik/Kconfig21
-rw-r--r--arch/arm/mach-nomadik/Makefile19
-rw-r--r--arch/arm/mach-nomadik/Makefile.boot4
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c111
-rw-r--r--arch/arm/mach-nomadik/clock.c45
-rw-r--r--arch/arm/mach-nomadik/clock.h14
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c139
-rw-r--r--arch/arm/mach-nomadik/gpio.c396
-rw-r--r--arch/arm/mach-nomadik/i2c-8815nhk.c65
-rw-r--r--arch/arm/mach-nomadik/include/mach/clkdev.h7
-rw-r--r--arch/arm/mach-nomadik/include/mach/debug-macro.S22
-rw-r--r--arch/arm/mach-nomadik/include/mach/entry-macro.S43
-rw-r--r--arch/arm/mach-nomadik/include/mach/gpio.h71
-rw-r--r--arch/arm/mach-nomadik/include/mach/hardware.h90
-rw-r--r--arch/arm/mach-nomadik/include/mach/io.h22
-rw-r--r--arch/arm/mach-nomadik/include/mach/irqs.h82
-rw-r--r--arch/arm/mach-nomadik/include/mach/memory.h28
-rw-r--r--arch/arm/mach-nomadik/include/mach/mtu.h45
-rw-r--r--arch/arm/mach-nomadik/include/mach/setup.h22
-rw-r--r--arch/arm/mach-nomadik/include/mach/system.h45
-rw-r--r--arch/arm/mach-nomadik/include/mach/timex.h6
-rw-r--r--arch/arm/mach-nomadik/include/mach/uncompress.h63
-rw-r--r--arch/arm/mach-nomadik/include/mach/vmalloc.h2
-rw-r--r--arch/arm/mach-nomadik/timer.c164
-rw-r--r--arch/arm/mm/Kconfig2
29 files changed, 2958 insertions, 2 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5f6d977bd3df..7a96ad317dcd 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -338,6 +338,20 @@ config ARCH_H720X
338 help 338 help
339 This enables support for systems based on the Hynix HMS720x 339 This enables support for systems based on the Hynix HMS720x
340 340
341config ARCH_NOMADIK
342 bool "STMicroelectronics Nomadik"
343 select ARM_AMBA
344 select ARM_VIC
345 select CPU_ARM926T
346 select HAVE_CLK
347 select COMMON_CLKDEV
348 select GENERIC_TIME
349 select GENERIC_CLOCKEVENTS
350 select GENERIC_GPIO
351 select ARCH_REQUIRE_GPIOLIB
352 help
353 Support for the Nomadik platform by ST-Ericsson
354
341config ARCH_IOP13XX 355config ARCH_IOP13XX
342 bool "IOP13xx-based" 356 bool "IOP13xx-based"
343 depends on MMU 357 depends on MMU
@@ -745,6 +759,8 @@ source "arch/arm/mach-at91/Kconfig"
745 759
746source "arch/arm/plat-mxc/Kconfig" 760source "arch/arm/plat-mxc/Kconfig"
747 761
762source "arch/arm/mach-nomadik/Kconfig"
763
748source "arch/arm/mach-netx/Kconfig" 764source "arch/arm/mach-netx/Kconfig"
749 765
750source "arch/arm/mach-ns9xxx/Kconfig" 766source "arch/arm/mach-ns9xxx/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 3de196e2a7a7..b70f62c8fc0a 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -145,6 +145,7 @@ machine-$(CONFIG_ARCH_MX2) := mx2
145machine-$(CONFIG_ARCH_MX25) := mx25 145machine-$(CONFIG_ARCH_MX25) := mx25
146machine-$(CONFIG_ARCH_MX3) := mx3 146machine-$(CONFIG_ARCH_MX3) := mx3
147machine-$(CONFIG_ARCH_NETX) := netx 147machine-$(CONFIG_ARCH_NETX) := netx
148machine-$(CONFIG_ARCH_NOMADIK) := nomadik
148machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx 149machine-$(CONFIG_ARCH_NS9XXX) := ns9xxx
149machine-$(CONFIG_ARCH_OMAP1) := omap1 150machine-$(CONFIG_ARCH_OMAP1) := omap1
150machine-$(CONFIG_ARCH_OMAP2) := omap2 151machine-$(CONFIG_ARCH_OMAP2) := omap2
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index 6ed89836e908..bc1f9ad61ff6 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -26,6 +26,15 @@
26#include <asm/mach/irq.h> 26#include <asm/mach/irq.h>
27#include <asm/hardware/vic.h> 27#include <asm/hardware/vic.h>
28 28
29static void vic_ack_irq(unsigned int irq)
30{
31 void __iomem *base = get_irq_chip_data(irq);
32 irq &= 31;
33 writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
34 /* moreover, clear the soft-triggered, in case it was the reason */
35 writel(1 << irq, base + VIC_INT_SOFT_CLEAR);
36}
37
29static void vic_mask_irq(unsigned int irq) 38static void vic_mask_irq(unsigned int irq)
30{ 39{
31 void __iomem *base = get_irq_chip_data(irq); 40 void __iomem *base = get_irq_chip_data(irq);
@@ -253,12 +262,21 @@ static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg
253 262
254static struct irq_chip vic_chip = { 263static struct irq_chip vic_chip = {
255 .name = "VIC", 264 .name = "VIC",
256 .ack = vic_mask_irq, 265 .ack = vic_ack_irq,
257 .mask = vic_mask_irq, 266 .mask = vic_mask_irq,
258 .unmask = vic_unmask_irq, 267 .unmask = vic_unmask_irq,
259 .set_wake = vic_set_wake, 268 .set_wake = vic_set_wake,
260}; 269};
261 270
271/* The PL190 cell from ARM has been modified by ST, so handle both here */
272static void vik_init_st(void __iomem *base, unsigned int irq_start,
273 u32 vic_sources);
274
275enum vic_vendor {
276 VENDOR_ARM = 0x41,
277 VENDOR_ST = 0x80,
278};
279
262/** 280/**
263 * vic_init - initialise a vectored interrupt controller 281 * vic_init - initialise a vectored interrupt controller
264 * @base: iomem base address 282 * @base: iomem base address
@@ -270,6 +288,28 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
270 u32 vic_sources, u32 resume_sources) 288 u32 vic_sources, u32 resume_sources)
271{ 289{
272 unsigned int i; 290 unsigned int i;
291 u32 cellid = 0;
292 enum vic_vendor vendor;
293
294 /* Identify which VIC cell this one is, by reading the ID */
295 for (i = 0; i < 4; i++) {
296 u32 addr = ((u32)base & PAGE_MASK) + 0xfe0 + (i * 4);
297 cellid |= (readl(addr) & 0xff) << (8 * i);
298 }
299 vendor = (cellid >> 12) & 0xff;
300 printk(KERN_INFO "VIC @%p: id 0x%08x, vendor 0x%02x\n",
301 base, cellid, vendor);
302
303 switch(vendor) {
304 case VENDOR_ST:
305 vik_init_st(base, irq_start, vic_sources);
306 return;
307 default:
308 printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n");
309 /* fall through */
310 case VENDOR_ARM:
311 break;
312 }
273 313
274 /* Disable all interrupts initially. */ 314 /* Disable all interrupts initially. */
275 315
@@ -306,3 +346,60 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
306 346
307 vic_pm_register(base, irq_start, resume_sources); 347 vic_pm_register(base, irq_start, resume_sources);
308} 348}
349
350/*
351 * The PL190 cell from ARM has been modified by ST to handle 64 interrupts.
352 * The original cell has 32 interrupts, while the modified one has 64,
353 * replocating two blocks 0x00..0x1f in 0x20..0x3f. In that case
354 * the probe function is called twice, with base set to offset 000
355 * and 020 within the page. We call this "second block".
356 */
357static void __init vik_init_st(void __iomem *base, unsigned int irq_start,
358 u32 vic_sources)
359{
360 unsigned int i;
361 int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0;
362
363 /* Disable all interrupts initially. */
364
365 writel(0, base + VIC_INT_SELECT);
366 writel(0, base + VIC_INT_ENABLE);
367 writel(~0, base + VIC_INT_ENABLE_CLEAR);
368 writel(0, base + VIC_IRQ_STATUS);
369 writel(0, base + VIC_ITCR);
370 writel(~0, base + VIC_INT_SOFT_CLEAR);
371
372 /*
373 * Make sure we clear all existing interrupts. The vector registers
374 * in this cell are after the second block of general registers,
375 * so we can address them using standard offsets, but only from
376 * the second base address, which is 0x20 in the page
377 */
378 if (vic_2nd_block) {
379 writel(0, base + VIC_PL190_VECT_ADDR);
380 for (i = 0; i < 19; i++) {
381 unsigned int value;
382
383 value = readl(base + VIC_PL190_VECT_ADDR);
384 writel(value, base + VIC_PL190_VECT_ADDR);
385 }
386 /* ST has 16 vectors as well, but we don't enable them by now */
387 for (i = 0; i < 16; i++) {
388 void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4);
389 writel(0, reg);
390 }
391
392 writel(32, base + VIC_PL190_DEF_VECT_ADDR);
393 }
394
395 for (i = 0; i < 32; i++) {
396 if (vic_sources & (1 << i)) {
397 unsigned int irq = irq_start + i;
398
399 set_irq_chip(irq, &vic_chip);
400 set_irq_chip_data(irq, base);
401 set_irq_handler(irq, handle_level_irq);
402 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
403 }
404 }
405}
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
new file mode 100644
index 000000000000..9bb45b932f04
--- /dev/null
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -0,0 +1,1316 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.30
4# Tue Jun 23 22:57:16 2009
5#
6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
8CONFIG_GENERIC_GPIO=y
9CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_CLOCKEVENTS=y
11CONFIG_MMU=y
12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_STACKTRACE_SUPPORT=y
14CONFIG_HAVE_LATENCYTOP_SUPPORT=y
15CONFIG_LOCKDEP_SUPPORT=y
16CONFIG_TRACE_IRQFLAGS_SUPPORT=y
17CONFIG_HARDIRQS_SW_RESEND=y
18CONFIG_GENERIC_IRQ_PROBE=y
19CONFIG_RWSEM_GENERIC_SPINLOCK=y
20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
23CONFIG_VECTORS_BASE=0xffff0000
24CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25CONFIG_CONSTRUCTORS=y
26
27#
28# General setup
29#
30CONFIG_EXPERIMENTAL=y
31CONFIG_BROKEN_ON_SMP=y
32CONFIG_LOCK_KERNEL=y
33CONFIG_INIT_ENV_ARG_LIMIT=32
34CONFIG_LOCALVERSION=""
35# CONFIG_LOCALVERSION_AUTO is not set
36# CONFIG_SWAP is not set
37CONFIG_SYSVIPC=y
38CONFIG_SYSVIPC_SYSCTL=y
39# CONFIG_POSIX_MQUEUE is not set
40# CONFIG_BSD_PROCESS_ACCT is not set
41# CONFIG_TASKSTATS is not set
42# CONFIG_AUDIT is not set
43
44#
45# RCU Subsystem
46#
47CONFIG_CLASSIC_RCU=y
48# CONFIG_TREE_RCU is not set
49# CONFIG_PREEMPT_RCU is not set
50# CONFIG_TREE_RCU_TRACE is not set
51# CONFIG_PREEMPT_RCU_TRACE is not set
52CONFIG_IKCONFIG=y
53CONFIG_IKCONFIG_PROC=y
54CONFIG_LOG_BUF_SHIFT=14
55# CONFIG_GROUP_SCHED is not set
56# CONFIG_CGROUPS is not set
57CONFIG_SYSFS_DEPRECATED=y
58CONFIG_SYSFS_DEPRECATED_V2=y
59# CONFIG_RELAY is not set
60# CONFIG_NAMESPACES is not set
61CONFIG_BLK_DEV_INITRD=y
62CONFIG_INITRAMFS_SOURCE=""
63CONFIG_RD_GZIP=y
64# CONFIG_RD_BZIP2 is not set
65# CONFIG_RD_LZMA is not set
66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
67CONFIG_SYSCTL=y
68CONFIG_ANON_INODES=y
69CONFIG_EMBEDDED=y
70CONFIG_UID16=y
71CONFIG_SYSCTL_SYSCALL=y
72CONFIG_KALLSYMS=y
73CONFIG_KALLSYMS_ALL=y
74# CONFIG_KALLSYMS_EXTRA_PASS is not set
75CONFIG_HOTPLUG=y
76CONFIG_PRINTK=y
77CONFIG_BUG=y
78CONFIG_ELF_CORE=y
79CONFIG_BASE_FULL=y
80CONFIG_FUTEX=y
81CONFIG_EPOLL=y
82CONFIG_SIGNALFD=y
83CONFIG_TIMERFD=y
84CONFIG_EVENTFD=y
85CONFIG_SHMEM=y
86CONFIG_AIO=y
87
88#
89# Performance Counters
90#
91CONFIG_VM_EVENT_COUNTERS=y
92# CONFIG_STRIP_ASM_SYMS is not set
93CONFIG_COMPAT_BRK=y
94CONFIG_SLAB=y
95# CONFIG_SLUB is not set
96# CONFIG_SLOB is not set
97# CONFIG_PROFILING is not set
98# CONFIG_MARKERS is not set
99CONFIG_HAVE_OPROFILE=y
100# CONFIG_KPROBES is not set
101CONFIG_HAVE_KPROBES=y
102CONFIG_HAVE_KRETPROBES=y
103CONFIG_HAVE_CLK=y
104
105#
106# GCOV-based kernel profiling
107#
108# CONFIG_SLOW_WORK is not set
109CONFIG_HAVE_GENERIC_DMA_COHERENT=y
110CONFIG_SLABINFO=y
111CONFIG_RT_MUTEXES=y
112CONFIG_BASE_SMALL=0
113CONFIG_MODULES=y
114# CONFIG_MODULE_FORCE_LOAD is not set
115CONFIG_MODULE_UNLOAD=y
116# CONFIG_MODULE_FORCE_UNLOAD is not set
117# CONFIG_MODVERSIONS is not set
118# CONFIG_MODULE_SRCVERSION_ALL is not set
119CONFIG_BLOCK=y
120CONFIG_LBDAF=y
121# CONFIG_BLK_DEV_BSG is not set
122# CONFIG_BLK_DEV_INTEGRITY is not set
123
124#
125# IO Schedulers
126#
127CONFIG_IOSCHED_NOOP=y
128CONFIG_IOSCHED_AS=y
129CONFIG_IOSCHED_DEADLINE=y
130CONFIG_IOSCHED_CFQ=y
131CONFIG_DEFAULT_AS=y
132# CONFIG_DEFAULT_DEADLINE is not set
133# CONFIG_DEFAULT_CFQ is not set
134# CONFIG_DEFAULT_NOOP is not set
135CONFIG_DEFAULT_IOSCHED="anticipatory"
136CONFIG_FREEZER=y
137
138#
139# System Type
140#
141# CONFIG_ARCH_AAEC2000 is not set
142# CONFIG_ARCH_INTEGRATOR is not set
143# CONFIG_ARCH_REALVIEW is not set
144# CONFIG_ARCH_VERSATILE is not set
145# CONFIG_ARCH_AT91 is not set
146# CONFIG_ARCH_CLPS711X is not set
147# CONFIG_ARCH_GEMINI is not set
148# CONFIG_ARCH_EBSA110 is not set
149# CONFIG_ARCH_EP93XX is not set
150# CONFIG_ARCH_FOOTBRIDGE is not set
151# CONFIG_ARCH_MXC is not set
152# CONFIG_ARCH_STMP3XXX is not set
153# CONFIG_ARCH_NETX is not set
154# CONFIG_ARCH_H720X is not set
155CONFIG_ARCH_NOMADIK=y
156# CONFIG_ARCH_IOP13XX is not set
157# CONFIG_ARCH_IOP32X is not set
158# CONFIG_ARCH_IOP33X is not set
159# CONFIG_ARCH_IXP23XX is not set
160# CONFIG_ARCH_IXP2000 is not set
161# CONFIG_ARCH_IXP4XX is not set
162# CONFIG_ARCH_L7200 is not set
163# CONFIG_ARCH_KIRKWOOD is not set
164# CONFIG_ARCH_LOKI is not set
165# CONFIG_ARCH_MV78XX0 is not set
166# CONFIG_ARCH_ORION5X is not set
167# CONFIG_ARCH_MMP is not set
168# CONFIG_ARCH_KS8695 is not set
169# CONFIG_ARCH_NS9XXX is not set
170# CONFIG_ARCH_W90X900 is not set
171# CONFIG_ARCH_PNX4008 is not set
172# CONFIG_ARCH_PXA is not set
173# CONFIG_ARCH_MSM is not set
174# CONFIG_ARCH_RPC is not set
175# CONFIG_ARCH_SA1100 is not set
176# CONFIG_ARCH_S3C2410 is not set
177# CONFIG_ARCH_S3C64XX is not set
178# CONFIG_ARCH_SHARK is not set
179# CONFIG_ARCH_LH7A40X is not set
180# CONFIG_ARCH_U300 is not set
181# CONFIG_ARCH_DAVINCI is not set
182# CONFIG_ARCH_OMAP is not set
183
184#
185# Nomadik boards
186#
187CONFIG_MACH_NOMADIK_8815NHK=y
188CONFIG_NOMADIK_8815=y
189CONFIG_I2C_BITBANG_8815NHK=y
190
191#
192# Processor Type
193#
194CONFIG_CPU_32=y
195CONFIG_CPU_ARM926T=y
196CONFIG_CPU_32v5=y
197CONFIG_CPU_ABRT_EV5TJ=y
198CONFIG_CPU_PABRT_NOIFAR=y
199CONFIG_CPU_CACHE_VIVT=y
200CONFIG_CPU_COPY_V4WB=y
201CONFIG_CPU_TLB_V4WBI=y
202CONFIG_CPU_CP15=y
203CONFIG_CPU_CP15_MMU=y
204
205#
206# Processor Features
207#
208CONFIG_ARM_THUMB=y
209# CONFIG_CPU_ICACHE_DISABLE is not set
210# CONFIG_CPU_DCACHE_DISABLE is not set
211# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
212# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
213CONFIG_OUTER_CACHE=y
214CONFIG_CACHE_L2X0=y
215CONFIG_ARM_VIC=y
216CONFIG_ARM_VIC_NR=2
217CONFIG_COMMON_CLKDEV=y
218
219#
220# Bus support
221#
222CONFIG_ARM_AMBA=y
223# CONFIG_PCI_SYSCALL is not set
224# CONFIG_ARCH_SUPPORTS_MSI is not set
225# CONFIG_PCCARD is not set
226
227#
228# Kernel Features
229#
230# CONFIG_NO_HZ is not set
231# CONFIG_HIGH_RES_TIMERS is not set
232CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
233CONFIG_VMSPLIT_3G=y
234# CONFIG_VMSPLIT_2G is not set
235# CONFIG_VMSPLIT_1G is not set
236CONFIG_PAGE_OFFSET=0xC0000000
237CONFIG_PREEMPT=y
238CONFIG_HZ=100
239CONFIG_AEABI=y
240CONFIG_OABI_COMPAT=y
241# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
242# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
243# CONFIG_HIGHMEM is not set
244CONFIG_SELECT_MEMORY_MODEL=y
245CONFIG_FLATMEM_MANUAL=y
246# CONFIG_DISCONTIGMEM_MANUAL is not set
247# CONFIG_SPARSEMEM_MANUAL is not set
248CONFIG_FLATMEM=y
249CONFIG_FLAT_NODE_MEM_MAP=y
250CONFIG_PAGEFLAGS_EXTENDED=y
251CONFIG_SPLIT_PTLOCK_CPUS=4096
252# CONFIG_PHYS_ADDR_T_64BIT is not set
253CONFIG_ZONE_DMA_FLAG=0
254CONFIG_VIRT_TO_BUS=y
255CONFIG_HAVE_MLOCK=y
256CONFIG_HAVE_MLOCKED_PAGE_BIT=y
257CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
258CONFIG_ALIGNMENT_TRAP=y
259# CONFIG_UACCESS_WITH_MEMCPY is not set
260
261#
262# Boot options
263#
264CONFIG_ZBOOT_ROM_TEXT=0x0
265CONFIG_ZBOOT_ROM_BSS=0x0
266CONFIG_CMDLINE=""
267# CONFIG_XIP_KERNEL is not set
268# CONFIG_KEXEC is not set
269
270#
271# CPU Power Management
272#
273# CONFIG_CPU_IDLE is not set
274
275#
276# Floating point emulation
277#
278
279#
280# At least one emulation must be selected
281#
282CONFIG_FPE_NWFPE=y
283# CONFIG_FPE_NWFPE_XP is not set
284# CONFIG_FPE_FASTFPE is not set
285# CONFIG_VFP is not set
286
287#
288# Userspace binary formats
289#
290CONFIG_BINFMT_ELF=y
291# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
292CONFIG_HAVE_AOUT=y
293# CONFIG_BINFMT_AOUT is not set
294# CONFIG_BINFMT_MISC is not set
295
296#
297# Power management options
298#
299CONFIG_PM=y
300# CONFIG_PM_DEBUG is not set
301CONFIG_PM_SLEEP=y
302CONFIG_SUSPEND=y
303CONFIG_SUSPEND_FREEZER=y
304# CONFIG_APM_EMULATION is not set
305CONFIG_ARCH_SUSPEND_POSSIBLE=y
306CONFIG_NET=y
307
308#
309# Networking options
310#
311CONFIG_PACKET=y
312# CONFIG_PACKET_MMAP is not set
313CONFIG_UNIX=y
314CONFIG_XFRM=y
315# CONFIG_XFRM_USER is not set
316# CONFIG_XFRM_SUB_POLICY is not set
317# CONFIG_XFRM_MIGRATE is not set
318# CONFIG_XFRM_STATISTICS is not set
319CONFIG_NET_KEY=y
320# CONFIG_NET_KEY_MIGRATE is not set
321CONFIG_INET=y
322CONFIG_IP_MULTICAST=y
323CONFIG_IP_ADVANCED_ROUTER=y
324CONFIG_ASK_IP_FIB_HASH=y
325# CONFIG_IP_FIB_TRIE is not set
326CONFIG_IP_FIB_HASH=y
327# CONFIG_IP_MULTIPLE_TABLES is not set
328# CONFIG_IP_ROUTE_MULTIPATH is not set
329# CONFIG_IP_ROUTE_VERBOSE is not set
330CONFIG_IP_PNP=y
331CONFIG_IP_PNP_DHCP=y
332CONFIG_IP_PNP_BOOTP=y
333# CONFIG_IP_PNP_RARP is not set
334CONFIG_NET_IPIP=y
335CONFIG_NET_IPGRE=y
336CONFIG_NET_IPGRE_BROADCAST=y
337CONFIG_IP_MROUTE=y
338# CONFIG_IP_PIMSM_V1 is not set
339# CONFIG_IP_PIMSM_V2 is not set
340# CONFIG_ARPD is not set
341# CONFIG_SYN_COOKIES is not set
342# CONFIG_INET_AH is not set
343# CONFIG_INET_ESP is not set
344# CONFIG_INET_IPCOMP is not set
345# CONFIG_INET_XFRM_TUNNEL is not set
346CONFIG_INET_TUNNEL=y
347CONFIG_INET_XFRM_MODE_TRANSPORT=y
348CONFIG_INET_XFRM_MODE_TUNNEL=y
349CONFIG_INET_XFRM_MODE_BEET=y
350# CONFIG_INET_LRO is not set
351CONFIG_INET_DIAG=y
352CONFIG_INET_TCP_DIAG=y
353# CONFIG_TCP_CONG_ADVANCED is not set
354CONFIG_TCP_CONG_CUBIC=y
355CONFIG_DEFAULT_TCP_CONG="cubic"
356# CONFIG_TCP_MD5SIG is not set
357# CONFIG_IPV6 is not set
358# CONFIG_NETWORK_SECMARK is not set
359# CONFIG_NETFILTER is not set
360# CONFIG_IP_DCCP is not set
361# CONFIG_IP_SCTP is not set
362# CONFIG_TIPC is not set
363# CONFIG_ATM is not set
364# CONFIG_BRIDGE is not set
365# CONFIG_NET_DSA is not set
366# CONFIG_VLAN_8021Q is not set
367# CONFIG_DECNET is not set
368# CONFIG_LLC2 is not set
369# CONFIG_IPX is not set
370# CONFIG_ATALK is not set
371# CONFIG_X25 is not set
372# CONFIG_LAPB is not set
373# CONFIG_ECONET is not set
374# CONFIG_WAN_ROUTER is not set
375# CONFIG_PHONET is not set
376# CONFIG_IEEE802154 is not set
377# CONFIG_NET_SCHED is not set
378# CONFIG_DCB is not set
379
380#
381# Network testing
382#
383# CONFIG_NET_PKTGEN is not set
384# CONFIG_HAMRADIO is not set
385# CONFIG_CAN is not set
386# CONFIG_IRDA is not set
387CONFIG_BT=m
388CONFIG_BT_L2CAP=m
389CONFIG_BT_SCO=m
390CONFIG_BT_RFCOMM=m
391CONFIG_BT_RFCOMM_TTY=y
392CONFIG_BT_BNEP=m
393CONFIG_BT_BNEP_MC_FILTER=y
394CONFIG_BT_BNEP_PROTO_FILTER=y
395CONFIG_BT_HIDP=m
396
397#
398# Bluetooth device drivers
399#
400CONFIG_BT_HCIUART=m
401CONFIG_BT_HCIUART_H4=y
402CONFIG_BT_HCIUART_BCSP=y
403# CONFIG_BT_HCIUART_LL is not set
404CONFIG_BT_HCIVHCI=m
405# CONFIG_AF_RXRPC is not set
406CONFIG_WIRELESS=y
407# CONFIG_CFG80211 is not set
408CONFIG_WIRELESS_OLD_REGULATORY=y
409# CONFIG_WIRELESS_EXT is not set
410# CONFIG_LIB80211 is not set
411
412#
413# CFG80211 needs to be enabled for MAC80211
414#
415CONFIG_MAC80211_DEFAULT_PS_VALUE=0
416# CONFIG_WIMAX is not set
417# CONFIG_RFKILL is not set
418# CONFIG_NET_9P is not set
419
420#
421# Device Drivers
422#
423
424#
425# Generic Driver Options
426#
427CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
428CONFIG_STANDALONE=y
429CONFIG_PREVENT_FIRMWARE_BUILD=y
430CONFIG_FW_LOADER=y
431CONFIG_FIRMWARE_IN_KERNEL=y
432CONFIG_EXTRA_FIRMWARE=""
433# CONFIG_DEBUG_DRIVER is not set
434# CONFIG_DEBUG_DEVRES is not set
435# CONFIG_SYS_HYPERVISOR is not set
436# CONFIG_CONNECTOR is not set
437CONFIG_MTD=y
438# CONFIG_MTD_DEBUG is not set
439# CONFIG_MTD_CONCAT is not set
440CONFIG_MTD_PARTITIONS=y
441CONFIG_MTD_TESTS=m
442# CONFIG_MTD_REDBOOT_PARTS is not set
443# CONFIG_MTD_CMDLINE_PARTS is not set
444# CONFIG_MTD_AFS_PARTS is not set
445# CONFIG_MTD_AR7_PARTS is not set
446
447#
448# User Modules And Translation Layers
449#
450CONFIG_MTD_CHAR=y
451CONFIG_MTD_BLKDEVS=y
452CONFIG_MTD_BLOCK=y
453# CONFIG_FTL is not set
454# CONFIG_NFTL is not set
455# CONFIG_INFTL is not set
456# CONFIG_RFD_FTL is not set
457# CONFIG_SSFDC is not set
458# CONFIG_MTD_OOPS is not set
459
460#
461# RAM/ROM/Flash chip drivers
462#
463# CONFIG_MTD_CFI is not set
464# CONFIG_MTD_JEDECPROBE is not set
465CONFIG_MTD_MAP_BANK_WIDTH_1=y
466CONFIG_MTD_MAP_BANK_WIDTH_2=y
467CONFIG_MTD_MAP_BANK_WIDTH_4=y
468# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
469# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
470# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
471CONFIG_MTD_CFI_I1=y
472CONFIG_MTD_CFI_I2=y
473# CONFIG_MTD_CFI_I4 is not set
474# CONFIG_MTD_CFI_I8 is not set
475# CONFIG_MTD_RAM is not set
476# CONFIG_MTD_ROM is not set
477# CONFIG_MTD_ABSENT is not set
478
479#
480# Mapping drivers for chip access
481#
482# CONFIG_MTD_COMPLEX_MAPPINGS is not set
483# CONFIG_MTD_PLATRAM is not set
484
485#
486# Self-contained MTD device drivers
487#
488# CONFIG_MTD_SLRAM is not set
489# CONFIG_MTD_PHRAM is not set
490# CONFIG_MTD_MTDRAM is not set
491# CONFIG_MTD_BLOCK2MTD is not set
492
493#
494# Disk-On-Chip Device Drivers
495#
496# CONFIG_MTD_DOC2000 is not set
497# CONFIG_MTD_DOC2001 is not set
498# CONFIG_MTD_DOC2001PLUS is not set
499CONFIG_MTD_NAND=y
500CONFIG_MTD_NAND_VERIFY_WRITE=y
501# CONFIG_MTD_NAND_ECC_SMC is not set
502# CONFIG_MTD_NAND_MUSEUM_IDS is not set
503# CONFIG_MTD_NAND_GPIO is not set
504CONFIG_MTD_NAND_IDS=y
505# CONFIG_MTD_NAND_DISKONCHIP is not set
506# CONFIG_MTD_NAND_NANDSIM is not set
507# CONFIG_MTD_NAND_PLATFORM is not set
508CONFIG_MTD_NAND_NOMADIK=y
509CONFIG_MTD_ONENAND=y
510CONFIG_MTD_ONENAND_VERIFY_WRITE=y
511CONFIG_MTD_ONENAND_GENERIC=y
512# CONFIG_MTD_ONENAND_OTP is not set
513# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
514# CONFIG_MTD_ONENAND_SIM is not set
515
516#
517# LPDDR flash memory drivers
518#
519# CONFIG_MTD_LPDDR is not set
520
521#
522# UBI - Unsorted block images
523#
524# CONFIG_MTD_UBI is not set
525# CONFIG_PARPORT is not set
526CONFIG_BLK_DEV=y
527# CONFIG_BLK_DEV_COW_COMMON is not set
528CONFIG_BLK_DEV_LOOP=y
529CONFIG_BLK_DEV_CRYPTOLOOP=y
530# CONFIG_BLK_DEV_NBD is not set
531CONFIG_BLK_DEV_RAM=y
532CONFIG_BLK_DEV_RAM_COUNT=16
533CONFIG_BLK_DEV_RAM_SIZE=4096
534# CONFIG_BLK_DEV_XIP is not set
535# CONFIG_CDROM_PKTCDVD is not set
536# CONFIG_ATA_OVER_ETH is not set
537# CONFIG_MG_DISK is not set
538CONFIG_MISC_DEVICES=y
539# CONFIG_ICS932S401 is not set
540# CONFIG_ENCLOSURE_SERVICES is not set
541# CONFIG_ISL29003 is not set
542# CONFIG_C2PORT is not set
543
544#
545# EEPROM support
546#
547# CONFIG_EEPROM_AT24 is not set
548# CONFIG_EEPROM_LEGACY is not set
549# CONFIG_EEPROM_MAX6875 is not set
550# CONFIG_EEPROM_93CX6 is not set
551CONFIG_HAVE_IDE=y
552# CONFIG_IDE is not set
553
554#
555# SCSI device support
556#
557# CONFIG_RAID_ATTRS is not set
558CONFIG_SCSI=y
559CONFIG_SCSI_DMA=y
560# CONFIG_SCSI_TGT is not set
561# CONFIG_SCSI_NETLINK is not set
562CONFIG_SCSI_PROC_FS=y
563
564#
565# SCSI support type (disk, tape, CD-ROM)
566#
567CONFIG_BLK_DEV_SD=y
568# CONFIG_CHR_DEV_ST is not set
569# CONFIG_CHR_DEV_OSST is not set
570# CONFIG_BLK_DEV_SR is not set
571CONFIG_CHR_DEV_SG=y
572# CONFIG_CHR_DEV_SCH is not set
573CONFIG_SCSI_MULTI_LUN=y
574CONFIG_SCSI_CONSTANTS=y
575CONFIG_SCSI_LOGGING=y
576CONFIG_SCSI_SCAN_ASYNC=y
577CONFIG_SCSI_WAIT_SCAN=m
578
579#
580# SCSI Transports
581#
582# CONFIG_SCSI_SPI_ATTRS is not set
583# CONFIG_SCSI_FC_ATTRS is not set
584# CONFIG_SCSI_ISCSI_ATTRS is not set
585# CONFIG_SCSI_SAS_LIBSAS is not set
586# CONFIG_SCSI_SRP_ATTRS is not set
587CONFIG_SCSI_LOWLEVEL=y
588# CONFIG_ISCSI_TCP is not set
589# CONFIG_LIBFC is not set
590# CONFIG_LIBFCOE is not set
591# CONFIG_SCSI_DEBUG is not set
592# CONFIG_SCSI_DH is not set
593# CONFIG_SCSI_OSD_INITIATOR is not set
594# CONFIG_ATA is not set
595# CONFIG_MD is not set
596CONFIG_NETDEVICES=y
597# CONFIG_DUMMY is not set
598# CONFIG_BONDING is not set
599# CONFIG_MACVLAN is not set
600# CONFIG_EQUALIZER is not set
601CONFIG_TUN=y
602# CONFIG_VETH is not set
603# CONFIG_PHYLIB is not set
604CONFIG_NET_ETHERNET=y
605CONFIG_MII=y
606# CONFIG_AX88796 is not set
607CONFIG_SMC91X=y
608# CONFIG_DM9000 is not set
609# CONFIG_ETHOC is not set
610# CONFIG_SMC911X is not set
611# CONFIG_SMSC911X is not set
612# CONFIG_DNET is not set
613# CONFIG_IBM_NEW_EMAC_ZMII is not set
614# CONFIG_IBM_NEW_EMAC_RGMII is not set
615# CONFIG_IBM_NEW_EMAC_TAH is not set
616# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
617# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
618# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
619# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
620# CONFIG_B44 is not set
621# CONFIG_KS8842 is not set
622CONFIG_NETDEV_1000=y
623CONFIG_NETDEV_10000=y
624
625#
626# Wireless LAN
627#
628# CONFIG_WLAN_PRE80211 is not set
629# CONFIG_WLAN_80211 is not set
630
631#
632# Enable WiMAX (Networking options) to see the WiMAX drivers
633#
634# CONFIG_WAN is not set
635CONFIG_PPP=m
636# CONFIG_PPP_MULTILINK is not set
637# CONFIG_PPP_FILTER is not set
638CONFIG_PPP_ASYNC=m
639CONFIG_PPP_SYNC_TTY=m
640CONFIG_PPP_DEFLATE=m
641CONFIG_PPP_BSDCOMP=m
642CONFIG_PPP_MPPE=m
643CONFIG_PPPOE=m
644# CONFIG_PPPOL2TP is not set
645# CONFIG_SLIP is not set
646CONFIG_SLHC=m
647CONFIG_NETCONSOLE=m
648# CONFIG_NETCONSOLE_DYNAMIC is not set
649CONFIG_NETPOLL=y
650# CONFIG_NETPOLL_TRAP is not set
651CONFIG_NET_POLL_CONTROLLER=y
652# CONFIG_ISDN is not set
653
654#
655# Input device support
656#
657CONFIG_INPUT=y
658# CONFIG_INPUT_FF_MEMLESS is not set
659# CONFIG_INPUT_POLLDEV is not set
660
661#
662# Userland interfaces
663#
664# CONFIG_INPUT_MOUSEDEV is not set
665# CONFIG_INPUT_JOYDEV is not set
666CONFIG_INPUT_EVDEV=y
667# CONFIG_INPUT_EVBUG is not set
668
669#
670# Input Device Drivers
671#
672CONFIG_INPUT_KEYBOARD=y
673# CONFIG_KEYBOARD_ATKBD is not set
674# CONFIG_KEYBOARD_SUNKBD is not set
675# CONFIG_KEYBOARD_LKKBD is not set
676# CONFIG_KEYBOARD_XTKBD is not set
677# CONFIG_KEYBOARD_NEWTON is not set
678# CONFIG_KEYBOARD_STOWAWAY is not set
679# CONFIG_KEYBOARD_GPIO is not set
680CONFIG_INPUT_MOUSE=y
681# CONFIG_MOUSE_PS2 is not set
682# CONFIG_MOUSE_SERIAL is not set
683# CONFIG_MOUSE_APPLETOUCH is not set
684# CONFIG_MOUSE_BCM5974 is not set
685# CONFIG_MOUSE_VSXXXAA is not set
686# CONFIG_MOUSE_GPIO is not set
687# CONFIG_MOUSE_SYNAPTICS_I2C is not set
688# CONFIG_INPUT_JOYSTICK is not set
689# CONFIG_INPUT_TABLET is not set
690# CONFIG_INPUT_TOUCHSCREEN is not set
691# CONFIG_INPUT_MISC is not set
692
693#
694# Hardware I/O ports
695#
696# CONFIG_SERIO is not set
697# CONFIG_GAMEPORT is not set
698
699#
700# Character devices
701#
702CONFIG_VT=y
703CONFIG_CONSOLE_TRANSLATIONS=y
704CONFIG_VT_CONSOLE=y
705CONFIG_HW_CONSOLE=y
706# CONFIG_VT_HW_CONSOLE_BINDING is not set
707CONFIG_DEVKMEM=y
708# CONFIG_SERIAL_NONSTANDARD is not set
709
710#
711# Serial drivers
712#
713# CONFIG_SERIAL_8250 is not set
714
715#
716# Non-8250 serial port support
717#
718# CONFIG_SERIAL_AMBA_PL010 is not set
719CONFIG_SERIAL_AMBA_PL011=y
720CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
721CONFIG_SERIAL_CORE=y
722CONFIG_SERIAL_CORE_CONSOLE=y
723CONFIG_UNIX98_PTYS=y
724# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
725# CONFIG_LEGACY_PTYS is not set
726# CONFIG_IPMI_HANDLER is not set
727# CONFIG_HW_RANDOM is not set
728# CONFIG_R3964 is not set
729# CONFIG_RAW_DRIVER is not set
730# CONFIG_TCG_TPM is not set
731CONFIG_I2C=y
732CONFIG_I2C_BOARDINFO=y
733CONFIG_I2C_CHARDEV=y
734CONFIG_I2C_HELPER_AUTO=y
735CONFIG_I2C_ALGOBIT=y
736
737#
738# I2C Hardware Bus support
739#
740
741#
742# I2C system bus drivers (mostly embedded / system-on-chip)
743#
744CONFIG_I2C_GPIO=y
745# CONFIG_I2C_OCORES is not set
746# CONFIG_I2C_SIMTEC is not set
747
748#
749# External I2C/SMBus adapter drivers
750#
751# CONFIG_I2C_PARPORT_LIGHT is not set
752# CONFIG_I2C_TAOS_EVM is not set
753
754#
755# Other I2C/SMBus bus drivers
756#
757# CONFIG_I2C_PCA_PLATFORM is not set
758# CONFIG_I2C_STUB is not set
759
760#
761# Miscellaneous I2C Chip support
762#
763# CONFIG_DS1682 is not set
764# CONFIG_SENSORS_PCF8574 is not set
765# CONFIG_PCF8575 is not set
766# CONFIG_SENSORS_PCA9539 is not set
767# CONFIG_SENSORS_TSL2550 is not set
768# CONFIG_I2C_DEBUG_CORE is not set
769# CONFIG_I2C_DEBUG_ALGO is not set
770# CONFIG_I2C_DEBUG_BUS is not set
771# CONFIG_I2C_DEBUG_CHIP is not set
772# CONFIG_SPI is not set
773CONFIG_ARCH_REQUIRE_GPIOLIB=y
774CONFIG_GPIOLIB=y
775CONFIG_DEBUG_GPIO=y
776# CONFIG_GPIO_SYSFS is not set
777
778#
779# Memory mapped GPIO expanders:
780#
781# CONFIG_GPIO_PL061 is not set
782
783#
784# I2C GPIO expanders:
785#
786# CONFIG_GPIO_MAX732X is not set
787# CONFIG_GPIO_PCA953X is not set
788# CONFIG_GPIO_PCF857X is not set
789
790#
791# PCI GPIO expanders:
792#
793
794#
795# SPI GPIO expanders:
796#
797# CONFIG_W1 is not set
798# CONFIG_POWER_SUPPLY is not set
799# CONFIG_HWMON is not set
800# CONFIG_THERMAL is not set
801# CONFIG_THERMAL_HWMON is not set
802# CONFIG_WATCHDOG is not set
803CONFIG_SSB_POSSIBLE=y
804
805#
806# Sonics Silicon Backplane
807#
808# CONFIG_SSB is not set
809
810#
811# Multifunction device drivers
812#
813# CONFIG_MFD_CORE is not set
814# CONFIG_MFD_SM501 is not set
815# CONFIG_MFD_ASIC3 is not set
816# CONFIG_HTC_EGPIO is not set
817# CONFIG_HTC_PASIC3 is not set
818# CONFIG_TPS65010 is not set
819# CONFIG_TWL4030_CORE is not set
820# CONFIG_MFD_TMIO is not set
821# CONFIG_MFD_T7L66XB is not set
822# CONFIG_MFD_TC6387XB is not set
823# CONFIG_MFD_TC6393XB is not set
824# CONFIG_PMIC_DA903X is not set
825# CONFIG_MFD_WM8400 is not set
826# CONFIG_MFD_WM8350_I2C is not set
827# CONFIG_MFD_PCF50633 is not set
828# CONFIG_AB3100_CORE is not set
829# CONFIG_MEDIA_SUPPORT is not set
830
831#
832# Graphics support
833#
834# CONFIG_VGASTATE is not set
835# CONFIG_VIDEO_OUTPUT_CONTROL is not set
836# CONFIG_FB is not set
837# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
838
839#
840# Display device support
841#
842# CONFIG_DISPLAY_SUPPORT is not set
843
844#
845# Console display driver support
846#
847# CONFIG_VGA_CONSOLE is not set
848CONFIG_DUMMY_CONSOLE=y
849# CONFIG_SOUND is not set
850CONFIG_HID_SUPPORT=y
851CONFIG_HID=y
852# CONFIG_HID_DEBUG is not set
853# CONFIG_HIDRAW is not set
854# CONFIG_HID_PID is not set
855
856#
857# Special HID drivers
858#
859# CONFIG_HID_APPLE is not set
860# CONFIG_HID_WACOM is not set
861CONFIG_USB_SUPPORT=y
862CONFIG_USB_ARCH_HAS_HCD=y
863# CONFIG_USB_ARCH_HAS_OHCI is not set
864# CONFIG_USB_ARCH_HAS_EHCI is not set
865# CONFIG_USB is not set
866# CONFIG_USB_OTG_WHITELIST is not set
867# CONFIG_USB_OTG_BLACKLIST_HUB is not set
868
869#
870# Enable Host or Gadget support to see Inventra options
871#
872
873#
874# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
875#
876# CONFIG_USB_GADGET is not set
877
878#
879# OTG and related infrastructure
880#
881# CONFIG_MMC is not set
882# CONFIG_MEMSTICK is not set
883# CONFIG_ACCESSIBILITY is not set
884# CONFIG_NEW_LEDS is not set
885CONFIG_RTC_LIB=y
886CONFIG_RTC_CLASS=y
887CONFIG_RTC_HCTOSYS=y
888CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
889# CONFIG_RTC_DEBUG is not set
890
891#
892# RTC interfaces
893#
894CONFIG_RTC_INTF_SYSFS=y
895CONFIG_RTC_INTF_PROC=y
896CONFIG_RTC_INTF_DEV=y
897# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
898# CONFIG_RTC_DRV_TEST is not set
899
900#
901# I2C RTC drivers
902#
903# CONFIG_RTC_DRV_DS1307 is not set
904# CONFIG_RTC_DRV_DS1374 is not set
905# CONFIG_RTC_DRV_DS1672 is not set
906# CONFIG_RTC_DRV_MAX6900 is not set
907# CONFIG_RTC_DRV_RS5C372 is not set
908# CONFIG_RTC_DRV_ISL1208 is not set
909# CONFIG_RTC_DRV_X1205 is not set
910# CONFIG_RTC_DRV_PCF8563 is not set
911# CONFIG_RTC_DRV_PCF8583 is not set
912# CONFIG_RTC_DRV_M41T80 is not set
913# CONFIG_RTC_DRV_S35390A is not set
914# CONFIG_RTC_DRV_FM3130 is not set
915# CONFIG_RTC_DRV_RX8581 is not set
916# CONFIG_RTC_DRV_RX8025 is not set
917
918#
919# SPI RTC drivers
920#
921
922#
923# Platform RTC drivers
924#
925# CONFIG_RTC_DRV_CMOS is not set
926# CONFIG_RTC_DRV_DS1286 is not set
927# CONFIG_RTC_DRV_DS1511 is not set
928# CONFIG_RTC_DRV_DS1553 is not set
929# CONFIG_RTC_DRV_DS1742 is not set
930# CONFIG_RTC_DRV_STK17TA8 is not set
931# CONFIG_RTC_DRV_M48T86 is not set
932# CONFIG_RTC_DRV_M48T35 is not set
933# CONFIG_RTC_DRV_M48T59 is not set
934# CONFIG_RTC_DRV_BQ4802 is not set
935# CONFIG_RTC_DRV_V3020 is not set
936
937#
938# on-CPU RTC drivers
939#
940# CONFIG_RTC_DRV_PL030 is not set
941# CONFIG_RTC_DRV_PL031 is not set
942# CONFIG_DMADEVICES is not set
943# CONFIG_AUXDISPLAY is not set
944# CONFIG_REGULATOR is not set
945# CONFIG_UIO is not set
946# CONFIG_STAGING is not set
947
948#
949# File systems
950#
951CONFIG_EXT2_FS=y
952# CONFIG_EXT2_FS_XATTR is not set
953# CONFIG_EXT2_FS_XIP is not set
954CONFIG_EXT3_FS=y
955# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
956CONFIG_EXT3_FS_XATTR=y
957# CONFIG_EXT3_FS_POSIX_ACL is not set
958# CONFIG_EXT3_FS_SECURITY is not set
959# CONFIG_EXT4_FS is not set
960CONFIG_JBD=y
961CONFIG_FS_MBCACHE=y
962# CONFIG_REISERFS_FS is not set
963# CONFIG_JFS_FS is not set
964CONFIG_FS_POSIX_ACL=y
965# CONFIG_XFS_FS is not set
966# CONFIG_GFS2_FS is not set
967# CONFIG_OCFS2_FS is not set
968# CONFIG_BTRFS_FS is not set
969CONFIG_FILE_LOCKING=y
970CONFIG_FSNOTIFY=y
971CONFIG_DNOTIFY=y
972CONFIG_INOTIFY=y
973CONFIG_INOTIFY_USER=y
974# CONFIG_QUOTA is not set
975# CONFIG_AUTOFS_FS is not set
976# CONFIG_AUTOFS4_FS is not set
977CONFIG_FUSE_FS=y
978# CONFIG_CUSE is not set
979
980#
981# Caches
982#
983# CONFIG_FSCACHE is not set
984
985#
986# CD-ROM/DVD Filesystems
987#
988# CONFIG_ISO9660_FS is not set
989# CONFIG_UDF_FS is not set
990
991#
992# DOS/FAT/NT Filesystems
993#
994CONFIG_FAT_FS=y
995CONFIG_MSDOS_FS=y
996CONFIG_VFAT_FS=y
997CONFIG_FAT_DEFAULT_CODEPAGE=437
998CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
999# CONFIG_NTFS_FS is not set
1000
1001#
1002# Pseudo filesystems
1003#
1004CONFIG_PROC_FS=y
1005CONFIG_PROC_SYSCTL=y
1006CONFIG_PROC_PAGE_MONITOR=y
1007CONFIG_SYSFS=y
1008CONFIG_TMPFS=y
1009# CONFIG_TMPFS_POSIX_ACL is not set
1010# CONFIG_HUGETLB_PAGE is not set
1011# CONFIG_CONFIGFS_FS is not set
1012CONFIG_MISC_FILESYSTEMS=y
1013# CONFIG_ADFS_FS is not set
1014# CONFIG_AFFS_FS is not set
1015# CONFIG_HFS_FS is not set
1016# CONFIG_HFSPLUS_FS is not set
1017# CONFIG_BEFS_FS is not set
1018# CONFIG_BFS_FS is not set
1019# CONFIG_EFS_FS is not set
1020CONFIG_JFFS2_FS=y
1021CONFIG_JFFS2_FS_DEBUG=0
1022CONFIG_JFFS2_FS_WRITEBUFFER=y
1023# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1024# CONFIG_JFFS2_SUMMARY is not set
1025# CONFIG_JFFS2_FS_XATTR is not set
1026# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1027CONFIG_JFFS2_ZLIB=y
1028# CONFIG_JFFS2_LZO is not set
1029CONFIG_JFFS2_RTIME=y
1030# CONFIG_JFFS2_RUBIN is not set
1031# CONFIG_CRAMFS is not set
1032# CONFIG_SQUASHFS is not set
1033# CONFIG_VXFS_FS is not set
1034# CONFIG_MINIX_FS is not set
1035# CONFIG_OMFS_FS is not set
1036# CONFIG_HPFS_FS is not set
1037# CONFIG_QNX4FS_FS is not set
1038# CONFIG_ROMFS_FS is not set
1039# CONFIG_SYSV_FS is not set
1040# CONFIG_UFS_FS is not set
1041# CONFIG_NILFS2_FS is not set
1042CONFIG_NETWORK_FILESYSTEMS=y
1043CONFIG_NFS_FS=y
1044CONFIG_NFS_V3=y
1045CONFIG_NFS_V3_ACL=y
1046# CONFIG_NFS_V4 is not set
1047CONFIG_ROOT_NFS=y
1048# CONFIG_NFSD is not set
1049CONFIG_LOCKD=y
1050CONFIG_LOCKD_V4=y
1051CONFIG_NFS_ACL_SUPPORT=y
1052CONFIG_NFS_COMMON=y
1053CONFIG_SUNRPC=y
1054# CONFIG_RPCSEC_GSS_KRB5 is not set
1055# CONFIG_RPCSEC_GSS_SPKM3 is not set
1056CONFIG_SMB_FS=m
1057# CONFIG_SMB_NLS_DEFAULT is not set
1058CONFIG_CIFS=m
1059# CONFIG_CIFS_STATS is not set
1060CONFIG_CIFS_WEAK_PW_HASH=y
1061# CONFIG_CIFS_XATTR is not set
1062# CONFIG_CIFS_DEBUG2 is not set
1063# CONFIG_CIFS_EXPERIMENTAL is not set
1064# CONFIG_NCP_FS is not set
1065# CONFIG_CODA_FS is not set
1066# CONFIG_AFS_FS is not set
1067
1068#
1069# Partition Types
1070#
1071# CONFIG_PARTITION_ADVANCED is not set
1072CONFIG_MSDOS_PARTITION=y
1073CONFIG_NLS=y
1074CONFIG_NLS_DEFAULT="iso8859-1"
1075CONFIG_NLS_CODEPAGE_437=y
1076# CONFIG_NLS_CODEPAGE_737 is not set
1077# CONFIG_NLS_CODEPAGE_775 is not set
1078# CONFIG_NLS_CODEPAGE_850 is not set
1079# CONFIG_NLS_CODEPAGE_852 is not set
1080# CONFIG_NLS_CODEPAGE_855 is not set
1081# CONFIG_NLS_CODEPAGE_857 is not set
1082# CONFIG_NLS_CODEPAGE_860 is not set
1083# CONFIG_NLS_CODEPAGE_861 is not set
1084# CONFIG_NLS_CODEPAGE_862 is not set
1085# CONFIG_NLS_CODEPAGE_863 is not set
1086# CONFIG_NLS_CODEPAGE_864 is not set
1087# CONFIG_NLS_CODEPAGE_865 is not set
1088# CONFIG_NLS_CODEPAGE_866 is not set
1089# CONFIG_NLS_CODEPAGE_869 is not set
1090# CONFIG_NLS_CODEPAGE_936 is not set
1091# CONFIG_NLS_CODEPAGE_950 is not set
1092# CONFIG_NLS_CODEPAGE_932 is not set
1093# CONFIG_NLS_CODEPAGE_949 is not set
1094# CONFIG_NLS_CODEPAGE_874 is not set
1095# CONFIG_NLS_ISO8859_8 is not set
1096# CONFIG_NLS_CODEPAGE_1250 is not set
1097# CONFIG_NLS_CODEPAGE_1251 is not set
1098CONFIG_NLS_ASCII=y
1099CONFIG_NLS_ISO8859_1=y
1100# CONFIG_NLS_ISO8859_2 is not set
1101# CONFIG_NLS_ISO8859_3 is not set
1102# CONFIG_NLS_ISO8859_4 is not set
1103# CONFIG_NLS_ISO8859_5 is not set
1104# CONFIG_NLS_ISO8859_6 is not set
1105# CONFIG_NLS_ISO8859_7 is not set
1106# CONFIG_NLS_ISO8859_9 is not set
1107# CONFIG_NLS_ISO8859_13 is not set
1108# CONFIG_NLS_ISO8859_14 is not set
1109CONFIG_NLS_ISO8859_15=y
1110# CONFIG_NLS_KOI8_R is not set
1111# CONFIG_NLS_KOI8_U is not set
1112# CONFIG_NLS_UTF8 is not set
1113# CONFIG_DLM is not set
1114
1115#
1116# Kernel hacking
1117#
1118# CONFIG_PRINTK_TIME is not set
1119CONFIG_ENABLE_WARN_DEPRECATED=y
1120# CONFIG_ENABLE_MUST_CHECK is not set
1121CONFIG_FRAME_WARN=1024
1122# CONFIG_MAGIC_SYSRQ is not set
1123# CONFIG_UNUSED_SYMBOLS is not set
1124# CONFIG_DEBUG_FS is not set
1125# CONFIG_HEADERS_CHECK is not set
1126CONFIG_DEBUG_KERNEL=y
1127# CONFIG_DEBUG_SHIRQ is not set
1128CONFIG_DETECT_SOFTLOCKUP=y
1129# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
1130CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
1131CONFIG_DETECT_HUNG_TASK=y
1132# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
1133CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
1134# CONFIG_SCHED_DEBUG is not set
1135# CONFIG_SCHEDSTATS is not set
1136# CONFIG_TIMER_STATS is not set
1137# CONFIG_DEBUG_OBJECTS is not set
1138# CONFIG_DEBUG_SLAB is not set
1139# CONFIG_DEBUG_KMEMLEAK is not set
1140# CONFIG_DEBUG_PREEMPT is not set
1141# CONFIG_DEBUG_RT_MUTEXES is not set
1142# CONFIG_RT_MUTEX_TESTER is not set
1143# CONFIG_DEBUG_SPINLOCK is not set
1144# CONFIG_DEBUG_MUTEXES is not set
1145# CONFIG_DEBUG_LOCK_ALLOC is not set
1146# CONFIG_PROVE_LOCKING is not set
1147# CONFIG_LOCK_STAT is not set
1148# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1149# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1150# CONFIG_DEBUG_KOBJECT is not set
1151# CONFIG_DEBUG_BUGVERBOSE is not set
1152CONFIG_DEBUG_INFO=y
1153# CONFIG_DEBUG_VM is not set
1154# CONFIG_DEBUG_WRITECOUNT is not set
1155# CONFIG_DEBUG_MEMORY_INIT is not set
1156# CONFIG_DEBUG_LIST is not set
1157# CONFIG_DEBUG_SG is not set
1158# CONFIG_DEBUG_NOTIFIERS is not set
1159# CONFIG_BOOT_PRINTK_DELAY is not set
1160# CONFIG_RCU_TORTURE_TEST is not set
1161# CONFIG_RCU_CPU_STALL_DETECTOR is not set
1162# CONFIG_BACKTRACE_SELF_TEST is not set
1163# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
1164# CONFIG_FAULT_INJECTION is not set
1165# CONFIG_LATENCYTOP is not set
1166# CONFIG_SYSCTL_SYSCALL_CHECK is not set
1167# CONFIG_PAGE_POISONING is not set
1168CONFIG_HAVE_FUNCTION_TRACER=y
1169CONFIG_TRACING_SUPPORT=y
1170CONFIG_FTRACE=y
1171# CONFIG_FUNCTION_TRACER is not set
1172# CONFIG_IRQSOFF_TRACER is not set
1173# CONFIG_PREEMPT_TRACER is not set
1174# CONFIG_SCHED_TRACER is not set
1175# CONFIG_ENABLE_DEFAULT_TRACERS is not set
1176# CONFIG_BOOT_TRACER is not set
1177CONFIG_BRANCH_PROFILE_NONE=y
1178# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
1179# CONFIG_PROFILE_ALL_BRANCHES is not set
1180# CONFIG_STACK_TRACER is not set
1181# CONFIG_KMEMTRACE is not set
1182# CONFIG_WORKQUEUE_TRACER is not set
1183# CONFIG_BLK_DEV_IO_TRACE is not set
1184# CONFIG_SAMPLES is not set
1185CONFIG_HAVE_ARCH_KGDB=y
1186# CONFIG_KGDB is not set
1187CONFIG_ARM_UNWIND=y
1188# CONFIG_DEBUG_USER is not set
1189# CONFIG_DEBUG_ERRORS is not set
1190# CONFIG_DEBUG_STACK_USAGE is not set
1191# CONFIG_DEBUG_LL is not set
1192
1193#
1194# Security options
1195#
1196# CONFIG_KEYS is not set
1197# CONFIG_SECURITY is not set
1198# CONFIG_SECURITYFS is not set
1199# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1200CONFIG_CRYPTO=y
1201
1202#
1203# Crypto core or helper
1204#
1205# CONFIG_CRYPTO_FIPS is not set
1206CONFIG_CRYPTO_ALGAPI=y
1207CONFIG_CRYPTO_ALGAPI2=y
1208CONFIG_CRYPTO_AEAD2=y
1209CONFIG_CRYPTO_BLKCIPHER=y
1210CONFIG_CRYPTO_BLKCIPHER2=y
1211CONFIG_CRYPTO_HASH=y
1212CONFIG_CRYPTO_HASH2=y
1213CONFIG_CRYPTO_RNG2=y
1214CONFIG_CRYPTO_PCOMP=y
1215CONFIG_CRYPTO_MANAGER=y
1216CONFIG_CRYPTO_MANAGER2=y
1217# CONFIG_CRYPTO_GF128MUL is not set
1218# CONFIG_CRYPTO_NULL is not set
1219CONFIG_CRYPTO_WORKQUEUE=y
1220# CONFIG_CRYPTO_CRYPTD is not set
1221# CONFIG_CRYPTO_AUTHENC is not set
1222# CONFIG_CRYPTO_TEST is not set
1223
1224#
1225# Authenticated Encryption with Associated Data
1226#
1227# CONFIG_CRYPTO_CCM is not set
1228# CONFIG_CRYPTO_GCM is not set
1229# CONFIG_CRYPTO_SEQIV is not set
1230
1231#
1232# Block modes
1233#
1234CONFIG_CRYPTO_CBC=y
1235# CONFIG_CRYPTO_CTR is not set
1236# CONFIG_CRYPTO_CTS is not set
1237CONFIG_CRYPTO_ECB=m
1238# CONFIG_CRYPTO_LRW is not set
1239# CONFIG_CRYPTO_PCBC is not set
1240# CONFIG_CRYPTO_XTS is not set
1241
1242#
1243# Hash modes
1244#
1245# CONFIG_CRYPTO_HMAC is not set
1246# CONFIG_CRYPTO_XCBC is not set
1247
1248#
1249# Digest
1250#
1251# CONFIG_CRYPTO_CRC32C is not set
1252# CONFIG_CRYPTO_MD4 is not set
1253CONFIG_CRYPTO_MD5=y
1254# CONFIG_CRYPTO_MICHAEL_MIC is not set
1255# CONFIG_CRYPTO_RMD128 is not set
1256# CONFIG_CRYPTO_RMD160 is not set
1257# CONFIG_CRYPTO_RMD256 is not set
1258# CONFIG_CRYPTO_RMD320 is not set
1259CONFIG_CRYPTO_SHA1=y
1260# CONFIG_CRYPTO_SHA256 is not set
1261# CONFIG_CRYPTO_SHA512 is not set
1262# CONFIG_CRYPTO_TGR192 is not set
1263# CONFIG_CRYPTO_WP512 is not set
1264
1265#
1266# Ciphers
1267#
1268# CONFIG_CRYPTO_AES is not set
1269# CONFIG_CRYPTO_ANUBIS is not set
1270CONFIG_CRYPTO_ARC4=m
1271# CONFIG_CRYPTO_BLOWFISH is not set
1272# CONFIG_CRYPTO_CAMELLIA is not set
1273# CONFIG_CRYPTO_CAST5 is not set
1274# CONFIG_CRYPTO_CAST6 is not set
1275CONFIG_CRYPTO_DES=y
1276# CONFIG_CRYPTO_FCRYPT is not set
1277# CONFIG_CRYPTO_KHAZAD is not set
1278# CONFIG_CRYPTO_SALSA20 is not set
1279# CONFIG_CRYPTO_SEED is not set
1280# CONFIG_CRYPTO_SERPENT is not set
1281# CONFIG_CRYPTO_TEA is not set
1282# CONFIG_CRYPTO_TWOFISH is not set
1283
1284#
1285# Compression
1286#
1287# CONFIG_CRYPTO_DEFLATE is not set
1288# CONFIG_CRYPTO_ZLIB is not set
1289# CONFIG_CRYPTO_LZO is not set
1290
1291#
1292# Random Number Generation
1293#
1294# CONFIG_CRYPTO_ANSI_CPRNG is not set
1295CONFIG_CRYPTO_HW=y
1296# CONFIG_BINARY_PRINTF is not set
1297
1298#
1299# Library routines
1300#
1301CONFIG_BITREVERSE=y
1302CONFIG_GENERIC_FIND_LAST_BIT=y
1303CONFIG_CRC_CCITT=m
1304# CONFIG_CRC16 is not set
1305# CONFIG_CRC_T10DIF is not set
1306# CONFIG_CRC_ITU_T is not set
1307CONFIG_CRC32=y
1308# CONFIG_CRC7 is not set
1309# CONFIG_LIBCRC32C is not set
1310CONFIG_ZLIB_INFLATE=y
1311CONFIG_ZLIB_DEFLATE=y
1312CONFIG_DECOMPRESS_GZIP=y
1313CONFIG_HAS_IOMEM=y
1314CONFIG_HAS_IOPORT=y
1315CONFIG_HAS_DMA=y
1316CONFIG_NLATTR=y
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig
new file mode 100644
index 000000000000..2a02b49c40f0
--- /dev/null
+++ b/arch/arm/mach-nomadik/Kconfig
@@ -0,0 +1,21 @@
1if ARCH_NOMADIK
2
3menu "Nomadik boards"
4
5config MACH_NOMADIK_8815NHK
6 bool "ST 8815 Nomadik Hardware Kit (evaluation board)"
7 select NOMADIK_8815
8
9endmenu
10
11config NOMADIK_8815
12 bool
13
14
15config I2C_BITBANG_8815NHK
16 tristate "Driver for bit-bang busses found on the 8815 NHK"
17 depends on I2C && MACH_NOMADIK_8815NHK
18 select I2C_ALGOBIT
19 default y
20
21endif
diff --git a/arch/arm/mach-nomadik/Makefile b/arch/arm/mach-nomadik/Makefile
new file mode 100644
index 000000000000..412040982a40
--- /dev/null
+++ b/arch/arm/mach-nomadik/Makefile
@@ -0,0 +1,19 @@
1#
2# Makefile for the linux kernel.
3#
4# Note! Dependencies are done automagically by 'make dep', which also
5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file).
7
8# Object file lists.
9
10obj-y += clock.o timer.o gpio.o
11
12# Cpu revision
13obj-$(CONFIG_NOMADIK_8815) += cpu-8815.o
14
15# Specific board support
16obj-$(CONFIG_MACH_NOMADIK_8815NHK) += board-nhk8815.o
17
18# Nomadik extra devices
19obj-$(CONFIG_I2C_BITBANG_8815NHK) += i2c-8815nhk.o
diff --git a/arch/arm/mach-nomadik/Makefile.boot b/arch/arm/mach-nomadik/Makefile.boot
new file mode 100644
index 000000000000..c7e75acfe6c9
--- /dev/null
+++ b/arch/arm/mach-nomadik/Makefile.boot
@@ -0,0 +1,4 @@
1 zreladdr-y := 0x00008000
2params_phys-y := 0x00000100
3initrd_phys-y := 0x00800000
4
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
new file mode 100644
index 000000000000..79bdea943eb4
--- /dev/null
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -0,0 +1,111 @@
1/*
2 * linux/arch/arm/mach-nomadik/board-8815nhk.c
3 *
4 * Copyright (C) STMicroelectronics
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
9 *
10 * NHK15 board specifc driver definition
11 */
12#include <linux/types.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/platform_device.h>
16#include <linux/amba/bus.h>
17#include <linux/interrupt.h>
18#include <linux/gpio.h>
19#include <asm/mach-types.h>
20#include <asm/mach/arch.h>
21#include <asm/mach/irq.h>
22#include <mach/setup.h>
23#include "clock.h"
24
25#define __MEM_4K_RESOURCE(x) \
26 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
27
28static struct amba_device uart0_device = {
29 .dev = { .init_name = "uart0" },
30 __MEM_4K_RESOURCE(NOMADIK_UART0_BASE),
31 .irq = {IRQ_UART0, NO_IRQ},
32};
33
34static struct amba_device uart1_device = {
35 .dev = { .init_name = "uart1" },
36 __MEM_4K_RESOURCE(NOMADIK_UART1_BASE),
37 .irq = {IRQ_UART1, NO_IRQ},
38};
39
40static struct amba_device *amba_devs[] __initdata = {
41 &uart0_device,
42 &uart1_device,
43};
44
45/* We have a fixed clock alone, by now */
46static struct clk nhk8815_clk_48 = {
47 .rate = 48*1000*1000,
48};
49
50static struct resource nhk8815_eth_resources[] = {
51 {
52 .name = "smc91x-regs",
53 .start = 0x34000000 + 0x300,
54 .end = 0x34000000 + SZ_64K - 1,
55 .flags = IORESOURCE_MEM,
56 }, {
57 .start = NOMADIK_GPIO_TO_IRQ(115),
58 .end = NOMADIK_GPIO_TO_IRQ(115),
59 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING,
60 }
61};
62
63static struct platform_device nhk8815_eth_device = {
64 .name = "smc91x",
65 .resource = nhk8815_eth_resources,
66 .num_resources = ARRAY_SIZE(nhk8815_eth_resources),
67};
68
69static int __init nhk8815_eth_init(void)
70{
71 int gpio_nr = 115; /* hardwired in the board */
72 int err;
73
74 err = gpio_request(gpio_nr, "eth_irq");
75 if (!err) err = nmk_gpio_set_mode(gpio_nr, NMK_GPIO_ALT_GPIO);
76 if (!err) err = gpio_direction_input(gpio_nr);
77 if (err)
78 pr_err("Error %i in %s\n", err, __func__);
79 return err;
80}
81device_initcall(nhk8815_eth_init);
82
83static struct platform_device *nhk8815_platform_devices[] __initdata = {
84 &nhk8815_eth_device,
85 /* will add more devices */
86};
87
88static void __init nhk8815_platform_init(void)
89{
90 int i;
91
92 cpu8815_platform_init();
93 platform_add_devices(nhk8815_platform_devices,
94 ARRAY_SIZE(nhk8815_platform_devices));
95
96 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
97 nmdk_clk_create(&nhk8815_clk_48, amba_devs[i]->dev.init_name);
98 amba_device_register(amba_devs[i], &iomem_resource);
99 }
100}
101
102MACHINE_START(NOMADIK, "NHK8815")
103 /* Maintainer: ST MicroElectronics */
104 .phys_io = NOMADIK_UART0_BASE,
105 .io_pg_offst = (IO_ADDRESS(NOMADIK_UART0_BASE) >> 18) & 0xfffc,
106 .boot_params = 0x100,
107 .map_io = cpu8815_map_io,
108 .init_irq = cpu8815_init_irq,
109 .timer = &nomadik_timer,
110 .init_machine = nhk8815_platform_init,
111MACHINE_END
diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c
new file mode 100644
index 000000000000..9f92502a0083
--- /dev/null
+++ b/arch/arm/mach-nomadik/clock.c
@@ -0,0 +1,45 @@
1/*
2 * linux/arch/arm/mach-nomadik/clock.c
3 *
4 * Copyright (C) 2009 Alessandro Rubini
5 */
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/errno.h>
9#include <linux/clk.h>
10#include <asm/clkdev.h>
11#include "clock.h"
12
13/*
14 * The nomadik board uses generic clocks, but the serial pl011 file
15 * calls clk_enable(), clk_disable(), clk_get_rate(), so we provide them
16 */
17unsigned long clk_get_rate(struct clk *clk)
18{
19 return clk->rate;
20}
21EXPORT_SYMBOL(clk_get_rate);
22
23/* enable and disable do nothing */
24int clk_enable(struct clk *clk)
25{
26 return 0;
27}
28EXPORT_SYMBOL(clk_enable);
29
30void clk_disable(struct clk *clk)
31{
32}
33EXPORT_SYMBOL(clk_disable);
34
35/* Create a clock structure with the given name */
36int nmdk_clk_create(struct clk *clk, const char *dev_id)
37{
38 struct clk_lookup *clkdev;
39
40 clkdev = clkdev_alloc(clk, NULL, dev_id);
41 if (!clkdev)
42 return -ENOMEM;
43 clkdev_add(clkdev);
44 return 0;
45}
diff --git a/arch/arm/mach-nomadik/clock.h b/arch/arm/mach-nomadik/clock.h
new file mode 100644
index 000000000000..235faec7f627
--- /dev/null
+++ b/arch/arm/mach-nomadik/clock.h
@@ -0,0 +1,14 @@
1
2/*
3 * linux/arch/arm/mach-nomadik/clock.h
4 *
5 * Copyright (C) 2009 Alessandro Rubini
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11struct clk {
12 unsigned long rate;
13};
14extern int nmdk_clk_create(struct clk *clk, const char *dev_id);
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
new file mode 100644
index 000000000000..f93c59634191
--- /dev/null
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -0,0 +1,139 @@
1/*
2 * Copyright STMicroelectronics, 2007.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
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#include <linux/types.h>
20#include <linux/init.h>
21#include <linux/device.h>
22#include <linux/amba/bus.h>
23#include <linux/gpio.h>
24
25#include <mach/hardware.h>
26#include <mach/irqs.h>
27#include <asm/mach/map.h>
28#include <asm/hardware/vic.h>
29
30#include <asm/cacheflush.h>
31#include <asm/hardware/cache-l2x0.h>
32
33/* The 8815 has 4 GPIO blocks, let's register them immediately */
34static struct nmk_gpio_platform_data cpu8815_gpio[] = {
35 {
36 .name = "GPIO-0-31",
37 .first_gpio = 0,
38 .first_irq = NOMADIK_GPIO_TO_IRQ(0),
39 .parent_irq = IRQ_GPIO0,
40 }, {
41 .name = "GPIO-32-63",
42 .first_gpio = 32,
43 .first_irq = NOMADIK_GPIO_TO_IRQ(32),
44 .parent_irq = IRQ_GPIO1,
45 }, {
46 .name = "GPIO-64-95",
47 .first_gpio = 64,
48 .first_irq = NOMADIK_GPIO_TO_IRQ(64),
49 .parent_irq = IRQ_GPIO2,
50 }, {
51 .name = "GPIO-96-127", /* 124..127 not routed to pin */
52 .first_gpio = 96,
53 .first_irq = NOMADIK_GPIO_TO_IRQ(96),
54 .parent_irq = IRQ_GPIO3,
55 }
56};
57
58#define __MEM_4K_RESOURCE(x) \
59 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM}
60
61static struct amba_device cpu8815_amba_gpio[] = {
62 {
63 .dev = {
64 .init_name = "gpio0",
65 .platform_data = cpu8815_gpio + 0,
66 },
67 __MEM_4K_RESOURCE(NOMADIK_GPIO0_BASE),
68 }, {
69 .dev = {
70 .init_name = "gpio1",
71 .platform_data = cpu8815_gpio + 1,
72 },
73 __MEM_4K_RESOURCE(NOMADIK_GPIO1_BASE),
74 }, {
75 .dev = {
76 .init_name = "gpio2",
77 .platform_data = cpu8815_gpio + 2,
78 },
79 __MEM_4K_RESOURCE(NOMADIK_GPIO2_BASE),
80 }, {
81 .dev = {
82 .init_name = "gpio3",
83 .platform_data = cpu8815_gpio + 3,
84 },
85 __MEM_4K_RESOURCE(NOMADIK_GPIO3_BASE),
86 },
87};
88
89static struct amba_device *amba_devs[] __initdata = {
90 cpu8815_amba_gpio + 0,
91 cpu8815_amba_gpio + 1,
92 cpu8815_amba_gpio + 2,
93 cpu8815_amba_gpio + 3,
94};
95
96static int __init cpu8815_init(void)
97{
98 int i;
99
100 for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
101 amba_device_register(amba_devs[i], &iomem_resource);
102 return 0;
103}
104arch_initcall(cpu8815_init);
105
106/* All SoC devices live in the same area (see hardware.h) */
107static struct map_desc nomadik_io_desc[] __initdata = {
108 {
109 .virtual = NOMADIK_IO_VIRTUAL,
110 .pfn = __phys_to_pfn(NOMADIK_IO_PHYSICAL),
111 .length = NOMADIK_IO_SIZE,
112 .type = MT_DEVICE,
113 }
114 /* static ram and secured ram may be added later */
115};
116
117void __init cpu8815_map_io(void)
118{
119 iotable_init(nomadik_io_desc, ARRAY_SIZE(nomadik_io_desc));
120}
121
122void __init cpu8815_init_irq(void)
123{
124 /* This modified VIC cell has two register blocks, at 0 and 0x20 */
125 vic_init(io_p2v(NOMADIK_IC_BASE + 0x00), IRQ_VIC_START + 0, ~0, 0);
126 vic_init(io_p2v(NOMADIK_IC_BASE + 0x20), IRQ_VIC_START + 32, ~0, 0);
127}
128
129/*
130 * This function is called from the board init ("init_machine").
131 */
132 void __init cpu8815_platform_init(void)
133{
134#ifdef CONFIG_CACHE_L2X0
135 /* At full speed latency must be >=2, so 0x249 in low bits */
136 l2x0_init(io_p2v(NOMADIK_L2CC_BASE), 0x00730249, 0xfe000fff);
137#endif
138 return;
139}
diff --git a/arch/arm/mach-nomadik/gpio.c b/arch/arm/mach-nomadik/gpio.c
new file mode 100644
index 000000000000..9a09b2791e03
--- /dev/null
+++ b/arch/arm/mach-nomadik/gpio.c
@@ -0,0 +1,396 @@
1/*
2 * Generic GPIO driver for logic cells found in the Nomadik SoC
3 *
4 * Copyright (C) 2008,2009 STMicroelectronics
5 * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it>
6 * Rewritten based on work by Prafulla WADASKAR <prafulla.wadaskar@st.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#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/init.h>
15#include <linux/device.h>
16#include <linux/amba/bus.h>
17#include <linux/io.h>
18#include <linux/gpio.h>
19#include <linux/spinlock.h>
20#include <linux/interrupt.h>
21#include <linux/irq.h>
22
23#include <mach/hardware.h>
24#include <mach/gpio.h>
25
26/*
27 * The GPIO module in the Nomadik family of Systems-on-Chip is an
28 * AMBA device, managing 32 pins and alternate functions. The logic block
29 * is currently only used in the Nomadik.
30 *
31 * Symbols in this file are called "nmk_gpio" for "nomadik gpio"
32 */
33
34#define NMK_GPIO_PER_CHIP 32
35struct nmk_gpio_chip {
36 struct gpio_chip chip;
37 void __iomem *addr;
38 unsigned int parent_irq;
39 spinlock_t *lock;
40 /* Keep track of configured edges */
41 u32 edge_rising;
42 u32 edge_falling;
43};
44
45/* Mode functions */
46int nmk_gpio_set_mode(int gpio, int gpio_mode)
47{
48 struct nmk_gpio_chip *nmk_chip;
49 unsigned long flags;
50 u32 afunc, bfunc, bit;
51
52 nmk_chip = get_irq_chip_data(NOMADIK_GPIO_TO_IRQ(gpio));
53 if (!nmk_chip)
54 return -EINVAL;
55
56 bit = 1 << (gpio - nmk_chip->chip.base);
57
58 spin_lock_irqsave(&nmk_chip->lock, flags);
59 afunc = readl(nmk_chip->addr + NMK_GPIO_AFSLA) & ~bit;
60 bfunc = readl(nmk_chip->addr + NMK_GPIO_AFSLB) & ~bit;
61 if (gpio_mode & NMK_GPIO_ALT_A)
62 afunc |= bit;
63 if (gpio_mode & NMK_GPIO_ALT_B)
64 bfunc |= bit;
65 writel(afunc, nmk_chip->addr + NMK_GPIO_AFSLA);
66 writel(bfunc, nmk_chip->addr + NMK_GPIO_AFSLB);
67 spin_unlock_irqrestore(&nmk_chip->lock, flags);
68
69 return 0;
70}
71EXPORT_SYMBOL(nmk_gpio_set_mode);
72
73int nmk_gpio_get_mode(int gpio)
74{
75 struct nmk_gpio_chip *nmk_chip;
76 u32 afunc, bfunc, bit;
77
78 nmk_chip = get_irq_chip_data(NOMADIK_GPIO_TO_IRQ(gpio));
79 if (!nmk_chip)
80 return -EINVAL;
81
82 bit = 1 << (gpio - nmk_chip->chip.base);
83
84 afunc = readl(nmk_chip->addr + NMK_GPIO_AFSLA) & bit;
85 bfunc = readl(nmk_chip->addr + NMK_GPIO_AFSLB) & bit;
86
87 return (afunc ? NMK_GPIO_ALT_A : 0) | (bfunc ? NMK_GPIO_ALT_B : 0);
88}
89EXPORT_SYMBOL(nmk_gpio_get_mode);
90
91
92/* IRQ functions */
93static inline int nmk_gpio_get_bitmask(int gpio)
94{
95 return 1 << (gpio % 32);
96}
97
98static void nmk_gpio_irq_ack(unsigned int irq)
99{
100 int gpio;
101 struct nmk_gpio_chip *nmk_chip;
102
103 gpio = NOMADIK_IRQ_TO_GPIO(irq);
104 nmk_chip = get_irq_chip_data(irq);
105 if (!nmk_chip)
106 return;
107 writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC);
108}
109
110static void nmk_gpio_irq_mask(unsigned int irq)
111{
112 int gpio;
113 struct nmk_gpio_chip *nmk_chip;
114 unsigned long flags;
115 u32 bitmask, reg;
116
117 gpio = NOMADIK_IRQ_TO_GPIO(irq);
118 nmk_chip = get_irq_chip_data(irq);
119 bitmask = nmk_gpio_get_bitmask(gpio);
120 if (!nmk_chip)
121 return;
122
123 /* we must individually clear the two edges */
124 spin_lock_irqsave(&nmk_chip->lock, flags);
125 if (nmk_chip->edge_rising & bitmask) {
126 reg = readl(nmk_chip->addr + NMK_GPIO_RWIMSC);
127 reg &= ~bitmask;
128 writel(reg, nmk_chip->addr + NMK_GPIO_RWIMSC);
129 }
130 if (nmk_chip->edge_falling & bitmask) {
131 reg = readl(nmk_chip->addr + NMK_GPIO_FWIMSC);
132 reg &= ~bitmask;
133 writel(reg, nmk_chip->addr + NMK_GPIO_FWIMSC);
134 }
135 spin_unlock_irqrestore(&nmk_chip->lock, flags);
136};
137
138static void nmk_gpio_irq_unmask(unsigned int irq)
139{
140 int gpio;
141 struct nmk_gpio_chip *nmk_chip;
142 unsigned long flags;
143 u32 bitmask, reg;
144
145 gpio = NOMADIK_IRQ_TO_GPIO(irq);
146 nmk_chip = get_irq_chip_data(irq);
147 bitmask = nmk_gpio_get_bitmask(gpio);
148 if (!nmk_chip)
149 return;
150
151 /* we must individually set the two edges */
152 spin_lock_irqsave(&nmk_chip->lock, flags);
153 if (nmk_chip->edge_rising & bitmask) {
154 reg = readl(nmk_chip->addr + NMK_GPIO_RWIMSC);
155 reg |= bitmask;
156 writel(reg, nmk_chip->addr + NMK_GPIO_RWIMSC);
157 }
158 if (nmk_chip->edge_falling & bitmask) {
159 reg = readl(nmk_chip->addr + NMK_GPIO_FWIMSC);
160 reg |= bitmask;
161 writel(reg, nmk_chip->addr + NMK_GPIO_FWIMSC);
162 }
163 spin_unlock_irqrestore(&nmk_chip->lock, flags);
164}
165
166static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type)
167{
168 int gpio;
169 struct nmk_gpio_chip *nmk_chip;
170 unsigned long flags;
171 u32 bitmask;
172
173 gpio = NOMADIK_IRQ_TO_GPIO(irq);
174 nmk_chip = get_irq_chip_data(irq);
175 bitmask = nmk_gpio_get_bitmask(gpio);
176 if (!nmk_chip)
177 return -EINVAL;
178
179 if (type & IRQ_TYPE_LEVEL_HIGH)
180 return -EINVAL;
181 if (type & IRQ_TYPE_LEVEL_LOW)
182 return -EINVAL;
183
184 spin_lock_irqsave(&nmk_chip->lock, flags);
185
186 nmk_chip->edge_rising &= ~bitmask;
187 if (type & IRQ_TYPE_EDGE_RISING)
188 nmk_chip->edge_rising |= bitmask;
189 writel(nmk_chip->edge_rising, nmk_chip->addr + NMK_GPIO_RIMSC);
190
191 nmk_chip->edge_falling &= ~bitmask;
192 if (type & IRQ_TYPE_EDGE_FALLING)
193 nmk_chip->edge_falling |= bitmask;
194 writel(nmk_chip->edge_falling, nmk_chip->addr + NMK_GPIO_FIMSC);
195
196 spin_unlock_irqrestore(&nmk_chip->lock, flags);
197
198 nmk_gpio_irq_unmask(irq);
199
200 return 0;
201}
202
203static struct irq_chip nmk_gpio_irq_chip = {
204 .name = "Nomadik-GPIO",
205 .ack = nmk_gpio_irq_ack,
206 .mask = nmk_gpio_irq_mask,
207 .unmask = nmk_gpio_irq_unmask,
208 .set_type = nmk_gpio_irq_set_type,
209};
210
211static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
212{
213 struct nmk_gpio_chip *nmk_chip;
214 struct irq_chip *host_chip;
215 unsigned int gpio_irq;
216 u32 pending;
217 unsigned int first_irq;
218
219 nmk_chip = get_irq_data(irq);
220 first_irq = NOMADIK_GPIO_TO_IRQ(nmk_chip->chip.base);
221 while ( (pending = readl(nmk_chip->addr + NMK_GPIO_IS)) ) {
222 gpio_irq = first_irq + __ffs(pending);
223 generic_handle_irq(gpio_irq);
224 }
225 if (0) {/* don't ack parent irq, as ack == disable */
226 host_chip = get_irq_chip(irq);
227 host_chip->ack(irq);
228 }
229}
230
231static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip)
232{
233 unsigned int first_irq;
234 int i;
235
236 first_irq = NOMADIK_GPIO_TO_IRQ(nmk_chip->chip.base);
237 for (i = first_irq; i < first_irq + NMK_GPIO_PER_CHIP; i++) {
238 set_irq_chip(i, &nmk_gpio_irq_chip);
239 set_irq_handler(i, handle_edge_irq);
240 set_irq_flags(i, IRQF_VALID);
241 set_irq_chip_data(i, nmk_chip);
242 }
243 set_irq_chained_handler(nmk_chip->parent_irq, nmk_gpio_irq_handler);
244 set_irq_data(nmk_chip->parent_irq, nmk_chip);
245 return 0;
246}
247
248/* I/O Functions */
249static int nmk_gpio_make_input(struct gpio_chip *chip, unsigned offset)
250{
251 struct nmk_gpio_chip *nmk_chip =
252 container_of(chip, struct nmk_gpio_chip, chip);
253
254 writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRC);
255 return 0;
256}
257
258static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset,
259 int val)
260{
261 struct nmk_gpio_chip *nmk_chip =
262 container_of(chip, struct nmk_gpio_chip, chip);
263
264 writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS);
265 return 0;
266}
267
268static int nmk_gpio_get_input(struct gpio_chip *chip, unsigned offset)
269{
270 struct nmk_gpio_chip *nmk_chip =
271 container_of(chip, struct nmk_gpio_chip, chip);
272 u32 bit = 1 << offset;
273
274 return (readl(nmk_chip->addr + NMK_GPIO_DAT) & bit) != 0;
275}
276
277static void nmk_gpio_set_output(struct gpio_chip *chip, unsigned offset,
278 int val)
279{
280 struct nmk_gpio_chip *nmk_chip =
281 container_of(chip, struct nmk_gpio_chip, chip);
282 u32 bit = 1 << offset;
283
284 if (val)
285 writel(bit, nmk_chip->addr + NMK_GPIO_DATS);
286 else
287 writel(bit, nmk_chip->addr + NMK_GPIO_DATC);
288}
289
290/* This structure is replicated for each GPIO block allocated at probe time */
291static struct gpio_chip nmk_gpio_template = {
292 .direction_input = nmk_gpio_make_input,
293 .get = nmk_gpio_get_input,
294 .direction_output = nmk_gpio_make_output,
295 .set = nmk_gpio_set_output,
296 .ngpio = NMK_GPIO_PER_CHIP,
297 .can_sleep = 0,
298};
299
300static int __init nmk_gpio_probe(struct amba_device *dev, struct amba_id *id)
301{
302 struct nmk_gpio_platform_data *pdata;
303 struct nmk_gpio_chip *nmk_chip;
304 struct gpio_chip *chip;
305 int ret;
306
307 pdata = dev->dev.platform_data;
308 ret = amba_request_regions(dev, pdata->name);
309 if (ret)
310 return ret;
311
312 nmk_chip = kzalloc(sizeof(*nmk_chip), GFP_KERNEL);
313 if (!nmk_chip) {
314 ret = -ENOMEM;
315 goto out_amba;
316 }
317 /*
318 * The virt address in nmk_chip->addr is in the nomadik register space,
319 * so we can simply convert the resource address, without remapping
320 */
321 nmk_chip->addr = io_p2v(dev->res.start);
322 nmk_chip->chip = nmk_gpio_template;
323 nmk_chip->parent_irq = pdata->parent_irq;
324
325 chip = &nmk_chip->chip;
326 chip->base = pdata->first_gpio;
327 chip->label = pdata->name;
328 chip->dev = &dev->dev;
329 chip->owner = THIS_MODULE;
330
331 ret = gpiochip_add(&nmk_chip->chip);
332 if (ret)
333 goto out_free;
334
335 amba_set_drvdata(dev, nmk_chip);
336
337 nmk_gpio_init_irq(nmk_chip);
338
339 dev_info(&dev->dev, "Bits %i-%i at address %p\n",
340 nmk_chip->chip.base, nmk_chip->chip.base+31, nmk_chip->addr);
341 return 0;
342
343 out_free:
344 kfree(nmk_chip);
345 out_amba:
346 amba_release_regions(dev);
347 dev_err(&dev->dev, "Failure %i for GPIO %i-%i\n", ret,
348 pdata->first_gpio, pdata->first_gpio+31);
349 return ret;
350}
351
352static int nmk_gpio_remove(struct amba_device *dev)
353{
354 struct nmk_gpio_chip *nmk_chip;
355
356 nmk_chip = amba_get_drvdata(dev);
357 gpiochip_remove(&nmk_chip->chip);
358 kfree(nmk_chip);
359 amba_release_regions(dev);
360 return 0;
361}
362
363
364/* We have 0x1f080060 and 0x1f180060, accept both using the mask */
365static struct amba_id nmk_gpio_ids[] = {
366 {
367 .id = 0x1f080060,
368 .mask = 0xffefffff,
369 },
370 {0, 0},
371};
372
373static struct amba_driver nmk_gpio_driver = {
374 .drv = {
375 .owner = THIS_MODULE,
376 .name = "gpio",
377 },
378 .probe = nmk_gpio_probe,
379 .remove = nmk_gpio_remove,
380 .suspend = NULL, /* to be done */
381 .resume = NULL,
382 .id_table = nmk_gpio_ids,
383};
384
385static int __init nmk_gpio_init(void)
386{
387 return amba_driver_register(&nmk_gpio_driver);
388}
389
390arch_initcall(nmk_gpio_init);
391
392MODULE_AUTHOR("Prafulla WADASKAR and Alessandro Rubini");
393MODULE_DESCRIPTION("Nomadik GPIO Driver");
394MODULE_LICENSE("GPL");
395
396
diff --git a/arch/arm/mach-nomadik/i2c-8815nhk.c b/arch/arm/mach-nomadik/i2c-8815nhk.c
new file mode 100644
index 000000000000..abfe25a08d6b
--- /dev/null
+++ b/arch/arm/mach-nomadik/i2c-8815nhk.c
@@ -0,0 +1,65 @@
1#include <linux/module.h>
2#include <linux/init.h>
3#include <linux/i2c.h>
4#include <linux/i2c-algo-bit.h>
5#include <linux/i2c-gpio.h>
6#include <linux/gpio.h>
7#include <linux/platform_device.h>
8
9/*
10 * There are two busses in the 8815NHK.
11 * They could, in theory, be driven by the hardware component, but we
12 * use bit-bang through GPIO by now, to keep things simple
13 */
14
15static struct i2c_gpio_platform_data nhk8815_i2c_data0 = {
16 /* keep defaults for timeouts; pins are push-pull bidirectional */
17 .scl_pin = 62,
18 .sda_pin = 63,
19};
20
21static struct i2c_gpio_platform_data nhk8815_i2c_data1 = {
22 /* keep defaults for timeouts; pins are push-pull bidirectional */
23 .scl_pin = 53,
24 .sda_pin = 54,
25};
26
27/* first bus: GPIO XX and YY */
28static struct platform_device nhk8815_i2c_dev0 = {
29 .name = "i2c-gpio",
30 .id = 0,
31 .dev = {
32 .platform_data = &nhk8815_i2c_data0,
33 },
34};
35/* second bus: GPIO XX and YY */
36static struct platform_device nhk8815_i2c_dev1 = {
37 .name = "i2c-gpio",
38 .id = 1,
39 .dev = {
40 .platform_data = &nhk8815_i2c_data1,
41 },
42};
43
44static int __init nhk8815_i2c_init(void)
45{
46 nmk_gpio_set_mode(nhk8815_i2c_data0.scl_pin, NMK_GPIO_ALT_GPIO);
47 nmk_gpio_set_mode(nhk8815_i2c_data0.sda_pin, NMK_GPIO_ALT_GPIO);
48 platform_device_register(&nhk8815_i2c_dev0);
49
50 nmk_gpio_set_mode(nhk8815_i2c_data1.scl_pin, NMK_GPIO_ALT_GPIO);
51 nmk_gpio_set_mode(nhk8815_i2c_data1.sda_pin, NMK_GPIO_ALT_GPIO);
52 platform_device_register(&nhk8815_i2c_dev1);
53
54 return 0;
55}
56
57static void __exit nhk8815_i2c_exit(void)
58{
59 platform_device_unregister(&nhk8815_i2c_dev0);
60 platform_device_unregister(&nhk8815_i2c_dev1);
61 return;
62}
63
64module_init(nhk8815_i2c_init);
65module_exit(nhk8815_i2c_exit);
diff --git a/arch/arm/mach-nomadik/include/mach/clkdev.h b/arch/arm/mach-nomadik/include/mach/clkdev.h
new file mode 100644
index 000000000000..04b37a89801c
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/clkdev.h
@@ -0,0 +1,7 @@
1#ifndef __ASM_MACH_CLKDEV_H
2#define __ASM_MACH_CLKDEV_H
3
4#define __clk_get(clk) ({ 1; })
5#define __clk_put(clk) do { } while (0)
6
7#endif
diff --git a/arch/arm/mach-nomadik/include/mach/debug-macro.S b/arch/arm/mach-nomadik/include/mach/debug-macro.S
new file mode 100644
index 000000000000..e876990e1569
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/debug-macro.S
@@ -0,0 +1,22 @@
1/*
2 * Debugging macro include header
3 *
4 * Copyright (C) 1994-1999 Russell King
5 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11*/
12
13 .macro addruart,rx
14 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0x10000000 @ physical base address
17 movne \rx, #0xf0000000 @ virtual base
18 add \rx, \rx, #0x00100000
19 add \rx, \rx, #0x000fb000
20 .endm
21
22#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-nomadik/include/mach/entry-macro.S b/arch/arm/mach-nomadik/include/mach/entry-macro.S
new file mode 100644
index 000000000000..49f1aa3bb420
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/entry-macro.S
@@ -0,0 +1,43 @@
1/*
2 * Low-level IRQ helper macros for Nomadik platforms
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#include <mach/hardware.h>
10#include <mach/irqs.h>
11
12 .macro disable_fiq
13 .endm
14
15 .macro get_irqnr_preamble, base, tmp
16 ldr \base, =IO_ADDRESS(NOMADIK_IC_BASE)
17 .endm
18
19 .macro arch_ret_to_user, tmp1, tmp2
20 .endm
21
22 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
23
24 /* This stanza gets the irq mask from one of two status registers */
25 mov \irqnr, #0
26 ldr \irqstat, [\base, #VIC_REG_IRQSR0] @ get masked status
27 cmp \irqstat, #0
28 bne 1001f
29 add \irqnr, \irqnr, #32
30 ldr \irqstat, [\base, #VIC_REG_IRQSR1] @ get masked status
31
321001: tst \irqstat, #15
33 bne 1002f
34 add \irqnr, \irqnr, #4
35 movs \irqstat, \irqstat, lsr #4
36 bne 1001b
371002: tst \irqstat, #1
38 bne 1003f
39 add \irqnr, \irqnr, #1
40 movs \irqstat, \irqstat, lsr #1
41 bne 1002b
421003: /* EQ will be set if no irqs pending */
43 .endm
diff --git a/arch/arm/mach-nomadik/include/mach/gpio.h b/arch/arm/mach-nomadik/include/mach/gpio.h
new file mode 100644
index 000000000000..61577c9f9a7d
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/gpio.h
@@ -0,0 +1,71 @@
1/*
2 * Structures and registers for GPIO access in the Nomadik SoC
3 *
4 * Copyright (C) 2008 STMicroelectronics
5 * Author: Prafulla WADASKAR <prafulla.wadaskar@st.com>
6 * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it>
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#ifndef __ASM_ARCH_GPIO_H
13#define __ASM_ARCH_GPIO_H
14
15#include <asm-generic/gpio.h>
16
17/*
18 * These currently cause a function call to happen, they may be optimized
19 * if needed by adding cpu-specific defines to identify blocks
20 * (see mach-pxa/include/mach/gpio.h as an example using GPLR etc)
21 */
22#define gpio_get_value __gpio_get_value
23#define gpio_set_value __gpio_set_value
24#define gpio_cansleep __gpio_cansleep
25#define gpio_to_irq __gpio_to_irq
26
27/*
28 * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving
29 * the "gpio" namespace for generic and cross-machine functions
30 */
31
32/* Register in the logic block */
33#define NMK_GPIO_DAT 0x00
34#define NMK_GPIO_DATS 0x04
35#define NMK_GPIO_DATC 0x08
36#define NMK_GPIO_PDIS 0x0c
37#define NMK_GPIO_DIR 0x10
38#define NMK_GPIO_DIRS 0x14
39#define NMK_GPIO_DIRC 0x18
40#define NMK_GPIO_SLPC 0x1c
41#define NMK_GPIO_AFSLA 0x20
42#define NMK_GPIO_AFSLB 0x24
43
44#define NMK_GPIO_RIMSC 0x40
45#define NMK_GPIO_FIMSC 0x44
46#define NMK_GPIO_IS 0x48
47#define NMK_GPIO_IC 0x4c
48#define NMK_GPIO_RWIMSC 0x50
49#define NMK_GPIO_FWIMSC 0x54
50#define NMK_GPIO_WKS 0x58
51
52/* Alternate functions: function C is set in hw by setting both A and B */
53#define NMK_GPIO_ALT_GPIO 0
54#define NMK_GPIO_ALT_A 1
55#define NMK_GPIO_ALT_B 2
56#define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B)
57
58extern int nmk_gpio_set_mode(int gpio, int gpio_mode);
59extern int nmk_gpio_get_mode(int gpio);
60
61/*
62 * Platform data to register a block: only the initial gpio/irq number.
63 */
64struct nmk_gpio_platform_data {
65 char *name;
66 int first_gpio;
67 int first_irq;
68 int parent_irq;
69};
70
71#endif /* __ASM_ARCH_GPIO_H */
diff --git a/arch/arm/mach-nomadik/include/mach/hardware.h b/arch/arm/mach-nomadik/include/mach/hardware.h
new file mode 100644
index 000000000000..6316dba3bfc8
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/hardware.h
@@ -0,0 +1,90 @@
1/*
2 * This file contains the hardware definitions of the Nomadik.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
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#ifndef __ASM_ARCH_HARDWARE_H
19#define __ASM_ARCH_HARDWARE_H
20
21/* Nomadik registers live from 0x1000.0000 to 0x1023.0000 -- currently */
22#define NOMADIK_IO_VIRTUAL 0xF0000000 /* VA of IO */
23#define NOMADIK_IO_PHYSICAL 0x10000000 /* PA of IO */
24#define NOMADIK_IO_SIZE 0x00300000 /* 3MB for all regs */
25
26/* used in C code, so cast to proper type */
27#define io_p2v(x) ((void __iomem *)(x) \
28 - NOMADIK_IO_PHYSICAL + NOMADIK_IO_VIRTUAL)
29#define io_v2p(x) ((unsigned long)(x) \
30 - NOMADIK_IO_VIRTUAL + NOMADIK_IO_PHYSICAL)
31
32/* used in asm code, so no casts */
33#define IO_ADDRESS(x) ((x) - NOMADIK_IO_PHYSICAL + NOMADIK_IO_VIRTUAL)
34
35/*
36 * Base address defination for Nomadik Onchip Logic Block
37 */
38#define NOMADIK_FSMC_BASE 0x10100000 /* FSMC registers */
39#define NOMADIK_SDRAMC_BASE 0x10110000 /* SDRAM Controller */
40#define NOMADIK_CLCDC_BASE 0x10120000 /* CLCD Controller */
41#define NOMADIK_MDIF_BASE 0x10120000 /* MDIF */
42#define NOMADIK_DMA0_BASE 0x10130000 /* DMA0 Controller */
43#define NOMADIK_IC_BASE 0x10140000 /* Vectored Irq Controller */
44#define NOMADIK_DMA1_BASE 0x10150000 /* DMA1 Controller */
45#define NOMADIK_USB_BASE 0x10170000 /* USB-OTG conf reg base */
46#define NOMADIK_CRYP_BASE 0x10180000 /* Crypto processor */
47#define NOMADIK_SHA1_BASE 0x10190000 /* SHA-1 Processor */
48#define NOMADIK_XTI_BASE 0x101A0000 /* XTI */
49#define NOMADIK_RNG_BASE 0x101B0000 /* Random number generator */
50#define NOMADIK_SRC_BASE 0x101E0000 /* SRC base */
51#define NOMADIK_WDOG_BASE 0x101E1000 /* Watchdog */
52#define NOMADIK_MTU0_BASE 0x101E2000 /* Multiple Timer 0 */
53#define NOMADIK_MTU1_BASE 0x101E3000 /* Multiple Timer 1 */
54#define NOMADIK_GPIO0_BASE 0x101E4000 /* GPIO0 */
55#define NOMADIK_GPIO1_BASE 0x101E5000 /* GPIO1 */
56#define NOMADIK_GPIO2_BASE 0x101E6000 /* GPIO2 */
57#define NOMADIK_GPIO3_BASE 0x101E7000 /* GPIO3 */
58#define NOMADIK_RTC_BASE 0x101E8000 /* Real Time Clock base */
59#define NOMADIK_PMU_BASE 0x101E9000 /* Power Management Unit */
60#define NOMADIK_OWM_BASE 0x101EA000 /* One wire master */
61#define NOMADIK_SCR_BASE 0x101EF000 /* Secure Control registers */
62#define NOMADIK_MSP2_BASE 0x101F0000 /* MSP 2 interface */
63#define NOMADIK_MSP1_BASE 0x101F1000 /* MSP 1 interface */
64#define NOMADIK_UART2_BASE 0x101F2000 /* UART 2 interface */
65#define NOMADIK_SSIRx_BASE 0x101F3000 /* SSI 8-ch rx interface */
66#define NOMADIK_SSITx_BASE 0x101F4000 /* SSI 8-ch tx interface */
67#define NOMADIK_MSHC_BASE 0x101F5000 /* Memory Stick(Pro) Host */
68#define NOMADIK_SDI_BASE 0x101F6000 /* SD-card/MM-Card */
69#define NOMADIK_I2C1_BASE 0x101F7000 /* I2C1 interface */
70#define NOMADIK_I2C0_BASE 0x101F8000 /* I2C0 interface */
71#define NOMADIK_MSP0_BASE 0x101F9000 /* MSP 0 interface */
72#define NOMADIK_FIRDA_BASE 0x101FA000 /* FIrDA interface */
73#define NOMADIK_UART1_BASE 0x101FB000 /* UART 1 interface */
74#define NOMADIK_SSP_BASE 0x101FC000 /* SSP interface */
75#define NOMADIK_UART0_BASE 0x101FD000 /* UART 0 interface */
76#define NOMADIK_SGA_BASE 0x101FE000 /* SGA interface */
77#define NOMADIK_L2CC_BASE 0x10210000 /* L2 Cache controller */
78
79/* Other ranges, not for p2v/v2p */
80#define NOMADIK_BACKUP_RAM 0x80010000
81#define NOMADIK_EBROM 0x80000000 /* Embedded boot ROM */
82#define NOMADIK_HAMACV_DMEM_BASE 0xA0100000 /* HAMACV Data Memory Start */
83#define NOMADIK_HAMACV_DMEM_END 0xA01FFFFF /* HAMACV Data Memory End */
84#define NOMADIK_HAMACA_DMEM 0xA0200000 /* HAMACA Data Memory Space */
85
86#define NOMADIK_FSMC_VA IO_ADDRESS(NOMADIK_FSMC_BASE)
87#define NOMADIK_MTU0_VA IO_ADDRESS(NOMADIK_MTU0_BASE)
88#define NOMADIK_MTU1_VA IO_ADDRESS(NOMADIK_MTU1_BASE)
89
90#endif /* __ASM_ARCH_HARDWARE_H */
diff --git a/arch/arm/mach-nomadik/include/mach/io.h b/arch/arm/mach-nomadik/include/mach/io.h
new file mode 100644
index 000000000000..2e1eca1b8243
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/io.h
@@ -0,0 +1,22 @@
1/*
2 * arch/arm/mach-nomadik/include/mach/io.h (copied from mach-sa1100)
3 *
4 * Copyright (C) 1997-1999 Russell King
5 *
6 * Modifications:
7 * 06-12-1997 RMK Created.
8 * 07-04-1999 RMK Major cleanup
9 */
10#ifndef __ASM_ARM_ARCH_IO_H
11#define __ASM_ARM_ARCH_IO_H
12
13#define IO_SPACE_LIMIT 0xffffffff
14
15/*
16 * We don't actually have real ISA nor PCI buses, but there is so many
17 * drivers out there that might just work if we fake them...
18 */
19#define __io(a) __typesafe_io(a)
20#define __mem_pci(a) (a)
21
22#endif
diff --git a/arch/arm/mach-nomadik/include/mach/irqs.h b/arch/arm/mach-nomadik/include/mach/irqs.h
new file mode 100644
index 000000000000..8faabc560398
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/irqs.h
@@ -0,0 +1,82 @@
1/*
2 * mach-nomadik/include/mach/irqs.h
3 *
4 * Copyright (C) ST Microelectronics
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_IRQS_H
21#define __ASM_ARCH_IRQS_H
22
23#include <mach/hardware.h>
24
25#define IRQ_VIC_START 0 /* first VIC interrupt is 0 */
26
27/*
28 * Interrupt numbers generic for all Nomadik Chip cuts
29 */
30#define IRQ_WATCHDOG 0
31#define IRQ_SOFTINT 1
32#define IRQ_CRYPTO 2
33#define IRQ_OWM 3
34#define IRQ_MTU0 4
35#define IRQ_MTU1 5
36#define IRQ_GPIO0 6
37#define IRQ_GPIO1 7
38#define IRQ_GPIO2 8
39#define IRQ_GPIO3 9
40#define IRQ_RTC_RTT 10
41#define IRQ_SSP 11
42#define IRQ_UART0 12
43#define IRQ_DMA1 13
44#define IRQ_CLCD_MDIF 14
45#define IRQ_DMA0 15
46#define IRQ_PWRFAIL 16
47#define IRQ_UART1 17
48#define IRQ_FIRDA 18
49#define IRQ_MSP0 19
50#define IRQ_I2C0 20
51#define IRQ_I2C1 21
52#define IRQ_SDMMC 22
53#define IRQ_USBOTG 23
54#define IRQ_SVA_IT0 24
55#define IRQ_SVA_IT1 25
56#define IRQ_SAA_IT0 26
57#define IRQ_SAA_IT1 27
58#define IRQ_UART2 28
59#define IRQ_MSP2 31
60#define IRQ_L2CC 48
61#define IRQ_HPI 49
62#define IRQ_SKE 50
63#define IRQ_KP 51
64#define IRQ_MEMST 54
65#define IRQ_SGA_IT 58
66#define IRQ_USBM 60
67#define IRQ_MSP1 62
68
69#define NOMADIK_SOC_NR_IRQS 64
70
71/* After chip-specific IRQ numbers we have the GPIO ones */
72#define NOMADIK_NR_GPIO 128 /* last 4 not wired to pins */
73#define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + NOMADIK_SOC_NR_IRQS)
74#define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - NOMADIK_SOC_NR_IRQS)
75#define NR_IRQS NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO)
76
77/* Following two are used by entry_macro.S, to access our dual-vic */
78#define VIC_REG_IRQSR0 0
79#define VIC_REG_IRQSR1 0x20
80
81#endif /* __ASM_ARCH_IRQS_H */
82
diff --git a/arch/arm/mach-nomadik/include/mach/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h
new file mode 100644
index 000000000000..1e5689d98ecd
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/memory.h
@@ -0,0 +1,28 @@
1/*
2 * mach-nomadik/include/mach/memory.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23/*
24 * Physical DRAM offset.
25 */
26#define PHYS_OFFSET UL(0x00000000)
27
28#endif
diff --git a/arch/arm/mach-nomadik/include/mach/mtu.h b/arch/arm/mach-nomadik/include/mach/mtu.h
new file mode 100644
index 000000000000..76da7f085330
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/mtu.h
@@ -0,0 +1,45 @@
1#ifndef __ASM_ARCH_MTU_H
2#define __ASM_ARCH_MTU_H
3
4/*
5 * The MTU device hosts four different counters, with 4 set of
6 * registers. These are register names.
7 */
8
9#define MTU_IMSC 0x00 /* Interrupt mask set/clear */
10#define MTU_RIS 0x04 /* Raw interrupt status */
11#define MTU_MIS 0x08 /* Masked interrupt status */
12#define MTU_ICR 0x0C /* Interrupt clear register */
13
14/* per-timer registers take 0..3 as argument */
15#define MTU_LR(x) (0x10 + 0x10 * (x) + 0x00) /* Load value */
16#define MTU_VAL(x) (0x10 + 0x10 * (x) + 0x04) /* Current value */
17#define MTU_CR(x) (0x10 + 0x10 * (x) + 0x08) /* Control reg */
18#define MTU_BGLR(x) (0x10 + 0x10 * (x) + 0x0c) /* At next overflow */
19
20/* bits for the control register */
21#define MTU_CRn_ENA 0x80
22#define MTU_CRn_PERIODIC 0x40 /* if 0 = free-running */
23#define MTU_CRn_PRESCALE_MASK 0x0c
24#define MTU_CRn_PRESCALE_1 0x00
25#define MTU_CRn_PRESCALE_16 0x04
26#define MTU_CRn_PRESCALE_256 0x08
27#define MTU_CRn_32BITS 0x02
28#define MTU_CRn_ONESHOT 0x01 /* if 0 = wraps reloading from BGLR*/
29
30/* Other registers are usual amba/primecell registers, currently not used */
31#define MTU_ITCR 0xff0
32#define MTU_ITOP 0xff4
33
34#define MTU_PERIPH_ID0 0xfe0
35#define MTU_PERIPH_ID1 0xfe4
36#define MTU_PERIPH_ID2 0xfe8
37#define MTU_PERIPH_ID3 0xfeC
38
39#define MTU_PCELL0 0xff0
40#define MTU_PCELL1 0xff4
41#define MTU_PCELL2 0xff8
42#define MTU_PCELL3 0xffC
43
44#endif /* __ASM_ARCH_MTU_H */
45
diff --git a/arch/arm/mach-nomadik/include/mach/setup.h b/arch/arm/mach-nomadik/include/mach/setup.h
new file mode 100644
index 000000000000..a4e468cf63da
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/setup.h
@@ -0,0 +1,22 @@
1
2/*
3 * These symbols are needed for board-specific files to call their
4 * own cpu-specific files
5 */
6
7#ifndef __ASM_ARCH_SETUP_H
8#define __ASM_ARCH_SETUP_H
9
10#include <asm/mach/time.h>
11#include <linux/init.h>
12
13#ifdef CONFIG_NOMADIK_8815
14
15extern void cpu8815_map_io(void);
16extern void cpu8815_platform_init(void);
17extern void cpu8815_init_irq(void);
18extern struct sys_timer nomadik_timer;
19
20#endif /* NOMADIK_8815 */
21
22#endif /* __ASM_ARCH_SETUP_H */
diff --git a/arch/arm/mach-nomadik/include/mach/system.h b/arch/arm/mach-nomadik/include/mach/system.h
new file mode 100644
index 000000000000..7119f688116e
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/system.h
@@ -0,0 +1,45 @@
1/*
2 * mach-nomadik/include/mach/system.h
3 *
4 * Copyright (C) 2008 STMicroelectronics
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_SYSTEM_H
21#define __ASM_ARCH_SYSTEM_H
22
23#include <linux/io.h>
24#include <mach/hardware.h>
25
26static inline void arch_idle(void)
27{
28 /*
29 * This should do all the clock switching
30 * and wait for interrupt tricks
31 */
32 cpu_do_idle();
33}
34
35static inline void arch_reset(char mode, const char *cmd)
36{
37 void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18);
38
39 /* FIXME: use egpio when implemented */
40
41 /* Write anything to Reset status register */
42 writel(1, src_rstsr);
43}
44
45#endif
diff --git a/arch/arm/mach-nomadik/include/mach/timex.h b/arch/arm/mach-nomadik/include/mach/timex.h
new file mode 100644
index 000000000000..318b8896ce96
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/timex.h
@@ -0,0 +1,6 @@
1#ifndef __ASM_ARCH_TIMEX_H
2#define __ASM_ARCH_TIMEX_H
3
4#define CLOCK_TICK_RATE 2400000
5
6#endif
diff --git a/arch/arm/mach-nomadik/include/mach/uncompress.h b/arch/arm/mach-nomadik/include/mach/uncompress.h
new file mode 100644
index 000000000000..071003bc8456
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/uncompress.h
@@ -0,0 +1,63 @@
1/*
2 * Copyright (C) 2008 STMicroelectronics
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
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#ifndef __ASM_ARCH_UNCOMPRESS_H
20#define __ASM_ARCH_UNCOMPRESS_H
21
22#include <asm/setup.h>
23#include <asm/io.h>
24#include <mach/hardware.h>
25
26/* we need the constants in amba/serial.h, but it refers to amba_device */
27struct amba_device;
28#include <linux/amba/serial.h>
29
30#define NOMADIK_UART_DR 0x101FB000
31#define NOMADIK_UART_LCRH 0x101FB02c
32#define NOMADIK_UART_CR 0x101FB030
33#define NOMADIK_UART_FR 0x101FB018
34
35static void putc(const char c)
36{
37 /* Do nothing if the UART is not enabled. */
38 if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN))
39 return;
40
41 if (c == '\n')
42 putc('\r');
43
44 while (readb(NOMADIK_UART_FR) & UART01x_FR_TXFF)
45 barrier();
46 writeb(c, NOMADIK_UART_DR);
47}
48
49static void flush(void)
50{
51 if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN))
52 return;
53 while (readb(NOMADIK_UART_FR) & UART01x_FR_BUSY)
54 barrier();
55}
56
57static inline void arch_decomp_setup(void)
58{
59}
60
61#define arch_decomp_wdog() /* nothing to do here */
62
63#endif /* __ASM_ARCH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-nomadik/include/mach/vmalloc.h b/arch/arm/mach-nomadik/include/mach/vmalloc.h
new file mode 100644
index 000000000000..be12e31ea528
--- /dev/null
+++ b/arch/arm/mach-nomadik/include/mach/vmalloc.h
@@ -0,0 +1,2 @@
1
2#define VMALLOC_END 0xe8000000
diff --git a/arch/arm/mach-nomadik/timer.c b/arch/arm/mach-nomadik/timer.c
new file mode 100644
index 000000000000..d1738e7061d4
--- /dev/null
+++ b/arch/arm/mach-nomadik/timer.c
@@ -0,0 +1,164 @@
1/*
2 * linux/arch/arm/mach-nomadik/timer.c
3 *
4 * Copyright (C) 2008 STMicroelectronics
5 * Copyright (C) 2009 Alessandro Rubini, somewhat based on at91sam926x
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2, as
9 * published by the Free Software Foundation.
10 */
11#include <linux/init.h>
12#include <linux/interrupt.h>
13#include <linux/irq.h>
14#include <linux/io.h>
15#include <linux/clockchips.h>
16#include <linux/jiffies.h>
17#include <asm/mach/time.h>
18#include <mach/mtu.h>
19
20#define TIMER_CTRL 0x80 /* No divisor */
21#define TIMER_PERIODIC 0x40
22#define TIMER_SZ32BIT 0x02
23
24/* Initial value for SRC control register: all timers use MXTAL/8 source */
25#define SRC_CR_INIT_MASK 0x00007fff
26#define SRC_CR_INIT_VAL 0x2aaa8000
27
28static u32 nmdk_count; /* accumulated count */
29static u32 nmdk_cycle; /* write-once */
30static __iomem void *mtu_base;
31
32/*
33 * clocksource: the MTU device is a decrementing counters, so we negate
34 * the value being read.
35 */
36static cycle_t nmdk_read_timer(struct clocksource *cs)
37{
38 u32 count = readl(mtu_base + MTU_VAL(0));
39 return nmdk_count + nmdk_cycle - count;
40
41}
42
43static struct clocksource nmdk_clksrc = {
44 .name = "mtu_0",
45 .rating = 120,
46 .read = nmdk_read_timer,
47 .shift = 20,
48 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
49};
50
51/*
52 * Clockevent device: currently only periodic mode is supported
53 */
54static void nmdk_clkevt_mode(enum clock_event_mode mode,
55 struct clock_event_device *dev)
56{
57 unsigned long flags;
58
59 switch (mode) {
60 case CLOCK_EVT_MODE_PERIODIC:
61 /* enable interrupts -- and count current value? */
62 raw_local_irq_save(flags);
63 writel(readl(mtu_base + MTU_IMSC) | 1, mtu_base + MTU_IMSC);
64 raw_local_irq_restore(flags);
65 break;
66 case CLOCK_EVT_MODE_ONESHOT:
67 BUG(); /* Not supported, yet */
68 /* FALLTHROUGH */
69 case CLOCK_EVT_MODE_SHUTDOWN:
70 case CLOCK_EVT_MODE_UNUSED:
71 /* disable irq */
72 raw_local_irq_save(flags);
73 writel(readl(mtu_base + MTU_IMSC) & ~1, mtu_base + MTU_IMSC);
74 raw_local_irq_restore(flags);
75 break;
76 case CLOCK_EVT_MODE_RESUME:
77 break;
78 }
79}
80
81static struct clock_event_device nmdk_clkevt = {
82 .name = "mtu_0",
83 .features = CLOCK_EVT_FEAT_PERIODIC,
84 .shift = 32,
85 .rating = 100,
86 .set_mode = nmdk_clkevt_mode,
87};
88
89/*
90 * IRQ Handler for the timer 0 of the MTU block. The irq is not shared
91 * as we are the only users of mtu0 by now.
92 */
93static irqreturn_t nmdk_timer_interrupt(int irq, void *dev_id)
94{
95 /* ack: "interrupt clear register" */
96 writel( 1 << 0, mtu_base + MTU_ICR);
97
98 /* we can't count lost ticks, unfortunately */
99 nmdk_count += nmdk_cycle;
100 nmdk_clkevt.event_handler(&nmdk_clkevt);
101
102 return IRQ_HANDLED;
103}
104
105/*
106 * Set up timer interrupt, and return the current time in seconds.
107 */
108static struct irqaction nmdk_timer_irq = {
109 .name = "Nomadik Timer Tick",
110 .flags = IRQF_DISABLED | IRQF_TIMER,
111 .handler = nmdk_timer_interrupt,
112};
113
114static void nmdk_timer_reset(void)
115{
116 u32 cr;
117
118 writel(0, mtu_base + MTU_CR(0)); /* off */
119
120 /* configure load and background-load, and fire it up */
121 writel(nmdk_cycle, mtu_base + MTU_LR(0));
122 writel(nmdk_cycle, mtu_base + MTU_BGLR(0));
123 cr = MTU_CRn_PERIODIC | MTU_CRn_PRESCALE_1 | MTU_CRn_32BITS;
124 writel(cr, mtu_base + MTU_CR(0));
125 writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0));
126}
127
128static void __init nmdk_timer_init(void)
129{
130 u32 src_cr;
131 unsigned long rate;
132 int bits;
133
134 rate = CLOCK_TICK_RATE; /* 2.4MHz */
135 nmdk_cycle = (rate + HZ/2) / HZ;
136
137 /* Configure timer sources in "system reset controller" ctrl reg */
138 src_cr = readl(io_p2v(NOMADIK_SRC_BASE));
139 src_cr &= SRC_CR_INIT_MASK;
140 src_cr |= SRC_CR_INIT_VAL;
141 writel(src_cr, io_p2v(NOMADIK_SRC_BASE));
142
143 /* Save global pointer to mtu, used by functions above */
144 mtu_base = io_p2v(NOMADIK_MTU0_BASE);
145
146 /* Init the timer and register clocksource */
147 nmdk_timer_reset();
148
149 nmdk_clksrc.mult = clocksource_hz2mult(rate, nmdk_clksrc.shift);
150 bits = 8*sizeof(nmdk_count);
151 nmdk_clksrc.mask = CLOCKSOURCE_MASK(bits);
152
153 clocksource_register(&nmdk_clksrc);
154
155 /* Register irq and clockevents */
156 setup_irq(IRQ_MTU0, &nmdk_timer_irq);
157 nmdk_clkevt.mult = div_sc(rate, NSEC_PER_SEC, nmdk_clkevt.shift);
158 nmdk_clkevt.cpumask = cpumask_of(0);
159 clockevents_register_device(&nmdk_clkevt);
160}
161
162struct sys_timer nomadik_timer = {
163 .init = nmdk_timer_init,
164};
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 83c025e72ceb..5fe595aeba69 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -758,7 +758,7 @@ config CACHE_FEROCEON_L2_WRITETHROUGH
758config CACHE_L2X0 758config CACHE_L2X0
759 bool "Enable the L2x0 outer cache controller" 759 bool "Enable the L2x0 outer cache controller"
760 depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ 760 depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \
761 REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX 761 REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || ARCH_NOMADIK
762 default y 762 default y
763 select OUTER_CACHE 763 select OUTER_CACHE
764 help 764 help