A change in 7.1-rc improved the general handling for reset controllers
using SRCU, but at the same time broke really early users before work- queues are available. So adapt the SMP bringup to keep the core-resets around, instead of aquiring/releasing them on ever SMP action. -----BEGIN PGP SIGNATURE----- iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmohRDIQHGhlaWtvQHNu dGVjaC5kZQAKCRDzpnnJnNEdgW/hB/9yWt9Gfmj756nDtEjvshLD9whKwgHCieTn 7o+8/DmSpfi4sbAnJ2PntRLAWO+ohOeQ845udBNQVcSy8BMN56Md42FQUGiA+8uY oD9d3WsgVCohJ8RDxOKwIozwu2BXB3aqCRdQEfr2KCuiCkMBFVmbAPlOkrwRypl9 5vivu5k3KdxgktPPZhMsTwQs344B6Addi4gCols8hIv6+jWRto4u+yLG5lJrGdVA REPV0KSSy7ksyBUxAFKdTSDlPW32R8df1/+JA2UMAIQu+FCorzaOx7kfs41Ke3NH IOlgm0uX/Sfg/qlqEstf6y34Q2TA/S6/mnWnZJrUP7iqaINW7fGV =BWAh -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmonvcwACgkQmmx57+YA GNn8KxAAu1OPzcqJfquu0RMz745AnHFPD2ApYLP1k9UmIyHLSKUwCADqcEg4Y5Ay 9oep9YPImBUfz3a88ssLy8OaBFjW+f7jPCat4RZ7dIw46Y5NrG0XbTCDr2Vz2pYq rrppKEe9+geAH9ZmgHS46mBHES7oeXa+GOP5Wku0N3t9v3zZWAskxsmIryLVrPXB gBkrJAZDOEV4kCBycVQeY+ukE2o33DSlvM/V7ueK0vJf/el4sksFiJQyV2iVB3Dy mW88MuMVefz0qyDmUNjcfbgb3kMn/Helzh0clciTe4hgIjqFm2WuKopIhZ+0aUpQ p7RXTF7BftbPDW5QbMTQOen/IFssTxwpcqUEBHNSB7CcbASSw9fqi2jH1487kGHE vyfYafHhVjrr8Ukmq2kxGo7mw82tApKr4uW2uMbe2TKQa67Os9VsUqirL0tl1E0W XtK+d7AGbluhZUKMnFLTdTTTVXBdtxK0QA9YFj3zwSQ9+a6HkAs2/kB4/jbFGG0A wQUY/XkFMNQMUEN2u1JjpLPW6TGAsEQKmgDkPe5rnNMvvWRuGUgzbUS6cCvsW5C5 2muKKqCmdCeOqYg5aUAecsPt75VGzrvfYf2S7ng1e8RyLZkkdnR38eX0NDfW7fx5 doEl1ohNUuiKHa00zfNd06/jCT1KuHXdBUKZ+eeaIQarEeFtCwU= =aTQo -----END PGP SIGNATURE----- Merge tag 'v7.1-rockchip-arm32fixe' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes A change in 7.1-rc improved the general handling for reset controllers using SRCU, but at the same time broke really early users before work- queues are available. So adapt the SMP bringup to keep the core-resets around, instead of aquiring/releasing them on ever SMP action. * tag 'v7.1-rockchip-arm32fixe' of https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: rockchip: keep reset control around Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
9c648f3554
1 changed files with 10 additions and 6 deletions
|
|
@ -34,6 +34,7 @@ static int ncores;
|
|||
|
||||
static struct regmap *pmu;
|
||||
static int has_pmu = true;
|
||||
static struct reset_control *cpu_rstc[4];
|
||||
|
||||
static int pmu_power_domain_is_on(int pd)
|
||||
{
|
||||
|
|
@ -64,9 +65,11 @@ static struct reset_control *rockchip_get_core_reset(int cpu)
|
|||
static int pmu_set_power_domain(int pd, bool on)
|
||||
{
|
||||
u32 val = (on) ? 0 : BIT(pd);
|
||||
struct reset_control *rstc = rockchip_get_core_reset(pd);
|
||||
struct reset_control *rstc;
|
||||
int ret;
|
||||
|
||||
rstc = pd < ARRAY_SIZE(cpu_rstc) ? cpu_rstc[pd] : ERR_PTR(-EINVAL);
|
||||
|
||||
if (IS_ERR(rstc) && read_cpuid_part() != ARM_CPU_PART_CORTEX_A9) {
|
||||
pr_err("%s: could not get reset control for core %d\n",
|
||||
__func__, pd);
|
||||
|
|
@ -100,11 +103,8 @@ static int pmu_set_power_domain(int pd, bool on)
|
|||
}
|
||||
}
|
||||
|
||||
if (!IS_ERR(rstc)) {
|
||||
if (on)
|
||||
reset_control_deassert(rstc);
|
||||
reset_control_put(rstc);
|
||||
}
|
||||
if (!IS_ERR(rstc) && on)
|
||||
reset_control_deassert(rstc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -312,6 +312,10 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
|
|||
ncores = ((l2ctlr >> 24) & 0x3) + 1;
|
||||
}
|
||||
|
||||
/* Collect cpu core reset control for each core */
|
||||
for (i = 0; i < ncores; i++)
|
||||
cpu_rstc[i] = rockchip_get_core_reset(i);
|
||||
|
||||
/* Make sure that all cores except the first are really off */
|
||||
for (i = 1; i < ncores; i++)
|
||||
pmu_set_power_domain(0 + i, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue