- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
EMIF clock frequency
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-01-2011 07:55 PM
Hello,
What files should be modified to change the EMIF clk frequency. In my OMAP spartan6 board after startup the default EMIF clk frequency is being set at 25 MHz. I want to increase it to 100 Mhz.
Regards
Pankaj
Re: EMIF clock frequency
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2011 06:36 AM
Pankaj,
This is documented in the OMAP-L138 datasheet.
The EMIFA clock frequency can be either:
- SYSCLK3
- PLL0 output clock divided by 4.5
The attached image illustrates this.
Regards,
Mario.
Re: EMIF clock frequency
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2011 10:03 AM
Hi,
Sorry I didn't make my question clear. I am able to change the frequency by modifying the PLL registers through command line of u-boot. But I am unable to do so in Linux. I wanted to know the location of source code where the clocks are being initialized in linux.
Regards
Pankaj
Re: EMIF clock frequency
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2011 09:03 PM
Pankaj,
You need to get really comfortable with the Linux kernel. Don't be afraid to explore.
Our kernel is essentially the same kernel as the one in the OMAP-L138 EVM and eXperimenter kit. I haven't tried changing the clock myself, but I hope that I can point you to the right files and some code and you can do the rest for yourself.
Look at the following files:
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/da580.c
These files contain some low-level initialization code for the chip and board.
If you do a search for 'emif' in these files, it will lead you to the following.
In da850.c:
static struct clk emif3_clk = {
.name = "emif3",
.parent = &pll0_sysclk5,
.lpsc = DA8XX_LPSC1_EMIF3C,
.gpsc = 1,
.flags = ALWAYS_ENABLED,
};
....further down in the file:
static struct clk aemif_clk = {
.name = "aemif",
.parent = &pll0_sysclk3,
.lpsc = DA8XX_LPSC0_EMIF25,
};
These structs get plugged into a big clock table, that in turn gets plugged into a larger structure that is used to initialize the chip. Look at arch/arm/mach-davinci/clock.c (contains the clock init code that loops through the big clock table and inits/registers the clocks) and arch/arm/mach-davinci/common.c (contains the common DaVinci init routine) in this directory as well.
John



