From f17569d5d9fe1ad3191856a64c61a16c9271148c Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Tue, 15 Nov 2011 08:44:28 +0800 Subject: imx6: add imx6q sabrelite board support Signed-off-by: Richard Zhao --- arch/arm/boot/dts/imx6q-sabrelite.dts | 60 +++++++++++++++++++++++++++++++++++ arch/arm/mach-imx/lluart.c | 21 ++++++++---- arch/arm/mach-imx/mach-imx6q.c | 1 + arch/arm/plat-mxc/include/mach/mx6q.h | 3 +- drivers/of/base.c | 1 - 5 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 arch/arm/boot/dts/imx6q-sabrelite.dts diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts b/arch/arm/boot/dts/imx6q-sabrelite.dts new file mode 100644 index 00000000000..01867e2eb10 --- /dev/null +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts @@ -0,0 +1,60 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * Copyright 2011 Linaro Ltd. + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +/include/ "imx6q.dtsi" + +/ { + model = "Freescale i.MX6 Quad SABRE Lite Board"; + compatible = "fsl,imx6q-sabrelite", "fsl,imx6q"; + + chosen { + bootargs = "console=ttymxc1,115200 root=/dev/mmcblk3p3 rootwait"; + }; + + memory { + reg = <0x10000000 0x70000000>; + }; + + soc { + aips-bus@02100000 { /* AIPS2 */ + enet@02188000 { + phy-mode = "rgmii"; + local-mac-address = [00 04 9F 01 1B 61]; + status = "okay"; + }; + + usdhc@02198000 { /* uSDHC3 */ + status = "okay"; + }; + + usdhc@0219c000 { /* uSDHC4 */ + fsl,card-wired; + status = "okay"; + }; + + uart1: uart@021e8000 { /* UART2 */ + status = "okay"; + }; + }; + }; + + leds { + compatible = "gpio-leds"; + + debug-led { + label = "Heartbeat"; + gpios = <&gpio2 25 0>; /* GPIO3_25 */ + linux,default-trigger = "heartbeat"; + }; + }; +}; diff --git a/arch/arm/mach-imx/lluart.c b/arch/arm/mach-imx/lluart.c index d4ab6f29a76..8962dfff901 100644 --- a/arch/arm/mach-imx/lluart.c +++ b/arch/arm/mach-imx/lluart.c @@ -16,17 +16,26 @@ #include #include -static struct map_desc imx_lluart_desc = { +static struct map_desc imx_lluart_desc[] = { #ifdef CONFIG_DEBUG_IMX6Q_UART - .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR), - .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR), - .length = MX6Q_UART4_SIZE, - .type = MT_DEVICE, + { + .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR), + .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR), + .length = MX6Q_UART_SIZE, + .type = MT_DEVICE, + }, + { + .virtual = MX6Q_IO_P2V(MX6Q_UART2_BASE_ADDR), + .pfn = __phys_to_pfn(MX6Q_UART2_BASE_ADDR), + .length = MX6Q_UART_SIZE, + .type = MT_DEVICE, + }, + #endif }; void __init imx_lluart_map_io(void) { if (imx_lluart_desc.virtual) - iotable_init(&imx_lluart_desc, 1); + iotable_init(&imx_lluart_desc, ARRY_SIZE(imx_lluart_desc)); } diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 9cd860a27af..b0ec2868058 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -72,6 +72,7 @@ static struct sys_timer imx6q_timer = { static const char *imx6q_dt_compat[] __initdata = { "fsl,imx6q-sabreauto", + "fsl,imx6q-sabrelite", NULL, }; diff --git a/arch/arm/plat-mxc/include/mach/mx6q.h b/arch/arm/plat-mxc/include/mach/mx6q.h index 254a561a279..f9adfeb5ef4 100644 --- a/arch/arm/plat-mxc/include/mach/mx6q.h +++ b/arch/arm/plat-mxc/include/mach/mx6q.h @@ -27,7 +27,8 @@ #define MX6Q_CCM_SIZE 0x4000 #define MX6Q_ANATOP_BASE_ADDR 0x020c8000 #define MX6Q_ANATOP_SIZE 0x1000 +#define MX6Q_UART2_BASE_ADDR 0x021e8000 #define MX6Q_UART4_BASE_ADDR 0x021f0000 -#define MX6Q_UART4_SIZE 0x4000 +#define MX6Q_UART_SIZE 0x4000 #endif /* __MACH_MX6Q_H__ */ diff --git a/drivers/of/base.c b/drivers/of/base.c index 9b6588ef067..77239ce0cf0 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1206,7 +1206,6 @@ int of_alias_get_id(struct device_node *np, const char *stem) { struct alias_prop *app; int id = -ENODEV; - mutex_lock(&of_aliases_mutex); list_for_each_entry(app, &aliases_lookup, link) { if (strcmp(app->stem, stem) != 0) -- cgit v1.2.3