Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp182328imp; Tue, 19 Feb 2019 21:18:49 -0800 (PST) X-Google-Smtp-Source: AHgI3IZAeYYuM7AM8tNomTc/1ok07jvFieJvI2Rkghnm5vEZd/tQkJQT0zL/c63w8y6aRLQxdPD2 X-Received: by 2002:aa7:85d1:: with SMTP id z17mr32608902pfn.226.1550639929217; Tue, 19 Feb 2019 21:18:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550639929; cv=none; d=google.com; s=arc-20160816; b=ZAw4C9gyxjbX/BVWTCOOyjqpha6rnhr2cBGUGXhR/m0B99C6BKewVZg3gJ1uNF2kcS LcgMhg0Mu2U99wuQj8VpYIUVhgJXjX29nJQtjJjnvmk3EXeye5DR/5I37iXBiPNjjUt4 nFE2AK0F4ledUKYBS8HcjEGG5EuTsa/ipZ/pdqt2q4AlZisXx+mjf4Appw9OBHjc4/fc w4fWnTqQY6hsTir1/4UTF0IbqcxxPetAucts7nkbsc8boQOwEpLUL3/nxaYpIrf9z86d B8o6FCk5xYPMKyqrDuQAUcrNWrqRIwr3/Tb3mB57g0w0JIT3/kpopsXwE7y6LBQRBu7f 58xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hf+6C6Q2gn8Yl3O4FWNWMNmmdvkyd7bHWyarizMUDJY=; b=nsYLVUfYl2OHMjgEVeOuDcfB0YDXHDdh0Kew4Yq+gwtN6UUwMhMPgSZCHa55rSMkyq kt2bq6hNR+pWK9RgyOHDX9O1vKDF74FjmFgfvLhj8c7ocm/Ksdje2np4YwEJlRGtrM/d Fr5qm1mZ+doxKo4lSL1UW9CSwyOhFzczOYXWvqor4IkGlORuebGIx0OjD2CGy3dExKYc d8+gEUchnfy1hQ0bKZI94gTFhsj56UFknr0IzOPXDi/S+MHb4JHDkseTTyKw2yN9eglc R2nwuqSrhTZu9P1797f4xmGe5isXfRmSWjdHRgOb+P1pEnVXRN99qX6Wh6ik9kJm/U+0 WhpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mgzKRZfY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n20si6729017pgb.78.2019.02.19.21.18.34; Tue, 19 Feb 2019 21:18:49 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mgzKRZfY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbfBTFSH (ORCPT + 99 others); Wed, 20 Feb 2019 00:18:07 -0500 Received: from mail-it1-f181.google.com ([209.85.166.181]:50217 "EHLO mail-it1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbfBTFSG (ORCPT ); Wed, 20 Feb 2019 00:18:06 -0500 Received: by mail-it1-f181.google.com with SMTP id m137so12470193ita.0 for ; Tue, 19 Feb 2019 21:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hf+6C6Q2gn8Yl3O4FWNWMNmmdvkyd7bHWyarizMUDJY=; b=mgzKRZfY5RuEkbrYiUCxWDnjszfxyhgfcXL3nAL1gQTrWHJ8m86toa5UUpFUeMB9s5 a5NupSp24JWL0XjRpo37I2AUX/YUM/VXByHgNU3c0Ibpeag94HDc2JlqWQ9f0JrbcW9/ gXPXEXmgfWCWZFUhQLroy3hA06TUkCie3aYTMTwtMLAqgnClvsvYl7+k3/AnIQCnP15r L86f7gxDOL4gfUKLlhMyajbKNxluxGZFClAhzGMXA5z9TStfaPhT2+1ar8PcZmVDgFqb iZYpRDIV/yXwQ2Z2P6zII7Zqhyb8oPXvjJmr9SmjHOEJaR9nOsZqx06t9+KqGwYXwJd4 0iMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hf+6C6Q2gn8Yl3O4FWNWMNmmdvkyd7bHWyarizMUDJY=; b=W3WmqeyV+QVUXIX5iThz5rBCfgbdt5n6zMzXszSqL6wbyuYNPkaCxCWn9DNeFdaLLs ydHWfwLyFVpJVy7kKCNuTxRWkDn+6RxYea/4J9y5153bEjpT3zTCRd+CCL4KctNI4Hrj 3rCYL1+Ek1Rjn7F2iNlM/6SsnkmKP0a7NDNTGULa2l3n2zbf2NW8jO9AauP3rXYNmE+2 ZD+VuBIj/bgYg7eeRhOZ0RfCQ6G/G4MJhX77pnrDcT5DT4ARCB+7KIeVIV5Q4eZRpIDD Z8RnYqjt/yutOlUaeQGWvHmNpuPtN1ie3GtGBgFpONaOe88Co0dVu91iQWmaIeMJhk2I jfPQ== X-Gm-Message-State: AHQUAubTo/Z7lO60yhX6ENy0ddzjhgadRvTztDZ9k/cu91ASGrftQxKp 1BHx4lrccU0cR51STBdhPBXfL6C6 X-Received: by 2002:a02:9b6e:: with SMTP id g43mr18016574jal.9.1550639885692; Tue, 19 Feb 2019 21:18:05 -0800 (PST) Received: from localhost.localdomain (c-73-242-244-99.hsd1.nm.comcast.net. [73.242.244.99]) by smtp.gmail.com with ESMTPSA id k64sm2297550itb.7.2019.02.19.21.18.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Feb 2019 21:18:04 -0800 (PST) From: George Hilliard To: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org, Neil Brown Subject: mt7621-mmc driver improvements Date: Tue, 19 Feb 2019 22:17:44 -0700 Message-Id: <20190220051754.12195-1-thirtythreeforty@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a series of patches to provide a little TLC for the mt7621-mmc driver. My original goal was to get it working on the MT7688, and I have succeeded. I suspect it will now work on any of the MT762x line. The main change was getting the driver to use the pinctrl subsystem instead of hand-jamming the pinctrl registers -- the bit offsets were only correct for the MT7621. Because of this change, the driver now expects a pinctrl device reference in the mmc controller's device tree node; without it, it will bail out. This could break existing setups that don't specify it because it "just worked" up until now. So currently I just let the old behavior fall away because this is a staging driver. But if this is a problem, the old behavior could be added back as a fallback. Beyond that, there are largely code cleanups and a couple other correctness fixes that I hope are self-explanatory. The TODO list is largely unchanged, aside from the couple of TODO comments in the code that I have addressed. Ultimately, I think this driver could potentially be merged with the "real" mtk-mmc driver as the TODO suggests, but someone who is more familiar with the IP core will have to do that. Mediatek documentation (that I can find) is very sparse. Besides, their codebases have begun to diverge. Feedback welcome!