From patchwork Thu Dec 18 19:03:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 5515731 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 129E1BEEA8 for ; Thu, 18 Dec 2014 19:04:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 251572089B for ; Thu, 18 Dec 2014 19:04:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3094020582 for ; Thu, 18 Dec 2014 19:04:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751361AbaLRTE3 (ORCPT ); Thu, 18 Dec 2014 14:04:29 -0500 Received: from gloria.sntech.de ([95.129.55.99]:54348 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549AbaLRTE2 (ORCPT ); Thu, 18 Dec 2014 14:04:28 -0500 Received: from ip545477c2.speed.planet.nl ([84.84.119.194] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y1gMr-0004Y8-Sx; Thu, 18 Dec 2014 20:04:09 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Stefan Hengelein Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, kgene@kernel.org, linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk, linux-kernel@vger.kernel.org, Marek Szyprowski , Linus Walleij Subject: Re: [PATCH] ARM: SAMSUNG: remove dead #elif CONFIG_S3C24XX_DMAC Date: Thu, 18 Dec 2014 20:03:58 +0100 Message-ID: <1645416.VNQj8YWB7M@phil> User-Agent: KMail/4.14.2 (Linux/3.16-3-amd64; KDE/4.14.1; x86_64; ; ) In-Reply-To: References: <1418830837-7422-1-git-send-email-stefan.hengelein@fau.de> <2864831.LEPnyFh3Il@phil> MIME-Version: 1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Stefan, Am Donnerstag, 18. Dezember 2014, 14:43:01 schrieb Stefan Hengelein: > So you actually tested the code I removed in the patch? can you > provide a configuration that compiles that piece of code? Yep, one of my boards (Asus eeeReader DR-900) was actually able to transmit stuff via the libertas spi wifi driver using the s3c64xx-spi driver. The smdk2416 is currently the only board for the s3c2416 in the kernel. I don't know if it had actual spi devices connected, but if it had, a suitable diff would look something like the diff below. Of course hooking up spi devices would work the same in any out-of-tree board for the supported socs. For people reading along, the s3c24xx spi distribution is as follows: s3c2410, s3c2412, s3c2440: (I think) two s3c24xx-spi s3c2443: one s3c64xx-spi and one s3c24xx-spi s3c2416: one s3c64xx-spi s3c2450: two s3c64xx-spi Heiko ------------ 8< ------------ --- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig index 9eb2229..5210e5d 100644 --- a/arch/arm/mach-s3c24xx/Kconfig +++ b/arch/arm/mach-s3c24xx/Kconfig @@ -419,6 +419,8 @@ config MACH_SMDK2416 select S3C_DEV_HSMMC1 select S3C_DEV_NAND select S3C_DEV_USB_HOST + select S3C64XX_DEV_SPI0 + select S3C2443_SETUP_SPI help Say Y here if you are using an SMDK2416 diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c index 86394f7..b6c6ff4 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2416.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c @@ -52,6 +52,9 @@ #include #include +#include +#include + #include #include "common.h" @@ -207,6 +210,26 @@ static struct s3c_sdhci_platdata smdk2416_hsmmc1_pdata __initdata = { .cd_type = S3C_SDHCI_CD_NONE, }; +struct s3c64xx_spi_csinfo libertas_cs_info = { + .fb_delay = 0, + .line = 128, /* gpio cs line */ +}; + + +static struct spi_board_info spi_board_info[] = { + { + .modalias = "libertas_spi", + .max_speed_hz = 1200000, + .bus_num = 0, + .irq = 12, /* some interrupt number */ + .chip_select = 0, + .mode = SPI_MODE_3, + .controller_data = &libertas_cs_info, +/* .platform_data = &foo1_pdata, */ + }, +}; + + static struct platform_device *smdk2416_devices[] __initdata = { &s3c_device_fb, &s3c_device_wdt, @@ -216,6 +239,7 @@ static struct platform_device *smdk2416_devices[] __initdata = { &s3c_device_hsmmc1, &s3c_device_usb_hsudc, &s3c2443_device_dma, + &s3c64xx_device_spi0, }; static void __init smdk2416_init_time(void) @@ -250,6 +274,9 @@ static void __init smdk2416_machine_init(void) gpio_request(S3C2410_GPB(1), "Display Reset"); gpio_direction_output(S3C2410_GPB(1), 1); + s3c64xx_spi0_set_platdata(NULL, 0, ARRAY_SIZE(spi_board_info)); + spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); + platform_add_devices(smdk2416_devices, ARRAY_SIZE(smdk2416_devices)); smdk_machine_init(); } diff --git a/arch/arm/mach-s3c24xx/setup-spi.c b/arch/arm/mach-s3c24xx/setup-spi.c index 3d47e02..d66c4e0 100644 --- a/arch/arm/mach-s3c24xx/setup-spi.c +++ b/arch/arm/mach-s3c24xx/setup-spi.c @@ -16,6 +16,7 @@ #include #include +#include #ifdef CONFIG_S3C64XX_DEV_SPI0 int s3c64xx_spi0_cfg_gpio(void)