Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Added kernel option OMAP_3430 to allow easy differe...



details:   https://anonhg.NetBSD.org/src/rev/f106ca57b71e
branches:  trunk
changeset: 783209:f106ca57b71e
user:      khorben <khorben%NetBSD.org@localhost>
date:      Tue Dec 11 01:54:41 2012 +0000

description:
Added kernel option OMAP_3430 to allow easy differentiation between the
BEAGLEBOARD and N900 kernels; otherwise no real change.

Resulting N900 kernel tested with no visible regression.

<gimpy> go for it

diffstat:

 sys/arch/arm/omap/files.omap2           |   3 +-
 sys/arch/arm/omap/omap2_gpio.c          |  14 +++++++++++-
 sys/arch/arm/omap/omap2_gpmcreg.h       |   5 +++-
 sys/arch/arm/omap/omap2_obio.c          |   9 +++++--
 sys/arch/arm/omap/omap2_obioreg.h       |  23 ++++++++++++++++++++-
 sys/arch/arm/omap/omap2_reg.h           |  36 +++++++++++++++++++++++++++++++-
 sys/arch/arm/omap/omap3_sdhc.c          |  13 ++++++++---
 sys/arch/arm/omap/omap3_sdmmcreg.h      |   6 ++++-
 sys/arch/evbarm/beagle/beagle.h         |  13 ++++++++++-
 sys/arch/evbarm/beagle/beagle_machdep.c |  12 +++++-----
 sys/arch/evbarm/conf/N900               |   4 +-
 11 files changed, 113 insertions(+), 25 deletions(-)

diffs (truncated from 408 to 300 lines):

diff -r 61227c047d17 -r f106ca57b71e sys/arch/arm/omap/files.omap2
--- a/sys/arch/arm/omap/files.omap2     Tue Dec 11 01:52:30 2012 +0000
+++ b/sys/arch/arm/omap/files.omap2     Tue Dec 11 01:54:41 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.omap2,v 1.15 2012/09/05 00:19:59 matt Exp $
+#      $NetBSD: files.omap2,v 1.16 2012/12/11 01:54:41 khorben Exp $
 #
 # Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
 # Based on xscale/files.pxa2x0
@@ -18,6 +18,7 @@
 defflag opt_omap.h                             OMAP4: OMAP3
 defflag        opt_omap.h                              OMAP_2430: OMAP2
 defflag opt_omap.h                             OMAP_2420: OMAP2
+defflag opt_omap.h                             OMAP_3430: OMAP3
 defflag opt_omap.h                             OMAP_3530: OMAP3
 defflag opt_omap.h                             OMAP_4430: OMAP4
 defflag opt_omap.h                             TI_AM335X: OMAP3
diff -r 61227c047d17 -r f106ca57b71e sys/arch/arm/omap/omap2_gpio.c
--- a/sys/arch/arm/omap/omap2_gpio.c    Tue Dec 11 01:52:30 2012 +0000
+++ b/sys/arch/arm/omap/omap2_gpio.c    Tue Dec 11 01:54:41 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap2_gpio.c,v 1.12 2012/10/27 17:17:40 chs Exp $      */
+/*     $NetBSD: omap2_gpio.c,v 1.13 2012/12/11 01:54:42 khorben Exp $  */
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -28,7 +28,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.12 2012/10/27 17:17:40 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.13 2012/12/11 01:54:42 khorben Exp $");
 
 #define _INTR_PRIVATE
 
@@ -339,6 +339,16 @@
                return 1;
 #endif
 
+#ifdef OMAP_3430
+       if (oa->obio_addr == GPIO1_BASE_3430
+           || oa->obio_addr == GPIO2_BASE_3430
+           || oa->obio_addr == GPIO3_BASE_3430
+           || oa->obio_addr == GPIO4_BASE_3430
+           || oa->obio_addr == GPIO5_BASE_3430
+           || oa->obio_addr == GPIO6_BASE_3430)
+               return 1;
+#endif
+
 #ifdef OMAP_3530
        if (oa->obio_addr == GPIO1_BASE_3530
            || oa->obio_addr == GPIO2_BASE_3530
diff -r 61227c047d17 -r f106ca57b71e sys/arch/arm/omap/omap2_gpmcreg.h
--- a/sys/arch/arm/omap/omap2_gpmcreg.h Tue Dec 11 01:52:30 2012 +0000
+++ b/sys/arch/arm/omap/omap2_gpmcreg.h Tue Dec 11 01:54:41 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap2_gpmcreg.h,v 1.8 2012/08/29 17:48:17 matt Exp $   */
+/*     $NetBSD: omap2_gpmcreg.h,v 1.9 2012/12/11 01:54:42 khorben Exp $        */
 /*
  * Copyright (c) 2007 Microsoft
  * All rights reserved.
@@ -44,6 +44,9 @@
 #ifdef OMAP_2420
 #define GPMC_BASE                      0x6800a000
 #endif
+#ifdef OMAP_3430
+#define GPMC_BASE                      0x6e000000
+#endif
 #ifdef OMAP_3530
 #define GPMC_BASE                      0x6e000000
 #endif
diff -r 61227c047d17 -r f106ca57b71e sys/arch/arm/omap/omap2_obio.c
--- a/sys/arch/arm/omap/omap2_obio.c    Tue Dec 11 01:52:30 2012 +0000
+++ b/sys/arch/arm/omap/omap2_obio.c    Tue Dec 11 01:54:41 2012 +0000
@@ -1,7 +1,7 @@
-/*     $Id: omap2_obio.c,v 1.15 2012/12/11 01:33:32 matt Exp $ */
+/*     $Id: omap2_obio.c,v 1.16 2012/12/11 01:54:42 khorben Exp $      */
 
 /* adapted from: */
-/*     $NetBSD: omap2_obio.c,v 1.15 2012/12/11 01:33:32 matt Exp $ */
+/*     $NetBSD: omap2_obio.c,v 1.16 2012/12/11 01:54:42 khorben Exp $ */
 
 
 /*
@@ -103,7 +103,7 @@
 
 #include "opt_omap.h"
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.15 2012/12/11 01:33:32 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.16 2012/12/11 01:54:42 khorben Exp $");
 
 #include "locators.h"
 #include "obio.h"
@@ -352,6 +352,9 @@
 #if defined(OMAP_2430) || defined(OMAP_2420)
        { .name = "avic", .addr = INTC_BASE, .required = true },
 #endif
+#if defined(OMAP_3430)
+       { .name = "avic", .addr = INTC_BASE_3430, .required = true },
+#endif
 #if defined(OMAP_3530)
        { .name = "avic", .addr = INTC_BASE_3530, .required = true },
 #endif
diff -r 61227c047d17 -r f106ca57b71e sys/arch/arm/omap/omap2_obioreg.h
--- a/sys/arch/arm/omap/omap2_obioreg.h Tue Dec 11 01:52:30 2012 +0000
+++ b/sys/arch/arm/omap/omap2_obioreg.h Tue Dec 11 01:54:41 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap2_obioreg.h,v 1.6 2012/08/29 17:48:17 matt Exp $   */
+/*     $NetBSD: omap2_obioreg.h,v 1.7 2012/12/11 01:54:42 khorben Exp $        */
 
 /*
  * Copyright (c) 2007 Microsoft
@@ -56,6 +56,27 @@
 #define        GPIO5_BASE              GPIO5_BASE_2430
 #endif
 
+#if defined(OMAP_3430)
+#define        OMAP2_OBIO_0_BASE       OMAP3430_L4_CORE_BASE
+#define        OMAP2_OBIO_0_SIZE       OMAP3430_L4_CORE_SIZE
+
+#define        OMAP2_OBIO_1_BASE       OMAP3430_L4_WAKEUP_BASE
+#define        OMAP2_OBIO_1_SIZE       OMAP3430_L4_WAKEUP_SIZE
+
+#define        OMAP2_OBIO_2_BASE       OMAP3430_L4_PERIPHERAL_BASE
+#define        OMAP2_OBIO_2_SIZE       OMAP3430_L4_PERIPHERAL_SIZE
+
+#define        OMAP2_OBIO_3_BASE       OMAP3430_L4_EMULATION_BASE
+#define        OMAP2_OBIO_3_SIZE       OMAP3430_L4_EMULATION_SIZE
+
+#define        GPIO1_BASE              GPIO1_BASE_3430
+#define        GPIO2_BASE              GPIO2_BASE_3430
+#define        GPIO3_BASE              GPIO3_BASE_3430
+#define        GPIO4_BASE              GPIO4_BASE_3430
+#define        GPIO5_BASE              GPIO5_BASE_3430
+#define        GPIO6_BASE              GPIO6_BASE_3430
+#endif
+
 #if defined(OMAP_3530)
 #define        OMAP2_OBIO_0_BASE       OMAP3530_L4_CORE_BASE
 #define        OMAP2_OBIO_0_SIZE       OMAP3530_L4_CORE_SIZE
diff -r 61227c047d17 -r f106ca57b71e sys/arch/arm/omap/omap2_reg.h
--- a/sys/arch/arm/omap/omap2_reg.h     Tue Dec 11 01:52:30 2012 +0000
+++ b/sys/arch/arm/omap/omap2_reg.h     Tue Dec 11 01:54:41 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.11 2012/09/05 00:19:59 matt Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.12 2012/12/11 01:54:42 khorben Exp $ */
 
 /*
  * Copyright (c) 2007 Microsoft
@@ -45,11 +45,23 @@
 #define OMAP2430_L4_WAKEUP_BASE                0x49000000
 #define OMAP2430_L4_WAKEUP_SIZE                (8 << 20)       /* 8 MB */
 
+#define OMAP3430_L4_CORE_BASE          0x48000000
+#define OMAP3430_L4_CORE_SIZE          0x01000000      /* 16 MB */
+
 #define OMAP3530_L4_CORE_BASE          0x48000000
 #define OMAP3530_L4_CORE_SIZE          0x01000000      /* 16 MB */
 
 /* OMAP3 processors */
 
+#define OMAP3430_L4_WAKEUP_BASE                0x48300000
+#define OMAP3430_L4_WAKEUP_SIZE                0x00040000      /* 256KB */
+
+#define OMAP3430_L4_PERIPHERAL_BASE    0x49000000
+#define OMAP3430_L4_PERIPHERAL_SIZE    0x00100000      /* 1MB */
+
+#define OMAP3430_L4_EMULATION_BASE     0x54000000
+#define OMAP3430_L4_EMULATION_SIZE     0x00800000      /* 8MB */
+
 #define OMAP3530_L4_WAKEUP_BASE                0x48300000
 #define OMAP3530_L4_WAKEUP_SIZE                0x00040000      /* 256KB */
 
@@ -107,6 +119,9 @@
 #ifdef OMAP_2420
 #define OMAP2_CM_BASE                  0x48008000
 #endif
+#ifdef OMAP_3430
+#define OMAP2_CM_BASE                  (OMAP3430_L4_CORE_BASE + 0x04000)
+#endif
 #ifdef OMAP_3530
 #define OMAP2_CM_BASE                  (OMAP3530_L4_CORE_BASE + 0x04000)
 #endif
@@ -304,6 +319,9 @@
 /*
  * Power Management registers base, offsets, and size
  */
+#ifdef OMAP_3430
+#define        OMAP2_PRM_BASE                  0x48306000
+#endif
 #ifdef OMAP_3530
 #define        OMAP2_PRM_BASE                  0x48306000
 #endif
@@ -513,6 +531,7 @@
  * Interrupts
  */
 #define        INTC_BASE               0x480FE000
+#define        INTC_BASE_3430          0x48200000
 #define        INTC_BASE_3530          0x48200000      /* Also TI_AM335X and TI_DM37XX */
 #define        INTC_REVISISON          0x0000
 #define        INTC_SYSCONFIG          0x0010
@@ -554,7 +573,7 @@
 /*
  * GPT - General Purpose Timers
  */
-#if defined(OMAP_3530) || defined(TI_DM37XX)
+#if defined(OMAP_3430) || defined(OMAP_3530) || defined(TI_DM37XX)
 #define        GPT1_BASE                       0x48318000
 #define        GPT2_BASE                       0x49032000
 #define        GPT3_BASE                       0x49034000
@@ -566,6 +585,9 @@
 #define        GPT9_BASE                       0x49040000
 #define        GPT10_BASE                      0x48086000
 #define        GPT11_BASE                      0x48088000
+#if defined(OMAP_3430)
+#define        GPT12_BASE                      0x48304000
+#endif
 #if defined(OMAP_3530)
 #define        GPT12_BASE                      0x48304000
 #endif
@@ -609,6 +631,13 @@
 #define        GPIO3_BASE_2420                 0x4801c000
 #define        GPIO4_BASE_2420                 0x4801e000
 
+#define        GPIO1_BASE_3430                 0x48310000
+#define        GPIO2_BASE_3430                 0x49050000
+#define        GPIO3_BASE_3430                 0x49052000
+#define        GPIO4_BASE_3430                 0x49054000
+#define        GPIO5_BASE_3430                 0x49056000
+#define        GPIO6_BASE_3430                 0x49058000
+
 #define        GPIO1_BASE_3530                 0x48310000
 #define        GPIO2_BASE_3530                 0x49050000
 #define        GPIO3_BASE_3530                 0x49052000
@@ -664,6 +693,9 @@
  */
 #define        OHCI1_BASE_2430                 0x4805e000
 
+#define        OHCI1_BASE_3430                 0x48064400
+#define        EHCI1_BASE_3430                 0x48064800
+
 #define        OHCI1_BASE_3530                 0x48064400
 #define        EHCI1_BASE_3530                 0x48064800
 
diff -r 61227c047d17 -r f106ca57b71e sys/arch/arm/omap/omap3_sdhc.c
--- a/sys/arch/arm/omap/omap3_sdhc.c    Tue Dec 11 01:52:30 2012 +0000
+++ b/sys/arch/arm/omap/omap3_sdhc.c    Tue Dec 11 01:54:41 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap3_sdhc.c,v 1.2 2012/10/29 13:30:25 kiyohara Exp $  */
+/*     $NetBSD: omap3_sdhc.c,v 1.3 2012/12/11 01:54:42 khorben Exp $   */
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.2 2012/10/29 13:30:25 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_sdhc.c,v 1.3 2012/12/11 01:54:42 khorben Exp $");
 
 #include "opt_omap.h"
 
@@ -78,11 +78,16 @@
 static int
 obiosdhc_match(device_t parent, cfdata_t cf, void *aux)
 {
-#ifdef OMAP_3530
+#if defined(OMAP_3430) || defined(OMAP_3530)
        struct obio_attach_args * const oa = aux;
 #endif
 
-#ifdef OMAP_3530
+#if defined(OMAP_3430)
+       if (oa->obio_addr == SDMMC1_BASE_3430
+           || oa->obio_addr == SDMMC2_BASE_3430
+           || oa->obio_addr == SDMMC3_BASE_3430)
+                return 1;
+#elif defined(OMAP_3530)
        if (oa->obio_addr == SDMMC1_BASE_3530
            || oa->obio_addr == SDMMC2_BASE_3530
            || oa->obio_addr == SDMMC3_BASE_3530)
diff -r 61227c047d17 -r f106ca57b71e sys/arch/arm/omap/omap3_sdmmcreg.h
--- a/sys/arch/arm/omap/omap3_sdmmcreg.h        Tue Dec 11 01:52:30 2012 +0000
+++ b/sys/arch/arm/omap/omap3_sdmmcreg.h        Tue Dec 11 01:54:41 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: omap3_sdmmcreg.h,v 1.2 2012/10/29 13:30:25 kiyohara Exp $      */
+/*     $NetBSD: omap3_sdmmcreg.h,v 1.3 2012/12/11 01:54:43 khorben Exp $       */
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -31,6 +31,10 @@
 #ifndef _ARM_OMAP_OMAP3_SDMMCREG_H_
 #define _ARM_OMAP_OMAP3_SDMMCREG_H_
 
+#define SDMMC1_BASE_3430       0x4809C000
+#define SDMMC2_BASE_3430       0x480B4000
+#define SDMMC3_BASE_3430       0x480AD000
+
 #define SDMMC1_BASE_3530       0x4809C000
 #define SDMMC2_BASE_3530       0x480B4000



Home | Main Index | Thread Index | Old Index