cbus: Fix lines for Nokia 770
Subsystems (3)
PATCH 1/1 cbus: Fix lines for Nokia 770
Quoted 1 line
From
54c4785b8d274f8d282b4243945ae0b17edf4686Mon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
Date: Wed, 22 Feb 2012 13:03:07 -0800
Subject: [PATCH] cbus: Fix lines for Nokia 770
This makes retu and tahvo work again on Nokia 770 so it stays running.
---
I applied this into cbus branch as it seems to fix retu watchdog for Nokia 770.
arch/arm/mach-omap1/board-nokia770.c +2 -2
@@ -87,9 +87,9 @@ static struct platform_device nokia770_kp_device = {#if defined(CONFIG_CBUS ) || defined(CONFIG_CBUS_MODULE )static struct cbus_host_platform_data nokia770_cbus_data = { - .clk_gpio =OMAP_MPUIO (11 ), + .clk_gpio =OMAP_MPUIO (9 ), .dat_gpio =OMAP_MPUIO (10 ), - .sel_gpio =OMAP_MPUIO (9 ), + .sel_gpio =OMAP_MPUIO (11 ), }; static struct platform_device nokia770_cbus_device = {
Hi,
Quoted 19 lines · Tony Lindgren
From
54c4785b8d274f8d282b4243945ae0b17edf4686Mon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
Date: Wed, 22 Feb 2012 13:03:07 -0800
Subject: [PATCH] cbus: Fix lines for Nokia 770This makes retu and tahvo work again on Nokia 770 so it stays running.
Signed-off-by Tony Lindgren <[email protected]>---
I applied this into cbus branch as it seems to fix retu watchdog for Nokia 770.
arch/arm/mach-omap1/board-nokia770.c +0
-0@@ -87,9 +87,9 @@ static struct platform_device nokia770_kp_device = {#if defined(CONFIG_CBUS ) || defined(CONFIG_CBUS_MODULE )
arch/arm/mach-omap1/board-nokia770.c static struct platform_device nokia770_kp_device = { · line 95
Quoted 10 lines
arch/arm/mach-omap1/board-nokia770.c +2
-2static struct cbus_host_platform_data nokia770_cbus_data = { - .clk_gpio =OMAP_MPUIO (11 ), + .clk_gpio =OMAP_MPUIO (9 ), .dat_gpio =OMAP_MPUIO (10 ), - .sel_gpio =OMAP_MPUIO (9 ), + .sel_gpio =OMAP_MPUIO (11 ), };static struct platform_device nokia770_cbus_device = {
Has this been wrong since the beginning ? Looking at commit d64193bd, I just moved whatever was on cbus.c to respective board-files.
Look at these snippets:
commit d64193bd89bad6a1dab55a62940808789d68ecc2
Author: Felipe Balbi <[email protected]> Date: Tue Aug 3 12:09:59 2010 +0300
cbus: add platform_data to pass gpios
also add the platform_data to the related
board files.
arch/arm/mach-omap1/board-nokia770.c +0 -0
[snip]
@@ -95,9 +96,18 @@ static struct platform_device nokia770_kp_device = {
.resource = nokia770_kp_resources,
};
+static struct cbus_host_platform_data nokia770_cbus_data = {
+ .clk_gpio = OMAP_MPUIO(11),
+ .dat_gpio = OMAP_MPUIO(10),
+ .sel_gpio = OMAP_MPUIO(9),
+};
+
static struct platform_device nokia770_cbus_device = {
.name = "cbus",
.id = -1,
+ .dev = {
+ .platform_data = &nokia770_cbus_data,
+ },
};
static struct platform_device *nokia770_devices[] __initdata = {
[snip]
drivers/cbus/cbus.c +0 -0
[ snip]
@@ -234,31 +236,9 @@ static int __init cbus_bus_probe(struct platform_device *pdev)
spin_lock_init(&chost->lock);
- /* REVISIT: Pass these from board-*.c files in platform_data */
- if (machine_is_nokia770()) {
- chost->clk_gpio = OMAP_MPUIO(11);
- chost->dat_gpio = OMAP_MPUIO(10);
- chost->sel_gpio = OMAP_MPUIO(9);
- } else if (machine_is_nokia_n800() || machine_is_nokia_n810() ||
- machine_is_nokia_n810_wimax()) {
- chost->clk_gpio = 66;
- chost->dat_gpio = 65;
- chost->sel_gpio = 64;
- } else {
- printk(KERN_ERR "cbus: Unsupported board\n");
- ret = -ENODEV;
- goto exit1;
- }
-
-#ifdef CONFIG_ARCH_OMAP1
- if (!OMAP_GPIO_IS_MPUIO(chost->clk_gpio) || - !OMAP_GPIO_IS_MPUIO(chost->dat_gpio) ||
- !OMAP_GPIO_IS_MPUIO(chost->sel_gpio)) {
- printk(KERN_ERR "cbus: Only MPUIO pins supported\n");
- ret = -ENODEV;
- goto exit1;
- }
-#endif
+ chost->clk_gpio = pdata->clk_gpio;
+ chost->dat_gpio = pdata->dat_gpio;
+ chost->sel_gpio = pdata->sel_gpio;
if ((ret = gpio_request(chost->clk_gpio, "CBUS clk")) < 0)
goto exit1;
Signature · 1 line
balbi
Tony Lindgren
reviewerQuoted 31 lines · Felipe Balbi
Hi,
Quoted 28 lines · Tony Lindgren
From
54c4785b8d274f8d282b4243945ae0b17edf4686Mon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
Date: Wed, 22 Feb 2012 13:03:07 -0800
Subject: [PATCH] cbus: Fix lines for Nokia 770This makes retu and tahvo work again on Nokia 770 so it stays running.
Signed-off-by Tony Lindgren <[email protected]>---
I applied this into cbus branch as it seems to fix retu watchdog for Nokia 770.
arch/arm/mach-omap1/board-nokia770.c +2
-2@@ -87,9 +87,9 @@ static struct platform_device nokia770_kp_device = {#if defined(CONFIG_CBUS ) || defined(CONFIG_CBUS_MODULE )static struct cbus_host_platform_data nokia770_cbus_data = { - .clk_gpio =OMAP_MPUIO (11 ), + .clk_gpio =OMAP_MPUIO (9 ), .dat_gpio =OMAP_MPUIO (10 ), - .sel_gpio =OMAP_MPUIO (9 ), + .sel_gpio =OMAP_MPUIO (11 ), };
Quoted 4 lines
arch/arm/mach-omap1/board-nokia770.c static struct platform_device nokia770_kp_device = { · line 95
Quoted 1 line
arch/arm/mach-omap1/board-nokia770.c +0
-0static struct platform_device nokia770_cbus_device = {Has this been wrong since the beginning ? Looking at commit
d64193bd, I just moved whatever was oncbus.cto respective board-files.
Yes I think I dumped them from custom ATAGs quite a while ago, but probably got them wrong way around at some point and have been wondering ever since how come cbus does not seem to work on 770 :)
Regards,
Tony
Quoted 37 lines · Tony Lindgren
Quoted 31 lines · Felipe Balbi
Hi,
Quoted 28 lines · Tony Lindgren
From
54c4785b8d274f8d282b4243945ae0b17edf4686Mon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
Date: Wed, 22 Feb 2012 13:03:07 -0800
Subject: [PATCH] cbus: Fix lines for Nokia 770This makes retu and tahvo work again on Nokia 770 so it stays running.
Signed-off-by Tony Lindgren <[email protected]>---
I applied this into cbus branch as it seems to fix retu watchdog for Nokia 770.
arch/arm/mach-omap1/board-nokia770.c +2
-2@@ -87,9 +87,9 @@ static struct platform_device nokia770_kp_device = {#if defined(CONFIG_CBUS ) || defined(CONFIG_CBUS_MODULE )static struct cbus_host_platform_data nokia770_cbus_data = { - .clk_gpio =OMAP_MPUIO (11 ), + .clk_gpio =OMAP_MPUIO (9 ), .dat_gpio =OMAP_MPUIO (10 ), - .sel_gpio =OMAP_MPUIO (9 ), + .sel_gpio =OMAP_MPUIO (11 ), };Quoted 4 lines
arch/arm/mach-omap1/board-nokia770.c static struct platform_device nokia770_kp_device = { · line 95
Quoted 1 line
arch/arm/mach-omap1/board-nokia770.c +0
-0static struct platform_device nokia770_cbus_device = {Has this been wrong since the beginning ? Looking at commit
d64193bd, I just moved whatever was oncbus.cto respective board-files.
Quoted 4 lines
Yes I think I dumped them from custom ATAGs quite a while ago, but probably got them wrong way around at some point and have been wondering ever since how come cbus does not seem to work on 770 :)
I see... oh well, shit happens :-) Good catch btw :-)
Signature · 1 line
balbi