From patchwork Thu Nov 14 09:29:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 21494 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D8D6923FBC for ; Thu, 14 Nov 2013 09:29:41 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id g10sf3186631pdj.6 for ; Thu, 14 Nov 2013 01:29:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=R0GZPzVa6QrSHbLW8iokxRo6jmxuOOElXJ9YNL+nU14=; b=Qzj9yL53B0dEQ18J74H9cNKGPwQtabOMeYjGIClogA81TYqE35agcxNDER2IVA7+QX 62oCistXHz+VH64JHfmAgvghXXcw1Z0N1h38LKD6sHEjucbSU6iFCOYjjr7fWTOn6F92 FANml2sjukV0La/GEvwLBtuSKY19uDWeIQu0cSWZ+t2RRi2gKsTvFbGr+Fzljk4TDwak sUnudoJvHT4k45+Y7VHxXkeAQAu0PQWT/e5pFnz7AgHoZkkg36eiXWgJE1wru7vml0br m4WpYv+AfeNPcdiqXqpKG9vwDym5NyKI6FrErme3gtH6xkpIFXOulVNhKjPWxCiCIRp2 eCNg== X-Gm-Message-State: ALoCoQn14SspHUDTU1zQA+5oQFBdqYRnFJ++nW57wpy1AZwOsElPWZJHWAx7wdLt2fjFp73Zl4gA X-Received: by 10.66.161.195 with SMTP id xu3mr161402pab.33.1384421381158; Thu, 14 Nov 2013 01:29:41 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.26.227 with SMTP id o3ls891426qeg.5.gmail; Thu, 14 Nov 2013 01:29:41 -0800 (PST) X-Received: by 10.220.64.69 with SMTP id d5mr147287vci.11.1384421381042; Thu, 14 Nov 2013 01:29:41 -0800 (PST) Received: from mail-vb0-f51.google.com (mail-vb0-f51.google.com [209.85.212.51]) by mx.google.com with ESMTPS id gq10si16657793vdc.95.2013.11.14.01.29.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 01:29:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.51; Received: by mail-vb0-f51.google.com with SMTP id w5so1420248vbf.24 for ; Thu, 14 Nov 2013 01:29:41 -0800 (PST) X-Received: by 10.52.233.197 with SMTP id ty5mr160623vdc.48.1384421380922; Thu, 14 Nov 2013 01:29:40 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp302029vcz; Thu, 14 Nov 2013 01:29:40 -0800 (PST) X-Received: by 10.60.34.4 with SMTP id v4mr307422oei.101.1384421380346; Thu, 14 Nov 2013 01:29:40 -0800 (PST) Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174]) by mx.google.com with ESMTPS id w10si29093233obo.82.2013.11.14.01.29.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 01:29:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.214.174 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.214.174; Received: by mail-ob0-f174.google.com with SMTP id uy5so1875509obc.19 for ; Thu, 14 Nov 2013 01:29:40 -0800 (PST) X-Received: by 10.182.39.161 with SMTP id q1mr442071obk.54.1384421379988; Thu, 14 Nov 2013 01:29:39 -0800 (PST) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginm.net. [92.233.57.238]) by mx.google.com with ESMTPSA id rr6sm5545348oeb.0.2013.11.14.01.29.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Nov 2013 01:29:39 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com, micky_ching@realsil.com.cn Cc: linus.walleij@linaro.org, Lee Jones Subject: [PATCH 3/4] mfd: rtsx: Add rtl8402 card reader Date: Thu, 14 Nov 2013 09:29:14 +0000 Message-Id: <1384421355-4434-4-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1384421355-4434-1-git-send-email-lee.jones@linaro.org> References: <1384421355-4434-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.51 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds the new card reader 'rtl8402' to the two already supported by this driver. Signed-off-by: Lee Jones --- drivers/mfd/rtl8411.c | 16 ++++++++++++++++ drivers/mfd/rtsx_pcr.c | 5 +++++ drivers/mfd/rtsx_pcr.h | 1 + 3 files changed, 22 insertions(+) diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c index 9bba4e2..0771796 100644 --- a/drivers/mfd/rtl8411.c +++ b/drivers/mfd/rtl8411.c @@ -482,3 +482,19 @@ void rtl8411b_init_params(struct rtsx_pcr *pcr) else set_pull_ctrl_tables(rtl8411b_qfn64); } + +void rtl8402_init_params(struct rtsx_pcr *pcr) +{ + /* Fill in common parameters. */ + rtl84xx_generic_params(pcr); + + /* Device Ops variation. */ + pcr->ops->fetch_vendor_settings = rtl8411_fetch_vendor_settings; + pcr->ops->extra_init_hw = rtl8411_extra_init_hw; + pcr->ops->voltage_reg_shift = BPP_TUNED18_SHIFT_8402; + + pcr->tx_initial_phase = SET_CLOCK_PHASE(23, 7, 14); + pcr->rx_initial_phase = SET_CLOCK_PHASE(4, 3, 10); + + set_pull_ctrl_tables(rtl8411); +} diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index f41ee8f..e5dbe67 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c @@ -56,6 +56,7 @@ static DEFINE_PCI_DEVICE_TABLE(rtsx_pci_ids) = { { PCI_DEVICE(0x10EC, 0x5289), PCI_CLASS_OTHERS << 16, 0xFF0000 }, { PCI_DEVICE(0x10EC, 0x5227), PCI_CLASS_OTHERS << 16, 0xFF0000 }, { PCI_DEVICE(0x10EC, 0x5249), PCI_CLASS_OTHERS << 16, 0xFF0000 }, + { PCI_DEVICE(0x10EC, 0x5286), PCI_CLASS_OTHERS << 16, 0xFF0000 }, { PCI_DEVICE(0x10EC, 0x5287), PCI_CLASS_OTHERS << 16, 0xFF0000 }, { 0, } }; @@ -1047,6 +1048,10 @@ static int rtsx_pci_init_chip(struct rtsx_pcr *pcr) rts5229_init_params(pcr); break; + case 0x5286: + rtl8402_init_params(pcr); + break; + case 0x5289: rtl8411_init_params(pcr); break; diff --git a/drivers/mfd/rtsx_pcr.h b/drivers/mfd/rtsx_pcr.h index 947e79b..8cac8db 100644 --- a/drivers/mfd/rtsx_pcr.h +++ b/drivers/mfd/rtsx_pcr.h @@ -29,6 +29,7 @@ void rts5209_init_params(struct rtsx_pcr *pcr); void rts5229_init_params(struct rtsx_pcr *pcr); +void rtl8402_init_params(struct rtsx_pcr *pcr); void rtl8411_init_params(struct rtsx_pcr *pcr); void rts5227_init_params(struct rtsx_pcr *pcr); void rts5249_init_params(struct rtsx_pcr *pcr);