usb: ohci: nxp: remove direct access to clock controller registers
authorVladimir Zapolskiy <vz@mleia.com>
Thu, 3 Mar 2016 04:19:35 +0000 (06:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Mar 2016 04:38:53 +0000 (20:38 -0800)
Direct access to clock control registers can be safely removed, the
task of clock management is done by platform clock driver based on
common clock framework.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-nxp.c

index ebacf97fc406653783da1e7888674a0b2383e4f9..87588fc21ec7de64870e2a1ecadb283569107c4c 100644 (file)
 #include <mach/hardware.h>
 
 #define USB_CONFIG_BASE                0x31020000
-#define PWRMAN_BASE            0x40004000
-
-#define USB_CTRL               IO_ADDRESS(PWRMAN_BASE + 0x64)
-
-/* USB_CTRL bit defines */
-#define USB_SLAVE_HCLK_EN      (1 << 24)
-#define USB_DEV_NEED_CLK_EN    (1 << 22)
-#define USB_HOST_NEED_CLK_EN   (1 << 21)
-#define PAD_CONTROL_LAST_DRIVEN        (1 << 19)
-
 #define USB_OTG_STAT_CONTROL   IO_ADDRESS(USB_CONFIG_BASE + 0x110)
 
 /* USB_OTG_STAT_CONTROL bit defines */
@@ -110,9 +100,6 @@ static void isp1301_configure_lpc32xx(void)
        i2c_smbus_write_byte_data(isp1301_i2c_client,
                ISP1301_I2C_INTERRUPT_RISING | ISP1301_I2C_REG_CLEAR_ADDR, ~0);
 
-       /* Enable usb_need_clk clock after transceiver is initialized */
-       __raw_writel(__raw_readl(USB_CTRL) | USB_HOST_NEED_CLK_EN, USB_CTRL);
-
        printk(KERN_INFO "ISP1301 Vendor ID  : 0x%04x\n",
              i2c_smbus_read_word_data(isp1301_i2c_client, 0x00));
        printk(KERN_INFO "ISP1301 Product ID : 0x%04x\n",
@@ -185,9 +172,6 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
                goto fail_disable;
        }
 
-       /* Enable AHB slave USB clock, needed for further USB clock control */
-       __raw_writel(USB_SLAVE_HCLK_EN | PAD_CONTROL_LAST_DRIVEN, USB_CTRL);
-
        /* Enable USB PLL */
        usb_pll_clk = devm_clk_get(&pdev->dev, "ck_pll5");
        if (IS_ERR(usb_pll_clk)) {
@@ -230,8 +214,6 @@ static int ohci_hcd_nxp_probe(struct platform_device *pdev)
                goto fail_otg;
        }
 
-       __raw_writel(__raw_readl(USB_CTRL) | USB_HOST_NEED_CLK_EN, USB_CTRL);
-
        ret = clk_prepare_enable(usb_otg_clk);
        if (ret < 0) {
                dev_err(&pdev->dev, "failed to start USB DEV Clock\n");