Add support for Qualcomm TSCSS hardware#656
Conversation
| CONFIG_MSM_MMCC_8996=m | ||
| CONFIG_MSM_GCC_8998=y | ||
| CONFIG_MSM_MMCC_8998=m | ||
| CONFIG_PTP_QCOM_CLOCK_TSC=y |
There was a problem hiding this comment.
move it to arch/arm64/configs/qcom.config and shouldn't it be "=m" ?
| # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) | ||
| %YAML 1.2 | ||
| --- | ||
| $id: http://devicetree.org/schemas/ptp/qcom,ptp-tsc.yaml# |
There was a problem hiding this comment.
your file name is Documentation/devicetree/bindings/ptp/qcom,tsc.yaml
| type: boolean | ||
|
|
||
| qcom,etu-slice: | ||
| $ref: /schemas/types.yaml#/definitions/uint8-array |
There was a problem hiding this comment.
check API used for reading in driver.
| considered as the slice number for ETU offset calculation. | ||
|
|
||
| qcom,etu-event-sel: | ||
| $ref: /schemas/types.yaml#/definitions/uint8-array |
| - compatible | ||
| - reg | ||
| - clocks | ||
| - clock-names |
There was a problem hiding this comment.
shouldn't interrupt-names also be required.
There was a problem hiding this comment.
Added interrupts also to the required list.
| writel_relaxed(regval, timer->baseaddr + TSCSS_TSC_DRIFT_CORRECT_DURATION); | ||
|
|
||
| /* Update the INCR VAL */ | ||
| writel_relaxed(incval, timer->baseaddr + TSCSS_TSC_DRIFT_CORRECT_INCR_VAL); |
There was a problem hiding this comment.
you may end up using uninitialized incval .
|
|
||
| do { | ||
| regval = readl_relaxed(timer->baseaddr + TSCSS_TSC_DRIFT_CORRECT_CMD); | ||
| } while (regval & BIT(1)); |
There was a problem hiding this comment.
this busy loop doesn't look right. please use readl_poll_timeout.
| if (timer->ptp_clock) { | ||
| ptp_clock_unregister(timer->ptp_clock); | ||
| timer->ptp_clock = NULL; | ||
| } |
There was a problem hiding this comment.
what about clk prepare calls that were made during probe ?
|
|
||
| static irqreturn_t qcom_etu_irq_handler(int irq, void *data) | ||
| { | ||
| struct qcom_etu_slice *etu = (struct qcom_etu_slice *)data; |
There was a problem hiding this comment.
are you not passing timer * in handler regiration ?
There was a problem hiding this comment.
Dropped this logic, as it not applicable here.
| tsc@1c80000 { | ||
| compatible = "qcom,tsc"; | ||
| reg = <0x0 0x01c80000 0x0 0x2000>, | ||
| <0x0 0x01c90000 0x0 0x10000>; |
Qualcomm TSCSS is a time synchronization subsystem composed of two main blocks: the Time Stamp Counter (TSC) and the Event Timestamp Unit (ETU). The TSC block is a timestamp generator that maintains a running counter used for system timekeeping. The ETU block captures timestamps for external events using one of the available timestamp sources. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
Add support for the Qualcomm TSCSS hardware, that is a time synchronization subsystem composed of two main blocks: the Time Stamp Counter (TSC) and the Event Timestamp Unit (ETU). Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
Add support to enable the Time Stamp Counter (TSC) and the Event Timestamp Unit (ETU) driver on Lemans EVK platform. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
Add support to enable the TSC node on Lemans platform. Signed-off-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
bbc9a56 to
6f2e58c
Compare
|
Merge Check Failed: CR Not Eligible for Merge CR 4560651 is not eligible for merge. The parent software image for kernel.qli.2.0 is not development complete. Entity: Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations. |
This series adds support for the Qualcomm TSCSS hardware on Lemans platform.
CRs-Fixed: 4560651