Fix section mismatch warnings on some OMAP1 boards
Subsystems (3)
PATCH 1/1 Fix section mismatch warnings on some OMAP1 boards
I got some section mismatch warnings when compiling latest git for MACH_AMS_DELTA this evening; this seems to be due to a missing __initdata on the omap_board_config_kernel. Adding it fixes the warnings. I noticed that although this had been done for other OMAP1 boards fsample, innovator and voiceblue were all lacking it too, so I fixed them up at the same time.
-----
arch/arm/mach-omap1/board-ams-delta.c +1 -1
@@ -172,7 +172,7 @@ static struct omap_usb_config ams_delta_usb_config __initdata = { .pins[0] = 2, }; -static struct omap_board_config_kernel ams_delta_config[] = { +static struct omap_board_config_kernel ams_delta_config[]__initdata = { {OMAP_TAG_LCD , &ams_delta_lcd_config }, {OMAP_TAG_UART , &ams_delta_uart_config }, {OMAP_TAG_USB , &ams_delta_usb_config },
arch/arm/mach-omap1/board-fsample.c +1 -1
@@ -216,7 +216,7 @@ static struct omap_lcd_config fsample_lcd_config __initdata = { .ctrl_name = "internal", }; -static struct omap_board_config_kernel fsample_config[] = { +static struct omap_board_config_kernel fsample_config[]__initdata = { {OMAP_TAG_UART , &fsample_uart_config }, {OMAP_TAG_LCD , &fsample_lcd_config }, };
arch/arm/mach-omap1/board-innovator.c +1 -1
@@ -408,7 +408,7 @@ static struct omap_uart_config innovator_uart_config __initdata = { .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), }; -static struct omap_board_config_kernel innovator_config[] = { +static struct omap_board_config_kernel innovator_config[]__initdata = { {OMAP_TAG_USB ,NULL }, {OMAP_TAG_LCD ,NULL }, {OMAP_TAG_UART , &innovator_uart_config },
arch/arm/mach-omap1/board-voiceblue.c +1 -1
@@ -145,7 +145,7 @@ static struct omap_uart_config voiceblue_uart_config __initdata = { .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), }; -static struct omap_board_config_kernel voiceblue_config[] = { +static struct omap_board_config_kernel voiceblue_config[]__initdata = { {OMAP_TAG_USB , &voiceblue_usb_config }, {OMAP_TAG_UART , &voiceblue_uart_config }, };
-----
J.
Signature · 2 lines
jid: [email protected] Are you out of my mind?
Tony Lindgren
reviewerQuoted 6 lines · Jonathan McDowell
I got some section mismatch warnings when compiling latest git for
MACH_AMS_DELTAthis evening; this seems to be due to a missing__initdataon theomap_board_config_kernel. Adding it fixes the warnings. I noticed that although this had been done for other OMAP1 boards fsample, innovator and voiceblue were all lacking it too, so I fixed them up at the same time.
These cannot be __initdata as they are used by get_config() in plat-omap/common.c, and omap_get_config() is called in some drivers that could be modules.
Let's rather just get rid of all the omap_board_config_kernel stuff and use platform_data instead.
Tony
Quoted 66 lines
Signed-off-by Jonathan McDowell <[email protected]>-----
arch/arm/mach-omap1/board-ams-delta.c +1
-1@@ -172,7 +172,7 @@ static struct omap_usb_config ams_delta_usb_config __initdata = { .pins[0] = 2, }; -static struct omap_board_config_kernel ams_delta_config[] = { +static struct omap_board_config_kernel ams_delta_config[]__initdata = { {OMAP_TAG_LCD , &ams_delta_lcd_config }, {OMAP_TAG_UART , &ams_delta_uart_config }, {OMAP_TAG_USB , &ams_delta_usb_config },arch/arm/mach-omap1/board-fsample.c +1
-1@@ -216,7 +216,7 @@ static struct omap_lcd_config fsample_lcd_config __initdata = { .ctrl_name = "internal", }; -static struct omap_board_config_kernel fsample_config[] = { +static struct omap_board_config_kernel fsample_config[]__initdata = { {OMAP_TAG_UART , &fsample_uart_config }, {OMAP_TAG_LCD , &fsample_lcd_config }, };arch/arm/mach-omap1/board-innovator.c +1
-1@@ -408,7 +408,7 @@ static struct omap_uart_config innovator_uart_config __initdata = { .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), }; -static struct omap_board_config_kernel innovator_config[] = { +static struct omap_board_config_kernel innovator_config[]__initdata = { {OMAP_TAG_USB ,NULL }, {OMAP_TAG_LCD ,NULL }, {OMAP_TAG_UART , &innovator_uart_config },arch/arm/mach-omap1/board-voiceblue.c +1
-2@@ -145,7 +145,7 @@ static struct omap_uart_config voiceblue_uart_config __initdata = { .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), }; -static struct omap_board_config_kernel voiceblue_config[] = { +static struct omap_board_config_kernel voiceblue_config[]__initdata = { {OMAP_TAG_USB , &voiceblue_usb_config }, {OMAP_TAG_UART , &voiceblue_uart_config }, }; -----J.
Signature · 6 lines
jid: [email protected] Are you out of my mind? -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Tony Lindgren
Quoted 6 lines · Jonathan McDowell
I got some section mismatch warnings when compiling latest git for
MACH_AMS_DELTAthis evening; this seems to be due to a missing__initdataon theomap_board_config_kernel. Adding it fixes the warnings. I noticed that although this had been done for other OMAP1 boards fsample, innovator and voiceblue were all lacking it too, so I fixed them up at the same time.
Quoted 6 lines
These cannot be
__initdataas they are used byget_config()inplat-omap/common.c, andomap_get_config()is called in some drivers that could be modules.Let's rather just get rid of all the
omap_board_config_kernelstuff and useplatform_datainstead.
I sent a patch getting rid of OMAP_TAG_USB and converting the usb stuff to platform_data. Still untested as I don't have access to omap1.
here's [1] the link for it if anyone with omap1 is interested in testing.
[1] http://marc.info/?l=linux-omap&m=122235260714143&w=2
Signature · 1 line
balbi
Quoted 11 lines · Tony Lindgren
Quoted 6 lines · Jonathan McDowell
I got some section mismatch warnings when compiling latest git for
MACH_AMS_DELTAthis evening; this seems to be due to a missing__initdataon theomap_board_config_kernel. Adding it fixes the warnings. I noticed that although this had been done for other OMAP1 boards fsample, innovator and voiceblue were all lacking it too, so I fixed them up at the same time.These cannot be
__initdataas they are used byget_config()inplat-omap/common.c, andomap_get_config()is called in some drivers that could be modules.
Hmmm. Well that isn't going to work at present anyway, because the 3 members of ams_delta_config are marked __initdata.
Quoted 2 lines
Let's rather just get rid of all the
omap_board_config_kernelstuff and useplatform_datainstead.
Ok. I shall attempt to find time to test Felipe's USB tag removal patch.
J.