[PATCH 1/2] arm/mx5: parse iomuxc pad configuratoin from device tree

Sascha Hauer s.hauer at pengutronix.de
Tue Jul 26 02:39:14 EDT 2011


On Mon, Jul 25, 2011 at 11:07:46PM +0800, Shawn Guo wrote:
> It adds function mxc_iomuxc_dt_init() to parse iomuxc pad configuration
> from device tree.
> 
> Signed-off-by: Shawn Guo <shawn.guo at linaro.org>
> Cc: Grant Likely <grant.likely at secretlab.ca>
> Cc: Sascha Hauer <s.hauer at pengutronix.de>
> ---
>  .../devicetree/bindings/arm/fsl/iomuxc.txt         |   47 +++++++++++++
>  arch/arm/mach-mx5/Makefile                         |    2 +
>  arch/arm/mach-mx5/iomuxc-dt.c                      |   72 ++++++++++++++++++++
>  arch/arm/plat-mxc/include/mach/common.h            |    3 +
>  4 files changed, 124 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/arm/fsl/iomuxc.txt
>  create mode 100644 arch/arm/mach-mx5/iomuxc-dt.c
> 
> + */
> +
> +#include <linux/of.h>
> +#include <asm/io.h>

linux/io.h

> +
> +#define IOMUXC_CONFIG_SION	(1 << 4)
> +
> +void mxc_iomuxc_dt_init(const struct of_device_id *match)
> +{
> +	struct device_node *node = of_find_matching_node(NULL, match);
> +	struct device_node *child;
> +	void __iomem *base;
> +	u32 reg[2], select_input[2];
> +	u32 mux_mode, pad_ctl;
> +
> +	if (!node) {
> +		pr_warn("%s: no iomuxc node found\n", __func__);
> +		return;
> +	}

Please remove this warning. Some boards may intentionally do the iomux
setup in the bootloader and skip the iomux setup nodes in the device
tree.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-arm-kernel mailing list