• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7800-V1.0.2.28/target/linux/generic/files/crypto/ocf/kirkwood/mvHal/kw_family/ctrlEnv/sys/

Lines Matching defs:target

85 static MV_BOOL cpuTargetWinOverlap(MV_TARGET target, MV_ADDR_WIN *pAddrWin);
114 MV_TARGET target;
123 /*Initialize the boot target array according to device type*/
135 /* First disable all CPU target windows */
136 for (target = 0; cpuAddrWinMap[target].enable != TBL_TERM; target++)
138 if ((MV_TARGET_IS_DRAM(target))||(target == INTER_REGS))
144 /* If the target PEX or PCI and memory is over PEX or PCI we don't touch this CPU windows */
145 if (MV_TARGET_IS_PCI(target))
152 /* If the target PEX or PCI and memory is over PEX or PCI we don't touch this CPU windows */
153 if (MV_TARGET_IS_PEX(target))
160 if (target == DEV_BOOCS)
165 mvCpuIfTargetWinEnable(MV_CHANGE_BOOT_CS(target),MV_FALSE);
171 target = DEV_BOOCS;
173 if (MV_OK != mvCpuIfTargetWinSet(target, &cpuAddrWinMap[target]))
179 addrWin.baseLow = cpuAddrWinMap[target].addrWin.baseLow;
180 addrWin.baseHigh = cpuAddrWinMap[target].addrWin.baseHigh;
181 if (0xffffffff == mvAhbToMbusWinRemap(cpuAddrWinMap[target].winNum ,&addrWin))
184 cpuAddrWinMap[target].winNum));
190 for (target = 0; cpuAddrWinMap[target].enable != TBL_TERM; target++)
194 if (target == DEV_BOOCS)
200 /* if DRAM auto sizing is used do not initialized DRAM target windows, */
203 if (MV_TARGET_IS_DRAM(target))
210 /* If the target PEX or PCI and memory is over PEX or PCI we don't touch this CPU windows */
211 if (MV_TARGET_IS_PCI(target))
218 /* If the target PEX or PCI and memory is over PEX or PCI we don't touch this CPU windows */
219 if (MV_TARGET_IS_PEX(target))
224 /* If the target attribute is the same as the boot device attribute */
226 if (MV_TARGET_IS_AS_BOOT(target))
231 if((0 == cpuAddrWinMap[target].addrWin.size) ||
232 (DIS == cpuAddrWinMap[target].enable))
235 if (MV_OK != mvCpuIfTargetWinEnable(target, MV_FALSE))
244 if (MV_OK != mvCpuIfTargetWinSet(target, &cpuAddrWinMap[target]))
250 addrWin.baseLow = cpuAddrWinMap[target].addrWin.baseLow;
251 addrWin.baseHigh = cpuAddrWinMap[target].addrWin.baseHigh;
252 if (0xffffffff == mvAhbToMbusWinRemap(cpuAddrWinMap[target].winNum ,&addrWin))
255 cpuAddrWinMap[target].winNum));
269 * mvCpuIfTargetWinSet - Set CPU-to-peripheral target address window
272 * This function sets a peripheral target (e.g. SDRAM bank0, PCI0_MEM0)
274 * A new address decode window is set for specified target address window.
276 * the routine will also enable the target window, allowing CPU to access
277 * the target window.
280 * target - Peripheral target enumerator.
281 * pAddrDecWin - CPU target window data structure.
287 * MV_OK if CPU target window was set correctly, MV_ERROR in case of
288 * address window overlapps with other active CPU target window or
290 * The function returns MV_NOT_SUPPORTED, if the target is unsupported.
293 MV_STATUS mvCpuIfTargetWinSet(MV_TARGET target, MV_CPU_DEC_WIN *pAddrDecWin)
299 target = MV_CHANGE_BOOT_CS(target);
302 if (target >= MAX_TARGETS)
304 mvOsPrintf("mvCpuIfTargetWinSet: target %d is Illigal\n", target);
309 if (MV_TRUE == cpuTargetWinOverlap(target, &pAddrDecWin->addrWin))
311 mvOsPrintf("mvCpuIfTargetWinSet: ERR. Target %d overlap\n", target);
315 if (MV_TARGET_IS_DRAM(target))
324 if (mvDramIfWinSet(target,&addrDecWin) != MV_OK);
338 decWin.target = target;
340 existingWinNum = mvAhbToMbusWinTargetGet(target);
343 for this target */
369 * mvCpuIfTargetWinGet - Get CPU-to-peripheral target address window
372 * Get the CPU peripheral target address window.
375 * target - Peripheral target enumerator
378 * pAddrDecWin - CPU target window information data structure.
381 * MV_OK if target exist, MV_ERROR otherwise.
384 MV_STATUS mvCpuIfTargetWinGet(MV_TARGET target, MV_CPU_DEC_WIN *pAddrDecWin)
391 target = MV_CHANGE_BOOT_CS(target);
394 if (target >= MAX_TARGETS)
396 mvOsPrintf("mvCpuIfTargetWinGet: target %d is Illigal\n", target);
400 if (MV_TARGET_IS_DRAM(target))
402 if (mvDramIfWinGet(target,&addrDecWin) != MV_OK)
404 mvOsPrintf("mvCpuIfTargetWinGet: Failed to get window target %d\n",
405 target);
419 /* get the Window number associated with this target */
421 winNum = mvAhbToMbusWinTargetGet(target);
462 * target - Peripheral target enumerator.
470 * overlapps other target window.
473 MV_STATUS mvCpuIfTargetWinEnable(MV_TARGET target,MV_BOOL enable)
478 target = MV_CHANGE_BOOT_CS(target);
481 if (target >= MAX_TARGETS)
483 mvOsPrintf("mvCpuIfTargetWinEnable: target %d is Illigal\n", target);
488 temp = mvCpuIfTargetWinGet(target, &addrDecWin);
495 mvOsPrintf("%s: ERR. Getting target %d failed.\n",__FUNCTION__, target);
504 if (MV_TRUE == cpuTargetWinOverlap(target, &addrDecWin.addrWin))
506 DB(mvOsPrintf("%s: ERR. Target %d overlap\n",__FUNCTION__, target));
513 if (MV_TARGET_IS_DRAM(target))
515 if (mvDramIfWinEnable(target , enable) != MV_OK)
525 /* get the Window number associated with this target */
527 winNum = mvAhbToMbusWinTargetGet(target);
549 * mvCpuIfTargetWinSizeGet - Get CPU target address window size
552 * Get the size of CPU-to-peripheral target window.
555 * target - Peripheral target enumerator
565 MV_U32 mvCpuIfTargetWinSizeGet(MV_TARGET target)
569 target = MV_CHANGE_BOOT_CS(target);
572 if (target >= MAX_TARGETS)
574 mvOsPrintf("mvCpuIfTargetWinSizeGet: target %d is Illigal\n", target);
579 if (MV_OK != mvCpuIfTargetWinGet(target, &addrDecWin))
581 mvOsPrintf("mvCpuIfTargetWinSizeGet:ERR. Getting target %d failed.\n",
582 target);
598 * mvCpuIfTargetWinBaseLowGet - Get CPU target address window base low
601 * CPU-to-peripheral target address window base is constructed of
603 * This function gets the CPU peripheral target low base address.
606 * target - Peripheral target enumerator
615 MV_U32 mvCpuIfTargetWinBaseLowGet(MV_TARGET target)
619 target = MV_CHANGE_BOOT_CS(target);
622 if (target >= MAX_TARGETS)
624 mvOsPrintf("mvCpuIfTargetWinBaseLowGet: target %d is Illigal\n", target);
628 /* Get the target window */
629 if (MV_OK != mvCpuIfTargetWinGet(target, &addrDecWin))
631 mvOsPrintf("mvCpuIfTargetWinBaseLowGet:ERR. Getting target %d failed.\n",
632 target);
644 * mvCpuIfTargetWinBaseHighGet - Get CPU target address window base high
647 * CPU-to-peripheral target address window base is constructed of
649 * This function gets the CPU peripheral target high base address.
652 * target - Peripheral target enumerator
661 MV_U32 mvCpuIfTargetWinBaseHighGet(MV_TARGET target)
665 target = MV_CHANGE_BOOT_CS(target);
668 if (target >= MAX_TARGETS)
670 mvOsPrintf("mvCpuIfTargetWinBaseLowGet: target %d is Illigal\n", target);
674 /* Get the target window */
675 if (MV_OK != mvCpuIfTargetWinGet(target, &addrDecWin))
677 mvOsPrintf("mvCpuIfTargetWinBaseHighGet:ERR. Getting target %d failed.\n",
678 target);
697 * pexTarget - Peripheral target enumerator. Must be a PEX target.
698 * pAddrDecWin - CPU target window information data structure.
706 * MV_ERROR if target is not a PEX one, MV_OK otherwise.
719 mvOsPrintf("mvCpuIfPexRemap: target %d is Illigal\n",pexTarget);
728 mvOsPrintf("mvCpuIfPexRemap: target %d is Illigal\n",pexTarget);
734 /* get the Window number associated with this target */
756 * pciTarget - Peripheral target enumerator. Must be a PCI target.
757 * pAddrDecWin - CPU target window information data structure.
765 * MV_ERROR if target is not a PCI one, MV_OK otherwise.
775 mvOsPrintf("mvCpuIfPciRemap: target %d is Illigal\n",pciTarget);
779 /* get the Window number associated with this target */
800 * pciTarget - Peripheral target enumerator. Must be a PCI target.
801 * pAddrDecWin - CPU target window information data structure.
809 * MV_ERROR if target is not a PCI one, MV_OK otherwise.
833 * mvCpuIfTargetOfBaseAddressGet - Get the target according to base address
844 * the target number that baseAddress belongs to or MAX_TARGETS is not
852 MV_U32 target;
854 for( target = 0; target < MAX_TARGETS; target++ )
856 if( mvCpuIfTargetWinGet( target, &win ) == MV_OK )
868 return target;
877 * specified target. The function does not check the target itself for
881 * target - Peripheral target enumerator.
892 static MV_BOOL cpuTargetWinOverlap(MV_TARGET target, MV_ADDR_WIN *pAddrWin)
902 if(MV_TARGET_IS_AS_BOOT(target))
904 if (MV_CHANGE_BOOT_CS(targetNum) == target)
909 /* don't check our target or illegal targets */
910 if (targetNum == target)
936 "cpuTargetWinOverlap: Required target %d overlap current %d\n",
937 target, targetNum));
965 MV_U32 target;
970 for( target = 0; target < MAX_TARGETS; target++ )
975 mvOsOutput( "%s ",mvCtrlTargetNameGet(target));
978 if( mvCpuIfTargetWinGet( target, &win ) == MV_OK )
990 else if( mvCpuIfTargetWinGet( target, &win ) == MV_NO_SUCH )