[PATCH 2/7] Split S3C generic and S3C24xx specific code

Alexey Galakhov agalakhov at gmail.com
Fri May 18 05:06:48 EDT 2012


On 18.05.2012 14:38, Sascha Hauer wrote:
> On Fri, May 18, 2012 at 12:49:25PM +0600, Alexey Galakhov wrote:
>> Ho to do that correctly? Right now I prefer that way:
>>
>> int s3c_get_some_driver_clk(void);
>> defined somewhere in arch/***
> 
> Me too. As said, ideally we would have a clk_get(dev, id), but we don't
> have this atm. (We have it on Atmel, you could do the same, but I don't
> ask you to do this if you don't want to)
> 
> Sascha

Ok. I thought about introducing such an API too, but probably not yet. I
think it's better to add 6410 and maybe Exynos first and then refactor.
Newer Samsung chips are poorly documented, so it's hard to decide what's
common and what's specific. (In fact, there are even errors in datasheets!)

I.e., it turned out that s3c24x0_disable_wd() fits s5pv210 perfectly too
without any change.  (Just writing 0 into the first watchdog register
disables the watchdog). This probably should be s3c_disable_watchdog().
I didn't touch it yet since I don't disable WD and I'm not sure about
other CPUs.

Regards,
--
Alex



More information about the barebox mailing list