Lines Matching refs:backup

109 	struct dwc2_reg_backup backup;  member
858 struct dwc2_reg_backup *backup = &priv->backup; in dwc2_backup_registers() local
860 backup->gotgctl = sys_read32((mem_addr_t)&base->gotgctl); in dwc2_backup_registers()
861 backup->gahbcfg = sys_read32((mem_addr_t)&base->gahbcfg); in dwc2_backup_registers()
862 backup->gusbcfg = sys_read32((mem_addr_t)&base->gusbcfg); in dwc2_backup_registers()
863 backup->gintmsk = sys_read32((mem_addr_t)&base->gintmsk); in dwc2_backup_registers()
864 backup->grxfsiz = sys_read32((mem_addr_t)&base->grxfsiz); in dwc2_backup_registers()
865 backup->gnptxfsiz = sys_read32((mem_addr_t)&base->gnptxfsiz); in dwc2_backup_registers()
866 backup->gi2cctl = sys_read32((mem_addr_t)&base->gi2cctl); in dwc2_backup_registers()
867 backup->glpmcfg = sys_read32((mem_addr_t)&base->glpmcfg); in dwc2_backup_registers()
868 backup->gdfifocfg = sys_read32((mem_addr_t)&base->gdfifocfg); in dwc2_backup_registers()
871 backup->dieptxf[i - 1] = sys_read32((mem_addr_t)&base->dieptxf[i - 1]); in dwc2_backup_registers()
874 backup->dcfg = sys_read32((mem_addr_t)&base->dcfg); in dwc2_backup_registers()
875 backup->dctl = sys_read32((mem_addr_t)&base->dctl); in dwc2_backup_registers()
876 backup->diepmsk = sys_read32((mem_addr_t)&base->diepmsk); in dwc2_backup_registers()
877 backup->doepmsk = sys_read32((mem_addr_t)&base->doepmsk); in dwc2_backup_registers()
878 backup->daintmsk = sys_read32((mem_addr_t)&base->daintmsk); in dwc2_backup_registers()
884 backup->diepctl[i] = sys_read32((mem_addr_t)&base->in_ep[i].diepctl); in dwc2_backup_registers()
885 if (backup->diepctl[i] & USB_DWC2_DEPCTL_DPID) { in dwc2_backup_registers()
886 backup->diepctl[i] |= USB_DWC2_DEPCTL_SETD1PID; in dwc2_backup_registers()
888 backup->diepctl[i] |= USB_DWC2_DEPCTL_SETD0PID; in dwc2_backup_registers()
890 backup->dieptsiz[i] = sys_read32((mem_addr_t)&base->in_ep[i].dieptsiz); in dwc2_backup_registers()
891 backup->diepdma[i] = sys_read32((mem_addr_t)&base->in_ep[i].diepdma); in dwc2_backup_registers()
895 backup->doepctl[i] = sys_read32((mem_addr_t)&base->out_ep[i].doepctl); in dwc2_backup_registers()
896 if (backup->doepctl[i] & USB_DWC2_DEPCTL_DPID) { in dwc2_backup_registers()
897 backup->doepctl[i] |= USB_DWC2_DEPCTL_SETD1PID; in dwc2_backup_registers()
899 backup->doepctl[i] |= USB_DWC2_DEPCTL_SETD0PID; in dwc2_backup_registers()
901 backup->doeptsiz[i] = sys_read32((mem_addr_t)&base->out_ep[i].doeptsiz); in dwc2_backup_registers()
902 backup->doepdma[i] = sys_read32((mem_addr_t)&base->out_ep[i].doepdma); in dwc2_backup_registers()
906 backup->pcgcctl = sys_read32((mem_addr_t)&base->pcgcctl); in dwc2_backup_registers()
915 struct dwc2_reg_backup *backup = &priv->backup; in dwc2_restore_essential_registers() local
916 uint32_t pcgcctl = backup->pcgcctl & USB_DWC2_PCGCCTL_RESTOREVALUE_MASK; in dwc2_restore_essential_registers()
918 sys_write32(backup->glpmcfg, (mem_addr_t)&base->glpmcfg); in dwc2_restore_essential_registers()
919 sys_write32(backup->gi2cctl, (mem_addr_t)&base->gi2cctl); in dwc2_restore_essential_registers()
922 sys_write32(backup->gahbcfg | USB_DWC2_GAHBCFG_GLBINTRMASK, in dwc2_restore_essential_registers()
928 sys_write32(backup->gusbcfg, (mem_addr_t)&base->gusbcfg); in dwc2_restore_essential_registers()
929 sys_write32(backup->dcfg, (mem_addr_t)&base->dcfg); in dwc2_restore_essential_registers()
932 sys_write32(backup->dcfg, (mem_addr_t)&base->dcfg); in dwc2_restore_essential_registers()
950 struct dwc2_reg_backup *backup = &priv->backup; in dwc2_restore_device_registers() local
952 sys_write32(backup->gotgctl, (mem_addr_t)&base->gotgctl); in dwc2_restore_device_registers()
953 sys_write32(backup->gahbcfg, (mem_addr_t)&base->gahbcfg); in dwc2_restore_device_registers()
954 sys_write32(backup->gusbcfg, (mem_addr_t)&base->gusbcfg); in dwc2_restore_device_registers()
955 sys_write32(backup->gintmsk, (mem_addr_t)&base->gintmsk); in dwc2_restore_device_registers()
956 sys_write32(backup->grxfsiz, (mem_addr_t)&base->grxfsiz); in dwc2_restore_device_registers()
957 sys_write32(backup->gnptxfsiz, (mem_addr_t)&base->gnptxfsiz); in dwc2_restore_device_registers()
958 sys_write32(backup->gdfifocfg, (mem_addr_t)&base->gdfifocfg); in dwc2_restore_device_registers()
961 sys_write32(backup->dieptxf[i - 1], (mem_addr_t)&base->dieptxf[i - 1]); in dwc2_restore_device_registers()
965 sys_write32(backup->dctl, (mem_addr_t)&base->dctl); in dwc2_restore_device_registers()
968 sys_write32(backup->diepmsk, (mem_addr_t)&base->diepmsk); in dwc2_restore_device_registers()
969 sys_write32(backup->doepmsk, (mem_addr_t)&base->doepmsk); in dwc2_restore_device_registers()
970 sys_write32(backup->daintmsk, (mem_addr_t)&base->daintmsk); in dwc2_restore_device_registers()
976 sys_write32(backup->dieptsiz[i], (mem_addr_t)&base->in_ep[i].dieptsiz); in dwc2_restore_device_registers()
977 sys_write32(backup->diepdma[i], (mem_addr_t)&base->in_ep[i].diepdma); in dwc2_restore_device_registers()
978 sys_write32(backup->diepctl[i], (mem_addr_t)&base->in_ep[i].diepctl); in dwc2_restore_device_registers()
982 sys_write32(backup->doeptsiz[i], (mem_addr_t)&base->out_ep[i].doeptsiz); in dwc2_restore_device_registers()
983 sys_write32(backup->doepdma[i], (mem_addr_t)&base->out_ep[i].doepdma); in dwc2_restore_device_registers()
984 sys_write32(backup->doepctl[i], (mem_addr_t)&base->out_ep[i].doepctl); in dwc2_restore_device_registers()
1097 sys_write32(priv->backup.gusbcfg, (mem_addr_t)&base->gusbcfg); in dwc2_exit_hibernation()
1098 sys_write32(priv->backup.dcfg, (mem_addr_t)&base->dcfg); in dwc2_exit_hibernation()
1099 sys_write32(priv->backup.dctl, (mem_addr_t)&base->dctl); in dwc2_exit_hibernation()
1108 sys_write32(USB_DWC2_DCTL_RMTWKUPSIG | priv->backup.dctl, in dwc2_exit_hibernation()