Skip to content

Commit

Permalink
Merge tag 'xtensa-next-20121008' of git://github.com/czankel/xtensa-l…
Browse files Browse the repository at this point in the history
…inux

Pull Xtensa patchset from Chris Zankel:
 "The Xtensa tree has been broken for some time now, and this patchset
  brings it back to life.  It has been part of the linux-next tree for
  some time.

  Most changes are inside the xtensa subdirectory; the other changes
  mostly add another rule to already existing #ifdefs to exclude Xtensa,
  where required.  The only 'common' change is to add two more sections
  ('.xt.prop' and '.xt.lit') to the white list in modpost."

* tag 'xtensa-next-20121008' of git://github.com/czankel/xtensa-linux: (27 commits)
  xtensa: Setup CROSS_COMPILE at the top
  xtensa: drop CONFIG_EMBEDDED_RAMDISK
  xtensa: fix TIOCGSERIAL and TIOCSSERIAL definitions
  xtensa: provide dummy gcc intrinsics
  xtensa: add missing symbol exports
  parport: disable for xtensa arch
  xtensa: rename MISC SR definition to avoid name clashes
  hisax: disable build for big-endian xtensa
  xtensa: fix CODA build
  xtensa: fix parallel make
  xtensa: ISS: drop unused io.c
  xtensa: ISS: exit simulator in case of halt or poweroff
  xtensa: ISS: change keyboard polling rate
  xtensa: ISS: add platform_pcibios_init
  xtensa: ISS: add dummy serial.h for ISS platform
  xtensa: change default platform clock frequency to 10MHz
  xtensa: add ARCH_WANT_OPTIONAL_GPIOLIB to xtensa config
  xtensa: set NO_IOPORT to 'n' by default
  xtensa: adopt generic io routines
  xtensa: fix ioremap
  ...
  • Loading branch information
Linus Torvalds committed Oct 9, 2012
2 parents dea77cc + 70cefe7 commit 1ea4f4f
Show file tree
Hide file tree
Showing 34 changed files with 169 additions and 476 deletions.
2 changes: 2 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7170,6 +7170,8 @@ F: drivers/char/tlclk.c

TENSILICA XTENSA PORT (xtensa)
M: Chris Zankel <chris@zankel.net>
M: Max Filippov <jcmvbkbc@gmail.com>
L: linux-xtensa@linux-xtensa.org
S: Maintained
F: arch/xtensa/

Expand Down
23 changes: 5 additions & 18 deletions arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ config XTENSA
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES
select MODULES_USE_ELF_RELA
select GENERIC_PCI_IOMAP
select ARCH_WANT_OPTIONAL_GPIOLIB
help
Xtensa processors are 32-bit RISC machines designed by Tensilica
primarily for embedded systems. These processors are both
Expand All @@ -35,7 +38,7 @@ config ARCH_HAS_ILOG2_U64
def_bool n

config NO_IOPORT
def_bool y
def_bool n

config HZ
int
Expand Down Expand Up @@ -142,6 +145,7 @@ config XTENSA_PLATFORM_XT2000
config XTENSA_PLATFORM_S6105
bool "S6105"
select SERIAL_CONSOLE
select NO_IOPORT

endchoice

Expand Down Expand Up @@ -205,23 +209,6 @@ source "drivers/Kconfig"

source "fs/Kconfig"

menu "Xtensa initrd options"
depends on BLK_DEV_INITRD

config EMBEDDED_RAMDISK
bool "Embed root filesystem ramdisk into the kernel"

config EMBEDDED_RAMDISK_IMAGE
string "Filename of gzipped ramdisk image"
depends on EMBEDDED_RAMDISK
default "ramdisk.gz"
help
This is the filename of the ramdisk image to be built into the
kernel. Relative pathnames are relative to arch/xtensa/boot/ramdisk/.
The ramdisk image is not part of the kernel distribution; you must
provide one yourself.
endmenu

source "arch/xtensa/Kconfig.debug"

source "security/Kconfig"
Expand Down
34 changes: 14 additions & 20 deletions arch/xtensa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom
VARIANT = $(variant-y)
export VARIANT

# Test for cross compiling

ifneq ($(VARIANT),)
COMPILE_ARCH = $(shell uname -m)

ifneq ($(COMPILE_ARCH), xtensa)
ifndef CROSS_COMPILE
CROSS_COMPILE = xtensa_$(VARIANT)-
endif
endif
endif

# Platform configuration

platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
Expand All @@ -31,7 +43,7 @@ PLATFORM = $(platform-y)
export PLATFORM

# temporarily until string.h is fixed
KBUILD_CFLAGS += -ffreestanding
KBUILD_CFLAGS += -ffreestanding -D__linux__

KBUILD_CFLAGS += -pipe -mlongcalls

Expand All @@ -48,24 +60,6 @@ endif

KBUILD_DEFCONFIG := iss_defconfig

# ramdisk/initrd support
# You need a compressed ramdisk image, named ramdisk.gz in
# arch/xtensa/boot/ramdisk

core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/

# Test for cross compiling

ifneq ($(VARIANT),)
COMPILE_ARCH = $(shell uname -m)

ifneq ($(COMPILE_ARCH), xtensa)
ifndef CROSS_COMPILE
CROSS_COMPILE = xtensa_$(VARIANT)-
endif
endif
endif

# Only build variant and/or platform if it includes a Makefile

buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
Expand All @@ -87,7 +81,7 @@ all: zImage

bzImage : zImage

zImage zImage.initrd: vmlinux
zImage: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $@

define archhelp
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf


zImage zImage.initrd Image Image.initrd: $(bootdir-y)
zImage Image: $(bootdir-y)

$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
$(addprefix $(obj)/,$(host-progs))
Expand Down
24 changes: 4 additions & 20 deletions arch/xtensa/boot/boot-elf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,18 @@ boot-y := bootstrap.o

OBJS := $(addprefix $(obj)/,$(boot-y))

Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
vmlinux.tmp: vmlinux
$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
vmlinux vmlinux.tmp
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section image=vmlinux.tmp \
--set-section-flags image=contents,alloc,load,load,data \
$(OBJS) $@.tmp
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
-T arch/$(ARCH)/boot/boot-elf/boot.lds \
-o arch/$(ARCH)/boot/$@.elf $@.tmp
rm -f $@.tmp vmlinux.tmp
$^ $@

Image.initrd: vmlinux $(OBJS)
$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
--add-section .initrd=arch/$(ARCH)/boot/ramdisk \
--set-section-flags .initrd=contents,alloc,load,load,data \
vmlinux vmlinux.tmp
Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section image=vmlinux.tmp \
--set-section-flags image=contents,alloc,load,load,data \
$(OBJS) $@.tmp
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
-T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \
-T arch/$(ARCH)/boot/boot-elf/boot.lds \
-o arch/$(ARCH)/boot/$@.elf $@.tmp
rm -f $@.tmp vmlinux.tmp


zImage: Image

zImage.initrd: Image.initrd

7 changes: 0 additions & 7 deletions arch/xtensa/boot/boot-elf/boot.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ SECTIONS

__reloc_end = . ;

.initrd ALIGN(0x10) :
{
boot_initrd_start = . ;
*(.initrd)
boot_initrd_end = .;
}

. = ALIGN(0x10);
__image_load = . ;
.image 0xd0001000:
Expand Down
12 changes: 7 additions & 5 deletions arch/xtensa/boot/boot-redboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a

LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

zImage: vmlinux $(OBJS) $(LIBS)
vmlinux.tmp: vmlinux
$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
vmlinux vmlinux.tmp
gzip -vf9 vmlinux.tmp
$^ $@

vmlinux.tmp.gz: vmlinux.tmp
$(GZIP) $(GZIP_FLAGS) $^ > $@

zImage: vmlinux.tmp.gz $(OBJS) $(LIBS)
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section image=vmlinux.tmp.gz \
--set-section-flags image=contents,alloc,load,load,data \
$(OBJS) $@.tmp
$(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC)
$(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/$@.redboot
rm -f $@.tmp $@.elf vmlinux.tmp.gz

7 changes: 0 additions & 7 deletions arch/xtensa/boot/boot-redboot/boot.ld
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ SECTIONS

__reloc_end = . ;

.initrd ALIGN(0x10) :
{
boot_initrd_start = . ;
*(.initrd)
boot_initrd_end = .;
}

. = ALIGN(0x10);
__image_load = . ;
.image 0xd0001000: AT(__image_load)
Expand Down
10 changes: 0 additions & 10 deletions arch/xtensa/boot/boot-redboot/bootstrap.S
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,7 @@ _reloc:

isync

movi a5, __start
movi a3, boot_initrd_start
movi a4, boot_initrd_end
sub a3, a3, a5
sub a4, a4, a5
add a3, a0, a3
add a4, a0, a4

# a2 Boot parameter list
# a3 initrd_start (virtual load address)
# a4 initrd_end (virtual load address)

movi a0, _image_start
jx a0
Expand Down
23 changes: 0 additions & 23 deletions arch/xtensa/boot/ramdisk/Makefile

This file was deleted.

5 changes: 0 additions & 5 deletions arch/xtensa/configs/s6105_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -540,11 +540,6 @@ CONFIG_MSDOS_PARTITION=y
# CONFIG_NLS is not set
# CONFIG_DLM is not set

#
# Xtensa initrd options
#
# CONFIG_EMBEDDED_RAMDISK is not set

#
# Kernel hacking
#
Expand Down
Loading

0 comments on commit 1ea4f4f

Please sign in to comment.