diff options
author | Heiko Schocher <hs@denx.de> | 2008-07-23 07:30:46 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-07-30 00:29:52 +0200 |
commit | 36d59bd9da9e15d19b867b48449408830f4e2ad5 (patch) | |
tree | 8b977b08afeefa04760498664a6e769cbedd6d94 /common/cmd_ide.c | |
parent | 7610db17fd4d59c51d825488526d85ede2f06767 (diff) | |
download | u-boot-imx-36d59bd9da9e15d19b867b48449408830f4e2ad5.zip u-boot-imx-36d59bd9da9e15d19b867b48449408830f4e2ad5.tar.gz u-boot-imx-36d59bd9da9e15d19b867b48449408830f4e2ad5.tar.bz2 |
Fix warnings if compiling with IDE support.
cmd_ide.c:827: Warnung: weak declaration of `ide_outb' after first use results in unspecified behavior
cmd_ide.c:839: Warnung: weak declaration of `ide_inb' after first use results in unspecified behavior
Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'common/cmd_ide.c')
-rw-r--r-- | common/cmd_ide.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 56db433..d6ba79f 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -161,8 +161,6 @@ static uchar ide_wait (int dev, ulong t); #define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */ -void inline ide_outb(int dev, int port, unsigned char val); -unsigned char inline ide_inb(int dev, int port); static void input_data(int dev, ulong *sect_buf, int words); static void output_data(int dev, ulong *sect_buf, int words); static void ident_cpy (unsigned char *dest, unsigned char *src, unsigned int len); @@ -523,6 +521,28 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /* ------------------------------------------------------------------------- */ +void inline +__ide_outb(int dev, int port, unsigned char val) +{ + debug ("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n", + dev, port, val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port))); + outb(val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port))); +} +void inline ide_outb (int dev, int port, unsigned char val) + __attribute__((weak, alias("__ide_outb"))); + +unsigned char inline +__ide_inb(int dev, int port) +{ + uchar val; + val = inb((ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port))); + debug ("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n", + dev, port, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)), val); + return val; +} +unsigned char inline ide_inb(int dev, int port) + __attribute__((weak, alias("__ide_inb"))); + void ide_init (void) { @@ -817,28 +837,6 @@ set_pcmcia_timing (int pmode) /* ------------------------------------------------------------------------- */ -void inline -__ide_outb(int dev, int port, unsigned char val) -{ - debug ("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n", - dev, port, val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port))); - outb(val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port))); -} -void inline ide_outb (int dev, int port, unsigned char val) - __attribute__((weak, alias("__ide_outb"))); - -unsigned char inline -__ide_inb(int dev, int port) -{ - uchar val; - val = inb((ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port))); - debug ("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n", - dev, port, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)), val); - return val; -} -unsigned char inline ide_inb(int dev, int port) - __attribute__((weak, alias("__ide_inb"))); - #ifdef __PPC__ # ifdef CONFIG_AMIGAONEG3SE static void |