From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 5/8] board-rx51-peripherals: split vaux3 and vmmc2 supplies Date: Wed, 14 Oct 2009 10:15:48 -0700 Message-ID: <20091014171548.GI12700@atomide.com> References: <1255003137-1034-1-git-send-email-eduardo.valentin@nokia.com> <1255003137-1034-6-git-send-email-eduardo.valentin@nokia.com> <20091008132109.GD29176@rakim.wolfsonmicro.main> <20091009064529.GD6616@esdhcp037198.research.nokia.com> <20091009110346.GC5082@sirena.org.uk> <20091012080858.GB13234@esdhcp037198.research.nokia.com> <20091012091820.GC3308@rakim.wolfsonmicro.main> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20091012091820.GC3308@rakim.wolfsonmicro.main> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: "alsa-devel@alsa-project.org" , Eduardo Valentin , "Ujfalusi Peter (Nokia-D/Tampere)" , "Nurkkala Eero.An (EXT-Offcode/Oulu)" , Linux-OMAP , ALSA-Devel List-Id: linux-omap@vger.kernel.org * Mark Brown [091012 02:18]: > On Mon, Oct 12, 2009 at 11:08:58AM +0300, Eduardo Valentin wrote: > > > I'm afraid using dev_name is not that easy. The mmc driver generates device > > name at runtime. That's why this board file setups .dev at runtime as well. > > > rx51_twlgpio_setup -> twl4030_mmc_init -> omap2_init_mmc > > > So, changing this supply to something static using .dev_name it is not > > possible with current code. That would need refactoring the whole mmc and > > hsmmc setup. And the device naming procedure is dependent on cpu as well. > > Check arch/arm/mach-omap2/device.c:omap2_init_mmc. > > Oh, dear - that sounds broken for hardware that's fixed on the board. > That said, the code there looks like it's supposed to come out with the > same answer each time it's run? How does this work with the clock API? The clocks are matched using clkdev. Basically the driver just requests functional clock (fck) and interface clock (ick): $ grep mmci arch/arm/*omap*/clock*.c arch/arm/mach-omap1/clock.c: CLK("mmci-omap.0", "fck", &mmc1_ck, CK_16XX | CK_1510 | CK_310), arch/arm/mach-omap1/clock.c: CLK("mmci-omap.0", "ick", &armper_ck.clk, CK_16XX | CK_1510 | CK_310), arch/arm/mach-omap1/clock.c: CLK("mmci-omap.1", "fck", &mmc2_ck, CK_16XX), arch/arm/mach-omap1/clock.c: CLK("mmci-omap.1", "ick", &armper_ck.clk, CK_16XX), arch/arm/mach-omap2/clock24xx.c: CLK("mmci-omap.0", "ick", &mmc_ick, CK_242X), arch/arm/mach-omap2/clock24xx.c: CLK("mmci-omap.0", "fck", &mmc_fck, CK_242X), arch/arm/mach-omap2/clock24xx.c: CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_243X), arch/arm/mach-omap2/clock24xx.c: CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_243X), arch/arm/mach-omap2/clock24xx.c: CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_243X), arch/arm/mach-omap2/clock24xx.c: CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_243X), arch/arm/mach-omap2/clock24xx.c: CLK("mmci-omap-hs.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X), arch/arm/mach-omap2/clock24xx.c: CLK("mmci-omap-hs.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X), arch/arm/mach-omap2/clock34xx.c: CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2), arch/arm/mach-omap2/clock34xx.c: CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_343X), arch/arm/mach-omap2/clock34xx.c: CLK("mmci-omap-hs.0", "fck", &mmchs1_fck, CK_343X), arch/arm/mach-omap2/clock34xx.c: CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2), arch/arm/mach-omap2/clock34xx.c: CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_343X), arch/arm/mach-omap2/clock34xx.c: CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_343X), Regards, Tony