Lines Matching full:csr
27 * <CSR address>:<CSR value>
28 * So reading the content of the file gives current CSR address and it value.
29 * If User-space application wishes to change current CSR address,
31 * $ echo "<CSR address>" > /sys/kernel/debug/idt_csr/<bus>-<devaddr>/<devname>
32 * If it wants to change the CSR value as well, the format of the write
34 * $ echo "<CSR address>:<CSR value>" > \
36 * CSR address and value can be any of hexadecimal, decimal or octal format.
64 * csr_dbgdir - CSR read/write operations Debugfs directory
75 * @inicsrcmd: Initial cmd value for CSR read/write operations
78 * @csr: CSR address to perform read operation
98 u16 csr; member
137 * struct idt_csr_seq - sequence of data to be read/written from/to CSR
139 * @csraddr: Internal IDT device CSR address
140 * @data: Data to be read/written from/to the CSR address
152 * @CCODE_CSR: CSR read/write transaction
197 * CSR command macros
199 * @CSR_OP_WRITE: CSR write operation
200 * @CSR_OP_READ: CSR read operation
206 * @CSR_MAX: Maximum CSR address
207 * @CSR_DEF: Default CSR address
208 * @CSR_REAL_ADDR: CSR real unshifted address
708 * CSR IO-operations
713 * idt_csr_write() - CSR write operation
715 * @csraddr: CSR address (with no two LS bits)
716 * @data: Data to be written to CSR
740 dev_err(dev, "Failed to write 0x%04x: 0x%04x to csr", in idt_csr_write()
745 /* Send CSR address to read data from */ in idt_csr_write()
750 dev_err(dev, "Failed to init csr address 0x%04x", in idt_csr_write()
759 dev_err(dev, "Failed to read csr 0x%04x", in idt_csr_write()
764 /* Check whether IDT successfully retrieved CSR data */ in idt_csr_write()
766 dev_err(dev, "IDT failed to perform CSR r/w"); in idt_csr_write()
779 * idt_csr_read() - CSR read operation
781 * @csraddr: CSR address (with no two LS bits)
782 * @data: Data to be written to CSR
798 /* Send CSR register address before reading it */ in idt_csr_read()
804 dev_err(dev, "Failed to init csr address 0x%04x", in idt_csr_read()
813 dev_err(dev, "Failed to read csr 0x%04x", in idt_csr_read()
818 /* Check whether IDT successfully retrieved CSR data */ in idt_csr_read()
820 dev_err(dev, "IDT failed to perform CSR r/w"); in idt_csr_read()
889 * idt_dbgfs_csr_write() - CSR debugfs-node write callback
924 * If there is colon passed then new CSR value should be parsed as in idt_dbgfs_csr_write()
925 * well, so allocate buffer for CSR address substring. in idt_dbgfs_csr_write()
927 * no new CSR value in idt_dbgfs_csr_write()
943 /* Convert CSR address to u32 value */ in idt_dbgfs_csr_write()
955 pdev->csr = (csraddr >> 2); in idt_dbgfs_csr_write()
957 /* Parse new CSR value and send it to IDT, if colon has been found */ in idt_dbgfs_csr_write()
963 ret = idt_csr_write(pdev, pdev->csr, csrval); in idt_dbgfs_csr_write()
981 * idt_dbgfs_csr_read() - CSR debugfs-node read callback
998 /* Perform CSR read operation */ in idt_dbgfs_csr_read()
999 ret = idt_csr_read(pdev, pdev->csr, &csrval); in idt_dbgfs_csr_read()
1004 csraddr = ((u32)pdev->csr << 2); in idt_dbgfs_csr_read()
1023 * csr_dbgfs_ops - CSR debugfs-node read/write operations
1151 /* Initialize basic CSR CMD field - use full DWORD-sized r/w ops */ in idt_create_pdev()
1153 pdev->csr = CSR_DEF; in idt_create_pdev()
1337 /* Create Debugfs directory for CSR file */ in idt_create_dbgfs_files()
1341 /* Create Debugfs file for CSR read/write operations */ in idt_create_dbgfs_files()
1352 /* Remove CSR directory and it sysfs-node */ in idt_remove_dbgfs_files()