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@xxxxxxxxxxx> > 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@xxxxxxxxxxx> > > --- > > 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@xxxxxxxxx> 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@xxxxxxxxx> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> 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:
signature.asc
Description: Digital signature