[U-Boot] [PATCH v2] BLOCK: Add freescale IMX51 PATA driver

Marek Vasut marek.vasut at gmail.com
Wed Dec 1 03:46:21 CET 2010


On Tuesday 30 November 2010 12:15:33 Stefano Babic wrote:
> On 11/30/2010 04:26 AM, Marek Vasut wrote:
> > Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> > ---
> > v2: Use structures instead of defines as Wolfgang proposed
> 
> Hi Marek,
> 
> >  drivers/block/Makefile  |    1 +
> >  drivers/block/mxc_ata.c |  149
> >  +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150
> >  insertions(+), 0 deletions(-)
> >  create mode 100644 drivers/block/mxc_ata.c
> 
> In which context does this driver run ? I thought to find a similar
> implementation I see, for example, in pata_bfin.c, with entry points to
> read/write data, but I cannot see them. I assume you set only
> CONFIG_CMD_IDE for testing.
> 
> On which board do you plan to add this P-ATA driver ?

On efikamx, I'll soon submit it mainline (when I clean it up enough). Here's the 
relevant part of configuration file (the #define __io is actually the important 
thing):

/*
 * ATA/IDE
 */
#ifdef  CONFIG_CMD_IDE
#define CONFIG_LBA48
#undef  CONFIG_IDE_LED
#undef  CONFIG_IDE_RESET

#define CONFIG_MX51_PATA

#define __io

#define CONFIG_SYS_IDE_MAXBUS           1
#define CONFIG_SYS_IDE_MAXDEVICE        1

#define CONFIG_SYS_ATA_BASE_ADDR        0x83fe0000
#define CONFIG_SYS_ATA_IDE0_OFFSET      0x0

#define CONFIG_SYS_ATA_DATA_OFFSET      0xa0
#define CONFIG_SYS_ATA_REG_OFFSET       0xa0
#define CONFIG_SYS_ATA_ALT_OFFSET       0xd8

#define CONFIG_SYS_ATA_STRIDE           4

#define CONFIG_IDE_PREINIT
#define CONFIG_MXC_ATA_PIO_MODE         4
#endif
> 
> Trying to apply this driver give me a link error:
> /home/stefano/Projects/imx/u-boot-imx/common/cmd_ide.c:905: undefined
> reference to `outsw'
> common/libcommon.o: In function `input_data':
> /home/stefano/Projects/imx/u-boot-imx/common/cmd_ide.c:963: undefined
> reference to `insw'
> common/libcommon.o: In function `__ide_inb':
> /home/stefano/Projects/imx/u-boot-imx/common/cmd_ide.c:530: undefined
> reference to `inb'
> 
> This functions are not implemented for the i.MX51 SOC.
> 
> > +	/* Configure the PIO timing */
> > +	set_ata_bus_timing(CONFIG_MXC_ATA_PIO_MODE);
> 
> CONFIG_MXC_ATA_PIO_MODE is a new parameter, to be set in board
> configuration file. It should be documented in some ways.

Indeed ... where if you could point me to an appropriate place ?
> 
> Best regards,
> Stefano


More information about the U-Boot mailing list