Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1818471yba; Tue, 2 Apr 2019 16:58:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfOn0E/8xR76lKRkVvtG90LbBD97+zzwUZ7u9I1/HfFlA+0cjZQTunNSaAkMPaGzHLUekd X-Received: by 2002:aa7:814e:: with SMTP id d14mr48247165pfn.101.1554249533190; Tue, 02 Apr 2019 16:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554249533; cv=none; d=google.com; s=arc-20160816; b=kuCSteUP+Nf1j4Zye2mlBL4/eBkIsk5hT50O6MkpG8y3jW/tEt1SdAH+wYgabDFW4u SLE8FNhatS5RQUZp2pH1729xnB33bc4F1PgPB3wapEWrVopjbPH6bkpO9ZcxYja/b90E 8HP5hDIjyA8QZJy1ZQIVN4Qfix95gI/aNzusOzWAVllm/A8s/tYGs6klu3kWWP7Vq9rb LAJgV3F2MPMPEUkGsQcgCbzIXzYFEPzmDrllgiKVlkm9lGwU35wt8P2SdN+df/iumHNl Cg8IJd4gvPtNJgz6IRel4UhxVJOJMFE3VUeRiPP5+123Bu9ID6F0tn1MPAPfdCigROZg 9mqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:references :in-reply-to:subject:cc:date:to:from; bh=Q5rGN2jJD1Gh04k7Qu8Uni24FzEIIVvE5DKoQfmV5fc=; b=B+hg1xyR+Zg546xygOS2D/MxQGlYwd9JVUjHOmH7u9BClfwvUX0k6lCjsctmK0URGn 7sY0xtn5g3xQnySIn5b48R+/FUheF8K6ofTzVUcy6ksIwPdtiAFHFfsL+7nxU19QHIKN bCufZYjjD6OJ+3PujbNAPuyUcRFtRo9h2UQn4Qd71sTQzl1zv71z4C1yC8tR/AU6wWfC wonaapMKfjXK71R0uAcbQ2Atb+K0W/OhoHfyY4tvZpgKs+0MSuaRYwrq84Ke0+Z1Im8R GTvtwwZAEbfGlB6RoeSO1elF2cejT/xDHlz4qWDcbJ/WgAoIn4N7/eb8EqizjCkAU6YX BYtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e20si12087534pfi.237.2019.04.02.16.58.38; Tue, 02 Apr 2019 16:58:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726425AbfDBX5v (ORCPT + 99 others); Tue, 2 Apr 2019 19:57:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:38078 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725842AbfDBX5u (ORCPT ); Tue, 2 Apr 2019 19:57:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 97C66AE92; Tue, 2 Apr 2019 23:57:48 +0000 (UTC) From: NeilBrown To: Christian =?utf-8?Q?L=C3=BCtke-Stetzkamp?= Date: Wed, 03 Apr 2019 10:57:38 +1100 Cc: George Hilliard , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Nishad Kamdar , linux-kernel@vger.kernel.org, Sergej Perschin , Matthias Brugger , John Crispin Subject: Re: [PATCH 03/16] staging: m57621-mmc: delete driver from the tree. In-Reply-To: <20190402204658.GA5187@habor.localdomain> References: <20190402103203.14959-1-gregkh@linuxfoundation.org> <20190402103203.14959-4-gregkh@linuxfoundation.org> <87r2ak18yy.fsf@notabene.neil.brown.name> <20190402204658.GA5187@habor.localdomain> Message-ID: <87imvw0xl9.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Apr 02 2019, Christian L=C3=BCtke-Stetzkamp wrote: > On Wed, Apr 03, 2019 at 06:51:49AM +1100, NeilBrown wrote: >> People keep telling me that drivers/mmc/host/mtk-sd.c should be able to >> handle the same hardware as this driver, with a little bit of work. >> Unfortunately they haven't told me what the little bit of work involves. >>=20 >> Have you explored that possibility at all? I might try to have a look >> if I can make time. > > I have started to look into it, when I was working on that > driver. First sorry for me doing nothing in the last few > month. Generally the two drivers seem to be very similar, the main > difference is the code for tuning. In the staging driver. this is a > total mess. It tries to account for tuning itself, so it also tries to > account which command was executed (succesfully) before a tuning is > necessary and reexecutes it, when it was the APP_CMD. But there are > still some differences in the tuning code, that are not due to > handling it in the driver. > > If have mainly understand how to remove the 'in driver handling' of > the tuning and thing I could prepare a patch for that. But the > differences in the tuning code itself, I do not understand > completely. > > There are two other larger differences that I found during my > work. One is that drivers/mmc/host/mtk-sd.c has much more features, > like voltage and clock handling and some support for high speed > modes. I don't know if these features are required/useful for this > device. The other thing is the card detect handling. This driver is > doing the card detect / read only detection on its own, where the in > tree one just uses some default gpio functions there and I don't know > weather this must be changed or weather there is a gpio driver for the > mt7621. > > That is all I currently remember. Hope it helps. > > Christian Thanks, it might be. Other info I have received at https://github.com/gnubee-git/GnuBee_Docs/issues/75#issuecomment-4792165= 37 is that there might be something worth examining at https://github.com/jonpry/openwrt_mt7688/commit/a85e6d99899f3dc1204cd5bfba= 944e17bfa6178f https://github.com/jonpry/openwrt_mt7688/commit/24878467a650d765b747618de1= a575e79114b764 A few notes: The MMC driver there is basically the 4.9 mtk-sd one with all the patches from maybe 4.17 or 4.18 backported. and that a diff against current mainline here: https://gist.github.com/neheb/3d9e4cbf966f8487114df19b49f28214 might be useful. I'll look more on the weekend if no-one beats me to it. NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlyj9vMACgkQOeye3VZi gbl9uw//T8TvVvBZcQDNAc3yhA1CH8HEaAwQZyCAbEygEYfhgHAlIY3Nn9FG/Gkc rqko1qUF+82KWYSWWoipLkwQefzUdCsUScfk0LNZsyYIPPdZBcB1XY8G1lY2Nm/j KvKJIgbaVp3GYeDztvN+MD28u3nB1ieTVUECKZGhFJ70ulwIjyoCUegZAahLtElW 1VwCYDJvYP04umMOoMkmG/93hjb7Q5b7dKfnCYQUsO/Teq0fHjXJ+UV+N99rQ1Ka IvAqWgYaD9NavmBjmJKzwH2WkvNk2MoeukEeiPTYxWZtM6V4jDNV07mnmiVlYJ8g wVJhdhglcOi9CGDPgKlRFfT3Y54ly/9O1KynFdKHaRv4tFjSnCL4dAueGaFjt8a9 xHYm8+675sAVeJVUElo6JMwRKDKdbPZ87EJYzuBITbPMSLeN9V31XWBEP6MyXlAZ UJBZaiQF2VPVz+S677i+468fRMYTGYjLm/E9IIyyx7D3k89POJL/7j7tn8OVILn4 DgUBxzTQ8hEoNU6rFj1KZKhky8M7b+RYUm+JA9VDRra+TNnYB1fjtxNFbdKBBeyL 2dkIwl3AvDl3pT6+qT8BvyLpZuUitZh3P7NmpuPf+C01k0PunCH7zIbyMUx83y0s YdZKPjj9N9JwWDJi2LjrGYbAv48koQ3B+5nhtASyqPIL3UpLrCg= =bJax -----END PGP SIGNATURE----- --=-=-=--