gmi 53 drivers/bus/tegra-gmi.c static int tegra_gmi_enable(struct tegra_gmi *gmi) gmi 57 drivers/bus/tegra-gmi.c err = clk_prepare_enable(gmi->clk); gmi 59 drivers/bus/tegra-gmi.c dev_err(gmi->dev, "failed to enable clock: %d\n", err); gmi 63 drivers/bus/tegra-gmi.c reset_control_assert(gmi->rst); gmi 65 drivers/bus/tegra-gmi.c reset_control_deassert(gmi->rst); gmi 67 drivers/bus/tegra-gmi.c writel(gmi->snor_timing0, gmi->base + TEGRA_GMI_TIMING0); gmi 68 drivers/bus/tegra-gmi.c writel(gmi->snor_timing1, gmi->base + TEGRA_GMI_TIMING1); gmi 70 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_CONFIG_GO; gmi 71 drivers/bus/tegra-gmi.c writel(gmi->snor_config, gmi->base + TEGRA_GMI_CONFIG); gmi 76 drivers/bus/tegra-gmi.c static void tegra_gmi_disable(struct tegra_gmi *gmi) gmi 81 drivers/bus/tegra-gmi.c config = readl(gmi->base + TEGRA_GMI_CONFIG); gmi 83 drivers/bus/tegra-gmi.c writel(config, gmi->base + TEGRA_GMI_CONFIG); gmi 85 drivers/bus/tegra-gmi.c reset_control_assert(gmi->rst); gmi 86 drivers/bus/tegra-gmi.c clk_disable_unprepare(gmi->clk); gmi 89 drivers/bus/tegra-gmi.c static int tegra_gmi_parse_dt(struct tegra_gmi *gmi) gmi 95 drivers/bus/tegra-gmi.c child = of_get_next_available_child(gmi->dev->of_node, NULL); gmi 97 drivers/bus/tegra-gmi.c dev_err(gmi->dev, "no child nodes found\n"); gmi 106 drivers/bus/tegra-gmi.c if (of_get_child_count(gmi->dev->of_node) > 1) gmi 107 drivers/bus/tegra-gmi.c dev_warn(gmi->dev, "only one child device is supported."); gmi 110 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_BUS_WIDTH_32BIT; gmi 113 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_MUX_MODE; gmi 116 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_RDY_BEFORE_DATA; gmi 119 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_RDY_ACTIVE_HIGH; gmi 122 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_ADV_ACTIVE_HIGH; gmi 125 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_OE_ACTIVE_HIGH; gmi 128 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_CS_ACTIVE_HIGH; gmi 135 drivers/bus/tegra-gmi.c dev_err(gmi->dev, gmi 147 drivers/bus/tegra-gmi.c dev_err(gmi->dev, gmi 157 drivers/bus/tegra-gmi.c dev_err(gmi->dev, "invalid chip select: %d", property); gmi 162 drivers/bus/tegra-gmi.c gmi->snor_config |= TEGRA_GMI_CS_SELECT(property); gmi 166 drivers/bus/tegra-gmi.c gmi->snor_timing0 |= TEGRA_GMI_MUXED_WIDTH(property); gmi 168 drivers/bus/tegra-gmi.c gmi->snor_timing0 |= TEGRA_GMI_MUXED_WIDTH(1); gmi 171 drivers/bus/tegra-gmi.c gmi->snor_timing0 |= TEGRA_GMI_HOLD_WIDTH(property); gmi 173 drivers/bus/tegra-gmi.c gmi->snor_timing0 |= TEGRA_GMI_HOLD_WIDTH(1); gmi 176 drivers/bus/tegra-gmi.c gmi->snor_timing0 |= TEGRA_GMI_ADV_WIDTH(property); gmi 178 drivers/bus/tegra-gmi.c gmi->snor_timing0 |= TEGRA_GMI_ADV_WIDTH(1); gmi 181 drivers/bus/tegra-gmi.c gmi->snor_timing0 |= TEGRA_GMI_CE_WIDTH(property); gmi 183 drivers/bus/tegra-gmi.c gmi->snor_timing0 |= TEGRA_GMI_CE_WIDTH(4); gmi 186 drivers/bus/tegra-gmi.c gmi->snor_timing1 |= TEGRA_GMI_WE_WIDTH(property); gmi 188 drivers/bus/tegra-gmi.c gmi->snor_timing1 |= TEGRA_GMI_WE_WIDTH(1); gmi 191 drivers/bus/tegra-gmi.c gmi->snor_timing1 |= TEGRA_GMI_OE_WIDTH(property); gmi 193 drivers/bus/tegra-gmi.c gmi->snor_timing1 |= TEGRA_GMI_OE_WIDTH(1); gmi 196 drivers/bus/tegra-gmi.c gmi->snor_timing1 |= TEGRA_GMI_WAIT_WIDTH(property); gmi 198 drivers/bus/tegra-gmi.c gmi->snor_timing1 |= TEGRA_GMI_WAIT_WIDTH(3); gmi 208 drivers/bus/tegra-gmi.c struct tegra_gmi *gmi; gmi 212 drivers/bus/tegra-gmi.c gmi = devm_kzalloc(dev, sizeof(*gmi), GFP_KERNEL); gmi 213 drivers/bus/tegra-gmi.c if (!gmi) gmi 216 drivers/bus/tegra-gmi.c gmi->dev = dev; gmi 219 drivers/bus/tegra-gmi.c gmi->base = devm_ioremap_resource(dev, res); gmi 220 drivers/bus/tegra-gmi.c if (IS_ERR(gmi->base)) gmi 221 drivers/bus/tegra-gmi.c return PTR_ERR(gmi->base); gmi 223 drivers/bus/tegra-gmi.c gmi->clk = devm_clk_get(dev, "gmi"); gmi 224 drivers/bus/tegra-gmi.c if (IS_ERR(gmi->clk)) { gmi 226 drivers/bus/tegra-gmi.c return PTR_ERR(gmi->clk); gmi 229 drivers/bus/tegra-gmi.c gmi->rst = devm_reset_control_get(dev, "gmi"); gmi 230 drivers/bus/tegra-gmi.c if (IS_ERR(gmi->rst)) { gmi 232 drivers/bus/tegra-gmi.c return PTR_ERR(gmi->rst); gmi 235 drivers/bus/tegra-gmi.c err = tegra_gmi_parse_dt(gmi); gmi 239 drivers/bus/tegra-gmi.c err = tegra_gmi_enable(gmi); gmi 246 drivers/bus/tegra-gmi.c tegra_gmi_disable(gmi); gmi 250 drivers/bus/tegra-gmi.c platform_set_drvdata(pdev, gmi); gmi 257 drivers/bus/tegra-gmi.c struct tegra_gmi *gmi = platform_get_drvdata(pdev); gmi 259 drivers/bus/tegra-gmi.c of_platform_depopulate(gmi->dev); gmi 260 drivers/bus/tegra-gmi.c tegra_gmi_disable(gmi); gmi 1479 drivers/pinctrl/tegra/pinctrl-tegra114.c FUNCTION(gmi), gmi 1641 drivers/pinctrl/tegra/pinctrl-tegra124.c FUNCTION(gmi), gmi 1911 drivers/pinctrl/tegra/pinctrl-tegra20.c FUNCTION(gmi), gmi 2035 drivers/pinctrl/tegra/pinctrl-tegra30.c FUNCTION(gmi),