summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29d3aa3)
raw | patch | inline | side by side (parent: 29d3aa3)
author | Ajay Kumar Gupta <ajay.gupta@ti.com> | |
Thu, 20 Jan 2011 09:28:21 +0000 (14:58 +0530) | ||
committer | Vaibhav Hiremath <hvaibhav@ti.com> | |
Mon, 23 Jan 2012 19:14:09 +0000 (00:44 +0530) |
Changes:
- __init to __devinit
- rename create/destroy functions
- channels maxlen
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
- __init to __devinit
- rename create/destroy functions
- channels maxlen
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
drivers/usb/musb/cppi41.c | patch | blob | history | |
drivers/usb/musb/cppi41.h | patch | blob | history | |
drivers/usb/musb/cppi41_dma.c | patch | blob | history |
index 498f858c249c999518c409aafa9b0c8714ffa569..ec97a3b609e081f8b967538f204eda79aa29b446 100644 (file)
/******************** CPPI 4.1 Functions (External Interface) *****************/
-int __init cppi41_queue_mgr_init(u8 q_mgr, dma_addr_t rgn0_base, u16 rgn0_size)
+int cppi41_queue_mgr_init(u8 q_mgr, dma_addr_t rgn0_base, u16 rgn0_size)
{
void __iomem *q_mgr_regs;
void *ptr;
return 0;
}
-int __init cppi41_dma_block_init(u8 dma_num, u8 q_mgr, u8 num_order,
+int cppi41_dma_block_init(u8 dma_num, u8 q_mgr, u8 num_order,
u8 *sched_tbl, u8 tbl_size)
{
const struct cppi41_dma_block *dma_block;
index 032ed135020ad06813f5d253a238b35c1cf10010..5452af9748d7c8654133b5ac2273818b9b9d6b45 100644 (file)
#define DMA_SCHED_LAST_ENTRY_SHIFT 0
#define DMA_SCHED_LAST_ENTRY_MASK (0xff << DMA_SCHED_LAST_ENTRY_SHIFT)
+#define CPPI41_TXDMA_MAXLEN (4 * 1024 * 1024 - 1)
+#define CPPI41_RXDMA_MAXLEN (64 * 1024)
/*
* DMA Scheduler - Table Region
*/
*
* Returns 0 on success, error otherwise.
*/
-int __init cppi41_dma_block_init(u8 dma_num, u8 q_mgr, u8 num_order,
+int cppi41_dma_block_init(u8 dma_num, u8 q_mgr, u8 num_order,
u8 *sched_tbl, u8 tbl_size);
/*
index 8c9bf5f5c154ead9fcc26969cb1c477b098446c2..9e146d835e8ade26cd3b9401ce2c050cf2c0fc6d 100644 (file)
#include <linux/errno.h>
#include <linux/dma-mapping.h>
+#include <linux/module.h>
#include "cppi41.h"
*
* This function initializes the CPPI 4.1 Tx/Rx channels.
*/
-static int __init cppi41_controller_start(struct dma_controller *controller)
+static int __devinit cppi41_controller_start(struct dma_controller *controller)
{
struct cppi41 *cppi;
struct cppi41_channel *cppi_ch;
cppi_ch->end_pt = ep;
cppi_ch->ch_num = ch_num;
cppi_ch->channel.status = MUSB_DMA_STATUS_FREE;
+ cppi_ch->channel.max_len = is_tx ?
+ CPPI41_TXDMA_MAXLEN : CPPI41_RXDMA_MAXLEN;
DBG(4, "Allocated DMA %cx channel %d for EP%d\n", is_tx ? 'T' : 'R',
ch_num, ep_num);
}
/**
- * dma_controller_create - instantiate an object representing DMA controller.
+ * cppi41_dma_controller_create -
+ * instantiate an object representing DMA controller.
*/
-struct dma_controller * __init dma_controller_create(struct musb *musb,
- void __iomem *mregs)
+struct dma_controller * __devinit
+cppi41_dma_controller_create(struct musb *musb, void __iomem *mregs)
{
struct cppi41 *cppi;
return &cppi->controller;
}
+EXPORT_SYMBOL(cppi41_dma_controller_create);
/**
- * dma_controller_destroy - destroy a previously instantiated DMA controller
+ * cppi41_dma_controller_destroy -
+ * destroy a previously instantiated DMA controller
* @controller: the controller
*/
-void dma_controller_destroy(struct dma_controller *controller)
+void cppi41_dma_controller_destroy(struct dma_controller *controller)
{
struct cppi41 *cppi;
/* Free the CPPI object */
kfree(cppi);
}
+EXPORT_SYMBOL(cppi41_dma_controller_destroy);
static void usb_process_tx_queue(struct cppi41 *cppi, unsigned index)
{
if (tx & 1)
usb_process_tx_queue(cppi, index);
}
+
+MODULE_DESCRIPTION("CPPI4.1 dma controller driver for musb");
+MODULE_LICENSE("GPL v2");
+
+static int __init cppi41_dma_init(void)
+{
+ return 0;
+}
+module_init(cppi41_dma_init);
+
+static void __exit cppi41_dma__exit(void)
+{
+}
+module_exit(cppi41_dma__exit);