public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Mapping driver
@ 2004-03-26 13:51 Luke Fimmerzane
  2004-03-30 13:15 ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Luke Fimmerzane @ 2004-03-26 13:51 UTC (permalink / raw)
  To: linux-mtd

Hi,
I'm new to MTD an jffs2.
I have some very basic questions...
My target is ARM sc32410. It contains AMD 1Mbyte and Strata flash 32 Mbytes. 
I've looked at the directory drivers/mtd/maps and there is no mapping 
driver.  My kernel is configured to take mtdparts command line information. 
My question is do I still need a mapping driver or does using mtdparts 
provide the same functionality.

Also the only information I get from the kernel about jffs2 and mtd is:

Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
CPU clock = 200.000 Mhz, HCLK = 100.000 Mhz, PCLK = 50.000 Mhz
Starting kswapd
devfs: v1.10 (20020120) Richard Gooch (rgooch@atnf.csiro.au)
devfs: devfs_debug: 0x0
devfs: boot_options: 0x1
JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications 
AB.
ttyS%d0 at I/O 0x50000000 (irq = 52) is a S3C2410
ttyS%d1 at I/O 0x50004000 (irq = 55) is a S3C2410
ttyS%d2 at I/O 0x50008000 (irq = 58) is a S3C2410
Console: switching to colour frame buffer device 30x40
Installed S3C2410 frame buffer
pty: 256 Unix98 ptys configured
s3c2410-ts initialized
S3C2410 Real Time Clock Driver v0.1
block: 128 slots per queue, batch=32
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
eth0: cs8900 rev J(3.3 Volts) found at 0xd0000300
cs89x0 media RJ-45, IRQ 37
physmap flash device: 2000000 at 8000000
Using buffer write method
mtd: Giving out device 0 to Physically mapped flash
No NAND device found!!!
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)

Then when I do a cat I get
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 02000000 00040000 "Physically mapped flash"

when I do a ls -al I get ..
# ls -al /dev/mtd/0
/dev/mtd/0      /dev/mtd/0ro

I presume ro is read only but why would it be so? Whats the difference 
between the two entries? I've seen /dev/mtd0 and /dev/mtd/0. Which is 
correct?

What messages should the kernel emit if everything MTD related is going ok?

Sorry if my questions are very basic! I'm 'slavishly' following a book by 
Karim Yaghmor called " Building Embedded Linux systems" . I'm also slowly 
working my way back through the mtd archives for a similar problem. Is there 
an easier way of searching the archives than by going through them year by 
year?


Thanks for any help,
Very much appeciated

Luke

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today! 
http://www.msn.co.uk/messenger

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Mapping driver
  2004-03-26 13:51 Mapping driver Luke Fimmerzane
@ 2004-03-30 13:15 ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2004-03-30 13:15 UTC (permalink / raw)
  To: Luke Fimmerzane; +Cc: linux-mtd

On Fri, 2004-03-26 at 13:51 +0000, Luke Fimmerzane wrote:
> Hi,
> I'm new to MTD an jffs2.

And to email.... your lines are too long and your 'reply' is lacking
References: which connect it to this email. Please don't do that again
-- working round the automatic filter doesn't make it nice :)

> I have some very basic questions...
> My target is ARM sc32410. It contains AMD 1Mbyte and Strata flash 32 Mb
> I've looked at the directory drivers/mtd/maps and there is no mapping 
> driver.  My kernel is configured to take mtdparts command line informat
> My question is do I still need a mapping driver or does using mtdparts 
> provide the same functionality.

> physmap flash device: 2000000 at 8000000
> Using buffer write method
> mtd: Giving out device 0 to Physically mapped flash

> mtd0: 02000000 00040000 "Physically mapped flash"

Looks like it's found the StrataFlash and registered it whole as MTD
device number 0.

> when I do a ls -al I get ..
> # ls -al /dev/mtd/0
> /dev/mtd/0      /dev/mtd/0ro
> 
> I presume ro is read only but why would it be so? 

It's a device which you can use if you want only read-only access. You
can ignore it. 

> Whats the difference between the two entries?

You can't open the latter for write.

>  I've seen /dev/mtd0 and /dev/mtd/0. Which is correct?

Both. One's what you get without devfs, the other with devfs. 

> What messages should the kernel emit if everything MTD related is going

The above looks reasonable. Did you expect the AMD flash to also be
detected? You omitted the command line from your original mail, so I
can't tell why the command line partitioning isn't working -- but the
'mtd-id' you provide has to be that used in the 'name' by the physmap
device, which is "Physically mapped flash".

I'm not actually convinced there's a way of passing a mtd-id with spaces
in it. You may need to change physmap.c

> Sorry if my questions are very basic! I'm 'slavishly' following a book 
> Karim Yaghmor called " Building Embedded Linux systems" . I'm also slow
> working my way back through the mtd archives for a similar problem. Is 
> an easier way of searching the archives than by going through them year
> year?

google site:lists.infradead.org ?

-- 
dwmw2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-30 13:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-26 13:51 Mapping driver Luke Fimmerzane
2004-03-30 13:15 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox