Skip to content

Commit 1ea4f4f

Browse files
committed
Merge tag 'xtensa-next-20121008' of git://github.com/czankel/xtensa-linux
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 ...
2 parents dea77cc + 70cefe7 commit 1ea4f4f

34 files changed

Lines changed: 169 additions & 476 deletions

File tree

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7170,6 +7170,8 @@ F: drivers/char/tlclk.c
71707170

71717171
TENSILICA XTENSA PORT (xtensa)
71727172
M: Chris Zankel <chris@zankel.net>
7173+
M: Max Filippov <jcmvbkbc@gmail.com>
7174+
L: linux-xtensa@linux-xtensa.org
71737175
S: Maintained
71747176
F: arch/xtensa/
71757177

arch/xtensa/Kconfig

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ config XTENSA
1111
select HAVE_GENERIC_HARDIRQS
1212
select GENERIC_IRQ_SHOW
1313
select GENERIC_CPU_DEVICES
14+
select MODULES_USE_ELF_RELA
15+
select GENERIC_PCI_IOMAP
16+
select ARCH_WANT_OPTIONAL_GPIOLIB
1417
help
1518
Xtensa processors are 32-bit RISC machines designed by Tensilica
1619
primarily for embedded systems. These processors are both
@@ -35,7 +38,7 @@ config ARCH_HAS_ILOG2_U64
3538
def_bool n
3639

3740
config NO_IOPORT
38-
def_bool y
41+
def_bool n
3942

4043
config HZ
4144
int
@@ -142,6 +145,7 @@ config XTENSA_PLATFORM_XT2000
142145
config XTENSA_PLATFORM_S6105
143146
bool "S6105"
144147
select SERIAL_CONSOLE
148+
select NO_IOPORT
145149

146150
endchoice
147151

@@ -205,23 +209,6 @@ source "drivers/Kconfig"
205209

206210
source "fs/Kconfig"
207211

208-
menu "Xtensa initrd options"
209-
depends on BLK_DEV_INITRD
210-
211-
config EMBEDDED_RAMDISK
212-
bool "Embed root filesystem ramdisk into the kernel"
213-
214-
config EMBEDDED_RAMDISK_IMAGE
215-
string "Filename of gzipped ramdisk image"
216-
depends on EMBEDDED_RAMDISK
217-
default "ramdisk.gz"
218-
help
219-
This is the filename of the ramdisk image to be built into the
220-
kernel. Relative pathnames are relative to arch/xtensa/boot/ramdisk/.
221-
The ramdisk image is not part of the kernel distribution; you must
222-
provide one yourself.
223-
endmenu
224-
225212
source "arch/xtensa/Kconfig.debug"
226213

227214
source "security/Kconfig"

arch/xtensa/Makefile

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom
2121
VARIANT = $(variant-y)
2222
export VARIANT
2323

24+
# Test for cross compiling
25+
26+
ifneq ($(VARIANT),)
27+
COMPILE_ARCH = $(shell uname -m)
28+
29+
ifneq ($(COMPILE_ARCH), xtensa)
30+
ifndef CROSS_COMPILE
31+
CROSS_COMPILE = xtensa_$(VARIANT)-
32+
endif
33+
endif
34+
endif
35+
2436
# Platform configuration
2537

2638
platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
@@ -31,7 +43,7 @@ PLATFORM = $(platform-y)
3143
export PLATFORM
3244

3345
# temporarily until string.h is fixed
34-
KBUILD_CFLAGS += -ffreestanding
46+
KBUILD_CFLAGS += -ffreestanding -D__linux__
3547

3648
KBUILD_CFLAGS += -pipe -mlongcalls
3749

@@ -48,24 +60,6 @@ endif
4860

4961
KBUILD_DEFCONFIG := iss_defconfig
5062

51-
# ramdisk/initrd support
52-
# You need a compressed ramdisk image, named ramdisk.gz in
53-
# arch/xtensa/boot/ramdisk
54-
55-
core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
56-
57-
# Test for cross compiling
58-
59-
ifneq ($(VARIANT),)
60-
COMPILE_ARCH = $(shell uname -m)
61-
62-
ifneq ($(COMPILE_ARCH), xtensa)
63-
ifndef CROSS_COMPILE
64-
CROSS_COMPILE = xtensa_$(VARIANT)-
65-
endif
66-
endif
67-
endif
68-
6963
# Only build variant and/or platform if it includes a Makefile
7064

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

8882
bzImage : zImage
8983

90-
zImage zImage.initrd: vmlinux
84+
zImage: vmlinux
9185
$(Q)$(MAKE) $(build)=$(boot) $@
9286

9387
define archhelp

arch/xtensa/boot/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
2525
bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf
2626

2727

28-
zImage zImage.initrd Image Image.initrd: $(bootdir-y)
28+
zImage Image: $(bootdir-y)
2929

3030
$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
3131
$(addprefix $(obj)/,$(host-progs))

arch/xtensa/boot/boot-elf/Makefile

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,18 @@ boot-y := bootstrap.o
2020

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

23-
Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
23+
vmlinux.tmp: vmlinux
2424
$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
25-
vmlinux vmlinux.tmp
26-
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
27-
--add-section image=vmlinux.tmp \
28-
--set-section-flags image=contents,alloc,load,load,data \
29-
$(OBJS) $@.tmp
30-
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
31-
-T arch/$(ARCH)/boot/boot-elf/boot.lds \
32-
-o arch/$(ARCH)/boot/$@.elf $@.tmp
33-
rm -f $@.tmp vmlinux.tmp
25+
$^ $@
3426

35-
Image.initrd: vmlinux $(OBJS)
36-
$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
37-
--add-section .initrd=arch/$(ARCH)/boot/ramdisk \
38-
--set-section-flags .initrd=contents,alloc,load,load,data \
39-
vmlinux vmlinux.tmp
27+
Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
4028
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
4129
--add-section image=vmlinux.tmp \
4230
--set-section-flags image=contents,alloc,load,load,data \
4331
$(OBJS) $@.tmp
4432
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
45-
-T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \
33+
-T arch/$(ARCH)/boot/boot-elf/boot.lds \
4634
-o arch/$(ARCH)/boot/$@.elf $@.tmp
47-
rm -f $@.tmp vmlinux.tmp
48-
4935

5036
zImage: Image
5137

52-
zImage.initrd: Image.initrd
53-

arch/xtensa/boot/boot-elf/boot.lds.S

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ SECTIONS
3333

3434
__reloc_end = . ;
3535

36-
.initrd ALIGN(0x10) :
37-
{
38-
boot_initrd_start = . ;
39-
*(.initrd)
40-
boot_initrd_end = .;
41-
}
42-
4336
. = ALIGN(0x10);
4437
__image_load = . ;
4538
.image 0xd0001000:

arch/xtensa/boot/boot-redboot/Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ LIBS := arch/xtensa/boot/lib/lib.a arch/xtensa/lib/lib.a
2121

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

24-
zImage: vmlinux $(OBJS) $(LIBS)
24+
vmlinux.tmp: vmlinux
2525
$(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
26-
vmlinux vmlinux.tmp
27-
gzip -vf9 vmlinux.tmp
26+
$^ $@
27+
28+
vmlinux.tmp.gz: vmlinux.tmp
29+
$(GZIP) $(GZIP_FLAGS) $^ > $@
30+
31+
zImage: vmlinux.tmp.gz $(OBJS) $(LIBS)
2832
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
2933
--add-section image=vmlinux.tmp.gz \
3034
--set-section-flags image=contents,alloc,load,load,data \
3135
$(OBJS) $@.tmp
3236
$(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC)
3337
$(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/$@.redboot
34-
rm -f $@.tmp $@.elf vmlinux.tmp.gz
35-

arch/xtensa/boot/boot-redboot/boot.ld

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ SECTIONS
3131

3232
__reloc_end = . ;
3333

34-
.initrd ALIGN(0x10) :
35-
{
36-
boot_initrd_start = . ;
37-
*(.initrd)
38-
boot_initrd_end = .;
39-
}
40-
4134
. = ALIGN(0x10);
4235
__image_load = . ;
4336
.image 0xd0001000: AT(__image_load)

arch/xtensa/boot/boot-redboot/bootstrap.S

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,7 @@ _reloc:
226226

227227
isync
228228

229-
movi a5, __start
230-
movi a3, boot_initrd_start
231-
movi a4, boot_initrd_end
232-
sub a3, a3, a5
233-
sub a4, a4, a5
234-
add a3, a0, a3
235-
add a4, a0, a4
236-
237229
# a2 Boot parameter list
238-
# a3 initrd_start (virtual load address)
239-
# a4 initrd_end (virtual load address)
240230

241231
movi a0, _image_start
242232
jx a0

arch/xtensa/boot/ramdisk/Makefile

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)