linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] omap: fix section mismatch errors
@ 2010-08-16 15:31 Sanjeev Premi
  2010-09-23 16:36 ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Sanjeev Premi @ 2010-08-16 15:31 UTC (permalink / raw)
  To: linux-omap; +Cc: Sanjeev Premi

This patch fixes miltiple section mismatch errors
observed with the latest master.

Signed-off-by: Sanjeev Premi <premi@ti.com>
---
 arch/arm/mach-omap2/board-2430sdp.c          |    2 +-
 arch/arm/mach-omap2/board-apollon.c          |    2 +-
 arch/arm/mach-omap2/board-cm-t35.c           |    8 ++++----
 arch/arm/mach-omap2/board-h4.c               |    2 +-
 arch/arm/mach-omap2/board-zoom-peripherals.c |   18 +++++++++---------
 arch/arm/plat-omap/cpu-omap.c                |    2 +-
 drivers/mfd/twl-core.c                       |    2 +-
 7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 8538e41..bca0236 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -134,7 +134,7 @@ static inline void board_smc91x_init(void)
 
 #endif
 
-static struct omap_board_config_kernel sdp2430_config[] = {
+static struct omap_board_config_kernel sdp2430_config[] __initdata = {
 	{OMAP_TAG_LCD, &sdp2430_lcd_config},
 };
 
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index c6421a7..1401108 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -270,7 +270,7 @@ static struct omap_lcd_config apollon_lcd_config __initdata = {
 	.ctrl_name	= "internal",
 };
 
-static struct omap_board_config_kernel apollon_config[] = {
+static struct omap_board_config_kernel apollon_config[] __initdata = {
 	{ OMAP_TAG_LCD,		&apollon_lcd_config },
 };
 
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index e10bc10..fc04062 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -606,7 +606,7 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
 	.reset_gpio_port[2]  = -EINVAL
 };
 
-static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
+static int __init cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
 				 unsigned ngpio)
 {
 	int wlan_rst = gpio + 2;
@@ -640,14 +640,14 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
 	return 0;
 }
 
-static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
+static struct twl4030_gpio_platform_data cm_t35_gpio_data __initdata = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 	.irq_base	= TWL4030_GPIO_IRQ_BASE,
 	.irq_end	= TWL4030_GPIO_IRQ_END,
 	.setup          = cm_t35_twl_gpio_setup,
 };
 
-static struct twl4030_platform_data cm_t35_twldata = {
+static struct twl4030_platform_data cm_t35_twldata __initdata = {
 	.irq_base	= TWL4030_IRQ_BASE,
 	.irq_end	= TWL4030_IRQ_END,
 
@@ -661,7 +661,7 @@ static struct twl4030_platform_data cm_t35_twldata = {
 	.vpll2		= &cm_t35_vpll2,
 };
 
-static struct i2c_board_info __initdata cm_t35_i2c_boardinfo[] = {
+static struct i2c_board_info __initdata cm_t35_i2c_boardinfo[] __initdata = {
 	{
 		I2C_BOARD_INFO("tps65930", 0x48),
 		.flags		= I2C_CLIENT_WAKE,
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index e09bd68..7b6f9c1 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -283,7 +283,7 @@ static struct omap_usb_config h4_usb_config __initdata = {
 	.hmc_mode	= 0x00,		/* 0:dev|otg 1:disable 2:disable */
 };
 
-static struct omap_board_config_kernel h4_config[] = {
+static struct omap_board_config_kernel h4_config[] __initdata = {
 	{ OMAP_TAG_LCD,		&h4_lcd_config },
 };
 
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 6b39849..d0f8057 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -171,7 +171,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
 	{}      /* Terminator */
 };
 
-static int zoom_twl_gpio_setup(struct device *dev,
+static int __init zoom_twl_gpio_setup(struct device *dev,
 		unsigned gpio, unsigned ngpio)
 {
 	/* gpio + 0 is "mmc0_cd" (input/IRQ) */
@@ -209,27 +209,27 @@ static struct twl4030_usb_data zoom_usb_data = {
 	.usb_mode	= T2_USB_MODE_ULPI,
 };
 
-static struct twl4030_gpio_platform_data zoom_gpio_data = {
+static struct twl4030_gpio_platform_data zoom_gpio_data __initdata = {
 	.gpio_base	= OMAP_MAX_GPIO_LINES,
 	.irq_base	= TWL4030_GPIO_IRQ_BASE,
 	.irq_end	= TWL4030_GPIO_IRQ_END,
 	.setup		= zoom_twl_gpio_setup,
 };
 
-static struct twl4030_madc_platform_data zoom_madc_data = {
+static struct twl4030_madc_platform_data zoom_madc_data __initdata = {
 	.irq_line	= 1,
 };
 
-static struct twl4030_codec_audio_data zoom_audio_data = {
+static struct twl4030_codec_audio_data zoom_audio_data __initdata = {
 	.audio_mclk = 26000000,
 };
 
-static struct twl4030_codec_data zoom_codec_data = {
+static struct twl4030_codec_data zoom_codec_data __initdata = {
 	.audio_mclk = 26000000,
 	.audio = &zoom_audio_data,
 };
 
-static struct twl4030_platform_data zoom_twldata = {
+static struct twl4030_platform_data zoom_twldata __initdata = {
 	.irq_base	= TWL4030_IRQ_BASE,
 	.irq_end	= TWL4030_IRQ_END,
 
@@ -246,7 +246,7 @@ static struct twl4030_platform_data zoom_twldata = {
 
 };
 
-static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = {
+static struct i2c_board_info __initdata zoom_i2c_boardinfo[] __initdata = {
 	{
 		I2C_BOARD_INFO("twl5030", 0x48),
 		.flags		= I2C_CLIENT_WAKE,
@@ -264,13 +264,13 @@ static int __init omap_i2c_init(void)
 	return 0;
 }
 
-static struct omap_musb_board_data musb_board_data = {
+static struct omap_musb_board_data musb_board_data __initdata = {
 	.interface_type		= MUSB_INTERFACE_ULPI,
 	.mode			= MUSB_OTG,
 	.power			= 100,
 };
 
-static void enable_board_wakeup_source(void)
+static void __init enable_board_wakeup_source(void)
 {
 	/* T2 interrupt line (keypad) */
 	omap_mux_init_signal("sys_nirq",
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
index 6d3d333..e47a299 100644
--- a/arch/arm/plat-omap/cpu-omap.c
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -144,7 +144,7 @@ static struct freq_attr *omap_cpufreq_attr[] = {
 	NULL,
 };
 
-static struct cpufreq_driver omap_driver = {
+static struct cpufreq_driver omap_driver __refdata = {
 	.flags		= CPUFREQ_STICKY,
 	.verify		= omap_verify_speed,
 	.target		= omap_target,
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 720e099..36f4c48 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1061,7 +1061,7 @@ static const struct i2c_device_id twl_ids[] = {
 MODULE_DEVICE_TABLE(i2c, twl_ids);
 
 /* One Client Driver , 4 Clients */
-static struct i2c_driver twl_driver = {
+static struct i2c_driver twl_driver __refdata = {
 	.driver.name	= DRIVER_NAME,
 	.id_table	= twl_ids,
 	.probe		= twl_probe,
-- 
1.6.6.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] omap: fix section mismatch errors
  2010-08-16 15:31 [PATCH 1/1] omap: fix section mismatch errors Sanjeev Premi
@ 2010-09-23 16:36 ` Tony Lindgren
  2010-09-24  8:40   ` Tomi Valkeinen
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2010-09-23 16:36 UTC (permalink / raw)
  To: Sanjeev Premi; +Cc: linux-omap, Tomi Valkeinen

* Sanjeev Premi <premi@ti.com> [100816 08:24]:
> This patch fixes miltiple section mismatch errors
> observed with the latest master.

Few comments below.
 
> @@ -134,7 +134,7 @@ static inline void board_smc91x_init(void)
>  
>  #endif
>  
> -static struct omap_board_config_kernel sdp2430_config[] = {
> +static struct omap_board_config_kernel sdp2430_config[] __initdata = {
>  	{OMAP_TAG_LCD, &sdp2430_lcd_config},
>  };
...
  
Let's just get rid of omap_get_config stuff. The OMAP_TAG_LCD
and OMAP_TAG_FBMEM are the last remaining legacy tags. They should
be replaced with just platform_data. And while at it, it should
be done for all the boards.

Tomi, do you see any problems with that?

> --- a/arch/arm/mach-omap2/board-zoom-peripherals.c
> +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
> @@ -171,7 +171,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
>  	{}      /* Terminator */
>  };
>  
> -static int zoom_twl_gpio_setup(struct device *dev,
> +static int __init zoom_twl_gpio_setup(struct device *dev,
>  		unsigned gpio, unsigned ngpio)
>  {
>  	/* gpio + 0 is "mmc0_cd" (input/IRQ) */

This should be safe to do for all the board, pdata->setup is only
called during the probe.

> @@ -209,27 +209,27 @@ static struct twl4030_usb_data zoom_usb_data = {
>  	.usb_mode	= T2_USB_MODE_ULPI,
>  };
>  
> -static struct twl4030_gpio_platform_data zoom_gpio_data = {
> +static struct twl4030_gpio_platform_data zoom_gpio_data __initdata = {
>  	.gpio_base	= OMAP_MAX_GPIO_LINES,
>  	.irq_base	= TWL4030_GPIO_IRQ_BASE,
>  	.irq_end	= TWL4030_GPIO_IRQ_END,
>  	.setup		= zoom_twl_gpio_setup,
>  };

But this is not safe to do as twl4030-gpio.c uses pdata in
gpio_twl4030_remove.

It's best to split the initdata changes so you make one change for
all the boards per patch, that way it's possible to check if it's
OK to do that change from the driver point of view.

Regards,

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] omap: fix section mismatch errors
  2010-09-23 16:36 ` Tony Lindgren
@ 2010-09-24  8:40   ` Tomi Valkeinen
  2010-09-24 14:10     ` Premi, Sanjeev
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Valkeinen @ 2010-09-24  8:40 UTC (permalink / raw)
  To: ext Tony Lindgren; +Cc: Sanjeev Premi, linux-omap@vger.kernel.org

On Thu, 2010-09-23 at 18:36 +0200, ext Tony Lindgren wrote:
> * Sanjeev Premi <premi@ti.com> [100816 08:24]:
> > This patch fixes miltiple section mismatch errors
> > observed with the latest master.
> 
> Few comments below.
>  
> > @@ -134,7 +134,7 @@ static inline void board_smc91x_init(void)
> >  
> >  #endif
> >  
> > -static struct omap_board_config_kernel sdp2430_config[] = {
> > +static struct omap_board_config_kernel sdp2430_config[] __initdata = {
> >  	{OMAP_TAG_LCD, &sdp2430_lcd_config},
> >  };
> ...
>   
> Let's just get rid of omap_get_config stuff. The OMAP_TAG_LCD
> and OMAP_TAG_FBMEM are the last remaining legacy tags. They should
> be replaced with just platform_data. And while at it, it should
> be done for all the boards.
> 
> Tomi, do you see any problems with that?

OMAP_TAG_LCD and OMAP_TAG_FBMEM are used by the old omapfb driver.

I don't see any problem in changing them to platform data, except that
it's some work and somebody should do it =).

 Tomi



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH 1/1] omap: fix section mismatch errors
  2010-09-24  8:40   ` Tomi Valkeinen
@ 2010-09-24 14:10     ` Premi, Sanjeev
  2010-09-24 17:41       ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Premi, Sanjeev @ 2010-09-24 14:10 UTC (permalink / raw)
  To: Tomi Valkeinen, ext Tony Lindgren; +Cc: linux-omap@vger.kernel.org

> -----Original Message-----
> From: Tomi Valkeinen [mailto:tomi.valkeinen@nokia.com] 
> Sent: Friday, September 24, 2010 2:10 PM
> To: ext Tony Lindgren
> Cc: Premi, Sanjeev; linux-omap@vger.kernel.org
> Subject: Re: [PATCH 1/1] omap: fix section mismatch errors
> 
> On Thu, 2010-09-23 at 18:36 +0200, ext Tony Lindgren wrote:
> > * Sanjeev Premi <premi@ti.com> [100816 08:24]:
> > > This patch fixes miltiple section mismatch errors
> > > observed with the latest master.
> > 
> > Few comments below.
> >  
> > > @@ -134,7 +134,7 @@ static inline void board_smc91x_init(void)
> > >  
> > >  #endif
> > >  
> > > -static struct omap_board_config_kernel sdp2430_config[] = {
> > > +static struct omap_board_config_kernel sdp2430_config[] 
> __initdata = {
> > >  	{OMAP_TAG_LCD, &sdp2430_lcd_config},
> > >  };
> > ...
> >   
> > Let's just get rid of omap_get_config stuff. The OMAP_TAG_LCD
> > and OMAP_TAG_FBMEM are the last remaining legacy tags. They should
> > be replaced with just platform_data. And while at it, it should
> > be done for all the boards.
> > 
> > Tomi, do you see any problems with that?
> 
> OMAP_TAG_LCD and OMAP_TAG_FBMEM are used by the old omapfb driver.
> 
> I don't see any problem in changing them to platform data, except that
> it's some work and somebody should do it =).
> 
>  Tomi
> 
Tony,

Can we do this as a separate patch? Or should I go down this path in
same context?... it may delay this patch.

~sanjeev

> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] omap: fix section mismatch errors
  2010-09-24 14:10     ` Premi, Sanjeev
@ 2010-09-24 17:41       ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2010-09-24 17:41 UTC (permalink / raw)
  To: Premi, Sanjeev; +Cc: Tomi Valkeinen, linux-omap@vger.kernel.org

* Premi, Sanjeev <premi@ti.com> [100924 07:01]:
> > -----Original Message-----
> > From: Tomi Valkeinen [mailto:tomi.valkeinen@nokia.com] 
> > Sent: Friday, September 24, 2010 2:10 PM
> > To: ext Tony Lindgren
> > Cc: Premi, Sanjeev; linux-omap@vger.kernel.org
> > Subject: Re: [PATCH 1/1] omap: fix section mismatch errors
> > 
> > On Thu, 2010-09-23 at 18:36 +0200, ext Tony Lindgren wrote:
> > > * Sanjeev Premi <premi@ti.com> [100816 08:24]:
> > > > This patch fixes miltiple section mismatch errors
> > > > observed with the latest master.
> > > 
> > > Few comments below.
> > >  
> > > > @@ -134,7 +134,7 @@ static inline void board_smc91x_init(void)
> > > >  
> > > >  #endif
> > > >  
> > > > -static struct omap_board_config_kernel sdp2430_config[] = {
> > > > +static struct omap_board_config_kernel sdp2430_config[] 
> > __initdata = {
> > > >  	{OMAP_TAG_LCD, &sdp2430_lcd_config},
> > > >  };
> > > ...
> > >   
> > > Let's just get rid of omap_get_config stuff. The OMAP_TAG_LCD
> > > and OMAP_TAG_FBMEM are the last remaining legacy tags. They should
> > > be replaced with just platform_data. And while at it, it should
> > > be done for all the boards.
> > > 
> > > Tomi, do you see any problems with that?
> > 
> > OMAP_TAG_LCD and OMAP_TAG_FBMEM are used by the old omapfb driver.
> > 
> > I don't see any problem in changing them to platform data, except that
> > it's some work and somebody should do it =).
> > 
> >  Tomi
> > 
> Tony,
> 
> Can we do this as a separate patch? Or should I go down this path in
> same context?... it may delay this patch.

Sounds like a separate patch. But let's not create noise about
OMAP_TAG_LCD related warnings if we intent to remove them later on
anyways.

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-24 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16 15:31 [PATCH 1/1] omap: fix section mismatch errors Sanjeev Premi
2010-09-23 16:36 ` Tony Lindgren
2010-09-24  8:40   ` Tomi Valkeinen
2010-09-24 14:10     ` Premi, Sanjeev
2010-09-24 17:41       ` Tony Lindgren

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).