On 06/28/2012 02:12 PM, Konstantin Baydarov wrote:
> The interface(design) of omap-control-core.c has already been discussed many 
> times :(
> Eduardo, in his patch set, suggested following design:
> - omap-control-core.c ioremaps SCM window and provide functions to read/write 
> SCP register for bandgap and usb.
>
> IIRC, this approach didn't satisfy and it was suggested to have private 
> read/write in bandgap and usb.
>
> So, my patch set introduces following design:
> - omap-control-core.c don't provide read/write functions for bandgap and usb.
> - bandgap and usb use their own private read/write functions
> - Each omap-control-core.c, bandgap and usb drivers remap SCM window. It's OK 
> because SCM window is statically mapped to the same virtual address. But the 
> problem is that SMP memory window isn't protected. I'm not sure whether it's 
> possible to protect SCM window using this approach.
I mean:

- Each omap-control-core.c, bandgap and usb drivers remap SCM window. It's OK 
because SCM window is statically mapped. So each call of ioremap in 
omap-control-core.c, bandgap and usb drivers returns the same virtual address. 
But the problem is that SCM memory window isn't protected. I'm not sure whether 
it's possible to protect SCM window using this approach(when each driver remaps 
the same IOMEM).

>
> Another possible design is:
> - omap-control-core.c ioremaps and reserves SCM IOMEM window
> - omap-control-core.c exports omap_control_get_base(virtual base address is 
> returned) to use in bandgap and usb_phy driver.
> - Bandgap and usb phy uses their own private read/write function.
> IIUC, this way was suggested by Tony.
>
> I guess It's better to settle the design(interface) of omap-control-core.c, 
> bandgap and usb phy and then submit the next version of patch set.

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to