Commit d25f01fb authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

powerpc/83xx: Fix style problems in usb.c and remove unneccessary includes from mpc83xx.h



Replace printk(KERN_WARN with pr_warn(

Remove a couple of blank lines

Re-align multi-line code.

Replace asm/io.h by linux/io.h

mpc83xx.h doesn't need linux/device.h or asm/pci-bridge.h

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/2cb498f637e082a4af8032311fad3cae84d6aa5d.1692199324.git.christophe.leroy@csgroup.eu
parent 6960c53c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -3,8 +3,6 @@
#define __MPC83XX_H__

#include <linux/init.h>
#include <linux/device.h>
#include <asm/pci-bridge.h>

/* System Clock Control Register */
#define MPC83XX_SCCR_OFFS          0xA08
+15 −20
Original line number Diff line number Diff line
@@ -6,19 +6,17 @@
 * Author: Li Yang
 */


#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/io.h>

#include <asm/io.h>
#include <sysdev/fsl_soc.h>

#include "mpc83xx.h"


#ifdef CONFIG_PPC_MPC834x
int __init mpc834x_usb_cfg(void)
{
@@ -44,8 +42,8 @@ int __init mpc834x_usb_cfg(void)

		prop = of_get_property(np, "phy_type", NULL);
		port1_is_dr = 1;
		if (prop && (!strcmp(prop, "utmi") ||
					!strcmp(prop, "utmi_wide"))) {
		if (prop &&
		    (!strcmp(prop, "utmi") || !strcmp(prop, "utmi_wide"))) {
			sicrl |= MPC834X_SICRL_USB0 | MPC834X_SICRL_USB1;
			sicrh |= MPC834X_SICRH_USB_UTMI;
			port0_is_dr = 1;
@@ -60,7 +58,7 @@ int __init mpc834x_usb_cfg(void)
		} else if (prop && !strcmp(prop, "ulpi")) {
			sicrl |= MPC834X_SICRL_USB1;
		} else {
			printk(KERN_WARNING "834x USB PHY type not supported\n");
			pr_warn("834x USB PHY type not supported\n");
		}
		of_node_put(np);
	}
@@ -71,15 +69,13 @@ int __init mpc834x_usb_cfg(void)
		prop = of_get_property(np, "port0", NULL);
		if (prop) {
			if (port0_is_dr)
				printk(KERN_WARNING
					"834x USB port0 can't be used by both DR and MPH!\n");
				pr_warn("834x USB port0 can't be used by both DR and MPH!\n");
			sicrl &= ~MPC834X_SICRL_USB0;
		}
		prop = of_get_property(np, "port1", NULL);
		if (prop) {
			if (port1_is_dr)
				printk(KERN_WARNING
					"834x USB port1 can't be used by both DR and MPH!\n");
				pr_warn("834x USB port1 can't be used by both DR and MPH!\n");
			sicrl &= ~MPC834X_SICRL_USB1;
		}
		of_node_put(np);
@@ -169,8 +165,7 @@ int __init mpc831x_usb_cfg(void)
	usb_regs = ioremap(res.start, resource_size(&res));

	/* Using on-chip PHY */
	if (prop && (!strcmp(prop, "utmi_wide") ||
		     !strcmp(prop, "utmi"))) {
	if (prop && (!strcmp(prop, "utmi_wide") || !strcmp(prop, "utmi"))) {
		u32 refsel;

		if (of_device_is_compatible(immr_node, "fsl,mpc8308-immr"))
@@ -197,7 +192,7 @@ int __init mpc831x_usb_cfg(void)
#endif /* CONFIG_USB_OTG */
		out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, temp);
	} else {
		printk(KERN_WARNING "831x USB PHY type not supported\n");
		pr_warn("831x USB PHY type not supported\n");
		ret = -EINVAL;
	}

@@ -224,7 +219,7 @@ int __init mpc837x_usb_cfg(void)
	prop = of_get_property(np, "phy_type", NULL);

	if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) {
		printk(KERN_WARNING "837x USB PHY type not supported\n");
		pr_warn("837x USB PHY type not supported\n");
		of_node_put(np);
		return -EINVAL;
	}