diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/configs/netx_defconfig | 926 | ||||
-rw-r--r-- | arch/arm/mach-netx/Kconfig | 24 | ||||
-rw-r--r-- | arch/arm/mach-netx/Makefile | 15 | ||||
-rw-r--r-- | arch/arm/mach-netx/Makefile.boot | 2 | ||||
-rw-r--r-- | arch/arm/mach-netx/fb.c | 114 | ||||
-rw-r--r-- | arch/arm/mach-netx/fb.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-netx/generic.c | 193 | ||||
-rw-r--r-- | arch/arm/mach-netx/generic.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-netx/nxdb500.c | 210 | ||||
-rw-r--r-- | arch/arm/mach-netx/nxdkn.c | 103 | ||||
-rw-r--r-- | arch/arm/mach-netx/nxeb500hmi.c | 187 | ||||
-rw-r--r-- | arch/arm/mach-netx/pfifo.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-netx/time.c | 88 | ||||
-rw-r--r-- | arch/arm/mach-netx/xc.c | 255 | ||||
-rw-r--r-- | arch/arm/mm/Kconfig | 4 |
17 files changed, 2244 insertions, 2 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f47cf9af3bc8..dfb97fe045d0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -275,6 +275,12 @@ config ARCH_PNX4008 | |||
275 | help | 275 | help |
276 | This enables support for Philips PNX4008 mobile platform. | 276 | This enables support for Philips PNX4008 mobile platform. |
277 | 277 | ||
278 | config ARCH_NETX | ||
279 | bool "Hilscher NetX based" | ||
280 | select ARM_VIC | ||
281 | help | ||
282 | This enables support for systems based on the Hilscher NetX Soc | ||
283 | |||
278 | endchoice | 284 | endchoice |
279 | 285 | ||
280 | source "arch/arm/mach-clps711x/Kconfig" | 286 | source "arch/arm/mach-clps711x/Kconfig" |
@@ -319,6 +325,8 @@ source "arch/arm/mach-realview/Kconfig" | |||
319 | 325 | ||
320 | source "arch/arm/mach-at91rm9200/Kconfig" | 326 | source "arch/arm/mach-at91rm9200/Kconfig" |
321 | 327 | ||
328 | source "arch/arm/mach-netx/Kconfig" | ||
329 | |||
322 | # Definitions to make life easier | 330 | # Definitions to make life easier |
323 | config ARCH_ACORN | 331 | config ARCH_ACORN |
324 | bool | 332 | bool |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 6c97aa70d3bc..282b14e2f464 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -117,6 +117,7 @@ endif | |||
117 | machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 | 117 | machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 |
118 | machine-$(CONFIG_ARCH_EP93XX) := ep93xx | 118 | machine-$(CONFIG_ARCH_EP93XX) := ep93xx |
119 | machine-$(CONFIG_ARCH_PNX4008) := pnx4008 | 119 | machine-$(CONFIG_ARCH_PNX4008) := pnx4008 |
120 | machine-$(CONFIG_ARCH_NETX) := netx | ||
120 | 121 | ||
121 | ifeq ($(CONFIG_ARCH_EBSA110),y) | 122 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
122 | # This is what happens if you forget the IOCS16 line. | 123 | # This is what happens if you forget the IOCS16 line. |
diff --git a/arch/arm/configs/netx_defconfig b/arch/arm/configs/netx_defconfig new file mode 100644 index 000000000000..61115a773382 --- /dev/null +++ b/arch/arm/configs/netx_defconfig | |||
@@ -0,0 +1,926 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.17-rc6 | ||
4 | # Tue Jun 6 15:26:53 2006 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
9 | CONFIG_GENERIC_HWEIGHT=y | ||
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
11 | CONFIG_VECTORS_BASE=0xffff0000 | ||
12 | |||
13 | # | ||
14 | # Code maturity level options | ||
15 | # | ||
16 | CONFIG_EXPERIMENTAL=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | ||
18 | CONFIG_LOCK_KERNEL=y | ||
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
20 | |||
21 | # | ||
22 | # General setup | ||
23 | # | ||
24 | CONFIG_LOCALVERSION="" | ||
25 | CONFIG_LOCALVERSION_AUTO=y | ||
26 | CONFIG_SWAP=y | ||
27 | CONFIG_SYSVIPC=y | ||
28 | CONFIG_POSIX_MQUEUE=y | ||
29 | CONFIG_BSD_PROCESS_ACCT=y | ||
30 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
31 | CONFIG_SYSCTL=y | ||
32 | # CONFIG_AUDIT is not set | ||
33 | CONFIG_IKCONFIG=y | ||
34 | CONFIG_IKCONFIG_PROC=y | ||
35 | # CONFIG_RELAY is not set | ||
36 | CONFIG_INITRAMFS_SOURCE="" | ||
37 | CONFIG_UID16=y | ||
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_KALLSYMS=y | ||
41 | # CONFIG_KALLSYMS_ALL is not set | ||
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
43 | CONFIG_HOTPLUG=y | ||
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_ELF_CORE=y | ||
47 | CONFIG_BASE_FULL=y | ||
48 | CONFIG_FUTEX=y | ||
49 | CONFIG_EPOLL=y | ||
50 | CONFIG_SHMEM=y | ||
51 | CONFIG_SLAB=y | ||
52 | # CONFIG_TINY_SHMEM is not set | ||
53 | CONFIG_BASE_SMALL=0 | ||
54 | # CONFIG_SLOB is not set | ||
55 | CONFIG_OBSOLETE_INTERMODULE=y | ||
56 | |||
57 | # | ||
58 | # Loadable module support | ||
59 | # | ||
60 | CONFIG_MODULES=y | ||
61 | CONFIG_MODULE_UNLOAD=y | ||
62 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
63 | # CONFIG_MODVERSIONS is not set | ||
64 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
65 | CONFIG_KMOD=y | ||
66 | |||
67 | # | ||
68 | # Block layer | ||
69 | # | ||
70 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
71 | |||
72 | # | ||
73 | # IO Schedulers | ||
74 | # | ||
75 | CONFIG_IOSCHED_NOOP=y | ||
76 | CONFIG_IOSCHED_AS=y | ||
77 | CONFIG_IOSCHED_DEADLINE=y | ||
78 | CONFIG_IOSCHED_CFQ=y | ||
79 | CONFIG_DEFAULT_AS=y | ||
80 | # CONFIG_DEFAULT_DEADLINE is not set | ||
81 | # CONFIG_DEFAULT_CFQ is not set | ||
82 | # CONFIG_DEFAULT_NOOP is not set | ||
83 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
84 | |||
85 | # | ||
86 | # System Type | ||
87 | # | ||
88 | # CONFIG_ARCH_CLPS7500 is not set | ||
89 | # CONFIG_ARCH_CLPS711X is not set | ||
90 | # CONFIG_ARCH_CO285 is not set | ||
91 | # CONFIG_ARCH_EBSA110 is not set | ||
92 | # CONFIG_ARCH_EP93XX is not set | ||
93 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
94 | # CONFIG_ARCH_INTEGRATOR is not set | ||
95 | # CONFIG_ARCH_IOP3XX is not set | ||
96 | # CONFIG_ARCH_IXP4XX is not set | ||
97 | # CONFIG_ARCH_IXP2000 is not set | ||
98 | # CONFIG_ARCH_IXP23XX is not set | ||
99 | # CONFIG_ARCH_L7200 is not set | ||
100 | # CONFIG_ARCH_PXA is not set | ||
101 | # CONFIG_ARCH_RPC is not set | ||
102 | # CONFIG_ARCH_SA1100 is not set | ||
103 | # CONFIG_ARCH_S3C2410 is not set | ||
104 | # CONFIG_ARCH_SHARK is not set | ||
105 | # CONFIG_ARCH_LH7A40X is not set | ||
106 | # CONFIG_ARCH_OMAP is not set | ||
107 | # CONFIG_ARCH_VERSATILE is not set | ||
108 | # CONFIG_ARCH_REALVIEW is not set | ||
109 | # CONFIG_ARCH_IMX is not set | ||
110 | # CONFIG_ARCH_H720X is not set | ||
111 | # CONFIG_ARCH_AAEC2000 is not set | ||
112 | # CONFIG_ARCH_AT91RM9200 is not set | ||
113 | CONFIG_ARCH_NETX=y | ||
114 | |||
115 | # | ||
116 | # NetX Implementations | ||
117 | # | ||
118 | CONFIG_MACH_NXDKN=y | ||
119 | CONFIG_MACH_NXDB500=y | ||
120 | CONFIG_MACH_NXEB500HMI=y | ||
121 | |||
122 | # | ||
123 | # Processor Type | ||
124 | # | ||
125 | CONFIG_CPU_32=y | ||
126 | CONFIG_CPU_ARM926T=y | ||
127 | CONFIG_CPU_32v5=y | ||
128 | CONFIG_CPU_ABRT_EV5TJ=y | ||
129 | CONFIG_CPU_CACHE_VIVT=y | ||
130 | CONFIG_CPU_COPY_V4WB=y | ||
131 | CONFIG_CPU_TLB_V4WBI=y | ||
132 | |||
133 | # | ||
134 | # Processor Features | ||
135 | # | ||
136 | CONFIG_ARM_THUMB=y | ||
137 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
138 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
139 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
140 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
141 | CONFIG_ARM_VIC=y | ||
142 | |||
143 | # | ||
144 | # Bus support | ||
145 | # | ||
146 | CONFIG_ARM_AMBA=y | ||
147 | |||
148 | # | ||
149 | # PCCARD (PCMCIA/CardBus) support | ||
150 | # | ||
151 | # CONFIG_PCCARD is not set | ||
152 | |||
153 | # | ||
154 | # Kernel Features | ||
155 | # | ||
156 | CONFIG_PREEMPT=y | ||
157 | # CONFIG_NO_IDLE_HZ is not set | ||
158 | CONFIG_HZ=100 | ||
159 | # CONFIG_AEABI is not set | ||
160 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
161 | CONFIG_SELECT_MEMORY_MODEL=y | ||
162 | CONFIG_FLATMEM_MANUAL=y | ||
163 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
164 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
165 | CONFIG_FLATMEM=y | ||
166 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
167 | # CONFIG_SPARSEMEM_STATIC is not set | ||
168 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
169 | CONFIG_ALIGNMENT_TRAP=y | ||
170 | |||
171 | # | ||
172 | # Boot options | ||
173 | # | ||
174 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
175 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
176 | CONFIG_CMDLINE="console=ttySMX0,115200" | ||
177 | # CONFIG_XIP_KERNEL is not set | ||
178 | |||
179 | # | ||
180 | # Floating point emulation | ||
181 | # | ||
182 | |||
183 | # | ||
184 | # At least one emulation must be selected | ||
185 | # | ||
186 | # CONFIG_FPE_NWFPE is not set | ||
187 | # CONFIG_FPE_FASTFPE is not set | ||
188 | # CONFIG_VFP is not set | ||
189 | |||
190 | # | ||
191 | # Userspace binary formats | ||
192 | # | ||
193 | CONFIG_BINFMT_ELF=y | ||
194 | # CONFIG_BINFMT_AOUT is not set | ||
195 | # CONFIG_BINFMT_MISC is not set | ||
196 | # CONFIG_ARTHUR is not set | ||
197 | |||
198 | # | ||
199 | # Power management options | ||
200 | # | ||
201 | # CONFIG_PM is not set | ||
202 | # CONFIG_APM is not set | ||
203 | |||
204 | # | ||
205 | # Networking | ||
206 | # | ||
207 | CONFIG_NET=y | ||
208 | |||
209 | # | ||
210 | # Networking options | ||
211 | # | ||
212 | # CONFIG_NETDEBUG is not set | ||
213 | CONFIG_PACKET=y | ||
214 | CONFIG_PACKET_MMAP=y | ||
215 | CONFIG_UNIX=y | ||
216 | CONFIG_XFRM=y | ||
217 | CONFIG_XFRM_USER=m | ||
218 | CONFIG_NET_KEY=y | ||
219 | CONFIG_INET=y | ||
220 | CONFIG_IP_MULTICAST=y | ||
221 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
222 | CONFIG_IP_FIB_HASH=y | ||
223 | CONFIG_IP_PNP=y | ||
224 | CONFIG_IP_PNP_DHCP=y | ||
225 | # CONFIG_IP_PNP_BOOTP is not set | ||
226 | # CONFIG_IP_PNP_RARP is not set | ||
227 | # CONFIG_NET_IPIP is not set | ||
228 | CONFIG_NET_IPGRE=m | ||
229 | # CONFIG_NET_IPGRE_BROADCAST is not set | ||
230 | # CONFIG_IP_MROUTE is not set | ||
231 | # CONFIG_ARPD is not set | ||
232 | CONFIG_SYN_COOKIES=y | ||
233 | CONFIG_INET_AH=y | ||
234 | CONFIG_INET_ESP=y | ||
235 | CONFIG_INET_IPCOMP=y | ||
236 | CONFIG_INET_XFRM_TUNNEL=y | ||
237 | CONFIG_INET_TUNNEL=y | ||
238 | CONFIG_INET_DIAG=y | ||
239 | CONFIG_INET_TCP_DIAG=y | ||
240 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
241 | CONFIG_TCP_CONG_BIC=y | ||
242 | |||
243 | # | ||
244 | # IP: Virtual Server Configuration | ||
245 | # | ||
246 | # CONFIG_IP_VS is not set | ||
247 | CONFIG_IPV6=m | ||
248 | # CONFIG_IPV6_PRIVACY is not set | ||
249 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
250 | CONFIG_INET6_AH=m | ||
251 | CONFIG_INET6_ESP=m | ||
252 | CONFIG_INET6_IPCOMP=m | ||
253 | CONFIG_INET6_XFRM_TUNNEL=m | ||
254 | CONFIG_INET6_TUNNEL=m | ||
255 | # CONFIG_IPV6_TUNNEL is not set | ||
256 | CONFIG_NETFILTER=y | ||
257 | # CONFIG_NETFILTER_DEBUG is not set | ||
258 | |||
259 | # | ||
260 | # Core Netfilter Configuration | ||
261 | # | ||
262 | # CONFIG_NETFILTER_NETLINK is not set | ||
263 | # CONFIG_NETFILTER_XTABLES is not set | ||
264 | |||
265 | # | ||
266 | # IP: Netfilter Configuration | ||
267 | # | ||
268 | CONFIG_IP_NF_CONNTRACK=m | ||
269 | # CONFIG_IP_NF_CT_ACCT is not set | ||
270 | # CONFIG_IP_NF_CONNTRACK_MARK is not set | ||
271 | # CONFIG_IP_NF_CONNTRACK_EVENTS is not set | ||
272 | # CONFIG_IP_NF_CT_PROTO_SCTP is not set | ||
273 | CONFIG_IP_NF_FTP=m | ||
274 | CONFIG_IP_NF_IRC=m | ||
275 | # CONFIG_IP_NF_NETBIOS_NS is not set | ||
276 | CONFIG_IP_NF_TFTP=m | ||
277 | CONFIG_IP_NF_AMANDA=m | ||
278 | # CONFIG_IP_NF_PPTP is not set | ||
279 | # CONFIG_IP_NF_H323 is not set | ||
280 | CONFIG_IP_NF_QUEUE=m | ||
281 | |||
282 | # | ||
283 | # IPv6: Netfilter Configuration (EXPERIMENTAL) | ||
284 | # | ||
285 | # CONFIG_IP6_NF_QUEUE is not set | ||
286 | |||
287 | # | ||
288 | # DCCP Configuration (EXPERIMENTAL) | ||
289 | # | ||
290 | # CONFIG_IP_DCCP is not set | ||
291 | |||
292 | # | ||
293 | # SCTP Configuration (EXPERIMENTAL) | ||
294 | # | ||
295 | # CONFIG_IP_SCTP is not set | ||
296 | |||
297 | # | ||
298 | # TIPC Configuration (EXPERIMENTAL) | ||
299 | # | ||
300 | # CONFIG_TIPC is not set | ||
301 | # CONFIG_ATM is not set | ||
302 | # CONFIG_BRIDGE is not set | ||
303 | # CONFIG_VLAN_8021Q is not set | ||
304 | # CONFIG_DECNET is not set | ||
305 | # CONFIG_LLC2 is not set | ||
306 | # CONFIG_IPX is not set | ||
307 | # CONFIG_ATALK is not set | ||
308 | # CONFIG_X25 is not set | ||
309 | # CONFIG_LAPB is not set | ||
310 | # CONFIG_NET_DIVERT is not set | ||
311 | # CONFIG_ECONET is not set | ||
312 | # CONFIG_WAN_ROUTER is not set | ||
313 | |||
314 | # | ||
315 | # QoS and/or fair queueing | ||
316 | # | ||
317 | # CONFIG_NET_SCHED is not set | ||
318 | |||
319 | # | ||
320 | # Network testing | ||
321 | # | ||
322 | CONFIG_NET_PKTGEN=m | ||
323 | # CONFIG_HAMRADIO is not set | ||
324 | # CONFIG_IRDA is not set | ||
325 | # CONFIG_BT is not set | ||
326 | # CONFIG_IEEE80211 is not set | ||
327 | |||
328 | # | ||
329 | # Device Drivers | ||
330 | # | ||
331 | |||
332 | # | ||
333 | # Generic Driver Options | ||
334 | # | ||
335 | CONFIG_STANDALONE=y | ||
336 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
337 | CONFIG_FW_LOADER=y | ||
338 | # CONFIG_DEBUG_DRIVER is not set | ||
339 | |||
340 | # | ||
341 | # Connector - unified userspace <-> kernelspace linker | ||
342 | # | ||
343 | # CONFIG_CONNECTOR is not set | ||
344 | |||
345 | # | ||
346 | # Memory Technology Devices (MTD) | ||
347 | # | ||
348 | CONFIG_MTD=y | ||
349 | # CONFIG_MTD_DEBUG is not set | ||
350 | # CONFIG_MTD_CONCAT is not set | ||
351 | CONFIG_MTD_PARTITIONS=y | ||
352 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
353 | CONFIG_MTD_CMDLINE_PARTS=y | ||
354 | # CONFIG_MTD_AFS_PARTS is not set | ||
355 | |||
356 | # | ||
357 | # User Modules And Translation Layers | ||
358 | # | ||
359 | CONFIG_MTD_CHAR=y | ||
360 | CONFIG_MTD_BLOCK=y | ||
361 | # CONFIG_FTL is not set | ||
362 | # CONFIG_NFTL is not set | ||
363 | # CONFIG_INFTL is not set | ||
364 | # CONFIG_RFD_FTL is not set | ||
365 | |||
366 | # | ||
367 | # RAM/ROM/Flash chip drivers | ||
368 | # | ||
369 | CONFIG_MTD_CFI=y | ||
370 | # CONFIG_MTD_JEDECPROBE is not set | ||
371 | CONFIG_MTD_GEN_PROBE=y | ||
372 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
373 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
374 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
375 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
376 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
377 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
378 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
379 | CONFIG_MTD_CFI_I1=y | ||
380 | CONFIG_MTD_CFI_I2=y | ||
381 | # CONFIG_MTD_CFI_I4 is not set | ||
382 | # CONFIG_MTD_CFI_I8 is not set | ||
383 | CONFIG_MTD_CFI_INTELEXT=y | ||
384 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
385 | # CONFIG_MTD_CFI_STAA is not set | ||
386 | CONFIG_MTD_CFI_UTIL=y | ||
387 | CONFIG_MTD_RAM=y | ||
388 | # CONFIG_MTD_ROM is not set | ||
389 | # CONFIG_MTD_ABSENT is not set | ||
390 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
391 | |||
392 | # | ||
393 | # Mapping drivers for chip access | ||
394 | # | ||
395 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
396 | # CONFIG_MTD_PHYSMAP is not set | ||
397 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
398 | CONFIG_MTD_PLATRAM=y | ||
399 | |||
400 | # | ||
401 | # Self-contained MTD device drivers | ||
402 | # | ||
403 | # CONFIG_MTD_SLRAM is not set | ||
404 | # CONFIG_MTD_PHRAM is not set | ||
405 | # CONFIG_MTD_MTDRAM is not set | ||
406 | # CONFIG_MTD_BLOCK2MTD is not set | ||
407 | |||
408 | # | ||
409 | # Disk-On-Chip Device Drivers | ||
410 | # | ||
411 | # CONFIG_MTD_DOC2000 is not set | ||
412 | # CONFIG_MTD_DOC2001 is not set | ||
413 | # CONFIG_MTD_DOC2001PLUS is not set | ||
414 | |||
415 | # | ||
416 | # NAND Flash Device Drivers | ||
417 | # | ||
418 | # CONFIG_MTD_NAND is not set | ||
419 | |||
420 | # | ||
421 | # OneNAND Flash Device Drivers | ||
422 | # | ||
423 | # CONFIG_MTD_ONENAND is not set | ||
424 | |||
425 | # | ||
426 | # Parallel port support | ||
427 | # | ||
428 | # CONFIG_PARPORT is not set | ||
429 | |||
430 | # | ||
431 | # Plug and Play support | ||
432 | # | ||
433 | |||
434 | # | ||
435 | # Block devices | ||
436 | # | ||
437 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
438 | CONFIG_BLK_DEV_LOOP=m | ||
439 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
440 | # CONFIG_BLK_DEV_NBD is not set | ||
441 | # CONFIG_BLK_DEV_RAM is not set | ||
442 | # CONFIG_BLK_DEV_INITRD is not set | ||
443 | # CONFIG_CDROM_PKTCDVD is not set | ||
444 | # CONFIG_ATA_OVER_ETH is not set | ||
445 | |||
446 | # | ||
447 | # SCSI device support | ||
448 | # | ||
449 | # CONFIG_RAID_ATTRS is not set | ||
450 | # CONFIG_SCSI is not set | ||
451 | |||
452 | # | ||
453 | # Multi-device support (RAID and LVM) | ||
454 | # | ||
455 | # CONFIG_MD is not set | ||
456 | |||
457 | # | ||
458 | # Fusion MPT device support | ||
459 | # | ||
460 | # CONFIG_FUSION is not set | ||
461 | |||
462 | # | ||
463 | # IEEE 1394 (FireWire) support | ||
464 | # | ||
465 | |||
466 | # | ||
467 | # I2O device support | ||
468 | # | ||
469 | |||
470 | # | ||
471 | # Network device support | ||
472 | # | ||
473 | CONFIG_NETDEVICES=y | ||
474 | # CONFIG_DUMMY is not set | ||
475 | # CONFIG_BONDING is not set | ||
476 | # CONFIG_EQUALIZER is not set | ||
477 | # CONFIG_TUN is not set | ||
478 | |||
479 | # | ||
480 | # PHY device support | ||
481 | # | ||
482 | # CONFIG_PHYLIB is not set | ||
483 | |||
484 | # | ||
485 | # Ethernet (10 or 100Mbit) | ||
486 | # | ||
487 | CONFIG_NET_ETHERNET=y | ||
488 | CONFIG_MII=y | ||
489 | # CONFIG_SMC91X is not set | ||
490 | CONFIG_NET_NETX=y | ||
491 | # CONFIG_DM9000 is not set | ||
492 | |||
493 | # | ||
494 | # Ethernet (1000 Mbit) | ||
495 | # | ||
496 | |||
497 | # | ||
498 | # Ethernet (10000 Mbit) | ||
499 | # | ||
500 | |||
501 | # | ||
502 | # Token Ring devices | ||
503 | # | ||
504 | |||
505 | # | ||
506 | # Wireless LAN (non-hamradio) | ||
507 | # | ||
508 | # CONFIG_NET_RADIO is not set | ||
509 | |||
510 | # | ||
511 | # Wan interfaces | ||
512 | # | ||
513 | # CONFIG_WAN is not set | ||
514 | # CONFIG_PPP is not set | ||
515 | # CONFIG_SLIP is not set | ||
516 | # CONFIG_SHAPER is not set | ||
517 | # CONFIG_NETCONSOLE is not set | ||
518 | # CONFIG_NETPOLL is not set | ||
519 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
520 | |||
521 | # | ||
522 | # ISDN subsystem | ||
523 | # | ||
524 | # CONFIG_ISDN is not set | ||
525 | |||
526 | # | ||
527 | # Input device support | ||
528 | # | ||
529 | CONFIG_INPUT=y | ||
530 | |||
531 | # | ||
532 | # Userland interfaces | ||
533 | # | ||
534 | CONFIG_INPUT_MOUSEDEV=y | ||
535 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
536 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
537 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
538 | # CONFIG_INPUT_JOYDEV is not set | ||
539 | # CONFIG_INPUT_TSDEV is not set | ||
540 | # CONFIG_INPUT_EVDEV is not set | ||
541 | # CONFIG_INPUT_EVBUG is not set | ||
542 | |||
543 | # | ||
544 | # Input Device Drivers | ||
545 | # | ||
546 | # CONFIG_INPUT_KEYBOARD is not set | ||
547 | # CONFIG_INPUT_MOUSE is not set | ||
548 | # CONFIG_INPUT_JOYSTICK is not set | ||
549 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
550 | # CONFIG_INPUT_MISC is not set | ||
551 | |||
552 | # | ||
553 | # Hardware I/O ports | ||
554 | # | ||
555 | CONFIG_SERIO=y | ||
556 | CONFIG_SERIO_SERPORT=y | ||
557 | # CONFIG_SERIO_AMBAKMI is not set | ||
558 | # CONFIG_SERIO_RAW is not set | ||
559 | # CONFIG_GAMEPORT is not set | ||
560 | |||
561 | # | ||
562 | # Character devices | ||
563 | # | ||
564 | CONFIG_VT=y | ||
565 | CONFIG_VT_CONSOLE=y | ||
566 | CONFIG_HW_CONSOLE=y | ||
567 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
568 | |||
569 | # | ||
570 | # Serial drivers | ||
571 | # | ||
572 | # CONFIG_SERIAL_8250 is not set | ||
573 | |||
574 | # | ||
575 | # Non-8250 serial port support | ||
576 | # | ||
577 | # CONFIG_SERIAL_AMBA_PL010 is not set | ||
578 | # CONFIG_SERIAL_AMBA_PL011 is not set | ||
579 | CONFIG_SERIAL_CORE=y | ||
580 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
581 | CONFIG_SERIAL_NETX=y | ||
582 | CONFIG_SERIAL_NETX_CONSOLE=y | ||
583 | CONFIG_UNIX98_PTYS=y | ||
584 | CONFIG_LEGACY_PTYS=y | ||
585 | CONFIG_LEGACY_PTY_COUNT=256 | ||
586 | |||
587 | # | ||
588 | # IPMI | ||
589 | # | ||
590 | # CONFIG_IPMI_HANDLER is not set | ||
591 | |||
592 | # | ||
593 | # Watchdog Cards | ||
594 | # | ||
595 | # CONFIG_WATCHDOG is not set | ||
596 | CONFIG_NVRAM=m | ||
597 | # CONFIG_DTLK is not set | ||
598 | # CONFIG_R3964 is not set | ||
599 | |||
600 | # | ||
601 | # Ftape, the floppy tape device driver | ||
602 | # | ||
603 | # CONFIG_RAW_DRIVER is not set | ||
604 | |||
605 | # | ||
606 | # TPM devices | ||
607 | # | ||
608 | # CONFIG_TCG_TPM is not set | ||
609 | # CONFIG_TELCLOCK is not set | ||
610 | |||
611 | # | ||
612 | # I2C support | ||
613 | # | ||
614 | # CONFIG_I2C is not set | ||
615 | |||
616 | # | ||
617 | # SPI support | ||
618 | # | ||
619 | # CONFIG_SPI is not set | ||
620 | # CONFIG_SPI_MASTER is not set | ||
621 | |||
622 | # | ||
623 | # Dallas's 1-wire bus | ||
624 | # | ||
625 | # CONFIG_W1 is not set | ||
626 | |||
627 | # | ||
628 | # Hardware Monitoring support | ||
629 | # | ||
630 | # CONFIG_HWMON is not set | ||
631 | # CONFIG_HWMON_VID is not set | ||
632 | |||
633 | # | ||
634 | # Misc devices | ||
635 | # | ||
636 | |||
637 | # | ||
638 | # LED devices | ||
639 | # | ||
640 | # CONFIG_NEW_LEDS is not set | ||
641 | |||
642 | # | ||
643 | # LED drivers | ||
644 | # | ||
645 | |||
646 | # | ||
647 | # LED Triggers | ||
648 | # | ||
649 | |||
650 | # | ||
651 | # Multimedia devices | ||
652 | # | ||
653 | # CONFIG_VIDEO_DEV is not set | ||
654 | CONFIG_VIDEO_V4L2=y | ||
655 | |||
656 | # | ||
657 | # Digital Video Broadcasting Devices | ||
658 | # | ||
659 | # CONFIG_DVB is not set | ||
660 | |||
661 | # | ||
662 | # Graphics support | ||
663 | # | ||
664 | CONFIG_FB=y | ||
665 | CONFIG_FB_CFB_FILLRECT=y | ||
666 | CONFIG_FB_CFB_COPYAREA=y | ||
667 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
668 | # CONFIG_FB_MACMODES is not set | ||
669 | CONFIG_FB_FIRMWARE_EDID=y | ||
670 | # CONFIG_FB_MODE_HELPERS is not set | ||
671 | # CONFIG_FB_TILEBLITTING is not set | ||
672 | CONFIG_FB_ARMCLCD=y | ||
673 | # CONFIG_FB_S1D13XXX is not set | ||
674 | # CONFIG_FB_VIRTUAL is not set | ||
675 | |||
676 | # | ||
677 | # Console display driver support | ||
678 | # | ||
679 | # CONFIG_VGA_CONSOLE is not set | ||
680 | CONFIG_DUMMY_CONSOLE=y | ||
681 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
682 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
683 | # CONFIG_FONTS is not set | ||
684 | CONFIG_FONT_8x8=y | ||
685 | CONFIG_FONT_8x16=y | ||
686 | |||
687 | # | ||
688 | # Logo configuration | ||
689 | # | ||
690 | CONFIG_LOGO=y | ||
691 | CONFIG_LOGO_LINUX_MONO=y | ||
692 | CONFIG_LOGO_LINUX_VGA16=y | ||
693 | CONFIG_LOGO_LINUX_CLUT224=y | ||
694 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
695 | |||
696 | # | ||
697 | # Sound | ||
698 | # | ||
699 | # CONFIG_SOUND is not set | ||
700 | |||
701 | # | ||
702 | # USB support | ||
703 | # | ||
704 | CONFIG_USB_ARCH_HAS_HCD=y | ||
705 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
706 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
707 | # CONFIG_USB is not set | ||
708 | |||
709 | # | ||
710 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
711 | # | ||
712 | |||
713 | # | ||
714 | # USB Gadget Support | ||
715 | # | ||
716 | # CONFIG_USB_GADGET is not set | ||
717 | |||
718 | # | ||
719 | # MMC/SD Card support | ||
720 | # | ||
721 | # CONFIG_MMC is not set | ||
722 | |||
723 | # | ||
724 | # Real Time Clock | ||
725 | # | ||
726 | CONFIG_RTC_LIB=y | ||
727 | CONFIG_RTC_CLASS=m | ||
728 | |||
729 | # | ||
730 | # RTC interfaces | ||
731 | # | ||
732 | CONFIG_RTC_INTF_SYSFS=m | ||
733 | CONFIG_RTC_INTF_PROC=m | ||
734 | CONFIG_RTC_INTF_DEV=m | ||
735 | |||
736 | # | ||
737 | # RTC drivers | ||
738 | # | ||
739 | # CONFIG_RTC_DRV_M48T86 is not set | ||
740 | CONFIG_RTC_DRV_NETX=m | ||
741 | # CONFIG_RTC_DRV_TEST is not set | ||
742 | |||
743 | # | ||
744 | # File systems | ||
745 | # | ||
746 | # CONFIG_EXT2_FS is not set | ||
747 | # CONFIG_EXT3_FS is not set | ||
748 | # CONFIG_REISERFS_FS is not set | ||
749 | # CONFIG_JFS_FS is not set | ||
750 | # CONFIG_FS_POSIX_ACL is not set | ||
751 | # CONFIG_XFS_FS is not set | ||
752 | # CONFIG_OCFS2_FS is not set | ||
753 | # CONFIG_MINIX_FS is not set | ||
754 | # CONFIG_ROMFS_FS is not set | ||
755 | CONFIG_INOTIFY=y | ||
756 | # CONFIG_QUOTA is not set | ||
757 | CONFIG_DNOTIFY=y | ||
758 | # CONFIG_AUTOFS_FS is not set | ||
759 | # CONFIG_AUTOFS4_FS is not set | ||
760 | # CONFIG_FUSE_FS is not set | ||
761 | |||
762 | # | ||
763 | # CD-ROM/DVD Filesystems | ||
764 | # | ||
765 | # CONFIG_ISO9660_FS is not set | ||
766 | # CONFIG_UDF_FS is not set | ||
767 | |||
768 | # | ||
769 | # DOS/FAT/NT Filesystems | ||
770 | # | ||
771 | # CONFIG_MSDOS_FS is not set | ||
772 | # CONFIG_VFAT_FS is not set | ||
773 | # CONFIG_NTFS_FS is not set | ||
774 | |||
775 | # | ||
776 | # Pseudo filesystems | ||
777 | # | ||
778 | CONFIG_PROC_FS=y | ||
779 | CONFIG_SYSFS=y | ||
780 | CONFIG_TMPFS=y | ||
781 | # CONFIG_HUGETLB_PAGE is not set | ||
782 | CONFIG_RAMFS=y | ||
783 | # CONFIG_CONFIGFS_FS is not set | ||
784 | |||
785 | # | ||
786 | # Miscellaneous filesystems | ||
787 | # | ||
788 | # CONFIG_ADFS_FS is not set | ||
789 | # CONFIG_AFFS_FS is not set | ||
790 | # CONFIG_HFS_FS is not set | ||
791 | # CONFIG_HFSPLUS_FS is not set | ||
792 | # CONFIG_BEFS_FS is not set | ||
793 | # CONFIG_BFS_FS is not set | ||
794 | # CONFIG_EFS_FS is not set | ||
795 | # CONFIG_JFFS_FS is not set | ||
796 | CONFIG_JFFS2_FS=y | ||
797 | CONFIG_JFFS2_FS_DEBUG=0 | ||
798 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
799 | # CONFIG_JFFS2_SUMMARY is not set | ||
800 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
801 | CONFIG_JFFS2_ZLIB=y | ||
802 | CONFIG_JFFS2_RTIME=y | ||
803 | # CONFIG_JFFS2_RUBIN is not set | ||
804 | # CONFIG_CRAMFS is not set | ||
805 | # CONFIG_VXFS_FS is not set | ||
806 | # CONFIG_HPFS_FS is not set | ||
807 | # CONFIG_QNX4FS_FS is not set | ||
808 | # CONFIG_SYSV_FS is not set | ||
809 | # CONFIG_UFS_FS is not set | ||
810 | |||
811 | # | ||
812 | # Network File Systems | ||
813 | # | ||
814 | CONFIG_NFS_FS=y | ||
815 | CONFIG_NFS_V3=y | ||
816 | # CONFIG_NFS_V3_ACL is not set | ||
817 | CONFIG_NFS_V4=y | ||
818 | CONFIG_NFS_DIRECTIO=y | ||
819 | # CONFIG_NFSD is not set | ||
820 | CONFIG_ROOT_NFS=y | ||
821 | CONFIG_LOCKD=y | ||
822 | CONFIG_LOCKD_V4=y | ||
823 | CONFIG_NFS_COMMON=y | ||
824 | CONFIG_SUNRPC=y | ||
825 | CONFIG_SUNRPC_GSS=y | ||
826 | CONFIG_RPCSEC_GSS_KRB5=y | ||
827 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
828 | # CONFIG_SMB_FS is not set | ||
829 | # CONFIG_CIFS is not set | ||
830 | # CONFIG_NCP_FS is not set | ||
831 | # CONFIG_CODA_FS is not set | ||
832 | # CONFIG_AFS_FS is not set | ||
833 | # CONFIG_9P_FS is not set | ||
834 | |||
835 | # | ||
836 | # Partition Types | ||
837 | # | ||
838 | # CONFIG_PARTITION_ADVANCED is not set | ||
839 | CONFIG_MSDOS_PARTITION=y | ||
840 | |||
841 | # | ||
842 | # Native Language Support | ||
843 | # | ||
844 | # CONFIG_NLS is not set | ||
845 | |||
846 | # | ||
847 | # Profiling support | ||
848 | # | ||
849 | # CONFIG_PROFILING is not set | ||
850 | |||
851 | # | ||
852 | # Kernel hacking | ||
853 | # | ||
854 | # CONFIG_PRINTK_TIME is not set | ||
855 | CONFIG_MAGIC_SYSRQ=y | ||
856 | CONFIG_DEBUG_KERNEL=y | ||
857 | CONFIG_LOG_BUF_SHIFT=17 | ||
858 | CONFIG_DETECT_SOFTLOCKUP=y | ||
859 | # CONFIG_SCHEDSTATS is not set | ||
860 | # CONFIG_DEBUG_SLAB is not set | ||
861 | CONFIG_DEBUG_PREEMPT=y | ||
862 | # CONFIG_DEBUG_MUTEXES is not set | ||
863 | # CONFIG_DEBUG_SPINLOCK is not set | ||
864 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
865 | # CONFIG_DEBUG_KOBJECT is not set | ||
866 | CONFIG_DEBUG_BUGVERBOSE=y | ||
867 | # CONFIG_DEBUG_INFO is not set | ||
868 | # CONFIG_DEBUG_FS is not set | ||
869 | # CONFIG_DEBUG_VM is not set | ||
870 | CONFIG_FRAME_POINTER=y | ||
871 | # CONFIG_UNWIND_INFO is not set | ||
872 | CONFIG_FORCED_INLINING=y | ||
873 | # CONFIG_RCU_TORTURE_TEST is not set | ||
874 | # CONFIG_DEBUG_USER is not set | ||
875 | # CONFIG_DEBUG_WAITQ is not set | ||
876 | CONFIG_DEBUG_ERRORS=y | ||
877 | # CONFIG_DEBUG_LL is not set | ||
878 | |||
879 | # | ||
880 | # Security options | ||
881 | # | ||
882 | # CONFIG_KEYS is not set | ||
883 | # CONFIG_SECURITY is not set | ||
884 | |||
885 | # | ||
886 | # Cryptographic options | ||
887 | # | ||
888 | CONFIG_CRYPTO=y | ||
889 | CONFIG_CRYPTO_HMAC=y | ||
890 | CONFIG_CRYPTO_NULL=m | ||
891 | CONFIG_CRYPTO_MD4=m | ||
892 | CONFIG_CRYPTO_MD5=y | ||
893 | CONFIG_CRYPTO_SHA1=y | ||
894 | CONFIG_CRYPTO_SHA256=m | ||
895 | CONFIG_CRYPTO_SHA512=m | ||
896 | # CONFIG_CRYPTO_WP512 is not set | ||
897 | # CONFIG_CRYPTO_TGR192 is not set | ||
898 | CONFIG_CRYPTO_DES=y | ||
899 | CONFIG_CRYPTO_BLOWFISH=m | ||
900 | CONFIG_CRYPTO_TWOFISH=m | ||
901 | CONFIG_CRYPTO_SERPENT=m | ||
902 | CONFIG_CRYPTO_AES=m | ||
903 | CONFIG_CRYPTO_CAST5=m | ||
904 | CONFIG_CRYPTO_CAST6=m | ||
905 | # CONFIG_CRYPTO_TEA is not set | ||
906 | CONFIG_CRYPTO_ARC4=m | ||
907 | # CONFIG_CRYPTO_KHAZAD is not set | ||
908 | # CONFIG_CRYPTO_ANUBIS is not set | ||
909 | CONFIG_CRYPTO_DEFLATE=y | ||
910 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
911 | CONFIG_CRYPTO_CRC32C=m | ||
912 | # CONFIG_CRYPTO_TEST is not set | ||
913 | |||
914 | # | ||
915 | # Hardware crypto devices | ||
916 | # | ||
917 | |||
918 | # | ||
919 | # Library routines | ||
920 | # | ||
921 | CONFIG_CRC_CCITT=m | ||
922 | # CONFIG_CRC16 is not set | ||
923 | CONFIG_CRC32=y | ||
924 | CONFIG_LIBCRC32C=m | ||
925 | CONFIG_ZLIB_INFLATE=y | ||
926 | CONFIG_ZLIB_DEFLATE=y | ||
diff --git a/arch/arm/mach-netx/Kconfig b/arch/arm/mach-netx/Kconfig new file mode 100644 index 000000000000..3d90ef19be2b --- /dev/null +++ b/arch/arm/mach-netx/Kconfig | |||
@@ -0,0 +1,24 @@ | |||
1 | menu "NetX Implementations" | ||
2 | depends on ARCH_NETX | ||
3 | |||
4 | config MACH_NXDKN | ||
5 | bool "Enable Hilscher nxdkn Eval Board support" | ||
6 | depends on ARCH_NETX | ||
7 | help | ||
8 | Board support for the Hilscher NetX Eval Board | ||
9 | |||
10 | config MACH_NXDB500 | ||
11 | bool "Enable Hilscher nxdb500 Eval Board support" | ||
12 | depends on ARCH_NETX | ||
13 | select ARM_AMBA | ||
14 | help | ||
15 | Board support for the Hilscher nxdb500 Eval Board | ||
16 | |||
17 | config MACH_NXEB500HMI | ||
18 | bool "Enable Hilscher nxeb500hmi Eval Board support" | ||
19 | depends on ARCH_NETX | ||
20 | select ARM_AMBA | ||
21 | help | ||
22 | Board support for the Hilscher nxeb500hmi Eval Board | ||
23 | |||
24 | endmenu | ||
diff --git a/arch/arm/mach-netx/Makefile b/arch/arm/mach-netx/Makefile new file mode 100644 index 000000000000..18785ff37657 --- /dev/null +++ b/arch/arm/mach-netx/Makefile | |||
@@ -0,0 +1,15 @@ | |||
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 | |||
10 | obj-y += time.o generic.o pfifo.o xc.o | ||
11 | |||
12 | # Specific board support | ||
13 | obj-$(CONFIG_MACH_NXDKN) += nxdkn.o | ||
14 | obj-$(CONFIG_MACH_NXDB500) += nxdb500.o fb.o | ||
15 | obj-$(CONFIG_MACH_NXEB500HMI) += nxeb500hmi.o fb.o | ||
diff --git a/arch/arm/mach-netx/Makefile.boot b/arch/arm/mach-netx/Makefile.boot new file mode 100644 index 000000000000..b81cf6aff0ac --- /dev/null +++ b/arch/arm/mach-netx/Makefile.boot | |||
@@ -0,0 +1,2 @@ | |||
1 | zreladdr-y := 0x80008000 | ||
2 | |||
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c new file mode 100644 index 000000000000..e169b683e4de --- /dev/null +++ b/arch/arm/mach-netx/fb.c | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/fb.c | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/device.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/dma-mapping.h> | ||
23 | #include <linux/amba/bus.h> | ||
24 | #include <linux/amba/clcd.h> | ||
25 | |||
26 | #include <asm/arch/netx-regs.h> | ||
27 | #include <asm/arch/hardware.h> | ||
28 | |||
29 | struct clk {}; | ||
30 | |||
31 | static struct clk fb_clk; | ||
32 | |||
33 | static struct clcd_panel *netx_panel; | ||
34 | |||
35 | void netx_clcd_enable(struct clcd_fb *fb) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | int netx_clcd_setup(struct clcd_fb *fb) | ||
40 | { | ||
41 | dma_addr_t dma; | ||
42 | |||
43 | fb->panel = netx_panel; | ||
44 | |||
45 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, 1024*1024, | ||
46 | &dma, GFP_KERNEL); | ||
47 | if (!fb->fb.screen_base) { | ||
48 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); | ||
49 | return -ENOMEM; | ||
50 | } | ||
51 | |||
52 | fb->fb.fix.smem_start = dma; | ||
53 | fb->fb.fix.smem_len = 1024*1024; | ||
54 | |||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | int netx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) | ||
59 | { | ||
60 | return dma_mmap_writecombine(&fb->dev->dev, vma, | ||
61 | fb->fb.screen_base, | ||
62 | fb->fb.fix.smem_start, | ||
63 | fb->fb.fix.smem_len); | ||
64 | } | ||
65 | |||
66 | void netx_clcd_remove(struct clcd_fb *fb) | ||
67 | { | ||
68 | dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, | ||
69 | fb->fb.screen_base, fb->fb.fix.smem_start); | ||
70 | } | ||
71 | |||
72 | void clk_disable(struct clk *clk) | ||
73 | { | ||
74 | } | ||
75 | |||
76 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
77 | { | ||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | int clk_enable(struct clk *clk) | ||
82 | { | ||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | struct clk *clk_get(struct device *dev, const char *id) | ||
87 | { | ||
88 | return &fb_clk; | ||
89 | } | ||
90 | |||
91 | void clk_put(struct clk *clk) | ||
92 | { | ||
93 | } | ||
94 | |||
95 | static struct amba_device fb_device = { | ||
96 | .dev = { | ||
97 | .bus_id = "fb", | ||
98 | .coherent_dma_mask = ~0, | ||
99 | }, | ||
100 | .res = { | ||
101 | .start = 0x00104000, | ||
102 | .end = 0x00104fff, | ||
103 | .flags = IORESOURCE_MEM, | ||
104 | }, | ||
105 | .irq = { NETX_IRQ_LCD, NO_IRQ }, | ||
106 | .periphid = 0x10112400, | ||
107 | }; | ||
108 | |||
109 | int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel) | ||
110 | { | ||
111 | netx_panel = panel; | ||
112 | fb_device.dev.platform_data = board; | ||
113 | return amba_device_register(&fb_device, &iomem_resource); | ||
114 | } | ||
diff --git a/arch/arm/mach-netx/fb.h b/arch/arm/mach-netx/fb.h new file mode 100644 index 000000000000..4919cf33a5f3 --- /dev/null +++ b/arch/arm/mach-netx/fb.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/fb.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | void netx_clcd_enable(struct clcd_fb *fb); | ||
21 | int netx_clcd_setup(struct clcd_fb *fb); | ||
22 | int netx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma); | ||
23 | void netx_clcd_remove(struct clcd_fb *fb); | ||
24 | int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel); | ||
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c new file mode 100644 index 000000000000..af0b13534cfd --- /dev/null +++ b/arch/arm/mach-netx/generic.c | |||
@@ -0,0 +1,193 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/generic.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/device.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <asm/hardware.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | #include <asm/hardware/vic.h> | ||
28 | #include <asm/io.h> | ||
29 | #include <asm/arch/netx-regs.h> | ||
30 | #include <asm/mach/irq.h> | ||
31 | |||
32 | static struct map_desc netx_io_desc[] __initdata = { | ||
33 | { | ||
34 | .virtual = NETX_IO_VIRT, | ||
35 | .pfn = __phys_to_pfn(NETX_IO_PHYS), | ||
36 | .length = NETX_IO_SIZE, | ||
37 | .type = MT_DEVICE | ||
38 | } | ||
39 | }; | ||
40 | |||
41 | void __init netx_map_io(void) | ||
42 | { | ||
43 | iotable_init(netx_io_desc, ARRAY_SIZE(netx_io_desc)); | ||
44 | } | ||
45 | |||
46 | static struct resource netx_rtc_resources[] = { | ||
47 | [0] = { | ||
48 | .start = 0x00101200, | ||
49 | .end = 0x00101220, | ||
50 | .flags = IORESOURCE_MEM, | ||
51 | }, | ||
52 | }; | ||
53 | |||
54 | static struct platform_device netx_rtc_device = { | ||
55 | .name = "netx-rtc", | ||
56 | .id = 0, | ||
57 | .num_resources = ARRAY_SIZE(netx_rtc_resources), | ||
58 | .resource = netx_rtc_resources, | ||
59 | }; | ||
60 | |||
61 | static struct platform_device *devices[] __initdata = { | ||
62 | &netx_rtc_device, | ||
63 | }; | ||
64 | |||
65 | #if 0 | ||
66 | #define DEBUG_IRQ(fmt...) printk(fmt) | ||
67 | #else | ||
68 | #define DEBUG_IRQ(fmt...) while (0) {} | ||
69 | #endif | ||
70 | |||
71 | static void | ||
72 | netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc, | ||
73 | struct pt_regs *regs) | ||
74 | { | ||
75 | unsigned int irq = NETX_IRQ_HIF_CHAINED(0); | ||
76 | unsigned int stat; | ||
77 | |||
78 | stat = ((readl(NETX_DPMAS_INT_EN) & | ||
79 | readl(NETX_DPMAS_INT_STAT)) >> 24) & 0x1f; | ||
80 | |||
81 | desc = irq_desc + NETX_IRQ_HIF_CHAINED(0); | ||
82 | |||
83 | while (stat) { | ||
84 | if (stat & 1) { | ||
85 | DEBUG_IRQ("handling irq %d\n", irq); | ||
86 | desc_handle_irq(irq, desc, regs); | ||
87 | } | ||
88 | irq++; | ||
89 | desc++; | ||
90 | stat >>= 1; | ||
91 | } | ||
92 | } | ||
93 | |||
94 | static int | ||
95 | netx_hif_irq_type(unsigned int _irq, unsigned int type) | ||
96 | { | ||
97 | unsigned int val, irq; | ||
98 | |||
99 | val = readl(NETX_DPMAS_IF_CONF1); | ||
100 | |||
101 | irq = _irq - NETX_IRQ_HIF_CHAINED(0); | ||
102 | |||
103 | if (type & __IRQT_RISEDGE) { | ||
104 | DEBUG_IRQ("rising edges\n"); | ||
105 | val |= (1 << 26) << irq; | ||
106 | } | ||
107 | if (type & __IRQT_FALEDGE) { | ||
108 | DEBUG_IRQ("falling edges\n"); | ||
109 | val &= ~((1 << 26) << irq); | ||
110 | } | ||
111 | if (type & __IRQT_LOWLVL) { | ||
112 | DEBUG_IRQ("low level\n"); | ||
113 | val &= ~((1 << 26) << irq); | ||
114 | } | ||
115 | if (type & __IRQT_HIGHLVL) { | ||
116 | DEBUG_IRQ("high level\n"); | ||
117 | val |= (1 << 26) << irq; | ||
118 | } | ||
119 | |||
120 | writel(val, NETX_DPMAS_IF_CONF1); | ||
121 | |||
122 | return 0; | ||
123 | } | ||
124 | |||
125 | static void | ||
126 | netx_hif_ack_irq(unsigned int _irq) | ||
127 | { | ||
128 | unsigned int val, irq; | ||
129 | |||
130 | irq = _irq - NETX_IRQ_HIF_CHAINED(0); | ||
131 | writel((1 << 24) << irq, NETX_DPMAS_INT_STAT); | ||
132 | |||
133 | val = readl(NETX_DPMAS_INT_EN); | ||
134 | val &= ~((1 << 24) << irq); | ||
135 | writel(val, NETX_DPMAS_INT_EN); | ||
136 | |||
137 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); | ||
138 | } | ||
139 | |||
140 | static void | ||
141 | netx_hif_mask_irq(unsigned int _irq) | ||
142 | { | ||
143 | unsigned int val, irq; | ||
144 | |||
145 | irq = _irq - NETX_IRQ_HIF_CHAINED(0); | ||
146 | val = readl(NETX_DPMAS_INT_EN); | ||
147 | val &= ~((1 << 24) << irq); | ||
148 | writel(val, NETX_DPMAS_INT_EN); | ||
149 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); | ||
150 | } | ||
151 | |||
152 | static void | ||
153 | netx_hif_unmask_irq(unsigned int _irq) | ||
154 | { | ||
155 | unsigned int val, irq; | ||
156 | |||
157 | irq = _irq - NETX_IRQ_HIF_CHAINED(0); | ||
158 | val = readl(NETX_DPMAS_INT_EN); | ||
159 | val |= (1 << 24) << irq; | ||
160 | writel(val, NETX_DPMAS_INT_EN); | ||
161 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); | ||
162 | } | ||
163 | |||
164 | static struct irqchip netx_hif_chip = { | ||
165 | .ack = netx_hif_ack_irq, | ||
166 | .mask = netx_hif_mask_irq, | ||
167 | .unmask = netx_hif_unmask_irq, | ||
168 | .set_type = netx_hif_irq_type, | ||
169 | }; | ||
170 | |||
171 | void __init netx_init_irq(void) | ||
172 | { | ||
173 | int irq; | ||
174 | |||
175 | vic_init(__io(io_p2v(NETX_PA_VIC)), 0, ~0); | ||
176 | |||
177 | for (irq = NETX_IRQ_HIF_CHAINED(0); irq <= NETX_IRQ_HIF_LAST; irq++) { | ||
178 | set_irq_chip(irq, &netx_hif_chip); | ||
179 | set_irq_handler(irq, do_level_IRQ); | ||
180 | set_irq_flags(irq, IRQF_VALID); | ||
181 | } | ||
182 | |||
183 | writel(NETX_DPMAS_INT_EN_GLB_EN, NETX_DPMAS_INT_EN); | ||
184 | set_irq_chained_handler(NETX_IRQ_HIF, netx_hif_demux_handler); | ||
185 | } | ||
186 | |||
187 | static int __init netx_init(void) | ||
188 | { | ||
189 | return platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
190 | } | ||
191 | |||
192 | subsys_initcall(netx_init); | ||
193 | |||
diff --git a/arch/arm/mach-netx/generic.h b/arch/arm/mach-netx/generic.h new file mode 100644 index 000000000000..ede2d35341c3 --- /dev/null +++ b/arch/arm/mach-netx/generic.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/generic.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | extern void __init netx_map_io(void); | ||
21 | extern void __init netx_init_irq(void); | ||
22 | |||
23 | struct sys_timer; | ||
24 | extern struct sys_timer netx_timer; | ||
diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c new file mode 100644 index 000000000000..e4a133d62846 --- /dev/null +++ b/arch/arm/mach-netx/nxdb500.c | |||
@@ -0,0 +1,210 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/nxdb500.c | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/dma-mapping.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/mtd/plat-ram.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/amba/bus.h> | ||
26 | #include <linux/amba/clcd.h> | ||
27 | |||
28 | #include <asm/hardware.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/arch/netx-regs.h> | ||
32 | #include <asm/arch/eth.h> | ||
33 | |||
34 | #include "generic.h" | ||
35 | #include "fb.h" | ||
36 | |||
37 | static struct clcd_panel qvga = { | ||
38 | .mode = { | ||
39 | .name = "QVGA", | ||
40 | .refresh = 60, | ||
41 | .xres = 240, | ||
42 | .yres = 320, | ||
43 | .pixclock = 187617, | ||
44 | .left_margin = 6, | ||
45 | .right_margin = 26, | ||
46 | .upper_margin = 0, | ||
47 | .lower_margin = 6, | ||
48 | .hsync_len = 6, | ||
49 | .vsync_len = 1, | ||
50 | .sync = 0, | ||
51 | .vmode = FB_VMODE_NONINTERLACED, | ||
52 | }, | ||
53 | .width = -1, | ||
54 | .height = -1, | ||
55 | .tim2 = 16, | ||
56 | .cntl = CNTL_LCDTFT | CNTL_BGR, | ||
57 | .bpp = 16, | ||
58 | .grayscale = 0, | ||
59 | }; | ||
60 | |||
61 | static inline int nxdb500_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) | ||
62 | { | ||
63 | var->green.length = 5; | ||
64 | var->green.msb_right = 0; | ||
65 | |||
66 | return clcdfb_check(fb, var); | ||
67 | } | ||
68 | |||
69 | static int nxdb500_clcd_setup(struct clcd_fb *fb) | ||
70 | { | ||
71 | unsigned int val; | ||
72 | |||
73 | fb->fb.var.green.length = 5; | ||
74 | fb->fb.var.green.msb_right = 0; | ||
75 | |||
76 | /* enable asic control */ | ||
77 | val = readl(NETX_SYSTEM_IOC_ACCESS_KEY); | ||
78 | writel(val, NETX_SYSTEM_IOC_ACCESS_KEY); | ||
79 | |||
80 | writel(3, NETX_SYSTEM_IOC_CR); | ||
81 | |||
82 | val = readl(NETX_PIO_OUTPIO); | ||
83 | writel(val | 1, NETX_PIO_OUTPIO); | ||
84 | |||
85 | val = readl(NETX_PIO_OEPIO); | ||
86 | writel(val | 1, NETX_PIO_OEPIO); | ||
87 | return netx_clcd_setup(fb); | ||
88 | } | ||
89 | |||
90 | static struct clcd_board clcd_data = { | ||
91 | .name = "netX", | ||
92 | .check = nxdb500_check, | ||
93 | .decode = clcdfb_decode, | ||
94 | .enable = netx_clcd_enable, | ||
95 | .setup = nxdb500_clcd_setup, | ||
96 | .mmap = netx_clcd_mmap, | ||
97 | .remove = netx_clcd_remove, | ||
98 | }; | ||
99 | |||
100 | static struct netxeth_platform_data eth0_platform_data = { | ||
101 | .xcno = 0, | ||
102 | }; | ||
103 | |||
104 | static struct platform_device netx_eth0_device = { | ||
105 | .name = "netx-eth", | ||
106 | .id = 0, | ||
107 | .num_resources = 0, | ||
108 | .resource = NULL, | ||
109 | .dev = { | ||
110 | .platform_data = ð0_platform_data, | ||
111 | } | ||
112 | }; | ||
113 | |||
114 | static struct netxeth_platform_data eth1_platform_data = { | ||
115 | .xcno = 1, | ||
116 | }; | ||
117 | |||
118 | static struct platform_device netx_eth1_device = { | ||
119 | .name = "netx-eth", | ||
120 | .id = 1, | ||
121 | .num_resources = 0, | ||
122 | .resource = NULL, | ||
123 | .dev = { | ||
124 | .platform_data = ð1_platform_data, | ||
125 | } | ||
126 | }; | ||
127 | |||
128 | static struct resource netx_uart0_resources[] = { | ||
129 | [0] = { | ||
130 | .start = 0x00100A00, | ||
131 | .end = 0x00100A3F, | ||
132 | .flags = IORESOURCE_MEM, | ||
133 | }, | ||
134 | [1] = { | ||
135 | .start = (NETX_IRQ_UART0), | ||
136 | .end = (NETX_IRQ_UART0), | ||
137 | .flags = IORESOURCE_IRQ, | ||
138 | }, | ||
139 | }; | ||
140 | |||
141 | static struct platform_device netx_uart0_device = { | ||
142 | .name = "netx-uart", | ||
143 | .id = 0, | ||
144 | .num_resources = ARRAY_SIZE(netx_uart0_resources), | ||
145 | .resource = netx_uart0_resources, | ||
146 | }; | ||
147 | |||
148 | static struct resource netx_uart1_resources[] = { | ||
149 | [0] = { | ||
150 | .start = 0x00100A40, | ||
151 | .end = 0x00100A7F, | ||
152 | .flags = IORESOURCE_MEM, | ||
153 | }, | ||
154 | [1] = { | ||
155 | .start = (NETX_IRQ_UART1), | ||
156 | .end = (NETX_IRQ_UART1), | ||
157 | .flags = IORESOURCE_IRQ, | ||
158 | }, | ||
159 | }; | ||
160 | |||
161 | static struct platform_device netx_uart1_device = { | ||
162 | .name = "netx-uart", | ||
163 | .id = 1, | ||
164 | .num_resources = ARRAY_SIZE(netx_uart1_resources), | ||
165 | .resource = netx_uart1_resources, | ||
166 | }; | ||
167 | |||
168 | static struct resource netx_uart2_resources[] = { | ||
169 | [0] = { | ||
170 | .start = 0x00100A80, | ||
171 | .end = 0x00100ABF, | ||
172 | .flags = IORESOURCE_MEM, | ||
173 | }, | ||
174 | [1] = { | ||
175 | .start = (NETX_IRQ_UART2), | ||
176 | .end = (NETX_IRQ_UART2), | ||
177 | .flags = IORESOURCE_IRQ, | ||
178 | }, | ||
179 | }; | ||
180 | |||
181 | static struct platform_device netx_uart2_device = { | ||
182 | .name = "netx-uart", | ||
183 | .id = 2, | ||
184 | .num_resources = ARRAY_SIZE(netx_uart2_resources), | ||
185 | .resource = netx_uart2_resources, | ||
186 | }; | ||
187 | |||
188 | static struct platform_device *devices[] __initdata = { | ||
189 | &netx_eth0_device, | ||
190 | &netx_eth1_device, | ||
191 | &netx_uart0_device, | ||
192 | &netx_uart1_device, | ||
193 | &netx_uart2_device, | ||
194 | }; | ||
195 | |||
196 | static void __init nxdb500_init(void) | ||
197 | { | ||
198 | netx_fb_init(&clcd_data, &qvga); | ||
199 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
200 | } | ||
201 | |||
202 | MACHINE_START(NXDB500, "Hilscher nxdb500") | ||
203 | .phys_io = 0x00100000, | ||
204 | .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc, | ||
205 | .boot_params = 0x80000100, | ||
206 | .map_io = netx_map_io, | ||
207 | .init_irq = netx_init_irq, | ||
208 | .timer = &netx_timer, | ||
209 | .init_machine = nxdb500_init, | ||
210 | MACHINE_END | ||
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c new file mode 100644 index 000000000000..7e26c42d1ac7 --- /dev/null +++ b/arch/arm/mach-netx/nxdkn.c | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/nxdkn.c | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/dma-mapping.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/mtd/plat-ram.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/amba/bus.h> | ||
26 | #include <linux/amba/clcd.h> | ||
27 | |||
28 | #include <asm/hardware.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/arch/netx-regs.h> | ||
32 | #include <asm/arch/eth.h> | ||
33 | |||
34 | #include "generic.h" | ||
35 | |||
36 | static struct netxeth_platform_data eth0_platform_data = { | ||
37 | .xcno = 0, | ||
38 | }; | ||
39 | |||
40 | static struct platform_device nxdkn_eth0_device = { | ||
41 | .name = "netx-eth", | ||
42 | .id = 0, | ||
43 | .num_resources = 0, | ||
44 | .resource = NULL, | ||
45 | .dev = { | ||
46 | .platform_data = ð0_platform_data, | ||
47 | } | ||
48 | }; | ||
49 | |||
50 | static struct netxeth_platform_data eth1_platform_data = { | ||
51 | .xcno = 1, | ||
52 | }; | ||
53 | |||
54 | static struct platform_device nxdkn_eth1_device = { | ||
55 | .name = "netx-eth", | ||
56 | .id = 1, | ||
57 | .num_resources = 0, | ||
58 | .resource = NULL, | ||
59 | .dev = { | ||
60 | .platform_data = ð1_platform_data, | ||
61 | } | ||
62 | }; | ||
63 | |||
64 | static struct resource netx_uart0_resources[] = { | ||
65 | [0] = { | ||
66 | .start = 0x00100A00, | ||
67 | .end = 0x00100A3F, | ||
68 | .flags = IORESOURCE_MEM, | ||
69 | }, | ||
70 | [1] = { | ||
71 | .start = (NETX_IRQ_UART0), | ||
72 | .end = (NETX_IRQ_UART0), | ||
73 | .flags = IORESOURCE_IRQ, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static struct platform_device netx_uart0_device = { | ||
78 | .name = "netx-uart", | ||
79 | .id = 0, | ||
80 | .num_resources = ARRAY_SIZE(netx_uart0_resources), | ||
81 | .resource = netx_uart0_resources, | ||
82 | }; | ||
83 | |||
84 | static struct platform_device *devices[] __initdata = { | ||
85 | &nxdkn_eth0_device, | ||
86 | &nxdkn_eth1_device, | ||
87 | &netx_uart0_device, | ||
88 | }; | ||
89 | |||
90 | static void __init nxdkn_init(void) | ||
91 | { | ||
92 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
93 | } | ||
94 | |||
95 | MACHINE_START(NXDKN, "Hilscher nxdkn") | ||
96 | .phys_io = 0x00100000, | ||
97 | .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc, | ||
98 | .boot_params = 0x80000100, | ||
99 | .map_io = netx_map_io, | ||
100 | .init_irq = netx_init_irq, | ||
101 | .timer = &netx_timer, | ||
102 | .init_machine = nxdkn_init, | ||
103 | MACHINE_END | ||
diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c new file mode 100644 index 000000000000..53e10a9849f9 --- /dev/null +++ b/arch/arm/mach-netx/nxeb500hmi.c | |||
@@ -0,0 +1,187 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/nxeb500hmi.c | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/dma-mapping.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/mtd/plat-ram.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/amba/bus.h> | ||
26 | #include <linux/amba/clcd.h> | ||
27 | |||
28 | #include <asm/hardware.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/arch/netx-regs.h> | ||
32 | #include <asm/arch/eth.h> | ||
33 | |||
34 | #include "generic.h" | ||
35 | #include "fb.h" | ||
36 | |||
37 | static struct clcd_panel qvga = { | ||
38 | .mode = { | ||
39 | .name = "QVGA", | ||
40 | .refresh = 60, | ||
41 | .xres = 240, | ||
42 | .yres = 320, | ||
43 | .pixclock = 187617, | ||
44 | .left_margin = 6, | ||
45 | .right_margin = 26, | ||
46 | .upper_margin = 0, | ||
47 | .lower_margin = 6, | ||
48 | .hsync_len = 6, | ||
49 | .vsync_len = 1, | ||
50 | .sync = 0, | ||
51 | .vmode = FB_VMODE_NONINTERLACED, | ||
52 | }, | ||
53 | .width = -1, | ||
54 | .height = -1, | ||
55 | .tim2 = 16, | ||
56 | .cntl = CNTL_LCDTFT | CNTL_BGR, | ||
57 | .bpp = 16, | ||
58 | .grayscale = 0, | ||
59 | }; | ||
60 | |||
61 | static inline int nxeb500hmi_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) | ||
62 | { | ||
63 | var->green.length = 5; | ||
64 | var->green.msb_right = 0; | ||
65 | |||
66 | return clcdfb_check(fb, var); | ||
67 | } | ||
68 | |||
69 | static int nxeb500hmi_clcd_setup(struct clcd_fb *fb) | ||
70 | { | ||
71 | unsigned int val; | ||
72 | |||
73 | fb->fb.var.green.length = 5; | ||
74 | fb->fb.var.green.msb_right = 0; | ||
75 | |||
76 | /* enable asic control */ | ||
77 | val = readl(NETX_SYSTEM_IOC_ACCESS_KEY); | ||
78 | writel(val, NETX_SYSTEM_IOC_ACCESS_KEY); | ||
79 | |||
80 | writel(3, NETX_SYSTEM_IOC_CR); | ||
81 | |||
82 | /* GPIO 14 is used for display enable on newer boards */ | ||
83 | writel(9, NETX_GPIO_CFG(14)); | ||
84 | |||
85 | val = readl(NETX_PIO_OUTPIO); | ||
86 | writel(val | 1, NETX_PIO_OUTPIO); | ||
87 | |||
88 | val = readl(NETX_PIO_OEPIO); | ||
89 | writel(val | 1, NETX_PIO_OEPIO); | ||
90 | return netx_clcd_setup(fb); | ||
91 | } | ||
92 | |||
93 | static struct clcd_board clcd_data = { | ||
94 | .name = "netX", | ||
95 | .check = nxeb500hmi_check, | ||
96 | .decode = clcdfb_decode, | ||
97 | .enable = netx_clcd_enable, | ||
98 | .setup = nxeb500hmi_clcd_setup, | ||
99 | .mmap = netx_clcd_mmap, | ||
100 | .remove = netx_clcd_remove, | ||
101 | }; | ||
102 | |||
103 | static struct netxeth_platform_data eth0_platform_data = { | ||
104 | .xcno = 0, | ||
105 | }; | ||
106 | |||
107 | static struct platform_device netx_eth0_device = { | ||
108 | .name = "netx-eth", | ||
109 | .id = 0, | ||
110 | .num_resources = 0, | ||
111 | .resource = NULL, | ||
112 | .dev = { | ||
113 | .platform_data = ð0_platform_data, | ||
114 | } | ||
115 | }; | ||
116 | |||
117 | static struct netxeth_platform_data eth1_platform_data = { | ||
118 | .xcno = 1, | ||
119 | }; | ||
120 | |||
121 | static struct platform_device netx_eth1_device = { | ||
122 | .name = "netx-eth", | ||
123 | .id = 1, | ||
124 | .num_resources = 0, | ||
125 | .resource = NULL, | ||
126 | .dev = { | ||
127 | .platform_data = ð1_platform_data, | ||
128 | } | ||
129 | }; | ||
130 | |||
131 | static struct resource netx_cf_resources[] = { | ||
132 | [0] = { | ||
133 | .start = 0x20000000, | ||
134 | .end = 0x25ffffff, | ||
135 | .flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT, | ||
136 | }, | ||
137 | }; | ||
138 | |||
139 | static struct platform_device netx_cf_device = { | ||
140 | .name = "netx-cf", | ||
141 | .id = 0, | ||
142 | .resource = netx_cf_resources, | ||
143 | .num_resources = ARRAY_SIZE(netx_cf_resources), | ||
144 | }; | ||
145 | |||
146 | static struct resource netx_uart0_resources[] = { | ||
147 | [0] = { | ||
148 | .start = 0x00100A00, | ||
149 | .end = 0x00100A3F, | ||
150 | .flags = IORESOURCE_MEM, | ||
151 | }, | ||
152 | [1] = { | ||
153 | .start = (NETX_IRQ_UART0), | ||
154 | .end = (NETX_IRQ_UART0), | ||
155 | .flags = IORESOURCE_IRQ, | ||
156 | }, | ||
157 | }; | ||
158 | |||
159 | static struct platform_device netx_uart0_device = { | ||
160 | .name = "netx-uart", | ||
161 | .id = 0, | ||
162 | .num_resources = ARRAY_SIZE(netx_uart0_resources), | ||
163 | .resource = netx_uart0_resources, | ||
164 | }; | ||
165 | |||
166 | static struct platform_device *devices[] __initdata = { | ||
167 | &netx_eth0_device, | ||
168 | &netx_eth1_device, | ||
169 | &netx_cf_device, | ||
170 | &netx_uart0_device, | ||
171 | }; | ||
172 | |||
173 | static void __init nxeb500hmi_init(void) | ||
174 | { | ||
175 | netx_fb_init(&clcd_data, &qvga); | ||
176 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
177 | } | ||
178 | |||
179 | MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi") | ||
180 | .phys_io = 0x00100000, | ||
181 | .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc, | ||
182 | .boot_params = 0x80000100, | ||
183 | .map_io = netx_map_io, | ||
184 | .init_irq = netx_init_irq, | ||
185 | .timer = &netx_timer, | ||
186 | .init_machine = nxeb500hmi_init, | ||
187 | MACHINE_END | ||
diff --git a/arch/arm/mach-netx/pfifo.c b/arch/arm/mach-netx/pfifo.c new file mode 100644 index 000000000000..44dea61a9de4 --- /dev/null +++ b/arch/arm/mach-netx/pfifo.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/pfifo.c | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/init.h> | ||
21 | #include <linux/module.h> | ||
22 | #include <linux/mutex.h> | ||
23 | |||
24 | #include <asm/io.h> | ||
25 | #include <asm/hardware.h> | ||
26 | #include <asm/arch/netx-regs.h> | ||
27 | #include <asm/arch/pfifo.h> | ||
28 | |||
29 | static DEFINE_MUTEX(pfifo_lock); | ||
30 | |||
31 | static unsigned int pfifo_used = 0; | ||
32 | |||
33 | int pfifo_request(unsigned int pfifo_mask) | ||
34 | { | ||
35 | int err = 0; | ||
36 | unsigned int val; | ||
37 | |||
38 | mutex_lock(&pfifo_lock); | ||
39 | |||
40 | if (pfifo_mask & pfifo_used) { | ||
41 | err = -EBUSY; | ||
42 | goto out; | ||
43 | } | ||
44 | |||
45 | pfifo_used |= pfifo_mask; | ||
46 | |||
47 | val = readl(NETX_PFIFO_RESET); | ||
48 | writel(val | pfifo_mask, NETX_PFIFO_RESET); | ||
49 | writel(val, NETX_PFIFO_RESET); | ||
50 | |||
51 | out: | ||
52 | mutex_unlock(&pfifo_lock); | ||
53 | return err; | ||
54 | } | ||
55 | |||
56 | void pfifo_free(unsigned int pfifo_mask) | ||
57 | { | ||
58 | mutex_lock(&pfifo_lock); | ||
59 | pfifo_used &= ~pfifo_mask; | ||
60 | mutex_unlock(&pfifo_lock); | ||
61 | } | ||
62 | |||
63 | EXPORT_SYMBOL(pfifo_push); | ||
64 | EXPORT_SYMBOL(pfifo_pop); | ||
65 | EXPORT_SYMBOL(pfifo_fill_level); | ||
66 | EXPORT_SYMBOL(pfifo_empty); | ||
67 | EXPORT_SYMBOL(pfifo_request); | ||
68 | EXPORT_SYMBOL(pfifo_free); | ||
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c new file mode 100644 index 000000000000..edfbdf40c600 --- /dev/null +++ b/arch/arm/mach-netx/time.c | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/time.c | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/init.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | |||
23 | #include <asm/hardware.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/mach/time.h> | ||
26 | #include <asm/arch/netx-regs.h> | ||
27 | |||
28 | /* | ||
29 | * Returns number of us since last clock interrupt. Note that interrupts | ||
30 | * will have been disabled by do_gettimeoffset() | ||
31 | */ | ||
32 | static unsigned long netx_gettimeoffset(void) | ||
33 | { | ||
34 | return readl(NETX_GPIO_COUNTER_CURRENT(0)) / 100; | ||
35 | } | ||
36 | |||
37 | /* | ||
38 | * IRQ handler for the timer | ||
39 | */ | ||
40 | static irqreturn_t | ||
41 | netx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
42 | { | ||
43 | write_seqlock(&xtime_lock); | ||
44 | |||
45 | timer_tick(regs); | ||
46 | write_sequnlock(&xtime_lock); | ||
47 | |||
48 | /* acknowledge interrupt */ | ||
49 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ); | ||
50 | |||
51 | return IRQ_HANDLED; | ||
52 | } | ||
53 | |||
54 | |||
55 | static struct irqaction netx_timer_irq = { | ||
56 | .name = "NetX Timer Tick", | ||
57 | .flags = SA_INTERRUPT | SA_TIMER, | ||
58 | .handler = netx_timer_interrupt, | ||
59 | }; | ||
60 | |||
61 | /* | ||
62 | * Set up timer interrupt | ||
63 | */ | ||
64 | static void __init netx_timer_init(void) | ||
65 | { | ||
66 | /* disable timer initially */ | ||
67 | writel(0, NETX_GPIO_COUNTER_CTRL(0)); | ||
68 | |||
69 | /* Reset the timer value to zero */ | ||
70 | writel(0, NETX_GPIO_COUNTER_CURRENT(0)); | ||
71 | |||
72 | writel(LATCH, NETX_GPIO_COUNTER_MAX(0)); | ||
73 | |||
74 | /* acknowledge interrupt */ | ||
75 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ); | ||
76 | |||
77 | /* Enable the interrupt in the specific timer register and start timer */ | ||
78 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ_ENABLE); | ||
79 | writel(NETX_GPIO_COUNTER_CTRL_IRQ_EN | NETX_GPIO_COUNTER_CTRL_RUN, | ||
80 | NETX_GPIO_COUNTER_CTRL(0)); | ||
81 | |||
82 | setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq); | ||
83 | } | ||
84 | |||
85 | struct sys_timer netx_timer = { | ||
86 | .init = netx_timer_init, | ||
87 | .offset = netx_gettimeoffset, | ||
88 | }; | ||
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c new file mode 100644 index 000000000000..172a058ddd66 --- /dev/null +++ b/arch/arm/mach-netx/xc.c | |||
@@ -0,0 +1,255 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/xc.c | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/init.h> | ||
21 | #include <linux/device.h> | ||
22 | #include <linux/firmware.h> | ||
23 | #include <linux/mutex.h> | ||
24 | |||
25 | #include <asm/io.h> | ||
26 | #include <asm/hardware.h> | ||
27 | #include <asm/arch/netx-regs.h> | ||
28 | |||
29 | #include <asm/arch/xc.h> | ||
30 | |||
31 | static DEFINE_MUTEX(xc_lock); | ||
32 | |||
33 | static int xc_in_use = 0; | ||
34 | |||
35 | struct fw_desc { | ||
36 | unsigned int ofs; | ||
37 | unsigned int size; | ||
38 | unsigned int patch_ofs; | ||
39 | unsigned int patch_entries; | ||
40 | }; | ||
41 | |||
42 | struct fw_header { | ||
43 | unsigned int magic; | ||
44 | unsigned int type; | ||
45 | unsigned int version; | ||
46 | unsigned int reserved[5]; | ||
47 | struct fw_desc fw_desc[3]; | ||
48 | } __attribute__ ((packed)); | ||
49 | |||
50 | int xc_stop(struct xc *x) | ||
51 | { | ||
52 | writel(RPU_HOLD_PC, x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS); | ||
53 | writel(TPU_HOLD_PC, x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS); | ||
54 | writel(XPU_HOLD_PC, x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS); | ||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | int xc_start(struct xc *x) | ||
59 | { | ||
60 | writel(0, x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS); | ||
61 | writel(0, x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS); | ||
62 | writel(0, x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS); | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | int xc_running(struct xc *x) | ||
67 | { | ||
68 | return (readl(x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS) & RPU_HOLD_PC) | ||
69 | || (readl(x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS) & TPU_HOLD_PC) | ||
70 | || (readl(x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS) & XPU_HOLD_PC) ? | ||
71 | 0 : 1; | ||
72 | } | ||
73 | |||
74 | int xc_reset(struct xc *x) | ||
75 | { | ||
76 | writel(0, x->xpec_base + NETX_XPEC_PC_OFS); | ||
77 | return 0; | ||
78 | } | ||
79 | |||
80 | static int xc_check_ptr(struct xc *x, unsigned long adr, unsigned int size) | ||
81 | { | ||
82 | if (adr >= NETX_PA_XMAC(x->no) && | ||
83 | adr + size < NETX_PA_XMAC(x->no) + XMAC_MEM_SIZE) | ||
84 | return 0; | ||
85 | |||
86 | if (adr >= NETX_PA_XPEC(x->no) && | ||
87 | adr + size < NETX_PA_XPEC(x->no) + XPEC_MEM_SIZE) | ||
88 | return 0; | ||
89 | |||
90 | dev_err(x->dev, "Illegal pointer in firmware found. aborting\n"); | ||
91 | |||
92 | return -1; | ||
93 | } | ||
94 | |||
95 | static int xc_patch(struct xc *x, void *patch, int count) | ||
96 | { | ||
97 | unsigned int val, adr; | ||
98 | unsigned int *data = patch; | ||
99 | |||
100 | int i; | ||
101 | for (i = 0; i < count; i++) { | ||
102 | adr = *data++; | ||
103 | val = *data++; | ||
104 | if (xc_check_ptr(x, adr, 4) < 0) | ||
105 | return -EINVAL; | ||
106 | |||
107 | writel(val, (void __iomem *)io_p2v(adr)); | ||
108 | } | ||
109 | return 0; | ||
110 | } | ||
111 | |||
112 | int xc_request_firmware(struct xc *x) | ||
113 | { | ||
114 | int ret; | ||
115 | char name[16]; | ||
116 | const struct firmware *fw; | ||
117 | struct fw_header *head; | ||
118 | unsigned int size; | ||
119 | int i; | ||
120 | void *src; | ||
121 | unsigned long dst; | ||
122 | |||
123 | sprintf(name, "xc%d.bin", x->no); | ||
124 | |||
125 | ret = request_firmware(&fw, name, x->dev); | ||
126 | |||
127 | if (ret < 0) { | ||
128 | dev_err(x->dev, "request_firmware failed\n"); | ||
129 | return ret; | ||
130 | } | ||
131 | |||
132 | head = (struct fw_header *)fw->data; | ||
133 | if (head->magic != 0x4e657458) { | ||
134 | if (head->magic == 0x5874654e) { | ||
135 | dev_err(x->dev, | ||
136 | "firmware magic is 'XteN'. Endianess problems?\n"); | ||
137 | ret = -ENODEV; | ||
138 | goto exit_release_firmware; | ||
139 | } | ||
140 | dev_err(x->dev, "unrecognized firmware magic 0x%08x\n", | ||
141 | head->magic); | ||
142 | ret = -ENODEV; | ||
143 | goto exit_release_firmware; | ||
144 | } | ||
145 | |||
146 | x->type = head->type; | ||
147 | x->version = head->version; | ||
148 | |||
149 | ret = -EINVAL; | ||
150 | |||
151 | for (i = 0; i < 3; i++) { | ||
152 | src = fw->data + head->fw_desc[i].ofs; | ||
153 | dst = *(unsigned int *)src; | ||
154 | src += sizeof (unsigned int); | ||
155 | size = head->fw_desc[i].size - sizeof (unsigned int); | ||
156 | |||
157 | if (xc_check_ptr(x, dst, size)) | ||
158 | goto exit_release_firmware; | ||
159 | |||
160 | memcpy((void *)io_p2v(dst), src, size); | ||
161 | |||
162 | src = fw->data + head->fw_desc[i].patch_ofs; | ||
163 | size = head->fw_desc[i].patch_entries; | ||
164 | ret = xc_patch(x, src, size); | ||
165 | if (ret < 0) | ||
166 | goto exit_release_firmware; | ||
167 | } | ||
168 | |||
169 | ret = 0; | ||
170 | |||
171 | exit_release_firmware: | ||
172 | release_firmware(fw); | ||
173 | |||
174 | return ret; | ||
175 | } | ||
176 | |||
177 | struct xc *request_xc(int xcno, struct device *dev) | ||
178 | { | ||
179 | struct xc *x = NULL; | ||
180 | |||
181 | mutex_lock(&xc_lock); | ||
182 | |||
183 | if (xcno > 3) | ||
184 | goto exit; | ||
185 | if (xc_in_use & (1 << xcno)) | ||
186 | goto exit; | ||
187 | |||
188 | x = kmalloc(sizeof (struct xc), GFP_KERNEL); | ||
189 | if (!x) | ||
190 | goto exit; | ||
191 | |||
192 | if (!request_mem_region | ||
193 | (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, dev->kobj.name)) | ||
194 | goto exit_free; | ||
195 | |||
196 | if (!request_mem_region | ||
197 | (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, dev->kobj.name)) | ||
198 | goto exit_release_1; | ||
199 | |||
200 | if (!request_mem_region | ||
201 | (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, dev->kobj.name)) | ||
202 | goto exit_release_2; | ||
203 | |||
204 | x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno)); | ||
205 | x->xmac_base = (void * __iomem)io_p2v(NETX_PA_XMAC(xcno)); | ||
206 | x->sram_base = ioremap(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); | ||
207 | if (!x->sram_base) | ||
208 | goto exit_release_3; | ||
209 | |||
210 | x->irq = NETX_IRQ_XPEC(xcno); | ||
211 | |||
212 | x->no = xcno; | ||
213 | x->dev = dev; | ||
214 | |||
215 | xc_in_use |= (1 << xcno); | ||
216 | |||
217 | goto exit; | ||
218 | |||
219 | exit_release_3: | ||
220 | release_mem_region(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); | ||
221 | exit_release_2: | ||
222 | release_mem_region(NETX_PA_XMAC(xcno), XMAC_MEM_SIZE); | ||
223 | exit_release_1: | ||
224 | release_mem_region(NETX_PA_XPEC(xcno), XPEC_MEM_SIZE); | ||
225 | exit_free: | ||
226 | kfree(x); | ||
227 | x = NULL; | ||
228 | exit: | ||
229 | mutex_unlock(&xc_lock); | ||
230 | return x; | ||
231 | } | ||
232 | |||
233 | void free_xc(struct xc *x) | ||
234 | { | ||
235 | int xcno = x->no; | ||
236 | |||
237 | mutex_lock(&xc_lock); | ||
238 | |||
239 | iounmap(x->sram_base); | ||
240 | release_mem_region(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE); | ||
241 | release_mem_region(NETX_PA_XMAC(xcno), XMAC_MEM_SIZE); | ||
242 | release_mem_region(NETX_PA_XPEC(xcno), XPEC_MEM_SIZE); | ||
243 | xc_in_use &= ~(1 << x->no); | ||
244 | kfree(x); | ||
245 | |||
246 | mutex_unlock(&xc_lock); | ||
247 | } | ||
248 | |||
249 | EXPORT_SYMBOL(free_xc); | ||
250 | EXPORT_SYMBOL(request_xc); | ||
251 | EXPORT_SYMBOL(xc_request_firmware); | ||
252 | EXPORT_SYMBOL(xc_reset); | ||
253 | EXPORT_SYMBOL(xc_running); | ||
254 | EXPORT_SYMBOL(xc_start); | ||
255 | EXPORT_SYMBOL(xc_stop); | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 1ff2f073a55d..4221d054a1e9 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -121,8 +121,8 @@ config CPU_ARM925T | |||
121 | # ARM926T | 121 | # ARM926T |
122 | config CPU_ARM926T | 122 | config CPU_ARM926T |
123 | bool "Support ARM926T processor" | 123 | bool "Support ARM926T processor" |
124 | depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 | 124 | depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX |
125 | default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 | 125 | default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX |
126 | select CPU_32v5 | 126 | select CPU_32v5 |
127 | select CPU_ABRT_EV5TJ | 127 | select CPU_ABRT_EV5TJ |
128 | select CPU_CACHE_VIVT | 128 | select CPU_CACHE_VIVT |