diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2015-11-02 08:21:40 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-11-04 11:41:42 -0500 |
commit | 34635b1accb99b3c3ad3b35a210be198701aac7e (patch) | |
tree | cec0af61443eb64d4a5792b6ad7bca7e8a81212e | |
parent | 829a2fac71b83c1689213337e8cfc58a9ea12211 (diff) |
dmaengine: edma: Add dummy driver skeleton for edma3-tptc
The eDMA3 TPTC does not need any software configuration, but it is a
separate IP block in the SoC. In order the omap hwmod core to be able to
handle the TPTC resources correctly in regards of PM we need to have a
driver loaded for it.
This patch will add a dummy driver skeleton without probe or remove
callbacks provided.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reported-by: Olof Johansson <olof@lixom.net>
Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/edma.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 31722d436a42..6b03e4e84e6b 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c | |||
@@ -269,6 +269,11 @@ static const struct of_device_id edma_of_ids[] = { | |||
269 | {} | 269 | {} |
270 | }; | 270 | }; |
271 | 271 | ||
272 | static const struct of_device_id edma_tptc_of_ids[] = { | ||
273 | { .compatible = "ti,edma3-tptc", }, | ||
274 | {} | ||
275 | }; | ||
276 | |||
272 | static inline unsigned int edma_read(struct edma_cc *ecc, int offset) | 277 | static inline unsigned int edma_read(struct edma_cc *ecc, int offset) |
273 | { | 278 | { |
274 | return (unsigned int)__raw_readl(ecc->base + offset); | 279 | return (unsigned int)__raw_readl(ecc->base + offset); |
@@ -2399,6 +2404,13 @@ static struct platform_driver edma_driver = { | |||
2399 | }, | 2404 | }, |
2400 | }; | 2405 | }; |
2401 | 2406 | ||
2407 | static struct platform_driver edma_tptc_driver = { | ||
2408 | .driver = { | ||
2409 | .name = "edma3-tptc", | ||
2410 | .of_match_table = edma_tptc_of_ids, | ||
2411 | }, | ||
2412 | }; | ||
2413 | |||
2402 | bool edma_filter_fn(struct dma_chan *chan, void *param) | 2414 | bool edma_filter_fn(struct dma_chan *chan, void *param) |
2403 | { | 2415 | { |
2404 | bool match = false; | 2416 | bool match = false; |
@@ -2418,6 +2430,12 @@ EXPORT_SYMBOL(edma_filter_fn); | |||
2418 | 2430 | ||
2419 | static int edma_init(void) | 2431 | static int edma_init(void) |
2420 | { | 2432 | { |
2433 | int ret; | ||
2434 | |||
2435 | ret = platform_driver_register(&edma_tptc_driver); | ||
2436 | if (ret) | ||
2437 | return ret; | ||
2438 | |||
2421 | return platform_driver_register(&edma_driver); | 2439 | return platform_driver_register(&edma_driver); |
2422 | } | 2440 | } |
2423 | subsys_initcall(edma_init); | 2441 | subsys_initcall(edma_init); |
@@ -2425,6 +2443,7 @@ subsys_initcall(edma_init); | |||
2425 | static void __exit edma_exit(void) | 2443 | static void __exit edma_exit(void) |
2426 | { | 2444 | { |
2427 | platform_driver_unregister(&edma_driver); | 2445 | platform_driver_unregister(&edma_driver); |
2446 | platform_driver_unregister(&edma_tptc_driver); | ||
2428 | } | 2447 | } |
2429 | module_exit(edma_exit); | 2448 | module_exit(edma_exit); |
2430 | 2449 | ||