aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-mx3/mx31ads.c2
-rw-r--r--arch/arm/mach-mx3/pcm037.c4
-rw-r--r--arch/arm/plat-mxc/gpio.c2
-rw-r--r--arch/arm/plat-mxc/include/mach/io.h20
-rw-r--r--drivers/serial/Kconfig4
-rw-r--r--drivers/serial/netx-serial.c4
6 files changed, 29 insertions, 7 deletions
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c
index 1be4a390c63f..f902a7c37c31 100644
--- a/arch/arm/mach-mx3/mx31ads.c
+++ b/arch/arm/mach-mx3/mx31ads.c
@@ -35,6 +35,8 @@
35#include <mach/imx-uart.h> 35#include <mach/imx-uart.h>
36#include <mach/iomux-mx3.h> 36#include <mach/iomux-mx3.h>
37 37
38#include "devices.h"
39
38/*! 40/*!
39 * @file mx31ads.c 41 * @file mx31ads.c
40 * 42 *
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index 11fda95c86a5..843f68c8ead1 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -91,12 +91,12 @@ static struct map_desc pcm037_io_desc[] __initdata = {
91 .virtual = AIPS1_BASE_ADDR_VIRT, 91 .virtual = AIPS1_BASE_ADDR_VIRT,
92 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR), 92 .pfn = __phys_to_pfn(AIPS1_BASE_ADDR),
93 .length = AIPS1_SIZE, 93 .length = AIPS1_SIZE,
94 .type = MT_DEVICE 94 .type = MT_DEVICE_NONSHARED
95 }, { 95 }, {
96 .virtual = AIPS2_BASE_ADDR_VIRT, 96 .virtual = AIPS2_BASE_ADDR_VIRT,
97 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), 97 .pfn = __phys_to_pfn(AIPS2_BASE_ADDR),
98 .length = AIPS2_SIZE, 98 .length = AIPS2_SIZE,
99 .type = MT_DEVICE 99 .type = MT_DEVICE_NONSHARED
100 }, 100 },
101}; 101};
102 102
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c
index 733e0acac916..de5c4747453f 100644
--- a/arch/arm/plat-mxc/gpio.c
+++ b/arch/arm/plat-mxc/gpio.c
@@ -188,7 +188,7 @@ static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset)
188 struct mxc_gpio_port *port = 188 struct mxc_gpio_port *port =
189 container_of(chip, struct mxc_gpio_port, chip); 189 container_of(chip, struct mxc_gpio_port, chip);
190 190
191 return (__raw_readl(port->base + GPIO_DR) >> offset) & 1; 191 return (__raw_readl(port->base + GPIO_PSR) >> offset) & 1;
192} 192}
193 193
194static int mxc_gpio_direction_input(struct gpio_chip *chip, unsigned offset) 194static int mxc_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
index 65b6810124c1..5d4cb1196441 100644
--- a/arch/arm/plat-mxc/include/mach/io.h
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -14,6 +14,26 @@
14/* Allow IO space to be anywhere in the memory */ 14/* Allow IO space to be anywhere in the memory */
15#define IO_SPACE_LIMIT 0xffffffff 15#define IO_SPACE_LIMIT 0xffffffff
16 16
17#ifdef CONFIG_ARCH_MX3
18#define __arch_ioremap __mx3_ioremap
19#define __arch_iounmap __iounmap
20
21static inline void __iomem *
22__mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
23{
24 if (mtype == MT_DEVICE) {
25 /* Access all peripherals below 0x80000000 as nonshared device
26 * but leave l2cc alone.
27 */
28 if ((phys_addr < 0x80000000) && ((phys_addr < L2CC_BASE_ADDR) ||
29 (phys_addr >= L2CC_BASE_ADDR + L2CC_SIZE)))
30 mtype = MT_DEVICE_NONSHARED;
31 }
32
33 return __arm_ioremap(phys_addr, size, mtype);
34}
35#endif
36
17/* io address mapping macro */ 37/* io address mapping macro */
18#define __io(a) ((void __iomem *)(a)) 38#define __io(a) ((void __iomem *)(a))
19 39
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index c94d3c4b7521..579d63a81aa2 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -1276,7 +1276,7 @@ config SERIAL_SGI_IOC3
1276 say Y or M. Otherwise, say N. 1276 say Y or M. Otherwise, say N.
1277 1277
1278config SERIAL_NETX 1278config SERIAL_NETX
1279 bool "NetX serial port support" 1279 tristate "NetX serial port support"
1280 depends on ARM && ARCH_NETX 1280 depends on ARM && ARCH_NETX
1281 select SERIAL_CORE 1281 select SERIAL_CORE
1282 help 1282 help
@@ -1288,7 +1288,7 @@ config SERIAL_NETX
1288 1288
1289config SERIAL_NETX_CONSOLE 1289config SERIAL_NETX_CONSOLE
1290 bool "Console on NetX serial port" 1290 bool "Console on NetX serial port"
1291 depends on SERIAL_NETX 1291 depends on SERIAL_NETX=y
1292 select SERIAL_CORE_CONSOLE 1292 select SERIAL_CORE_CONSOLE
1293 help 1293 help
1294 If you have enabled the serial port on the Hilscher NetX SoC 1294 If you have enabled the serial port on the Hilscher NetX SoC
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c
index 3f489329e8d3..3e5dda8518b7 100644
--- a/drivers/serial/netx-serial.c
+++ b/drivers/serial/netx-serial.c
@@ -42,8 +42,6 @@
42#define SERIAL_NX_MAJOR 204 42#define SERIAL_NX_MAJOR 204
43#define MINOR_START 170 43#define MINOR_START 170
44 44
45#ifdef CONFIG_SERIAL_NETX_CONSOLE
46
47enum uart_regs { 45enum uart_regs {
48 UART_DR = 0x00, 46 UART_DR = 0x00,
49 UART_SR = 0x04, 47 UART_SR = 0x04,
@@ -528,6 +526,8 @@ static struct netx_port netx_ports[] = {
528 } 526 }
529}; 527};
530 528
529#ifdef CONFIG_SERIAL_NETX_CONSOLE
530
531static void netx_console_putchar(struct uart_port *port, int ch) 531static void netx_console_putchar(struct uart_port *port, int ch)
532{ 532{
533 while (readl(port->membase + UART_FR) & FR_BUSY); 533 while (readl(port->membase + UART_FR) & FR_BUSY);