jffs2 and 32 bit data access problem
Dach Miroslaw
miroslaw.dach at psi.ch
Wed Mar 12 04:23:00 EDT 2008
Hi All,
I have had some problems mounting jffs2 file system on my NOR Flash (Intel TE28F640) (it is part of Avnet evaluation board with Virtex-4 Xilinx chip). NOR Flash is connected to the bus in a way that I can access data in 1 or 2 bytes mode. When I try to get 4 bytes (ie. an integer value) I get only first two bytes. I went through the jffs2 code in the linux kernel 2.6.23 and it seems to be that some structures have fields which refer to 'int' values:
include/linux/jffs2.h :
typedef struct {
uint32_t v32;
} __attribute__((packed)) jint32_t;
struct jffs2_unknown_node
{
/* All start like this */
jint16_t magic;
jint16_t nodetype;
jint32_t totlen; /* So we can skip over nodes we don't grok */
jint32_t hdr_crc;
};
Is there some work around (in software) to get 4 bytes (jint32_t type) - one implicit readout of the Flash memory which refers to 2 explicit readouts (of two bytes each) of Flash.
Best Regards
Miroslaw Dach
More information about the linux-mtd
mailing list