type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines | #define SZ_DMAMOV 6 |
defines | #define SZ_DMANOP 1 |
defines | #define SZ_DMARMB 1 |
defines | #define SZ_DMASEV 2 |
defines | #define SZ_DMAST 1 |
defines | #define SZ_DMASTP 2 |
defines | #define SZ_DMASTZ 1 |
defines | #define SZ_DMAWFE 2 |
defines | #define SZ_DMAWFP 2 |
defines | #define SZ_DMAWMB 1 |
defines | #define SZ_DMAGO 6 |
defines |
#define BRST_LEN(ccr) ((((ccr) >> CC_SRCBRSTLEN_SHFT) & 0xf) + 1) |
defines | #define BRST_SIZE(ccr) (1 << (((ccr) >> CC_SRCBRSTSIZE_SHFT) & 0x7)) |
defines |
#define BYTE_TO_BURST(b, ccr) ((b) / BRST_SIZE(ccr) / BRST_LEN(ccr)) |
defines | #define BURST_TO_BYTE(c, ccr) ((c) * BRST_SIZE(ccr) * BRST_LEN(ccr)) |
defines | #define MCODE_BUFF_PER_REQ 256 |
defines | #define MARK_FREE(req) do { \ |
defines | #define IS_FREE(req) (*((u8 *)((req)->mc_cpu)) == CMD_DMAEND) |
defines | #define UNTIL(t, s) while (!(_state(t) & (s))) cpu_relax(); |
defines | #define PL330_DBGCMD_DUMP(off, x...) do { \ |
defines | #define PL330_DBGMC_START(addr) (cmd_line = addr) |
defines | #define PL330_DBGCMD_DUMP(off, x...) do {} while (0) |
defines | #define PL330_DBGMC_START(addr) do {} while (0) |
defines |
#define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) |
structs | struct _xfer_spec {
u32 ccr;
struct pl330_req *r;
struct pl330_xfer *x;
}; |
structs | struct _pl330_req {
u32 mc_bus;
void *mc_cpu;
/* Number of bytes taken to setup MC for the req */
u32 mc_len;
struct pl330_req *r;
/* Hook to attach to DMAC's list of reqs with due callback */
struct list_head rqd;
}; |
structs | struct _pl330_tbd {
bool reset_dmac;
bool reset_mngr;
u8 reset_chan;
}; |
structs | struct pl330_thread {
u8 id;
int ev;
/* If the channel is not yet acquired by any client */
bool free;
/* Parent DMAC */
struct pl330_dmac *dmac;
/* Only two at a time */
struct _pl330_req req[2];
/* Index of the last submitted request */
unsigned lstenq;
}; |
structs | struct pl330_dmac {
spinlock_t lock;
/* Holds list of reqs with due callbacks */
struct list_head req_done;
/* Pointer to platform specific stuff */
struct pl330_info *pinfo;
/* Maximum possible events/irqs */
int events[32];
/* BUS address of MicroCode buffer */
u32 mcode_bus;
/* CPU address of MicroCod... |
structs | struct _arg_LPEND {
enum pl330_cond cond;
bool forever;
unsigned loop;
u8 bjump;
}; |
structs | struct _arg_GO {
u8 chan;
u32 addr;
unsigned ns;
}; |
functions | void _callback(struct pl330_req *r, enum pl330_op_err err)
{
if (r && r->xfer_cb)
r->xfer_cb(r->token, err);
} |
functions | bool _queue_empty(struct pl330_thread *thrd)
{
return (IS_FREE(&thrd->req[0]) && IS_FREE(&thrd->req[1]))
? true : false;
} |
functions | bool _queue_full(struct pl330_thread *thrd)
{
return (IS_FREE(&thrd->req[0]) || IS_FREE(&thrd->req[1]))
? false : true;
} |
functions | bool is_manager(struct pl330_thread *thrd)
{
struct pl330_dmac *pl330 = thrd->dmac;
/* MANAGER is indexed at the end */
if (thrd->id == pl330->pinfo->pcfg.num_chan)
return true;
else
return false;
} |
functions | bool _manager_ns(struct pl330_thread *thrd)
{
struct pl330_dmac *pl330 = thrd->dmac;
return (pl330->pinfo->pcfg.mode & DMAC_MODE_NS) ? true : false;
} |
functions | u32 get_id(struct pl330_info *pi, u32 off)
{
void __iomem *regs = pi->base;
u32 id = 0;
id |= (readb(regs + off + 0x0) << 0);
id |= (readb(regs + off + 0x4) << 8);
id |= (readb(regs + off + 0x8) << 16);
id |= (readb(regs + off + 0xc) << 24);
return id;
} |
functions | u32 _emit_ADDH(unsigned dry_run, u8 buf[],
enum pl330_dst da, u16 val)
{
if (dry_run)
return SZ_DMAADDH;
buf[0] = CMD_DMAADDH;
buf[0] |= (da << 1);
*((u16 *)&buf[1]) = val;
PL330_DBGCMD_DUMP(SZ_DMAADDH, "\tDMAADDH %s %u\n",
da == 1 ? "DA" : "SA", val);
return SZ_DMAADDH;
} |
functions | u32 _emit_END(unsigned dry_run, u8 buf[])
{
if (dry_run)
return SZ_DMAEND;
buf[0] = CMD_DMAEND;
PL330_DBGCMD_DUMP(SZ_DMAEND, "\tDMAEND\n");
return SZ_DMAEND;
} |
functions | u32 _emit_FLUSHP(unsigned dry_run, u8 buf[], u8 peri)
{
if (dry_run)
return SZ_DMAFLUSHP;
buf[0] = CMD_DMAFLUSHP;
peri &= 0x1f;
peri <<= 3;
buf[1] = peri;
PL330_DBGCMD_DUMP(SZ_DMAFLUSHP, "\tDMAFLUSHP %u\n", peri >> 3);
return SZ_DMAFLUSHP;
} |
functions | u32 _emit_LD(unsigned dry_run, u8 buf[], enum pl330_cond cond)
{
if (dry_run)
return SZ_DMALD;
buf[0] = CMD_DMALD;
if (cond == SINGLE)
buf[0] |= (0 << 1) | (1 << 0);
else if (cond == BURST)
buf[0] |= (1 << 1) | (1 << 0);
PL330_DBGCMD_DUMP(SZ_DMALD, "\tDMALD%c\n",
cond == SINGLE ? 'S' : (cond == BURST ? ... |
functions | u32 _emit_LDP(unsigned dry_run, u8 buf[],
enum pl330_cond cond, u8 peri)
{
if (dry_run)
return SZ_DMALDP;
buf[0] = CMD_DMALDP;
if (cond == BURST)
buf[0] |= (1 << 1);
peri &= 0x1f;
peri <<= 3;
buf[1] = peri;
PL330_DBGCMD_DUMP(SZ_DMALDP, "\tDMALDP%c %u\n",
cond == SINGLE ? 'S' : 'B', peri >> 3);
retu... |
functions | u32 _emit_LP(unsigned dry_run, u8 buf[],
unsigned loop, u8 cnt)
{
if (dry_run)
return SZ_DMALP;
buf[0] = CMD_DMALP;
if (loop)
buf[0] |= (1 << 1);
cnt--; /* DMAC increments by 1 internally */
buf[1] = cnt;
PL330_DBGCMD_DUMP(SZ_DMALP, "\tDMALP_%c %u\n", loop ? '1' : '0', cnt);
return SZ_DMALP;
} |
functions | u32 _emit_LPEND(unsigned dry_run, u8 buf[],
const struct _arg_LPEND *arg)
{
enum pl330_cond cond = arg->cond;
bool forever = arg->forever;
unsigned loop = arg->loop;
u8 bjump = arg->bjump;
if (dry_run)
return SZ_DMALPEND;
buf[0] = CMD_DMALPEND;
if (loop)
buf[0] |= (1 << 2);
if (!forever)
buf[0] |= (... |
functions | u32 _emit_KILL(unsigned dry_run, u8 buf[])
{
if (dry_run)
return SZ_DMAKILL;
buf[0] = CMD_DMAKILL;
return SZ_DMAKILL;
} |
functions | u32 _emit_MOV(unsigned dry_run, u8 buf[],
enum dmamov_dst dst, u32 val)
{
if (dry_run)
return SZ_DMAMOV;
buf[0] = CMD_DMAMOV;
buf[1] = dst;
*((u32 *)&buf[2]) = val;
PL330_DBGCMD_DUMP(SZ_DMAMOV, "\tDMAMOV %s 0x%x\n",
dst == SAR ? "SAR" : (dst == DAR ? "DAR" : "CCR"), val);
return SZ_DMAMOV;
} |
functions | u32 _emit_NOP(unsigned dry_run, u8 buf[])
{
if (dry_run)
return SZ_DMANOP;
buf[0] = CMD_DMANOP;
PL330_DBGCMD_DUMP(SZ_DMANOP, "\tDMANOP\n");
return SZ_DMANOP;
} |
functions | u32 _emit_RMB(unsigned dry_run, u8 buf[])
{
if (dry_run)
return SZ_DMARMB;
buf[0] = CMD_DMARMB;
PL330_DBGCMD_DUMP(SZ_DMARMB, "\tDMARMB\n");
return SZ_DMARMB;
} |
functions | u32 _emit_SEV(unsigned dry_run, u8 buf[], u8 ev)
{
if (dry_run)
return SZ_DMASEV;
buf[0] = CMD_DMASEV;
ev &= 0x1f;
ev <<= 3;
buf[1] = ev;
PL330_DBGCMD_DUMP(SZ_DMASEV, "\tDMASEV %u\n", ev >> 3);
return SZ_DMASEV;
} |
functions | u32 _emit_ST(unsigned dry_run, u8 buf[], enum pl330_cond cond)
{
if (dry_run)
return SZ_DMAST;
buf[0] = CMD_DMAST;
if (cond == SINGLE)
buf[0] |= (0 << 1) | (1 << 0);
else if (cond == BURST)
buf[0] |= (1 << 1) | (1 << 0);
PL330_DBGCMD_DUMP(SZ_DMAST, "\tDMAST%c\n",
cond == SINGLE ? 'S' : (cond == BURST ? ... |
functions | u32 _emit_STP(unsigned dry_run, u8 buf[],
enum pl330_cond cond, u8 peri)
{
if (dry_run)
return SZ_DMASTP;
buf[0] = CMD_DMASTP;
if (cond == BURST)
buf[0] |= (1 << 1);
peri &= 0x1f;
peri <<= 3;
buf[1] = peri;
PL330_DBGCMD_DUMP(SZ_DMASTP, "\tDMASTP%c %u\n",
cond == SINGLE ? 'S' : 'B', peri >> 3);
retu... |
functions | u32 _emit_STZ(unsigned dry_run, u8 buf[])
{
if (dry_run)
return SZ_DMASTZ;
buf[0] = CMD_DMASTZ;
PL330_DBGCMD_DUMP(SZ_DMASTZ, "\tDMASTZ\n");
return SZ_DMASTZ;
} |
functions | u32 _emit_WFE(unsigned dry_run, u8 buf[], u8 ev,
unsigned invalidate)
{
if (dry_run)
return SZ_DMAWFE;
buf[0] = CMD_DMAWFE;
ev &= 0x1f;
ev <<= 3;
buf[1] = ev;
if (invalidate)
buf[1] |= (1 << 1);
PL330_DBGCMD_DUMP(SZ_DMAWFE, "\tDMAWFE %u%s\n",
ev >> 3, invalidate ? ", I" : "");
return SZ_DMAWFE;
} |
functions | u32 _emit_WFP(unsigned dry_run, u8 buf[],
enum pl330_cond cond, u8 peri)
{
if (dry_run)
return SZ_DMAWFP;
buf[0] = CMD_DMAWFP;
if (cond == SINGLE)
buf[0] |= (0 << 1) | (0 << 0);
else if (cond == BURST)
buf[0] |= (1 << 1) | (0 << 0);
else
buf[0] |= (0 << 1) | (1 << 0);
peri &= 0x1f;
peri <<= 3;
buf[... |
functions | u32 _emit_WMB(unsigned dry_run, u8 buf[])
{
if (dry_run)
return SZ_DMAWMB;
buf[0] = CMD_DMAWMB;
PL330_DBGCMD_DUMP(SZ_DMAWMB, "\tDMAWMB\n");
return SZ_DMAWMB;
} |
functions | u32 _emit_GO(unsigned dry_run, u8 buf[],
const struct _arg_GO *arg)
{
u8 chan = arg->chan;
u32 addr = arg->addr;
unsigned ns = arg->ns;
if (dry_run)
return SZ_DMAGO;
buf[0] = CMD_DMAGO;
buf[0] |= (ns << 1);
buf[1] = chan & 0x7;
*((u32 *)&buf[2]) = addr;
return SZ_DMAGO;
} |
functions | bool _until_dmac_idle(struct pl330_thread *thrd)
{
void __iomem *regs = thrd->dmac->pinfo->base;
unsigned long loops = msecs_to_loops(5);
do {
/* Until Manager is Idle */
if (!(readl(regs + DBGSTATUS) & DBG_BUSY))
break;
cpu_relax();
} |
functions | void _execute_DBGINSN(struct pl330_thread *thrd,
u8 insn[], bool as_manager)
{
void __iomem *regs = thrd->dmac->pinfo->base;
u32 val;
val = (insn[0] << 16) | (insn[1] << 24);
if (!as_manager) {
val |= (1 << 0);
val |= (thrd->id << 8); /* Channel Number */
} |
functions | u32 _state(struct pl330_thread *thrd)
{
void __iomem *regs = thrd->dmac->pinfo->base;
u32 val;
if (is_manager(thrd))
val = readl(regs + DS) & 0xf;
else
val = readl(regs + CS(thrd->id)) & 0xf;
switch (val) {
case DS_ST_STOP:
return PL330_STATE_STOPPED;
case DS_ST_EXEC:
return PL330_STATE_EXECUTING;
cas... |
functions | bool _req_active(struct pl330_thread *thrd,
struct _pl330_req *req)
{
void __iomem *regs = thrd->dmac->pinfo->base;
u32 buf = req->mc_bus, pc = readl(regs + CPC(thrd->id));
if (IS_FREE(req))
return false;
return (pc >= buf && pc <= buf + req->mc_len) ? true : false;
} |
functions | unsigned _thrd_active(struct pl330_thread *thrd)
{
if (_req_active(thrd, &thrd->req[0]))
return 1; /* First req active */
if (_req_active(thrd, &thrd->req[1]))
return 2; /* Second req active */
return 0;
} |
functions | void _stop(struct pl330_thread *thrd)
{
void __iomem *regs = thrd->dmac->pinfo->base;
u8 insn[6] = {0, 0, 0, 0, 0, 0} |
functions | bool _trigger(struct pl330_thread *thrd)
{
void __iomem *regs = thrd->dmac->pinfo->base;
struct _pl330_req *req;
struct pl330_req *r;
struct _arg_GO go;
unsigned ns;
u8 insn[6] = {0, 0, 0, 0, 0, 0} |
functions | bool _start(struct pl330_thread *thrd)
{
switch (_state(thrd)) {
case PL330_STATE_FAULT_COMPLETING:
UNTIL(thrd, PL330_STATE_FAULTING | PL330_STATE_KILLING);
if (_state(thrd) == PL330_STATE_KILLING)
UNTIL(thrd, PL330_STATE_STOPPED)
case PL330_STATE_FAULTING:
_stop(thrd);
case PL330_STATE_KILLING:
case P... |
functions | int _ldst_memtomem(unsigned dry_run, u8 buf[],
const struct _xfer_spec *pxs, int cyc)
{
int off = 0;
while (cyc--) {
off += _emit_LD(dry_run, &buf[off], ALWAYS);
off += _emit_RMB(dry_run, &buf[off]);
off += _emit_ST(dry_run, &buf[off], ALWAYS);
off += _emit_WMB(dry_run, &buf[off]);
} |
functions | int _ldst_devtomem(unsigned dry_run, u8 buf[],
const struct _xfer_spec *pxs, int cyc)
{
int off = 0;
while (cyc--) {
off += _emit_WFP(dry_run, &buf[off], SINGLE, pxs->r->peri);
off += _emit_LDP(dry_run, &buf[off], SINGLE, pxs->r->peri);
off += _emit_ST(dry_run, &buf[off], ALWAYS);
off += _emit_FLUSHP(dry_r... |
functions | int _ldst_memtodev(unsigned dry_run, u8 buf[],
const struct _xfer_spec *pxs, int cyc)
{
int off = 0;
while (cyc--) {
off += _emit_WFP(dry_run, &buf[off], SINGLE, pxs->r->peri);
off += _emit_LD(dry_run, &buf[off], ALWAYS);
off += _emit_STP(dry_run, &buf[off], SINGLE, pxs->r->peri);
off += _emit_FLUSHP(dry_r... |
functions | int _bursts(unsigned dry_run, u8 buf[],
const struct _xfer_spec *pxs, int cyc)
{
int off = 0;
switch (pxs->r->rqtype) {
case MEMTODEV:
off += _ldst_memtodev(dry_run, &buf[off], pxs, cyc);
break;
case DEVTOMEM:
off += _ldst_devtomem(dry_run, &buf[off], pxs, cyc);
break;
case MEMTOMEM:
off += _ldst_memt... |
functions | int _loop(unsigned dry_run, u8 buf[],
unsigned long *bursts, const struct _xfer_spec *pxs)
{
int cyc, cycmax, szlp, szlpend, szbrst, off;
unsigned lcnt0, lcnt1, ljmp0, ljmp1;
struct _arg_LPEND lpend;
/* Max iterations possibile in DMALP is 256 */
if (*bursts >= 256*256) {
lcnt1 = 256;
lcnt0 = 256;
cyc = *... |
functions | else if (*bursts > 256) {
lcnt1 = 256;
lcnt0 = *bursts / lcnt1;
cyc = 1;
} |
functions | int _setup_loops(unsigned dry_run, u8 buf[],
const struct _xfer_spec *pxs)
{
struct pl330_xfer *x = pxs->x;
u32 ccr = pxs->ccr;
unsigned long c, bursts = BYTE_TO_BURST(x->bytes, ccr);
int off = 0;
while (bursts) {
c = bursts;
off += _loop(dry_run, &buf[off], &c, pxs);
bursts -= c;
} |
functions | int _setup_xfer(unsigned dry_run, u8 buf[],
const struct _xfer_spec *pxs)
{
struct pl330_xfer *x = pxs->x;
int off = 0;
/* DMAMOV SAR, x->src_addr */
off += _emit_MOV(dry_run, &buf[off], SAR, x->src_addr);
/* DMAMOV DAR, x->dst_addr */
off += _emit_MOV(dry_run, &buf[off], DAR, x->dst_addr);
/* Setup Loop(s) ... |
functions | int _setup_req(unsigned dry_run, struct pl330_thread *thrd,
unsigned index, struct _xfer_spec *pxs)
{
struct _pl330_req *req = &thrd->req[index];
struct pl330_xfer *x;
u8 *buf = req->mc_cpu;
int off = 0;
PL330_DBGMC_START(req->mc_bus);
/* DMAMOV CCR, ccr */
off += _emit_MOV(dry_run, &buf[off], CCR, pxs->ccr)... |
functions | u32 _prepare_ccr(const struct pl330_reqcfg *rqc)
{
u32 ccr = 0;
if (rqc->src_inc)
ccr |= CC_SRCINC;
if (rqc->dst_inc)
ccr |= CC_DSTINC;
/* We set same protection levels for Src and DST for now */
if (rqc->privileged)
ccr |= CC_SRCPRI | CC_DSTPRI;
if (rqc->nonsecure)
ccr |= CC_SRCNS | CC_DSTNS;
if (rqc... |
functions | bool _is_valid(u32 ccr)
{
enum pl330_dstcachectrl dcctl;
enum pl330_srccachectrl scctl;
dcctl = (ccr >> CC_DSTCCTRL_SHFT) & CC_DRCCCTRL_MASK;
scctl = (ccr >> CC_SRCCCTRL_SHFT) & CC_SRCCCTRL_MASK;
if (dcctl == DINVALID1 || dcctl == DINVALID2
|| scctl == SINVALID1 || scctl == SINVALID2)
return false;
else
... |
functions | int pl330_submit_req(void *ch_id, struct pl330_req *r)
{
struct pl330_thread *thrd = ch_id;
struct pl330_dmac *pl330;
struct pl330_info *pi;
struct _xfer_spec xs;
unsigned long flags;
void __iomem *regs;
unsigned idx;
u32 ccr;
int ret = 0;
/* No Req or Unacquired Channel or DMAC */
if (!r || !thrd || thrd->... |
functions | void pl330_dotask(unsigned long data)
{
struct pl330_dmac *pl330 = (struct pl330_dmac *) data;
struct pl330_info *pi = pl330->pinfo;
unsigned long flags;
int i;
spin_lock_irqsave(&pl330->lock, flags);
/* The DMAC itself gone nuts */
if (pl330->dmac_tbd.reset_dmac) {
pl330->state = DYING;
/* Reset the manag... |
functions | int pl330_update(const struct pl330_info *pi)
{
struct _pl330_req *rqdone;
struct pl330_dmac *pl330;
unsigned long flags;
void __iomem *regs;
u32 val;
int id, ev, ret = 0;
if (!pi || !pi->pl330_data)
return 0;
regs = pi->base;
pl330 = pi->pl330_data;
spin_lock_irqsave(&pl330->lock, flags);
val = readl(... |
functions | int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op)
{
struct pl330_thread *thrd = ch_id;
struct pl330_dmac *pl330;
unsigned long flags;
int ret = 0, active;
if (!thrd || thrd->free || thrd->dmac->state == DYING)
return -EINVAL;
pl330 = thrd->dmac;
spin_lock_irqsave(&pl330->lock, flags);
switch (op) {
... |
functions | int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus)
{
struct pl330_thread *thrd = ch_id;
struct pl330_dmac *pl330;
struct pl330_info *pi;
void __iomem *regs;
int active;
u32 val;
if (!pstatus || !thrd || thrd->free)
return -EINVAL;
pl330 = thrd->dmac;
pi = pl330->pinfo;
regs = pi->base;
... |
functions | int _alloc_event(struct pl330_thread *thrd)
{
struct pl330_dmac *pl330 = thrd->dmac;
struct pl330_info *pi = pl330->pinfo;
int ev;
for (ev = 0; ev < pi->pcfg.num_events; ev++)
if (pl330->events[ev] == -1) {
pl330->events[ev] = thrd->id;
return ev;
} |
functions | void _free_event(struct pl330_thread *thrd, int ev)
{
struct pl330_dmac *pl330 = thrd->dmac;
struct pl330_info *pi = pl330->pinfo;
/* If the event is valid and was held by the thread */
if (ev >= 0 && ev < pi->pcfg.num_events
&& pl330->events[ev] == thrd->id)
pl330->events[ev] = -1;
} |
functions | void pl330_release_channel(void *ch_id)
{
struct pl330_thread *thrd = ch_id;
struct pl330_dmac *pl330;
unsigned long flags;
if (!thrd || thrd->free)
return;
_stop(thrd);
_callback(thrd->req[1 - thrd->lstenq].r, PL330_ERR_ABORT);
_callback(thrd->req[thrd->lstenq].r, PL330_ERR_ABORT);
pl330 = thrd->dmac;
... |
functions | void read_dmac_config(struct pl330_info *pi)
{
void __iomem *regs = pi->base;
u32 val;
val = readl(regs + CRD) >> CRD_DATA_WIDTH_SHIFT;
val &= CRD_DATA_WIDTH_MASK;
pi->pcfg.data_bus_width = 8 * (1 << val);
val = readl(regs + CRD) >> CRD_DATA_BUFF_SHIFT;
val &= CRD_DATA_BUFF_MASK;
pi->pcfg.data_buf_dep = val +... |
functions | void _reset_thread(struct pl330_thread *thrd)
{
struct pl330_dmac *pl330 = thrd->dmac;
struct pl330_info *pi = pl330->pinfo;
thrd->req[0].mc_cpu = pl330->mcode_cpu
+ (thrd->id * pi->mcbufsz);
thrd->req[0].mc_bus = pl330->mcode_bus
+ (thrd->id * pi->mcbufsz);
thrd->req[0].r = NULL;
MARK_FREE(&thrd->req[0]... |
functions | int dmac_alloc_threads(struct pl330_dmac *pl330)
{
struct pl330_info *pi = pl330->pinfo;
int chans = pi->pcfg.num_chan;
struct pl330_thread *thrd;
int i;
/* Allocate 1 Manager and 'chans' Channel threads */
pl330->channels = kzalloc((1 + chans) * sizeof(*thrd),
GFP_KERNEL);
if (!pl330->channels)
return -... |
functions | int dmac_alloc_resources(struct pl330_dmac *pl330)
{
struct pl330_info *pi = pl330->pinfo;
int chans = pi->pcfg.num_chan;
int ret;
/*
* Alloc MicroCode buffer for 'chans' Channel threads.
* A channel's buffer offset is (Channel_Id * MCODE_BUFF_PERCHAN)
*/
pl330->mcode_cpu = dma_alloc_coherent(pi->dev,
c... |
functions | int pl330_add(struct pl330_info *pi)
{
struct pl330_dmac *pl330;
void __iomem *regs;
int i, ret;
if (!pi || !pi->dev)
return -EINVAL;
/* If already added */
if (pi->pl330_data)
return -EINVAL;
/*
* If the SoC can perform reset on the DMAC, then do it
* before reading its configuration.
*/
if (pi->d... |
functions | int dmac_free_threads(struct pl330_dmac *pl330)
{
struct pl330_info *pi = pl330->pinfo;
int chans = pi->pcfg.num_chan;
struct pl330_thread *thrd;
int i;
/* Release Channel threads */
for (i = 0; i < chans; i++) {
thrd = &pl330->channels[i];
pl330_release_channel((void *)thrd);
} |
functions | void dmac_free_resources(struct pl330_dmac *pl330)
{
struct pl330_info *pi = pl330->pinfo;
int chans = pi->pcfg.num_chan;
dmac_free_threads(pl330);
dma_free_coherent(pi->dev, chans * pi->mcbufsz,
pl330->mcode_cpu, pl330->mcode_bus);
} |
functions | void pl330_del(struct pl330_info *pi)
{
struct pl330_dmac *pl330;
if (!pi || !pi->pl330_data)
return;
pl330 = pi->pl330_data;
pl330->state = UNINIT;
tasklet_kill(&pl330->tasks);
/* Free DMAC resources */
dmac_free_resources(pl330);
kfree(pl330);
pi->pl330_data = NULL;
} |
includes | #include <signal.h> |
includes | #include <fcntl.h> |
includes | #include <sys/file.h> |
defines | #define O_LARGEFILE 0 |
defines | #define CORELOW_PID 1 |
structs | struct spuid_list
{
gdb_byte *buf;
ULONGEST offset;
LONGEST len;
ULONGEST pos;
ULONGEST written;
}; |
functions | void
deprecated_add_core_fns (struct core_fns *cf)
{
cf->next = core_file_fns;
core_file_fns = cf;
} |
functions | int
default_core_sniffer (struct core_fns *our_fns, bfd *abfd)
{
int result;
result = (bfd_get_flavour (abfd) == our_fns -> core_flavour);
return (result);
} |
functions | int
default_check_format (bfd *abfd)
{
return (0);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.