From patchwork Fri Feb 25 07:39:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 589441 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1P7co2v005703 for ; Fri, 25 Feb 2011 07:39:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754691Ab1BYHjM (ORCPT ); Fri, 25 Feb 2011 02:39:12 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:63941 "EHLO relmlor1.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753838Ab1BYHjL (ORCPT ); Fri, 25 Feb 2011 02:39:11 -0500 Received: from relmlir2.idc.renesas.com ([10.200.68.152]) by relmlor1.idc.renesas.com ( SJSMS) with ESMTP id <0LH500GZPX9AS890@relmlor1.idc.renesas.com> for linux-sh@vger.kernel.org; Fri, 25 Feb 2011 16:39:10 +0900 (JST) Received: from relmlac4.idc.renesas.com ([10.200.69.24]) by relmlir2.idc.renesas.com ( SJSMS) with ESMTP id <0LH50090VX9AUOC0@relmlir2.idc.renesas.com> for linux-sh@vger.kernel.org; Fri, 25 Feb 2011 16:39:10 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id B9B3748082; Fri, 25 Feb 2011 16:39:10 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id B8A8D48070; Fri, 25 Feb 2011 16:39:10 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id SAJ21870; Fri, 25 Feb 2011 16:39:10 +0900 X-IronPort-AV: E=Sophos; i="4.62,223,1297004400"; d="scan'208"; a="13535239" Received: from unknown (HELO [172.30.8.157]) ([172.30.8.157]) by relmlii2.idc.renesas.com with ESMTP; Fri, 25 Feb 2011 16:39:10 +0900 Message-id: <4D675C9E.3030603@renesas.com> Date: Fri, 25 Feb 2011 16:39:10 +0900 From: Yoshihiro Shimoda User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-version: 1.0 To: Paul Mundt Cc: SH-Linux Subject: [PATCH 2/7] sh: add platform_device for SPI Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 25 Feb 2011 07:39:12 +0000 (UTC) diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index 9c1de26..480f665 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c @@ -124,12 +124,36 @@ static struct platform_device tmu1_device = { .num_resources = ARRAY_SIZE(tmu1_resources), }; +static struct resource spi0_resources[] = { + [0] = { + .start = 0xfe002000, + .end = 0xfe0020ff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = 86, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device spi0_device = { + .name = "sh_spi", + .id = 0, + .dev = { + .dma_mask = NULL, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(spi0_resources), + .resource = spi0_resources, +}; + static struct platform_device *sh7757_devices[] __initdata = { &scif2_device, &scif3_device, &scif4_device, &tmu0_device, &tmu1_device, + &spi0_device, }; static int __init sh7757_devices_setup(void)