• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/char/rio/

Lines Matching refs:HostP

73 static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd __iomem *PktCmdP);
166 * @HostP: The RIO to kick off
172 void rio_start_card_running(struct Host *HostP)
174 switch (HostP->Type) {
177 writeb(BOOT_FROM_RAM | EXTERNAL_BUS_ON | HostP->Mode | RIOAtVec2Ctrl[HostP->Ivec & 0xF], &HostP->Control);
186 writeb(PCITpBootFromRam | PCITpBusEnable | HostP->Mode, &HostP->Control);
189 rio_dprintk(RIO_DEBUG_BOOT, "Unknown host type %d\n", HostP->Type);
205 struct Host *HostP;
219 HostP = NULL; /* Assure the compiler we've initialized it */
225 HostP = &p->RIOHosts[host];
227 rio_dprintk(RIO_DEBUG_BOOT, "Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n", HostP->Type, HostP->Mode, HostP->Ivec);
230 if ((HostP->Flags & RUN_STATE) != RC_WAITING) {
238 Cad = HostP->Caddr;
264 RIOHostReset(HostP->Type, HostP->CardP, HostP->Slot);
288 HostP->Copy(DownCode, StartP, rbp->Count);
399 HostP->Flags &= ~RUN_STATE;
400 HostP->Flags |= RC_STARTUP;
406 OldParmMap = readw(&HostP->__ParmMapR);
415 rio_dprintk(RIO_DEBUG_BOOT, "Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n", HostP->Type, HostP->Mode, HostP->Ivec);
417 rio_start_card_running(HostP);
425 for (wait_count = 0; (wait_count < p->RIOConf.StartupTime) && (readw(&HostP->__ParmMapR) == OldParmMap); wait_count++) {
426 rio_dprintk(RIO_DEBUG_BOOT, "Checkout %d, 0x%x\n", wait_count, readw(&HostP->__ParmMapR));
435 if (readw(&HostP->__ParmMapR) == OldParmMap) {
436 rio_dprintk(RIO_DEBUG_BOOT, "parmmap 0x%x\n", readw(&HostP->__ParmMapR));
438 HostP->Flags &= ~RUN_STATE;
439 HostP->Flags |= RC_STUFFED;
440 RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot );
444 rio_dprintk(RIO_DEBUG_BOOT, "Running 0x%x\n", readw(&HostP->__ParmMapR));
455 ParmMapP = (PARM_MAP __iomem *) RIO_PTR(Cad, readw(&HostP->__ParmMapR));
457 ParmMapP = (PARM_MAP __iomem *)(Cad + readw(&HostP->__ParmMapR));
466 rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
468 HostP->Flags &= ~RUN_STATE;
469 HostP->Flags |= RC_STUFFED;
470 RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot );
477 HostP->timeout_id = 0;
485 rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
487 HostP->Flags &= ~RUN_STATE;
488 HostP->Flags |= RC_STUFFED;
489 RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot );
498 rio_dprintk(RIO_DEBUG_BOOT, "Host ID %x Running\n", HostP->UniqueNum);
509 HostP->ParmMapP = ParmMapP;
510 HostP->PhbP = (struct PHB __iomem *) RIO_PTR(Cad, readw(&ParmMapP->phb_ptr));
511 HostP->RupP = (struct RUP __iomem *) RIO_PTR(Cad, readw(&ParmMapP->rups));
512 HostP->PhbNumP = (unsigned short __iomem *) RIO_PTR(Cad, readw(&ParmMapP->phb_num_ptr));
513 HostP->LinkStrP = (struct LPB __iomem *) RIO_PTR(Cad, readw(&ParmMapP->link_str_ptr));
519 HostP->UnixRups[RupN].RupP = &HostP->RupP[RupN];
520 HostP->UnixRups[RupN].Id = RupN + 1;
521 HostP->UnixRups[RupN].BaseSysPort = NO_PORT;
522 spin_lock_init(&HostP->UnixRups[RupN].RupLock);
526 HostP->UnixRups[RupN + MAX_RUP].RupP = &HostP->LinkStrP[RupN].rup;
527 HostP->UnixRups[RupN + MAX_RUP].Id = 0;
528 HostP->UnixRups[RupN + MAX_RUP].BaseSysPort = NO_PORT;
529 spin_lock_init(&HostP->UnixRups[RupN + MAX_RUP].RupLock);
536 if (p->RIOPortp[PortN]->HostP == HostP) {
544 PhbP = &HostP->PhbP[PortP->HostPort];
561 HostP->UnixRups[PortP->RupNum].BaseSysPort = PortN;
569 HostP->Flags &= ~RUN_STATE;
570 HostP->Flags |= RC_RUNNING;
581 rio_dprintk(RIO_DEBUG_BOOT, "Done everything %x\n", HostP->Ivec);
592 * @HostP: host object
599 int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT __iomem *PacketP)
621 return RIOBootComplete(p, HostP, Rup, PktCmdP);
650 rio_dprintk(RIO_DEBUG_BOOT, "Unexpected command %d on BOOT RUP %d of host %Zd\n", readb(&PktCmdP->Command), Rup, HostP - p->RIOHosts);
675 rio_dprintk(RIO_DEBUG_BOOT, "Boot RTA on Host %Zd Rup %d - %d (0x%x) packets to 0x%x\n", HostP - p->RIOHosts, Rup, p->RIONumBootPkts, p->RIONumBootPkts, p->RIOConf.RtaLoadBase);
685 RIOQueueCmdBlk(HostP, Rup, CmdBlkP);
694 rio_dprintk(RIO_DEBUG_BOOT, "Boot block %d on Host %Zd Rup%d\n", sequence, HostP - p->RIOHosts, Rup);
703 RIOQueueCmdBlk(HostP, Rup, CmdBlkP);
710 * @HostP: Host structure
715 * If booted by a host, HostP->HostUniqueNum is the booting host.
716 * If booted by an RTA, HostP->Mapping[Rup].RtaUniqueNum is the booting RTA.
720 static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd __iomem *PktCmdP)
744 rio_dprintk(RIO_DEBUG_BOOT, "RIO: Host %s has booted an RTA(%d) on link %c\n", HostP->Name, 8 * RtaType, readb(&PktCmdP->LinkNum) + 'A');
746 rio_dprintk(RIO_DEBUG_BOOT, "RIO: RTA %s has booted an RTA(%d) on link %c\n", HostP->Mapping[Rup].Name, 8 * RtaType, readb(&PktCmdP->LinkNum) + 'A');
761 if (!RIOBootOk(p, HostP, RtaUniq)) {
769 if (RIOSuspendBootRta(HostP, HostP->Mapping[Rup].ID, MyLink)) {
778 writew(30, &HostP->LinkStrP[MyLink].WaitNoBoot);
779 rio_dprintk(RIO_DEBUG_BOOT, "RTA %x not owned - suspend booting down link %c on unit %x\n", RtaUniq, 'A' + MyLink, HostP->Mapping[Rup].RtaUniqueNum);
797 if ((HostP->Mapping[entry].Flags & SLOT_IN_USE) && (HostP->Mapping[entry].RtaUniqueNum == RtaUniq)) {
798 HostP->Mapping[entry].Flags |= RTA_BOOTED | RTA_NEWBOOT;
799 if ((sysport = HostP->Mapping[entry].SysPort) != NO_PORT) {
808 entry2 = HostP->Mapping[entry].ID2 - 1;
809 HostP->Mapping[entry2].Flags |= RTA_BOOTED | RTA_NEWBOOT;
810 sysport = HostP->Mapping[entry2].SysPort;
832 MyName = HostP->Name;
838 MyName = HostP->Mapping[Rup].Name;
852 if ((HostP->Mapping[entry].Flags & SLOT_TENTATIVE) && (HostP->Mapping[entry].RtaUniqueNum == RtaUniq)) {
854 entry2 = HostP->Mapping[entry].ID2 - 1;
855 if ((HostP->Mapping[entry2].Flags & SLOT_TENTATIVE) && (HostP->Mapping[entry2].RtaUniqueNum == RtaUniq))
954 if (RIOFindFreeID(p, HostP, &entry, &entry2) == 0) {
955 RIODefaultName(p, HostP, entry);
956 rio_fill_host_slot(entry, entry2, RtaUniq, HostP);
960 if (RIOFindFreeID(p, HostP, &entry, NULL) == 0) {
961 RIODefaultName(p, HostP, entry);
962 rio_fill_host_slot(entry, 0, RtaUniq, HostP);
982 HostP->Mapping[entry].SysPort = MapP->SysPort;
983 memcpy(HostP->Mapping[entry].Name, MapP->Name, MAX_NAME_LEN);
984 HostP->Mapping[entry].Flags = SLOT_IN_USE | RTA_BOOTED | RTA_NEWBOOT;
985 RIOReMapPorts(p, HostP, &HostP->Mapping[entry]);
986 if (HostP->Mapping[entry].SysPort < p->RIOFirstPortsBooted)
987 p->RIOFirstPortsBooted = HostP->Mapping[entry].SysPort;
988 if (HostP->Mapping[entry].SysPort > p->RIOLastPortsBooted)
989 p->RIOLastPortsBooted = HostP->Mapping[entry].SysPort;
993 HostP->Mapping[entry].Flags = SLOT_TENTATIVE | RTA_BOOTED | RTA_NEWBOOT;
997 HostP->Mapping[entry2].Flags = SLOT_IN_USE | RTA_BOOTED | RTA_NEWBOOT | RTA16_SECOND_SLOT;
998 HostP->Mapping[entry2].SysPort = MapP2->SysPort;
1002 RIOReMapPorts(p, HostP, &HostP->Mapping[entry2]);
1003 if (HostP->Mapping[entry2].SysPort < p->RIOFirstPortsBooted)
1004 p->RIOFirstPortsBooted = HostP->Mapping[entry2].SysPort;
1005 if (HostP->Mapping[entry2].SysPort > p->RIOLastPortsBooted)
1006 p->RIOLastPortsBooted = HostP->Mapping[entry2].SysPort;
1007 rio_dprintk(RIO_DEBUG_BOOT, "SysPort %d, Name %s\n", (int) HostP->Mapping[entry2].SysPort, HostP->Mapping[entry].Name);
1009 HostP->Mapping[entry2].Flags = SLOT_TENTATIVE | RTA_BOOTED | RTA_NEWBOOT | RTA16_SECOND_SLOT;
1028 for (entry = 0; entry < HostP->NumExtraBooted; entry++) {
1029 if (HostP->ExtraUnits[entry] == RtaUniq) {
1039 if (HostP->NumExtraBooted < MAX_EXTRA_UNITS)
1040 HostP->ExtraUnits[HostP->NumExtraBooted++] = RtaUniq;
1054 int RIOBootOk(struct rio_info *p, struct Host *HostP, unsigned long RtaUniq)
1057 unsigned int HostUniq = HostP->UniqueNum;