From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 10 Feb 2008 21:23:05 +0100 Subject: [U-Boot-Users] ide support on arm In-Reply-To: Your message of "Sat, 09 Feb 2008 19:28:19 +0100." <47ADF0C3.7090808@gandalf.sssup.it> Message-ID: <20080210202305.1C103248F0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <47ADF0C3.7090808@gandalf.sssup.it> you wrote: > > > I can't find them. Please rebase and resubmit. ... > this is the patch and how to use it: > > +#define CONFIG_DOS_PARTITION > +#define CFG_IDE_MAXBUS 1 /* max. 1 IDE bus */ > +#define CFG_IDE_MAXDEVICE 1 /* max. 2 drives per IDE bus */ > + > +#define CFG_ATA_IDE0_OFFSET (0) > + > +#define CFG_ATA_BASE_ADDR (0x10000000) > + > +/* Offset for data I/O */ > +#define CFG_ATA_DATA_OFFSET (0) > + > +/* Offset for normal register accesses */ > +#define CFG_ATA_REG_OFFSET (0) > + > +/* Offset for alternate registers */ > +#define CFG_ATA_ALT_OFFSET (0) > + > +/* Interval between > registers */ > +#define CFG_ATA_STRIDE (1<<21) > +#define __io > + Sorry, this is not a patch. > index c38be4f..5b0b738 100644 > --- a/common/cmd_ide.c > +++ b/common/cmd_ide.c > @@ -934,7 +934,14 @@ output_data(int dev, ulong *sect_buf, int words) > static void > output_data(int dev, ulong *sect_buf, int words) > { > +#ifndef __ARM__ > outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words<<1); > +#else > + int i = words; > + u16 *buf = (u16 *) sect_buf; > + for (i=0; i < (words << 1); i++, buf++) > + outw(ATA_CURR_BASE(dev)+ATA_DATA_REG, buf); > +#endif > } > #endif /* __PPC__ */ > > @@ -992,7 +999,14 @@ input_data(int dev, ulong *sect_buf, int words) > static void > input_data(int dev, ulong *sect_buf, int words) > { > +#ifndef __ARM__ > insw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words << 1); > +#else > + int i; > + volatile u16 *buf = (u16 *) sect_buf; > + for(i = 0; i < (words<<1); i++, buf++) > + *buf = inw(ATA_CURR_BASE(dev)+ATA_DATA_REG); > +#endif > } > > diff --git a/lib_arm/board.c b/lib_arm/board.c > index 7e7a282..ddf4d5f 100644 > --- a/lib_arm/board.c > +++ b/lib_arm/board.c > @@ -435,6 +435,12 @@ extern void dm644x_eth_set_mac_addr (const u_int8_t > *addr); > reset_phy(); > #endif > #endif > + > +#if defined(CONFIG_CMD_IDE) > + puts("IDE: "); > + ide_init(); > +#endif > + > /* main_loop() can return to retry autoboot, if so just run it > again. */ > for (;;) { > main_loop (); > This has coding style violations, your signed-off-by line if missing, and it was line-wrapped by your mailer. Sorry, but please retry. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There's no sense in being precise when you don't even know what you're talking about. -- John von Neumann