* [PATCH] cbus: Fix lines for Nokia 770
@ 2012-02-22 22:09 Tony Lindgren
2012-02-23 8:46 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2012-02-22 22:09 UTC (permalink / raw)
To: linux-omap; +Cc: Felipe Balbi
>From 54c4785b8d274f8d282b4243945ae0b17edf4686 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
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.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
I applied this into cbus branch as it seems to fix retu
watchdog for Nokia 770.
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -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 = {
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] cbus: Fix lines for Nokia 770 2012-02-22 22:09 [PATCH] cbus: Fix lines for Nokia 770 Tony Lindgren @ 2012-02-23 8:46 ` Felipe Balbi 2012-03-02 0:02 ` Tony Lindgren 0 siblings, 1 reply; 4+ messages in thread From: Felipe Balbi @ 2012-02-23 8:46 UTC (permalink / raw) To: Tony Lindgren; +Cc: linux-omap, Felipe Balbi [-- Attachment #1: Type: text/plain, Size: 3590 bytes --] Hi, On Wed, Feb 22, 2012 at 02:09:37PM -0800, Tony Lindgren wrote: > From 54c4785b8d274f8d282b4243945ae0b17edf4686 Mon Sep 17 00:00:00 2001 > From: Tony Lindgren <tony@atomide.com> > 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. > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > --- > > I applied this into cbus branch as it seems to fix retu > watchdog for Nokia 770. > > --- a/arch/arm/mach-omap1/board-nokia770.c > +++ b/arch/arm/mach-omap1/board-nokia770.c > @@ -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 = { 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 <felipe.balbi@nokia.com> 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. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com> diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 6423671..ce23990 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c [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] diff --git a/drivers/cbus/cbus.c b/drivers/cbus/cbus.c index a35941e..00c3c32 100644 --- a/drivers/cbus/cbus.c +++ b/drivers/cbus/cbus.c [ 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; -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cbus: Fix lines for Nokia 770 2012-02-23 8:46 ` Felipe Balbi @ 2012-03-02 0:02 ` Tony Lindgren 2012-03-02 9:22 ` Felipe Balbi 0 siblings, 1 reply; 4+ messages in thread From: Tony Lindgren @ 2012-03-02 0:02 UTC (permalink / raw) To: Felipe Balbi; +Cc: linux-omap * Felipe Balbi <balbi@ti.com> [120223 00:15]: > Hi, > > On Wed, Feb 22, 2012 at 02:09:37PM -0800, Tony Lindgren wrote: > > From 54c4785b8d274f8d282b4243945ae0b17edf4686 Mon Sep 17 00:00:00 2001 > > From: Tony Lindgren <tony@atomide.com> > > 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. > > > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > > > --- > > > > I applied this into cbus branch as it seems to fix retu > > watchdog for Nokia 770. > > > > --- a/arch/arm/mach-omap1/board-nokia770.c > > +++ b/arch/arm/mach-omap1/board-nokia770.c > > @@ -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 = { > > Has this been wrong since the beginning ? Looking at commit d64193bd, I > just moved whatever was on cbus.c to 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cbus: Fix lines for Nokia 770 2012-03-02 0:02 ` Tony Lindgren @ 2012-03-02 9:22 ` Felipe Balbi 0 siblings, 0 replies; 4+ messages in thread From: Felipe Balbi @ 2012-03-02 9:22 UTC (permalink / raw) To: Tony Lindgren; +Cc: Felipe Balbi, linux-omap [-- Attachment #1: Type: text/plain, Size: 1723 bytes --] On Thu, Mar 01, 2012 at 04:02:19PM -0800, Tony Lindgren wrote: > * Felipe Balbi <balbi@ti.com> [120223 00:15]: > > Hi, > > > > On Wed, Feb 22, 2012 at 02:09:37PM -0800, Tony Lindgren wrote: > > > From 54c4785b8d274f8d282b4243945ae0b17edf4686 Mon Sep 17 00:00:00 2001 > > > From: Tony Lindgren <tony@atomide.com> > > > 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. > > > > > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > > > > > --- > > > > > > I applied this into cbus branch as it seems to fix retu > > > watchdog for Nokia 770. > > > > > > --- a/arch/arm/mach-omap1/board-nokia770.c > > > +++ b/arch/arm/mach-omap1/board-nokia770.c > > > @@ -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 = { > > > > Has this been wrong since the beginning ? Looking at commit d64193bd, I > > just moved whatever was on cbus.c to 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 :) I see... oh well, shit happens :-) Good catch btw :-) -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-02 9:22 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-02-22 22:09 [PATCH] cbus: Fix lines for Nokia 770 Tony Lindgren 2012-02-23 8:46 ` Felipe Balbi 2012-03-02 0:02 ` Tony Lindgren 2012-03-02 9:22 ` Felipe Balbi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).