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]
Message-ID: <54817A9A.8000809@realsil.com.cn>
Date:	Fri, 5 Dec 2014 09:27:54 +0000
From:	敬锐 <micky_ching@...lsil.com.cn>
To:	"sameo@...ux.intel.com" <sameo@...ux.intel.com>,
	"lee.jones@...aro.org" <lee.jones@...aro.org>,
	"chris@...ntf.net" <chris@...ntf.net>,
	"ulf.hansson@...aro.org" <ulf.hansson@...aro.org>
CC:	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"dan.carpenter@...cle.com" <dan.carpenter@...cle.com>,
	"rogerable@...ltek.com" <rogerable@...ltek.com>,
	王炜 <wei_wang@...lsil.com.cn>
Subject: Re: [PATCH v4 1/6] mfd: rtsx: add func to split u32 into register

Hi Lee,

this patch can be applied if you think it is ok, it doesn't depends 
other patches.

regards.
micky.
On 12/05/2014 01:54 PM, micky_ching@...lsil.com.cn wrote:
> From: Micky Ching <micky_ching@...lsil.com.cn>
>
> Add helper function to write u32 to registers, if we want to put u32
> value to 4 continuous register, this can help us reduce tedious work.
>
> Signed-off-by: Micky Ching <micky_ching@...lsil.com.cn>
> Acked-by: Lee Jones <lee.jones@...aro.org>
> ---
>   include/linux/mfd/rtsx_pci.h | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
> index 74346d5..9234449 100644
> --- a/include/linux/mfd/rtsx_pci.h
> +++ b/include/linux/mfd/rtsx_pci.h
> @@ -558,6 +558,7 @@
>   #define SD_SAMPLE_POINT_CTL		0xFDA7
>   #define SD_PUSH_POINT_CTL		0xFDA8
>   #define SD_CMD0				0xFDA9
> +#define   SD_CMD_START			0x40
>   #define SD_CMD1				0xFDAA
>   #define SD_CMD2				0xFDAB
>   #define SD_CMD3				0xFDAC
> @@ -967,4 +968,12 @@ static inline u8 *rtsx_pci_get_cmd_data(struct rtsx_pcr *pcr)
>   	return (u8 *)(pcr->host_cmds_ptr);
>   }
>   
> +static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val)
> +{
> +	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg,     0xFF, val >> 24);
> +	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val >> 16);
> +	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val >> 8);
> +	rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val);
> +}
> +
>   #endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ