public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/7] mx27: basic cpu support
Date: Sat, 23 May 2009 02:22:50 +0200	[thread overview]
Message-ID: <20090523002250.GA20889@game.jcrosoft.org> (raw)
In-Reply-To: <1242777361-6717-2-git-send-email-yanok@emcraft.com>

> diff --git a/cpu/arm926ejs/mx27/interrupt.c b/cpu/arm926ejs/mx27/interrupt.c
please rename it timer.c
> new file mode 100644
> index 0000000..8f3e809
> --- /dev/null
> +++ b/cpu/arm926ejs/mx27/interrupt.c
> @@ -0,0 +1,201 @@
> +/*
> + * (C) Copyright 2002
> + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
> + * Marius Groeger <mgroeger@sysgo.de>
> + *
> + * (C) Copyright 2002
> + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
> + * Alex Zuepke <azu@sysgo.de>
> + *
> + * (C) Copyright 2002
> + * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
> + *
> + * (C) Copyright 2009
> + * Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
<snip>
> +
> +/*
> + * Reset the cpu by setting up the watchdog timer and let it time out
> + */
> +void reset_cpu (ulong ignored)
please move to a reset.c file
> +{
> +	struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
> +	/* Disable watchdog and set Time-Out field to 0 */
> +	writel(0x00000000, &regs->WCR);
> +
> +	/* Write Service Sequence */
> +	writel(0x00005555, &regs->WSR);
> +	writel(0x0000AAAA, &regs->WSR);
> +
> +	/* Enable watchdog */
> +	writel(WCR_WDE, &regs->WCR);
> +
> +	while (1);
> +	/*NOTREACHED*/
> +}
> diff --git a/include/asm-arm/arch-mx27/asm-offsets.h b/include/asm-arm/arch-mx27/asm-offsets.h
> new file mode 100644
> index 0000000..497afe5
> --- /dev/null
> +++ b/include/asm-arm/arch-mx27/asm-offsets.h
please add GPL header and copyright
> @@ -0,0 +1,16 @@
> +#define AIPI1_PSR0	0x10000000
> +#define AIPI1_PSR1	0x10000004
> +#define AIPI2_PSR0	0x10020000
> +#define AIPI2_PSR1	0x10020004
> +#define CSCR		0x10027000
> +#define MPCTL0		0x10027004
> +#define SPCTL0		0x1002700c
> +#define PCDR0		0x10027018
> +#define PCDR1		0x1002701c
> +#define PCCR0		0x10027020
> +#define PCCR1		0x10027024
> +#define ESDCTL0_ROF	0x00
> +#define ESDCFG0_ROF	0x04
> +#define ESDCTL1_ROF	0x08
> +#define ESDCFG1_ROF	0x0C
> +#define ESDMISC_ROF	0x10
> diff --git a/include/asm-arm/arch-mx27/clock.h b/include/asm-arm/arch-mx27/clock.h
> new file mode 100644
> index 0000000..f6615d9
> --- /dev/null
> +++ b/include/asm-arm/arch-mx27/clock.h
> @@ -0,0 +1,17 @@
please add GPL header and copyright
> +
> +#ifndef __ASM_ARCH_CLOCK_H
> +#define __ASM_ARCH_CLOCK_H
> +unsigned int imx_decode_pll(unsigned int pll, unsigned int f_ref);
> +
> +ulong imx_get_mpllclk(void);
> +ulong imx_get_armclk(void);
> +ulong imx_get_spllclk(void);
> +ulong imx_get_fclk(void);
> +ulong imx_get_hclk(void);
> +ulong imx_get_bclk(void);
> +ulong imx_get_perclk1(void);
> +ulong imx_get_perclk2(void);
> +ulong imx_get_perclk3(void);
> +ulong imx_get_ahbclk(void);
> +
> +#endif /* __ASM_ARCH_CLOCK_H */
> diff --git a/include/asm-arm/arch-mx27/imx-regs.h b/include/asm-arm/arch-mx27/imx-regs.h
> new file mode 100644
> index 0000000..16d2142
> --- /dev/null
> +++ b/include/asm-arm/arch-mx27/imx-regs.h
> @@ -0,0 +1,508 @@
> +/*
> + *
> + * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.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 _IMX_REGS_H
> +#define _IMX_REGS_H
> +
> +#ifndef __ASSEMBLY__
> +
> +extern void imx_gpio_mode (int gpio_mode);
> +
> +/* AIPI */
> +struct aipi_regs {
> +	u32 PSR0;
please do not use uppercase
> +	u32 PSR1;
> +};
> +
> +/* System Control */
> +struct system_control_regs {
> +	u32 res[5];
> +	u32 FMCR;
> +	u32 GPCR;
> +	u32 WBCR;
> +	u32 DSCR1;
> +	u32 DSCR2;
> +	u32 DSCR3;
> +	u32 DSCR4;
> +	u32 DSCR5;
> +	u32 DSCR6;
> +	u32 DSCR7;
> +	u32 DSCR8;
> +	u32 DSCR9;
> +	u32 DSCR10;
> +	u32 DSCR11;
> +	u32 DSCR12;
> +	u32 DSCR13;
> +	u32 PSCR;
> +	u32 PMCR;
> +	u32 res1;
> +	u32 DCVR0;
> +	u32 DCVR1;
> +	u32 DCVR2;
> +	u32 DCVR3;
> +};
> +
> +/* Chip Select Registers */
> +struct weim_regs {
> +	u32 CS0U;	/* Chip Select 0 Upper Register    */
						       ^^^^
whitespace please fix
and please check the other comments
> +	u32 CS0L;	/* Chip Select 0 Lower Register    */
> +	u32 CS0A;	/* Chip Select 0 Addition Register */
<snip>
 +
> +/* FMCR System Control bit definition*/
> +#define UART4_RXD_CTL	(1<<25)
please add space before and after '<<'
> +#define UART4_RTS_CTL	(1<<24)
> +#define KP_COL6_CTL	(1<<18)
> +#define KP_ROW7_CTL	(1<<17)
> +#define KP_ROW6_CTL	(1<<16)
> +#define PC_WAIT_B_CTL	(1<<14)
> +#define PC_READY_CTL	(1<<13)
> +#define PC_VS1_CTL	(1<<12)
> +#define PC_VS2_CTL	(1<<11)
> +#define PC_BVD1_CTL	(1<<10)
> +#define PC_BVD2_CTL	(1<<9)
> +#define IOS16_CTL	(1<<8)
> +#define NF_FMS		(1<<5)
> +#define NF_16BIT_SEL	(1<<4)
> +#define SLCDC_SEL	(1<<2)
> +#define SDCS1_SEL	(1<<1)
> +#define SDCS0_SEL	(1<<0)
> +
Best Regards,
J.

  reply	other threads:[~2009-05-23  0:22 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 23:55 [U-Boot] [PATCH 00/10][v2] Support for LogicPD i.MX27-LITEKIT development board Ilya Yanok
2009-05-19 23:55 ` [U-Boot] [PATCH 1/7] mx27: basic cpu support Ilya Yanok
2009-05-23  0:22   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-05-26 19:25     ` Wolfgang Denk
2009-05-28 22:57   ` Wolfgang Denk
2009-05-28 23:04   ` Wolfgang Denk
2009-05-19 23:55 ` [U-Boot] [PATCH 2/7] serial_mx31: allow it to work with mx27 too and rename to serial_mxc Ilya Yanok
2009-05-23  0:25   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-19 23:55 ` [U-Boot] [PATCH 3/7] fec_imx27: driver for FEC ethernet controller on i.MX27 Ilya Yanok
2009-05-26  5:38   ` Ben Warren
2009-06-07 23:08     ` Ilya Yanok
2009-11-17  2:46     ` alfred steele
2009-11-17  2:59       ` Ben Warren
2009-11-19  1:54         ` alfred steele
2009-11-19  3:30           ` Ben Warren
2009-11-17  6:34       ` Wolfgang Denk
2009-06-15 14:01   ` Johan
2009-06-15 19:59     ` Eric Lammerts
2009-06-16  7:12       ` Johan
2009-06-17 22:19         ` Ilya Yanok
2009-06-19 23:59         ` Wolfgang Denk
2009-06-23 17:37       ` [U-Boot] [PATCH 3/7] fec_imx27: driver for FEC Ethernet " Bill Cook
2009-05-19 23:55 ` [U-Boot] [PATCH 4/7] mxc_nand: add nand driver for MX2/MX3 Ilya Yanok
2009-05-28 23:06   ` Wolfgang Denk
2009-05-29  6:22     ` Magnus Lilja
2009-05-29  8:40       ` Wolfgang Denk
2009-05-19 23:55 ` [U-Boot] [PATCH 5/7] mxc-mmc: sdhc host driver for MX2 and MX3 proccessor Ilya Yanok
2009-05-19 23:56 ` [U-Boot] [PATCH 6/7] arm: add support for CONFIG_GENERIC_MMC Ilya Yanok
2009-05-23  0:27   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-28 15:56     ` Andy Fleming
2009-06-02 23:09       ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-19 23:56 ` [U-Boot] [PATCH 7/7] imx27lite: add support for imx27lite board from LogicPD Ilya Yanok
2009-05-28 22:27   ` Wolfgang Denk
2009-05-19 23:58 ` [U-Boot] [PATCH 0/7][v2] Support for LogicPD i.MX27-LITEKIT development board Ilya Yanok
  -- strict thread matches above, loose matches on Subject: below --
2009-06-08  0:12 [U-Boot] [PATCH 0/7][v3] " Ilya Yanok
2009-06-08  0:12 ` [U-Boot] [PATCH 1/7] mx27: basic cpu support Ilya Yanok
2009-06-20 13:13   ` Jean-Christophe PLAGNIOL-VILLARD

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=20090523002250.GA20889@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.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