diff options
author | Anish Trivedi <anish@freescale.com> | 2010-04-12 16:20:34 -0500 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-25 11:20:22 +0200 |
commit | 07c2594f9662cb07d0ee8cba39e666e17bd74637 (patch) | |
tree | 807230b5123d84bd3052fa223258336f6e6f1a93 /arch | |
parent | b14efae4d3d254b1ed0366eaef0398403aa7b703 (diff) |
ENGR00122382 MX37 SCC2: Modify MSL to provide base address
Register SCC as platform device with resources that the modified
SCC driver needs including base address of register and scc ram
Signed-off-by: Anish Trivedi <anish@freescale.com>
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx37/devices.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/arch/arm/mach-mx37/devices.c b/arch/arm/mach-mx37/devices.c index dfb954a08339..e346899cb2cf 100644 --- a/arch/arm/mach-mx37/devices.c +++ b/arch/arm/mach-mx37/devices.c @@ -252,20 +252,28 @@ static inline void mxc_init_ipu(void) } #endif +static struct resource scc_resources[] = { + { + .start = SCC_BASE_ADDR, + .end = SCC_BASE_ADDR + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = IRAM_BASE_ADDR, + .end = IRAM_BASE_ADDR + IRAM_SIZE - 1, + .flags = IORESOURCE_MEM, + }, +}; + /*! * This is platform device structure for adding SCC */ -#if defined(CONFIG_MXC_SECURITY_SCC) || defined(CONFIG_MXC_SECURITY_SCC_MODULE) static struct platform_device mxc_scc_device = { .name = "mxc_scc", .id = 0, + .num_resources = ARRAY_SIZE(scc_resources), + .resource = scc_resources, }; - -static void mxc_init_scc(void) -{ - platform_device_register(&mxc_scc_device); -} -#else static inline void mxc_init_scc(void) { uint32_t reg_value; @@ -332,12 +340,15 @@ static inline void mxc_init_scc(void) while ((__raw_readl(scc_base + SCM_STATUS_REG) & SCM_STATUS_SRS_READY) != SCM_STATUS_SRS_READY) ; } + + /* Register the SCC device */ + platform_device_register(&mxc_scc_device); + iounmap(scm_ram_base); iounmap(scc_base); printk(KERN_INFO "IRAM READY\n"); } -#endif /* SPI controller and device data */ #if defined(CONFIG_SPI_MXC) || defined(CONFIG_SPI_MXC_MODULE) |