Commit ebb4c658 authored by Russell King's avatar Russell King Committed by Russell King

[ARM] iop: iop3xx needs registers mapped uncached+unbuffered

Mikael Pettersson reported:

   The 2.6.28-rc kernels fail to detect PCI device 0000:00:01.0
   (the first ethernet port) on my Thecus n2100 XScale box.

   There is however still a strange "ghost" device that gets partially
   detected in 2.6.28-rc2 vanilla.

The IOP321 manual says:

  The user designates the memory region containing the OCCDR as
  non-cacheable and non-bufferable from the IntelR XScaleTM core.
  This guarantees that all load/stores to the OCCDR are only of
  DWORD quantities.

Ensure that the OCCDR is so mapped.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 7bfc0b2e
...@@ -19,12 +19,13 @@ struct map_desc { ...@@ -19,12 +19,13 @@ struct map_desc {
}; };
/* types 0-3 are defined in asm/io.h */ /* types 0-3 are defined in asm/io.h */
#define MT_CACHECLEAN 4 #define MT_UNCACHED 4
#define MT_MINICLEAN 5 #define MT_CACHECLEAN 5
#define MT_LOW_VECTORS 6 #define MT_MINICLEAN 6
#define MT_HIGH_VECTORS 7 #define MT_LOW_VECTORS 7
#define MT_MEMORY 8 #define MT_HIGH_VECTORS 8
#define MT_ROM 9 #define MT_MEMORY 9
#define MT_ROM 10
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
extern void iotable_init(struct map_desc *, int); extern void iotable_init(struct map_desc *, int);
......
...@@ -208,6 +208,12 @@ static struct mem_type mem_types[] = { ...@@ -208,6 +208,12 @@ static struct mem_type mem_types[] = {
.prot_sect = PROT_SECT_DEVICE, .prot_sect = PROT_SECT_DEVICE,
.domain = DOMAIN_IO, .domain = DOMAIN_IO,
}, },
[MT_UNCACHED] = {
.prot_pte = PROT_PTE_DEVICE,
.prot_l1 = PMD_TYPE_TABLE,
.prot_sect = PMD_TYPE_SECT | PMD_SECT_XN,
.domain = DOMAIN_IO,
},
[MT_CACHECLEAN] = { [MT_CACHECLEAN] = {
.prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN,
.domain = DOMAIN_KERNEL, .domain = DOMAIN_KERNEL,
......
...@@ -16,14 +16,15 @@ ...@@ -16,14 +16,15 @@
#include <asm/hardware/iop3xx.h> #include <asm/hardware/iop3xx.h>
/* /*
* Standard IO mapping for all IOP3xx based systems * Standard IO mapping for all IOP3xx based systems. Note that
* the IOP3xx OCCDR must be mapped uncached and unbuffered.
*/ */
static struct map_desc iop3xx_std_desc[] __initdata = { static struct map_desc iop3xx_std_desc[] __initdata = {
{ /* mem mapped registers */ { /* mem mapped registers */
.virtual = IOP3XX_PERIPHERAL_VIRT_BASE, .virtual = IOP3XX_PERIPHERAL_VIRT_BASE,
.pfn = __phys_to_pfn(IOP3XX_PERIPHERAL_PHYS_BASE), .pfn = __phys_to_pfn(IOP3XX_PERIPHERAL_PHYS_BASE),
.length = IOP3XX_PERIPHERAL_SIZE, .length = IOP3XX_PERIPHERAL_SIZE,
.type = MT_DEVICE, .type = MT_UNCACHED,
}, { /* PCI IO space */ }, { /* PCI IO space */
.virtual = IOP3XX_PCI_LOWER_IO_VA, .virtual = IOP3XX_PCI_LOWER_IO_VA,
.pfn = __phys_to_pfn(IOP3XX_PCI_LOWER_IO_PA), .pfn = __phys_to_pfn(IOP3XX_PCI_LOWER_IO_PA),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment