lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 02 Jul 2014 18:57:46 +0800
From:	Jianqun <xjq@...k-chips.com>
To:	Huang Tao <huangtao@...k-chips.com>,
	Mark Brown <broonie@...nel.org>
CC:	heiko@...ech.de, lgirdwood@...il.com, perex@...ex.cz,
	tiwai@...e.de, grant.likely@...aro.org, robh+dt@...nel.org,
	linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
	devicetree@...r.kernel.org, zhangqing@...k-chips.com,
	hj@...k-chips.com, kever.yang@...k-chips.com, zyw@...k-chips.com,
	yzq@...k-chips.com, zhenfu.fang@...k-chips.com, cf@...k-chips.com,
	kfx@...k-chips.com
Subject: Re: [PATCH 2/2] ASoC: add driver for Rockchip RK3xxx I2S controller

Hi Mark:

Since regmap_update_bits is int style, I have to error check every time after call it.
Also I find that the tegra_i2s.c call the function without error checking,

Could you tell me the right way to handle the regmap_update_bits ?


Best Regards

On 2014年07月02日 09:01, Huang Tao wrote:
> Hi, Mark:
> 
> 于 2014年07月02日 01:07, Mark Brown 写道:
>>> +static inline void i2s_writel(struct rk_i2s_dev *i2s, u32 value,
>>>> +			      unsigned int offset)
>>>> +{
>>>> +	writel_relaxed(value, i2s->regs + offset);
>>>> +}
>>>> +
>>>> +static inline u32 i2s_readl(struct rk_i2s_dev *i2s, unsigned int offset)
>>>> +{
>>>> +	return readl_relaxed(i2s->regs + offset);
>>>> +}
>> Perhaps use regmap?  The main advantage would be the debug
>> infrastructure, though you could also use _update_bits() to reduce the
>> amount of time spent locked.
>>
> Are you sure? This is a I2S driver, we can write the register directly,
> do not through I2C or SPI bus.
> Write a register is only a few instructions on ARM, but write through
> regmap, it may take a long path.
> I think it will just consume CPU power and make the whole thing more
> complex.
> Could you tell me what benefits we can get if use regmap? Or something I
> just missing?
> 
> 
> 

-- 
-------------
许 剑 群 Jay
Rockchip Electronics Co.Ltd
****************************************************************************
*IMPORTANT NOTICE:*This email is from Fuzhou Rockchip Electronics Co.,
Ltd .The contents of this email and any attachments may contain
information that is privileged, confidential and/or exempt from
disclosure under applicable law and relevant NDA. If you are not the
intended recipient, you are hereby notified that any disclosure,
copying, distribution, or use of the information is STRICTLY PROHIBITED.
Please immediately contact the sender as soon as possible and destroy
the material in its entirety in any format. Thank you.
****************************************************************************

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ