From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/6] i.mx: Add the initial support for freescale i.MX6Q processor
Date: Mon, 14 Nov 2011 00:11:55 +0100 [thread overview]
Message-ID: <201111140011.55220.marek.vasut@gmail.com> (raw)
In-Reply-To: <1321094190-8108-3-git-send-email-jason.hui@linaro.org>
> i.MX6Q is freescale quad core processors with ARM cortex_a9 complex.
> This patch is to add the initial support for this processor.
>
> Signed-off-by: Jason Liu <jason.hui@linaro.org>
> ---
> arch/arm/cpu/armv7/mx6/Makefile | 48 +
> arch/arm/cpu/armv7/mx6/clock.c | 388 +++++++
> arch/arm/cpu/armv7/mx6/iomux-v3.c | 76 ++
> arch/arm/cpu/armv7/mx6/lowlevel_init.S | 60 +
> arch/arm/cpu/armv7/mx6/soc.c | 57 +
> arch/arm/include/asm/arch-mx6/ccm_regs.h | 894 +++++++++++++++
> arch/arm/include/asm/arch-mx6/clock.h | 50 +
> arch/arm/include/asm/arch-mx6/gpio.h | 35 +
> arch/arm/include/asm/arch-mx6/imx-regs.h | 233 ++++
> arch/arm/include/asm/arch-mx6/iomux-v3.h | 104 ++
> arch/arm/include/asm/arch-mx6/mx6x_pins.h | 1683
> +++++++++++++++++++++++++++++ arch/arm/include/asm/arch-mx6/sys_proto.h |
> 38 +
> 12 files changed, 3666 insertions(+), 0 deletions(-)
>
[...]
> diff --git a/arch/arm/cpu/armv7/mx6/lowlevel_init.S
> b/arch/arm/cpu/armv7/mx6/lowlevel_init.S new file mode 100644
> index 0000000..7a03f59
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/mx6/lowlevel_init.S
> @@ -0,0 +1,60 @@
> +/*
> + * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include <config.h>
> +#include <asm/arch/imx-regs.h>
> +
> +/*
> + * AIPS setup - Only setup MPROTx registers.
> + * Set all MPROTx to be non-bufferable,
> + * trusted for R/W, not forced to user-mode.
> + * The PACR default values are good.
> + */
> +.macro init_aips
> + ldr r0, =AIPS1_ON_BASE_ADDR
> + ldr r1, =0x77777777
> + str r1, [r0, #0x0]
> + str r1, [r0, #0x4]
> + ldr r1, =0x0
> + str r1, [r0, #0x40]
> + str r1, [r0, #0x44]
> + str r1, [r0, #0x48]
> + str r1, [r0, #0x4C]
> + str r1, [r0, #0x50]
> +
> + ldr r0, =AIPS2_ON_BASE_ADDR
> + ldr r1, =0x77777777
> + str r1, [r0, #0x0]
> + str r1, [r0, #0x4]
> + ldr r1, =0x0
> + str r1, [r0, #0x40]
> + str r1, [r0, #0x44]
> + str r1, [r0, #0x48]
> + str r1, [r0, #0x4C]
> + str r1, [r0, #0x50]
> +.endm /* init_aips */
Can't this be done in C code? Why the assembly ?
> +
> +.section ".text.init", "x"
> +
> +.globl lowlevel_init
> +lowlevel_init:
> +
> + init_aips
> +
> + mov pc, lr
[...]
> +#define MXC_CCM_CSCMR2_CAN_CLK_SEL_OFFSET (2)
Drop parenthesis around stuff similar to this.
> +#endif /*__ARCH_ARM_MACH_MX6_CCM_REGS_H__ */
> diff --git a/arch/arm/include/asm/arch-mx6/clock.h
> b/arch/arm/include/asm/arch-mx6/clock.h new file mode 100644
> index 0000000..636458f
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-mx6/clock.h
> @@ -0,0 +1,50 @@
> +/*
> + * (C) Copyright 2009
> + * Stefano Babic, DENX Software Engineering, sbabic at denx.de.
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#ifndef __ASM_ARCH_CLOCK_H
> +#define __ASM_ARCH_CLOCK_H
> +
> +enum mxc_clock {
> + MXC_ARM_CLK = 0,
> + MXC_PER_CLK,
> + MXC_AHB_CLK,
> + MXC_IPG_CLK,
> + MXC_IPG_PERCLK,
> + MXC_UART_CLK,
> + MXC_CSPI_CLK,
> + MXC_AXI_CLK,
> + MXC_EMI_SLOW_CLK,
> + MXC_DDR_CLK,
> + MXC_ESDHC_CLK,
> + MXC_ESDHC2_CLK,
> + MXC_ESDHC3_CLK,
> + MXC_ESDHC4_CLK,
> + MXC_SATA_CLK,
> + MXC_NFC_CLK,
> +};
> +
> +u32 imx_get_uartclk(void);
> +u32 imx_get_fecclk(void);
> +unsigned int mxc_get_clock(enum mxc_clock clk);
> +
> +#endif /* __ASM_ARCH_CLOCK_H */
> diff --git a/arch/arm/include/asm/arch-mx6/gpio.h
> b/arch/arm/include/asm/arch-mx6/gpio.h new file mode 100644
> index 0000000..1dc34e9
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-mx6/gpio.h
> @@ -0,0 +1,35 @@
> +/*
> + * Copyright (C) 2011
> + * Stefano Babic, DENX Software Engineering, <sbabic@denx.de>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +
> +#ifndef __ASM_ARCH_MX5_GPIO_H
> +#define __ASM_ARCH_MX5_GPIO_H
> +
> +/* GPIO registers */
> +struct gpio_regs {
> + u32 gpio_dr;
> + u32 gpio_dir;
> + u32 gpio_psr;
> +};
> +
You'll have GPIO driver, so why expose this structure ?
> +#endif
M
next prev parent reply other threads:[~2011-11-13 23:11 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-12 10:36 [U-Boot] [PATCH 0/6] i.mx: add the initial i.mx6q core/board support Jason Liu
2011-11-12 10:36 ` [U-Boot] [PATCH 1/6] i.mx: i.mx5: Move some files to imx-common folder Jason Liu
2011-11-14 8:34 ` Stefano Babic
2011-11-14 8:57 ` Jason Hui
2011-11-14 11:28 ` Stefano Babic
2011-11-12 10:36 ` [U-Boot] [PATCH 2/6] i.mx: Add the initial support for freescale i.MX6Q processor Jason Liu
2011-11-13 23:11 ` Marek Vasut [this message]
2011-11-14 8:47 ` Jason Hui
2011-11-14 10:45 ` Marek Vasut
2011-11-15 10:10 ` Jason Hui
2011-11-15 11:08 ` Stefano Babic
2011-11-14 9:03 ` Stefano Babic
2011-11-14 9:42 ` Jason Hui
2011-11-14 11:49 ` Stefano Babic
2011-11-15 10:18 ` Jason Hui
2011-11-12 10:36 ` [U-Boot] [PATCH 3/6] i.mx: mxc_gpio: add the i.mx6q support Jason Liu
2011-11-14 9:04 ` Stefano Babic
2011-11-12 10:36 ` [U-Boot] [PATCH 4/6] i.mx: serial_mxc: " Jason Liu
2011-11-12 10:36 ` [U-Boot] [PATCH 5/6] i.mx: fsl_esdhc: " Jason Liu
2011-11-12 16:35 ` Marek Vasut
2011-11-14 8:37 ` Jason Hui
2011-11-14 10:42 ` Marek Vasut
2011-11-15 9:46 ` Jason Hui
2011-11-15 11:56 ` Stefano Babic
2011-11-16 1:36 ` Jason Hui
2011-11-16 2:24 ` Marek Vasut
2011-11-14 9:06 ` Stefano Babic
2011-11-12 10:36 ` [U-Boot] [PATCH 6/6] i.mx: i.mx6q: Add the initial support for i.mx6q ARM2 board Jason Liu
2011-11-12 19:42 ` Fabio Estevam
2011-11-14 8:59 ` Jason Hui
2011-11-12 20:13 ` Fabio Estevam
2011-11-14 9:10 ` Jason Hui
2011-11-13 7:04 ` Igor Grinberg
2011-11-14 9:13 ` Jason Hui
2011-11-14 9:25 ` Stefano Babic
2011-11-14 9:55 ` Jason Hui
2011-11-14 11:36 ` Stefano Babic
2011-11-16 11:34 ` Dirk Behme
2011-11-16 12:15 ` Jason Hui
2011-11-12 16:10 ` [U-Boot] [PATCH 0/6] i.mx: add the initial i.mx6q core/board support Dirk Behme
2011-11-14 8:11 ` Jason Hui
2011-11-16 11:56 ` Dirk Behme
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201111140011.55220.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox