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
Hide 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 @@
...
@@ -34,7 +34,6 @@
#include "ahci_elphel.h"
#include "ahci_elphel.h"
#include "../elphel/exif393.h"
#include "../elphel/exif393.h"
#include "../elphel/jpeghead.h"
#include "../elphel/jpeghead.h"
#include "../elphel/circbuf.h"
#include "../elphel/x393_helpers.h"
#include "../elphel/x393_helpers.h"
#define DRV_NAME "elphel-ahci"
#define DRV_NAME "elphel-ahci"
...
...
src/drivers/ata/ahci_elphel.h
View file @
aad97f5c
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
*/
*/
#include <uapi/elphel/ahci_cmd.h>
#include <uapi/elphel/ahci_cmd.h>
#include "../elphel/circbuf.h"
#ifndef _AHCI_ELPHEL_EXT
#ifndef _AHCI_ELPHEL_EXT
#define _AHCI_ELPHEL_EXT
#define _AHCI_ELPHEL_EXT
...
...
src/drivers/elphel/circbuf.h
View file @
aad97f5c
...
@@ -23,13 +23,18 @@
...
@@ -23,13 +23,18 @@
#define _CIRCBUF_H
#define _CIRCBUF_H
#include <linux/poll.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 */
/** @brief Circular buffer private data */
struct
circbuf_priv_t
{
struct
circbuf_priv_t
{
int
minor
;
///< device file minor number
int
minor
;
///< device file minor number
unsigned
long
*
buf_ptr
;
///< pointer to circular buffer memory region
unsigned
long
*
buf_ptr
;
///< pointer to circular buffer memory region
dma_addr_t
phys_addr
;
///< physical address of memory region reported by memory driver
dma_addr_t
phys_addr
;
///< physical address of memory region reported by memory driver
};
};
extern
struct
circbuf_priv_t
*
circbuf_priv_ptr
;
extern
struct
circbuf_priv_t
*
circbuf_priv_ptr
;
extern
wait_queue_head_t
circbuf_wait_queue
;
extern
wait_queue_head_t
circbuf_wait_queue
;
...
...
src/include/uapi/elphel/ahci_cmd.h
View file @
aad97f5c
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#define DRV_CMD_FINISH (1 << 1)
#define DRV_CMD_FINISH (1 << 1)
#define DRV_CMD_EXIF (1 << 2)
#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. */
/** 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/"
#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 */
/** sysfs entry name, no double quotes. This macro is used to populate <em>struct attribute</em> in #ahci_elphel.c */
...
@@ -37,14 +38,14 @@
...
@@ -37,14 +38,14 @@
/** sysfs entry name, no double quotes. This macro is used to populate <em>struct attribute</em> in #ahci_elphel.c */
/** 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
#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). */
/** 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). */
/** 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). */
/** 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
/** 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. */
* [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
{
struct
frame_data
{
unsigned
int
sensor_port
;
unsigned
int
sensor_port
;
...
@@ -54,10 +55,4 @@ struct frame_data {
...
@@ -54,10 +55,4 @@ struct frame_data {
int
cmd
;
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 */
#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