RE: [RFC v2 14/18] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
On Wed, Jan 09, 2013 at 13:01:03, Shilimkar, Santosh wrote: On Wednesday 09 January 2013 11:08 AM, Bedia, Vaibhav wrote: On Tue, Jan 08, 2013 at 20:51:08, Shilimkar, Santosh wrote: On Monday 31 December 2012 06:37 PM, Vaibhav Bedia wrote: Add minimal APIs for writing to the IPC and the M3_TXEV registers in the Control module. These will be used in a subsequent patch which adds suspend-resume support for AM33XX. Signed-off-by: Vaibhav Bedia vaibhav.be...@ti.com Cc: Tony Lingren t...@atomide.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Benoit Cousson b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com Cc: Kevin Hilman khil...@deeprootsystems.com Cc: Vaibhav Hiremath hvaib...@ti.com --- On Control module, we are trying to move driver/module specific code to respective drivers. Can you not add below code to ipc related driver component. If not, then patch as such is fine with me. I had it in the pm33xx.c in the previous version. Kevin had asked me to move it to control.c. Should I revert move it back there? pm33xx.c is not the right place. I was hoping to move to some driver. If that is not possible then leave it in control module. I think I'll leave it here for now. Could I have you ack in that case? Thanks, Vaibhav -- 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
Re: [RFC v2 14/18] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
On Wednesday 09 January 2013 03:07 PM, Bedia, Vaibhav wrote: On Wed, Jan 09, 2013 at 13:01:03, Shilimkar, Santosh wrote: On Wednesday 09 January 2013 11:08 AM, Bedia, Vaibhav wrote: On Tue, Jan 08, 2013 at 20:51:08, Shilimkar, Santosh wrote: On Monday 31 December 2012 06:37 PM, Vaibhav Bedia wrote: Add minimal APIs for writing to the IPC and the M3_TXEV registers in the Control module. These will be used in a subsequent patch which adds suspend-resume support for AM33XX. Signed-off-by: Vaibhav Bedia vaibhav.be...@ti.com Cc: Tony Lingren t...@atomide.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Benoit Cousson b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com Cc: Kevin Hilman khil...@deeprootsystems.com Cc: Vaibhav Hiremath hvaib...@ti.com --- On Control module, we are trying to move driver/module specific code to respective drivers. Can you not add below code to ipc related driver component. If not, then patch as such is fine with me. I had it in the pm33xx.c in the previous version. Kevin had asked me to move it to control.c. Should I revert move it back there? pm33xx.c is not the right place. I was hoping to move to some driver. If that is not possible then leave it in control module. I think I'll leave it here for now. Could I have you ack in that case? Yep. Acked-by: Santosh Shilimkar santosh.shilim...@ti.com -- 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
Re: [RFC v2 14/18] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
On Monday 31 December 2012 06:37 PM, Vaibhav Bedia wrote: Add minimal APIs for writing to the IPC and the M3_TXEV registers in the Control module. These will be used in a subsequent patch which adds suspend-resume support for AM33XX. Signed-off-by: Vaibhav Bedia vaibhav.be...@ti.com Cc: Tony Lingren t...@atomide.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Benoit Cousson b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com Cc: Kevin Hilman khil...@deeprootsystems.com Cc: Vaibhav Hiremath hvaib...@ti.com --- On Control module, we are trying to move driver/module specific code to respective drivers. Can you not add below code to ipc related driver component. If not, then patch as such is fine with me. Regards Santosh -- 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
RE: [RFC v2 14/18] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
On Tue, Jan 08, 2013 at 20:51:08, Shilimkar, Santosh wrote: On Monday 31 December 2012 06:37 PM, Vaibhav Bedia wrote: Add minimal APIs for writing to the IPC and the M3_TXEV registers in the Control module. These will be used in a subsequent patch which adds suspend-resume support for AM33XX. Signed-off-by: Vaibhav Bedia vaibhav.be...@ti.com Cc: Tony Lingren t...@atomide.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Benoit Cousson b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com Cc: Kevin Hilman khil...@deeprootsystems.com Cc: Vaibhav Hiremath hvaib...@ti.com --- On Control module, we are trying to move driver/module specific code to respective drivers. Can you not add below code to ipc related driver component. If not, then patch as such is fine with me. I had it in the pm33xx.c in the previous version. Kevin had asked me to move it to control.c. Should I revert move it back there? Regards, Vaibhav -- 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
Re: [RFC v2 14/18] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
On Wednesday 09 January 2013 11:08 AM, Bedia, Vaibhav wrote: On Tue, Jan 08, 2013 at 20:51:08, Shilimkar, Santosh wrote: On Monday 31 December 2012 06:37 PM, Vaibhav Bedia wrote: Add minimal APIs for writing to the IPC and the M3_TXEV registers in the Control module. These will be used in a subsequent patch which adds suspend-resume support for AM33XX. Signed-off-by: Vaibhav Bedia vaibhav.be...@ti.com Cc: Tony Lingren t...@atomide.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Benoit Cousson b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com Cc: Kevin Hilman khil...@deeprootsystems.com Cc: Vaibhav Hiremath hvaib...@ti.com --- On Control module, we are trying to move driver/module specific code to respective drivers. Can you not add below code to ipc related driver component. If not, then patch as such is fine with me. I had it in the pm33xx.c in the previous version. Kevin had asked me to move it to control.c. Should I revert move it back there? pm33xx.c is not the right place. I was hoping to move to some driver. If that is not possible then leave it in control module. Regards Santosh -- 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
[RFC v2 14/18] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs
Add minimal APIs for writing to the IPC and the M3_TXEV registers in the Control module. These will be used in a subsequent patch which adds suspend-resume support for AM33XX. Signed-off-by: Vaibhav Bedia vaibhav.be...@ti.com Cc: Tony Lingren t...@atomide.com Cc: Santosh Shilimkar santosh.shilim...@ti.com Cc: Benoit Cousson b-cous...@ti.com Cc: Paul Walmsley p...@pwsan.com Cc: Kevin Hilman khil...@deeprootsystems.com Cc: Vaibhav Hiremath hvaib...@ti.com --- v1-v2: This a new patch in the series to isolate the control module accesses as pointed out by Kevin Hilman. arch/arm/mach-omap2/control.c | 20 arch/arm/mach-omap2/control.h | 41 + 2 files changed, 61 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 2adb268..c5d54ae 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c @@ -604,3 +604,23 @@ int omap3_ctrl_save_padconf(void) } #endif /* CONFIG_ARCH_OMAP3 CONFIG_PM */ + +#if defined(CONFIG_SOC_AM33XX) defined(CONFIG_PM) +void am33xx_txev_eoi(void) +{ + omap_ctrl_writel(AM33XX_M3_TXEV_ACK, AM33XX_CONTROL_M3_TXEV_EOI); +} + +void am33xx_txev_enable(void) +{ + omap_ctrl_writel(AM33XX_M3_TXEV_ENABLE, AM33XX_CONTROL_M3_TXEV_EOI); +} + +void am33xx_wkup_m3_ipc_cmd(struct am33xx_ipc_data *data) +{ + omap_ctrl_writel(data-resume_addr, AM33XX_CONTROL_IPC_MSG_REG0); + omap_ctrl_writel(data-sleep_mode, AM33XX_CONTROL_IPC_MSG_REG1); + omap_ctrl_writel(data-param1, AM33XX_CONTROL_IPC_MSG_REG2); + omap_ctrl_writel(data-param2, AM33XX_CONTROL_IPC_MSG_REG3); +} +#endif /* CONFIG_SOC_AM33XX CONFIG_PM */ diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index 3d944d3..4b05eb9 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h @@ -358,6 +358,37 @@ #define AM33XX_CONTROL_STATUS_SYSBOOT1_WIDTH 0x2 #define AM33XX_CONTROL_STATUS_SYSBOOT1_MASK(0x3 22) +#define AM33XX_DDR_IO_CTRL 0x0E04 +#define AM33XX_VTP0_CTRL_REG 0x0E0C + +/* AM33XX VTP0_CTRL_REG bits */ +#define AM33XX_VTP_CTRL_START_EN (1 0) +#define AM33XX_VTP_CTRL_LOCK_EN(1 4) +#define AM33XX_VTP_CTRL_READY (1 5) +#define AM33XX_VTP_CTRL_ENABLE (1 6) + +/* AM33XX M3_TXEV_EOI register */ +#define AM33XX_CONTROL_M3_TXEV_EOI 0x1324 + +#define AM33XX_M3_TXEV_ACK (0x1 0) +#define AM33XX_M3_TXEV_ENABLE (0x0 0) + +/* AM33XX IPC message registers */ +#define AM33XX_CONTROL_IPC_MSG_REG00x1328 +#define AM33XX_CONTROL_IPC_MSG_REG10x132C +#define AM33XX_CONTROL_IPC_MSG_REG20x1330 +#define AM33XX_CONTROL_IPC_MSG_REG30x1334 +#define AM33XX_CONTROL_IPC_MSG_REG40x1338 +#define AM33XX_CONTROL_IPC_MSG_REG50x133C +#define AM33XX_CONTROL_IPC_MSG_REG60x1340 +#define AM33XX_CONTROL_IPC_MSG_REG70x1344 + +#define AM33XX_DDR_CMD0_IOCTRL 0x1404 +#define AM33XX_DDR_CMD1_IOCTRL 0x1408 +#define AM33XX_DDR_CMD2_IOCTRL 0x140C +#define AM33XX_DDR_DATA0_IOCTRL0x1440 +#define AM33XX_DDR_DATA1_IOCTRL0x1444 + /* CONTROL OMAP STATUS register to identify OMAP3 features */ #define OMAP3_CONTROL_OMAP_STATUS 0x044c @@ -417,6 +448,16 @@ extern void omap3630_ctrl_disable_rta(void); extern int omap3_ctrl_save_padconf(void); extern void omap2_set_globals_control(void __iomem *ctrl, void __iomem *ctrl_pad); +struct am33xx_ipc_data { + u32 resume_addr; + u32 param1; + u32 param2; + u32 sleep_mode; +}; +extern void am33xx_wkup_m3_ipc_cmd(struct am33xx_ipc_data *data); +extern void am33xx_txev_eoi(void); +extern void am33xx_txev_enable(void); + #else #define omap_ctrl_base_get() 0 #define omap_ctrl_readb(x) 0 -- 1.7.0.4 -- 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