Loading src/drivers/ata/ahci_elphel.c +0 −1 Original line number Original line Diff line number Diff line Loading @@ -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" Loading src/drivers/ata/ahci_elphel.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading src/drivers/elphel/circbuf.h +9 −4 Original line number Original line Diff line number Diff line Loading @@ -23,7 +23,12 @@ #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 { Loading src/include/uapi/elphel/ahci_cmd.h +5 −10 Original line number Original line Diff line number Diff line Loading @@ -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 */ Loading @@ -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; Loading @@ -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 */ Loading
src/drivers/ata/ahci_elphel.c +0 −1 Original line number Original line Diff line number Diff line Loading @@ -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" Loading
src/drivers/ata/ahci_elphel.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading
src/drivers/elphel/circbuf.h +9 −4 Original line number Original line Diff line number Diff line Loading @@ -23,7 +23,12 @@ #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 { Loading
src/include/uapi/elphel/ahci_cmd.h +5 −10 Original line number Original line Diff line number Diff line Loading @@ -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 */ Loading @@ -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; Loading @@ -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 */