From 206ead28377fee86b129637edada8c77816cc0d6 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Wed, 5 Nov 2008 10:35:31 -0800 Subject: [PATCH 1/5] xtensa: use the new byteorder headers Signed-off-by: Harvey Harrison Signed-off-by: Chris Zankel --- include/asm-xtensa/byteorder.h | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/include/asm-xtensa/byteorder.h b/include/asm-xtensa/byteorder.h index 765edf17a9a..07d10ad364d 100644 --- a/include/asm-xtensa/byteorder.h +++ b/include/asm-xtensa/byteorder.h @@ -14,7 +14,17 @@ #include #include -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 -#elif defined(__XTENSA_EB__) -# include -#else -# error processor byte order undefined! -#endif +#include #endif /* _XTENSA_BYTEORDER_H */ From 367b8112fe2ea5c39a7bb4d263dcdd9b612fae18 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Thu, 6 Nov 2008 06:40:46 -0800 Subject: [PATCH 2/5] xtensa: move headers files to arch/xtensa/include Move all header files for xtensa to arch/xtensa/include and platform and variant header files to the appropriate arch/xtensa/platforms/ and arch/xtensa/variants/ directories. Moving the files gets also rid of all uses of symlinks in the Makefile. This has been completed already for the majority of the architectures and xtensa is one out of six missing. Signed-off-by: Sam Ravnborg Signed-off-by: Chris Zankel --- arch/xtensa/Makefile | 28 ++++++------------- arch/xtensa/boot/boot-elf/boot.lds.S | 2 +- arch/xtensa/boot/boot-redboot/bootstrap.S | 2 +- .../xtensa/include/asm}/Kbuild | 0 .../xtensa/include/asm}/asmmacro.h | 2 +- .../xtensa/include/asm}/atomic.h | 0 .../xtensa/include/asm}/auxvec.h | 0 .../xtensa/include/asm}/bitops.h | 0 .../xtensa/include/asm}/bootparam.h | 0 .../xtensa/include/asm}/bug.h | 0 .../xtensa/include/asm}/bugs.h | 0 .../xtensa/include/asm}/byteorder.h | 0 .../xtensa/include/asm}/cache.h | 2 +- .../xtensa/include/asm}/cacheasm.h | 0 .../xtensa/include/asm}/cacheflush.h | 0 .../xtensa/include/asm}/checksum.h | 2 +- .../xtensa/include/asm}/coprocessor.h | 4 +-- .../xtensa/include/asm}/cpumask.h | 0 .../xtensa/include/asm}/cputime.h | 0 .../xtensa/include/asm}/current.h | 0 .../xtensa/include/asm}/delay.h | 0 .../xtensa/include/asm}/device.h | 0 .../xtensa/include/asm}/div64.h | 0 .../xtensa/include/asm}/dma-mapping.h | 0 .../xtensa/include/asm}/dma.h | 0 .../xtensa/include/asm}/elf.h | 0 .../xtensa/include/asm}/emergency-restart.h | 0 .../xtensa/include/asm}/errno.h | 0 .../xtensa/include/asm}/fb.h | 0 .../xtensa/include/asm}/fcntl.h | 0 .../xtensa/include/asm}/futex.h | 0 .../xtensa/include/asm}/hardirq.h | 0 .../xtensa/include/asm}/highmem.h | 0 .../xtensa/include/asm}/hw_irq.h | 0 .../xtensa/include/asm}/io.h | 0 .../xtensa/include/asm}/ioctl.h | 0 .../xtensa/include/asm}/ioctls.h | 0 .../xtensa/include/asm}/ipcbuf.h | 0 .../xtensa/include/asm}/irq.h | 4 +-- .../xtensa/include/asm}/irq_regs.h | 0 .../xtensa/include/asm}/kdebug.h | 0 .../xtensa/include/asm}/kmap_types.h | 0 .../xtensa/include/asm}/linkage.h | 0 .../xtensa/include/asm}/local.h | 0 .../xtensa/include/asm}/mman.h | 0 .../xtensa/include/asm}/mmu.h | 0 .../xtensa/include/asm}/mmu_context.h | 0 .../xtensa/include/asm}/module.h | 0 .../xtensa/include/asm}/msgbuf.h | 0 .../xtensa/include/asm}/mutex.h | 0 .../xtensa/include/asm}/page.h | 0 .../xtensa/include/asm}/param.h | 0 .../xtensa/include/asm}/pci-bridge.h | 0 .../xtensa/include/asm}/pci.h | 0 .../xtensa/include/asm}/percpu.h | 0 .../xtensa/include/asm}/pgalloc.h | 0 .../xtensa/include/asm}/pgtable.h | 0 .../xtensa/include/asm}/platform.h | 2 -- .../xtensa/include/asm}/poll.h | 0 .../xtensa/include/asm}/posix_types.h | 0 .../xtensa/include/asm}/processor.h | 2 +- .../xtensa/include/asm}/ptrace.h | 2 +- .../xtensa/include/asm}/regs.h | 0 .../xtensa/include/asm}/resource.h | 0 .../xtensa/include/asm}/rmap.h | 0 .../xtensa/include/asm}/rwsem.h | 0 .../xtensa/include/asm}/scatterlist.h | 0 .../xtensa/include/asm}/sections.h | 0 .../xtensa/include/asm}/segment.h | 0 .../xtensa/include/asm}/sembuf.h | 0 .../xtensa/include/asm}/serial.h | 2 +- .../xtensa/include/asm}/setup.h | 0 .../xtensa/include/asm}/shmbuf.h | 0 .../xtensa/include/asm}/shmparam.h | 0 .../xtensa/include/asm}/sigcontext.h | 0 .../xtensa/include/asm}/siginfo.h | 0 .../xtensa/include/asm}/signal.h | 0 .../xtensa/include/asm}/smp.h | 0 .../xtensa/include/asm}/socket.h | 0 .../xtensa/include/asm}/sockios.h | 0 .../xtensa/include/asm}/spinlock.h | 0 .../xtensa/include/asm}/stat.h | 0 .../xtensa/include/asm}/statfs.h | 0 .../xtensa/include/asm}/string.h | 0 .../xtensa/include/asm}/syscall.h | 0 .../xtensa/include/asm}/system.h | 0 .../xtensa/include/asm}/termbits.h | 0 .../xtensa/include/asm}/termios.h | 0 .../xtensa/include/asm}/thread_info.h | 0 .../xtensa/include/asm}/timex.h | 0 .../xtensa/include/asm}/tlb.h | 0 .../xtensa/include/asm}/tlbflush.h | 0 .../xtensa/include/asm}/topology.h | 0 .../xtensa/include/asm}/types.h | 0 .../xtensa/include/asm}/uaccess.h | 0 .../xtensa/include/asm}/ucontext.h | 0 .../xtensa/include/asm}/unaligned.h | 0 .../xtensa/include/asm}/unistd.h | 0 .../xtensa/include/asm}/user.h | 0 .../xtensa/include/asm}/vga.h | 0 .../xtensa/include/asm}/xor.h | 0 arch/xtensa/kernel/entry.S | 2 +- arch/xtensa/kernel/vmlinux.lds.S | 2 +- arch/xtensa/lib/checksum.S | 2 +- arch/xtensa/lib/memcopy.S | 2 +- arch/xtensa/lib/memset.S | 2 +- arch/xtensa/lib/strncpy_user.S | 2 +- arch/xtensa/lib/strnlen_user.S | 2 +- arch/xtensa/lib/usercopy.S | 2 +- arch/xtensa/platforms/iss/console.c | 2 +- .../iss/include/platform}/hardware.h | 0 .../platforms/iss/include/platform}/simcall.h | 0 arch/xtensa/platforms/iss/io.c | 2 +- arch/xtensa/platforms/iss/network.c | 2 +- .../variants/dc232b/include/variant}/core.h | 0 .../dc232b/include/variant}/tie-asm.h | 0 .../variants/dc232b/include/variant}/tie.h | 0 .../variants/fsf/include/variant}/core.h | 0 .../variants/fsf/include/variant}/tie-asm.h | 0 .../variants/fsf/include/variant}/tie.h | 0 120 files changed, 32 insertions(+), 44 deletions(-) rename {include/asm-xtensa => arch/xtensa/include/asm}/Kbuild (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/asmmacro.h (98%) rename {include/asm-xtensa => arch/xtensa/include/asm}/atomic.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/auxvec.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/bitops.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/bootparam.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/bug.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/bugs.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/byteorder.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/cache.h (96%) rename {include/asm-xtensa => arch/xtensa/include/asm}/cacheasm.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/cacheflush.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/checksum.h (99%) rename {include/asm-xtensa => arch/xtensa/include/asm}/coprocessor.h (98%) rename {include/asm-xtensa => arch/xtensa/include/asm}/cpumask.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/cputime.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/current.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/delay.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/device.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/div64.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/dma-mapping.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/dma.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/elf.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/emergency-restart.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/errno.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/fb.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/fcntl.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/futex.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/hardirq.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/highmem.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/hw_irq.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/io.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/ioctl.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/ioctls.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/ipcbuf.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/irq.h (89%) rename {include/asm-xtensa => arch/xtensa/include/asm}/irq_regs.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/kdebug.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/kmap_types.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/linkage.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/local.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/mman.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/mmu.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/mmu_context.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/module.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/msgbuf.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/mutex.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/page.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/param.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/pci-bridge.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/pci.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/percpu.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/pgalloc.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/pgtable.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/platform.h (98%) rename {include/asm-xtensa => arch/xtensa/include/asm}/poll.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/posix_types.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/processor.h (99%) rename {include/asm-xtensa => arch/xtensa/include/asm}/ptrace.h (99%) rename {include/asm-xtensa => arch/xtensa/include/asm}/regs.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/resource.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/rmap.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/rwsem.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/scatterlist.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/sections.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/segment.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/sembuf.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/serial.h (92%) rename {include/asm-xtensa => arch/xtensa/include/asm}/setup.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/shmbuf.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/shmparam.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/sigcontext.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/siginfo.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/signal.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/smp.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/socket.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/sockios.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/spinlock.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/stat.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/statfs.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/string.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/syscall.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/system.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/termbits.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/termios.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/thread_info.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/timex.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/tlb.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/tlbflush.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/topology.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/types.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/uaccess.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/ucontext.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/unaligned.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/unistd.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/user.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/vga.h (100%) rename {include/asm-xtensa => arch/xtensa/include/asm}/xor.h (100%) rename {include/asm-xtensa/platform-iss => arch/xtensa/platforms/iss/include/platform}/hardware.h (100%) rename {include/asm-xtensa/platform-iss => arch/xtensa/platforms/iss/include/platform}/simcall.h (100%) rename {include/asm-xtensa/variant-dc232b => arch/xtensa/variants/dc232b/include/variant}/core.h (100%) rename {include/asm-xtensa/variant-dc232b => arch/xtensa/variants/dc232b/include/variant}/tie-asm.h (100%) rename {include/asm-xtensa/variant-dc232b => arch/xtensa/variants/dc232b/include/variant}/tie.h (100%) rename {include/asm-xtensa/variant-fsf => arch/xtensa/variants/fsf/include/variant}/core.h (100%) rename {include/asm-xtensa/variant-fsf => arch/xtensa/variants/fsf/include/variant}/tie-asm.h (100%) rename {include/asm-xtensa/variant-fsf => arch/xtensa/variants/fsf/include/variant}/tie.h (100%) diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 015b6b2a26b..1da55fe4bef 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile @@ -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 diff --git a/arch/xtensa/boot/boot-elf/boot.lds.S b/arch/xtensa/boot/boot-elf/boot.lds.S index 849dfcafd51..4e53b74dc44 100644 --- a/arch/xtensa/boot/boot-elf/boot.lds.S +++ b/arch/xtensa/boot/boot-elf/boot.lds.S @@ -1,4 +1,4 @@ -#include +#include OUTPUT_ARCH(xtensa) ENTRY(_ResetVector) diff --git a/arch/xtensa/boot/boot-redboot/bootstrap.S b/arch/xtensa/boot/boot-redboot/bootstrap.S index 84848123e2a..5582e8cfac8 100644 --- a/arch/xtensa/boot/boot-redboot/bootstrap.S +++ b/arch/xtensa/boot/boot-redboot/bootstrap.S @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/include/asm-xtensa/Kbuild b/arch/xtensa/include/asm/Kbuild similarity index 100% rename from include/asm-xtensa/Kbuild rename to arch/xtensa/include/asm/Kbuild diff --git a/include/asm-xtensa/asmmacro.h b/arch/xtensa/include/asm/asmmacro.h similarity index 98% rename from include/asm-xtensa/asmmacro.h rename to arch/xtensa/include/asm/asmmacro.h index 76915cabad1..755320f6e0b 100644 --- a/include/asm-xtensa/asmmacro.h +++ b/arch/xtensa/include/asm/asmmacro.h @@ -11,7 +11,7 @@ #ifndef _XTENSA_ASMMACRO_H #define _XTENSA_ASMMACRO_H -#include +#include /* * Some little helpers for loops. Use zero-overhead-loops diff --git a/include/asm-xtensa/atomic.h b/arch/xtensa/include/asm/atomic.h similarity index 100% rename from include/asm-xtensa/atomic.h rename to arch/xtensa/include/asm/atomic.h diff --git a/include/asm-xtensa/auxvec.h b/arch/xtensa/include/asm/auxvec.h similarity index 100% rename from include/asm-xtensa/auxvec.h rename to arch/xtensa/include/asm/auxvec.h diff --git a/include/asm-xtensa/bitops.h b/arch/xtensa/include/asm/bitops.h similarity index 100% rename from include/asm-xtensa/bitops.h rename to arch/xtensa/include/asm/bitops.h diff --git a/include/asm-xtensa/bootparam.h b/arch/xtensa/include/asm/bootparam.h similarity index 100% rename from include/asm-xtensa/bootparam.h rename to arch/xtensa/include/asm/bootparam.h diff --git a/include/asm-xtensa/bug.h b/arch/xtensa/include/asm/bug.h similarity index 100% rename from include/asm-xtensa/bug.h rename to arch/xtensa/include/asm/bug.h diff --git a/include/asm-xtensa/bugs.h b/arch/xtensa/include/asm/bugs.h similarity index 100% rename from include/asm-xtensa/bugs.h rename to arch/xtensa/include/asm/bugs.h diff --git a/include/asm-xtensa/byteorder.h b/arch/xtensa/include/asm/byteorder.h similarity index 100% rename from include/asm-xtensa/byteorder.h rename to arch/xtensa/include/asm/byteorder.h diff --git a/include/asm-xtensa/cache.h b/arch/xtensa/include/asm/cache.h similarity index 96% rename from include/asm-xtensa/cache.h rename to arch/xtensa/include/asm/cache.h index 3bba2a540cf..f04c9891142 100644 --- a/include/asm-xtensa/cache.h +++ b/arch/xtensa/include/asm/cache.h @@ -11,7 +11,7 @@ #ifndef _XTENSA_CACHE_H #define _XTENSA_CACHE_H -#include +#include #define L1_CACHE_SHIFT XCHAL_DCACHE_LINEWIDTH #define L1_CACHE_BYTES XCHAL_DCACHE_LINESIZE diff --git a/include/asm-xtensa/cacheasm.h b/arch/xtensa/include/asm/cacheasm.h similarity index 100% rename from include/asm-xtensa/cacheasm.h rename to arch/xtensa/include/asm/cacheasm.h diff --git a/include/asm-xtensa/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h similarity index 100% rename from include/asm-xtensa/cacheflush.h rename to arch/xtensa/include/asm/cacheflush.h diff --git a/include/asm-xtensa/checksum.h b/arch/xtensa/include/asm/checksum.h similarity index 99% rename from include/asm-xtensa/checksum.h rename to arch/xtensa/include/asm/checksum.h index 23534c60b3a..f84d3f00774 100644 --- a/include/asm-xtensa/checksum.h +++ b/arch/xtensa/include/asm/checksum.h @@ -12,7 +12,7 @@ #define _XTENSA_CHECKSUM_H #include -#include +#include /* * computes the checksum of a memory block at buff, length len, diff --git a/include/asm-xtensa/coprocessor.h b/arch/xtensa/include/asm/coprocessor.h similarity index 98% rename from include/asm-xtensa/coprocessor.h rename to arch/xtensa/include/asm/coprocessor.h index 1cbcf9001a4..65a285d8d3f 100644 --- a/include/asm-xtensa/coprocessor.h +++ b/arch/xtensa/include/asm/coprocessor.h @@ -13,11 +13,11 @@ #define _XTENSA_COPROCESSOR_H #include -#include +#include #include #ifdef __ASSEMBLY__ -# include +# include .macro xchal_sa_start a b .set .Lxchal_pofs_, 0 diff --git a/include/asm-xtensa/cpumask.h b/arch/xtensa/include/asm/cpumask.h similarity index 100% rename from include/asm-xtensa/cpumask.h rename to arch/xtensa/include/asm/cpumask.h diff --git a/include/asm-xtensa/cputime.h b/arch/xtensa/include/asm/cputime.h similarity index 100% rename from include/asm-xtensa/cputime.h rename to arch/xtensa/include/asm/cputime.h diff --git a/include/asm-xtensa/current.h b/arch/xtensa/include/asm/current.h similarity index 100% rename from include/asm-xtensa/current.h rename to arch/xtensa/include/asm/current.h diff --git a/include/asm-xtensa/delay.h b/arch/xtensa/include/asm/delay.h similarity index 100% rename from include/asm-xtensa/delay.h rename to arch/xtensa/include/asm/delay.h diff --git a/include/asm-xtensa/device.h b/arch/xtensa/include/asm/device.h similarity index 100% rename from include/asm-xtensa/device.h rename to arch/xtensa/include/asm/device.h diff --git a/include/asm-xtensa/div64.h b/arch/xtensa/include/asm/div64.h similarity index 100% rename from include/asm-xtensa/div64.h rename to arch/xtensa/include/asm/div64.h diff --git a/include/asm-xtensa/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h similarity index 100% rename from include/asm-xtensa/dma-mapping.h rename to arch/xtensa/include/asm/dma-mapping.h diff --git a/include/asm-xtensa/dma.h b/arch/xtensa/include/asm/dma.h similarity index 100% rename from include/asm-xtensa/dma.h rename to arch/xtensa/include/asm/dma.h diff --git a/include/asm-xtensa/elf.h b/arch/xtensa/include/asm/elf.h similarity index 100% rename from include/asm-xtensa/elf.h rename to arch/xtensa/include/asm/elf.h diff --git a/include/asm-xtensa/emergency-restart.h b/arch/xtensa/include/asm/emergency-restart.h similarity index 100% rename from include/asm-xtensa/emergency-restart.h rename to arch/xtensa/include/asm/emergency-restart.h diff --git a/include/asm-xtensa/errno.h b/arch/xtensa/include/asm/errno.h similarity index 100% rename from include/asm-xtensa/errno.h rename to arch/xtensa/include/asm/errno.h diff --git a/include/asm-xtensa/fb.h b/arch/xtensa/include/asm/fb.h similarity index 100% rename from include/asm-xtensa/fb.h rename to arch/xtensa/include/asm/fb.h diff --git a/include/asm-xtensa/fcntl.h b/arch/xtensa/include/asm/fcntl.h similarity index 100% rename from include/asm-xtensa/fcntl.h rename to arch/xtensa/include/asm/fcntl.h diff --git a/include/asm-xtensa/futex.h b/arch/xtensa/include/asm/futex.h similarity index 100% rename from include/asm-xtensa/futex.h rename to arch/xtensa/include/asm/futex.h diff --git a/include/asm-xtensa/hardirq.h b/arch/xtensa/include/asm/hardirq.h similarity index 100% rename from include/asm-xtensa/hardirq.h rename to arch/xtensa/include/asm/hardirq.h diff --git a/include/asm-xtensa/highmem.h b/arch/xtensa/include/asm/highmem.h similarity index 100% rename from include/asm-xtensa/highmem.h rename to arch/xtensa/include/asm/highmem.h diff --git a/include/asm-xtensa/hw_irq.h b/arch/xtensa/include/asm/hw_irq.h similarity index 100% rename from include/asm-xtensa/hw_irq.h rename to arch/xtensa/include/asm/hw_irq.h diff --git a/include/asm-xtensa/io.h b/arch/xtensa/include/asm/io.h similarity index 100% rename from include/asm-xtensa/io.h rename to arch/xtensa/include/asm/io.h diff --git a/include/asm-xtensa/ioctl.h b/arch/xtensa/include/asm/ioctl.h similarity index 100% rename from include/asm-xtensa/ioctl.h rename to arch/xtensa/include/asm/ioctl.h diff --git a/include/asm-xtensa/ioctls.h b/arch/xtensa/include/asm/ioctls.h similarity index 100% rename from include/asm-xtensa/ioctls.h rename to arch/xtensa/include/asm/ioctls.h diff --git a/include/asm-xtensa/ipcbuf.h b/arch/xtensa/include/asm/ipcbuf.h similarity index 100% rename from include/asm-xtensa/ipcbuf.h rename to arch/xtensa/include/asm/ipcbuf.h diff --git a/include/asm-xtensa/irq.h b/arch/xtensa/include/asm/irq.h similarity index 89% rename from include/asm-xtensa/irq.h rename to arch/xtensa/include/asm/irq.h index fc73b7f11af..1620d1e0e69 100644 --- a/include/asm-xtensa/irq.h +++ b/arch/xtensa/include/asm/irq.h @@ -11,8 +11,8 @@ #ifndef _XTENSA_IRQ_H #define _XTENSA_IRQ_H -#include -#include +#include +#include #ifndef PLATFORM_NR_IRQS # define PLATFORM_NR_IRQS 0 diff --git a/include/asm-xtensa/irq_regs.h b/arch/xtensa/include/asm/irq_regs.h similarity index 100% rename from include/asm-xtensa/irq_regs.h rename to arch/xtensa/include/asm/irq_regs.h diff --git a/include/asm-xtensa/kdebug.h b/arch/xtensa/include/asm/kdebug.h similarity index 100% rename from include/asm-xtensa/kdebug.h rename to arch/xtensa/include/asm/kdebug.h diff --git a/include/asm-xtensa/kmap_types.h b/arch/xtensa/include/asm/kmap_types.h similarity index 100% rename from include/asm-xtensa/kmap_types.h rename to arch/xtensa/include/asm/kmap_types.h diff --git a/include/asm-xtensa/linkage.h b/arch/xtensa/include/asm/linkage.h similarity index 100% rename from include/asm-xtensa/linkage.h rename to arch/xtensa/include/asm/linkage.h diff --git a/include/asm-xtensa/local.h b/arch/xtensa/include/asm/local.h similarity index 100% rename from include/asm-xtensa/local.h rename to arch/xtensa/include/asm/local.h diff --git a/include/asm-xtensa/mman.h b/arch/xtensa/include/asm/mman.h similarity index 100% rename from include/asm-xtensa/mman.h rename to arch/xtensa/include/asm/mman.h diff --git a/include/asm-xtensa/mmu.h b/arch/xtensa/include/asm/mmu.h similarity index 100% rename from include/asm-xtensa/mmu.h rename to arch/xtensa/include/asm/mmu.h diff --git a/include/asm-xtensa/mmu_context.h b/arch/xtensa/include/asm/mmu_context.h similarity index 100% rename from include/asm-xtensa/mmu_context.h rename to arch/xtensa/include/asm/mmu_context.h diff --git a/include/asm-xtensa/module.h b/arch/xtensa/include/asm/module.h similarity index 100% rename from include/asm-xtensa/module.h rename to arch/xtensa/include/asm/module.h diff --git a/include/asm-xtensa/msgbuf.h b/arch/xtensa/include/asm/msgbuf.h similarity index 100% rename from include/asm-xtensa/msgbuf.h rename to arch/xtensa/include/asm/msgbuf.h diff --git a/include/asm-xtensa/mutex.h b/arch/xtensa/include/asm/mutex.h similarity index 100% rename from include/asm-xtensa/mutex.h rename to arch/xtensa/include/asm/mutex.h diff --git a/include/asm-xtensa/page.h b/arch/xtensa/include/asm/page.h similarity index 100% rename from include/asm-xtensa/page.h rename to arch/xtensa/include/asm/page.h diff --git a/include/asm-xtensa/param.h b/arch/xtensa/include/asm/param.h similarity index 100% rename from include/asm-xtensa/param.h rename to arch/xtensa/include/asm/param.h diff --git a/include/asm-xtensa/pci-bridge.h b/arch/xtensa/include/asm/pci-bridge.h similarity index 100% rename from include/asm-xtensa/pci-bridge.h rename to arch/xtensa/include/asm/pci-bridge.h diff --git a/include/asm-xtensa/pci.h b/arch/xtensa/include/asm/pci.h similarity index 100% rename from include/asm-xtensa/pci.h rename to arch/xtensa/include/asm/pci.h diff --git a/include/asm-xtensa/percpu.h b/arch/xtensa/include/asm/percpu.h similarity index 100% rename from include/asm-xtensa/percpu.h rename to arch/xtensa/include/asm/percpu.h diff --git a/include/asm-xtensa/pgalloc.h b/arch/xtensa/include/asm/pgalloc.h similarity index 100% rename from include/asm-xtensa/pgalloc.h rename to arch/xtensa/include/asm/pgalloc.h diff --git a/include/asm-xtensa/pgtable.h b/arch/xtensa/include/asm/pgtable.h similarity index 100% rename from include/asm-xtensa/pgtable.h rename to arch/xtensa/include/asm/pgtable.h diff --git a/include/asm-xtensa/platform.h b/arch/xtensa/include/asm/platform.h similarity index 98% rename from include/asm-xtensa/platform.h rename to arch/xtensa/include/asm/platform.h index 48135a9718b..e3d5a48ad49 100644 --- a/include/asm-xtensa/platform.h +++ b/arch/xtensa/include/asm/platform.h @@ -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 diff --git a/include/asm-xtensa/poll.h b/arch/xtensa/include/asm/poll.h similarity index 100% rename from include/asm-xtensa/poll.h rename to arch/xtensa/include/asm/poll.h diff --git a/include/asm-xtensa/posix_types.h b/arch/xtensa/include/asm/posix_types.h similarity index 100% rename from include/asm-xtensa/posix_types.h rename to arch/xtensa/include/asm/posix_types.h diff --git a/include/asm-xtensa/processor.h b/arch/xtensa/include/asm/processor.h similarity index 99% rename from include/asm-xtensa/processor.h rename to arch/xtensa/include/asm/processor.h index 4918a4e96d4..07387d3b99f 100644 --- a/include/asm-xtensa/processor.h +++ b/arch/xtensa/include/asm/processor.h @@ -11,7 +11,7 @@ #ifndef _XTENSA_PROCESSOR_H #define _XTENSA_PROCESSOR_H -#include +#include #include #include diff --git a/include/asm-xtensa/ptrace.h b/arch/xtensa/include/asm/ptrace.h similarity index 99% rename from include/asm-xtensa/ptrace.h rename to arch/xtensa/include/asm/ptrace.h index 089b0db4481..905e1e61965 100644 --- a/include/asm-xtensa/ptrace.h +++ b/arch/xtensa/include/asm/ptrace.h @@ -111,7 +111,7 @@ struct pt_regs { unsigned long areg[16]; /* 128 (64) */ }; -#include +#include # define task_pt_regs(tsk) ((struct pt_regs*) \ (task_stack_page(tsk) + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4) - 1) diff --git a/include/asm-xtensa/regs.h b/arch/xtensa/include/asm/regs.h similarity index 100% rename from include/asm-xtensa/regs.h rename to arch/xtensa/include/asm/regs.h diff --git a/include/asm-xtensa/resource.h b/arch/xtensa/include/asm/resource.h similarity index 100% rename from include/asm-xtensa/resource.h rename to arch/xtensa/include/asm/resource.h diff --git a/include/asm-xtensa/rmap.h b/arch/xtensa/include/asm/rmap.h similarity index 100% rename from include/asm-xtensa/rmap.h rename to arch/xtensa/include/asm/rmap.h diff --git a/include/asm-xtensa/rwsem.h b/arch/xtensa/include/asm/rwsem.h similarity index 100% rename from include/asm-xtensa/rwsem.h rename to arch/xtensa/include/asm/rwsem.h diff --git a/include/asm-xtensa/scatterlist.h b/arch/xtensa/include/asm/scatterlist.h similarity index 100% rename from include/asm-xtensa/scatterlist.h rename to arch/xtensa/include/asm/scatterlist.h diff --git a/include/asm-xtensa/sections.h b/arch/xtensa/include/asm/sections.h similarity index 100% rename from include/asm-xtensa/sections.h rename to arch/xtensa/include/asm/sections.h diff --git a/include/asm-xtensa/segment.h b/arch/xtensa/include/asm/segment.h similarity index 100% rename from include/asm-xtensa/segment.h rename to arch/xtensa/include/asm/segment.h diff --git a/include/asm-xtensa/sembuf.h b/arch/xtensa/include/asm/sembuf.h similarity index 100% rename from include/asm-xtensa/sembuf.h rename to arch/xtensa/include/asm/sembuf.h diff --git a/include/asm-xtensa/serial.h b/arch/xtensa/include/asm/serial.h similarity index 92% rename from include/asm-xtensa/serial.h rename to arch/xtensa/include/asm/serial.h index ec04114fcf0..a8a2493260f 100644 --- a/include/asm-xtensa/serial.h +++ b/arch/xtensa/include/asm/serial.h @@ -13,6 +13,6 @@ #ifndef _XTENSA_SERIAL_H #define _XTENSA_SERIAL_H -#include +#include #endif /* _XTENSA_SERIAL_H */ diff --git a/include/asm-xtensa/setup.h b/arch/xtensa/include/asm/setup.h similarity index 100% rename from include/asm-xtensa/setup.h rename to arch/xtensa/include/asm/setup.h diff --git a/include/asm-xtensa/shmbuf.h b/arch/xtensa/include/asm/shmbuf.h similarity index 100% rename from include/asm-xtensa/shmbuf.h rename to arch/xtensa/include/asm/shmbuf.h diff --git a/include/asm-xtensa/shmparam.h b/arch/xtensa/include/asm/shmparam.h similarity index 100% rename from include/asm-xtensa/shmparam.h rename to arch/xtensa/include/asm/shmparam.h diff --git a/include/asm-xtensa/sigcontext.h b/arch/xtensa/include/asm/sigcontext.h similarity index 100% rename from include/asm-xtensa/sigcontext.h rename to arch/xtensa/include/asm/sigcontext.h diff --git a/include/asm-xtensa/siginfo.h b/arch/xtensa/include/asm/siginfo.h similarity index 100% rename from include/asm-xtensa/siginfo.h rename to arch/xtensa/include/asm/siginfo.h diff --git a/include/asm-xtensa/signal.h b/arch/xtensa/include/asm/signal.h similarity index 100% rename from include/asm-xtensa/signal.h rename to arch/xtensa/include/asm/signal.h diff --git a/include/asm-xtensa/smp.h b/arch/xtensa/include/asm/smp.h similarity index 100% rename from include/asm-xtensa/smp.h rename to arch/xtensa/include/asm/smp.h diff --git a/include/asm-xtensa/socket.h b/arch/xtensa/include/asm/socket.h similarity index 100% rename from include/asm-xtensa/socket.h rename to arch/xtensa/include/asm/socket.h diff --git a/include/asm-xtensa/sockios.h b/arch/xtensa/include/asm/sockios.h similarity index 100% rename from include/asm-xtensa/sockios.h rename to arch/xtensa/include/asm/sockios.h diff --git a/include/asm-xtensa/spinlock.h b/arch/xtensa/include/asm/spinlock.h similarity index 100% rename from include/asm-xtensa/spinlock.h rename to arch/xtensa/include/asm/spinlock.h diff --git a/include/asm-xtensa/stat.h b/arch/xtensa/include/asm/stat.h similarity index 100% rename from include/asm-xtensa/stat.h rename to arch/xtensa/include/asm/stat.h diff --git a/include/asm-xtensa/statfs.h b/arch/xtensa/include/asm/statfs.h similarity index 100% rename from include/asm-xtensa/statfs.h rename to arch/xtensa/include/asm/statfs.h diff --git a/include/asm-xtensa/string.h b/arch/xtensa/include/asm/string.h similarity index 100% rename from include/asm-xtensa/string.h rename to arch/xtensa/include/asm/string.h diff --git a/include/asm-xtensa/syscall.h b/arch/xtensa/include/asm/syscall.h similarity index 100% rename from include/asm-xtensa/syscall.h rename to arch/xtensa/include/asm/syscall.h diff --git a/include/asm-xtensa/system.h b/arch/xtensa/include/asm/system.h similarity index 100% rename from include/asm-xtensa/system.h rename to arch/xtensa/include/asm/system.h diff --git a/include/asm-xtensa/termbits.h b/arch/xtensa/include/asm/termbits.h similarity index 100% rename from include/asm-xtensa/termbits.h rename to arch/xtensa/include/asm/termbits.h diff --git a/include/asm-xtensa/termios.h b/arch/xtensa/include/asm/termios.h similarity index 100% rename from include/asm-xtensa/termios.h rename to arch/xtensa/include/asm/termios.h diff --git a/include/asm-xtensa/thread_info.h b/arch/xtensa/include/asm/thread_info.h similarity index 100% rename from include/asm-xtensa/thread_info.h rename to arch/xtensa/include/asm/thread_info.h diff --git a/include/asm-xtensa/timex.h b/arch/xtensa/include/asm/timex.h similarity index 100% rename from include/asm-xtensa/timex.h rename to arch/xtensa/include/asm/timex.h diff --git a/include/asm-xtensa/tlb.h b/arch/xtensa/include/asm/tlb.h similarity index 100% rename from include/asm-xtensa/tlb.h rename to arch/xtensa/include/asm/tlb.h diff --git a/include/asm-xtensa/tlbflush.h b/arch/xtensa/include/asm/tlbflush.h similarity index 100% rename from include/asm-xtensa/tlbflush.h rename to arch/xtensa/include/asm/tlbflush.h diff --git a/include/asm-xtensa/topology.h b/arch/xtensa/include/asm/topology.h similarity index 100% rename from include/asm-xtensa/topology.h rename to arch/xtensa/include/asm/topology.h diff --git a/include/asm-xtensa/types.h b/arch/xtensa/include/asm/types.h similarity index 100% rename from include/asm-xtensa/types.h rename to arch/xtensa/include/asm/types.h diff --git a/include/asm-xtensa/uaccess.h b/arch/xtensa/include/asm/uaccess.h similarity index 100% rename from include/asm-xtensa/uaccess.h rename to arch/xtensa/include/asm/uaccess.h diff --git a/include/asm-xtensa/ucontext.h b/arch/xtensa/include/asm/ucontext.h similarity index 100% rename from include/asm-xtensa/ucontext.h rename to arch/xtensa/include/asm/ucontext.h diff --git a/include/asm-xtensa/unaligned.h b/arch/xtensa/include/asm/unaligned.h similarity index 100% rename from include/asm-xtensa/unaligned.h rename to arch/xtensa/include/asm/unaligned.h diff --git a/include/asm-xtensa/unistd.h b/arch/xtensa/include/asm/unistd.h similarity index 100% rename from include/asm-xtensa/unistd.h rename to arch/xtensa/include/asm/unistd.h diff --git a/include/asm-xtensa/user.h b/arch/xtensa/include/asm/user.h similarity index 100% rename from include/asm-xtensa/user.h rename to arch/xtensa/include/asm/user.h diff --git a/include/asm-xtensa/vga.h b/arch/xtensa/include/asm/vga.h similarity index 100% rename from include/asm-xtensa/vga.h rename to arch/xtensa/include/asm/vga.h diff --git a/include/asm-xtensa/xor.h b/arch/xtensa/include/asm/xor.h similarity index 100% rename from include/asm-xtensa/xor.h rename to arch/xtensa/include/asm/xor.h diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S index dfd35dcc1cb..a51d36a2738 100644 --- a/arch/xtensa/kernel/entry.S +++ b/arch/xtensa/kernel/entry.S @@ -25,7 +25,7 @@ #include #include #include -#include +#include /* Unimplemented features. */ diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index 51f4fb6f16f..d506774f4b0 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S @@ -16,7 +16,7 @@ #include -#include +#include OUTPUT_ARCH(xtensa) ENTRY(_start) diff --git a/arch/xtensa/lib/checksum.S b/arch/xtensa/lib/checksum.S index 9d9cd990afa..df397f932d0 100644 --- a/arch/xtensa/lib/checksum.S +++ b/arch/xtensa/lib/checksum.S @@ -16,7 +16,7 @@ #include #include -#include +#include /* * computes a partial checksum, e.g. for TCP/UDP fragments diff --git a/arch/xtensa/lib/memcopy.S b/arch/xtensa/lib/memcopy.S index ddda8f4bc86..ea59dcd0386 100644 --- a/arch/xtensa/lib/memcopy.S +++ b/arch/xtensa/lib/memcopy.S @@ -9,7 +9,7 @@ * Copyright (C) 2002 - 2005 Tensilica Inc. */ -#include +#include .macro src_b r, w0, w1 #ifdef __XTENSA_EB__ diff --git a/arch/xtensa/lib/memset.S b/arch/xtensa/lib/memset.S index 56a17495b2d..10b8c400f17 100644 --- a/arch/xtensa/lib/memset.S +++ b/arch/xtensa/lib/memset.S @@ -11,7 +11,7 @@ * Copyright (C) 2002 Tensilica Inc. */ -#include +#include /* * void *memset(void *dst, int c, size_t length) diff --git a/arch/xtensa/lib/strncpy_user.S b/arch/xtensa/lib/strncpy_user.S index b2655d94558..9f603cdaaa6 100644 --- a/arch/xtensa/lib/strncpy_user.S +++ b/arch/xtensa/lib/strncpy_user.S @@ -11,7 +11,7 @@ * Copyright (C) 2002 Tensilica Inc. */ -#include +#include #include /* Load or store instructions that may cause exceptions use the EX macro. */ diff --git a/arch/xtensa/lib/strnlen_user.S b/arch/xtensa/lib/strnlen_user.S index ad3f616322c..23f2a89816a 100644 --- a/arch/xtensa/lib/strnlen_user.S +++ b/arch/xtensa/lib/strnlen_user.S @@ -11,7 +11,7 @@ * Copyright (C) 2002 Tensilica Inc. */ -#include +#include /* Load or store instructions that may cause exceptions use the EX macro. */ diff --git a/arch/xtensa/lib/usercopy.S b/arch/xtensa/lib/usercopy.S index a8ab1d4fe0a..46d60314bb1 100644 --- a/arch/xtensa/lib/usercopy.S +++ b/arch/xtensa/lib/usercopy.S @@ -53,7 +53,7 @@ * a11/ original length */ -#include +#include #ifdef __XTENSA_EB__ #define ALIGN(R, W0, W1) src R, W0, W1 diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index 9141e369073..c5e5cf9acbe 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/include/asm-xtensa/platform-iss/hardware.h b/arch/xtensa/platforms/iss/include/platform/hardware.h similarity index 100% rename from include/asm-xtensa/platform-iss/hardware.h rename to arch/xtensa/platforms/iss/include/platform/hardware.h diff --git a/include/asm-xtensa/platform-iss/simcall.h b/arch/xtensa/platforms/iss/include/platform/simcall.h similarity index 100% rename from include/asm-xtensa/platform-iss/simcall.h rename to arch/xtensa/platforms/iss/include/platform/simcall.h diff --git a/arch/xtensa/platforms/iss/io.c b/arch/xtensa/platforms/iss/io.c index 5b161a5cb65..571d0b24f89 100644 --- a/arch/xtensa/platforms/iss/io.c +++ b/arch/xtensa/platforms/iss/io.c @@ -3,7 +3,7 @@ #if 0 #include -#include +#include extern int __simc (); diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c index 11a20adc140..79bab341e7b 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c @@ -33,7 +33,7 @@ #include #include -#include +#include #define DRIVER_NAME "iss-netdev" #define ETH_MAX_PACKET 1500 diff --git a/include/asm-xtensa/variant-dc232b/core.h b/arch/xtensa/variants/dc232b/include/variant/core.h similarity index 100% rename from include/asm-xtensa/variant-dc232b/core.h rename to arch/xtensa/variants/dc232b/include/variant/core.h diff --git a/include/asm-xtensa/variant-dc232b/tie-asm.h b/arch/xtensa/variants/dc232b/include/variant/tie-asm.h similarity index 100% rename from include/asm-xtensa/variant-dc232b/tie-asm.h rename to arch/xtensa/variants/dc232b/include/variant/tie-asm.h diff --git a/include/asm-xtensa/variant-dc232b/tie.h b/arch/xtensa/variants/dc232b/include/variant/tie.h similarity index 100% rename from include/asm-xtensa/variant-dc232b/tie.h rename to arch/xtensa/variants/dc232b/include/variant/tie.h diff --git a/include/asm-xtensa/variant-fsf/core.h b/arch/xtensa/variants/fsf/include/variant/core.h similarity index 100% rename from include/asm-xtensa/variant-fsf/core.h rename to arch/xtensa/variants/fsf/include/variant/core.h diff --git a/include/asm-xtensa/variant-fsf/tie-asm.h b/arch/xtensa/variants/fsf/include/variant/tie-asm.h similarity index 100% rename from include/asm-xtensa/variant-fsf/tie-asm.h rename to arch/xtensa/variants/fsf/include/variant/tie-asm.h diff --git a/include/asm-xtensa/variant-fsf/tie.h b/arch/xtensa/variants/fsf/include/variant/tie.h similarity index 100% rename from include/asm-xtensa/variant-fsf/tie.h rename to arch/xtensa/variants/fsf/include/variant/tie.h From 8fa5723aa7e053d498336b48448b292fc2e0458b Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Thu, 6 Nov 2008 10:17:46 -0800 Subject: [PATCH 3/5] xtensa: Add xt2000 support files. The last check-in to support the xt2000 development platform was missing some files. Signed-off-by: Chris Zankel --- arch/xtensa/platforms/xt2000/Makefile | 5 + .../xt2000/include/platform/hardware.h | 55 ++++++ .../xt2000/include/platform/serial.h | 28 +++ arch/xtensa/platforms/xt2000/setup.c | 181 ++++++++++++++++++ 4 files changed, 269 insertions(+) create mode 100644 arch/xtensa/platforms/xt2000/Makefile create mode 100644 arch/xtensa/platforms/xt2000/include/platform/hardware.h create mode 100644 arch/xtensa/platforms/xt2000/include/platform/serial.h create mode 100644 arch/xtensa/platforms/xt2000/setup.c diff --git a/arch/xtensa/platforms/xt2000/Makefile b/arch/xtensa/platforms/xt2000/Makefile new file mode 100644 index 00000000000..54d018e45bf --- /dev/null +++ b/arch/xtensa/platforms/xt2000/Makefile @@ -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 index 00000000000..41459ad0776 --- /dev/null +++ b/arch/xtensa/platforms/xt2000/include/platform/hardware.h @@ -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 +#include + +/* + * 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 index 00000000000..7226cf732b4 --- /dev/null +++ b/arch/xtensa/platforms/xt2000/include/platform/serial.h @@ -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 +#include + +/* 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 index 00000000000..9e83940ac26 --- /dev/null +++ b/arch/xtensa/platforms/xt2000/setup.c @@ -0,0 +1,181 @@ +/* + * arch/xtensa/platforms/xt2000/setup.c + * + * Platform specific functions for the XT2000 board. + * + * Authors: Chris Zankel + * Joe Taylor + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +/* 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); From 91a15026eb89a687dfcac860a969cfd872f3c94f Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sun, 9 Nov 2008 18:51:09 -0800 Subject: [PATCH 4/5] xtensa: switch to packed struct unaligned access implementation Rely on byteorder.h checking for endianness. Signed-off-by: Harvey Harrison Signed-off-by: Chris Zankel --- arch/xtensa/include/asm/unaligned.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/xtensa/include/asm/unaligned.h b/arch/xtensa/include/asm/unaligned.h index 8f3424fc5d1..8e7ed046bfe 100644 --- a/arch/xtensa/include/asm/unaligned.h +++ b/arch/xtensa/include/asm/unaligned.h @@ -10,20 +10,20 @@ #ifndef _ASM_XTENSA_UNALIGNED_H #define _ASM_XTENSA_UNALIGNED_H -#ifdef __XTENSA_EL__ -# include +#include + +#ifdef __LITTLE_ENDIAN +# include # include # include # define get_unaligned __get_unaligned_le # define put_unaligned __put_unaligned_le -#elif defined(__XTENSA_EB__) -# include +#else +# include # include # include # define get_unaligned __get_unaligned_be # define put_unaligned __put_unaligned_be -#else -# error processor byte order undefined! #endif #endif /* _ASM_XTENSA_UNALIGNED_H */ From 5fee325e7d2bcbebf1cb38b4ff3a7aa3744c43e3 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Thu, 4 Dec 2008 09:21:20 -0800 Subject: [PATCH 5/5] xtensa: Update platform files to reflect new location of the header files. Change 367b8112fe2ea5c39a7bb4d263dcdd9b612fae18 moved the platform specific header files to arch/xtensa/platforms//include/platform. These two file weren't updated. Signed-off-by: Chris Zankel --- arch/xtensa/platforms/iss/console.c | 4 ++-- arch/xtensa/platforms/iss/network.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index c5e5cf9acbe..efed8897bef 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c @@ -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 #include -#include +#include #include #include diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c index 79bab341e7b..4eb36fd0f93 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c @@ -1,6 +1,6 @@ /* * - * arch/xtensa/platform-iss/network.c + * arch/xtensa/platforms/iss/network.c * * Platform specific initialization. * @@ -33,7 +33,7 @@ #include #include -#include +#include #define DRIVER_NAME "iss-netdev" #define ETH_MAX_PACKET 1500