mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
bb6d3fa98a
The old SD handling code was huge and could not handle all the details which showed up on R-Car Gen3 SoCs meanwhile. It is time to switch to another design. Have SDnH a separate clock, use the existing divider clocks and move the errata handling from the clock driver to the SDHI driver where it belongs. This patch removes the old SD handling code and switch to the new one. This updates the SDHI driver at the same time. Because the SDHI driver can only communicate with the clock driver via clk_set_rate(), I don't see an alternative to this flag-day-approach, so we cross subsystems here. The patch sadly looks messy for the CPG lib, but it is basically a huge chunk of code removed and smaller chunks added. It looks much better when you just view the resulting source file. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC Link: https://lore.kernel.org/r/20211110191610.5664-6-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* R-Car Gen3 Clock Pulse Generator Library
|
|
*
|
|
* Copyright (C) 2015-2018 Glider bvba
|
|
* Copyright (C) 2019 Renesas Electronics Corp.
|
|
*
|
|
* Based on clk-rcar-gen3.c
|
|
*
|
|
* Copyright (C) 2015 Renesas Electronics Corp.
|
|
*/
|
|
|
|
#ifndef __CLK_RENESAS_RCAR_CPG_LIB_H__
|
|
#define __CLK_RENESAS_RCAR_CPG_LIB_H__
|
|
|
|
extern spinlock_t cpg_lock;
|
|
|
|
struct cpg_simple_notifier {
|
|
struct notifier_block nb;
|
|
void __iomem *reg;
|
|
u32 saved;
|
|
};
|
|
|
|
void cpg_simple_notifier_register(struct raw_notifier_head *notifiers,
|
|
struct cpg_simple_notifier *csn);
|
|
|
|
void cpg_reg_modify(void __iomem *reg, u32 clear, u32 set);
|
|
|
|
struct clk * __init cpg_sdh_clk_register(const char *name,
|
|
void __iomem *sdnckcr, const char *parent_name,
|
|
struct raw_notifier_head *notifiers);
|
|
|
|
struct clk * __init cpg_sd_clk_register(const char *name,
|
|
void __iomem *sdnckcr, const char *parent_name);
|
|
|
|
struct clk * __init cpg_rpc_clk_register(const char *name,
|
|
void __iomem *rpcckcr, const char *parent_name,
|
|
struct raw_notifier_head *notifiers);
|
|
|
|
struct clk * __init cpg_rpcd2_clk_register(const char *name,
|
|
void __iomem *rpcckcr,
|
|
const char *parent_name);
|
|
#endif
|