Skip to contentSkip to conversation

Flip on multiplatform support for omap2plus for v3.9

PATCH In review Tony Lindgren 4 participants 21 messages Dec 19, 2012 – Jan 3, 2013

Subsystems (14)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover Flip on multiplatform support for omap2plus for v3.9

Hi all,

These patches enable multiplatform support for omap2plus.

To build and boot it against the current mainline kernel you need the following:

[PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier [PATCH 2/2] ARM: disable errata work-arounds which access secure registers [GIT PULL 1/2] omap fixes for v3.8 merge window
[GIT PULL 2/2] omap cleanup for v3.8 merge window
[GIT PULL] two trivial omap build error fixes for v3.8 merge window
cpts: Fix build error caused by include of plat/clock.h

Regards,

Tony

---

Tony Lindgren (8):
ARM: OMAP2+: Limi omap initcalls to omap only on multiplatform kernels
ARM: OMAP2+: Use omap initcalls
ARM: OMAP: Fix i2c cmdline initcall for multiplatform
ARM: OMAP: Fix dmaengine init for multiplatform
ARM: OMAP2+: Add multiplatform debug_ll support
ARM: OMAP2+: Disable code that currently does not work with multiplaform
ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support
ARM: OMAP2+: Add minimal support for booting vexpress

 arch/arm/Kconfig                         |   13 ++
 arch/arm/Kconfig.debug                   |   56 +++++++++
 arch/arm/configs/omap2plus_defconfig     |    6 +
 arch/arm/include/debug/omap2plus.S       |  190 ++++++++++++++++++++++++++++++
 arch/arm/mach-omap1/dma.c                |   18 +++
 arch/arm/mach-omap1/i2c.c                |    6 +
 arch/arm/mach-omap2/Kconfig              |   25 ++++
 arch/arm/mach-omap2/Makefile             |    3 
 arch/arm/mach-omap2/board-omap3beagle.c  |    2 
 arch/arm/mach-omap2/board-rx51-video.c   |    3 
 arch/arm/mach-omap2/clock2xxx.c          |    2 
 arch/arm/mach-omap2/clock3xxx.c          |    2 
 arch/arm/mach-omap2/devices.c            |    6 -
 arch/arm/mach-omap2/dma.c                |   23 +++-
 arch/arm/mach-omap2/drm.c                |    2 
 arch/arm/mach-omap2/emu.c                |    2 
 arch/arm/mach-omap2/fb.c                 |    4 -
 arch/arm/mach-omap2/gpio.c               |    5 -
 arch/arm/mach-omap2/gpmc.c               |    4 -
 arch/arm/mach-omap2/hdq1w.c              |    3 
 arch/arm/mach-omap2/hwspinlock.c         |    2 
 arch/arm/mach-omap2/i2c.c                |    5 +
 arch/arm/mach-omap2/mcbsp.c              |    3 
 arch/arm/mach-omap2/omap-iommu.c         |    2 
 arch/arm/mach-omap2/omap2-restart.c      |    3 
 arch/arm/mach-omap2/omap4-common.c       |    4 -
 arch/arm/mach-omap2/omap_device.c        |    5 -
 arch/arm/mach-omap2/omap_hwmod.c         |    2 
 arch/arm/mach-omap2/omap_phy_internal.c  |    2 
 arch/arm/mach-omap2/opp3xxx_data.c       |    2 
 arch/arm/mach-omap2/opp4xxx_data.c       |    2 
 arch/arm/mach-omap2/pm-debug.c           |    2 
 arch/arm/mach-omap2/pm.c                 |    2 
 arch/arm/mach-omap2/pmu.c                |    2 
 arch/arm/mach-omap2/prm3xxx.c            |    2 
 arch/arm/mach-omap2/prm44xx.c            |    2 
 arch/arm/mach-omap2/serial.c             |    2 
 arch/arm/mach-omap2/smartreflex-class3.c |    2 
 arch/arm/mach-omap2/soc.h                |   29 +++++
 arch/arm/mach-omap2/timer.c              |    2 
 arch/arm/mach-omap2/wd_timer.c           |    2 
 arch/arm/plat-omap/Kconfig               |   30 -----
 arch/arm/plat-omap/Makefile              |    2 
 arch/arm/plat-omap/i2c.c                 |    3 
 arch/arm/plat-omap/include/plat/i2c.h    |    6 +
 drivers/crypto/omap-sham.c               |    3 
 drivers/dma/omap-dma.c                   |   20 ---
 drivers/media/rc/Kconfig                 |    2 
 drivers/staging/tidspbridge/Kconfig      |    2 
 49 files changed, 422 insertions(+), 100 deletions(-)
 create mode 100644 arch/arm/include/debug/omap2plus.S
Signature · 1 line
Signature
author maintainer
#1 lore raw

PATCH 1/8 ARM: OMAP2+: Limi omap initcalls to omap only on multiplatform kernels

We need to make sure that multiplatform kernels don't run omap initcalls when booted on other SoCs.

Do this by adding wrapper macros for the initcalls that return early if soc_is_omap() test fails. This allows us to easily change the defines later if we have SoC specific init sections available.

---
 arch/arm/mach-omap2/soc.h |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm/mach-omap2/soc.h +29 -0
index f31d907..092aedd 100644
@@ -42,6 +42,9 @@
 #undef MULTI_OMAP2
 #undef OMAP_NAME
 
+#ifdef CONFIG_ARCH_MULTIPLATFORM
+#define MULTI_OMAP2
+#endif
 #ifdef CONFIG_SOC_OMAP2420
 # ifdef OMAP_NAME
 #  undef  MULTI_OMAP2
@@ -112,6 +115,11 @@ int omap_type(void);
  */
 unsigned int omap_rev(void);
 
+static inline int soc_is_omap(void)
+{
+	return omap_rev() != 0;
+}
+
 /*
  * Get the CPU revision for OMAP devices
  */
@@ -465,5 +473,26 @@ static inline unsigned int omap4_has_ ##feat(void)	\
 
 OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON)
 
+/*
+ * We need to make sure omap initcalls don't run when
+ * multiplatform kernels are booted on other SoCs.
+ */
+#define omap_initcall(level, fn)		\
+static int __init __used __##fn(void)		\
+{						\
+	if (!soc_is_omap())			\
+		return 0;			\
+	return fn();				\
+}						\
+level(__##fn);
+
+#define omap_early_initcall(fn)		omap_initcall(early_initcall, fn)
+#define omap_core_initcall(fn)		omap_initcall(core_initcall, fn)
+#define omap_postcore_initcall(fn)	omap_initcall(postcore_initcall, fn)
+#define omap_arch_initcall(fn)		omap_initcall(arch_initcall, fn)
+#define omap_subsys_initcall(fn)	omap_initcall(subsys_initcall, fn)
+#define omap_device_initcall(fn)	omap_initcall(device_initcall, fn)
+#define omap_late_initcall(fn)		omap_initcall(late_initcall, fn)
+
 #endif	/* __ASSEMBLY__ */
 
author maintainer
#2 lore raw

PATCH 2/8 ARM: OMAP2+: Use omap initcalls

In reply to Tony Lindgren

This way the initcalls don't run on other SoCs on multiplatform kernels. Otherwise we'll get something like this when booting on vexpress:

omap_hwmod: _ensure_mpu_hwmod_is_setup: MPU initiator hwmod mpu not yet registered
...

WARNING: at arch/arm/mach-omap2/pm.c:82 _init_omap_device+0x74/0x94()

_init_omap_device: could not find omap_hwmod for mpu
...
omap-dma-engine omap-dma-engine: OMAP DMA engine driver
...

---
 arch/arm/mach-omap2/board-omap3beagle.c  |    2 +-
 arch/arm/mach-omap2/board-rx51-video.c   |    3 ++-
 arch/arm/mach-omap2/clock2xxx.c          |    2 +-
 arch/arm/mach-omap2/clock3xxx.c          |    2 +-
 arch/arm/mach-omap2/devices.c            |    6 +++---
 arch/arm/mach-omap2/dma.c                |    2 +-
 arch/arm/mach-omap2/drm.c                |    2 +-
 arch/arm/mach-omap2/emu.c                |    2 +-
 arch/arm/mach-omap2/fb.c                 |    4 ++--
 arch/arm/mach-omap2/gpio.c               |    5 +++--
 arch/arm/mach-omap2/gpmc.c               |    4 ++--
 arch/arm/mach-omap2/hdq1w.c              |    3 ++-
 arch/arm/mach-omap2/hwspinlock.c         |    2 +-
 arch/arm/mach-omap2/mcbsp.c              |    3 ++-
 arch/arm/mach-omap2/omap-iommu.c         |    2 +-
 arch/arm/mach-omap2/omap2-restart.c      |    3 ++-
 arch/arm/mach-omap2/omap4-common.c       |    4 ++--
 arch/arm/mach-omap2/omap_device.c        |    5 +++--
 arch/arm/mach-omap2/omap_hwmod.c         |    2 +-
 arch/arm/mach-omap2/omap_phy_internal.c  |    2 +-
 arch/arm/mach-omap2/opp3xxx_data.c       |    2 +-
 arch/arm/mach-omap2/opp4xxx_data.c       |    2 +-
 arch/arm/mach-omap2/pm-debug.c           |    2 +-
 arch/arm/mach-omap2/pm.c                 |    2 +-
 arch/arm/mach-omap2/pmu.c                |    2 +-
 arch/arm/mach-omap2/prm3xxx.c            |    2 +-
 arch/arm/mach-omap2/prm44xx.c            |    2 +-
 arch/arm/mach-omap2/serial.c             |    2 +-
 arch/arm/mach-omap2/smartreflex-class3.c |    2 +-
 arch/arm/mach-omap2/timer.c              |    2 +-
 arch/arm/mach-omap2/wd_timer.c           |    2 +-
 31 files changed, 44 insertions(+), 38 deletions(-)
arch/arm/mach-omap2/board-omap3beagle.c +1 -1
index 22c483d..5c68009 100644
@@ -494,7 +494,7 @@ static int __init beagle_opp_init(void)
 	}
 	return 0;
 }
-device_initcall(beagle_opp_init);
+omap_device_initcall(beagle_opp_init);
 
 static void __init omap3_beagle_init(void)
 {
arch/arm/mach-omap2/board-rx51-video.c +2 -1
index 46f4fc9..eb66726 100644
@@ -18,6 +18,7 @@
 #include <video/omapdss.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 
+#include "soc.h"
 #include "board-rx51.h"
 
 #include "mux.h"
@@ -85,5 +86,5 @@ static int __init rx51_video_init(void)
 	return 0;
 }
 
-subsys_initcall(rx51_video_init);
+omap_subsys_initcall(rx51_video_init);
 #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
arch/arm/mach-omap2/clock2xxx.c +1 -1
index 1ff6469..b870f6a 100644
@@ -52,6 +52,6 @@ static int __init omap2xxx_clk_arch_init(void)
 	return ret;
 }
 
-arch_initcall(omap2xxx_clk_arch_init);
+omap_arch_initcall(omap2xxx_clk_arch_init);
 
 
arch/arm/mach-omap2/clock3xxx.c +1 -1
index 4eacab8..0b02b41 100644
@@ -94,6 +94,6 @@ static int __init omap3xxx_clk_arch_init(void)
 	return ret;
 }
 
-arch_initcall(omap3xxx_clk_arch_init);
+omap_arch_initcall(omap3xxx_clk_arch_init);
 
 
arch/arm/mach-omap2/devices.c +3 -3
index 4abb8b5..8b142da 100644
@@ -68,7 +68,7 @@ static int __init omap3_l3_init(void)
 
 	return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
 }
-postcore_initcall(omap3_l3_init);
+omap_postcore_initcall(omap3_l3_init);
 
 static int __init omap4_l3_init(void)
 {
@@ -103,7 +103,7 @@ static int __init omap4_l3_init(void)
 
 	return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
 }
-postcore_initcall(omap4_l3_init);
+omap_postcore_initcall(omap4_l3_init);
 
 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
 
@@ -734,4 +734,4 @@ static int __init omap2_init_devices(void)
 
 	return 0;
 }
-arch_initcall(omap2_init_devices);
+omap_arch_initcall(omap2_init_devices);
arch/arm/mach-omap2/dma.c +1 -1
index 612b982..e034ab6 100644
@@ -293,4 +293,4 @@ static int __init omap2_system_dma_init(void)
 	return omap_hwmod_for_each_by_class("dma",
 			omap2_system_dma_init_dev, NULL);
 }
-arch_initcall(omap2_system_dma_init);
+omap_arch_initcall(omap2_system_dma_init);
arch/arm/mach-omap2/drm.c +1 -1
index 4c7566c..ab8a0e6 100644
@@ -62,6 +62,6 @@ static int __init omap_init_drm(void)
 
 }
 
-arch_initcall(omap_init_drm);
+omap_arch_initcall(omap_init_drm);
 
 #endif
arch/arm/mach-omap2/emu.c +1 -1
index b3566f6..cbeaca2 100644
@@ -47,4 +47,4 @@ static int __init emu_init(void)
 	return 0;
 }
 
-subsys_initcall(emu_init);
+omap_subsys_initcall(emu_init);
arch/arm/mach-omap2/fb.c +2 -2
index d9bd965..190ae49 100644
@@ -89,7 +89,7 @@ static int __init omap_init_vrfb(void)
 		return 0;
 }
 
-arch_initcall(omap_init_vrfb);
+omap_arch_initcall(omap_init_vrfb);
 #endif
 
 #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
@@ -113,6 +113,6 @@ static int __init omap_init_fb(void)
 	return platform_device_register(&omap_fb_device);
 }
 
-arch_initcall(omap_init_fb);
+omap_arch_initcall(omap_init_fb);
 
 #endif
arch/arm/mach-omap2/gpio.c +3 -2
index 399acab..40950f5 100644
@@ -23,6 +23,7 @@
 #include <linux/of.h>
 #include <linux/platform_data/gpio-omap.h>
 
+#include "soc.h"
 #include "omap_hwmod.h"
 #include "omap_device.h"
 #include "omap-pm.h"
@@ -147,7 +148,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
 /*
  * gpio_init needs to be done before
  * machine_init functions access gpio APIs.
- * Hence gpio_init is a postcore_initcall.
+ * Hence gpio_init is a omap_postcore_initcall.
  */
 static int __init omap2_gpio_init(void)
 {
@@ -157,4 +158,4 @@ static int __init omap2_gpio_init(void)
 
 	return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL);
 }
-postcore_initcall(omap2_gpio_init);
+omap_postcore_initcall(omap2_gpio_init);
arch/arm/mach-omap2/gpmc.c +2 -2
index 65468f6..24f8add 100644
@@ -1205,7 +1205,7 @@ static __exit void gpmc_exit(void)
 
 }
 
-postcore_initcall(gpmc_init);
+omap_postcore_initcall(gpmc_init);
 module_exit(gpmc_exit);
 
 static int __init omap_gpmc_init(void)
@@ -1225,7 +1225,7 @@ static int __init omap_gpmc_init(void)
 
 	return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
 }
-postcore_initcall(omap_gpmc_init);
+omap_postcore_initcall(omap_gpmc_init);
 
 static irqreturn_t gpmc_handle_irq(int irq, void *dev)
 {
arch/arm/mach-omap2/hdq1w.c +2 -1
index ab7bf18..f6e0e7e 100644
@@ -27,6 +27,7 @@
 #include <linux/err.h>
 #include <linux/platform_device.h>
 
+#include "soc.h"
 #include "omap_hwmod.h"
 #include "omap_device.h"
 #include "hdq1w.h"
@@ -93,4 +94,4 @@ static int __init omap_init_hdq(void)
 
 	return 0;
 }
-arch_initcall(omap_init_hdq);
+omap_arch_initcall(omap_init_hdq);
arch/arm/mach-omap2/hwspinlock.c +1 -1
index 1df9b5f..ce1b5b6 100644
@@ -57,4 +57,4 @@ static int __init hwspinlocks_init(void)
 	return retval;
 }
 /* early board code might need to reserve specific hwspinlock instances */
-postcore_initcall(hwspinlocks_init);
+omap_postcore_initcall(hwspinlocks_init);
arch/arm/mach-omap2/mcbsp.c +2 -1
index df49f2a..1c0968d 100644
@@ -23,6 +23,7 @@
 
 #include <linux/omap-dma.h>
 
+#include "soc.h"
 #include "omap_device.h"
 
 /*
@@ -118,4 +119,4 @@ static int __init omap2_mcbsp_init(void)
 
 	return 0;
 }
-arch_initcall(omap2_mcbsp_init);
+omap_arch_initcall(omap2_mcbsp_init);
arch/arm/mach-omap2/omap-iommu.c +1 -1
index a6a4ff8..f8afcf8 100644
@@ -151,7 +151,7 @@ err_out:
 	return err;
 }
 /* must be ready before omap3isp is probed */
-subsys_initcall(omap_iommu_init);
+omap_subsys_initcall(omap_iommu_init);
 
 static void __exit omap_iommu_exit(void)
 {
arch/arm/mach-omap2/omap2-restart.c +2 -1
index be6bc89..719b716 100644
@@ -13,6 +13,7 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
+#include "soc.h"
 #include "common.h"
 #include "prm2xxx.h"
 
@@ -62,4 +63,4 @@ static int __init omap2xxx_common_look_up_clks_for_reset(void)
 
 	return 0;
 }
-core_initcall(omap2xxx_common_look_up_clks_for_reset);
+omap_core_initcall(omap2xxx_common_look_up_clks_for_reset);
arch/arm/mach-omap2/omap4-common.c +2 -2
index 6897ae21b..ec11e49 100644
@@ -225,7 +225,7 @@ static int __init omap_l2_cache_init(void)
 
 	return 0;
 }
-early_initcall(omap_l2_cache_init);
+omap_early_initcall(omap_l2_cache_init);
 #endif
 
 void __iomem *omap4_get_sar_ram_base(void)
@@ -253,7 +253,7 @@ static int __init omap4_sar_ram_init(void)
 
 	return 0;
 }
-early_initcall(omap4_sar_ram_init);
+omap_early_initcall(omap4_sar_ram_init);
 
 static struct of_device_id irq_match[] __initdata = {
 	{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
arch/arm/mach-omap2/omap_device.c +3 -2
index e065daa..d109f06 100644
@@ -89,6 +89,7 @@
 #include <linux/of.h>
 #include <linux/notifier.h>
 
+#include "soc.h"
 #include "omap_device.h"
 #include "omap_hwmod.h"
 
@@ -1259,7 +1260,7 @@ static int __init omap_device_init(void)
 	bus_register_notifier(&platform_bus_type, &platform_nb);
 	return 0;
 }
-core_initcall(omap_device_init);
+omap_core_initcall(omap_device_init);
 
 /**
  * omap_device_late_idle - idle devices without drivers
@@ -1297,4 +1298,4 @@ static int __init omap_device_late_init(void)
 	bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle);
 	return 0;
 }
-late_initcall(omap_device_late_init);
+omap_late_initcall(omap_device_late_init);
arch/arm/mach-omap2/omap_hwmod.c +1 -1
index 4653efb..6e70707 100644
@@ -3303,7 +3303,7 @@ static int __init omap_hwmod_setup_all(void)
 
 	return 0;
 }
-core_initcall(omap_hwmod_setup_all);
+omap_core_initcall(omap_hwmod_setup_all);
 
 /**
  * omap_hwmod_enable - enable an omap_hwmod
arch/arm/mach-omap2/omap_phy_internal.c +1 -1
index e237602..eb8a25d 100644
@@ -63,7 +63,7 @@ static int __init omap4430_phy_power_down(void)
 
 	return 0;
 }
-early_initcall(omap4430_phy_power_down);
+omap_early_initcall(omap4430_phy_power_down);
 
 void am35x_musb_reset(void)
 {
arch/arm/mach-omap2/opp3xxx_data.c +1 -1
index 62772e0..fc67add 100644
@@ -168,4 +168,4 @@ int __init omap3_opp_init(void)
 
 	return r;
 }
-device_initcall(omap3_opp_init);
+omap_device_initcall(omap3_opp_init);
arch/arm/mach-omap2/opp4xxx_data.c +1 -1
index d470b72..1ef7a3e 100644
@@ -177,4 +177,4 @@ int __init omap4_opp_init(void)
 			ARRAY_SIZE(omap446x_opp_def_list));
 	return r;
 }
-device_initcall(omap4_opp_init);
+omap_device_initcall(omap4_opp_init);
arch/arm/mach-omap2/pm-debug.c +1 -1
index e2c291f..e0ac8a3 100644
@@ -279,6 +279,6 @@ static int __init pm_dbg_init(void)
 
 	return 0;
 }
-arch_initcall(pm_dbg_init);
+omap_arch_initcall(pm_dbg_init);
 
 #endif
arch/arm/mach-omap2/pm.c +1 -1
index f4b3143..9c65edd 100644
@@ -336,7 +336,7 @@ static int __init omap2_common_pm_init(void)
 
 	return 0;
 }
-postcore_initcall(omap2_common_pm_init);
+omap_postcore_initcall(omap2_common_pm_init);
 
 int __init omap2_common_pm_late_init(void)
 {
arch/arm/mach-omap2/pmu.c +1 -1
index eb78ae7..75052b3 100644
@@ -89,4 +89,4 @@ static int __init omap_init_pmu(void)
 
 	return omap2_init_pmu(oh_num, oh_names);
 }
-subsys_initcall(omap_init_pmu);
+omap_subsys_initcall(omap_init_pmu);
arch/arm/mach-omap2/prm3xxx.c +1 -1
index 39822aa..ea60b1d 100644
@@ -405,7 +405,7 @@ static int __init omap3xxx_prm_late_init(void)
 
 	return ret;
 }
-subsys_initcall(omap3xxx_prm_late_init);
+omap_subsys_initcall(omap3xxx_prm_late_init);
 
 static void __exit omap3xxx_prm_exit(void)
 {
arch/arm/mach-omap2/prm44xx.c +1 -1
index 7498bc7..f1f80e0 100644
@@ -665,7 +665,7 @@ static int __init omap44xx_prm_late_init(void)
 
 	return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup);
 }
-subsys_initcall(omap44xx_prm_late_init);
+omap_subsys_initcall(omap44xx_prm_late_init);
 
 static void __exit omap44xx_prm_exit(void)
 {
arch/arm/mach-omap2/serial.c +1 -1
index 04fdbc4..24e9ad3 100644
@@ -254,7 +254,7 @@ static int __init omap_serial_early_init(void)
 
 	return 0;
 }
-core_initcall(omap_serial_early_init);
+omap_core_initcall(omap_serial_early_init);
 
 /**
  * omap_serial_init_port() - initialize single serial port
arch/arm/mach-omap2/smartreflex-class3.c +1 -1
index 1da8f03..80f3acb 100644
@@ -58,4 +58,4 @@ static int __init sr_class3_init(void)
 	pr_info("SmartReflex Class3 initialized\n");
 	return sr_register_class(&class3_data);
 }
-late_initcall(sr_class3_init);
+omap_late_initcall(sr_class3_init);
arch/arm/mach-omap2/timer.c +1 -1
index 06e1415..5e30b4a 100644
@@ -742,7 +742,7 @@ static int __init omap2_dm_timer_init(void)
 
 	return 0;
 }
-arch_initcall(omap2_dm_timer_init);
+omap_arch_initcall(omap2_dm_timer_init);
 
 /**
  * omap2_override_clocksource - clocksource override with user configuration
arch/arm/mach-omap2/wd_timer.c +1 -1
index 7c2b4ed..70240a5 100644
@@ -130,4 +130,4 @@ static int __init omap_init_wdt(void)
 	     dev_name, oh->name);
 	return 0;
 }
-subsys_initcall(omap_init_wdt);
+omap_subsys_initcall(omap_init_wdt);
author maintainer
#3 lore raw

PATCH 3/8 ARM: OMAP: Fix i2c cmdline initcall for multiplatform

In reply to Tony Lindgren

We only want this initcall to run when the kernel is booted on omap SoCs. Fix the issue by initializing the the initcall from separately for omap1 and omap2+.

This fixes the issue for omap2+ multiplatform configs as we are using omap_subsys_initcall there.

---
 arch/arm/mach-omap1/i2c.c             |    6 ++++++
 arch/arm/mach-omap2/i2c.c             |    5 +++++
 arch/arm/plat-omap/i2c.c              |    3 +--
 arch/arm/plat-omap/include/plat/i2c.h |    6 ++++++
 4 files changed, 18 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/i2c.c +6 -0
index faca808..7f5761c 100644
@@ -91,3 +91,9 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *pdata,
 
 	return platform_device_register(pdev);
 }
+
+static  int __init omap_i2c_cmdline(void)
+{
+	return omap_register_i2c_bus_cmdline();
+}
+subsys_initcall(omap_i2c_cmdline);
arch/arm/mach-omap2/i2c.c +5 -0
index fbb9b15..9eb146f 100644
@@ -165,3 +165,8 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
 	return PTR_RET(pdev);
 }
 
+static  int __init omap_i2c_cmdline(void)
+{
+	return omap_register_i2c_bus_cmdline();
+}
+omap_subsys_initcall(omap_i2c_cmdline);
arch/arm/plat-omap/i2c.c +1 -2
index f9df624..58213d9 100644
@@ -68,7 +68,7 @@ __setup("i2c_bus=", omap_i2c_bus_setup);
  * Register busses defined in command line but that are not registered with
  * omap_register_i2c_bus from board initialization code.
  */
-static int __init omap_register_i2c_bus_cmdline(void)
+int __init omap_register_i2c_bus_cmdline(void)
 {
 	int i, err = 0;
 
@@ -83,7 +83,6 @@ static int __init omap_register_i2c_bus_cmdline(void)
 out:
 	return err;
 }
-subsys_initcall(omap_register_i2c_bus_cmdline);
 
 /**
  * omap_register_i2c_bus - register I2C bus with device descriptors
arch/arm/plat-omap/include/plat/i2c.h +6 -0
index 7a9028c..810629d 100644
@@ -32,6 +32,7 @@ int omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
 extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
 				 struct i2c_board_info const *info,
 				 unsigned len);
+extern int omap_register_i2c_bus_cmdline(void);
 #else
 static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
 				 struct i2c_board_info const *info,
@@ -39,6 +40,11 @@ static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
 {
 	return 0;
 }
+
+static inline int omap_register_i2c_bus_cmdline(void)
+{
+	return 0;
+}
 #endif
 
 struct omap_hwmod;
author maintainer
#4 lore raw

PATCH 4/8 ARM: OMAP: Fix dmaengine init for multiplatform

In reply to Tony Lindgren

Otherwise omap dmaengine will initialized when booted on other SoCs. Fix this by initializing the platform device in arch/arm/*omap*/dma.c instead.

Cc Russell King <[email protected]>
Cc Dan Williams <[email protected]>
Cc Vinod Koul <[email protected]>
---
 arch/arm/mach-omap1/dma.c |   18 ++++++++++++++++--
 arch/arm/mach-omap2/dma.c |   21 +++++++++++++++++++--
 drivers/dma/omap-dma.c    |   20 +-------------------
 3 files changed, 36 insertions(+), 23 deletions(-)
arch/arm/mach-omap1/dma.c +16 -2
index e190611..1a4e887 100644
@@ -24,7 +24,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/io.h>
-
+#include <linux/dma-mapping.h>
 #include <linux/omap-dma.h>
 #include <mach/tc.h>
 
@@ -270,11 +270,17 @@ static u32 configure_dma_errata(void)
 	return errata;
 }
 
+static const struct platform_device_info omap_dma_dev_info = {
+	.name = "omap-dma-engine",
+	.id = -1,
+	.dma_mask = DMA_BIT_MASK(32),
+};
+
 static int __init omap1_system_dma_init(void)
 {
 	struct omap_system_dma_plat_info	*p;
 	struct omap_dma_dev_attr		*d;
-	struct platform_device			*pdev;
+	struct platform_device			*pdev, *dma_pdev;
 	int ret;
 
 	pdev = platform_device_alloc("omap_dma_system", 0);
@@ -380,8 +386,16 @@ static int __init omap1_system_dma_init(void)
 	dma_common_ch_start	= CPC;
 	dma_common_ch_end	= COLOR;
 
+	dma_pdev = platform_device_register_full(&omap_dma_dev_info);
+	if (IS_ERR(dma_pdev)) {
+		ret = PTR_ERR(dma_pdev);
+		goto exit_release_pdev;
+	}
+
 	return ret;
 
+exit_release_pdev:
+	platform_device_del(pdev);
 exit_release_chan:
 	kfree(d->chan);
 exit_release_d:
arch/arm/mach-omap2/dma.c +19 -2
index e034ab6..5cd8d76 100644
@@ -27,7 +27,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/device.h>
-
+#include <linux/dma-mapping.h>
 #include <linux/omap-dma.h>
 
 #include "soc.h"
@@ -288,9 +288,26 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
 	return 0;
 }
 
+static const struct platform_device_info omap_dma_dev_info = {
+	.name = "omap-dma-engine",
+	.id = -1,
+	.dma_mask = DMA_BIT_MASK(32),
+};
+
 static int __init omap2_system_dma_init(void)
 {
-	return omap_hwmod_for_each_by_class("dma",
+	struct platform_device *pdev;
+	int res;
+
+	res = omap_hwmod_for_each_by_class("dma",
 			omap2_system_dma_init_dev, NULL);
+	if (res)
+		return res;
+
+	pdev = platform_device_register_full(&omap_dma_dev_info);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
+	return res;
 }
 omap_arch_initcall(omap2_system_dma_init);
drivers/dma/omap-dma.c +1 -19
index 5a31264..c4b4fd2 100644
@@ -661,32 +661,14 @@ bool omap_dma_filter_fn(struct dma_chan *chan, void *param)
 }
 EXPORT_SYMBOL_GPL(omap_dma_filter_fn);
 
-static struct platform_device *pdev;
-
-static const struct platform_device_info omap_dma_dev_info = {
-	.name = "omap-dma-engine",
-	.id = -1,
-	.dma_mask = DMA_BIT_MASK(32),
-};
-
 static int omap_dma_init(void)
 {
-	int rc = platform_driver_register(&omap_dma_driver);
-
-	if (rc == 0) {
-		pdev = platform_device_register_full(&omap_dma_dev_info);
-		if (IS_ERR(pdev)) {
-			platform_driver_unregister(&omap_dma_driver);
-			rc = PTR_ERR(pdev);
-		}
-	}
-	return rc;
+	return platform_driver_register(&omap_dma_driver);
 }
 subsys_initcall(omap_dma_init);
 
 static void __exit omap_dma_exit(void)
 {
-	platform_device_unregister(pdev);
 	platform_driver_unregister(&omap_dma_driver);
 }
 module_exit(omap_dma_exit);
author maintainer
#5 lore raw

PATCH 5/8 ARM: OMAP2+: Add multiplatform debug_ll support

In reply to Tony Lindgren

Add multiplatform debug_ll support by stripping away the custom hacks to detect the port from debug-macro.S.

Note that this now requires the specific debug_ll port to be selected in the .config.

The old debug-macro.S will be removed a bit later once we are sure things work properly with multiplatform enabled.

---
 arch/arm/Kconfig.debug             |   56 +++++++++++
 arch/arm/include/debug/omap2plus.S |  190 ++++++++++++++++++++++++++++++++++++
 2 files changed, 246 insertions(+)
 create mode 100644 arch/arm/include/debug/omap2plus.S
arch/arm/Kconfig.debug +56 -0
index 661030d..8cccce3 100644
@@ -291,6 +291,13 @@ choice
 		  Say Y here if you want kernel low-level debugging support
 		  on MVEBU based platforms.
 
+	config DEBUG_OMAP2PLUS_UART
+		bool "Kernel low-level debugging messages via OMAP2PLUS UART"
+		depends on ARCH_OMAP2PLUS
+		help
+		  Say Y here if you want kernel low-level debugging support
+		  on OMAP2PLUS based platforms.
+
 	config DEBUG_PICOXCELL_UART
 		depends on ARCH_PICOXCELL
 		bool "Use PicoXcell UART for low-level debug"
@@ -461,6 +468,54 @@ config DEBUG_IMX6Q_UART_PORT
 
 choice
 	prompt "Low-level debug console UART"
+	depends on DEBUG_OMAP2PLUS_UART
+
+	config DEBUG_OMAP2UART1
+		bool "OMAP2/3/4 UART1 (omap2/3 sdp boards and some omap3 boards)"
+		help
+		  This covers at least h4, 2430sdp, 3430sdp, 3630sdp,
+		  omap3 torpedo and 3530 lv som.
+
+	config DEBUG_OMAP2UART2
+		bool "OMAP2/3/4 UART2"
+
+	config DEBUG_OMAP2UART3
+		bool "OMAP2 UART3 (n8x0)"
+
+	config DEBUG_OMAP3UART3
+		bool "OMAP3 UART3 (most omap3 boards)"
+		help
+		  This covers at least cm_t3x, beagle, crane, devkit8000,
+		  igep00x0, ldp, n900, n9(50), pandora, overo, touchbook,
+		  and 3517evm.
+
+	config DEBUG_OMAP4UART3
+		bool "OMAP4/5 UART3 (omap4 blaze, panda, omap5 sevm)"
+
+	config DEBUG_OMAP3UART4
+		bool "OMAP36XX UART4"
+
+	config DEBUG_OMAP4UART4
+		bool "OMAP4/5 UART4"
+
+	config DEBUG_TI81XXUART1
+		bool "TI81XX UART1 (ti8148evm)"
+
+	config DEBUG_TI81XXUART2
+		bool "TI81XX UART2"
+
+	config DEBUG_TI81XXUART3
+		bool "TI81XX UART3 (ti8168evm)"
+
+	config DEBUG_AM33XXUART1
+		bool "AM33XX UART1"
+
+	config DEBUG_ZOOM_UART
+		bool "Zoom2/3 UART"
+endchoice
+
+choice
+	prompt "Low-level debug console UART"
 	depends on DEBUG_LL && DEBUG_TEGRA_UART
 
 	config TEGRA_DEBUG_UART_AUTO_ODMDATA
@@ -501,6 +556,7 @@ config DEBUG_LL_INCLUDE
 				 DEBUG_IMX6Q_UART
 	default "debug/highbank.S" if DEBUG_HIGHBANK_UART
 	default "debug/mvebu.S" if DEBUG_MVEBU_UART
+	default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
 	default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
 	default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
 	default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
arch/arm/include/debug/omap2plus.S new file +190 -0

190 lines not on this page · raw message

author maintainer
#6 lore raw

PATCH 6/8 ARM: OMAP2+: Disable code that currently does not work with multiplaform

In reply to Tony Lindgren

We still need to fix up few places for multiplatform support, but that can proceed separately. Fix the issue by making the problem drivers depends !ARCH_MULTIPLATFORM for now.

The remaining pieces that are not multiplatform compatible for omap2+ SoCs are:

1. Some drivers are using custom omap_dm_timer calls

There are two drivers that are directly usign omap hardware timers for PWM and DSP clocking: drivers/media/rc/ir-rx51.c and drivers/staging/tidspbridge/core/dsp-clock.c. These can be fixed for multiplatform by allowing a minimal set of hardware timers to be accessed, and for some functionality by using the hrtimer framework.

2. Hardware OMAP4_ERRATA_I688 needs to be fixed up

This can't be enabled for multiplatform configurations in it's current form. It may be possible to fix it up to do instruction replacement early on during init. Luckily it looks like this errata does not seem to get hit with mainline kernel code alone at least currently.

3. Legacy header needed for omap-sham.c

Looks like it still needs mach/irqs.h for omap1 that does not exist for multiplatform systems. Just ifdef it for now.

Cc Timo Kokkonen <[email protected]>
Cc Sean Young <[email protected]>
Cc "V?ctor Manuel J?quez Leal" <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Omar Ramirez Luna <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 arch/arm/mach-omap2/Kconfig         |    2 +-
 drivers/crypto/omap-sham.c          |    3 +++
 drivers/media/rc/Kconfig            |    2 +-
 drivers/staging/tidspbridge/Kconfig |    2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/Kconfig +1 -1
index 41b581f..492d764 100644
@@ -397,7 +397,7 @@ config OMAP3_SDRC_AC_TIMING
 
 config OMAP4_ERRATA_I688
 	bool "OMAP4 errata: Async Bridge Corruption"
-	depends on ARCH_OMAP4
+	depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM
 	select ARCH_HAS_BARRIERS
 	help
 	  If a data is stalled inside asynchronous bridge because of back
drivers/crypto/omap-sham.c +3 -0
index 1d75e6f..d65f22c 100644
@@ -38,7 +38,10 @@
 #include <crypto/internal/hash.h>
 
 #include <linux/omap-dma.h>
+
+#ifdef CONFIG_ARCH_OMAP1
 #include <mach/irqs.h>
+#endif
 
 #define SHA_REG_DIGEST(x)		(0x00 + ((x) * 0x04))
 #define SHA_REG_DIN(x)			(0x1C + ((x) * 0x04))
drivers/media/rc/Kconfig +1 -1
index 79ba242..19f3563 100644
@@ -291,7 +291,7 @@ config IR_TTUSBIR
 
 config IR_RX51
 	tristate "Nokia N900 IR transmitter diode"
-	depends on OMAP_DM_TIMER && LIRC
+	depends on OMAP_DM_TIMER && LIRC && !ARCH_MULTIPLATFORM
 	---help---
 	   Say Y or M here if you want to enable support for the IR
 	   transmitter diode built in the Nokia N900 (RX51) device.
drivers/staging/tidspbridge/Kconfig +1 -1
index 0dd479f..60848f1 100644
@@ -4,7 +4,7 @@
 
 menuconfig TIDSPBRIDGE
 	tristate "DSP Bridge driver"
-	depends on ARCH_OMAP3
+	depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM
 	select OMAP_MBOX_FWK
 	help
 	  DSP/BIOS Bridge is designed for platforms that contain a GPP and
author maintainer
#7 lore raw

PATCH 6/8 ARM: OMAP2+: Disable code that currently does not work with multiplaform

Hi all,

Looks like we need to also disable mailbox to avoid dependencies to the mailbox series as it's being moved to live under drivers.

And we need to disable omap3isp as it tries to use the now private include <plat/*.h> headers.

Updated patch below.

Tony

From: Tony Lindgren <[email protected]>
Date: Wed, 2 Jan 2013 10:24:09 -0800
Subject: [PATCH] ARM: OMAP2+: Disable code that currently does not work with multiplaform
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We still need to fix up few places for multiplatform support, but that can proceed separately. Fix the issue by making the problem drivers depends !ARCH_MULTIPLATFORM for now.

The remaining pieces that are not multiplatform compatible for omap2+ SoCs are:

1. Some drivers are using custom omap_dm_timer calls

There are two drivers that are directly usign omap hardware timers for PWM and DSP clocking: drivers/media/rc/ir-rx51.c and drivers/staging/tidspbridge/core/dsp-clock.c. These can be fixed for multiplatform by allowing a minimal set of hardware timers to be accessed, and for some functionality by using the hrtimer framework.

2. Hardware OMAP4_ERRATA_I688 needs to be fixed up

This can't be enabled for multiplatform configurations in it's current form. It may be possible to fix it up to do instruction replacement early on during init. Luckily it looks like this errata does not seem to get hit with mainline kernel code alone at least currently.

3. Legacy header needed for omap-sham.c

Looks like it still needs mach/irqs.h for omap1 that does not exist for multiplatform systems. Just ifdef it for now.

4. Mailbox is waiting to get moved to drivers

Disable it for now to avoid adding a dependency to the mailbox patches.

5. Camera omap3isp needs to be disabled

The include <plat/*.h> files won't be available to drivers after multiplatform support is enabled.

Cc Timo Kokkonen <[email protected]>
Cc Sean Young <[email protected]>
Cc "V?ctor Manuel J?quez Leal" <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Omar Ramirez Luna <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Santosh Shilimkar <[email protected]>
[tony at atomide.com: updated to disable mailbox and omap3isp]
arch/arm/mach-omap2/Kconfig +1 -1
index 41b581f..492d764 100644
@@ -397,7 +397,7 @@ config OMAP3_SDRC_AC_TIMING
 
 config OMAP4_ERRATA_I688
 	bool "OMAP4 errata: Async Bridge Corruption"
-	depends on ARCH_OMAP4
+	depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM
 	select ARCH_HAS_BARRIERS
 	help
 	  If a data is stalled inside asynchronous bridge because of back
arch/arm/plat-omap/Kconfig +1 -1
index 665870d..03f1252 100644
@@ -118,7 +118,7 @@ config OMAP_MUX_WARNINGS
 
 config OMAP_MBOX_FWK
 	tristate "Mailbox framework support"
-	depends on ARCH_OMAP
+	depends on ARCH_OMAP && !ARCH_MULTIPLATFORM
 	help
 	  Say Y here if you want to use OMAP Mailbox framework support for
 	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
drivers/crypto/omap-sham.c +3 -0
index 1d75e6f..d65f22c 100644
@@ -38,7 +38,10 @@
 #include <crypto/internal/hash.h>
 
 #include <linux/omap-dma.h>
+
+#ifdef CONFIG_ARCH_OMAP1
 #include <mach/irqs.h>
+#endif
 
 #define SHA_REG_DIGEST(x)		(0x00 + ((x) * 0x04))
 #define SHA_REG_DIN(x)			(0x1C + ((x) * 0x04))
drivers/media/platform/Kconfig +1 -1
index 3dcfea6..eff53c9 100644
@@ -99,7 +99,7 @@ config VIDEO_OMAP2
 
 config VIDEO_OMAP3
 	tristate "OMAP 3 Camera support (EXPERIMENTAL)"
-	depends on OMAP_IOVMM && VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API && ARCH_OMAP3 && EXPERIMENTAL
+	depends on OMAP_IOVMM && VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API && ARCH_OMAP3 && EXPERIMENTAL && !ARCH_MULTIPLATFORM
 	---help---
 	  Driver for an OMAP 3 camera controller.
 
drivers/media/rc/Kconfig +1 -1
index 79ba242..19f3563 100644
@@ -291,7 +291,7 @@ config IR_TTUSBIR
 
 config IR_RX51
 	tristate "Nokia N900 IR transmitter diode"
-	depends on OMAP_DM_TIMER && LIRC
+	depends on OMAP_DM_TIMER && LIRC && !ARCH_MULTIPLATFORM
 	---help---
 	   Say Y or M here if you want to enable support for the IR
 	   transmitter diode built in the Nokia N900 (RX51) device.
drivers/staging/tidspbridge/Kconfig +1 -1
index 0dd479f..60848f1 100644
@@ -4,7 +4,7 @@
 
 menuconfig TIDSPBRIDGE
 	tristate "DSP Bridge driver"
-	depends on ARCH_OMAP3
+	depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM
 	select OMAP_MBOX_FWK
 	help
 	  DSP/BIOS Bridge is designed for platforms that contain a GPP and
#8 lore raw

PATCH 6/8 ARM: OMAP2+: Disable code that currently does not work with multiplaform

Hi Tony,

Quoted 7 lines · On Thursday 03 January 2013 12:15:21 Tony Lindgren wrote:

Hi all,

Looks like we need to also disable mailbox to avoid dependencies to the mailbox series as it's being moved to live under drivers.

And we need to disable omap3isp as it tries to use the now private include <plat/*.h> headers.

I've posted a patch to the linux-media mailing list to remove plat/*.h headers that are not present anymore in v3.8. It will be pushed to v3.8, as this breaks compilation of the driver.

The driver still includes the plat/cpu.h header that can be removed as well. I've just posted a patch that remove the header and will push it to v3.9. The OMAP3 ISP part of this patch can thus be dropped.

Quoted 146 lines

Updated patch below.

Tony

From: Tony Lindgren <[email protected]>
Date: Wed, 2 Jan 2013 10:24:09 -0800
Subject: [PATCH] ARM: OMAP2+: Disable code that currently does not work with multiplaform MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We still need to fix up few places for multiplatform support, but that can proceed separately. Fix the issue by making the problem drivers depends !ARCH_MULTIPLATFORM for now.

The remaining pieces that are not multiplatform compatible for omap2+ SoCs are:

1. Some drivers are using custom omap_dm_timer calls

There are two drivers that are directly usign omap hardware timers for PWM and DSP clocking: drivers/media/rc/ir-rx51.c and drivers/staging/tidspbridge/core/dsp-clock.c. These can be fixed for multiplatform by allowing a minimal set of hardware timers to be accessed, and for some functionality by using the hrtimer framework.

2. Hardware OMAP4_ERRATA_I688 needs to be fixed up

This can't be enabled for multiplatform configurations in it's current form. It may be possible to fix it up to do instruction replacement early on during init. Luckily it looks like this errata does not seem to get hit with mainline kernel code alone at least currently.

3. Legacy header needed for omap-sham.c

Looks like it still needs mach/irqs.h for omap1 that does not exist for multiplatform systems. Just ifdef it for now.

4. Mailbox is waiting to get moved to drivers

Disable it for now to avoid adding a dependency to the mailbox patches.

5. Camera omap3isp needs to be disabled

The include <plat/*.h> files won't be available to drivers after multiplatform support is enabled.

Cc Timo Kokkonen <[email protected]>
Cc Sean Young <[email protected]>
Cc "Víctor Manuel Jáquez Leal" <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Omar Ramirez Luna <[email protected]>
Cc Herbert Xu <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Santosh Shilimkar <[email protected]>
[[email protected]: updated to disable mailbox and omap3isp]
arch/arm/mach-omap2/Kconfig +1 -1
index 41b581f..492d764 100644
@@ -397,7 +397,7 @@ config OMAP3_SDRC_AC_TIMING
 
 config OMAP4_ERRATA_I688
 	bool "OMAP4 errata: Async Bridge Corruption"
-	depends on ARCH_OMAP4
+	depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM
 	select ARCH_HAS_BARRIERS
 	help
 	  If a data is stalled inside asynchronous bridge because of back
arch/arm/plat-omap/Kconfig +1 -1
index 665870d..03f1252 100644
@@ -118,7 +118,7 @@ config OMAP_MUX_WARNINGS
 
 config OMAP_MBOX_FWK
 	tristate "Mailbox framework support"
-	depends on ARCH_OMAP
+	depends on ARCH_OMAP && !ARCH_MULTIPLATFORM
 	help
 	  Say Y here if you want to use OMAP Mailbox framework support for
 	  DSP, IVA1.0 and IVA2 in OMAP1/2/3.
drivers/crypto/omap-sham.c +3 -0
index 1d75e6f..d65f22c 100644
@@ -38,7 +38,10 @@
 #include <crypto/internal/hash.h>
 
 #include <linux/omap-dma.h>
+
+#ifdef CONFIG_ARCH_OMAP1
 #include <mach/irqs.h>
+#endif
 
 #define SHA_REG_DIGEST(x)		(0x00 + ((x) * 0x04))
 #define SHA_REG_DIN(x)			(0x1C + ((x) * 0x04))
drivers/media/platform/Kconfig +0 -1
index 3dcfea6..eff53c9 100644
@@ -99,7 +99,7 @@ config VIDEO_OMAP2
 
 config VIDEO_OMAP3
 	tristate "OMAP 3 Camera support (EXPERIMENTAL)"
-	depends on OMAP_IOVMM && VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API &&

ARCH_OMAP3 && EXPERIMENTAL + depends on OMAP_IOVMM && VIDEO_V4L2 && I2C &&
VIDEO_V4L2_SUBDEV_API && ARCH_OMAP3 && EXPERIMENTAL && !ARCH_MULTIPLATFORM ---help---

drivers/media/platform/Kconfig +0 -0
 	  Driver for an OMAP 3 camera controller.
drivers/media/rc/Kconfig +1 -1
index 79ba242..19f3563 100644
@@ -291,7 +291,7 @@ config IR_TTUSBIR
 
 config IR_RX51
 	tristate "Nokia N900 IR transmitter diode"
-	depends on OMAP_DM_TIMER && LIRC
+	depends on OMAP_DM_TIMER && LIRC && !ARCH_MULTIPLATFORM
 	---help---
 	   Say Y or M here if you want to enable support for the IR
 	   transmitter diode built in the Nokia N900 (RX51) device.
(quoted diff) +0 -0

b/drivers/staging/tidspbridge/Kconfig index 0dd479f..60848f1 100644

drivers/staging/tidspbridge/Kconfig +1 -1
@@ -4,7 +4,7 @@
 
 menuconfig TIDSPBRIDGE
 	tristate "DSP Bridge driver"
-	depends on ARCH_OMAP3
+	depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM
 	select OMAP_MBOX_FWK
 	help
 	  DSP/BIOS Bridge is designed for platforms that contain a GPP and
Signature · 8 lines
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author maintainer
#9 lore raw

PATCH 6/8 ARM: OMAP2+: Disable code that currently does not work with multiplaform

Quoted 8 lines · Laurent Pinchart

Hi Tony,

Quoted 5 lines · On Thursday 03 January 2013 12:15:21 Tony Lindgren wrote:

Hi all,

Looks like we need to also disable mailbox to avoid dependencies to the mailbox series as it's being moved to live under drivers.

Quoted 6 lines
Quoted 2 lines

And we need to disable omap3isp as it tries to use the now private include <plat/*.h> headers.

I've posted a patch to the linux-media mailing list to remove plat/*.h headers that are not present anymore in v3.8. It will be pushed to v3.8, as this breaks compilation of the driver.

Great, thanks for doing that.

Quoted 3 lines

The driver still includes the plat/cpu.h header that can be removed as well. I've just posted a patch that remove the header and will push it to v3.9. The OMAP3 ISP part of this patch can thus be dropped.

OK. I suggest you merge the plat/cpu.h during the -rc cycle as well. With v3.8-rc2 plat/cpu.h no longer contains anything for omap2+, and we could make it now to do #error for omap2+ if the current users are fixed.

Will drop the omap3isp part from this patch as you suggested though.

Regards,

Tony

#10 lore raw

PATCH 6/8 ARM: OMAP2+: Disable code that currently does not work with multiplaform

Hi Tony,

Quoted 18 lines · On Thursday 03 January 2013 14:49:54 Tony Lindgren wrote:
Quoted 8 lines · Laurent Pinchart

Hi Tony,

Quoted 5 lines · On Thursday 03 January 2013 12:15:21 Tony Lindgren wrote:

Hi all,

Looks like we need to also disable mailbox to avoid dependencies to the mailbox series as it's being moved to live under drivers.

Quoted 6 lines
Quoted 2 lines

And we need to disable omap3isp as it tries to use the now private include <plat/*.h> headers.

I've posted a patch to the linux-media mailing list to remove plat/*.h headers that are not present anymore in v3.8. It will be pushed to v3.8, as this breaks compilation of the driver.

Great, thanks for doing that.

Quoted 8 lines
Quoted 3 lines

The driver still includes the plat/cpu.h header that can be removed as well. I've just posted a patch that remove the header and will push it to v3.9. The OMAP3 ISP part of this patch can thus be dropped.

OK. I suggest you merge the plat/cpu.h during the -rc cycle as well. With v3.8-rc2 plat/cpu.h no longer contains anything for omap2+, and we could make it now to do #error for omap2+ if the current users are fixed.

If Mauro is fine with the patch going to v3.8-rc I have no issue with that. Is this patch targetted at v3.8 or v3.9 ?

Quoted 1 line

Will drop the omap3isp part from this patch as you suggested though.

Thank you.

Signature · 3 lines
Regards,

Laurent Pinchart
author maintainer
#11 lore raw

PATCH 6/8 ARM: OMAP2+: Disable code that currently does not work with multiplaform

Quoted 7 lines · Laurent Pinchart
Quoted 6 lines · On Thursday 03 January 2013 14:49:54 Tony Lindgren wrote:
Quoted 4 lines · Laurent Pinchart

The driver still includes the plat/cpu.h header that can be removed as well. I've just posted a patch that remove the header and will push it to v3.9. The OMAP3 ISP part of this patch can thus be dropped.

Quoted 7 lines
Quoted 4 lines

OK. I suggest you merge the plat/cpu.h during the -rc cycle as well. With v3.8-rc2 plat/cpu.h no longer contains anything for omap2+, and we could make it now to do #error for omap2+ if the current users are fixed.

If Mauro is fine with the patch going to v3.8-rc I have no issue with that. Is this patch targetted at v3.8 or v3.9 ?

Well ideally ASAP to prevent new drivers including plat/cpu.h as otherwise build breakage will occur when we flip on the multiplatform support :)

Regards,

Tony

author maintainer
#12 lore raw

PATCH 7/8 ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support

In reply to Tony Lindgren

Flip on multiplatform support for omap2+.

No changes to omap2plus_defconfig needed, but please note that you may need to update your custom config files to make sure you have:

CONFIG_ARCH_MULTIPLATFORM=y
CONFIG_ARCH_MULTI_V7=y
CONFIG_ARCH_OMAP2PLUS=y

And may need CONFIG_ARCH_MULTI_V6=y if booting omap2 boards.

---
 arch/arm/Kconfig                     |   13 ++++++++++---
 arch/arm/configs/omap2plus_defconfig |    2 +-
 arch/arm/mach-omap2/Kconfig          |   23 +++++++++++++++++++++++
 arch/arm/mach-omap2/Makefile         |    3 +++
 arch/arm/plat-omap/Kconfig           |   30 ------------------------------
 arch/arm/plat-omap/Makefile          |    2 ++
 6 files changed, 39 insertions(+), 34 deletions(-)
arch/arm/Kconfig +10 -3
index ae97414..93b6acd 100644
@@ -940,17 +940,24 @@ config ARCH_DAVINCI
 	help
 	  Support for TI's DaVinci platform.
 
-config ARCH_OMAP
-	bool "TI OMAP"
+config ARCH_OMAP1
+	bool "TI OMAP1"
 	depends on MMU
 	select ARCH_HAS_CPUFREQ
 	select ARCH_HAS_HOLES_MEMORYMODEL
+	select ARCH_OMAP
 	select ARCH_REQUIRE_GPIOLIB
+	select CLKDEV_LOOKUP
 	select CLKSRC_MMIO
 	select GENERIC_CLOCKEVENTS
+	select GENERIC_IRQ_CHIP
 	select HAVE_CLK
+	select HAVE_IDE
+	select IRQ_DOMAIN
+	select NEED_MACH_IO_H if PCCARD
+	select NEED_MACH_MEMORY_H
 	help
-	  Support for TI's OMAP platform (OMAP1/2/3/4).
+	  Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)
 
 config ARCH_VT8500_SINGLE
 	bool "VIA/WonderMedia 85xx"
arch/arm/configs/omap2plus_defconfig +1 -1
index 82ce8d7..db05745 100644
@@ -20,7 +20,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 # CONFIG_BLK_DEV_BSG is not set
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_OMAP_RESET_CLOCKS=y
 CONFIG_OMAP_MUX_DEBUG=y
 CONFIG_ARM_THUMBEE=y
arch/arm/mach-omap2/Kconfig +23 -0
index 492d764..c3c033f 100644
@@ -1,3 +1,26 @@
+config ARCH_OMAP
+	bool
+
+config ARCH_OMAP2PLUS
+	bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
+	select ARCH_HAS_CPUFREQ
+	select ARCH_HAS_HOLES_MEMORYMODEL
+	select ARCH_OMAP
+	select ARCH_REQUIRE_GPIOLIB
+	select CLKDEV_LOOKUP
+	select CLKSRC_MMIO
+	select GENERIC_CLOCKEVENTS
+	select GENERIC_IRQ_CHIP
+	select HAVE_CLK
+	select OMAP_DM_TIMER
+	select PINCTRL
+	select PROC_DEVICETREE if PROC_FS
+	select SPARSE_IRQ
+	select USE_OF
+	help
+	  Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
+
+
 if ARCH_OMAP2PLUS
 
 menu "TI OMAP2/3/4 Specific Features"
arch/arm/mach-omap2/Makefile +3 -0
index 947cafe..65fb6fb 100644
@@ -2,6 +2,9 @@
 # Makefile for the linux kernel.
 #
 
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
+	-I$(srctree)/arch/arm/plat-omap/include
+
 # Common support
 obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
 	 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
arch/arm/plat-omap/Kconfig +0 -30
index 665870d..886af14 100644
@@ -5,36 +5,6 @@ menu "TI OMAP Common Features"
 config ARCH_OMAP_OTG
 	bool
 
-choice
-	prompt "OMAP System Type"
-	default ARCH_OMAP2PLUS
-
-config ARCH_OMAP1
-	bool "TI OMAP1"
-	select CLKDEV_LOOKUP
-	select CLKSRC_MMIO
-	select GENERIC_IRQ_CHIP
-	select HAVE_IDE
-	select IRQ_DOMAIN
-	select NEED_MACH_IO_H if PCCARD
-	select NEED_MACH_MEMORY_H
-	help
-	  "Systems based on omap7xx, omap15xx or omap16xx"
-
-config ARCH_OMAP2PLUS
-	bool "TI OMAP2/3/4"
-	select CLKDEV_LOOKUP
-	select GENERIC_IRQ_CHIP
-	select OMAP_DM_TIMER
-	select PINCTRL
-	select PROC_DEVICETREE if PROC_FS
-	select SPARSE_IRQ
-	select USE_OF
-	help
-	  "Systems based on OMAP2, OMAP3, OMAP4 or OMAP5"
-
-endchoice
-
 comment "OMAP Feature Selections"
 
 config OMAP_DEBUG_DEVICES
arch/arm/plat-omap/Makefile +2 -0
index a14a78a..3119941 100644
@@ -2,6 +2,8 @@
 # Makefile for the linux kernel.
 #
 
+ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/plat-omap/include
+
 # Common support
 obj-y := sram.o dma.o counter_32k.o
 obj-m :=
author maintainer
#13 lore raw

PATCH 8/8 ARM: OMAP2+: Add minimal support for booting vexpress

In reply to Tony Lindgren

With multiplatform support enabled we are now always building in vexpress. Let's enable few drivers also as this allows us to boot omap2plus zImage in qemu for testing multiplaform related changes.

---
 arch/arm/configs/omap2plus_defconfig |    4 ++++
 1 file changed, 4 insertions(+)
arch/arm/configs/omap2plus_defconfig +4 -0
index db05745..5be2e4b 100644
@@ -23,6 +23,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_ARCH_OMAP2PLUS=y
 CONFIG_OMAP_RESET_CLOCKS=y
 CONFIG_OMAP_MUX_DEBUG=y
+CONFIG_ARCH_VEXPRESS_CA9X4=y
 CONFIG_ARM_THUMBEE=y
 CONFIG_ARM_ERRATA_411920=y
 CONFIG_NO_HZ=y
@@ -121,6 +122,8 @@ CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_8250_DETECT_IRQ=y
 CONFIG_SERIAL_8250_RSA=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
 CONFIG_HW_RANDOM=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_SPI=y
@@ -194,6 +197,7 @@ CONFIG_USB_ZERO=m
 CONFIG_MMC=y
 CONFIG_MMC_UNSAFE_RESUME=y
 CONFIG_SDIO_UART=y
+CONFIG_MMC_ARMMMCI=y
 CONFIG_MMC_OMAP=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_RTC_CLASS=y
author maintainer
#14 lore raw

cover Flip on multiplatform support for omap2plus for v3.9

In reply to Tony Lindgren
Quoted 7 lines · Tony Lindgren

Hi all,

These patches enable multiplatform support for omap2plus.

To build and boot it against the current mainline kernel you need the following:

Quoted 6 lines

[PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier [PATCH 2/2] ARM: disable errata work-arounds which access secure registers [GIT PULL 1/2] omap fixes for v3.8 merge window
[GIT PULL 2/2] omap cleanup for v3.8 merge window
[GIT PULL] two trivial omap build error fixes for v3.8 merge window
cpts: Fix build error caused by include of plat/clock.h

Few notes on booting this as at least Lokesh already hit the mkimage issue like I did earlier.

To boot this you also need to run mkimage manually on the zImage:

$ mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 \
	-n "Linux" -d zImage-omap2plus uImage-omap2plus

And to boot the vexpress on qemu something like this should do:

$ qemu-system-arm -machine vexpress-a9 -m 1024 -net nic -net user -serial stdio \
	-append "console=ttyAMA0,115200n8 rw root=/dev/mmcblk0p2 rootwait" \
	-kernel zImage-omap2plus -initrd initrd.img -sd rootfs.img

I had to build the Linaro qemu to get it to boot, for some reason the version of qemu in debian unstable did not boot vexpress for me.

Regards,

Tony

#15 lore raw

cover Flip on multiplatform support for omap2plus for v3.9

Hello Tony,

Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Tony Lindgren

Hi all,

These patches enable multiplatform support for omap2plus.

To build and boot it against the current mainline kernel you need the following:

Quoted 7 lines
Quoted 6 lines

[PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier [PATCH 2/2] ARM: disable errata work-arounds which access secure registers [GIT PULL 1/2] omap fixes for v3.8 merge window
[GIT PULL 2/2] omap cleanup for v3.8 merge window
[GIT PULL] two trivial omap build error fixes for v3.8 merge window
cpts: Fix build error caused by include of plat/clock.h

I'm trying this on my IGEP v2 board (using Javier's patches for DT).

I've applied these series on top of your branch
"omap-for-v3.8/fixes-for-merge-window-part2".

However, I'm finding some conflicts (fb.c appears in plat-omap, some missing headers, etc.)

Could you suggest a better branch to base the series?

Thanks!

Ezequiel

author maintainer
#16 lore raw

cover Flip on multiplatform support for omap2plus for v3.9

Quoted 21 lines · Ezequiel Garcia

Hello Tony,

Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Tony Lindgren

Hi all,

These patches enable multiplatform support for omap2plus.

To build and boot it against the current mainline kernel you need the following:

Quoted 7 lines
Quoted 6 lines

[PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier [PATCH 2/2] ARM: disable errata work-arounds which access secure registers [GIT PULL 1/2] omap fixes for v3.8 merge window
[GIT PULL 2/2] omap cleanup for v3.8 merge window
[GIT PULL] two trivial omap build error fixes for v3.8 merge window
cpts: Fix build error caused by include of plat/clock.h

I'm trying this on my IGEP v2 board (using Javier's patches for DT).

Quoted 7 lines

I've applied these series on top of your branch
"omap-for-v3.8/fixes-for-merge-window-part2".

However, I'm finding some conflicts (fb.c appears in plat-omap, some missing headers, etc.)

Could you suggest a better branch to base the series?

Maybe use Olof's lates pull request for fixes from LAKML +
ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier +
ARM: disable errata work-arounds which access secure registers and these patches?

Or just wait for -rc1 and then I'll push out a branch.

Regards,

Tony

#17 lore raw

cover Flip on multiplatform support for omap2plus for v3.9

Hi Tony,

Quoted 6 lines · Tony Lindgren

Maybe use Olof's lates pull request for fixes from LAKML +
ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier +
ARM: disable errata work-arounds which access secure registers and these patches?

FYI, I've successfully booted my IGEPv2 board using:
* arm-soc/for-next
* igep DT patches
* this multiplatform series
* the two patches mentioned above

With this series CONFIG_MACH_IGEP0020 is not needed, just CONFIG_MACH_OMAP_GENERIC is selected.

So I guess this means, for igep v2,

Nice job,

Ezequiel

author maintainer
#18 lore raw

cover Flip on multiplatform support for omap2plus for v3.9

Quoted 4 lines · Ezequiel Garcia

Hi Tony,

Quoted 1 line · Tony Lindgren
Quoted 8 lines
Quoted 5 lines

Maybe use Olof's lates pull request for fixes from LAKML +
ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier +
ARM: disable errata work-arounds which access secure registers and these patches?

FYI, I've successfully booted my IGEPv2 board using:
* arm-soc/for-next

Ah right, sorry this series also needs the omap branch omap-for-v3.8/cleanup-for-merge-window that's now in arm-soc/for-next. Specifically it's the "ARM: OMAP: Split fb.c to remove last remaining cpu_is_omap usage" patch.

Quoted 10 lines

* igep DT patches
* this multiplatform series
* the two patches mentioned above

With this series CONFIG_MACH_IGEP0020 is not needed, just CONFIG_MACH_OMAP_GENERIC is selected.

So I guess this means, for igep v2,

Thanks,

Tony

#19 lore raw

cover Flip on multiplatform support for omap2plus for v3.9

In reply to Ezequiel Garcia

Hi Garcia,

Quoted 21 lines · Ezequiel Garcia

Hello Tony,

Quoted 8 lines · Tony Lindgren
Quoted 7 lines · Tony Lindgren

Hi all,

These patches enable multiplatform support for omap2plus.

To build and boot it against the current mainline kernel you need the following:

Quoted 7 lines
Quoted 6 lines

[PATCH 1/2] ARM: l2x0: Only set .set_debug on PL310 r3p0 and earlier [PATCH 2/2] ARM: disable errata work-arounds which access secure registers [GIT PULL 1/2] omap fixes for v3.8 merge window
[GIT PULL 2/2] omap cleanup for v3.8 merge window
[GIT PULL] two trivial omap build error fixes for v3.8 merge window
cpts: Fix build error caused by include of plat/clock.h

I'm trying this on my IGEP v2 board (using Javier's patches for DT).

Quoted 7 lines

I've applied these series on top of your branch
"omap-for-v3.8/fixes-for-merge-window-part2".

However, I'm finding some conflicts (fb.c appears in plat-omap, some missing headers, etc.)

Could you suggest a better branch to base the series?

Can you try it on current mainline.
It applies without any conflicts..

Thanks
Lokesh

Quoted 10 lines

Thanks!

Ezequiel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author maintainer
#20 lore raw

[PATCH 9/8] ARM: OMAP2+: Remove now obsolete uncompress.h and debug-macro.S

In reply to Tony Lindgren

These are no longer needed, we now have to select the debug_ll port manually. The new multiplatform version of the debug_ll code is in arch/arm/include/debug/omap2plus.S.

arch/arm/mach-omap2/include/mach/debug-macro.S deleted +0 -165
@@ -1,165 +0,0 @@
-/* arch/arm/mach-omap2/include/mach/debug-macro.S
- *
- * Debugging macro include header
- *
- *  Copyright (C) 1994-1999 Russell King
- *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
-*/
-
-#include <linux/serial_reg.h>
-
-#include <mach/serial.h>
-
-#define UART_OFFSET(addr)	((addr) & 0x00ffffff)
-
-		.pushsection .data
-omap_uart_phys:	.word	0
-omap_uart_virt:	.word	0
-omap_uart_lsr:	.word	0
-		.popsection
-
-		/*
-		 * Note that this code won't work if the bootloader passes
-		 * a wrong machine ID number in r1. To debug, just hardcode
-		 * the desired UART phys and virt addresses temporarily into
-		 * the omap_uart_phys and omap_uart_virt above.
-		 */
-		.macro	addruart, rp, rv, tmp
-
-		/* Use omap_uart_phys/virt if already configured */
-10:		adr	\rp, 99f		@ get effective addr of 99f
-		ldr	\rv, [\rp]		@ get absolute addr of 99f
-		sub	\rv, \rv, \rp		@ offset between the two
-		ldr	\rp, [\rp, #4]		@ abs addr of omap_uart_phys
-		sub	\tmp, \rp, \rv		@ make it effective
-		ldr	\rp, [\tmp, #0]		@ omap_uart_phys
-		ldr	\rv, [\tmp, #4]		@ omap_uart_virt
-		cmp	\rp, #0			@ is port configured?
-		cmpne	\rv, #0
-		bne	100f			@ already configured
-
-		/* Check the debug UART configuration set in uncompress.h */
-		mov	\rp, pc
-		ldr	\rv, =OMAP_UART_INFO_OFS
-		and	\rp, \rp, #0xff000000
-		ldr	\rp, [\rp, \rv]
-
-		/* Select the UART to use based on the UART1 scratchpad value */
-		cmp	\rp, #0			@ no port configured?
-		beq	21f			@ if none, try to use UART1
-		cmp	\rp, #OMAP2UART1	@ OMAP2/3/4UART1
-		beq	21f			@ configure OMAP2/3/4UART1
-		cmp	\rp, #OMAP2UART2	@ OMAP2/3/4UART2
-		beq	22f			@ configure OMAP2/3/4UART2
-		cmp	\rp, #OMAP2UART3	@ only on 24xx
-		beq	23f			@ configure OMAP2UART3
-		cmp	\rp, #OMAP3UART3	@ only on 34xx
-		beq	33f			@ configure OMAP3UART3
-		cmp	\rp, #OMAP4UART3	@ only on 44xx/54xx
-		beq	43f			@ configure OMAP4/5UART3
-		cmp	\rp, #OMAP3UART4	@ only on 36xx
-		beq	34f			@ configure OMAP3UART4
-		cmp	\rp, #OMAP4UART4	@ only on 44xx/54xx
-		beq	44f			@ configure OMAP4/5UART4
-		cmp	\rp, #TI81XXUART1	@ ti81Xx UART offsets different
-		beq	81f			@ configure UART1
-		cmp	\rp, #TI81XXUART2	@ ti81Xx UART offsets different
-		beq	82f			@ configure UART2
-		cmp	\rp, #TI81XXUART3	@ ti81Xx UART offsets different
-		beq	83f			@ configure UART3
-		cmp	\rp, #AM33XXUART1	@ AM33XX UART offsets different
-		beq	84f			@ configure UART1
-		cmp	\rp, #ZOOM_UART		@ only on zoom2/3
-		beq	95f			@ configure ZOOM_UART
-
-		/* Configure the UART offset from the phys/virt base */
-21:		mov	\rp, #UART_OFFSET(OMAP2_UART1_BASE)	@ omap2/3/4
-		b	98f
-22:		mov	\rp, #UART_OFFSET(OMAP2_UART2_BASE)	@ omap2/3/4
-		b	98f
-23:		mov	\rp, #UART_OFFSET(OMAP2_UART3_BASE)
-		b	98f
-33:		mov	\rp, #UART_OFFSET(OMAP3_UART1_BASE)
-		add	\rp, \rp, #0x00fb0000
-		add	\rp, \rp, #0x00006000		@ OMAP3_UART3_BASE
-		b	98f
-34:		mov	\rp, #UART_OFFSET(OMAP3_UART1_BASE)
-		add	\rp, \rp, #0x00fb0000
-		add	\rp, \rp, #0x00028000		@ OMAP3_UART4_BASE
-		b	98f
-43:		mov	\rp, #UART_OFFSET(OMAP4_UART3_BASE)
-		b	98f
-44:		mov	\rp, #UART_OFFSET(OMAP4_UART4_BASE)
-		b	98f
-81:		mov	\rp, #UART_OFFSET(TI81XX_UART1_BASE)
-		b	98f
-82:		mov	\rp, #UART_OFFSET(TI81XX_UART2_BASE)
-		b	98f
-83:		mov	\rp, #UART_OFFSET(TI81XX_UART3_BASE)
-		b	98f
-84:		ldr	\rp, =AM33XX_UART1_BASE
-		and	\rp, \rp, #0x00ffffff
-		b	97f
-95:		ldr	\rp, =ZOOM_UART_BASE
-		str	\rp, [\tmp, #0]		@ omap_uart_phys
-		ldr	\rp, =ZOOM_UART_VIRT
-		str	\rp, [\tmp, #4]		@ omap_uart_virt
-		mov	\rp, #(UART_LSR << ZOOM_PORT_SHIFT)
-		str	\rp, [\tmp, #8]		@ omap_uart_lsr
-		b	10b
-
-		/* AM33XX: Store both phys and virt address for the uart */
-97:		add	\rp, \rp, #0x44000000	@ phys base
-		str	\rp, [\tmp, #0]		@ omap_uart_phys
-		sub	\rp, \rp, #0x44000000	@ phys base
-		add	\rp, \rp, #0xf9000000	@ virt base
-		str	\rp, [\tmp, #4]		@ omap_uart_virt
-		mov	\rp, #(UART_LSR << OMAP_PORT_SHIFT)
-		str	\rp, [\tmp, #8]		@ omap_uart_lsr
-
-		b	10b
-
-		/* Store both phys and virt address for the uart */
-98:		add	\rp, \rp, #0x48000000	@ phys base
-		str	\rp, [\tmp, #0]		@ omap_uart_phys
-		sub	\rp, \rp, #0x48000000	@ phys base
-		add	\rp, \rp, #0xfa000000	@ virt base
-		str	\rp, [\tmp, #4]		@ omap_uart_virt
-		mov	\rp, #(UART_LSR << OMAP_PORT_SHIFT)
-		str	\rp, [\tmp, #8]		@ omap_uart_lsr
-
-		b	10b
-
-		.align
-99:		.word	.
-		.word	omap_uart_phys
-		.ltorg
-
-100:		/* Pass the UART_LSR reg address */
-		ldr	\tmp, [\tmp, #8]	@ omap_uart_lsr
-		add	\rp, \rp, \tmp
-		add	\rv, \rv, \tmp
-		.endm
-
-		.macro	senduart,rd,rx
-		orr	\rd, \rd, \rx, lsl #24	@ preserve LSR reg offset
-		bic	\rx, \rx, #0xff		@ get base (THR) reg address
-		strb	\rd, [\rx]		@ send lower byte of rd
-		orr	\rx, \rx, \rd, lsr #24	@ restore original rx (LSR)
-		bic	\rd, \rd, #(0xff << 24)	@ restore original rd
-		.endm
-
-		.macro	busyuart,rd,rx
-1001:		ldrb	\rd, [\rx]		@ rx contains UART_LSR address
-		and	\rd, \rd, #(UART_LSR_TEMT | UART_LSR_THRE)
-		teq	\rd, #(UART_LSR_TEMT | UART_LSR_THRE)
-		bne	1001b
-		.endm
-
-		.macro	waituart,rd,rx
-		.endm
arch/arm/mach-omap2/include/mach/serial.h +0 -37
@@ -8,20 +8,6 @@
  * GNU General Public License for more details.
  */
 
-/*
- * Memory entry used for the DEBUG_LL UART configuration, relative to
- * start of RAM. See also uncompress.h and debug-macro.S.
- *
- * Note that using a memory location for storing the UART configuration
- * has at least two limitations:
- *
- * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
- *    uncompress code could then partially overwrite itself
- * 2. We assume printascii is called at least once before paging_init,
- *    and addruart has a chance to read OMAP_UART_INFO
- */
-#define OMAP_UART_INFO_OFS	0x3ffc
-
 /* OMAP2 serial ports */
 #define OMAP2_UART1_BASE	0x4806a000
 #define OMAP2_UART2_BASE	0x4806c000
@@ -68,29 +54,6 @@
 
 #define OMAP24XX_BASE_BAUD	(48000000/16)
 
-/*
- * DEBUG_LL port encoding stored into the UART1 scratchpad register by
- * decomp_setup in uncompress.h
- */
-#define OMAP2UART1		21
-#define OMAP2UART2		22
-#define OMAP2UART3		23
-#define OMAP3UART1		OMAP2UART1
-#define OMAP3UART2		OMAP2UART2
-#define OMAP3UART3		33
-#define OMAP3UART4		34		/* Only on 36xx */
-#define OMAP4UART1		OMAP2UART1
-#define OMAP4UART2		OMAP2UART2
-#define OMAP4UART3		43
-#define OMAP4UART4		44
-#define TI81XXUART1		81
-#define TI81XXUART2		82
-#define TI81XXUART3		83
-#define AM33XXUART1		84
-#define OMAP5UART3		OMAP4UART3
-#define OMAP5UART4		OMAP4UART4
-#define ZOOM_UART		95		/* Only on zoom2/3 */
-
 #ifndef __ASSEMBLER__
 
 struct omap_board_data;
arch/arm/mach-omap2/include/mach/uncompress.h deleted +0 -176

176 lines not on this page · raw message