[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [MiNT][PATCH] Wrong system bus speed define for the FireBee



2015-10-05 6:20 GMT+02:00 Roger Burrows <rfburrows@ymail.com>:
> On 4 Oct 2015 at 13:06, David Gálvez wrote:
>
>> I have stumble on this in the FireBee network driver (FEC):
>>
>> http://sparemint.org/cgi-bin/cvsweb/freemint/sys/sockets/xif/fec/platform/boar
>> d.h?rev=1.1&content-type=text/x-cvsweb-markup
>>
>> /sys/sockets/xif/fec/platform/board.h
>>
>> line 15
>>
>> /*
>>  * System Bus Clock Info
>>  */
>> #define SYSTEM_CLOCK 133
>>
>>
>> Isn't the system bus speed at 132 MHz in the FireBee?
> Yes.
>
>> I don't think it has any influence in how the driver works, but it
>> could be a source of confusion.
>>
> Taking a quick look at my not-quite-current version of the repository,
> SYSTEM_CLOCK is only used as an arg to fec_mii_init(), and then the value is
> divided by 5 without rounding.  So I agree, it shouldn't affect how the driver
> works.  And I agree, it should be 132 to avoid confusion.
>
> Roger
>
>
>

Attached a patch to fix this.

Comment:

Correct define for FireBee's system bus speed
Index: sys/sockets/xif/fec/platform/board.h
===================================================================
RCS file: /mint/freemint/sys/sockets/xif/fec/platform/board.h,v
retrieving revision 1.1
diff -u -8 -r1.1 board.h
--- sys/sockets/xif/fec/platform/board.h	11 Nov 2011 00:15:27 -0000	1.1
+++ sys/sockets/xif/fec/platform/board.h	5 Oct 2015 08:31:51 -0000
@@ -7,17 +7,17 @@
     FireTOS Flash paramters, like MAC Address
     (configure via FireBee CPX)
 */
 #define PARAMS_ADDRESS 0xE0002000
 
 /*
  * System Bus Clock Info
  */
-#define SYSTEM_CLOCK 133
+#define SYSTEM_CLOCK 132
 
 /*
 	CPU Type
 */
 #define MCF547X
 
 #include "types.h"
 #include "mcf548x_fec.h"