* [PATCH] net: Use phys_addr_t for SMC net device addresses
@ 2021-07-09 9:52 Peter Hoyes
2021-07-10 5:38 ` Ramon Fried
2021-07-11 22:29 ` Andre Przywara
0 siblings, 2 replies; 4+ messages in thread
From: Peter Hoyes @ 2021-07-09 9:52 UTC (permalink / raw)
To: u-boot; +Cc: Joe Hershberger, Ramon Fried, Peter Hoyes
From: Peter Hoyes <Peter.Hoyes@arm.com>
Use same type as eth_device->iobase and support addresses greater
than INT_MAX.
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
---
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);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] net: Use phys_addr_t for SMC net device addresses
2021-07-09 9:52 [PATCH] net: Use phys_addr_t for SMC net device addresses Peter Hoyes
@ 2021-07-10 5:38 ` Ramon Fried
2021-07-11 22:29 ` Andre Przywara
1 sibling, 0 replies; 4+ messages in thread
From: Ramon Fried @ 2021-07-10 5:38 UTC (permalink / raw)
To: Peter Hoyes; +Cc: U-Boot Mailing List, Joe Hershberger
On Fri, Jul 9, 2021 at 12:53 PM Peter Hoyes <peter.hoyes@arm.com> wrote:
>
> From: Peter Hoyes <Peter.Hoyes@arm.com>
>
> Use same type as eth_device->iobase and support addresses greater
> than INT_MAX.
>
> Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
> ---
> 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);
> --
> 2.25.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] net: Use phys_addr_t for SMC net device addresses
2021-07-09 9:52 [PATCH] net: Use phys_addr_t for SMC net device addresses Peter Hoyes
2021-07-10 5:38 ` Ramon Fried
@ 2021-07-11 22:29 ` Andre Przywara
2021-07-22 18:55 ` Ramon Fried
1 sibling, 1 reply; 4+ messages in thread
From: Andre Przywara @ 2021-07-11 22:29 UTC (permalink / raw)
To: Peter Hoyes; +Cc: u-boot, Joe Hershberger, Ramon Fried
On Fri, 9 Jul 2021 10:52:06 +0100
Peter Hoyes <peter.hoyes@arm.com> wrote:
> From: Peter Hoyes <Peter.Hoyes@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@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@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);
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] net: Use phys_addr_t for SMC net device addresses
2021-07-11 22:29 ` Andre Przywara
@ 2021-07-22 18:55 ` Ramon Fried
0 siblings, 0 replies; 4+ messages in thread
From: Ramon Fried @ 2021-07-22 18:55 UTC (permalink / raw)
To: Andre Przywara; +Cc: Peter Hoyes, U-Boot Mailing List, Joe Hershberger
On Mon, Jul 12, 2021 at 1:29 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Fri, 9 Jul 2021 10:52:06 +0100
> Peter Hoyes <peter.hoyes@arm.com> wrote:
>
> > From: Peter Hoyes <Peter.Hoyes@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@arm.com>
>
> Reviewed-by: Andre Przywara <andre.przywara@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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-22 18:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-09 9:52 [PATCH] net: Use phys_addr_t for SMC net device addresses Peter Hoyes
2021-07-10 5:38 ` Ramon Fried
2021-07-11 22:29 ` Andre Przywara
2021-07-22 18:55 ` Ramon Fried
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox