From: Chris Ring Date: Mon, 14 Apr 2014 15:12:48 +0000 (-0700) Subject: BIOS: Remove dead DRA7XX VirtQueue code X-Git-Tag: 3.22.00.04_eng~1 X-Git-Url: https://git.ti.com/gitweb?p=ipc%2Fipcdev.git;a=commitdiff_plain;h=655e99ba755626211d881fceb7a645dcb2c860b9 BIOS: Remove dead DRA7XX VirtQueue code Because BIOS-side virtqueue-based processors never run as the 'host', half of the protocol is unused. This commit removes that dead code for the BIOS-side DRA7XX VirtQueue driver. --- diff --git a/packages/ti/ipc/family/vayu/VirtQueue.c b/packages/ti/ipc/family/vayu/VirtQueue.c index 9bf09d3..639cf66 100644 --- a/packages/ti/ipc/family/vayu/VirtQueue.c +++ b/packages/ti/ipc/family/vayu/VirtQueue.c @@ -197,9 +197,6 @@ typedef struct VirtQueue_Object { /* Last available index; updated by VirtQueue_getAvailBuf */ UInt16 last_avail_idx; - /* Last available index; updated by VirtQueue_addUsedBuf */ - UInt16 last_used_idx; - /* Will eventually be used to kick remote processor */ UInt16 procId; @@ -245,11 +242,6 @@ static inline Void * mapPAtoVA(UInt pa) return (Void *)((pa & 0x000fffffU) | IPC_MEM_VRING0); } -static inline UInt mapVAtoPA(Void * va) -{ - return ((UInt)va & 0x000fffffU) | 0x9cf00000U; -} - /*! * ======== VirtQueue_kick ======== */ @@ -296,56 +288,6 @@ Int VirtQueue_addUsedBuf(VirtQueue_Handle vq, Int16 head, Int len) return (0); } -/*! - * ======== VirtQueue_addAvailBuf ======== - */ -Int VirtQueue_addAvailBuf(VirtQueue_Object *vq, Void *buf) -{ - UInt16 avail; - IArg key; - - if (vq->num_free == 0) { - /* There's no more space */ - Error_raise(NULL, Error_E_generic, 0, 0); - } - - vq->num_free--; - - key = GateHwi_enter(vq->gateH); - avail = vq->vring.avail->idx++ % vq->vring.num; - - vq->vring.desc[avail].addr = mapVAtoPA(buf); - vq->vring.desc[avail].len = RP_MSG_BUF_SIZE; - GateHwi_leave(vq->gateH, key); - - return (vq->num_free); -} - -/*! - * ======== VirtQueue_getUsedBuf ======== - */ -Void *VirtQueue_getUsedBuf(VirtQueue_Object *vq) -{ - UInt16 head; - Void *buf; - IArg key; - - key = GateHwi_enter(vq->gateH); - /* There's nothing available? */ - if (vq->last_used_idx == vq->vring.used->idx) { - buf = NULL; - } - else { - head = vq->vring.used->ring[vq->last_used_idx % vq->vring.num].id; - vq->last_used_idx++; - - buf = mapPAtoVA(vq->vring.desc[head].addr); - } - GateHwi_leave(vq->gateH, key); - - return (buf); -} - /*! * ======== VirtQueue_getAvailBuf ======== */