public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Clemens Koller <clemens.koller@anagramm.de>
To: linux-mtd@lists.infradead.org
Subject: MTD for FPGA framegrabber
Date: Fri, 03 Jun 2005 15:13:25 +0200	[thread overview]
Message-ID: <42A05775.3010102@anagramm.de> (raw)

Hello!

Okay, after some more reading and testing, I try to get an overview
of what I am doing :-) I still have some questions which are unclear
in the little documentation I've found... see below.

Well, my goal is to use an MTD to access my SRAM in my FPGA at
0xfc000000, size=0x100000 (1MByte) with direct read and write
operations (and DMA later on). All that should happen on the
Local Bus Controller on an MPC8540 embedded PowerPC CPU.
The goal is to get direct io / bulk data transfers via DMA as
fast as possible. (It looks like I need MTD_WRITEB_WRITEABLE)

Currently, all my stuff is compiled as modules to be able to play
around with all that things.
First, I wrote a little module which sets my Local Bus Windows
to generate the right chipselects and timings... which seems to
work fine.

Then I tried to start the MTD stuff:
# modprobe mtdchar
	loads mtdcore also... okay!
# modprobe map_rom
	loads chipreg also... okay!
# modprobe physmap
	probes my SRAM area via map_rom and adds mtd_to mtdcore, so I get
	two devices: /dev/mtd/0 and /dev/mtd/0ro

Okay, I'm wondering why do I get the 0ro device, too?

Now I can read from 0 and 0ro and I get data read from my SRAM.
But I cannot write to that area.

Okay, I've tried to use mtd_ram instead of mtd_rom, but then I cannot
load physmap:
FATAL: Error inserting physmap (/lib/modules/2.6.11.11/kernel/drivers/mtd/maps/physmap.ko): No such device or address

Hmm... okay, if I look into physmap.c it seems like as it won't use the
mtd_ram probe for my SRAM:

First line of static int __init init_physmap(void):
	static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL };

Is that correct?
Can I just use map_ram instead of the others and do I then end up
with a r/w device? Or do I need more?


I also thought about a mixture of the mtdram and physmap driver?
Well, I've had a look at the latest CVS and realized that there
are plenty of drivers available. But do I need to write one of my
own or can I just recycle some other code?
Can you give me a good starting point in the sources?

Maybe some of you can just give me some raw directions or
correct me if I am at the wrong trail with my plans above?!.

Thanks in advance,
best greets,

Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19

             reply	other threads:[~2005-06-03 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-03 13:13 Clemens Koller [this message]
2005-06-03 14:29 ` MTD for FPGA framegrabber Jörn Engel
2005-06-03 14:49   ` Jörn Engel
2005-06-03 16:38   ` Clemens Koller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42A05775.3010102@anagramm.de \
    --to=clemens.koller@anagramm.de \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox