mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Jules Maselbas <jmaselbas@kalray.eu>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH v3 02/14] usb: dwc2: Add host controller driver
Date: Wed, 22 Jul 2020 11:18:39 +0200	[thread overview]
Message-ID: <f1b04e58-742e-ad6d-61f3-2b91e43e4183@pengutronix.de> (raw)
In-Reply-To: <20200722091235.l6zwavdfsz7c5lh4@tellis.lin.mbt.kalray.eu>

On 7/22/20 11:12 AM, Jules Maselbas wrote:
> On Wed, Jul 22, 2020 at 08:36:25AM +0200, Ahmad Fatoum wrote:
>> On 7/21/20 2:05 PM, Jules Maselbas wrote:
>>> +static int transfer_chunk(struct dwc2 *dwc2, u8 hc,
>>> +			  u8 *pid, int in, void *buffer, int num_packets,
>>> +			  int xfer_len, int *actual_len, int odd_frame)
>>> +{
>>> +	uint32_t hctsiz, hcchar, sub;
>>> +	dma_addr_t dma_addr;
>>> +	int ret = 0;
>>> +
>>> +	dma_addr = dma_map_single(dwc2->dev, buffer, xfer_len,
>>> +				  in ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
>>> +
>>> +	dwc2_dbg(dwc2, "chunk: pid=%d xfer_len=%u pkts=%u dma_addr=%llx\n",
>>> +			*pid, xfer_len, num_packets, dma_addr);
>>
>> Use %da for printing dma_addr, otherwise on 32-bit builds with #define DEBUG,
>> garbage would be read here.
> Yup sounds good, from what i've seen in vsprintf.c it's '%ad' to print
> dma_addr_t.

Sorry, I misread the code.
Apparently, it's neither. It should be %pad for dma_addr_t.

> 
> I will also modify gadget.c with the following:
> -               dwc2_dbg(dwc2, "%s: 0x%p => 0x%08x\n",
> -                        __func__, (void *)ureq->dma, dma_reg);
> +               dwc2_dbg(dwc2, "%s: 0x%ad => 0x%08x\n",
> +                        __func__, ureq->dma, dma_reg);
> 
>  
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-07-22  9:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 12:05 [PATCH v3 00/14] usb: dwc2: Add host and gadget driver Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 01/14] Revert "usb: Add dwc2 host driver" Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 02/14] usb: dwc2: Add host controller driver Jules Maselbas
2020-07-22  6:36   ` Ahmad Fatoum
2020-07-22  9:12     ` Jules Maselbas
2020-07-22  9:18       ` Ahmad Fatoum [this message]
2020-07-22  9:21         ` Jules Maselbas
2020-08-10 20:26   ` Sascha Hauer
2020-07-21 12:05 ` [PATCH v3 03/14] usb: dwc2: host: Read dr_mode from device tree Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 04/14] usb: dwc2: Rework roothub interface Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 05/14] usb: dwc2: Rework timeout Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 06/14] usb: dwc2: host: Handle dma mapping errors Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 07/14] usb: dwc2: host: Dynamic fifo size support from Linux Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 08/14] usb: dwc2: host: Fix toggle reset Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 09/14] usb: dwc2: host: Rewrite dwc2_hc_init Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 10/14] usb: dwc2: Add function to flush tx fifo Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 11/14] usb: dwc2: Add structure for gadget driver Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 12/14] usb: dwc2: Add " Jules Maselbas
2020-07-21 12:05 ` [PATCH v3 13/14] usb: dwc2: Use register_otg_device Jules Maselbas
2020-07-21 12:06 ` [PATCH v3 14/14] usb: dwc2: Add ulpi phy function Jules Maselbas
2020-08-10 20:34   ` Sascha Hauer
2020-08-11  9:31     ` Jules Maselbas
2020-08-10 20:23 ` [PATCH v3 00/14] usb: dwc2: Add host and gadget driver Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1b04e58-742e-ad6d-61f3-2b91e43e4183@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jmaselbas@kalray.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox