mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-16 04:07:00 +02:00
Split imx_pinctrl_set_state() into imx_pinctrl_set_state_common() and imx_pinctrl_set_state_mmio(). The former does the common configuration parsing, the later does call imx_pinctrl_set_state_common() and then does pin configuration using either SCU or MMIO accesses. The SCU part is going to be moved out in follow up patches. This is a preparatory patch for follow up pinctrl drivers which do not use the MMIO accessors, but some other means, like SCU or otherwise. Those will call the common imx_pinctrl_set_state_common() function wrapped into some other imx_pinctrl_set_state_*() function, in a way similar to imx_pinctrl_set_state_mmio() does so for MMIO accesses. Update all imx_pinctrl_set_state_mmio() call sites to call imx_pinctrl_set_state_mmio() instead. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
36 lines
868 B
C
36 lines
868 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2019
|
|
* Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com>
|
|
*/
|
|
|
|
#include <dm.h>
|
|
#include <dm/pinctrl.h>
|
|
|
|
#include "pinctrl-imx.h"
|
|
|
|
static struct imx_pinctrl_soc_info imxrt_pinctrl_soc_info = {
|
|
.flags = ZERO_OFFSET_VALID,
|
|
};
|
|
|
|
static const struct udevice_id imxrt_pinctrl_match[] = {
|
|
{ .compatible = "fsl,imxrt-iomuxc",
|
|
.data = (ulong)&imxrt_pinctrl_soc_info },
|
|
{ /* sentinel */ }
|
|
};
|
|
|
|
static const struct pinctrl_ops imxrt_pinctrl_ops = {
|
|
.set_state = imx_pinctrl_set_state_mmio,
|
|
};
|
|
|
|
U_BOOT_DRIVER(imxrt_pinctrl) = {
|
|
.name = "imxrt-pinctrl",
|
|
.id = UCLASS_PINCTRL,
|
|
.of_match = of_match_ptr(imxrt_pinctrl_match),
|
|
.probe = imx_pinctrl_probe_mmio,
|
|
.remove = imx_pinctrl_remove_mmio,
|
|
.priv_auto = sizeof(struct imx_pinctrl_priv),
|
|
.ops = &imxrt_pinctrl_ops,
|
|
.flags = DM_FLAG_PRE_RELOC,
|
|
};
|