devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Cc: Peter Griffin
	<peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	maxime.coquelin-qxv4g6HH51o@public.gmane.org,
	patrice.chotard-qxv4g6HH51o@public.gmane.org,
	srinivas.kandagatla-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	peppe.cavallaro-qxv4g6HH51o@public.gmane.org
Subject: Re: [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC
Date: Tue, 22 Jul 2014 16:56:45 +0100	[thread overview]
Message-ID: <20140722155645.GD23210@lee--X1> (raw)
In-Reply-To: <20140722155117.GF20588-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>

On Tue, 22 Jul 2014, Felipe Balbi wrote:

> On Tue, Jul 22, 2014 at 04:45:03PM +0100, Lee Jones wrote:
> > > > > > +static void st_dwc3_init(struct st_dwc3 *dwc3_data)
> > > > > > +{
> > > > > > +	u32 reg = st_dwc3_readl(dwc3_data->glue_base, USB2_CLKRST_CTRL);
> > > > > > +
> > > > > > +	reg |= aux_clk_en(1) | ext_cfg_reset_n(1) | xhci_revision(1);
> > > > > > +	reg &= ~sw_pipew_reset_n(1);
> > > > > 
> > > > > 1?  Better to add defines for these magic numbers.  What is 1 anyway?
> > > > 
> > > > They are just bit setting macros, I've converted them over to use BIT macro now,
> > > > so it no longer takes a parameter.
> > > 
> > > the macros are better, but make them upper case as everybody else.
> > 
> > When you say that the macros are better, what do you mean?
> > 
> > Defines do the job in a manner which is a great deal cleaner:
> > 
> > #define AUX_CLK_EN        BIT(0)
> > #define SW_PIPEW_RESET_N  BIT(4)
> > #define EXT_CFG_RESET_N   BIT(8)
> > #define XHCI_REVISION     BIT(12)
> > 
> > reg = AUX_CLK_EN | SW_PIPEW_RESET_N | XHCI_REVISION;
> > reg &= ~SW_PIPEW_RESET_N
> 
> this is what I meant ;-) I see what I wrote can be very ambiguous :-p

Okay great, thanks for clarifying. :)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-07-22 15:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-05  6:25 [PATCH v2 0/3] Add ST dwc3 glue layer driver Peter Griffin
2014-07-05  6:25 ` [PATCH v2 1/3] usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC Peter Griffin
     [not found]   ` <1404541530-27856-2-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-07 12:46     ` Lee Jones
2014-07-22  9:18       ` Peter Griffin
2014-07-22 10:15         ` Lee Jones
2014-07-22 14:57         ` Felipe Balbi
2014-07-22 15:45           ` Lee Jones
2014-07-22 15:51             ` Felipe Balbi
     [not found]               ` <20140722155117.GF20588-HgARHv6XitL9zxVx7UNMDg@public.gmane.org>
2014-07-22 15:56                 ` Lee Jones [this message]
2014-07-23 14:33           ` Peter Griffin
2014-08-20 18:24             ` Felipe Balbi
2014-07-07 13:21   ` Jingoo Han
2014-07-22  9:38     ` Peter Griffin
2014-07-05  6:25 ` [PATCH v2 2/3] ARM: dts: sti: Add st-dwc3 devicetree bindings documentation Peter Griffin
2014-07-07 11:00   ` Lee Jones
2014-07-05  6:25 ` [PATCH v2 3/3] MAINTAINERS: Add dwc3-st.c file to ARCH/STI architecture Peter Griffin
     [not found]   ` <1404541530-27856-4-git-send-email-peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-07-07 10:51     ` Lee Jones
2014-07-08  7:40     ` Maxime Coquelin
     [not found]       ` <53BBA075.9040204-qxv4g6HH51o@public.gmane.org>
2014-07-08  7:53         ` Lee Jones
2014-07-08  9:01           ` Maxime Coquelin
2014-07-10 13:27           ` Felipe Balbi
2014-07-10 13:39             ` Lee Jones
2014-07-10 15:24             ` Peter Griffin

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=20140722155645.GD23210@lee--X1 \
    --to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=maxime.coquelin-qxv4g6HH51o@public.gmane.org \
    --cc=patrice.chotard-qxv4g6HH51o@public.gmane.org \
    --cc=peppe.cavallaro-qxv4g6HH51o@public.gmane.org \
    --cc=peter.griffin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=srinivas.kandagatla-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).