aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2013-08-30 12:45:17 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-30 17:14:53 -0400
commit57bb8aeda06af912f92f10a18a446c1e1e000fc1 (patch)
tree1fd4d60de158bbe9e19b7de206308cf89a1d926b
parentacdb9046b61a63be2e0f760e88272b370d638b35 (diff)
staging: dwc2: simplify debug output in dwc_hc_init
The value of the hcchar register is built from individual values by shifting and masking. Before, the debug output extracted the individual values out of the complete hcchar register again by doing the reverse. This commit makes the debug output use the original values instead. One debug message got removed, since it would always print a fixed value of zero. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/dwc2/core.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index 04c251c82bc8..1f8988671eb7 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -887,26 +887,20 @@ void dwc2_hc_init(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan)
887 dev_vdbg(hsotg->dev, "set HCCHAR(%d) to %08x\n", 887 dev_vdbg(hsotg->dev, "set HCCHAR(%d) to %08x\n",
888 hc_num, hcchar); 888 hc_num, hcchar);
889 889
890 dev_vdbg(hsotg->dev, "%s: Channel %d\n", __func__, hc_num); 890 dev_vdbg(hsotg->dev, "%s: Channel %d\n",
891 __func__, hc_num);
891 dev_vdbg(hsotg->dev, " Dev Addr: %d\n", 892 dev_vdbg(hsotg->dev, " Dev Addr: %d\n",
892 hcchar >> HCCHAR_DEVADDR_SHIFT & 893 chan->dev_addr);
893 HCCHAR_DEVADDR_MASK >> HCCHAR_DEVADDR_SHIFT);
894 dev_vdbg(hsotg->dev, " Ep Num: %d\n", 894 dev_vdbg(hsotg->dev, " Ep Num: %d\n",
895 hcchar >> HCCHAR_EPNUM_SHIFT & 895 chan->ep_num);
896 HCCHAR_EPNUM_MASK >> HCCHAR_EPNUM_SHIFT);
897 dev_vdbg(hsotg->dev, " Is In: %d\n", 896 dev_vdbg(hsotg->dev, " Is In: %d\n",
898 !!(hcchar & HCCHAR_EPDIR)); 897 chan->ep_is_in);
899 dev_vdbg(hsotg->dev, " Is Low Speed: %d\n", 898 dev_vdbg(hsotg->dev, " Is Low Speed: %d\n",
900 !!(hcchar & HCCHAR_LSPDDEV)); 899 chan->speed == USB_SPEED_LOW);
901 dev_vdbg(hsotg->dev, " Ep Type: %d\n", 900 dev_vdbg(hsotg->dev, " Ep Type: %d\n",
902 hcchar >> HCCHAR_EPTYPE_SHIFT & 901 chan->ep_type);
903 HCCHAR_EPTYPE_MASK >> HCCHAR_EPTYPE_SHIFT);
904 dev_vdbg(hsotg->dev, " Max Pkt: %d\n", 902 dev_vdbg(hsotg->dev, " Max Pkt: %d\n",
905 hcchar >> HCCHAR_MPS_SHIFT & 903 chan->max_packet);
906 HCCHAR_MPS_MASK >> HCCHAR_MPS_SHIFT);
907 dev_vdbg(hsotg->dev, " Multi Cnt: %d\n",
908 hcchar >> HCCHAR_MULTICNT_SHIFT &
909 HCCHAR_MULTICNT_MASK >> HCCHAR_MULTICNT_SHIFT);
910 } 904 }
911 905
912 /* Program the HCSPLT register for SPLITs */ 906 /* Program the HCSPLT register for SPLITs */
@@ -936,8 +930,7 @@ void dwc2_hc_init(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan)
936 dev_vdbg(hsotg->dev, " is_in %d\n", 930 dev_vdbg(hsotg->dev, " is_in %d\n",
937 chan->ep_is_in); 931 chan->ep_is_in);
938 dev_vdbg(hsotg->dev, " Max Pkt %d\n", 932 dev_vdbg(hsotg->dev, " Max Pkt %d\n",
939 hcchar >> HCCHAR_MPS_SHIFT & 933 chan->max_packet);
940 HCCHAR_MPS_MASK >> HCCHAR_MPS_SHIFT);
941 dev_vdbg(hsotg->dev, " xferlen %d\n", 934 dev_vdbg(hsotg->dev, " xferlen %d\n",
942 chan->xfer_len); 935 chan->xfer_len);
943 } 936 }