Sergei Shtylyov <sshtyl...@ru.mvista.com> writes: > Hello. > > Hemant Pedanekar wrote: > >> This patch depends on "Add clock info and update mux setup for ATA" patch >> submitted earlier. > >> An I2C driver is added for controlling the CPLD register 0, which drives >> ATA_RSTn and ATA_PWD. > >> Signed-off-by: Hemant Pedanekar <hema...@ti.com> > > [...] > >> diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c >> b/arch/arm/mach-davinci/board-dm646x-evm.c >> index 575c6ca..99382d8 100644 >> --- a/arch/arm/mach-davinci/board-dm646x-evm.c >> +++ b/arch/arm/mach-davinci/board-dm646x-evm.c >> @@ -44,6 +44,7 @@ >> #include <mach/common.h> >> #include <mach/psc.h> >> #include <mach/serial.h> >> +#include <mach/mux.h> >> #include <mach/i2c.h> >> #include <mach/mmc.h> >> #include <mach/emac.h> >> @@ -52,10 +53,88 @@ >> #define DM646X_EVM_PHY_MASK (0x2) >> #define DM646X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ >> +#define DAVINCI_CFC_ATA_BASE 0x01C66000 >> + >> static struct davinci_uart_config uart_config __initdata = { >> .enabled_uarts = (1 << 0), >> }; >> +static struct resource ide_resources[] = { >> + { >> + .start = DAVINCI_CFC_ATA_BASE, >> + .end = DAVINCI_CFC_ATA_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), >> + }, >> +}; > > IDE is not board specific device -- why in the world are you adding > it to the board file? Ah, I see: it's done that way in > board-dm646x-evm.c... but I don't think it's correct. Kevin?
I agree. IDE is SoC specific and should be done there. What we need is the platform_device and an init/register function in <soc>.c (which includes mux init.) Then, the board code calls the register function if it wants IDE enabled for that board. Kevin _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source