DaVinci: move IDE platform device to its proper place

The IDE platform device is registered in three different places (2 board files
for DM644x and in dm646x.c for DM646x) while both the IDE base address and the
IDE IRQ are the same for both SoCs -- therefore,  the proper place for the IDE
platform seems to be in devices.c. Merge the IDE platform data and registration
code and create davinci_init_ide() in place of dm646x_init_ide()...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
This commit is contained in:
Sergei Shtylyov
2010-04-21 18:11:33 +04:00
committed by Kevin Hilman
parent 280faffb4e
commit 7a9978a1e2
7 changed files with 49 additions and 100 deletions

View File

@@ -596,32 +596,6 @@ static struct platform_device dm646x_edma_device = {
.resource = edma_resources,
};
static struct resource ide_resources[] = {
{
.start = DM646X_ATA_REG_BASE,
.end = DM646X_ATA_REG_BASE + 0x7ff,
.flags = IORESOURCE_MEM,
},
{
.start = IRQ_DM646X_IDE,
.end = IRQ_DM646X_IDE,
.flags = IORESOURCE_IRQ,
},
};
static u64 ide_dma_mask = DMA_BIT_MASK(32);
static struct platform_device ide_dev = {
.name = "palm_bk3710",
.id = -1,
.resource = ide_resources,
.num_resources = ARRAY_SIZE(ide_resources),
.dev = {
.dma_mask = &ide_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
static struct resource dm646x_mcasp0_resources[] = {
{
.name = "mcasp0",
@@ -867,12 +841,6 @@ static struct davinci_soc_info davinci_soc_info_dm646x = {
.sram_len = SZ_32K,
};
void __init dm646x_init_ide(void)
{
davinci_cfg_reg(DM646X_ATAEN);
platform_device_register(&ide_dev);
}
void __init dm646x_init_mcasp0(struct snd_platform_data *pdata)
{
dm646x_mcasp0_device.dev.platform_data = pdata;