]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Jan 2009 19:56:29 +0000 (11:56 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Jan 2009 19:56:29 +0000 (11:56 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6:
  xtensa: Update platform files to reflect new location of the header files.
  xtensa: switch to packed struct unaligned access implementation
  xtensa: Add xt2000 support files.
  xtensa: move headers files to arch/xtensa/include
  xtensa: use the new byteorder headers

124 files changed:
arch/xtensa/Makefile
arch/xtensa/boot/boot-elf/boot.lds.S
arch/xtensa/boot/boot-redboot/bootstrap.S
arch/xtensa/include/asm/Kbuild [moved from include/asm-xtensa/Kbuild with 100% similarity]
arch/xtensa/include/asm/asmmacro.h [moved from include/asm-xtensa/asmmacro.h with 98% similarity]
arch/xtensa/include/asm/atomic.h [moved from include/asm-xtensa/atomic.h with 100% similarity]
arch/xtensa/include/asm/auxvec.h [moved from include/asm-xtensa/auxvec.h with 100% similarity]
arch/xtensa/include/asm/bitops.h [moved from include/asm-xtensa/bitops.h with 100% similarity]
arch/xtensa/include/asm/bootparam.h [moved from include/asm-xtensa/bootparam.h with 100% similarity]
arch/xtensa/include/asm/bug.h [moved from include/asm-xtensa/bug.h with 100% similarity]
arch/xtensa/include/asm/bugs.h [moved from include/asm-xtensa/bugs.h with 100% similarity]
arch/xtensa/include/asm/byteorder.h [moved from include/asm-xtensa/byteorder.h with 82% similarity]
arch/xtensa/include/asm/cache.h [moved from include/asm-xtensa/cache.h with 96% similarity]
arch/xtensa/include/asm/cacheasm.h [moved from include/asm-xtensa/cacheasm.h with 100% similarity]
arch/xtensa/include/asm/cacheflush.h [moved from include/asm-xtensa/cacheflush.h with 100% similarity]
arch/xtensa/include/asm/checksum.h [moved from include/asm-xtensa/checksum.h with 99% similarity]
arch/xtensa/include/asm/coprocessor.h [moved from include/asm-xtensa/coprocessor.h with 98% similarity]
arch/xtensa/include/asm/cpumask.h [moved from include/asm-xtensa/cpumask.h with 100% similarity]
arch/xtensa/include/asm/cputime.h [moved from include/asm-xtensa/cputime.h with 100% similarity]
arch/xtensa/include/asm/current.h [moved from include/asm-xtensa/current.h with 100% similarity]
arch/xtensa/include/asm/delay.h [moved from include/asm-xtensa/delay.h with 100% similarity]
arch/xtensa/include/asm/device.h [moved from include/asm-xtensa/device.h with 100% similarity]
arch/xtensa/include/asm/div64.h [moved from include/asm-xtensa/div64.h with 100% similarity]
arch/xtensa/include/asm/dma-mapping.h [moved from include/asm-xtensa/dma-mapping.h with 100% similarity]
arch/xtensa/include/asm/dma.h [moved from include/asm-xtensa/dma.h with 100% similarity]
arch/xtensa/include/asm/elf.h [moved from include/asm-xtensa/elf.h with 100% similarity]
arch/xtensa/include/asm/emergency-restart.h [moved from include/asm-xtensa/emergency-restart.h with 100% similarity]
arch/xtensa/include/asm/errno.h [moved from include/asm-xtensa/errno.h with 100% similarity]
arch/xtensa/include/asm/fb.h [moved from include/asm-xtensa/fb.h with 100% similarity]
arch/xtensa/include/asm/fcntl.h [moved from include/asm-xtensa/fcntl.h with 100% similarity]
arch/xtensa/include/asm/futex.h [moved from include/asm-xtensa/futex.h with 100% similarity]
arch/xtensa/include/asm/hardirq.h [moved from include/asm-xtensa/hardirq.h with 100% similarity]
arch/xtensa/include/asm/highmem.h [moved from include/asm-xtensa/highmem.h with 100% similarity]
arch/xtensa/include/asm/hw_irq.h [moved from include/asm-xtensa/hw_irq.h with 100% similarity]
arch/xtensa/include/asm/io.h [moved from include/asm-xtensa/io.h with 100% similarity]
arch/xtensa/include/asm/ioctl.h [moved from include/asm-xtensa/ioctl.h with 100% similarity]
arch/xtensa/include/asm/ioctls.h [moved from include/asm-xtensa/ioctls.h with 100% similarity]
arch/xtensa/include/asm/ipcbuf.h [moved from include/asm-xtensa/ipcbuf.h with 100% similarity]
arch/xtensa/include/asm/irq.h [moved from include/asm-xtensa/irq.h with 89% similarity]
arch/xtensa/include/asm/irq_regs.h [moved from include/asm-xtensa/irq_regs.h with 100% similarity]
arch/xtensa/include/asm/kdebug.h [moved from include/asm-xtensa/kdebug.h with 100% similarity]
arch/xtensa/include/asm/kmap_types.h [moved from include/asm-xtensa/kmap_types.h with 100% similarity]
arch/xtensa/include/asm/linkage.h [moved from include/asm-xtensa/linkage.h with 100% similarity]
arch/xtensa/include/asm/local.h [moved from include/asm-xtensa/local.h with 100% similarity]
arch/xtensa/include/asm/mman.h [moved from include/asm-xtensa/mman.h with 100% similarity]
arch/xtensa/include/asm/mmu.h [moved from include/asm-xtensa/mmu.h with 100% similarity]
arch/xtensa/include/asm/mmu_context.h [moved from include/asm-xtensa/mmu_context.h with 100% similarity]
arch/xtensa/include/asm/module.h [moved from include/asm-xtensa/module.h with 100% similarity]
arch/xtensa/include/asm/msgbuf.h [moved from include/asm-xtensa/msgbuf.h with 100% similarity]
arch/xtensa/include/asm/mutex.h [moved from include/asm-xtensa/mutex.h with 100% similarity]
arch/xtensa/include/asm/page.h [moved from include/asm-xtensa/page.h with 100% similarity]
arch/xtensa/include/asm/param.h [moved from include/asm-xtensa/param.h with 100% similarity]
arch/xtensa/include/asm/pci-bridge.h [moved from include/asm-xtensa/pci-bridge.h with 100% similarity]
arch/xtensa/include/asm/pci.h [moved from include/asm-xtensa/pci.h with 100% similarity]
arch/xtensa/include/asm/percpu.h [moved from include/asm-xtensa/percpu.h with 100% similarity]
arch/xtensa/include/asm/pgalloc.h [moved from include/asm-xtensa/pgalloc.h with 100% similarity]
arch/xtensa/include/asm/pgtable.h [moved from include/asm-xtensa/pgtable.h with 100% similarity]
arch/xtensa/include/asm/platform.h [moved from include/asm-xtensa/platform.h with 98% similarity]
arch/xtensa/include/asm/poll.h [moved from include/asm-xtensa/poll.h with 100% similarity]
arch/xtensa/include/asm/posix_types.h [moved from include/asm-xtensa/posix_types.h with 100% similarity]
arch/xtensa/include/asm/processor.h [moved from include/asm-xtensa/processor.h with 99% similarity]
arch/xtensa/include/asm/ptrace.h [moved from include/asm-xtensa/ptrace.h with 99% similarity]
arch/xtensa/include/asm/regs.h [moved from include/asm-xtensa/regs.h with 100% similarity]
arch/xtensa/include/asm/resource.h [moved from include/asm-xtensa/resource.h with 100% similarity]
arch/xtensa/include/asm/rmap.h [moved from include/asm-xtensa/rmap.h with 100% similarity]
arch/xtensa/include/asm/rwsem.h [moved from include/asm-xtensa/rwsem.h with 100% similarity]
arch/xtensa/include/asm/scatterlist.h [moved from include/asm-xtensa/scatterlist.h with 100% similarity]
arch/xtensa/include/asm/sections.h [moved from include/asm-xtensa/sections.h with 100% similarity]
arch/xtensa/include/asm/segment.h [moved from include/asm-xtensa/segment.h with 100% similarity]
arch/xtensa/include/asm/sembuf.h [moved from include/asm-xtensa/sembuf.h with 100% similarity]
arch/xtensa/include/asm/serial.h [moved from include/asm-xtensa/serial.h with 92% similarity]
arch/xtensa/include/asm/setup.h [moved from include/asm-xtensa/setup.h with 100% similarity]
arch/xtensa/include/asm/shmbuf.h [moved from include/asm-xtensa/shmbuf.h with 100% similarity]
arch/xtensa/include/asm/shmparam.h [moved from include/asm-xtensa/shmparam.h with 100% similarity]
arch/xtensa/include/asm/sigcontext.h [moved from include/asm-xtensa/sigcontext.h with 100% similarity]
arch/xtensa/include/asm/siginfo.h [moved from include/asm-xtensa/siginfo.h with 100% similarity]
arch/xtensa/include/asm/signal.h [moved from include/asm-xtensa/signal.h with 100% similarity]
arch/xtensa/include/asm/smp.h [moved from include/asm-xtensa/smp.h with 100% similarity]
arch/xtensa/include/asm/socket.h [moved from include/asm-xtensa/socket.h with 100% similarity]
arch/xtensa/include/asm/sockios.h [moved from include/asm-xtensa/sockios.h with 100% similarity]
arch/xtensa/include/asm/spinlock.h [moved from include/asm-xtensa/spinlock.h with 100% similarity]
arch/xtensa/include/asm/stat.h [moved from include/asm-xtensa/stat.h with 100% similarity]
arch/xtensa/include/asm/statfs.h [moved from include/asm-xtensa/statfs.h with 100% similarity]
arch/xtensa/include/asm/string.h [moved from include/asm-xtensa/string.h with 100% similarity]
arch/xtensa/include/asm/syscall.h [moved from include/asm-xtensa/syscall.h with 100% similarity]
arch/xtensa/include/asm/system.h [moved from include/asm-xtensa/system.h with 100% similarity]
arch/xtensa/include/asm/termbits.h [moved from include/asm-xtensa/termbits.h with 100% similarity]
arch/xtensa/include/asm/termios.h [moved from include/asm-xtensa/termios.h with 100% similarity]
arch/xtensa/include/asm/thread_info.h [moved from include/asm-xtensa/thread_info.h with 100% similarity]
arch/xtensa/include/asm/timex.h [moved from include/asm-xtensa/timex.h with 100% similarity]
arch/xtensa/include/asm/tlb.h [moved from include/asm-xtensa/tlb.h with 100% similarity]
arch/xtensa/include/asm/tlbflush.h [moved from include/asm-xtensa/tlbflush.h with 100% similarity]
arch/xtensa/include/asm/topology.h [moved from include/asm-xtensa/topology.h with 100% similarity]
arch/xtensa/include/asm/types.h [moved from include/asm-xtensa/types.h with 100% similarity]
arch/xtensa/include/asm/uaccess.h [moved from include/asm-xtensa/uaccess.h with 100% similarity]
arch/xtensa/include/asm/ucontext.h [moved from include/asm-xtensa/ucontext.h with 100% similarity]
arch/xtensa/include/asm/unaligned.h [moved from include/asm-xtensa/unaligned.h with 80% similarity]
arch/xtensa/include/asm/unistd.h [moved from include/asm-xtensa/unistd.h with 100% similarity]
arch/xtensa/include/asm/user.h [moved from include/asm-xtensa/user.h with 100% similarity]
arch/xtensa/include/asm/vga.h [moved from include/asm-xtensa/vga.h with 100% similarity]
arch/xtensa/include/asm/xor.h [moved from include/asm-xtensa/xor.h with 100% similarity]
arch/xtensa/kernel/entry.S
arch/xtensa/kernel/vmlinux.lds.S
arch/xtensa/lib/checksum.S
arch/xtensa/lib/memcopy.S
arch/xtensa/lib/memset.S
arch/xtensa/lib/strncpy_user.S
arch/xtensa/lib/strnlen_user.S
arch/xtensa/lib/usercopy.S
arch/xtensa/platforms/iss/console.c
arch/xtensa/platforms/iss/include/platform/hardware.h [moved from include/asm-xtensa/platform-iss/hardware.h with 100% similarity]
arch/xtensa/platforms/iss/include/platform/simcall.h [moved from include/asm-xtensa/platform-iss/simcall.h with 100% similarity]
arch/xtensa/platforms/iss/io.c
arch/xtensa/platforms/iss/network.c
arch/xtensa/platforms/xt2000/Makefile [new file with mode: 0644]
arch/xtensa/platforms/xt2000/include/platform/hardware.h [new file with mode: 0644]
arch/xtensa/platforms/xt2000/include/platform/serial.h [new file with mode: 0644]
arch/xtensa/platforms/xt2000/setup.c [new file with mode: 0644]
arch/xtensa/variants/dc232b/include/variant/core.h [moved from include/asm-xtensa/variant-dc232b/core.h with 100% similarity]
arch/xtensa/variants/dc232b/include/variant/tie-asm.h [moved from include/asm-xtensa/variant-dc232b/tie-asm.h with 100% similarity]
arch/xtensa/variants/dc232b/include/variant/tie.h [moved from include/asm-xtensa/variant-dc232b/tie.h with 100% similarity]
arch/xtensa/variants/fsf/include/variant/core.h [moved from include/asm-xtensa/variant-fsf/core.h with 100% similarity]
arch/xtensa/variants/fsf/include/variant/tie-asm.h [moved from include/asm-xtensa/variant-fsf/tie-asm.h with 100% similarity]
arch/xtensa/variants/fsf/include/variant/tie.h [moved from include/asm-xtensa/variant-fsf/tie.h with 100% similarity]

index 015b6b2a26b96676eadbae477d68ea4e82ebf340..1da55fe4beff5062cd398fb13b8b25b7d0879410 100644 (file)
@@ -33,6 +33,15 @@ KBUILD_CFLAGS += -ffreestanding
 
 KBUILD_CFLAGS += -pipe -mlongcalls
 
+vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
+plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))
+
+ifeq ($(KBUILD_SRC),)
+KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(vardirs) $(plfdirs))
+else
+KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs))
+endif
+
 KBUILD_DEFCONFIG := iss_defconfig
 
 # ramdisk/initrd support
@@ -66,21 +75,6 @@ libs-y               += arch/xtensa/lib/ $(LIBGCC)
 
 boot           := arch/xtensa/boot
 
-archinc                := include/asm-xtensa
-
-archprepare: $(archinc)/.platform
-
-# Update processor variant and platform symlinks if something which affects
-# them changed.
-
-$(archinc)/.platform: $(wildcard include/config/arch/*.h) include/config/auto.conf
-       @echo '  SYMLINK $(archinc)/variant -> $(archinc)/variant-$(VARIANT)'
-       $(Q)mkdir -p $(archinc)
-       $(Q)ln -fsn $(srctree)/$(archinc)/variant-$(VARIANT) $(archinc)/variant
-       @echo '  SYMLINK $(archinc)/platform -> $(archinc)/platform-$(PLATFORM)'
-       $(Q)ln -fsn $(srctree)/$(archinc)/platform-$(PLATFORM) $(archinc)/platform
-       @touch $@
-
 
 all: zImage
 
@@ -89,10 +83,6 @@ bzImage : zImage
 zImage zImage.initrd: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
 
-CLEAN_FILES    += arch/xtensa/vmlinux.lds                      \
-                  $(archinc)/platform $(archinc)/variant       \
-                  $(archinc)/.platform
-
 define archhelp
   @echo '* zImage      - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
 endef
index 849dfcafd5184a2f1014d153a044c052ff0bc5cc..4e53b74dc44b67f7e873eccae36a1152b3157c94 100644 (file)
@@ -1,4 +1,4 @@
-#include <asm/variant/core.h>
+#include <variant/core.h>
 OUTPUT_ARCH(xtensa)
 ENTRY(_ResetVector)
 
index 84848123e2a8af6d147abb9e78a2b6bbfe372bb6..5582e8cfac8f5162b4113ef286d6cc04d9d10592 100644 (file)
@@ -1,4 +1,4 @@
-#include <asm/variant/core.h>
+#include <variant/core.h>
 #include <asm/regs.h>
 #include <asm/asmmacro.h>
 #include <asm/cacheasm.h>
similarity index 98%
rename from include/asm-xtensa/asmmacro.h
rename to arch/xtensa/include/asm/asmmacro.h
index 76915cabad17ebd95369f36ba0edc1beb04627fa..755320f6e0bcb4b698fe5f8ffcd3d8dc2086bd12 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef _XTENSA_ASMMACRO_H
 #define _XTENSA_ASMMACRO_H
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * Some little helpers for loops. Use zero-overhead-loops
similarity index 82%
rename from include/asm-xtensa/byteorder.h
rename to arch/xtensa/include/asm/byteorder.h
index 765edf17a9a466b5497046c4c78a50185dc83a92..07d10ad364d1b992184f519cf0962530a3e2ea3f 100644 (file)
 #include <asm/types.h>
 #include <linux/compiler.h>
 
-static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
+#ifdef __XTENSA_EL__
+# define __LITTLE_ENDIAN
+#elif defined(__XTENSA_EB__)
+# define __BIG_ENDIAN
+#else
+# error processor byte order undefined!
+#endif
+
+#define __SWAB_64_THRU_32__
+
+static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
 {
     __u32 res;
     /* instruction sequence from Xtensa ISA release 2/2000 */
@@ -28,8 +38,9 @@ static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
            );
     return res;
 }
+#define __arch_swab32 __arch_swab32
 
-static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x)
+static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
 {
     /* Given that 'short' values are signed (i.e., can be negative),
      * we cannot assume that the upper 16-bits of the register are
@@ -62,21 +73,8 @@ static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x)
 
     return res;
 }
+#define __arch_swab16 __arch_swab16
 
-#define __arch__swab32(x) ___arch__swab32(x)
-#define __arch__swab16(x) ___arch__swab16(x)
-
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-#  define __BYTEORDER_HAS_U64__
-#  define __SWAB_64_THRU_32__
-#endif
-
-#ifdef __XTENSA_EL__
-# include <linux/byteorder/little_endian.h>
-#elif defined(__XTENSA_EB__)
-# include <linux/byteorder/big_endian.h>
-#else
-# error processor byte order undefined!
-#endif
+#include <linux/byteorder.h>
 
 #endif /* _XTENSA_BYTEORDER_H */
similarity index 96%
rename from include/asm-xtensa/cache.h
rename to arch/xtensa/include/asm/cache.h
index 3bba2a540cf087009415c58498dc06864336ab5f..f04c9891142fa7a5090d966ac4779b0af419ebca 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef _XTENSA_CACHE_H
 #define _XTENSA_CACHE_H
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 #define L1_CACHE_SHIFT XCHAL_DCACHE_LINEWIDTH
 #define L1_CACHE_BYTES XCHAL_DCACHE_LINESIZE
similarity index 99%
rename from include/asm-xtensa/checksum.h
rename to arch/xtensa/include/asm/checksum.h
index 23534c60b3a4a2878c73fd9aeba76f717bc9c9ef..f84d3f00774ae9805ec7039d307a9dc680629f3b 100644 (file)
@@ -12,7 +12,7 @@
 #define _XTENSA_CHECKSUM_H
 
 #include <linux/in6.h>
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * computes the checksum of a memory block at buff, length len,
similarity index 98%
rename from include/asm-xtensa/coprocessor.h
rename to arch/xtensa/include/asm/coprocessor.h
index 1cbcf9001a41a6068718e3256b90d90b7fe4ce76..65a285d8d3fbafd91a93dbeb6aa8f43dac4b007d 100644 (file)
 #define _XTENSA_COPROCESSOR_H
 
 #include <linux/stringify.h>
-#include <asm/variant/tie.h>
+#include <variant/tie.h>
 #include <asm/types.h>
 
 #ifdef __ASSEMBLY__
-# include <asm/variant/tie-asm.h>
+# include <variant/tie-asm.h>
 
 .macro xchal_sa_start  a b
        .set .Lxchal_pofs_, 0
similarity index 89%
rename from include/asm-xtensa/irq.h
rename to arch/xtensa/include/asm/irq.h
index fc73b7f11aff2c5ad61c7a78024c486293ec24f7..1620d1e0e695a038e8f93535471a9b8ce008a89a 100644 (file)
@@ -11,8 +11,8 @@
 #ifndef _XTENSA_IRQ_H
 #define _XTENSA_IRQ_H
 
-#include <asm/platform/hardware.h>
-#include <asm/variant/core.h>
+#include <platform/hardware.h>
+#include <variant/core.h>
 
 #ifndef PLATFORM_NR_IRQS
 # define PLATFORM_NR_IRQS 0
similarity index 98%
rename from include/asm-xtensa/platform.h
rename to arch/xtensa/include/asm/platform.h
index 48135a9718b0d5f9da79c3098ab5d1538789306a..e3d5a48ad495fb194a635d429984bcc14c7f4841 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * include/asm-xtensa/platform.h
- *
  * Platform specific functions
  *
  * This file is subject to the terms and conditions of the GNU General
similarity index 99%
rename from include/asm-xtensa/processor.h
rename to arch/xtensa/include/asm/processor.h
index 4918a4e96d4234109bfc50e25771107101f7f656..07387d3b99f4c0f09cc8d4b6184c8875c4a6405b 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef _XTENSA_PROCESSOR_H
 #define _XTENSA_PROCESSOR_H
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 #include <asm/coprocessor.h>
 
 #include <linux/compiler.h>
similarity index 99%
rename from include/asm-xtensa/ptrace.h
rename to arch/xtensa/include/asm/ptrace.h
index 089b0db44816f30242a1c6b1db18e1da651855b1..905e1e619654b58ac119fe32f6c6e766b465ffae 100644 (file)
@@ -111,7 +111,7 @@ struct pt_regs {
        unsigned long areg[16];         /* 128 (64) */
 };
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 # define task_pt_regs(tsk) ((struct pt_regs*) \
   (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1)
similarity index 92%
rename from include/asm-xtensa/serial.h
rename to arch/xtensa/include/asm/serial.h
index ec04114fcf0bf1817ded7bde3d9497ae7ce168b5..a8a2493260f6c673a5467d9b56de2857646b972c 100644 (file)
@@ -13,6 +13,6 @@
 #ifndef _XTENSA_SERIAL_H
 #define _XTENSA_SERIAL_H
 
-#include <asm/platform/serial.h>
+#include <platform/serial.h>
 
 #endif /* _XTENSA_SERIAL_H */
similarity index 80%
rename from include/asm-xtensa/unaligned.h
rename to arch/xtensa/include/asm/unaligned.h
index 8f3424fc5d1823df176ebf62662dec2d03b07d5d..8e7ed046bfedbc638adf27432f3edb539f0afe57 100644 (file)
 #ifndef _ASM_XTENSA_UNALIGNED_H
 #define _ASM_XTENSA_UNALIGNED_H
 
-#ifdef __XTENSA_EL__
-# include <linux/unaligned/le_memmove.h>
+#include <asm/byteorder.h>
+
+#ifdef __LITTLE_ENDIAN
+# include <linux/unaligned/le_struct.h>
 # include <linux/unaligned/be_byteshift.h>
 # include <linux/unaligned/generic.h>
 # define get_unaligned __get_unaligned_le
 # define put_unaligned __put_unaligned_le
-#elif defined(__XTENSA_EB__)
-# include <linux/unaligned/be_memmove.h>
+#else
+# include <linux/unaligned/be_struct.h>
 # include <linux/unaligned/le_byteshift.h>
 # include <linux/unaligned/generic.h>
 # define get_unaligned __get_unaligned_be
 # define put_unaligned __put_unaligned_be
-#else
-# error processor byte order undefined!
 #endif
 
 #endif /* _ASM_XTENSA_UNALIGNED_H */
index dfd35dcc1cb553cb9105f5f824250a3b388e40fb..a51d36a27389ff9ebeb213d0707089b82faf421c 100644 (file)
@@ -25,7 +25,7 @@
 #include <asm/page.h>
 #include <asm/signal.h>
 #include <asm/tlbflush.h>
-#include <asm/variant/tie-asm.h>
+#include <variant/tie-asm.h>
 
 /* Unimplemented features. */
 
index 51f4fb6f16f9a4b9f404ed61f3996b03082f9963..d506774f4b05062fb57c999d98873538e582e8d9 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <asm-generic/vmlinux.lds.h>
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 OUTPUT_ARCH(xtensa)
 ENTRY(_start)
 
index 9d9cd990afa6ab0e40e46858cdb9d29977c4ec2c..df397f932d0e0ea28ee84b11a5b0a89c675ff885 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <asm/errno.h>
 #include <linux/linkage.h>
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * computes a partial checksum, e.g. for TCP/UDP fragments
index ddda8f4bc86266d22daec784bd3ff93bb8857bdf..ea59dcd038666da7af3004c68da1eb7d9964d9dd 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright (C) 2002 - 2005 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
        .macro  src_b   r, w0, w1
 #ifdef __XTENSA_EB__
index 56a17495b2db3134c02f224c41b2c7d850e7a21d..10b8c400f175311cf0c9b2742e7faa578d58e98c 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /*
  * void *memset(void *dst, int c, size_t length)
index b2655d94558d8db837e248d09856c3246cfa78e5..9f603cdaaa6839a6820860656fb1f46dab255918 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 #include <linux/errno.h>
 
 /* Load or store instructions that may cause exceptions use the EX macro. */
index ad3f616322caaa31bd54c9a56f87b892d5e0726d..23f2a89816a14bd7a5983a7c2da2aa8d45bc6901 100644 (file)
@@ -11,7 +11,7 @@
  *  Copyright (C) 2002 Tensilica Inc.
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 /* Load or store instructions that may cause exceptions use the EX macro. */
 
index a8ab1d4fe0ae1530026d1cfe6542071c7387cf81..46d60314bb160983a0696bcaf849bb01dda0ff5e 100644 (file)
@@ -53,7 +53,7 @@
  *     a11/ original length
  */
 
-#include <asm/variant/core.h>
+#include <variant/core.h>
 
 #ifdef __XTENSA_EB__
 #define ALIGN(R, W0, W1) src   R, W0, W1
index 9141e369073194115eb5ad06d1f1e22b0d230d9f..efed8897bef323079a3cc10401eaef069c4eaad3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * arch/xtensa/platform-iss/console.c
+ * arch/xtensa/platforms/iss/console.c
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
@@ -24,7 +24,7 @@
 #include <asm/uaccess.h>
 #include <asm/irq.h>
 
-#include <asm/platform/simcall.h>
+#include <platform/simcall.h>
 
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
index 5b161a5cb65feaeeafb5beef36d110449dbf17df..571d0b24f8954beedf5ff18dc68765a6e398946f 100644 (file)
@@ -3,7 +3,7 @@
 #if 0
 
 #include <asm/io.h>
-#include <xtensa/simcall.h>
+#include <platform/platform-iss/simcall.h>
 
 extern int __simc ();
 
index 64f057d89e7302f929e535d9ca3bbcea7867d91d..edad4156d89a2ba30702bfda4f1b3c60dbad14dc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * arch/xtensa/platform-iss/network.c
+ * arch/xtensa/platforms/iss/network.c
  *
  * Platform specific initialization.
  *
@@ -33,7 +33,7 @@
 #include <linux/rtnetlink.h>
 #include <linux/platform_device.h>
 
-#include <asm/platform/simcall.h>
+#include <platform/simcall.h>
 
 #define DRIVER_NAME "iss-netdev"
 #define ETH_MAX_PACKET 1500
diff --git a/arch/xtensa/platforms/xt2000/Makefile b/arch/xtensa/platforms/xt2000/Makefile
new file mode 100644 (file)
index 0000000..54d018e
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# Makefile for the Tensilica XT2000 Emulation Board
+#
+
+obj-y                  = setup.o
diff --git a/arch/xtensa/platforms/xt2000/include/platform/hardware.h b/arch/xtensa/platforms/xt2000/include/platform/hardware.h
new file mode 100644 (file)
index 0000000..41459ad
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * platform/hardware.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 Tensilica Inc.
+ */
+
+/*
+ * This file contains the hardware configuration of the XT2000 board.
+ */
+
+#ifndef _XTENSA_XT2000_HARDWARE_H
+#define _XTENSA_XT2000_HARDWARE_H
+
+#include <variant/core.h>
+#include <asm/io.h>
+
+/* 
+ * Memory configuration.
+ */
+
+#define PLATFORM_DEFAULT_MEM_START 0x00000000
+#define PLATFORM_DEFAULT_MEM_SIZE 0x08000000
+
+/*
+ * Number of platform IRQs
+ */
+#define PLATFORM_NR_IRQS 3
+/*
+ * On-board components.
+ */
+
+#define SONIC83934_INTNUM      XCHAL_EXTINT3_NUM
+#define SONIC83934_ADDR                IOADDR(0x0d030000)
+
+/*
+ * V3-PCI
+ */
+
+/* The XT2000 uses the V3 as a cascaded interrupt controller for the PCI bus */
+
+#define IRQ_PCI_A              (XCHAL_NUM_INTERRUPTS + 0)
+#define IRQ_PCI_B              (XCHAL_NUM_INTERRUPTS + 1)
+#define IRQ_PCI_C              (XCHAL_NUM_INTERRUPTS + 2)
+
+/*
+ * Various other components.
+ */
+
+#define XT2000_LED_ADDR                IOADDR(0x0d040000)
+
+#endif /* _XTENSA_XT2000_HARDWARE_H */
diff --git a/arch/xtensa/platforms/xt2000/include/platform/serial.h b/arch/xtensa/platforms/xt2000/include/platform/serial.h
new file mode 100644 (file)
index 0000000..7226cf7
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * platform/serial.h
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2001 Tensilica Inc.
+ */
+
+#ifndef _XTENSA_XT2000_SERIAL_H
+#define _XTENSA_XT2000_SERIAL_H
+
+#include <variant/core.h>
+#include <asm/io.h>
+
+/*  National-Semi PC16552D DUART:  */
+
+#define DUART16552_1_INTNUM    XCHAL_EXTINT4_NUM
+#define DUART16552_2_INTNUM    XCHAL_EXTINT5_NUM
+
+#define DUART16552_1_ADDR      IOADDR(0x0d050020)      /* channel 1 */
+#define DUART16552_2_ADDR      IOADDR(0x0d050000)      /* channel 2 */
+
+#define DUART16552_XTAL_FREQ   18432000        /* crystal frequency in Hz */
+#define BASE_BAUD ( DUART16552_XTAL_FREQ / 16 )
+
+#endif /* _XTENSA_XT2000_SERIAL_H */
diff --git a/arch/xtensa/platforms/xt2000/setup.c b/arch/xtensa/platforms/xt2000/setup.c
new file mode 100644 (file)
index 0000000..9e83940
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * arch/xtensa/platforms/xt2000/setup.c
+ *
+ * Platform specific functions for the XT2000 board.
+ *
+ * Authors:    Chris Zankel <chris@zankel.net>
+ *             Joe Taylor <joe@tensilica.com>
+ *
+ * Copyright 2001 - 2004 Tensilica Inc.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ */
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/kdev_t.h>
+#include <linux/types.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/stringify.h>
+#include <linux/platform_device.h>
+#include <linux/serial.h>
+#include <linux/serial_8250.h>
+
+#include <asm/processor.h>
+#include <asm/platform.h>
+#include <asm/bootparam.h>
+#include <platform/hardware.h>
+#include <platform/serial.h>
+
+/* Assumes s points to an 8-chr string.  No checking for NULL. */
+
+static void led_print (int f, char *s)
+{
+       unsigned long* led_addr = (unsigned long*) (XT2000_LED_ADDR + 0xE0) + f;
+       int i;
+       for (i = f; i < 8; i++)
+               if ((*led_addr++ = *s++) == 0)
+                   break;
+}
+
+void platform_halt(void)
+{
+       led_print (0, "  HALT  ");
+       local_irq_disable();
+       while (1);
+}
+
+void platform_power_off(void)
+{
+       led_print (0, "POWEROFF");
+       local_irq_disable();
+       while (1);
+}
+
+void platform_restart(void)
+{
+       /* Flush and reset the mmu, simulate a processor reset, and
+        * jump to the reset vector. */
+
+       __asm__ __volatile__ ("movi     a2, 15\n\t"
+                             "wsr      a2, " __stringify(ICOUNTLEVEL) "\n\t"
+                             "movi     a2, 0\n\t"
+                             "wsr      a2, " __stringify(ICOUNT) "\n\t"
+                             "wsr      a2, " __stringify(IBREAKENABLE) "\n\t"
+                             "wsr      a2, " __stringify(LCOUNT) "\n\t"
+                             "movi     a2, 0x1f\n\t"
+                             "wsr      a2, " __stringify(PS) "\n\t"
+                             "isync\n\t"
+                             "jx       %0\n\t"
+                             :
+                             : "a" (XCHAL_RESET_VECTOR_VADDR)
+                             : "a2"
+                             );
+
+       /* control never gets here */
+}
+
+void __init platform_setup(char** cmdline)
+{
+       led_print (0, "LINUX   ");
+}
+
+/* early initialization */
+
+extern sysmem_info_t __initdata sysmem;
+
+void platform_init(bp_tag_t* first)
+{
+       /* Set default memory block if not provided by the bootloader. */
+
+       if (sysmem.nr_banks == 0) {
+               sysmem.nr_banks = 1;
+               sysmem.bank[0].start = PLATFORM_DEFAULT_MEM_START;
+               sysmem.bank[0].end = PLATFORM_DEFAULT_MEM_START
+                                    + PLATFORM_DEFAULT_MEM_SIZE;
+       }
+}
+
+/* Heartbeat. Let the LED blink. */
+
+void platform_heartbeat(void)
+{
+       static int i=0, t = 0;
+
+       if (--t < 0)
+       {
+               t = 59;
+               led_print(7, i ? ".": " ");
+               i ^= 1;
+       }
+}
+
+//#define RS_TABLE_SIZE 2
+//#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
+
+#define _SERIAL_PORT(_base,_irq)                                       \
+{                                                                      \
+       .mapbase        = (_base),                                      \
+       .membase        = (void*)(_base),                               \
+       .irq            = (_irq),                                       \
+       .uartclk        = DUART16552_XTAL_FREQ,                         \
+       .iotype         = UPIO_MEM,                                     \
+       .flags          = UPF_BOOT_AUTOCONF,                            \
+       .regshift       = 2,                                            \
+}
+
+static struct plat_serial8250_port xt2000_serial_data[] = {
+#if XCHAL_HAVE_BE
+       _SERIAL_PORT(DUART16552_1_ADDR + 3, DUART16552_1_INTNUM),
+       _SERIAL_PORT(DUART16552_2_ADDR + 3, DUART16552_2_INTNUM),
+#else
+       _SERIAL_PORT(DUART16552_1_ADDR, DUART16552_1_INTNUM),
+       _SERIAL_PORT(DUART16552_2_ADDR, DUART16552_2_INTNUM),
+#endif
+       { }
+};
+
+static struct platform_device xt2000_serial8250_device = {
+       .name           = "serial8250",
+       .id             = PLAT8250_DEV_PLATFORM,
+       .dev            = {
+           .platform_data = xt2000_serial_data,
+       },
+};
+
+static struct resource xt2000_sonic_res[] = {
+       {
+               .start = SONIC83934_ADDR,
+               .end   = SONIC83934_ADDR + 0xff,
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start = SONIC83934_INTNUM,
+               .end = SONIC83934_INTNUM,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device xt2000_sonic_device = {
+       .name           = "xtsonic",
+       .num_resources  = ARRAY_SIZE(xt2000_sonic_res),
+       .resource               = xt2000_sonic_res,
+};
+
+static int __init xt2000_setup_devinit(void)
+{
+       platform_device_register(&xt2000_serial8250_device);
+       platform_device_register(&xt2000_sonic_device);
+
+       return 0;
+}
+
+device_initcall(xt2000_setup_devinit);