-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQc6WkAAoJEI9vqH3mFV2s+S8P/0cQ2xBgjNQBNsdSMuUAnlla
 km54KLyzcT/FEDgLN7LGJqnCHhDEem6swQjsOnUlvnF+4jr/LTCvjY/SbLYiD+8E
 ahOo+YYhLuY9Vyv+V1TO7y1VcQw11+xZOunm10f89myaodXY9jO/pt16N/TTYg+O
 a24viZDrDR+Q+BR4bIQe4ySKNuT2mmFmO3jP6F1iL/Cin8nXl+4UwY3fqyNRfnhH
 p0UngGxQvzgWDyYqBus2DJbRAjudEpoKVBE+8y2ABFanFTQ3pYoFxeROPA9Uup/S
 o/kv8bIKJSQMlEcoviE3oNyK56QyeJe+H0VsZi5gLvOAauAsAeneY6MD/5MsNIej
 9phJa1LDjobZ3AqaQFcHUZDzMHMVdp0DR7zCOjdVxan0+kC/JK4tAdBD8mwkYWco
 Nt0w986k16hSa3u43q5ArdDxnePOkgN63hc+GhCgvsYWcqV3xEBGbMlUls46zwjR
 4ouPCJ+c92NzLHAnylx3Zti5hHbmeNgKrC8kCm1PXZ9XG8OP3Emw97TFQkf+JVYG
 Xsj6RhK8ZLg8atI+nNkpnVByo5ecJaFkIPJnUS3DqEk4AoQiYP1CRDTPy0eF6wIR
 qvyRyudhkdO6FSUBw4aBnEEhlhsgYdwcfI+obk2to9vtLCFKsfPtlVD7G7UDpCmT
 pQO7yVhEMsKuq29+FOLS
 =14Zt
 -----END PGP SIGNATURE-----

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
  ...
This commit is contained in:
Linus Torvalds 2012-10-09 16:11:46 +09:00
Родитель dea77ccdc9 70cefe7654
Коммит 1ea4f4f840
34 изменённых файлов: 171 добавлений и 478 удалений

Просмотреть файл

@ -7170,6 +7170,8 @@ F: drivers/char/tlclk.c
TENSILICA XTENSA PORT (xtensa) TENSILICA XTENSA PORT (xtensa)
M: Chris Zankel <chris@zankel.net> M: Chris Zankel <chris@zankel.net>
M: Max Filippov <jcmvbkbc@gmail.com>
L: linux-xtensa@linux-xtensa.org
S: Maintained S: Maintained
F: arch/xtensa/ F: arch/xtensa/

Просмотреть файл

@ -11,6 +11,9 @@ config XTENSA
select HAVE_GENERIC_HARDIRQS select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES select GENERIC_CPU_DEVICES
select MODULES_USE_ELF_RELA
select GENERIC_PCI_IOMAP
select ARCH_WANT_OPTIONAL_GPIOLIB
help help
Xtensa processors are 32-bit RISC machines designed by Tensilica Xtensa processors are 32-bit RISC machines designed by Tensilica
primarily for embedded systems. These processors are both primarily for embedded systems. These processors are both
@ -35,7 +38,7 @@ config ARCH_HAS_ILOG2_U64
def_bool n def_bool n
config NO_IOPORT config NO_IOPORT
def_bool y def_bool n
config HZ config HZ
int int
@ -142,6 +145,7 @@ config XTENSA_PLATFORM_XT2000
config XTENSA_PLATFORM_S6105 config XTENSA_PLATFORM_S6105
bool "S6105" bool "S6105"
select SERIAL_CONSOLE select SERIAL_CONSOLE
select NO_IOPORT
endchoice endchoice
@ -205,23 +209,6 @@ source "drivers/Kconfig"
source "fs/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 "arch/xtensa/Kconfig.debug"
source "security/Kconfig" source "security/Kconfig"

Просмотреть файл

@ -21,6 +21,18 @@ variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom
VARIANT = $(variant-y) VARIANT = $(variant-y)
export VARIANT 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 configuration
platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000
@ -31,7 +43,7 @@ PLATFORM = $(platform-y)
export PLATFORM export PLATFORM
# temporarily until string.h is fixed # temporarily until string.h is fixed
KBUILD_CFLAGS += -ffreestanding KBUILD_CFLAGS += -ffreestanding -D__linux__
KBUILD_CFLAGS += -pipe -mlongcalls KBUILD_CFLAGS += -pipe -mlongcalls
@ -48,24 +60,6 @@ endif
KBUILD_DEFCONFIG := iss_defconfig 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 # 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)/) buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/)
@ -87,7 +81,7 @@ all: zImage
bzImage : zImage bzImage : zImage
zImage zImage.initrd: vmlinux zImage: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $@ $(Q)$(MAKE) $(build)=$(boot) $@
define archhelp define archhelp

Просмотреть файл

@ -25,7 +25,7 @@ bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot 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)) \ $(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
$(addprefix $(obj)/,$(host-progs)) $(addprefix $(obj)/,$(host-progs))

Просмотреть файл

@ -20,9 +20,11 @@ boot-y := bootstrap.o
OBJS := $(addprefix $(obj)/,$(boot-y)) 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 \ $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
vmlinux vmlinux.tmp $^ $@
Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
--add-section image=vmlinux.tmp \ --add-section image=vmlinux.tmp \
--set-section-flags image=contents,alloc,load,load,data \ --set-section-flags image=contents,alloc,load,load,data \
@ -30,24 +32,6 @@ Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
$(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
-T arch/$(ARCH)/boot/boot-elf/boot.lds \ -T arch/$(ARCH)/boot/boot-elf/boot.lds \
-o arch/$(ARCH)/boot/$@.elf $@.tmp -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
$(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 \
-o arch/$(ARCH)/boot/$@.elf $@.tmp
rm -f $@.tmp vmlinux.tmp
zImage: Image zImage: Image
zImage.initrd: Image.initrd

Просмотреть файл

@ -33,13 +33,6 @@ SECTIONS
__reloc_end = . ; __reloc_end = . ;
.initrd ALIGN(0x10) :
{
boot_initrd_start = . ;
*(.initrd)
boot_initrd_end = .;
}
. = ALIGN(0x10); . = ALIGN(0x10);
__image_load = . ; __image_load = . ;
.image 0xd0001000: .image 0xd0001000:

Просмотреть файл

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

Просмотреть файл

@ -31,13 +31,6 @@ SECTIONS
__reloc_end = . ; __reloc_end = . ;
.initrd ALIGN(0x10) :
{
boot_initrd_start = . ;
*(.initrd)
boot_initrd_end = .;
}
. = ALIGN(0x10); . = ALIGN(0x10);
__image_load = . ; __image_load = . ;
.image 0xd0001000: AT(__image_load) .image 0xd0001000: AT(__image_load)

Просмотреть файл

@ -226,17 +226,7 @@ _reloc:
isync 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 # a2 Boot parameter list
# a3 initrd_start (virtual load address)
# a4 initrd_end (virtual load address)
movi a0, _image_start movi a0, _image_start
jx a0 jx a0

Просмотреть файл

@ -1,23 +0,0 @@
#
# Makefile for a ramdisk image
#
BIG_ENDIAN := $(shell echo -e "\#ifdef __XTENSA_EL__\nint little;\n\#else\nint big;\n\#endif" | $(CC) -E -|grep -c big)
ifeq ($(BIG_ENDIAN),1)
OBJCOPY_ARGS := -O elf32-xtensa-be
else
OBJCOPY_ARGS := -O elf32-xtensa-le
endif
obj-y = ramdisk.o
RAMDISK_IMAGE = arch/$(ARCH)/boot/ramdisk/$(CONFIG_EMBEDDED_RAMDISK_IMAGE)
arch/$(ARCH)/boot/ramdisk/ramdisk.o:
$(Q)echo -e "dummy:" | $(AS) -o $@;
$(Q)$(OBJCOPY) $(OBJCOPY_ARGS) \
--add-section .initrd=$(RAMDISK_IMAGE) \
--set-section-flags .initrd=contents,alloc,load,load,data \
arch/$(ARCH)/boot/ramdisk/ramdisk.o $@

Просмотреть файл

@ -540,11 +540,6 @@ CONFIG_MSDOS_PARTITION=y
# CONFIG_NLS is not set # CONFIG_NLS is not set
# CONFIG_DLM is not set # CONFIG_DLM is not set
#
# Xtensa initrd options
#
# CONFIG_EMBEDDED_RAMDISK is not set
# #
# Kernel hacking # Kernel hacking
# #

Просмотреть файл

@ -25,184 +25,54 @@
#define XCHAL_KIO_SIZE 0x10000000 #define XCHAL_KIO_SIZE 0x10000000
#define IOADDR(x) (XCHAL_KIO_BYPASS_VADDR + (x)) #define IOADDR(x) (XCHAL_KIO_BYPASS_VADDR + (x))
#define IO_SPACE_LIMIT ~0
#ifdef CONFIG_MMU
/* /*
* swap functions to change byte order from little-endian to big-endian and * Return the virtual address for the specified bus memory.
* vice versa.
*/
static inline unsigned short _swapw (unsigned short v)
{
return (v << 8) | (v >> 8);
}
static inline unsigned int _swapl (unsigned int v)
{
return (v << 24) | ((v & 0xff00) << 8) | ((v >> 8) & 0xff00) | (v >> 24);
}
/*
* Change virtual addresses to physical addresses and vv.
* These are trivial on the 1:1 Linux/Xtensa mapping
*/
static inline unsigned long virt_to_phys(volatile void * address)
{
return __pa(address);
}
static inline void * phys_to_virt(unsigned long address)
{
return __va(address);
}
/*
* virt_to_bus and bus_to_virt are deprecated.
*/
#define virt_to_bus(x) virt_to_phys(x)
#define bus_to_virt(x) phys_to_virt(x)
/*
* Return the virtual (cached) address for the specified bus memory.
* Note that we currently don't support any address outside the KIO segment. * Note that we currently don't support any address outside the KIO segment.
*/ */
static inline void __iomem *ioremap_nocache(unsigned long offset,
static inline void *ioremap(unsigned long offset, unsigned long size) unsigned long size)
{ {
#ifdef CONFIG_MMU
if (offset >= XCHAL_KIO_PADDR if (offset >= XCHAL_KIO_PADDR
&& offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE) && offset - XCHAL_KIO_PADDR < XCHAL_KIO_SIZE)
return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR); return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR);
else else
BUG(); BUG();
#else
return (void *)offset;
#endif
} }
static inline void *ioremap_nocache(unsigned long offset, unsigned long size) static inline void __iomem *ioremap_cache(unsigned long offset,
unsigned long size)
{ {
#ifdef CONFIG_MMU
if (offset >= XCHAL_KIO_PADDR if (offset >= XCHAL_KIO_PADDR
&& offset < XCHAL_KIO_PADDR + XCHAL_KIO_SIZE) && offset - XCHAL_KIO_PADDR < XCHAL_KIO_SIZE)
return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR); return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR);
else else
BUG(); BUG();
#else
return (void *)offset;
#endif
} }
static inline void iounmap(void *addr) #define ioremap_wc ioremap_nocache
static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
{
return ioremap_nocache(offset, size);
}
static inline void iounmap(volatile void __iomem *addr)
{ {
} }
#endif /* CONFIG_MMU */
/* /*
* Generic I/O * Generic I/O
*/ */
#define readb_relaxed readb
#define readb(addr) \ #define readw_relaxed readw
({ unsigned char __v = (*(volatile unsigned char *)(addr)); __v; }) #define readl_relaxed readl
#define readw(addr) \
({ unsigned short __v = (*(volatile unsigned short *)(addr)); __v; })
#define readl(addr) \
({ unsigned int __v = (*(volatile unsigned int *)(addr)); __v; })
#define writeb(b, addr) (void)((*(volatile unsigned char *)(addr)) = (b))
#define writew(b, addr) (void)((*(volatile unsigned short *)(addr)) = (b))
#define writel(b, addr) (void)((*(volatile unsigned int *)(addr)) = (b))
static inline __u8 __raw_readb(const volatile void __iomem *addr)
{
return *(__force volatile __u8 *)(addr);
}
static inline __u16 __raw_readw(const volatile void __iomem *addr)
{
return *(__force volatile __u16 *)(addr);
}
static inline __u32 __raw_readl(const volatile void __iomem *addr)
{
return *(__force volatile __u32 *)(addr);
}
static inline void __raw_writeb(__u8 b, volatile void __iomem *addr)
{
*(__force volatile __u8 *)(addr) = b;
}
static inline void __raw_writew(__u16 b, volatile void __iomem *addr)
{
*(__force volatile __u16 *)(addr) = b;
}
static inline void __raw_writel(__u32 b, volatile void __iomem *addr)
{
*(__force volatile __u32 *)(addr) = b;
}
/* These are the definitions for the x86 IO instructions
* inb/inw/inl/outb/outw/outl, the "string" versions
* insb/insw/insl/outsb/outsw/outsl, and the "pausing" versions
* inb_p/inw_p/...
* The macros don't do byte-swapping.
*/
#define inb(port) readb((u8 *)((port)))
#define outb(val, port) writeb((val),(u8 *)((unsigned long)(port)))
#define inw(port) readw((u16 *)((port)))
#define outw(val, port) writew((val),(u16 *)((unsigned long)(port)))
#define inl(port) readl((u32 *)((port)))
#define outl(val, port) writel((val),(u32 *)((unsigned long)(port)))
#define inb_p(port) inb((port))
#define outb_p(val, port) outb((val), (port))
#define inw_p(port) inw((port))
#define outw_p(val, port) outw((val), (port))
#define inl_p(port) inl((port))
#define outl_p(val, port) outl((val), (port))
extern void insb (unsigned long port, void *dst, unsigned long count);
extern void insw (unsigned long port, void *dst, unsigned long count);
extern void insl (unsigned long port, void *dst, unsigned long count);
extern void outsb (unsigned long port, const void *src, unsigned long count);
extern void outsw (unsigned long port, const void *src, unsigned long count);
extern void outsl (unsigned long port, const void *src, unsigned long count);
#define IO_SPACE_LIMIT ~0
#define memset_io(a,b,c) memset((void *)(a),(b),(c))
#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
/* At this point the Xtensa doesn't provide byte swap instructions */
#ifdef __XTENSA_EB__
# define in_8(addr) (*(u8*)(addr))
# define in_le16(addr) _swapw(*(u16*)(addr))
# define in_le32(addr) _swapl(*(u32*)(addr))
# define out_8(b, addr) *(u8*)(addr) = (b)
# define out_le16(b, addr) *(u16*)(addr) = _swapw(b)
# define out_le32(b, addr) *(u32*)(addr) = _swapl(b)
#elif defined(__XTENSA_EL__)
# define in_8(addr) (*(u8*)(addr))
# define in_le16(addr) (*(u16*)(addr))
# define in_le32(addr) (*(u32*)(addr))
# define out_8(b, addr) *(u8*)(addr) = (b)
# define out_le16(b, addr) *(u16*)(addr) = (b)
# define out_le32(b, addr) *(u32*)(addr) = (b)
#else
# error processor byte order undefined!
#endif
/*
* Convert a physical pointer to a virtual kernel pointer for /dev/mem access
*/
#define xlate_dev_mem_ptr(p) __va(p)
/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#include <asm-generic/io.h>
#endif /* _XTENSA_IO_H */ #endif /* _XTENSA_IO_H */

Просмотреть файл

@ -71,8 +71,8 @@
#define TIOCSSOFTCAR _IOW('T', 26, unsigned int) #define TIOCSSOFTCAR _IOW('T', 26, unsigned int)
#define TIOCLINUX _IOW('T', 28, char) #define TIOCLINUX _IOW('T', 28, char)
#define TIOCCONS _IO('T', 29) #define TIOCCONS _IO('T', 29)
#define TIOCGSERIAL _IOR('T', 30, struct serial_struct) #define TIOCGSERIAL 0x803C541E /*_IOR('T', 30, struct serial_struct)*/
#define TIOCSSERIAL _IOW('T', 31, struct serial_struct) #define TIOCSSERIAL 0x403C541F /*_IOW('T', 31, struct serial_struct)*/
#define TIOCPKT _IOW('T', 32, int) #define TIOCPKT _IOW('T', 32, int)
# define TIOCPKT_DATA 0 # define TIOCPKT_DATA 0
# define TIOCPKT_FLUSHREAD 1 # define TIOCPKT_FLUSHREAD 1

Просмотреть файл

@ -66,7 +66,7 @@
#define ICOUNTLEVEL 237 #define ICOUNTLEVEL 237
#define EXCVADDR 238 #define EXCVADDR 238
#define CCOMPARE 240 #define CCOMPARE 240
#define MISC 244 #define MISC_SR 244
/* Special names for read-only and write-only interrupt registers. */ /* Special names for read-only and write-only interrupt registers. */

Просмотреть файл

@ -6,7 +6,7 @@ extra-y := head.o vmlinux.lds
obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o \ obj-y := align.o entry.o irq.o coprocessor.o process.o ptrace.o \
setup.o signal.o syscall.o time.o traps.o vectors.o platform.o \ setup.o signal.o syscall.o time.o traps.o vectors.o platform.o \
pci-dma.o io.o pci-dma.o
obj-$(CONFIG_KGDB) += xtensa-stub.o obj-$(CONFIG_KGDB) += xtensa-stub.o
obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_PCI) += pci.o
@ -24,6 +24,7 @@ obj-$(CONFIG_MODULES) += xtensa_ksyms.o module.o
# Replicate rules in scripts/Makefile.build # Replicate rules in scripts/Makefile.build
sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \ sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \
-e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \
-e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g' -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g'
quiet_cmd__cpp_lds_S = LDS $@ quiet_cmd__cpp_lds_S = LDS $@

Просмотреть файл

@ -1,75 +0,0 @@
/*
* arch/xtensa/io.c
*
* IO primitives
*
* 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.
*
* Copied from sparc.
*
* Chris Zankel <chris@zankel.net>
*
*/
#include <asm/io.h>
#include <asm/byteorder.h>
void outsb(unsigned long addr, const void *src, unsigned long count) {
while (count) {
count -= 1;
writeb(*(const char *)src, addr);
src += 1;
addr += 1;
}
}
void outsw(unsigned long addr, const void *src, unsigned long count) {
while (count) {
count -= 2;
writew(*(const short *)src, addr);
src += 2;
addr += 2;
}
}
void outsl(unsigned long addr, const void *src, unsigned long count) {
while (count) {
count -= 4;
writel(*(const long *)src, addr);
src += 4;
addr += 4;
}
}
void insb(unsigned long addr, void *dst, unsigned long count) {
while (count) {
count -= 1;
*(unsigned char *)dst = readb(addr);
dst += 1;
addr += 1;
}
}
void insw(unsigned long addr, void *dst, unsigned long count) {
while (count) {
count -= 2;
*(unsigned short *)dst = readw(addr);
dst += 2;
addr += 2;
}
}
void insl(unsigned long addr, void *dst, unsigned long count) {
while (count) {
count -= 4;
/*
* XXX I am sure we are in for an unaligned trap here.
*/
*(unsigned long *)dst = readl(addr);
dst += 4;
addr += 4;
}
}

Просмотреть файл

@ -84,12 +84,12 @@ static void xtensa_irq_unmask(struct irq_data *d)
static void xtensa_irq_enable(struct irq_data *d) static void xtensa_irq_enable(struct irq_data *d)
{ {
variant_irq_enable(d->irq); variant_irq_enable(d->irq);
xtensa_irq_unmask(d->irq); xtensa_irq_unmask(d);
} }
static void xtensa_irq_disable(struct irq_data *d) static void xtensa_irq_disable(struct irq_data *d)
{ {
xtensa_irq_mask(d->irq); xtensa_irq_mask(d);
variant_irq_disable(d->irq); variant_irq_disable(d->irq);
} }

Просмотреть файл

@ -21,6 +21,7 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/module.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
@ -62,6 +63,7 @@ dma_alloc_coherent(struct device *dev,size_t size,dma_addr_t *handle,gfp_t flag)
return (void*)uncached; return (void*)uncached;
} }
EXPORT_SYMBOL(dma_alloc_coherent);
void dma_free_coherent(struct device *hwdev, size_t size, void dma_free_coherent(struct device *hwdev, size_t size,
void *vaddr, dma_addr_t dma_handle) void *vaddr, dma_addr_t dma_handle)
@ -73,6 +75,7 @@ void dma_free_coherent(struct device *hwdev, size_t size,
free_pages(addr, get_order(size)); free_pages(addr, get_order(size));
} }
EXPORT_SYMBOL(dma_free_coherent);
void consistent_sync(void *vaddr, size_t size, int direction) void consistent_sync(void *vaddr, size_t size, int direction)
@ -92,3 +95,4 @@ void consistent_sync(void *vaddr, size_t size, int direction)
break; break;
} }
} }
EXPORT_SYMBOL(consistent_sync);

Просмотреть файл

@ -333,7 +333,7 @@ __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma,
int prot = pgprot_val(vma->vm_page_prot); int prot = pgprot_val(vma->vm_page_prot);
/* Set to write-through */ /* Set to write-through */
prot &= ~_PAGE_NO_CACHE; prot = (prot & _PAGE_CA_MASK) | _PAGE_CA_WT;
#if 0 #if 0
if (!write_combine) if (!write_combine)
prot |= _PAGE_WRITETHRU; prot |= _PAGE_WRITETHRU;

Просмотреть файл

@ -40,8 +40,8 @@ _F(int, pcibios_fixup, (void), { return 0; });
#ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT #ifdef CONFIG_XTENSA_CALIBRATE_CCOUNT
_F(void, calibrate_ccount, (void), _F(void, calibrate_ccount, (void),
{ {
printk ("ERROR: Cannot calibrate cpu frequency! Assuming 100MHz.\n"); pr_err("ERROR: Cannot calibrate cpu frequency! Assuming 10MHz.\n");
ccount_per_jiffy = 100 * (1000000UL/HZ); ccount_per_jiffy = 10 * (1000000UL/HZ);
}); });
#endif #endif

Просмотреть файл

@ -60,8 +60,6 @@ struct rtc_ops *rtc_ops;
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
extern void *initrd_start; extern void *initrd_start;
extern void *initrd_end; extern void *initrd_end;
extern void *__initrd_start;
extern void *__initrd_end;
int initrd_is_mapped = 0; int initrd_is_mapped = 0;
extern int initrd_below_start_ok; extern int initrd_below_start_ok;
#endif #endif
@ -79,10 +77,6 @@ static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
sysmem_info_t __initdata sysmem; sysmem_info_t __initdata sysmem;
#ifdef CONFIG_BLK_DEV_INITRD
int initrd_is_mapped;
#endif
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
extern void init_mmu(void); extern void init_mmu(void);
#else #else
@ -197,12 +191,6 @@ static int __init parse_bootparam(const bp_tag_t* tag)
void __init init_arch(bp_tag_t *bp_start) void __init init_arch(bp_tag_t *bp_start)
{ {
#ifdef CONFIG_BLK_DEV_INITRD
initrd_start = &__initrd_start;
initrd_end = &__initrd_end;
#endif
sysmem.nr_banks = 0; sysmem.nr_banks = 0;
#ifdef CONFIG_CMDLINE_BOOL #ifdef CONFIG_CMDLINE_BOOL

Просмотреть файл

@ -222,11 +222,6 @@ SECTIONS
. = ALIGN(0x10); . = ALIGN(0x10);
.bootstrap : { *(.bootstrap.literal .bootstrap.text .bootstrap.data) } .bootstrap : { *(.bootstrap.literal .bootstrap.text .bootstrap.data) }
. = ALIGN(0x1000);
__initrd_start = .;
.initrd : { *(.initrd) }
__initrd_end = .;
.ResetVector.text XCHAL_RESET_VECTOR_VADDR : .ResetVector.text XCHAL_RESET_VECTOR_VADDR :
{ {
*(.ResetVector.text) *(.ResetVector.text)

Просмотреть файл

@ -39,8 +39,12 @@
EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memmove); EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(__strncpy_user);
EXPORT_SYMBOL(clear_page);
EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(empty_zero_page);
/* /*
* gcc internal math functions * gcc internal math functions
@ -56,6 +60,7 @@ extern unsigned int __udivsi3(unsigned int, unsigned int);
extern unsigned int __umodsi3(unsigned int, unsigned int); extern unsigned int __umodsi3(unsigned int, unsigned int);
extern unsigned long long __umoddi3(unsigned long long, unsigned long long); extern unsigned long long __umoddi3(unsigned long long, unsigned long long);
extern unsigned long long __udivdi3(unsigned long long, unsigned long long); extern unsigned long long __udivdi3(unsigned long long, unsigned long long);
extern int __ucmpdi2(int, int);
EXPORT_SYMBOL(__ashldi3); EXPORT_SYMBOL(__ashldi3);
EXPORT_SYMBOL(__ashrdi3); EXPORT_SYMBOL(__ashrdi3);
@ -68,11 +73,31 @@ EXPORT_SYMBOL(__udivsi3);
EXPORT_SYMBOL(__umodsi3); EXPORT_SYMBOL(__umodsi3);
EXPORT_SYMBOL(__udivdi3); EXPORT_SYMBOL(__udivdi3);
EXPORT_SYMBOL(__umoddi3); EXPORT_SYMBOL(__umoddi3);
EXPORT_SYMBOL(__ucmpdi2);
void __xtensa_libgcc_window_spill(void)
{
BUG();
}
EXPORT_SYMBOL(__xtensa_libgcc_window_spill);
unsigned long __sync_fetch_and_and_4(unsigned long *p, unsigned long v)
{
BUG();
}
EXPORT_SYMBOL(__sync_fetch_and_and_4);
unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
{
BUG();
}
EXPORT_SYMBOL(__sync_fetch_and_or_4);
#ifdef CONFIG_NET #ifdef CONFIG_NET
/* /*
* Networking support * Networking support
*/ */
EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_generic); EXPORT_SYMBOL(csum_partial_copy_generic);
#endif /* CONFIG_NET */ #endif /* CONFIG_NET */

Просмотреть файл

@ -4,5 +4,5 @@
# "prom monitor" library routines under Linux. # "prom monitor" library routines under Linux.
# #
obj-y = io.o console.o setup.o network.o obj-y = console.o setup.o
obj-$(CONFIG_NET) += network.o

Просмотреть файл

@ -33,7 +33,7 @@
#endif #endif
#define SERIAL_MAX_NUM_LINES 1 #define SERIAL_MAX_NUM_LINES 1
#define SERIAL_TIMER_VALUE (20 * HZ) #define SERIAL_TIMER_VALUE (HZ / 10)
static struct tty_driver *serial_driver; static struct tty_driver *serial_driver;
static struct tty_port serial_port; static struct tty_port serial_port;
@ -41,19 +41,6 @@ static struct timer_list serial_timer;
static DEFINE_SPINLOCK(timer_lock); static DEFINE_SPINLOCK(timer_lock);
int errno;
static int __simc (int a, int b, int c, int d, int e, int f) __attribute__((__noinline__));
static int __simc (int a, int b, int c, int d, int e, int f)
{
int ret;
__asm__ __volatile__ ("simcall\n"
"mov %0, a2\n"
"mov %1, a3\n" : "=a" (ret), "=a" (errno)
: : "a2", "a3");
return ret;
}
static char *serial_version = "0.1"; static char *serial_version = "0.1";
static char *serial_name = "ISS serial driver"; static char *serial_name = "ISS serial driver";

Просмотреть файл

Просмотреть файл

@ -57,6 +57,59 @@
#define XTISS_SELECT_ONE_WRITE 2 #define XTISS_SELECT_ONE_WRITE 2
#define XTISS_SELECT_ONE_EXCEPT 3 #define XTISS_SELECT_ONE_EXCEPT 3
static int errno;
static inline int __simc(int a, int b, int c, int d, int e, int f)
{
int ret;
register int a1 asm("a2") = a;
register int b1 asm("a3") = b;
register int c1 asm("a4") = c;
register int d1 asm("a5") = d;
register int e1 asm("a6") = e;
register int f1 asm("a7") = f;
__asm__ __volatile__ (
"simcall\n"
"mov %0, a2\n"
"mov %1, a3\n"
: "=a" (ret), "=a" (errno), "+r"(a1), "+r"(b1)
: "r"(c1), "r"(d1), "r"(e1), "r"(f1)
: );
return ret;
}
static inline int simc_open(char *file, int flags, int mode)
{
return __simc(SYS_open, (int) file, flags, mode, 0, 0);
}
static inline int simc_close(int fd)
{
return __simc(SYS_close, fd, 0, 0, 0, 0);
}
static inline int simc_ioctl(int fd, int request, void *arg)
{
return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0);
}
static inline int simc_read(int fd, void *buf, size_t count)
{
return __simc(SYS_read, fd, (int) buf, count, 0, 0);
}
static inline int simc_write(int fd, void *buf, size_t count)
{
return __simc(SYS_write, fd, (int) buf, count, 0, 0);
}
static inline int simc_poll(int fd)
{
struct timeval tv = { .tv_sec = 0, .tv_usec = 0 };
return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv,
0, 0);
}
#endif /* _XTENSA_PLATFORM_ISS_SIMCALL_H */ #endif /* _XTENSA_PLATFORM_ISS_SIMCALL_H */

Просмотреть файл

@ -1,32 +0,0 @@
/* This file isn't really needed right now. */
#if 0
#include <asm/io.h>
#include <platform/platform-iss/simcall.h>
extern int __simc ();
char iss_serial_getc()
{
char c;
__simc( SYS_read, 0, &c, 1 );
return c;
}
void iss_serial_putc( char c )
{
__simc( SYS_write, 1, &c, 1 );
}
void iss_serial_puts( char *s )
{
if( s != 0 && *s != 0 )
__simc( SYS_write, 1, s, strlen(s) );
}
/*#error Need I/O ports to specific hardware!*/
#endif

Просмотреть файл

@ -101,55 +101,6 @@ struct iss_net_private {
}; };
/* ======================= ISS SIMCALL INTERFACE =========================== */
/* Note: __simc must _not_ be declared inline! */
static int errno;
static int __simc (int a, int b, int c, int d, int e, int f) __attribute__((__noinline__));
static int __simc (int a, int b, int c, int d, int e, int f)
{
int ret;
__asm__ __volatile__ ("simcall\n"
"mov %0, a2\n"
"mov %1, a3\n" : "=a" (ret), "=a" (errno)
: : "a2", "a3");
return ret;
}
static int inline simc_open(char *file, int flags, int mode)
{
return __simc(SYS_open, (int) file, flags, mode, 0, 0);
}
static int inline simc_close(int fd)
{
return __simc(SYS_close, fd, 0, 0, 0, 0);
}
static int inline simc_ioctl(int fd, int request, void *arg)
{
return __simc(SYS_ioctl, fd, request, (int) arg, 0, 0);
}
static int inline simc_read(int fd, void *buf, size_t count)
{
return __simc(SYS_read, fd, (int) buf, count, 0, 0);
}
static int inline simc_write(int fd, void *buf, size_t count)
{
return __simc(SYS_write, fd, (int) buf, count, 0, 0);
}
static int inline simc_poll(int fd)
{
struct timeval tv = { .tv_sec = 0, .tv_usec = 0 };
return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv,0,0);
}
/* ================================ HELPERS ================================ */ /* ================================ HELPERS ================================ */

Просмотреть файл

@ -38,16 +38,22 @@ void __init platform_init(bp_tag_t* bootparam)
} }
#ifdef CONFIG_PCI
void platform_pcibios_init(void)
{
}
#endif
void platform_halt(void) void platform_halt(void)
{ {
printk (" ** Called platform_halt(), looping forever! **\n"); pr_info(" ** Called platform_halt() **\n");
while (1); __asm__ __volatile__("movi a2, 1\nsimcall\n");
} }
void platform_power_off(void) void platform_power_off(void)
{ {
printk (" ** Called platform_power_off(), looping forever! **\n"); pr_info(" ** Called platform_power_off() **\n");
while (1); __asm__ __volatile__("movi a2, 1\nsimcall\n");
} }
void platform_restart(void) void platform_restart(void)
{ {

Просмотреть файл

@ -109,7 +109,7 @@ config HISAX_16_3
config HISAX_TELESPCI config HISAX_TELESPCI
bool "Teles PCI" bool "Teles PCI"
depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
help help
This enables HiSax support for the Teles PCI. This enables HiSax support for the Teles PCI.
See <file:Documentation/isdn/README.HiSax> on how to configure it. See <file:Documentation/isdn/README.HiSax> on how to configure it.
@ -237,7 +237,7 @@ config HISAX_MIC
config HISAX_NETJET config HISAX_NETJET
bool "NETjet card" bool "NETjet card"
depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
help help
This enables HiSax support for the NetJet from Traverse This enables HiSax support for the NetJet from Traverse
Technologies. Technologies.
@ -248,7 +248,7 @@ config HISAX_NETJET
config HISAX_NETJET_U config HISAX_NETJET_U
bool "NETspider U card" bool "NETspider U card"
depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
help help
This enables HiSax support for the Netspider U interface ISDN card This enables HiSax support for the Netspider U interface ISDN card
from Traverse Technologies. from Traverse Technologies.
@ -316,7 +316,7 @@ config HISAX_GAZEL
config HISAX_HFC_PCI config HISAX_HFC_PCI
bool "HFC PCI-Bus cards" bool "HFC PCI-Bus cards"
depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
help help
This enables HiSax support for the HFC-S PCI 2BDS0 based cards. This enables HiSax support for the HFC-S PCI 2BDS0 based cards.
@ -341,7 +341,7 @@ config HISAX_HFC_SX
config HISAX_ENTERNOW_PCI config HISAX_ENTERNOW_PCI
bool "Formula-n enter:now PCI card" bool "Formula-n enter:now PCI card"
depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV)) depends on HISAX_NETJET && PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN)))
help help
This enables HiSax support for the Formula-n enter:now PCI This enables HiSax support for the Formula-n enter:now PCI
ISDN card. ISDN card.

Просмотреть файл

@ -36,7 +36,7 @@ if PARPORT
config PARPORT_PC config PARPORT_PC
tristate "PC-style hardware" tristate "PC-style hardware"
depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && \ depends on (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV && \
(!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN (!M68K || ISA) && !MN10300 && !AVR32 && !BLACKFIN && !XTENSA
---help--- ---help---
You should say Y here if you have a PC-style parallel port. All You should say Y here if you have a PC-style parallel port. All
IBM PC compatible computers and some Alphas have PC-style IBM PC compatible computers and some Alphas have PC-style

Просмотреть файл

@ -40,7 +40,8 @@
#if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \ #if !defined(CONFIG_ARM) && !defined(CONFIG_SUPERH) \
&& !defined(CONFIG_AVR32) && !defined(CONFIG_PPC32) \ && !defined(CONFIG_AVR32) && !defined(CONFIG_PPC32) \
&& !defined(CONFIG_PPC64) && !defined(CONFIG_BLACKFIN) \ && !defined(CONFIG_PPC64) && !defined(CONFIG_BLACKFIN) \
&& !defined(CONFIG_MIPS) && !defined(CONFIG_M68K) && !defined(CONFIG_MIPS) && !defined(CONFIG_M68K) \
&& !defined(CONFIG_XTENSA)
static inline void readsl(const void __iomem *addr, void *buf, int len) static inline void readsl(const void __iomem *addr, void *buf, int len)
{ insl((unsigned long)addr, buf, len); } { insl((unsigned long)addr, buf, len); }
static inline void readsw(const void __iomem *addr, void *buf, int len) static inline void readsw(const void __iomem *addr, void *buf, int len)

Просмотреть файл

@ -827,6 +827,8 @@ static const char *section_white_list[] =
".note*", ".note*",
".got*", ".got*",
".toc*", ".toc*",
".xt.prop", /* xtensa */
".xt.lit", /* xtensa */
NULL NULL
}; };