Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/omap Add some more OMAP4430 support.
details: https://anonhg.NetBSD.org/src/rev/26ee904d2c57
branches: trunk
changeset: 781251:26ee904d2c57
user: matt <matt%NetBSD.org@localhost>
date: Wed Aug 29 17:48:17 2012 +0000
description:
Add some more OMAP4430 support.
Add defines needed to determine clock rates of OMAP3530/TIAM37XX and
OMAP4430.
diffstat:
sys/arch/arm/omap/files.omap2 | 4 ++--
sys/arch/arm/omap/omap2_gpio.c | 16 ++++++++++++++--
sys/arch/arm/omap/omap2_gpmcreg.h | 4 ++--
sys/arch/arm/omap/omap2_intr.h | 7 +++----
sys/arch/arm/omap/omap2_obioreg.h | 24 +++++++++++++++++++++++-
sys/arch/arm/omap/omap2_reg.h | 36 ++++++++++++++++++++++++++++--------
6 files changed, 72 insertions(+), 19 deletions(-)
diffs (223 lines):
diff -r 32b64ec89c9f -r 26ee904d2c57 sys/arch/arm/omap/files.omap2
--- a/sys/arch/arm/omap/files.omap2 Wed Aug 29 17:44:25 2012 +0000
+++ b/sys/arch/arm/omap/files.omap2 Wed Aug 29 17:48:17 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.omap2,v 1.13 2012/08/22 22:18:21 matt Exp $
+# $NetBSD: files.omap2,v 1.14 2012/08/29 17:48:17 matt Exp $
#
# Configuration info for Texas Instruments OMAP2/OMAP3 CPU support
# Based on xscale/files.pxa2x0
@@ -39,7 +39,7 @@
device omapicu: pic, pic_splfuncs
attach omapicu at obio with omap2icu
file arch/arm/omap/omap2_icu.c (omap2 | omap3) & omapicu
-file arch/arm/omap/omap2430_intr.c omap2 & !omapicu
+file arch/arm/omap/omap2430_intr.c omap2 & !omapicu & !omap4
# OMAP2 GPIO controllers
device omapgpio: gpiobus
diff -r 32b64ec89c9f -r 26ee904d2c57 sys/arch/arm/omap/omap2_gpio.c
--- a/sys/arch/arm/omap/omap2_gpio.c Wed Aug 29 17:44:25 2012 +0000
+++ b/sys/arch/arm/omap/omap2_gpio.c Wed Aug 29 17:48:17 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_gpio.c,v 1.10 2012/08/22 22:18:21 matt Exp $ */
+/* $NetBSD: omap2_gpio.c,v 1.11 2012/08/29 17:48:17 matt 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.10 2012/08/22 22:18:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_gpio.c,v 1.11 2012/08/29 17:48:17 matt Exp $");
#define _INTR_PRIVATE
@@ -348,6 +348,17 @@
|| oa->obio_addr == GPIO6_BASE_3530)
return 1;
#endif
+
+#ifdef OMAP_4430
+ if (oa->obio_addr == GPIO1_BASE_4430
+ || oa->obio_addr == GPIO2_BASE_4430
+ || oa->obio_addr == GPIO3_BASE_4430
+ || oa->obio_addr == GPIO4_BASE_4430
+ || oa->obio_addr == GPIO5_BASE_4430
+ || oa->obio_addr == GPIO6_BASE_4430)
+ return 1;
+#endif
+
#ifdef TI_AM335X
if (oa->obio_addr == GPIO0_BASE_TI_AM335X
|| oa->obio_addr == GPIO1_BASE_TI_AM335X
@@ -355,6 +366,7 @@
|| oa->obio_addr == GPIO3_BASE_TI_AM335X)
return 1;
#endif
+
#ifdef TI_DM37XX
if (oa->obio_addr == GPIO1_BASE_TI_DM37XX
|| oa->obio_addr == GPIO2_BASE_TI_DM37XX
diff -r 32b64ec89c9f -r 26ee904d2c57 sys/arch/arm/omap/omap2_gpmcreg.h
--- a/sys/arch/arm/omap/omap2_gpmcreg.h Wed Aug 29 17:44:25 2012 +0000
+++ b/sys/arch/arm/omap/omap2_gpmcreg.h Wed Aug 29 17:48:17 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_gpmcreg.h,v 1.7 2012/08/22 22:18:21 matt Exp $ */
+/* $NetBSD: omap2_gpmcreg.h,v 1.8 2012/08/29 17:48:17 matt Exp $ */
/*
* Copyright (c) 2007 Microsoft
* All rights reserved.
@@ -47,7 +47,7 @@
#ifdef OMAP_3530
#define GPMC_BASE 0x6e000000
#endif
-#ifdef TI_AM335X
+#if defined(TI_AM335X) || defined(OMAP_4430)
#define GPMC_BASE 0x50000000
#endif
#ifdef TI_DM37XX
diff -r 32b64ec89c9f -r 26ee904d2c57 sys/arch/arm/omap/omap2_intr.h
--- a/sys/arch/arm/omap/omap2_intr.h Wed Aug 29 17:44:25 2012 +0000
+++ b/sys/arch/arm/omap/omap2_intr.h Wed Aug 29 17:48:17 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_intr.h,v 1.7 2012/07/14 07:42:57 matt Exp $ */
+/* $NetBSD: omap2_intr.h,v 1.8 2012/08/29 17:48:17 matt Exp $ */
/*
* Define the SDP2430 specific information and then include the generic OMAP
@@ -39,11 +39,10 @@
#include <arm/cpufunc.h>
#endif
-#if defined(OMAP2) || defined(OMAP3)
-#include <arm/omap/omap2430_intr.h>
-#endif
#if defined(OMAP_4430)
#include <arm/omap/omap4430_intr.h>
+#elif defined(OMAP2) || defined(OMAP3)
+#include <arm/omap/omap2430_intr.h>
#endif
#ifndef _LOCORE
diff -r 32b64ec89c9f -r 26ee904d2c57 sys/arch/arm/omap/omap2_obioreg.h
--- a/sys/arch/arm/omap/omap2_obioreg.h Wed Aug 29 17:44:25 2012 +0000
+++ b/sys/arch/arm/omap/omap2_obioreg.h Wed Aug 29 17:48:17 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_obioreg.h,v 1.5 2012/08/22 22:18:21 matt Exp $ */
+/* $NetBSD: omap2_obioreg.h,v 1.6 2012/08/29 17:48:17 matt Exp $ */
/*
* Copyright (c) 2007 Microsoft
@@ -74,6 +74,28 @@
#define GPIO3_BASE GPIO3_BASE_3530
#define GPIO4_BASE GPIO4_BASE_3530
#define GPIO5_BASE GPIO5_BASE_3530
+#define GPIO6_BASE GPIO6_BASE_3530
+#endif
+
+#if defined(OMAP_4430)
+#define OMAP2_OBIO_0_BASE OMAP4430_L4_CORE_BASE
+#define OMAP2_OBIO_0_SIZE OMAP4430_L4_CORE_SIZE
+
+#define OMAP2_OBIO_1_BASE OMAP4430_L4_WAKEUP_BASE
+#define OMAP2_OBIO_1_SIZE OMAP4430_L4_WAKEUP_SIZE
+
+#define OMAP2_OBIO_2_BASE OMAP4430_L4_PERIPHERAL_BASE
+#define OMAP2_OBIO_2_SIZE OMAP4430_L4_PERIPHERAL_SIZE
+
+#define OMAP2_OBIO_3_BASE OMAP4430_L4_ABE_BASE
+#define OMAP2_OBIO_3_SIZE OMAP4430_L4_ABE_SIZE
+
+#define GPIO1_BASE GPIO1_BASE_4430
+#define GPIO2_BASE GPIO2_BASE_4430
+#define GPIO3_BASE GPIO3_BASE_4430
+#define GPIO4_BASE GPIO4_BASE_4430
+#define GPIO5_BASE GPIO5_BASE_4430
+#define GPIO6_BASE GPIO6_BASE_4430
#endif
#if defined(TI_AM335X)
diff -r 32b64ec89c9f -r 26ee904d2c57 sys/arch/arm/omap/omap2_reg.h
--- a/sys/arch/arm/omap/omap2_reg.h Wed Aug 29 17:44:25 2012 +0000
+++ b/sys/arch/arm/omap/omap2_reg.h Wed Aug 29 17:48:17 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_reg.h,v 1.9 2012/08/24 06:34:08 matt Exp $ */
+/* $NetBSD: omap2_reg.h,v 1.10 2012/08/29 17:48:17 matt Exp $ */
/*
* Copyright (c) 2007 Microsoft
@@ -61,17 +61,17 @@
/* OMAP4 processors */
-#define OMAP4430_L4_CORE_BASE 0x48000000
-#define OMAP4430_L4_CORE_SIZE 0x01000000 /* 16 MB */
+#define OMAP4430_L4_CORE_BASE 0x4A000000
+#define OMAP4430_L4_CORE_SIZE 0x01000000 /* 16MB - CFG */
#define OMAP4430_L4_WAKEUP_BASE 0x4A300000
#define OMAP4430_L4_WAKEUP_SIZE 0x00040000 /* 256KB */
#define OMAP4430_L4_PERIPHERAL_BASE 0x49000000
-#define OMAP4430_L4_PERIPHERAL_SIZE 0x00100000 /* 1MB of 16MB */
+#define OMAP4430_L4_PERIPHERAL_SIZE 0x01000000 /* 16MB */
-#define OMAP4430_L4_EMULATION_BASE 0x54000000 /* Actually L3 */
-#define OMAP4430_L4_EMULATION_SIZE 0x00800000 /* 8MB */
+#define OMAP4430_L4_ABE_BASE 0x40000000 /* Actually L3 */
+#define OMAP4430_L4_ABE_SIZE 0x01000000 /* 16MB */
/* TI Sitara AM335x (OMAP like) */
@@ -282,12 +282,25 @@
#define OMAP3_CM_CLKSEL1_PLL_MPU 0x940
#define OMAP3_CM_CLKSEL2_PLL_MPU 0x944
-#define OMAP3_CM_CLKSEL1_PLL_MPU_CLK_SRC __BITS(21,9)
+#define OMAP3_CM_CLKSEL1_PLL_MPU_CLK_SRC __BITS(21,19)
#define OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_MULT __BITS(18,8)
#define OMAP3_CM_CLKSEL1_PLL_MPU_DPLL_DIV __BITS(6,0)
#define OMAP3_CM_CLKSEL2_PLL_MPU_DPLL_CLKOUT_DIV __BITS(4,0)
+#define OMAP4_CM_SYS_CLKSEL 0x110
+#define OMAP4_CM_CLKSEL_DPLL_MPU 0x16c
+#define OMAP4_CM_DIV_M2_DPLL_MPU 0x170
+
+#define OMAP4_CM_SYS_CLKSEL_CLKIN __BITS(2,0)
+#define OMAP4_CM_CLKSEL_FREQS { 0, 12000, 13000, 16800, 19200, 26000, 27000, 38400 }
+#define OMAP4_CM_CLKSEL_MULT 1000
+
+#define OMAP4_CM_CLKSEL_DPLL_MPU_DCC_EN __BIT(22)
+#define OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_MULT __BITS(18,8)
+#define OMAP4_CM_CLKSEL_DPLL_MPU_DPLL_DIV __BITS(6,0)
+
+#define OMAP4_CM_DIV_M2_DPLL_MPU_DPLL_CLKOUT_DIV __BITS(4,0)
/*
* Power Management registers base, offsets, and size
*/
@@ -295,7 +308,7 @@
#define OMAP2_PRM_BASE 0x48306000
#endif
#ifdef OMAP_4430
-#define OMAP2_PRM_BASE 0x4A306000
+#define OMAP2_PRM_BASE (OMAP4430_L4_WAKEUP_BASE + 0x6000)
#endif
#ifdef TI_AM335X
#define OMAP2_PRM_BASE 0x48306000
@@ -599,6 +612,13 @@
#define GPIO5_BASE_3530 0x49056000
#define GPIO6_BASE_3530 0x49058000
+#define GPIO1_BASE_4430 0x4a310000
+#define GPIO2_BASE_4430 0x48055000
+#define GPIO3_BASE_4430 0x48057000
+#define GPIO4_BASE_4430 0x48059000
+#define GPIO5_BASE_4430 0x4805b000
+#define GPIO6_BASE_4430 0x4805d000
+
#define GPIO0_BASE_TI_AM335X 0x44e07000
#define GPIO1_BASE_TI_AM335X 0x4804c000
#define GPIO2_BASE_TI_AM335X 0x481ac000
Home |
Main Index |
Thread Index |
Old Index