public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: phorton@bitbox.co.uk (Peter Horton)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] i.MX51: Full iomux support
Date: Wed, 15 Dec 2010 16:12:50 +0000	[thread overview]
Message-ID: <4D08E902.80308@bitbox.co.uk> (raw)
In-Reply-To: <1292421691-14615-1-git-send-email-s.hauer@pengutronix.de>

On 15/12/2010 14:01, Sascha Hauer wrote:
>
> The following series picks up the patch from Lothar Wa?mann replacing
> the struct pad_desc with a 64bit variable and adds full i.MX51 iomux
> support based on this patch.
> The iomux configurations are taken from the Freescale pinmux tool, so the
> definitions should be rather complete. Anyway, there are some modes
> not present in the tool.
> I took the padmux settings from the old iomux support where present.
> This series was tested on the babbage board, but due to the mass of defines
> they are of course not completely tested, so please test yourself if
> your board still works.
>

I had just started implementing an alternative solution :(

MACROS
======

#define _MX51_PAD_DEF(mux, pad)	.mux_ctrl_ofs = (mux), .pad_ctrl_ofs = (pad)
#define _MX51_SIG_DEF(sel)	.select_input_ofs = (sel)
#define _MX51_MAP_DEF(mux, sel)	.mux_mode = (mux), .select_input = (sel)
#define _MX51_CTL_DEF(ctl)	.pad_ctrl = (ctl)

/* pad definitions */

...
#define _MX51_PAD_EIM_D25		_MX51_PAD_DEF(0x414, 0x080)
...

/* signal definitions */

...
#define _MX51_SIG_UART3_RXD		_MX51_SIG_DEF(0x9f4)
...

/* pad to signal mappings */

...
#define _MX51_MAP_EIM_D25__UART3_RXD	_MX51_MAP_DEF(3, 0)
...

/* default pad control settings */

...
#define _MX51_CTL_EIM_D25__UART3_RXD	_MX51_CTL_DEF(MX51_UART3_PAD_CTRL)
...

/* external macros */

#define MX51_PAD(pad, sig) \
	{ _MX51_PAD_##pad, _MX51_SIG_##sig, _MX51_MAP_##pad##__##sig, 
_MX51_CTL_##pad##__##sig }

#define MX51_PAD_CTL(pad, sig, ctl) \
	{ _MX51_PAD_##pad, _MX51_SIG_##sig, _MX51_MAP_##pad##__##sig, 
_MX51_CTL_DEF(ctl) }

USAGE
=====

/* using the default pad control value */

static iomux_v3_cfg_t board_pads[] = {
	...
	MX51_PAD(EIM_D25, UART3_RXD),
	...
};

/* specifying a pad control value */

static iomux_v3_cfg_t board_pads[] = {
	...
	MX51_PAD_CTL(EIM_D25, UART3_RXD, PAD_CTL_DSE_HIGH),
	...
};

      parent reply	other threads:[~2010-12-15 16:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 14:01 [PATCH] i.MX51: Full iomux support Sascha Hauer
2010-12-15 14:01 ` [PATCH 1/2] MXC IOMUX-V3 replace struct pad_desc with bitmapped cookie (step 2) Sascha Hauer
2010-12-15 14:01 ` [PATCH 2/2] ARM i.MX51: Full iomux support Sascha Hauer
2010-12-15 14:29 ` [PATCH] " Arnaud Patard (Rtp)
2010-12-15 15:10   ` Lothar Waßmann
2010-12-15 15:23     ` Sascha Hauer
2010-12-15 15:37     ` Arnaud Patard (Rtp)
2010-12-27 17:47       ` Nguyen Dinh-R00091
2010-12-27 18:25       ` Nguyen Dinh-R00091
2010-12-28  7:38         ` Lothar Waßmann
2010-12-15 15:15   ` Sascha Hauer
2010-12-15 15:19     ` Lothar Waßmann
2010-12-15 16:12 ` Peter Horton [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=4D08E902.80308@bitbox.co.uk \
    --to=phorton@bitbox.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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