Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
* Jan Weitzel j.weit...@phytec.de [110714 01:34]: Am Donnerstag, den 14.07.2011, 00:34 -0700 schrieb Tony Lindgren: * Jan Weitzel j.weit...@phytec.de [110713 05:51]: Am Mittwoch, den 13.07.2011, 16:13 +0400 schrieb Sergei Shtylyov: Have you added that 'i' at the end intentionally? Thank you. It was a tribute to vim. :i) I'll fold the fixed patch into your original patch. Will also keep the new board files in testing-board because of the code coalescing and device tree conversion effort. So there is no way to get the board mainline yet? Well we can add it even before device tree support if it makes sense from code coalescing point of view. In this case it would mean creating board-panda-common.c or similar so the code can be shared amongst the panda variants. It seems that some GPIO pins are different and there are some difference in devices connected, but big parts of the code can be shared. Adding the pending boards without combining code would be adding code that will be going away for most part with the device tree support. And most likely the beagle and panda based boards will be the first ones to work with device tree. So anything we can do to have common board init code will also help with this effort. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
Hi, On Fri, Jul 15, 2011 at 12:50:24AM -0700, Tony Lindgren wrote: * Jan Weitzel j.weit...@phytec.de [110714 01:34]: Am Donnerstag, den 14.07.2011, 00:34 -0700 schrieb Tony Lindgren: * Jan Weitzel j.weit...@phytec.de [110713 05:51]: Am Mittwoch, den 13.07.2011, 16:13 +0400 schrieb Sergei Shtylyov: Have you added that 'i' at the end intentionally? Thank you. It was a tribute to vim. :i) I'll fold the fixed patch into your original patch. Will also keep the new board files in testing-board because of the code coalescing and device tree conversion effort. So there is no way to get the board mainline yet? Well we can add it even before device tree support if it makes sense from code coalescing point of view. In this case it would mean creating board-panda-common.c or similar so the code can be shared amongst the panda variants. It seems that some GPIO pins are different and there are some difference in devices connected, but big parts of the code can be shared. isn't it easier than to just add a few if (machine_is_()) checks and another MACHINE_START() to board-omap4panda.c rather than creating a new file, shuffling code around and then adding a new board file ?? -- balbi signature.asc Description: Digital signature
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
* Felipe Balbi ba...@ti.com [110715 00:53]: Hi, On Fri, Jul 15, 2011 at 12:50:24AM -0700, Tony Lindgren wrote: * Jan Weitzel j.weit...@phytec.de [110714 01:34]: Am Donnerstag, den 14.07.2011, 00:34 -0700 schrieb Tony Lindgren: * Jan Weitzel j.weit...@phytec.de [110713 05:51]: Am Mittwoch, den 13.07.2011, 16:13 +0400 schrieb Sergei Shtylyov: Have you added that 'i' at the end intentionally? Thank you. It was a tribute to vim. :i) I'll fold the fixed patch into your original patch. Will also keep the new board files in testing-board because of the code coalescing and device tree conversion effort. So there is no way to get the board mainline yet? Well we can add it even before device tree support if it makes sense from code coalescing point of view. In this case it would mean creating board-panda-common.c or similar so the code can be shared amongst the panda variants. It seems that some GPIO pins are different and there are some difference in devices connected, but big parts of the code can be shared. isn't it easier than to just add a few if (machine_is_()) checks and another MACHINE_START() to board-omap4panda.c rather than creating a new file, shuffling code around and then adding a new board file ?? That works too if the init_machine does not get too complicated. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
Hi, On Fri, Jul 15, 2011 at 01:20:12AM -0700, Tony Lindgren wrote: * Felipe Balbi ba...@ti.com [110715 00:53]: Hi, On Fri, Jul 15, 2011 at 12:50:24AM -0700, Tony Lindgren wrote: * Jan Weitzel j.weit...@phytec.de [110714 01:34]: Am Donnerstag, den 14.07.2011, 00:34 -0700 schrieb Tony Lindgren: * Jan Weitzel j.weit...@phytec.de [110713 05:51]: Am Mittwoch, den 13.07.2011, 16:13 +0400 schrieb Sergei Shtylyov: Have you added that 'i' at the end intentionally? Thank you. It was a tribute to vim. :i) I'll fold the fixed patch into your original patch. Will also keep the new board files in testing-board because of the code coalescing and device tree conversion effort. So there is no way to get the board mainline yet? Well we can add it even before device tree support if it makes sense from code coalescing point of view. In this case it would mean creating board-panda-common.c or similar so the code can be shared amongst the panda variants. It seems that some GPIO pins are different and there are some difference in devices connected, but big parts of the code can be shared. isn't it easier than to just add a few if (machine_is_()) checks and another MACHINE_START() to board-omap4panda.c rather than creating a new file, shuffling code around and then adding a new board file ?? That works too if the init_machine does not get too complicated. possibly something like this (still missing MACHINE_START a few more things): diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 0cfe200..dff174c 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -681,20 +681,44 @@ void omap4_panda_display_init(void) omap_display_init(omap4_panda_dss_data); } +static struct omap_smsc911x_platform_data board_smsc911x_data __initdata = { + .cs = OMAP4_SMSC911X_ETH_CS, + .gpio_irq = OMAP4_SMSC911X_ETH_GPIO_IRQ, + .gpio_reset = -EINVAL, + .flags = SMSC911X_USE_16BIT, +}; + +static void __init omap4_panda_smsc91xx_init(void) +{ + if (!machine_is_pcm049()) + return; + + omap_mux_init_gpio(OMAP4_PCM049_ETH_GPIO_IRQ, OMAP_PIN_INPUT); + gpmc_smsc911x_init(board_smsc911x_data); +} + static void __init omap4_panda_init(void) { int package = OMAP_PACKAGE_CBS; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; + omap4_mux_init(board_mux, NULL, package); - if (wl12xx_set_platform_data(omap_panda_wlan_data)) - pr_err(error setting wl12xx data\n); + if (machine_is_omap4panda()) { + int ret; + + ret = wl12xx_set_platform_data(omap_panda_wlan_data); + if (ret) + pr_err(error setting wl12xx data\n); + + platform_device_register(omap_vwlan_device); + } + omap4_panda_smsc91xx_init(); omap4_panda_i2c_init(); platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); - platform_device_register(omap_vwlan_device); board_serial_init(); omap4_twl6030_hsmmc_init(mmc); -- balbi signature.asc Description: Digital signature
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
Am Freitag, den 15.07.2011, 00:50 -0700 schrieb Tony Lindgren: Well we can add it even before device tree support if it makes sense from code coalescing point of view. In this case it would mean creating board-panda-common.c or similar so the code can be shared amongst the panda variants. It seems that some GPIO pins are different and there are some difference in devices connected, but big parts of the code can be shared. Adding the pending boards without combining code would be adding code that will be going away for most part with the device tree support. And most likely the beagle and panda based boards will be the first ones to work with device tree. So anything we can do to have common board init code will also help with this effort. Regards, Tony pcm049 and panda board have some more different devices. I am working on patches to add NAND support and using tlv320aic3x audio codec which need regulators in platformcode. I need a hack to controll usb otg by gpio (controlling a external power circuit). The patches are not mainline ready by now. If using machine_is_() in board-omap4panda.c then also is good way, I could provide our board as patches on top of board-omap4panda.c. When will pandaboard use device tree to boot? Kind Regards, Jan -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
* Jan Weitzel j.weit...@phytec.de [110715 02:42]: Am Freitag, den 15.07.2011, 00:50 -0700 schrieb Tony Lindgren: Well we can add it even before device tree support if it makes sense from code coalescing point of view. In this case it would mean creating board-panda-common.c or similar so the code can be shared amongst the panda variants. It seems that some GPIO pins are different and there are some difference in devices connected, but big parts of the code can be shared. Adding the pending boards without combining code would be adding code that will be going away for most part with the device tree support. And most likely the beagle and panda based boards will be the first ones to work with device tree. So anything we can do to have common board init code will also help with this effort. Regards, Tony pcm049 and panda board have some more different devices. I am working on patches to add NAND support and using tlv320aic3x audio codec which need regulators in platformcode. I need a hack to controll usb otg by gpio (controlling a external power circuit). The patches are not mainline ready by now. OK, let's figure out how we can add the basic support first then. If using machine_is_() in board-omap4panda.c then also is good way, I could provide our board as patches on top of board-omap4panda.c. When will pandaboard use device tree to boot? Yes, but it would better just to use separate .init_machine entries to initialize thing. Gpio entries can be initialized along the lines of the recent beagle commit 5fe8b4c19dc24e3bb873daf9e96a2439a83bbd79 that adds support for beagl xm board. Except you already have a separate machine_id, so no runtime detection is needed. That avoids adding the machine_is entries all over the place that tend to cause problems when some other panda variant is added as it requires patching in multiple places. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
* Felipe Balbi ba...@ti.com [110715 01:25]: possibly something like this (still missing MACHINE_START a few more things): Yes and it would be better to initialize data in the .init_machine to avoid adding machine_is tests in multiple places. diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 0cfe200..dff174c 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -681,20 +681,44 @@ void omap4_panda_display_init(void) omap_display_init(omap4_panda_dss_data); } +static struct omap_smsc911x_platform_data board_smsc911x_data __initdata = { + .cs = OMAP4_SMSC911X_ETH_CS, + .gpio_irq = OMAP4_SMSC911X_ETH_GPIO_IRQ, + .gpio_reset = -EINVAL, + .flags = SMSC911X_USE_16BIT, +}; + +static void __init omap4_panda_smsc91xx_init(void) +{ + if (!machine_is_pcm049()) + return; + + omap_mux_init_gpio(OMAP4_PCM049_ETH_GPIO_IRQ, OMAP_PIN_INPUT); + gpmc_smsc911x_init(board_smsc911x_data); +} + static void __init omap4_panda_init(void) { int package = OMAP_PACKAGE_CBS; if (omap_rev() == OMAP4430_REV_ES1_0) package = OMAP_PACKAGE_CBL; + omap4_mux_init(board_mux, NULL, package); - if (wl12xx_set_platform_data(omap_panda_wlan_data)) - pr_err(error setting wl12xx data\n); + if (machine_is_omap4panda()) { + int ret; + + ret = wl12xx_set_platform_data(omap_panda_wlan_data); + if (ret) + pr_err(error setting wl12xx data\n); + + platform_device_register(omap_vwlan_device); + } + omap4_panda_smsc91xx_init(); omap4_panda_i2c_init(); platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); - platform_device_register(omap_vwlan_device); board_serial_init(); omap4_twl6030_hsmmc_init(mmc); So we sould have panda_common_init() and then omap4_panda_init() and omap4_phycore_init() or something like that. No need for machine_is tests then as the .machine_init already takes care of that test. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
* Jan Weitzel j.weit...@phytec.de [110713 05:51]: Am Mittwoch, den 13.07.2011, 16:13 +0400 schrieb Sergei Shtylyov: Have you added that 'i' at the end intentionally? Thank you. It was a tribute to vim. :i) I'll fold the fixed patch into your original patch. Will also keep the new board files in testing-board because of the code coalescing and device tree conversion effort. Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
Am Donnerstag, den 14.07.2011, 00:34 -0700 schrieb Tony Lindgren: * Jan Weitzel j.weit...@phytec.de [110713 05:51]: Am Mittwoch, den 13.07.2011, 16:13 +0400 schrieb Sergei Shtylyov: Have you added that 'i' at the end intentionally? Thank you. It was a tribute to vim. :i) I'll fold the fixed patch into your original patch. Will also keep the new board files in testing-board because of the code coalescing and device tree conversion effort. So there is no way to get the board mainline yet? Jan Tony ___ linux-arm-kernel mailing list linux-arm-ker...@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ARM: OMAP4: PCM049: remove vusim regulator
vusim is not used. Signed-off-by: Jan Weitzel j.weit...@phytec.de --- arch/arm/mach-omap2/board-omap4pcm049.c | 16 +--- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap4pcm049.c b/arch/arm/mach-omap2/board-omap4pcm049.c index ad8cb46..85193ec 100644 --- a/arch/arm/mach-omap2/board-omap4pcm049.c +++ b/arch/arm/mach-omap2/board-omap4pcm049.c @@ -227,18 +227,6 @@ static struct platform_device pcm049_vcc_3v3_device = { }, }; -static struct regulator_init_data pcm049_vusim = { - .constraints = { - .min_uV = 180, - .max_uV = 330, - .apply_uV = true, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - }, -}; - static struct at24_platform_data board_eeprom = { .byte_len = 4096, .page_size = 32, @@ -318,9 +306,7 @@ static struct i2c_board_info __initdata pcm049_i2c_4_boardinfo[] = { } }; -static struct twl4030_platform_data pcm049_twldata = { - .vusim = pcm049_vusim, -}; +static struct twl4030_platform_data pcm049_twldatai; static int __init pcm049_i2c_init(void) { -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
Hello. On 13-07-2011 14:59, Jan Weitzel wrote: vusim is not used. Signed-off-by: Jan Weitzelj.weit...@phytec.de --- arch/arm/mach-omap2/board-omap4pcm049.c | 16 +--- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap4pcm049.c b/arch/arm/mach-omap2/board-omap4pcm049.c index ad8cb46..85193ec 100644 --- a/arch/arm/mach-omap2/board-omap4pcm049.c +++ b/arch/arm/mach-omap2/board-omap4pcm049.c [...] @@ -318,9 +306,7 @@ static struct i2c_board_info __initdata pcm049_i2c_4_boardinfo[] = { } }; -static struct twl4030_platform_data pcm049_twldata = { - .vusim =pcm049_vusim, -}; +static struct twl4030_platform_data pcm049_twldatai; Have you added that 'i' at the end intentionally? WBR, Sergei -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
Am Mittwoch, den 13.07.2011, 16:13 +0400 schrieb Sergei Shtylyov: Have you added that 'i' at the end intentionally? Thank you. It was a tribute to vim. Jan -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html