linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: khc@pm.waw.pl (Krzysztof Halasa)
To: linux-arm-kernel@lists.infradead.org
Subject: IXP4xx: Indirect PCI MMIO compile failure
Date: Sun, 15 Nov 2009 02:14:59 +0100	[thread overview]
Message-ID: <m33a4gwpv0.fsf@intrepid.localdomain> (raw)
In-Reply-To: <m3fx8gwudx.fsf@intrepid.localdomain> (Krzysztof Halasa's message of "Sun, 15 Nov 2009 00:37:14 +0100")

Krzysztof Halasa <khc@pm.waw.pl> writes:

> There is 1:1 mapping on IXP4xx with indirect PCI MMIO:
>
> static inline void __iomem *
> __ixp4xx_ioremap(unsigned long addr, size_t size, unsigned int mtype)
> {
>         if((addr < PCIBIOS_MIN_MEM) || (addr > 0x4fffffff))
>                 return __arm_ioremap(addr, size, mtype);
>
>         return (void __iomem *)addr;
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Well, the 128 MB limit of indirect MMIO addressing seems to be bogus.
I can't find anything about it in the Intel's manual (except that PCI
address space is 0x48000000-0x4FFFFFFF and 0x48000000-0x4BFFFFFF is
actually usable - in direct mode). Added a patch:

--- a/arch/arm/mach-ixp4xx/include/mach/hardware.h
+++ b/arch/arm/mach-ixp4xx/include/mach/hardware.h
@@ -18,7 +18,11 @@
 #define __ASM_ARCH_HARDWARE_H__
 
 #define PCIBIOS_MIN_IO		0x00001000
-#define PCIBIOS_MIN_MEM		(cpu_is_ixp43x() ? 0x40000000 : 0x48000000)
+#ifdef CONFIG_IXP4XX_INDIRECT_PCI
+#define PCIBIOS_MIN_MEM		0x10000000
+#else
+#define PCIBIOS_MIN_MEM		0x48000000
+#endif
 
 /*
  * We override the standard dma-mask routines for bouncing.


And:
# lspci -v
00:0d.0 RAID bus controller: Silicon Image, Inc. SiI 3512 [SATALink/SATARaid] Se
rial ATA Controller (rev 01)
        Subsystem: Silicon Image, Inc. SiI 3512 SATARaid Controller
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 29
        I/O ports at 1010 [size=8]
        I/O ports at 1020 [size=4]
        I/O ports at 1018 [size=8]
        I/O ports at 1024 [size=4]
        I/O ports at 1000 [size=16]
        Memory at 10080000 (32-bit, non-prefetchable) [size=512]
                  ^^^^^^^^
        [virtual] Expansion ROM at 10000000 [disabled] [size=512K]

Needless to say, it works.
-- 
Krzysztof Halasa

  reply	other threads:[~2009-11-15  1:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-14 20:15 IXP4xx: Indirect PCI MMIO compile failure Krzysztof Halasa
2009-11-14 21:05 ` Russell King - ARM Linux
2009-11-14 23:02   ` Krzysztof Halasa
2009-11-14 23:18     ` Russell King - ARM Linux
2009-11-14 23:37       ` Krzysztof Halasa
2009-11-15  1:14         ` Krzysztof Halasa [this message]
2009-11-15 15:53           ` Krzysztof Halasa
2009-11-15  0:21       ` IXP4xx: Indirect PCI MMIO compile failure and fix Krzysztof Halasa

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=m33a4gwpv0.fsf@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).