Files
android_kernel_xiaomi_sm8450/include/linux/soc/nxp/lpc32xx-misc.h
Arnd Bergmann ecca1a6277 net: lpc-enet: move phy setup into platform code
Setting the phy mode requires touching a platform specific
register, which prevents us from building the driver without
its header files.

Move it into a separate function in arch/arm/mach/lpc32xx
to hide the core registers from the network driver.

Link: https://lore.kernel.org/r/20190809144043.476786-8-arnd@arndb.de
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2019-08-15 21:33:52 +02:00

30 lines
679 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Author: Kevin Wells <kevin.wells@nxp.com>
*
* Copyright (C) 2010 NXP Semiconductors
*/
#ifndef __SOC_LPC32XX_MISC_H
#define __SOC_LPC32XX_MISC_H
#include <linux/types.h>
#include <linux/phy.h>
#ifdef CONFIG_ARCH_LPC32XX
extern u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr);
extern void lpc32xx_set_phy_interface_mode(phy_interface_t mode);
#else
static inline u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr)
{
*mapbase = NULL;
*dmaaddr = 0;
return 0;
}
static inline void lpc32xx_set_phy_interface_mode(phy_interface_t mode)
{
}
#endif
#endif /* __SOC_LPC32XX_MISC_H */