public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thomas Weber <weber@corscience.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: dm9000x: use standard I/O accessors
Date: Fri, 07 May 2010 13:37:46 +0000	[thread overview]
Message-ID: <4BE417AA.3040205@corscience.de> (raw)
In-Reply-To: <4BD51BBA.2020807@gmail.com>

On 04/26/10 04:51, Ben Warren wrote:
> Mike,
> 
> ApplOn 4/14/2010 1:29 PM, Mike Frysinger wrote:
>> The current dm9000x driver accesses its memory mapped registers directly
>> instead of using the standard I/O accessors.  This can cause problems on
>> Blackfin systems as the accesses can get out of order.  So convert the
>> direct volatile dereferences to use the normal in/out macros.
>>
>> Signed-off-by: Mike Frysinger<vapier@gentoo.org>
>> ---
>>   drivers/net/dm9000x.c |   12 ++++++------
>>   1 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
>> index a7fef56..f121286 100644
>> --- a/drivers/net/dm9000x.c
>> +++ b/drivers/net/dm9000x.c
>> @@ -117,12 +117,12 @@ static void DM9000_iow(int reg, u8 value);
>>
>>   /* DM9000 network board routine ---------------------------- */
>>
>> -#define DM9000_outb(d,r) ( *(volatile u8 *)r = d )
>> -#define DM9000_outw(d,r) ( *(volatile u16 *)r = d )
>> -#define DM9000_outl(d,r) ( *(volatile u32 *)r = d )
>> -#define DM9000_inb(r) (*(volatile u8 *)r)
>> -#define DM9000_inw(r) (*(volatile u16 *)r)
>> -#define DM9000_inl(r) (*(volatile u32 *)r)
>> +#define DM9000_outb(d,r) outb(d, r)
>> +#define DM9000_outw(d,r) outw(d, r)
>> +#define DM9000_outl(d,r) outl(d, r)
>> +#define DM9000_inb(r) inb(r)
>> +#define DM9000_inw(r) inw(r)
>> +#define DM9000_inl(r) inl(r)
>>
>>   #ifdef CONFIG_DM9000_DEBUG
>>   static void
>>    
> Applied to net repo.
> 
> thanks,
> Ben
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

Hi,

this patch breaks compilation for devkit8000 (ARM, Cortex-A8)

dm9000x.c: In function 'dm9000_outblk_8bit':
dm9000x.c:148: warning: implicit declaration of function 'outb'
dm9000x.c: In function 'dm9000_outblk_16bit':
dm9000x.c:157: warning: implicit declaration of function 'outw'
dm9000x.c: In function 'dm9000_outblk_32bit':
dm9000x.c:165: warning: implicit declaration of function 'outl'
dm9000x.c: In function 'dm9000_inblk_8bit':
dm9000x.c:172: warning: implicit declaration of function 'inb'
dm9000x.c: In function 'dm9000_inblk_16bit':
dm9000x.c:181: warning: implicit declaration of function 'inw'
dm9000x.c: In function 'dm9000_inblk_32bit':
dm9000x.c:189: warning: implicit declaration of function 'inl'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_inblk_8bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:172: undefined
reference to `inb'
drivers/net/libnet.a(dm9000x.o): In function `DM9000_ior':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:566: undefined
reference to `outb'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:567: undefined
reference to `inb'
drivers/net/libnet.a(dm9000x.o): In function `DM9000_iow':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:576: undefined
reference to `outb'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:577: undefined
reference to `outb'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_rx_status_8bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:213: undefined
reference to `outb'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:216: undefined
reference to `inb'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:216: undefined
reference to `inb'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:219: undefined
reference to `inb'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:219: undefined
reference to `inb'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_outblk_8bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:148: undefined
reference to `outb'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_rx':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:476: undefined
reference to `inb'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_send':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:412: undefined
reference to `outb'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_rx_status_32bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:196: undefined
reference to `outb'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:198: undefined
reference to `inl'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_inblk_32bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:189: undefined
reference to `inl'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_outblk_32bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:165: undefined
reference to `outl'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_rx_status_16bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:205: undefined
reference to `outb'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:207: undefined
reference to `inw'
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:208: undefined
reference to `inw'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_inblk_16bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:181: undefined
reference to `inw'
drivers/net/libnet.a(dm9000x.o): In function `dm9000_outblk_16bit':
/home/tweber/work/git/u-boot/drivers/net/dm9000x.c:157: undefined
reference to `outw'
/home/tweber/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/armv4t/libgcc.a(bpabi.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr0'
/home/tweber/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/armv4t/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr0'
/home/tweber/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/armv4t/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr0'
make: *** [u-boot] Error 1

I think the arch/arm/include/asm/io.h needs some rework with the __io
definition. Is it the right way?

Thomas

  reply	other threads:[~2010-05-07 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14 20:29 [U-Boot] [PATCH] net: dm9000x: use standard I/O accessors Mike Frysinger
2010-04-26  4:51 ` Ben Warren
2010-05-07 13:37   ` Thomas Weber [this message]
2010-05-07 14:08     ` Thomas Weber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BE417AA.3040205@corscience.de \
    --to=weber@corscience.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox