
On Tue, Jun 17, 2014 at 12:36 PM, Stefano Babic sbabic@denx.de wrote:
Hi Fabio,
On 14/06/2014 22:29, Fabio Estevam wrote:
From: Fabio Estevam fabio.estevam@freescale.com
mx6sx does not have sata nor ipu blocks, so do not handle such clocks.
We have already a check inside setup_sata():
if (!is_cpu_type(MXC_CPU_MX6Q) && !is_cpu_type(MXC_CPU_MX6D)) return 1;
enable_sata_clock() is called only for quad and dual. I think you do not need at all to block enable_sata_clock(), it should be not called.
I would prefer we carry on with this approach: board are calling functions to set up hardware, and each peripheral (setup_sata or the ipu driver) makes the check at runtime for the running cpu.
Actually the problems here are build time issues:
1) MXC_CCM_CCGR5_SATA_MASK field does not exist for mx6sx (it is a reserved field)
2) MXC_CCM_CCGR3_IPU1_IPU_MASK does not exist for mx6sx (it is a reserved field)
So that's why I had to place the ifdef's.