diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig | 5 | ||||
-rw-r--r-- | arch/sh/boot/romimage/mmcif-sh7724.c | 7 | ||||
-rw-r--r-- | arch/sh/drivers/push-switch.c | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/ioctls.h | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/machvec.h | 1 | ||||
-rw-r--r-- | arch/sh/include/mach-common/mach/romimage.h | 2 | ||||
-rw-r--r-- | arch/sh/include/mach-ecovec24/mach/romimage.h | 2 | ||||
-rw-r--r-- | arch/sh/include/mach-kfr2r09/mach/romimage.h | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 35 | ||||
-rw-r--r-- | arch/sh/mm/init.c | 10 |
10 files changed, 53 insertions, 14 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index e9e71120040c..fff252209f63 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -349,6 +349,7 @@ config CPU_SUBTYPE_SH7720 | |||
349 | select CPU_HAS_DSP | 349 | select CPU_HAS_DSP |
350 | select SYS_SUPPORTS_CMT | 350 | select SYS_SUPPORTS_CMT |
351 | select ARCH_WANT_OPTIONAL_GPIOLIB | 351 | select ARCH_WANT_OPTIONAL_GPIOLIB |
352 | select USB_ARCH_HAS_OHCI | ||
352 | help | 353 | help |
353 | Select SH7720 if you have a SH3-DSP SH7720 CPU. | 354 | Select SH7720 if you have a SH3-DSP SH7720 CPU. |
354 | 355 | ||
@@ -357,6 +358,7 @@ config CPU_SUBTYPE_SH7721 | |||
357 | select CPU_SH3 | 358 | select CPU_SH3 |
358 | select CPU_HAS_DSP | 359 | select CPU_HAS_DSP |
359 | select SYS_SUPPORTS_CMT | 360 | select SYS_SUPPORTS_CMT |
361 | select USB_ARCH_HAS_OHCI | ||
360 | help | 362 | help |
361 | Select SH7721 if you have a SH3-DSP SH7721 CPU. | 363 | Select SH7721 if you have a SH3-DSP SH7721 CPU. |
362 | 364 | ||
@@ -437,6 +439,7 @@ config CPU_SUBTYPE_SH7757 | |||
437 | config CPU_SUBTYPE_SH7763 | 439 | config CPU_SUBTYPE_SH7763 |
438 | bool "Support SH7763 processor" | 440 | bool "Support SH7763 processor" |
439 | select CPU_SH4A | 441 | select CPU_SH4A |
442 | select USB_ARCH_HAS_OHCI | ||
440 | help | 443 | help |
441 | Select SH7763 if you have a SH4A SH7763(R5S77631) CPU. | 444 | Select SH7763 if you have a SH4A SH7763(R5S77631) CPU. |
442 | 445 | ||
@@ -463,6 +466,8 @@ config CPU_SUBTYPE_SH7786 | |||
463 | select CPU_HAS_PTEAEX | 466 | select CPU_HAS_PTEAEX |
464 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP | 467 | select GENERIC_CLOCKEVENTS_BROADCAST if SMP |
465 | select ARCH_WANT_OPTIONAL_GPIOLIB | 468 | select ARCH_WANT_OPTIONAL_GPIOLIB |
469 | select USB_ARCH_HAS_OHCI | ||
470 | select USB_ARCH_HAS_EHCI | ||
466 | 471 | ||
467 | config CPU_SUBTYPE_SHX3 | 472 | config CPU_SUBTYPE_SHX3 |
468 | bool "Support SH-X3 processor" | 473 | bool "Support SH-X3 processor" |
diff --git a/arch/sh/boot/romimage/mmcif-sh7724.c b/arch/sh/boot/romimage/mmcif-sh7724.c index 14863d7292cb..c84e7831018d 100644 --- a/arch/sh/boot/romimage/mmcif-sh7724.c +++ b/arch/sh/boot/romimage/mmcif-sh7724.c | |||
@@ -21,9 +21,6 @@ | |||
21 | #define HIZCRC 0xa405015c | 21 | #define HIZCRC 0xa405015c |
22 | #define DRVCRA 0xa405018a | 22 | #define DRVCRA 0xa405018a |
23 | 23 | ||
24 | enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT, | ||
25 | MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE }; | ||
26 | |||
27 | /* SH7724 specific MMCIF loader | 24 | /* SH7724 specific MMCIF loader |
28 | * | 25 | * |
29 | * loads the romImage from an MMC card starting from block 512 | 26 | * loads the romImage from an MMC card starting from block 512 |
@@ -63,7 +60,9 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) | |||
63 | mmcif_update_progress(MMCIF_PROGRESS_LOAD); | 60 | mmcif_update_progress(MMCIF_PROGRESS_LOAD); |
64 | 61 | ||
65 | /* load kernel via MMCIF interface */ | 62 | /* load kernel via MMCIF interface */ |
66 | sh_mmcif_boot_slurp(MMCIF_BASE, buf, no_bytes); | 63 | sh_mmcif_boot_do_read(MMCIF_BASE, 512, |
64 | (no_bytes + SH_MMCIF_BBS - 1) / SH_MMCIF_BBS, | ||
65 | buf); | ||
67 | 66 | ||
68 | /* disable clock to the MMCIF hardware block */ | 67 | /* disable clock to the MMCIF hardware block */ |
69 | __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); | 68 | __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); |
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index 7b42c247316c..afc24556572b 100644 --- a/arch/sh/drivers/push-switch.c +++ b/arch/sh/drivers/push-switch.c | |||
@@ -107,7 +107,7 @@ static int switch_drv_remove(struct platform_device *pdev) | |||
107 | device_remove_file(&pdev->dev, &dev_attr_switch); | 107 | device_remove_file(&pdev->dev, &dev_attr_switch); |
108 | 108 | ||
109 | platform_set_drvdata(pdev, NULL); | 109 | platform_set_drvdata(pdev, NULL); |
110 | flush_scheduled_work(); | 110 | flush_work_sync(&psw->work); |
111 | del_timer_sync(&psw->debounce); | 111 | del_timer_sync(&psw->debounce); |
112 | free_irq(irq, pdev); | 112 | free_irq(irq, pdev); |
113 | 113 | ||
diff --git a/arch/sh/include/asm/ioctls.h b/arch/sh/include/asm/ioctls.h index eb6c4c687972..84e85a792638 100644 --- a/arch/sh/include/asm/ioctls.h +++ b/arch/sh/include/asm/ioctls.h | |||
@@ -85,6 +85,7 @@ | |||
85 | #define TCSETSF2 _IOW('T', 45, struct termios2) | 85 | #define TCSETSF2 _IOW('T', 45, struct termios2) |
86 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 86 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
87 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 87 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
88 | #define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ | ||
88 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ | 89 | #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ |
89 | 90 | ||
90 | #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */ | 91 | #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */ |
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h index dd5d6e5bf204..57c5c3d0f39f 100644 --- a/arch/sh/include/asm/machvec.h +++ b/arch/sh/include/asm/machvec.h | |||
@@ -31,6 +31,7 @@ struct sh_machine_vector { | |||
31 | int (*mv_mode_pins)(void); | 31 | int (*mv_mode_pins)(void); |
32 | 32 | ||
33 | void (*mv_mem_init)(void); | 33 | void (*mv_mem_init)(void); |
34 | void (*mv_mem_reserve)(void); | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | extern struct sh_machine_vector sh_mv; | 37 | extern struct sh_machine_vector sh_mv; |
diff --git a/arch/sh/include/mach-common/mach/romimage.h b/arch/sh/include/mach-common/mach/romimage.h index 08fb42269ecd..3670455faaac 100644 --- a/arch/sh/include/mach-common/mach/romimage.h +++ b/arch/sh/include/mach-common/mach/romimage.h | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | #else /* __ASSEMBLY__ */ | 5 | #else /* __ASSEMBLY__ */ |
6 | 6 | ||
7 | extern inline void mmcif_update_progress(int nr) | 7 | static inline void mmcif_update_progress(int nr) |
8 | { | 8 | { |
9 | } | 9 | } |
10 | 10 | ||
diff --git a/arch/sh/include/mach-ecovec24/mach/romimage.h b/arch/sh/include/mach-ecovec24/mach/romimage.h index 1dcf5e6c8d83..d63ef51ec186 100644 --- a/arch/sh/include/mach-ecovec24/mach/romimage.h +++ b/arch/sh/include/mach-ecovec24/mach/romimage.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #define HIZCRA 0xa4050158 | 35 | #define HIZCRA 0xa4050158 |
36 | #define PGDR 0xa405012c | 36 | #define PGDR 0xa405012c |
37 | 37 | ||
38 | extern inline void mmcif_update_progress(int nr) | 38 | static inline void mmcif_update_progress(int nr) |
39 | { | 39 | { |
40 | /* disable Hi-Z for LED pins */ | 40 | /* disable Hi-Z for LED pins */ |
41 | __raw_writew(__raw_readw(HIZCRA) & ~(1 << 1), HIZCRA); | 41 | __raw_writew(__raw_readw(HIZCRA) & ~(1 << 1), HIZCRA); |
diff --git a/arch/sh/include/mach-kfr2r09/mach/romimage.h b/arch/sh/include/mach-kfr2r09/mach/romimage.h index 976256a323f2..7a883167c846 100644 --- a/arch/sh/include/mach-kfr2r09/mach/romimage.h +++ b/arch/sh/include/mach-kfr2r09/mach/romimage.h | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #else /* __ASSEMBLY__ */ | 24 | #else /* __ASSEMBLY__ */ |
25 | 25 | ||
26 | extern inline void mmcif_update_progress(int nr) | 26 | static inline void mmcif_update_progress(int nr) |
27 | { | 27 | { |
28 | } | 28 | } |
29 | 29 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index c016c0004714..0170dbda1d00 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c | |||
@@ -522,10 +522,37 @@ static struct platform_device dma0_device = { | |||
522 | }, | 522 | }, |
523 | }; | 523 | }; |
524 | 524 | ||
525 | #define USB_EHCI_START 0xffe70000 | ||
526 | #define USB_OHCI_START 0xffe70400 | ||
527 | |||
528 | static struct resource usb_ehci_resources[] = { | ||
529 | [0] = { | ||
530 | .start = USB_EHCI_START, | ||
531 | .end = USB_EHCI_START + 0x3ff, | ||
532 | .flags = IORESOURCE_MEM, | ||
533 | }, | ||
534 | [1] = { | ||
535 | .start = 77, | ||
536 | .end = 77, | ||
537 | .flags = IORESOURCE_IRQ, | ||
538 | }, | ||
539 | }; | ||
540 | |||
541 | static struct platform_device usb_ehci_device = { | ||
542 | .name = "sh_ehci", | ||
543 | .id = -1, | ||
544 | .dev = { | ||
545 | .dma_mask = &usb_ehci_device.dev.coherent_dma_mask, | ||
546 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
547 | }, | ||
548 | .num_resources = ARRAY_SIZE(usb_ehci_resources), | ||
549 | .resource = usb_ehci_resources, | ||
550 | }; | ||
551 | |||
525 | static struct resource usb_ohci_resources[] = { | 552 | static struct resource usb_ohci_resources[] = { |
526 | [0] = { | 553 | [0] = { |
527 | .start = 0xffe70400, | 554 | .start = USB_OHCI_START, |
528 | .end = 0xffe704ff, | 555 | .end = USB_OHCI_START + 0x3ff, |
529 | .flags = IORESOURCE_MEM, | 556 | .flags = IORESOURCE_MEM, |
530 | }, | 557 | }, |
531 | [1] = { | 558 | [1] = { |
@@ -535,12 +562,11 @@ static struct resource usb_ohci_resources[] = { | |||
535 | }, | 562 | }, |
536 | }; | 563 | }; |
537 | 564 | ||
538 | static u64 usb_ohci_dma_mask = DMA_BIT_MASK(32); | ||
539 | static struct platform_device usb_ohci_device = { | 565 | static struct platform_device usb_ohci_device = { |
540 | .name = "sh_ohci", | 566 | .name = "sh_ohci", |
541 | .id = -1, | 567 | .id = -1, |
542 | .dev = { | 568 | .dev = { |
543 | .dma_mask = &usb_ohci_dma_mask, | 569 | .dma_mask = &usb_ohci_device.dev.coherent_dma_mask, |
544 | .coherent_dma_mask = DMA_BIT_MASK(32), | 570 | .coherent_dma_mask = DMA_BIT_MASK(32), |
545 | }, | 571 | }, |
546 | .num_resources = ARRAY_SIZE(usb_ohci_resources), | 572 | .num_resources = ARRAY_SIZE(usb_ohci_resources), |
@@ -570,6 +596,7 @@ static struct platform_device *sh7786_early_devices[] __initdata = { | |||
570 | 596 | ||
571 | static struct platform_device *sh7786_devices[] __initdata = { | 597 | static struct platform_device *sh7786_devices[] __initdata = { |
572 | &dma0_device, | 598 | &dma0_device, |
599 | &usb_ehci_device, | ||
573 | &usb_ohci_device, | 600 | &usb_ohci_device, |
574 | }; | 601 | }; |
575 | 602 | ||
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 3385b28acaac..0d3f912e3334 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/arch/sh/mm/init.c | 2 | * linux/arch/sh/mm/init.c |
3 | * | 3 | * |
4 | * Copyright (C) 1999 Niibe Yutaka | 4 | * Copyright (C) 1999 Niibe Yutaka |
5 | * Copyright (C) 2002 - 2010 Paul Mundt | 5 | * Copyright (C) 2002 - 2011 Paul Mundt |
6 | * | 6 | * |
7 | * Based on linux/arch/i386/mm/init.c: | 7 | * Based on linux/arch/i386/mm/init.c: |
8 | * Copyright (C) 1995 Linus Torvalds | 8 | * Copyright (C) 1995 Linus Torvalds |
@@ -325,11 +325,17 @@ void __init paging_init(void) | |||
325 | int nid; | 325 | int nid; |
326 | 326 | ||
327 | memblock_init(); | 327 | memblock_init(); |
328 | |||
329 | sh_mv.mv_mem_init(); | 328 | sh_mv.mv_mem_init(); |
330 | 329 | ||
331 | early_reserve_mem(); | 330 | early_reserve_mem(); |
332 | 331 | ||
332 | /* | ||
333 | * Once the early reservations are out of the way, give the | ||
334 | * platforms a chance to kick out some memory. | ||
335 | */ | ||
336 | if (sh_mv.mv_mem_reserve) | ||
337 | sh_mv.mv_mem_reserve(); | ||
338 | |||
333 | memblock_enforce_memory_limit(memory_limit); | 339 | memblock_enforce_memory_limit(memory_limit); |
334 | memblock_analyze(); | 340 | memblock_analyze(); |
335 | 341 | ||