|
Subject: Re: [PATCH RESEND] NAND hardware ECC controller on at91sam9263 / at91sam9260 Newsgroups: gmane.linux.ports.arm.kernel Date: 2008-02-26 08:34:25 GMT (1 year, 18 weeks, 2 days, 21 hours and 32 minutes ago)
On Mon, 25 Feb 2008 21:58:36 +0200
"Andrew Victor" <avictor.za <at> gmail.com> wrote:
> The ECC controller is part of the system peripherals which are already
> mapped via iotable_init() in arch/arm/mach-at91/at91sam9260.c,
> therefore I don't think it's correct to try remap the region.
It's always correct to ioremap() the physical address of the hardware
registers, unless this code executes very early (which I don't think it
does.)
> I've changed at91sam9260_device.c, to rather pass the ECC base address
> as follows:
> [1] = {
> .start = AT91_BASE_SYS + AT91_ECC
> .end = AT91_BASE_SYS + AT91_ECC + SZ_512 - 1,
> .flags = IORESOURCE_MEM,
> }
>
> Therefore the above code can become something like:
> host->ecc = (void __force __iomem *) (AT91_VA_BASE_SYS - AT91_BASE_SYS);
> host->ecc += r->start;
I think such optimizations belong inside ioremap(). A driver should
certainly not pretend it knows about such things.
Please keep using ioremap(). I want to make this driver work on avr32
as well instead of submitting an almost identical driver of my own.
Haavard
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
|
|
|