Fixes for static checker warning and a wrong shift value for the mmc
on rk3328, as well as setting a hdmi-id on rk3066 for a later driver for the hdmi encoder on it and some adapted rk3288 pll rates to support more and better hdmi rates. -----BEGIN PGP SIGNATURE----- iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAlvHPQAQHGhlaWtvQHNu dGVjaC5kZQAKCRDzpnnJnNEdgeToB/9yrKATgPccrdGUllHETVtab7efGa23vt92 oDIeESft9chjwN34rd5BPpkN72CvCHJs6IQiAgQ7YetTpMtfCJWhob5KYXm5mYDI 1P/VmAXQoGQ3pv9yXFaOui27dhvtxTueXeZQ7vM1Xhu2t2+v6ctgjDe86cdmtwnv VS80QDAO+nQwSTRQ+yq4z8Egm8nwux5xFabsMbnM33uQLS+r/2V2ZKr7Dc4sjMjq HrNs6Cu9UCSuHHEpdWvi5tE0N6FhsDa6c/E49aHkyX5uG9T7nLVxL37D8t5EHLol Am6gpUE5VVqP1w8MdGFWhHiBXNd4leP4/qyw51vgyonQT3jOKh9b =BV2j -----END PGP SIGNATURE----- Merge tag 'v4.20-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: Fixes for static checker warning and a wrong shift value for the mmc on rk3328, as well as setting a hdmi-id on rk3066 for a later driver for the hdmi encoder on it and some adapted rk3288 pll rates to support more and better hdmi rates. * tag 'v4.20-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: Fix static checker warning in rockchip_ddrclk_get_parent call clk: rockchip: use the newly added clock-id for hdmi on RK3066 clk: rockchip: add clock-id for HCLK_HDMI on rk3066 clk: rockchip: fix wrong mmc sample phase shift for rk3328 clk: rockchip: improve rk3288 pll rates for better hdmi output
This commit is contained in:
commit
1b4d990b19
@ -80,16 +80,12 @@ static long rockchip_ddrclk_sip_round_rate(struct clk_hw *hw,
|
||||
static u8 rockchip_ddrclk_get_parent(struct clk_hw *hw)
|
||||
{
|
||||
struct rockchip_ddrclk *ddrclk = to_rockchip_ddrclk_hw(hw);
|
||||
int num_parents = clk_hw_get_num_parents(hw);
|
||||
u32 val;
|
||||
|
||||
val = clk_readl(ddrclk->reg_base +
|
||||
ddrclk->mux_offset) >> ddrclk->mux_shift;
|
||||
val &= GENMASK(ddrclk->mux_width - 1, 0);
|
||||
|
||||
if (val >= num_parents)
|
||||
return -EINVAL;
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -645,7 +645,7 @@ static struct rockchip_clk_branch rk3066a_clk_branches[] __initdata = {
|
||||
GATE(HCLK_I2S1, "hclk_i2s1", "hclk_cpu", 0, RK2928_CLKGATE_CON(7), 3, GFLAGS),
|
||||
GATE(HCLK_I2S2, "hclk_i2s2", "hclk_cpu", 0, RK2928_CLKGATE_CON(7), 4, GFLAGS),
|
||||
GATE(HCLK_CIF1, "hclk_cif1", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 6, GFLAGS),
|
||||
GATE(0, "hclk_hdmi", "hclk_cpu", 0, RK2928_CLKGATE_CON(4), 14, GFLAGS),
|
||||
GATE(HCLK_HDMI, "hclk_hdmi", "hclk_cpu", 0, RK2928_CLKGATE_CON(4), 14, GFLAGS),
|
||||
|
||||
GATE(HCLK_OTG1, "hclk_usbotg1", "hclk_peri", CLK_IGNORE_UNUSED,
|
||||
RK2928_CLKGATE_CON(5), 14, GFLAGS),
|
||||
|
@ -83,22 +83,43 @@ static struct rockchip_pll_rate_table rk3288_pll_rates[] = {
|
||||
RK3066_PLL_RATE( 768000000, 1, 64, 2),
|
||||
RK3066_PLL_RATE( 742500000, 8, 495, 2),
|
||||
RK3066_PLL_RATE( 696000000, 1, 58, 2),
|
||||
RK3066_PLL_RATE_NB(621000000, 1, 207, 8, 1),
|
||||
RK3066_PLL_RATE( 600000000, 1, 50, 2),
|
||||
RK3066_PLL_RATE_NB(594000000, 1, 198, 8, 1),
|
||||
RK3066_PLL_RATE( 552000000, 1, 46, 2),
|
||||
RK3066_PLL_RATE( 504000000, 1, 84, 4),
|
||||
RK3066_PLL_RATE( 500000000, 3, 125, 2),
|
||||
RK3066_PLL_RATE( 456000000, 1, 76, 4),
|
||||
RK3066_PLL_RATE( 428000000, 1, 107, 6),
|
||||
RK3066_PLL_RATE( 408000000, 1, 68, 4),
|
||||
RK3066_PLL_RATE( 400000000, 3, 100, 2),
|
||||
RK3066_PLL_RATE_NB( 394000000, 1, 197, 12, 1),
|
||||
RK3066_PLL_RATE( 384000000, 2, 128, 4),
|
||||
RK3066_PLL_RATE( 360000000, 1, 60, 4),
|
||||
RK3066_PLL_RATE_NB( 356000000, 1, 178, 12, 1),
|
||||
RK3066_PLL_RATE_NB( 324000000, 1, 189, 14, 1),
|
||||
RK3066_PLL_RATE( 312000000, 1, 52, 4),
|
||||
RK3066_PLL_RATE( 300000000, 1, 50, 4),
|
||||
RK3066_PLL_RATE( 297000000, 2, 198, 8),
|
||||
RK3066_PLL_RATE_NB( 308000000, 1, 154, 12, 1),
|
||||
RK3066_PLL_RATE_NB( 303000000, 1, 202, 16, 1),
|
||||
RK3066_PLL_RATE( 300000000, 1, 75, 6),
|
||||
RK3066_PLL_RATE_NB( 297750000, 2, 397, 16, 1),
|
||||
RK3066_PLL_RATE_NB( 293250000, 2, 391, 16, 1),
|
||||
RK3066_PLL_RATE_NB( 292500000, 1, 195, 16, 1),
|
||||
RK3066_PLL_RATE( 273600000, 1, 114, 10),
|
||||
RK3066_PLL_RATE_NB( 273000000, 1, 182, 16, 1),
|
||||
RK3066_PLL_RATE_NB( 270000000, 1, 180, 16, 1),
|
||||
RK3066_PLL_RATE_NB( 266250000, 2, 355, 16, 1),
|
||||
RK3066_PLL_RATE_NB( 256500000, 1, 171, 16, 1),
|
||||
RK3066_PLL_RATE( 252000000, 1, 84, 8),
|
||||
RK3066_PLL_RATE( 216000000, 1, 72, 8),
|
||||
RK3066_PLL_RATE( 148500000, 2, 99, 8),
|
||||
RK3066_PLL_RATE_NB( 250500000, 1, 167, 16, 1),
|
||||
RK3066_PLL_RATE_NB( 243428571, 1, 142, 14, 1),
|
||||
RK3066_PLL_RATE( 238000000, 1, 119, 12),
|
||||
RK3066_PLL_RATE_NB( 219750000, 2, 293, 16, 1),
|
||||
RK3066_PLL_RATE_NB( 216000000, 1, 144, 16, 1),
|
||||
RK3066_PLL_RATE_NB( 213000000, 1, 142, 16, 1),
|
||||
RK3066_PLL_RATE( 195428571, 1, 114, 14),
|
||||
RK3066_PLL_RATE( 160000000, 1, 80, 12),
|
||||
RK3066_PLL_RATE( 157500000, 1, 105, 16),
|
||||
RK3066_PLL_RATE( 126000000, 1, 84, 16),
|
||||
RK3066_PLL_RATE( 48000000, 1, 64, 32),
|
||||
{ /* sentinel */ },
|
||||
|
@ -813,22 +813,22 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
|
||||
MMC(SCLK_SDMMC_DRV, "sdmmc_drv", "clk_sdmmc",
|
||||
RK3328_SDMMC_CON0, 1),
|
||||
MMC(SCLK_SDMMC_SAMPLE, "sdmmc_sample", "clk_sdmmc",
|
||||
RK3328_SDMMC_CON1, 1),
|
||||
RK3328_SDMMC_CON1, 0),
|
||||
|
||||
MMC(SCLK_SDIO_DRV, "sdio_drv", "clk_sdio",
|
||||
RK3328_SDIO_CON0, 1),
|
||||
MMC(SCLK_SDIO_SAMPLE, "sdio_sample", "clk_sdio",
|
||||
RK3328_SDIO_CON1, 1),
|
||||
RK3328_SDIO_CON1, 0),
|
||||
|
||||
MMC(SCLK_EMMC_DRV, "emmc_drv", "clk_emmc",
|
||||
RK3328_EMMC_CON0, 1),
|
||||
MMC(SCLK_EMMC_SAMPLE, "emmc_sample", "clk_emmc",
|
||||
RK3328_EMMC_CON1, 1),
|
||||
RK3328_EMMC_CON1, 0),
|
||||
|
||||
MMC(SCLK_SDMMC_EXT_DRV, "sdmmc_ext_drv", "clk_sdmmc_ext",
|
||||
RK3328_SDMMC_EXT_CON0, 1),
|
||||
MMC(SCLK_SDMMC_EXT_SAMPLE, "sdmmc_ext_sample", "clk_sdmmc_ext",
|
||||
RK3328_SDMMC_EXT_CON1, 1),
|
||||
RK3328_SDMMC_EXT_CON1, 0),
|
||||
};
|
||||
|
||||
static const char *const rk3328_critical_clocks[] __initconst = {
|
||||
|
@ -139,8 +139,9 @@
|
||||
#define HCLK_CIF1 470
|
||||
#define HCLK_VEPU 471
|
||||
#define HCLK_VDPU 472
|
||||
#define HCLK_HDMI 473
|
||||
|
||||
#define CLK_NR_CLKS (HCLK_VDPU + 1)
|
||||
#define CLK_NR_CLKS (HCLK_HDMI + 1)
|
||||
|
||||
/* soft-reset indices */
|
||||
#define SRST_MCORE 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user