From 65b83427c6e5814556855c42bf9b4edeafd66623 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Thu, 15 May 2008 17:44:00 +0900 Subject: sh: fix sh7785 master clock value Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4a/clock-sh7785.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sh/kernel/cpu/sh4a') diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c index 805535aa505e..27fa81bef6a0 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c @@ -26,7 +26,7 @@ static int pfc_divisors[] = { 1, 1, 1, 1, 1, 1, 1, 18, static void master_clk_init(struct clk *clk) { - clk->rate *= 36; + clk->rate *= pfc_divisors[ctrl_inl(FRQMR1) & 0x000f]; } static struct clk_ops sh7785_master_clk_ops = { -- cgit v1.2.3 From 526c1c23a23785114f618624e22480a3317388e1 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 22 May 2008 22:15:31 +0900 Subject: sh: fix USBF resource for sh7722 The USBF function on sh7722 is currently not working with the m66592_udc driver. The driver is using platform_get_resource_byname() so my commit a0d29798e568116aa6c32aef7bab2d9e620c88ad broke sh7722 support. The long term fix is to replace platform_get_resource_byname() in the driver with platform_get_resource(), but this helps until that happens. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sh/kernel/cpu/sh4a') diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 069314037049..62ebccf18b3c 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c @@ -16,7 +16,7 @@ static struct resource usbf_resources[] = { [0] = { - .name = "USBF", + .name = "m66592_udc", .start = 0x04480000, .end = 0x044800FF, .flags = IORESOURCE_MEM, -- cgit v1.2.3 From 760130447248de94943cf75c80fa3ac8fe9d977d Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 22 May 2008 22:19:39 +0900 Subject: sh: fix VPU interrupt vector for sh7723 This patch fixes a VPU vector typo for sh7723. The correct value is 0x980, the same as for sh7722. Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sh/kernel/cpu/sh4a') diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 16925cf28db8..629b06ceb61f 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -153,7 +153,7 @@ static struct intc_vect vectors[] __initdata = { INTC_VECT(VIO_VOUI,0x8E0), INTC_VECT(SCIFA_SCIFA0,0x900), - INTC_VECT(VPU_VPUI,0x920), + INTC_VECT(VPU_VPUI,0x980), INTC_VECT(TPU_TPUI,0x9A0), INTC_VECT(ADC_ADI,0x9E0), INTC_VECT(USB_USI0,0xA20), -- cgit v1.2.3 From 9c28faaab19132b3f029d4ffa9a4dee8a11f0cbb Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 26 May 2008 11:45:45 +0900 Subject: sh: Drop broken URAM support on SH7723. This was copied over from the previous MobileR bits, which doesn't apply to R2. The URAM block on R2 is recycled for the L2 instead. Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch/sh/kernel/cpu/sh4a') diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 629b06ceb61f..566ce79b9abf 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -292,9 +292,3 @@ void __init plat_irq_setup(void) { register_intc_controller(&intc_desc); } - -void __init plat_mem_setup(void) -{ - /* Register the URAM space as Node 1 */ - setup_bootmem_node(1, 0x055f0000, 0x05610000); -} -- cgit v1.2.3 From 576b91873fc012620fae2b33ddae3fee2fa0a4ef Mon Sep 17 00:00:00 2001 From: "Yusuke.Goda" Date: Wed, 4 Jun 2008 19:22:59 +0900 Subject: sh: Add SH7723 SCIF support Signed-off-by: Yusuke Goda Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/sh/kernel/cpu/sh4a') diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 566ce79b9abf..5559a110a5bd 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -16,6 +16,21 @@ static struct plat_sci_port sci_platform_data[] = { { + .mapbase = 0xffe00000, + .flags = UPF_BOOT_AUTOCONF, + .type = PORT_SCIF, + .irqs = { 80, 80, 80, 80 }, + },{ + .mapbase = 0xffe10000, + .flags = UPF_BOOT_AUTOCONF, + .type = PORT_SCIF, + .irqs = { 81, 81, 81, 81 }, + },{ + .mapbase = 0xffe20000, + .flags = UPF_BOOT_AUTOCONF, + .type = PORT_SCIF, + .irqs = { 82, 82, 82, 82 }, + },{ .mapbase = 0xa4e30000, .flags = UPF_BOOT_AUTOCONF, .type = PORT_SCI, -- cgit v1.2.3 From 5bde47bc63a9e8ccf9b1542498e266196b307cc2 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Wed, 4 Jun 2008 17:16:15 +0900 Subject: sh: Fix compile error SH7763 setup code SH7763's setup code use old DECLARE_INTC_DESC. There was a compile error because of this. Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'arch/sh/kernel/cpu/sh4a') diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c index ae2b22219f02..f189a559462b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c @@ -291,8 +291,9 @@ static struct intc_sense_reg irq_sense_registers[] __initdata = { }; static DECLARE_INTC_DESC(intc_irq_desc, "sh7763-irq", irq_vectors, - NULL, NULL, irq_mask_registers, irq_prio_registers, - irq_sense_registers); + NULL, irq_mask_registers, irq_prio_registers, + irq_sense_registers); + /* External interrupt pins in IRL mode */ static struct intc_vect irl_vectors[] __initdata = { @@ -324,10 +325,10 @@ static struct intc_mask_reg irl7654_mask_registers[] __initdata = { }; static DECLARE_INTC_DESC(intc_irl7654_desc, "sh7763-irl7654", irl_vectors, - NULL, NULL, irl7654_mask_registers, NULL, NULL); + NULL, irl7654_mask_registers, NULL, NULL); static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7763-irl3210", irl_vectors, - NULL, NULL, irl3210_mask_registers, NULL, NULL); + NULL, irl3210_mask_registers, NULL, NULL); #define INTC_ICR0 0xffd00000 #define INTC_INTMSK0 0xffd00044 -- cgit v1.2.3 From b8858eed87f1f19903ad9224f7228cbe7374ac7e Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Thu, 5 Jun 2008 21:21:04 +0900 Subject: sh: add resource of USB host for SH7723 Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt --- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'arch/sh/kernel/cpu/sh4a') diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 5559a110a5bd..a0470f2f5479 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -88,9 +88,35 @@ static struct platform_device rtc_device = { .resource = rtc_resources, }; +static struct resource sh7723_usb_host_resources[] = { + [0] = { + .name = "r8a66597_hcd", + .start = 0xa4d80000, + .end = 0xa4d800ff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = 65, + .end = 65, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device sh7723_usb_host_device = { + .name = "r8a66597_hcd", + .id = 0, + .dev = { + .dma_mask = NULL, /* not use dma */ + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(sh7723_usb_host_resources), + .resource = sh7723_usb_host_resources, +}; + static struct platform_device *sh7723_devices[] __initdata = { &sci_device, &rtc_device, + &sh7723_usb_host_device, }; static int __init sh7723_devices_setup(void) -- cgit v1.2.3