Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3932564yba; Wed, 17 Apr 2019 00:36:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxikt06AEg7cK1aXAozURJ81SsS9Pcy5V/O7FxhXs/brK2ZXMTYC7ESumOyXOCcOMCpqz6b X-Received: by 2002:a63:3287:: with SMTP id y129mr81110405pgy.9.1555486614915; Wed, 17 Apr 2019 00:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555486614; cv=none; d=google.com; s=arc-20160816; b=uZlLmPDwWnYztdmJdxxEdHH1ZQrdXDVnu2v4txxFW0ghmSAG7S8qB6wvvN56psE0Xy DUdVtsHS/4TZhqpqI9nrnc5+wOEc+jVKRXxA0SW4SHM6azF3mhioj6WixcfXP/irMmw6 MYrJdXck+Ki/OkGYK00njRrz5u0Yw/5sRn0CDCHEpiSPNknIfZwQBExJRsEKXq/o3Zwq 6KurJbZNvvs3LQ4L8SSq9bsUKN67RGuVJYjzxxD6ScD2jYM+raHQjXnjvD09Z93XER5E uzsQJYt85K1bXpGkvPMzto2mqis1HKl+5kRjDZXXoZvbw+v0xTSwKnMgpHRSFW7IK7nB WtnQ== 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:date:subject:cc :to:from:authenticated-by; bh=8R3vRVdAmdWkBR8f4rJn+5o+dduhh/96wUV43h92c80=; b=E73EOuDcJFMwueTYwQ/iE4JUbxySkmmFLyEc2W2hI/a9J5mzLmdFt8oKeUSVJ3HiNy f6bi9ChpQvgaMIaHcrLQnqTqaYdisr0HdoL+1KGhxu00TmdO4QBGl7u8QbKUThf5Kimh J9SxSBqRrU+rpj9yoO6ItpfdKFzIJjuaZUkd3hZA1tIaKqpU0ECArnqOpsjcHAoXxizr B6TBzwi8LHhdMM9ZfT1eOx+U33PVyQ3ckkKa9BVliss1h3McjQyYZaSq3dH3DdnPRn5D HnVfQMBcTvKp1Wpqy1ghBz6vaUF4H4r1AJ0jjcUPycJNFr4Tcj4BVujrFdzPIzlX92mi LVKg== 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 v77si53049026pfa.219.2019.04.17.00.36.40; Wed, 17 Apr 2019 00:36:54 -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 S1730922AbfDQHfe (ORCPT + 99 others); Wed, 17 Apr 2019 03:35:34 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:60999 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727282AbfDQHfd (ORCPT ); Wed, 17 Apr 2019 03:35:33 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x3H7ZHr5006556, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtitcasv01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x3H7ZHr5006556 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NOT); Wed, 17 Apr 2019 15:35:17 +0800 Received: from localhost (172.22.88.128) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.408.0; Wed, 17 Apr 2019 15:35:16 +0800 From: To: , , , CC: RickyWu Subject: [PATCH v2] misc: rtsx: Fixed rts5260 power saving parameter and sd glitch Date: Wed, 17 Apr 2019 15:35:08 +0800 Message-ID: <20190417073508.12389-1-ricky_wu@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.22.88.128] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: RickyWu this patch fixes rts5260 power saving parameter make power saving function work on L1.1, L1.2 Signed-off-by: RickyWu --- drivers/misc/cardreader/rts5260.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/misc/cardreader/rts5260.c b/drivers/misc/cardreader/rts5260.c index da22bcb62b04..52c95add56f0 100644 --- a/drivers/misc/cardreader/rts5260.c +++ b/drivers/misc/cardreader/rts5260.c @@ -451,6 +451,7 @@ static void rts5260_pwr_saving_setting(struct rtsx_pcr *pcr) lss_l1_2 = rtsx_check_dev_flag(pcr, ASPM_L1_2_EN) | rtsx_check_dev_flag(pcr, PM_L1_2_EN); + rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, 0xFF, 0); if (lss_l1_2) { pcr_dbg(pcr, "Set parameters for L1.2."); rtsx_pci_write_register(pcr, PWR_GLOBAL_CTRL, @@ -573,10 +574,10 @@ static int rts5260_extra_init_hw(struct rtsx_pcr *pcr) * to drive low, and we forcibly request clock. */ if (option->force_clkreq_0) - rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, + rtsx_pci_write_register(pcr, PETXCFG, FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_LOW); else - rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG, + rtsx_pci_write_register(pcr, PETXCFG, FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH); return 0; @@ -704,7 +705,7 @@ void rts5260_init_params(struct rtsx_pcr *pcr) option->ocp_en = 1; if (option->ocp_en) hw_param->interrupt_en |= SD_OC_INT_EN; - hw_param->ocp_glitch = SDVIO_OCP_GLITCH_800U | SDVIO_OCP_GLITCH_800U; + hw_param->ocp_glitch = SD_OCP_GLITCH_100U | SDVIO_OCP_GLITCH_800U; option->sd_400mA_ocp_thd = RTS5260_DVCC_OCP_THD_550; option->sd_800mA_ocp_thd = RTS5260_DVCC_OCP_THD_970; } -- 2.17.1