aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHemant Pedanekar <hemantp@ti.com>2009-07-09 10:13:20 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-08-26 03:57:02 -0400
commit1c92a554fcad141f8c73eecdb1cc5ac0527a5c15 (patch)
treefee7c293f5c39e192b7c8fae3357e20029bea139 /arch
parent6077d265324f13a4b7db30eb70cabed07fd58936 (diff)
davinci: dm646x: Add IDE setup
This patch adds platform data and init function for IDE which could be called from board specific file to register IDE device. Note that for 594MHz device the transfer mode is limited to UDMA4 since ideclk rate is less than 100 MHz, which forces udma_mask in palm_bk3710.c to UDMA4, while for 729MHz device, it is UDMA5. Signed-off-by: Hemant Pedanekar <hemantp@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-davinci/dm646x.c32
-rw-r--r--arch/arm/mach-davinci/include/mach/dm646x.h3
2 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 50f01e013aa8..3516f7699db2 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -600,6 +600,32 @@ static struct platform_device dm646x_edma_device = {
600 .resource = edma_resources, 600 .resource = edma_resources,
601}; 601};
602 602
603static struct resource ide_resources[] = {
604 {
605 .start = DM646X_ATA_REG_BASE,
606 .end = DM646X_ATA_REG_BASE + 0x7ff,
607 .flags = IORESOURCE_MEM,
608 },
609 {
610 .start = IRQ_DM646X_IDE,
611 .end = IRQ_DM646X_IDE,
612 .flags = IORESOURCE_IRQ,
613 },
614};
615
616static u64 ide_dma_mask = DMA_BIT_MASK(32);
617
618static struct platform_device ide_dev = {
619 .name = "palm_bk3710",
620 .id = -1,
621 .resource = ide_resources,
622 .num_resources = ARRAY_SIZE(ide_resources),
623 .dev = {
624 .dma_mask = &ide_dma_mask,
625 .coherent_dma_mask = DMA_BIT_MASK(32),
626 },
627};
628
603static struct resource dm646x_mcasp0_resources[] = { 629static struct resource dm646x_mcasp0_resources[] = {
604 { 630 {
605 .name = "mcasp0", 631 .name = "mcasp0",
@@ -769,6 +795,12 @@ static struct davinci_soc_info davinci_soc_info_dm646x = {
769 .sram_len = SZ_32K, 795 .sram_len = SZ_32K,
770}; 796};
771 797
798void __init dm646x_init_ide()
799{
800 davinci_cfg_reg(DM646X_ATAEN);
801 platform_device_register(&ide_dev);
802}
803
772void __init dm646x_init_mcasp0(struct snd_platform_data *pdata) 804void __init dm646x_init_mcasp0(struct snd_platform_data *pdata)
773{ 805{
774 dm646x_mcasp0_device.dev.platform_data = pdata; 806 dm646x_mcasp0_device.dev.platform_data = pdata;
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h
index 05854846242a..feb1e02cdbd8 100644
--- a/arch/arm/mach-davinci/include/mach/dm646x.h
+++ b/arch/arm/mach-davinci/include/mach/dm646x.h
@@ -22,7 +22,10 @@
22#define DM646X_EMAC_MDIO_OFFSET (0x4000) 22#define DM646X_EMAC_MDIO_OFFSET (0x4000)
23#define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) 23#define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000)
24 24
25#define DM646X_ATA_REG_BASE (0x01C66000)
26
25void __init dm646x_init(void); 27void __init dm646x_init(void);
28void __init dm646x_init_ide(void);
26void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); 29void __init dm646x_init_mcasp0(struct snd_platform_data *pdata);
27void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); 30void __init dm646x_init_mcasp1(struct snd_platform_data *pdata);
28 31