Re: How to change freq of mmc2_clk to 48Mhz for OMAP35xx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 9, 2010, at 12:43 AM, Andy Shevchenko wrote:

> On Wed, Dec 8, 2010 at 10:36 PM, Paul Walmsley <paul@xxxxxxxxx> wrote:
>> Anyway, if you want to try changing it from the kernel side, you'll need
>> code like this in the MMC driver or OMAP integration code (off the top of
>> my head, untested):
> 
>> Please let me know if this doesn't work.
> IIRC, there is mmc_set_clock() method, but it isn't exported. Anyway,
> I have another issue with some specific code which also requires the
> same function to be exported.

In my u-boot-2010.03 board file (or with u-boot-2009.11 patched to incorporate the mmc_set_dev() method)

I added the following lines of code.

- mmc_set_dev(2) select the MMC2 controller.

- mmc_clock_config attempts to use a clock divider value of 2, and this method implements the logic 
outlined in Section 22.5.2.7.2 of the OMAP35x TRM Rev D 


@@ -34,6 +34,7 @@
 #include <common.h>
 #include <twl4030.h>
 #include <asm/io.h>
+#include <asm/arch/mmc.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/gpio.h>
@@ -292,6 +293,11 @@ xx GPI31 159 TCH_DOUT - McSPI4_SOMI
        dieid_num_r();
        omap3_dss_enable();
 
+       // Initialize MMC2 controller clock to 48Khz
+       mmc_set_dev(2);
+       mmc_init_setup();
+       mmc_clock_config(CLK_MISC, 2);
+
     return 0;
 }
 
This is having no effect, and the output clock from the bootloader stage is still at 96MHz. 

How can I change the MMC CLK output to 48MHz using either the boot loader or the kernel?

Elvis Dowson
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux