Re: [RESEND] mfd: rtsx: add support for rts522A

2015-10-09 Thread
Hi Lee Sorry for bother you, but I still can't see this patch applied. Is there something wrong? Regards. micky. On 07/08/2015 03:38 PM, Lee Jones wrote: > On Wed, 08 Jul 2015, 敬锐 wrote: > >> >> On 07/07/2015 07:46 PM, Lee Jones wrote: >>> On Mon, 29 Jun 2015, micky

Re: [RESEND] mfd: rtsx: add support for rts522A

2015-10-09 Thread
Hi Lee Sorry for bother you, but I still can't see this patch applied. Is there something wrong? Regards. micky. On 07/08/2015 03:38 PM, Lee Jones wrote: > On Wed, 08 Jul 2015, 敬锐 wrote: > >> >> On 07/07/2015 07:46 PM, Lee Jones wrote: >>> On Mon, 29 Jun 2015, micky

Re: [RESEND] mfd: rtsx: add support for rts522A

2015-07-07 Thread
On 07/07/2015 07:46 PM, Lee Jones wrote: > On Mon, 29 Jun 2015, micky_ch...@realsil.com.cn wrote: > >> From: Micky Ching >> >> rts522a(rts5227s) is derived from rts5227, and mainly same with rts5227. >> Add it to file mfd/rts5227.c to support this chip. >> >> Signed-off-by: Micky Ching >> ---

Re: [RESEND] mfd: rtsx: add support for rts522A

2015-07-07 Thread
On 07/07/2015 07:46 PM, Lee Jones wrote: On Mon, 29 Jun 2015, micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn rts522a(rts5227s) is derived from rts5227, and mainly same with rts5227. Add it to file mfd/rts5227.c to support this chip. Signed-off-by: Micky

Re: [RESEND PATCH v2 7/9] mfd: rtsx: add support for rts524A

2015-02-24 Thread
On 02/16/2015 10:28 PM, Lee Jones wrote: > > +static int rts524a_optimize_phy(struct rtsx_pcr *pcr) > +{ > + int err; > + > + err = rtsx_pci_write_register(pcr, RTS524A_PM_CTRL3, > + D3_DELINK_MODE_EN, 0x00); > + if (err < 0) > + return err; > + > +

Re: [RESEND PATCH v2 7/9] mfd: rtsx: add support for rts524A

2015-02-24 Thread
On 02/16/2015 10:28 PM, Lee Jones wrote: +static int rts524a_optimize_phy(struct rtsx_pcr *pcr) +{ + int err; + + err = rtsx_pci_write_register(pcr, RTS524A_PM_CTRL3, + D3_DELINK_MODE_EN, 0x00); + if (err 0) + return err; + +

Re: [RESEND PATCH v2 7/9] mfd: rtsx: add support for rts524A

2015-02-01 Thread
Hi Lee, do you have reviewed this patchset? regards. micky. On 01/22/2015 03:30 PM, micky_ch...@realsil.com.cn wrote: > From: Micky Ching > > add support for new chip rts524A. > > Signed-off-by: Micky Ching > --- > drivers/mfd/rts5249.c| 186 >

Re: [RESEND PATCH v2 7/9] mfd: rtsx: add support for rts524A

2015-02-01 Thread
Hi Lee, do you have reviewed this patchset? regards. micky. On 01/22/2015 03:30 PM, micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn add support for new chip rts524A. Signed-off-by: Micky Ching micky_ch...@realsil.com.cn --- drivers/mfd/rts5249.c|

Re: [PATCH] staging: rts5028: use msecs_to_jiffies for timeouts

2015-01-22 Thread
On 01/22/2015 05:01 PM, Nicholas Mc Guire wrote: > sorry - that was a typo - should this be > resubmitted for traceability or is that not > necessary ? resubmit, thanks.

Re: [PATCH] staging: rts5028: use msecs_to_jiffies for timeouts

2015-01-22 Thread
On 01/22/2015 05:01 PM, Nicholas Mc Guire wrote: sorry - that was a typo - should this be resubmitted for traceability or is that not necessary ? resubmit, thanks.

Re: [PATCH] staging: rts5028: use msecs_to_jiffies for timeouts

2015-01-21 Thread
the title should be 5208. On 01/19/2015 03:25 PM, Nicholas Mc Guire wrote: > This is only an API consolidation and should make things more readable > > Signed-off-by: Nicholas Mc Guire > --- > > Converting milliseconds to jiffies by val * HZ / 1000 is technically > not wrong but

Re: [PATCH] staging: rts5028: use msecs_to_jiffies for timeouts

2015-01-21 Thread
the title should be 5208. On 01/19/2015 03:25 PM, Nicholas Mc Guire wrote: This is only an API consolidation and should make things more readable Signed-off-by: Nicholas Mc Guire der.h...@hofr.at --- Converting milliseconds to jiffies by val * HZ / 1000 is technically not wrong but

Re: [PATCH 06/10] mfd: rtsx: update phy register

2015-01-19 Thread
On 01/19/2015 03:47 PM, Lee Jones wrote: > On Mon, 19 Jan 2015, 敬锐 wrote: >> >On 01/18/2015 08:29 PM, Lee Jones wrote: >>> > >On Thu, 15 Jan 2015,micky_ch...@realsil.com.cn wrote: >>> > > >>>> > >>From: Micky Ching >>>

Re: [PATCH 06/10] mfd: rtsx: update phy register

2015-01-19 Thread
On 01/19/2015 03:47 PM, Lee Jones wrote: On Mon, 19 Jan 2015, 敬锐 wrote: On 01/18/2015 08:29 PM, Lee Jones wrote: On Thu, 15 Jan 2015,micky_ch...@realsil.com.cn wrote: From: Micky Chingmicky_ch...@realsil.com.cn update phy register value and using direct value instead of macros

Re: [PATCH 08/10] mfd: rtsx: add support for rts524A

2015-01-18 Thread
On 01/18/2015 08:20 PM, Lee Jones wrote: >> +}; >> >+ >> >+void rts524a_init_params(struct rtsx_pcr *pcr) >> >+{ >> >+ rts5249_init_params(pcr); >> >+ >> >+ pcr->ops = _pcr_ops; >> >+} > I see a couple of these now. Why don't you make 'ops' a parameter of > *_init_params(). > *_init_params()

Re: [PATCH 09/10] mfd: rtsx: add support for rts525A

2015-01-18 Thread
On 01/18/2015 07:13 PM, Lee Jones wrote: >> @@ -97,7 +97,7 @@ static void rts5249_force_power_down(struct rtsx_pcr *pcr, >> u8 pm_state) >> >rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 3, 0x01, 0); >> > >> >if (pm_state == HOST_ENTER_S3) { >> >- if (PCI_PID(pcr) ==

Re: [PATCH 08/10] mfd: rtsx: add support for rts524A

2015-01-18 Thread
On 01/18/2015 08:20 PM, Lee Jones wrote: >> +static int rts524a_optimize_phy(struct rtsx_pcr *pcr) >> >+{ >> >+ int err; >> >+ >> >+ err = rtsx_pci_write_register(pcr, RTS524A_PM_CTRL3, >> >+ D3_DELINK_MODE_EN, 0x00); >> >+ if (err < 0) >> >+ return err; > if (err) > err

Re: [PATCH 08/10] mfd: rtsx: add support for rts524A

2015-01-18 Thread
On 01/18/2015 08:20 PM, Lee Jones wrote: >> @@ -72,8 +72,10 @@ static void rts5249_fetch_vendor_settings(struct rtsx_pcr >> *pcr) >> >rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ); >> >dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); >> > >> >- if

Re: [PATCH 06/10] mfd: rtsx: update phy register

2015-01-18 Thread
On 01/18/2015 08:29 PM, Lee Jones wrote: > On Thu, 15 Jan 2015, micky_ch...@realsil.com.cn wrote: > >> From: Micky Ching >> >> update phy register value and using direct value instead of macros. >> It is much easier to debug using constant value than a lot of macros. >> We usually need compare

Re: [PATCH 01/10] mfd: rtsx: replace TAB by SPC after #define

2015-01-18 Thread
On 01/18/2015 08:39 PM, Lee Jones wrote: > On Thu, 15 Jan 2015, micky_ch...@realsil.com.cn wrote: > >> From: Micky Ching >> >> Re-format coding-style, using uniform SPC after "#define" keyword >> instead of mixing using TAB and SPC. > Tabs and spaces in this context usually have different

Re: [PATCH 07/10] mfd: rtsx: remove LCTLR defination

2015-01-18 Thread
On 01/18/2015 08:28 PM, Lee Jones wrote: > On Thu, 15 Jan 2015, micky_ch...@realsil.com.cn wrote: > >> From: Micky Ching >> >> To enable/disable ASPM we should find LINK CONTROL register >> in PCI config space. All old chip use 0x80 address, but new >> chip may use another address, so we using

Re: [PATCH 06/10] mfd: rtsx: update phy register

2015-01-18 Thread
On 01/18/2015 08:29 PM, Lee Jones wrote: On Thu, 15 Jan 2015, micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn update phy register value and using direct value instead of macros. It is much easier to debug using constant value than a lot of macros. We usually

Re: [PATCH 08/10] mfd: rtsx: add support for rts524A

2015-01-18 Thread
On 01/18/2015 08:20 PM, Lee Jones wrote: +static int rts524a_optimize_phy(struct rtsx_pcr *pcr) +{ + int err; + + err = rtsx_pci_write_register(pcr, RTS524A_PM_CTRL3, + D3_DELINK_MODE_EN, 0x00); + if (err 0) + return err; if (err) err value will never be

Re: [PATCH 08/10] mfd: rtsx: add support for rts524A

2015-01-18 Thread
On 01/18/2015 08:20 PM, Lee Jones wrote: @@ -72,8 +72,10 @@ static void rts5249_fetch_vendor_settings(struct rtsx_pcr *pcr) rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, reg); dev_dbg((pcr-pci-dev), Cfg 0x%x: 0x%x\n, PCR_SETTING_REG1, reg); - if

Re: [PATCH 08/10] mfd: rtsx: add support for rts524A

2015-01-18 Thread
On 01/18/2015 08:20 PM, Lee Jones wrote: +}; + +void rts524a_init_params(struct rtsx_pcr *pcr) +{ + rts5249_init_params(pcr); + + pcr-ops = rts524a_pcr_ops; +} I see a couple of these now. Why don't you make 'ops' a parameter of *_init_params(). *_init_params() is called from

Re: [PATCH 09/10] mfd: rtsx: add support for rts525A

2015-01-18 Thread
On 01/18/2015 07:13 PM, Lee Jones wrote: @@ -97,7 +97,7 @@ static void rts5249_force_power_down(struct rtsx_pcr *pcr, u8 pm_state) rtsx_pci_write_register(pcr, AUTOLOAD_CFG_BASE + 3, 0x01, 0); if (pm_state == HOST_ENTER_S3) { - if (PCI_PID(pcr) == 0x524A) +

Re: [PATCH 07/10] mfd: rtsx: remove LCTLR defination

2015-01-18 Thread
On 01/18/2015 08:28 PM, Lee Jones wrote: On Thu, 15 Jan 2015, micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn To enable/disable ASPM we should find LINK CONTROL register in PCI config space. All old chip use 0x80 address, but new chip may use another address,

Re: [PATCH 01/10] mfd: rtsx: replace TAB by SPC after #define

2015-01-18 Thread
On 01/18/2015 08:39 PM, Lee Jones wrote: On Thu, 15 Jan 2015, micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn Re-format coding-style, using uniform SPC after #define keyword instead of mixing using TAB and SPC. Tabs and spaces in this context usually have

Re: [PATCH v4 1/6] mfd: rtsx: add func to split u32 into register

2014-12-08 Thread
On 12/08/2014 05:57 PM, Lee Jones wrote: > On Mon, 08 Dec 2014, 敬锐 wrote: > >> On 12/08/2014 04:49 PM, Lee Jones wrote: >>>> diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h >>>>> index 74346d5..9234449 100644 >>>>>

Re: [PATCH v4 1/6] mfd: rtsx: add func to split u32 into register

2014-12-08 Thread
On 12/08/2014 04:49 PM, Lee Jones wrote: >> diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h >> >index 74346d5..9234449 100644 >> >--- a/include/linux/mfd/rtsx_pci.h >> >+++ b/include/linux/mfd/rtsx_pci.h >> >@@ -558,6 +558,7 @@ >> > #define SD_SAMPLE_POINT_CTL

Re: [PATCH v4 1/6] mfd: rtsx: add func to split u32 into register

2014-12-08 Thread
On 12/08/2014 04:49 PM, Lee Jones wrote: diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 74346d5..9234449 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h @@ -558,6 +558,7 @@ #define SD_SAMPLE_POINT_CTL 0xFDA7

Re: [PATCH v4 1/6] mfd: rtsx: add func to split u32 into register

2014-12-08 Thread
On 12/08/2014 05:57 PM, Lee Jones wrote: On Mon, 08 Dec 2014, 敬锐 wrote: On 12/08/2014 04:49 PM, Lee Jones wrote: diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 74346d5..9234449 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h

Re: [PATCH v4 1/6] mfd: rtsx: add func to split u32 into register

2014-12-05 Thread
Hi Lee, this patch can be applied if you think it is ok, it doesn't depends other patches. regards. micky. On 12/05/2014 01:54 PM, micky_ch...@realsil.com.cn wrote: > From: Micky Ching > > Add helper function to write u32 to registers, if we want to put u32 > value to 4 continuous register,

Re: [PATCH v4 1/6] mfd: rtsx: add func to split u32 into register

2014-12-05 Thread
Hi Lee, this patch can be applied if you think it is ok, it doesn't depends other patches. regards. micky. On 12/05/2014 01:54 PM, micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn Add helper function to write u32 to registers, if we want to put u32 value to 4

Re: [PATCH v2 0/2] mmc: rtsx: add support for sdio card

2014-12-04 Thread
On 12/04/2014 09:52 PM, Ulf Hansson wrote: >> v3: >> > rtsx_pci_sdmmc.c: >> > - dump_reg_range >> > - remove unused pointer check >> > - fix start index > I can't find v3. > > Kind regards > Uffe > Sorry for mistake, This is v3, but subject is wrong.

Re: [PATCH v2 0/2] mmc: rtsx: add support for sdio card

2014-12-04 Thread
On 12/04/2014 09:52 PM, Ulf Hansson wrote: v3: rtsx_pci_sdmmc.c: - dump_reg_range - remove unused pointer check - fix start index I can't find v3. Kind regards Uffe Sorry for mistake, This is v3, but subject is wrong.

Re: [PATCH 1/2] mfd: rtsx: add func to split u32 into register

2014-11-28 Thread
Let's take an example, cmd.arg = ((ocr & 0xFF8000) != 0) << 8 | test_pattern; using "TP" name test_pattern for simplication , when we call: rtsx_pci_write_be32(pcr, SD_CMD1, cmd->arg); we should make sure TP write to SD_CMD4. If on "be" platform, then cpu_to_be32() do nothing, and TP is write

Re: [PATCH 1/2] mfd: rtsx: add func to split u32 into register

2014-11-28 Thread
Let's take an example, cmd.arg = ((ocr 0xFF8000) != 0) 8 | test_pattern; using TP name test_pattern for simplication , when we call: rtsx_pci_write_be32(pcr, SD_CMD1, cmd-arg); we should make sure TP write to SD_CMD4. If on be platform, then cpu_to_be32() do nothing, and TP is write to

Re: [PATCH 1/2] mfd: rtsx: add func to split u32 into register

2014-11-27 Thread
On 11/27/2014 11:23 PM, Dan Carpenter wrote: >> +static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 >> val) >> >+{ >> >+ rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val >> 24); >> >+ rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val >> 16); >> >+

Re: [PATCH 2/2] mmc: rtsx: add support for sdio card

2014-11-27 Thread
On 11/27/2014 11:43 PM, Dan Carpenter wrote: >> +int stat_idx = sd_status_index(rsp_type); > I have always hated this terrible pointer math. 5 is relative to > pcr->host_cmds_ptr + 1. It's a mess... 5 mean CRC7 offset of Response R1, see SD spec V3.01 Page 82. 4.9.1 R1 (normal response

Re: [PATCH 2/2] mmc: rtsx: add support for sdio card

2014-11-27 Thread
On 11/27/2014 11:43 PM, Dan Carpenter wrote: +int stat_idx = sd_status_index(rsp_type); I have always hated this terrible pointer math. 5 is relative to pcr-host_cmds_ptr + 1. It's a mess... 5 mean CRC7 offset of Response R1, see SD spec V3.01 Page 82. 4.9.1 R1 (normal response command).

Re: [PATCH 1/2] mfd: rtsx: add func to split u32 into register

2014-11-27 Thread
On 11/27/2014 11:23 PM, Dan Carpenter wrote: +static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val) +{ + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val 24); + rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val 16); + rtsx_pci_add_cmd(pcr,