From patchwork Fri Feb 25 07:39:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 589451 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 p1P7dZWb006076 for ; Fri, 25 Feb 2011 07:39:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755404Ab1BYHje (ORCPT ); Fri, 25 Feb 2011 02:39:34 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:65105 "EHLO relmlor3.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753838Ab1BYHje (ORCPT ); Fri, 25 Feb 2011 02:39:34 -0500 Received: from relmlir1.idc.renesas.com ([10.200.68.151]) by relmlor3.idc.renesas.com ( SJSMS) with ESMTP id <0LH500IPLX9XW180@relmlor3.idc.renesas.com> for linux-sh@vger.kernel.org; Fri, 25 Feb 2011 16:39:33 +0900 (JST) Received: from relmlac2.idc.renesas.com ([10.200.69.22]) by relmlir1.idc.renesas.com (SJSMS) with ESMTP id <0LH500ANTX9XBW90@relmlir1.idc.renesas.com> for linux-sh@vger.kernel.org; Fri, 25 Feb 2011 16:39:33 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 1C89F28088; Fri, 25 Feb 2011 16:39:33 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 15F1B28070; Fri, 25 Feb 2011 16:39:33 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id SAA32464; Fri, 25 Feb 2011 16:39:33 +0900 X-IronPort-AV: E=Sophos; i="4.62,223,1297004400"; d="scan'208"; a="13450534" Received: from unknown (HELO [172.30.8.157]) ([172.30.8.157]) by relmlii1.idc.renesas.com with ESMTP; Fri, 25 Feb 2011 16:39:32 +0900 Message-id: <4D675CB4.80409@renesas.com> Date: Fri, 25 Feb 2011 16:39:32 +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 3/7] sh: add spi_board_info in sh7757lcr 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:35 +0000 (UTC) diff --git a/arch/sh/boards/board-sh7757lcr.c b/arch/sh/boards/board-sh7757lcr.c index c475f10..be5f5cf 100644 --- a/arch/sh/boards/board-sh7757lcr.c +++ b/arch/sh/boards/board-sh7757lcr.c @@ -104,6 +104,21 @@ static struct platform_device *sh7757lcr_devices[] __initdata = { &sh7757_eth1_device, }; +static struct flash_platform_data spi_flash_data = { + .name = "m25p80", + .type = "m25px64", +}; + +static struct spi_board_info spi_board_info[] = { + { + .modalias = "m25p80", + .max_speed_hz = 25000000, + .bus_num = 0, + .chip_select = 1, + .platform_data = &spi_flash_data, + }, +}; + static int __init sh7757lcr_devices_setup(void) { /* RGMII (PTA) */ @@ -332,6 +347,10 @@ static int __init sh7757lcr_devices_setup(void) gpio_request(GPIO_PTT5, NULL); /* eMMC_PRST# */ gpio_direction_output(GPIO_PTT5, 1); + /* register SPI device information */ + spi_register_board_info(spi_board_info, + ARRAY_SIZE(spi_board_info)); + /* General platform */ return platform_add_devices(sh7757lcr_devices, ARRAY_SIZE(sh7757lcr_devices));