os/linux-2.6-tag--devboard-R2_10-4/arch/cris/arch-v32/drivers/elphel/x353.h File Reference

Go to the source code of this file.

Defines

#define X313__RA__STATUS   0x10
#define X313__RA__IRQS   0x11
#define X313__RA__TRIGPH   0x12
#define X313__RA__MODEL   0x13
#define X313__RA__TABLE   0x14
#define X313__RA__SDCH0   0x20
#define X313__RA__SDCH1   0x24
#define X313__RA__SDCH2   0x28
#define X313__RA__SDCH3   0x2c
#define X313__RA__SDBUF3   0x30
#define X313_SR__TRIG   20
#define X313_SR__DMA_EMPTY   19
#define X313_SR__DONE_CMPRS   18
#define X313_SR__DONE_CI   17
#define X313_SR__DCCRDY   16
#define X313_SR__DONE   15
#define X313_SR__SENST1   14
#define X313_SR__SENST0   13
#define X313_SR__NXTFR3   12
#define X313_SR__NXTFR2   11
#define X313_SR__NXTFR1   10
#define X313_SR__NXTFR0   9
#define X313_SR__PIOWEMPTY   8
#define X313_SR__PIORDY   7
#define X313_SR__CH2RDY   6
#define X313_SR__CH1RDY   5
#define X313_SR__CH0RDY   4
#define X313_SR__SCL1   3
#define X313_SR__SDA1   2
#define X313_SR__SCL0   1
#define X313_SR__SDA0   0
#define X313_SR__X323_SI   0
#define X313_SR(x)   ((port_csp0_addr[X313__RA__STATUS] >> X313_SR__##x ) & 1)
#define X313_PIOR(x)   ((port_csp0_addr[X313__RA__IOPINS] >> X313_PIOR__##x ) & 1)
#define X313_IR__VACT   0
#define X313_IR__XINT   1
#define X313_IR__XFEROVR   2
#define X313_IR__DONE   3
#define X313_IR__EOT   4
#define X313_IR__DCC   5
#define X313_IR__DONE_INPUT   6
#define X313_IR__DONE_COMPRESS   7
#define X313_IR__SMART   8
#define X313_IR(x)   ((port_csp0_addr[X313__RA__IRQS] >> X313_IR__##x ) & 1)
#define X313_WA_WCTL   0
#define X313_WA_DMACR   1
#define X313_WA_SENSFPN   2
#define X313_WA_VIRTTRIG   3
#define X313_WA_TRIG   4
#define X313_WA_NLINES   5
#define X313_WA_DCDC   7
#define X313_WA_COLOR_SAT   9
#define DEFAULT_COLOR_SATURATION_BLUE   0x90
#define DEFAULT_COLOR_SATURATION_RED   0xb6
#define X313_WA_FRAMESYNC_DLY   0x0a
#define X313_WA_COMP_CMD   0x0c
#define X313_WA_IRQM   6
#define X313_WA_COMP_TA   0x0d
#define X313_WA_COMP_TD   0x0e
#define X313_WA_MCUNUM   0x0f
#define X3X3_AFTERWRITE   {if (!port_csp0_addr[X313__RA__MODEL]) printk ("model=0");}
#define x3x3_DELAY(x)   {int iiii; for (iiii=0; iiii < (x); iiii++) X3X3_AFTERWRITE ; }
#define X313_WA_SDCH0_CTL0   0x20
#define X313_WA_SDCH0_CTL1   0x21
#define X313_WA_SDCH0_CTL2   0x22
#define X313_WA_SD_MANCMD   0x23
#define X313_WA_SDCH1_CTL0   0x24
#define X313_WA_SDCH1_CTL1   0x25
#define X313_WA_SDCH1_CTL2   0x26
#define X313_WA_SD_MODE   0x27
#define X313_WA_SDCH2_CTL0   0x28
#define X313_WA_SDCH2_CTL1   0x29
#define X313_WA_SDCH2_CTL2   0x2a
#define X313_WA_SDCH3_CTL0   0x2c
#define X313_WA_SDCH3_CTL1   0x2d
#define X313_WA_SDCH3_CTL2   0x2e
#define X313_WA_SDPIO_NEXT   0x2f
#define X313_WA_SD_PIOWIN   0x30
#define X313__X323SA__BITNM   18
#define X313__X323SA__WIDTH   1
#define X313__X323SB__BITNM   17
#define X313__X323SB__WIDTH   1
#define X313__KAI11000__BITNM   1
#define X313__KAI11000__WIDTH   1
#define X313__BAYER_PHASE__BITNM   1
#define X313__BAYER_PHASE__WIDTH   2
#define X313__AUXCLK__BITNM   3
#define X313__AUXCLK__WIDTH   1
#define X313__FILLFACTORY__BITNM   4
#define X313__FILLFACTORY__WIDTH   1
#define X313__DLYHOR__BITNM   5
#define X313__DLYHOR__WIDTH   1
#define X313__NEGRST__BITNM   6
#define X313__NEGRST__WIDTH   1
#define X313__SKIPLINEL__BITNM   7
#define X313__SKIPLINE__WIDTH   1
#define X313__XT_POL__BITNM   8
#define X313__XT_POL__WIDTH   1
#define X313__ARST__BITNM   9
#define X313__ARST__WIDTH   1
#define X313__ARO__BITNM   10
#define X313__ARO__WIDTH   1
#define X313__CNVEN__BITNM   11
#define X313__CNVEN__WIDTH   1
#define X313__EXP__BITNM   11
#define X313__EXP__WIDTH   1
#define X313__EXPPOL__BITNM   12
#define X313__EXPPOL__WIDTH   1
#define X313__TRIGSRC__BITNM   12
#define X313__TRIGSRC__WIDTH   1
#define X313__SENSTRIGEN__BITNM   12
#define X313__SENSTRIGEN__WIDTH   1
#define X313__EARLYTRIG__BITNM   14
#define X313__EARLYTRIG__WIDTH   1
#define X313__MRST__BITNM   13
#define X313__MRST__WIDTH   1
#define X313__XRST__BITNM   14
#define X313__XRST__WIDTH   1
#define X313__SCL0__BITNM   15
#define X313__SCL0__WIDTH   1
#define X313__SCL0_EN__BITNM   16
#define X313__SCL0_EN__WIDTH   1
#define X313__SDA0__BITNM   17
#define X313__SDA0__WIDTH   1
#define X313__SDA0_EN__BITNM   18
#define X313__SDA0_EN__WIDTH   1
#define X313__DCLKMODE__BITNM   19
#define X313__DCLKMODE__WIDTH   1
#define X313__PXD14__BITNM   20
#define X313__PXD14__WIDTH   1
#define X313__SCL1__BITNM   19
#define X313__SCL1__WIDTH   1
#define X313__SCL1_EN__BITNM   20
#define X313__SCL1_EN__WIDTH   1
#define X313__SDA1__BITNM   21
#define X313__SDA1__WIDTH   1
#define X313__SDA1_EN__BITNM   22
#define X313__SDA1_EN__WIDTH   1
#define X313__SOFTRST__BITNM   23
#define X313__SOFTRST__WIDTH   1
#define X313__PCLKSRC__BITNM   24
#define X313__PCLKSRC__WIDTH   2
#define X313__HFCOMP__BITNM   28
#define X313__HFCOMP__WIDTH   3
#define X313__CLKEN__BITNM   31
#define X313__CLKEN__WIDTH   1
#define X313__HACT_PHASE__BITNM   21
#define X313__HACT_PHASE__WIDTH   2
#define X313_MASK(x)   (( (1 << X313__##x##__WIDTH)-1) << X313__##x##__BITNM)
#define X313_BITS(x, y)   (((y) & ((1 << X313__##x##__WIDTH)-1)) << X313__##x##__BITNM)
#define IS_KAI11000   (ccam_cr_shadow & X313_MASK(KAI11000))
#define X313_PREPREINIT_SDCHAN(num, mode, wnr, dep, sa, ntilex, ntiley)
#define X313_POSTINIT_SDCHAN(num, cmd)   {port_csp0_addr[X313_WA_SDCH0_CTL0+0+((num)<<2)] = cmd }
#define X313_INIT_SDCHAN(num, mode, wnr, dep, sa, ntilex, ntiley)   {X313_POSTINIT_SDCHAN ( num, X313_PREINIT_SDCHAN ( num,mode,wnr,dep,sa,ntilex,ntiley ))}
#define X313_CHN_EN(x)   {X3X3_AFTERWRITE ; port_csp0_addr[X313_WA_SD_MODE] |= ((4 << ((x)& 3)) | 3); }
#define X313_CHN_DIS(x)   {X3X3_AFTERWRITE ; port_csp0_addr[X313_WA_SD_MODE] &= ~(4 << ((x)& 3)); }
#define X313_CHN_DISALL   {X3X3_AFTERWRITE ; port_csp0_addr[X313_WA_SD_MODE] &= 3 ; }
#define X313_SDRAM_OFF   {port_csp0_addr[X313_WA_SD_MODE]=0;}
#define X313_SDRAM_ON   {port_csp0_addr[X313_WA_SD_MODE]=3;}
#define X313_IS_SDRAM_ON   (port_csp0_addr[X313_WA_SD_MODE],((port_csp0_addr[X313_WA_SD_MODE] & 3)==3))
#define X313_CHN0_BOUND   (port_csp0_addr[X313_WA_SDCH2_CTL0],(port_csp0_addr[X313_WA_SDCH2_CTL0] & 0x2000))
#define X313_XFERCNTR   (port_csp0_addr[X313__RA__XFERCNTR],port_csp0_addr[X313__RA__XFERCNTR])
#define X313_HIGHFREQ   (port_csp0_addr[X313__RA__HIGHFREQ],port_csp0_addr[X313__RA__HIGHFREQ])
#define X313_IRQSTATE   (port_csp0_addr[0x11],port_csp0_addr[0x11])
#define X313_IOPINS   (port_csp0_addr[X313__RA__IOPINS],port_csp0_addr[X313__RA__IOPINS])
#define X313_CHN0_USED
 X313_WA_SDCH0_CTL2 bits 12..15 are coming from dynamic register and does not depend on the written data.
#define X313_CHN0_SET_USED   { port_csp0_addr[X313_WA_SDCH0_CTL1]=0x8000; }
#define X313_CHN0_SET_UNUSED   { port_csp0_addr[X313_WA_SDCH0_CTL1]=0; }
#define X313_SET_FPGA_TIME(x, y)   { port_csp0_addr[X313_WA_RTC_USEC]= ( y ); port_csp0_addr[X313_WA_RTC_SEC]= ( x ); }
#define X313_GET_FPGA_TIME(x, y)   { port_csp0_addr[X313_WA_RTC_LATCH]= 0; X3X3_AFTERWRITE ; x = port_csp0_addr[X313_WA_RTC_SEC]; y = port_csp0_addr[X313_WA_RTC_USEC];}
#define X313_GET_FPGA_SECONDS(x)   { port_csp0_addr[X313_WA_RTC_LATCH]= 0; X3X3_AFTERWRITE ; x = port_csp0_addr[X313_WA_RTC_SEC]}
#define X313_MAP_FPN   0


Define Documentation

#define DEFAULT_COLOR_SATURATION_BLUE   0x90

Definition at line 291 of file x353.h.

Referenced by dumpFrameParams(), and programSensor().

#define DEFAULT_COLOR_SATURATION_RED   0xb6

Definition at line 292 of file x353.h.

Referenced by dumpFrameParams(), and programSensor().

#define IS_KAI11000   (ccam_cr_shadow & X313_MASK(KAI11000))

Definition at line 1009 of file x353.h.

Referenced by camSeqStartClip(), and init_sensor().

#define X313__ARO__BITNM   10

Definition at line 919 of file x353.h.

#define X313__ARO__WIDTH   1

Definition at line 920 of file x353.h.

#define X313__ARST__BITNM   9

Definition at line 917 of file x353.h.

#define X313__ARST__WIDTH   1

Definition at line 918 of file x353.h.

#define X313__AUXCLK__BITNM   3

Definition at line 901 of file x353.h.

#define X313__AUXCLK__WIDTH   1

Definition at line 902 of file x353.h.

#define X313__BAYER_PHASE__BITNM   1

Definition at line 896 of file x353.h.

#define X313__BAYER_PHASE__WIDTH   2

Definition at line 897 of file x353.h.

#define X313__CLKEN__BITNM   31

Definition at line 993 of file x353.h.

#define X313__CLKEN__WIDTH   1

Definition at line 994 of file x353.h.

#define X313__CNVEN__BITNM   11

Definition at line 923 of file x353.h.

#define X313__CNVEN__WIDTH   1

Definition at line 924 of file x353.h.

#define X313__DCLKMODE__BITNM   19

Definition at line 962 of file x353.h.

#define X313__DCLKMODE__WIDTH   1

Definition at line 963 of file x353.h.

#define X313__DLYHOR__BITNM   5

Definition at line 906 of file x353.h.

#define X313__DLYHOR__WIDTH   1

Definition at line 907 of file x353.h.

#define X313__EARLYTRIG__BITNM   14

Definition at line 941 of file x353.h.

#define X313__EARLYTRIG__WIDTH   1

Definition at line 942 of file x353.h.

#define X313__EXP__BITNM   11

Definition at line 927 of file x353.h.

#define X313__EXP__WIDTH   1

Definition at line 928 of file x353.h.

#define X313__EXPPOL__BITNM   12

Definition at line 929 of file x353.h.

#define X313__EXPPOL__WIDTH   1

Definition at line 930 of file x353.h.

#define X313__FILLFACTORY__BITNM   4

Definition at line 904 of file x353.h.

#define X313__FILLFACTORY__WIDTH   1

Definition at line 905 of file x353.h.

#define X313__HACT_PHASE__BITNM   21

Definition at line 996 of file x353.h.

#define X313__HACT_PHASE__WIDTH   2

Definition at line 997 of file x353.h.

#define X313__HFCOMP__BITNM   28

Definition at line 989 of file x353.h.

#define X313__HFCOMP__WIDTH   3

Definition at line 990 of file x353.h.

#define X313__KAI11000__BITNM   1

Definition at line 892 of file x353.h.

#define X313__KAI11000__WIDTH   1

Definition at line 893 of file x353.h.

#define X313__MRST__BITNM   13

Definition at line 945 of file x353.h.

#define X313__MRST__WIDTH   1

Definition at line 946 of file x353.h.

#define X313__NEGRST__BITNM   6

Definition at line 908 of file x353.h.

#define X313__NEGRST__WIDTH   1

Definition at line 909 of file x353.h.

#define X313__PCLKSRC__BITNM   24

Definition at line 985 of file x353.h.

#define X313__PCLKSRC__WIDTH   2

Definition at line 986 of file x353.h.

#define X313__PXD14__BITNM   20

Definition at line 966 of file x353.h.

#define X313__PXD14__WIDTH   1

Definition at line 967 of file x353.h.

#define X313__RA__IRQS   0x11

Definition at line 23 of file x353.h.

#define X313__RA__MODEL   0x13

Definition at line 25 of file x353.h.

Referenced by init_FPGA().

#define X313__RA__SDBUF3   0x30

Definition at line 61 of file x353.h.

#define X313__RA__SDCH0   0x20

Definition at line 57 of file x353.h.

#define X313__RA__SDCH1   0x24

Definition at line 58 of file x353.h.

#define X313__RA__SDCH2   0x28

Definition at line 59 of file x353.h.

#define X313__RA__SDCH3   0x2c

Definition at line 60 of file x353.h.

#define X313__RA__STATUS   0x10

Definition at line 22 of file x353.h.

#define X313__RA__TABLE   0x14

Definition at line 26 of file x353.h.

#define X313__RA__TRIGPH   0x12

Definition at line 24 of file x353.h.

#define X313__SCL0__BITNM   15

Definition at line 952 of file x353.h.

#define X313__SCL0__WIDTH   1

Definition at line 953 of file x353.h.

#define X313__SCL0_EN__BITNM   16

Definition at line 954 of file x353.h.

#define X313__SCL0_EN__WIDTH   1

Definition at line 955 of file x353.h.

#define X313__SCL1__BITNM   19

Definition at line 972 of file x353.h.

#define X313__SCL1__WIDTH   1

Definition at line 973 of file x353.h.

#define X313__SCL1_EN__BITNM   20

Definition at line 974 of file x353.h.

#define X313__SCL1_EN__WIDTH   1

Definition at line 975 of file x353.h.

#define X313__SDA0__BITNM   17

Definition at line 956 of file x353.h.

#define X313__SDA0__WIDTH   1

Definition at line 957 of file x353.h.

#define X313__SDA0_EN__BITNM   18

Definition at line 958 of file x353.h.

#define X313__SDA0_EN__WIDTH   1

Definition at line 959 of file x353.h.

#define X313__SDA1__BITNM   21

Definition at line 976 of file x353.h.

#define X313__SDA1__WIDTH   1

Definition at line 977 of file x353.h.

#define X313__SDA1_EN__BITNM   22

Definition at line 978 of file x353.h.

#define X313__SDA1_EN__WIDTH   1

Definition at line 979 of file x353.h.

#define X313__SENSTRIGEN__BITNM   12

Definition at line 937 of file x353.h.

#define X313__SENSTRIGEN__WIDTH   1

Definition at line 938 of file x353.h.

#define X313__SKIPLINE__WIDTH   1

Definition at line 912 of file x353.h.

#define X313__SKIPLINEL__BITNM   7

Definition at line 911 of file x353.h.

#define X313__SOFTRST__BITNM   23

Definition at line 980 of file x353.h.

#define X313__SOFTRST__WIDTH   1

Definition at line 981 of file x353.h.

#define X313__TRIGSRC__BITNM   12

Definition at line 932 of file x353.h.

#define X313__TRIGSRC__WIDTH   1

Definition at line 933 of file x353.h.

#define X313__X323SA__BITNM   18

Definition at line 885 of file x353.h.

#define X313__X323SA__WIDTH   1

Definition at line 886 of file x353.h.

#define X313__X323SB__BITNM   17

Definition at line 888 of file x353.h.

#define X313__X323SB__WIDTH   1

Definition at line 889 of file x353.h.

#define X313__XRST__BITNM   14

Definition at line 949 of file x353.h.

#define X313__XRST__WIDTH   1

Definition at line 950 of file x353.h.

#define X313__XT_POL__BITNM   8

Definition at line 915 of file x353.h.

#define X313__XT_POL__WIDTH   1

Definition at line 916 of file x353.h.

#define X313_BITS ( x,
 )     (((y) & ((1 << X313__##x##__WIDTH)-1)) << X313__##x##__BITNM)

Definition at line 1002 of file x353.h.

Referenced by cmoscam_open(), i2c_scl_0(), i2c_scl_1(), i2c_sda_strong(), i2c_sda_weak(), and programSensor().

#define X313_CHN0_BOUND   (port_csp0_addr[X313_WA_SDCH2_CTL0],(port_csp0_addr[X313_WA_SDCH2_CTL0] & 0x2000))

Definition at line 1118 of file x353.h.

Referenced by camSeq_interrupt().

#define X313_CHN0_SET_UNUSED   { port_csp0_addr[X313_WA_SDCH0_CTL1]=0; }

Definition at line 1141 of file x353.h.

Referenced by x313_senspars_lseek().

#define X313_CHN0_SET_USED   { port_csp0_addr[X313_WA_SDCH0_CTL1]=0x8000; }

Definition at line 1140 of file x353.h.

Referenced by programSensor().

#define X313_CHN0_USED

Value:

X313_WA_SDCH0_CTL2 bits 12..15 are coming from dynamic register and does not depend on the written data.

Definition at line 1137 of file x353.h.

Referenced by init_FPGA().

#define X313_CHN_DIS ( x   )     {X3X3_AFTERWRITE ; port_csp0_addr[X313_WA_SD_MODE] &= ~(4 << ((x)& 3)); }

Definition at line 1113 of file x353.h.

Referenced by camSeqStartClip(), compressorStop(), and read_page_to_buffer().

#define X313_CHN_DISALL   {X3X3_AFTERWRITE ; port_csp0_addr[X313_WA_SD_MODE] &= 3 ; }

Definition at line 1114 of file x353.h.

#define X313_CHN_EN ( x   )     {X3X3_AFTERWRITE ; port_csp0_addr[X313_WA_SD_MODE] |= ((4 << ((x)& 3)) | 3); }

Definition at line 1112 of file x353.h.

Referenced by compressorRun(), compressorSingle(), fsdram_read(), fsdram_write(), programSensor(), and read_page_to_buffer().

#define X313_GET_FPGA_SECONDS ( x   )     { port_csp0_addr[X313_WA_RTC_LATCH]= 0; X3X3_AFTERWRITE ; x = port_csp0_addr[X313_WA_RTC_SEC]}

Definition at line 1146 of file x353.h.

#define X313_GET_FPGA_TIME ( x,
 )     { port_csp0_addr[X313_WA_RTC_LATCH]= 0; X3X3_AFTERWRITE ; x = port_csp0_addr[X313_WA_RTC_SEC]; y = port_csp0_addr[X313_WA_RTC_USEC];}

Definition at line 1145 of file x353.h.

Referenced by x313_senspars_lseek().

#define X313_HIGHFREQ   (port_csp0_addr[X313__RA__HIGHFREQ],port_csp0_addr[X313__RA__HIGHFREQ])

Definition at line 1121 of file x353.h.

Referenced by updateJPEG_wp().

#define X313_INIT_SDCHAN ( num,
mode,
wnr,
dep,
sa,
ntilex,
ntiley   )     {X313_POSTINIT_SDCHAN ( num, X313_PREINIT_SDCHAN ( num,mode,wnr,dep,sa,ntilex,ntiley ))}

Definition at line 1064 of file x353.h.

Referenced by fsdram_read(), fsdram_write(), programSensor(), read_page_to_buffer(), x313_fpn_readline(), x313_fpn_writeline(), and x313_frame_readline().

#define X313_IOPINS   (port_csp0_addr[X313__RA__IOPINS],port_csp0_addr[X313__RA__IOPINS])

Definition at line 1123 of file x353.h.

Referenced by ccam_DMA_ioctl().

#define X313_IR ( x   )     ((port_csp0_addr[X313__RA__IRQS] >> X313_IR__##x ) & 1)

Definition at line 183 of file x353.h.

#define X313_IR__DCC   5

Definition at line 170 of file x353.h.

#define X313_IR__DONE   3

Definition at line 168 of file x353.h.

#define X313_IR__DONE_COMPRESS   7

Definition at line 173 of file x353.h.

#define X313_IR__DONE_INPUT   6

Definition at line 172 of file x353.h.

#define X313_IR__EOT   4

Definition at line 169 of file x353.h.

#define X313_IR__SMART   8

Definition at line 174 of file x353.h.

#define X313_IR__VACT   0

Definition at line 165 of file x353.h.

#define X313_IR__XFEROVR   2

Definition at line 167 of file x353.h.

#define X313_IR__XINT   1

Definition at line 166 of file x353.h.

#define X313_IRQSTATE   (port_csp0_addr[0x11],port_csp0_addr[0x11])

Definition at line 1122 of file x353.h.

Referenced by camSeq_interrupt().

#define X313_IS_SDRAM_ON   (port_csp0_addr[X313_WA_SD_MODE],((port_csp0_addr[X313_WA_SD_MODE] & 3)==3))

Definition at line 1117 of file x353.h.

Referenced by fpga_initSDRAM(), fsdram_open(), fsdram_read(), fsdram_write(), and init_FPGA().

#define X313_MAP_FPN   0

Definition at line 1152 of file x353.h.

Referenced by programSensor(), x313_fpn_readline(), and x313_fpn_writeline().

#define X313_MASK ( x   )     (( (1 << X313__##x##__WIDTH)-1) << X313__##x##__BITNM)

Definition at line 1001 of file x353.h.

Referenced by cmoscam_open(), and programSensor().

#define X313_PIOR ( x   )     ((port_csp0_addr[X313__RA__IOPINS] >> X313_PIOR__##x ) & 1)

Definition at line 162 of file x353.h.

Referenced by i2c_getbit(), and i2c_getscl().

#define X313_POSTINIT_SDCHAN ( num,
cmd   )     {port_csp0_addr[X313_WA_SDCH0_CTL0+0+((num)<<2)] = cmd }

Definition at line 1061 of file x353.h.

Referenced by camSeq_interrupt(), and camSeqStartClip().

#define X313_PREPREINIT_SDCHAN ( num,
mode,
wnr,
dep,
sa,
ntilex,
ntiley   ) 

Value:

((port_csp0_addr[X313_WA_SDCH0_CTL0+1+((num)<<2)] = (((ntilex) & 0x1ff) << 4) | (((sa) >> 19) & 0xf)), \
            (port_csp0_addr[X313_WA_SDCH0_CTL0+2+((num)<<2)] = 0x8000 | ((ntiley) & 0xfff)), \
            (((mode) & 1) << 15) | (((wnr) & 1) << 14) | (((dep) & 1) << 13) | (((sa) >> 7) & 0xfff))
******************************************************************************************************* ! Moved all references to FPGA access to memory-control registers here to simplify code maitenance ! when FPGA changes. ! ! Split SDARM channel initailization in 3 macros ! X313_PREINIT_SDCHAN(num,mode,wnr,dep,sa,ntilex,ntiley) - writes two (of 3) registers (not yet starting the channel) ! returns value foo the 3-rd (command) register ! X313_PREINIT_SDCHAN(num,cmd) - writes the channel command register, starting it ! waits 2 cycles after (if ETRAX FS) to make next reads safe ! X313_INIT_SDCHAN(num,mode,wnr,dep,sa,ntilex,ntiley) - combination of the 2 above, works as before ! !/ added X3X3_AFTERWRITE to be able to read FPGA after that macro (w/o -= failed in ETRAX FS)

Definition at line 1049 of file x353.h.

#define X313_SDRAM_OFF   {port_csp0_addr[X313_WA_SD_MODE]=0;}

Definition at line 1115 of file x353.h.

Referenced by fpga_initSDRAM().

#define X313_SDRAM_ON   {port_csp0_addr[X313_WA_SD_MODE]=3;}

Definition at line 1116 of file x353.h.

Referenced by fpga_initSDRAM().

#define X313_SET_FPGA_TIME ( x,
 )     { port_csp0_addr[X313_WA_RTC_USEC]= ( y ); port_csp0_addr[X313_WA_RTC_SEC]= ( x ); }

Definition at line 1144 of file x353.h.

Referenced by x313_senspars_lseek().

#define X313_SR ( x   )     ((port_csp0_addr[X313__RA__STATUS] >> X313_SR__##x ) & 1)

Definition at line 161 of file x353.h.

Referenced by camSeq_interrupt(), fsdram_read(), fsdram_write(), getCamSeqState(), i2c_getbit(), i2c_getscl(), programSensor(), read_page_to_buffer(), x313_fpn_readline(), x313_fpn_writeline(), and x313_frame_readline().

#define X313_SR__CH0RDY   4

Definition at line 150 of file x353.h.

#define X313_SR__CH1RDY   5

Definition at line 149 of file x353.h.

#define X313_SR__CH2RDY   6

Definition at line 148 of file x353.h.

#define X313_SR__DCCRDY   16

Definition at line 133 of file x353.h.

#define X313_SR__DMA_EMPTY   19

Definition at line 130 of file x353.h.

#define X313_SR__DONE   15

Definition at line 135 of file x353.h.

#define X313_SR__DONE_CI   17

Definition at line 132 of file x353.h.

#define X313_SR__DONE_CMPRS   18

Definition at line 131 of file x353.h.

#define X313_SR__NXTFR0   9

Definition at line 145 of file x353.h.

#define X313_SR__NXTFR1   10

Definition at line 144 of file x353.h.

#define X313_SR__NXTFR2   11

Definition at line 143 of file x353.h.

#define X313_SR__NXTFR3   12

Definition at line 142 of file x353.h.

#define X313_SR__PIORDY   7

Definition at line 147 of file x353.h.

#define X313_SR__PIOWEMPTY   8

Definition at line 146 of file x353.h.

#define X313_SR__SCL0   1

Definition at line 153 of file x353.h.

#define X313_SR__SCL1   3

Definition at line 151 of file x353.h.

#define X313_SR__SDA0   0

Definition at line 154 of file x353.h.

#define X313_SR__SDA1   2

Definition at line 152 of file x353.h.

#define X313_SR__SENST0   13

Definition at line 141 of file x353.h.

#define X313_SR__SENST1   14

Definition at line 140 of file x353.h.

#define X313_SR__TRIG   20

Definition at line 129 of file x353.h.

#define X313_SR__X323_SI   0

Definition at line 157 of file x353.h.

#define X313_WA_COLOR_SAT   9

Definition at line 289 of file x353.h.

Referenced by programSensor().

#define X313_WA_COMP_CMD   0x0c

Definition at line 297 of file x353.h.

Referenced by compressorRun(), compressorSingle(), and compressorStop().

#define X313_WA_COMP_TA   0x0d

Definition at line 486 of file x353.h.

Referenced by jpeg_set_quality(), write_gamma_fpga(), x313_histogram_read(), x313_program_focus(), and x313_tables_write().

#define X313_WA_COMP_TD   0x0e

Definition at line 487 of file x353.h.

Referenced by jpeg_set_quality(), write_gamma_fpga(), x313_program_focus(), and x313_tables_write().

#define X313_WA_DCDC   7

Definition at line 260 of file x353.h.

Referenced by init_sensor().

#define X313_WA_DMACR   1

Definition at line 188 of file x353.h.

Referenced by x313_dma_start(), and x313_dma_stop().

#define X313_WA_FRAMESYNC_DLY   0x0a

Definition at line 294 of file x353.h.

Referenced by programSensor().

#define X313_WA_IRQM   6

Definition at line 480 of file x353.h.

#define X313_WA_MCUNUM   0x0f

Definition at line 488 of file x353.h.

Referenced by programSensor().

#define X313_WA_NLINES   5

Definition at line 251 of file x353.h.

Referenced by programSensor().

#define X313_WA_SD_MANCMD   0x23

Definition at line 583 of file x353.h.

Referenced by fpga_initSDRAM().

#define X313_WA_SD_MODE   0x27

Definition at line 670 of file x353.h.

#define X313_WA_SD_PIOWIN   0x30

Definition at line 831 of file x353.h.

Referenced by fsdram_read(), fsdram_write(), read_page_to_buffer(), x313_fpn_readline(), x313_fpn_writeline(), and x313_frame_readline().

#define X313_WA_SDCH0_CTL0   0x20

Definition at line 498 of file x353.h.

#define X313_WA_SDCH0_CTL1   0x21

Definition at line 536 of file x353.h.

#define X313_WA_SDCH0_CTL2   0x22

Definition at line 566 of file x353.h.

Referenced by cmoscam_open().

#define X313_WA_SDCH1_CTL0   0x24

Definition at line 603 of file x353.h.

#define X313_WA_SDCH1_CTL1   0x25

Definition at line 630 of file x353.h.

#define X313_WA_SDCH1_CTL2   0x26

Definition at line 651 of file x353.h.

#define X313_WA_SDCH2_CTL0   0x28

Definition at line 689 of file x353.h.

#define X313_WA_SDCH2_CTL1   0x29

Definition at line 720 of file x353.h.

Referenced by programSensor(), and x313_dma_update_jpeg_header().

#define X313_WA_SDCH2_CTL2   0x2a

Definition at line 739 of file x353.h.

Referenced by programSensor(), and x313_dma_update_jpeg_header().

#define X313_WA_SDCH3_CTL0   0x2c

Definition at line 756 of file x353.h.

#define X313_WA_SDCH3_CTL1   0x2d

Definition at line 785 of file x353.h.

#define X313_WA_SDCH3_CTL2   0x2e

Definition at line 806 of file x353.h.

#define X313_WA_SDPIO_NEXT   0x2f

Definition at line 823 of file x353.h.

Referenced by fsdram_read(), fsdram_write(), x313_fpn_readline(), x313_fpn_writeline(), and x313_frame_readline().

#define X313_WA_SENSFPN   2

Definition at line 193 of file x353.h.

#define X313_WA_TRIG   4

Definition at line 246 of file x353.h.

#define X313_WA_VIRTTRIG   3

Definition at line 241 of file x353.h.

Referenced by programSensor().

#define X313_WA_WCTL   0

Definition at line 187 of file x353.h.

Referenced by ccam_DMA_ioctl(), ccamCRAnd(), ccamCRAndOr(), ccamCROr(), ccamCRXor(), fpga_io_ioctl(), il_ccamCRAnd(), il_ccamCRAndOr(), and il_ccamCROr().

#define X313_XFERCNTR   (port_csp0_addr[X313__RA__XFERCNTR],port_csp0_addr[X313__RA__XFERCNTR])

Definition at line 1120 of file x353.h.

Referenced by updateJPEG_wp().

#define X3X3_AFTERWRITE   {if (!port_csp0_addr[X313__RA__MODEL]) printk ("model=0");}

Definition at line 495 of file x353.h.

Referenced by x313_histogram_read().

#define x3x3_DELAY ( x   )     {int iiii; for (iiii=0; iiii < (x); iiii++) X3X3_AFTERWRITE ; }

Definition at line 496 of file x353.h.

Referenced by i2c_inbyte(), i2c_outbyte(), i2c_restart(), i2c_start(), and i2c_stop().


Generated on Thu Aug 7 16:20:37 2008 for elphel by  doxygen 1.5.1