Commit d64a1fd8 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge branch 'lpc32xx/multiplatform' into arm/soc



I revisited some older patches here, getting two of the remaining
ARM platforms to build with ARCH_MULTIPLATFORM like most others do.

In case of lpc32xx, I created a new set of patches, which seemed
easier than digging out what I did for an older release many
years ago.

* lpc32xx/multiplatform:
  ARM: lpc32xx: allow multiplatform build
  ARM: lpc32xx: clean up header files
  serial: lpc32xx: allow compile testing
  net: lpc-enet: allow compile testing
  net: lpc-enet: fix printk format strings
  net: lpc-enet: fix badzero.cocci warnings
  net: lpc-enet: move phy setup into platform code
  net: lpc-enet: factor out iram access
  gpio: lpc32xx: allow building on non-lpc32xx targets
  serial: lpc32xx_hs: allow compile-testing
  watchdog: pnx4008_wdt: allow compile-testing
  usb: udc: lpc32xx: allow compile-testing
  usb: ohci-nxp: enable compile-testing

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 3584be9e 75bf1bd7
Loading
Loading
Loading
Loading
+2 −15
Original line number Diff line number Diff line
@@ -424,21 +424,6 @@ config ARCH_DOVE
	help
	  Support for the Marvell Dove SoC 88AP510

config ARCH_LPC32XX
	bool "NXP LPC32XX"
	select ARM_AMBA
	select CLKDEV_LOOKUP
	select CLKSRC_LPC32XX
	select COMMON_CLK
	select CPU_ARM926T
	select GENERIC_CLOCKEVENTS
	select GENERIC_IRQ_MULTI_HANDLER
	select GPIOLIB
	select SPARSE_IRQ
	select USE_OF
	help
	  Support for the NXP LPC32XX family of processors

config ARCH_PXA
	bool "PXA2xx/PXA3xx-based"
	depends on MMU
@@ -686,6 +671,8 @@ source "arch/arm/mach-ixp4xx/Kconfig"

source "arch/arm/mach-keystone/Kconfig"

source "arch/arm/mach-lpc32xx/Kconfig"

source "arch/arm/mach-mediatek/Kconfig"

source "arch/arm/mach-meson/Kconfig"
+2 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_LPC32XX=y
CONFIG_AEABI=y
CONFIG_ZBOOT_ROM_TEXT=0x0
@@ -93,6 +94,7 @@ CONFIG_SERIAL_HS_LPC32XX_CONSOLE=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_PNX=y
CONFIG_GPIO_LPC32XX=y
CONFIG_SPI=y
CONFIG_SPI_PL022=y
CONFIG_GPIO_SYSFS=y
+11 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only

config ARCH_LPC32XX
	bool "NXP LPC32XX"
	depends on ARCH_MULTI_V5
	select ARM_AMBA
	select CLKSRC_LPC32XX
	select CPU_ARM926T
	select GPIOLIB
	help
	  Support for the NXP LPC32XX family of processors
+20 −4
Original line number Diff line number Diff line
@@ -8,12 +8,12 @@
 */

#include <linux/init.h>
#include <linux/soc/nxp/lpc32xx-misc.h>

#include <asm/mach/map.h>
#include <asm/system_info.h>

#include <mach/hardware.h>
#include <mach/platform.h>
#include "lpc32xx.h"
#include "common.h"

/*
@@ -32,7 +32,7 @@ void lpc32xx_get_uid(u32 devid[4])
 */
#define LPC32XX_IRAM_BANK_SIZE SZ_128K
static u32 iram_size;
u32 lpc32xx_return_iram_size(void)
u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr)
{
	if (iram_size == 0) {
		u32 savedval1, savedval2;
@@ -53,10 +53,26 @@ u32 lpc32xx_return_iram_size(void)
		} else
			iram_size = LPC32XX_IRAM_BANK_SIZE * 2;
	}
	if (dmaaddr)
		*dmaaddr = LPC32XX_IRAM_BASE;
	if (mapbase)
		*mapbase = io_p2v(LPC32XX_IRAM_BASE);

	return iram_size;
}
EXPORT_SYMBOL_GPL(lpc32xx_return_iram_size);
EXPORT_SYMBOL_GPL(lpc32xx_return_iram);

void lpc32xx_set_phy_interface_mode(phy_interface_t mode)
{
	u32 tmp = __raw_readl(LPC32XX_CLKPWR_MACCLK_CTRL);
	tmp &= ~LPC32XX_CLKPWR_MACCTRL_PINS_MSK;
	if (mode == PHY_INTERFACE_MODE_MII)
		tmp |= LPC32XX_CLKPWR_MACCTRL_USE_MII_PINS;
	else
		tmp |= LPC32XX_CLKPWR_MACCTRL_USE_RMII_PINS;
	__raw_writel(tmp, LPC32XX_CLKPWR_MACCLK_CTRL);
}
EXPORT_SYMBOL_GPL(lpc32xx_set_phy_interface_mode);

static struct map_desc lpc32xx_io_desc[] __initdata = {
	{
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ extern void __init lpc32xx_serial_init(void);
 */
extern void lpc32xx_get_uid(u32 devid[4]);

extern u32 lpc32xx_return_iram_size(void);
/*
 * Pointers used for sizing and copying suspend function data
 */
Loading