All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: linux-omap@vger.kernel.org
Subject: [patch 2.6.27-rc3-omap1] tweak musb_hdrc SOC init code
Date: Tue, 2 Sep 2008 12:05:00 -0700	[thread overview]
Message-ID: <200809021205.00376.david-b@pacbell.net> (raw)

From: David Brownell <dbrownell@users.sourceforge.net>

Minor cleanups to omap 2430/34xx/35x musb_hdrc init:

 - num_eps is 16; here, each one is bidirectional
 - use DMA_32BIT_MASK to prevent confusion/errors
 - initialize root port power to reflect 100 mA limit

This still hard-wires some board-specific data, since there
are no hooks through which different boards can provide the
right data to the init code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -21,12 +21,15 @@
 #include <linux/delay.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
+#include <linux/dma-mapping.h>
+
 #include <asm/io.h>
-#include <mach/mux.h>
+
 #include <linux/usb/musb.h>
 
 #include <mach/hardware.h>
 #include <mach/pm.h>
+#include <mach/mux.h>
 #include <mach/usb.h>
 
 #ifdef CONFIG_USB_MUSB_SOC
@@ -109,7 +112,7 @@ static struct musb_hdrc_config musb_config = {
 	.dyn_fifo	= 1,
 	.soft_con	= 1,
 	.dma		= 1,
-	.num_eps	= 32,
+	.num_eps	= 16,
 	.dma_channels	= 7,
 	.dma_req_chan	= (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3),
 	.ram_bits	= 12,
@@ -129,16 +132,22 @@ static struct musb_hdrc_platform_data musb_plat = {
 			: "usbhs_ick",
 	.set_clock	= musb_set_clock,
 	.config		= &musb_config,
+
+	/* REVISIT charge pump on TWL4030 can supply up to
+	 * 100 mA ... but this value is board-specific, like
+	 * "mode", and should be passed to usb_musb_init().
+	 */
+	.power		= 50,			/* up to 100 mA */
 };
 
-static u64 musb_dmamask = ~(u32)0;
+static u64 musb_dmamask = DMA_32BIT_MASK;
 
 static struct platform_device musb_device = {
 	.name		= "musb_hdrc",
 	.id		= -1,
 	.dev = {
 		.dma_mask		= &musb_dmamask,
-		.coherent_dma_mask	= 0xffffffff,
+		.coherent_dma_mask	= DMA_32BIT_MASK,
 		.platform_data		= &musb_plat,
 	},
 	.num_resources	= ARRAY_SIZE(musb_resources),

             reply	other threads:[~2008-09-02 19:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 19:05 David Brownell [this message]
2008-09-02 19:39 ` [patch 2.6.27-rc3-omap1] tweak musb_hdrc SOC init code Felipe Balbi
2008-09-02 19:54   ` David Brownell
2008-09-10 23:50     ` Tony Lindgren

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=200809021205.00376.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-omap@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.