mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 11:44:01 +08:00
i.MX35 clock support: remove automotive path
It is no longer present in newer cores. Unfortunately Freescale decided to put the bit which decides between automotive clock path and consumer clock path in the automotive clock path direction. With current code we cannot detect the core revision, so just remove automotive path completely. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
54df526819
commit
d16caf69ce
@ -147,34 +147,16 @@ static struct arm_ahb_div clk_consumer[] = {
|
||||
{ .arm = 0, .ahb = 0, .sel = 0},
|
||||
};
|
||||
|
||||
static struct arm_ahb_div clk_automotive[] = {
|
||||
{ .arm = 1, .ahb = 3, .sel = 0},
|
||||
{ .arm = 1, .ahb = 2, .sel = 1},
|
||||
{ .arm = 2, .ahb = 1, .sel = 1},
|
||||
{ .arm = 0, .ahb = 0, .sel = 0},
|
||||
{ .arm = 1, .ahb = 6, .sel = 0},
|
||||
{ .arm = 1, .ahb = 4, .sel = 1},
|
||||
{ .arm = 2, .ahb = 2, .sel = 1},
|
||||
{ .arm = 0, .ahb = 0, .sel = 0},
|
||||
};
|
||||
|
||||
static unsigned long get_rate_arm(void)
|
||||
{
|
||||
unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0);
|
||||
struct arm_ahb_div *aad;
|
||||
unsigned long fref = get_rate_mpll();
|
||||
|
||||
if (pdr0 & 1) {
|
||||
/* consumer path */
|
||||
aad = &clk_consumer[(pdr0 >> 16) & 0xf];
|
||||
if (aad->sel)
|
||||
fref = fref * 2 / 3;
|
||||
} else {
|
||||
/* auto path */
|
||||
aad = &clk_automotive[(pdr0 >> 9) & 0x7];
|
||||
if (aad->sel)
|
||||
fref = fref * 3 / 4;
|
||||
}
|
||||
aad = &clk_consumer[(pdr0 >> 16) & 0xf];
|
||||
if (aad->sel)
|
||||
fref = fref * 2 / 3;
|
||||
|
||||
return fref / aad->arm;
|
||||
}
|
||||
|
||||
@ -184,12 +166,7 @@ static unsigned long get_rate_ahb(struct clk *clk)
|
||||
struct arm_ahb_div *aad;
|
||||
unsigned long fref = get_rate_mpll();
|
||||
|
||||
if (pdr0 & 1)
|
||||
/* consumer path */
|
||||
aad = &clk_consumer[(pdr0 >> 16) & 0xf];
|
||||
else
|
||||
/* auto path */
|
||||
aad = &clk_automotive[(pdr0 >> 9) & 0x7];
|
||||
aad = &clk_consumer[(pdr0 >> 16) & 0xf];
|
||||
|
||||
return fref / aad->ahb;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user