]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: OMAP: am33xx: Update common OMAP machine specific sources
authorAfzal Mohammed <afzal@ti.com>
Tue, 13 Dec 2011 18:46:43 +0000 (10:46 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 13 Dec 2011 18:46:43 +0000 (10:46 -0800)
This patch updates the common machine specific source files for
support for AM33XX/AM335x with cpu type, macros for identification of
AM33XX/AM335X device.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
[tony@atomide.com: updated for map_io and common.h changes, dropped CK_AM33XX]
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/clock3xxx_data.c
arch/arm/mach-omap2/common.c
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/serial.c
arch/arm/plat-omap/Makefile
arch/arm/plat-omap/include/plat/am33xx.h [new file with mode: 0644]
arch/arm/plat-omap/include/plat/hardware.h
arch/arm/plat-omap/include/plat/io.h
arch/arm/plat-omap/include/plat/omap34xx.h

index 5d0064a4fb5a638bb1141489354244e95899c1a1..3d56d8a2b86e75d21b816969a5eee31c0892f825 100644 (file)
@@ -3517,6 +3517,8 @@ int __init omap3xxx_clk_init(void)
        } else if (cpu_is_ti816x()) {
                cpu_mask = RATE_IN_TI816X;
                cpu_clkflg = CK_TI816X;
+       } else if (cpu_is_am33xx()) {
+               cpu_mask = RATE_IN_AM33XX;
        } else if (cpu_is_omap34xx()) {
                if (omap_rev() == OMAP3430_REV_ES1_0) {
                        cpu_mask = RATE_IN_3430ES1;
index 684b8a7cd401adcd034b7ab23a4f7852680eff34..c900dcb6f1fd0409e5c90dd21652a4dce1d5af38 100644 (file)
@@ -128,6 +128,27 @@ void __init omap2_set_globals_ti816x(void)
 {
        __omap2_set_globals(&ti816x_globals);
 }
+
+#define AM33XX_TAP_BASE                (AM33XX_CTRL_BASE + \
+                               TI816X_CONTROL_DEVICE_ID - 0x204)
+
+static struct omap_globals am33xx_globals = {
+       .class  = AM335X_CLASS,
+       .tap    = AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE),
+       .ctrl   = AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE),
+       .prm    = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
+       .cm     = AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE),
+};
+
+void __init omap2_set_globals_am33xx(void)
+{
+       __omap2_set_globals(&am33xx_globals);
+}
+
+void __init am33xx_map_io(void)
+{
+       omapam33xx_map_common_io();
+}
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4)
index 012bac7d56a593c5234788dac459df27a4bb92cf..9b733e343bf5a2172ba8962aaac57fd7a51ccc7c 100644 (file)
@@ -60,6 +60,14 @@ static inline void omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+extern void omapam33xx_map_common_io(void);
+#else
+static inline void omapam33xx_map_common_io(void)
+{
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 extern void omap44xx_map_common_io(void);
 #else
@@ -107,6 +115,7 @@ void omap2_set_globals_243x(void);
 void omap2_set_globals_3xxx(void);
 void omap2_set_globals_443x(void);
 void omap2_set_globals_ti816x(void);
+void omap2_set_globals_am33xx(void);
 
 /* These get called from omap2_set_globals_xxxx(), do not call these */
 void omap2_set_globals_tap(struct omap_globals *);
@@ -117,6 +126,7 @@ void omap2_set_globals_prcm(struct omap_globals *);
 void omap242x_map_io(void);
 void omap243x_map_io(void);
 void omap3_map_io(void);
+void am33xx_map_io(void);
 void omap4_map_io(void);
 
 /**
index 27ad722df637d29b33634a2586e21df55addcda1..7ab09f764600075e621b06fdc8301119387da665 100644 (file)
@@ -340,6 +340,10 @@ static void __init omap3_check_revision(const char **cpu_rev)
                        break;
                }
                break;
+       case 0xb944:
+               omap_revision = AM335X_REV_ES1_0;
+               *cpu_rev = "1.0";
+               break;
        default:
                /* Unknown default to latest silicon rev as default */
                omap_revision = OMAP3630_REV_ES1_2;
@@ -432,6 +436,8 @@ static void __init omap3_cpuinfo(const char *cpu_rev)
                cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
        } else if (cpu_is_ti816x()) {
                cpu_name = "TI816X";
+       } else if (cpu_is_am335x()) {
+               cpu_name =  "AM335X";
        } else if (omap3_has_iva() && omap3_has_sgx()) {
                /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
                cpu_name = "OMAP3430/3530";
index 3f565dd2ea8dd52dd0c889dcb963d6948a9b139b..088d2ba60effa73d28a9a8bdbe8fe8e470891120 100644 (file)
@@ -178,12 +178,29 @@ static struct map_desc omap34xx_io_desc[] __initdata = {
 
 #ifdef CONFIG_SOC_OMAPTI816X
 static struct map_desc omapti816x_io_desc[] __initdata = {
+       {
+               .virtual        = L4_34XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_34XX_PHYS),
+               .length         = L4_34XX_SIZE,
+               .type           = MT_DEVICE
+       }
+};
+#endif
+
+#ifdef CONFIG_SOC_OMAPAM33XX
+static struct map_desc omapam33xx_io_desc[] __initdata = {
        {
                .virtual        = L4_34XX_VIRT,
                .pfn            = __phys_to_pfn(L4_34XX_PHYS),
                .length         = L4_34XX_SIZE,
                .type           = MT_DEVICE
        },
+       {
+               .virtual        = L4_WK_AM33XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_WK_AM33XX_PHYS),
+               .length         = L4_WK_AM33XX_SIZE,
+               .type           = MT_DEVICE
+       }
 };
 #endif
 
@@ -270,6 +287,13 @@ void __init omapti816x_map_common_io(void)
 }
 #endif
 
+#ifdef CONFIG_SOC_OMAPAM33XX
+void __init omapam33xx_map_common_io(void)
+{
+       iotable_init(omapam33xx_io_desc, ARRAY_SIZE(omapam33xx_io_desc));
+}
+#endif
+
 #ifdef CONFIG_ARCH_OMAP4
 void __init omap44xx_map_common_io(void)
 {
index 42c326732a29a078f93f2a1874dadcfe5fd6c16c..9770c7624aa072019fbd1600f76c540e11037f70 100644 (file)
@@ -464,7 +464,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
                mod_timer(&uart->timer, jiffies + uart->timeout);
        omap_uart_smart_idle_enable(uart, 0);
 
-       if (cpu_is_omap34xx() && !cpu_is_ti816x()) {
+       if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx())) {
                u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD;
                u32 wk_mask = 0;
                u32 padconf = 0;
@@ -828,7 +828,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
        }
 
        /* Enable the MDR1 errata for OMAP3 */
-       if (cpu_is_omap34xx() && !cpu_is_ti816x())
+       if (cpu_is_omap34xx() && !(cpu_is_ti816x() || cpu_is_am33xx()))
                uart->errata |= UART_ERRATA_i202_MDR1_ACCESS;
 }
 
index 3df04d944e4d1497f4e74475acac603e163af24c..9a584614e7e66feb051ddde13f61545f94632290 100644 (file)
@@ -19,7 +19,6 @@ obj-$(CONFIG_ARCH_OMAP4) += omap_device.o
 
 obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
 
-obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
 obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
 obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
 obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
diff --git a/arch/arm/plat-omap/include/plat/am33xx.h b/arch/arm/plat-omap/include/plat/am33xx.h
new file mode 100644 (file)
index 0000000..06c19bb
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * This file contains the address info for various AM33XX modules.
+ *
+ * Copyright (C) 2011 Texas Instruments, Inc. - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_AM33XX_H
+#define __ASM_ARCH_AM33XX_H
+
+#define L4_SLOW_AM33XX_BASE    0x48000000
+
+#define AM33XX_SCM_BASE                0x44E10000
+#define AM33XX_CTRL_BASE       AM33XX_SCM_BASE
+#define AM33XX_PRCM_BASE       0x44E00000
+
+#endif /* __ASM_ARCH_AM33XX_H */
index e87efe1499b8c5ba06874ead21fd5c52de64f2fc..e6521e120d9f50c66dc5677b8e3b2985b79103da 100644 (file)
 #include <plat/omap34xx.h>
 #include <plat/omap44xx.h>
 #include <plat/ti816x.h>
+#include <plat/am33xx.h>
 
 #endif /* __ASM_ARCH_OMAP_HARDWARE_H */
index 1234944a4da06870fbd11cf9bb2725f05c876f4a..0696bae1818bc9104d06a931606f628c06549b65 100644 (file)
@@ -73,6 +73,9 @@
 #define OMAP4_L3_IO_OFFSET     0xb4000000
 #define OMAP4_L3_IO_ADDRESS(pa)        IOMEM((pa) + OMAP4_L3_IO_OFFSET) /* L3 */
 
+#define AM33XX_L4_WK_IO_OFFSET 0xb5000000
+#define AM33XX_L4_WK_IO_ADDRESS(pa)    IOMEM((pa) + AM33XX_L4_WK_IO_OFFSET)
+
 #define OMAP4_L3_PER_IO_OFFSET 0xb1100000
 #define OMAP4_L3_PER_IO_ADDRESS(pa)    IOMEM((pa) + OMAP4_L3_PER_IO_OFFSET)
 
 #define L4_34XX_VIRT           (L4_34XX_PHYS + OMAP2_L4_IO_OFFSET)
 #define L4_34XX_SIZE           SZ_4M   /* 1MB of 128MB used, want 1MB sect */
 
+/*
+ * ----------------------------------------------------------------------------
+ * AM33XX specific IO mapping
+ * ----------------------------------------------------------------------------
+ */
+#define L4_WK_AM33XX_PHYS      L4_WK_AM33XX_BASE
+#define L4_WK_AM33XX_VIRT      (L4_WK_AM33XX_PHYS + AM33XX_L4_WK_IO_OFFSET)
+#define L4_WK_AM33XX_SIZE      SZ_4M   /* 1MB of 128MB used, want 1MB sect */
+
 /*
  * Need to look at the Size 4M for L4.
  * VPOM3430 was not working for Int controller
index b9e85886b9d641964267361041a70e3fa7741467..0d818acf39178f1053f13263b87dc550af0710de 100644 (file)
@@ -35,6 +35,8 @@
 #define L4_EMU_34XX_BASE       0x54000000
 #define L3_34XX_BASE           0x68000000
 
+#define L4_WK_AM33XX_BASE      0x44C00000
+
 #define OMAP3430_32KSYNCT_BASE 0x48320000
 #define OMAP3430_CM_BASE       0x48004800
 #define OMAP3430_PRM_BASE      0x48306800