From patchwork Fri Nov 28 08:49:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 5401961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C55849F1C5 for ; Fri, 28 Nov 2014 08:52:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D97A520138 for ; Fri, 28 Nov 2014 08:52:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECDCB20120 for ; Fri, 28 Nov 2014 08:52:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XuHFR-0007t2-SK; Fri, 28 Nov 2014 08:49:53 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XuHFO-0007sG-Ek for linux-arm-kernel@lists.infradead.org; Fri, 28 Nov 2014 08:49:51 +0000 Received: from wuerfel.localnet (HSI-KBW-149-172-15-242.hsi13.kabel-badenwuerttemberg.de [149.172.15.242]) by mrelayeu.kundenserver.de (node=mreue006) with ESMTP (Nemesis) id 0MaPym-1XaYWt01Lk-00JunK; Fri, 28 Nov 2014 09:49:11 +0100 From: Arnd Bergmann To: Alexander Stein Subject: Re: [PATCH 00/11] ARM: at91: remove !DT support for at91rm9200 Date: Fri, 28 Nov 2014 09:49:10 +0100 Message-ID: <2770184.6f6RpLLlMS@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1422574.pPO36BQRH8@kongar> References: <20141128002822.GM4508@piout.net> <1422574.pPO36BQRH8@kongar> MIME-Version: 1.0 X-Provags-ID: V02:K0:uyqHsv5cGD8iaoI/glzVOlMofj9S1kzPwDPsouOJQh/ jbCSRbQ0lq67glPh8Q+yExMuRRNwhHhaE9tziYwaXd73W8fAdX Ga7tmObini4/Jc3FPqJNpst4xk/Gx5fhYjf3uGHIGp6gdhGrZn Irm3yH67UyCMSEA0bnSKFOJaIdLLHJSikAsKwD7nW/0rAdaBfP pCh7V6MyLqM3dbGZBmu2t39TNpGepwcggml7Vjic0z5gtn3Ow1 Cvwp/pjenTTbTjsk1FRMjMa38p1DhfS1frWjQFHXgxjDvdS2MJ G6DNlllp/+Qryh+wbhoJ6tjq0VyD+irbPmg/8QDcXi9XKK3z84 Uvc28e4pInXrUSaZ6tlA= X-UI-Out-Filterresults: notjunk:1; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141128_004950_839104_684C2322 X-CRM114-Status: GOOD ( 23.50 ) X-Spam-Score: -0.0 (/) Cc: Boris BREZILLON , Nicolas Ferre , linux-kernel@vger.kernel.org, Ludovic Desroches , Alexandre Belloni , Jean-Christophe PLAGNIOL-VILLARD , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 On Friday 28 November 2014 09:27:38 Alexander Stein wrote: > Hi Alexandre, > > On Friday 28 November 2014, 01:28:22 wrote Alexandre Belloni: > > > > - sound/atmel/ac97c.c (that one is still not converted to DT anyway...) > > > > > > This one seems fairly straightforward to do, including a DT binding, > > > but the result is still ugly as it supports the at32 chips that > > > do things very differently. > > > > > > The patch below gets it to compile and should be enough as a replacement > > > once a compatible string gets added. > > > > > > > Actually, some work was done but we never saw an other version of the > > series. Alexander, are you still interested? Else we can take the patch > > below. > > > > http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/246679.html I see. Yes, the approach is similar, and there are actually multiple independent problems: - getting the current driver to build with multiplatform (trivial, 5 lines) - changing the gpio handling to work with DT (simple, both of us did that) - writing the binding (simple) - changing the driver to ASoC (not that simple) > Well, I tried to get a ac97c driver based on alsa soc framework as suggested > by Takashi. But I failed so far, I could not get my head around those > architecture. Let's just start with the trivial first patch, that can probably just be merged into 3.19, and then we can build on top of that later if anybody wants to get ac97 working again on at91. > When keeping my DT support on the current driver, the only thing which is open > that the bindings should be modifed that they are like soc-ac97link bindings. Makes sense, if that binding works on the at91 hardware. I'm not sure whether the pinctrl stuff or the first two gpio lines apply though. Arnd 8<--- ALSA: atmel: fix building the ac97 driver for at91-multiplatform at91 will no longer export the mach/cpu.h and mach/hardware.h header files in the future, which would break building the atmel ac97c driver. Since the cpu_is_* check is only used to find out whether we are running on avr32 or arm/at91, we can hardcode that check in the ARM case. Unfortunately the driver is missing other work to be useful again on ARM, if anyone wants to actually use it, they need to add a DT binding, and the driver should really be converted to use the ASoC framework. Signed-off-by: Arnd Bergmann Link: http://www.spinics.net/lists/arm-kernel/msg382068.html diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index b59427d5a697..4eec216b7f92 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -34,10 +34,10 @@ #include #include +#ifdef CONFIG_AVR32 #include - -#ifdef CONFIG_ARCH_AT91 -#include +#else +#define cpu_is_at32ap7000() (0) #endif #include "ac97c.h"