Skip to content

Commit

Permalink
Document sifman_set_dma
Browse files Browse the repository at this point in the history
  • Loading branch information
frno7 committed Jul 14, 2021
1 parent 472898a commit 594d4e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
8 changes: 4 additions & 4 deletions include/iopmod/module/intrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LIBRARY_ID(intrman, 0x0102);
* interrupt controller.
*
* Context: thread
* Return: 0 on success, nonzero IOP error otherwise
* Return: 0 on success, IOP error otherwise
*/
id_(4) enum irq_status intrman_request_irq(unsigned int irq,
enum irq_mode mode, irq_handler_t handler, void *arg)
Expand All @@ -28,7 +28,7 @@ id_(4) enum irq_status intrman_request_irq(unsigned int irq,
* interrupt controller.
*
* Context: thread
* Return: 0 on success, nonzero IOP error otherwise
* Return: 0 on success, IOP error otherwise
*/
id_(5) int intrman_release_irq(unsigned int irq)
alias_(ReleaseIntrHandler);
Expand All @@ -45,7 +45,7 @@ id_(5) int intrman_release_irq(unsigned int irq)
* to intrman_disable_irq().
*
* Context: any
* Return: 0 on success, nonzero IOP error otherwise
* Return: 0 on success, IOP error otherwise
*/
id_(6) int intrman_enable_irq(unsigned int irq)
alias_(EnableIntr);
Expand All @@ -63,7 +63,7 @@ id_(6) int intrman_enable_irq(unsigned int irq)
* to intrman_disable_irq().
*
* Context: any
* Return: 0 on success, nonzero IOP error otherwise
* Return: 0 on success, IOP error otherwise
*/
id_(7) int intrman_disable_irq(unsigned int irq, int *res)
alias_(DisableIntr);
Expand Down
8 changes: 4 additions & 4 deletions include/iopmod/module/sifcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ id_(11) void sif_release_cmd(int cid)
* For interrupt context, use sifcmd_send_cmd_irq() instead.
*
* Context: thread
* Return: nonzero DMA transfer id, or zero if no DMA id could be allocated
* and a retry may be necessary
* Return: DMA transfer id, or zero if no DMA id could be allocated and a
* retry may be necessary
*/
id_(12) unsigned int sifcmd_send_cmd(u32 cmd,
void *packet, size_t packet_size,
Expand Down Expand Up @@ -90,8 +90,8 @@ id_(12) unsigned int sifcmd_send_cmd(u32 cmd,
* For thread context, use sifcmd_send_cmd() instead.
*
* Context: irq
* Return: nonzero DMA transfer id, or zero if no DMA id could be allocated
* and a retry may be necessary
* Return: DMA transfer id, or zero if no DMA id could be allocated and a
* retry may be necessary
*/
id_(13) unsigned int sifcmd_send_cmd_irq(u32 cmd,
void *packet, size_t packet_size,
Expand Down
19 changes: 16 additions & 3 deletions include/iopmod/module/sifman.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,32 @@ id_(5) void sifman_init(void)
id_(6) void sifman_set_dchain(void)
alias_(sceSifSetDChain);

id_(7) int sifman_set_dma(struct sifman_dma_transfer *dmat, int count)
/**
* sifman_set_dma - request SIF DMA transfer from sub to main
* @dma_tr: array of DMA transfers
* @count: number of array elements
*
* Note that SIF DMA transfers in the opposite direction, from main to sub,
* must be initiated by main.
*
* Context: any with interrupts disabled
* Return: DMA transfer id, or zero if no DMA id could be allocated and a
* retry may be necessary
*/
id_(7) int sifman_set_dma(const struct sifman_dma_transfer *dma_tr, int count)
alias_(sceSifSetDma);

/**
* sifman_dma_stat - status of DMA transfer
* @dma_id: id of DMA transfer to check
*
* Context: any
* Return: status of given DMA transfer
*/
id_(8) enum sifman_dma_status sifman_dma_stat(int dma_id)
alias_(sceSifDmaStat);

id_(9) void sifman_set_one_dma(struct sifman_dma_transfer dmat)
id_(9) void sifman_set_one_dma(struct sifman_dma_transfer dma_tr)
alias_(sceSifSetOneDma);

id_(12) void sifman_dma0_transfer(void *addr, int size, int mode)
Expand Down Expand Up @@ -76,6 +89,6 @@ id_(30) void sifman_set_dma_intr_handler(void (*handler)(void *), void *arg)
id_(31) void sifman_reset_dma_intr_handler(void)
alias_(sceSifResetDmaIntrHandler);

id_(32) unsigned int sifman_set_dma_intr(struct sifman_dma_transfer *dmat,
id_(32) unsigned int sifman_set_dma_intr(struct sifman_dma_transfer *dma_tr,
int len, void (*func)(void), void *data)
alias_(sceSifSetDmaIntr);

0 comments on commit 594d4e3

Please sign in to comment.