[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-arm-kernel
Subject: Re: Direct-mapped Compact Flash on ARM9
From: Kenneth Crudup <kenny () panix ! com>
Date: 2004-07-01 21:26:39
Message-ID: Pine.LNX.4.60.0407011418160.26924 () Dell8K ! localdomain
[Download RAW message or body]
On Thu, 1 Jul 2004, James Graves wrote:
> Instead the CF slot is directly hooked up to the memory bus, with chip
> selects, I/O strobes, interrupt, and such.
> As far as I can tell, there is no support for this currently, so I was
> hoping that someone out there would have some code which does this
> already.
I have something similar for the LH79520-based board I was working with.
It's easy- essentially just register the address of the I/O port, and a CF
"drive" just looks like an IDE drive:
.../linux/include/asm-arm/arch-lh79520/ide.h
----
<snip>
#include <asm/hardware.h>
<snip>
/*
* This registers the standard ports for this architecture with the IDE
* driver.
*/
static __inline__ void
ide_init_default_hwifs(void)
{
hw_regs_t hw;
/*
* The IDE data ports are mapped in at IDE_BASE, and are aligined on 32 bit boundaries
* The IDE control port (usually found at port 0x3f6 on a PC, e.g.) is 6 ints into IDE_BASE2.
*/
ide_init_hwif_ports( &hw, IDE_BASE, (char *)IDE2_BASE + 6*sizeof(int), NULL);
hw.irq = IRQ_CF;
ide_register_hw( &hw, NULL);
}
----
... where "IDE_BASE", "IDE_BASE2" and "IRQ_CF" match your hardware.
Let me know if you need more help.
-Kenny
--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
H: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181
-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/armlinux/mlfaq.php
Etiquette: http://www.arm.linux.org.uk/armlinux/mletiquette.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic