Yidi Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need unmask it.upstream driver cannot be added due to design differences with othe IC.
Signed-off-by: gtk_pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 38 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/1
diff --git a/src/soc/mediatek/mt8192/Makefile.inc b/src/soc/mediatek/mt8192/Makefile.inc index 7b098e8..d695824 100755 --- a/src/soc/mediatek/mt8192/Makefile.inc +++ b/src/soc/mediatek/mt8192/Makefile.inc @@ -1,5 +1,6 @@ ifeq ($(CONFIG_SOC_MEDIATEK_MT8192),y)
+bootblock-y += eint_event.c bootblock-y += auxadc.c bootblock-y += bootblock.c bootblock-y += flash_controller.c diff --git a/src/soc/mediatek/mt8192/bootblock.c b/src/soc/mediatek/mt8192/bootblock.c index 5bb85ba..dac9a37 100755 --- a/src/soc/mediatek/mt8192/bootblock.c +++ b/src/soc/mediatek/mt8192/bootblock.c @@ -8,6 +8,7 @@ #include <soc/pmif.h> #include <soc/wdt.h> #include <soc/rtc.h> +#include <soc/eint_event.h>
void bootblock_soc_init(void) { @@ -17,5 +18,6 @@ mtk_pmif_init(); mt6359p_init(); mt6315_init(); + unmask_eint_event_mask(); rtc_boot(); } diff --git a/src/soc/mediatek/mt8192/eint_event.c b/src/soc/mediatek/mt8192/eint_event.c new file mode 100644 index 0000000..153763f --- /dev/null +++ b/src/soc/mediatek/mt8192/eint_event.c @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#include <soc/eint_event.h> + +void unmask_eint_event_mask(void) +{ + uint32_t i; + for (i = 0; i < 7; i++) { + write32(&mtk_eint_event->eint_event_mask_clr[i], 0xffffffff); + } + + return; +} + diff --git a/src/soc/mediatek/mt8192/include/soc/eint_event.h b/src/soc/mediatek/mt8192/include/soc/eint_event.h new file mode 100755 index 0000000..b8ee64d --- /dev/null +++ b/src/soc/mediatek/mt8192/include/soc/eint_event.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8192_EINT_EVENT_H +#define SOC_MEDIATEK_MT8192_EINT_EVENT_H +#include <soc/addressmap.h> +#include <device/mmio.h> +#include <types.h> + +/*eint event mask cler register*/ +struct eint_event_reg { + uint32_t eint_event_mask_clr[7]; +}; + +/*eint_base + 0x880 is eint_event_mask_clr register, write 1 + *can clear eint_event_mask. + */ +static struct eint_event_reg *const mtk_eint_event = (void *)(EINT_BASE + 0x880); + +/*unmask eint event, eint can wakeup by spm*/ +void unmask_eint_event_mask(void); + +#endif
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/1/src/soc/mediatek/mt8192/ein... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/1/src/soc/mediatek/mt8192/ein... PS1, Line 7: for (i = 0; i < 7; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/46409/1/src/soc/mediatek/mt8192/ein... PS1, Line 12: } void function return statements are not generally useful
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/2/src/soc/mediatek/mt8192/ein... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/2/src/soc/mediatek/mt8192/ein... PS2, Line 7: for (i = 0; i < 7; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/46409/2/src/soc/mediatek/mt8192/ein... PS2, Line 12: } void function return statements are not generally useful
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/3/src/soc/mediatek/mt8192/ein... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/3/src/soc/mediatek/mt8192/ein... PS3, Line 7: for (i = 0; i < 7; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/46409/3/src/soc/mediatek/mt8192/ein... PS3, Line 12: } void function return statements are not generally useful
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/4/src/soc/mediatek/mt8192/ein... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/4/src/soc/mediatek/mt8192/ein... PS4, Line 7: for (i = 0; i < 7; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/46409/4/src/soc/mediatek/mt8192/ein... PS4, Line 12: } void function return statements are not generally useful
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/5/src/soc/mediatek/mt8192/ein... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/5/src/soc/mediatek/mt8192/ein... PS5, Line 7: for (i = 0; i < 7; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/46409/5/src/soc/mediatek/mt8192/ein... PS5, Line 12: } void function return statements are not generally useful
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 6:
(5 comments)
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@2 PS6, Line 2: gtk_pangao Please use G. Pangao.
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@9 PS6, Line 9: need need to
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@10 PS6, Line 10: it.upstream Please add a space after the dot/period.
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@11 PS6, Line 11: with othe IC. Please elaborate. Do you mean coreboot upstream? What design differences are there?
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@11 PS6, Line 11: othe other
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 6:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/6/src/soc/mediatek/mt8192/ein... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/6/src/soc/mediatek/mt8192/ein... PS6, Line 7: for (i = 0; i < 7; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/46409/6/src/soc/mediatek/mt8192/ein... PS6, Line 12: } void function return statements are not generally useful
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/7/src/soc/mediatek/mt8192/ein... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/7/src/soc/mediatek/mt8192/ein... PS7, Line 7: for (i = 0; i < 7; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/46409/7/src/soc/mediatek/mt8192/ein... PS7, Line 12: } void function return statements are not generally useful
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 8:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/8/src/soc/mediatek/mt8192/ein... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/8/src/soc/mediatek/mt8192/ein... PS8, Line 7: for (i = 0; i < 7; i++) { braces {} are not necessary for single statement blocks
https://review.coreboot.org/c/coreboot/+/46409/8/src/soc/mediatek/mt8192/ein... PS8, Line 12: } void function return statements are not generally useful
Pan Gao has uploaded a new patch set (#9) to the change originally created by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need unmask it.upstream driver cannot be added due to design differences with othe IC.
Signed-off-by: gtk_pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/9
Pan Gao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 9: Code-Review+1
Pan Gao has uploaded a new patch set (#10) to the change originally created by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's do not have this design, we cannot modify the Kernel upstream driver to resolve this issue, So we add a driver here to set the setting
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/10
Pan Gao has uploaded a new patch set (#11) to the change originally created by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's do not have this design, we cannot modify the Kernel upstream driver to resolve this issue, So we add a driver here to set the setting
Signed-off-by: gtk_pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/11
Pan Gao has uploaded a new patch set (#12) to the change originally created by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's do not have this design, we cannot modify the Kernel upstream driver to resolve this issue, So we add a driver here to set the setting.
Signed-off-by: gtk_pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/12
pan gao has uploaded a new patch set (#13) to the change originally created by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/13
pan gao has uploaded a new patch set (#14) to the change originally created by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/14
Pan Gao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 14:
done
Pan Gao has uploaded a new patch set (#15) to the change originally created by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/15
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#16).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need unmask it.upstream driver cannot be added due to design differences with othe IC.
Signed-off-by: gtk_pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 38 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/16
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#17).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 35 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/17
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 25:
(6 comments)
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/Ma... File src/soc/mediatek/mt8192/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/Ma... PS25, Line 3: bootblock-y += eint_event.c in alphabet order
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/bo... File src/soc/mediatek/mt8192/bootblock.c:
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/bo... PS25, Line 11: #include <soc/eint_event.h> in alphabet order
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/eint_event.h:
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... PS25, Line 5: #include <soc/addressmap.h> : #include <device/mmio.h> : #include <types.h> in alphabet order
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... PS25, Line 9: /*eint event mask cler register*/ /* eint event mask cler register */
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... PS25, Line 14: /*eint_base + 0x880 is eint_event_mask_clr register, write 1 : *can clear eint_event_mask. : */ /* eint_base + 0x880 is eint_event_mask_clr register with access type W1C. */
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... PS25, Line 19: /*unmask eint event, eint can wakeup by spm*/ /* unmask eint event, eint can wakeup by spm */
Pan Gao has uploaded a new patch set (#26) to the change originally created by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/26
Pan Gao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 26: Code-Review+1
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#27).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/27
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 27:
(6 comments)
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/Ma... File src/soc/mediatek/mt8192/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/Ma... PS25, Line 3: bootblock-y += eint_event.c
in alphabet order
Done
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/bo... File src/soc/mediatek/mt8192/bootblock.c:
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/bo... PS25, Line 11: #include <soc/eint_event.h>
in alphabet order
Ack
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/eint_event.h:
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... PS25, Line 5: #include <soc/addressmap.h> : #include <device/mmio.h> : #include <types.h>
in alphabet order
Done
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... PS25, Line 9: /*eint event mask cler register*/
/* eint event mask cler register */
Done
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... PS25, Line 14: /*eint_base + 0x880 is eint_event_mask_clr register, write 1 : *can clear eint_event_mask. : */
/* eint_base + 0x880 is eint_event_mask_clr register with access type W1C. […]
Done
https://review.coreboot.org/c/coreboot/+/46409/25/src/soc/mediatek/mt8192/in... PS25, Line 19: /*unmask eint event, eint can wakeup by spm*/
/* unmask eint event, eint can wakeup by spm */
Done
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 27:
(5 comments)
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@2 PS6, Line 2: gtk_pangao
Please use G. Pangao.
Ack
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@9 PS6, Line 9: need
need to
Ack
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@10 PS6, Line 10: it.upstream
Please add a space after the dot/period.
Ack
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@11 PS6, Line 11: othe
other
Ack
https://review.coreboot.org/c/coreboot/+/46409/6//COMMIT_MSG@11 PS6, Line 11: with othe IC.
Please elaborate. […]
Ack
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#35).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/35
Hello Hung-Te Lin, Xi Chen, build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#46).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/46
Hello Hung-Te Lin, Xi Chen, build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#48).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/48
Hello Hung-Te Lin, Xi Chen, build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#53).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register can mask eint wakeup source, so we need to unmask it. Most IC's don't have this design, we can't modify the kernel eint upstream driver to resolve this issue. So we add a driver here to set the setting.
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/53
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 57:
(8 comments)
https://review.coreboot.org/c/coreboot/+/46409/57//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46409/57//COMMIT_MSG@9 PS57, Line 9: can I'm not sure what this means. Maybe "will"? Does the registers mask eint wakeup source by default?
https://review.coreboot.org/c/coreboot/+/46409/57//COMMIT_MSG@10 PS57, Line 10: Most Since most
https://review.coreboot.org/c/coreboot/+/46409/57//COMMIT_MSG@12 PS57, Line 12: set the setting set the registers.
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... PS57, Line 1: /* SPDX-License-Identifier: GPL-2.0-only */ One blank line after header.
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... PS57, Line 6: uint32_t int
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... PS57, Line 7: 7 ARRAY_SIZE(mtk_eint_event->eint_event_mask_clr)
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... PS57, Line 10: Remove extra blank line.
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/eint_event.h:
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/in... PS57, Line 4: #define SOC_MEDIATEK_MT8192_EINT_EVENT_H One blank line after this.
Hello Hung-Te Lin, Xi Chen, build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#58).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register is used to mask eint wakeup source on mt8192. The all wakeup sources are masked by default. Most MediaTek SoCs do not have this design, we can't modify the kernel eint upstream driver to solve the issue 'Can't wake using power button (cros_ec) or touchpad'. So we add a driver here to unmask all wakeup sources.
BUG=b:169024614
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/58
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 58:
(8 comments)
https://review.coreboot.org/c/coreboot/+/46409/57//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46409/57//COMMIT_MSG@9 PS57, Line 9: can
I'm not sure what this means. […]
Please refer to new commit message.
https://review.coreboot.org/c/coreboot/+/46409/57//COMMIT_MSG@10 PS57, Line 10: Most
Since most
Done
https://review.coreboot.org/c/coreboot/+/46409/57//COMMIT_MSG@12 PS57, Line 12: set the setting
set the registers.
Done
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... File src/soc/mediatek/mt8192/eint_event.c:
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... PS57, Line 1: /* SPDX-License-Identifier: GPL-2.0-only */
One blank line after header.
Done
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... PS57, Line 6: uint32_t
int
Done
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... PS57, Line 7: 7
ARRAY_SIZE(mtk_eint_event->eint_event_mask_clr)
Done
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/ei... PS57, Line 10:
Remove extra blank line.
Done
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/in... File src/soc/mediatek/mt8192/include/soc/eint_event.h:
https://review.coreboot.org/c/coreboot/+/46409/57/src/soc/mediatek/mt8192/in... PS57, Line 4: #define SOC_MEDIATEK_MT8192_EINT_EVENT_H
One blank line after this.
Done
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 58:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/58//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46409/58//COMMIT_MSG@10 PS58, Line 10: Most Since most
https://review.coreboot.org/c/coreboot/+/46409/58//COMMIT_MSG@10 PS58, Line 10: The all All
Hello Hung-Te Lin, Xi Chen, build bot (Jenkins), Patrick Georgi, Martin Roth, pan gao, Pan Gao, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46409
to look at the new patch set (#59).
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register is used to mask eint wakeup source on mt8192. All wakeup sources are masked by default. Since most MediaTek SoCs do not have this design, we can't modify the kernel eint upstream driver to solve the issue 'Can't wake using power button (cros_ec) or touchpad'. So we add a driver here to unmask all wakeup sources.
BUG=b:169024614
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/46409/59
Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 59:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46409/58//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46409/58//COMMIT_MSG@10 PS58, Line 10: Most
Since most
Done
https://review.coreboot.org/c/coreboot/+/46409/58//COMMIT_MSG@10 PS58, Line 10: The all
All
Done
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
Patch Set 59: Code-Review+2
Hung-Te Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46409 )
Change subject: soc/mediatek/mt8192: eint: unmask eint event mask register ......................................................................
soc/mediatek/mt8192: eint: unmask eint event mask register
eint event mask register is used to mask eint wakeup source on mt8192. All wakeup sources are masked by default. Since most MediaTek SoCs do not have this design, we can't modify the kernel eint upstream driver to solve the issue 'Can't wake using power button (cros_ec) or touchpad'. So we add a driver here to unmask all wakeup sources.
BUG=b:169024614
Signed-off-by: G.Pangao gtk_pangao@mediatek.com Change-Id: I8ee80bf8302c146e09b74e9f6c6c49f501d7c1c4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46409 Reviewed-by: Yu-Ping Wu yupingso@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/mt8192/Makefile.inc M src/soc/mediatek/mt8192/bootblock.c A src/soc/mediatek/mt8192/eint_event.c A src/soc/mediatek/mt8192/include/soc/eint_event.h 4 files changed, 33 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/soc/mediatek/mt8192/Makefile.inc b/src/soc/mediatek/mt8192/Makefile.inc index dc6548b..ccf571e 100644 --- a/src/soc/mediatek/mt8192/Makefile.inc +++ b/src/soc/mediatek/mt8192/Makefile.inc @@ -2,6 +2,7 @@
bootblock-y += ../common/auxadc.c bootblock-y += bootblock.c +bootblock-y += eint_event.c bootblock-y += flash_controller.c bootblock-y += ../common/gpio.c gpio.c bootblock-y += ../common/i2c.c i2c.c diff --git a/src/soc/mediatek/mt8192/bootblock.c b/src/soc/mediatek/mt8192/bootblock.c index 5295422..1c95d65 100644 --- a/src/soc/mediatek/mt8192/bootblock.c +++ b/src/soc/mediatek/mt8192/bootblock.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <bootblock_common.h> +#include <soc/eint_event.h> #include <soc/mmu_operations.h> #include <soc/mt6315.h> #include <soc/mt6359p.h> @@ -18,4 +19,5 @@ mt6359p_init(); mt6315_init(); rtc_boot(); + unmask_eint_event_mask(); } diff --git a/src/soc/mediatek/mt8192/eint_event.c b/src/soc/mediatek/mt8192/eint_event.c new file mode 100644 index 0000000..b3538a1 --- /dev/null +++ b/src/soc/mediatek/mt8192/eint_event.c @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <soc/eint_event.h> + +void unmask_eint_event_mask(void) +{ + int i; + for (i = 0; i < ARRAY_SIZE(mtk_eint_event->eint_event_mask_clr); i++) + write32(&mtk_eint_event->eint_event_mask_clr[i], 0xffffffff); +} diff --git a/src/soc/mediatek/mt8192/include/soc/eint_event.h b/src/soc/mediatek/mt8192/include/soc/eint_event.h new file mode 100644 index 0000000..05d1fbc --- /dev/null +++ b/src/soc/mediatek/mt8192/include/soc/eint_event.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8192_EINT_EVENT_H +#define SOC_MEDIATEK_MT8192_EINT_EVENT_H + +#include <device/mmio.h> +#include <soc/addressmap.h> + +/* eint event mask cler register */ +struct eint_event_reg { + uint32_t eint_event_mask_clr[7]; +}; + +/* eint_base + 0x880 is eint_event_mask_clr register with access type W1C. */ +static struct eint_event_reg *const mtk_eint_event = (void *)(EINT_BASE + 0x880); + +/* unmask eint event, eint can wakeup by spm */ +void unmask_eint_event_mask(void); + +#endif