omap3-pandora-kernel: Bump SRCREV to kernel that supports NAND DMA modes.
[openpandora.oe.git] / recipes / linux / omap3-pandora-kernel / musb-fix-dbrownell.patch
1 From: David Brownell <dbrownell@users.sourceforge.net>
2
3 Minor cleanups to omap 2430/34xx/35x musb_hdrc init:
4
5  - num_eps is 16; here, each one is bidirectional
6  - use DMA_32BIT_MASK to prevent confusion/errors
7  - initialize root port power to reflect 100 mA limit
8
9 This still hard-wires some board-specific data, since there
10 are no hooks through which different boards can provide the
11 right data to the init code.
12
13 Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
14
15 --- a/arch/arm/mach-omap2/usb-musb.c
16 +++ b/arch/arm/mach-omap2/usb-musb.c
17 @@ -21,12 +21,15 @@
18  #include <linux/delay.h>
19  #include <linux/platform_device.h>
20  #include <linux/clk.h>
21 +#include <linux/dma-mapping.h>
22 +
23  #include <asm/io.h>
24 -#include <mach/mux.h>
25 +
26  #include <linux/usb/musb.h>
27  
28  #include <mach/hardware.h>
29  #include <mach/pm.h>
30 +#include <mach/mux.h>
31  #include <mach/usb.h>
32  
33  #ifdef CONFIG_USB_MUSB_SOC
34 @@ -109,7 +112,7 @@ static struct musb_hdrc_config musb_config = {
35         .dyn_fifo       = 1,
36         .soft_con       = 1,
37         .dma            = 1,
38 -       .num_eps        = 32,
39 +       .num_eps        = 16,
40         .dma_channels   = 7,
41         .dma_req_chan   = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3),
42         .ram_bits       = 12,
43 @@ -129,16 +132,22 @@ static struct musb_hdrc_platform_data musb_plat = {
44                         : "usbhs_ick",
45         .set_clock      = musb_set_clock,
46         .config         = &musb_config,
47 +
48 +       /* REVISIT charge pump on TWL4030 can supply up to
49 +        * 100 mA ... but this value is board-specific, like
50 +        * "mode", and should be passed to usb_musb_init().
51 +        */
52 +       .power          = 50,                   /* up to 100 mA */
53  };
54  
55 -static u64 musb_dmamask = ~(u32)0;
56 +static u64 musb_dmamask = DMA_32BIT_MASK;
57  
58  static struct platform_device musb_device = {
59         .name           = "musb_hdrc",
60         .id             = -1,
61         .dev = {
62                 .dma_mask               = &musb_dmamask,
63 -               .coherent_dma_mask      = 0xffffffff,
64 +               .coherent_dma_mask      = DMA_32BIT_MASK,
65                 .platform_data          = &musb_plat,
66         },
67         .num_resources  = ARRAY_SIZE(musb_resources),
68 --
69 To unsubscribe from this list: send the line "unsubscribe linux-omap" in
70 the body of a message to majordomo@vger.kernel.org
71 More majordomo info at  http://vger.kernel.org/majordomo-info.html