diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 48 | ||||
-rw-r--r-- | arch/sh/boot/compressed/Makefile | 22 | ||||
-rw-r--r-- | arch/sh/configs/titan_defconfig | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/cmpxchg-grb.h | 21 | ||||
-rw-r--r-- | arch/sh/include/asm/processor_64.h | 1 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh4/cpu/sh7724.h | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 40 | ||||
-rw-r--r-- | arch/sh/kernel/process_32.c | 2 | ||||
-rw-r--r-- | arch/sh/mm/cache-debugfs.c | 25 |
9 files changed, 133 insertions, 36 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 3a32741cc0ac..513cb1a2e6c8 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/usb/r8a66597.h> | 22 | #include <linux/usb/r8a66597.h> |
23 | #include <linux/usb/renesas_usbhs.h> | ||
23 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
24 | #include <linux/i2c/tsc2007.h> | 25 | #include <linux/i2c/tsc2007.h> |
25 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
@@ -232,6 +233,52 @@ static struct platform_device usb1_common_device = { | |||
232 | .resource = usb1_common_resources, | 233 | .resource = usb1_common_resources, |
233 | }; | 234 | }; |
234 | 235 | ||
236 | /* | ||
237 | * USBHS | ||
238 | */ | ||
239 | static int usbhs_get_id(struct platform_device *pdev) | ||
240 | { | ||
241 | return gpio_get_value(GPIO_PTB3); | ||
242 | } | ||
243 | |||
244 | static struct renesas_usbhs_platform_info usbhs_info = { | ||
245 | .platform_callback = { | ||
246 | .get_id = usbhs_get_id, | ||
247 | }, | ||
248 | .driver_param = { | ||
249 | .buswait_bwait = 4, | ||
250 | .detection_delay = 5, | ||
251 | }, | ||
252 | }; | ||
253 | |||
254 | static struct resource usbhs_resources[] = { | ||
255 | [0] = { | ||
256 | .start = 0xa4d90000, | ||
257 | .end = 0xa4d90124 - 1, | ||
258 | .flags = IORESOURCE_MEM, | ||
259 | }, | ||
260 | [1] = { | ||
261 | .start = 66, | ||
262 | .end = 66, | ||
263 | .flags = IORESOURCE_IRQ, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static struct platform_device usbhs_device = { | ||
268 | .name = "renesas_usbhs", | ||
269 | .id = 1, | ||
270 | .dev = { | ||
271 | .dma_mask = NULL, /* not use dma */ | ||
272 | .coherent_dma_mask = 0xffffffff, | ||
273 | .platform_data = &usbhs_info, | ||
274 | }, | ||
275 | .num_resources = ARRAY_SIZE(usbhs_resources), | ||
276 | .resource = usbhs_resources, | ||
277 | .archdata = { | ||
278 | .hwblk_id = HWBLK_USB1, | ||
279 | }, | ||
280 | }; | ||
281 | |||
235 | /* LCDC */ | 282 | /* LCDC */ |
236 | const static struct fb_videomode ecovec_lcd_modes[] = { | 283 | const static struct fb_videomode ecovec_lcd_modes[] = { |
237 | { | 284 | { |
@@ -897,6 +944,7 @@ static struct platform_device *ecovec_devices[] __initdata = { | |||
897 | &sh_eth_device, | 944 | &sh_eth_device, |
898 | &usb0_host_device, | 945 | &usb0_host_device, |
899 | &usb1_common_device, | 946 | &usb1_common_device, |
947 | &usbhs_device, | ||
900 | &lcdc_device, | 948 | &lcdc_device, |
901 | &ceu0_device, | 949 | &ceu0_device, |
902 | &ceu1_device, | 950 | &ceu1_device, |
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index 780e083e4d17..23bc849d9c64 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -27,8 +27,6 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ | |||
27 | $(CONFIG_BOOT_LINK_OFFSET)]') | 27 | $(CONFIG_BOOT_LINK_OFFSET)]') |
28 | endif | 28 | endif |
29 | 29 | ||
30 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | ||
31 | |||
32 | ifeq ($(CONFIG_MCOUNT),y) | 30 | ifeq ($(CONFIG_MCOUNT),y) |
33 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | 31 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
34 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | 32 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) |
@@ -37,7 +35,25 @@ endif | |||
37 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ | 35 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ |
38 | -T $(obj)/../../kernel/vmlinux.lds | 36 | -T $(obj)/../../kernel/vmlinux.lds |
39 | 37 | ||
40 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE | 38 | # |
39 | # Pull in the necessary libgcc bits from the in-kernel implementation. | ||
40 | # | ||
41 | lib1funcs-$(CONFIG_SUPERH32) := ashiftrt.S ashldi3.c ashrsi3.S ashlsi3.S \ | ||
42 | lshrsi3.S | ||
43 | lib1funcs-obj := \ | ||
44 | $(addsuffix .o, $(basename $(addprefix $(obj)/, $(lib1funcs-y)))) | ||
45 | |||
46 | lib1funcs-dir := $(srctree)/arch/$(SRCARCH)/lib | ||
47 | ifeq ($(BITS),64) | ||
48 | lib1funcs-dir := $(addsuffix $(BITS), $(lib1funcs-dir)) | ||
49 | endif | ||
50 | |||
51 | KBUILD_CFLAGS += -I$(lib1funcs-dir) | ||
52 | |||
53 | $(addprefix $(obj)/,$(lib1funcs-y)): $(obj)/%: $(lib1funcs-dir)/% FORCE | ||
54 | $(call cmd,shipped) | ||
55 | |||
56 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(lib1funcs-obj) FORCE | ||
41 | $(call if_changed,ld) | 57 | $(call if_changed,ld) |
42 | @: | 58 | @: |
43 | 59 | ||
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig index 0f558914e760..e2cbd92d520b 100644 --- a/arch/sh/configs/titan_defconfig +++ b/arch/sh/configs/titan_defconfig | |||
@@ -227,7 +227,7 @@ CONFIG_USB_SERIAL=m | |||
227 | CONFIG_USB_SERIAL_GENERIC=y | 227 | CONFIG_USB_SERIAL_GENERIC=y |
228 | CONFIG_USB_SERIAL_ARK3116=m | 228 | CONFIG_USB_SERIAL_ARK3116=m |
229 | CONFIG_USB_SERIAL_PL2303=m | 229 | CONFIG_USB_SERIAL_PL2303=m |
230 | CONFIG_RTC_CLASS=m | 230 | CONFIG_RTC_CLASS=y |
231 | CONFIG_RTC_DRV_SH=m | 231 | CONFIG_RTC_DRV_SH=m |
232 | CONFIG_EXT2_FS=y | 232 | CONFIG_EXT2_FS=y |
233 | CONFIG_EXT3_FS=y | 233 | CONFIG_EXT3_FS=y |
diff --git a/arch/sh/include/asm/cmpxchg-grb.h b/arch/sh/include/asm/cmpxchg-grb.h index 4676bf57693a..f848dec9e483 100644 --- a/arch/sh/include/asm/cmpxchg-grb.h +++ b/arch/sh/include/asm/cmpxchg-grb.h | |||
@@ -15,8 +15,9 @@ static inline unsigned long xchg_u32(volatile u32 *m, unsigned long val) | |||
15 | " mov.l %2, @%1 \n\t" /* store new value */ | 15 | " mov.l %2, @%1 \n\t" /* store new value */ |
16 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 16 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
17 | : "=&r" (retval), | 17 | : "=&r" (retval), |
18 | "+r" (m) | 18 | "+r" (m), |
19 | : "r" (val) | 19 | "+r" (val) /* inhibit r15 overloading */ |
20 | : | ||
20 | : "memory", "r0", "r1"); | 21 | : "memory", "r0", "r1"); |
21 | 22 | ||
22 | return retval; | 23 | return retval; |
@@ -36,8 +37,9 @@ static inline unsigned long xchg_u8(volatile u8 *m, unsigned long val) | |||
36 | " mov.b %2, @%1 \n\t" /* store new value */ | 37 | " mov.b %2, @%1 \n\t" /* store new value */ |
37 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 38 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
38 | : "=&r" (retval), | 39 | : "=&r" (retval), |
39 | "+r" (m) | 40 | "+r" (m), |
40 | : "r" (val) | 41 | "+r" (val) /* inhibit r15 overloading */ |
42 | : | ||
41 | : "memory" , "r0", "r1"); | 43 | : "memory" , "r0", "r1"); |
42 | 44 | ||
43 | return retval; | 45 | return retval; |
@@ -54,13 +56,14 @@ static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, | |||
54 | " nop \n\t" | 56 | " nop \n\t" |
55 | " mov r15, r1 \n\t" /* r1 = saved sp */ | 57 | " mov r15, r1 \n\t" /* r1 = saved sp */ |
56 | " mov #-8, r15 \n\t" /* LOGIN */ | 58 | " mov #-8, r15 \n\t" /* LOGIN */ |
57 | " mov.l @%1, %0 \n\t" /* load old value */ | 59 | " mov.l @%3, %0 \n\t" /* load old value */ |
58 | " cmp/eq %0, %2 \n\t" | 60 | " cmp/eq %0, %1 \n\t" |
59 | " bf 1f \n\t" /* if not equal */ | 61 | " bf 1f \n\t" /* if not equal */ |
60 | " mov.l %3, @%1 \n\t" /* store new value */ | 62 | " mov.l %2, @%3 \n\t" /* store new value */ |
61 | "1: mov r1, r15 \n\t" /* LOGOUT */ | 63 | "1: mov r1, r15 \n\t" /* LOGOUT */ |
62 | : "=&r" (retval) | 64 | : "=&r" (retval), |
63 | : "r" (m), "r" (old), "r" (new) | 65 | "+r" (old), "+r" (new) /* old or new can be r15 */ |
66 | : "r" (m) | ||
64 | : "memory" , "r0", "r1", "t"); | 67 | : "memory" , "r0", "r1", "t"); |
65 | 68 | ||
66 | return retval; | 69 | return retval; |
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index 2a541ddb5a1b..e25c4c7d6b63 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h | |||
@@ -150,7 +150,6 @@ struct thread_struct { | |||
150 | #define SR_USER (SR_MMU | SR_FD) | 150 | #define SR_USER (SR_MMU | SR_FD) |
151 | 151 | ||
152 | #define start_thread(_regs, new_pc, new_sp) \ | 152 | #define start_thread(_regs, new_pc, new_sp) \ |
153 | set_fs(USER_DS); \ | ||
154 | _regs->sr = SR_USER; /* User mode. */ \ | 153 | _regs->sr = SR_USER; /* User mode. */ \ |
155 | _regs->pc = new_pc - 4; /* Compensate syscall exit */ \ | 154 | _regs->pc = new_pc - 4; /* Compensate syscall exit */ \ |
156 | _regs->pc |= 1; /* Set SHmedia ! */ \ | 155 | _regs->pc |= 1; /* Set SHmedia ! */ \ |
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7724.h b/arch/sh/include/cpu-sh4/cpu/sh7724.h index 3daef8ecbc63..cbc47e6bcab5 100644 --- a/arch/sh/include/cpu-sh4/cpu/sh7724.h +++ b/arch/sh/include/cpu-sh4/cpu/sh7724.h | |||
@@ -298,6 +298,14 @@ enum { | |||
298 | SHDMA_SLAVE_SCIF4_RX, | 298 | SHDMA_SLAVE_SCIF4_RX, |
299 | SHDMA_SLAVE_SCIF5_TX, | 299 | SHDMA_SLAVE_SCIF5_TX, |
300 | SHDMA_SLAVE_SCIF5_RX, | 300 | SHDMA_SLAVE_SCIF5_RX, |
301 | SHDMA_SLAVE_USB0D0_TX, | ||
302 | SHDMA_SLAVE_USB0D0_RX, | ||
303 | SHDMA_SLAVE_USB0D1_TX, | ||
304 | SHDMA_SLAVE_USB0D1_RX, | ||
305 | SHDMA_SLAVE_USB1D0_TX, | ||
306 | SHDMA_SLAVE_USB1D0_RX, | ||
307 | SHDMA_SLAVE_USB1D1_TX, | ||
308 | SHDMA_SLAVE_USB1D1_RX, | ||
301 | SHDMA_SLAVE_SDHI0_TX, | 309 | SHDMA_SLAVE_SDHI0_TX, |
302 | SHDMA_SLAVE_SDHI0_RX, | 310 | SHDMA_SLAVE_SDHI0_RX, |
303 | SHDMA_SLAVE_SDHI1_TX, | 311 | SHDMA_SLAVE_SDHI1_TX, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 0333fe9e3881..134a397b1918 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -93,6 +93,46 @@ static const struct sh_dmae_slave_config sh7724_dmae_slaves[] = { | |||
93 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), | 93 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
94 | .mid_rid = 0x36, | 94 | .mid_rid = 0x36, |
95 | }, { | 95 | }, { |
96 | .slave_id = SHDMA_SLAVE_USB0D0_TX, | ||
97 | .addr = 0xA4D80100, | ||
98 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
99 | .mid_rid = 0x73, | ||
100 | }, { | ||
101 | .slave_id = SHDMA_SLAVE_USB0D0_RX, | ||
102 | .addr = 0xA4D80100, | ||
103 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
104 | .mid_rid = 0x73, | ||
105 | }, { | ||
106 | .slave_id = SHDMA_SLAVE_USB0D1_TX, | ||
107 | .addr = 0xA4D80120, | ||
108 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
109 | .mid_rid = 0x77, | ||
110 | }, { | ||
111 | .slave_id = SHDMA_SLAVE_USB0D1_RX, | ||
112 | .addr = 0xA4D80120, | ||
113 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
114 | .mid_rid = 0x77, | ||
115 | }, { | ||
116 | .slave_id = SHDMA_SLAVE_USB1D0_TX, | ||
117 | .addr = 0xA4D90100, | ||
118 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
119 | .mid_rid = 0xab, | ||
120 | }, { | ||
121 | .slave_id = SHDMA_SLAVE_USB1D0_RX, | ||
122 | .addr = 0xA4D90100, | ||
123 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
124 | .mid_rid = 0xab, | ||
125 | }, { | ||
126 | .slave_id = SHDMA_SLAVE_USB1D1_TX, | ||
127 | .addr = 0xA4D90120, | ||
128 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
129 | .mid_rid = 0xaf, | ||
130 | }, { | ||
131 | .slave_id = SHDMA_SLAVE_USB1D1_RX, | ||
132 | .addr = 0xA4D90120, | ||
133 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), | ||
134 | .mid_rid = 0xaf, | ||
135 | }, { | ||
96 | .slave_id = SHDMA_SLAVE_SDHI0_TX, | 136 | .slave_id = SHDMA_SLAVE_SDHI0_TX, |
97 | .addr = 0x04ce0030, | 137 | .addr = 0x04ce0030, |
98 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), | 138 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index b473f0c06fbc..aaf6d59c2012 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -102,8 +102,6 @@ EXPORT_SYMBOL(kernel_thread); | |||
102 | void start_thread(struct pt_regs *regs, unsigned long new_pc, | 102 | void start_thread(struct pt_regs *regs, unsigned long new_pc, |
103 | unsigned long new_sp) | 103 | unsigned long new_sp) |
104 | { | 104 | { |
105 | set_fs(USER_DS); | ||
106 | |||
107 | regs->pr = 0; | 105 | regs->pr = 0; |
108 | regs->sr = SR_FD; | 106 | regs->sr = SR_FD; |
109 | regs->pc = new_pc; | 107 | regs->pc = new_pc; |
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c index 52411462c409..115725198038 100644 --- a/arch/sh/mm/cache-debugfs.c +++ b/arch/sh/mm/cache-debugfs.c | |||
@@ -26,9 +26,9 @@ static int cache_seq_show(struct seq_file *file, void *iter) | |||
26 | { | 26 | { |
27 | unsigned int cache_type = (unsigned int)file->private; | 27 | unsigned int cache_type = (unsigned int)file->private; |
28 | struct cache_info *cache; | 28 | struct cache_info *cache; |
29 | unsigned int waysize, way, cache_size; | 29 | unsigned int waysize, way; |
30 | unsigned long ccr, base; | 30 | unsigned long ccr; |
31 | static unsigned long addrstart = 0; | 31 | unsigned long addrstart = 0; |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Go uncached immediately so we don't skew the results any | 34 | * Go uncached immediately so we don't skew the results any |
@@ -45,28 +45,13 @@ static int cache_seq_show(struct seq_file *file, void *iter) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | if (cache_type == CACHE_TYPE_DCACHE) { | 47 | if (cache_type == CACHE_TYPE_DCACHE) { |
48 | base = CACHE_OC_ADDRESS_ARRAY; | 48 | addrstart = CACHE_OC_ADDRESS_ARRAY; |
49 | cache = ¤t_cpu_data.dcache; | 49 | cache = ¤t_cpu_data.dcache; |
50 | } else { | 50 | } else { |
51 | base = CACHE_IC_ADDRESS_ARRAY; | 51 | addrstart = CACHE_IC_ADDRESS_ARRAY; |
52 | cache = ¤t_cpu_data.icache; | 52 | cache = ¤t_cpu_data.icache; |
53 | } | 53 | } |
54 | 54 | ||
55 | /* | ||
56 | * Due to the amount of data written out (depending on the cache size), | ||
57 | * we may be iterated over multiple times. In this case, keep track of | ||
58 | * the entry position in addrstart, and rewind it when we've hit the | ||
59 | * end of the cache. | ||
60 | * | ||
61 | * Likewise, the same code is used for multiple caches, so care must | ||
62 | * be taken for bouncing addrstart back and forth so the appropriate | ||
63 | * cache is hit. | ||
64 | */ | ||
65 | cache_size = cache->ways * cache->sets * cache->linesz; | ||
66 | if (((addrstart & 0xff000000) != base) || | ||
67 | (addrstart & 0x00ffffff) > cache_size) | ||
68 | addrstart = base; | ||
69 | |||
70 | waysize = cache->sets; | 55 | waysize = cache->sets; |
71 | 56 | ||
72 | /* | 57 | /* |