public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] CS8900 Ethernet Device Driver in EDB7xxx
@ 2001-06-18 18:21 honda
  2001-06-19  5:51 ` Gary Thomas
  2001-06-19  5:55 ` Jonathan Larmour
  0 siblings, 2 replies; 4+ messages in thread
From: honda @ 2001-06-18 18:21 UTC (permalink / raw)
  To: ecos-discuss

Hello,
     In the subroutine edb7xxx_cs8900_init of file if_edb7xxx.c, the code
under the comment // Fetch hardware address is shown below:

          #if defined(CYGPKG_REDBOOT) && \
              defined(CYGSEM_REDBOOT_FLASH_CONFIG) && \
              !defined(CYGSEM_ARM_EDB7XXX_SET_ESA)
              flash_get_config("edb7xxx_esa", enaddr, CONFIG_ESA);
          #else
              for (i = 0;  i < ETHER_ADDR_LEN;  i += 2) {
                  unsigned short esa_reg = get_reg(PP_IA+i);
                  enaddr[i] = esa_reg & 0xFF;
                  enaddr[i+1] = esa_reg >> 8;
              }
          #endif

     If I define CYGSEM_ARM_EDB7XXX_SET_ESA only and not CYGPKG_REDBOOT and
CYGSEM_REDBOOT_FLASH_CONFIG,, the address enaddr will be filled by get_reg
(...), so it won't be the value I set in the ConfigTool, is that right?

Kuang-Yang Chuang

OES / ITRI
J220, Bldg. 78, 195-8, Sec. 4, Chung-Hsing Rd.
Chutung, Hsinchu 310, Taiwan, ROC

TEL: 886-3-5917546
FAX: 886-3-5917531






^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] CS8900 Ethernet Device Driver in EDB7xxx
  2001-06-18 18:21 [ECOS] CS8900 Ethernet Device Driver in EDB7xxx honda
@ 2001-06-19  5:51 ` Gary Thomas
  2001-06-19  5:55 ` Jonathan Larmour
  1 sibling, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2001-06-19  5:51 UTC (permalink / raw)
  To: honda; +Cc: ecos-discuss

On 19-Jun-2001 honda@itri.org.tw wrote:
> Hello,
>      In the subroutine edb7xxx_cs8900_init of file if_edb7xxx.c, the code
> under the comment // Fetch hardware address is shown below:
> 
>           #if defined(CYGPKG_REDBOOT) && \
>               defined(CYGSEM_REDBOOT_FLASH_CONFIG) && \
>               !defined(CYGSEM_ARM_EDB7XXX_SET_ESA)
>               flash_get_config("edb7xxx_esa", enaddr, CONFIG_ESA);
>           #else
>               for (i = 0;  i < ETHER_ADDR_LEN;  i += 2) {
>                   unsigned short esa_reg = get_reg(PP_IA+i);
>                   enaddr[i] = esa_reg & 0xFF;
>                   enaddr[i+1] = esa_reg >> 8;
>               }
>           #endif
> 
>      If I define CYGSEM_ARM_EDB7XXX_SET_ESA only and not CYGPKG_REDBOOT and
> CYGSEM_REDBOOT_FLASH_CONFIG,, the address enaddr will be filled by get_reg
> (...), so it won't be the value I set in the ConfigTool, is that right?

You can change this if you'd like, but the assumption was that the ESA will
get set by the boot environment (RedBoot) and that the eCos environment will
simply inherit what was previously set.  One probably does not want the ESA
to change from one environment to the next, especially if you want network
debugging to work.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] CS8900 Ethernet Device Driver in EDB7xxx
  2001-06-18 18:21 [ECOS] CS8900 Ethernet Device Driver in EDB7xxx honda
  2001-06-19  5:51 ` Gary Thomas
@ 2001-06-19  5:55 ` Jonathan Larmour
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2001-06-19  5:55 UTC (permalink / raw)
  To: honda; +Cc: ecos-discuss

honda@itri.org.tw wrote:
> 
> Hello,
>      In the subroutine edb7xxx_cs8900_init of file if_edb7xxx.c, the code
> under the comment // Fetch hardware address is shown below:
> 
>           #if defined(CYGPKG_REDBOOT) && \
>               defined(CYGSEM_REDBOOT_FLASH_CONFIG) && \
>               !defined(CYGSEM_ARM_EDB7XXX_SET_ESA)
>               flash_get_config("edb7xxx_esa", enaddr, CONFIG_ESA);
>           #else
>               for (i = 0;  i < ETHER_ADDR_LEN;  i += 2) {
>                   unsigned short esa_reg = get_reg(PP_IA+i);
>                   enaddr[i] = esa_reg & 0xFF;
>                   enaddr[i+1] = esa_reg >> 8;
>               }
>           #endif
> 
>      If I define CYGSEM_ARM_EDB7XXX_SET_ESA only and not CYGPKG_REDBOOT and
> CYGSEM_REDBOOT_FLASH_CONFIG,, the address enaddr will be filled by get_reg
> (...), so it won't be the value I set in the ConfigTool, is that right?

Yes, it must be a bug. That #else should be a:

#elif !defined(CYGSEM_ARM_EDB7XXX_SET_ESA)

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] CS8900 Ethernet Device Driver in EDB7xxx
@ 2001-06-19 17:45 honda
  0 siblings, 0 replies; 4+ messages in thread
From: honda @ 2001-06-19 17:45 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: ecos-discuss

>>
>> Hello,
>>      In the subroutine edb7xxx_cs8900_init of file if_edb7xxx.c, the
code
>> under the comment // Fetch hardware address is shown below:
>>
>>           #if defined(CYGPKG_REDBOOT) && \
>>               defined(CYGSEM_REDBOOT_FLASH_CONFIG) && \
>>               !defined(CYGSEM_ARM_EDB7XXX_SET_ESA)
>>               flash_get_config("edb7xxx_esa", enaddr, CONFIG_ESA);
>>           #else
>>               for (i = 0;  i < ETHER_ADDR_LEN;  i += 2) {
>>                   unsigned short esa_reg = get_reg(PP_IA+i);
>>                   enaddr[i] = esa_reg & 0xFF;
>>                   enaddr[i+1] = esa_reg >> 8;
>>               }
>>           #endif
>>
>>      If I define CYGSEM_ARM_EDB7XXX_SET_ESA only and not CYGPKG_REDBOOT
and
>> CYGSEM_REDBOOT_FLASH_CONFIG,, the address enaddr will be filled by
get_reg
>> (...), so it won't be the value I set in the ConfigTool, is that right?

>Yes, it must be a bug. That #else should be a:

>#elif !defined(CYGSEM_ARM_EDB7XXX_SET_ESA)

>Jifl

Yes, It did work. I've tried it last night.
Otherwise, the ESA would be FF:FF:FF:FF:FF:FF, it cannot get any response.
I think that the DHCP may fail for that.

Kuang-Yang Chuang

OES / ITRI
J220, Bldg. 78, 195-8, Sec. 4, Chung-Hsing Rd.
Chutung, Hsinchu 310, Taiwan, ROC

TEL: 886-3-5917546
FAX: 886-3-5917531




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-06-19 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-18 18:21 [ECOS] CS8900 Ethernet Device Driver in EDB7xxx honda
2001-06-19  5:51 ` Gary Thomas
2001-06-19  5:55 ` Jonathan Larmour
2001-06-19 17:45 honda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).