blob: 3deb699ff135ce5121f1df3ad90e728a620ee63c [file] [log] [blame]
/*
* drivers/amlogic/usb/phy/phy-aml-usb.c
*
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
*/
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/amlogic/usb-gxbbtv.h>
#include <linux/amlogic/iomap.h>
/*#include <mach/am_regs.h>*/
#include "phy-aml-usb.h"
int amlogic_usbphy_reset(void)
{
static int init_count;
int i = 0;
if (!init_count) {
init_count++;
aml_cbus_update_bits(0x1102, 0x1<<2, 0x1<<2);
for (i = 0; i < 1000; i++)
udelay(500);
}
return 0;
}
EXPORT_SYMBOL_GPL(amlogic_usbphy_reset);