mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
net: smc911x: Drop weak alias from 32bit accessors
These accessors are not overridden by any board, and even if they were, this is something which should be handled via DM now, so remove the weak alias option. Moreover, drop the inline keyword, as the compiler can decide better. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
eb46efa381
commit
f0d73f5cd0
2 changed files with 9 additions and 21 deletions
|
@ -44,28 +44,22 @@ static const struct chip_id chip_ids[] = {
|
|||
#endif
|
||||
|
||||
#if defined (CONFIG_SMC911X_32_BIT)
|
||||
static inline u32 __smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
static u32 smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
{
|
||||
return *(volatile u32*)(dev->iobase + offset);
|
||||
}
|
||||
u32 smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
__attribute__((weak, alias("__smc911x_reg_read")));
|
||||
|
||||
static inline void __smc911x_reg_write(struct eth_device *dev,
|
||||
u32 offset, u32 val)
|
||||
static void smc911x_reg_write(struct eth_device *dev, u32 offset, u32 val)
|
||||
{
|
||||
*(volatile u32*)(dev->iobase + offset) = val;
|
||||
}
|
||||
void smc911x_reg_write(struct eth_device *dev, u32 offset, u32 val)
|
||||
__attribute__((weak, alias("__smc911x_reg_write")));
|
||||
#elif defined (CONFIG_SMC911X_16_BIT)
|
||||
static inline u32 smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
static u32 smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
{
|
||||
volatile u16 *addr_16 = (u16 *)(dev->iobase + offset);
|
||||
return ((*addr_16 & 0x0000ffff) | (*(addr_16 + 1) << 16));
|
||||
}
|
||||
static inline void smc911x_reg_write(struct eth_device *dev,
|
||||
u32 offset, u32 val)
|
||||
static void smc911x_reg_write(struct eth_device *dev, u32 offset, u32 val)
|
||||
{
|
||||
*(volatile u16 *)(dev->iobase + offset) = (u16)val;
|
||||
*(volatile u16 *)(dev->iobase + offset + 2) = (u16)(val >> 16);
|
||||
|
|
|
@ -51,28 +51,22 @@ static const struct chip_id chip_ids[] = {
|
|||
};
|
||||
|
||||
#if defined (CONFIG_SMC911X_32_BIT)
|
||||
static inline u32 __smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
static u32 smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
{
|
||||
return *(volatile u32*)(dev->iobase + offset);
|
||||
}
|
||||
u32 smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
__attribute__((weak, alias("__smc911x_reg_read")));
|
||||
|
||||
static inline void __smc911x_reg_write(struct eth_device *dev,
|
||||
u32 offset, u32 val)
|
||||
static void smc911x_reg_write(struct eth_device *dev, u32 offset, u32 val)
|
||||
{
|
||||
*(volatile u32*)(dev->iobase + offset) = val;
|
||||
}
|
||||
void smc911x_reg_write(struct eth_device *dev, u32 offset, u32 val)
|
||||
__attribute__((weak, alias("__smc911x_reg_write")));
|
||||
#elif defined (CONFIG_SMC911X_16_BIT)
|
||||
static inline u32 smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
static u32 smc911x_reg_read(struct eth_device *dev, u32 offset)
|
||||
{
|
||||
volatile u16 *addr_16 = (u16 *)(dev->iobase + offset);
|
||||
return ((*addr_16 & 0x0000ffff) | (*(addr_16 + 1) << 16));
|
||||
return (*addr_16 & 0x0000ffff) | (*(addr_16 + 1) << 16);
|
||||
}
|
||||
static inline void smc911x_reg_write(struct eth_device *dev,
|
||||
u32 offset, u32 val)
|
||||
static void smc911x_reg_write(struct eth_device *dev, u32 offset, u32 val)
|
||||
{
|
||||
*(volatile u16 *)(dev->iobase + offset) = (u16)val;
|
||||
*(volatile u16 *)(dev->iobase + offset + 2) = (u16)(val >> 16);
|
||||
|
|
Loading…
Reference in a new issue