Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
linux-elphel
Commits
aad97f5c
Commit
aad97f5c
authored
Sep 09, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove driver specific structure from ahci_cmd.h
parent
d72b8ecc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
ahci_elphel.c
src/drivers/ata/ahci_elphel.c
+0
-1
ahci_elphel.h
src/drivers/ata/ahci_elphel.h
+1
-0
circbuf.h
src/drivers/elphel/circbuf.h
+9
-4
ahci_cmd.h
src/include/uapi/elphel/ahci_cmd.h
+5
-10
No files found.
src/drivers/ata/ahci_elphel.c
View file @
aad97f5c
...
...
@@ -34,7 +34,6 @@
#include "ahci_elphel.h"
#include "../elphel/exif393.h"
#include "../elphel/jpeghead.h"
#include "../elphel/circbuf.h"
#include "../elphel/x393_helpers.h"
#define DRV_NAME "elphel-ahci"
...
...
src/drivers/ata/ahci_elphel.h
View file @
aad97f5c
...
...
@@ -20,6 +20,7 @@
*/
#include <uapi/elphel/ahci_cmd.h>
#include "../elphel/circbuf.h"
#ifndef _AHCI_ELPHEL_EXT
#define _AHCI_ELPHEL_EXT
...
...
src/drivers/elphel/circbuf.h
View file @
aad97f5c
...
...
@@ -23,7 +23,12 @@
#define _CIRCBUF_H
#include <linux/poll.h>
#include <uapi/elphel/ahci_cmd.h>
struct
fvec
{
void
*
iov_base
;
///< pointer to allocated buffer
size_t
iov_len
;
///< the size (in bytes) of allocated buffer; set after allocation and is not modified during buffer lifetime
dma_addr_t
iov_dma
;
///< buffer physical address
};
/** @brief Circular buffer private data */
struct
circbuf_priv_t
{
...
...
src/include/uapi/elphel/ahci_cmd.h
View file @
aad97f5c
...
...
@@ -26,6 +26,7 @@
#define DRV_CMD_FINISH (1 << 1)
#define DRV_CMD_EXIF (1 << 2)
#define NAME_TO_STR(NAME) #NAME
/** The path to Elphel AHCI driver sysfs entry. The trailing slash is mandatory. */
#define SYSFS_AHCI_ENTRY "/sys/devices/soc0/amba@0/80000000.elphel-ahci/"
/** sysfs entry name, no double quotes. This macro is used to populate <em>struct attribute</em> in #ahci_elphel.c */
...
...
@@ -37,14 +38,14 @@
/** sysfs entry name, no double quotes. This macro is used to populate <em>struct attribute</em> in #ahci_elphel.c */
#define SYSFS_AHCI_FNAME_CURR lba_current
/** This file is used to send commands to AHCI driver from user space applications (camogm as for now). */
#define SYSFS_AHCI_WRITE SYSFS_AHCI_ENTRY
#SYSFS_AHCI_FNAME_WRITE
#define SYSFS_AHCI_WRITE SYSFS_AHCI_ENTRY
NAME_TO_STR(SYSFS_AHCI_FNAME_WRITE)
/** This file is used to control starting LBA of a disk buffer (R/W). */
#define SYSFS_AHCI_LBA_START SYSFS_AHCI_ENTRY
#SYSFS_AHCI_FNAME_START
#define SYSFS_AHCI_LBA_START SYSFS_AHCI_ENTRY
NAME_TO_STR(SYSFS_AHCI_FNAME_START)
/** This file is used to control ending LBA of a disk buffer (R/W). */
#define SYSFS_AHCI_LBA_END SYSFS_AHCI_ENTRY
#SYSFS_AHCI_FNAME_END
#define SYSFS_AHCI_LBA_END SYSFS_AHCI_ENTRY
NAME_TO_STR(SYSFS_AHCI_FNAME_END)
/** This file is used to control current LBA of a disk buffer (R/W). Use this file to set a pointer inside
* [lba_start..lba_end] area where next write operation will begin. */
#define SYSFS_AHCI_LBA_CURRENT SYSFS_AHCI_ENTRY
#SYSFS_AHCI_FNAME_CURR
#define SYSFS_AHCI_LBA_CURRENT SYSFS_AHCI_ENTRY
NAME_TO_STR(SYSFS_AHCI_FNAME_CURR)
struct
frame_data
{
unsigned
int
sensor_port
;
...
...
@@ -54,10 +55,4 @@ struct frame_data {
int
cmd
;
};
struct
fvec
{
void
*
iov_base
;
///< pointer to allocated buffer
size_t
iov_len
;
///< the size (in bytes) of allocated buffer; set after allocation and is not modified during buffer lifetime
dma_addr_t
iov_dma
;
///< buffer physical address
};
#endif
/* _AHCI_CMD */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment