Commit 2c787198 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25:
  sh: Use relative paths for mach/cpu symlinks.
  SH: Use newer, non-deprecated __SPIN_LOCK_UNLOCKED macro.
  sh: Fix more user header breakage from sh64 integration.
  sh: Fix uImage build error.
  sh: Fix up the timer IRQ definition for SH7203.
  sh: Fix up the address error exception handler for SH-2.
  serial: sh-sci: Fix fifo stall on SH7760/SH7780/SH7785 SCIF.
parents 49ccf74a 49a5ba46
...@@ -580,6 +580,7 @@ config SH_TIMER_IRQ ...@@ -580,6 +580,7 @@ config SH_TIMER_IRQ
CPU_SUBTYPE_SH7763 CPU_SUBTYPE_SH7763
default "86" if CPU_SUBTYPE_SH7619 default "86" if CPU_SUBTYPE_SH7619
default "140" if CPU_SUBTYPE_SH7206 default "140" if CPU_SUBTYPE_SH7206
default "142" if CPU_SUBTYPE_SH7203
default "16" default "16"
config SH_PCLK_FREQ config SH_PCLK_FREQ
......
...@@ -154,7 +154,11 @@ drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/ ...@@ -154,7 +154,11 @@ drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
boot := arch/sh/boot boot := arch/sh/boot
ifneq ($(KBUILD_SRC),)
incdir-prefix := $(srctree)/include/asm-sh/ incdir-prefix := $(srctree)/include/asm-sh/
else
incdir-prefix :=
endif
# Update machine arch and proc symlinks if something which affects # Update machine arch and proc symlinks if something which affects
# them changed. We use .arch and .mach to indicate when they were # them changed. We use .arch and .mach to indicate when they were
...@@ -182,7 +186,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \ ...@@ -182,7 +186,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
$(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
$(Q)rm -f include/asm-sh/mach $(Q)rm -f include/asm-sh/mach
$(Q)for i in $(incdir-y); do \ $(Q)for i in $(incdir-y); do \
if [ -d $(incdir-prefix)$$i ]; then \ if [ -d $(srctree)/include/asm-sh/$$i ]; then \
echo -n ' SYMLINK include/asm-sh/mach -> '; \ echo -n ' SYMLINK include/asm-sh/mach -> '; \
echo -e "include/asm-sh/$$i"; \ echo -e "include/asm-sh/$$i"; \
ln -fsn $(incdir-prefix)$$i \ ln -fsn $(incdir-prefix)$$i \
...@@ -191,7 +195,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \ ...@@ -191,7 +195,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
if [ ! -d include/asm-sh/mach ]; then \ if [ ! -d include/asm-sh/mach ]; then \
echo -n ' SYMLINK include/asm-sh/mach -> '; \ echo -n ' SYMLINK include/asm-sh/mach -> '; \
echo -e 'include/asm-sh'; \ echo -e 'include/asm-sh'; \
ln -fsn $(incdir-prefix) include/asm-sh/mach; \ ln -fsn $(incdir-prefix)../asm-sh include/asm-sh/mach; \
fi; \ fi; \
fi; \ fi; \
done done
......
...@@ -32,12 +32,12 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE ...@@ -32,12 +32,12 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(obj)/compressed/vmlinux: FORCE $(obj)/compressed/vmlinux: FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@ $(Q)$(MAKE) $(build)=$(obj)/compressed $@
KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%8x" \ KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
$$[$(CONFIG_PAGE_OFFSET) + \ $$[$(CONFIG_PAGE_OFFSET) + \
$(CONFIG_MEMORY_START) + \ $(CONFIG_MEMORY_START) + \
$(CONFIG_ZERO_PAGE_OFFSET)]') $(CONFIG_ZERO_PAGE_OFFSET)]')
KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%8x" \ KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \
$$[$(CONFIG_PAGE_OFFSET) + \ $$[$(CONFIG_PAGE_OFFSET) + \
$(CONFIG_MEMORY_START) + \ $(CONFIG_MEMORY_START) + \
$(CONFIG_ZERO_PAGE_OFFSET)+0x1000]') $(CONFIG_ZERO_PAGE_OFFSET)+0x1000]')
......
...@@ -267,7 +267,6 @@ ENTRY(sh_bios_handler) ...@@ -267,7 +267,6 @@ ENTRY(sh_bios_handler)
ENTRY(address_error_trap_handler) ENTRY(address_error_trap_handler)
mov r15,r4 ! regs mov r15,r4 ! regs
add #4,r4
mov #OFF_PC,r0 mov #OFF_PC,r0
mov.l @(r0,r15),r6 ! pc mov.l @(r0,r15),r6 ! pc
mov.l 1f,r0 mov.l 1f,r0
......
...@@ -179,7 +179,7 @@ void smp_send_stop(void) ...@@ -179,7 +179,7 @@ void smp_send_stop(void)
} }
struct smp_fn_call_struct smp_fn_call = { struct smp_fn_call_struct smp_fn_call = {
.lock = SPIN_LOCK_UNLOCKED, .lock = __SPIN_LOCK_UNLOCKED(smp_fn_call.lock),
.finished = ATOMIC_INIT(0), .finished = ATOMIC_INIT(0),
}; };
......
...@@ -414,12 +414,12 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) ...@@ -414,12 +414,12 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
defined(CONFIG_CPU_SUBTYPE_SH7785) defined(CONFIG_CPU_SUBTYPE_SH7785)
static inline int scif_txroom(struct uart_port *port) static inline int scif_txroom(struct uart_port *port)
{ {
return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0x7f); return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0xff);
} }
static inline int scif_rxroom(struct uart_port *port) static inline int scif_rxroom(struct uart_port *port)
{ {
return sci_in(port, SCRFDR) & 0x7f; return sci_in(port, SCRFDR) & 0xff;
} }
#else #else
static inline int scif_txroom(struct uart_port *port) static inline int scif_txroom(struct uart_port *port)
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
{ {
__asm__( __asm__(
#ifdef CONFIG_SUPERH32 #ifdef __SH5__
"byterev %0, %0\n\t"
"shari %0, 32, %0"
#else
"swap.b %0, %0\n\t" "swap.b %0, %0\n\t"
"swap.w %0, %0\n\t" "swap.w %0, %0\n\t"
"swap.b %0, %0" "swap.b %0, %0"
#else
"byterev %0, %0\n\t"
"shari %0, 32, %0"
#endif #endif
: "=r" (x) : "=r" (x)
: "0" (x)); : "0" (x));
...@@ -28,12 +28,11 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) ...@@ -28,12 +28,11 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
{ {
__asm__( __asm__(
#ifdef CONFIG_SUPERH32 #ifdef __SH5__
"swap.b %0, %0"
#else
"byterev %0, %0\n\t" "byterev %0, %0\n\t"
"shari %0, 32, %0" "shari %0, 32, %0"
#else
"swap.b %0, %0"
#endif #endif
: "=r" (x) : "=r" (x)
: "0" (x)); : "0" (x));
......
...@@ -4,4 +4,10 @@ ...@@ -4,4 +4,10 @@
# else # else
# include "posix_types_64.h" # include "posix_types_64.h"
# endif # endif
#else
# ifdef __SH5__
# include "posix_types_64.h"
# else
# include "posix_types_32.h"
# endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment