From patchwork Thu Jan 22 09:56:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3560 X-Patchwork-Delegate: lethal@linux-sh.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0M9rKI4000645 for ; Thu, 22 Jan 2009 01:53:28 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755254AbZAVJ6J (ORCPT ); Thu, 22 Jan 2009 04:58:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755300AbZAVJ6J (ORCPT ); Thu, 22 Jan 2009 04:58:09 -0500 Received: from rv-out-0506.google.com ([209.85.198.224]:5621 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755254AbZAVJ6H (ORCPT ); Thu, 22 Jan 2009 04:58:07 -0500 Received: by rv-out-0506.google.com with SMTP id k40so4065474rvb.1 for ; Thu, 22 Jan 2009 01:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=ELbBGMlPvoKG/O7xzOfujzP44Buu2nwUEA58++QqltI=; b=ny+gDGCxF+gXzZ/OURwY0QJuoWjcRa1v9Iit5DkzqeaK0HYs4hhVIR8Ul7f3UEAGob LhCT6RlsC6LtCShpb/SvupuueSJ3XmqbhsnVpG/xx9u45vZcfD+NQPQMEJm6CqYgfXr1 KkRBugi5DeDZKwWdkbzgdvoRkW/SVN2oFGppY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=NnmTV+J5k9deVwq+LcKwDCZsszpk1bdTVqPgprKPybq1iyu75G0pLEFrjt6ZdqtTYR LKCGzCZchmuaJXbRjKOh/FbcXD7TSr2iCTpvRpccG68qgAxDHE+tVh13OvzvKgzs8n5D hdsiKVf6okaWCsAK2QTaear2l3vu+5f0isPFA= Received: by 10.140.226.13 with SMTP id y13mr4503229rvg.93.1232618287229; Thu, 22 Jan 2009 01:58:07 -0800 (PST) Received: from rx1.opensource.se (114.8.221.202.ts.2iij.net [202.221.8.114]) by mx.google.com with ESMTPS id l31sm18031235rvb.2.2009.01.22.01.58.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 22 Jan 2009 01:58:05 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: johnstul@us.ibm.com, lethal@linux-sh.org, tglx@linutronix.de, akpm@linux-foundation.org, mingo@redhat.com, Magnus Damm Date: Thu, 22 Jan 2009 18:56:09 +0900 Message-Id: <20090122095609.31653.60597.sendpatchset@rx1.opensource.se> In-Reply-To: <20090122095521.31653.35942.sendpatchset@rx1.opensource.se> References: <20090122095521.31653.35942.sendpatchset@rx1.opensource.se> Subject: [PATCH 05/05] sh: CMT platform data for sh7723/sh7722/sh7366/sh7343 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm CMT platform data for SuperH Mobile sh7723/sh7722/sh7343/sh7366. Signed-off-by: Magnus Damm --- arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 34 ++++++++++++++++++++++++++++++++ arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 34 ++++++++++++++++++++++++++++++++ arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 34 ++++++++++++++++++++++++++++++++ arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 34 ++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0010/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ work/arch/sh/kernel/cpu/sh4a/setup-sh7343.c 2009-01-22 14:06:51.000000000 +0900 @@ -12,6 +12,7 @@ #include #include #include +#include #include static struct resource iic0_resources[] = { @@ -140,6 +141,38 @@ static struct platform_device jpu_device .num_resources = ARRAY_SIZE(jpu_resources), }; +static struct sh_cmt_config cmt_platform_data = { + .name = "CMT", + .channel_offset = 0x60, + .timer_bit = 5, + .clk = "cmt0", + .clockevent_rating = 125, + .clocksource_rating = 200, +}; + +static struct resource cmt_resources[] = { + [0] = { + .name = "CMT", + .start = 0x044a0060, + .end = 0x044a006b, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = 104, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device cmt_device = { + .name = "sh_cmt", + .id = 0, + .dev = { + .platform_data = &cmt_platform_data, + }, + .resource = cmt_resources, + .num_resources = ARRAY_SIZE(cmt_resources), +}; + static struct plat_sci_port scif0_platform_data = { .mapbase = 0xffe00000, .flags = UPF_BOOT_AUTOCONF, @@ -205,6 +238,7 @@ static struct platform_device scif3_devi }; static struct platform_device *sh7343_devices[] __initdata = { + &cmt_device, &iic0_device, &iic1_device, &scif0_device, --- 0010/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ work/arch/sh/kernel/cpu/sh4a/setup-sh7366.c 2009-01-22 14:08:07.000000000 +0900 @@ -14,6 +14,7 @@ #include #include #include +#include #include static struct resource iic_resources[] = { @@ -147,6 +148,38 @@ static struct platform_device veu1_devic .num_resources = ARRAY_SIZE(veu1_resources), }; +static struct sh_cmt_config cmt_platform_data = { + .name = "CMT", + .channel_offset = 0x60, + .timer_bit = 5, + .clk = "cmt0", + .clockevent_rating = 125, + .clocksource_rating = 200, +}; + +static struct resource cmt_resources[] = { + [0] = { + .name = "CMT", + .start = 0x044a0060, + .end = 0x044a006b, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = 104, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device cmt_device = { + .name = "sh_cmt", + .id = 0, + .dev = { + .platform_data = &cmt_platform_data, + }, + .resource = cmt_resources, + .num_resources = ARRAY_SIZE(cmt_resources), +}; + static struct plat_sci_port scif0_platform_data = { .mapbase = 0xffe00000, .flags = UPF_BOOT_AUTOCONF, @@ -164,6 +197,7 @@ static struct platform_device scif0_devi }; static struct platform_device *sh7366_devices[] __initdata = { + &cmt_device, &iic_device, &scif0_device, &usb_host_device, --- 0010/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ work/arch/sh/kernel/cpu/sh4a/setup-sh7722.c 2009-01-22 14:09:07.000000000 +0900 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -176,6 +177,38 @@ static struct platform_device jpu_device .num_resources = ARRAY_SIZE(jpu_resources), }; +static struct sh_cmt_config cmt_platform_data = { + .name = "CMT", + .channel_offset = 0x60, + .timer_bit = 5, + .clk = "cmt0", + .clockevent_rating = 125, + .clocksource_rating = 200, +}; + +static struct resource cmt_resources[] = { + [0] = { + .name = "CMT", + .start = 0x044a0060, + .end = 0x044a006b, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = 104, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device cmt_device = { + .name = "sh_cmt", + .id = 0, + .dev = { + .platform_data = &cmt_platform_data, + }, + .resource = cmt_resources, + .num_resources = ARRAY_SIZE(cmt_resources), +}; + static struct plat_sci_port scif0_platform_data = { .mapbase = 0xffe00000, .flags = UPF_BOOT_AUTOCONF, @@ -225,6 +258,7 @@ static struct platform_device scif2_devi }; static struct platform_device *sh7722_devices[] __initdata = { + &cmt_device, &rtc_device, &usbf_device, &iic_device, --- 0010/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ work/arch/sh/kernel/cpu/sh4a/setup-sh7723.c 2009-01-22 14:10:02.000000000 +0900 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -100,6 +101,38 @@ static struct platform_device veu1_devic .num_resources = ARRAY_SIZE(veu1_resources), }; +static struct sh_cmt_config cmt_platform_data = { + .name = "CMT", + .channel_offset = 0x60, + .timer_bit = 5, + .clk = "cmt0", + .clockevent_rating = 125, + .clocksource_rating = 200, +}; + +static struct resource cmt_resources[] = { + [0] = { + .name = "CMT", + .start = 0x044a0060, + .end = 0x044a006b, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = 104, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device cmt_device = { + .name = "sh_cmt", + .id = 0, + .dev = { + .platform_data = &cmt_platform_data, + }, + .resource = cmt_resources, + .num_resources = ARRAY_SIZE(cmt_resources), +}; + static struct plat_sci_port scif0_platform_data = { .mapbase = 0xffe00000, .flags = UPF_BOOT_AUTOCONF, @@ -273,6 +306,7 @@ static struct platform_device iic_device }; static struct platform_device *sh7723_devices[] __initdata = { + &cmt_device, &scif0_device, &scif1_device, &scif2_device,