Commit Graph

27 Commits

Author SHA1 Message Date
yiting.deng 381cd0095a rtc: fix coverity error [1/1]
PD#SWPL-238192

Problem:
fix rtc coverity error

Solution:
fix it

Verify:
bm201

Change-Id: I4eaf81c6e4766b379b7e6ff1c372ab7d8c9c9c97
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2025-11-07 03:29:11 -07:00
yiting.deng 03b97b46a5 vrtc: optimize vrtc driver [2/2]
PD#SWPL-195087

Problem:
integrate rtc and vrtc, optimize rtc driver

Solution:
fix it

Verify:
s7, s6, t5m, txhd2, sc2, t7c, a5

Change-Id: I62c3cc23bb848c6ba0e3e44305c725b07ee108f7
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2025-11-03 02:41:58 -07:00
yao zhang1 88ea1e31f2 license: Fix amlogic drivers license. [1/1]
PD#SWPL-217731

Problem:
Fix amlogic license.

Solution:
Fix amlogic license.

Verify:
all chip

Change-Id: I36cc711e44a201ec944c6b0b54c0d21ab671b068
Signed-off-by: yao zhang1 <yao.zhang1@amlogic.com>
2025-09-25 03:48:58 -07:00
Wanwei Jiang 0ebbe91209 build: supports direct compilation using tools/bazel [1/4]
PD#SWPL-211590

Problem:
supports direct compilation using tools/bazel

Solution:
1. Default is the trunk's kernel, and can also be configured to
use the project kernel.
2. Default is the trunk's build.config.project, and can also be configured to
use the project's build.config.project.
3. Default is the trunk's Kconfig.ext_modules, and can also be configured to
use the project's Kconfig.ext_modules.
4. Default is the trunk's project.bzl, and can also be configured to
use the project's project.bzl. For other drivers' BUILD.bazel,
currently the corresponding GKI_CONFIG is automatically selected
based on the project. Other members are not distinguished at present.
5. Package all variables in project.bzl into a struct called project_configs,
which facilitates accessing the corresponding variables on a per-project basis.
6. Remove the DDK dependency check mechanism. However,
since it is protected by the configuration of the config, the impact is
not significant.
7. Change kernel_build to kernel_select in ddk_module.
8. support build command:
tools/bazel run --config=adt4 //project/sei/adt4:adt4_dist
./mk.sh --package adt4
9. Optimize the Bazel configure settings.
10. Optimize the copying of ko sources.
11. Optimize the copying of ko sources with debugging symbols.
12. Optimize the paths of some temporary files, so that the files are located
in the out directory instead of the /tmp directory.

Verify:
local

Test:
PB

Change-Id: I38f631215a41156910ae378c34c92de5a255309f
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2025-05-12 18:25:48 -07:00
Lei Zhang 19e38d5fb9 preempt_rt: bringup preempt rt kernel [9/9]
PD#SWPL-201692

Problem:
meson_rtc_handler be processed in irq context, spinlock in subsequent call
of meson_rtc_handler cannot be used, due to spinlock is sleeping lock in
preempt rt kernel

Solution:
threaded rtc interrupt

Verify:
on A5

Change-Id: I81ebed52d5b111c553f55fff5f2dd6c440e94adc
Signed-off-by: Lei Zhang <lei.zhang@amlogic.com>
2025-04-23 01:14:52 -07:00
yiting.deng e3ce6d7016 rtc: pmic rtc buidlroot failed [1/1]
PD#SWPL-208692

Problem:
buildroot compile rtc related error

Solution:
fix it

Verify:
buildroot compile pass

Change-Id: Ifd7a2a0c89a56b4a3104fb5da4a02da0838e32cf
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2025-04-16 23:10:11 -07:00
qinglin.li 9294f0bbf9 scripts: use kernel build ddk_module_headers [1/1]
PD#SWPL-208157

Problem:
use kernel build ddk_module_headers

Solution:
use kernel build ddk_module_headers

Verify:
local

Test:
local

Change-Id: I68cb33366c826fcd58fdb0a040229011ea669064
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2025-04-15 04:35:40 -07:00
yiting.deng 645ecb5c43 rtc: fix code specification [1/1]
PD#SWPL-208692

Problem:
fix rtc code specification

Solution:
fix rtc code specification

Verify:
s7

Change-Id: I35762083a6f0d59f721fd373c9af462f77a7f877
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2025-04-06 21:02:50 -08:00
Dezhen Wang 054039b58e scripts: add Kconfig and Makefile to common kernel source [1/1]
PD#SWPL-206164

Problem:
ddk_module cannot find Kconfig and Makefile in sub package

Solution:
add Kconfig and Makefile srcs to common kernel srcs

Verify:
local

Test:
local

Change-Id: I3e71b7e1ddea15e9d32efc0e6cb7e8e81b95b793
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
2025-03-26 02:30:24 -08:00
Wanwei Jiang 22a093e819 ddk: optimize ddk build [1/1]
PD#SWPL-195997

Problem:
optimize ddk build

Solution:
optimize ddk build

Verify:
sc2

Test:
PB

Change-Id: I662f1e2a33ae0e5bdae97a70deb624964c5e1c5a
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2025-03-03 22:25:19 -08:00
Wanwei Jiang cadab66c37 build: support ddk [1/1]
PD#SWPL-195997

Problem:
the drivers in the common_drivers directory can be built using DDK
with gki_20 mode, it is also compatible with the original build.

Solution:
add BUILD.bazel and modify build script

Verify:
sc2

Test:
PB

Change-Id: Ie138e63f4eec8715d976d421dc8a431bcfadd859
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2025-02-25 07:17:36 -08:00
yiting.deng 4b5a486dfa vrtc: fix read alarm warning in probe [1/1]
PD#SWPL-192783

Problem:
insmod rtc will reads alarm and converts it to standard time.
UBSAN detects that the alarm is converted to the standard time and
a data overflow warning is generated

Solution:
fix code

Verify:
sc2

Change-Id: Ia9aacddfa97d15e2019d927cc54747fee539675b
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-11-17 19:54:19 -08:00
shufei.zhao 3afb9d9fec build: fix error for smarthome build [1/1]
PD#SWPL-189048

Problem:
support smarthome build for k6.12

Solution:
fix error

Verify:
A1

Test:
A1

Change-Id: I0b3450388e458c090a944ab220329bb4f1ecea55
Signed-off-by: shufei.zhao <shufei.zhao@amlogic.com>
2024-11-08 04:05:33 -08:00
yiting.deng 498ae84d6f rtc: fix k6.12 rtc coverity [1/1]
PD#SWPL-190826

Problem:
rtc driver uses an uninitialized variable, causing
a coverity error

Solution:
fix coverity

Verify:
coverity check

Change-Id: I81f02c1a76c8e3e09f3778e4f6aed33d196a5546
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-11-03 22:51:46 -07:00
yiting.deng f611885934 vrtc: optimize k6.6 vrtc driver [1/1]
PD#SWPL-175744

Problem:
optimize kernel6.6 vrtc driver when using timerfd
and ioctl

Solution:
fix it

Verify:
sc2

Change-Id: Icdd567e7692b9bb5b06f6db3a55531b02a6037cf
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2024-07-09 04:02:54 -07:00
yiting.deng f1b6d97729 rtc: a4 and a5 rtc bringup [1/1]
PD#SWPL-149396

Problem:
a4 and a5 rtc bringup

Solution:
a4 and a5 rtc bringup

Verify:
a4_ba400
a5_av400

Change-Id: I6b12773cffcbee522d4c8d0152fea1df5ad1f497
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2023-12-22 02:19:26 -07:00
Wanwei Jiang 43461aec82 kernel6.6: bring up [1/1]
PD#SWPL-145682

Problem:
bring up kernel6.6

Solution:
1. porting kernel6.6
2. compatible with different kernel versions
3. bring up kernel6.6

Verify:
sc2 c2 a4 a5

Test:
None

Change-Id: Ie22af0abc8ea96261e8a8cc7804b58565aedd904
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2023-12-14 16:55:55 +08:00
yiting.deng 2f38c9bed1 vrtc: k5.15 echo 0 cmd no clear alarm [1/1]
PD#SWPL-141475

Problem:
set alarm  A second, then clear alarm using echo 0 cmd,
suspend or poweroff will delay A second resume/boot

Solution:
add code clear driver store alarm  para after set alarm

Verify:
t5d, t3, sc2, s4

Change-Id: Iee848ab5949edcb3b6e92027ae4410124d38fcec
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2023-10-15 22:08:44 -07:00
Shunzhou Jiang 855b70c393 mbox: mbox driver refactoring [1/2]
PD#SWPL-87115

Problem:
mbox driver refactoring

Solution:
mbox driver refactoring

Verify:
t7/t7c/t5m/sc2/s4/s4d/a1/c2/s5/t3x/t5w/g12b/sm1/txhd2

Change-Id: Ia3e5f9ff2b6de16a082e7f028fcc36dc4268856a
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
2023-08-08 02:57:29 -07:00
yiting.deng 6c45ce9f6a vrtc: timer delayed be deleted in kernel5.15 [1/1]
PD#SWPL-118972

Problem:
kernel5.15 cannot set the next alarm immediately after resume,
setting a new alarm will be delayed for about the time of the
previous alarm.

Solution:
fix the time of calling the callback function of timer in vrtc.

Verify:
SC2_S905X4_AH212
t3_t985d4
t5m_ay309

Change-Id: I8e1be13c5f64279a2698e43643fa8a06eb6220d9
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2023-04-17 02:23:17 -07:00
chengbing.wu 29655631ae pmic: a1 k5.15 pmic and sub driver porting [1/1]
PD#SWPL-112358

Problem:
ad403 is missing pmic6b driver in kernel5.15.

Solution:
base Yu Tu 76117 and 78726;
base Jian yi 189702 and 192916,216774;
and yao jie 216898;

Verify:
A113L-AD401 #1 +Battery.
all driver use ko;

Change-Id: I911ca92dbe6f8c0f623e32fd14bdcf23a6318861
Signed-off-by: chengbing wu <chengbing.wu@amlogic.com>
2023-04-16 22:32:09 -07:00
yiting.deng db1c24f16e rtc typo: fix rtc typo issue [1/1]
PD#SWPL-103797

Problem:
rtc driver has typo issue

Solution:
fix typo issue

Verify:
t3

Change-Id: I3d5baf773b7f6f04443c62c744fe130853128c3f
Signed-off-by: yiting.deng <yiting.deng@amlogic.com>
2022-12-22 01:28:35 -08:00
qinglin.li 3b89c7e128 rtc: combine rtc modules [1/1]
PD#SWPL-95684

Problem:
combine rtc modules

Solution:
result: amlogic-rtc.ko
original: amlogic-rtc.ko amlogic-rtc-virtual.ko

Verify:
Detail info

Change-Id: I85e4dd86296447665c04f1ab56639e45fa67143e
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
2022-11-05 12:07:24 +08:00
pengzhao.liu c2a22ec002 typo: fix typo issue [1/1]
PD#SWPL-89627

Problem:
typo check issue

Solution:
fix typo issue

Verify:
Typo

Change-Id: I388cdac5f7d1e4448225c13aa91bb5d641e5d146
Signed-off-by: pengzhao.liu <pengzhao.liu@amlogic.com>
2022-09-20 22:15:28 -07:00
Yao Jie b1f12219b1 rtc: add meson rtc driver [1/1]
PD#SWPL-83844

Problem:
Need add meson rtc driver

Solution:
Add meson rtc driver

Verify:
C3-AW419

Change-Id: I970d6603ec50c573e5973bf60e9b256492c0a568
Signed-off-by: Yao Jie <jie.yao@amlogic.com>
2022-07-01 02:53:44 -07:00
qinglin.li 7c6316bebd printk : printk optimization [2/2]
PD#SWPL-70486

Problem:
use common tag in driver when printf

Solution:
set common pr_fmt in driver

Verify:
s4d

Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
Change-Id: Ieee271d289e4d2f81258875d36288046b996a5d2
2022-02-14 19:55:32 -07:00
wanwei.jiang 25f402ad4a rtc: porting rtc driver [1/1]
PD#SWPL-69667

Problem:
porting rtc driver

Solution:
1. porting rtc driver
2. function interface change
   rtc_tm_to_time()->rtc_tm_to_time64()
   rtc_register_device()->devm_rtc_register_device()

Verify:
s4d

Change-Id: I60e229b712a9e4e7cd7652c149f9673b7bf31a6e
Signed-off-by: wanwei.jiang <wanwei.jiang@amlogic.com>
2022-01-11 14:53:59 +08:00