From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] mx6: add co-existing pad configuration macros mx6q/mx6dl
Date: Fri, 08 Nov 2013 17:08:54 -0700 [thread overview]
Message-ID: <527D7D16.4060409@boundarydevices.com> (raw)
In-Reply-To: <1383903407.3157.495.camel@edward-x220-laptop>
Hi Edward,
On 11/08/2013 02:36 AM, Edward Lin wrote:
> In order to be able to support several CPU types in one binary,
> a duplicate set of pad configuration macros are introduced.
>
> The idea is that a board file should be able to define:
>
> #define MX6_SET_PAD(p, q) \
> if (is_cpu_type(MXC_CPU_MX6Q)) \
> imx_iomux_v3_setup_pad(MX6Q_##p | q); \
> else \
> imx_iomux_v3_setup_pad(MX6DL_##p | q);
>
> and then use
>
> MX6_SET_PAD(PAD_CSI0_DAT10__UART1_TXD, MUX_PAD_CTRL(UART_PAD_CTRL));
> MX6_SET_PAD(PAD_CSI0_DAT11__UART1_RXD, MUX_PAD_CTRL(UART_PAD_CTRL));
>
> for a readable setup of pad configurations.
>
The most common case of this will be multiple pads.
These are currently configured in various places as blocks
of pads by functional group (i.e. ENET pads, UART pads).
This path doesn't lead us to a single declaration of
such lists.
> Signed-off-by: Edward Lin <edward.lin@technexion.com>
> Signed-off-by: Richard Hu <richard.hu@technexion.com>
> ---
> arch/arm/include/asm/arch-mx6/mx6qdl_pins.h | 3290
> +++++++++++++++++++++++++++
> 1 file changed, 3290 insertions(+)
> create mode 100644 arch/arm/include/asm/arch-mx6/mx6qdl_pins.h
>
> diff --git a/arch/arm/include/asm/arch-mx6/mx6qdl_pins.h
> b/arch/arm/include/asm/arch-mx6/mx6qdl_pins.h
> new file mode 100644
> index 0000000..b41a877
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-mx6/mx6qdl_pins.h
> @@ -0,0 +1,3290 @@
> +/*
> + * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights
> Reserved.
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#ifndef __ASM_ARCH_MX6_MX6QDL_PINS_H__
> +#define __ASM_ARCH_MX6_MX6QDL_PINS_H__
> +
> +#include <asm/imx-common/iomux-v3.h>
> +
> +enum {
> + MX6DL_PAD_CSI0_DAT10__IPU1_CSI0_D_10 = IOMUX_PAD(0x0360,
> 0x004C, 0,
> 0x0000, 0, 0),
...
If we want a single binary to support 6DQ and 6DLS (and I do),
we really shouldn't duplicate everything here.
As much as I dislike macro-fu, the enums in mx6q_pins.h and mx6dl_pins.h
need to be macros instead of direct declarations of enum constants.
I'll try to write up some notes tomorrow so we can hash through
the specifics.
Regards,
Eric
prev parent reply other threads:[~2013-11-09 0:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1383902902.3157.488.camel@edward-x220-laptop>
2013-11-08 9:36 ` [U-Boot] [PATCH 3/4] mx6: add co-existing pad configuration macros mx6q/mx6dl Edward Lin
2013-11-09 0:08 ` Eric Nelson [this message]
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=527D7D16.4060409@boundarydevices.com \
--to=eric.nelson@boundarydevices.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