FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 03-31-2011, 03:51 AM
Keng-Yu Lin
 
Default UBUNTU: SAUCE: (drop after 2.6.39) staging: rts_pstor: MSXC card power class

From: wwang <wei_wang@realsil.com.cn>

1, Initialize chip->ms_power_class_en in rtsx_init_options;
2, In reset_ms_pro, set different initial value of change_power_class
according to chip->ms_power_class_en.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

BugLink: http://bugs.launchpad.net/bugs/698006
(cherry picked from commit 9fe341e834bec1cad92c3f320931d0563674e112)

Signed-off-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
---
drivers/staging/rts_pstor/ms.c | 14 +++++++++-----
drivers/staging/rts_pstor/rtsx.c | 1 +
2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rts_pstor/ms.c b/drivers/staging/rts_pstor/ms.c
index c43f911..810e170 100644
--- a/drivers/staging/rts_pstor/ms.c
+++ b/drivers/staging/rts_pstor/ms.c
@@ -1099,7 +1099,14 @@ static int reset_ms_pro(struct rtsx_chip *chip)
struct ms_info *ms_card = &(chip->ms_card);
int retval;
#ifdef XC_POWERCLASS
- u8 change_power_class = 2;
+ u8 change_power_class;
+
+ if (chip->ms_power_class_en & 0x02)
+ change_power_class = 2;
+ else if (chip->ms_power_class_en & 0x01)
+ change_power_class = 1;
+ else
+ change_power_class = 0;
#endif

#ifdef XC_POWERCLASS
@@ -1128,10 +1135,7 @@ Retry:
}

if (change_power_class && CHK_MSXC(ms_card)) {
- u8 power_class_en = 0x03;
-
- if (CHECK_PID(chip, 0x5209))
- power_class_en = chip->ms_power_class_en;
+ u8 power_class_en = chip->ms_power_class_en;

RTSX_DEBUGP("power_class_en = 0x%x
", power_class_en);
RTSX_DEBUGP("change_power_class = %d
", change_power_class);
diff --git a/drivers/staging/rts_pstor/rtsx.c b/drivers/staging/rts_pstor/rtsx.c
index db3470e..4514419 100644
--- a/drivers/staging/rts_pstor/rtsx.c
+++ b/drivers/staging/rts_pstor/rtsx.c
@@ -850,6 +850,7 @@ static void rtsx_init_options(struct rtsx_chip *chip)
chip->sd_default_rx_phase = 15;
chip->pmos_pwr_on_interval = 200;
chip->sd_voltage_switch_delay = 1000;
+ chip->ms_power_class_en = 3;

chip->sd_400mA_ocp_thd = 1;
chip->sd_800mA_ocp_thd = 5;
--
1.7.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 03:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org