Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/ibm4xx/dev Support OPB running @ 33MHz for ...



details:   https://anonhg.NetBSD.org/src/rev/990f1db4aabb
branches:  trunk
changeset: 960827:990f1db4aabb
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Mar 30 02:25:24 2021 +0000

description:
Support OPB running @ 33MHz for 405GP based boards.
No need to modify EMAC_MR1 register this case
(STACR_OPBC fields are reserved for 405GP).

diffstat:

 sys/arch/powerpc/ibm4xx/dev/emacreg.h |  3 ++-
 sys/arch/powerpc/ibm4xx/dev/if_emac.c |  5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 1caf460adfee -r 990f1db4aabb sys/arch/powerpc/ibm4xx/dev/emacreg.h
--- a/sys/arch/powerpc/ibm4xx/dev/emacreg.h     Tue Mar 30 02:04:43 2021 +0000
+++ b/sys/arch/powerpc/ibm4xx/dev/emacreg.h     Tue Mar 30 02:25:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emacreg.h,v 1.4 2020/07/06 09:34:17 rin Exp $  */
+/*     $NetBSD: emacreg.h,v 1.5 2021/03/30 02:25:24 rin Exp $  */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -215,6 +215,7 @@
 #define          STACR_PHYE              0x00004000    /* PHY error */
 #define          STACR_WRITE             0x00002000    /* STA command - write */
 #define          STACR_READ              0x00001000    /* STA command - read */
+#define          STACR_OPBC_33MHZ        0x0           /*   -  33MHz */
 #define          STACR_OPBC_50MHZ        0x0           /*   -  50MHz */
 #define          STACR_OPBC_66MHZ        0x1           /*   -  66MHz */
 #define          STACR_OPBC_83MHZ        0x2           /*   -  83MHz */
diff -r 1caf460adfee -r 990f1db4aabb sys/arch/powerpc/ibm4xx/dev/if_emac.c
--- a/sys/arch/powerpc/ibm4xx/dev/if_emac.c     Tue Mar 30 02:04:43 2021 +0000
+++ b/sys/arch/powerpc/ibm4xx/dev/if_emac.c     Tue Mar 30 02:25:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_emac.c,v 1.55 2021/02/27 20:43:58 rin Exp $ */
+/*     $NetBSD: if_emac.c,v 1.56 2021/03/30 02:25:24 rin Exp $ */
 
 /*
  * Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.55 2021/02/27 20:43:58 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_emac.c,v 1.56 2021/03/30 02:25:24 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_emac.h"
@@ -456,6 +456,7 @@
 
        opb_freq = opb_get_frequency();
        switch (opb_freq) {
+       case  33333333: opbc =  STACR_OPBC_33MHZ; break;
        case  50000000: opbc =  STACR_OPBC_50MHZ; break;
        case  66666666: opbc =  STACR_OPBC_66MHZ; break;
        case  83333333: opbc =  STACR_OPBC_83MHZ; break;



Home | Main Index | Thread Index | Old Index