[Feature][ZXW-311] set mmc0 as normal gpio & use files gen from srcipt

Only Configure :No
Affected branch: master
Affected module: uboot/ap
Is it affected on both ZXIC and MTK:only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: Id5ac9963b238cedd9d059b69639dbeb35f6df03b
diff --git a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/lynq_ap_nv_cfg.c b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/lynq_ap_nv_cfg.c
index 7fae817..4689865 100755
--- a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/lynq_ap_nv_cfg.c
+++ b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/lynq_ap_nv_cfg.c
@@ -175,7 +175,7 @@
         printk("enter use local default values\n");

         ret = (struct nv_cfg_info *)kzalloc(sizeof (struct nv_cfg_info), GFP_KERNEL);

         memset(ret, 0, sizeof(struct nv_cfg_info));

-        ret->mmc0_enable = 1;

+        ret->mmc0_enable = 0;

         ret->mmc1_enable = 1;

     }

 

diff --git a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/lynq_default_nv_cfg.h b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/lynq_default_nv_cfg.h
index 85ebb80..f2d267d 100755
--- a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/lynq_default_nv_cfg.h
+++ b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/lynq_default_nv_cfg.h
@@ -1,18 +1,16 @@
 #ifndef LYNQ_DEFAULT_NV_CFG_H

 #define LYNQ_DEFAULT_NV_CFG_H

 

-static const char lynq_default_nv_cfg_value1[] = {

-    '\x55', '\xaa', '\x0b', '\x00', '\xff', '\xff', '\xff', '\xff', '\x00', '\xaa', '\x55', '\x0b', '\x00', '\x05', '\x10', '\x0c', '\x03'

-};

-

 static const char lynq_default_nv_cfg_value[] = {

-    '\x55', '\xaa', '\x09', '\x00', '\xc0', '\x80', '\x80', '\x00', '\xaa', '\x55', '\x09', '\x00', '\x05', '\x10', '\x0c', '\x03'

+    '\x55', '\xaa', '\x09', '\x00', '\x40', '\x80', '\x00', '\x00', '\xaa', '\x55', '\x09', '\x00', '\x01', '\x00', '\x14', '\x28'

 };

 

 static const char lynq_nv_cfg_bitmap[] = {

-    '\xC0', '\x80', '\x80', '\x80'

+    '\xc0', '\x80', '\x80', '\x80'

 };

 

 static int lynq_default_soft_version = 1;

 

+static int lynq_default_hard_version = 0;

+

 #endif // LYNQ_DEFAULT_NV_CFG_H

diff --git a/ap/os/linux/linux-3.4.x/include/lynq/lynq_ap_nv_cfg.h b/ap/os/linux/linux-3.4.x/include/lynq/lynq_ap_nv_cfg.h
index e13fb05..9eda420 100755
--- a/ap/os/linux/linux-3.4.x/include/lynq/lynq_ap_nv_cfg.h
+++ b/ap/os/linux/linux-3.4.x/include/lynq/lynq_ap_nv_cfg.h
@@ -8,7 +8,8 @@
     unsigned short valid_flag:1;

     unsigned short content_len:15;

 };

-struct nv_cfg_info{

+struct nv_cfg_info

+{

     unsigned char reserved_0:6;

     unsigned char mmc1_enable:1;

     unsigned char mmc0_enable:1;

@@ -18,9 +19,11 @@
     unsigned char rndis_mac_convert:1;

     unsigned char reserved_3:7;

     unsigned char rndis_ip_map:1;

+

 };

 

-struct version_info{

+struct version_info

+{

     unsigned short soft_ver:12;

     unsigned short hard_ver:4;

     unsigned short crc;

@@ -38,24 +41,26 @@
 

 extern struct nv_cfg_info *get_ap_nv_cfg_info();

 

-static inline int get_mmc0_enable() {

+static inline unsigned char get_mmc0_enable() {

     return get_ap_nv_cfg_info()->mmc0_enable;

 }

 

-static inline int get_mmc1_enable() {

+static inline unsigned char get_mmc1_enable() {

     return get_ap_nv_cfg_info()->mmc1_enable;

 }

 

-static inline int get_wifi_enable() {

+static inline unsigned char get_wifi_enable() {

     return get_ap_nv_cfg_info()->wifi_enable;

 }

 

-static inline int get_rndis_mac_convert() {

+static inline unsigned char get_rndis_mac_convert() {

     return get_ap_nv_cfg_info()->rndis_mac_convert;

 }

 

-static inline int get_rndis_ip_map() {

+static inline unsigned char get_rndis_ip_map() {

     return get_ap_nv_cfg_info()->rndis_ip_map;

 }

 

+

+

 #endif // LYNQ_AP_NV_CFG_H

diff --git a/boot/common/src/uboot/drivers/peripheral/lynq_uboot_nv_cfg.h b/boot/common/src/uboot/drivers/peripheral/lynq_uboot_nv_cfg.h
index d2f0da9..20e98c2 100755
--- a/boot/common/src/uboot/drivers/peripheral/lynq_uboot_nv_cfg.h
+++ b/boot/common/src/uboot/drivers/peripheral/lynq_uboot_nv_cfg.h
@@ -1,60 +1,60 @@
-#ifndef __LYNQ_UBOOT_NV_CFG__H__
-#define __LYNQ_UBOOT_NV_CFG__H__
-
-#define RAS_BIT_LEN 1024
-#define RSA_BYTE_LEN (RAS_BIT_LEN / 8)
-#define RSA_U32_LEN (RSA_BYTE_LEN / sizeof(u32))
-#define LYNQ_NV_CFG_SIGN_LEN RSA_BYTE_LEN
-#define LYNQ_NV_CFG_PUBLICKEY_LEN (RSA_BYTE_LEN + sizeof(u32))
-
-#pragma pack(1)
-
-struct lynq_nv_cfg_header
-{
-    unsigned short magic_flag;
-    unsigned short valid_flag:1;
-    unsigned short content_len:15;
-};
-struct lynq_nv_cfg
-{
-    struct lynq_nv_cfg_header head;
-    unsigned char content[4];
-    struct lynq_nv_cfg_header tail;
-    unsigned int lynq_reserved[1];
-};
-#pragma pack()
-
-static const char lynq_nv_cfg_version[] = "T106_CN_20240617";
-static const char lynq_nv_cfg_value[] = {
-   '\x55', '\xaa', '\x09', '\x00', '\xc0', '\x00', '\x00', '\x00', '\xaa', '\x55', '\x09', '\x00', '\x01', '\x00', '\x3c', '\x00'
-};
-
-static const char lynq_nv_cfg_bitmap[] = {
-    '\xC0', '\x80', '\x80', '\x80'
-};
-static const char oem_nv_cfg_bitmap[] = {
-    '\x40', '\x80', '\x80', '\x80'
-};
-static const char lynq_nv_cfg_publickey[] = {
-    '\x92', '\x95', '\xf0', '\xc7', '\x36', '\x68', '\xad', '\xd0', '\x0f', '\xdb', '\x5c', '\xfd', '\x58', '\xf0', '\xc0', '\xa0',
-    '\x0b', '\x89', '\x6b', '\xa0', '\x05', '\x93', '\xa9', '\xb3', '\x54', '\x0f', '\x68', '\x24', '\x3e', '\x2d', '\xfd', '\x02',
-    '\x05', '\xf7', '\xe7', '\x48', '\xad', '\x39', '\x13', '\x6f', '\x71', '\xef', '\x6e', '\xcf', '\xc6', '\xcf', '\x5f', '\xc9',
-    '\x24', '\xa2', '\xd8', '\x2d', '\x17', '\xd6', '\x2b', '\x96', '\x7b', '\x48', '\x98', '\x12', '\xd5', '\x28', '\x4c', '\x72',
-    '\xcd', '\x34', '\xd5', '\xdb', '\x89', '\x87', '\x34', '\xe2', '\xab', '\x29', '\xe4', '\x56', '\x40', '\xe5', '\x92', '\x76',
-    '\xa5', '\xee', '\xb4', '\xbc', '\x37', '\x93', '\xb7', '\xe4', '\x30', '\x4d', '\x92', '\x7b', '\x2c', '\x11', '\x94', '\xd9',
-    '\x8b', '\xe8', '\x0d', '\x96', '\xed', '\x64', '\xd1', '\x0a', '\x7d', '\x4a', '\xd8', '\x1b', '\xf5', '\x0f', '\x4c', '\xfb',
-    '\x07', '\xde', '\xfa', '\xf9', '\xae', '\x42', '\x68', '\x6d', '\xe9', '\xe4', '\x58', '\x80', '\xdb', '\x0b', '\x84', '\xab',
-    '\x01', '\x00', '\x01', '\x00'
-};
-static const char lynq_nv_cfg_sign[] = {
-    '\xef', '\x87', '\xd6', '\x86', '\xea', '\xe6', '\x7f', '\xbd', '\x01', '\x57', '\xe4', '\x94', '\xfa', '\x86', '\xcd', '\xdb',
-    '\x75', '\xe2', '\xc0', '\x94', '\xe0', '\x3f', '\x30', '\x90', '\x9d', '\x24', '\x6e', '\x29', '\x8f', '\x90', '\x52', '\x86',
-    '\x19', '\xfc', '\x83', '\x7f', '\x1d', '\x9f', '\x32', '\x4b', '\xb9', '\x01', '\x5d', '\xb3', '\xf3', '\xcd', '\x30', '\xc5',
-    '\xf6', '\x2f', '\xc5', '\x68', '\x7e', '\x87', '\xae', '\xf2', '\x70', '\x54', '\xff', '\xe6', '\x60', '\xcb', '\xfe', '\xec',
-    '\x68', '\xaa', '\x01', '\x49', '\xd2', '\x93', '\x7b', '\x6e', '\x31', '\x0f', '\x91', '\xad', '\xdf', '\x81', '\x62', '\x04',
-    '\x36', '\x21', '\x22', '\xb6', '\x79', '\xfd', '\x61', '\xcf', '\x3a', '\xb9', '\x40', '\xba', '\x7c', '\xdf', '\x6e', '\xba',
-    '\x1e', '\xc2', '\x27', '\xb9', '\x49', '\x35', '\xd6', '\x5d', '\xc9', '\xe5', '\xed', '\x27', '\xa4', '\x70', '\x59', '\x41',
-    '\x4c', '\x84', '\x72', '\x7a', '\x06', '\xc7', '\x16', '\xcb', '\x56', '\x6a', '\x39', '\xeb', '\x0f', '\xa9', '\x59', '\xcc'
-};
-
-#endif
+#ifndef __LYNQ_UBOOT_NV_CFG__H__

+#define __LYNQ_UBOOT_NV_CFG__H__

+

+#define RAS_BIT_LEN 1024

+#define RSA_BYTE_LEN (RAS_BIT_LEN / 8)

+#define RSA_U32_LEN (RSA_BYTE_LEN / sizeof(u32))

+#define LYNQ_NV_CFG_SIGN_LEN RSA_BYTE_LEN

+#define LYNQ_NV_CFG_PUBLICKEY_LEN (RSA_BYTE_LEN + sizeof(u32))

+

+#pragma pack(1)

+

+struct lynq_nv_cfg_header

+{

+    unsigned short magic_flag;

+    unsigned short valid_flag:1;

+    unsigned short content_len:15;

+};

+struct lynq_nv_cfg

+{

+    struct lynq_nv_cfg_header head;

+    unsigned char content[4];

+    struct lynq_nv_cfg_header tail;

+    unsigned int lynq_reserved[1];

+};

+#pragma pack()

+

+static const char lynq_nv_cfg_version[] = "T106_CN_20240627";

+static const char lynq_nv_cfg_value[] = {

+    '\x55', '\xaa', '\x09', '\x00', '\x40', '\x00', '\x00', '\x00', '\xaa', '\x55', '\x09', '\x00', '\x01', '\x00', '\x15', '\xc0'

+};

+

+static const char lynq_nv_cfg_bitmap[] = {

+    '\xc0', '\x80', '\x80', '\x80'

+};

+static const char oem_nv_cfg_bitmap[] = {

+    '\x80', '\x80', '\x80', '\x80'

+};

+static const char lynq_nv_cfg_publickey[] = {

+    '\xe7', '\x09', '\xa3', '\x94', '\x19', '\x39', '\x46', '\x55', '\x59', '\x0f', '\x1b', '\x81', '\xa3', '\x61', '\x45', '\x3b', 

+    '\x74', '\x07', '\x9a', '\x21', '\x4a', '\xb3', '\x63', '\x1b', '\x96', '\x32', '\xf8', '\xbb', '\xc2', '\x4e', '\xf1', '\xa6', 

+    '\x0c', '\x77', '\x43', '\xe0', '\x45', '\x15', '\xb2', '\x1c', '\x2d', '\xf1', '\xf9', '\x22', '\xdb', '\xbc', '\xfb', '\x5c', 

+    '\xef', '\x3d', '\x4b', '\xc3', '\x91', '\xfa', '\x1f', '\xe8', '\x36', '\xc9', '\xd8', '\xcf', '\x79', '\xf3', '\xe8', '\xbe', 

+    '\x30', '\x7e', '\x11', '\x8b', '\x7f', '\xc9', '\x22', '\xfb', '\x3c', '\x77', '\x7a', '\xa2', '\xd8', '\x23', '\x60', '\xc5', 

+    '\x79', '\x97', '\xbf', '\x8d', '\x21', '\xee', '\x87', '\xd3', '\xdf', '\x2c', '\xc3', '\x34', '\xd8', '\xa2', '\x3d', '\xca', 

+    '\x40', '\xf3', '\x83', '\x23', '\x28', '\x82', '\xb3', '\x67', '\xf8', '\x34', '\xdd', '\x9c', '\x40', '\x35', '\x61', '\x85', 

+    '\x89', '\xae', '\xc2', '\x26', '\xfb', '\xbd', '\x77', '\xe6', '\xfe', '\x81', '\x39', '\xc3', '\xd1', '\x7b', '\xe0', '\x39', 

+    '\x01', '\x00', '\x01', '\x00'

+};

+static const char lynq_nv_cfg_sign[] = {

+    '\x79', '\xc0', '\x04', '\x03', '\xb3', '\x6b', '\x18', '\x12', '\x1d', '\x09', '\xf7', '\x7f', '\xb0', '\x56', '\x86', '\x9c', 

+    '\x26', '\x21', '\x75', '\xbd', '\x0e', '\x93', '\xe1', '\x3d', '\xae', '\x35', '\x68', '\x6f', '\xfc', '\x0a', '\x0a', '\x40', 

+    '\x48', '\x40', '\xf3', '\x95', '\x7c', '\x26', '\xb8', '\xd7', '\xc3', '\xd0', '\xc9', '\x99', '\x35', '\x0f', '\x0f', '\x36', 

+    '\x77', '\xe4', '\x98', '\x41', '\x25', '\xa1', '\xff', '\xbd', '\x4c', '\xad', '\x41', '\xe3', '\x9c', '\x73', '\x92', '\x66', 

+    '\xaa', '\xad', '\x3e', '\x17', '\x78', '\xaa', '\x86', '\x78', '\x61', '\x56', '\x63', '\x2a', '\xa4', '\xc0', '\x49', '\x28', 

+    '\x25', '\x3a', '\xb5', '\x53', '\x23', '\xe4', '\x2c', '\x79', '\x69', '\x6a', '\x45', '\x86', '\xbc', '\x5c', '\x08', '\x57', 

+    '\xa4', '\xc6', '\x7f', '\xf5', '\x0e', '\x32', '\xf5', '\x46', '\x9a', '\xa1', '\xef', '\x07', '\xc3', '\x5d', '\x09', '\x75', 

+    '\xc0', '\x87', '\x8d', '\x1d', '\x0d', '\x0a', '\x07', '\xca', '\xb2', '\xb8', '\xe8', '\x75', '\x9d', '\x37', '\xcf', '\xeb'

+};

+

+#endif