-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new patches to uboot - kbi fix warnings - adc cmd improve
- Loading branch information
Artem Lapkin
committed
Oct 20, 2020
1 parent
0cd1657
commit 2a2c7b5
Showing
5 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...ainline/patches/caad316b3165615f1a4848901811a4a084444c9d/0311-modify_gitignore_list.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 663200efd8281d252176755903d0241190f70e6c Mon Sep 17 00:00:00 2001 | ||
From: Artem Lapkin <[email protected]> | ||
Date: Tue, 20 Oct 2020 18:46:31 +0800 | ||
Subject: [PATCH 1/2] modify_gitignore_list | ||
|
||
--- | ||
.gitignore | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/.gitignore b/.gitignore | ||
index 6bec6b7c..d21ffdd3 100644 | ||
--- a/.gitignore | ||
+++ b/.gitignore | ||
@@ -5,6 +5,9 @@ | ||
# | ||
# Normal rules (sorted alphabetically) | ||
# | ||
+ | ||
+/bl31.c | ||
+ | ||
.* | ||
*.a | ||
*.asn1.[ch] | ||
-- | ||
2.25.1 | ||
|
44 changes: 44 additions & 0 deletions
44
...oot-mainline/patches/caad316b3165615f1a4848901811a4a084444c9d/0312-fix_kbi_warnings.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
From ebbb6a3e8c2c947ef97ec2f0f881330f4bbd5002 Mon Sep 17 00:00:00 2001 | ||
From: Artem Lapkin <[email protected]> | ||
Date: Tue, 20 Oct 2020 18:46:43 +0800 | ||
Subject: [PATCH 2/2] fix_kbi_warnings | ||
|
||
--- | ||
cmd/kbi.c | 8 ++++---- | ||
1 file changed, 4 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/cmd/kbi.c b/cmd/kbi.c | ||
index dead70d5..c59698e3 100644 | ||
--- a/cmd/kbi.c | ||
+++ b/cmd/kbi.c | ||
@@ -360,11 +360,11 @@ static int get_hw_version(void) | ||
#if defined (CONFIG_MESON_GXM) | ||
ret = adc_channel_single_shot("adc@8680", 1, &val); | ||
if (ret) { | ||
- printf("%s adc_channel_single_shot fail! ret=%d\n", __func__, ret); | ||
+ printf("%s adc_channel_single_shot fail! ret=%ud\n", __func__, ret); | ||
return -1; | ||
} | ||
|
||
- debug("%s SARADC: %d\n", __func__, val); | ||
+ debug("%s SARADC: %ud\n", __func__, val); | ||
|
||
if ((val >= HW_VERSION_ADC_VAL_VIM2_V12 - HW_VERSION_ADC_VALUE_TOLERANCE) && (val <= HW_VERSION_ADC_VAL_VIM2_V12 + HW_VERSION_ADC_VALUE_TOLERANCE)) { | ||
hw_ver = HW_VERSION_VIM2_V12; | ||
@@ -376,11 +376,11 @@ static int get_hw_version(void) | ||
#elif defined (CONFIG_MESON_GXL) | ||
ret = adc_channel_single_shot("adc@8680", 1, &val); | ||
if (ret) { | ||
- printf("%s adc_channel_single_shot fail! ret=%d\n", __func__, ret); | ||
+ printf("%s adc_channel_single_shot fail! ret=%ud\n", __func__, ret); | ||
return -1; | ||
} | ||
|
||
- debug("%s SARADC: %d\n", __func__, val); | ||
+ debug("%s SARADC: %ud\n", __func__, val); | ||
|
||
if ((val >= HW_VERSION_ADC_VAL_VIM1_V14 - HW_VERSION_ADC_VALUE_TOLERANCE) && (val <= HW_VERSION_ADC_VAL_VIM1_V14 + HW_VERSION_ADC_VALUE_TOLERANCE)) { | ||
hw_ver = HW_VERSION_VIM1_V14; | ||
-- | ||
2.25.1 | ||
|
25 changes: 25 additions & 0 deletions
25
...ot-mainline/patches/caad316b3165615f1a4848901811a4a084444c9d/0313-kbi_fix_warnings2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From d894fddf160cc46caf489ea33d5c43f5544c9906 Mon Sep 17 00:00:00 2001 | ||
From: Artem Lapkin <[email protected]> | ||
Date: Tue, 20 Oct 2020 18:52:56 +0800 | ||
Subject: [PATCH] kbi_fix_warnings2 | ||
|
||
--- | ||
cmd/kbi.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/cmd/kbi.c b/cmd/kbi.c | ||
index c59698e3..1d97fffd 100644 | ||
--- a/cmd/kbi.c | ||
+++ b/cmd/kbi.c | ||
@@ -991,7 +991,7 @@ static int do_kbi(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) | ||
|
||
#if defined (CONFIG_MESON_GXL) | ||
int hw_ver = 0; | ||
- int val = 0; | ||
+ unsigned int val = 0; | ||
int ret = 0; | ||
|
||
ret = adc_channel_single_shot("adc@8680", 1, &val); | ||
-- | ||
2.25.1 | ||
|
25 changes: 25 additions & 0 deletions
25
...s/u-boot-mainline/patches/caad316b3165615f1a4848901811a4a084444c9d/0621-saradc-test.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 3e85b617fe93ff76aa18ea5fbb7e9b332ad7d261 Mon Sep 17 00:00:00 2001 | ||
From: Artem Lapkin <[email protected]> | ||
Date: Tue, 20 Oct 2020 11:54:45 +0800 | ||
Subject: [PATCH] saradc-test | ||
|
||
--- | ||
drivers/adc/meson-saradc.c | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c | ||
index f7c919d3..b22d7cf4 100644 | ||
--- a/drivers/adc/meson-saradc.c | ||
+++ b/drivers/adc/meson-saradc.c | ||
@@ -709,6 +709,8 @@ static const struct udevice_id meson_saradc_ids[] = { | ||
.data = (ulong)&gxl_saradc_data }, | ||
{ .compatible = "amlogic,meson-gxm-saradc", | ||
.data = (ulong)&gxl_saradc_data }, | ||
+ { .compatible = "amlogic,meson-g12a-saradc", | ||
+ .data = (ulong)&gxl_saradc_data }, | ||
{ } | ||
}; | ||
|
||
-- | ||
2.25.1 | ||
|
40 changes: 40 additions & 0 deletions
40
...boot-mainline/patches/caad316b3165615f1a4848901811a4a084444c9d/0622-cmd_adc_set_env.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From 588d8009a3275f7815d0433053f5999c1070f3da Mon Sep 17 00:00:00 2001 | ||
From: Artem Lapkin <[email protected]> | ||
Date: Tue, 20 Oct 2020 16:59:32 +0800 | ||
Subject: [PATCH] cmd_adc_set_env | ||
|
||
--- | ||
cmd/adc.c | 8 +++++--- | ||
1 file changed, 5 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/cmd/adc.c b/cmd/adc.c | ||
index 381961cf..b53433f4 100644 | ||
--- a/cmd/adc.c | ||
+++ b/cmd/adc.c | ||
@@ -22,7 +22,7 @@ static int do_adc_list(cmd_tbl_t *cmdtp, int flag, int argc, | ||
|
||
do { | ||
printf("- %s\n", dev->name); | ||
- | ||
+ env_set("adc_dev", dev->name); | ||
ret = uclass_next_device(&dev); | ||
if (ret) | ||
return CMD_RET_FAILURE; | ||
@@ -87,10 +87,12 @@ static int do_adc_single(cmd_tbl_t *cmdtp, int flag, int argc, | ||
} | ||
|
||
ret = uclass_get_device_by_name(UCLASS_ADC, argv[1], &dev); | ||
- if (!ret && !adc_raw_to_uV(dev, data, &uV)) | ||
+ if (!ret && !adc_raw_to_uV(dev, data, &uV)) { | ||
printf("%u, %d uV\n", data, uV); | ||
- else | ||
+ } else { | ||
printf("%u\n", data); | ||
+ env_set_hex("adc_value", data); | ||
+ } | ||
|
||
return CMD_RET_SUCCESS; | ||
} | ||
-- | ||
2.25.1 | ||
|