Searched refs:src_clk_div (Results 1 – 9 of 9) sorted by relevance
/external/u-boot/drivers/clk/rockchip/ |
D | clk_rk3399.c | 494 int src_clk_div; in rk3399_i2c_set_clk() local 497 src_clk_div = GPLL_HZ / hz; in rk3399_i2c_set_clk() 498 assert(src_clk_div - 1 < 127); in rk3399_i2c_set_clk() 503 I2C_CLK_REG_VALUE(1, src_clk_div)); in rk3399_i2c_set_clk() 507 I2C_CLK_REG_VALUE(2, src_clk_div)); in rk3399_i2c_set_clk() 511 I2C_CLK_REG_VALUE(3, src_clk_div)); in rk3399_i2c_set_clk() 515 I2C_CLK_REG_VALUE(5, src_clk_div)); in rk3399_i2c_set_clk() 519 I2C_CLK_REG_VALUE(6, src_clk_div)); in rk3399_i2c_set_clk() 523 I2C_CLK_REG_VALUE(7, src_clk_div)); in rk3399_i2c_set_clk() 594 int src_clk_div; in rk3399_spi_set_clk() local [all …]
|
D | clk_rk3128.c | 310 int src_clk_div; in rockchip_mmc_set_clk() local 316 src_clk_div = DIV_ROUND_UP(clk_general_rate / 2, freq); in rockchip_mmc_set_clk() 318 if (src_clk_div > 128) { in rockchip_mmc_set_clk() 319 src_clk_div = DIV_ROUND_UP(OSC_HZ / 2, freq); in rockchip_mmc_set_clk() 330 (src_clk_div - 1) << EMMC_DIV_SHIFT); in rockchip_mmc_set_clk() 337 (src_clk_div - 1) << MMC0_DIV_SHIFT); in rockchip_mmc_set_clk() 369 int src_clk_div; in rk3128_peri_set_pclk() local 371 src_clk_div = PERI_ACLK_HZ / hz; in rk3128_peri_set_pclk() 372 assert(src_clk_div - 1 < 4); in rk3128_peri_set_pclk() 381 ((src_clk_div - 1) << 12)); in rk3128_peri_set_pclk() [all …]
|
D | clk_rk3328.c | 360 int src_clk_div; in rk3328_i2c_set_clk() local 362 src_clk_div = GPLL_HZ / hz; in rk3328_i2c_set_clk() 363 assert(src_clk_div - 1 < 127); in rk3328_i2c_set_clk() 370 (src_clk_div - 1) << CLK_I2C0_DIV_CON_SHIFT | in rk3328_i2c_set_clk() 377 (src_clk_div - 1) << CLK_I2C1_DIV_CON_SHIFT | in rk3328_i2c_set_clk() 384 (src_clk_div - 1) << CLK_I2C2_DIV_CON_SHIFT | in rk3328_i2c_set_clk() 391 (src_clk_div - 1) << CLK_I2C3_DIV_CON_SHIFT | in rk3328_i2c_set_clk() 399 return DIV_TO_RATE(GPLL_HZ, src_clk_div); in rk3328_i2c_set_clk() 469 int src_clk_div; in rk3328_mmc_set_clk() local 486 src_clk_div = DIV_ROUND_UP(GPLL_HZ / 2, set_rate); in rk3328_mmc_set_clk() [all …]
|
D | clk_rk3288.c | 562 int src_clk_div; in rockchip_mmc_set_clk() local 567 src_clk_div = DIV_ROUND_UP(gclk_rate / 2, freq); in rockchip_mmc_set_clk() 569 if (src_clk_div > 0x3f) { in rockchip_mmc_set_clk() 570 src_clk_div = DIV_ROUND_UP(OSC_HZ / 2, freq); in rockchip_mmc_set_clk() 571 assert(src_clk_div < 0x40); in rockchip_mmc_set_clk() 586 (src_clk_div - 1) << EMMC_DIV_SHIFT); in rockchip_mmc_set_clk() 593 (src_clk_div - 1) << MMC0_DIV_SHIFT); in rockchip_mmc_set_clk() 600 (src_clk_div - 1) << SDIO0_DIV_SHIFT); in rockchip_mmc_set_clk() 642 int src_clk_div; in rockchip_spi_set_clk() local 645 src_clk_div = DIV_ROUND_UP(gclk_rate, freq) - 1; in rockchip_spi_set_clk() [all …]
|
D | clk_rk3188.c | 290 int src_clk_div; in rockchip_mmc_set_clk() local 294 src_clk_div = DIV_ROUND_UP(gclk_rate / 2, freq) - 1; in rockchip_mmc_set_clk() 295 assert(src_clk_div <= 0x3f); in rockchip_mmc_set_clk() 302 src_clk_div << EMMC_DIV_SHIFT); in rockchip_mmc_set_clk() 308 src_clk_div << MMC0_DIV_SHIFT); in rockchip_mmc_set_clk() 314 src_clk_div << SDIO_DIV_SHIFT); in rockchip_mmc_set_clk() 348 int src_clk_div = DIV_ROUND_UP(gclk_rate, freq) - 1; in rockchip_spi_set_clk() local 350 assert(src_clk_div < 128); in rockchip_spi_set_clk() 353 assert(src_clk_div <= SPI0_DIV_MASK); in rockchip_spi_set_clk() 356 src_clk_div << SPI0_DIV_SHIFT); in rockchip_spi_set_clk() [all …]
|
D | clk_rk3036.c | 241 int src_clk_div; in rockchip_mmc_set_clk() local 247 src_clk_div = DIV_ROUND_UP(clk_general_rate / 2, freq); in rockchip_mmc_set_clk() 249 if (src_clk_div > 128) { in rockchip_mmc_set_clk() 250 src_clk_div = DIV_ROUND_UP(OSC_HZ / 2, freq); in rockchip_mmc_set_clk() 251 assert(src_clk_div - 1 < 128); in rockchip_mmc_set_clk() 263 (src_clk_div - 1) << EMMC_DIV_SHIFT); in rockchip_mmc_set_clk() 270 (src_clk_div - 1) << MMC0_DIV_SHIFT); in rockchip_mmc_set_clk()
|
D | clk_rk3368.c | 403 int src_clk_div; in rk3368_spi_set_clk() local 405 src_clk_div = DIV_ROUND_UP(GPLL_HZ, hz); in rk3368_spi_set_clk() 406 assert(src_clk_div < 127); in rk3368_spi_set_clk() 421 ((src_clk_div << spiclk->div_shift) | in rk3368_spi_set_clk() 440 int src_clk_div; in rk3368_saradc_set_clk() local 442 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz) - 1; in rk3368_saradc_set_clk() 443 assert(src_clk_div < 128); in rk3368_saradc_set_clk() 447 src_clk_div << CLK_SARADC_DIV_CON_SHIFT); in rk3368_saradc_set_clk()
|
D | clk_rk322x.c | 277 int src_clk_div; in rockchip_mmc_set_clk() local 283 src_clk_div = DIV_ROUND_UP(clk_general_rate / 2, freq); in rockchip_mmc_set_clk() 285 if (src_clk_div > 128) { in rockchip_mmc_set_clk() 286 src_clk_div = DIV_ROUND_UP(OSC_HZ / 2, freq); in rockchip_mmc_set_clk() 287 assert(src_clk_div - 1 < 128); in rockchip_mmc_set_clk() 301 (src_clk_div - 1) << EMMC_DIV_SHIFT); in rockchip_mmc_set_clk() 308 (src_clk_div - 1) << MMC0_DIV_SHIFT); in rockchip_mmc_set_clk()
|
D | clk_rv1108.c | 145 int src_clk_div; in rv1108_saradc_set_clk() local 147 src_clk_div = DIV_ROUND_UP(OSC_HZ, hz) - 1; in rv1108_saradc_set_clk() 148 assert(src_clk_div < 128); in rv1108_saradc_set_clk() 152 src_clk_div << CLK_SARADC_DIV_CON_SHIFT); in rv1108_saradc_set_clk()
|