* [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
@ 2013-01-08 9:57 wei_wang
2013-01-08 9:57 ` [PATCH v4 1/8] MFD:rtsx: Fix typo in comment wei_wang
` (8 more replies)
0 siblings, 9 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
v2:
1. Add commit message for patch 2
2. Move pci_set_dma_mask before the pci_enable_device(pcidev) call
v3:
1. Add commit message for patch 3
2. Add patch 8: Use macro defines to replace some variables
v4:
1. Describe why patch 3 is needed
2. Modify a comment character in patch 7
Wei WANG (8):
MFD:rtsx: Fix typo in comment
MFD:rtsx: Remove redundant code
MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly
MFD:rtsx: Add callback function switch_output_voltage
MMC:rtsx: Using callback function to switch output voltage
MFD:rtsx: Add callback function conv_clk_and_div_n
MFD:rtsx: Fix checkpatch warning
MFD:rtsx: Use macro defines to replace some variables
drivers/mfd/rtl8411.c | 29 ++++++++++++++++++++++++
drivers/mfd/rts5209.c | 21 +++++++++++++++++
drivers/mfd/rts5229.c | 21 +++++++++++++++++
drivers/mfd/rtsx_pcr.c | 45 +++++++++++++++++++++++++------------
drivers/mfd/rtsx_pcr.h | 3 +++
drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +++++--------------------
include/linux/mfd/rtsx_common.h | 3 +++
include/linux/mfd/rtsx_pci.h | 27 +++++++++++++++++-----
8 files changed, 135 insertions(+), 44 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v4 1/8] MFD:rtsx: Fix typo in comment
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
@ 2013-01-08 9:57 ` wei_wang
2013-01-08 9:57 ` [PATCH v4 2/8] MFD:rtsx: Remove redundant code wei_wang
` (7 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
Fix a misspelling word in comment
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
include/linux/mfd/rtsx_pci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index 060b721..bebe9f9 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -452,7 +452,7 @@
#define SD_RSP_TYPE_R6 0x01
#define SD_RSP_TYPE_R7 0x01
-/* SD_CONFIURE3 */
+/* SD_CONFIGURE3 */
#define SD_RSP_80CLK_TIMEOUT_EN 0x01
/* Card Transfer Reset Register */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 2/8] MFD:rtsx: Remove redundant code
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
2013-01-08 9:57 ` [PATCH v4 1/8] MFD:rtsx: Fix typo in comment wei_wang
@ 2013-01-08 9:57 ` wei_wang
2013-01-08 9:57 ` [PATCH v4 3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly wei_wang
` (6 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
In function rtsx_pci_add_sg_tbl, the statement "ptr++" is useless.
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Borislav Petkov <bp@alien8.de>
---
drivers/mfd/rtsx_pcr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 3a44efa..fa2c2bc 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -325,7 +325,6 @@ static void rtsx_pci_add_sg_tbl(struct rtsx_pcr *pcr,
val = ((u64)addr << 32) | ((u64)len << 12) | option;
put_unaligned_le64(val, ptr);
- ptr++;
pcr->sgi++;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
2013-01-08 9:57 ` [PATCH v4 1/8] MFD:rtsx: Fix typo in comment wei_wang
2013-01-08 9:57 ` [PATCH v4 2/8] MFD:rtsx: Remove redundant code wei_wang
@ 2013-01-08 9:57 ` wei_wang
2013-01-08 9:57 ` [PATCH v4 4/8] MFD:rtsx: Add callback function switch_output_voltage wei_wang
` (5 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
Realtek PCIe card reader only supports 32bit DMA.
This declaration can improve the readability
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
drivers/mfd/rtsx_pcr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index fa2c2bc..1dc64bb 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -1010,6 +1010,10 @@ static int __devinit rtsx_pci_probe(struct pci_dev *pcidev,
pci_name(pcidev), (int)pcidev->vendor, (int)pcidev->device,
(int)pcidev->revision);
+ ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
+ if (ret < 0)
+ return ret;
+
ret = pci_enable_device(pcidev);
if (ret)
return ret;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 4/8] MFD:rtsx: Add callback function switch_output_voltage
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
` (2 preceding siblings ...)
2013-01-08 9:57 ` [PATCH v4 3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly wei_wang
@ 2013-01-08 9:57 ` wei_wang
2013-01-08 9:57 ` [PATCH v4 5/8] MMC:rtsx: Using callback function to switch output voltage wei_wang
` (4 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
Different card reader has different method to switch output voltage,
add this callback to let the card reader implement its individual switch
function.
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
drivers/mfd/rtl8411.c | 16 ++++++++++++++++
drivers/mfd/rts5209.c | 20 ++++++++++++++++++++
drivers/mfd/rts5229.c | 20 ++++++++++++++++++++
drivers/mfd/rtsx_pcr.c | 9 +++++++++
include/linux/mfd/rtsx_pci.h | 24 ++++++++++++++++++++----
5 files changed, 85 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c
index 89f046c..5058ba8 100644
--- a/drivers/mfd/rtl8411.c
+++ b/drivers/mfd/rtl8411.c
@@ -112,6 +112,21 @@ static int rtl8411_card_power_off(struct rtsx_pcr *pcr, int card)
BPP_LDO_POWB, BPP_LDO_SUSPEND);
}
+static int rtl8411_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage)
+{
+ u8 mask, val;
+
+ mask = (BPP_REG_TUNED18 << BPP_TUNED18_SHIFT_8411) | BPP_PAD_MASK;
+ if (voltage == OUTPUT_3V3)
+ val = (BPP_ASIC_3V3 << BPP_TUNED18_SHIFT_8411) | BPP_PAD_3V3;
+ else if (voltage == OUTPUT_1V8)
+ val = (BPP_ASIC_1V8 << BPP_TUNED18_SHIFT_8411) | BPP_PAD_1V8;
+ else
+ return -EINVAL;
+
+ return rtsx_pci_write_register(pcr, LDO_CTL, mask, val);
+}
+
static unsigned int rtl8411_cd_deglitch(struct rtsx_pcr *pcr)
{
unsigned int card_exist;
@@ -172,6 +187,7 @@ static const struct pcr_ops rtl8411_pcr_ops = {
.disable_auto_blink = rtl8411_disable_auto_blink,
.card_power_on = rtl8411_card_power_on,
.card_power_off = rtl8411_card_power_off,
+ .switch_output_voltage = rtl8411_switch_output_voltage,
.cd_deglitch = rtl8411_cd_deglitch,
};
diff --git a/drivers/mfd/rts5209.c b/drivers/mfd/rts5209.c
index 283a4f1..ba74de8 100644
--- a/drivers/mfd/rts5209.c
+++ b/drivers/mfd/rts5209.c
@@ -144,6 +144,25 @@ static int rts5209_card_power_off(struct rtsx_pcr *pcr, int card)
return rtsx_pci_send_cmd(pcr, 100);
}
+static int rts5209_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage)
+{
+ int err;
+
+ if (voltage == OUTPUT_3V3) {
+ err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4FC0 | 0x24);
+ if (err < 0)
+ return err;
+ } else if (voltage == OUTPUT_1V8) {
+ err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4C40 | 0x24);
+ if (err < 0)
+ return err;
+ } else {
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
static const struct pcr_ops rts5209_pcr_ops = {
.extra_init_hw = rts5209_extra_init_hw,
.optimize_phy = rts5209_optimize_phy,
@@ -153,6 +172,7 @@ static const struct pcr_ops rts5209_pcr_ops = {
.disable_auto_blink = rts5209_disable_auto_blink,
.card_power_on = rts5209_card_power_on,
.card_power_off = rts5209_card_power_off,
+ .switch_output_voltage = rts5209_switch_output_voltage,
.cd_deglitch = NULL,
};
diff --git a/drivers/mfd/rts5229.c b/drivers/mfd/rts5229.c
index b9dbab2..ec1747a 100644
--- a/drivers/mfd/rts5229.c
+++ b/drivers/mfd/rts5229.c
@@ -114,6 +114,25 @@ static int rts5229_card_power_off(struct rtsx_pcr *pcr, int card)
return rtsx_pci_send_cmd(pcr, 100);
}
+static int rts5229_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage)
+{
+ int err;
+
+ if (voltage == OUTPUT_3V3) {
+ err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4FC0 | 0x24);
+ if (err < 0)
+ return err;
+ } else if (voltage == OUTPUT_1V8) {
+ err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4C40 | 0x24);
+ if (err < 0)
+ return err;
+ } else {
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
static const struct pcr_ops rts5229_pcr_ops = {
.extra_init_hw = rts5229_extra_init_hw,
.optimize_phy = rts5229_optimize_phy,
@@ -123,6 +142,7 @@ static const struct pcr_ops rts5229_pcr_ops = {
.disable_auto_blink = rts5229_disable_auto_blink,
.card_power_on = rts5229_card_power_on,
.card_power_off = rts5229_card_power_off,
+ .switch_output_voltage = rts5229_switch_output_voltage,
.cd_deglitch = NULL,
};
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 1dc64bb..99e12b8 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -702,6 +702,15 @@ int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card)
}
EXPORT_SYMBOL_GPL(rtsx_pci_card_power_off);
+int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage)
+{
+ if (pcr->ops->switch_output_voltage)
+ return pcr->ops->switch_output_voltage(pcr, voltage);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(rtsx_pci_switch_output_voltage);
+
unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr)
{
unsigned int val;
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index bebe9f9..2e3e2e0 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -158,10 +158,9 @@
#define SG_TRANS_DATA (0x02 << 4)
#define SG_LINK_DESC (0x03 << 4)
-/* SD bank voltage */
-#define SD_IO_3V3 0
-#define SD_IO_1V8 1
-
+/* Output voltage */
+#define OUTPUT_3V3 0
+#define OUTPUT_1V8 1
/* Card Clock Enable Register */
#define SD_CLK_EN 0x04
@@ -201,6 +200,20 @@
#define CHANGE_CLK 0x01
/* LDO_CTL */
+#define BPP_ASIC_1V7 0x00
+#define BPP_ASIC_1V8 0x01
+#define BPP_ASIC_1V9 0x02
+#define BPP_ASIC_2V0 0x03
+#define BPP_ASIC_2V7 0x04
+#define BPP_ASIC_2V8 0x05
+#define BPP_ASIC_3V2 0x06
+#define BPP_ASIC_3V3 0x07
+#define BPP_REG_TUNED18 0x07
+#define BPP_TUNED18_SHIFT_8402 5
+#define BPP_TUNED18_SHIFT_8411 4
+#define BPP_PAD_MASK 0x04
+#define BPP_PAD_3V3 0x04
+#define BPP_PAD_1V8 0x00
#define BPP_LDO_POWB 0x03
#define BPP_LDO_ON 0x00
#define BPP_LDO_SUSPEND 0x02
@@ -688,6 +701,8 @@ struct pcr_ops {
int (*disable_auto_blink)(struct rtsx_pcr *pcr);
int (*card_power_on)(struct rtsx_pcr *pcr, int card);
int (*card_power_off)(struct rtsx_pcr *pcr, int card);
+ int (*switch_output_voltage)(struct rtsx_pcr *pcr,
+ u8 voltage);
unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);
};
@@ -783,6 +798,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk);
int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);
int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);
+int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage);
unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);
void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 5/8] MMC:rtsx: Using callback function to switch output voltage
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
` (3 preceding siblings ...)
2013-01-08 9:57 ` [PATCH v4 4/8] MFD:rtsx: Add callback function switch_output_voltage wei_wang
@ 2013-01-08 9:57 ` wei_wang
2013-01-08 9:57 ` [PATCH v4 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n wei_wang
` (3 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
Different card reader has different method to switch output voltage, so
we have to use the callback function provided by MFD driver to switch
output pad voltage.
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +++++-------------------------
1 file changed, 5 insertions(+), 25 deletions(-)
diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 571915d..f74b5ad 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1060,26 +1060,6 @@ static int sd_wait_voltage_stable_2(struct realtek_pci_sdmmc *host)
return 0;
}
-static int sd_change_bank_voltage(struct realtek_pci_sdmmc *host, u8 voltage)
-{
- struct rtsx_pcr *pcr = host->pcr;
- int err;
-
- if (voltage == SD_IO_3V3) {
- err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4FC0 | 0x24);
- if (err < 0)
- return err;
- } else if (voltage == SD_IO_1V8) {
- err = rtsx_pci_write_phy_register(pcr, 0x08, 0x4C40 | 0x24);
- if (err < 0)
- return err;
- } else {
- return -EINVAL;
- }
-
- return 0;
-}
-
static int sdmmc_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios)
{
struct realtek_pci_sdmmc *host = mmc_priv(mmc);
@@ -1098,11 +1078,11 @@ static int sdmmc_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios)
rtsx_pci_start_run(pcr);
if (ios->signal_voltage == MMC_SIGNAL_VOLTAGE_330)
- voltage = SD_IO_3V3;
+ voltage = OUTPUT_3V3;
else
- voltage = SD_IO_1V8;
+ voltage = OUTPUT_1V8;
- if (voltage == SD_IO_1V8) {
+ if (voltage == OUTPUT_1V8) {
err = rtsx_pci_write_register(pcr,
SD30_DRIVE_SEL, 0x07, DRIVER_TYPE_B);
if (err < 0)
@@ -1113,11 +1093,11 @@ static int sdmmc_switch_voltage(struct mmc_host *mmc, struct mmc_ios *ios)
goto out;
}
- err = sd_change_bank_voltage(host, voltage);
+ err = rtsx_pci_switch_output_voltage(pcr, voltage);
if (err < 0)
goto out;
- if (voltage == SD_IO_1V8) {
+ if (voltage == OUTPUT_1V8) {
err = sd_wait_voltage_stable_2(host);
if (err < 0)
goto out;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
` (4 preceding siblings ...)
2013-01-08 9:57 ` [PATCH v4 5/8] MMC:rtsx: Using callback function to switch output voltage wei_wang
@ 2013-01-08 9:57 ` wei_wang
2013-01-08 9:57 ` [PATCH v4 7/8] MFD:rtsx: Fix checkpatch warning wei_wang
` (2 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
Add callback function conv_clk_and_div_n to convert between SSC clock
and its divider N.
For rtl8411, the formula to calculate SSC clock divider N is different
with the other card reader models.
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
drivers/mfd/rtl8411.c | 13 +++++++++++++
drivers/mfd/rts5209.c | 1 +
drivers/mfd/rts5229.c | 1 +
drivers/mfd/rtsx_pcr.c | 14 ++++++++++++--
include/linux/mfd/rtsx_common.h | 3 +++
include/linux/mfd/rtsx_pci.h | 1 +
6 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c
index 5058ba8..3d3b4ad 100644
--- a/drivers/mfd/rtl8411.c
+++ b/drivers/mfd/rtl8411.c
@@ -178,6 +178,18 @@ static unsigned int rtl8411_cd_deglitch(struct rtsx_pcr *pcr)
return card_exist;
}
+static int rtl8411_conv_clk_and_div_n(int input, int dir)
+{
+ int output;
+
+ if (dir == CLK_TO_DIV_N)
+ output = input * 4 / 5 - 2;
+ else
+ output = (input + 2) * 5 / 4;
+
+ return output;
+}
+
static const struct pcr_ops rtl8411_pcr_ops = {
.extra_init_hw = rtl8411_extra_init_hw,
.optimize_phy = NULL,
@@ -189,6 +201,7 @@ static const struct pcr_ops rtl8411_pcr_ops = {
.card_power_off = rtl8411_card_power_off,
.switch_output_voltage = rtl8411_switch_output_voltage,
.cd_deglitch = rtl8411_cd_deglitch,
+ .conv_clk_and_div_n = rtl8411_conv_clk_and_div_n,
};
/* SD Pull Control Enable:
diff --git a/drivers/mfd/rts5209.c b/drivers/mfd/rts5209.c
index ba74de8..98fe0f3 100644
--- a/drivers/mfd/rts5209.c
+++ b/drivers/mfd/rts5209.c
@@ -174,6 +174,7 @@ static const struct pcr_ops rts5209_pcr_ops = {
.card_power_off = rts5209_card_power_off,
.switch_output_voltage = rts5209_switch_output_voltage,
.cd_deglitch = NULL,
+ .conv_clk_and_div_n = NULL,
};
/* SD Pull Control Enable:
diff --git a/drivers/mfd/rts5229.c b/drivers/mfd/rts5229.c
index ec1747a..29d889c 100644
--- a/drivers/mfd/rts5229.c
+++ b/drivers/mfd/rts5229.c
@@ -144,6 +144,7 @@ static const struct pcr_ops rts5229_pcr_ops = {
.card_power_off = rts5229_card_power_off,
.switch_output_voltage = rts5229_switch_output_voltage,
.cd_deglitch = NULL,
+ .conv_clk_and_div_n = NULL,
};
/* SD Pull Control Enable:
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 99e12b8..958b738 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -629,7 +629,10 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
if (clk == pcr->cur_clock)
return 0;
- N = (u8)(clk - 2);
+ if (pcr->ops->conv_clk_and_div_n)
+ N = (u8)pcr->ops->conv_clk_and_div_n(clk, CLK_TO_DIV_N);
+ else
+ N = (u8)(clk - 2);
if ((clk <= 2) || (N > max_N))
return -EINVAL;
@@ -640,7 +643,14 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
/* Make sure that the SSC clock div_n is equal or greater than min_N */
div = CLK_DIV_1;
while ((N < min_N) && (div < max_div)) {
- N = (N + 2) * 2 - 2;
+ if (pcr->ops->conv_clk_and_div_n) {
+ int dbl_clk = pcr->ops->conv_clk_and_div_n(N,
+ DIV_N_TO_CLK) * 2;
+ N = (u8)pcr->ops->conv_clk_and_div_n(dbl_clk,
+ CLK_TO_DIV_N);
+ } else {
+ N = (N + 2) * 2 - 2;
+ }
div++;
}
dev_dbg(&(pcr->pci->dev), "N = %d, div = %d\n", N, div);
diff --git a/include/linux/mfd/rtsx_common.h b/include/linux/mfd/rtsx_common.h
index a8d393e..2b13970 100644
--- a/include/linux/mfd/rtsx_common.h
+++ b/include/linux/mfd/rtsx_common.h
@@ -38,6 +38,9 @@
#define RTSX_SD_CARD 0
#define RTSX_MS_CARD 1
+#define CLK_TO_DIV_N 0
+#define DIV_N_TO_CLK 1
+
struct platform_device;
struct rtsx_slot {
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index 2e3e2e0..3f2bf26 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -704,6 +704,7 @@ struct pcr_ops {
int (*switch_output_voltage)(struct rtsx_pcr *pcr,
u8 voltage);
unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);
+ int (*conv_clk_and_div_n)(int clk, int dir);
};
enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN};
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 7/8] MFD:rtsx: Fix checkpatch warning
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
` (5 preceding siblings ...)
2013-01-08 9:57 ` [PATCH v4 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n wei_wang
@ 2013-01-08 9:57 ` wei_wang
2013-01-08 9:57 ` [PATCH v4 8/8] MFD:rtsx: Use macro defines to replace some variables wei_wang
2013-01-16 9:02 ` [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wwang
8 siblings, 0 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
WARNING: Avoid CamelCase: <min_N>
+ u8 N, min_N, max_N, clk_divider;
WARNING: Avoid CamelCase: <max_N>
+ u8 N, min_N, max_N, clk_divider;
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
drivers/mfd/rtsx_pcr.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 958b738..69e8a1e 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -590,7 +590,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk)
{
int err, clk;
- u8 N, min_N, max_N, clk_divider;
+ u8 n, min_n, max_n, clk_divider;
u8 mcu_cnt, div, max_div;
u8 depth[] = {
[RTSX_SSC_DEPTH_4M] = SSC_DEPTH_4M,
@@ -615,8 +615,8 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
card_clock /= 1000000;
dev_dbg(&(pcr->pci->dev), "Switch card clock to %dMHz\n", card_clock);
- min_N = 80;
- max_N = 208;
+ min_n = 80;
+ max_n = 208;
max_div = CLK_DIV_8;
clk = card_clock;
@@ -630,30 +630,30 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
return 0;
if (pcr->ops->conv_clk_and_div_n)
- N = (u8)pcr->ops->conv_clk_and_div_n(clk, CLK_TO_DIV_N);
+ n = (u8)pcr->ops->conv_clk_and_div_n(clk, CLK_TO_DIV_N);
else
- N = (u8)(clk - 2);
- if ((clk <= 2) || (N > max_N))
+ n = (u8)(clk - 2);
+ if ((clk <= 2) || (n > max_n))
return -EINVAL;
mcu_cnt = (u8)(125/clk + 3);
if (mcu_cnt > 15)
mcu_cnt = 15;
- /* Make sure that the SSC clock div_n is equal or greater than min_N */
+ /* Make sure that the SSC clock div_n is equal or greater than min_n */
div = CLK_DIV_1;
- while ((N < min_N) && (div < max_div)) {
+ while ((n < min_n) && (div < max_div)) {
if (pcr->ops->conv_clk_and_div_n) {
- int dbl_clk = pcr->ops->conv_clk_and_div_n(N,
+ int dbl_clk = pcr->ops->conv_clk_and_div_n(n,
DIV_N_TO_CLK) * 2;
- N = (u8)pcr->ops->conv_clk_and_div_n(dbl_clk,
+ n = (u8)pcr->ops->conv_clk_and_div_n(dbl_clk,
CLK_TO_DIV_N);
} else {
- N = (N + 2) * 2 - 2;
+ n = (n + 2) * 2 - 2;
}
div++;
}
- dev_dbg(&(pcr->pci->dev), "N = %d, div = %d\n", N, div);
+ dev_dbg(&(pcr->pci->dev), "n = %d, div = %d\n", n, div);
ssc_depth = depth[ssc_depth];
if (double_clk)
@@ -670,7 +670,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, 0);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL2,
SSC_DEPTH_MASK, ssc_depth);
- rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_DIV_N_0, 0xFF, N);
+ rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_DIV_N_0, 0xFF, n);
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SSC_CTL1, SSC_RSTB, SSC_RSTB);
if (vpclk) {
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, SD_VPCLK0_CTL,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v4 8/8] MFD:rtsx: Use macro defines to replace some variables
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
` (6 preceding siblings ...)
2013-01-08 9:57 ` [PATCH v4 7/8] MFD:rtsx: Fix checkpatch warning wei_wang
@ 2013-01-08 9:57 ` wei_wang
2013-01-16 9:02 ` [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wwang
8 siblings, 0 replies; 17+ messages in thread
From: wei_wang @ 2013-01-08 9:57 UTC (permalink / raw)
To: cjb, sameo
Cc: devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp, Wei WANG
From: Wei WANG <wei_wang@realsil.com.cn>
In function rtsx_pci_switch_clock, some variables, such as min_n, max_n,
and max_div, are not necessary. And those assigned values look very
obscure for others. It's more proper to use macro definitions here to
replace these variables.
Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Borislav Petkov <bp@alien8.de>
---
drivers/mfd/rtsx_pcr.c | 13 ++++---------
drivers/mfd/rtsx_pcr.h | 3 +++
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 69e8a1e..ccdb026 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -590,8 +590,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk)
{
int err, clk;
- u8 n, min_n, max_n, clk_divider;
- u8 mcu_cnt, div, max_div;
+ u8 n, clk_divider, mcu_cnt, div;
u8 depth[] = {
[RTSX_SSC_DEPTH_4M] = SSC_DEPTH_4M,
[RTSX_SSC_DEPTH_2M] = SSC_DEPTH_2M,
@@ -615,10 +614,6 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
card_clock /= 1000000;
dev_dbg(&(pcr->pci->dev), "Switch card clock to %dMHz\n", card_clock);
- min_n = 80;
- max_n = 208;
- max_div = CLK_DIV_8;
-
clk = card_clock;
if (!initial_mode && double_clk)
clk = card_clock * 2;
@@ -633,16 +628,16 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
n = (u8)pcr->ops->conv_clk_and_div_n(clk, CLK_TO_DIV_N);
else
n = (u8)(clk - 2);
- if ((clk <= 2) || (n > max_n))
+ if ((clk <= 2) || (n > MAX_DIV_N_PCR))
return -EINVAL;
mcu_cnt = (u8)(125/clk + 3);
if (mcu_cnt > 15)
mcu_cnt = 15;
- /* Make sure that the SSC clock div_n is equal or greater than min_n */
+ /* Make sure that the SSC clock div_n is not less than MIN_DIV_N_PCR */
div = CLK_DIV_1;
- while ((n < min_n) && (div < max_div)) {
+ while ((n < MIN_DIV_N_PCR) && (div < CLK_DIV_8)) {
if (pcr->ops->conv_clk_and_div_n) {
int dbl_clk = pcr->ops->conv_clk_and_div_n(n,
DIV_N_TO_CLK) * 2;
diff --git a/drivers/mfd/rtsx_pcr.h b/drivers/mfd/rtsx_pcr.h
index 12462c1..33c210b 100644
--- a/drivers/mfd/rtsx_pcr.h
+++ b/drivers/mfd/rtsx_pcr.h
@@ -25,6 +25,9 @@
#include <linux/mfd/rtsx_pci.h>
+#define MIN_DIV_N_PCR 80
+#define MAX_DIV_N_PCR 208
+
void rts5209_init_params(struct rtsx_pcr *pcr);
void rts5229_init_params(struct rtsx_pcr *pcr);
void rtl8411_init_params(struct rtsx_pcr *pcr);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
` (7 preceding siblings ...)
2013-01-08 9:57 ` [PATCH v4 8/8] MFD:rtsx: Use macro defines to replace some variables wei_wang
@ 2013-01-16 9:02 ` wwang
2013-01-22 3:31 ` Samuel Ortiz
8 siblings, 1 reply; 17+ messages in thread
From: wwang @ 2013-01-16 9:02 UTC (permalink / raw)
To: 王炜
Cc: cjb, sameo, devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp
于 2013年01月08日 17:57, 王炜 写道:
> From: Wei WANG <wei_wang@realsil.com.cn>
>
> v2:
> 1. Add commit message for patch 2
> 2. Move pci_set_dma_mask before the pci_enable_device(pcidev) call
>
> v3:
> 1. Add commit message for patch 3
> 2. Add patch 8: Use macro defines to replace some variables
>
> v4:
> 1. Describe why patch 3 is needed
> 2. Modify a comment character in patch 7
>
> Wei WANG (8):
> MFD:rtsx: Fix typo in comment
> MFD:rtsx: Remove redundant code
> MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly
> MFD:rtsx: Add callback function switch_output_voltage
> MMC:rtsx: Using callback function to switch output voltage
> MFD:rtsx: Add callback function conv_clk_and_div_n
> MFD:rtsx: Fix checkpatch warning
> MFD:rtsx: Use macro defines to replace some variables
>
> drivers/mfd/rtl8411.c | 29 ++++++++++++++++++++++++
> drivers/mfd/rts5209.c | 21 +++++++++++++++++
> drivers/mfd/rts5229.c | 21 +++++++++++++++++
> drivers/mfd/rtsx_pcr.c | 45 +++++++++++++++++++++++++------------
> drivers/mfd/rtsx_pcr.h | 3 +++
> drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +++++--------------------
> include/linux/mfd/rtsx_common.h | 3 +++
> include/linux/mfd/rtsx_pci.h | 27 +++++++++++++++++-----
> 8 files changed, 135 insertions(+), 44 deletions(-)
>
Hi Chris and Samuel:
This patchset is trying to fix some bugs and some coding style issues.
Would you please help to merge it to v3.8 kernel?
BR,
Wei WANG
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
2013-01-16 9:02 ` [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wwang
@ 2013-01-22 3:31 ` Samuel Ortiz
2013-01-22 3:39 ` wwang
0 siblings, 1 reply; 17+ messages in thread
From: Samuel Ortiz @ 2013-01-22 3:31 UTC (permalink / raw)
To: wwang; +Cc: cjb, devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp
Hi Wei,
On Wed, Jan 16, 2013 at 05:02:37PM +0800, wwang wrote:
> 于 2013年01月08日 17:57, 王炜 写道:
> > From: Wei WANG <wei_wang@realsil.com.cn>
> >
> > v2:
> > 1. Add commit message for patch 2
> > 2. Move pci_set_dma_mask before the pci_enable_device(pcidev) call
> >
> > v3:
> > 1. Add commit message for patch 3
> > 2. Add patch 8: Use macro defines to replace some variables
> >
> > v4:
> > 1. Describe why patch 3 is needed
> > 2. Modify a comment character in patch 7
> >
> > Wei WANG (8):
> > MFD:rtsx: Fix typo in comment
> > MFD:rtsx: Remove redundant code
> > MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly
> > MFD:rtsx: Add callback function switch_output_voltage
> > MMC:rtsx: Using callback function to switch output voltage
> > MFD:rtsx: Add callback function conv_clk_and_div_n
> > MFD:rtsx: Fix checkpatch warning
> > MFD:rtsx: Use macro defines to replace some variables
> >
> > drivers/mfd/rtl8411.c | 29 ++++++++++++++++++++++++
> > drivers/mfd/rts5209.c | 21 +++++++++++++++++
> > drivers/mfd/rts5229.c | 21 +++++++++++++++++
> > drivers/mfd/rtsx_pcr.c | 45 +++++++++++++++++++++++++------------
> > drivers/mfd/rtsx_pcr.h | 3 +++
> > drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +++++--------------------
> > include/linux/mfd/rtsx_common.h | 3 +++
> > include/linux/mfd/rtsx_pci.h | 27 +++++++++++++++++-----
> > 8 files changed, 135 insertions(+), 44 deletions(-)
> >
> Hi Chris and Samuel:
>
> This patchset is trying to fix some bugs and some coding style issues.
> Would you please help to merge it to v3.8 kernel?
I'll only take bug fixes for 3.8, even minor ones, and I don't see real bug
fixes here. Am I missing something ?
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
2013-01-22 3:31 ` Samuel Ortiz
@ 2013-01-22 3:39 ` wwang
2013-01-22 22:42 ` Samuel Ortiz
0 siblings, 1 reply; 17+ messages in thread
From: wwang @ 2013-01-22 3:39 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: cjb, devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp
于 2013年01月22日 11:31, Samuel Ortiz 写道:
> Hi Wei,
>
> On Wed, Jan 16, 2013 at 05:02:37PM +0800, wwang wrote:
>> 于 2013年01月08日 17:57, 王炜 写道:
>>> From: Wei WANG <wei_wang@realsil.com.cn>
>>>
>>> v2:
>>> 1. Add commit message for patch 2
>>> 2. Move pci_set_dma_mask before the pci_enable_device(pcidev) call
>>>
>>> v3:
>>> 1. Add commit message for patch 3
>>> 2. Add patch 8: Use macro defines to replace some variables
>>>
>>> v4:
>>> 1. Describe why patch 3 is needed
>>> 2. Modify a comment character in patch 7
>>>
>>> Wei WANG (8):
>>> MFD:rtsx: Fix typo in comment
>>> MFD:rtsx: Remove redundant code
>>> MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly
>>> MFD:rtsx: Add callback function switch_output_voltage
>>> MMC:rtsx: Using callback function to switch output voltage
>>> MFD:rtsx: Add callback function conv_clk_and_div_n
>>> MFD:rtsx: Fix checkpatch warning
>>> MFD:rtsx: Use macro defines to replace some variables
>>>
>>> drivers/mfd/rtl8411.c | 29 ++++++++++++++++++++++++
>>> drivers/mfd/rts5209.c | 21 +++++++++++++++++
>>> drivers/mfd/rts5229.c | 21 +++++++++++++++++
>>> drivers/mfd/rtsx_pcr.c | 45 +++++++++++++++++++++++++------------
>>> drivers/mfd/rtsx_pcr.h | 3 +++
>>> drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +++++--------------------
>>> include/linux/mfd/rtsx_common.h | 3 +++
>>> include/linux/mfd/rtsx_pci.h | 27 +++++++++++++++++-----
>>> 8 files changed, 135 insertions(+), 44 deletions(-)
>>>
>> Hi Chris and Samuel:
>>
>> This patchset is trying to fix some bugs and some coding style issues.
>> Would you please help to merge it to v3.8 kernel?
> I'll only take bug fixes for 3.8, even minor ones, and I don't see real bug
> fixes here. Am I missing something ?
>
> Cheers,
> Samuel.
>
Hi Samuel:
The commits below are all bug fix ( fix rtl8411 specifically)
MFD:rtsx: Add callback function switch_output_voltage
MMC:rtsx: Using callback function to switch output voltage
MFD:rtsx: Add callback function conv_clk_and_div_n
The other commits are for coding style issues
BR,
Wei WANG
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
2013-01-22 3:39 ` wwang
@ 2013-01-22 22:42 ` Samuel Ortiz
2013-01-23 1:23 ` pclinux
0 siblings, 1 reply; 17+ messages in thread
From: Samuel Ortiz @ 2013-01-22 22:42 UTC (permalink / raw)
To: wwang; +Cc: cjb, devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp
On Tue, Jan 22, 2013 at 11:39:09AM +0800, wwang wrote:
> >>>Wei WANG (8):
> >>> MFD:rtsx: Fix typo in comment
> >>> MFD:rtsx: Remove redundant code
> >>> MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly
> >>> MFD:rtsx: Add callback function switch_output_voltage
> >>> MMC:rtsx: Using callback function to switch output voltage
> >>> MFD:rtsx: Add callback function conv_clk_and_div_n
> >>> MFD:rtsx: Fix checkpatch warning
> >>> MFD:rtsx: Use macro defines to replace some variables
> >>>
> >>> drivers/mfd/rtl8411.c | 29 ++++++++++++++++++++++++
> >>> drivers/mfd/rts5209.c | 21 +++++++++++++++++
> >>> drivers/mfd/rts5229.c | 21 +++++++++++++++++
> >>> drivers/mfd/rtsx_pcr.c | 45 +++++++++++++++++++++++++------------
> >>> drivers/mfd/rtsx_pcr.h | 3 +++
> >>> drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +++++--------------------
> >>> include/linux/mfd/rtsx_common.h | 3 +++
> >>> include/linux/mfd/rtsx_pci.h | 27 +++++++++++++++++-----
> >>> 8 files changed, 135 insertions(+), 44 deletions(-)
> >>>
> >>Hi Chris and Samuel:
> >>
> >>This patchset is trying to fix some bugs and some coding style issues.
> >>Would you please help to merge it to v3.8 kernel?
> >I'll only take bug fixes for 3.8, even minor ones, and I don't see real bug
> >fixes here. Am I missing something ?
> >
> >Cheers,
> >Samuel.
> >
> Hi Samuel:
>
> The commits below are all bug fix ( fix rtl8411 specifically)
>
> MFD:rtsx: Add callback function switch_output_voltage
> MMC:rtsx: Using callback function to switch output voltage
> MFD:rtsx: Add callback function conv_clk_and_div_n
Would you mind building a separate patchset for those 3, against e.g. a
vanilla 3.8-rc4 kernel ? Otherwise they won't apply cleanly against my
for-linus tree.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
2013-01-22 22:42 ` Samuel Ortiz
@ 2013-01-23 1:23 ` pclinux
2013-01-23 1:32 ` wwang
2013-01-23 7:21 ` Dan Carpenter
0 siblings, 2 replies; 17+ messages in thread
From: pclinux @ 2013-01-23 1:23 UTC (permalink / raw)
To: Samuel Ortiz
Cc: 王炜,
cjb, devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp
于 2013年01月23日 06:42, Samuel Ortiz 写道:
> On Tue, Jan 22, 2013 at 11:39:09AM +0800, wwang wrote:
>>>>> Wei WANG (8):
>>>>> MFD:rtsx: Fix typo in comment
>>>>> MFD:rtsx: Remove redundant code
>>>>> MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly
>>>>> MFD:rtsx: Add callback function switch_output_voltage
>>>>> MMC:rtsx: Using callback function to switch output voltage
>>>>> MFD:rtsx: Add callback function conv_clk_and_div_n
>>>>> MFD:rtsx: Fix checkpatch warning
>>>>> MFD:rtsx: Use macro defines to replace some variables
>>>>>
>>>>> drivers/mfd/rtl8411.c | 29 ++++++++++++++++++++++++
>>>>> drivers/mfd/rts5209.c | 21 +++++++++++++++++
>>>>> drivers/mfd/rts5229.c | 21 +++++++++++++++++
>>>>> drivers/mfd/rtsx_pcr.c | 45 +++++++++++++++++++++++++------------
>>>>> drivers/mfd/rtsx_pcr.h | 3 +++
>>>>> drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +++++--------------------
>>>>> include/linux/mfd/rtsx_common.h | 3 +++
>>>>> include/linux/mfd/rtsx_pci.h | 27 +++++++++++++++++-----
>>>>> 8 files changed, 135 insertions(+), 44 deletions(-)
>>>>>
>>>> Hi Chris and Samuel:
>>>>
>>>> This patchset is trying to fix some bugs and some coding style issues.
>>>> Would you please help to merge it to v3.8 kernel?
>>> I'll only take bug fixes for 3.8, even minor ones, and I don't see real bug
>>> fixes here. Am I missing something ?
>>>
>>> Cheers,
>>> Samuel.
>>>
>> Hi Samuel:
>>
>> The commits below are all bug fix ( fix rtl8411 specifically)
>>
>> MFD:rtsx: Add callback function switch_output_voltage
>> MMC:rtsx: Using callback function to switch output voltage
>> MFD:rtsx: Add callback function conv_clk_and_div_n
> Would you mind building a separate patchset for those 3, against e.g. a
> vanilla 3.8-rc4 kernel ? Otherwise they won't apply cleanly against my
> for-linus tree.
>
> Cheers,
> Samuel.
>
Hi Samuel:
Sure. I will do it.
Does it mean that the other commits only can be submitted to 3.9-rc?
BR,
Wei WANG
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
2013-01-23 1:23 ` pclinux
@ 2013-01-23 1:32 ` wwang
2013-01-23 15:37 ` Samuel Ortiz
2013-01-23 7:21 ` Dan Carpenter
1 sibling, 1 reply; 17+ messages in thread
From: wwang @ 2013-01-23 1:32 UTC (permalink / raw)
To: pclinux
Cc: Samuel Ortiz, cjb, devel, linux-kernel, linux-mmc, gregkh, arnd,
oakad, bp
于 2013年01月23日 09:23, pclinux 写道:
> 于 2013年01月23日 06:42, Samuel Ortiz 写道:
>> On Tue, Jan 22, 2013 at 11:39:09AM +0800, wwang wrote:
>>>>>> Wei WANG (8):
>>>>>> MFD:rtsx: Fix typo in comment
>>>>>> MFD:rtsx: Remove redundant code
>>>>>> MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly
>>>>>> MFD:rtsx: Add callback function switch_output_voltage
>>>>>> MMC:rtsx: Using callback function to switch output voltage
>>>>>> MFD:rtsx: Add callback function conv_clk_and_div_n
>>>>>> MFD:rtsx: Fix checkpatch warning
>>>>>> MFD:rtsx: Use macro defines to replace some variables
>>>>>>
>>>>>> drivers/mfd/rtl8411.c | 29 ++++++++++++++++++++++++
>>>>>> drivers/mfd/rts5209.c | 21 +++++++++++++++++
>>>>>> drivers/mfd/rts5229.c | 21 +++++++++++++++++
>>>>>> drivers/mfd/rtsx_pcr.c | 45 +++++++++++++++++++++++++------------
>>>>>> drivers/mfd/rtsx_pcr.h | 3 +++
>>>>>> drivers/mmc/host/rtsx_pci_sdmmc.c | 30 +++++--------------------
>>>>>> include/linux/mfd/rtsx_common.h | 3 +++
>>>>>> include/linux/mfd/rtsx_pci.h | 27 +++++++++++++++++-----
>>>>>> 8 files changed, 135 insertions(+), 44 deletions(-)
>>>>>>
>>>>> Hi Chris and Samuel:
>>>>>
>>>>> This patchset is trying to fix some bugs and some coding style issues.
>>>>> Would you please help to merge it to v3.8 kernel?
>>>> I'll only take bug fixes for 3.8, even minor ones, and I don't see real bug
>>>> fixes here. Am I missing something ?
>>>>
>>>> Cheers,
>>>> Samuel.
>>>>
>>> Hi Samuel:
>>>
>>> The commits below are all bug fix ( fix rtl8411 specifically)
>>>
>>> MFD:rtsx: Add callback function switch_output_voltage
>>> MMC:rtsx: Using callback function to switch output voltage
>>> MFD:rtsx: Add callback function conv_clk_and_div_n
>> Would you mind building a separate patchset for those 3, against e.g. a
>> vanilla 3.8-rc4 kernel ? Otherwise they won't apply cleanly against my
>> for-linus tree.
>>
>> Cheers,
>> Samuel.
>>
> Hi Samuel:
>
> Sure. I will do it.
> Does it mean that the other commits only can be submitted to 3.9-rc?
>
> BR,
> Wei WANG
Hi Samuel:
Sorry, pclinux is also me. I always mess the two mail accounts up.
I would like to repeat my question. Does it mean that the other commits
only can be submitted to 3.9-rc?
BR,
Wei WANG
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
2013-01-23 1:23 ` pclinux
2013-01-23 1:32 ` wwang
@ 2013-01-23 7:21 ` Dan Carpenter
1 sibling, 0 replies; 17+ messages in thread
From: Dan Carpenter @ 2013-01-23 7:21 UTC (permalink / raw)
To: pclinux
Cc: Samuel Ortiz, oakad, arnd, gregkh, linux-mmc, linux-kernel,
王炜,
bp, devel, cjb
On Wed, Jan 23, 2013 at 09:23:57AM +0800, pclinux wrote:
> Sure. I will do it.
> Does it mean that the other commits only can be submitted to 3.9-rc?
>
Submit them now. They stay in Samuel's tree and are tested in
linux-next until 3.8 is released. Then Samuel submits them during
the 3.9 merge window.
The merge window is for Samuel => Linus, it's not for you => Samuel.
If your code has not reached Samuel's tree before 3.8 has been
released then it's too late and it will be delayed for another few
months.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v4 0/8] rtsx patchset for MFD and MMC tree
2013-01-23 1:32 ` wwang
@ 2013-01-23 15:37 ` Samuel Ortiz
0 siblings, 0 replies; 17+ messages in thread
From: Samuel Ortiz @ 2013-01-23 15:37 UTC (permalink / raw)
To: wwang
Cc: pclinux, cjb, devel, linux-kernel, linux-mmc, gregkh, arnd, oakad, bp
Hi Wei,
On Wed, Jan 23, 2013 at 09:32:15AM +0800, wwang wrote:
> Hi Samuel:
>
> Sorry, pclinux is also me. I always mess the two mail accounts up.
> I would like to repeat my question. Does it mean that the other commits
> only can be submitted to 3.9-rc?
Yes, that's how I prefer to handle it.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-01-23 15:38 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-08 9:57 [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wei_wang
2013-01-08 9:57 ` [PATCH v4 1/8] MFD:rtsx: Fix typo in comment wei_wang
2013-01-08 9:57 ` [PATCH v4 2/8] MFD:rtsx: Remove redundant code wei_wang
2013-01-08 9:57 ` [PATCH v4 3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly wei_wang
2013-01-08 9:57 ` [PATCH v4 4/8] MFD:rtsx: Add callback function switch_output_voltage wei_wang
2013-01-08 9:57 ` [PATCH v4 5/8] MMC:rtsx: Using callback function to switch output voltage wei_wang
2013-01-08 9:57 ` [PATCH v4 6/8] MFD:rtsx: Add callback function conv_clk_and_div_n wei_wang
2013-01-08 9:57 ` [PATCH v4 7/8] MFD:rtsx: Fix checkpatch warning wei_wang
2013-01-08 9:57 ` [PATCH v4 8/8] MFD:rtsx: Use macro defines to replace some variables wei_wang
2013-01-16 9:02 ` [PATCH v4 0/8] rtsx patchset for MFD and MMC tree wwang
2013-01-22 3:31 ` Samuel Ortiz
2013-01-22 3:39 ` wwang
2013-01-22 22:42 ` Samuel Ortiz
2013-01-23 1:23 ` pclinux
2013-01-23 1:32 ` wwang
2013-01-23 15:37 ` Samuel Ortiz
2013-01-23 7:21 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).