net: lpc-enet: factor out iram access
The lpc_eth driver uses a platform specific method to find the internal sram. This prevents building it on other machines. Rework to only use one function call and keep the other platform internals where they belong. Ideally this would look up the sram location from DT, but as this is a rarely used driver, I want to keep the modifications to a minimum. Link: https://lore.kernel.org/r/20190809144043.476786-7-arnd@arndb.de Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
24
include/linux/soc/nxp/lpc32xx-misc.h
Normal file
24
include/linux/soc/nxp/lpc32xx-misc.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* 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>
|
||||
|
||||
#ifdef CONFIG_ARCH_LPC32XX
|
||||
extern u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr);
|
||||
#else
|
||||
static inline u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr)
|
||||
{
|
||||
*mapbase = NULL;
|
||||
*dmaaddr = 0;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SOC_LPC32XX_MISC_H */
|
Reference in New Issue
Block a user