Loading drivers/bus/mhi/core/mhi_internal.h +5 −2 Original line number Diff line number Diff line Loading @@ -234,8 +234,11 @@ extern struct bus_type mhi_bus_type; #define SOC_HW_VERSION_MINOR_VER_BMSK (0x000000FF) #define SOC_HW_VERSION_MINOR_VER_SHFT (0) /* convert ticks to micro seconds by dividing by 19.2 */ #define TIME_TICKS_TO_US(x) (div_u64((x) * 10, 192)) /* timesync time calculations */ #define LOCAL_TICKS_TO_US(x) (div_u64((x) * 100ULL, \ div_u64(mhi_cntrl->local_timer_freq, 10000ULL))) #define REMOTE_TICKS_TO_US(x) (div_u64((x) * 100ULL, \ div_u64(mhi_cntrl->remote_timer_freq, 10000ULL))) struct mhi_event_ctxt { u32 reserved : 8; Loading drivers/bus/mhi/core/mhi_main.c +2 −1 Original line number Diff line number Diff line Loading @@ -717,7 +717,8 @@ static ssize_t time_us_show(struct device *dev, } return scnprintf(buf, PAGE_SIZE, "local: %llu remote: %llu (us)\n", TIME_TICKS_TO_US(t_host), TIME_TICKS_TO_US(t_device)); LOCAL_TICKS_TO_US(t_host), REMOTE_TICKS_TO_US(t_device)); } static DEVICE_ATTR_RO(time_us); Loading include/linux/mhi.h +2 −0 Original line number Diff line number Diff line Loading @@ -312,6 +312,8 @@ struct mhi_controller { /* supports time sync feature */ struct mhi_timesync *mhi_tsync; struct mhi_device *tsync_dev; u64 local_timer_freq; u64 remote_timer_freq; /* kernel log level */ enum MHI_DEBUG_LEVEL klog_lvl; Loading Loading
drivers/bus/mhi/core/mhi_internal.h +5 −2 Original line number Diff line number Diff line Loading @@ -234,8 +234,11 @@ extern struct bus_type mhi_bus_type; #define SOC_HW_VERSION_MINOR_VER_BMSK (0x000000FF) #define SOC_HW_VERSION_MINOR_VER_SHFT (0) /* convert ticks to micro seconds by dividing by 19.2 */ #define TIME_TICKS_TO_US(x) (div_u64((x) * 10, 192)) /* timesync time calculations */ #define LOCAL_TICKS_TO_US(x) (div_u64((x) * 100ULL, \ div_u64(mhi_cntrl->local_timer_freq, 10000ULL))) #define REMOTE_TICKS_TO_US(x) (div_u64((x) * 100ULL, \ div_u64(mhi_cntrl->remote_timer_freq, 10000ULL))) struct mhi_event_ctxt { u32 reserved : 8; Loading
drivers/bus/mhi/core/mhi_main.c +2 −1 Original line number Diff line number Diff line Loading @@ -717,7 +717,8 @@ static ssize_t time_us_show(struct device *dev, } return scnprintf(buf, PAGE_SIZE, "local: %llu remote: %llu (us)\n", TIME_TICKS_TO_US(t_host), TIME_TICKS_TO_US(t_device)); LOCAL_TICKS_TO_US(t_host), REMOTE_TICKS_TO_US(t_device)); } static DEVICE_ATTR_RO(time_us); Loading
include/linux/mhi.h +2 −0 Original line number Diff line number Diff line Loading @@ -312,6 +312,8 @@ struct mhi_controller { /* supports time sync feature */ struct mhi_timesync *mhi_tsync; struct mhi_device *tsync_dev; u64 local_timer_freq; u64 remote_timer_freq; /* kernel log level */ enum MHI_DEBUG_LEVEL klog_lvl; Loading