From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 6/7] usb: chipidea: usbmisc: add mx53 support
Date: Mon, 26 Nov 2012 15:40:05 +0000 [thread overview]
Message-ID: <20121126154005.8CC8D3E1ABE@localhost> (raw)
In-Reply-To: <20121125080931.GB16062@nchen-desktop>
On Sun, 25 Nov 2012 16:09:31 +0800, Peter Chen <peter.chen@freescale.com> wrote:
> On Fri, Nov 23, 2012 at 11:02:13AM +0100, Marc Kleine-Budde wrote:
> > On 11/23/2012 07:53 AM, Peter Chen wrote:
> > > On Wed, Nov 21, 2012 at 03:06:32PM +0100, Michael Grzeschik wrote:
> > >> This adds mx53 as the next user of the usbmisc driver and makes it
> > >> possible to disable the overcurrent-detection of the internal phy.
> > >>
> > >> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > >> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > >> ---
> > >> Changes since v2:
> > >> * added defines for register offsets and bitmasks
> > >> * fixed disable_oc option for all ports
> > >>
> > >> drivers/usb/chipidea/usbmisc_imx.c | 51 ++++++++++++++++++++++++++++++++++++
> > >> 1 file changed, 51 insertions(+)
> > >>
> > >> diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
> > >> index e090e0f..b1811df 100644
> > >> --- a/drivers/usb/chipidea/usbmisc_imx.c
> > >> +++ b/drivers/usb/chipidea/usbmisc_imx.c
> > >> @@ -19,6 +19,13 @@
> > >>
> > >> #define USB_DEV_MAX 4
> > >>
> > >> +#define MX53_USB_OTG_PHY_CTRL_0_OFFSET 0x08;
> > >> +#define MX53_USB_UH2_CTRL_OFFSET 0x14;
> > >> +#define MX53_USB_UH3_CTRL_OFFSET 0x18;
> > >> +#define MX53_BM_OVER_CUR_DIS_H1 BIT(5)
> > >> +#define MX53_BM_OVER_CUR_DIS_OTG BIT(8)
> > >> +#define MX53_BM_OVER_CUR_DIS_UHx BIT(30)
> > >> +
> > >> #define MX6_BM_OVER_CUR_DIS BIT(7)
> > >
> > > As every SoC platform's non-core register mapping is different,
> > > it is better to use .h to put register bit definition
> >
> > AFAIK in the kernel we don't make extra .h files any more, if there is
> > only a single user of the contents.
> OK, if it is the current rule for kernel, then just keep it.
> My original mind was there will be more and more bit definition
> in future, and move it to .h to make the code clean and short.
Yeah. If there is only one user then keep it in the .c file. The kernel
is huge, so keeping things out of the global scope is a GoodThing(tm).
g.
next prev parent reply other threads:[~2012-11-26 15:40 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 14:06 [PATCH v3 0/7] support other fsl SoCs with usbmisc + small fixes Michael Grzeschik
2012-11-21 14:06 ` [PATCH v3 1/7] usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imx Michael Grzeschik
2012-11-21 14:06 ` [PATCH v3 2/7] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove Michael Grzeschik
2012-11-21 14:06 ` [PATCH v3 3/7] usb: chipidea: usbmisc: fix a potential race condition Michael Grzeschik
2012-11-23 5:36 ` Peter Chen
2012-11-23 7:37 ` Sascha Hauer
2012-11-23 9:01 ` Alexander Shishkin
2012-11-23 10:00 ` Marc Kleine-Budde
2012-11-21 14:06 ` [PATCH v3 4/7] usb: chipidea: usbmisc: prepare driver to handle more than one soc Michael Grzeschik
2012-11-21 14:06 ` [PATCH v3 5/7] usb: chipidea: usbmisc: add support for ahb, ipg and per clock Michael Grzeschik
2012-11-23 6:51 ` Peter Chen
2012-11-23 16:20 ` Michael Grzeschik
2012-11-25 9:18 ` Peter Chen
2012-11-26 15:44 ` Michael Grzeschik
2012-11-21 14:06 ` [PATCH v3 6/7] usb: chipidea: usbmisc: add mx53 support Michael Grzeschik
2012-11-21 20:28 ` Sergei Shtylyov
2012-11-21 19:58 ` Michael Grzeschik
2012-11-23 6:53 ` Peter Chen
2012-11-23 7:39 ` Sascha Hauer
2012-11-25 8:05 ` Peter Chen
2012-11-23 10:02 ` Marc Kleine-Budde
2012-11-25 8:09 ` Peter Chen
2012-11-26 15:40 ` Grant Likely [this message]
2012-11-21 14:06 ` [PATCH v3 7/7] usb: chipidea: usbmisc: add post handling and errata fix for mx25 Michael Grzeschik
2012-11-23 6:59 ` Peter Chen
2012-11-22 9:24 ` [PATCH v3 0/7] support other fsl SoCs with usbmisc + small fixes Alexander Shishkin
2012-11-22 9:31 ` Peter Chen
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=20121126154005.8CC8D3E1ABE@localhost \
--to=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.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).