summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-02-13 20:31:47 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-13 20:31:47 +0100
commit2a17e75a976d11c1712972d29813094b8020ac35 (patch)
treeea0e991c927752937803d72a5411f7159365aa83 /arch/arm
parenta5f75fe8175aefec5b7cefaadc5359096c8eb22c (diff)
parent7185b353c96e1e831533eeaaada06ad9bebf84a2 (diff)
downloadbarebox-2a17e75a976d11c1712972d29813094b8020ac35.tar.gz
barebox-2a17e75a976d11c1712972d29813094b8020ac35.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boards/nxp-imx8mq-evk/ddr_init.c4
-rw-r--r--arch/arm/boards/qemu-virt64/Kconfig8
-rw-r--r--arch/arm/boards/wago-pfc-am35xx/board.c45
-rw-r--r--arch/arm/include/asm/types.h2
-rw-r--r--arch/arm/mach-at91/include/mach/sama5d3_matrix.h15
-rw-r--r--arch/arm/mach-imx/include/mach/clock-imx1.h5
-rw-r--r--arch/arm/mach-imx/include/mach/iomux-mx8.h2
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.c6
-rw-r--r--arch/arm/mach-mvebu/include/mach/dove.h23
-rw-r--r--arch/arm/mach-mvebu/include/mach/kirkwood.h22
-rw-r--r--arch/arm/mach-netx/include/mach/netx-devices.h73
-rw-r--r--arch/arm/mach-omap/Kconfig1
-rw-r--r--arch/arm/mach-omap/include/mach/am33xx-devices.h80
13 files changed, 51 insertions, 235 deletions
diff --git a/arch/arm/boards/nxp-imx8mq-evk/ddr_init.c b/arch/arm/boards/nxp-imx8mq-evk/ddr_init.c
index 44103b5e26..39addea973 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/ddr_init.c
+++ b/arch/arm/boards/nxp-imx8mq-evk/ddr_init.c
@@ -12,7 +12,7 @@ void ddr_cfg_phy(void);
void ddr_init(void)
{
volatile unsigned int tmp, tmp_t;
-
+
/** Initialize DDR clock and DDRC registers **/
reg32_write(0x3038a088,0x7070000);
reg32_write(0x3038a084,0x4030000);
@@ -177,7 +177,7 @@ void ddr_init(void)
reg32_write(DDRC_SWCTL(0), 0x0000);
/*
* ------------------- 9 -------------------
- * Set DFIMISC.dfi_init_start to 1
+ * Set DFIMISC.dfi_init_start to 1
* -----------------------------------------
*/
reg32_write(DDRC_DFIMISC(0), 0x00000030);
diff --git a/arch/arm/boards/qemu-virt64/Kconfig b/arch/arm/boards/qemu-virt64/Kconfig
deleted file mode 100644
index b7bee3a245..0000000000
--- a/arch/arm/boards/qemu-virt64/Kconfig
+++ /dev/null
@@ -1,8 +0,0 @@
-
-if MACH_QEMU
-
-config ARCH_TEXT_BASE
- hex
- default 0x40000000
-
-endif
diff --git a/arch/arm/boards/wago-pfc-am35xx/board.c b/arch/arm/boards/wago-pfc-am35xx/board.c
index 2bad40912d..c0a039ba50 100644
--- a/arch/arm/boards/wago-pfc-am35xx/board.c
+++ b/arch/arm/boards/wago-pfc-am35xx/board.c
@@ -3,6 +3,7 @@
* Copyright (C) 2014 WAGO Kontakttechnik GmbH & Co. KG <http://global.wago.com>
* Author: Heinrich Toews <heinrich.toews@wago.com>
*/
+#define pr_fmt(fmt) "pfc200: " fmt
#include <common.h>
#include <init.h>
@@ -10,6 +11,8 @@
#include <gpio.h>
#include <linux/sizes.h>
#include <linux/err.h>
+#include <linux/phy.h>
+#include <linux/micrel_phy.h>
#include <asm/memory.h>
#include <mach/generic.h>
@@ -23,6 +26,48 @@ static int pfc200_mem_init(void)
}
mem_initcall(pfc200_mem_init);
+#define BMCR_HP_MDIX 0x20
+
+static int pfc200_phy_fixup(struct mii_bus *mii, int phyadr)
+{
+ struct phy_device *phydev;
+ int ret;
+
+ phydev = mdiobus_scan(mii, phyadr);
+
+ if (IS_ERR(phydev)) {
+ pr_err("Cannot find phydev %d on mii bus\n", phyadr);
+ return PTR_ERR(phydev);
+ }
+
+ ret = phy_write(phydev, MII_BMCR, BMCR_ANENABLE | BMCR_HP_MDIX);
+ if (ret)
+ pr_err("Failed to write to phy: %s\n", strerror(-ret));
+
+ return ret;
+}
+
+static int pfc200_late_init(void)
+{
+ struct mii_bus *mii;
+
+ if (!of_machine_is_compatible("ti,pfc200"))
+ return 0;
+
+ mii = mdiobus_get_bus(0);
+ if (!mii) {
+ pr_err("Cannot find mii bus 0\n");
+ return -ENODEV;
+ }
+
+ pfc200_phy_fixup(mii, 1);
+ pfc200_phy_fixup(mii, 2);
+
+ return 0;
+}
+late_initcall(pfc200_late_init);
+
+
#define GPIO_KSZ886x_RESET 136
static int pfc200_devices_init(void)
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h
index 1a7f47add0..9c21066882 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/asm/types.h
@@ -3,8 +3,6 @@
#ifndef __ASSEMBLY__
-typedef unsigned short umode_t;
-
/*
* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
* header files exported to user space
diff --git a/arch/arm/mach-at91/include/mach/sama5d3_matrix.h b/arch/arm/mach-at91/include/mach/sama5d3_matrix.h
deleted file mode 100644
index 8176b38bd3..0000000000
--- a/arch/arm/mach-at91/include/mach/sama5d3_matrix.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Matrix-centric header file for the SAMA5D3 family
- *
- * Copyright (C) 2009-2012 Atmel Corporation.
- *
- * Only EBI related registers.
- * Write Protect register definitions may be useful.
- *
- * Licensed under GPLv2 or later.
- */
-
-#ifndef SAMA5D3_MATRIX_H
-#define SAMA5D3_MATRIX_H
-
-#endif
diff --git a/arch/arm/mach-imx/include/mach/clock-imx1.h b/arch/arm/mach-imx/include/mach/clock-imx1.h
deleted file mode 100644
index 8d456b84b2..0000000000
--- a/arch/arm/mach-imx/include/mach/clock-imx1.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef ASM_ARCH_CLOCK_IMX1_H
-#define ASM_ARCH_CLOCK_IMX1_H
-
-#endif /* ASM_ARCH_CLOCK_IMX1_H */
-
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8.h b/arch/arm/mach-imx/include/mach/iomux-mx8.h
index 1caa2235b1..9660697d96 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8.h
+++ b/arch/arm/mach-imx/include/mach/iomux-mx8.h
@@ -163,7 +163,7 @@ enum {
IMX8MQ_PAD_SD1_DATA5__USDHC1_DATA5 = IOMUX_PAD(0x0324, 0x00BC, 0, 0x0000, 0, 0),
IMX8MQ_PAD_SD1_DATA5__GPIO2_IO7 = IOMUX_PAD(0x0324, 0x00BC, 5, 0x0000, 0, 0),
- IMX8MQ_PAD_SD1_DATA6__USDHC1_DATA6 = IOMUX_PAD(0x0328, 0x00C0, 0, 0x0000, 0, 0),
+ IMX8MQ_PAD_SD1_DATA6__USDHC1_DATA6 = IOMUX_PAD(0x0328, 0x00C0, 0, 0x0000, 0, 0),
IMX8MQ_PAD_SD1_DATA6__GPIO2_IO8 = IOMUX_PAD(0x0328, 0x00C0, 5, 0x0000, 0, 0),
IMX8MQ_PAD_SD1_DATA7__USDHC1_DATA7 = IOMUX_PAD(0x032C, 0x00C4, 0, 0x0000, 0, 0),
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 0612830025..2589f4fe72 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -105,12 +105,12 @@ static void setup_usb_phys(void)
/* Power up PLL and PHY channel */
setbits_le32(MV_USB_PHY_PLL_REG(2), BIT(9));
-
+
/* Assert VCOCAL_START */
setbits_le32(MV_USB_PHY_PLL_REG(1), BIT(21));
-
+
mdelay(1);
-
+
/*
* USB PHY init (change from defaults) specific for 40nm (78X30 78X60)
*/
diff --git a/arch/arm/mach-mvebu/include/mach/dove.h b/arch/arm/mach-mvebu/include/mach/dove.h
deleted file mode 100644
index 1712fa7a1d..0000000000
--- a/arch/arm/mach-mvebu/include/mach/dove.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright
- * (C) 2013 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __MACH_MVEBU_DOVE_H
-#define __MACH_MVEBU_DOVE_H
-
-int dove_add_uart(int num);
-void __naked __noreturn dove_barebox_entry(void);
-
-#endif /* __MACH_MVEBU_DOVE_H */
diff --git a/arch/arm/mach-mvebu/include/mach/kirkwood.h b/arch/arm/mach-mvebu/include/mach/kirkwood.h
deleted file mode 100644
index 7fe002d44d..0000000000
--- a/arch/arm/mach-mvebu/include/mach/kirkwood.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __MACH_KIRKWOOD_H
-#define __MACH_KIRKWOOD_H
-
-int kirkwood_add_uart0(void);
-void __naked __noreturn kirkwood_barebox_entry(void);
-
-#endif /* __MACH_KIRKWOOD_H */
diff --git a/arch/arm/mach-netx/include/mach/netx-devices.h b/arch/arm/mach-netx/include/mach/netx-devices.h
deleted file mode 100644
index 9c64adb5da..0000000000
--- a/arch/arm/mach-netx/include/mach/netx-devices.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * (c) 2012 Pengutronix, Juergen Beisert <kernel@pengutronix.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef _NETX_DEVICES_H
-# define _NETX_DEVICES_H
-
-#include <mach/netx-regs.h>
-
-static inline struct device_d *netx_add_uart(resource_size_t base, int index)
-{
- return add_generic_device("netx_serial", index, NULL,
- base, 0x40, IORESOURCE_MEM, NULL);
-}
-
-static inline struct device_d *netx_add_uart0(void)
-{
- return netx_add_uart(NETX_PA_UART0, 0);
-}
-
-static inline struct device_d *netx_add_uart1(void)
-{
- return netx_add_uart(NETX_PA_UART1, 1);
-}
-
-static inline struct device_d *netx_add_uart3(void)
-{
- return netx_add_uart(NETX_PA_UART2, 2);
-}
-
-/* parallel flash connected to the SRAM interface */
-static inline struct device_d *netx_add_pflash(resource_size_t size)
-{
- return add_cfi_flash_device(0, NETX_CS0_BASE, size, 0);
-}
-
-static inline struct device_d *netx_add_eth(int index, void *pdata)
-{
- return add_generic_device("netx-eth", index, NULL,
- 0, 0, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *netx_add_eth0(void *pdata)
-{
- return netx_add_eth(0, pdata);
-}
-
-static inline struct device_d *netx_add_eth1(void *pdata)
-{
- return netx_add_eth(1, pdata);
-}
-
-static inline struct device_d *netx_add_eth2(void *pdata)
-{
- return netx_add_eth(2, pdata);
-}
-
-static inline struct device_d *netx_add_eth3(void *pdata)
-{
- return netx_add_eth(3, pdata);
-}
-
-#endif /* _NETX_DEVICES_H */
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index e793175f38..49ca0ee157 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -186,7 +186,6 @@ config MACH_VSCOM_BALTOS
config MACH_WAGO_PFC_AM35XX
bool "Wago PFC200 Fieldbus Controller"
select ARCH_AM35XX
- select HAVE_DEFAULT_ENVIRONMENT_NEW
select HAVE_PBL_MULTI_IMAGES
select HAVE_CONFIGURABLE_MEMORY_LAYOUT
help
diff --git a/arch/arm/mach-omap/include/mach/am33xx-devices.h b/arch/arm/mach-omap/include/mach/am33xx-devices.h
deleted file mode 100644
index 4790071c98..0000000000
--- a/arch/arm/mach-omap/include/mach/am33xx-devices.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef __MACH_OMAP3_DEVICES_H
-#define __MACH_OMAP3_DEVICES_H
-
-#include <driver.h>
-#include <linux/sizes.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/devices.h>
-#include <mach/omap_hsmmc.h>
-#include <mach/cpsw.h>
-
-/* the device numbering is the same as in the TRM memory map (SPRUH73G) */
-
-static inline struct device_d *am33xx_add_uart0(void)
-{
- return omap_add_uart(0, AM33XX_UART0_BASE);
-}
-
-static inline struct device_d *am33xx_add_uart1(void)
-{
- return omap_add_uart(1, AM33XX_UART1_BASE);
-}
-
-static inline struct device_d *am33xx_add_uart2(void)
-{
- return omap_add_uart(2, AM33XX_UART2_BASE);
-}
-
-static inline struct device_d *am33xx_add_mmc0(struct omap_hsmmc_platform_data *pdata)
-{
- return add_generic_device("omap4-hsmmc", 0, NULL,
- AM33XX_MMCHS0_BASE, SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *am33xx_add_mmc1(struct omap_hsmmc_platform_data *pdata)
-{
- return add_generic_device("omap4-hsmmc", 1, NULL,
- AM33XX_MMC1_BASE, SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *am33xx_add_cpsw(struct cpsw_platform_data *cpsw_data)
-{
- return add_generic_device("cpsw", 0, NULL,
- AM335X_CPSW_BASE, SZ_32K, IORESOURCE_MEM, cpsw_data);
-}
-
-static inline struct device_d *am33xx_add_spi(int id, resource_size_t start)
-{
- return add_generic_device("omap4-spi", id, NULL, start, SZ_4K,
- IORESOURCE_MEM, NULL);
-}
-
-static inline struct device_d *am33xx_add_spi0(void)
-{
- return am33xx_add_spi(0, AM33XX_MCSPI0_BASE);
-}
-
-static inline struct device_d *am33xx_add_spi1(void)
-{
- return am33xx_add_spi(1, AM33XX_MCSPI1_BASE);
-}
-
-static inline struct device_d *am33xx_add_i2c0(void *pdata)
-{
- return add_generic_device("i2c-am33xx", 0, NULL, AM33XX_I2C0_BASE,
- SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *am33xx_add_i2c1(void *pdata)
-{
- return add_generic_device("i2c-am33xx", 1, NULL, AM33XX_I2C1_BASE,
- SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-static inline struct device_d *am33xx_add_i2c2(void *pdata)
-{
- return add_generic_device("i2c-am33xx", 2, NULL, AM33XX_I2C2_BASE,
- SZ_4K, IORESOURCE_MEM, pdata);
-}
-
-#endif /* __MACH_OMAP3_DEVICES_H */