On Thu, 27 Nov 2014, micky_ch...@realsil.com.cn wrote:
> From: Micky Ching
>
> 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
> ---
> include/linux/mfd/rtsx_pci.h | 15
Oh. You're right. I'm sorry for the noise.
regards,
dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Let's take an example,
cmd.arg = ((ocr & 0xFF8000) != 0) << 8 | test_pattern;
using "TP" name test_pattern for simplication ,
when we call: rtsx_pci_write_be32(pcr, SD_CMD1, cmd->arg);
we should make sure TP write to SD_CMD4.
If on "be" platform, then cpu_to_be32() do nothing,
and TP is write to
On Fri, Nov 28, 2014 at 02:10:36AM +, 敬锐 wrote:
> eg, in sd_ops.c the cmd.arg is constructed bit by bit, we can put the right
> byte to the right register by shift, so the endian check is not need.
I looked at drivers/mmc/core/sd_ops.c and cmd.arg seems to be cpu
endian.
The new function assu
On 11/27/2014 11:23 PM, Dan Carpenter wrote:
>> +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_pc
On Thu, Nov 27, 2014 at 10:53:58AM +0800, micky_ch...@realsil.com.cn wrote:
> +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, v
From: Micky Ching
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
---
include/linux/mfd/rtsx_pci.h | 15 +++
1 file changed, 15 insertions(+)
diff --git a/include/