Commit 99767cd4 authored by Michał Mirosław's avatar Michał Mirosław Committed by Stephen Boyd
Browse files

clk: at91: allow setting PCKx parent via DT



This exposes PROGx clocks for use in assigned-clocks DeviceTree property
for selecting PCKx parent clock.

Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lkml.kernel.org/r/0054532c00163ddf405dad658b32f0d7d97fcc8e.1588630999.git.mirq-linux@rere.qmqm.pl


Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 7425f246
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)

	at91rm9200_pmc = pmc_data_allocate(PMC_MAIN + 1,
					    nck(at91rm9200_systemck),
					    nck(at91rm9200_periphck), 0);
					    nck(at91rm9200_periphck), 0, 4);
	if (!at91rm9200_pmc)
		return;

@@ -159,6 +159,8 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
						    &at91rm9200_programmable_layout);
		if (IS_ERR(hw))
			goto err_free;

		at91rm9200_pmc->pchws[i] = hw;
	}

	for (i = 0; i < ARRAY_SIZE(at91rm9200_systemck); i++) {
+4 −1
Original line number Diff line number Diff line
@@ -354,7 +354,8 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,

	at91sam9260_pmc = pmc_data_allocate(PMC_MAIN + 1,
					    ndck(data->sck, data->num_sck),
					    ndck(data->pck, data->num_pck), 0);
					    ndck(data->pck, data->num_pck),
					    0, data->num_progck);
	if (!at91sam9260_pmc)
		return;

@@ -434,6 +435,8 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
						    &at91rm9200_programmable_layout);
		if (IS_ERR(hw))
			goto err_free;

		at91sam9260_pmc->pchws[i] = hw;
	}

	for (i = 0; i < data->num_sck; i++) {
+3 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)

	at91sam9g45_pmc = pmc_data_allocate(PMC_MAIN + 1,
					    nck(at91sam9g45_systemck),
					    nck(at91sam9g45_periphck), 0);
					    nck(at91sam9g45_periphck), 0, 2);
	if (!at91sam9g45_pmc)
		return;

@@ -182,6 +182,8 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
						    &at91sam9g45_programmable_layout);
		if (IS_ERR(hw))
			goto err_free;

		at91sam9g45_pmc->pchws[i] = hw;
	}

	for (i = 0; i < ARRAY_SIZE(at91sam9g45_systemck); i++) {
+3 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
		return;

	at91sam9n12_pmc = pmc_data_allocate(PMC_MAIN + 1,
					   nck(at91sam9n12_systemck), 31, 0);
					   nck(at91sam9n12_systemck), 31, 0, 2);
	if (!at91sam9n12_pmc)
		return;

@@ -198,6 +198,8 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
						    &at91sam9x5_programmable_layout);
		if (IS_ERR(hw))
			goto err_free;

		at91sam9n12_pmc->pchws[i] = hw;
	}

	for (i = 0; i < ARRAY_SIZE(at91sam9n12_systemck); i++) {
+3 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)

	at91sam9rl_pmc = pmc_data_allocate(PMC_MAIN + 1,
					   nck(at91sam9rl_systemck),
					   nck(at91sam9rl_periphck), 0);
					   nck(at91sam9rl_periphck), 0, 2);
	if (!at91sam9rl_pmc)
		return;

@@ -138,6 +138,8 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
						    &at91rm9200_programmable_layout);
		if (IS_ERR(hw))
			goto err_free;

		at91sam9rl_pmc->pchws[i] = hw;
	}

	for (i = 0; i < ARRAY_SIZE(at91sam9rl_systemck); i++) {
Loading