Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Linus Torvalds committed Jan 7, 2009
2 parents a0e280e + 5fee325 commit 52fefce
Show file tree
Hide file tree
Showing 124 changed files with 324 additions and 69 deletions.
28 changes: 9 additions & 19 deletions arch/xtensa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/boot/boot-elf/boot.lds.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <asm/variant/core.h>
#include <variant/core.h>
OUTPUT_ARCH(xtensa)
ENTRY(_ResetVector)

Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/boot/boot-redboot/bootstrap.S
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@
#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 */
Expand All @@ -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
Expand Down Expand Up @@ -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 */
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions include/asm-xtensa/irq.h → arch/xtensa/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
#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 */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -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. */

Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <asm-generic/vmlinux.lds.h>

#include <asm/variant/core.h>
#include <variant/core.h>
OUTPUT_ARCH(xtensa)
ENTRY(_start)

Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/checksum.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/memcopy.S
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/memset.S
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/strncpy_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/strnlen_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -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. */

Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/usercopy.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions arch/xtensa/platforms/iss/console.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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>
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion arch/xtensa/platforms/iss/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#if 0

#include <asm/io.h>
#include <xtensa/simcall.h>
#include <platform/platform-iss/simcall.h>

extern int __simc ();

Expand Down
4 changes: 2 additions & 2 deletions arch/xtensa/platforms/iss/network.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* arch/xtensa/platform-iss/network.c
* arch/xtensa/platforms/iss/network.c
*
* Platform specific initialization.
*
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions arch/xtensa/platforms/xt2000/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# Makefile for the Tensilica XT2000 Emulation Board
#

obj-y = setup.o
Loading

0 comments on commit 52fefce

Please sign in to comment.