Skip to content

Commit

Permalink
drivers: dai: intel: ssp: Use IS_BIT_SET() macro from utils_macro.h
Browse files Browse the repository at this point in the history
Replace DAI_INTEL_SSP_IS_BIT_SET() macro with IS_BIT_SET() macro from
utils_macro.h.

Signed-off-by: Patryk Duda <patrykd@google.com>
  • Loading branch information
duda-patryk committed Jan 8, 2025
1 parent 0944aa2 commit 41937ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/dai/intel/ssp/ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ static void dai_ssp_program_channel_map(struct dai_intel_ssp *dp,
/* Set upper slot number from configuration */
pcmsycm = pcmsycm | (dp->ssp_plat_data->params.tdm_slots - 1) << 4;

if (DAI_INTEL_SSP_IS_BIT_SET(cfg->link_config, 15)) {
if (IS_BIT_SET(cfg->link_config, 15)) {
uint32_t reg_add = dai_ip_base(dp) + 0x1000 * ssp_index + PCMS0CM_OFFSET;
/* Program HDA output stream parameters */
sys_write16((pcmsycm & 0xffff), reg_add);
Expand All @@ -880,7 +880,7 @@ static void dai_ssp_program_channel_map(struct dai_intel_ssp *dp,
uint16_t pcmsycm = cfg->link_config;
uint8_t slot_count = 0;

if (DAI_INTEL_SSP_IS_BIT_SET(cfg->link_config, 15)) {
if (IS_BIT_SET(cfg->link_config, 15)) {
if (blob30->version == SSP_BLOB_VER_3_0) {
time_slot_map =
blob30->i2s_ssp_config.ssmidytsa[cfg->tdm_slot_group];
Expand Down
1 change: 0 additions & 1 deletion drivers/dai/intel/ssp/ssp.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
(((x) & (1ULL << (b))) >> (b))
#define DAI_INTEL_SSP_GET_BITS(b_hi, b_lo, x) \
(((x) & MASK(b_hi, b_lo)) >> (b_lo))
#define DAI_INTEL_SSP_IS_BIT_SET(reg, bit) (((reg >> bit) & (0x1)) != 0)

/* ssp_freq array constants */
#define DAI_INTEL_SSP_NUM_FREQ 3
Expand Down

0 comments on commit 41937ee

Please sign in to comment.