clk: renesas: Convert Gen2/Gen3 clock tables to clk-provider struct clk_div_table

Replace custom local structure with matching one from clk-provider.h .
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
This commit is contained in:
Marek Vasut 2023-01-26 21:06:02 +01:00 committed by Marek Vasut
parent 3c78ce8680
commit d48c38db13
2 changed files with 3 additions and 11 deletions

View File

@ -17,6 +17,7 @@
#include <log.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/clk-provider.h>
#include <dt-bindings/clock/renesas-cpg-mssr.h>
@ -26,11 +27,6 @@
#define CPG_PLL0CR 0x00d8
#define CPG_SDCKCR 0x0074
struct clk_div_table {
u8 val;
u8 div;
};
/* SDHI divisors */
static const struct clk_div_table cpg_sdh_div_table[] = {
{ 0, 2 }, { 1, 3 }, { 2, 4 }, { 3, 6 },

View File

@ -21,6 +21,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/clk-provider.h>
#include <reset-uclass.h>
#include <dt-bindings/clock/renesas-cpg-mssr.h>
@ -55,11 +56,6 @@
.div = (sd_div), \
}
struct sd_div_table {
u32 val;
unsigned int div;
};
/* SDn divider
* sd_srcfc sd_fc div
* stp_hck stp_ck (div) (div) = sd_srcfc x sd_fc
@ -75,7 +71,7 @@ struct sd_div_table {
* 1 0 3 (8) 0 (2) 16
* 1 0 4 (16) 0 (2) 32
*/
static const struct sd_div_table cpg_sd_div_table[] = {
static const struct clk_div_table cpg_sd_div_table[] = {
/* CPG_SD_DIV_TABLE_DATA(stp_hck, stp_ck, sd_srcfc, sd_fc, sd_div) */
CPG_SD_DIV_TABLE_DATA(0, 0, 0, 1, 4),
CPG_SD_DIV_TABLE_DATA(0, 0, 1, 1, 8),