From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/6] mx6q: Add support for ECSPI through mxc_spi driver
Date: Wed, 18 Jan 2012 00:19:44 +0100 [thread overview]
Message-ID: <201201180019.44633.marek.vasut@gmail.com> (raw)
In-Reply-To: <1326838190-13746-3-git-send-email-eric.nelson@boundarydevices.com>
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---
> arch/arm/include/asm/arch-mx6/imx-regs.h | 44
> ++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0
> deletions(-)
>
> diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
> b/arch/arm/include/asm/arch-mx6/imx-regs.h index 7650cb9..00040c4 100644
> --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
> @@ -190,6 +190,50 @@ struct src {
> u32 gpr10;
> };
>
> +/* ECSPI registers */
> +struct cspi_regs {
> + u32 rxdata;
> + u32 txdata;
> + u32 ctrl;
> + u32 cfg;
> + u32 intr;
> + u32 dma;
> + u32 stat;
> + u32 period;
> +};
Sigh ... it's no fun I can have only one remark :-)
Is this part common for all imx-es ?
> +
> +/*
> + * CSPI register definitions
> + */
> +#define MXC_ECSPI
> +#define MXC_CSPICTRL_EN (1 << 0)
> +#define MXC_CSPICTRL_MODE (1 << 1)
> +#define MXC_CSPICTRL_XCH (1 << 2)
> +#define MXC_CSPICTRL_CHIPSELECT(x) (((x) & 0x3) << 12)
> +#define MXC_CSPICTRL_BITCOUNT(x) (((x) & 0xfff) << 20)
> +#define MXC_CSPICTRL_PREDIV(x) (((x) & 0xF) << 12)
> +#define MXC_CSPICTRL_POSTDIV(x) (((x) & 0xF) << 8)
> +#define MXC_CSPICTRL_SELCHAN(x) (((x) & 0x3) << 18)
> +#define MXC_CSPICTRL_MAXBITS 0xfff
> +#define MXC_CSPICTRL_TC (1 << 7)
> +#define MXC_CSPICTRL_RXOVF (1 << 6)
> +#define MXC_CSPIPERIOD_32KHZ (1 << 15)
> +#define MAX_SPI_BYTES 32
> +
> +/* Bit position inside CTRL register to be associated with SS */
> +#define MXC_CSPICTRL_CHAN 18
> +
> +/* Bit position inside CON register to be associated with SS */
> +#define MXC_CSPICON_POL 4
> +#define MXC_CSPICON_PHA 0
> +#define MXC_CSPICON_SSPOL 12
> +#define MXC_SPI_BASE_ADDRESSES \
> + ECSPI1_BASE_ADDR, \
> + ECSPI2_BASE_ADDR, \
> + ECSPI3_BASE_ADDR, \
> + ECSPI4_BASE_ADDR, \
> + ECSPI5_BASE_ADDR
> +
> struct iim_regs {
> u32 ctrl;
> u32 ctrl_set;
next prev parent reply other threads:[~2012-01-17 23:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 22:09 [U-Boot] mxc_spi refactoring (for mx6q) Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 1/6] mxc_spi: move machine specifics into CPU headers Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 2/6] mx6q: Add support for ECSPI through mxc_spi driver Eric Nelson
2012-01-17 23:19 ` Marek Vasut [this message]
2012-01-18 0:36 ` Eric Nelson
2012-01-18 1:27 ` Marek Vasut
2012-01-18 1:44 ` Eric Nelson
2012-01-18 1:47 ` Marek Vasut
2012-01-18 2:02 ` Eric Nelson
2012-01-18 8:39 ` Stefano Babic
2012-01-18 16:08 ` Marek Vasut
2012-01-18 16:41 ` Stefano Babic
2012-01-18 20:05 ` Eric Nelson
2012-01-19 10:33 ` Stefano Babic
2012-01-17 22:09 ` [U-Boot] [PATCH 3/6] mx6q: mx6qsabrelite: Add ECSPI support to the Sabrelite platform Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 4/6] sf command: allow default chip select through CONFIG_SPI_FLASH_CS Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 5/6] mx6q: mx6qsabrelite: Provide default chip-select for serial flash Eric Nelson
2012-01-17 22:09 ` [U-Boot] [PATCH 6/6] mx6q: mx6qsabrelite: Provide defaults for placing environment in " Eric Nelson
2012-01-20 3:27 ` Jason Hui
2012-01-20 7:06 ` Dirk Behme
2012-01-20 7:48 ` Jason Hui
2012-01-20 8:47 ` Stefano Babic
2012-01-20 13:47 ` Eric Nelson
2012-01-20 13:43 ` Eric Nelson
2012-01-17 23:16 ` [U-Boot] mxc_spi refactoring (for mx6q) Marek Vasut
2012-01-18 11:51 ` 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=201201180019.44633.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