Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1409122
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/7] net:mdio-mux: Add MDIO mux driver for iProc SoCs |
| Date | 2016-05-30 15:40 +0200 |
| Message-ID | <rEvAe-4Ni-17@gated-at.bofh.it> (permalink) |
| References | <rEpEt-11J-3@gated-at.bofh.it> <rEpEt-11J-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 30, 2016 at 12:40:49PM +0530, Pramod Kumar wrote:
> iProc based SoCs supports the integrated mdio multiplexer which
> has the bus selection as well as mdio transaction generation logic
> inside.
Hi Pramod
Great to see you using the existing MDIO framework. Thanks.
> +static int mdio_mux_iproc_switch_fn(int current_child, int desired_child,
> + void *data)
> +{
> + struct iproc_mdiomux_desc *md = data;
> + struct mdiomux_bus_param *bp = &md->bus_param[desired_child];
> + u32 param, bus_id;
> + bool bus_dir;
> +
> + /* select bus and its properties */
> + bus_dir = (desired_child < EXT_BUS_START_ADDR);
> + bus_id = bus_dir ? desired_child : (desired_child - EXT_BUS_START_ADDR);
> +
> + param = (bus_dir ? 1 : 0) << MDIO_PARAM_INTERNAL_SEL;
> + param |= (bp->is_c45 ? 1 : 0) << MDIO_PARAM_C45_SEL;
> + param |= (bus_id << MDIO_PARAM_BUS_ID);
> +
> + writel(param, md->base + MDIO_PARAM_OFFSET);
> + return 0;
> +}
What i don't yet see is why you went for the concept of an integrated
MDIO and MUX. This function above is the mux function, and it looks
like it could be used to implement a standard mdio-mux driver.
Thanks
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 5/7] net:mdio-mux: Add MDIO mux driver for iProc SoCs Pramod Kumar <pramod.kumar@broadcom.com> - 2016-05-30 09:20 +0200
Re: [PATCH 5/7] net:mdio-mux: Add MDIO mux driver for iProc SoCs Andrew Lunn <andrew@lunn.ch> - 2016-05-30 15:40 +0200
RE: [PATCH 5/7] net:mdio-mux: Add MDIO mux driver for iProc SoCs Pramod Kumar <pramod.kumar@broadcom.com> - 2016-05-30 16:40 +0200
csiph-web