Date: | 2013-12-17 09:55:25 (9 years 9 months ago) |
---|---|
Author: | Lars C. |
Commit: | 65b33a24c1039156c0f4c0f0dbe043a41ce5a177 |
Message: | usb: musb-jz4740: Move musb_hdrc_config to the glue driver Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> |
Files: |
arch/mips/jz4740/platform.c (2 diffs) drivers/usb/musb/jz4740.c (2 diffs) |
Change Details
arch/mips/jz4740/platform.c | ||
---|---|---|
64 | 64 | .id = 0, |
65 | 65 | }; |
66 | 66 | |
67 | static struct musb_hdrc_config jz4740_udc_config = { | |
68 | /* Silicon does not implement USB OTG. */ | |
69 | .multipoint = 0, | |
70 | /* Max EPs scanned, driver will decide which EP can be used. */ | |
71 | .num_eps = 4, | |
72 | /* RAMbits needed to configure EPs from table */ | |
73 | .ram_bits = 9, | |
74 | }; | |
75 | ||
76 | static struct musb_hdrc_platform_data jz4740_udc_platform_data = { | |
77 | .mode = MUSB_PERIPHERAL, | |
78 | .config = &jz4740_udc_config, | |
79 | }; | |
80 | ||
81 | 67 | static struct resource jz4740_udc_resources[] = { |
82 | 68 | [0] = { |
83 | 69 | .start = JZ4740_UDC_BASE_ADDR, |
... | ... | |
98 | 84 | .dev = { |
99 | 85 | .dma_mask = &jz4740_udc_device.dev.coherent_dma_mask, |
100 | 86 | .coherent_dma_mask = DMA_BIT_MASK(32), |
101 | .platform_data = &jz4740_udc_platform_data, | |
102 | 87 | }, |
103 | 88 | .num_resources = ARRAY_SIZE(jz4740_udc_resources), |
104 | 89 | .resource = jz4740_udc_resources, |
drivers/usb/musb/jz4740.c | ||
---|---|---|
85 | 85 | return retval; |
86 | 86 | } |
87 | 87 | |
88 | static struct musb_hdrc_config jz4740_musb_config = { | |
89 | /* Silicon does not implement USB OTG. */ | |
90 | .multipoint = 0, | |
91 | /* Max EPs scanned, driver will decide which EP can be used. */ | |
92 | .num_eps = 4, | |
93 | /* RAMbits needed to configure EPs from table */ | |
94 | .ram_bits = 9, | |
95 | }; | |
96 | ||
97 | static struct musb_hdrc_platform_data jz4740_musb_platform_data = { | |
98 | .mode = MUSB_PERIPHERAL, | |
99 | .config = &jz4740_musb_config, | |
100 | }; | |
101 | ||
88 | 102 | static int jz4740_musb_init(struct musb *musb) |
89 | 103 | { |
90 | 104 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
... | ... | |
119 | 133 | |
120 | 134 | static int jz4740_probe(struct platform_device *pdev) |
121 | 135 | { |
122 | struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; | |
136 | struct musb_hdrc_platform_data *pdata = &jz4740_musb_platform_data; | |
123 | 137 | struct platform_device *musb; |
124 | 138 | struct jz4740_glue *glue; |
125 | 139 | struct clk *clk; |
126 | 140 | int ret; |
127 | 141 | |
128 | if (!pdata) { | |
129 | dev_err(&pdev->dev, "failed to allocate platform data\n"); | |
130 | return -EINVAL; | |
131 | } | |
132 | ||
133 | 142 | glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); |
134 | 143 | if (!glue) |
135 | 144 | return -ENOMEM; |
Branches:
ben-wpan
ben-wpan-stefan
5396a9238205f20f811ea57898980d3ca82df0b6
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9