@@ -213,8 +213,8 @@ static void hci_pio_cleanup(struct i3c_hci *hci)
213213 pio_reg_write (INTR_SIGNAL_ENABLE , 0x0 );
214214
215215 if (pio ) {
216- DBG ( "status = %#x/%#x" ,
217- pio_reg_read (INTR_STATUS ), pio_reg_read (INTR_SIGNAL_ENABLE ));
216+ dev_dbg ( & hci -> master . dev , "status = %#x/%#x" ,
217+ pio_reg_read (INTR_STATUS ), pio_reg_read (INTR_SIGNAL_ENABLE ));
218218 BUG_ON (pio -> curr_xfer );
219219 BUG_ON (pio -> curr_rx );
220220 BUG_ON (pio -> curr_tx );
@@ -226,13 +226,17 @@ static void hci_pio_cleanup(struct i3c_hci *hci)
226226
227227static void hci_pio_write_cmd (struct i3c_hci * hci , struct hci_xfer * xfer )
228228{
229- DBG ("cmd_desc[%d] = 0x%08x" , 0 , xfer -> cmd_desc [0 ]);
230- DBG ("cmd_desc[%d] = 0x%08x" , 1 , xfer -> cmd_desc [1 ]);
229+ dev_dbg (& hci -> master .dev , "cmd_desc[%d] = 0x%08x" ,
230+ 0 , xfer -> cmd_desc [0 ]);
231+ dev_dbg (& hci -> master .dev , "cmd_desc[%d] = 0x%08x" ,
232+ 1 , xfer -> cmd_desc [1 ]);
231233 pio_reg_write (COMMAND_QUEUE_PORT , xfer -> cmd_desc [0 ]);
232234 pio_reg_write (COMMAND_QUEUE_PORT , xfer -> cmd_desc [1 ]);
233235 if (hci -> cmd == & mipi_i3c_hci_cmd_v2 ) {
234- DBG ("cmd_desc[%d] = 0x%08x" , 2 , xfer -> cmd_desc [2 ]);
235- DBG ("cmd_desc[%d] = 0x%08x" , 3 , xfer -> cmd_desc [3 ]);
236+ dev_dbg (& hci -> master .dev , "cmd_desc[%d] = 0x%08x" ,
237+ 2 , xfer -> cmd_desc [2 ]);
238+ dev_dbg (& hci -> master .dev , "cmd_desc[%d] = 0x%08x" ,
239+ 3 , xfer -> cmd_desc [3 ]);
236240 pio_reg_write (COMMAND_QUEUE_PORT , xfer -> cmd_desc [2 ]);
237241 pio_reg_write (COMMAND_QUEUE_PORT , xfer -> cmd_desc [3 ]);
238242 }
@@ -254,7 +258,8 @@ static bool hci_pio_do_rx(struct i3c_hci *hci, struct hci_pio_data *pio)
254258 nr_words = min (xfer -> data_left / 4 , pio -> rx_thresh_size );
255259 /* extract data from FIFO */
256260 xfer -> data_left -= nr_words * 4 ;
257- DBG ("now %d left %d" , nr_words * 4 , xfer -> data_left );
261+ dev_dbg (& hci -> master .dev , "now %d left %d" ,
262+ nr_words * 4 , xfer -> data_left );
258263 while (nr_words -- )
259264 * p ++ = pio_reg_read (XFER_DATA_PORT );
260265 }
@@ -269,7 +274,7 @@ static void hci_pio_do_trailing_rx(struct i3c_hci *hci,
269274 struct hci_xfer * xfer = pio -> curr_rx ;
270275 u32 * p ;
271276
272- DBG ( "%d remaining" , count );
277+ dev_dbg ( & hci -> master . dev , "%d remaining" , count );
273278
274279 p = xfer -> data ;
275280 p += (xfer -> data_len - xfer -> data_left ) / 4 ;
@@ -278,7 +283,8 @@ static void hci_pio_do_trailing_rx(struct i3c_hci *hci,
278283 unsigned int nr_words = count / 4 ;
279284 /* extract data from FIFO */
280285 xfer -> data_left -= nr_words * 4 ;
281- DBG ("now %d left %d" , nr_words * 4 , xfer -> data_left );
286+ dev_dbg (& hci -> master .dev , "now %d left %d" ,
287+ nr_words * 4 , xfer -> data_left );
282288 while (nr_words -- )
283289 * p ++ = pio_reg_read (XFER_DATA_PORT );
284290 }
@@ -321,7 +327,8 @@ static bool hci_pio_do_tx(struct i3c_hci *hci, struct hci_pio_data *pio)
321327 nr_words = min (xfer -> data_left / 4 , pio -> tx_thresh_size );
322328 /* push data into the FIFO */
323329 xfer -> data_left -= nr_words * 4 ;
324- DBG ("now %d left %d" , nr_words * 4 , xfer -> data_left );
330+ dev_dbg (& hci -> master .dev , "now %d left %d" ,
331+ nr_words * 4 , xfer -> data_left );
325332 while (nr_words -- )
326333 pio_reg_write (XFER_DATA_PORT , * p ++ );
327334 }
@@ -336,7 +343,7 @@ static bool hci_pio_do_tx(struct i3c_hci *hci, struct hci_pio_data *pio)
336343 */
337344 if (!(pio_reg_read (INTR_STATUS ) & STAT_TX_THLD ))
338345 return false;
339- DBG ( "trailing %d" , xfer -> data_left );
346+ dev_dbg ( & hci -> master . dev , "trailing %d" , xfer -> data_left );
340347 pio_reg_write (XFER_DATA_PORT , * p );
341348 xfer -> data_left = 0 ;
342349 }
@@ -481,7 +488,7 @@ static bool hci_pio_process_resp(struct i3c_hci *hci, struct hci_pio_data *pio)
481488 u32 resp = pio_reg_read (RESPONSE_QUEUE_PORT );
482489 unsigned int tid = RESP_TID (resp );
483490
484- DBG ( "resp = 0x%08x" , resp );
491+ dev_dbg ( & hci -> master . dev , "resp = 0x%08x" , resp );
485492 if (tid != xfer -> cmd_tid ) {
486493 dev_err (& hci -> master .dev ,
487494 "response tid=%d when expecting %d\n" ,
@@ -522,14 +529,15 @@ static bool hci_pio_process_resp(struct i3c_hci *hci, struct hci_pio_data *pio)
522529 * still exists.
523530 */
524531 if (pio -> curr_rx == xfer ) {
525- DBG ( "short RX ?" );
532+ dev_dbg ( & hci -> master . dev , "short RX ?" );
526533 pio -> curr_rx = pio -> curr_rx -> next_data ;
527534 } else if (pio -> curr_tx == xfer ) {
528- DBG ( "short TX ?" );
535+ dev_dbg ( & hci -> master . dev , "short TX ?" );
529536 pio -> curr_tx = pio -> curr_tx -> next_data ;
530537 } else if (xfer -> data_left ) {
531- DBG ("PIO xfer count = %d after response" ,
532- xfer -> data_left );
538+ dev_dbg (& hci -> master .dev ,
539+ "PIO xfer count = %d after response" ,
540+ xfer -> data_left );
533541 }
534542
535543 pio -> curr_resp = xfer -> next_resp ;
@@ -591,7 +599,7 @@ static int hci_pio_queue_xfer(struct i3c_hci *hci, struct hci_xfer *xfer, int n)
591599 struct hci_xfer * prev_queue_tail ;
592600 int i ;
593601
594- DBG ( "n = %d" , n );
602+ dev_dbg ( & hci -> master . dev , "n = %d" , n );
595603
596604 /* link xfer instances together and initialize data count */
597605 for (i = 0 ; i < n ; i ++ ) {
@@ -611,8 +619,9 @@ static int hci_pio_queue_xfer(struct i3c_hci *hci, struct hci_xfer *xfer, int n)
611619 if (!hci_pio_process_cmd (hci , pio ))
612620 pio -> enabled_irqs |= STAT_CMD_QUEUE_READY ;
613621 pio_reg_write (INTR_SIGNAL_ENABLE , pio -> enabled_irqs );
614- DBG ("status = %#x/%#x" ,
615- pio_reg_read (INTR_STATUS ), pio_reg_read (INTR_SIGNAL_ENABLE ));
622+ dev_dbg (& hci -> master .dev , "status = %#x/%#x" ,
623+ pio_reg_read (INTR_STATUS ),
624+ pio_reg_read (INTR_SIGNAL_ENABLE ));
616625 }
617626 spin_unlock_irq (& pio -> lock );
618627 return 0 ;
@@ -686,10 +695,10 @@ static bool hci_pio_dequeue_xfer(struct i3c_hci *hci, struct hci_xfer *xfer, int
686695 int ret ;
687696
688697 spin_lock_irq (& pio -> lock );
689- DBG ( "n=%d status=%#x/%#x" , n ,
690- pio_reg_read (INTR_STATUS ), pio_reg_read (INTR_SIGNAL_ENABLE ));
691- DBG ( "main_status = %#x/%#x" ,
692- readl (hci -> base_regs + 0x20 ), readl (hci -> base_regs + 0x28 ));
698+ dev_dbg ( & hci -> master . dev , "n=%d status=%#x/%#x" , n ,
699+ pio_reg_read (INTR_STATUS ), pio_reg_read (INTR_SIGNAL_ENABLE ));
700+ dev_dbg ( & hci -> master . dev , "main_status = %#x/%#x" ,
701+ readl (hci -> base_regs + 0x20 ), readl (hci -> base_regs + 0x28 ));
693702
694703 ret = hci_pio_dequeue_xfer_common (hci , pio , xfer , n );
695704 spin_unlock_irq (& pio -> lock );
@@ -733,8 +742,8 @@ static void hci_pio_err(struct i3c_hci *hci, struct hci_pio_data *pio,
733742 mipi_i3c_hci_pio_reset (hci );
734743 mipi_i3c_hci_resume (hci );
735744
736- DBG ( "status=%#x/%#x" ,
737- pio_reg_read (INTR_STATUS ), pio_reg_read (INTR_SIGNAL_ENABLE ));
745+ dev_dbg ( & hci -> master . dev , "status=%#x/%#x" ,
746+ pio_reg_read (INTR_STATUS ), pio_reg_read (INTR_SIGNAL_ENABLE ));
738747}
739748
740749static void hci_pio_set_ibi_thresh (struct i3c_hci * hci ,
@@ -749,7 +758,7 @@ static void hci_pio_set_ibi_thresh(struct i3c_hci *hci,
749758 if (regval != pio -> reg_queue_thresh ) {
750759 pio_reg_write (QUEUE_THLD_CTRL , regval );
751760 pio -> reg_queue_thresh = regval ;
752- DBG ( "%d" , thresh_val );
761+ dev_dbg ( & hci -> master . dev , "%d" , thresh_val );
753762 }
754763}
755764
@@ -773,7 +782,8 @@ static bool hci_pio_get_ibi_segment(struct i3c_hci *hci,
773782 /* extract the data from the IBI port */
774783 nr_words = thresh_val ;
775784 ibi -> seg_cnt -= nr_words * 4 ;
776- DBG ("now %d left %d" , nr_words * 4 , ibi -> seg_cnt );
785+ dev_dbg (& hci -> master .dev , "now %d left %d" ,
786+ nr_words * 4 , ibi -> seg_cnt );
777787 while (nr_words -- )
778788 * p ++ = pio_reg_read (IBI_PORT );
779789 }
@@ -791,7 +801,7 @@ static bool hci_pio_get_ibi_segment(struct i3c_hci *hci,
791801 hci_pio_set_ibi_thresh (hci , pio , 1 );
792802 if (!(pio_reg_read (INTR_STATUS ) & STAT_IBI_STATUS_THLD ))
793803 return false;
794- DBG ( "trailing %d" , ibi -> seg_cnt );
804+ dev_dbg ( & hci -> master . dev , "trailing %d" , ibi -> seg_cnt );
795805 data = pio_reg_read (IBI_PORT );
796806 data = (__force u32 ) cpu_to_le32 (data );
797807 while (ibi -> seg_cnt -- ) {
@@ -820,7 +830,7 @@ static bool hci_pio_prep_new_ibi(struct i3c_hci *hci, struct hci_pio_data *pio)
820830 */
821831
822832 ibi_status = pio_reg_read (IBI_PORT );
823- DBG ( "status = %#x" , ibi_status );
833+ dev_dbg ( & hci -> master . dev , "status = %#x" , ibi_status );
824834 ibi -> addr = FIELD_GET (IBI_TARGET_ADDR , ibi_status );
825835 if (ibi_status & IBI_ERROR ) {
826836 dev_err (& hci -> master .dev , "IBI error from %#x\n" , ibi -> addr );
0 commit comments