Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-23 Thread Lars Povlsen
Alexandre Belloni writes: > On 22/12/2020 16:01:22+0100, Andrew Lunn wrote: >> > The problem is that the switch core reset also affects (reset) the >> > SGPIO controller. >> > >> > We tried to put this in the reset driver, but it was rejected. If the >> > reset is done at probe time, the SGPIO d

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-23 Thread Steen Hegelund
On 22.12.2020 16:01, Andrew Lunn wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > +static void sparx5_board_init(struct sparx5 *sparx5) > > +{ > > + int idx; > > + > > + if (!sparx5->sd_sgpio_remapping) > > + return; > >

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-22 Thread Steen Hegelund
Hi Andrew, On Sat, 2020-12-19 at 20:11 +0100, Andrew Lunn wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > On Thu, Dec 17, 2020 at 08:51:28AM +0100, Steen Hegelund wrote: > > > +static struct sparx5_io_resource sparx5_iomap[] =  { > > Thi

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-22 Thread Alexandre Belloni
On 22/12/2020 16:01:22+0100, Andrew Lunn wrote: > > The problem is that the switch core reset also affects (reset) the > > SGPIO controller. > > > > We tried to put this in the reset driver, but it was rejected. If the > > reset is done at probe time, the SGPIO driver may already have > > initiali

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-22 Thread Andrew Lunn
> > > +static void sparx5_board_init(struct sparx5 *sparx5) > > > +{ > > > + int idx; > > > + > > > + if (!sparx5->sd_sgpio_remapping) > > > + return; > > > + > > > + /* Enable SGPIO Signal Detect remapping */ > > > + spx5_rmw(GCB_HW_SGPIO_SD_CFG_SD_MAP_SEL, > > > + 

Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver

2020-12-19 Thread Andrew Lunn
On Thu, Dec 17, 2020 at 08:51:28AM +0100, Steen Hegelund wrote: > +static struct sparx5_io_resource sparx5_iomap[] = { This could be made const i think,. > + { TARGET_DEV2G5, 0, 0 }, /* 0x610004000: dev2g5_0 */ > + { TARGET_DEV5G, 0x4000,0 }, /* 0x610008000: