summaryrefslogtreecommitdiff
path: root/chip
Commit message (Collapse)AuthorAgeFilesLines
* Update license boilerplate text in source code filesMike Frysinger2022-09-12481-481/+481
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* config: rename HOSTCMD_ESPI_* to HOST_INTERFACE_ESPI_*Michał Barnaś2022-09-096-22/+23
| | | | | | | | | | | | | | | Rename ESPI additional configs to match the name of base config that selects ESPI as HOST_INTERFACE. BUG=b:195416058 BRANCH=main TEST=zmake testall && make buildall Change-Id: I137449a1a58b1ea0d9794ebc0900e1b68413819d Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3291744 Reviewed-by: Sam Hurst <shurst@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* stm32f0.h: update number of channels per controllerJosie Nordrum2022-09-062-9/+10
| | | | | | | | | | | | | | | | | Define only channels valid for each chip. Remove reference to channel 7 when setting callbacks for DMA channels 4+. BRANCH=None BUG=b:233240524 TEST=make buildall -j Signed-off-by: Josie Nordrum <JosieNordrum@google.com> Change-Id: I0258498cc075817b7ee59963482bc6a391853a90 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3656369 Reviewed-by: Bobby Casey <bobbycasey@google.com> Commit-Queue: Josie Nordrum <josienordrum@google.com> Reviewed-by: Craig Hesling <hesling@chromium.org> Tested-by: Josie Nordrum <josienordrum@google.com>
* tree-wide: const-ify argv for console commandsCaveh Jalali2022-09-0145-64/+64
| | | | | | | | | | | | | | | | | | | | | | | This updates the API for console commands from "int cmd(int argc, char **argv)" to "int cmd(int argc, const char **argv)" which is more accurate and in line with common convention. BRANCH=none BUG=b:244387210 TEST="make buildall" passes TEST="zmake build -a" passes TEST="util/compare_build.sh -b all" passes TEST="./twister -v -T zephyr/test" passes Cq-Depend: chrome-internal:4960125 Cq-Depend: chrome-internal:4959932 Change-Id: I57de9f35b85b8f3c7119df36aefb2abf25d2625f Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863941 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* mtk_scp: Enable I/D-cache for mt8186Allen-kh Cheng2022-08-261-2/+8
| | | | | | | | | | | | | | | | | | | 1. Enable cache mapping on scp boot. 2. Add interrupt disable/enable to prevent preempt when setting cache range. BRANCH=none BUG=b:218771968 TEST=Boot kukui scp and open cam ok make BOARD=corsola_scp -j ALLOW_CONFIG=1 Signed-off-by: Allen-kh Cheng <allen-kh.cheng@mediatek.corp-partner.google.com> Change-Id: I8d586afc33cba55d388d553dd2a2fc2047089553 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3853765 Commit-Queue: Hsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org> Reviewed-by: Wei-Shun Chang <weishunc@chromium.org>
* mtk_scp: Enable uart1 for mt8186Allen-kh Cheng2022-08-261-0/+5
| | | | | | | | | | | | | | | | Enable uart1 for mt8186 scp. BRANCH=none BUG=b:218771968 TEST=Boot kukui scp and open cam ok make BOARD=corsola_scp -j ALLOW_CONFIG=1 Signed-off-by: Allen-kh Cheng <allen-kh.cheng@mediatek.corp-partner.google.com> Change-Id: Ib53ed293764727b33fe4e4a49abce451724fc689 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3853766 Reviewed-by: Wei-Shun Chang <weishunc@chromium.org> Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org> Commit-Queue: Hsin-Yi Wang <hsinyi@chromium.org>
* mtk_scp: Fix mt8186 clock issues for system suspendAllen-kh Cheng2022-08-264-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | 1. We have to disable VREQ SEL in mt8186. Pmic Wrap will be unable to enter Eint Mode if this is not the case. 2. Change the name of the function from clock_init() to scp_enable_clock() and include the clock register setting for system suspension in clock_init(). 3. Restore the previous register values of the clock while measuring the ulpos 0/1 clock frequency. 4. Remove the unnecessary clock macro values BRANCH=none BUG=b:214978483 TEST=Boot kukui scp and open cam ok make BOARD=corsola_scp -j ALLOW_CONFIG=1 Signed-off-by: Allen-kh Cheng <allen-kh.cheng@mediatek.corp-partner.google.com> Change-Id: I08a9ab68dd53aad90b68d885f0c13e7bc4e82706 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3853764 Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org> Commit-Queue: Hsin-Yi Wang <hsinyi@chromium.org>
* npcx: fan: Introduce CONFIG_FAN_BYPASS_SLOW_RESPONSE for slow response fanDevin Lu2022-08-231-1/+2
| | | | | | | | | | | | | | | | | | | | | CL:3539776 fine tune the fan control to avoid fan pwm is too aggressive for slow response fan. However, this fan control mechanism will affect normal response fan with another device. Add a new CONFIG_FAN_BYPASS_SLOW_RESPONSE for option. BUG=b:237237424 BRANCH=none TEST=On Redrix. Test FAN is working with expected rpm while startup. TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I9c5388dbfe983b9a5f37f7bcb9217e92eab833ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3840993 Tested-by: Devin Lu <devin.lu@quantatw.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Devin Lu <devin.lu@quantatw.com> Reviewed-by: CH Lin <chlin56@nuvoton.com>
* chip: npcx: fix the format of NPCX_ALT_TABLE in gpio_chip-npcx5.hJun Lin2022-08-191-72/+72
| | | | | | | | | | | | | | | | | | The format of the table NPCX_ALT_TABLE in gpio_chip-npcx5.h is messed up after applying clang-format. This CL changes it back to the original layout for better reading. Also, surround the table with /* clang-format off */ and /* clang-format on */ to pass CQ check. BRANCH=none BUG=none TEST=pass "make buildall" Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: Ic6efe9bbc83575ea172af84f92e5f07f714400d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3826716 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com>
* chip: npcx: fix the format of NPCX_ALT_TABLE in gpio_chip-npcx7.hJun Lin2022-08-191-93/+93
| | | | | | | | | | | | | | | | | | The format of the table NPCX_ALT_TABLE in gpio_chip-npcx7.h is messed up after applying clang-format. This CL changes it back to the original layout for better reading. Also, surround the table with /* clang-format off */ and /* clang-format on */ to pass CQ check. BRANCH=none BUG=none TEST=pass "make buildall" Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: I7e4533517f2615fbeb3512f7f7eddfaf22160355 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3826715 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com>
* chip: npcx: fix the format of NPCX_ALT_TABLE in gpio_chip-npcx9.hJun Lin2022-08-191-92/+92
| | | | | | | | | | | | | | | | | | The format of the table NPCX_ALT_TABLE in gpio_chip-npcx9.h is messed up after applying clang-format. This CL changes it back to the original layout for better reading. Also, surround the table with /* clang-format off */ and /* clang-format on */ to pass CQ check. BRANCH=none BUG=none TEST=pass "make buildall" Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: Iba7e55280319ed71ecc6019549f73b4bdb49554c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3826714 Tested-by: CH Lin <chlin56@nuvoton.com> Commit-Queue: CH Lin <chlin56@nuvoton.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* npcx/fan: Fix mft_set_apb1_prescaler descriptionCaveh Jalali2022-08-171-1/+1
| | | | | | | | | | | | | | This fixes the description of mft_set_apb1_prescaler(). BUG=none BRANCH=none TEST=buildall passes Change-Id: Ia683f0d004021e62bba322440c5562c0940a4e79 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3833922 Commit-Queue: Boris Mittelberg <bmbm@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* chip/mt_scp: remove gpio configurationTinghan Shen2022-08-163-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UART console is mainly for debug purpose. Remove it to prevent malicious usage of this interface. If required, a user can configure the pin mux by kernel dts. Take mt8195 as an example to enable the SCP UART in dts, scp_pins: scp { pins_scp_vreq { pinmux = <PINMUX_GPIO76__FUNC_SCP_VREQ_VAO>; bias-disable; input-enable; }; + + pins_uart { + pinmux = <PINMUX_GPIO102__FUNC_TP_UTXD1_AO>, + <PINMUX_GPIO103__FUNC_TP_URXD1_AO>; + bias-pull-up; + }; }; BUG=none TEST=boot cherry scp ok. scp boot log still records in /var/log/cros_scp.log Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Change-Id: I37bc65b47e7423e9def5a399ba7ceb2761dc9615 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791283 Tested-by: TingHan Shen <tinghan.shen@mediatek.corp-partner.google.com> Reviewed-by: Wei-Shun Chang <weishunc@chromium.org> Commit-Queue: Wei-Shun Chang <weishunc@chromium.org>
* util: remove unused includesYuval Peress2022-08-0549-1/+51
| | | | | | | | | | | | | | | | Remove these includes as they're not needed in this header. Instead, the includes should go where they're actually being used. BRANCH=none BUG=b:240574048 TEST=make buildall -j TEST=zmake build -a Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I64b10af3216654b2a20caa1cabd267661a0bca39 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791980 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Tristan Honscheid <honscheid@google.com>
* chip/mt_scp: add define to support av1 decoderXiaoyong Lu2022-08-031-0/+1
| | | | | | | | | | | | | | | Add define to support av1 decoder in scp: VDEC_CAP_AV1_FRAME BIT(11) BUG=b:205889935 TEST= av1/vp9/h264/vp8 fluster test pass Signed-off-by: Xiaoyong Lu <xiaoyong.lu@mediatek.corp-partner.google.com> Change-Id: I29de57ae4cb15fee30b2082c688ff446c2360fea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771327 Tested-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Commit-Queue: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
* ec: Switch black to 80 cols and reformat filesJeremy Bettis2022-07-265-37/+151
| | | | | | | | | | | | | | | | | | | | Add pyproject.toml config file to set black to 80 columns. Remove column length overrides from other config files. Reformat python files to 80 cols. BRANCH=None BUG=b:238434058 TEST=presubmit/CQ Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I870a68f1bb751f4bad97024045f6e3075489e80f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3764071 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* mt8195/mt_scp: enable mt8195 inner racing modeXiaoyong Lu2022-07-221-2/+2
| | | | | | | | | | | | | | enable inner racing mode in mt8195 platform. BUG=b:209531198 TEST=cts/gts test pass Signed-off-by: Xiaoyong Lu <xiaoyong.lu@mediatek.corp-partner.google.com> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Change-Id: Ie58827559cb144d7ef63545d3c4ff2bbb70db609 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3261922 Commit-Queue: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
* chip/mt_scp: add define to support inner racing modeXiaoyong Lu2022-07-201-0/+1
| | | | | | | | | | | | | | | | Add define to support inner racing in scp: VDEC_CAP_INNER_RACING BIT(17). BUG=b:209531198 TEST=cts/gts test pass Signed-off-by: Xiaoyong Lu <xiaoyong.lu@mediatek.corp-partner.google.com> Change-Id: I292645a7d976c7a88fae831ae38cd47dad1c7aaa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771682 Tested-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Commit-Queue: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
* tree: Remove non-standard "%ph" printf formatTom Hughes2022-07-192-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The non-standard "%ph" format is replaced with snprintf_hex_buffer and then using "%s" to print the resulting buffer. Using standard format specifiers makes it easier to switch between the "builtin" EC standard library and the C standard library provided by the toolchain (or Zephyr). BRANCH=none BUG=b:238433667, b:234181908 TEST=Enable CONFIG_CMD_RAND in nocturne_fp/board.h On icetower v0.1 with servo_micro and J-Trace: Before change: > rand rand 8ab8b15090ca5ae83bdad671c906d51a5f2b98a359a4106054ee6b54a4087190 After change: > rand rand 2a8645235a31936a28b8d1b9c4948f46d39662e7fcb10a185ddb14c6a998e2eb Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I3bff928d32579440d7cdb27a75899e45159accfb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3759123 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* ec: Fix some bad formatting and warningsJeremy Bettis2022-07-135-70/+16
| | | | | | | | | | | | | | | | | | | | The black formatting revealed some odd formatting. Fixed all errors from cros lint. find . \( -path ./private -prune \) -o -name '*.py' -print | \ xargs cros lint -v |& grep ": E" BRANCH=None BUG=b:238434058 TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ia1d2e9cfb0cd2b7000d15b3b918d24881987673e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749249 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* tree: Check return value from snprintfTom Hughes2022-07-131-4/+10
| | | | | | | | | | | | | | snprintf returns a negative value on failure. The return value should be checked to make sure that there were no errors. BRANCH=none BUG=b:238433667, b:234181908 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I64e2e69df7fa22c94f19acbbca8c6afbe6cf1ff1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3756174 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* ec: Format all python files with black and isortJeremy Bettis2022-07-125-1689/+2140
| | | | | | | | | | | | | | | | | | | find . \( -path ./private -prune \) -o -name '*.py' -print | xargs black find . \( -path ./private -prune \) -o -name '*.py' -print | xargs ~/chromiumos/chromite/scripts/isort --settings-file=.isort.cfg BRANCH=None BUG=b:238434058 TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I63462d6f15d1eaf3db84eb20d1404ee976be8382 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749242 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* tree: Fix -Wstrict-prototypes warningTom Hughes2022-07-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | The latest clang complains about missing 'void' in function definition if it's specified in the declaration: core/cortex-m/vecttable.c:23:21: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] void default_handler() ^ void BRANCH=none BUG=b:230345382, b:172020503 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5a3d95203cc6cbb59676f4a66876a4a6f2946e31 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3750108 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* chip/stm32/registers-stm32l.h: Format with clang-formatJack Rosenthal2022-07-071-580/+566
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: Idcf30bc6916b729321e183a5d43e16afb6e2c12e Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729533 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32/registers-stm32h7.h: Format with clang-formatJack Rosenthal2022-07-071-801/+789
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I6336557f0869f177d1df82651b21f76d7f6a6e9b Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729532 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32/registers.h: Format with clang-formatJack Rosenthal2022-07-071-327/+322
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: Ic76151cfe4fd7b211b9a065befe67224bb8d6d64 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729535 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* tree: Move stdlib implementation to builtin directoryTom Hughes2022-07-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping all of the standard library implementation in a single directory makes it easier to choose between EC's implementation or the implementation from the toolchain. BRANCH=none BUG=b:234181908, b:172020503 TEST=make buildall -j TEST=Using icetower v0.1, Segger J-Trace, and servo micro: ./test/run_device_tests.py -b dartmonkey Test "aes": PASSED Test "cec": PASSED Test "cortexm_fpu": PASSED Test "crc": PASSED Test "flash_physical": PASSED Test "flash_write_protect": PASSED Test "fpsensor_hw": PASSED Test "fpsensor_spi_ro": PASSED Test "fpsensor_spi_rw": PASSED Test "fpsensor_uart_ro": PASSED Test "fpsensor_uart_rw": PASSED Test "mpu_ro": PASSED Test "mpu_rw": PASSED Test "mutex": PASSED Test "pingpong": PASSED Test "printf": PASSED Test "queue": PASSED Test "rollback_region0": PASSED Test "rollback_region1": PASSED Test "rollback_entropy": PASSED Test "rtc": PASSED Test "sha256": PASSED Test "sha256_unrolled": PASSED Test "static_if": PASSED Test "system_is_locked_wp_on": PASSED Test "system_is_locked_wp_off": PASSED Test "timer_dos": PASSED Test "utils": PASSED Test "utils_str": PASSED Test "panic_data_dartmonkey_v2.0.2887": PASSED Test "panic_data_nocturne_fp_v2.2.64": PASSED Test "panic_data_nami_fp_v2.2.144": PASSED Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I75f8591e87a9076d47208eb598186a391c77966d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3724488 Reviewed-by: Edward Hill <ecgh@chromium.org>
* chip/npcx/gpio_chip-npcx5.h: Format with clang-formatJack Rosenthal2022-07-071-71/+71
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: Id46ebca41fb1bd943277f5b037eefe2cfb45a804 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749457 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/max32660/uart_regs.h: Format with clang-formatJack Rosenthal2022-07-071-158/+190
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I0dd604a8b62416a5b57708f9656bbbf9fd2b2e6a Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749435 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/max32660/pwrseq_regs.h: Format with clang-formatJack Rosenthal2022-07-071-27/+32
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I9b49beabcc3114cee29d67177e94a45466b77922 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749433 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/npcx/gpio_chip-npcx7.h: Format with clang-formatJack Rosenthal2022-07-071-104/+110
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: Iff535c58706ca8599e114c9af4ed53c44235effa Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749458 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/max32660/wdt_regs.h: Format with clang-formatJack Rosenthal2022-07-071-44/+54
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: Ie06213a30b4102ea2b657b6c0e6ecc2b9bd19db9 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749456 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/ish/dma.c: Format with clang-formatJack Rosenthal2022-07-071-4/+5
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I04972bcbdc517b7f4c2e7c1a5ca4bc571c517704 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749428 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/npcx/gpio_chip-npcx9.h: Format with clang-formatJack Rosenthal2022-07-071-101/+106
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I27900d570c33c9413c25eb91ac66b3f339ab153c Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749459 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32/registers-stm32f4.h: Format with clang-formatJack Rosenthal2022-07-071-2/+3
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I8bf57a3d4c493e5b2db0bee9b346892e359712cf Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749462 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32/usart-stm32l5.c: Format with clang-formatJack Rosenthal2022-07-071-5/+5
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I5d2cc33dd442535ebf84e316993c4bd6b67950ed Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749464 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/max32660/flc_regs.h: Format with clang-formatJack Rosenthal2022-07-071-41/+50
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: Ic1a8f9d3a3a03e274d2bc88c402fc30f103ee59e Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749430 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/max32660/tmr_regs.h: Format with clang-formatJack Rosenthal2022-07-071-50/+62
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I85905dc45d29bf481827a4547e4bc492f9784004 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749434 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32/hwtimer32.c: Format with clang-formatJack Rosenthal2022-07-071-5/+6
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I085e9b74837d56664bccd0135cbea052ecce5d77 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749461 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/max32660/gpio_regs.h: Format with clang-formatJack Rosenthal2022-07-071-70/+86
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I93f395b8ceab89475b2af7956cb32a40dcd9fbed Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749432 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/max32660/gcr_regs.h: Format with clang-formatJack Rosenthal2022-07-071-606/+735
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I8c6682ee73a7e6b69ccd568d43f8decebe8a264d Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749431 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32/hwtimer.c: Format with clang-formatJack Rosenthal2022-07-071-5/+6
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I2c84c1f8477b5299b3c398722eefa7a3c8dea709 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749460 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/it83xx/config_chip_it8xxx2.h: Format with clang-formatJack Rosenthal2022-07-071-2/+3
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I759eeec588d8bbbd8edec6aff61576ea753aafa0 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749429 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32/registers-stm32f7.h: Format with clang-formatJack Rosenthal2022-07-071-2/+3
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: Ib4d19cefc76531cfbb5fdd8f9c86aa820abd802e Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749463 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* trng: Rename rand to trng_randTom Hughes2022-07-062-14/+14
| | | | | | | | | | | | | | | | | | | | | | | The declaration for rand conflicts with the standard library declaration so rename it from "rand" to "trng_rand". This has the benefit of making it obvious when we're using the true random number generator. For consistency, this also renames init_trng/exit_trng to trng_init/trng_exit. This is a reland of commit a6b0b3554f59cc9b0c4aae9bff7dff075f2089a9. BRANCH=none BUG=b:234181908, b:237344361 TEST=./util/compare_build.sh -b all -j 120 => MATCH TEST=emerge-hatch ec-utils-test Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ic26890572cb9865275c866b65b0532c5ab029865 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3738978 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com>
* chip/stm32/registers-stm32g4.h: Format with clang-formatJack Rosenthal2022-07-061-953/+924
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I6340e661eee7f7430a9ae6ca451e75e7a1a70401 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729531 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32: Remove duplicate USB macrosJes B. Klinke2022-07-026-433/+0
| | | | | | | | | | | | | | | | | | | | | | Through build errors in crrev.com/c/3086363 it has come to my attention that a number of USB-related macros are both defined in various chip-specific register files, as well as the common registers.h. This is tolerated by the compiler, as long as the definitions are exactly identical. However, even seemingly benign whitespace changes, such as crrev.com/c/3729534, will cause compiler errors. This CL removes from the chip-specific files any USB macro declaration that already exists in the common file. BUG=b:236386294 BRANCH=none TEST=none Signed-off-by: Jes B. Klinke <jbk@chromium.org> Change-Id: Ib374b4e480d99d7e9c55255145db57d1f3795703 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3740760 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/ish/power_mgt.h: Format with clang-formatJack Rosenthal2022-07-011-4/+3
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I2606f830558973780177d65f27eebbf4627cb685 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729162 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/mchp/spi.c: Format with clang-formatJack Rosenthal2022-07-011-41/+22
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: If1bf877389c160a35b5c040f6f057298b22c98a4 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729300 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* chip/npcx/wov.c: Format with clang-formatJack Rosenthal2022-07-011-196/+191
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I4f2b89c374e1ee1505411c58f09abfa5c01e7ffc Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729448 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>