[U-Boot] [PATCH] jffs2: some fixes to summary support
Ilya Yanok
yanok at emcraft.com
Thu Aug 20 13:48:56 CEST 2009
Hi Mike,
Mike Frysinger wrote:
>> +#ifdef CONFIG_JFFS2_SUMMARY
>> +static u32 sum_get_unaligned32(u32 *ptr)
>> +{
>> + u32 val;
>> + u8 *p = (u8 *)ptr;
>> +
>> + val = *p | (*(p + 1) << 8) | (*(p + 2) << 16) | (*(p + 3) << 24);
>> +
>> + return __le32_to_cpu(val);
>> +}
>> +
>> +static u16 sum_get_unaligned16(u16 *ptr)
>> +{
>> + u16 val;
>> + u8 *p = (u8 *)ptr;
>> +
>> + val = *p | (*(p + 1) << 8);
>> +
>> + return __le16_to_cpu(val);
>> +}
>>
>
> do get_unaligned_le16 and such not work ?
>
Nope. They do only some typecasting and resulting code still uses word
(halfword) access instructions.
Regards, Ilya.
More information about the U-Boot
mailing list