ARM: davinci: da8xx: add new USB PHY clock init using common clock framework
This adds the new USB PHY clock init in mach-davinci/usb-da8xx.c using the new common clock framework drivers. The #ifdefs are needed to prevent compile errors until the entire ARCH_DAVINCI is converted. Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Bu işleme şunda yer alıyor:

işlemeyi yapan:
Sekhar Nori

ebeveyn
81df7d8536
işleme
5411bad4ea
@@ -2,29 +2,35 @@
|
||||
/*
|
||||
* DA8xx USB
|
||||
*/
|
||||
#include <linux/clk.h>
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mfd/da8xx-cfgchip.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/platform_data/clk-da8xx-cfgchip.h>
|
||||
#include <linux/platform_data/phy-da8xx-usb.h>
|
||||
#include <linux/platform_data/usb-davinci.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/usb/musb.h>
|
||||
|
||||
#include <mach/clock.h>
|
||||
#include <mach/common.h>
|
||||
#include <mach/cputype.h>
|
||||
#include <mach/da8xx.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#ifndef CONFIG_COMMON_CLK
|
||||
#include <mach/clock.h>
|
||||
#include "clock.h"
|
||||
#endif
|
||||
|
||||
#define DA8XX_USB0_BASE 0x01e00000
|
||||
#define DA8XX_USB1_BASE 0x01e25000
|
||||
|
||||
#ifndef CONFIG_COMMON_CLK
|
||||
static struct clk *usb20_clk;
|
||||
#endif
|
||||
|
||||
static struct da8xx_usb_phy_platform_data da8xx_usb_phy_pdata;
|
||||
|
||||
@@ -134,6 +140,7 @@ int __init da8xx_register_usb11(struct da8xx_ohci_root_hub *pdata)
|
||||
return platform_device_register(&da8xx_usb11_device);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_COMMON_CLK
|
||||
static struct clk usb_refclkin = {
|
||||
.name = "usb_refclkin",
|
||||
.set_rate = davinci_simple_set_rate,
|
||||
@@ -360,3 +367,18 @@ int __init da8xx_register_usb11_phy_clk(bool use_usb_refclkin)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
static struct platform_device da8xx_usb_phy_clks_device = {
|
||||
.name = "da830-usb-phy-clks",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
int __init da8xx_register_usb_phy_clocks(void)
|
||||
{
|
||||
struct da8xx_cfgchip_clk_platform_data pdata;
|
||||
|
||||
pdata.cfgchip = da8xx_get_cfgchip();
|
||||
da8xx_usb_phy_clks_device.dev.platform_data = &pdata;
|
||||
|
||||
return platform_device_register(&da8xx_usb_phy_clks_device);
|
||||
}
|
||||
|
Yeni konuda referans
Bir kullanıcı engelle