From 43e2be14c111bb8d72fdd087e94ad286336056b0 Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 5 Jun 2014 14:10:56 -0500 Subject: ARM: pxa: correct errata number for PXA270 Comment incorrectly cites errata 39 E39. SDIO: SDIO Devices Not Working at 19.5 Mbps Should be errata 38 E38. MEMC: Memory Controller hangs when entering Self Refresh Mode. Signed-off-by: Andrew Ruder Acked-by: Haojian Zhuang --- arch/arm/mach-pxa/sleep.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S index 1e544be9905..6c5b3ffd2cd 100644 --- a/arch/arm/mach-pxa/sleep.S +++ b/arch/arm/mach-pxa/sleep.S @@ -157,7 +157,7 @@ pxa_cpu_do_suspend: @ Do not reorder... @ Intel PXA270 Specification Update notes problems performing @ external accesses after SDRAM is put in self-refresh mode - @ (see Errata 39 ...hangs when entering self-refresh mode) + @ (see Errata 38 ...hangs when entering self-refresh mode) @ force address lines low by reading at physical address 0 ldr r3, [r2] -- cgit v1.2.3-70-g09d2 From 2111667b467748ba8a3d8950e79e6921221f41eb Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Thu, 5 Jun 2014 14:10:57 -0500 Subject: ARM: pxa: call debug_ll_io_init for earlyprintk This is already done automatically for many other ARM platforms by the ARM core code, but since pxa is using the .map_io callback, it needs to call it explicitely for earlyprintk support. Signed-off-by: Andrew Ruder Acked-by: Haojian Zhuang --- arch/arm/mach-pxa/generic.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 42254175fcf..94f49c23ca0 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -93,5 +93,6 @@ static struct map_desc common_io_desc[] __initdata = { void __init pxa_map_io(void) { + debug_ll_io_init(); iotable_init(ARRAY_AND_SIZE(common_io_desc)); } -- cgit v1.2.3-70-g09d2 From 5837391bbc7ab4307abf957e6cce0b83f7f9869a Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Fri, 16 May 2014 12:40:40 +0200 Subject: ARM: pxa: fix typo 'CONFIG_SPI_PXA2XX_MASTER' CONFIG_SPI_PXA2XX_MASTER was used were it was surely meant to use CONFIG_SPI_PXA2XX_MODULE. Use the IS_ENABLED() macro here, as it guards against typos like this one. Signed-off-by: Paul Bolle Acked-by: Haojian Zhuang --- arch/arm/mach-pxa/corgi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 91dd1c7cdbc..06022b23573 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -514,7 +514,7 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = { .gpio_pullup = CORGI_GPIO_USB_PULLUP, }; -#if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MASTER) +#if IS_ENABLED(CONFIG_SPI_PXA2XX) static struct pxa2xx_spi_master corgi_spi_info = { .num_chipselect = 3, }; -- cgit v1.2.3-70-g09d2 From 0e32986c0f51d585b4980a0f01c269627f51b78b Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 11 Jul 2014 13:00:36 +0200 Subject: ARM: pxa: Don't hardcode addresses and size in map_desc tables The virtual address, physical address and size of all regions for which we create static mappings are defined in PXA headers. Replaced the hardcoded values with macros. Signed-off-by: Laurent Pinchart Acked-by: Nicolas Pitre Signed-off-by: Olof Johansson --- arch/arm/mach-pxa/generic.c | 10 +++++----- arch/arm/mach-pxa/include/mach/hardware.h | 2 +- arch/arm/mach-pxa/pxa25x.c | 2 +- arch/arm/mach-pxa/pxa27x.c | 8 ++++---- arch/arm/mach-pxa/pxa3xx.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 94f49c23ca0..68a75fe1602 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -79,14 +79,14 @@ EXPORT_SYMBOL(get_clk_frequency_khz); */ static struct map_desc common_io_desc[] __initdata = { { /* Devs */ - .virtual = 0xf2000000, - .pfn = __phys_to_pfn(0x40000000), - .length = 0x02000000, + .virtual = (unsigned long)PERIPH_VIRT, + .pfn = __phys_to_pfn(PERIPH_PHYS), + .length = PERIPH_SIZE, .type = MT_DEVICE }, { /* UNCACHED_PHYS_0 */ - .virtual = 0xff000000, + .virtual = UNCACHED_PHYS_0, .pfn = __phys_to_pfn(0x00000000), - .length = 0x00100000, + .length = UNCACHED_PHYS_0_SIZE, .type = MT_DEVICE } }; diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index ccb06e48552..efb3965aa92 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h @@ -20,7 +20,7 @@ * The mapping is set in mach-pxa/generic.c. */ #define UNCACHED_PHYS_0 0xff000000 -#define UNCACHED_ADDR UNCACHED_PHYS_0 +#define UNCACHED_PHYS_0_SIZE 0x00100000 /* * Intel PXA2xx internal register mapping: diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index f2c28972084..926c506f99b 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -331,7 +331,7 @@ static struct map_desc pxa25x_io_desc[] __initdata = { { /* Mem Ctl */ .virtual = (unsigned long)SMEMC_VIRT, .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), - .length = 0x00200000, + .length = SMEMC_SIZE, .type = MT_DEVICE }, }; diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 301471a07a1..44056445876 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -402,12 +402,12 @@ static struct map_desc pxa27x_io_desc[] __initdata = { { /* Mem Ctl */ .virtual = (unsigned long)SMEMC_VIRT, .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), - .length = 0x00200000, + .length = SMEMC_SIZE, .type = MT_DEVICE }, { /* IMem ctl */ - .virtual = 0xfe000000, - .pfn = __phys_to_pfn(0x58000000), - .length = 0x00100000, + .virtual = (unsigned long)IMEMC_VIRT, + .pfn = __phys_to_pfn(IMEMC_PHYS), + .length = IMEMC_SIZE, .type = MT_DEVICE }, }; diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 87011f3de69..593ccd35ca9 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -416,7 +416,7 @@ static struct map_desc pxa3xx_io_desc[] __initdata = { { /* Mem Ctl */ .virtual = (unsigned long)SMEMC_VIRT, .pfn = __phys_to_pfn(PXA3XX_SMEMC_BASE), - .length = 0x00200000, + .length = SMEMC_SIZE, .type = MT_DEVICE } }; -- cgit v1.2.3-70-g09d2 From b10f1c836c4e8c2372d14953a17aa5b9744eb55c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 11 Jul 2014 13:00:37 +0200 Subject: ARM: pxa: Move UNCACHED_PHYS_0 mapping from generic.c to pxa2[57]x.c The UNCACHED_PHYS_0 mapping is only needed on PXA25x and PXA27x platforms. Move it to pxa25x.c and pxa27x.c to avoid wasting vmalloc space on PXA3xx. Signed-off-by: Laurent Pinchart Acked-by: Nicolas Pitre Signed-off-by: Olof Johansson --- arch/arm/mach-pxa/generic.c | 5 ----- arch/arm/mach-pxa/pxa25x.c | 5 +++++ arch/arm/mach-pxa/pxa27x.c | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 68a75fe1602..b31e101cad9 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c @@ -83,11 +83,6 @@ static struct map_desc common_io_desc[] __initdata = { .pfn = __phys_to_pfn(PERIPH_PHYS), .length = PERIPH_SIZE, .type = MT_DEVICE - }, { /* UNCACHED_PHYS_0 */ - .virtual = UNCACHED_PHYS_0, - .pfn = __phys_to_pfn(0x00000000), - .length = UNCACHED_PHYS_0_SIZE, - .type = MT_DEVICE } }; diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 926c506f99b..66e4a2b6316 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -333,6 +333,11 @@ static struct map_desc pxa25x_io_desc[] __initdata = { .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), .length = SMEMC_SIZE, .type = MT_DEVICE + }, { /* UNCACHED_PHYS_0 */ + .virtual = UNCACHED_PHYS_0, + .pfn = __phys_to_pfn(0x00000000), + .length = UNCACHED_PHYS_0_SIZE, + .type = MT_DEVICE }, }; diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 44056445876..6cc0f4656d1 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -409,6 +409,11 @@ static struct map_desc pxa27x_io_desc[] __initdata = { .pfn = __phys_to_pfn(IMEMC_PHYS), .length = IMEMC_SIZE, .type = MT_DEVICE + }, { /* UNCACHED_PHYS_0 */ + .virtual = UNCACHED_PHYS_0, + .pfn = __phys_to_pfn(0x00000000), + .length = UNCACHED_PHYS_0_SIZE, + .type = MT_DEVICE }, }; -- cgit v1.2.3-70-g09d2 From 8066ce3b872d0437df904cee4c0edc4501a500de Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 11 Jul 2014 13:00:38 +0200 Subject: ARM: pxa: pxa27x: Don't map IMEMC region statically The IMEMC mapping not only has no user, but maps a reserved memory space. It just wastes vmalloc space, remove it. Signed-off-by: Laurent Pinchart Acked-by: Nicolas Pitre Signed-off-by: Olof Johansson --- arch/arm/mach-pxa/pxa27x.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 6cc0f4656d1..b040d7d1488 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -404,11 +404,6 @@ static struct map_desc pxa27x_io_desc[] __initdata = { .pfn = __phys_to_pfn(PXA2XX_SMEMC_BASE), .length = SMEMC_SIZE, .type = MT_DEVICE - }, { /* IMem ctl */ - .virtual = (unsigned long)IMEMC_VIRT, - .pfn = __phys_to_pfn(IMEMC_PHYS), - .length = IMEMC_SIZE, - .type = MT_DEVICE }, { /* UNCACHED_PHYS_0 */ .virtual = UNCACHED_PHYS_0, .pfn = __phys_to_pfn(0x00000000), -- cgit v1.2.3-70-g09d2 From c3df51333444b7404a5b62f3e96f7a5d5b4fd2db Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Fri, 11 Jul 2014 13:00:39 +0200 Subject: ARM: pxa: Move iotable mapping inside vmalloc region In order to remove the following ugly message: BUG: mapping for 0x00000000 at 0xff000000 out of vmalloc space the iotable mappings should be re-located inside the vmalloc region. Such move was introduced at commit: commit 0536bdf33faff4d940ac094c77998cfac368cfff Author: Nicolas Pitre Date: Thu Aug 25 00:35:59 2011 -0400 ARM: move iotable mappings within the vmalloc region Signed-off-by: Ezequiel Garcia [laurent.pinchart@ideasonboard.com: Hardcode the virtual address] Signed-off-by: Laurent Pinchart Acked-by: Nicolas Pitre Signed-off-by: Olof Johansson --- arch/arm/mach-pxa/include/mach/hardware.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index efb3965aa92..8d63c211b22 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h @@ -19,7 +19,7 @@ * Workarounds for at least 2 errata so far require this. * The mapping is set in mach-pxa/generic.c. */ -#define UNCACHED_PHYS_0 0xff000000 +#define UNCACHED_PHYS_0 0xfe000000 #define UNCACHED_PHYS_0_SIZE 0x00100000 /* -- cgit v1.2.3-70-g09d2