[U-Boot-Users] ne2000 compile error

Wolfgang Denk wd at denx.de
Sun Apr 20 08:36:46 CEST 2008


In message <47FF7C44.6040600 at comsys.ro> you wrote:
>
> Fixed it for now. #ifndef CONFIG_DRIVER_AX88796 could be replaced with 
> something a little more generic
> like a CFG_CUSTOM_GET_PROM_NE2000 or something. Or the code could be 
> implemented in a .c file and the
> generic get_prom() could be made weak. I think that implementing 
> non-static, non-inlined functions in header files
> is bad style. Breaking existing code in the process is even worse.

Unfortunately your patch is line wrapped and thus unusable.

Please fix your mailer setup and resubmit. I really recommend to use
git tools to send the messages.

> --- a/drivers/net/ne2000.c
> +++ b/drivers/net/ne2000.c
> @@ -125,6 +125,9 @@ dp83902a_init(void)
>      dp83902a_priv_data_t *dp = &nic;
>      u8* base;
>  
> +#if defined(NE2000_BASIC_INIT)
> +    int i;
> +#endif
>      DEBUG_FUNCTION();
>  
>      base = dp->base;
> @@ -738,6 +741,94 @@ u8 dev_addr[6];
>  #define PCNET_RESET    0x1f    /* Issue a read to reset, a write to 
> clear. */
^^^^^^^^^^^^^^^^^^^^ Here

>  #define PCNET_MISC    0x18    /* For IBM CCAE and Socket EA cards */
>  
> +#ifndef CONFIG_DRIVER_AX88796L
> +static void pcnet_reset_8390(void)
> +{
> +    int i, r;
> +
> +    PRINTK("nic base is %lx\n", nic_base);
> +
> +    n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
> +    PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, 
> n2k_inb(E8390_CMD));
^^^^^^^^^^^^^^^^^^^^ Here

> +    n2k_outb(E8390_NODMA+E8390_PAGE1+E8390_STOP, E8390_CMD);
> +    PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, 
> n2k_inb(E8390_CMD));
^^^^^^^^^^^^^^^^^^^^ Here

> +    n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
> +    PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, 
> n2k_inb(E8390_CMD));
^^^^^^^^^^^^^^^^^^^^ Here

And so on...

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
"The combination of a number of things to make existence worthwhile."
"Yes, the philosophy of 'none,' meaning 'all.'"
	-- Spock and Lincoln, "The Savage Curtain", stardate 5906.4




More information about the U-Boot mailing list