提交 865d605e 编写于 作者: J Jamie Iles

at91: provide macb clks with "pclk" and "hclk" name

The macb driver expects clocks with the names "pclk" and "hclk".  We
currently provide "macb_clk" but to fit in line with other
architectures (namely AVR32), provide "pclk" and a fake "hclk".

Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: NJamie Iles <jamie@jamieiles.com>
Acked-by: NDavid S. Miller <davem@davemloft.net>
Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
上级 cfcfc9ec
...@@ -137,7 +137,7 @@ static struct clk pwm_clk = { ...@@ -137,7 +137,7 @@ static struct clk pwm_clk = {
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
static struct clk macb_clk = { static struct clk macb_clk = {
.name = "macb_clk", .name = "pclk",
.pmc_mask = 1 << AT91CAP9_ID_EMAC, .pmc_mask = 1 << AT91CAP9_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
...@@ -210,6 +210,8 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -210,6 +210,8 @@ static struct clk *periph_clocks[] __initdata = {
}; };
static struct clk_lookup periph_clocks_lookups[] = { static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk),
CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk), CLKDEV_CON_DEV_ID("hclk", "atmel_usba_udc", &utmi_clk),
CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk), CLKDEV_CON_DEV_ID("pclk", "atmel_usba_udc", &udphs_clk),
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
......
...@@ -120,7 +120,7 @@ static struct clk ohci_clk = { ...@@ -120,7 +120,7 @@ static struct clk ohci_clk = {
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
static struct clk macb_clk = { static struct clk macb_clk = {
.name = "macb_clk", .name = "pclk",
.pmc_mask = 1 << AT91SAM9260_ID_EMAC, .pmc_mask = 1 << AT91SAM9260_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
...@@ -190,6 +190,8 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -190,6 +190,8 @@ static struct clk *periph_clocks[] __initdata = {
}; };
static struct clk_lookup periph_clocks_lookups[] = { static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
......
...@@ -118,7 +118,7 @@ static struct clk pwm_clk = { ...@@ -118,7 +118,7 @@ static struct clk pwm_clk = {
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
static struct clk macb_clk = { static struct clk macb_clk = {
.name = "macb_clk", .name = "pclk",
.pmc_mask = 1 << AT91SAM9263_ID_EMAC, .pmc_mask = 1 << AT91SAM9263_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
...@@ -182,6 +182,8 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -182,6 +182,8 @@ static struct clk *periph_clocks[] __initdata = {
}; };
static struct clk_lookup periph_clocks_lookups[] = { static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk), CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
......
...@@ -150,7 +150,7 @@ static struct clk ac97_clk = { ...@@ -150,7 +150,7 @@ static struct clk ac97_clk = {
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
static struct clk macb_clk = { static struct clk macb_clk = {
.name = "macb_clk", .name = "pclk",
.pmc_mask = 1 << AT91SAM9G45_ID_EMAC, .pmc_mask = 1 << AT91SAM9G45_ID_EMAC,
.type = CLK_TYPE_PERIPHERAL, .type = CLK_TYPE_PERIPHERAL,
}; };
...@@ -209,6 +209,8 @@ static struct clk *periph_clocks[] __initdata = { ...@@ -209,6 +209,8 @@ static struct clk *periph_clocks[] __initdata = {
}; };
static struct clk_lookup periph_clocks_lookups[] = { static struct clk_lookup periph_clocks_lookups[] = {
/* One additional fake clock for macb_hclk */
CLKDEV_CON_ID("hclk", &macb_clk),
/* One additional fake clock for ohci */ /* One additional fake clock for ohci */
CLKDEV_CON_ID("ohci_clk", &uhphs_clk), CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci", &uhphs_clk), CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci", &uhphs_clk),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册