Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8f44f09 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x:
  sh: sh7724: Add USBHS DMAEngine support
  sh: ecovec: Add renesas_usbhs support
  sh, exec: remove redundant set_fs(USER_DS)
  drivers: sh: resume enabled clocks fix
  dmaengine: shdma: SH_DMAC_MAX_CHANNELS message fix
  sh: Fix up xchg/cmpxchg corruption with gUSA RB.
  sh: Remove compressed kernel libgcc dependency.
  sh: fix wrong icache/dcache address-array start addr in cache-debugfs.
parents f49cc57c 261a9af6
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/usb/r8a66597.h>
#include <linux/usb/renesas_usbhs.h>
#include <linux/i2c.h>
#include <linux/i2c/tsc2007.h>
#include <linux/spi/spi.h>
@@ -232,6 +233,52 @@ static struct platform_device usb1_common_device = {
	.resource	= usb1_common_resources,
};

/*
 * USBHS
 */
static int usbhs_get_id(struct platform_device *pdev)
{
	return gpio_get_value(GPIO_PTB3);
}

static struct renesas_usbhs_platform_info usbhs_info = {
	.platform_callback = {
		.get_id		= usbhs_get_id,
	},
	.driver_param = {
		.buswait_bwait		= 4,
		.detection_delay	= 5,
	},
};

static struct resource usbhs_resources[] = {
	[0] = {
		.start	= 0xa4d90000,
		.end	= 0xa4d90124 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= 66,
		.end	= 66,
		.flags	= IORESOURCE_IRQ,
	},
};

static struct platform_device usbhs_device = {
	.name	= "renesas_usbhs",
	.id	= 1,
	.dev = {
		.dma_mask		= NULL,         /*  not use dma */
		.coherent_dma_mask	= 0xffffffff,
		.platform_data		= &usbhs_info,
	},
	.num_resources	= ARRAY_SIZE(usbhs_resources),
	.resource	= usbhs_resources,
	.archdata = {
		.hwblk_id = HWBLK_USB1,
	},
};

/* LCDC */
const static struct fb_videomode ecovec_lcd_modes[] = {
	{
@@ -897,6 +944,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
	&sh_eth_device,
	&usb0_host_device,
	&usb1_common_device,
	&usbhs_device,
	&lcdc_device,
	&ceu0_device,
	&ceu1_device,
+19 −3
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
			$(CONFIG_BOOT_LINK_OFFSET)]')
endif

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

ifeq ($(CONFIG_MCOUNT),y)
ORIG_CFLAGS := $(KBUILD_CFLAGS)
KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
@@ -37,7 +35,25 @@ endif
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
		   -T $(obj)/../../kernel/vmlinux.lds

$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
#
# Pull in the necessary libgcc bits from the in-kernel implementation.
#
lib1funcs-$(CONFIG_SUPERH32)	:= ashiftrt.S ashldi3.c ashrsi3.S ashlsi3.S \
				   lshrsi3.S
lib1funcs-obj			:= \
	$(addsuffix .o, $(basename $(addprefix $(obj)/, $(lib1funcs-y))))

lib1funcs-dir		:= $(srctree)/arch/$(SRCARCH)/lib
ifeq ($(BITS),64)
	lib1funcs-dir 	:= $(addsuffix $(BITS), $(lib1funcs-dir))
endif

KBUILD_CFLAGS += -I$(lib1funcs-dir)

$(addprefix $(obj)/,$(lib1funcs-y)): $(obj)/%: $(lib1funcs-dir)/% FORCE
	$(call cmd,shipped)

$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(lib1funcs-obj) FORCE
	$(call if_changed,ld)
	@:

+12 −9
Original line number Diff line number Diff line
@@ -15,8 +15,9 @@ static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val)
		"   mov.l   %2,   @%1     \n\t" /* store new value */
		"1: mov     r1,   r15     \n\t" /* LOGOUT */
		: "=&r" (retval),
		  "+r"  (m)
		: "r"   (val)
		  "+r"  (m),
		  "+r"  (val)		/* inhibit r15 overloading */
		:
		: "memory", "r0", "r1");

	return retval;
@@ -36,8 +37,9 @@ static inline unsigned long xchg_u8(volatile u8 *m, unsigned long val)
		"   mov.b   %2,   @%1     \n\t" /* store new value */
		"1: mov     r1,   r15     \n\t" /* LOGOUT */
		: "=&r" (retval),
		  "+r"  (m)
		: "r"   (val)
		  "+r"  (m),
		  "+r"  (val)		/* inhibit r15 overloading */
		:
		: "memory" , "r0", "r1");

	return retval;
@@ -54,13 +56,14 @@ static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old,
		"   nop                   \n\t"
		"   mov    r15,   r1      \n\t" /* r1 = saved sp */
		"   mov    #-8,   r15     \n\t" /* LOGIN */
		"   mov.l  @%1,   %0      \n\t" /* load  old value */
		"   cmp/eq  %0,   %2      \n\t"
		"   mov.l  @%3,   %0      \n\t" /* load  old value */
		"   cmp/eq  %0,   %1      \n\t"
		"   bf            1f      \n\t" /* if not equal */
		"   mov.l   %3,   @%1     \n\t" /* store new value */
		"   mov.l   %2,   @%3     \n\t" /* store new value */
		"1: mov     r1,   r15     \n\t" /* LOGOUT */
		: "=&r" (retval)
		:  "r"  (m), "r"  (old), "r"  (new)
		: "=&r" (retval),
		  "+r"  (old), "+r"  (new) /* old or new can be r15 */
		:  "r"  (m)
		: "memory" , "r0", "r1", "t");

	return retval;
+0 −1
Original line number Diff line number Diff line
@@ -150,7 +150,6 @@ struct thread_struct {
#define SR_USER (SR_MMU | SR_FD)

#define start_thread(_regs, new_pc, new_sp)			\
	set_fs(USER_DS);					\
	_regs->sr = SR_USER;	/* User mode. */		\
	_regs->pc = new_pc - 4;	/* Compensate syscall exit */	\
	_regs->pc |= 1;		/* Set SHmedia ! */		\
+8 −0
Original line number Diff line number Diff line
@@ -298,6 +298,14 @@ enum {
	SHDMA_SLAVE_SCIF4_RX,
	SHDMA_SLAVE_SCIF5_TX,
	SHDMA_SLAVE_SCIF5_RX,
	SHDMA_SLAVE_USB0D0_TX,
	SHDMA_SLAVE_USB0D0_RX,
	SHDMA_SLAVE_USB0D1_TX,
	SHDMA_SLAVE_USB0D1_RX,
	SHDMA_SLAVE_USB1D0_TX,
	SHDMA_SLAVE_USB1D0_RX,
	SHDMA_SLAVE_USB1D1_TX,
	SHDMA_SLAVE_USB1D1_RX,
	SHDMA_SLAVE_SDHI0_TX,
	SHDMA_SLAVE_SDHI0_RX,
	SHDMA_SLAVE_SDHI1_TX,
Loading