diff options
| -rw-r--r-- | arch/arm/mach-pxa/include/mach/addr-map.h | 7 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 21 |
2 files changed, 27 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/include/mach/addr-map.h b/arch/arm/mach-pxa/include/mach/addr-map.h index d28fe291233a..07b93fd24474 100644 --- a/arch/arm/mach-pxa/include/mach/addr-map.h +++ b/arch/arm/mach-pxa/include/mach/addr-map.h | |||
| @@ -44,6 +44,13 @@ | |||
| 44 | */ | 44 | */ |
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| 47 | * DFI Bus for NAND, PXA3xx only | ||
| 48 | */ | ||
| 49 | #define NAND_PHYS 0x43100000 | ||
| 50 | #define NAND_VIRT IOMEM(0xf6300000) | ||
| 51 | #define NAND_SIZE 0x00100000 | ||
| 52 | |||
| 53 | /* | ||
| 47 | * Internal Memory Controller (PXA27x and later) | 54 | * Internal Memory Controller (PXA27x and later) |
| 48 | */ | 55 | */ |
| 49 | #define IMEMC_PHYS 0x58000000 | 56 | #define IMEMC_PHYS 0x58000000 |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index ce0f8d6242e2..06005d3f2ba3 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
| @@ -47,6 +47,13 @@ extern void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int)); | |||
| 47 | #define ISRAM_START 0x5c000000 | 47 | #define ISRAM_START 0x5c000000 |
| 48 | #define ISRAM_SIZE SZ_256K | 48 | #define ISRAM_SIZE SZ_256K |
| 49 | 49 | ||
| 50 | /* | ||
| 51 | * NAND NFC: DFI bus arbitration subset | ||
| 52 | */ | ||
| 53 | #define NDCR (*(volatile u32 __iomem*)(NAND_VIRT + 0)) | ||
| 54 | #define NDCR_ND_ARB_EN (1 << 12) | ||
| 55 | #define NDCR_ND_ARB_CNTL (1 << 19) | ||
| 56 | |||
| 50 | static void __iomem *sram; | 57 | static void __iomem *sram; |
| 51 | static unsigned long wakeup_src; | 58 | static unsigned long wakeup_src; |
| 52 | 59 | ||
| @@ -362,7 +369,12 @@ static struct map_desc pxa3xx_io_desc[] __initdata = { | |||
| 362 | .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), | 369 | .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), |
| 363 | .length = SMEMC_SIZE, | 370 | .length = SMEMC_SIZE, |
| 364 | .type = MT_DEVICE | 371 | .type = MT_DEVICE |
| 365 | } | 372 | }, { |
| 373 | .virtual = (unsigned long)NAND_VIRT, | ||
| 374 | .pfn = __phys_to_pfn(NAND_PHYS), | ||
| 375 | .length = NAND_SIZE, | ||
| 376 | .type = MT_DEVICE | ||
| 377 | }, | ||
| 366 | }; | 378 | }; |
| 367 | 379 | ||
| 368 | void __init pxa3xx_map_io(void) | 380 | void __init pxa3xx_map_io(void) |
| @@ -419,6 +431,13 @@ static int __init pxa3xx_init(void) | |||
| 419 | */ | 431 | */ |
| 420 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); | 432 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); |
| 421 | 433 | ||
| 434 | /* | ||
| 435 | * Disable DFI bus arbitration, to prevent a system bus lock if | ||
| 436 | * somebody disables the NAND clock (unused clock) while this | ||
| 437 | * bit remains set. | ||
| 438 | */ | ||
| 439 | NDCR = (NDCR & ~NDCR_ND_ARB_EN) | NDCR_ND_ARB_CNTL; | ||
| 440 | |||
| 422 | if ((ret = pxa_init_dma(IRQ_DMA, 32))) | 441 | if ((ret = pxa_init_dma(IRQ_DMA, 32))) |
| 423 | return ret; | 442 | return ret; |
| 424 | 443 | ||
