Re: [PATCH] ARM: rockchip: Convert resume code to C

From: Doug Anderson
Date: Mon Dec 01 2014 - 18:05:06 EST


Russel,

On Mon, Dec 1, 2014 at 2:50 PM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> What I see here is a load of complexity which achieves very little.
> The result doesn't get rid of much assembly, but it does make stuff
> more complicated. And the diffstat speaks volumes about this:
>
> 10 files changed, 275 insertions(+), 94 deletions(-)
>
> There's a lot of words in the description, but it's missing the most
> important bit: why do we want to take this approach - what benefits
> does it bring?

Sure. I guess the most important words in the description are:

> We convert the existing assembly resume code into C as proof that this
> works and to prepare for linking in SDRAM reinit code.

I can't say that the SDRAM reinit code is ready for prime time yet,
but you can get a preview of what it could look like at:

https://chromium-review.googlesource.com/#/c/227366/25/arch/arm/mach-rockchip/embedded/rk3288_ddr_resume.c

Adding that code in assembly seems like a very, very bad idea.
Certainly my patch could wait until the DDR code is ready to be posted
upstream if that made sense. One advantage of waiting is that it's
possible that the DDR code might end up moving elsewhere if it made
sense to have it part of a memory controller driver or something like
that.

-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/