2009-05-05 18:52:23     BF537,configuration MTD for NAND flash

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-05-05 18:52:23     BF537,configuration MTD for NAND flash

damien OLLIVE (UNITED STATES)

Message: 73716   

 

hi,

 

I have a custom BF537 with 2 memories

 

an SPI (246k) for the uboot

 

a NAND (16M from ST 128W) Fash for the kernel

 

 

 

i use them with success to boot the kernel.

 

 

 

Now i want to access to the Nand from linux.

 

i have tried to configure my MTD but the NAND isn't recognize ;

 

 

bfin-dma: initialized

simple-gpio: now handling 48 GPIOs: 0 - 47

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

brd: module loaded

bfin_mii_bus: probed

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

nand_get_flash_type: second ID read did not match a0,a0 against 17,17

No NAND device found!!!

 

 

my configuration is :

 

--- Memory Technology Device (MTD) support                                   

[*]   Debugging                                                                                     

(3)     Debugging verbosity (0 = quiet, 3 = noisy)                                                    

< >   MTD concatenating support                                                                    

[*]   MTD partitioning support                                                                      

< >     RedBoot partition table parsing                         

 

[*]     Command line partition table parsing            

< >     TI AR7 partitioning support                                                    

*** User Modules And Translation Layers ***                                   

<*>   Direct char device access to MTD devices                                            

  -*-   Common interface to block layer for MTD 'translation layers'                              

<*>   Caching block device access to MTD devices                                                       

< >   FTL (Flash Translation Layer) support                                                                

< >   NFTL (NAND Flash Translation Layer) support                                                       

< >   INFTL (Inverse NAND Flash Translation Layer) support                                                 

< >   Resident Flash Disk (Flash Translation Layer) support                        

< >   NAND SSFDC (SmartMedia) read only translation layer                                 

< >   Log panic/oops to an MTD buffer                                            

  RAM/ROM/Flash chip drivers  --->                                                                       

Mapping drivers for chip access  --->                                                                       

  Self-contained MTD device drivers  --->                                    

<*>   NAND Device Support  --->  

 

        [ ]   Verify NAND page writes                                                                

        [ ]   NAND ECC Smart Media byte order                                                              

        [ ]   Enable chip ids for obsolete ancient NAND devices                                           

        < >   NAND Flash device for BF537 STAMP board (DEPRECATED)                                                         

        < >   DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation)       

        < >   Support for NAND Flash Simulator                                                 

        <*>   Support for generic platform NAND driver  

 

 

 

and in my stamp.c file :

 

#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)

#ifdef CONFIG_MTD_PARTITIONS

const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };

 

static struct mtd_partition bfin_plat_nand_partitions[] = {

    {

        .name   = "linux kernel(nand)",

        .size   = 0xc00000,

        .offset = 0,

    }, {

        .name   = "file system(nand)",

        .size   = MTDPART_SIZ_FULL,

        .offset = MTDPART_OFS_APPEND,

    },

};

#endif

 

#define BFIN_NAND_PLAT_CLE 2

#define BFIN_NAND_PLAT_ALE 1

static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)

{

    struct nand_chip *this = mtd->priv;

 

    if (cmd == NAND_CMD_NONE)

        return;

 

    if (ctrl & NAND_CLE)

        writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE));

    else

        writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE));

}

 

#define BFIN_NAND_PLAT_READY GPIO_PF14

//#define BFIN_NAND_PLAT_READY GPIO_PF3

static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)

{

    return gpio_get_value(BFIN_NAND_PLAT_READY);

}

 

static struct platform_nand_data bfin_plat_nand_data = {

    .chip = {

        .chip_delay = 30,

#ifdef CONFIG_MTD_PARTITIONS

        .part_probe_types = part_probes,

        .partitions = bfin_plat_nand_partitions,

        .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions),

#endif

    },

    .ctrl = {

        .cmd_ctrl  = bfin_plat_nand_cmd_ctrl,

        .dev_ready = bfin_plat_nand_dev_ready,

    },

};

 

#define MAX(x, y) (x > y ? x : y)

static struct resource bfin_plat_nand_resources = {

    .start = 0x20212000,

    .end   = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),

    .flags = IORESOURCE_IO,

};

 

static struct platform_device bfin_async_nand_device = {

    .name = "gen_nand",

    .id = -1,

    .num_resources = 1,

    .resource = &bfin_plat_nand_resources,

    .dev = {

        .platform_data = &bfin_plat_nand_data,

    },

};

 

static void bfin_plat_nand_init(void)

{

    gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat");

}

#else

static void bfin_plat_nand_init(void) {}

#endif

 

 

 

i have selected a driver, defined the partition.

 

I have not really undesterstood what was the mapping driver so maybe my mistake come from it.

 

 

 

Do you know what i miss

 

 

 

Thanks

QuoteReplyEditDelete

 

 

2009-05-05 21:16:29     Re: BF537,configuration MTD for NAND flash

Yi Li (CHINA)

Message: 73721   

 

Not sure why you did not select "<*> Blackfin on-chip NAND Flash Controller driver".

 

-Yi

QuoteReplyEditDelete

 

 

2009-05-06 06:18:40     Re: BF537,configuration MTD for NAND flash

Mike Frysinger (UNITED STATES)

Message: 73747   

 

try adding SSYNC(); to the end of bfin_plat_nand_cmd_ctrl()

 

if that doesnt work, change the async timings related to the bank you have the nand device hooked up to

QuoteReplyEditDelete

 

 

2009-05-06 11:42:40     Re: BF537,configuration MTD for NAND flash

damien OLLIVE (UNITED STATES)

Message: 73774   

 

hello,

 

thanks for the replies

 

 

 

Yi

 

I think this   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:bfin_async_nand

 

tell me to don't use bfin_nand.c which was the Blackfin on-chip NAND Flash Controller driver but use the generic platform NAND driver.

 

I have tried with bfin_nand.c but the chip is not detected like with the generic

 

 

 

Mike

 

I have tried the ssync but without sucess i will search where are the async timing or if you can tell me where they are.

 

 

 

but maibe my problem come from here :

 

I have a problem with the chip select, how the MTD know which one i use?

 

because i haven't any foling edge of ams0 during the boot.

 

I have to write 90h to the ship to return the manufacturer code and the driver looks to send 0x00

 

Do this 2 parameters should be in the stamp.c file?

QuoteReplyEditDelete

 

 

2009-05-06 11:54:47     Re: BF537,configuration MTD for NAND flash

Mike Frysinger (UNITED STATES)

Message: 73776   

 

the documentation you're reading explains how the chip enable is handled.  the MTD layer doesnt know about it because it doesnt handle it, the hardware does.

QuoteReplyEditDelete

 

 

2009-05-07 17:50:32     Re: BF537,configuration MTD for NAND flash

damien OLLIVE (UNITED STATES)

Message: 73840   

 

thanks mike,

 

I can mount the nand now.

 

I think my problem was a wrong start adress of the device.

 

 

 

now i can boot an uimage.initramfs and mount a partition of the nand to access to the file system (rootfs.jffs2)

 

So that works well but

 

 

 

My new problem is when i try to boot a kernel without the filesystem in it : vmImage.

 

The file system looks to be mount but after the kernel panic.

 

...

 

NAND device: Manufacturer ID: 0x20, Chip ID: 0x73 (ST Micro NAND 16MiB 3,3V 8-bit)

scan

Scanning device for bad blocks

RedBoot partition parsing not available

Creating 2 MTD partitions on "gen_nand.0":

0x00000000-0x00200000 : "linux kernel(nand)"

mtd: Giving out device 0 to linux kernel(nand)

0x00200000-0x01000000 : "file system(nand)"

mtd: Giving out device 1 to file system(nand)

 

...

 

Empty flash at 0x005ffe80 ends at 0x005ffe84

Empty flash at 0x005ffea8 ends at 0x005ffeac

Empty flash at 0x005fff58 ends at 0x005fff5c

Empty flash at 0x005fff80 ends at 0x005fff84

JFFS2 warning: (215) jffs2_do_read_inode_internal: Truncating ino #115 to 11844 bytes failed because it only had 8192 bytes to start with!

JFFS2 warning: (215) jffs2_do_read_inode_internal: Truncating ino #150 to 20264 bytes failed because it only had 16384 bytes to start with!

JFFS2 warning: (215) jffs2_do_read_inode_internal: no data nodes found for ino #243

JFFS2 notice: (215) jffs2_do_read_inode_internal: but it has children so we fake some modes for it

JFFS2 warning: (215) jffs2_do_read_inode_internal: Truncating ino #340 to 31916 bytes failed because it only had 28672 bytes to start with!

JFFS2 warning: (215) jffs2_do_read_inode_internal: Truncating ino #352 to 4644 bytes failed because it only had 4096 bytes to start with!

 

VFS: Mounted root (jffs2 filesystem).

Freeing unused kernel memory: 132k freed

NULL pointer access

Deferred Exception context

CURRENT PROCESS:

COMM=init PID=1

CPU = 0

TEXT = 0x001b0000-0x001b2874        DATA = 0x001be874-0x001bec24

BSS = 0x001bec24-0x00380000  USER-STACK = 0x0039fef0

 

return address: [0x001aa02a]; contents of:

0x001aa000:  0982  18d9  0000  0000  5242  a0d0  0981  1808

0x001aa010:  0801  17ed  3251  6c0a  3042  0818  17ea  5c89

0x001aa020:  5e90  a050  5001  9328  0000 [a19a] 326b  0c02

0x001aa030:  6cc5  1c30  a443  0d03  18c7  0000  0000  0000

 

SEQUENCER STATUS:        Not tainted

SEQSTAT: 00060027  IPEND: 0030  SYSCFG: 0006

  EXCAUSE   : 0x27

  interrupts disabled

  physical IVG5 asserted : <0xffa00b34> { _evt_ivhw + 0x0 }

RETE: <0x00000000> { _do_one_initcall + 0xfffff000 }

RETN: <0x03ee4000> /* kernel dynamic memory */

RETX: <0x00000480> /* Maybe fixed code section */

RETS: <0x00000000> { _do_one_initcall + 0xfffff000 }

PC  : <0x001aa02a> { _setup_arch + 0x5de }

DCPLB_FAULT_ADDR: <0x00000018> /* Maybe null pointer? */

ICPLB_FAULT_ADDR: <0x001aa02a> { _setup_arch + 0x5de }

 

PROCESSOR STATE:

R0 : ffffffff    R1 : 00000000    R2 : 00000000    R3 : 00000000

R4 : 00000000    R5 : 00000000    R6 : 00000000    R7 : 00000000

P0 : 0039ffb0    P1 : 0039ff90    P2 : 0039ff91    P3 : 00000000

P4 : 00000000    P5 : 001be874    FP : 00000000    SP : 03ee3f24

LB0: 00000001    LT0: 00000000    LC0: 00000000

LB1: 00000001    LT1: 00000000    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 00000000

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 00000000

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000000

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000

USP : 0039fef0  ASTAT: 00000022

 

Hardware Trace:

   0 Target : <0x00004a88> { _trap_c + 0x0 }

     Source : <0xffa005f2> { _exception_to_level5 + 0x9e } CALL pcrel

   1 Target : <0xffa00554> { _exception_to_level5 + 0x0 }

     Source : <0xffa00426> { _bfin_return_from_exception + 0x6 } RTX

   2 Target : <0xffa00420> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa004ae> { _ex_trap_c + 0x66 } JUMP.S

   3 Target : <0xffa00448> { _ex_trap_c + 0x0 }

     Source : <0xffa0067e> { _trap + 0x2a } JUMP (P4)

   4 Target : <0xffa00654> { _trap + 0x0 }

     Source : <0x001aa028> { _setup_arch + 0x5dc } 0x0000

   5 Target : <0x001aa028> { _setup_arch + 0x5dc }

     Source : <0x001aa1b8> { _setup_arch + 0x76c } JUMP.S

   6 Target : <0x001aa1b4> { _setup_arch + 0x768 }

     Source : <0x001aa002> { _setup_arch + 0x5b6 } IF !CC JUMP

   7 Target : <0x001a9ff0> { _setup_arch + 0x5a4 }

     Source : <0x001aa01c> { _setup_arch + 0x5d0 } IF CC JUMP

   8 Target : <0x001a9160> { _unpack_to_rootfs + 0x328 }

     Source : <0xffa00744> { _kernel_execve + 0xbc } RTI

   9 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  10 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  11 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  12 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  13 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  14 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  15 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

Userspace Stack

Stack info:

SP: [0x0039fef0] <0x0039fef0> [ init + 0x1fef0 ]

Memory from 0x0039fef0 to 003a0000

0039fef0:[00000001] 0039ffd4  00000000  0039ffdf  0039ffe6  00000000  00000010  00000000

0039ff10: 00000006  00001000  00000011  00000064  00000003  001b0034  00000004  00000020

0039ff30: 00000005  00000006  00000007  001a8000  00000008  00000000  00000009  001b1248

0039ff50: 0000000b  00000000  0000000c  00000000  0000000d  00000000  0000000e  00000000

0039ff70: 00000017  00000000  0000001f  0001fff1  00000000  00000000  00000000  00000000

0039ff90: 00020000  001a8000  00000000  000070ec  001b40ec  0000b0ec  0000044c  00000000

0039ffb0: 00020000  001b0000  00000000  00002874  001be874 <00006874> 000003b0  00000000

0039ffd0: 00000000  6962732f  6e692f6e  48007469  3d454d4f  4554002f  6c3d4d52  78756e69

0039fff0: 62732f00  692f6e69  0074696e  00000000  32695c92

Return addresses in stack:

    address : <0x00006874> { _gpio_proc_read + 0x80 }

Kernel panic - not syncing: Attempted to kill init!

 

 

 

my env (uboot)

nandboot=nand read.jffs2 0x1000000 0x0 0x200000;bootm 0x1000000

bootcmd=run nandboot

bootargs=root=/dev/mtdblock1 rw rootfstype=jffs2 rw earlyprintk=serial,uart0,115200

 

 

 

could you help me?

 

thanks

QuoteReplyEditDelete

 

 

2009-05-07 19:46:28     Re: BF537,configuration MTD for NAND flash

Mike Frysinger (UNITED STATES)

Message: 73841   

 

verify you can mount the device manually and can run programs out of the mount before using it as the root device

QuoteReplyEditDelete

 

 

2009-05-08 10:13:32     Re: BF537,configuration MTD for NAND flash

damien OLLIVE (UNITED STATES)

Message: 73888   

 

hello mike,

 

i boot an uImage.initramfs

 

and yes i can mount the device and run programs out of it

 

 

 

root:/> mkdir mnt/nand

root:/> mount -t jffs2 dev/mtdblock1 /mnt/nand/

...

 

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x004dc024: 0x0c9d instead

Further such events for this erase block will not be printed

Empty flash at 0x004dd6f8 ends at 0x004dd800

root:/> JFFS2 warning: (252) jffs2_do_read_inode_internal: Truncating ino #115 to 11844 bytes failed because it only had 8192 bytes to start with!

JFFS2 warning: (252) jffs2_do_read_inode_internal: Truncating ino #150 to 20264 bytes failed because it only had 16384 bytes to start with!

JFFS2 warning: (252) jffs2_do_read_inode_internal: no data nodes found for ino #243

JFFS2 notice: (252) jffs2_do_read_inode_internal: but it has children so we fake some modes for it

JFFS2 notice: (252) check_node_data: wrong data CRC in data node at 0x004dd868: read 0x9bd08a7b, calculated 0x4a31cc0d.

JFFS2 warning: (252) jffs2_do_read_inode_internal: Truncating ino #340 to 31916 bytes failed because it only had 28672 bytes to start with!

JFFS2 warning: (252) jffs2_do_read_inode_internal: Truncating ino #352 to 4644 bytes failed because it only had 4096 bytes to start with!

 

root:/> ls mnt/nand/

bin         ftdi_test1  mnt         sbin        usr

dev         home        proc        sys         var

etc         lib         root        tmp

QuoteReplyEditDelete

 

 

2009-05-08 14:56:14     Re: BF537,configuration MTD for NAND flash

Mike Frysinger (UNITED STATES)

Message: 73898   

 

those warnings probably shouldnt be ignored.  you should reflash the whole thing using a new jffs2 image and the nandwrite util.

QuoteReplyEditDelete

 

 

2009-05-11 16:19:11     Re: BF537,configuration MTD for NAND flash

damien OLLIVE (UNITED STATES)

Message: 73965   

 

hello,

 

I don't understand why i can mount and use the file system partition when i have booted an uImage.initramfs kernel, and when i try to boot an image with this file system, my kernel panic.

 

 

 

i have tried with a clean trunk version kernel to be sure that my change on my kernel don't affect the boot.

 

So i have an bf537-stamp configuration

 

with JFFS2_FS, MTD, MTD_CHAR, MTD_PARTITIONS and MTD_BLOCK

 

MTD_NAND_PLATFORM

 

 

 

and in the stamp.c

 

i have just changed the size, the adress of the NAND and the GPIO ready/busy

 

#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)

#ifdef CONFIG_MTD_PARTITIONS

const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };

 

static struct mtd_partition bfin_plat_nand_partitions[] = {

    {

        .name   = "linux kernel(nand)",

        .size   = 0x400000,

        .offset = 0,

    }, {

        .name   = "file system(nand)",

        .size   = MTDPART_SIZ_FULL,

        .offset = MTDPART_OFS_APPEND,

    },

};

#endif

 

#define BFIN_NAND_PLAT_CLE 2

#define BFIN_NAND_PLAT_ALE 1

static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)

{

    struct nand_chip *this = mtd->priv;

 

    if (cmd == NAND_CMD_NONE)

        return;

 

    if (ctrl & NAND_CLE)

        writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE));

    else

        writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE));

}

 

#define BFIN_NAND_PLAT_READY GPIO_PF14

static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)

{

    return gpio_get_value(BFIN_NAND_PLAT_READY);

}

 

static struct platform_nand_data bfin_plat_nand_data = {

    .chip = {

        .chip_delay = 30,

#ifdef CONFIG_MTD_PARTITIONS

        .part_probe_types = part_probes,

        .partitions = bfin_plat_nand_partitions,

        .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions),

#endif

    },

    .ctrl = {

        .cmd_ctrl  = bfin_plat_nand_cmd_ctrl,

        .dev_ready = bfin_plat_nand_dev_ready,

    },

};

 

#define MAX(x, y) (x > y ? x : y)

static struct resource bfin_plat_nand_resources = {

    .start = 0x20000000,

    .end   = 0x20000000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),

    .flags = IORESOURCE_IO,

};

 

static struct platform_device bfin_async_nand_device = {

    .name = "gen_nand",

    .id = -1,

    .num_resources = 1,

    .resource = &bfin_plat_nand_resources,

    .dev = {

        .platform_data = &bfin_plat_nand_data,

    },

};

 

static void bfin_plat_nand_init(void)

{

    gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat");

}

#else

static void bfin_plat_nand_init(void) {}

#endif

 

 

 

 

 

 

 

With this config, i can mount and use the partition from a kernel boot with his own File System ( uImage.initramfs), but when i whant to boot an image without FS (vmImage)and tell it to take the rootfs.jffs2

 

bootargs=root=/dev/mtdblock1 rw rootfstype=jffs2 rw earlyprintk=serial,uart0,115200 console=ttyBF0,115200

 

 

i get this output

 

Further such events for this erase block will not be printed

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f8000: 0xff7d instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f8004: 0xaef6 instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f8008: 0x7dad instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f800c: 0xaaaf instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f8010: 0xd5eb instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f8014: 0xbefe instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f8018: 0x69b7 instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f801c: 0xbaf9 instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f8020: 0xfd1f instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009f8024: 0xcbfc instead

Further such events for this erase block will not be printed

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc000: 0xff7d instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc004: 0xaef6 instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc008: 0x7daf instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc00c: 0xaaaf instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc010: 0xd5eb instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc014: 0xbefe instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc018: 0x69b7 instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc01c: 0xbafd instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc020: 0xfd1f instead

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x009fc024: 0xcafa instead

Further such events for this erase block will not be printed

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "oss" (ino #310) of dir ino #305 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "blackfin" (ino #317) of dir ino #306 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "codecs" (ino #318) of dir ino #306 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "terminfo" (ino #335) of dir ino #332 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "l" (ino #336) of dir ino #335 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "v" (ino #337) of dir ino #335 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "x" (ino #338) of dir ino #335 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "misc" (ino #346) of dir ino #343 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "boa" (ino #347) of dir ino #344 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "soc" (ino #306) of dir ino #237 appears to be a hard link

JFFS2 error: (1) jffs2_build_inode_pass1: child dir "core" (ino #305) of dir ino #237 appears to be a hard link

JFFS2 warning: (139) jffs2_do_read_inode_internal: Truncating ino #37 to 77536 bytes failed because it only had 73728 bytes to start with!

JFFS2 warning: (139) jffs2_do_read_inode_internal: Truncating ino #62 to 68924 bytes failed because it only had 65536 bytes to start with!

JFFS2 warning: (139) jffs2_do_read_inode_internal: Truncating ino #258 to 24056 bytes failed because it only had 20480 bytes to start with!

JFFS2 warning: (139) jffs2_do_read_inode_internal: Truncating ino #265 to 30968 bytes failed because it only had 28672 bytes to start with!

JFFS2 warning: (139) jffs2_do_read_inode_internal: Truncating ino #329 to 8440 bytes failed because it only had 8192 bytes to start with!

JFFS2 warning: (139) jffs2_do_read_inode_internal: Truncating ino #342 to 7887 bytes failed because it only had 4096 bytes to start with!

VFS: Mounted root (jffs2 filesystem).

Freeing unused kernel memory: 128k freed

dma_alloc_init: dma_page @ 0x001b0000 - 256 pages at 0x03f00000

Illegal use of supervisor resource

- Attempted to use a Supervisor register or instruction from User mode.

   Supervisor resources are registers and instructions that are reserved

   for Supervisor use: Supervisor only registers, all MMRs, and Supervisor

   only instructions.

Deferred Exception context

CURRENT PROCESS:

COMM=init PID=1

CPU = 0

TEXT = 0x00360040-0x00365ae0        DATA = 0x00365b00-0x003668a0

BSS = 0x003668a0-0x00378110  USER-STACK = 0x00379fbc

 

return address: [0x00362a82]; contents of:

0x00362a60:  0000  0000  0000  0000  0000  0000  0000  0000

0x00362a70:  0000  0000  0000  0000  0000  0000  0000  0000

0x00362a80:  0000 [0037] 0000  0060  0000  0000  0000  0000

0x00362a90:  0000  0000  0000  0000  0000  0000  0000  0000

 

SEQUENCER STATUS:        Not tainted

SEQSTAT: 0006002e  IPEND: 0030  SYSCFG: 0006

  EXCAUSE   : 0x2e

  interrupts disabled

  physical IVG5 asserted : <0xffa00b34> { _evt_ivhw + 0x0 }

RETE: <0x00000000> { _do_one_initcall + 0xfffff000 }

RETN: <0x03ee2000> /* kernel dynamic memory */

RETX: <0x00000480> /* Maybe fixed code section */

RETS: <0x0036319a> [ init + 0x315a ]

PC  : <0x00362a82> [ init + 0x2a42 ]

DCPLB_FAULT_ADDR: <0x00379f54> [ init + 0x19f54 ]

ICPLB_FAULT_ADDR: <0x00362a82> [ init + 0x2a42 ]

 

PROCESSOR STATE:

R0 : 00001000    R1 : 00379fc8    R2 : 00379fc0    R3 : 00365ac6

R4 : 00360dc0    R5 : 00000001    R6 : 003780e0    R7 : 00000000

P0 : 00379fc0    P1 : 003780e0    P2 : 00363190    P3 : 00379fc0

P4 : 00000000    P5 : 00365b00    FP : 00379f54    SP : 03ee1f24

LB0: 00000001    LT0: 00000000    LC0: 00000000

LB1: 00000001    LT1: 00000000    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 00000000

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 00000000

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000000

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000

USP : 00379f48  ASTAT: 00001005

 

Hardware Trace:

   0 Target : <0x00004a88> { _trap_c + 0x0 }

     Source : <0xffa005f2> { _exception_to_level5 + 0x9e } CALL pcrel

   1 Target : <0xffa00554> { _exception_to_level5 + 0x0 }

     Source : <0xffa00426> { _bfin_return_from_exception + 0x6 } RTX

   2 Target : <0xffa00420> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa004ae> { _ex_trap_c + 0x66 } JUMP.S

   3 Target : <0xffa00448> { _ex_trap_c + 0x0 }

     Source : <0xffa0067e> { _trap + 0x2a } JUMP (P4)

   4 Target : <0xffa00654> { _trap + 0x0 }

     Source : <0x00362a80> [ init + 0x2a40 ] 0x0000

   5 Target : <0x00362a7c> [ init + 0x2a3c ]

     Source : <0x00363196> [ init + 0x3156 ] CALL pcrel

   6 Target : <0x00363190> [ init + 0x3150 ]

     Source : <0x00364894> [ init + 0x4854 ] JUMP (P2)

   7 Target : <0x00364882> [ init + 0x4842 ]

     Source : <0x0036487a> [ init + 0x483a ] IF !CC JUMP

   8 Target : <0x0036484c> [ init + 0x480c ]

     Source : <0x003648da> [ init + 0x489a ] CALL pcrel

   9 Target : <0x0036489c> [ init + 0x485c ]

     Source : <0x00360080> [ init + 0x40 ] JUMP.L

  10 Target : <0x00360044> [ init + 0x4 ]

     Source : <0xffa00744> { _kernel_execve + 0xbc } RTI

  11 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  12 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  13 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  14 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

  15 Target : <0xffa006c4> { _kernel_execve + 0x3c }

     Source : <0xffa006cc> { _kernel_execve + 0x44 } IF CC JUMP

Userspace Stack

Stack info:

SP: [0x00379f48] <0x00379f48> [ init + 0x19f48 ]

FP: (0x00379f54)

Memory from 0x00379f40 to 0037a000

00379f40: 00000000  00000000 [00000000] 00000000  00000000 (00379f7c)<003648de> 00365b00

00379f60: 00000000  00000000  003780e0  00000001  00000000  00000000  00000000 (00000000)

00379f80: 00000000  00365b00  00000000  00000000  00000000  00000000  00000000  00000000

00379fa0: 00000000  00000000  00000000  00365ab4  00365ac6  00000000  00000000  00000001

00379fc0: 00379fd4  00000000  00379fdf  00379fe6  00000000  6962732f  6e692f6e  48007469

00379fe0: 3d454d4f  4554002f  6c3d4d52  78756e69  62732f00  692f6e69 <0074696e> 00000000

0037a000: 08d508d5

Return addresses in stack:

   frame  1 : <0x003648de> [ init + 0x489e ]

    address : <0x0074696e> /* kernel dynamic memory */

Kernel panic - not syncing: Attempted to kill init!

 

 

 

Have you ever tried this in this realease?

 

why the boot couldn't read the FS?

QuoteReplyEditDelete

 

 

2009-05-19 15:19:29     Re: BF537,configuration MTD for NAND flash

Robin Getz (UNITED STATES)

Message: 74284   

 

Damien:

 

Did you try what Mike suggested? Others seem to have it working on trunk.

 

-Robin

QuoteReplyEditDelete

Attachments

    Outcomes