Re: [PATCH 1/3] ASoC: Add support for Loongson I2S controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 05, 2023 at 08:09:32PM +0800, YingKun Meng wrote:

> +			regmap_read_poll_timeout_atomic(i2s->regmap,
> +						LS_I2S_CTRL, val,
> +						!(val & I2S_CTRL_MCLK_READY),
> +						10, 2000);

The driver is waiting for status bits to change in the regmap but...

> +		pr_err("buf len not multiply of period len\n");

Use dev_ functions to log things please.

> +static const struct regmap_config loongson_i2s_regmap_config = {
> +	.reg_bits = 32,
> +	.reg_stride = 4,
> +	.val_bits = 32,
> +	.max_register = 0x110,
> +	.cache_type = REGCACHE_FLAT,
> +};

...there are no volatile registers in the regmap so we will never read
from the hardware.  I don't understand how this can work?

> +	i2s->reg_base = pci_iomap(pdev, BAR_NUM, 0);
> +	if (!i2s->reg_base) {
> +		dev_err(&pdev->dev, "pci_iomap_error\n");
> +		ret = -EIO;
> +		goto err_release;
> +	}

pcim_iomap()?

> +	dev_set_name(&pdev->dev, "%s", loongson_i2s_dai.name);

Don't log static information like this, it just adds noise and makes the
boot slower.

> +	pci_disable_device(pdev);

pcim_enable_device() too.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux