Commit aebbfafc authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC platform updates from Arnd Bergmann:
 "The APM X-Gene platform is now maintained by folks from Ampere
  computing that took over the product line a while ago, this gets
  reflected in the MAINTAINERS file.

  Cleanups continue on the older mach-davinci and mach-pxa platform, to
  get them to be more like the modern ones. For pxa, we now remove the
  Raumfeld platform code as it now works with device tree based booting.

  i.MX adds a couple new features for the i.MX7ULP SoC

  Mediatek gains support for a new SoC: MT7629 is a new wireless router
  platform, following MT7623.

  Aside from those, there are the usual minor cleanups and bugfixes
  across several platforms"

* tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (49 commits)
  MAINTAINERS: Update Ampere email address
  usb: ohci-da8xx: remove unused callbacks from platform data
  ARM: davinci: da830-evm: remove legacy usb helpers
  ARM: davinci: omapl138-hawk: remove legacy usb helpers
  usb: ohci-da8xx: add vbus and overcurrent gpios
  ARM: davinci: da830-evm: use gpio lookup entries for usb gpios
  ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios
  usb: ohci-da8xx: add a helper pointer to &pdev->dev
  usb: ohci-da8xx: add a new line after local variables
  arm64: meson: enable g12a clock controller
  MAINTAINERS: Add entry for uDPU board
  ARM: davinci: da850-evm: use GPIO hogs instead of the legacy API
  arm: mediatek: add MT7629 smp bring up code
  Revert "ARM: mediatek: add MT7623a smp bringup code"
  dt-bindings: soc: fix typo of MT8173 power dt-bindings
  ARM: meson: remove COMMON_CLK_AMLOGIC selection
  arm64: meson: remove COMMON_CLK_AMLOGIC selection
  ARM: lpc32xx: remove platform data of ARM PL111 LCD controller
  ARM: lpc32xx: remove platform data of ARM PL180 SD/MMC controller
  ARM: lpc32xx: Use kmemdup to replace duplicating its implementation
  ...
parents fa29f5ba 49b35cd5
...@@ -1036,26 +1036,26 @@ F: drivers/net/appletalk/ ...@@ -1036,26 +1036,26 @@ F: drivers/net/appletalk/
F: net/appletalk/ F: net/appletalk/
APPLIED MICRO (APM) X-GENE DEVICE TREE SUPPORT APPLIED MICRO (APM) X-GENE DEVICE TREE SUPPORT
M: Duc Dang <dhdang@apm.com> M: Khuong Dinh <khuong@os.amperecomputing.com>
S: Supported S: Supported
F: arch/arm64/boot/dts/apm/ F: arch/arm64/boot/dts/apm/
APPLIED MICRO (APM) X-GENE SOC EDAC APPLIED MICRO (APM) X-GENE SOC EDAC
M: Loc Ho <lho@apm.com> M: Khuong Dinh <khuong@os.amperecomputing.com>
S: Supported S: Supported
F: drivers/edac/xgene_edac.c F: drivers/edac/xgene_edac.c
F: Documentation/devicetree/bindings/edac/apm-xgene-edac.txt F: Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER
M: Iyappan Subramanian <isubramanian@apm.com> M: Iyappan Subramanian <iyappan@os.amperecomputing.com>
M: Keyur Chudgar <kchudgar@apm.com> M: Keyur Chudgar <keyur@os.amperecomputing.com>
S: Supported S: Supported
F: drivers/net/ethernet/apm/xgene-v2/ F: drivers/net/ethernet/apm/xgene-v2/
APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER
M: Iyappan Subramanian <isubramanian@apm.com> M: Iyappan Subramanian <iyappan@os.amperecomputing.com>
M: Keyur Chudgar <kchudgar@apm.com> M: Keyur Chudgar <keyur@os.amperecomputing.com>
M: Quan Nguyen <qnguyen@apm.com> M: Quan Nguyen <quan@os.amperecomputing.com>
S: Supported S: Supported
F: drivers/net/ethernet/apm/xgene/ F: drivers/net/ethernet/apm/xgene/
F: drivers/net/phy/mdio-xgene.c F: drivers/net/phy/mdio-xgene.c
...@@ -1063,7 +1063,7 @@ F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt ...@@ -1063,7 +1063,7 @@ F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt
F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt
APPLIED MICRO (APM) X-GENE SOC PMU APPLIED MICRO (APM) X-GENE SOC PMU
M: Tai Nguyen <ttnguyen@apm.com> M: Khuong Dinh <khuong@os.amperecomputing.com>
S: Supported S: Supported
F: drivers/perf/xgene_pmu.c F: drivers/perf/xgene_pmu.c
F: Documentation/perf/xgene-pmu.txt F: Documentation/perf/xgene-pmu.txt
...@@ -1530,21 +1530,14 @@ ARM/FREESCALE IMX / MXC ARM ARCHITECTURE ...@@ -1530,21 +1530,14 @@ ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
M: Shawn Guo <shawnguo@kernel.org> M: Shawn Guo <shawnguo@kernel.org>
M: Sascha Hauer <s.hauer@pengutronix.de> M: Sascha Hauer <s.hauer@pengutronix.de>
R: Pengutronix Kernel Team <kernel@pengutronix.de> R: Pengutronix Kernel Team <kernel@pengutronix.de>
R: Fabio Estevam <fabio.estevam@nxp.com> R: Fabio Estevam <festevam@gmail.com>
R: NXP Linux Team <linux-imx@nxp.com> R: NXP Linux Team <linux-imx@nxp.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
F: arch/arm/mach-imx/ N: imx
F: arch/arm/mach-mxs/ N: mxs
F: arch/arm/boot/dts/imx* X: drivers/media/i2c/
F: arch/arm/configs/imx*_defconfig
F: arch/arm64/boot/dts/freescale/imx*
F: drivers/clk/imx/
F: drivers/firmware/imx/
F: drivers/soc/imx/
F: include/linux/firmware/imx/
F: include/soc/imx/
ARM/FREESCALE VYBRID ARM ARCHITECTURE ARM/FREESCALE VYBRID ARM ARCHITECTURE
M: Shawn Guo <shawnguo@kernel.org> M: Shawn Guo <shawnguo@kernel.org>
...@@ -2108,6 +2101,8 @@ Q: http://patchwork.kernel.org/project/linux-renesas-soc/list/ ...@@ -2108,6 +2101,8 @@ Q: http://patchwork.kernel.org/project/linux-renesas-soc/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
S: Supported S: Supported
F: arch/arm/boot/dts/emev2* F: arch/arm/boot/dts/emev2*
F: arch/arm/boot/dts/gr-peach*
F: arch/arm/boot/dts/iwg20d-q7*
F: arch/arm/boot/dts/r7s* F: arch/arm/boot/dts/r7s*
F: arch/arm/boot/dts/r8a* F: arch/arm/boot/dts/r8a*
F: arch/arm/boot/dts/r9a* F: arch/arm/boot/dts/r9a*
...@@ -9888,6 +9883,11 @@ S: Maintained ...@@ -9888,6 +9883,11 @@ S: Maintained
F: drivers/mtd/nand/raw/meson_* F: drivers/mtd/nand/raw/meson_*
F: Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt F: Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt
METHODE UDPU SUPPORT
M: Vladimir Vid <vladimir.vid@sartura.hr>
S: Maintained
F: arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
MICROBLAZE ARCHITECTURE MICROBLAZE ARCHITECTURE
M: Michal Simek <monstr@monstr.eu> M: Michal Simek <monstr@monstr.eu>
W: http://www.monstr.eu/fdt/ W: http://www.monstr.eu/fdt/
...@@ -11613,7 +11613,7 @@ F: Documentation/devicetree/bindings/pci/altera-pcie.txt ...@@ -11613,7 +11613,7 @@ F: Documentation/devicetree/bindings/pci/altera-pcie.txt
F: drivers/pci/controller/pcie-altera.c F: drivers/pci/controller/pcie-altera.c
PCI DRIVER FOR APPLIEDMICRO XGENE PCI DRIVER FOR APPLIEDMICRO XGENE
M: Tanmay Inamdar <tinamdar@apm.com> M: Toan Le <toan@os.amperecomputing.com>
L: linux-pci@vger.kernel.org L: linux-pci@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org L: linux-arm-kernel@lists.infradead.org
S: Maintained S: Maintained
...@@ -11791,7 +11791,7 @@ F: Documentation/devicetree/bindings/pci/altera-pcie-msi.txt ...@@ -11791,7 +11791,7 @@ F: Documentation/devicetree/bindings/pci/altera-pcie-msi.txt
F: drivers/pci/controller/pcie-altera-msi.c F: drivers/pci/controller/pcie-altera-msi.c
PCI MSI DRIVER FOR APPLIEDMICRO XGENE PCI MSI DRIVER FOR APPLIEDMICRO XGENE
M: Duc Dang <dhdang@apm.com> M: Toan Le <toan@os.amperecomputing.com>
L: linux-pci@vger.kernel.org L: linux-pci@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org L: linux-arm-kernel@lists.infradead.org
S: Maintained S: Maintained
...@@ -14759,7 +14759,7 @@ S: Maintained ...@@ -14759,7 +14759,7 @@ S: Maintained
F: drivers/tty/serial/8250/8250_dw.c F: drivers/tty/serial/8250/8250_dw.c
SYNOPSYS DESIGNWARE APB GPIO DRIVER SYNOPSYS DESIGNWARE APB GPIO DRIVER
M: Hoan Tran <hotran@apm.com> M: Hoan Tran <hoan@os.amperecomputing.com>
L: linux-gpio@vger.kernel.org L: linux-gpio@vger.kernel.org
S: Maintained S: Maintained
F: drivers/gpio/gpio-dwapb.c F: drivers/gpio/gpio-dwapb.c
......
...@@ -66,9 +66,6 @@ CONFIG_MACH_MIOA701=y ...@@ -66,9 +66,6 @@ CONFIG_MACH_MIOA701=y
CONFIG_PXA_EZX=y CONFIG_PXA_EZX=y
CONFIG_MACH_MP900C=y CONFIG_MACH_MP900C=y
CONFIG_ARCH_PXA_PALM=y CONFIG_ARCH_PXA_PALM=y
CONFIG_MACH_RAUMFELD_RC=y
CONFIG_MACH_RAUMFELD_CONNECTOR=y
CONFIG_MACH_RAUMFELD_SPEAKER=y
CONFIG_PXA_SHARPSL=y CONFIG_PXA_SHARPSL=y
CONFIG_MACH_POODLE=y CONFIG_MACH_POODLE=y
CONFIG_MACH_CORGI=y CONFIG_MACH_CORGI=y
...@@ -498,7 +495,6 @@ CONFIG_SND_PXA2XX_SOC_E800=m ...@@ -498,7 +495,6 @@ CONFIG_SND_PXA2XX_SOC_E800=m
CONFIG_SND_PXA2XX_SOC_EM_X270=m CONFIG_SND_PXA2XX_SOC_EM_X270=m
CONFIG_SND_PXA2XX_SOC_PALM27X=y CONFIG_SND_PXA2XX_SOC_PALM27X=y
CONFIG_SND_SOC_ZYLONITE=m CONFIG_SND_SOC_ZYLONITE=m
CONFIG_SND_SOC_RAUMFELD=m
CONFIG_SND_PXA2XX_SOC_HX4700=m CONFIG_SND_PXA2XX_SOC_HX4700=m
CONFIG_SND_PXA2XX_SOC_MAGICIAN=m CONFIG_SND_PXA2XX_SOC_MAGICIAN=m
CONFIG_SND_PXA2XX_SOC_MIOA701=m CONFIG_SND_PXA2XX_SOC_MIOA701=m
......
# CONFIG_LOCALVERSION_AUTO is not set
# CONFIG_SWAP is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_LBDAF is not set
# CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_PXA=y
CONFIG_MACH_RAUMFELD_RC=y
CONFIG_MACH_RAUMFELD_CONNECTOR=y
CONFIG_MACH_RAUMFELD_SPEAKER=y
CONFIG_NO_HZ=y
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
CONFIG_CMDLINE="console=ttyS0,115200 rw"
CONFIG_CPU_FREQ=y
CONFIG_CPU_IDLE=y
CONFIG_PM=y
CONFIG_APM_EMULATION=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_PNP=y
CONFIG_SYN_COOKIES=y
CONFIG_IPV6=y
CONFIG_CFG80211=y
CONFIG_MAC80211=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_MTD=y
CONFIG_MTD_BLOCK=y
CONFIG_NFTL=y
CONFIG_NFTL_RW=y
CONFIG_MTD_BLOCK2MTD=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_MARVELL=y
CONFIG_MTD_UBI=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_ISL29003=y
CONFIG_IIO=y
CONFIG_AD5446=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_SG=y
CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y
CONFIG_SMSC911X=y
CONFIG_LIBERTAS=y
CONFIG_LIBERTAS_SDIO=m
CONFIG_USB_USBNET=y
# CONFIG_USB_NET_AX8817X is not set
# CONFIG_USB_NET_NET1080 is not set
CONFIG_USB_NET_MCS7830=y
# CONFIG_USB_NET_CDC_SUBSET is not set
# CONFIG_USB_NET_ZAURUS is not set
CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_EETI=m
CONFIG_INPUT_MISC=y
CONFIG_INPUT_GPIO_ROTARY_ENCODER=y
CONFIG_SERIAL_PXA=y
CONFIG_SERIAL_PXA_CONSOLE=y
CONFIG_HW_RANDOM=y
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_PXA=y
CONFIG_SPI=y
CONFIG_SPI_DEBUG=y
CONFIG_SPI_GPIO=y
CONFIG_SPI_SPIDEV=y
CONFIG_DEBUG_GPIO=y
CONFIG_W1_MASTER_GPIO=m
CONFIG_POWER_SUPPLY=y
CONFIG_PDA_POWER=y
CONFIG_BATTERY_DS2760=m
CONFIG_SENSORS_LIS3_SPI=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_DEBUG=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_MAX8660=y
CONFIG_FB=y
CONFIG_FB_PXA=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
CONFIG_SOUND=y
CONFIG_SND=y
# CONFIG_SND_DRIVERS is not set
# CONFIG_SND_USB is not set
CONFIG_SND_SOC=y
CONFIG_SND_PXA2XX_SOC=y
CONFIG_SND_SOC_RAUMFELD=y
CONFIG_HID_DRAGONRISE=y
CONFIG_HID_GYRATION=y
CONFIG_HID_TWINHAN=y
CONFIG_HID_NTRIG=y
CONFIG_HID_PANTHERLORD=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
CONFIG_HID_SUNPLUS=y
CONFIG_HID_GREENASIA=y
CONFIG_HID_SMARTJOYPLUS=y
CONFIG_HID_TOPSEED=y
CONFIG_HID_THRUSTMASTER=y
CONFIG_HID_ZEROPLUS=y
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_MON=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_FREECOM=y
CONFIG_USB_STORAGE_ISD200=y
CONFIG_USB_STORAGE_USBAT=y
CONFIG_USB_STORAGE_SDDR09=y
CONFIG_USB_STORAGE_SDDR55=y
CONFIG_MMC=y
CONFIG_MMC_PXA=m
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_LT3593=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_PXA=y
CONFIG_DMADEVICES=y
CONFIG_UIO=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XIP=y
CONFIG_EXT3_FS=y
CONFIG_FSCACHE=y
CONFIG_FSCACHE_STATS=y
CONFIG_CACHEFILES=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_UBIFS_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_ROOT_NFS=y
CONFIG_NFS_FSCACHE=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_737=y
CONFIG_NLS_CODEPAGE_775=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_CODEPAGE_852=y
CONFIG_NLS_CODEPAGE_855=y
CONFIG_NLS_CODEPAGE_857=y
CONFIG_NLS_CODEPAGE_860=y
CONFIG_NLS_CODEPAGE_861=y
CONFIG_NLS_CODEPAGE_862=y
CONFIG_NLS_CODEPAGE_863=y
CONFIG_NLS_CODEPAGE_864=y
CONFIG_NLS_CODEPAGE_865=y
CONFIG_NLS_CODEPAGE_866=y
CONFIG_NLS_CODEPAGE_869=y
CONFIG_NLS_CODEPAGE_936=y
CONFIG_NLS_CODEPAGE_950=y
CONFIG_NLS_CODEPAGE_932=y
CONFIG_NLS_CODEPAGE_949=y
CONFIG_NLS_CODEPAGE_874=y
CONFIG_NLS_ISO8859_8=y
CONFIG_NLS_CODEPAGE_1250=y
CONFIG_NLS_CODEPAGE_1251=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=y
CONFIG_NLS_ISO8859_3=y
CONFIG_NLS_ISO8859_4=y
CONFIG_NLS_ISO8859_5=y
CONFIG_NLS_ISO8859_6=y
CONFIG_NLS_ISO8859_7=y
CONFIG_NLS_ISO8859_9=y
CONFIG_NLS_ISO8859_13=y
CONFIG_NLS_ISO8859_14=y
CONFIG_NLS_ISO8859_15=y
CONFIG_NLS_KOI8_R=y
CONFIG_NLS_KOI8_U=y
CONFIG_NLS_UTF8=y
CONFIG_PRINTK_TIME=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_HW is not set
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/platform_data/pcf857x.h> #include <linux/platform_data/pcf857x.h>
#include <linux/platform_data/at24.h> #include <linux/property.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
...@@ -52,62 +52,19 @@ static const short da830_evm_usb11_pins[] = { ...@@ -52,62 +52,19 @@ static const short da830_evm_usb11_pins[] = {
-1 -1
}; };
static da8xx_ocic_handler_t da830_evm_usb_ocic_handler; static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = {
.dev_id = "ohci-da8xx",
static int da830_evm_usb_set_power(unsigned port, int on) .table = {
{ GPIO_LOOKUP("davinci_gpio", ON_BD_USB_DRV, "vbus", 0),
gpio_set_value(ON_BD_USB_DRV, on); GPIO_LOOKUP("davinci_gpio", ON_BD_USB_OVC, "oc", 0),
return 0; },
} };
static int da830_evm_usb_get_power(unsigned port)
{
return gpio_get_value(ON_BD_USB_DRV);
}
static int da830_evm_usb_get_oci(unsigned port)
{
return !gpio_get_value(ON_BD_USB_OVC);
}
static irqreturn_t da830_evm_usb_ocic_irq(int, void *);
static int da830_evm_usb_ocic_notify(da8xx_ocic_handler_t handler)
{
int irq = gpio_to_irq(ON_BD_USB_OVC);
int error = 0;
if (handler != NULL) {
da830_evm_usb_ocic_handler = handler;
error = request_irq(irq, da830_evm_usb_ocic_irq,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
"OHCI over-current indicator", NULL);
if (error)
pr_err("%s: could not request IRQ to watch over-current indicator changes\n",
__func__);
} else
free_irq(irq, NULL);
return error;
}
static struct da8xx_ohci_root_hub da830_evm_usb11_pdata = { static struct da8xx_ohci_root_hub da830_evm_usb11_pdata = {
.set_power = da830_evm_usb_set_power,
.get_power = da830_evm_usb_get_power,
.get_oci = da830_evm_usb_get_oci,
.ocic_notify = da830_evm_usb_ocic_notify,
/* TPS2065 switch @ 5V */ /* TPS2065 switch @ 5V */
.potpgt = (3 + 1) / 2, /* 3 ms max */ .potpgt = (3 + 1) / 2, /* 3 ms max */
}; };
static irqreturn_t da830_evm_usb_ocic_irq(int irq, void *dev_id)
{
da830_evm_usb_ocic_handler(&da830_evm_usb11_pdata, 1);
return IRQ_HANDLED;
}
static __init void da830_evm_usb_init(void) static __init void da830_evm_usb_init(void)
{ {
int ret; int ret;
...@@ -142,21 +99,7 @@ static __init void da830_evm_usb_init(void) ...@@ -142,21 +99,7 @@ static __init void da830_evm_usb_init(void)
return; return;
} }
ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV"); gpiod_add_lookup_table(&da830_evm_usb_gpio_lookup);
if (ret) {
pr_err("%s: failed to request GPIO for USB 1.1 port power control: %d\n",
__func__, ret);
return;
}
gpio_direction_output(ON_BD_USB_DRV, 0);
ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC");
if (ret) {
pr_err("%s: failed to request GPIO for USB 1.1 port over-current indicator: %d\n",
__func__, ret);
return;
}
gpio_direction_input(ON_BD_USB_OVC);
ret = da8xx_register_usb11(&da830_evm_usb11_pdata); ret = da8xx_register_usb11(&da830_evm_usb11_pdata);
if (ret) if (ret)
...@@ -457,12 +400,9 @@ static struct nvmem_cell_lookup da830_evm_nvmem_cell_lookup = { ...@@ -457,12 +400,9 @@ static struct nvmem_cell_lookup da830_evm_nvmem_cell_lookup = {
.con_id = "mac-address", .con_id = "mac-address",
}; };
static struct at24_platform_data da830_evm_i2c_eeprom_info = { static const struct property_entry da830_evm_i2c_eeprom_properties[] = {
.byte_len = SZ_256K / 8, PROPERTY_ENTRY_U32("pagesize", 64),
.page_size = 64, { }
.flags = AT24_FLAG_ADDR16,
.setup = davinci_get_mac_addr,
.context = (void *)0x7f00,
}; };
static int __init da830_evm_ui_expander_setup(struct i2c_client *client, static int __init da830_evm_ui_expander_setup(struct i2c_client *client,
...@@ -496,7 +436,7 @@ static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = { ...@@ -496,7 +436,7 @@ static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = {
static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { static struct i2c_board_info __initdata da830_evm_i2c_devices[] = {
{ {
I2C_BOARD_INFO("24c256", 0x50), I2C_BOARD_INFO("24c256", 0x50),
.platform_data = &da830_evm_i2c_eeprom_info, .properties = da830_evm_i2c_eeprom_properties,
}, },
{ {
I2C_BOARD_INFO("tlv320aic3x", 0x18), I2C_BOARD_INFO("tlv320aic3x", 0x18),
......
...@@ -150,32 +150,6 @@ static struct spi_board_info da850evm_spi_info[] = { ...@@ -150,32 +150,6 @@ static struct spi_board_info da850evm_spi_info[] = {
}, },
}; };
#ifdef CONFIG_MTD
static void da850_evm_m25p80_notify_add(struct mtd_info *mtd)
{
char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
size_t retlen;
if (!strcmp(mtd->name, "MAC-Address")) {
mtd_read(mtd, 0, ETH_ALEN, &retlen, mac_addr);
if (retlen == ETH_ALEN)
pr_info("Read MAC addr from SPI Flash: %pM\n",
mac_addr);
}
}
static struct mtd_notifier da850evm_spi_notifier = {
.add = da850_evm_m25p80_notify_add,
};
static void da850_evm_setup_mac_addr(void)
{
register_mtd_user(&da850evm_spi_notifier);
}
#else
static void da850_evm_setup_mac_addr(void) { }
#endif
static struct mtd_partition da850_evm_norflash_partition[] = { static struct mtd_partition da850_evm_norflash_partition[] = {
{ {
.name = "bootloaders + env", .name = "bootloaders + env",
...@@ -1064,6 +1038,17 @@ static const short da850_evm_rmii_pins[] = { ...@@ -1064,6 +1038,17 @@ static const short da850_evm_rmii_pins[] = {
-1 -1
}; };
static struct gpiod_hog da850_evm_emac_gpio_hogs[] = {
{
.chip_label = "davinci_gpio",
.chip_hwnum = DA850_MII_MDIO_CLKEN_PIN,
.line_name = "mdio_clk_en",
.lflags = 0,
/* dflags set in da850_evm_config_emac() */
},
{ }
};
static int __init da850_evm_config_emac(void) static int __init da850_evm_config_emac(void)
{ {
void __iomem *cfg_chip3_base; void __iomem *cfg_chip3_base;
...@@ -1102,14 +1087,9 @@ static int __init da850_evm_config_emac(void) ...@@ -1102,14 +1087,9 @@ static int __init da850_evm_config_emac(void)
if (ret) if (ret)
pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__); pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);
ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en"); da850_evm_emac_gpio_hogs[0].dflags = rmii_en ? GPIOD_OUT_HIGH
if (ret) { : GPIOD_OUT_LOW;
pr_warn("Cannot open GPIO %d\n", DA850_MII_MDIO_CLKEN_PIN); gpiod_add_hogs(da850_evm_emac_gpio_hogs);
return ret;
}
/* Enable/Disable MII MDIO clock */
gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, rmii_en);
soc_info->emac_pdata->phy_id = DA850_EVM_PHY_ID; soc_info->emac_pdata->phy_id = DA850_EVM_PHY_ID;
...@@ -1494,8 +1474,6 @@ static __init void da850_evm_init(void) ...@@ -1494,8 +1474,6 @@ static __init void da850_evm_init(void)
if (ret) if (ret)
pr_warn("%s: SATA registration failed: %d\n", __func__, ret); pr_warn("%s: SATA registration failed: %d\n", __func__, ret);
da850_evm_setup_mac_addr();
ret = da8xx_register_rproc(); ret = da8xx_register_rproc();
if (ret) if (ret)
pr_warn("%s: dsp/rproc registration failed: %d\n", pr_warn("%s: dsp/rproc registration failed: %d\n",
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/platform_data/at24.h> #include <linux/property.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
...@@ -225,18 +225,15 @@ static struct nvmem_cell_lookup davinci_nvmem_cell_lookup = { ...@@ -225,18 +225,15 @@ static struct nvmem_cell_lookup davinci_nvmem_cell_lookup = {
.con_id = "mac-address", .con_id = "mac-address",
}; };
static struct at24_platform_data eeprom_info = { static const struct property_entry eeprom_properties[] = {
.byte_len = (256*1024) / 8, PROPERTY_ENTRY_U32("pagesize", 64),
.page_size = 64, { }
.flags = AT24_FLAG_ADDR16,
.setup = davinci_get_mac_addr,
.context = (void *)0x7f00,
}; };
static struct i2c_board_info i2c_info[] = { static struct i2c_board_info i2c_info[] = {
{ {
I2C_BOARD_INFO("24c256", 0x50), I2C_BOARD_INFO("24c256", 0x50),
.platform_data = &eeprom_info, .properties = eeprom_properties,
}, },
{ {
I2C_BOARD_INFO("tlv320aic3x", 0x18), I2C_BOARD_INFO("tlv320aic3x", 0x18),
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include <linux/gpio/machine.h> #include <linux/gpio/machine.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/platform_data/pcf857x.h> #include <linux/platform_data/pcf857x.h>
#include <linux/platform_data/at24.h>
#include <linux/platform_data/gpio-davinci.h> #include <linux/platform_data/gpio-davinci.h>
#include <linux/property.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/rawnand.h> #include <linux/mtd/rawnand.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
...@@ -532,12 +532,9 @@ static struct nvmem_cell_lookup dm644evm_nvmem_cell_lookup = { ...@@ -532,12 +532,9 @@ static struct nvmem_cell_lookup dm644evm_nvmem_cell_lookup = {
.con_id = "mac-address", .con_id = "mac-address",
}; };
static struct at24_platform_data eeprom_info = { static const struct property_entry eeprom_properties[] = {
.byte_len = (256*1024) / 8, PROPERTY_ENTRY_U32("pagesize", 64),
.page_size = 64, { }
.flags = AT24_FLAG_ADDR16,
.setup = davinci_get_mac_addr,
.context = (void *)0x7f00,
}; };
/* /*
...@@ -647,7 +644,7 @@ static struct i2c_board_info __initdata i2c_info[] = { ...@@ -647,7 +644,7 @@ static struct i2c_board_info __initdata i2c_info[] = {
}, },
{ {
I2C_BOARD_INFO("24c256", 0x50), I2C_BOARD_INFO("24c256", 0x50),
.platform_data = &eeprom_info, .properties = eeprom_properties,
}, },
{ {
I2C_BOARD_INFO("tlv320aic33", 0x1b), I2C_BOARD_INFO("tlv320aic33", 0x1b),
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/platform_data/at24.h> #include <linux/property.h>
#include <linux/platform_data/pcf857x.h> #include <linux/platform_data/pcf857x.h>
#include <linux/platform_data/ti-aemif.h> #include <linux/platform_data/ti-aemif.h>
...@@ -364,12 +364,9 @@ static struct nvmem_cell_lookup dm646x_evm_nvmem_cell_lookup = { ...@@ -364,12 +364,9 @@ static struct nvmem_cell_lookup dm646x_evm_nvmem_cell_lookup = {
.con_id = "mac-address", .con_id = "mac-address",
}; };
static struct at24_platform_data eeprom_info = { static const struct property_entry eeprom_properties[] = {
.byte_len = (256*1024) / 8, PROPERTY_ENTRY_U32("pagesize", 64),
.page_size = 64, { }
.flags = AT24_FLAG_ADDR16,
.setup = davinci_get_mac_addr,
.context = (void *)0x7f00,
}; };
#endif #endif
...@@ -440,7 +437,7 @@ static void evm_init_cpld(void) ...@@ -440,7 +437,7 @@ static void evm_init_cpld(void)
static struct i2c_board_info __initdata i2c_info[] = { static struct i2c_board_info __initdata i2c_info[] = {
{ {
I2C_BOARD_INFO("24c256", 0x50), I2C_BOARD_INFO("24c256", 0x50),
.platform_data = &eeprom_info, .properties = eeprom_properties,
}, },
{ {
I2C_BOARD_INFO("pcf8574a", 0x38), I2C_BOARD_INFO("pcf8574a", 0x38),
......
...@@ -14,11 +14,13 @@ ...@@ -14,11 +14,13 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/notifier.h>
#include <linux/nvmem-consumer.h>
#include <linux/nvmem-provider.h> #include <linux/nvmem-provider.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/platform_data/at24.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/flash.h> #include <linux/spi/flash.h>
...@@ -117,11 +119,15 @@ static void mityomapl138_cpufreq_init(const char *partnum) ...@@ -117,11 +119,15 @@ static void mityomapl138_cpufreq_init(const char *partnum)
static void mityomapl138_cpufreq_init(const char *partnum) { } static void mityomapl138_cpufreq_init(const char *partnum) { }
#endif #endif
static void read_factory_config(struct nvmem_device *nvmem, void *context) static int read_factory_config(struct notifier_block *nb,
unsigned long event, void *data)
{ {
int ret; int ret;
const char *partnum = NULL; const char *partnum = NULL;
struct davinci_soc_info *soc_info = &davinci_soc_info; struct nvmem_device *nvmem = data;
if (strcmp(nvmem_dev_name(nvmem), "1-00500") != 0)
return NOTIFY_DONE;
if (!IS_BUILTIN(CONFIG_NVMEM)) { if (!IS_BUILTIN(CONFIG_NVMEM)) {
pr_warn("Factory Config not available without CONFIG_NVMEM\n"); pr_warn("Factory Config not available without CONFIG_NVMEM\n");
...@@ -147,21 +153,20 @@ static void read_factory_config(struct nvmem_device *nvmem, void *context) ...@@ -147,21 +153,20 @@ static void read_factory_config(struct nvmem_device *nvmem, void *context)
goto bad_config; goto bad_config;
} }
pr_info("Found MAC = %pM\n", factory_config.mac);
if (is_valid_ether_addr(factory_config.mac))
memcpy(soc_info->emac_pdata->mac_addr,
factory_config.mac, ETH_ALEN);
else
pr_warn("Invalid MAC found in factory config block\n");
partnum = factory_config.partnum; partnum = factory_config.partnum;
pr_info("Part Number = %s\n", partnum); pr_info("Part Number = %s\n", partnum);
bad_config: bad_config:
/* default maximum speed is valid for all platforms */ /* default maximum speed is valid for all platforms */
mityomapl138_cpufreq_init(partnum); mityomapl138_cpufreq_init(partnum);
return NOTIFY_STOP;
} }
static struct notifier_block mityomapl138_nvmem_notifier = {
.notifier_call = read_factory_config,
};
/* /*
* We don't define a cell for factory config as it will be accessed from the * We don't define a cell for factory config as it will be accessed from the
* board file using the nvmem notifier chain. * board file using the nvmem notifier chain.
...@@ -187,12 +192,10 @@ static struct nvmem_cell_lookup mityomapl138_nvmem_cell_lookup = { ...@@ -187,12 +192,10 @@ static struct nvmem_cell_lookup mityomapl138_nvmem_cell_lookup = {
.con_id = "mac-address", .con_id = "mac-address",
}; };
static struct at24_platform_data mityomapl138_fd_chip = { static const struct property_entry mityomapl138_fd_chip_properties[] = {
.byte_len = 256, PROPERTY_ENTRY_U32("pagesize", 8),
.page_size = 8, PROPERTY_ENTRY_BOOL("read-only"),
.flags = AT24_FLAG_READONLY | AT24_FLAG_IRUGO, { }
.setup = read_factory_config,
.context = NULL,
}; };
static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = { static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = {
...@@ -321,7 +324,7 @@ static struct i2c_board_info __initdata mityomap_tps65023_info[] = { ...@@ -321,7 +324,7 @@ static struct i2c_board_info __initdata mityomap_tps65023_info[] = {
}, },
{ {
I2C_BOARD_INFO("24c02", 0x50), I2C_BOARD_INFO("24c02", 0x50),
.platform_data = &mityomapl138_fd_chip, .properties = mityomapl138_fd_chip_properties,
}, },
}; };
...@@ -569,6 +572,7 @@ static void __init mityomapl138_init(void) ...@@ -569,6 +572,7 @@ static void __init mityomapl138_init(void)
davinci_serial_init(da8xx_serial_device); davinci_serial_init(da8xx_serial_device);
nvmem_register_notifier(&mityomapl138_nvmem_notifier);
nvmem_add_cell_table(&mityomapl138_nvmem_cell_table); nvmem_add_cell_table(&mityomapl138_nvmem_cell_table);
nvmem_add_cell_lookups(&mityomapl138_nvmem_cell_lookup, 1); nvmem_add_cell_lookups(&mityomapl138_nvmem_cell_lookup, 1);
......
...@@ -294,66 +294,24 @@ static int omapl138_hawk_register_aemif(void) ...@@ -294,66 +294,24 @@ static int omapl138_hawk_register_aemif(void)
return platform_device_register(&omapl138_hawk_aemif_device); return platform_device_register(&omapl138_hawk_aemif_device);
} }
static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id);
static da8xx_ocic_handler_t hawk_usb_ocic_handler;
static const short da850_hawk_usb11_pins[] = { static const short da850_hawk_usb11_pins[] = {
DA850_GPIO2_4, DA850_GPIO6_13, DA850_GPIO2_4, DA850_GPIO6_13,
-1 -1
}; };
static int hawk_usb_set_power(unsigned port, int on) static struct gpiod_lookup_table hawk_usb_gpio_lookup = {
{ .dev_id = "ohci-da8xx",
gpio_set_value(DA850_USB1_VBUS_PIN, on); .table = {
return 0; GPIO_LOOKUP("davinci_gpio", DA850_USB1_VBUS_PIN, "vbus", 0),
} GPIO_LOOKUP("davinci_gpio", DA850_USB1_OC_PIN, "oc", 0),
},
static int hawk_usb_get_power(unsigned port) };
{
return gpio_get_value(DA850_USB1_VBUS_PIN);
}
static int hawk_usb_get_oci(unsigned port)
{
return !gpio_get_value(DA850_USB1_OC_PIN);
}
static int hawk_usb_ocic_notify(da8xx_ocic_handler_t handler)
{
int irq = gpio_to_irq(DA850_USB1_OC_PIN);
int error = 0;
if (handler != NULL) {
hawk_usb_ocic_handler = handler;
error = request_irq(irq, omapl138_hawk_usb_ocic_irq,
IRQF_TRIGGER_RISING |
IRQF_TRIGGER_FALLING,
"OHCI over-current indicator", NULL);
if (error)
pr_err("%s: could not request IRQ to watch "
"over-current indicator changes\n", __func__);
} else {
free_irq(irq, NULL);
}
return error;
}
static struct da8xx_ohci_root_hub omapl138_hawk_usb11_pdata = { static struct da8xx_ohci_root_hub omapl138_hawk_usb11_pdata = {
.set_power = hawk_usb_set_power,
.get_power = hawk_usb_get_power,
.get_oci = hawk_usb_get_oci,
.ocic_notify = hawk_usb_ocic_notify,
/* TPS2087 switch @ 5V */ /* TPS2087 switch @ 5V */
.potpgt = (3 + 1) / 2, /* 3 ms max */ .potpgt = (3 + 1) / 2, /* 3 ms max */
}; };
static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id)
{
hawk_usb_ocic_handler(&omapl138_hawk_usb11_pdata, 1);
return IRQ_HANDLED;
}
static __init void omapl138_hawk_usb_init(void) static __init void omapl138_hawk_usb_init(void)
{ {
int ret; int ret;
...@@ -374,34 +332,13 @@ static __init void omapl138_hawk_usb_init(void) ...@@ -374,34 +332,13 @@ static __init void omapl138_hawk_usb_init(void)
pr_warn("%s: USB PHY registration failed: %d\n", pr_warn("%s: USB PHY registration failed: %d\n",
__func__, ret); __func__, ret);
ret = gpio_request_one(DA850_USB1_VBUS_PIN, gpiod_add_lookup_table(&hawk_usb_gpio_lookup);
GPIOF_DIR_OUT, "USB1 VBUS");
if (ret < 0) {
pr_err("%s: failed to request GPIO for USB 1.1 port "
"power control: %d\n", __func__, ret);
return;
}
ret = gpio_request_one(DA850_USB1_OC_PIN,
GPIOF_DIR_IN, "USB1 OC");
if (ret < 0) {
pr_err("%s: failed to request GPIO for USB 1.1 port "
"over-current indicator: %d\n", __func__, ret);
goto usb11_setup_oc_fail;
}
ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata); ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata);
if (ret) { if (ret)
pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret); pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret);
goto usb11_setup_fail;
}
return; return;
usb11_setup_fail:
gpio_free(DA850_USB1_OC_PIN);
usb11_setup_oc_fail:
gpio_free(DA850_USB1_VBUS_PIN);
} }
static __init void omapl138_hawk_init(void) static __init void omapl138_hawk_init(void)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/platform_data/at24.h> #include <linux/property.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/rawnand.h> #include <linux/mtd/rawnand.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
...@@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = { ...@@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = {
.resource = davinci_sffsdr_nandflash_resource, .resource = davinci_sffsdr_nandflash_resource,
}; };
static struct at24_platform_data eeprom_info = { static const struct property_entry eeprom_properties[] = {
.byte_len = (64*1024) / 8, PROPERTY_ENTRY_U32("pagesize", 32),
.page_size = 32, { }
.flags = AT24_FLAG_ADDR16,
}; };
static struct i2c_board_info __initdata i2c_info[] = { static struct i2c_board_info __initdata i2c_info[] = {
{ {
I2C_BOARD_INFO("24lc64", 0x50), I2C_BOARD_INFO("24c64", 0x50),
.platform_data = &eeprom_info, .properties = eeprom_properties,
}, },
/* Other I2C devices: /* Other I2C devices:
* MSP430, addr 0x23 (not used) * MSP430, addr 0x23 (not used)
......
...@@ -26,21 +26,6 @@ EXPORT_SYMBOL(davinci_soc_info); ...@@ -26,21 +26,6 @@ EXPORT_SYMBOL(davinci_soc_info);
void __iomem *davinci_intc_base; void __iomem *davinci_intc_base;
int davinci_intc_type; int davinci_intc_type;
void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context)
{
char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
off_t offset = (off_t)context;
if (!IS_BUILTIN(CONFIG_NVMEM)) {
pr_warn("Cannot read MAC addr from EEPROM without CONFIG_NVMEM\n");
return;
}
/* Read MAC addr from EEPROM */
if (nvmem_device_read(nvmem, offset, ETH_ALEN, mac_addr) == ETH_ALEN)
pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr);
}
static int __init davinci_init_id(struct davinci_soc_info *soc_info) static int __init davinci_init_id(struct davinci_soc_info *soc_info)
{ {
int i; int i;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <mach/gpio-ep93xx.h> #include <mach/gpio-ep93xx.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/gpio-ep93xx.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
......
...@@ -336,9 +336,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) ...@@ -336,9 +336,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
/* wait max 10 ms until cpu1 is on */ /* wait max 10 ms until cpu1 is on */
while (exynos_cpu_power_state(core_id) while (exynos_cpu_power_state(core_id)
!= S5P_CORE_LOCAL_PWR_EN) { != S5P_CORE_LOCAL_PWR_EN) {
if (timeout-- == 0) if (timeout == 0)
break; break;
timeout--;
mdelay(1); mdelay(1);
} }
......
...@@ -29,9 +29,10 @@ obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o ...@@ -29,9 +29,10 @@ obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o
obj-$(CONFIG_SOC_IMX6SLL) += cpuidle-imx6sx.o obj-$(CONFIG_SOC_IMX6SLL) += cpuidle-imx6sx.o
obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6sx.o obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6sx.o
obj-$(CONFIG_SOC_IMX6UL) += cpuidle-imx6sx.o obj-$(CONFIG_SOC_IMX6UL) += cpuidle-imx6sx.o
obj-$(CONFIG_SOC_IMX7ULP) += cpuidle-imx7ulp.o
endif endif
ifdef CONFIG_SND_IMX_SOC ifdef CONFIG_SND_SOC_IMX_PCM_FIQ
obj-y += ssi-fiq.o obj-y += ssi-fiq.o
obj-y += ssi-fiq-ksym.o obj-y += ssi-fiq-ksym.o
endif endif
......
...@@ -72,6 +72,15 @@ enum mxc_cpu_pwr_mode { ...@@ -72,6 +72,15 @@ enum mxc_cpu_pwr_mode {
STOP_POWER_OFF, /* STOP + SRPG */ STOP_POWER_OFF, /* STOP + SRPG */
}; };
enum ulp_cpu_pwr_mode {
ULP_PM_HSRUN, /* High speed run mode */
ULP_PM_RUN, /* Run mode */
ULP_PM_WAIT, /* Wait mode */
ULP_PM_STOP, /* Stop mode */
ULP_PM_VLPS, /* Very low power stop mode */
ULP_PM_VLLS, /* very low leakage stop mode */
};
void imx_enable_cpu(int cpu, bool enable); void imx_enable_cpu(int cpu, bool enable);
void imx_set_cpu_jump(int cpu, void *jump_addr); void imx_set_cpu_jump(int cpu, void *jump_addr);
u32 imx_get_cpu_arg(int cpu); u32 imx_get_cpu_arg(int cpu);
...@@ -98,6 +107,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode); ...@@ -98,6 +107,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode);
void imx6_set_int_mem_clk_lpm(bool enable); void imx6_set_int_mem_clk_lpm(bool enable);
void imx6sl_set_wait_clk(bool enter); void imx6sl_set_wait_clk(bool enter);
int imx_mmdc_get_ddr_type(void); int imx_mmdc_get_ddr_type(void);
int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode);
void imx_cpu_die(unsigned int cpu); void imx_cpu_die(unsigned int cpu);
int imx_cpu_kill(unsigned int cpu); int imx_cpu_kill(unsigned int cpu);
......
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2016 Freescale Semiconductor, Inc.
* Copyright 2017-2018 NXP
* Anson Huang <Anson.Huang@nxp.com>
*/
#include <linux/cpuidle.h>
#include <linux/module.h>
#include <asm/cpuidle.h>
#include "common.h"
#include "cpuidle.h"
static int imx7ulp_enter_wait(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
{
if (index == 1)
imx7ulp_set_lpm(ULP_PM_WAIT);
else
imx7ulp_set_lpm(ULP_PM_STOP);
cpu_do_idle();
imx7ulp_set_lpm(ULP_PM_RUN);
return index;
}
static struct cpuidle_driver imx7ulp_cpuidle_driver = {
.name = "imx7ulp_cpuidle",
.owner = THIS_MODULE,
.states = {
/* WFI */
ARM_CPUIDLE_WFI_STATE,
/* WAIT */
{
.exit_latency = 50,
.target_residency = 75,
.enter = imx7ulp_enter_wait,
.name = "WAIT",
.desc = "PSTOP2",
},
/* STOP */
{
.exit_latency = 100,
.target_residency = 150,
.enter = imx7ulp_enter_wait,
.name = "STOP",
.desc = "PSTOP1",
},
},
.state_count = 3,
.safe_state_index = 0,
};
int __init imx7ulp_cpuidle_init(void)
{
return cpuidle_register(&imx7ulp_cpuidle_driver, NULL);
}
...@@ -15,6 +15,7 @@ extern int imx5_cpuidle_init(void); ...@@ -15,6 +15,7 @@ extern int imx5_cpuidle_init(void);
extern int imx6q_cpuidle_init(void); extern int imx6q_cpuidle_init(void);
extern int imx6sl_cpuidle_init(void); extern int imx6sl_cpuidle_init(void);
extern int imx6sx_cpuidle_init(void); extern int imx6sx_cpuidle_init(void);
extern int imx7ulp_cpuidle_init(void);
#else #else
static inline int imx5_cpuidle_init(void) static inline int imx5_cpuidle_init(void)
{ {
...@@ -32,4 +33,8 @@ static inline int imx6sx_cpuidle_init(void) ...@@ -32,4 +33,8 @@ static inline int imx6sx_cpuidle_init(void)
{ {
return 0; return 0;
} }
static inline int imx7ulp_cpuidle_init(void)
{
return 0;
}
#endif #endif
...@@ -6,17 +6,57 @@ ...@@ -6,17 +6,57 @@
*/ */
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/mfd/syscon.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/regmap.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include "common.h" #include "common.h"
#include "cpuidle.h"
#include "hardware.h" #include "hardware.h"
#define SIM_JTAG_ID_REG 0x8c
static void __init imx7ulp_set_revision(void)
{
struct regmap *sim;
u32 revision;
sim = syscon_regmap_lookup_by_compatible("fsl,imx7ulp-sim");
if (IS_ERR(sim)) {
pr_warn("failed to find fsl,imx7ulp-sim regmap!\n");
return;
}
if (regmap_read(sim, SIM_JTAG_ID_REG, &revision)) {
pr_warn("failed to read sim regmap!\n");
return;
}
/*
* bit[31:28] of JTAG_ID register defines revision as below from B0:
* 0001 B0
* 0010 B1
*/
switch (revision >> 28) {
case 1:
imx_set_soc_revision(IMX_CHIP_REVISION_2_0);
break;
case 2:
imx_set_soc_revision(IMX_CHIP_REVISION_2_1);
break;
default:
imx_set_soc_revision(IMX_CHIP_REVISION_1_0);
break;
}
}
static void __init imx7ulp_init_machine(void) static void __init imx7ulp_init_machine(void)
{ {
imx7ulp_pm_init(); imx7ulp_pm_init();
mxc_set_cpu_type(MXC_CPU_IMX7ULP); mxc_set_cpu_type(MXC_CPU_IMX7ULP);
imx7ulp_set_revision();
of_platform_default_populate(NULL, NULL, imx_soc_device_init()); of_platform_default_populate(NULL, NULL, imx_soc_device_init());
} }
...@@ -25,7 +65,13 @@ static const char *const imx7ulp_dt_compat[] __initconst = { ...@@ -25,7 +65,13 @@ static const char *const imx7ulp_dt_compat[] __initconst = {
NULL, NULL,
}; };
static void __init imx7ulp_init_late(void)
{
imx7ulp_cpuidle_init();
}
DT_MACHINE_START(IMX7ulp, "Freescale i.MX7ULP (Device Tree)") DT_MACHINE_START(IMX7ulp, "Freescale i.MX7ULP (Device Tree)")
.init_machine = imx7ulp_init_machine, .init_machine = imx7ulp_init_machine,
.dt_compat = imx7ulp_dt_compat, .dt_compat = imx7ulp_dt_compat,
.init_late = imx7ulp_init_late,
MACHINE_END MACHINE_END
...@@ -9,21 +9,60 @@ ...@@ -9,21 +9,60 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include "common.h"
#define SMC_PMCTRL 0x10 #define SMC_PMCTRL 0x10
#define BP_PMCTRL_PSTOPO 16 #define BP_PMCTRL_PSTOPO 16
#define PSTOPO_PSTOP3 0x3 #define PSTOPO_PSTOP3 0x3
#define PSTOPO_PSTOP2 0x2
#define PSTOPO_PSTOP1 0x1
#define BP_PMCTRL_RUNM 8
#define RUNM_RUN 0
#define BP_PMCTRL_STOPM 0
#define STOPM_STOP 0
#define BM_PMCTRL_PSTOPO (3 << BP_PMCTRL_PSTOPO)
#define BM_PMCTRL_RUNM (3 << BP_PMCTRL_RUNM)
#define BM_PMCTRL_STOPM (7 << BP_PMCTRL_STOPM)
static void __iomem *smc1_base;
int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode)
{
u32 val = readl_relaxed(smc1_base + SMC_PMCTRL);
/* clear all */
val &= ~(BM_PMCTRL_RUNM | BM_PMCTRL_STOPM | BM_PMCTRL_PSTOPO);
switch (mode) {
case ULP_PM_RUN:
/* system/bus clock enabled */
val |= PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO;
break;
case ULP_PM_WAIT:
/* system clock disabled, bus clock enabled */
val |= PSTOPO_PSTOP2 << BP_PMCTRL_PSTOPO;
break;
case ULP_PM_STOP:
/* system/bus clock disabled */
val |= PSTOPO_PSTOP1 << BP_PMCTRL_PSTOPO;
break;
default:
return -EINVAL;
}
writel_relaxed(val, smc1_base + SMC_PMCTRL);
return 0;
}
void __init imx7ulp_pm_init(void) void __init imx7ulp_pm_init(void)
{ {
struct device_node *np; struct device_node *np;
void __iomem *smc1_base;
np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1"); np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1");
smc1_base = of_iomap(np, 0); smc1_base = of_iomap(np, 0);
WARN_ON(!smc1_base); WARN_ON(!smc1_base);
/* Partial Stop mode 3 with system/bus clock enabled */ imx7ulp_set_lpm(ULP_PM_RUN);
writel_relaxed(PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO,
smc1_base + SMC_PMCTRL);
iounmap(smc1_base);
} }
...@@ -45,73 +45,6 @@ ...@@ -45,73 +45,6 @@
#include <mach/board.h> #include <mach/board.h>
#include "common.h" #include "common.h"
/*
* AMBA LCD controller
*/
static struct clcd_panel conn_lcd_panel = {
.mode = {
.name = "QVGA portrait",
.refresh = 60,
.xres = 240,
.yres = 320,
.pixclock = 191828,
.left_margin = 22,
.right_margin = 11,
.upper_margin = 2,
.lower_margin = 1,
.hsync_len = 5,
.vsync_len = 2,
.sync = 0,
.vmode = FB_VMODE_NONINTERLACED,
},
.width = -1,
.height = -1,
.tim2 = (TIM2_IVS | TIM2_IHS),
.cntl = (CNTL_BGR | CNTL_LCDTFT | CNTL_LCDVCOMP(1) |
CNTL_LCDBPP16_565),
.bpp = 16,
};
#define PANEL_SIZE (3 * SZ_64K)
static int lpc32xx_clcd_setup(struct clcd_fb *fb)
{
dma_addr_t dma;
fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, PANEL_SIZE, &dma,
GFP_KERNEL);
if (!fb->fb.screen_base) {
printk(KERN_ERR "CLCD: unable to map framebuffer\n");
return -ENOMEM;
}
fb->fb.fix.smem_start = dma;
fb->fb.fix.smem_len = PANEL_SIZE;
fb->panel = &conn_lcd_panel;
return 0;
}
static int lpc32xx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
{
return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
fb->fb.fix.smem_start, fb->fb.fix.smem_len);
}
static void lpc32xx_clcd_remove(struct clcd_fb *fb)
{
dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base,
fb->fb.fix.smem_start);
}
static struct clcd_board lpc32xx_clcd_data = {
.name = "Phytec LCD",
.check = clcdfb_check,
.decode = clcdfb_decode,
.setup = lpc32xx_clcd_setup,
.mmap = lpc32xx_clcd_mmap,
.remove = lpc32xx_clcd_remove,
};
static struct pl08x_channel_data pl08x_slave_channels[] = { static struct pl08x_channel_data pl08x_slave_channels[] = {
{ {
.bus_id = "nand-slc", .bus_id = "nand-slc",
...@@ -148,11 +81,6 @@ static struct pl08x_platform_data pl08x_pd = { ...@@ -148,11 +81,6 @@ static struct pl08x_platform_data pl08x_pd = {
.mem_buses = PL08X_AHB1, .mem_buses = PL08X_AHB1,
}; };
static struct mmci_platform_data lpc32xx_mmci_data = {
.ocr_mask = MMC_VDD_30_31 | MMC_VDD_31_32 |
MMC_VDD_32_33 | MMC_VDD_33_34,
};
static struct lpc32xx_slc_platform_data lpc32xx_slc_data = { static struct lpc32xx_slc_platform_data lpc32xx_slc_data = {
.dma_filter = pl08x_filter_id, .dma_filter = pl08x_filter_id,
}; };
...@@ -164,10 +92,7 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = { ...@@ -164,10 +92,7 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = {
static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = {
OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL), OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL),
OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL), OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL),
OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data),
OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd), OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd),
OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd",
&lpc32xx_mmci_data),
OF_DEV_AUXDATA("nxp,lpc3220-slc", 0x20020000, "20020000.flash", OF_DEV_AUXDATA("nxp,lpc3220-slc", 0x20020000, "20020000.flash",
&lpc32xx_slc_data), &lpc32xx_slc_data),
OF_DEV_AUXDATA("nxp,lpc3220-mlc", 0x200a8000, "200a8000.flash", OF_DEV_AUXDATA("nxp,lpc3220-mlc", 0x200a8000, "200a8000.flash",
...@@ -177,15 +102,6 @@ static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { ...@@ -177,15 +102,6 @@ static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = {
static void __init lpc3250_machine_init(void) static void __init lpc3250_machine_init(void)
{ {
u32 tmp;
/* Setup LCD muxing to RGB565 */
tmp = __raw_readl(LPC32XX_CLKPWR_LCDCLK_CTRL) &
~(LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_MSK |
LPC32XX_CLKPWR_LCDCTRL_PSCALE_MSK);
tmp |= LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_TFT16;
__raw_writel(tmp, LPC32XX_CLKPWR_LCDCLK_CTRL);
lpc32xx_serial_init(); lpc32xx_serial_init();
/* Test clock needed for UDA1380 initial init */ /* Test clock needed for UDA1380 initial init */
......
...@@ -86,17 +86,10 @@ static int lpc32xx_pm_enter(suspend_state_t state) ...@@ -86,17 +86,10 @@ static int lpc32xx_pm_enter(suspend_state_t state)
void *iram_swap_area; void *iram_swap_area;
/* Allocate some space for temporary IRAM storage */ /* Allocate some space for temporary IRAM storage */
iram_swap_area = kmalloc(lpc32xx_sys_suspend_sz, GFP_KERNEL); iram_swap_area = kmemdup((void *)TEMP_IRAM_AREA,
if (!iram_swap_area) { lpc32xx_sys_suspend_sz, GFP_KERNEL);
printk(KERN_ERR if (!iram_swap_area)
"PM Suspend: cannot allocate memory to save portion "
"of SRAM\n");
return -ENOMEM; return -ENOMEM;
}
/* Backup a small area of IRAM used for the suspend code */
memcpy(iram_swap_area, (void *) TEMP_IRAM_AREA,
lpc32xx_sys_suspend_sz);
/* /*
* Copy code to suspend system into IRAM. The suspend code * Copy code to suspend system into IRAM. The suspend code
......
...@@ -26,6 +26,10 @@ config MACH_MT7623 ...@@ -26,6 +26,10 @@ config MACH_MT7623
bool "MediaTek MT7623 SoCs support" bool "MediaTek MT7623 SoCs support"
default ARCH_MEDIATEK default ARCH_MEDIATEK
config MACH_MT7629
bool "MediaTek MT7629 SoCs support"
default ARCH_MEDIATEK
config MACH_MT8127 config MACH_MT8127
bool "MediaTek MT8127 SoCs support" bool "MediaTek MT8127 SoCs support"
default ARCH_MEDIATEK default ARCH_MEDIATEK
......
...@@ -30,7 +30,6 @@ static void __init mediatek_timer_init(void) ...@@ -30,7 +30,6 @@ static void __init mediatek_timer_init(void)
if (of_machine_is_compatible("mediatek,mt6589") || if (of_machine_is_compatible("mediatek,mt6589") ||
of_machine_is_compatible("mediatek,mt7623") || of_machine_is_compatible("mediatek,mt7623") ||
of_machine_is_compatible("mediatek,mt7623a") ||
of_machine_is_compatible("mediatek,mt8135") || of_machine_is_compatible("mediatek,mt8135") ||
of_machine_is_compatible("mediatek,mt8127")) { of_machine_is_compatible("mediatek,mt8127")) {
/* turn on GPT6 which ungates arch timer clocks */ /* turn on GPT6 which ungates arch timer clocks */
...@@ -50,7 +49,7 @@ static const char * const mediatek_board_dt_compat[] = { ...@@ -50,7 +49,7 @@ static const char * const mediatek_board_dt_compat[] = {
"mediatek,mt6589", "mediatek,mt6589",
"mediatek,mt6592", "mediatek,mt6592",
"mediatek,mt7623", "mediatek,mt7623",
"mediatek,mt7623a", "mediatek,mt7629",
"mediatek,mt8127", "mediatek,mt8127",
"mediatek,mt8135", "mediatek,mt8135",
NULL, NULL,
......
...@@ -60,7 +60,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { ...@@ -60,7 +60,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = {
static const struct of_device_id mtk_smp_boot_infos[] __initconst = { static const struct of_device_id mtk_smp_boot_infos[] __initconst = {
{ .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot }, { .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot },
{ .compatible = "mediatek,mt7623", .data = &mtk_mt7623_boot }, { .compatible = "mediatek,mt7623", .data = &mtk_mt7623_boot },
{ .compatible = "mediatek,mt7623a", .data = &mtk_mt7623_boot }, { .compatible = "mediatek,mt7629", .data = &mtk_mt7623_boot },
{}, {},
}; };
......
...@@ -9,7 +9,6 @@ menuconfig ARCH_MESON ...@@ -9,7 +9,6 @@ menuconfig ARCH_MESON
select PINCTRL select PINCTRL
select PINCTRL_MESON select PINCTRL_MESON
select COMMON_CLK select COMMON_CLK
select COMMON_CLK_AMLOGIC
select HAVE_ARM_SCU if SMP select HAVE_ARM_SCU if SMP
select HAVE_ARM_TWD if SMP select HAVE_ARM_TWD if SMP
......
...@@ -454,24 +454,6 @@ config MACH_TREO680 ...@@ -454,24 +454,6 @@ config MACH_TREO680
Say Y here if you intend to run this kernel on Palm Treo 680 Say Y here if you intend to run this kernel on Palm Treo 680
smartphone. smartphone.
config MACH_RAUMFELD_RC
bool "Raumfeld Controller"
select CPU_PXA300
select POWER_SUPPLY
select PXA3xx
config MACH_RAUMFELD_CONNECTOR
bool "Raumfeld Connector"
select CPU_PXA300
select POWER_SUPPLY
select PXA3xx
config MACH_RAUMFELD_SPEAKER
bool "Raumfeld Speaker"
select CPU_PXA300
select POWER_SUPPLY
select PXA3xx
config PXA_SHARPSL config PXA_SHARPSL
bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models" bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
select SHARP_PARAM select SHARP_PARAM
......
...@@ -86,9 +86,6 @@ obj-$(CONFIG_MACH_POODLE) += poodle.o ...@@ -86,9 +86,6 @@ obj-$(CONFIG_MACH_POODLE) += poodle.o
obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_TOSA) += tosa.o
obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o
obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o
obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o
obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o
obj-$(CONFIG_MACH_ZIPIT2) += z2.o obj-$(CONFIG_MACH_ZIPIT2) += z2.o
obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o
......
This diff is collapsed.
...@@ -65,16 +65,16 @@ static int osiris_dvs_notify(struct notifier_block *nb, ...@@ -65,16 +65,16 @@ static int osiris_dvs_notify(struct notifier_block *nb,
switch (val) { switch (val) {
case CPUFREQ_PRECHANGE: case CPUFREQ_PRECHANGE:
if (old_dvs & !new_dvs || if ((old_dvs && !new_dvs) ||
cur_dvs & !new_dvs) { (cur_dvs && !new_dvs)) {
pr_debug("%s: exiting dvs\n", __func__); pr_debug("%s: exiting dvs\n", __func__);
cur_dvs = false; cur_dvs = false;
gpio_set_value(OSIRIS_GPIO_DVS, 1); gpio_set_value(OSIRIS_GPIO_DVS, 1);
} }
break; break;
case CPUFREQ_POSTCHANGE: case CPUFREQ_POSTCHANGE:
if (!old_dvs & new_dvs || if ((!old_dvs && new_dvs) ||
!cur_dvs & new_dvs) { (!cur_dvs && new_dvs)) {
pr_debug("entering dvs\n"); pr_debug("entering dvs\n");
cur_dvs = true; cur_dvs = true;
gpio_set_value(OSIRIS_GPIO_DVS, 0); gpio_set_value(OSIRIS_GPIO_DVS, 0);
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
struct regulator_quirk { struct regulator_quirk {
struct list_head list; struct list_head list;
const struct of_device_id *id; const struct of_device_id *id;
struct device_node *np;
struct of_phandle_args irq_args; struct of_phandle_args irq_args;
struct i2c_msg i2c_msg; struct i2c_msg i2c_msg;
bool shared; /* IRQ line is shared */ bool shared; /* IRQ line is shared */
...@@ -101,6 +102,9 @@ static int regulator_quirk_notify(struct notifier_block *nb, ...@@ -101,6 +102,9 @@ static int regulator_quirk_notify(struct notifier_block *nb,
if (!pos->shared) if (!pos->shared)
continue; continue;
if (pos->np->parent != client->dev.parent->of_node)
continue;
dev_info(&client->dev, "clearing %s@0x%02x interrupts\n", dev_info(&client->dev, "clearing %s@0x%02x interrupts\n",
pos->id->compatible, pos->i2c_msg.addr); pos->id->compatible, pos->i2c_msg.addr);
...@@ -165,6 +169,7 @@ static int __init rcar_gen2_regulator_quirk(void) ...@@ -165,6 +169,7 @@ static int __init rcar_gen2_regulator_quirk(void)
memcpy(&quirk->i2c_msg, id->data, sizeof(quirk->i2c_msg)); memcpy(&quirk->i2c_msg, id->data, sizeof(quirk->i2c_msg));
quirk->id = id; quirk->id = id;
quirk->np = np;
quirk->i2c_msg.addr = addr; quirk->i2c_msg.addr = addr;
ret = of_irq_parse_one(np, 0, argsa); ret = of_irq_parse_one(np, 0, argsa);
......
...@@ -79,15 +79,24 @@ ...@@ -79,15 +79,24 @@
#define TEGRA_PMC_BASE 0x7000E400 #define TEGRA_PMC_BASE 0x7000E400
#define TEGRA_PMC_SIZE SZ_256 #define TEGRA_PMC_SIZE SZ_256
#define TEGRA_MC_BASE 0x7000F000
#define TEGRA_MC_SIZE SZ_1K
#define TEGRA_EMC_BASE 0x7000F400 #define TEGRA_EMC_BASE 0x7000F400
#define TEGRA_EMC_SIZE SZ_1K #define TEGRA_EMC_SIZE SZ_1K
#define TEGRA114_MC_BASE 0x70019000
#define TEGRA114_MC_SIZE SZ_4K
#define TEGRA_EMC0_BASE 0x7001A000 #define TEGRA_EMC0_BASE 0x7001A000
#define TEGRA_EMC0_SIZE SZ_2K #define TEGRA_EMC0_SIZE SZ_2K
#define TEGRA_EMC1_BASE 0x7001A800 #define TEGRA_EMC1_BASE 0x7001A800
#define TEGRA_EMC1_SIZE SZ_2K #define TEGRA_EMC1_SIZE SZ_2K
#define TEGRA124_MC_BASE 0x70019000
#define TEGRA124_MC_SIZE SZ_4K
#define TEGRA124_EMC_BASE 0x7001B000 #define TEGRA124_EMC_BASE 0x7001B000
#define TEGRA124_EMC_SIZE SZ_2K #define TEGRA124_EMC_SIZE SZ_2K
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#define EMC_CFG 0xc #define EMC_CFG 0xc
#define EMC_ADR_CFG 0x10 #define EMC_ADR_CFG 0x10
#define EMC_REFRESH 0x70
#define EMC_NOP 0xdc #define EMC_NOP 0xdc
#define EMC_SELF_REF 0xe0 #define EMC_SELF_REF 0xe0
#define EMC_REQ_CTRL 0x2b0 #define EMC_REQ_CTRL 0x2b0
...@@ -397,7 +396,6 @@ padload_done: ...@@ -397,7 +396,6 @@ padload_done:
mov r1, #1 mov r1, #1
str r1, [r0, #EMC_NOP] str r1, [r0, #EMC_NOP]
str r1, [r0, #EMC_NOP] str r1, [r0, #EMC_NOP]
str r1, [r0, #EMC_REFRESH]
emc_device_mask r1, r0 emc_device_mask r1, r0
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#define EMC_CFG 0xc #define EMC_CFG 0xc
#define EMC_ADR_CFG 0x10 #define EMC_ADR_CFG 0x10
#define EMC_TIMING_CONTROL 0x28 #define EMC_TIMING_CONTROL 0x28
#define EMC_REFRESH 0x70
#define EMC_NOP 0xdc #define EMC_NOP 0xdc
#define EMC_SELF_REF 0xe0 #define EMC_SELF_REF 0xe0
#define EMC_MRW 0xe8 #define EMC_MRW 0xe8
...@@ -45,6 +44,8 @@ ...@@ -45,6 +44,8 @@
#define EMC_XM2VTTGENPADCTRL 0x310 #define EMC_XM2VTTGENPADCTRL 0x310
#define EMC_XM2VTTGENPADCTRL2 0x314 #define EMC_XM2VTTGENPADCTRL2 0x314
#define MC_EMEM_ARB_CFG 0x90
#define PMC_CTRL 0x0 #define PMC_CTRL 0x0
#define PMC_CTRL_SIDE_EFFECT_LP0 (1 << 14) /* enter LP0 when CPU pwr gated */ #define PMC_CTRL_SIDE_EFFECT_LP0 (1 << 14) /* enter LP0 when CPU pwr gated */
...@@ -419,6 +420,22 @@ _pll_m_c_x_done: ...@@ -419,6 +420,22 @@ _pll_m_c_x_done:
movweq r0, #:lower16:TEGRA124_EMC_BASE movweq r0, #:lower16:TEGRA124_EMC_BASE
movteq r0, #:upper16:TEGRA124_EMC_BASE movteq r0, #:upper16:TEGRA124_EMC_BASE
cmp r10, #TEGRA30
moveq r2, #0x20
movweq r4, #:lower16:TEGRA_MC_BASE
movteq r4, #:upper16:TEGRA_MC_BASE
cmp r10, #TEGRA114
moveq r2, #0x34
movweq r4, #:lower16:TEGRA114_MC_BASE
movteq r4, #:upper16:TEGRA114_MC_BASE
cmp r10, #TEGRA124
moveq r2, #0x20
movweq r4, #:lower16:TEGRA124_MC_BASE
movteq r4, #:upper16:TEGRA124_MC_BASE
ldr r1, [r5, r2] @ restore MC_EMEM_ARB_CFG
str r1, [r4, #MC_EMEM_ARB_CFG]
exit_self_refresh: exit_self_refresh:
ldr r1, [r5, #0xC] @ restore EMC_XM2VTTGENPADCTRL ldr r1, [r5, #0xC] @ restore EMC_XM2VTTGENPADCTRL
str r1, [r0, #EMC_XM2VTTGENPADCTRL] str r1, [r0, #EMC_XM2VTTGENPADCTRL]
...@@ -459,7 +476,6 @@ emc_wait_auto_cal_onetime: ...@@ -459,7 +476,6 @@ emc_wait_auto_cal_onetime:
cmp r10, #TEGRA30 cmp r10, #TEGRA30
streq r1, [r0, #EMC_NOP] streq r1, [r0, #EMC_NOP]
streq r1, [r0, #EMC_NOP] streq r1, [r0, #EMC_NOP]
streq r1, [r0, #EMC_REFRESH]
emc_device_mask r1, r0 emc_device_mask r1, r0
...@@ -521,6 +537,8 @@ zcal_done: ...@@ -521,6 +537,8 @@ zcal_done:
ldr r1, [r5, #0x0] @ restore EMC_CFG ldr r1, [r5, #0x0] @ restore EMC_CFG
str r1, [r0, #EMC_CFG] str r1, [r0, #EMC_CFG]
emc_timing_update r1, r0
/* Tegra114 had dual EMC channel, now config the other one */ /* Tegra114 had dual EMC channel, now config the other one */
cmp r10, #TEGRA114 cmp r10, #TEGRA114
bne __no_dual_emc_chanl bne __no_dual_emc_chanl
...@@ -546,6 +564,7 @@ tegra30_sdram_pad_address: ...@@ -546,6 +564,7 @@ tegra30_sdram_pad_address:
.word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14 .word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14
.word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18 .word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18
.word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c .word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c
.word TEGRA_MC_BASE + MC_EMEM_ARB_CFG @0x20
tegra30_sdram_pad_address_end: tegra30_sdram_pad_address_end:
tegra114_sdram_pad_address: tegra114_sdram_pad_address:
...@@ -562,6 +581,7 @@ tegra114_sdram_pad_address: ...@@ -562,6 +581,7 @@ tegra114_sdram_pad_address:
.word TEGRA_EMC1_BASE + EMC_AUTO_CAL_INTERVAL @0x28 .word TEGRA_EMC1_BASE + EMC_AUTO_CAL_INTERVAL @0x28
.word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL @0x2c .word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL @0x2c
.word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL2 @0x30 .word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL2 @0x30
.word TEGRA114_MC_BASE + MC_EMEM_ARB_CFG @0x34
tegra114_sdram_pad_adress_end: tegra114_sdram_pad_adress_end:
tegra124_sdram_pad_address: tegra124_sdram_pad_address:
...@@ -573,6 +593,7 @@ tegra124_sdram_pad_address: ...@@ -573,6 +593,7 @@ tegra124_sdram_pad_address:
.word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14 .word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14
.word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18 .word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18
.word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c .word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c
.word TEGRA124_MC_BASE + MC_EMEM_ARB_CFG @0x20
tegra124_sdram_pad_address_end: tegra124_sdram_pad_address_end:
tegra30_sdram_pad_size: tegra30_sdram_pad_size:
......
...@@ -112,12 +112,13 @@ config ARCH_MESON ...@@ -112,12 +112,13 @@ config ARCH_MESON
bool "Amlogic Platforms" bool "Amlogic Platforms"
select PINCTRL select PINCTRL
select PINCTRL_MESON select PINCTRL_MESON
select COMMON_CLK_AMLOGIC
select COMMON_CLK_GXBB select COMMON_CLK_GXBB
select COMMON_CLK_AXG select COMMON_CLK_AXG
select COMMON_CLK_G12A
select MESON_IRQ_GPIO select MESON_IRQ_GPIO
help help
This enables support for the Amlogic S905 SoCs. This enables support for the arm64 based Amlogic SoCs
such as the s905, S905X/D, S912, A113X/D or S905X/D2
config ARCH_MVEBU config ARCH_MVEBU
bool "Marvell EBU SoC Family" bool "Marvell EBU SoC Family"
...@@ -146,6 +147,10 @@ config ARCH_MXC ...@@ -146,6 +147,10 @@ config ARCH_MXC
bool "ARMv8 based NXP i.MX SoC family" bool "ARMv8 based NXP i.MX SoC family"
select ARM64_ERRATUM_843419 select ARM64_ERRATUM_843419
select ARM64_ERRATUM_845719 select ARM64_ERRATUM_845719
select IMX_GPCV2
select IMX_GPCV2_PM_DOMAINS
select PM
select PM_GENERIC_DOMAINS
help help
This enables support for the ARMv8 based SoCs in the This enables support for the ARMv8 based SoCs in the
NXP i.MX family. NXP i.MX family.
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/gpio/consumer.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
...@@ -40,6 +41,8 @@ struct da8xx_ohci_hcd { ...@@ -40,6 +41,8 @@ struct da8xx_ohci_hcd {
struct regulator *vbus_reg; struct regulator *vbus_reg;
struct notifier_block nb; struct notifier_block nb;
unsigned int reg_enabled; unsigned int reg_enabled;
struct gpio_desc *vbus_gpio;
struct gpio_desc *oc_gpio;
}; };
#define to_da8xx_ohci(hcd) (struct da8xx_ohci_hcd *)(hcd_to_ohci(hcd)->priv) #define to_da8xx_ohci(hcd) (struct da8xx_ohci_hcd *)(hcd_to_ohci(hcd)->priv)
...@@ -87,11 +90,12 @@ static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) ...@@ -87,11 +90,12 @@ static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on)
{ {
struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
struct device *dev = hcd->self.controller; struct device *dev = hcd->self.controller;
struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
int ret; int ret;
if (hub && hub->set_power) if (da8xx_ohci->vbus_gpio) {
return hub->set_power(1, on); gpiod_set_value_cansleep(da8xx_ohci->vbus_gpio, on);
return 0;
}
if (!da8xx_ohci->vbus_reg) if (!da8xx_ohci->vbus_reg)
return 0; return 0;
...@@ -119,11 +123,9 @@ static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) ...@@ -119,11 +123,9 @@ static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on)
static int ohci_da8xx_get_power(struct usb_hcd *hcd) static int ohci_da8xx_get_power(struct usb_hcd *hcd)
{ {
struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
struct device *dev = hcd->self.controller;
struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
if (hub && hub->get_power) if (da8xx_ohci->vbus_gpio)
return hub->get_power(1); return gpiod_get_value_cansleep(da8xx_ohci->vbus_gpio);
if (da8xx_ohci->vbus_reg) if (da8xx_ohci->vbus_reg)
return regulator_is_enabled(da8xx_ohci->vbus_reg); return regulator_is_enabled(da8xx_ohci->vbus_reg);
...@@ -134,13 +136,11 @@ static int ohci_da8xx_get_power(struct usb_hcd *hcd) ...@@ -134,13 +136,11 @@ static int ohci_da8xx_get_power(struct usb_hcd *hcd)
static int ohci_da8xx_get_oci(struct usb_hcd *hcd) static int ohci_da8xx_get_oci(struct usb_hcd *hcd)
{ {
struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
struct device *dev = hcd->self.controller;
struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
unsigned int flags; unsigned int flags;
int ret; int ret;
if (hub && hub->get_oci) if (da8xx_ohci->oc_gpio)
return hub->get_oci(1); return gpiod_get_value_cansleep(da8xx_ohci->oc_gpio);
if (!da8xx_ohci->vbus_reg) if (!da8xx_ohci->vbus_reg)
return 0; return 0;
...@@ -158,10 +158,8 @@ static int ohci_da8xx_get_oci(struct usb_hcd *hcd) ...@@ -158,10 +158,8 @@ static int ohci_da8xx_get_oci(struct usb_hcd *hcd)
static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) static int ohci_da8xx_has_set_power(struct usb_hcd *hcd)
{ {
struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
struct device *dev = hcd->self.controller;
struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
if (hub && hub->set_power) if (da8xx_ohci->vbus_gpio)
return 1; return 1;
if (da8xx_ohci->vbus_reg) if (da8xx_ohci->vbus_reg)
...@@ -173,10 +171,8 @@ static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) ...@@ -173,10 +171,8 @@ static int ohci_da8xx_has_set_power(struct usb_hcd *hcd)
static int ohci_da8xx_has_oci(struct usb_hcd *hcd) static int ohci_da8xx_has_oci(struct usb_hcd *hcd)
{ {
struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
struct device *dev = hcd->self.controller;
struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
if (hub && hub->get_oci) if (da8xx_ohci->oc_gpio)
return 1; return 1;
if (da8xx_ohci->vbus_reg) if (da8xx_ohci->vbus_reg)
...@@ -196,19 +192,6 @@ static int ohci_da8xx_has_potpgt(struct usb_hcd *hcd) ...@@ -196,19 +192,6 @@ static int ohci_da8xx_has_potpgt(struct usb_hcd *hcd)
return 0; return 0;
} }
/*
* Handle the port over-current indicator change.
*/
static void ohci_da8xx_ocic_handler(struct da8xx_ohci_root_hub *hub,
unsigned port)
{
ocic_mask |= 1 << port;
/* Once over-current is detected, the port needs to be powered down */
if (hub->get_oci(port) > 0)
hub->set_power(port, 0);
}
static int ohci_da8xx_regulator_event(struct notifier_block *nb, static int ohci_da8xx_regulator_event(struct notifier_block *nb,
unsigned long event, void *data) unsigned long event, void *data)
{ {
...@@ -223,16 +206,23 @@ static int ohci_da8xx_regulator_event(struct notifier_block *nb, ...@@ -223,16 +206,23 @@ static int ohci_da8xx_regulator_event(struct notifier_block *nb,
return 0; return 0;
} }
static irqreturn_t ohci_da8xx_oc_handler(int irq, void *data)
{
struct da8xx_ohci_hcd *da8xx_ohci = data;
if (gpiod_get_value(da8xx_ohci->oc_gpio))
gpiod_set_value(da8xx_ohci->vbus_gpio, 0);
return IRQ_HANDLED;
}
static int ohci_da8xx_register_notify(struct usb_hcd *hcd) static int ohci_da8xx_register_notify(struct usb_hcd *hcd)
{ {
struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd); struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
struct device *dev = hcd->self.controller; struct device *dev = hcd->self.controller;
struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
int ret = 0; int ret = 0;
if (hub && hub->ocic_notify) { if (!da8xx_ohci->oc_gpio && da8xx_ohci->vbus_reg) {
ret = hub->ocic_notify(ohci_da8xx_ocic_handler);
} else if (da8xx_ohci->vbus_reg) {
da8xx_ohci->nb.notifier_call = ohci_da8xx_regulator_event; da8xx_ohci->nb.notifier_call = ohci_da8xx_regulator_event;
ret = devm_regulator_register_notifier(da8xx_ohci->vbus_reg, ret = devm_regulator_register_notifier(da8xx_ohci->vbus_reg,
&da8xx_ohci->nb); &da8xx_ohci->nb);
...@@ -244,15 +234,6 @@ static int ohci_da8xx_register_notify(struct usb_hcd *hcd) ...@@ -244,15 +234,6 @@ static int ohci_da8xx_register_notify(struct usb_hcd *hcd)
return ret; return ret;
} }
static void ohci_da8xx_unregister_notify(struct usb_hcd *hcd)
{
struct device *dev = hcd->self.controller;
struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
if (hub && hub->ocic_notify)
hub->ocic_notify(NULL);
}
static int ohci_da8xx_reset(struct usb_hcd *hcd) static int ohci_da8xx_reset(struct usb_hcd *hcd)
{ {
struct device *dev = hcd->self.controller; struct device *dev = hcd->self.controller;
...@@ -402,34 +383,35 @@ MODULE_DEVICE_TABLE(of, da8xx_ohci_ids); ...@@ -402,34 +383,35 @@ MODULE_DEVICE_TABLE(of, da8xx_ohci_ids);
static int ohci_da8xx_probe(struct platform_device *pdev) static int ohci_da8xx_probe(struct platform_device *pdev)
{ {
struct da8xx_ohci_hcd *da8xx_ohci; struct da8xx_ohci_hcd *da8xx_ohci;
struct device *dev = &pdev->dev;
int error, hcd_irq, oc_irq;
struct usb_hcd *hcd; struct usb_hcd *hcd;
struct resource *mem; struct resource *mem;
int error, irq;
hcd = usb_create_hcd(&ohci_da8xx_hc_driver, &pdev->dev, hcd = usb_create_hcd(&ohci_da8xx_hc_driver, dev, dev_name(dev));
dev_name(&pdev->dev));
if (!hcd) if (!hcd)
return -ENOMEM; return -ENOMEM;
da8xx_ohci = to_da8xx_ohci(hcd); da8xx_ohci = to_da8xx_ohci(hcd);
da8xx_ohci->hcd = hcd; da8xx_ohci->hcd = hcd;
da8xx_ohci->usb11_clk = devm_clk_get(&pdev->dev, NULL); da8xx_ohci->usb11_clk = devm_clk_get(dev, NULL);
if (IS_ERR(da8xx_ohci->usb11_clk)) { if (IS_ERR(da8xx_ohci->usb11_clk)) {
error = PTR_ERR(da8xx_ohci->usb11_clk); error = PTR_ERR(da8xx_ohci->usb11_clk);
if (error != -EPROBE_DEFER) if (error != -EPROBE_DEFER)
dev_err(&pdev->dev, "Failed to get clock.\n"); dev_err(dev, "Failed to get clock.\n");
goto err; goto err;
} }
da8xx_ohci->usb11_phy = devm_phy_get(&pdev->dev, "usb-phy"); da8xx_ohci->usb11_phy = devm_phy_get(dev, "usb-phy");
if (IS_ERR(da8xx_ohci->usb11_phy)) { if (IS_ERR(da8xx_ohci->usb11_phy)) {
error = PTR_ERR(da8xx_ohci->usb11_phy); error = PTR_ERR(da8xx_ohci->usb11_phy);
if (error != -EPROBE_DEFER) if (error != -EPROBE_DEFER)
dev_err(&pdev->dev, "Failed to get phy.\n"); dev_err(dev, "Failed to get phy.\n");
goto err; goto err;
} }
da8xx_ohci->vbus_reg = devm_regulator_get_optional(&pdev->dev, "vbus"); da8xx_ohci->vbus_reg = devm_regulator_get_optional(dev, "vbus");
if (IS_ERR(da8xx_ohci->vbus_reg)) { if (IS_ERR(da8xx_ohci->vbus_reg)) {
error = PTR_ERR(da8xx_ohci->vbus_reg); error = PTR_ERR(da8xx_ohci->vbus_reg);
if (error == -ENODEV) { if (error == -ENODEV) {
...@@ -437,13 +419,34 @@ static int ohci_da8xx_probe(struct platform_device *pdev) ...@@ -437,13 +419,34 @@ static int ohci_da8xx_probe(struct platform_device *pdev)
} else if (error == -EPROBE_DEFER) { } else if (error == -EPROBE_DEFER) {
goto err; goto err;
} else { } else {
dev_err(&pdev->dev, "Failed to get regulator\n"); dev_err(dev, "Failed to get regulator\n");
goto err; goto err;
} }
} }
da8xx_ohci->vbus_gpio = devm_gpiod_get_optional(dev, "vbus",
GPIOD_OUT_HIGH);
if (IS_ERR(da8xx_ohci->vbus_gpio))
goto err;
da8xx_ohci->oc_gpio = devm_gpiod_get_optional(dev, "oc", GPIOD_IN);
if (IS_ERR(da8xx_ohci->oc_gpio))
goto err;
if (da8xx_ohci->oc_gpio) {
oc_irq = gpiod_to_irq(da8xx_ohci->oc_gpio);
if (oc_irq < 0)
goto err;
error = devm_request_irq(dev, oc_irq, ohci_da8xx_oc_handler,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
"OHCI over-current indicator", da8xx_ohci);
if (error)
goto err;
}
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
hcd->regs = devm_ioremap_resource(&pdev->dev, mem); hcd->regs = devm_ioremap_resource(dev, mem);
if (IS_ERR(hcd->regs)) { if (IS_ERR(hcd->regs)) {
error = PTR_ERR(hcd->regs); error = PTR_ERR(hcd->regs);
goto err; goto err;
...@@ -451,13 +454,13 @@ static int ohci_da8xx_probe(struct platform_device *pdev) ...@@ -451,13 +454,13 @@ static int ohci_da8xx_probe(struct platform_device *pdev)
hcd->rsrc_start = mem->start; hcd->rsrc_start = mem->start;
hcd->rsrc_len = resource_size(mem); hcd->rsrc_len = resource_size(mem);
irq = platform_get_irq(pdev, 0); hcd_irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (hcd_irq < 0) {
error = -ENODEV; error = -ENODEV;
goto err; goto err;
} }
error = usb_add_hcd(hcd, irq, 0); error = usb_add_hcd(hcd, hcd_irq, 0);
if (error) if (error)
goto err; goto err;
...@@ -480,7 +483,6 @@ static int ohci_da8xx_remove(struct platform_device *pdev) ...@@ -480,7 +483,6 @@ static int ohci_da8xx_remove(struct platform_device *pdev)
{ {
struct usb_hcd *hcd = platform_get_drvdata(pdev); struct usb_hcd *hcd = platform_get_drvdata(pdev);
ohci_da8xx_unregister_notify(hcd);
usb_remove_hcd(hcd); usb_remove_hcd(hcd);
usb_put_hcd(hcd); usb_put_hcd(hcd);
......
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#ifndef _DT_BINDINGS_POWER_MT8183_POWER_H #ifndef _DT_BINDINGS_POWER_MT8173_POWER_H
#define _DT_BINDINGS_POWER_MT8183_POWER_H #define _DT_BINDINGS_POWER_MT8173_POWER_H
#define MT8173_POWER_DOMAIN_VDEC 0 #define MT8173_POWER_DOMAIN_VDEC 0
#define MT8173_POWER_DOMAIN_VENC 1 #define MT8173_POWER_DOMAIN_VENC 1
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
#define MT8173_POWER_DOMAIN_MFG_2D 8 #define MT8173_POWER_DOMAIN_MFG_2D 8
#define MT8173_POWER_DOMAIN_MFG 9 #define MT8173_POWER_DOMAIN_MFG 9
#endif /* _DT_BINDINGS_POWER_MT8183_POWER_H */ #endif /* _DT_BINDINGS_POWER_MT8173_POWER_H */
...@@ -46,5 +46,4 @@ enum { ...@@ -46,5 +46,4 @@ enum {
EMAC_VERSION_2, /* DM646x */ EMAC_VERSION_2, /* DM646x */
}; };
void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context);
#endif #endif
...@@ -11,22 +11,8 @@ ...@@ -11,22 +11,8 @@
#ifndef __ASM_ARCH_USB_H #ifndef __ASM_ARCH_USB_H
#define __ASM_ARCH_USB_H #define __ASM_ARCH_USB_H
struct da8xx_ohci_root_hub;
typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,
unsigned port);
/* Passed as the platform data to the OHCI driver */ /* Passed as the platform data to the OHCI driver */
struct da8xx_ohci_root_hub { struct da8xx_ohci_root_hub {
/* Switch the port power on/off */
int (*set_power)(unsigned port, int on);
/* Read the port power status */
int (*get_power)(unsigned port);
/* Read the port over-current indicator */
int (*get_oci)(unsigned port);
/* Over-current indicator change notification (pass NULL to disable) */
int (*ocic_notify)(da8xx_ocic_handler_t handler);
/* Time from power on to power good (in 2 ms units) */ /* Time from power on to power good (in 2 ms units) */
u8 potpgt; u8 potpgt;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment