diff options
author | Micky Ching <micky_ching@realsil.com.cn> | 2015-02-25 00:50:16 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2015-03-03 11:41:21 -0500 |
commit | 0523b8f41473c3d869adebeb029b5dc045ab35d8 (patch) | |
tree | 9ef134e5fc38d476d284922503a3dbe3a65ff7cc | |
parent | 41bc2334737a32d3062a318dde5964590d0e24c9 (diff) |
mfd: rtsx: Using pcr_dbg replace dev_dbg
pcr_dbg is a wrapper of dev_dbg, which can save some code,
and help to enable/disable debug message static.
Signed-off-by: Micky Ching <micky_ching@realsil.com.cn>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/rtl8411.c | 11 | ||||
-rw-r--r-- | drivers/mfd/rts5209.c | 4 | ||||
-rw-r--r-- | drivers/mfd/rts5227.c | 4 | ||||
-rw-r--r-- | drivers/mfd/rts5229.c | 4 | ||||
-rw-r--r-- | drivers/mfd/rts5249.c | 4 | ||||
-rw-r--r-- | drivers/mfd/rtsx_pcr.c | 49 |
6 files changed, 35 insertions, 41 deletions
diff --git a/drivers/mfd/rtl8411.c b/drivers/mfd/rtl8411.c index fdd34c883d86..b3ae6592014a 100644 --- a/drivers/mfd/rtl8411.c +++ b/drivers/mfd/rtl8411.c | |||
@@ -53,7 +53,7 @@ static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
53 | u8 reg3 = 0; | 53 | u8 reg3 = 0; |
54 | 54 | ||
55 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®1); | 55 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®1); |
56 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1); | 56 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1); |
57 | 57 | ||
58 | if (!rtsx_vendor_setting_valid(reg1)) | 58 | if (!rtsx_vendor_setting_valid(reg1)) |
59 | return; | 59 | return; |
@@ -65,7 +65,7 @@ static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
65 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg1); | 65 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg1); |
66 | 66 | ||
67 | rtsx_pci_read_config_byte(pcr, PCR_SETTING_REG3, ®3); | 67 | rtsx_pci_read_config_byte(pcr, PCR_SETTING_REG3, ®3); |
68 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG3, reg3); | 68 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG3, reg3); |
69 | pcr->sd30_drive_sel_3v3 = rtl8411_reg_to_sd30_drive_sel_3v3(reg3); | 69 | pcr->sd30_drive_sel_3v3 = rtl8411_reg_to_sd30_drive_sel_3v3(reg3); |
70 | } | 70 | } |
71 | 71 | ||
@@ -74,7 +74,7 @@ static void rtl8411b_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
74 | u32 reg = 0; | 74 | u32 reg = 0; |
75 | 75 | ||
76 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); | 76 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); |
77 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); | 77 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); |
78 | 78 | ||
79 | if (!rtsx_vendor_setting_valid(reg)) | 79 | if (!rtsx_vendor_setting_valid(reg)) |
80 | return; | 80 | return; |
@@ -260,9 +260,8 @@ static unsigned int rtl8411_cd_deglitch(struct rtsx_pcr *pcr) | |||
260 | rtsx_pci_write_register(pcr, CARD_PWR_CTL, | 260 | rtsx_pci_write_register(pcr, CARD_PWR_CTL, |
261 | BPP_POWER_MASK, BPP_POWER_OFF); | 261 | BPP_POWER_MASK, BPP_POWER_OFF); |
262 | 262 | ||
263 | dev_dbg(&(pcr->pci->dev), | 263 | pcr_dbg(pcr, "After CD deglitch, card_exist = 0x%x\n", |
264 | "After CD deglitch, card_exist = 0x%x\n", | 264 | card_exist); |
265 | card_exist); | ||
266 | } | 265 | } |
267 | 266 | ||
268 | if (card_exist & MS_EXIST) { | 267 | if (card_exist & MS_EXIST) { |
diff --git a/drivers/mfd/rts5209.c b/drivers/mfd/rts5209.c index cb04174a8924..373e253c33df 100644 --- a/drivers/mfd/rts5209.c +++ b/drivers/mfd/rts5209.c | |||
@@ -38,7 +38,7 @@ static void rts5209_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
38 | u32 reg; | 38 | u32 reg; |
39 | 39 | ||
40 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); | 40 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); |
41 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); | 41 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); |
42 | 42 | ||
43 | if (rts5209_vendor_setting1_valid(reg)) { | 43 | if (rts5209_vendor_setting1_valid(reg)) { |
44 | if (rts5209_reg_check_ms_pmos(reg)) | 44 | if (rts5209_reg_check_ms_pmos(reg)) |
@@ -47,7 +47,7 @@ static void rts5209_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
47 | } | 47 | } |
48 | 48 | ||
49 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); | 49 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); |
50 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); | 50 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); |
51 | 51 | ||
52 | if (rts5209_vendor_setting2_valid(reg)) { | 52 | if (rts5209_vendor_setting2_valid(reg)) { |
53 | pcr->sd30_drive_sel_1v8 = | 53 | pcr->sd30_drive_sel_1v8 = |
diff --git a/drivers/mfd/rts5227.c b/drivers/mfd/rts5227.c index 0c0283154ab5..ce012d78ce2a 100644 --- a/drivers/mfd/rts5227.c +++ b/drivers/mfd/rts5227.c | |||
@@ -63,7 +63,7 @@ static void rts5227_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
63 | u32 reg; | 63 | u32 reg; |
64 | 64 | ||
65 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); | 65 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); |
66 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); | 66 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); |
67 | 67 | ||
68 | if (!rtsx_vendor_setting_valid(reg)) | 68 | if (!rtsx_vendor_setting_valid(reg)) |
69 | return; | 69 | return; |
@@ -74,7 +74,7 @@ static void rts5227_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
74 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); | 74 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); |
75 | 75 | ||
76 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); | 76 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); |
77 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); | 77 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); |
78 | pcr->sd30_drive_sel_3v3 = rtsx_reg_to_sd30_drive_sel_3v3(reg); | 78 | pcr->sd30_drive_sel_3v3 = rtsx_reg_to_sd30_drive_sel_3v3(reg); |
79 | if (rtsx_reg_check_reverse_socket(reg)) | 79 | if (rtsx_reg_check_reverse_socket(reg)) |
80 | pcr->flags |= PCR_REVERSE_SOCKET; | 80 | pcr->flags |= PCR_REVERSE_SOCKET; |
diff --git a/drivers/mfd/rts5229.c b/drivers/mfd/rts5229.c index 6353f5df087a..ace45384ec8b 100644 --- a/drivers/mfd/rts5229.c +++ b/drivers/mfd/rts5229.c | |||
@@ -38,7 +38,7 @@ static void rts5229_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
38 | u32 reg; | 38 | u32 reg; |
39 | 39 | ||
40 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); | 40 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); |
41 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); | 41 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); |
42 | 42 | ||
43 | if (!rtsx_vendor_setting_valid(reg)) | 43 | if (!rtsx_vendor_setting_valid(reg)) |
44 | return; | 44 | return; |
@@ -50,7 +50,7 @@ static void rts5229_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
50 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); | 50 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); |
51 | 51 | ||
52 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); | 52 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); |
53 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); | 53 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); |
54 | pcr->sd30_drive_sel_3v3 = | 54 | pcr->sd30_drive_sel_3v3 = |
55 | map_sd_drive(rtsx_reg_to_sd30_drive_sel_3v3(reg)); | 55 | map_sd_drive(rtsx_reg_to_sd30_drive_sel_3v3(reg)); |
56 | } | 56 | } |
diff --git a/drivers/mfd/rts5249.c b/drivers/mfd/rts5249.c index d1ff32f742ba..eb2d5866f719 100644 --- a/drivers/mfd/rts5249.c +++ b/drivers/mfd/rts5249.c | |||
@@ -70,7 +70,7 @@ static void rtsx_base_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
70 | u32 reg; | 70 | u32 reg; |
71 | 71 | ||
72 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); | 72 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); |
73 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); | 73 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); |
74 | 74 | ||
75 | if (!rtsx_vendor_setting_valid(reg)) { | 75 | if (!rtsx_vendor_setting_valid(reg)) { |
76 | pcr_dbg(pcr, "skip fetch vendor setting\n"); | 76 | pcr_dbg(pcr, "skip fetch vendor setting\n"); |
@@ -83,7 +83,7 @@ static void rtsx_base_fetch_vendor_settings(struct rtsx_pcr *pcr) | |||
83 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); | 83 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); |
84 | 84 | ||
85 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); | 85 | rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); |
86 | dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); | 86 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); |
87 | pcr->sd30_drive_sel_3v3 = rtsx_reg_to_sd30_drive_sel_3v3(reg); | 87 | pcr->sd30_drive_sel_3v3 = rtsx_reg_to_sd30_drive_sel_3v3(reg); |
88 | if (rtsx_reg_check_reverse_socket(reg)) | 88 | if (rtsx_reg_check_reverse_socket(reg)) |
89 | pcr->flags |= PCR_REVERSE_SOCKET; | 89 | pcr->flags |= PCR_REVERSE_SOCKET; |
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c index 433cb41cf556..a66540a49079 100644 --- a/drivers/mfd/rtsx_pcr.c +++ b/drivers/mfd/rtsx_pcr.c | |||
@@ -316,8 +316,7 @@ int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout) | |||
316 | timeleft = wait_for_completion_interruptible_timeout( | 316 | timeleft = wait_for_completion_interruptible_timeout( |
317 | &trans_done, msecs_to_jiffies(timeout)); | 317 | &trans_done, msecs_to_jiffies(timeout)); |
318 | if (timeleft <= 0) { | 318 | if (timeleft <= 0) { |
319 | dev_dbg(&(pcr->pci->dev), "Timeout (%s %d)\n", | 319 | pcr_dbg(pcr, "Timeout (%s %d)\n", __func__, __LINE__); |
320 | __func__, __LINE__); | ||
321 | err = -ETIMEDOUT; | 320 | err = -ETIMEDOUT; |
322 | goto finish_send_cmd; | 321 | goto finish_send_cmd; |
323 | } | 322 | } |
@@ -353,8 +352,7 @@ static void rtsx_pci_add_sg_tbl(struct rtsx_pcr *pcr, | |||
353 | u64 val; | 352 | u64 val; |
354 | u8 option = SG_VALID | SG_TRANS_DATA; | 353 | u8 option = SG_VALID | SG_TRANS_DATA; |
355 | 354 | ||
356 | dev_dbg(&(pcr->pci->dev), "DMA addr: 0x%x, Len: 0x%x\n", | 355 | pcr_dbg(pcr, "DMA addr: 0x%x, Len: 0x%x\n", (unsigned int)addr, len); |
357 | (unsigned int)addr, len); | ||
358 | 356 | ||
359 | if (end) | 357 | if (end) |
360 | option |= SG_END; | 358 | option |= SG_END; |
@@ -369,11 +367,11 @@ int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, | |||
369 | { | 367 | { |
370 | int err = 0, count; | 368 | int err = 0, count; |
371 | 369 | ||
372 | dev_dbg(&(pcr->pci->dev), "--> %s: num_sg = %d\n", __func__, num_sg); | 370 | pcr_dbg(pcr, "--> %s: num_sg = %d\n", __func__, num_sg); |
373 | count = rtsx_pci_dma_map_sg(pcr, sglist, num_sg, read); | 371 | count = rtsx_pci_dma_map_sg(pcr, sglist, num_sg, read); |
374 | if (count < 1) | 372 | if (count < 1) |
375 | return -EINVAL; | 373 | return -EINVAL; |
376 | dev_dbg(&(pcr->pci->dev), "DMA mapping count: %d\n", count); | 374 | pcr_dbg(pcr, "DMA mapping count: %d\n", count); |
377 | 375 | ||
378 | err = rtsx_pci_dma_transfer(pcr, sglist, count, read, timeout); | 376 | err = rtsx_pci_dma_transfer(pcr, sglist, count, read, timeout); |
379 | 377 | ||
@@ -447,8 +445,7 @@ int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist, | |||
447 | timeleft = wait_for_completion_interruptible_timeout( | 445 | timeleft = wait_for_completion_interruptible_timeout( |
448 | &trans_done, msecs_to_jiffies(timeout)); | 446 | &trans_done, msecs_to_jiffies(timeout)); |
449 | if (timeleft <= 0) { | 447 | if (timeleft <= 0) { |
450 | dev_dbg(&(pcr->pci->dev), "Timeout (%s %d)\n", | 448 | pcr_dbg(pcr, "Timeout (%s %d)\n", __func__, __LINE__); |
451 | __func__, __LINE__); | ||
452 | err = -ETIMEDOUT; | 449 | err = -ETIMEDOUT; |
453 | goto out; | 450 | goto out; |
454 | } | 451 | } |
@@ -622,7 +619,7 @@ static void rtsx_pci_enable_bus_int(struct rtsx_pcr *pcr) | |||
622 | /* Enable Bus Interrupt */ | 619 | /* Enable Bus Interrupt */ |
623 | rtsx_pci_writel(pcr, RTSX_BIER, pcr->bier); | 620 | rtsx_pci_writel(pcr, RTSX_BIER, pcr->bier); |
624 | 621 | ||
625 | dev_dbg(&(pcr->pci->dev), "RTSX_BIER: 0x%08x\n", pcr->bier); | 622 | pcr_dbg(pcr, "RTSX_BIER: 0x%08x\n", pcr->bier); |
626 | } | 623 | } |
627 | 624 | ||
628 | static inline u8 double_ssc_depth(u8 depth) | 625 | static inline u8 double_ssc_depth(u8 depth) |
@@ -668,14 +665,13 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, | |||
668 | return err; | 665 | return err; |
669 | 666 | ||
670 | card_clock /= 1000000; | 667 | card_clock /= 1000000; |
671 | dev_dbg(&(pcr->pci->dev), "Switch card clock to %dMHz\n", card_clock); | 668 | pcr_dbg(pcr, "Switch card clock to %dMHz\n", card_clock); |
672 | 669 | ||
673 | clk = card_clock; | 670 | clk = card_clock; |
674 | if (!initial_mode && double_clk) | 671 | if (!initial_mode && double_clk) |
675 | clk = card_clock * 2; | 672 | clk = card_clock * 2; |
676 | dev_dbg(&(pcr->pci->dev), | 673 | pcr_dbg(pcr, "Internal SSC clock: %dMHz (cur_clock = %d)\n", |
677 | "Internal SSC clock: %dMHz (cur_clock = %d)\n", | 674 | clk, pcr->cur_clock); |
678 | clk, pcr->cur_clock); | ||
679 | 675 | ||
680 | if (clk == pcr->cur_clock) | 676 | if (clk == pcr->cur_clock) |
681 | return 0; | 677 | return 0; |
@@ -704,14 +700,14 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, | |||
704 | } | 700 | } |
705 | div++; | 701 | div++; |
706 | } | 702 | } |
707 | dev_dbg(&(pcr->pci->dev), "n = %d, div = %d\n", n, div); | 703 | pcr_dbg(pcr, "n = %d, div = %d\n", n, div); |
708 | 704 | ||
709 | ssc_depth = depth[ssc_depth]; | 705 | ssc_depth = depth[ssc_depth]; |
710 | if (double_clk) | 706 | if (double_clk) |
711 | ssc_depth = double_ssc_depth(ssc_depth); | 707 | ssc_depth = double_ssc_depth(ssc_depth); |
712 | 708 | ||
713 | ssc_depth = revise_ssc_depth(ssc_depth, div); | 709 | ssc_depth = revise_ssc_depth(ssc_depth, div); |
714 | dev_dbg(&(pcr->pci->dev), "ssc_depth = %d\n", ssc_depth); | 710 | pcr_dbg(pcr, "ssc_depth = %d\n", ssc_depth); |
715 | 711 | ||
716 | rtsx_pci_init_cmd(pcr); | 712 | rtsx_pci_init_cmd(pcr); |
717 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, | 713 | rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CLK_CTL, |
@@ -833,13 +829,13 @@ static void rtsx_pci_card_detect(struct work_struct *work) | |||
833 | dwork = to_delayed_work(work); | 829 | dwork = to_delayed_work(work); |
834 | pcr = container_of(dwork, struct rtsx_pcr, carddet_work); | 830 | pcr = container_of(dwork, struct rtsx_pcr, carddet_work); |
835 | 831 | ||
836 | dev_dbg(&(pcr->pci->dev), "--> %s\n", __func__); | 832 | pcr_dbg(pcr, "--> %s\n", __func__); |
837 | 833 | ||
838 | mutex_lock(&pcr->pcr_mutex); | 834 | mutex_lock(&pcr->pcr_mutex); |
839 | spin_lock_irqsave(&pcr->lock, flags); | 835 | spin_lock_irqsave(&pcr->lock, flags); |
840 | 836 | ||
841 | irq_status = rtsx_pci_readl(pcr, RTSX_BIPR); | 837 | irq_status = rtsx_pci_readl(pcr, RTSX_BIPR); |
842 | dev_dbg(&(pcr->pci->dev), "irq_status: 0x%08x\n", irq_status); | 838 | pcr_dbg(pcr, "irq_status: 0x%08x\n", irq_status); |
843 | 839 | ||
844 | irq_status &= CARD_EXIST; | 840 | irq_status &= CARD_EXIST; |
845 | card_inserted = pcr->card_inserted & irq_status; | 841 | card_inserted = pcr->card_inserted & irq_status; |
@@ -850,9 +846,8 @@ static void rtsx_pci_card_detect(struct work_struct *work) | |||
850 | spin_unlock_irqrestore(&pcr->lock, flags); | 846 | spin_unlock_irqrestore(&pcr->lock, flags); |
851 | 847 | ||
852 | if (card_inserted || card_removed) { | 848 | if (card_inserted || card_removed) { |
853 | dev_dbg(&(pcr->pci->dev), | 849 | pcr_dbg(pcr, "card_inserted: 0x%x, card_removed: 0x%x\n", |
854 | "card_inserted: 0x%x, card_removed: 0x%x\n", | 850 | card_inserted, card_removed); |
855 | card_inserted, card_removed); | ||
856 | 851 | ||
857 | if (pcr->ops->cd_deglitch) | 852 | if (pcr->ops->cd_deglitch) |
858 | card_inserted = pcr->ops->cd_deglitch(pcr); | 853 | card_inserted = pcr->ops->cd_deglitch(pcr); |
@@ -960,7 +955,7 @@ static void rtsx_pci_idle_work(struct work_struct *work) | |||
960 | struct delayed_work *dwork = to_delayed_work(work); | 955 | struct delayed_work *dwork = to_delayed_work(work); |
961 | struct rtsx_pcr *pcr = container_of(dwork, struct rtsx_pcr, idle_work); | 956 | struct rtsx_pcr *pcr = container_of(dwork, struct rtsx_pcr, idle_work); |
962 | 957 | ||
963 | dev_dbg(&(pcr->pci->dev), "--> %s\n", __func__); | 958 | pcr_dbg(pcr, "--> %s\n", __func__); |
964 | 959 | ||
965 | mutex_lock(&pcr->pcr_mutex); | 960 | mutex_lock(&pcr->pcr_mutex); |
966 | 961 | ||
@@ -1128,7 +1123,7 @@ static int rtsx_pci_init_chip(struct rtsx_pcr *pcr) | |||
1128 | break; | 1123 | break; |
1129 | } | 1124 | } |
1130 | 1125 | ||
1131 | dev_dbg(&(pcr->pci->dev), "PID: 0x%04x, IC version: 0x%02x\n", | 1126 | pcr_dbg(pcr, "PID: 0x%04x, IC version: 0x%02x\n", |
1132 | PCI_PID(pcr), pcr->ic_version); | 1127 | PCI_PID(pcr), pcr->ic_version); |
1133 | 1128 | ||
1134 | pcr->slots = kcalloc(pcr->num_slots, sizeof(struct rtsx_slot), | 1129 | pcr->slots = kcalloc(pcr->num_slots, sizeof(struct rtsx_slot), |
@@ -1139,14 +1134,14 @@ static int rtsx_pci_init_chip(struct rtsx_pcr *pcr) | |||
1139 | if (pcr->ops->fetch_vendor_settings) | 1134 | if (pcr->ops->fetch_vendor_settings) |
1140 | pcr->ops->fetch_vendor_settings(pcr); | 1135 | pcr->ops->fetch_vendor_settings(pcr); |
1141 | 1136 | ||
1142 | dev_dbg(&(pcr->pci->dev), "pcr->aspm_en = 0x%x\n", pcr->aspm_en); | 1137 | pcr_dbg(pcr, "pcr->aspm_en = 0x%x\n", pcr->aspm_en); |
1143 | dev_dbg(&(pcr->pci->dev), "pcr->sd30_drive_sel_1v8 = 0x%x\n", | 1138 | pcr_dbg(pcr, "pcr->sd30_drive_sel_1v8 = 0x%x\n", |
1144 | pcr->sd30_drive_sel_1v8); | 1139 | pcr->sd30_drive_sel_1v8); |
1145 | dev_dbg(&(pcr->pci->dev), "pcr->sd30_drive_sel_3v3 = 0x%x\n", | 1140 | pcr_dbg(pcr, "pcr->sd30_drive_sel_3v3 = 0x%x\n", |
1146 | pcr->sd30_drive_sel_3v3); | 1141 | pcr->sd30_drive_sel_3v3); |
1147 | dev_dbg(&(pcr->pci->dev), "pcr->card_drive_sel = 0x%x\n", | 1142 | pcr_dbg(pcr, "pcr->card_drive_sel = 0x%x\n", |
1148 | pcr->card_drive_sel); | 1143 | pcr->card_drive_sel); |
1149 | dev_dbg(&(pcr->pci->dev), "pcr->flags = 0x%x\n", pcr->flags); | 1144 | pcr_dbg(pcr, "pcr->flags = 0x%x\n", pcr->flags); |
1150 | 1145 | ||
1151 | pcr->state = PDEV_STAT_IDLE; | 1146 | pcr->state = PDEV_STAT_IDLE; |
1152 | err = rtsx_pci_init_hw(pcr); | 1147 | err = rtsx_pci_init_hw(pcr); |