Remaining kautobuild errors with mainline
Subsystems (2)
Tony,
As of last nights merge of the ARM tree, the only remaining build error is:
arch/arm/mach-omap1/built-in.o: In function `sx1_mmc_init':
board-sx1-mmc.c:(.init.text+0xd64): undefined reference to omap_set_mmc_info' arch/arm/mach-omap1/built-in.o: In function h2_mmc_init':arch/arm/mach-omap1/board-h2-mmc.c:98: undefined reference to `omap_set_mmc_info'
This seems to be because of arch/arm/plat-omap/devices.c not being up to date; it seems to pass a struct omap_mmc_conf to the OMAP MMC driver, but the MMC driver expects a struct omap_mmc_platform_data instead.
Can I lift just the MMC changes for arch/arm/plat-omap/devices.c from the OMAP tree to fix this, or is there something more required for this?
Quoted 8 lines · Russell King - ARM Linux
As of last nights merge of the ARM tree, the only remaining build error is:
arch/arm/mach-omap1/built-in.o: In function `sx1_mmc_init':
board-sx1-mmc.c:(.init.text+0xd64): undefined reference toomap_set_mmc_info' arch/arm/mach-omap1/built-in.o: In functionh2_mmc_init':arch/arm/mach-omap1/board-h2-mmc.c:98: undefined reference to `omap_set_mmc_info'
Quoted 6 lines
This seems to be because of
arch/arm/plat-omap/devices.cnot being up to date; it seems to pass a structomap_mmc_confto the OMAP MMC driver, but the MMC driver expects a structomap_mmc_platform_datainstead.Can I lift just the MMC changes for
arch/arm/plat-omap/devices.cfrom the OMAP tree to fix this, or is there something more required for this?
I couldn't pull the commits from the omapzoom tree because there seem to be differences between mainline and omapzoom which aren't identifyable in the omapzoom history.
So... what I have is:
Quoted 1 line
From
c37e0062150668dd260a6ce0664697f0fbcf2239Mon Sep 17 00:00:00 2001
From: Russell King <[email protected]>
Date: Tue, 9 Sep 2008 10:16:22 +0100
Subject: [PATCH] [ARM] OMAP: Fix MMC device data
OMAPs MMC device data was passing the wrong structure via the platform device. Moreover, a missing function means that both sx1_defconfig and omap_h2_1610_defconfig builds failed with
undefined reference to `omap_set_mmc_info'
errors. Fix this by updating the MMC support from the omapzoom tree.
--- arch/arm/plat-omap/devices.c | 88 +++++++++++++++++++++++++++++++++++------- 1 files changed, 74 insertions(+), 14 deletions(-)
arch/arm/plat-omap/devices.c +74 -14
@@ -21,6 +21,7 @@#include <mach/tc.h> #include <mach/board.h> +#include <mach/mmc.h> #include <mach/mux.h> #include <mach/gpio.h> #include <mach/menelaus.h>
@@ -194,25 +195,38 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,/*-------------------------------------------------------------------------*/ -#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) +#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ + defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) -#ifdef CONFIG_ARCH_OMAP24XX +#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) #define OMAP_MMC1_BASE 0x4809c000 -#define OMAP_MMC1_INT INT_24XX_MMC_IRQ +#define OMAP_MMC1_END (OMAP_MMC1_BASE + 0x1fc) +#define OMAP_MMC1_INT INT_24XX_MMC_IRQ + +#define OMAP_MMC2_BASE 0x480b4000 +#define OMAP_MMC2_END (OMAP_MMC2_BASE + 0x1fc) +#define OMAP_MMC2_INT INT_24XX_MMC2_IRQ + #else + #define OMAP_MMC1_BASE 0xfffb7800 +#define OMAP_MMC1_END (OMAP_MMC1_BASE + 0x7f) #define OMAP_MMC1_INT INT_MMC -#endif + #define OMAP_MMC2_BASE 0xfffb7c00 /* omap16xx only */ +#define OMAP_MMC2_END (OMAP_MMC2_BASE + 0x7f) +#define OMAP_MMC2_INT INT_1610_MMC2 -static struct omap_mmc_conf mmc1_conf; +#endif + +static struct omap_mmc_platform_data mmc1_data; static u64 mmc1_dmamask = 0xffffffff; static struct resource mmc1_resources[] = { { .start = OMAP_MMC1_BASE, - .end = OMAP_MMC1_BASE + 0x7f, + .end = OMAP_MMC1_END, .flags = IORESOURCE_MEM, }, {
@@ -226,26 +240,27 @@ static struct platform_device mmc_omap_device1 = { .id = 1, .dev = { .dma_mask = &mmc1_dmamask, - .platform_data = &mmc1_conf, + .platform_data = &mmc1_data, }, .num_resources = ARRAY_SIZE(mmc1_resources), .resource = mmc1_resources, }; -#ifdef CONFIG_ARCH_OMAP16XX +#if defined(CONFIG_ARCH_OMAP16XX ) || defined(CONFIG_ARCH_OMAP2430 ) || \ + defined(CONFIG_ARCH_OMAP34XX ) -static struct omap_mmc_conf mmc2_conf; +static struct omap_mmc_platform_data mmc2_data;static u64 mmc2_dmamask =0xffffffff ;static struct resource mmc2_resources[] = { { .start =OMAP_MMC2_BASE , - .end =OMAP_MMC2_BASE +0x7f , + .end =OMAP_MMC2_END , .flags =IORESOURCE_MEM , }, { - .start =INT_1610_MMC2 , + .start =OMAP_MMC2_INT , .flags =IORESOURCE_IRQ , }, };
@@ -255,7 +270,7 @@ static struct platform_device mmc_omap_device2 = { .id = 2, .dev = { .dma_mask = &mmc2_dmamask, - .platform_data = &mmc2_conf, + .platform_data = &mmc2_data, }, .num_resources = ARRAY_SIZE(mmc2_resources), .resource = mmc2_resources,
@@ -274,6 +289,19 @@ static void __init omap_init_mmc(void)/* block 1 is always available and has just one pinout option */ mmc = &mmc_conf->mmc[0 ]; + +if (cpu_is_omap2430 () ||cpu_is_omap34xx ()) { +if (mmc->enabled) + (void )platform_device_register (&mmc_omap_device1); + +#if defined(CONFIG_ARCH_OMAP2430 ) || defined(CONFIG_ARCH_OMAP34XX ) + mmc = &mmc_conf->mmc[1 ]; +if (mmc->enabled) + (void )platform_device_register (&mmc_omap_device2); +#endif +return ; + } +if (mmc->enabled) {if (cpu_is_omap24xx ()) {omap_cfg_reg (H18_24XX_MMC_CMD );
@@ -308,7 +336,20 @@ static void __init omap_init_mmc(void)omap_cfg_reg (MMC_DAT3 ); } } - mmc1_conf = *mmc; +#if defined(CONFIG_ARCH_OMAP2420 ) +if (mmc->internal_clock) { +/* +* Use internal loop-back in MMC/SDIO +* Module Input Clock selection +*/ +if (cpu_is_omap24xx ()) { +u32 v =omap_ctrl_readl (OMAP2_CONTROL_DEVCONF0 ); + v |= (1 <<24 );/* not used in 243x */ +omap_ctrl_writel (v,OMAP2_CONTROL_DEVCONF0 ); + } + } +#endif + mmc1_data.conf = *mmc; (void )platform_device_register (&mmc_omap_device1); }
@@ -337,14 +378,33 @@ static void __init omap_init_mmc(void)if (cpu_is_omap1710 ())omap_writel (omap_readl (MOD_CONF_CTRL_1 ) | (1 <<24 ),MOD_CONF_CTRL_1 ); - mmc2_conf = *mmc; + mmc2_data.conf = *mmc; (void )platform_device_register (&mmc_omap_device2); }#endif return ; } + +void omap_set_mmc_info (int host,const struct omap_mmc_platform_data *info) +{ +switch (host) { +case 1 : + mmc1_data = *info; +break ; +#if defined(CONFIG_ARCH_OMAP16XX ) || defined(CONFIG_ARCH_OMAP2430 ) || \ + defined(CONFIG_ARCH_OMAP34XX ) +case 2 : + mmc2_data = *info; +break ; +#endif +default : +BUG (); + } +} +#else static inline void omap_init_mmc (void ) {} +void omap_set_mmc_info (int host,const struct omap_mmc_platform_data *info) {}#endif /*-------------------------------------------------------------------------*/
Signature · 1 line
1.5.4.5
Tony Lindgren
Acked-byQuoted 9 lines · Russell King - ARM Linux
Quoted 8 lines · Russell King - ARM Linux
As of last nights merge of the ARM tree, the only remaining build error is:
arch/arm/mach-omap1/built-in.o: In function `sx1_mmc_init':
board-sx1-mmc.c:(.init.text+0xd64): undefined reference toomap_set_mmc_info' arch/arm/mach-omap1/built-in.o: In functionh2_mmc_init':arch/arm/mach-omap1/board-h2-mmc.c:98: undefined reference to `omap_set_mmc_info'
Quoted 6 lines
Quoted 6 lines
This seems to be because of
arch/arm/plat-omap/devices.cnot being up to date; it seems to pass a structomap_mmc_confto the OMAP MMC driver, but the MMC driver expects a structomap_mmc_platform_datainstead.Can I lift just the MMC changes for
arch/arm/plat-omap/devices.cfrom the OMAP tree to fix this, or is there something more required for this?
Sure, go for it!
Quoted 3 lines
I couldn't pull the commits from the omapzoom tree because there seem to be differences between mainline and omapzoom which aren't identifyable in the omapzoom history.
Yeah some patches just do not apply directly because of layers of fixes, so redoing and splitting is needed.
Quoted 11 lines
So... what I have is:
From
c37e0062150668dd260a6ce0664697f0fbcf2239Mon Sep 17 00:00:00 2001
From: Russell King <[email protected]>
Date: Tue, 9 Sep 2008 10:16:22 +0100
Subject: [PATCH] [ARM] OMAP: Fix MMC device dataOMAPs MMC device data was passing the wrong structure via the platform device. Moreover, a missing function means that both
sx1_defconfigandomap_h2_1610_defconfigbuilds failed with
Quoted 5 lines
undefined reference to `omap_set_mmc_info'
errors. Fix this by updating the MMC support from the omapzoom tree.
Signed-off-by Russell King <[email protected]>
Quoted 183 lines
--- arch/arm/plat-omap/devices.c | 88 +++++++++++++++++++++++++++++++++++------- 1 files changed, 74 insertions(+), 14 deletions(-)arch/arm/plat-omap/devices.c +74
-14@@ -21,6 +21,7 @@#include <mach/tc.h> #include <mach/board.h> +#include <mach/mmc.h> #include <mach/mux.h> #include <mach/gpio.h> #include <mach/menelaus.h> @@ -194,25 +195,38 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,/*-------------------------------------------------------------------------*/ -#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) +#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ + defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) -#ifdef CONFIG_ARCH_OMAP24XX +#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) #define OMAP_MMC1_BASE 0x4809c000 -#define OMAP_MMC1_INT INT_24XX_MMC_IRQ +#define OMAP_MMC1_END (OMAP_MMC1_BASE + 0x1fc) +#define OMAP_MMC1_INT INT_24XX_MMC_IRQ + +#define OMAP_MMC2_BASE 0x480b4000 +#define OMAP_MMC2_END (OMAP_MMC2_BASE + 0x1fc) +#define OMAP_MMC2_INT INT_24XX_MMC2_IRQ + #else + #define OMAP_MMC1_BASE 0xfffb7800 +#define OMAP_MMC1_END (OMAP_MMC1_BASE + 0x7f) #define OMAP_MMC1_INT INT_MMC -#endif + #define OMAP_MMC2_BASE 0xfffb7c00 /* omap16xx only */ +#define OMAP_MMC2_END (OMAP_MMC2_BASE + 0x7f) +#define OMAP_MMC2_INT INT_1610_MMC2 -static struct omap_mmc_conf mmc1_conf; +#endif + +static struct omap_mmc_platform_data mmc1_data; static u64 mmc1_dmamask = 0xffffffff; static struct resource mmc1_resources[] = { { .start = OMAP_MMC1_BASE, - .end = OMAP_MMC1_BASE + 0x7f, + .end = OMAP_MMC1_END, .flags = IORESOURCE_MEM, }, {@@ -226,26 +240,27 @@ static struct platform_device mmc_omap_device1 = { .id = 1, .dev = { .dma_mask = &mmc1_dmamask, - .platform_data = &mmc1_conf, + .platform_data = &mmc1_data, }, .num_resources = ARRAY_SIZE(mmc1_resources), .resource = mmc1_resources, }; -#ifdef CONFIG_ARCH_OMAP16XX +#if defined(CONFIG_ARCH_OMAP16XX ) || defined(CONFIG_ARCH_OMAP2430 ) || \ + defined(CONFIG_ARCH_OMAP34XX ) -static struct omap_mmc_conf mmc2_conf; +static struct omap_mmc_platform_data mmc2_data;static u64 mmc2_dmamask =0xffffffff ;static struct resource mmc2_resources[] = { { .start =OMAP_MMC2_BASE , - .end =OMAP_MMC2_BASE +0x7f , + .end =OMAP_MMC2_END , .flags =IORESOURCE_MEM , }, { - .start =INT_1610_MMC2 , + .start =OMAP_MMC2_INT , .flags =IORESOURCE_IRQ , }, };@@ -255,7 +270,7 @@ static struct platform_device mmc_omap_device2 = { .id = 2, .dev = { .dma_mask = &mmc2_dmamask, - .platform_data = &mmc2_conf, + .platform_data = &mmc2_data, }, .num_resources = ARRAY_SIZE(mmc2_resources), .resource = mmc2_resources,@@ -274,6 +289,19 @@ static void __init omap_init_mmc(void)/* block 1 is always available and has just one pinout option */ mmc = &mmc_conf->mmc[0 ]; + +if (cpu_is_omap2430 () ||cpu_is_omap34xx ()) { +if (mmc->enabled) + (void )platform_device_register (&mmc_omap_device1); + +#if defined(CONFIG_ARCH_OMAP2430 ) || defined(CONFIG_ARCH_OMAP34XX ) + mmc = &mmc_conf->mmc[1 ]; +if (mmc->enabled) + (void )platform_device_register (&mmc_omap_device2); +#endif +return ; + } +if (mmc->enabled) {if (cpu_is_omap24xx ()) {omap_cfg_reg (H18_24XX_MMC_CMD );@@ -308,7 +336,20 @@ static void __init omap_init_mmc(void)omap_cfg_reg (MMC_DAT3 ); } } - mmc1_conf = *mmc; +#if defined(CONFIG_ARCH_OMAP2420 ) +if (mmc->internal_clock) { +/* +* Use internal loop-back in MMC/SDIO +* Module Input Clock selection +*/ +if (cpu_is_omap24xx ()) { +u32 v =omap_ctrl_readl (OMAP2_CONTROL_DEVCONF0 ); + v |= (1 <<24 );/* not used in 243x */ +omap_ctrl_writel (v,OMAP2_CONTROL_DEVCONF0 ); + } + } +#endif + mmc1_data.conf = *mmc; (void )platform_device_register (&mmc_omap_device1); }@@ -337,14 +378,33 @@ static void __init omap_init_mmc(void)if (cpu_is_omap1710 ())omap_writel (omap_readl (MOD_CONF_CTRL_1 ) | (1 <<24 ),MOD_CONF_CTRL_1 ); - mmc2_conf = *mmc; + mmc2_data.conf = *mmc; (void )platform_device_register (&mmc_omap_device2); }#endif return ; } + +void omap_set_mmc_info (int host,const struct omap_mmc_platform_data *info) +{ +switch (host) { +case 1 : + mmc1_data = *info; +break ; +#if defined(CONFIG_ARCH_OMAP16XX ) || defined(CONFIG_ARCH_OMAP2430 ) || \ + defined(CONFIG_ARCH_OMAP34XX ) +case 2 : + mmc2_data = *info; +break ; +#endif +default : +BUG (); + } +} +#else static inline void omap_init_mmc (void ) {} +void omap_set_mmc_info (int host,const struct omap_mmc_platform_data *info) {}#endif /*-------------------------------------------------------------------------*/ Signature · 1 line
1.5.4.5
Russell
Quoted 15 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of RussellQuoted 12 lines · Russell King - ARM Linux
As of last nights merge of the ARM tree, the only remaining build error is:
arch/arm/mach-omap1/built-in.o: In function `sx1_mmc_init':
board-sx1-mmc.c:(.init.text+0xd64): undefined reference toomap_set_mmc_info' arch/arm/mach-omap1/built-in.o: In functionh2_mmc_init':arch/arm/mach-omap1/board-h2-mmc.c:98: undefined reference to `omap_set_mmc_info'This seems to be because of
arch/arm/plat-omap/devices.cnot being up to date; it seems to pass a structomap_mmc_confto the OMAP MMC driver, but the MMC driver expects a structomap_mmc_platform_datainstead.
Quoted 6 lines
Quoted 2 lines
Can I lift just the MMC changes for
arch/arm/plat-omap/devices.cfrom the OMAP tree to fix this, or is there something more required for this?I couldn't pull the commits from the omapzoom tree because there seem to be differences between mainline and omapzoom which aren't identifyable in the omapzoom history.
For omapzoom git the current strategy is to base the tree of l-o tree.
Every two weeks I rebase of the l-o tree and apply TI-PM and TI-extra-functionality on top of l-o tree and that's what the omapzoom tree is today.
I believe this might not be the smartest way, but with parallel development happening on l-o as well as omapzoom, sometimes by same developers, either tree has to be in sync so that none of the fixes is lost.
Other way for zoom tree would be to diverge by taking linus upmerges and selectively take l-o bug-fixes. The issue here would be the trees would diverge over time.
Quoted 21 lines
So... what I have is:
From
c37e0062150668dd260a6ce0664697f0fbcf2239Mon Sep 17 00:00:00 2001
From: Russell King <[email protected]>
Date: Tue, 9 Sep 2008 10:16:22 +0100
Subject: [PATCH] [ARM] OMAP: Fix MMC device dataOMAPs MMC device data was passing the wrong structure via the platform device. Moreover, a missing function means that both
sx1_defconfigandomap_h2_1610_defconfigbuilds failed withundefined reference to `omap_set_mmc_info'
errors. Fix this by updating the MMC support from the omapzoom tree.
Signed-off-by Russell King <[email protected]>--- arch/arm/plat-omap/devices.c | 88 +++++++++++++++++++++++++++++++++++------- 1 files changed, 74 insertions(+), 14 deletions(-)