Using smc91111.c on powerpc and libchip/network questions

Peter Dufault dufault at
Wed Sep 2 17:09:32 UTC 2009

I'm bringing up a Phytec mpc5554 based on the Embedded Brains  
mpc55xxevb bsp.  It has the SMC LAN91C111 ethernet chip, and after  
enabling the driver it compiles.  A few questions:

1. The README file in c/src/libchip/network says:
"The reusable chip drivers do not directly access the controller.   
They access the registers on the controller via a set of functions  
which are provided by the BSP."

This is a definition of "reusable chip drivers" and not what exists in  
the c/src/libchip/network directory, correct?  Reading this is the  
reason I was surprised it compiled immediately - I assumed I needed to  
provide these hooks.
Some drivers defer to routines in board support packages but the  
smc91111 driver uses locally defined HAL_READ_UINT16() and friends  
macros (I just noticed HAL_READ_UINT16() is defined twice) with byte- 
swapping appropriate for big-endian architectures only (OK for me), I  
noticed similar hard-wired access methods in other drivers. The README  
should be changed to make it clear it is how things should be.  Is  
there a standard set of BSP register access functions I should use  

2. The driver uses "old-style exception processing".  I'll replace the  
set_vector() call with the appropriate BSP_install_rtems_irq_handler()  
call,  what other changes?  Why do some of the routines have  
conditional BSP_SHARED_HANDLER_SUPPORT to install  
BSP_install_rtems_shared_irq_handler() instead? If that's the right  
thing to do why isn't it done at a lower level?

Thanks -


More information about the users mailing list