Removed header addition.
This commit is contained in:
parent
ec407273f4
commit
67b3756976
|
|
@ -16,13 +16,8 @@
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with the IgH EtherCAT master. If not, see <http://www.gnu.org/licenses/>.
|
* with the IgH EtherCAT master. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* The license mentioned above concerns the source code only. Using the
|
|
||||||
* EtherCAT technology and brand is only permitted in compliance with the
|
|
||||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __EC_RTDM_DETAILS_H__
|
#ifndef __EC_RTDM_DETAILS_H__
|
||||||
#define __EC_RTDM_DETAILS_H__
|
#define __EC_RTDM_DETAILS_H__
|
||||||
|
|
||||||
|
|
@ -60,5 +55,6 @@ static inline EC_RTDM_USERFD_T *ec_ioctl_to_rtdm(ec_ioctl_context_t *ctx)
|
||||||
return container_of(ctx, ec_rtdm_context_t, ioctl_ctx)->user_fd;
|
return container_of(ctx, ec_rtdm_context_t, ioctl_ctx)->user_fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
#endif // __EC_RTDM_DETAILS_H__
|
#endif // __EC_RTDM_DETAILS_H__
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Moehwald GmbH B. Benner
|
* Copyright (C) 2009-2010 Moehwald GmbH B. Benner
|
||||||
* 2011 IgH Andreas Stewering-Bone
|
* 2011 IgH Andreas Stewering-Bone
|
||||||
* 2012 Florian Pose <fp@igh-essen.com>
|
* 2012 Florian Pose <fp@igh.de>
|
||||||
*
|
*
|
||||||
* This file is part of the IgH EtherCAT master.
|
* This file is part of the IgH EtherCAT master.
|
||||||
*
|
*
|
||||||
|
|
@ -20,10 +18,6 @@
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with the IgH EtherCAT master. If not, see <http://www.gnu.org/licenses/>.
|
* with the IgH EtherCAT master. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* The license mentioned above concerns the source code only. Using the
|
|
||||||
* EtherCAT technology and brand is only permitted in compliance with the
|
|
||||||
* industrial property and similar rights of Beckhoff Automation GmbH.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
|
|
@ -43,6 +37,8 @@
|
||||||
*/
|
*/
|
||||||
#define DEBUG_RTDM 0
|
#define DEBUG_RTDM 0
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
static int ec_rtdm_open(struct rtdm_fd *fd, int oflags)
|
static int ec_rtdm_open(struct rtdm_fd *fd, int oflags)
|
||||||
{
|
{
|
||||||
struct ec_rtdm_context *ctx = rtdm_fd_to_private(fd);
|
struct ec_rtdm_context *ctx = rtdm_fd_to_private(fd);
|
||||||
|
|
@ -66,6 +62,8 @@ static int ec_rtdm_open(struct rtdm_fd *fd, int oflags)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
static void ec_rtdm_close(struct rtdm_fd *fd)
|
static void ec_rtdm_close(struct rtdm_fd *fd)
|
||||||
{
|
{
|
||||||
struct ec_rtdm_context *ctx = rtdm_fd_to_private(fd);
|
struct ec_rtdm_context *ctx = rtdm_fd_to_private(fd);
|
||||||
|
|
@ -84,6 +82,8 @@ static void ec_rtdm_close(struct rtdm_fd *fd)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
static int ec_rtdm_ioctl_rt_handler(struct rtdm_fd *fd, unsigned int request,
|
static int ec_rtdm_ioctl_rt_handler(struct rtdm_fd *fd, unsigned int request,
|
||||||
void __user *arg)
|
void __user *arg)
|
||||||
{
|
{
|
||||||
|
|
@ -92,7 +92,8 @@ static int ec_rtdm_ioctl_rt_handler(struct rtdm_fd *fd, unsigned int request,
|
||||||
struct rtdm_device *dev = rtdm_fd_device(fd);
|
struct rtdm_device *dev = rtdm_fd_device(fd);
|
||||||
ec_rtdm_dev_t *rtdm_dev = dev->device_data;
|
ec_rtdm_dev_t *rtdm_dev = dev->device_data;
|
||||||
|
|
||||||
result = ec_ioctl_rtdm_rt(rtdm_dev->master, &ctx->ioctl_ctx, request, arg);
|
result =
|
||||||
|
ec_ioctl_rtdm_rt(rtdm_dev->master, &ctx->ioctl_ctx, request, arg);
|
||||||
|
|
||||||
if (result == -ENOTTY)
|
if (result == -ENOTTY)
|
||||||
/* Try again with nrt ioctl handler below in secondary mode. */
|
/* Try again with nrt ioctl handler below in secondary mode. */
|
||||||
|
|
@ -101,6 +102,8 @@ static int ec_rtdm_ioctl_rt_handler(struct rtdm_fd *fd, unsigned int request,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
static int ec_rtdm_ioctl_nrt_handler(struct rtdm_fd *fd, unsigned int request,
|
static int ec_rtdm_ioctl_nrt_handler(struct rtdm_fd *fd, unsigned int request,
|
||||||
void __user *arg)
|
void __user *arg)
|
||||||
{
|
{
|
||||||
|
|
@ -111,12 +114,17 @@ static int ec_rtdm_ioctl_nrt_handler(struct rtdm_fd *fd, unsigned int request,
|
||||||
return ec_ioctl_rtdm_nrt(rtdm_dev->master, &ctx->ioctl_ctx, request, arg);
|
return ec_ioctl_rtdm_nrt(rtdm_dev->master, &ctx->ioctl_ctx, request, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
static int ec_rtdm_mmap(struct rtdm_fd *fd, struct vm_area_struct *vma)
|
static int ec_rtdm_mmap(struct rtdm_fd *fd, struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
struct ec_rtdm_context *ctx = (struct ec_rtdm_context *) rtdm_fd_to_private(fd);
|
struct ec_rtdm_context *ctx =
|
||||||
|
(struct ec_rtdm_context *) rtdm_fd_to_private(fd);
|
||||||
return rtdm_mmap_kmem(vma, (void *)ctx->ioctl_ctx.process_data);
|
return rtdm_mmap_kmem(vma, (void *)ctx->ioctl_ctx.process_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct rtdm_driver ec_rtdm_driver = {
|
static struct rtdm_driver ec_rtdm_driver = {
|
||||||
.profile_info = RTDM_PROFILE_INFO(ec_rtdm,
|
.profile_info = RTDM_PROFILE_INFO(ec_rtdm,
|
||||||
RTDM_CLASS_EXPERIMENTAL,
|
RTDM_CLASS_EXPERIMENTAL,
|
||||||
|
|
@ -134,6 +142,8 @@ static struct rtdm_driver ec_rtdm_driver = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
int ec_rtdm_dev_init(ec_rtdm_dev_t *rtdm_dev, ec_master_t *master)
|
int ec_rtdm_dev_init(ec_rtdm_dev_t *rtdm_dev, ec_master_t *master)
|
||||||
{
|
{
|
||||||
struct rtdm_device *dev;
|
struct rtdm_device *dev;
|
||||||
|
|
@ -167,6 +177,8 @@ int ec_rtdm_dev_init(ec_rtdm_dev_t *rtdm_dev, ec_master_t *master)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
void ec_rtdm_dev_clear(ec_rtdm_dev_t *rtdm_dev)
|
void ec_rtdm_dev_clear(ec_rtdm_dev_t *rtdm_dev)
|
||||||
{
|
{
|
||||||
rtdm_dev_unregister(rtdm_dev->dev);
|
rtdm_dev_unregister(rtdm_dev->dev);
|
||||||
|
|
@ -176,3 +188,5 @@ void ec_rtdm_dev_clear(ec_rtdm_dev_t *rtdm_dev)
|
||||||
|
|
||||||
kfree(rtdm_dev->dev);
|
kfree(rtdm_dev->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue