⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gpb-shadow.patch

📁 Uboot常用的移植patches, 方便定制移植到s3c2440
💻 PATCH
字号:
GTA02v5 pulls the GPBn lines controlling the LEDs down too strongly.Thus bit operations on GPB always contain a 0 in these bits. Withthe addition of a shadow register, this problem is avoided.- WernerIndex: u-boot/board/neo1973/gta02/gta02.c===================================================================--- u-boot.orig/board/neo1973/gta02/gta02.c+++ u-boot/board/neo1973/gta02/gta02.c@@ -75,6 +75,8 @@  */ int gta02_revision; +static uint16_t gpb_shadow = 0; /* to work around GTA02v5 LED bug */+ int gta02_get_pcb_revision(void);  static inline void delay (unsigned long loops)@@ -452,6 +454,7 @@ #else 		gpio->GPBDAT &= ~(1 << 3);	/* GPB3 */ #endif+	gpio->GPBDAT |= gpb_shadow; }  void neo1973_gsm(int on)@@ -571,10 +574,14 @@ 	if (led > 2) 		return; -	if (on)-		gpio->GPBDAT |= (1 << led);-	else-		gpio->GPBDAT &= ~(1 << led);+	if (on) {+		gpb_shadow |= (1 << led);+		gpio->GPBDAT |= gpb_shadow;+	}+	else {+		gpb_shadow &= ~(1 << led);+		gpio->GPBDAT = (gpio->GPBDAT | gpb_shadow) & ~(1 << led);+	} }  /**

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -