diff mbox

N900: fix operation on emulator

Message ID 20130701140315.GA15318@amd.pavel.ucw.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Machek July 1, 2013, 2:03 p.m. UTC
Errata workarounds for N900 hardware actually break operation on
emulator. Fix it.

This approach was suggested by Pali Rohár <pali.rohar@gmail.com>
(thanks!).

(Also explain what "sleep_ind" led actually does).

Signed-off-by: Pavel Machek <pavel@ucw.cz>

Comments

Sergei Shtylyov July 1, 2013, 6:22 p.m. UTC | #1
Hello.

On 07/01/2013 06:03 PM, Pavel Machek wrote:

> Errata workarounds for N900 hardware actually break operation on
> emulator. Fix it.

> This approach was suggested by Pali Rohár <pali.rohar@gmail.com>
> (thanks!).

> (Also explain what "sleep_ind" led actually does).

    Looks like unrelated change and probably worth another patch?

> Signed-off-by: Pavel Machek <pavel@ucw.cz>

> diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
> index 74f83a5..81f7b9f 100644
> --- a/arch/arm/mach-omap2/board-rx51.c
> +++ b/arch/arm/mach-omap2/board-rx51.c
> @@ -33,9 +33,12 @@
>   #include "pm.h"
>   #include "sdram-nokia.h"
>   #include "board-rx51-secure.h"
> +#include "soc.h"
>
>   #define RX51_GPIO_SLEEP_IND 162
>
> +/* This lights up left part of keyboard */
> +
>   static struct gpio_led gpio_leds[] = {
>   	{
>   		.name	= "sleep_ind",
> @@ -107,9 +110,11 @@ static void __init rx51_init(void)
>   	rx51_camera_init();
>
>   #ifdef CONFIG_ARM_ERRATA_430973
> -	printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n");
> -	/* set IBE to 1 */
> -	rx51_secure_update_aux_cr(1 << 6, 0);
> +	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
> +		printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n");

    How about pr_info() instead?

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Machek July 1, 2013, 7:51 p.m. UTC | #2
On Mon 2013-07-01 22:22:21, Sergei Shtylyov wrote:
> Hello.
> 
> On 07/01/2013 06:03 PM, Pavel Machek wrote:
> 
> >Errata workarounds for N900 hardware actually break operation on
> >emulator. Fix it.
> 
> >This approach was suggested by Pali Rohár <pali.rohar@gmail.com>
> >(thanks!).
> 
> >(Also explain what "sleep_ind" led actually does).
> 
>    Looks like unrelated change and probably worth another patch?

Separate patch for adding single-line comment?

> >--- a/arch/arm/mach-omap2/board-rx51.c
> >+++ b/arch/arm/mach-omap2/board-rx51.c
> >@@ -33,9 +33,12 @@
> >  #include "pm.h"
> >  #include "sdram-nokia.h"
> >  #include "board-rx51-secure.h"
> >+#include "soc.h"
> >
> >  #define RX51_GPIO_SLEEP_IND 162
> >
> >+/* This lights up left part of keyboard */
> >+
> >  static struct gpio_led gpio_leds[] = {
...
> >  #ifdef CONFIG_ARM_ERRATA_430973
> >-	printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n");
> >-	/* set IBE to 1 */
> >-	rx51_secure_update_aux_cr(1 << 6, 0);
> >+	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
> >+		printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n");
> 
>    How about pr_info() instead?

<sarcasm>Would not that be unrelated change and worth of separate
patch?</sarcasm>

:-).

									Pavel
Sergei Shtylyov July 1, 2013, 8 p.m. UTC | #3
Hello.

On 07/01/2013 11:51 PM, Pavel Machek wrote:

>>> Errata workarounds for N900 hardware actually break operation on
>>> emulator. Fix it.

>>> This approach was suggested by Pali Rohár <pali.rohar@gmail.com>
>>> (thanks!).

>>> (Also explain what "sleep_ind" led actually does).

>>     Looks like unrelated change and probably worth another patch?

> Separate patch for adding single-line comment?

    If it's unrelated to the main patch purpose, yes. As the Russians 
say: "cutlets separately and flies separately".

>>> --- a/arch/arm/mach-omap2/board-rx51.c
>>> +++ b/arch/arm/mach-omap2/board-rx51.c
>>> @@ -33,9 +33,12 @@
>>>   #include "pm.h"
>>>   #include "sdram-nokia.h"
>>>   #include "board-rx51-secure.h"
>>> +#include "soc.h"
>>>
>>>   #define RX51_GPIO_SLEEP_IND 162
>>>
>>> +/* This lights up left part of keyboard */
>>> +
>>>   static struct gpio_led gpio_leds[] = {
> ...
>>>   #ifdef CONFIG_ARM_ERRATA_430973
>>> -	printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n");
>>> -	/* set IBE to 1 */
>>> -	rx51_secure_update_aux_cr(1 << 6, 0);
>>> +	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
>>> +		printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n");

>>     How about pr_info() instead?

> <sarcasm>Would not that be unrelated change and worth of separate
> patch?</sarcasm>

    No, this would be a related change. Sarcasm wasted.

> :-).

> 									Pavel

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Machek July 1, 2013, 8:53 p.m. UTC | #4
Hi!

> >Errata workarounds for N900 hardware actually break operation on
> >emulator. Fix it.
> 
> >This approach was suggested by Pali Rohár <pali.rohar@gmail.com>
> >(thanks!).
> 
> >(Also explain what "sleep_ind" led actually does).
> 
>    Looks like unrelated change and probably worth another patch?

Ok, more serious issue is that code this was modifying is not yet in
mainline. Sorry.
								Pavel
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 74f83a5..81f7b9f 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -33,9 +33,12 @@ 
 #include "pm.h"
 #include "sdram-nokia.h"
 #include "board-rx51-secure.h"
+#include "soc.h"
 
 #define RX51_GPIO_SLEEP_IND 162
 
+/* This lights up left part of keyboard */
+
 static struct gpio_led gpio_leds[] = {
 	{
 		.name	= "sleep_ind",
@@ -107,9 +110,11 @@  static void __init rx51_init(void)
 	rx51_camera_init();
 
 #ifdef CONFIG_ARM_ERRATA_430973
-	printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n");
-	/* set IBE to 1 */
-	rx51_secure_update_aux_cr(1 << 6, 0);
+	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
+		printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n");
+		/* set IBE to 1 */
+		rx51_secure_update_aux_cr(1 << 6, 0);
+	}
 #endif
 
 	/* Ensure SDRC pins are mux'd for self-refresh */