Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Bring in the 'net' tree so that we can get some ipv4/ipv6 bug fixes that some net-next work will build upon. Signed-off-by: David S. Miller <davem@davemloft.net>
Esse commit está contido em:
@@ -1153,15 +1153,15 @@ static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts)
|
||||
pr_err("%s: unmapped value: %lu\n", opts, value);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
else if (!memcmp(opts, "gid", 3))
|
||||
} else if (!memcmp(opts, "gid", 3)) {
|
||||
data->perms.gid = make_kgid(current_user_ns(), value);
|
||||
if (!gid_valid(data->perms.gid)) {
|
||||
pr_err("%s: unmapped value: %lu\n", opts, value);
|
||||
return -EINVAL;
|
||||
}
|
||||
else
|
||||
} else {
|
||||
goto invalid;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@@ -18,14 +18,13 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
static struct clk *mxc_ahb_clk;
|
||||
static struct clk *mxc_per_clk;
|
||||
static struct clk *mxc_ipg_clk;
|
||||
|
||||
/* workaround ENGcm09152 for i.MX35 */
|
||||
#define USBPHYCTRL_OTGBASE_OFFSET 0x608
|
||||
#define MX35_USBPHYCTRL_OFFSET 0x600
|
||||
#define USBPHYCTRL_OTGBASE_OFFSET 0x8
|
||||
#define USBPHYCTRL_EVDO (1 << 23)
|
||||
|
||||
int fsl_udc_clk_init(struct platform_device *pdev)
|
||||
@@ -59,7 +58,7 @@ int fsl_udc_clk_init(struct platform_device *pdev)
|
||||
clk_prepare_enable(mxc_per_clk);
|
||||
|
||||
/* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */
|
||||
if (!cpu_is_mx51()) {
|
||||
if (!strcmp(pdev->id_entry->name, "imx-udc-mx27")) {
|
||||
freq = clk_get_rate(mxc_per_clk);
|
||||
if (pdata->phy_mode != FSL_USB2_PHY_ULPI &&
|
||||
(freq < 59999000 || freq > 60001000)) {
|
||||
@@ -79,27 +78,40 @@ eclkrate:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fsl_udc_clk_finalize(struct platform_device *pdev)
|
||||
int fsl_udc_clk_finalize(struct platform_device *pdev)
|
||||
{
|
||||
struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
|
||||
if (cpu_is_mx35()) {
|
||||
unsigned int v;
|
||||
int ret = 0;
|
||||
|
||||
/* workaround ENGcm09152 for i.MX35 */
|
||||
if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) {
|
||||
v = readl(MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
|
||||
USBPHYCTRL_OTGBASE_OFFSET));
|
||||
writel(v | USBPHYCTRL_EVDO,
|
||||
MX35_IO_ADDRESS(MX35_USB_BASE_ADDR +
|
||||
USBPHYCTRL_OTGBASE_OFFSET));
|
||||
/* workaround ENGcm09152 for i.MX35 */
|
||||
if (pdata->workaround & FLS_USB2_WORKAROUND_ENGCM09152) {
|
||||
unsigned int v;
|
||||
struct resource *res = platform_get_resource
|
||||
(pdev, IORESOURCE_MEM, 0);
|
||||
void __iomem *phy_regs = ioremap(res->start +
|
||||
MX35_USBPHYCTRL_OFFSET, 512);
|
||||
if (!phy_regs) {
|
||||
dev_err(&pdev->dev, "ioremap for phy address fails\n");
|
||||
ret = -EINVAL;
|
||||
goto ioremap_err;
|
||||
}
|
||||
|
||||
v = readl(phy_regs + USBPHYCTRL_OTGBASE_OFFSET);
|
||||
writel(v | USBPHYCTRL_EVDO,
|
||||
phy_regs + USBPHYCTRL_OTGBASE_OFFSET);
|
||||
|
||||
iounmap(phy_regs);
|
||||
}
|
||||
|
||||
|
||||
ioremap_err:
|
||||
/* ULPI transceivers don't need usbpll */
|
||||
if (pdata->phy_mode == FSL_USB2_PHY_ULPI) {
|
||||
clk_disable_unprepare(mxc_per_clk);
|
||||
mxc_per_clk = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fsl_udc_clk_release(void)
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include <linux/fsl_devices.h>
|
||||
#include <linux/dmapool.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/of_device.h>
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/io.h>
|
||||
@@ -2438,11 +2439,6 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
|
||||
unsigned int i;
|
||||
u32 dccparams;
|
||||
|
||||
if (strcmp(pdev->name, driver_name)) {
|
||||
VDBG("Wrong device");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
udc_controller = kzalloc(sizeof(struct fsl_udc), GFP_KERNEL);
|
||||
if (udc_controller == NULL) {
|
||||
ERR("malloc udc failed\n");
|
||||
@@ -2547,7 +2543,9 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
|
||||
dr_controller_setup(udc_controller);
|
||||
}
|
||||
|
||||
fsl_udc_clk_finalize(pdev);
|
||||
ret = fsl_udc_clk_finalize(pdev);
|
||||
if (ret)
|
||||
goto err_free_irq;
|
||||
|
||||
/* Setup gadget structure */
|
||||
udc_controller->gadget.ops = &fsl_gadget_ops;
|
||||
@@ -2756,22 +2754,32 @@ static int fsl_udc_otg_resume(struct device *dev)
|
||||
|
||||
return fsl_udc_resume(NULL);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
Register entry point for the peripheral controller driver
|
||||
--------------------------------------------------------------------------*/
|
||||
|
||||
static const struct platform_device_id fsl_udc_devtype[] = {
|
||||
{
|
||||
.name = "imx-udc-mx27",
|
||||
}, {
|
||||
.name = "imx-udc-mx51",
|
||||
}, {
|
||||
/* sentinel */
|
||||
}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, fsl_udc_devtype);
|
||||
static struct platform_driver udc_driver = {
|
||||
.remove = __exit_p(fsl_udc_remove),
|
||||
.remove = __exit_p(fsl_udc_remove),
|
||||
/* Just for FSL i.mx SoC currently */
|
||||
.id_table = fsl_udc_devtype,
|
||||
/* these suspend and resume are not usb suspend and resume */
|
||||
.suspend = fsl_udc_suspend,
|
||||
.resume = fsl_udc_resume,
|
||||
.driver = {
|
||||
.name = (char *)driver_name,
|
||||
.owner = THIS_MODULE,
|
||||
/* udc suspend/resume called from OTG driver */
|
||||
.suspend = fsl_udc_otg_suspend,
|
||||
.resume = fsl_udc_otg_resume,
|
||||
.suspend = fsl_udc_suspend,
|
||||
.resume = fsl_udc_resume,
|
||||
.driver = {
|
||||
.name = (char *)driver_name,
|
||||
.owner = THIS_MODULE,
|
||||
/* udc suspend/resume called from OTG driver */
|
||||
.suspend = fsl_udc_otg_suspend,
|
||||
.resume = fsl_udc_otg_resume,
|
||||
},
|
||||
};
|
||||
|
||||
|
@@ -592,15 +592,16 @@ static inline struct ep_queue_head *get_qh_by_ep(struct fsl_ep *ep)
|
||||
struct platform_device;
|
||||
#ifdef CONFIG_ARCH_MXC
|
||||
int fsl_udc_clk_init(struct platform_device *pdev);
|
||||
void fsl_udc_clk_finalize(struct platform_device *pdev);
|
||||
int fsl_udc_clk_finalize(struct platform_device *pdev);
|
||||
void fsl_udc_clk_release(void);
|
||||
#else
|
||||
static inline int fsl_udc_clk_init(struct platform_device *pdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void fsl_udc_clk_finalize(struct platform_device *pdev)
|
||||
static inline int fsl_udc_clk_finalize(struct platform_device *pdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void fsl_udc_clk_release(void)
|
||||
{
|
||||
|
Referência em uma nova issue
Block a user