Re: [PATCH] Add initial SX3000b platform code to MIPS arch

From: Ralf Baechle
Date: Wed Mar 22 2017 - 08:37:01 EST


On Wed, Mar 22, 2017 at 05:38:09AM +0000, Amit Kama IL wrote:

> Add initial support for boards based on Satixfy's SX3000b (Catniss) SoC.
> The SoC includes a MIPS interAptiv dual core 4 VPE processor and boots
> using device-tree.
>
> Signed-off-by: Amit Kama <amit.kama@xxxxxxxxxxx>
>
> The irqchip file (irq-sx3000b.c) is pertinent to the platform.
> IRQCHIP maintainers - is it possible to merge this through MIPS tree?


First thig, run your patch through scripts/checkpatch.pl and fix the
resulting pile of errors and warnings.

sx3000_machine_halt() will consume plenty of power if implemented as a
empty loop:

+static void sx3000_machine_halt(void)
+{
+ while (true);
+}

Something like:

static void sx3000_machine_halt(void)
{
local_irq_disable();
while (1) {
if (cpu_wait)
cpu_wait();
}
}

will make the function much "greener".

Ralf