Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228198
b: refs/heads/master
c: 62a8c3a
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent bea1118 commit f3046cf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: de92e3a3b25dd0cda00a07b30c325785b5c2d939
refs/heads/master: 62a8c3a32e4143812ed8e0f3783ef1ea40dc87e4
1 change: 1 addition & 0 deletions trunk/drivers/staging/sep/sep_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <asm/cacheflush.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/rar_register.h>

#include <linux/netlink.h>
#include <linux/connector.h>
Expand Down
61 changes: 0 additions & 61 deletions trunk/drivers/staging/sep/sep_driver_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,6 @@ held by the proccess (struct file) */

/* This stub header is for non Moorestown driver only */

/*
* Constants that specify different kinds of RAR regions that could be
* set up.
*/
static __u32 const RAR_TYPE_VIDEO; /* 0 */
static __u32 const RAR_TYPE_AUDIO = 1;
static __u32 const RAR_TYPE_IMAGE = 2;
static __u32 const RAR_TYPE_DATA = 3;

/*
* @struct RAR_stat
*
Expand Down Expand Up @@ -373,56 +364,4 @@ struct RAR_buffer {

#endif /* MEMRAR */

/* rar_register */
#ifndef CONFIG_RAR_REGISTER
/* This stub header is for non Moorestown driver only */

/* The register_rar function is to used by other device drivers
* to ensure that this driver is ready. As we cannot be sure of
* the compile/execute order of dirvers in ther kernel, it is
* best to give this driver a callback function to call when
* it is ready to give out addresses. The callback function
* would have those steps that continue the initialization of
* a driver that do require a valid RAR address. One of those
* steps would be to call get_rar_address()
* This function return 0 on success an -1 on failure.
*/
#define register_rar(a, b, c) (-ENODEV)

/* The get_rar_address function is used by other device drivers
* to obtain RAR address information on a RAR. It takes two
* parameter:
*
* int rar_index
* The rar_index is an index to the rar for which you wish to retrieve
* the address information.
* Values can be 0,1, or 2.
*
* struct RAR_address_struct is a pointer to a place to which the function
* can return the address structure for the RAR.
*
* The function returns a 0 upon success or a -1 if there is no RAR
* facility on this system.
*/
#define rar_get_address(a, b, c) (-ENODEV)

/* The lock_rar function is ued by other device drivers to lock an RAR.
* once an RAR is locked, it stays locked until the next system reboot.
* The function takes one parameter:
*
* int rar_index
* The rar_index is an index to the rar that you want to lock.
* Values can be 0,1, or 2.
*
* The function returns a 0 upon success or a -1 if there is no RAR
* facility on this system.
*/
#define rar_lock(a) (-1)

#else /* using real RAR_REGISTER */

#include <linux/rar_register.h>

#endif /* CONFIG_RAR_REGISTER */

#endif /* SEP DRIVER CONFIG */
16 changes: 16 additions & 0 deletions trunk/include/linux/rar_register.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,27 @@

struct rar_device;

#if defined(CONFIG_RAR_REGISTER)
int register_rar(int num,
int (*callback)(unsigned long data), unsigned long data);
void unregister_rar(int num);
int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end);
int rar_lock(int rar_index);
#else
extern void unregister_rar(int num) { }
extern int rar_lock(int rar_index) { return -EIO; }

extern inline int register_rar(int num,
int (*callback)(unsigned long data), unsigned long data)
{
return -ENODEV;
}

extern int rar_get_address(int rar_index, dma_addr_t *start, dma_addr_t *end)
{
return -ENODEV;
}
#endif /* RAR_REGISTER */

#endif /* __KERNEL__ */
#endif /* _RAR_REGISTER_H */

0 comments on commit f3046cf

Please sign in to comment.