Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi guys
The Flash is a Spansion 29LV320ABTC-702K053400 I was told that it was a AMD from our HW guys. I have made some extra printk's in the altera.c file since this is the one that's being used. The microtronix.c printk's I have made are not printed in the console so it's safe to say that microtronix.c is not used. Should this be used insted??? I have inserted a new console output here below and futher down I have the altera.c code I have modified.uClinux/Nios II
Altera Nios II support (C) 2004 Microtronix Datacom Ltd.
Built 1 zonelists
Kernel command line: root=/dev/mtdblock0 ro
PID hash table entries: 64 (order: 6, 1024 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory available: 6784k/8192k RAM, 0k/0k ROM (1080k kernel code, 215k data)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Linux NoNET1.0 for Linux 2.6
JFFS version 1.0, (C) 1999, 2000 Axis Communications AB
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
JFFS2: default compression mode: priority
Serial: JTAG UART driver $Revision: 1.4 $
ttyJ0 at MMIO 0x804028e0 (irq = 0) is a jtag_uart
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
MSE altera.c 1 WINDOW_ADDR 0 WINDOW_SIZE 4194304
MSE __ioremap
MSE Failed to ioremap
MSE altera.c 2 mymtd=0 *type=17849836
MSE altera.c 2 mymtd=0 *type=17851508
MSE altera.c 2(a) mymtd=0 *type=0
MSE altera.c 6
VFS: Cannot open root device "mtdblock0" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) altera.c int __init init_alteramap(void)
{
static const char *rom_probe_types = {"cfi_probe", "jedec_probe", 0 };
const char **type;
printk("MSE altera.c 1 WINDOW_ADDR %x WINDOW_SIZE %d\n", WINDOW_ADDR, WINDOW_SIZE);
ndk_amd_map.virt = (unsigned long *)ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE);
if (!ndk_amd_map.virt)
{
printk("MSE Failed to ioremap\n");
}
/*
if (!ndk_amd_map.virt) {
printk("Failed to ioremap\n");
return -EIO;
}
*/
simple_map_init(&ndk_amd_map);
mymtd = 0;
type = rom_probe_types;
for(; !mymtd && *type; type++) {
mymtd = do_map_probe(*type, &ndk_amd_map);
printk("MSE altera.c 2 mymtd=%d *type=%d\n", mymtd, *type);
}
printk("MSE altera.c 2(a) mymtd=%d *type=%d\n", mymtd, *type);
//mymtd = 1;
if (mymtd) {
mymtd->owner = THIS_MODULE;
printk("MSE altera.c 3\n");
# ifdef CONFIG_MTD_PARTITIONS
mtd_parts_nb = parse_mtd_partitions(mymtd, part_probes,
&mtd_parts, 0);
printk("MSE altera.c 4\n");
if (mtd_parts_nb > 0)
{
add_mtd_partitions (mymtd, mtd_parts, mtd_parts_nb);
printk("MSE altera.c 5\n");
return 0;
}
if (NUM_PARTITIONS != 0)
{
printk(KERN_NOTICE
"Using Altera NDK partition definition\n");
add_mtd_partitions (mymtd, alteramap_partitions, NUM_PARTITIONS);
return 0;
}
# endif
printk("MSE altera.c 5\n");
add_mtd_device(mymtd);
return 0;
}
printk("MSE altera.c 6\n");
iounmap((void *)ndk_amd_map.virt);
return -ENXIO; I use the memory map you proposed Ken. Hope this is enough info, if not please just write for more. And thx for the help and the explanations. Best regards Michael