[PATCH] net: Use phys_addr_t for SMC net device addresses

Ramon Fried rfried.dev at gmail.com
Thu Jul 22 20:55:59 CEST 2021


On Mon, Jul 12, 2021 at 1:29 AM Andre Przywara <andre.przywara at arm.com> wrote:
>
> On Fri,  9 Jul 2021 10:52:06 +0100
> Peter Hoyes <peter.hoyes at arm.com> wrote:
>
> > From: Peter Hoyes <Peter.Hoyes at arm.com>
> >
> > Use same type as eth_device->iobase and support addresses greater
> > than INT_MAX.
>
> Indeed, a signed(!) int is really a poor choice for a base address.
>
> > Signed-off-by: Peter Hoyes <Peter.Hoyes at arm.com>
>
> Reviewed-by: Andre Przywara <andre.przywara at arm.com>
>
> Cheers,
> Andre
>
> > ---
> >  drivers/net/smc91111.c | 2 +-
> >  drivers/net/smc911x.c  | 2 +-
> >  include/netdev.h       | 4 ++--
> >  3 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
> > index ec4e8e928c..61d7f3df69 100644
> > --- a/drivers/net/smc91111.c
> > +++ b/drivers/net/smc91111.c
> > @@ -1269,7 +1269,7 @@ static void print_packet( byte * buf, int length )
> >  }
> >  #endif
> >
> > -int smc91111_initialize(u8 dev_num, int base_addr)
> > +int smc91111_initialize(u8 dev_num, phys_addr_t base_addr)
> >  {
> >       struct smc91111_priv *priv;
> >       struct eth_device *dev;
> > diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
> > index 3afebee440..8f420261fa 100644
> > --- a/drivers/net/smc911x.c
> > +++ b/drivers/net/smc911x.c
> > @@ -478,7 +478,7 @@ static int smc911x_recv(struct eth_device *dev)
> >       return ret;
> >  }
> >
> > -int smc911x_initialize(u8 dev_num, int base_addr)
> > +int smc911x_initialize(u8 dev_num, phys_addr_t base_addr)
> >  {
> >       struct smc911x_priv *priv;
> >       int ret;
> > diff --git a/include/netdev.h b/include/netdev.h
> > index b960c42106..00a0993a83 100644
> > --- a/include/netdev.h
> > +++ b/include/netdev.h
> > @@ -70,8 +70,8 @@ int rtl8169_initialize(struct bd_info *bis);
> >  int scc_initialize(struct bd_info *bis);
> >  int sh_eth_initialize(struct bd_info *bis);
> >  int skge_initialize(struct bd_info *bis);
> > -int smc91111_initialize(u8 dev_num, int base_addr);
> > -int smc911x_initialize(u8 dev_num, int base_addr);
> > +int smc91111_initialize(u8 dev_num, phys_addr_t base_addr);
> > +int smc911x_initialize(u8 dev_num, phys_addr_t base_addr);
> >  int uec_standard_init(struct bd_info *bis);
> >  int uli526x_initialize(struct bd_info *bis);
> >  int armada100_fec_register(unsigned long base_addr);
>
Applied to u-boot-net/network-master
Thanks,
Ramon.


More information about the U-Boot mailing list