Re: [PATCH 1/7] net: dsa: add new driver for ar8xxx family

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> +static int ar8xxx_set_pad_ctrl(struct dsa_switch *ds, int port, int mode)
> +{
> +	int reg;
> +
> +	switch (port) {
> +	case 0:
> +		reg = AR8327_REG_PORT0_PAD_CTRL;
> +		break;
> +	case 6:
> +		reg = AR8327_REG_PORT6_PAD_CTRL;
> +		break;
> +	default:
> +		pr_err("Can't set PAD_CTRL on port %d\n", port);
> +		return -EINVAL;
> +	}
> +
> +	/* DSA only supports 1 CPU port for now, so we'll take the assumption
> +	 * that P0 is connected to the CPU master_dev.
> +	 */

I don't like this assumption. Hardware i have with Marvell switches
has the CPU connected to ports 5, or 6, or 0.

Calling dsa_upstream_port() will tell you which is the CPU port.

	Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux