Explorar o código

efDataDiscreteRateMining memoryCall.c 李欣儒 commit at 2021-03-04

李欣儒 %!s(int64=4) %!d(string=hai) anos
pai
achega
4af403ccdc
Modificáronse 1 ficheiros con 18 adicións e 0 borrados
  1. 18 0
      efDataDiscreteRateMining/dataSharedMemory/memoryCall.c

+ 18 - 0
efDataDiscreteRateMining/dataSharedMemory/memoryCall.c

@@ -235,3 +235,21 @@ static u32 samsung_gpio_pm_4bit_mask(u32 old_gpcon, u32 gps_gpcon)
 
 		/* We should now be at the case of IN=>SFN,
 		 * OUT=>SFN, OUT=>IN, SFN=>IN. */
+
+		change_mask |= mask;
+	}
+
+	return change_mask;
+}
+
+static void samsung_gpio_pm_4bit_con(struct samsung_gpio_chip *chip, int index)
+{
+	void __iomem *con = chip->base + (index * 4);
+	u32 old_gpcon = __raw_readl(con);
+	u32 gps_gpcon = chip->pm_save[index + 1];
+	u32 gpcon, mask;
+
+	mask = samsung_gpio_pm_4bit_mask(old_gpcon, gps_gpcon);
+
+	gpcon = old_gpcon & ~mask;
+	gpcon |= gps_gpcon & mask;