Re: [PATCH] ARM: OMAP: TI816X: add clock domain support for TI816x

2013-09-18 Thread Aida Mynzhasova

On 16.09.2013 17:14, Nishanth Menon wrote:

On 10:49-20130916, Aida Mynzhasova wrote:

On 24.08.2013 18:02, Aida Mynzhasova wrote:

This patch adds required definitions and structures for clockdomain
initialization, so omap3xxx_clockdomains_init() was substituted by
new ti81xx_clockdomains_init() while early initialization of
TI81XX platform.

signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
  arch/arm/mach-omap2/Makefile   |   2 +
  arch/arm/mach-omap2/clockdomain.h  |   1 +
  arch/arm/mach-omap2/clockdomains_ti81xx_data.c | 208 +
  arch/arm/mach-omap2/cm-regbits-ti81xx.h|  22 +++
  arch/arm/mach-omap2/cm_ti81xx.h|  61 
  arch/arm/mach-omap2/io.c   |   2 +-
  6 files changed, 295 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/mach-omap2/clockdomains_ti81xx_data.c
  create mode 100644 arch/arm/mach-omap2/cm-regbits-ti81xx.h
  create mode 100644 arch/arm/mach-omap2/cm_ti81xx.h




[...]

Can anybody please review my changes?


We are transitioning out of having clock information in mach-omap2 to
using devicetree

http://marc.info/?l=devicetreem=137778225431749w=2

Will be good to align the conversion with upcoming V7 of the patch
series as well.



Hi Nishanth,

I'm sorry, but it seems like you mixed up clock and clock domain data. 
The same situation was for Afzal's patch:


http://article.gmane.org/gmane.linux.ports.arm.omap/104485
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP: TI816X: add clock domain support for TI816x

2013-09-18 Thread Aida Mynzhasova

On 18.09.2013 15:56, Nishanth Menon wrote:

On 09/18/2013 04:40 AM, Aida Mynzhasova wrote:

On 16.09.2013 17:14, Nishanth Menon wrote:

On 10:49-20130916, Aida Mynzhasova wrote:

On 24.08.2013 18:02, Aida Mynzhasova wrote:

This patch adds required definitions and structures for clockdomain
initialization, so omap3xxx_clockdomains_init() was substituted by
new ti81xx_clockdomains_init() while early initialization of
TI81XX platform.

signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
   arch/arm/mach-omap2/Makefile   |   2 +
   arch/arm/mach-omap2/clockdomain.h  |   1 +
   arch/arm/mach-omap2/clockdomains_ti81xx_data.c | 208 
+
   arch/arm/mach-omap2/cm-regbits-ti81xx.h|  22 +++
   arch/arm/mach-omap2/cm_ti81xx.h|  61 
   arch/arm/mach-omap2/io.c   |   2 +-
   6 files changed, 295 insertions(+), 1 deletion(-)
   create mode 100644 arch/arm/mach-omap2/clockdomains_ti81xx_data.c
   create mode 100644 arch/arm/mach-omap2/cm-regbits-ti81xx.h
   create mode 100644 arch/arm/mach-omap2/cm_ti81xx.h




[...]

Can anybody please review my changes?


We are transitioning out of having clock information in mach-omap2 to
using devicetree

http://marc.info/?l=devicetreem=137778225431749w=2

Will be good to align the conversion with upcoming V7 of the patch
series as well.



Hi Nishanth,

I'm sorry, but it seems like you mixed up clock and clock domain data.
The same situation was for Afzal's patch:

http://article.gmane.org/gmane.linux.ports.arm.omap/104485


Yep - same darned mistake!!! my sincere apologies. I had mistaken
Tero's series originally to mean it took care of the data, but
realized later(after kicking myself twice for not digging deeper) that
it was handling the relationship between clocks and clockdomains at
this stage and potentially creates the foundation to move the data out
as well at a later stage.

My bad.. Apologies once again.



That's ok :)

So, is there is somebody who wants to review my changes? :)

Thanks!
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP: TI816X: add clock domain support for TI816x

2013-09-16 Thread Aida Mynzhasova

On 24.08.2013 18:02, Aida Mynzhasova wrote:

This patch adds required definitions and structures for clockdomain
initialization, so omap3xxx_clockdomains_init() was substituted by
new ti81xx_clockdomains_init() while early initialization of
TI81XX platform.

signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
  arch/arm/mach-omap2/Makefile   |   2 +
  arch/arm/mach-omap2/clockdomain.h  |   1 +
  arch/arm/mach-omap2/clockdomains_ti81xx_data.c | 208 +
  arch/arm/mach-omap2/cm-regbits-ti81xx.h|  22 +++
  arch/arm/mach-omap2/cm_ti81xx.h|  61 
  arch/arm/mach-omap2/io.c   |   2 +-
  6 files changed, 295 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/mach-omap2/clockdomains_ti81xx_data.c
  create mode 100644 arch/arm/mach-omap2/cm-regbits-ti81xx.h
  create mode 100644 arch/arm/mach-omap2/cm_ti81xx.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index d4f6715..44c19b5 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -157,6 +157,8 @@ obj-$(CONFIG_ARCH_OMAP4)+= $(clockdomain-common)
  obj-$(CONFIG_ARCH_OMAP4)  += clockdomains44xx_data.o
  obj-$(CONFIG_SOC_AM33XX)  += $(clockdomain-common)
  obj-$(CONFIG_SOC_AM33XX)  += clockdomains33xx_data.o
+obj-$(CONFIG_SOC_TI81XX)   += $(clockdomain-common)
+obj-$(CONFIG_SOC_TI81XX)   += clockdomains_ti81xx_data.o
  obj-$(CONFIG_SOC_AM43XX)  += $(clockdomain-common)
  obj-$(CONFIG_SOC_OMAP5)   += $(clockdomain-common)
  obj-$(CONFIG_SOC_OMAP5)   += clockdomains54xx_data.o
diff --git a/arch/arm/mach-omap2/clockdomain.h 
b/arch/arm/mach-omap2/clockdomain.h
index daeecf1..5c42bcf 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -215,6 +215,7 @@ extern void __init omap242x_clockdomains_init(void);
  extern void __init omap243x_clockdomains_init(void);
  extern void __init omap3xxx_clockdomains_init(void);
  extern void __init am33xx_clockdomains_init(void);
+extern void __init ti81xx_clockdomains_init(void);
  extern void __init omap44xx_clockdomains_init(void);
  extern void __init omap54xx_clockdomains_init(void);

diff --git a/arch/arm/mach-omap2/clockdomains_ti81xx_data.c 
b/arch/arm/mach-omap2/clockdomains_ti81xx_data.c
new file mode 100644
index 000..94d7439
--- /dev/null
+++ b/arch/arm/mach-omap2/clockdomains_ti81xx_data.c
@@ -0,0 +1,208 @@
+/*
+ * TI81XX Clock Domain data.
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
+ * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
+ *
+ * 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 __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_TI81XX_H
+#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_TI81XX_H
+
+#include linux/kernel.h
+#include linux/io.h
+
+#include clockdomain.h
+
+#include cm_ti81xx.h
+#include cm-regbits-ti81xx.h
+
+/*
+ * - Add other domains as required
+ * - Fill up associated powerdomans (especially ALWON powerdomains are NULL at
+ *   the moment
+ * - Consider dependencies across domains (probably not applicable till now)
+ */
+
+/* Common TI81XX */
+static struct clockdomain alwon_l3_slow_ti81xx_clkdm = {
+   .name   = alwon_l3_slow_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= TI81XX_CM_ALWON_MOD,
+   .clkdm_offs = TI81XX_CM_ALWON_L3_SLOW_CLKDM,
+   .clktrctrl_mask = TI81XX_CLKTRCTRL_MASK,
+   .flags  = CLKDM_CAN_HWSUP_SWSUP,
+};
+
+static struct clockdomain alwon_l3_med_ti81xx_clkdm = {
+   .name   = alwon_l3_med_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= TI81XX_CM_ALWON_MOD,
+   .clkdm_offs = TI81XX_CM_ALWON_L3_MED_CLKDM,
+   .clktrctrl_mask = TI81XX_CLKTRCTRL_MASK,
+   .flags  = CLKDM_CAN_HWSUP_SWSUP,
+};
+
+static struct clockdomain alwon_l3_fast_ti81xx_clkdm = {
+   .name   = alwon_l3_fast_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= TI81XX_CM_ALWON_MOD,
+   .clkdm_offs = TI81XX_CM_ALWON_L3_FAST_CLKDM,
+   .clktrctrl_mask = TI81XX_CLKTRCTRL_MASK,
+   .flags  = CLKDM_CAN_HWSUP_SWSUP,
+};
+
+static struct clockdomain alwon_ethernet_ti81xx_clkdm = {
+   .name   = alwon_ethernet_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= TI81XX_CM_ALWON_MOD,
+   .clkdm_offs

[PATCH] ARM: OMAP: TI816X: add clock domain support for TI816x

2013-08-24 Thread Aida Mynzhasova
This patch adds required definitions and structures for clockdomain
initialization, so omap3xxx_clockdomains_init() was substituted by
new ti81xx_clockdomains_init() while early initialization of
TI81XX platform.

signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/Makefile   |   2 +
 arch/arm/mach-omap2/clockdomain.h  |   1 +
 arch/arm/mach-omap2/clockdomains_ti81xx_data.c | 208 +
 arch/arm/mach-omap2/cm-regbits-ti81xx.h|  22 +++
 arch/arm/mach-omap2/cm_ti81xx.h|  61 
 arch/arm/mach-omap2/io.c   |   2 +-
 6 files changed, 295 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-omap2/clockdomains_ti81xx_data.c
 create mode 100644 arch/arm/mach-omap2/cm-regbits-ti81xx.h
 create mode 100644 arch/arm/mach-omap2/cm_ti81xx.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index d4f6715..44c19b5 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -157,6 +157,8 @@ obj-$(CONFIG_ARCH_OMAP4)+= $(clockdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)   += clockdomains44xx_data.o
 obj-$(CONFIG_SOC_AM33XX)   += $(clockdomain-common)
 obj-$(CONFIG_SOC_AM33XX)   += clockdomains33xx_data.o
+obj-$(CONFIG_SOC_TI81XX)   += $(clockdomain-common)
+obj-$(CONFIG_SOC_TI81XX)   += clockdomains_ti81xx_data.o
 obj-$(CONFIG_SOC_AM43XX)   += $(clockdomain-common)
 obj-$(CONFIG_SOC_OMAP5)+= $(clockdomain-common)
 obj-$(CONFIG_SOC_OMAP5)+= clockdomains54xx_data.o
diff --git a/arch/arm/mach-omap2/clockdomain.h 
b/arch/arm/mach-omap2/clockdomain.h
index daeecf1..5c42bcf 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -215,6 +215,7 @@ extern void __init omap242x_clockdomains_init(void);
 extern void __init omap243x_clockdomains_init(void);
 extern void __init omap3xxx_clockdomains_init(void);
 extern void __init am33xx_clockdomains_init(void);
+extern void __init ti81xx_clockdomains_init(void);
 extern void __init omap44xx_clockdomains_init(void);
 extern void __init omap54xx_clockdomains_init(void);
 
diff --git a/arch/arm/mach-omap2/clockdomains_ti81xx_data.c 
b/arch/arm/mach-omap2/clockdomains_ti81xx_data.c
new file mode 100644
index 000..94d7439
--- /dev/null
+++ b/arch/arm/mach-omap2/clockdomains_ti81xx_data.c
@@ -0,0 +1,208 @@
+/*
+ * TI81XX Clock Domain data.
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
+ * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
+ *
+ * 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 __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_TI81XX_H
+#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_TI81XX_H
+
+#include linux/kernel.h
+#include linux/io.h
+
+#include clockdomain.h
+
+#include cm_ti81xx.h
+#include cm-regbits-ti81xx.h
+
+/*
+ * - Add other domains as required
+ * - Fill up associated powerdomans (especially ALWON powerdomains are NULL at
+ *   the moment
+ * - Consider dependencies across domains (probably not applicable till now)
+ */
+
+/* Common TI81XX */
+static struct clockdomain alwon_l3_slow_ti81xx_clkdm = {
+   .name   = alwon_l3_slow_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= TI81XX_CM_ALWON_MOD,
+   .clkdm_offs = TI81XX_CM_ALWON_L3_SLOW_CLKDM,
+   .clktrctrl_mask = TI81XX_CLKTRCTRL_MASK,
+   .flags  = CLKDM_CAN_HWSUP_SWSUP,
+};
+
+static struct clockdomain alwon_l3_med_ti81xx_clkdm = {
+   .name   = alwon_l3_med_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= TI81XX_CM_ALWON_MOD,
+   .clkdm_offs = TI81XX_CM_ALWON_L3_MED_CLKDM,
+   .clktrctrl_mask = TI81XX_CLKTRCTRL_MASK,
+   .flags  = CLKDM_CAN_HWSUP_SWSUP,
+};
+
+static struct clockdomain alwon_l3_fast_ti81xx_clkdm = {
+   .name   = alwon_l3_fast_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= TI81XX_CM_ALWON_MOD,
+   .clkdm_offs = TI81XX_CM_ALWON_L3_FAST_CLKDM,
+   .clktrctrl_mask = TI81XX_CLKTRCTRL_MASK,
+   .flags  = CLKDM_CAN_HWSUP_SWSUP,
+};
+
+static struct clockdomain alwon_ethernet_ti81xx_clkdm = {
+   .name   = alwon_ethernet_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= TI81XX_CM_ALWON_MOD,
+   .clkdm_offs = TI81XX_CM_ETHERNET_CLKDM,
+   .clktrctrl_mask

[RESEND PATCH] ARM: OMAP: TI81XX: add always-on powerdomain for TI81XX

2013-08-20 Thread Aida Mynzhasova
This patch adds alwon powerdomain support for TI81XX, which is required
for stable functioning of a big number of TI81XX subsystems.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/powerdomains3xxx_data.c | 8 
 arch/arm/mach-omap2/prcm-common.h   | 1 +
 2 files changed, 9 insertions(+)

diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c 
b/arch/arm/mach-omap2/powerdomains3xxx_data.c
index e2d4bd8..328c103 100644
--- a/arch/arm/mach-omap2/powerdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c
@@ -336,6 +336,13 @@ static struct powerdomain dpll5_pwrdm = {
.voltdm   = { .name = core },
 };
 
+static struct powerdomain alwon_81xx_pwrdm = {
+   .name = alwon_pwrdm,
+   .prcm_offs= TI81XX_PRM_ALWON_MOD,
+   .pwrsts   = PWRSTS_OFF_ON,
+   .voltdm   = { .name = core },
+};
+
 static struct powerdomain device_81xx_pwrdm = {
.name = device_pwrdm,
.prcm_offs= TI81XX_PRM_DEVICE_MOD,
@@ -442,6 +449,7 @@ static struct powerdomain *powerdomains_am35x[] __initdata 
= {
 };
 
 static struct powerdomain *powerdomains_ti81xx[] __initdata = {
+   alwon_81xx_pwrdm,
device_81xx_pwrdm,
active_816x_pwrdm,
default_816x_pwrdm,
diff --git a/arch/arm/mach-omap2/prcm-common.h 
b/arch/arm/mach-omap2/prcm-common.h
index ff1ac4a..0e841fd 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -58,6 +58,7 @@
 #define TI816X_PRM_IVAHD1_MOD  0x0d00
 #define TI816X_PRM_IVAHD2_MOD  0x0e00
 #define TI816X_PRM_SGX_MOD 0x0f00
+#define TI81XX_PRM_ALWON_MOD   0x1800
 
 /* 24XX register bits shared between CM  PRM registers */
 
-- 
1.8.1.2

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: TI81XX: add always-on powerdomain for TI81XX

2013-08-19 Thread Aida Mynzhasova
This patch adds alwon powerdomain support for TI81XX, which is required
for stable functioning of a big number of TI81XX subsystems.
---
 arch/arm/mach-omap2/powerdomains3xxx_data.c | 8 
 arch/arm/mach-omap2/prcm-common.h   | 1 +
 2 files changed, 9 insertions(+)

diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c 
b/arch/arm/mach-omap2/powerdomains3xxx_data.c
index e2d4bd8..328c103 100644
--- a/arch/arm/mach-omap2/powerdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c
@@ -336,6 +336,13 @@ static struct powerdomain dpll5_pwrdm = {
.voltdm   = { .name = core },
 };
 
+static struct powerdomain alwon_81xx_pwrdm = {
+   .name = alwon_pwrdm,
+   .prcm_offs= TI81XX_PRM_ALWON_MOD,
+   .pwrsts   = PWRSTS_OFF_ON,
+   .voltdm   = { .name = core },
+};
+
 static struct powerdomain device_81xx_pwrdm = {
.name = device_pwrdm,
.prcm_offs= TI81XX_PRM_DEVICE_MOD,
@@ -442,6 +449,7 @@ static struct powerdomain *powerdomains_am35x[] __initdata 
= {
 };
 
 static struct powerdomain *powerdomains_ti81xx[] __initdata = {
+   alwon_81xx_pwrdm,
device_81xx_pwrdm,
active_816x_pwrdm,
default_816x_pwrdm,
diff --git a/arch/arm/mach-omap2/prcm-common.h 
b/arch/arm/mach-omap2/prcm-common.h
index ff1ac4a..0e841fd 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -58,6 +58,7 @@
 #define TI816X_PRM_IVAHD1_MOD  0x0d00
 #define TI816X_PRM_IVAHD2_MOD  0x0e00
 #define TI816X_PRM_SGX_MOD 0x0f00
+#define TI81XX_PRM_ALWON_MOD   0x1800
 
 /* 24XX register bits shared between CM  PRM registers */
 
-- 
1.8.1.2

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/5] Broken DM816x support in Linux 3.10-rc4

2013-06-06 Thread Aida Mynzhasova

On 06.06.2013 07:54, Paul Walmsley wrote:

здравствуйте,

On Wed, 5 Jun 2013, Aida Mynzhasova wrote:


Not so long ago I tried to boot Linux 3.10-rc4 kernel on DM816x EVM
board. Unfortunately, my attempts were failed by reason of poor
support of DM81xx-based devices in new kernels.


Yeah, TI pretty much gave up on trying to get support for that chip
upstream a few years ago.  Same for DM814x.


So, I suggest you this patch series, which fixes that kernel crush and
adds new functions/structures, required for early initialization on
DM816x (power and clock domains, hwmods). After applying these patches
the kernel is able to successfully continue booting till clock
initialization (will be added later).


OK, it will be great to get my DM8168EVM booting on mainline.  But there
are a few preliminary issues with the patches:

1. All new chip and board support needs to be DT-only.  So, no new board
files.  Also, all the hwmod data shouldn't have IRQ, DMA, etc. data - that
should come from DT.  See for example the recently posted patch [PATCH
13/14] ARM: AM33XX: hwmod data: irq, dma and addr info clean up

2. Looks like patch 2 is missing from the list.  If it's too big for the
list, please break it down into smaller patches.

3. Did you write this code and data, hwmods, etc., or did it come from a
TI kernel?  Please note this clearly in the patch descriptions.


- Paul



Hi!

Thanks for reply!
ok, I'll rewrite code by means of DT and add some additional notes to 
patch description.


Aida.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Broken DM816x support in Linux 3.10-rc4

2013-06-05 Thread Aida Mynzhasova
Not so long ago I tried to boot Linux 3.10-rc4 kernel on DM816x EVM
board. Unfortunately, my attempts were failed by reason of poor
support of DM81xx-based devices in new kernels.

Actually, on Linux 3.10-rc4 kernel early initialization of board
is failed when it tries to initialize power domains:

[0.00] Unhandled fault: external abort on non-linefetch (0x1028) 
at 0xfa17f8e4
[0.00] Internal error: : 1028 [#1] SMP ARM
[0.00] Modules linked in:
[0.00] CPU: 0 PID: 0 Comm: swapper Not tainted 
3.10.0-rc3-1-g0e5443c-dirty #12
[0.00] task: c076fc50 ti: c0764000 task.ti: c0764000
[0.00] PC is at omap2_pwrdm_wait_transition+0x1c/0xac
[0.00] LR is at pwrdm_register_pwrdms+0x15c/0x1ac
[0.00] pc : [c0031698]lr : [c0036010]psr: 6193
[0.00] sp : c0765f28  ip : c07bebe0  fp : 0001
[0.00] r10: c07e6a90  r9 :   r8 : c07e6944
[0.00] r7 : c0754a50  r6 : c064f264  r5 : c0775298  r4 : c0773e9c
[0.00] r3 : f8e4  r2 : fa17f8e4  r1 : 0004  r0 : c0775298
[0.00] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM 
Segment kernel
[0.00] Control: 10c5387d  Table: 80004019  DAC: 0017
[0.00] Process swapper (pid: 0, stack limit = 0xc0764240)
[0.00] Stack: (0xc0765f28 to 0xc0766000)
[0.00] 5f20:   c0773e9c c0775298 c064f264 
c0754a50 c0773ee4 c0036010
[0.00] 5f40: 35170034 81600134 c05125a8 fa18 8200 
c0771348 c07b1b48 c07475ac
[0.00] 5f60: c0771348 c07191fc c0647c40 c0711598 16c0 
c0d24fb4 c06450ac c070c148
[0.00] 5f80: c0765f98 c0765f90 c0771134 c0765fdc  
  
[0.00] 5fa0: c0643878 0001  c0748774 c0771134 
c076c880 413fc082 
[0.00] 5fc0:  c07086fc    
  c0748778
[0.00] 5fe0: 10c53c7d c076c910 c0748774 c0771134 80004059 
80008074  
[0.00] [c0031698] (omap2_pwrdm_wait_transition+0x1c/0xac) from 
[c0036010] (pwrdm_register_pwrdms+0x15c/0x1ac)
[0.00] [c0036010] (pwrdm_register_pwrdms+0x15c/0x1ac) from 
[c07191fc] (omap3xxx_powerdomains_init+0x50/0x144)
[0.00] [c07191fc] (omap3xxx_powerdomains_init+0x50/0x144) from 
[c0711598] (ti81xx_init_early+0xcc/0x178)
[0.00] [c0711598] (ti81xx_init_early+0xcc/0x178) from 
[c070c148] (setup_arch+0x5ac/0x800)
[0.00] [c070c148] (setup_arch+0x5ac/0x800) from [c07086fc] 
(start_kernel+0x7c/0x330)
[0.00] [c07086fc] (start_kernel+0x7c/0x330) from [80008074] 
(0x80008074)
[0.00] Code: e1d030f8 e5982000 e28330e4 e0822003 (e5921000)
[0.00] ---[ end trace 1b75b31a2719ed1c ]---

So, I suggest you this patch series, which fixes that kernel crush and
adds new functions/structures, required for early initialization on
DM816x (power and clock domains, hwmods). After applying these patches
the kernel is able to successfully continue booting till clock
initialization (will be added later).

Thanks,

Aida

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/5] ARM: OMAP: DM816x: add hwmod support for DM81xx

2013-06-05 Thread Aida Mynzhasova
OCP interface data structures were added in order to achieve
successful initialization of hwmods on DM816x.

Required DM81xx family IRQ definitions, offsets of the PRCM clock
control registers and additional OMAP2PLUS DMA channel definitions
were added as they are needed during the hwmod registration.

omap3xxx_hwmod_init() call was substituted by dm81xx_hwmod_init().

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/Makefile  |1 +
 arch/arm/mach-omap2/cm_dm81xx.h   |   20 +
 arch/arm/mach-omap2/dm81xx.h  |   28 +-
 arch/arm/mach-omap2/dma.h |   12 +
 arch/arm/mach-omap2/io.c  |2 +-
 arch/arm/mach-omap2/omap_hwmod.h  |1 +
 arch/arm/mach-omap2/omap_hwmod_dm81xx_data.c  | 1209 +
 arch/arm/plat-omap/include/plat/dmtimer.h |6 +
 arch/arm/plat-omap/include/plat/irqs-dm81xx.h |   43 +
 9 files changed, 1320 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-omap2/omap_hwmod_dm81xx_data.c
 create mode 100644 arch/arm/plat-omap/include/plat/irqs-dm81xx.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 132a1e2..3b5cc8b 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -202,6 +202,7 @@ obj-$(CONFIG_ARCH_OMAP3)+= 
omap_hwmod_2xxx_3xxx_ipblock_data.o
 obj-$(CONFIG_ARCH_OMAP3)   += 
omap_hwmod_2xxx_3xxx_interconnect_data.o
 obj-$(CONFIG_ARCH_OMAP3)   += omap_hwmod_3xxx_data.o
 obj-$(CONFIG_SOC_AM33XX)   += omap_hwmod_am33xx_data.o
+obj-$(CONFIG_SOC_DM81XX)   += omap_hwmod_dm81xx_data.o
 obj-$(CONFIG_ARCH_OMAP4)   += omap_hwmod_44xx_data.o
 
 # EMU peripherals
diff --git a/arch/arm/mach-omap2/cm_dm81xx.h b/arch/arm/mach-omap2/cm_dm81xx.h
index f8988da..d8268cd 100644
--- a/arch/arm/mach-omap2/cm_dm81xx.h
+++ b/arch/arm/mach-omap2/cm_dm81xx.h
@@ -58,4 +58,24 @@
 #define DM816X_CM_DEFAULT_PCI_CLKDM0x0010
 #define DM816X_CM_DEFAULT_L3_SLOW_CLKDM0x0014
 
+#define DM81XX_CM_ALWON_UART_0_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x0150)
+#define DM81XX_CM_ALWON_UART_1_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x0154)
+#define DM81XX_CM_ALWON_UART_2_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x0158)
+#define DM81XX_CM_ALWON_GPIO_0_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x015C)
+#define DM81XX_CM_ALWON_GPIO_1_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x0160)
+#define DM81XX_CM_ALWON_WDTIMER_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x018C)
+#define DM81XX_CM_ALWON_SPI_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 
0x0190)
+#define DM816X_CM_ALWON_I2C_0_CLKCTRL_OFF  (DM81XX_CM_ALWON_MOD + 0x0164)
+#define DM816X_CM_ALWON_I2C_1_CLKCTRL_OFF  (DM81XX_CM_ALWON_MOD + 0x0168)
+#define DM816X_CM_DEFAULT_USB_CLKCTRL_OFF  (DM816X_CM_DEFAULT_MOD + 0x0058)
+#define DM816X_CM_ALWON_TIMER_0_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x016C)
+#define DM816X_CM_ALWON_TIMER_1_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0170)
+#define DM816X_CM_ALWON_TIMER_2_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0174)
+#define DM816X_CM_ALWON_TIMER_3_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0178)
+#define DM816X_CM_ALWON_TIMER_4_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x017C)
+#define DM816X_CM_ALWON_TIMER_5_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0180)
+#define DM816X_CM_ALWON_TIMER_6_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0184)
+#define DM816X_CM_ALWON_TIMER_7_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0188)
+#define DM816X_CM_ALWON_SDIO_CLKCTRL_OFF   (DM81XX_CM_ALWON_MOD + 0x15B0)
+#define DM81XX_CM_ALWON_SPI_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 
0x0190)
 #endif
diff --git a/arch/arm/mach-omap2/dm81xx.h b/arch/arm/mach-omap2/dm81xx.h
index a0b18a6..e92a2d2 100644
--- a/arch/arm/mach-omap2/dm81xx.h
+++ b/arch/arm/mach-omap2/dm81xx.h
@@ -30,7 +30,33 @@
 #define DM81XX_TAP_BASE(DM81XX_CTRL_BASE + \
 DM81XX_CONTROL_DEVICE_ID - 0x204)
 
+#define DM81XX_MAILBOX_BASE0x480C8000
 
-#define DM81XX_ARM_INTC_BASE   0x4820
+#define DM816X_WDTIMER1_BASE   0x480C2000
+
+#define DM816X_I2C0_BASE   0x48028000
+#define DM816X_I2C1_BASE   0x4802A000
+
+#define DM81XX_ELM_BASE0x4808
+
+#define DM81XX_GPIO0_BASE  0x48032000
+#define DM81XX_GPIO1_BASE  0x4804C000
+
+#define DM81XX_USBSS_BASE  0x4740
+
+#define DM81XX_USB0_BASE   0x47401000
+#define DM81XX_USB1_BASE   0x47401800
+
+#define DM816X_TIMER0_BASE 0x4802E000
+#define DM816X_TIMER1_BASE 0x4804
+#define DM816X_TIMER2_BASE 0x48042000
+#define DM816X_TIMER3_BASE 0x48044000
+#define DM816X_TIMER4_BASE 0x48046000
+#define DM816X_TIMER5_BASE 0x48048000
+#define DM816X_TIMER6_BASE 0x4804A000
+
+#define DM816X_MMC0_BASE

[PATCH 1/5] ARM: OMAP: DM81xx: multiple renames for DM81xx platform

2013-06-05 Thread Aida Mynzhasova
This patch renames all DM81xx platform related structures, variables,
files, and functions. Previously names with ti81 prefixes were used,
which are inconsistent, because actual name of the platform is DM81xx.
Also, for the same reason DM816x EVM was renamed from board-ti8168evm
to board-dm816x-evm.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/Kconfig.debug|   12 +++---
 arch/arm/include/debug/omap2plus.S|   20 +-
 arch/arm/mach-omap2/Kconfig   |   16 
 arch/arm/mach-omap2/Makefile  |4 +-
 arch/arm/mach-omap2/board-dm816x-evm.c|   62 +
 arch/arm/mach-omap2/board-ti8168evm.c |   62 -
 arch/arm/mach-omap2/cclock3xxx_data.c |6 +--
 arch/arm/mach-omap2/clock.h   |4 +-
 arch/arm/mach-omap2/common.h  |8 ++--
 arch/arm/mach-omap2/control.h |8 ++--
 arch/arm/mach-omap2/dm81xx.h  |   36 +
 arch/arm/mach-omap2/id.c  |   20 +-
 arch/arm/mach-omap2/include/mach/serial.h |8 ++--
 arch/arm/mach-omap2/io.c  |   26 ++--
 arch/arm/mach-omap2/irq.c |4 +-
 arch/arm/mach-omap2/omap_phy_internal.c   |   18 -
 arch/arm/mach-omap2/soc.h |   54 -
 arch/arm/mach-omap2/ti81xx.h  |   36 -
 arch/arm/mach-omap2/usb-musb.c|4 +-
 arch/arm/mach-omap2/usb.h |   12 +++---
 arch/arm/tools/mach-types |4 +-
 drivers/pci/quirks.c  |6 +--
 drivers/usb/musb/musb_dsps.c  |   12 +++---
 drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c |2 +-
 include/linux/platform_data/davinci_asp.h |2 +-
 25 files changed, 223 insertions(+), 223 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-dm816x-evm.c
 delete mode 100644 arch/arm/mach-omap2/board-ti8168evm.c
 create mode 100644 arch/arm/mach-omap2/dm81xx.h
 delete mode 100644 arch/arm/mach-omap2/ti81xx.h

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 1d41908..55e18d6 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -571,14 +571,14 @@ choice
config DEBUG_OMAP4UART4
bool OMAP4/5 UART4
 
-   config DEBUG_TI81XXUART1
-   bool TI81XX UART1 (ti8148evm)
+   config DEBUG_DM81XXUART1
+   bool DM81XX UART1 (DM8148evm)
 
-   config DEBUG_TI81XXUART2
-   bool TI81XX UART2
+   config DEBUG_DM81XXUART2
+   bool DM81XX UART2
 
-   config DEBUG_TI81XXUART3
-   bool TI81XX UART3 (ti8168evm)
+   config DEBUG_DM81XXUART3
+   bool DM81XX UART3 (DM8168evm)
 
config DEBUG_AM33XXUART1
bool AM33XX UART1
diff --git a/arch/arm/include/debug/omap2plus.S 
b/arch/arm/include/debug/omap2plus.S
index 6d867ae..76d643b 100644
--- a/arch/arm/include/debug/omap2plus.S
+++ b/arch/arm/include/debug/omap2plus.S
@@ -30,10 +30,10 @@
 #define OMAP4_UART3_BASE   0x4802
 #define OMAP4_UART4_BASE   0x4806e000
 
-/* TI81XX serial ports */
-#define TI81XX_UART1_BASE  0x4802
-#define TI81XX_UART2_BASE  0x48022000
-#define TI81XX_UART3_BASE  0x48024000
+/* DM81XX serial ports */
+#define DM81XX_UART1_BASE  0x4802
+#define DM81XX_UART2_BASE  0x48022000
+#define DM81XX_UART3_BASE  0x48024000
 
 /* AM3505/3517 UART4 */
 #define AM35XX_UART4_BASE  0x4809E000  /* Only on AM3505/3517 */
@@ -111,16 +111,16 @@ omap_uart_lsr:.word   0
mov \rp, #UART_OFFSET(OMAP4_UART4_BASE)
b   98f
 #endif
-#ifdef CONFIG_DEBUG_TI81XXUART1
-   mov \rp, #UART_OFFSET(TI81XX_UART1_BASE)
+#ifdef CONFIG_DEBUG_DM81XXUART1
+   mov \rp, #UART_OFFSET(DM81XX_UART1_BASE)
b   98f
 #endif
-#ifdef CONFIG_DEBUG_TI81XXUART2
-   mov \rp, #UART_OFFSET(TI81XX_UART2_BASE)
+#ifdef CONFIG_DEBUG_DM81XXUART2
+   mov \rp, #UART_OFFSET(DM81XX_UART2_BASE)
b   98f
 #endif
-#ifdef CONFIG_DEBUG_TI81XXUART3
-   mov \rp, #UART_OFFSET(TI81XX_UART3_BASE)
+#ifdef CONFIG_DEBUG_DM81XXUART3
+   mov \rp, #UART_OFFSET(DM81XX_UART3_BASE)
b   98f
 #endif
 #ifdef CONFIG_DEBUG_AM33XXUART1
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index f49cd51..376600b 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -135,8 +135,8 @@ config SOC_OMAP3430
default y
select SOC_HAS_OMAP2_SDRC
 
-config SOC_TI81XX
-   bool TI81XX support
+config SOC_DM81XX
+   bool DM81xx support
depends on ARCH_OMAP3
default y
 
@@ -368,14 +368,14 @@ config MACH_OMAP_3630SDP
default y
select OMAP_PACKAGE_CBP
 
-config MACH_TI8168EVM

[PATCH 4/5] ARM: OMAP: DM816x: add clock domain support for DM816x

2013-06-05 Thread Aida Mynzhasova
This patch adds required definitions and structures for clockdomain
initialization:

1. register offsets for DM81xx and DM816x clock domain modules;
2. clock domain register bits;
3. additional OMAP2/3 common clock domains: prm_clkdm and cm_clkdm;
4. clockdomain structure definitions for DM816x.

Also, omap3xxx_clockdomains_init() was substituted by new
dm81xx_clockdomains_init().

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/clockdomain.h|3 +
 arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c |   10 +
 arch/arm/mach-omap2/clockdomains_dm81xx_data.c   |  213 ++
 arch/arm/mach-omap2/cm-regbits-dm81xx.h  |   22 +++
 arch/arm/mach-omap2/cm_dm81xx.h  |   61 +++
 arch/arm/mach-omap2/io.c |2 +-
 7 files changed, 312 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-omap2/clockdomains_dm81xx_data.c
 create mode 100644 arch/arm/mach-omap2/cm-regbits-dm81xx.h
 create mode 100644 arch/arm/mach-omap2/cm_dm81xx.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03121cc..132a1e2 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -158,6 +158,8 @@ obj-$(CONFIG_ARCH_OMAP4)+= $(clockdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)   += clockdomains44xx_data.o
 obj-$(CONFIG_SOC_AM33XX)   += $(clockdomain-common)
 obj-$(CONFIG_SOC_AM33XX)   += clockdomains_am33xx_data.o
+obj-$(CONFIG_SOC_DM81XX)   += $(clockdomain-common)
+obj-$(CONFIG_SOC_DM81XX)   += clockdomains_dm81xx_data.o
 obj-$(CONFIG_SOC_OMAP5)+= $(clockdomain-common)
 
 # Clock framework
diff --git a/arch/arm/mach-omap2/clockdomain.h 
b/arch/arm/mach-omap2/clockdomain.h
index 2da3765..0a9d4fc 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -215,6 +215,7 @@ extern void __init omap242x_clockdomains_init(void);
 extern void __init omap243x_clockdomains_init(void);
 extern void __init omap3xxx_clockdomains_init(void);
 extern void __init am33xx_clockdomains_init(void);
+extern void __init dm81xx_clockdomains_init(void);
 extern void __init omap44xx_clockdomains_init(void);
 
 extern void clkdm_add_autodeps(struct clockdomain *clkdm);
@@ -228,5 +229,7 @@ extern struct clkdm_ops am33xx_clkdm_operations;
 extern struct clkdm_dep gfx_24xx_wkdeps[];
 extern struct clkdm_dep dsp_24xx_wkdeps[];
 extern struct clockdomain wkup_common_clkdm;
+extern struct clockdomain cm_common_clkdm;
+extern struct clockdomain prm_common_clkdm;
 
 #endif
diff --git a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c 
b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
index 49722196..8a62c7f 100644
--- a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
+++ b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
@@ -90,3 +90,13 @@ struct clockdomain wkup_common_clkdm = {
.dep_bit= OMAP_EN_WKUP_SHIFT,
.flags  = CLKDM_ACTIVE_WITH_MPU,
 };
+
+struct clockdomain prm_common_clkdm = {
+   .name   = prm_clkdm,
+   .pwrdm  = { .name = wkup_pwrdm },
+};
+
+struct clockdomain cm_common_clkdm = {
+   .name   = cm_clkdm,
+   .pwrdm  = { .name = core_pwrdm },
+};
diff --git a/arch/arm/mach-omap2/clockdomains_dm81xx_data.c 
b/arch/arm/mach-omap2/clockdomains_dm81xx_data.c
new file mode 100644
index 000..daf390f
--- /dev/null
+++ b/arch/arm/mach-omap2/clockdomains_dm81xx_data.c
@@ -0,0 +1,213 @@
+/*
+ * DM81XX Clock Domain data.
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
+ * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
+ *
+ * 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 __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_DM81XX_H
+#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_DM81XX_H
+
+#include linux/kernel.h
+#include linux/io.h
+
+#include clockdomain.h
+
+#include cm_dm81xx.h
+#include cm-regbits-dm81xx.h
+
+/*
+ * TODO:
+ * - Add other domains as required
+ * - Fill up associated powerdomans (especially ALWON powerdomains are NULL at
+ *   the moment
+ * - Consider dependencies across domains (probably not applicable till now)
+ */
+
+/* Common DM81XX */
+static struct clockdomain alwon_l3_slow_dm81xx_clkdm = {
+   .name   = alwon_l3_slow_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= DM81XX_CM_ALWON_MOD,
+   .clkdm_offs = DM81XX_CM_ALWON_L3_SLOW_CLKDM

[PATCH 3/5] ARM: OMAP: DM816x: add powerdomains for DM816x

2013-06-05 Thread Aida Mynzhasova
This patch adds required structures for powerdomain initialization on
the DM816x. It is impossible to use OMAP3430 structures in order to
initialize powerdomains on DM816x, because there are big differences
between PRCM module base address offsets on these CPUs.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/Makefile |3 +
 arch/arm/mach-omap2/io.c |2 +-
 arch/arm/mach-omap2/powerdomain.h|4 +
 arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c |   43 
 arch/arm/mach-omap2/powerdomains3xxx_data.c  |   43 
 arch/arm/mach-omap2/powerdomains_dm81xx_data.c   |  115 ++
 arch/arm/mach-omap2/prm-regbits-dm81xx.h |   24 +
 arch/arm/mach-omap2/prm_dm81xx.c |   79 +++
 arch/arm/mach-omap2/prm_dm81xx.h |   44 +
 9 files changed, 313 insertions(+), 44 deletions(-)
 create mode 100644 arch/arm/mach-omap2/powerdomains_dm81xx_data.c
 create mode 100644 arch/arm/mach-omap2/prm-regbits-dm81xx.h
 create mode 100644 arch/arm/mach-omap2/prm_dm81xx.c
 create mode 100644 arch/arm/mach-omap2/prm_dm81xx.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 607a2bf..03121cc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -113,6 +113,7 @@ obj-$(CONFIG_SOC_AM33XX)+= prm_am33xx.o 
cm_am33xx.o
 omap-prcm-4-5-common   =  cminst44xx.o cm44xx.o prm44xx.o \
   prcm_mpu44xx.o prminst44xx.o \
   vc44xx_data.o vp44xx_data.o
+obj-$(CONFIG_SOC_DM81XX)   += prm_dm81xx.o
 obj-$(CONFIG_ARCH_OMAP4)   += $(omap-prcm-4-5-common)
 obj-$(CONFIG_SOC_OMAP5)+= $(omap-prcm-4-5-common)
 
@@ -140,6 +141,8 @@ obj-$(CONFIG_ARCH_OMAP4)+= $(powerdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)   += powerdomains44xx_data.o
 obj-$(CONFIG_SOC_AM33XX)   += $(powerdomain-common)
 obj-$(CONFIG_SOC_AM33XX)   += powerdomains_am33xx_data.o
+obj-$(CONFIG_SOC_DM81XX)   += $(powerdomain-common)
+obj-$(CONFIG_SOC_DM81XX)   += powerdomains_dm81xx_data.o
 obj-$(CONFIG_SOC_OMAP5)+= $(powerdomain-common)
 
 # PRCM clockdomain control
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3deba6e..2a9e5b3 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -516,7 +516,7 @@ void __init dm81xx_init_early(void)
omap3xxx_check_revision();
dm81xx_check_features();
omap3xxx_voltagedomains_init();
-   omap3xxx_powerdomains_init();
+   dm81xx_powerdomains_init();
omap3xxx_clockdomains_init();
omap3xxx_hwmod_init();
omap_hwmod_init_postsetup();
diff --git a/arch/arm/mach-omap2/powerdomain.h 
b/arch/arm/mach-omap2/powerdomain.h
index 140c360..6d78990 100644
--- a/arch/arm/mach-omap2/powerdomain.h
+++ b/arch/arm/mach-omap2/powerdomain.h
@@ -252,11 +252,13 @@ extern void omap242x_powerdomains_init(void);
 extern void omap243x_powerdomains_init(void);
 extern void omap3xxx_powerdomains_init(void);
 extern void am33xx_powerdomains_init(void);
+extern void dm81xx_powerdomains_init(void);
 extern void omap44xx_powerdomains_init(void);
 
 extern struct pwrdm_ops omap2_pwrdm_operations;
 extern struct pwrdm_ops omap3_pwrdm_operations;
 extern struct pwrdm_ops am33xx_pwrdm_operations;
+extern struct pwrdm_ops dm81xx_pwrdm_operations;
 extern struct pwrdm_ops omap4_pwrdm_operations;
 
 /* Common Internal functions used across OMAP rev's */
@@ -266,6 +268,8 @@ extern u32 omap2_pwrdm_get_mem_bank_stst_mask(u8 bank);
 
 extern struct powerdomain wkup_omap2_pwrdm;
 extern struct powerdomain gfx_omap2_pwrdm;
+extern struct powerdomain mpu_3xxx_pwrdm;
+extern struct powerdomain core_3xxx_pre_es3_1_pwrdm;
 
 extern void pwrdm_lock(struct powerdomain *pwrdm);
 extern void pwrdm_unlock(struct powerdomain *pwrdm);
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c 
b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
index 7b946f1..2c2b630 100644
--- a/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
@@ -63,3 +63,46 @@ struct powerdomain wkup_omap2_pwrdm = {
.pwrsts = PWRSTS_ON,
.voltdm = { .name = wakeup },
 };
+
+struct powerdomain mpu_3xxx_pwrdm = {
+   .name = mpu_pwrdm,
+   .prcm_offs= MPU_MOD,
+   .pwrsts   = PWRSTS_OFF_RET_ON,
+   .pwrsts_logic_ret = PWRSTS_OFF_RET,
+   .flags= PWRDM_HAS_MPU_QUIRK,
+   .banks= 1,
+   .pwrsts_mem_ret   = {
+   [0] = PWRSTS_OFF_RET,
+   },
+   .pwrsts_mem_on= {
+   [0] = PWRSTS_OFF_ON,
+   },
+   .voltdm   = { .name = mpu_iva

[PATCH 5/5] ARM: OMAP: DM816x: add hwmod support for DM81xx

2013-06-05 Thread Aida Mynzhasova
OCP interface data structures were added in order to achieve
successful initialization of hwmods on DM816x.

Required DM81xx family IRQ definitions, offsets of the PRCM clock
control registers and additional OMAP2PLUS DMA channel definitions
were added as they are needed during the hwmod registration.

omap3xxx_hwmod_init() call was substituted by dm81xx_hwmod_init().

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/Makefile  |1 +
 arch/arm/mach-omap2/cm_dm81xx.h   |   20 +
 arch/arm/mach-omap2/dm81xx.h  |   28 +-
 arch/arm/mach-omap2/dma.h |   12 +
 arch/arm/mach-omap2/io.c  |2 +-
 arch/arm/mach-omap2/omap_hwmod.h  |1 +
 arch/arm/mach-omap2/omap_hwmod_dm81xx_data.c  | 1209 +
 arch/arm/plat-omap/include/plat/dmtimer.h |6 +
 arch/arm/plat-omap/include/plat/irqs-dm81xx.h |   43 +
 9 files changed, 1320 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-omap2/omap_hwmod_dm81xx_data.c
 create mode 100644 arch/arm/plat-omap/include/plat/irqs-dm81xx.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 132a1e2..3b5cc8b 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -202,6 +202,7 @@ obj-$(CONFIG_ARCH_OMAP3)+= 
omap_hwmod_2xxx_3xxx_ipblock_data.o
 obj-$(CONFIG_ARCH_OMAP3)   += 
omap_hwmod_2xxx_3xxx_interconnect_data.o
 obj-$(CONFIG_ARCH_OMAP3)   += omap_hwmod_3xxx_data.o
 obj-$(CONFIG_SOC_AM33XX)   += omap_hwmod_am33xx_data.o
+obj-$(CONFIG_SOC_DM81XX)   += omap_hwmod_dm81xx_data.o
 obj-$(CONFIG_ARCH_OMAP4)   += omap_hwmod_44xx_data.o
 
 # EMU peripherals
diff --git a/arch/arm/mach-omap2/cm_dm81xx.h b/arch/arm/mach-omap2/cm_dm81xx.h
index f8988da..d8268cd 100644
--- a/arch/arm/mach-omap2/cm_dm81xx.h
+++ b/arch/arm/mach-omap2/cm_dm81xx.h
@@ -58,4 +58,24 @@
 #define DM816X_CM_DEFAULT_PCI_CLKDM0x0010
 #define DM816X_CM_DEFAULT_L3_SLOW_CLKDM0x0014
 
+#define DM81XX_CM_ALWON_UART_0_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x0150)
+#define DM81XX_CM_ALWON_UART_1_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x0154)
+#define DM81XX_CM_ALWON_UART_2_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x0158)
+#define DM81XX_CM_ALWON_GPIO_0_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x015C)
+#define DM81XX_CM_ALWON_GPIO_1_CLKCTRL_OFF (DM81XX_CM_ALWON_MOD + 0x0160)
+#define DM81XX_CM_ALWON_WDTIMER_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x018C)
+#define DM81XX_CM_ALWON_SPI_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 
0x0190)
+#define DM816X_CM_ALWON_I2C_0_CLKCTRL_OFF  (DM81XX_CM_ALWON_MOD + 0x0164)
+#define DM816X_CM_ALWON_I2C_1_CLKCTRL_OFF  (DM81XX_CM_ALWON_MOD + 0x0168)
+#define DM816X_CM_DEFAULT_USB_CLKCTRL_OFF  (DM816X_CM_DEFAULT_MOD + 0x0058)
+#define DM816X_CM_ALWON_TIMER_0_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x016C)
+#define DM816X_CM_ALWON_TIMER_1_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0170)
+#define DM816X_CM_ALWON_TIMER_2_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0174)
+#define DM816X_CM_ALWON_TIMER_3_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0178)
+#define DM816X_CM_ALWON_TIMER_4_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x017C)
+#define DM816X_CM_ALWON_TIMER_5_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0180)
+#define DM816X_CM_ALWON_TIMER_6_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0184)
+#define DM816X_CM_ALWON_TIMER_7_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 0x0188)
+#define DM816X_CM_ALWON_SDIO_CLKCTRL_OFF   (DM81XX_CM_ALWON_MOD + 0x15B0)
+#define DM81XX_CM_ALWON_SPI_CLKCTRL_OFF(DM81XX_CM_ALWON_MOD + 
0x0190)
 #endif
diff --git a/arch/arm/mach-omap2/dm81xx.h b/arch/arm/mach-omap2/dm81xx.h
index a0b18a6..e92a2d2 100644
--- a/arch/arm/mach-omap2/dm81xx.h
+++ b/arch/arm/mach-omap2/dm81xx.h
@@ -30,7 +30,33 @@
 #define DM81XX_TAP_BASE(DM81XX_CTRL_BASE + \
 DM81XX_CONTROL_DEVICE_ID - 0x204)
 
+#define DM81XX_MAILBOX_BASE0x480C8000
 
-#define DM81XX_ARM_INTC_BASE   0x4820
+#define DM816X_WDTIMER1_BASE   0x480C2000
+
+#define DM816X_I2C0_BASE   0x48028000
+#define DM816X_I2C1_BASE   0x4802A000
+
+#define DM81XX_ELM_BASE0x4808
+
+#define DM81XX_GPIO0_BASE  0x48032000
+#define DM81XX_GPIO1_BASE  0x4804C000
+
+#define DM81XX_USBSS_BASE  0x4740
+
+#define DM81XX_USB0_BASE   0x47401000
+#define DM81XX_USB1_BASE   0x47401800
+
+#define DM816X_TIMER0_BASE 0x4802E000
+#define DM816X_TIMER1_BASE 0x4804
+#define DM816X_TIMER2_BASE 0x48042000
+#define DM816X_TIMER3_BASE 0x48044000
+#define DM816X_TIMER4_BASE 0x48046000
+#define DM816X_TIMER5_BASE 0x48048000
+#define DM816X_TIMER6_BASE 0x4804A000
+
+#define DM816X_MMC0_BASE

[PATCH 0/5] Broken DM816x support in Linux 3.10-rc4

2013-06-05 Thread Aida Mynzhasova
Not so long ago I tried to boot Linux 3.10-rc4 kernel on DM816x EVM
board. Unfortunately, my attempts were failed by reason of poor
support of DM81xx-based devices in new kernels.

Actually, on Linux 3.10-rc4 kernel early initialization of board
is failed when it tries to initialize power domains:

[0.00] Unhandled fault: external abort on non-linefetch (0x1028) 
at 0xfa17f8e4
[0.00] Internal error: : 1028 [#1] SMP ARM
[0.00] Modules linked in:
[0.00] CPU: 0 PID: 0 Comm: swapper Not tainted 
3.10.0-rc3-1-g0e5443c-dirty #12
[0.00] task: c076fc50 ti: c0764000 task.ti: c0764000
[0.00] PC is at omap2_pwrdm_wait_transition+0x1c/0xac
[0.00] LR is at pwrdm_register_pwrdms+0x15c/0x1ac
[0.00] pc : [c0031698]lr : [c0036010]psr: 6193
[0.00] sp : c0765f28  ip : c07bebe0  fp : 0001
[0.00] r10: c07e6a90  r9 :   r8 : c07e6944
[0.00] r7 : c0754a50  r6 : c064f264  r5 : c0775298  r4 : c0773e9c
[0.00] r3 : f8e4  r2 : fa17f8e4  r1 : 0004  r0 : c0775298
[0.00] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM 
Segment kernel
[0.00] Control: 10c5387d  Table: 80004019  DAC: 0017
[0.00] Process swapper (pid: 0, stack limit = 0xc0764240)
[0.00] Stack: (0xc0765f28 to 0xc0766000)
[0.00] 5f20:   c0773e9c c0775298 c064f264 
c0754a50 c0773ee4 c0036010
[0.00] 5f40: 35170034 81600134 c05125a8 fa18 8200 
c0771348 c07b1b48 c07475ac
[0.00] 5f60: c0771348 c07191fc c0647c40 c0711598 16c0 
c0d24fb4 c06450ac c070c148
[0.00] 5f80: c0765f98 c0765f90 c0771134 c0765fdc  
  
[0.00] 5fa0: c0643878 0001  c0748774 c0771134 
c076c880 413fc082 
[0.00] 5fc0:  c07086fc    
  c0748778
[0.00] 5fe0: 10c53c7d c076c910 c0748774 c0771134 80004059 
80008074  
[0.00] [c0031698] (omap2_pwrdm_wait_transition+0x1c/0xac) from 
[c0036010] (pwrdm_register_pwrdms+0x15c/0x1ac)
[0.00] [c0036010] (pwrdm_register_pwrdms+0x15c/0x1ac) from 
[c07191fc] (omap3xxx_powerdomains_init+0x50/0x144)
[0.00] [c07191fc] (omap3xxx_powerdomains_init+0x50/0x144) from 
[c0711598] (ti81xx_init_early+0xcc/0x178)
[0.00] [c0711598] (ti81xx_init_early+0xcc/0x178) from 
[c070c148] (setup_arch+0x5ac/0x800)
[0.00] [c070c148] (setup_arch+0x5ac/0x800) from [c07086fc] 
(start_kernel+0x7c/0x330)
[0.00] [c07086fc] (start_kernel+0x7c/0x330) from [80008074] 
(0x80008074)
[0.00] Code: e1d030f8 e5982000 e28330e4 e0822003 (e5921000)
[0.00] ---[ end trace 1b75b31a2719ed1c ]---

So, I suggest you this patch series, which fixes that kernel crush and
adds new functions/structures, required for early initialization on
DM816x (power and clock domains, hwmods). After applying these patches
the kernel is able to successfully continue booting till clock
initialization (will be added later).

Thanks,

Aida

Aida Mynzhasova (5):
  ARM: OMAP: DM81xx: multiple renames for DM81xx platform
  ARM: OMAP: AM33xx: multiple renames for early initialization
  ARM: OMAP: DM816x: add powerdomains for DM816x
  ARM: OMAP: DM816x: add clock domain support for DM816x
  ARM: OMAP: DM816x: add hwmod support for DM81xx

 arch/arm/Kconfig.debug   |   12 +-
 arch/arm/include/debug/omap2plus.S   |   20 +-
 arch/arm/mach-omap2/Kconfig  |   16 +-
 arch/arm/mach-omap2/Makefile |   22 +-
 arch/arm/mach-omap2/am33xx-restart.c |4 +-
 arch/arm/mach-omap2/board-dm816x-evm.c   |   62 +
 arch/arm/mach-omap2/board-ti8168evm.c|   62 -
 arch/arm/mach-omap2/cclock33xx_data.c|  990 --
 arch/arm/mach-omap2/cclock3xxx_data.c|6 +-
 arch/arm/mach-omap2/cclock_am33xx_data.c |  990 ++
 arch/arm/mach-omap2/clock.h  |4 +-
 arch/arm/mach-omap2/clockdomain.h|3 +
 arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c |   10 +
 arch/arm/mach-omap2/clockdomains33xx_data.c  |  196 --
 arch/arm/mach-omap2/clockdomains_am33xx_data.c   |  196 ++
 arch/arm/mach-omap2/clockdomains_dm81xx_data.c   |  213 ++
 arch/arm/mach-omap2/cm-regbits-33xx.h|  817 -
 arch/arm/mach-omap2/cm-regbits-am33xx.h  |  817 +
 arch/arm/mach-omap2/cm-regbits-dm81xx.h  |   22 +
 arch/arm/mach-omap2/cm33xx.c |  364 ---
 arch/arm/mach-omap2/cm33xx.h |  417 ---
 arch/arm/mach-omap2/cm_am33xx.c  |  364 +++
 arch/arm/mach-omap2/cm_am33xx.h  |  417 +++
 arch/arm/mach-omap2/cm_dm81xx.h  |   81 +
 arch/arm/mach-omap2/common.h |8 +-
 arch/arm/mach-omap2/control.h|8 +-
 arch/arm/mach-omap2/dm81xx.h

[PATCH 3/5] ARM: OMAP: DM816x: add powerdomains for DM816x

2013-06-05 Thread Aida Mynzhasova
This patch adds required structures for powerdomain initialization on
the DM816x. It is impossible to use OMAP3430 structures in order to
initialize powerdomains on DM816x, because there are big differences
between PRCM module base address offsets on these CPUs.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/Makefile |3 +
 arch/arm/mach-omap2/io.c |2 +-
 arch/arm/mach-omap2/powerdomain.h|4 +
 arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c |   43 
 arch/arm/mach-omap2/powerdomains3xxx_data.c  |   43 
 arch/arm/mach-omap2/powerdomains_dm81xx_data.c   |  115 ++
 arch/arm/mach-omap2/prm-regbits-dm81xx.h |   24 +
 arch/arm/mach-omap2/prm_dm81xx.c |   79 +++
 arch/arm/mach-omap2/prm_dm81xx.h |   44 +
 9 files changed, 313 insertions(+), 44 deletions(-)
 create mode 100644 arch/arm/mach-omap2/powerdomains_dm81xx_data.c
 create mode 100644 arch/arm/mach-omap2/prm-regbits-dm81xx.h
 create mode 100644 arch/arm/mach-omap2/prm_dm81xx.c
 create mode 100644 arch/arm/mach-omap2/prm_dm81xx.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 607a2bf..03121cc 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -113,6 +113,7 @@ obj-$(CONFIG_SOC_AM33XX)+= prm_am33xx.o 
cm_am33xx.o
 omap-prcm-4-5-common   =  cminst44xx.o cm44xx.o prm44xx.o \
   prcm_mpu44xx.o prminst44xx.o \
   vc44xx_data.o vp44xx_data.o
+obj-$(CONFIG_SOC_DM81XX)   += prm_dm81xx.o
 obj-$(CONFIG_ARCH_OMAP4)   += $(omap-prcm-4-5-common)
 obj-$(CONFIG_SOC_OMAP5)+= $(omap-prcm-4-5-common)
 
@@ -140,6 +141,8 @@ obj-$(CONFIG_ARCH_OMAP4)+= $(powerdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)   += powerdomains44xx_data.o
 obj-$(CONFIG_SOC_AM33XX)   += $(powerdomain-common)
 obj-$(CONFIG_SOC_AM33XX)   += powerdomains_am33xx_data.o
+obj-$(CONFIG_SOC_DM81XX)   += $(powerdomain-common)
+obj-$(CONFIG_SOC_DM81XX)   += powerdomains_dm81xx_data.o
 obj-$(CONFIG_SOC_OMAP5)+= $(powerdomain-common)
 
 # PRCM clockdomain control
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3deba6e..2a9e5b3 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -516,7 +516,7 @@ void __init dm81xx_init_early(void)
omap3xxx_check_revision();
dm81xx_check_features();
omap3xxx_voltagedomains_init();
-   omap3xxx_powerdomains_init();
+   dm81xx_powerdomains_init();
omap3xxx_clockdomains_init();
omap3xxx_hwmod_init();
omap_hwmod_init_postsetup();
diff --git a/arch/arm/mach-omap2/powerdomain.h 
b/arch/arm/mach-omap2/powerdomain.h
index 140c360..6d78990 100644
--- a/arch/arm/mach-omap2/powerdomain.h
+++ b/arch/arm/mach-omap2/powerdomain.h
@@ -252,11 +252,13 @@ extern void omap242x_powerdomains_init(void);
 extern void omap243x_powerdomains_init(void);
 extern void omap3xxx_powerdomains_init(void);
 extern void am33xx_powerdomains_init(void);
+extern void dm81xx_powerdomains_init(void);
 extern void omap44xx_powerdomains_init(void);
 
 extern struct pwrdm_ops omap2_pwrdm_operations;
 extern struct pwrdm_ops omap3_pwrdm_operations;
 extern struct pwrdm_ops am33xx_pwrdm_operations;
+extern struct pwrdm_ops dm81xx_pwrdm_operations;
 extern struct pwrdm_ops omap4_pwrdm_operations;
 
 /* Common Internal functions used across OMAP rev's */
@@ -266,6 +268,8 @@ extern u32 omap2_pwrdm_get_mem_bank_stst_mask(u8 bank);
 
 extern struct powerdomain wkup_omap2_pwrdm;
 extern struct powerdomain gfx_omap2_pwrdm;
+extern struct powerdomain mpu_3xxx_pwrdm;
+extern struct powerdomain core_3xxx_pre_es3_1_pwrdm;
 
 extern void pwrdm_lock(struct powerdomain *pwrdm);
 extern void pwrdm_unlock(struct powerdomain *pwrdm);
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c 
b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
index 7b946f1..2c2b630 100644
--- a/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
@@ -63,3 +63,46 @@ struct powerdomain wkup_omap2_pwrdm = {
.pwrsts = PWRSTS_ON,
.voltdm = { .name = wakeup },
 };
+
+struct powerdomain mpu_3xxx_pwrdm = {
+   .name = mpu_pwrdm,
+   .prcm_offs= MPU_MOD,
+   .pwrsts   = PWRSTS_OFF_RET_ON,
+   .pwrsts_logic_ret = PWRSTS_OFF_RET,
+   .flags= PWRDM_HAS_MPU_QUIRK,
+   .banks= 1,
+   .pwrsts_mem_ret   = {
+   [0] = PWRSTS_OFF_RET,
+   },
+   .pwrsts_mem_on= {
+   [0] = PWRSTS_OFF_ON,
+   },
+   .voltdm   = { .name = mpu_iva

[PATCH 4/5] ARM: OMAP: DM816x: add clock domain support for DM816x

2013-06-05 Thread Aida Mynzhasova
This patch adds required definitions and structures for clockdomain
initialization:

1. register offsets for DM81xx and DM816x clock domain modules;
2. clock domain register bits;
3. additional OMAP2/3 common clock domains: prm_clkdm and cm_clkdm;
4. clockdomain structure definitions for DM816x.

Also, omap3xxx_clockdomains_init() was substituted by new
dm81xx_clockdomains_init().

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/clockdomain.h|3 +
 arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c |   10 +
 arch/arm/mach-omap2/clockdomains_dm81xx_data.c   |  213 ++
 arch/arm/mach-omap2/cm-regbits-dm81xx.h  |   22 +++
 arch/arm/mach-omap2/cm_dm81xx.h  |   61 +++
 arch/arm/mach-omap2/io.c |2 +-
 7 files changed, 312 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-omap2/clockdomains_dm81xx_data.c
 create mode 100644 arch/arm/mach-omap2/cm-regbits-dm81xx.h
 create mode 100644 arch/arm/mach-omap2/cm_dm81xx.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 03121cc..132a1e2 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -158,6 +158,8 @@ obj-$(CONFIG_ARCH_OMAP4)+= $(clockdomain-common)
 obj-$(CONFIG_ARCH_OMAP4)   += clockdomains44xx_data.o
 obj-$(CONFIG_SOC_AM33XX)   += $(clockdomain-common)
 obj-$(CONFIG_SOC_AM33XX)   += clockdomains_am33xx_data.o
+obj-$(CONFIG_SOC_DM81XX)   += $(clockdomain-common)
+obj-$(CONFIG_SOC_DM81XX)   += clockdomains_dm81xx_data.o
 obj-$(CONFIG_SOC_OMAP5)+= $(clockdomain-common)
 
 # Clock framework
diff --git a/arch/arm/mach-omap2/clockdomain.h 
b/arch/arm/mach-omap2/clockdomain.h
index 2da3765..0a9d4fc 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -215,6 +215,7 @@ extern void __init omap242x_clockdomains_init(void);
 extern void __init omap243x_clockdomains_init(void);
 extern void __init omap3xxx_clockdomains_init(void);
 extern void __init am33xx_clockdomains_init(void);
+extern void __init dm81xx_clockdomains_init(void);
 extern void __init omap44xx_clockdomains_init(void);
 
 extern void clkdm_add_autodeps(struct clockdomain *clkdm);
@@ -228,5 +229,7 @@ extern struct clkdm_ops am33xx_clkdm_operations;
 extern struct clkdm_dep gfx_24xx_wkdeps[];
 extern struct clkdm_dep dsp_24xx_wkdeps[];
 extern struct clockdomain wkup_common_clkdm;
+extern struct clockdomain cm_common_clkdm;
+extern struct clockdomain prm_common_clkdm;
 
 #endif
diff --git a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c 
b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
index 49722196..8a62c7f 100644
--- a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
+++ b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
@@ -90,3 +90,13 @@ struct clockdomain wkup_common_clkdm = {
.dep_bit= OMAP_EN_WKUP_SHIFT,
.flags  = CLKDM_ACTIVE_WITH_MPU,
 };
+
+struct clockdomain prm_common_clkdm = {
+   .name   = prm_clkdm,
+   .pwrdm  = { .name = wkup_pwrdm },
+};
+
+struct clockdomain cm_common_clkdm = {
+   .name   = cm_clkdm,
+   .pwrdm  = { .name = core_pwrdm },
+};
diff --git a/arch/arm/mach-omap2/clockdomains_dm81xx_data.c 
b/arch/arm/mach-omap2/clockdomains_dm81xx_data.c
new file mode 100644
index 000..daf390f
--- /dev/null
+++ b/arch/arm/mach-omap2/clockdomains_dm81xx_data.c
@@ -0,0 +1,213 @@
+/*
+ * DM81XX Clock Domain data.
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
+ * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
+ *
+ * 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 __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_DM81XX_H
+#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAINS_DM81XX_H
+
+#include linux/kernel.h
+#include linux/io.h
+
+#include clockdomain.h
+
+#include cm_dm81xx.h
+#include cm-regbits-dm81xx.h
+
+/*
+ * TODO:
+ * - Add other domains as required
+ * - Fill up associated powerdomans (especially ALWON powerdomains are NULL at
+ *   the moment
+ * - Consider dependencies across domains (probably not applicable till now)
+ */
+
+/* Common DM81XX */
+static struct clockdomain alwon_l3_slow_dm81xx_clkdm = {
+   .name   = alwon_l3_slow_clkdm,
+   .pwrdm  = { .name = alwon_pwrdm },
+   .cm_inst= DM81XX_CM_ALWON_MOD,
+   .clkdm_offs = DM81XX_CM_ALWON_L3_SLOW_CLKDM

[PATCH 1/5] ARM: OMAP: DM81xx: multiple renames for DM81xx platform

2013-06-05 Thread Aida Mynzhasova
This patch renames all DM81xx platform related structures, variables,
files, and functions. Previously names with ti81 prefixes were used,
which are inconsistent, because actual name of the platform is DM81xx.
Also, for the same reason DM816x EVM was renamed from board-ti8168evm
to board-dm816x-evm.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/Kconfig.debug|   12 +++---
 arch/arm/include/debug/omap2plus.S|   20 +-
 arch/arm/mach-omap2/Kconfig   |   16 
 arch/arm/mach-omap2/Makefile  |4 +-
 arch/arm/mach-omap2/board-dm816x-evm.c|   62 +
 arch/arm/mach-omap2/board-ti8168evm.c |   62 -
 arch/arm/mach-omap2/cclock3xxx_data.c |6 +--
 arch/arm/mach-omap2/clock.h   |4 +-
 arch/arm/mach-omap2/common.h  |8 ++--
 arch/arm/mach-omap2/control.h |8 ++--
 arch/arm/mach-omap2/dm81xx.h  |   36 +
 arch/arm/mach-omap2/id.c  |   20 +-
 arch/arm/mach-omap2/include/mach/serial.h |8 ++--
 arch/arm/mach-omap2/io.c  |   26 ++--
 arch/arm/mach-omap2/irq.c |4 +-
 arch/arm/mach-omap2/omap_phy_internal.c   |   18 -
 arch/arm/mach-omap2/soc.h |   54 -
 arch/arm/mach-omap2/ti81xx.h  |   36 -
 arch/arm/mach-omap2/usb-musb.c|4 +-
 arch/arm/mach-omap2/usb.h |   12 +++---
 arch/arm/tools/mach-types |4 +-
 drivers/pci/quirks.c  |6 +--
 drivers/usb/musb/musb_dsps.c  |   12 +++---
 drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c |2 +-
 include/linux/platform_data/davinci_asp.h |2 +-
 25 files changed, 223 insertions(+), 223 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-dm816x-evm.c
 delete mode 100644 arch/arm/mach-omap2/board-ti8168evm.c
 create mode 100644 arch/arm/mach-omap2/dm81xx.h
 delete mode 100644 arch/arm/mach-omap2/ti81xx.h

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 1d41908..55e18d6 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -571,14 +571,14 @@ choice
config DEBUG_OMAP4UART4
bool OMAP4/5 UART4
 
-   config DEBUG_TI81XXUART1
-   bool TI81XX UART1 (ti8148evm)
+   config DEBUG_DM81XXUART1
+   bool DM81XX UART1 (DM8148evm)
 
-   config DEBUG_TI81XXUART2
-   bool TI81XX UART2
+   config DEBUG_DM81XXUART2
+   bool DM81XX UART2
 
-   config DEBUG_TI81XXUART3
-   bool TI81XX UART3 (ti8168evm)
+   config DEBUG_DM81XXUART3
+   bool DM81XX UART3 (DM8168evm)
 
config DEBUG_AM33XXUART1
bool AM33XX UART1
diff --git a/arch/arm/include/debug/omap2plus.S 
b/arch/arm/include/debug/omap2plus.S
index 6d867ae..76d643b 100644
--- a/arch/arm/include/debug/omap2plus.S
+++ b/arch/arm/include/debug/omap2plus.S
@@ -30,10 +30,10 @@
 #define OMAP4_UART3_BASE   0x4802
 #define OMAP4_UART4_BASE   0x4806e000
 
-/* TI81XX serial ports */
-#define TI81XX_UART1_BASE  0x4802
-#define TI81XX_UART2_BASE  0x48022000
-#define TI81XX_UART3_BASE  0x48024000
+/* DM81XX serial ports */
+#define DM81XX_UART1_BASE  0x4802
+#define DM81XX_UART2_BASE  0x48022000
+#define DM81XX_UART3_BASE  0x48024000
 
 /* AM3505/3517 UART4 */
 #define AM35XX_UART4_BASE  0x4809E000  /* Only on AM3505/3517 */
@@ -111,16 +111,16 @@ omap_uart_lsr:.word   0
mov \rp, #UART_OFFSET(OMAP4_UART4_BASE)
b   98f
 #endif
-#ifdef CONFIG_DEBUG_TI81XXUART1
-   mov \rp, #UART_OFFSET(TI81XX_UART1_BASE)
+#ifdef CONFIG_DEBUG_DM81XXUART1
+   mov \rp, #UART_OFFSET(DM81XX_UART1_BASE)
b   98f
 #endif
-#ifdef CONFIG_DEBUG_TI81XXUART2
-   mov \rp, #UART_OFFSET(TI81XX_UART2_BASE)
+#ifdef CONFIG_DEBUG_DM81XXUART2
+   mov \rp, #UART_OFFSET(DM81XX_UART2_BASE)
b   98f
 #endif
-#ifdef CONFIG_DEBUG_TI81XXUART3
-   mov \rp, #UART_OFFSET(TI81XX_UART3_BASE)
+#ifdef CONFIG_DEBUG_DM81XXUART3
+   mov \rp, #UART_OFFSET(DM81XX_UART3_BASE)
b   98f
 #endif
 #ifdef CONFIG_DEBUG_AM33XXUART1
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index f49cd51..376600b 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -135,8 +135,8 @@ config SOC_OMAP3430
default y
select SOC_HAS_OMAP2_SDRC
 
-config SOC_TI81XX
-   bool TI81XX support
+config SOC_DM81XX
+   bool DM81xx support
depends on ARCH_OMAP3
default y
 
@@ -368,14 +368,14 @@ config MACH_OMAP_3630SDP
default y
select OMAP_PACKAGE_CBP
 
-config MACH_TI8168EVM

[PATCH] ARM: OMAP2: TI81XX: id: Add cpu id for TI816x ES2.0 and ES2.1

2013-05-30 Thread Aida Mynzhasova
Currently omap3xxx_check_revision() detects ES1.0 and ES1.1 only,
this patch extends it by adding ES2.0 and ES2.1 versions support.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/id.c  |   11 +--
 arch/arm/mach-omap2/soc.h |2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 1272c41..8b762a3 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -405,11 +405,18 @@ void __init omap3xxx_check_revision(void)
cpu_rev = 1.0;
break;
case 1:
-   /* FALLTHROUGH */
-   default:
omap_revision = TI8168_REV_ES1_1;
cpu_rev = 1.1;
break;
+   case 2:
+   omap_revision = TI8168_REV_ES2_0;
+   cpu_rev = 2.0;
+   break;
+   case 3:
+   /* FALLTHROUGH */
+   default:
+   omap_revision = TI8168_REV_ES2_1;
+   cpu_rev = 2.1;
}
break;
case 0xb944:
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 197cc16..8e00226 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -383,6 +383,8 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define TI816X_CLASS   0x81600034
 #define TI8168_REV_ES1_0   TI816X_CLASS
 #define TI8168_REV_ES1_1   (TI816X_CLASS | (0x1  8))
+#define TI8168_REV_ES2_0   (TI816X_CLASS | (0x2  8))
+#define TI8168_REV_ES2_1   (TI816X_CLASS | (0x3  8))
 
 #define TI814X_CLASS   0x81400034
 #define TI8148_REV_ES1_0   TI814X_CLASS
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: TI816X: add powerdomains for TI816x

2013-05-30 Thread Aida Mynzhasova
This patch adds required structures for powerdomain initialization on
the ti816x. It is impossible to use omap3430 structures in order to
initialize powerdomains on ti816x, because there are big differences
between PRCM module base address offsets on these CPUs.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/powerdomains3xxx_data.c |   62 +++
 arch/arm/mach-omap2/prcm-common.h   |   11 +
 2 files changed, 73 insertions(+)

diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c 
b/arch/arm/mach-omap2/powerdomains3xxx_data.c
index f0e14e9..e2d4bd8 100644
--- a/arch/arm/mach-omap2/powerdomains3xxx_data.c
+++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c
@@ -336,6 +336,54 @@ static struct powerdomain dpll5_pwrdm = {
.voltdm   = { .name = core },
 };
 
+static struct powerdomain device_81xx_pwrdm = {
+   .name = device_pwrdm,
+   .prcm_offs= TI81XX_PRM_DEVICE_MOD,
+   .voltdm   = { .name = core },
+};
+
+static struct powerdomain active_816x_pwrdm = {
+   .name = active_pwrdm,
+   .prcm_offs= TI816X_PRM_ACTIVE_MOD,
+   .pwrsts   = PWRSTS_OFF_ON,
+   .voltdm   = { .name = core },
+};
+
+static struct powerdomain default_816x_pwrdm = {
+   .name = default_pwrdm,
+   .prcm_offs= TI81XX_PRM_DEFAULT_MOD,
+   .pwrsts   = PWRSTS_OFF_ON,
+   .voltdm   = { .name = core },
+};
+
+static struct powerdomain ivahd0_816x_pwrdm = {
+   .name = ivahd0_pwrdm,
+   .prcm_offs= TI816X_PRM_IVAHD0_MOD,
+   .pwrsts   = PWRSTS_OFF_ON,
+   .voltdm   = { .name = mpu_iva },
+};
+
+static struct powerdomain ivahd1_816x_pwrdm = {
+   .name = ivahd1_pwrdm,
+   .prcm_offs= TI816X_PRM_IVAHD1_MOD,
+   .pwrsts   = PWRSTS_OFF_ON,
+   .voltdm   = { .name = mpu_iva },
+};
+
+static struct powerdomain ivahd2_816x_pwrdm = {
+   .name = ivahd2_pwrdm,
+   .prcm_offs= TI816X_PRM_IVAHD2_MOD,
+   .pwrsts   = PWRSTS_OFF_ON,
+   .voltdm   = { .name = mpu_iva },
+};
+
+static struct powerdomain sgx_816x_pwrdm = {
+   .name = sgx_pwrdm,
+   .prcm_offs= TI816X_PRM_SGX_MOD,
+   .pwrsts   = PWRSTS_OFF_ON,
+   .voltdm   = { .name = core },
+};
+
 /* As powerdomains are added or removed above, this list must also be changed 
*/
 static struct powerdomain *powerdomains_omap3430_common[] __initdata = {
wkup_omap2_pwrdm,
@@ -393,6 +441,17 @@ static struct powerdomain *powerdomains_am35x[] __initdata 
= {
NULL
 };
 
+static struct powerdomain *powerdomains_ti81xx[] __initdata = {
+   device_81xx_pwrdm,
+   active_816x_pwrdm,
+   default_816x_pwrdm,
+   ivahd0_816x_pwrdm,
+   ivahd1_816x_pwrdm,
+   ivahd2_816x_pwrdm,
+   sgx_816x_pwrdm,
+   NULL
+};
+
 void __init omap3xxx_powerdomains_init(void)
 {
unsigned int rev;
@@ -406,6 +465,9 @@ void __init omap3xxx_powerdomains_init(void)
 
if (rev == AM35XX_REV_ES1_0 || rev == AM35XX_REV_ES1_1) {
pwrdm_register_pwrdms(powerdomains_am35x);
+   } else if (rev == TI8168_REV_ES1_0 || rev == TI8168_REV_ES1_1
+   || rev == TI8168_REV_ES2_0 || rev == TI8168_REV_ES2_1) {
+   pwrdm_register_pwrdms(powerdomains_ti81xx);
} else {
pwrdm_register_pwrdms(powerdomains_omap3430_common);
 
diff --git a/arch/arm/mach-omap2/prcm-common.h 
b/arch/arm/mach-omap2/prcm-common.h
index c7d355f..ff1ac4a 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -48,6 +48,17 @@
 #define OMAP3430_NEON_MOD  0xb00
 #define OMAP3430ES2_USBHOST_MOD0xc00
 
+/*
+ * TI81XX PRM module offsets
+ */
+#define TI81XX_PRM_DEVICE_MOD  0x
+#define TI816X_PRM_ACTIVE_MOD  0x0a00
+#define TI81XX_PRM_DEFAULT_MOD 0x0b00
+#define TI816X_PRM_IVAHD0_MOD  0x0c00
+#define TI816X_PRM_IVAHD1_MOD  0x0d00
+#define TI816X_PRM_IVAHD2_MOD  0x0e00
+#define TI816X_PRM_SGX_MOD 0x0f00
+
 /* 24XX register bits shared between CM  PRM registers */
 
 /* CM_FCLKEN1_CORE, CM_ICLKEN1_CORE, PM_WKEN1_CORE shared bits */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP: fix IVA2 module base address

2013-05-29 Thread Aida Mynzhasova

On 28.05.2013 18:30, Kevin Hilman wrote:

Aida Mynzhasova aida.mynzhas...@skitlab.ru writes:


This patch corrects the base address of IVA2 module on omap3430.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru


I know it looks a bit weird to have a negative offset like this, but
it's actually correct.  These offsets are used relative to
prm_base (on 34xx, it's OMAP3430_PRM_BASE defined in omap34xx.h).
So I suggest you double check the values there, and cross reference to
the PRCM Register Manual section of the TRM (last section of the PRCM
chapter.)

Thanks,

Kevin



Ok, thanks for making it clear.

I thought that it can be a bug, because I made an attempt to run
Linux 3.10-rc3 kernel on Texas Instrument's DM816x evaluation module.
Without making any changes I faced with the kernel crush:

[0.00] Unhandled fault: external abort on non-linefetch (0x1028) 
at 0xfa17f8e4

[0.00] Internal error: : 1028 [#1] SMP ARM
[0.00] Modules linked in:
[0.00] CPU: 0 PID: 0 Comm: swapper Not tainted 
3.10.0-rc3-1-g0e5443c-dirty #12

[0.00] task: c076fc50 ti: c0764000 task.ti: c0764000
[0.00] PC is at omap2_pwrdm_wait_transition+0x1c/0xac
[0.00] LR is at pwrdm_register_pwrdms+0x15c/0x1ac
[0.00] pc : [c0031698]lr : [c0036010]psr: 6193
[0.00] sp : c0765f28  ip : c07bebe0  fp : 0001
[0.00] r10: c07e6a90  r9 :   r8 : c07e6944
[0.00] r7 : c0754a50  r6 : c064f264  r5 : c0775298  r4 : c0773e9c
[0.00] r3 : f8e4  r2 : fa17f8e4  r1 : 0004  r0 : c0775298
[0.00] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM 
Segment kernel

[0.00] Control: 10c5387d  Table: 80004019  DAC: 0017
[0.00] Process swapper (pid: 0, stack limit = 0xc0764240)
[0.00] Stack: (0xc0765f28 to 0xc0766000)
[0.00] 5f20:   c0773e9c c0775298 c064f264 
c0754a50 c0773ee4 c0036010
[0.00] 5f40: 35170034 81600134 c05125a8 fa18 8200 
c0771348 c07b1b48 c07475ac
[0.00] 5f60: c0771348 c07191fc c0647c40 c0711598 16c0 
c0d24fb4 c06450ac c070c148
[0.00] 5f80: c0765f98 c0765f90 c0771134 c0765fdc  
  
[0.00] 5fa0: c0643878 0001  c0748774 c0771134 
c076c880 413fc082 
[0.00] 5fc0:  c07086fc    
  c0748778
[0.00] 5fe0: 10c53c7d c076c910 c0748774 c0771134 80004059 
80008074  
[0.00] [c0031698] (omap2_pwrdm_wait_transition+0x1c/0xac) from 
[c0036010] (pwrdm_register_pwrdms+0x15c/0x1ac)
[0.00] [c0036010] (pwrdm_register_pwrdms+0x15c/0x1ac) from 
[c07191fc] (omap3xxx_powerdomains_init+0x50/0x144)
[0.00] [c07191fc] (omap3xxx_powerdomains_init+0x50/0x144) from 
[c0711598] (ti81xx_init_early+0xcc/0x178)
[0.00] [c0711598] (ti81xx_init_early+0xcc/0x178) from 
[c070c148] (setup_arch+0x5ac/0x800)
[0.00] [c070c148] (setup_arch+0x5ac/0x800) from [c07086fc] 
(start_kernel+0x7c/0x330)
[0.00] [c07086fc] (start_kernel+0x7c/0x330) from [80008074] 
(0x80008074)

[0.00] Code: e1d030f8 e5982000 e28330e4 e0822003 (e5921000)
[0.00] ---[ end trace 1b75b31a2719ed1c ]---

So, I tried to find out what's wrong and explored the code of 
omap3xxx_powerdomains_init() call. It turned out that powerdomain 
initialization for ti81xx platform uses *powerdomains_omap3430_common[] 
structures, and when it tries to init iva2_pwrdm kernel crush occures. 
After applying my code changes the situation becomes a little bit 
better, and the kernel is able to continue it's loading (but still 
unable to load completely).


Anyway, maybe it can be a good idea to add new powerdomain structures 
for supporting ti81xx platform in mainline kernel. Actually I have 
already done some code changes for making current kernel bootable on 
DM816x EVM and I'm going to continue my work.


Thanks,

Aida

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: fix IVA2 module base address

2013-05-28 Thread Aida Mynzhasova
This patch corrects the base address of IVA2 module on omap3430.

Signed-off-by: Aida Mynzhasova aida.mynzhas...@skitlab.ru
---
 arch/arm/mach-omap2/prcm-common.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/prcm-common.h 
b/arch/arm/mach-omap2/prcm-common.h
index c7d355f..d5ec044 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -37,7 +37,7 @@
 #define OMAP2430_MDM_MOD   0xc00
 
 /* IVA2 module is  base on 3430 */
-#define OMAP3430_IVA2_MOD  -0x800
+#define OMAP3430_IVA2_MOD  0x800
 #define OMAP3430ES2_SGX_MODGFX_MOD
 #define OMAP3430_CCR_MOD   PLL_MOD
 #define OMAP3430_DSS_MOD   0x600
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html