summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b2437c)
raw | patch | inline | side by side (parent: 2b2437c)
author | David Lide <a0216552@gtudci01.(none)> | |
Mon, 30 Jan 2012 21:46:10 +0000 (16:46 -0500) | ||
committer | David Lide <a0216552@gtudci01.(none)> | |
Mon, 30 Jan 2012 21:46:10 +0000 (16:46 -0500) |
- cleaned up tools/module dir
ti/runtime/netapi/netapi.h | patch | blob | history | |
ti/runtime/netapi/tools/module/Module.symvers | [deleted file] | patch | blob | history |
ti/runtime/netapi/tools/module/modules.order | [deleted file] | patch | blob | history |
ti/runtime/netapi/tools/module/netapimod.c | patch | blob | history | |
ti/runtime/netapi/tools/module/netapimod.ko | patch | blob | history | |
ti/runtime/netapi/tools/module/netapimod.mod.c | [deleted file] | patch | blob | history |
ti/runtime/netapi/tools/module/netapimod.mod.o | [deleted file] | patch | blob | history |
ti/runtime/netapi/tools/module/netapimod.o | [deleted file] | patch | blob | history |
index a23cbc2ef4afb4172fca724873f02618b72040f7..0e5bf454f684412ab867315f6b05101026237842 100644 (file)
* @brief API returns a @ref Pktlib_HeapIfTable to use when creating pktlib heaps
*
* @details Application will need a heapIfTable in order to create its own heaps. This
- * function returns a table that can be used. The memory used for these heaps is
- * special (alignment, must be contguous, must have a physical2virtual mapping that
- * is known by NETAPI. Thus it must be completely managed by NETAPI.
+ * function returns a table that can be passed in the call to @ref Pktlib_CreateHeap
+* The memory used for these heaps is special:
+ * - specific alignment,
+ * - must be contguous,
+ * - must have a physical to virtual mapping that
+ * - is known by NETAPI.
+ * Thus it must be completely managed by NETAPI. This interfaced table provides a
+ * malloc function that the pktlib heap library uses to allocate data for the heap
+ * buffers.
* @param[in] none
* @retval @ref Pktlib_HeapIfTable pointer
* @pre @ref netapi_init
*/
Pktlib_HeapIfTable *netapi_getPktlibIfTable(void) ;
-/* utilities to see how much mem/descriptor space is remaining */
+/** utilities to see how much mem/descriptor space is remaining **/
+
+/** @ingroup netapi_api_functions */
+/*
+* @brief API is used to return the amount of free memory available for allocating buffers
+ ( for additonal Pktlib heaps.
+ * @details the applicaiton can use this API to determine how much free memory is .
+ * available for heap buffers if it decides to create its own.
+ * @param[in] void
+ * @retval int : amount of memory available for heap buffer storage (in bytes)
+ * @pre @ref netapi_init
+ */
int netapi_getBufmemRemainder(void);
+/** @ingroup netapi_api_functions */
+
+/*
+* @brief API is used to return the amount of free memory available for allocating Descriptors
+ ( for additonal Pktlib heaps.
+ * @details the applicaiton can use this API to determine how much free memory is .
+ * available for heap descriptors if it decides to create its own heap.
+ * @param[in] void
+ * @retval int : amount of memory available for heap descriptor storage (in bytes)
+ * @pre @ref netapi_init
+ */
int netapi_getDescRemainder(void);
/* utility to get default flow */
+/** @ingroup netapi_api_functions */
+/*
+* @brief API is used to return the default NETCP flow that is to be used for received
+ ( packets..
+ * @details the applicaiton can use this API to return the default NETCP flow that is used
+ * for received packets. A NETCP flow is a list of PacketLib Heaps that are to be
+ * used to supply free packets to the receive DMA function.
+ * @param[in] @ref NETAPI_T handle to NETAPI instance
+ * @retval NETCP_CFG_FLOW_HANDLE_T : handle to default flow
+ * @pre @ref netapi_init
+ */
static inline NETCP_CFG_FLOW_HANDLE_T netapi_getDefaultFlow(NETAPI_T p) {
NETAPI_HANDLE_T *pp = (NETAPI_HANDLE_T *) p;
return pp->def_flow;
}
/* utility to get default route */
+/** @ingroup netapi_api_functions */
+/*
+* @brief API is used to return the default NETCP route
+ *
+ * @details this functions returns the default NETCP route created by @ref netapi_init.
+ * A netcp route consists of a NETCP flow plus a destination pktio channel
+ * @param[in] @ref NETAPI_T handle to NETAPI instance
+ * @retval NETCP_CFG_ROUTE_HANDLE_T: the handle of the default route.
+ * @pre @ref netapi_init
+ */
static inline NETCP_CFG_ROUTE_HANDLE_T netapi_getDefaultRoute(NETAPI_T p) {
NETAPI_HANDLE_T *pp = (NETAPI_HANDLE_T *) p;
return pp->def_route;}
/* utility to set/get a cookie in the netapi handle */
+/** @ingroup netapi_api_functions */
+/*
+* @brief API is used to return a piece of application-provided opaque data that has been
+ ( stored in the netapi instance.
+ * @details the applicaiton can save a pointer to opaque data in the @ref NETAPI_T instance.
+ * This APi lets this data be returned to the application.
+ * @param[in] @ref NETAPI_T handle to NETAPI instance
+ * @retval void *
+ * @pre @ref netapi_init @ref netapi_setCookie
+ */
static inline void * netapi_getCookie(NETAPI_T p)
{
NETAPI_HANDLE_T *pp = (NETAPI_HANDLE_T *) p;
return pp->cookie;
}
+
+/** @ingroup netapi_api_functions */
+/*
+* @brief API is used to set a piece of application-provided opaque data in the
+ ( netapi instance.
+ * @details the applicaiton can save a pointer to opaque data in the @ref NETAPI_T instance.
+ * This APi can be returned later to the application via @ref netapi_getCookie
+ * @param[in] @ref NETAPI_T : handle to NETAPI instance
+ * @param[in] void * : opaque data to be saved
+ * @retval void
+ * @pre @ref netapi_init
+ */
static inline void netapi_setCookie(NETAPI_T p, void * cookie)
{
NETAPI_HANDLE_T *pp = (NETAPI_HANDLE_T *) p;
void netapi_netcpPoll(NETAPI_T p);
//heap registration for polling purposes
+
+/** @ingroup netapi_api_functions */
+/*
+* @brief API is used to register a heap that is created by application so that
+ * it's garbage queue can be polled automatically by @ref netapi_poll_heapGarbage().
+ *
+ * @details this function registers an application-created heap with the netapi instance
+ * so that it can add that heap's garbage queue to the garbage poll function.
+ * NOTE: netapi internal heap is automatically registered
+ * @param[in] @ref NETAPI_T handle to NETAPI instance
+ * @param[in] @ref Pktlib_HeapHandle: handle of heap to register
+ * @retval int : 1 if OK, 0 on error
+ * @pre @ref netapi_init @ref Pktlib_CreateHeap
+ */
int netapi_registerHeap(NETAPI_T p, Pktlib_HeapHandle h);
+
+/** @ingroup netapi_api_functions */
+/*
+* @brief API is used to un-register a heap that was created by application and previously
+* registerd so that
+ * it's garbage queue could be polled automatically by @ref netapi_poll_heapGarbage().
+ *
+ * @details this function un-registers an application-created heap with the netapi instance
+ * @param[in] @ref NETAPI_T: handle to NETAPI instance
+ * @param[in] @ref Pktlib_HeapHandle : handle to heap
+ * @retval 0 if err, 1 if OK
+ * @pre @ref netapi_init , @ref Pktlib_CreateHeap, @ref netai_registerHeap()
+ */
int netapi_unregisterHeap(NETAPI_T p, Pktlib_HeapHandle h);
+
+
+/** @ingroup netapi_api_functions */
+/*
+* @brief API is used to poll the garbage collection queue for the internal NETAPI heaps and
+ * any application created heaps
+ *
+ * @details this function is used to poll the netapi internal heaps and any
+ * application-created heaps that have been registered with the netapi instance. The
+ * poll function checks the garbage collection queue associated with the heap and returns
+ * descriptors and buffers when appropriate to the main free queue.
+ * @param[in] @ref NETAPI_T handle to NETAPI instance
+ * @retval none
+ * @pre @ref netapi_init @ref pktlib_CreateHeap
+ */
void netapi_poll_heapGarbage(NETAPI_T p);
#endif
diff --git a/ti/runtime/netapi/tools/module/Module.symvers b/ti/runtime/netapi/tools/module/Module.symvers
diff --git a/ti/runtime/netapi/tools/module/modules.order b/ti/runtime/netapi/tools/module/modules.order
+++ /dev/null
@@ -1 +0,0 @@
-kernel//home/a0216552/appleton2/mymodules/netapimod.ko
diff --git a/ti/runtime/netapi/tools/module/netapimod.c b/ti/runtime/netapi/tools/module/netapimod.c
index 5b14eb59c17e03ec6fd7a03480055a8f41cc2c52..b15c75c210a7b9eb70895b48f9b2b1fc5d18f00f 100644 (file)
#endif
-/* Master Control Block for Voice Ni network module */
-static struct
-{
-
-} netapi_mcb;
//extern long davinci_ck_get_arm_rate(void);
static void MPU_Enable_userModeAccess(void)
{
unsigned long val;
int len=0;
- struct clk *clk = clk_get((struct device *) NULL,"clk_arm");
+ struct clk *clk = clk_get((struct device *) NULL,"main_div_chip_clk1");
//enable user access to qmss h/w
MPU_Enable_userModeAccess();
*********************************************************************************/
static int __init netapimod_init_module(void)
{
- int ret;
void * priv = NULL;
DPRINTK("netapimod_init_module: init\n");
create_proc_read_entry("netapi", 0, NULL, netapi_init_proc, (void *)priv);
-// create_proc_read_entry("netapi_stats", 0, NULL, netapi_stats_proc, (void *)priv);
+ // create_proc_read_entry("netapi_stats", 0, NULL, netapi_stats_proc, (void *)priv);
+
+ //enable user access to qmss h/w
+ MPU_Enable_userModeAccess();
+
DPRINTK("NETAPI module loaded \n");
return 0;
}
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Texas Instruments Incorporated");
-MODULE_DESCRIPTION("TI voice NETAPI core module.");
+MODULE_DESCRIPTION("TI NETAPI core module.");
MODULE_SUPPORTED_DEVICE("Texas Instruments netapi");
diff --git a/ti/runtime/netapi/tools/module/netapimod.ko b/ti/runtime/netapi/tools/module/netapimod.ko
index 7a69bdba5e564f15c96d509750fd758035b30815..aa2d3d96b4e0b9fd76d456d9a26856763cc5b709 100644 (file)
Binary files a/ti/runtime/netapi/tools/module/netapimod.ko and b/ti/runtime/netapi/tools/module/netapimod.ko differ
Binary files a/ti/runtime/netapi/tools/module/netapimod.ko and b/ti/runtime/netapi/tools/module/netapimod.ko differ
diff --git a/ti/runtime/netapi/tools/module/netapimod.mod.c b/ti/runtime/netapi/tools/module/netapimod.mod.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
- { 0x6b79149b, "module_layout" },
- { 0xef64e10e, "clk_get_rate" },
- { 0x3c2c5af5, "sprintf" },
- { 0xa24d2473, "davinci_iounmap" },
- { 0x9ad0d04a, "davinci_ioremap" },
- { 0x8abb4dcb, "clk_get" },
- { 0xe914e41e, "strcpy" },
- { 0xa099afe, "create_proc_entry" },
- { 0xefd6cf06, "__aeabi_unwind_cpp_pr0" },
- { 0x27e1a049, "printk" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=";
-
diff --git a/ti/runtime/netapi/tools/module/netapimod.mod.o b/ti/runtime/netapi/tools/module/netapimod.mod.o
deleted file mode 100644 (file)
index 2a6e0ed..0000000
Binary files a/ti/runtime/netapi/tools/module/netapimod.mod.o and /dev/null differ
index 2a6e0ed..0000000
Binary files a/ti/runtime/netapi/tools/module/netapimod.mod.o and /dev/null differ
diff --git a/ti/runtime/netapi/tools/module/netapimod.o b/ti/runtime/netapi/tools/module/netapimod.o
deleted file mode 100644 (file)
index 81bbf6c..0000000
Binary files a/ti/runtime/netapi/tools/module/netapimod.o and /dev/null differ
index 81bbf6c..0000000
Binary files a/ti/runtime/netapi/tools/module/netapimod.o and /dev/null differ