@@ -540,6 +540,7 @@ struct rcar_canfd_hw_info {
unsigned multi_channel_irqs:1; /* Has multiple channel irqs */
unsigned ch_interface_mode:1; /* Has channel interface mode */
unsigned shared_can_regs:1; /* Has shared classical can registers */
+ unsigned external_clk:1; /* Has external clock */
};
/* Channel priv data */
@@ -689,6 +690,7 @@ static const struct rcar_canfd_hw_info rcar_gen3_hw_info = {
.shared_global_irqs = 1,
.ch_interface_mode = 0,
.shared_can_regs = 0,
+ .external_clk = 1,
};
static const struct rcar_canfd_hw_info rcar_gen4_hw_info = {
@@ -704,6 +706,7 @@ static const struct rcar_canfd_hw_info rcar_gen4_hw_info = {
.shared_global_irqs = 1,
.ch_interface_mode = 1,
.shared_can_regs = 1,
+ .external_clk = 1,
};
static const struct rcar_canfd_hw_info rzg2l_hw_info = {
@@ -719,6 +722,7 @@ static const struct rcar_canfd_hw_info rzg2l_hw_info = {
.multi_channel_irqs = 1,
.ch_interface_mode = 0,
.shared_can_regs = 0,
+ .external_clk = 1,
};
/* Helper functions */
@@ -2047,7 +2051,7 @@ static int rcar_canfd_probe(struct platform_device *pdev)
fcan_freq = clk_get_rate(gpriv->can_clk) / info->postdiv;
} else {
fcan_freq = clk_get_rate(gpriv->can_clk);
- gpriv->extclk = true;
+ gpriv->extclk = gpriv->info->external_clk;
}
addr = devm_platform_ioremap_resource(pdev, 0);