History

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 ...

Linus Torvalds committed 7 years ago

Commit aebbfaf2 parents fa29f5b 49b35cd40 files · +389 −1867Browse files

Unified · Split

40 files
  1. MAINTAINERS +22 −22
  2. arch/arm/configs/pxa_defconfig +0 −4
  3. arch/arm/configs/raumfeld_defconfig +0 −197
  4. arch/arm/mach-davinci/board-da830-evm.c +13 −73
  5. arch/arm/mach-davinci/board-da850-evm.c +14 −36
  6. arch/arm/mach-davinci/board-dm365-evm.c +5 −8
  7. arch/arm/mach-davinci/board-dm644x-evm.c +5 −8
  8. arch/arm/mach-davinci/board-dm646x-evm.c +5 −8
  9. arch/arm/mach-davinci/board-mityomapl138.c +21 −17
  10. arch/arm/mach-davinci/board-omapl138-hawk.c +9 −72
  11. arch/arm/mach-davinci/board-sffsdr.c +6 −7
  12. arch/arm/mach-davinci/common.c +0 −15
  13. arch/arm/mach-ep93xx/ts72xx.c +0 −1
  14. arch/arm/mach-exynos/platsmp.c +2 −2
  15. arch/arm/mach-imx/Makefile +2 −1
  16. arch/arm/mach-imx/common.h +10 −0
  17. arch/arm/mach-imx/cpuidle-imx7ulp.c +60 −0
  18. arch/arm/mach-imx/cpuidle.h +5 −0
  19. arch/arm/mach-imx/mach-imx7ulp.c +46 −0
  20. arch/arm/mach-imx/pm-imx7ulp.c +44 −5
  21. arch/arm/mach-lpc32xx/phy3250.c +0 −84
  22. arch/arm/mach-lpc32xx/pm.c +3 −10
  23. arch/arm/mach-mediatek/Kconfig +4 −0
  24. arch/arm/mach-mediatek/mediatek.c +1 −2
  25. arch/arm/mach-mediatek/platsmp.c +1 −1
  26. arch/arm/mach-meson/Kconfig +0 −1
  27. arch/arm/mach-pxa/Kconfig +0 −18
  28. arch/arm/mach-pxa/Makefile +0 −3
  29. arch/arm/mach-pxa/include/mach/pxa25x-udc.h +0 −0
  30. arch/arm/mach-pxa/raumfeld.c +0 −1186
  31. arch/arm/mach-s3c24xx/mach-osiris-dvs.c +4 −4
  32. arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +5 −0
  33. arch/arm/mach-tegra/iomap.h +9 −0
  34. arch/arm/mach-tegra/sleep-tegra20.S +0 −2
  35. arch/arm/mach-tegra/sleep-tegra30.S +23 −2
  36. arch/arm64/Kconfig.platforms +7 −2
  37. drivers/usb/host/ohci-da8xx.c +60 −58
  38. include/dt-bindings/power/mt8173-power.h +3 −3
  39. include/linux/davinci_emac.h +0 −1
  40. include/linux/platform_data/usb-davinci.h +0 −14
MAINTAINERS+22−22
@@ -1036,26 +1036,26 @@ F: drivers/net/appletalk/ · 1035 unmodified lines
10361036 F: net/appletalk/
10371037
10381038 APPLIED MICRO (APM) X-GENE DEVICE TREE SUPPORT
1039−M: Duc Dang <dhdang@apm.com>
1039+M: Khuong Dinh <khuong@os.amperecomputing.com>
10401040 S: Supported
10411041 F: arch/arm64/boot/dts/apm/
10421042
10431043 APPLIED MICRO (APM) X-GENE SOC EDAC
1044−M: Loc Ho <lho@apm.com>
1044+M: Khuong Dinh <khuong@os.amperecomputing.com>
10451045 S: Supported
10461046 F: drivers/edac/xgene_edac.c
10471047 F: Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
10481048
10491049 APPLIED MICRO (APM) X-GENE SOC ETHERNET (V2) DRIVER
1050−M: Iyappan Subramanian <isubramanian@apm.com>
1051−M: Keyur Chudgar <kchudgar@apm.com>
1050+M: Iyappan Subramanian <iyappan@os.amperecomputing.com>
1051+M: Keyur Chudgar <keyur@os.amperecomputing.com>
10521052 S: Supported
10531053 F: drivers/net/ethernet/apm/xgene-v2/
10541054
10551055 APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER
1056−M: Iyappan Subramanian <isubramanian@apm.com>
1057−M: Keyur Chudgar <kchudgar@apm.com>
1058−M: Quan Nguyen <qnguyen@apm.com>
1056+M: Iyappan Subramanian <iyappan@os.amperecomputing.com>
1057+M: Keyur Chudgar <keyur@os.amperecomputing.com>
1058+M: Quan Nguyen <quan@os.amperecomputing.com>
10591059 S: Supported
10601060 F: drivers/net/ethernet/apm/xgene/
10611061 F: drivers/net/phy/mdio-xgene.c
@@ -1063,7 +1063,7 @@ F: Documentation/devicetree/bindings/net/apm-xgene-enet.txt · 1 unmodified line
10631063 F: Documentation/devicetree/bindings/net/apm-xgene-mdio.txt
10641064
10651065 APPLIED MICRO (APM) X-GENE SOC PMU
1066−M: Tai Nguyen <ttnguyen@apm.com>
1066+M: Khuong Dinh <khuong@os.amperecomputing.com>
10671067 S: Supported
10681068 F: drivers/perf/xgene_pmu.c
10691069 F: Documentation/perf/xgene-pmu.txt
@@ -1530,21 +1530,14 @@ ARM/FREESCALE IMX / MXC ARM ARCHITECTURE · 460 unmodified lines
15301530 M: Shawn Guo <shawnguo@kernel.org>
15311531 M: Sascha Hauer <s.hauer@pengutronix.de>
15321532 R: Pengutronix Kernel Team <kernel@pengutronix.de>
1533−R: Fabio Estevam <fabio.estevam@nxp.com>
1533+R: Fabio Estevam <festevam@gmail.com>
15341534 R: NXP Linux Team <linux-imx@nxp.com>
15351535 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
15361536 S: Maintained
15371537 T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
1538−F: arch/arm/mach-imx/
1539−F: arch/arm/mach-mxs/
1540−F: arch/arm/boot/dts/imx*
1541−F: arch/arm/configs/imx*_defconfig
1542−F: arch/arm64/boot/dts/freescale/imx*
1543−F: drivers/clk/imx/
1544−F: drivers/firmware/imx/
1545−F: drivers/soc/imx/
1546−F: include/linux/firmware/imx/
1547−F: include/soc/imx/
1538+N: imx
1539+N: mxs
1540+X: drivers/media/i2c/
15481541
15491542 ARM/FREESCALE VYBRID ARM ARCHITECTURE
15501543 M: Shawn Guo <shawnguo@kernel.org>
@@ -2108,6 +2101,8 @@ Q: http://patchwork.kernel.org/project/linux-renesas-soc/list/ · 557 unmodified lines
21082101 T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
21092102 S: Supported
21102103 F: arch/arm/boot/dts/emev2*
2104+F: arch/arm/boot/dts/gr-peach*
2105+F: arch/arm/boot/dts/iwg20d-q7*
21112106 F: arch/arm/boot/dts/r7s*
21122107 F: arch/arm/boot/dts/r8a*
21132108 F: arch/arm/boot/dts/r9a*
@@ -9888,6 +9883,11 @@ S: Maintained · 7774 unmodified lines
98889883 F: drivers/mtd/nand/raw/meson_*
98899884 F: Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt
98909885
9886+METHODE UDPU SUPPORT
9887+M: Vladimir Vid <vladimir.vid@sartura.hr>
9888+S: Maintained
9889+F: arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
9890+
98919891 MICROBLAZE ARCHITECTURE
98929892 M: Michal Simek <monstr@monstr.eu>
98939893 W: http://www.monstr.eu/fdt/
@@ -11613,7 +11613,7 @@ F: Documentation/devicetree/bindings/pci/altera-pcie.txt · 1719 unmodified lines
1161311613 F: drivers/pci/controller/pcie-altera.c
1161411614
1161511615 PCI DRIVER FOR APPLIEDMICRO XGENE
11616−M: Tanmay Inamdar <tinamdar@apm.com>
11616+M: Toan Le <toan@os.amperecomputing.com>
1161711617 L: linux-pci@vger.kernel.org
1161811618 L: linux-arm-kernel@lists.infradead.org
1161911619 S: Maintained
@@ -11791,7 +11791,7 @@ F: Documentation/devicetree/bindings/pci/altera-pcie-msi.txt · 171 unmodified lines
1179111791 F: drivers/pci/controller/pcie-altera-msi.c
1179211792
1179311793 PCI MSI DRIVER FOR APPLIEDMICRO XGENE
11794−M: Duc Dang <dhdang@apm.com>
11794+M: Toan Le <toan@os.amperecomputing.com>
1179511795 L: linux-pci@vger.kernel.org
1179611796 L: linux-arm-kernel@lists.infradead.org
1179711797 S: Maintained
@@ -14759,7 +14759,7 @@ S: Maintained · 2961 unmodified lines
1475914759 F: drivers/tty/serial/8250/8250_dw.c
1476014760
1476114761 SYNOPSYS DESIGNWARE APB GPIO DRIVER
14762−M: Hoan Tran <hotran@apm.com>
14762+M: Hoan Tran <hoan@os.amperecomputing.com>
1476314763 L: linux-gpio@vger.kernel.org
1476414764 S: Maintained
1476514765 F: drivers/gpio/gpio-dwapb.c
arch/arm/configs/pxa_defconfig+0−4
@@ -66,9 +66,6 @@ CONFIG_MACH_MIOA701=y · 65 unmodified lines
6666 CONFIG_PXA_EZX=y
6767 CONFIG_MACH_MP900C=y
6868 CONFIG_ARCH_PXA_PALM=y
69−CONFIG_MACH_RAUMFELD_RC=y
70−CONFIG_MACH_RAUMFELD_CONNECTOR=y
71−CONFIG_MACH_RAUMFELD_SPEAKER=y
7269 CONFIG_PXA_SHARPSL=y
7370 CONFIG_MACH_POODLE=y
7471 CONFIG_MACH_CORGI=y
@@ -498,7 +495,6 @@ CONFIG_SND_PXA2XX_SOC_E800=m · 423 unmodified lines
498495 CONFIG_SND_PXA2XX_SOC_EM_X270=m
499496 CONFIG_SND_PXA2XX_SOC_PALM27X=y
500497 CONFIG_SND_SOC_ZYLONITE=m
501−CONFIG_SND_SOC_RAUMFELD=m
502498 CONFIG_SND_PXA2XX_SOC_HX4700=m
503499 CONFIG_SND_PXA2XX_SOC_MAGICIAN=m
504500 CONFIG_SND_PXA2XX_SOC_MIOA701=m
arch/arm/configs/raumfeld_defconfig+0−197
@@ -1,197 +0,0 @@
1−# CONFIG_LOCALVERSION_AUTO is not set
2−# CONFIG_SWAP is not set
3−CONFIG_MODULES=y
4−CONFIG_MODULE_UNLOAD=y
5−# CONFIG_LBDAF is not set
6−# CONFIG_BLK_DEV_BSG is not set
7−CONFIG_ARCH_PXA=y
8−CONFIG_MACH_RAUMFELD_RC=y
9−CONFIG_MACH_RAUMFELD_CONNECTOR=y
10−CONFIG_MACH_RAUMFELD_SPEAKER=y
11−CONFIG_NO_HZ=y
12−CONFIG_AEABI=y
13−# CONFIG_OABI_COMPAT is not set
14−CONFIG_CMDLINE="console=ttyS0,115200 rw"
15−CONFIG_CPU_FREQ=y
16−CONFIG_CPU_IDLE=y
17−CONFIG_PM=y
18−CONFIG_APM_EMULATION=y
19−CONFIG_NET=y
20−CONFIG_PACKET=y
21−CONFIG_UNIX=y
22−CONFIG_INET=y
23−CONFIG_IP_MULTICAST=y
24−CONFIG_IP_PNP=y
25−CONFIG_SYN_COOKIES=y
26−CONFIG_IPV6=y
27−CONFIG_CFG80211=y
28−CONFIG_MAC80211=y
29−CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
30−CONFIG_MTD=y
31−CONFIG_MTD_BLOCK=y
32−CONFIG_NFTL=y
33−CONFIG_NFTL_RW=y
34−CONFIG_MTD_BLOCK2MTD=y
35−CONFIG_MTD_NAND=y
36−CONFIG_MTD_NAND_MARVELL=y
37−CONFIG_MTD_UBI=y
38−CONFIG_BLK_DEV_LOOP=y
39−CONFIG_ISL29003=y
40−CONFIG_IIO=y
41−CONFIG_AD5446=y
42−CONFIG_SCSI=y
43−CONFIG_BLK_DEV_SD=y
44−CONFIG_CHR_DEV_SG=y
45−CONFIG_NETDEVICES=y
46−CONFIG_NET_ETHERNET=y
47−CONFIG_SMSC911X=y
48−CONFIG_LIBERTAS=y
49−CONFIG_LIBERTAS_SDIO=m
50−CONFIG_USB_USBNET=y
51−# CONFIG_USB_NET_AX8817X is not set
52−# CONFIG_USB_NET_NET1080 is not set
53−CONFIG_USB_NET_MCS7830=y
54−# CONFIG_USB_NET_CDC_SUBSET is not set
55−# CONFIG_USB_NET_ZAURUS is not set
56−CONFIG_INPUT_EVDEV=y
57−CONFIG_KEYBOARD_GPIO=y
58−# CONFIG_INPUT_MOUSE is not set
59−CONFIG_INPUT_TOUCHSCREEN=y
60−CONFIG_TOUCHSCREEN_EETI=m
61−CONFIG_INPUT_MISC=y
62−CONFIG_INPUT_GPIO_ROTARY_ENCODER=y
63−CONFIG_SERIAL_PXA=y
64−CONFIG_SERIAL_PXA_CONSOLE=y
65−CONFIG_HW_RANDOM=y
66−CONFIG_I2C=y
67−CONFIG_I2C_CHARDEV=y
68−CONFIG_I2C_PXA=y
69−CONFIG_SPI=y
70−CONFIG_SPI_DEBUG=y
71−CONFIG_SPI_GPIO=y
72−CONFIG_SPI_SPIDEV=y
73−CONFIG_DEBUG_GPIO=y
74−CONFIG_W1_MASTER_GPIO=m
75−CONFIG_POWER_SUPPLY=y
76−CONFIG_PDA_POWER=y
77−CONFIG_BATTERY_DS2760=m
78−CONFIG_SENSORS_LIS3_SPI=y
79−CONFIG_REGULATOR=y
80−CONFIG_REGULATOR_DEBUG=y
81−CONFIG_REGULATOR_FIXED_VOLTAGE=y
82−CONFIG_REGULATOR_MAX8660=y
83−CONFIG_FB=y
84−CONFIG_FB_PXA=y
85−CONFIG_BACKLIGHT_LCD_SUPPORT=y
86−# CONFIG_LCD_CLASS_DEVICE is not set
87−CONFIG_BACKLIGHT_CLASS_DEVICE=y
88−# CONFIG_BACKLIGHT_GENERIC is not set
89−CONFIG_BACKLIGHT_PWM=y
90−# CONFIG_VGA_CONSOLE is not set
91−CONFIG_FRAMEBUFFER_CONSOLE=y
92−CONFIG_LOGO=y
93−# CONFIG_LOGO_LINUX_MONO is not set
94−# CONFIG_LOGO_LINUX_VGA16 is not set
95−# CONFIG_LOGO_LINUX_CLUT224 is not set
96−CONFIG_SOUND=y
97−CONFIG_SND=y
98−# CONFIG_SND_DRIVERS is not set
99−# CONFIG_SND_USB is not set
100−CONFIG_SND_SOC=y
101−CONFIG_SND_PXA2XX_SOC=y
102−CONFIG_SND_SOC_RAUMFELD=y
103−CONFIG_HID_DRAGONRISE=y
104−CONFIG_HID_GYRATION=y
105−CONFIG_HID_TWINHAN=y
106−CONFIG_HID_NTRIG=y
107−CONFIG_HID_PANTHERLORD=y
108−CONFIG_HID_PETALYNX=y
109−CONFIG_HID_SAMSUNG=y
110−CONFIG_HID_SONY=y
111−CONFIG_HID_SUNPLUS=y
112−CONFIG_HID_GREENASIA=y
113−CONFIG_HID_SMARTJOYPLUS=y
114−CONFIG_HID_TOPSEED=y
115−CONFIG_HID_THRUSTMASTER=y
116−CONFIG_HID_ZEROPLUS=y
117−CONFIG_USB=y
118−CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
119−CONFIG_USB_MON=y
120−CONFIG_USB_OHCI_HCD=y
121−CONFIG_USB_STORAGE=y
122−CONFIG_USB_STORAGE_FREECOM=y
123−CONFIG_USB_STORAGE_ISD200=y
124−CONFIG_USB_STORAGE_USBAT=y
125−CONFIG_USB_STORAGE_SDDR09=y
126−CONFIG_USB_STORAGE_SDDR55=y
127−CONFIG_MMC=y
128−CONFIG_MMC_PXA=m
129−CONFIG_NEW_LEDS=y
130−CONFIG_LEDS_CLASS=y
131−CONFIG_LEDS_GPIO=y
132−CONFIG_LEDS_LT3593=y
133−CONFIG_LEDS_TRIGGERS=y
134−CONFIG_LEDS_TRIGGER_BACKLIGHT=y
135−CONFIG_RTC_CLASS=y
136−CONFIG_RTC_DRV_PXA=y
137−CONFIG_DMADEVICES=y
138−CONFIG_UIO=y
139−CONFIG_EXT2_FS=y
140−CONFIG_EXT2_FS_XIP=y
141−CONFIG_EXT3_FS=y
142−CONFIG_FSCACHE=y
143−CONFIG_FSCACHE_STATS=y
144−CONFIG_CACHEFILES=y
145−CONFIG_MSDOS_FS=y
146−CONFIG_VFAT_FS=y
147−CONFIG_TMPFS=y
148−CONFIG_UBIFS_FS=y
149−CONFIG_NFS_FS=y
150−CONFIG_NFS_V3=y
151−CONFIG_ROOT_NFS=y
152−CONFIG_NFS_FSCACHE=y
153−CONFIG_NLS_CODEPAGE_437=y
154−CONFIG_NLS_CODEPAGE_737=y
155−CONFIG_NLS_CODEPAGE_775=y
156−CONFIG_NLS_CODEPAGE_850=y
157−CONFIG_NLS_CODEPAGE_852=y
158−CONFIG_NLS_CODEPAGE_855=y
159−CONFIG_NLS_CODEPAGE_857=y
160−CONFIG_NLS_CODEPAGE_860=y
161−CONFIG_NLS_CODEPAGE_861=y
162−CONFIG_NLS_CODEPAGE_862=y
163−CONFIG_NLS_CODEPAGE_863=y
164−CONFIG_NLS_CODEPAGE_864=y
165−CONFIG_NLS_CODEPAGE_865=y
166−CONFIG_NLS_CODEPAGE_866=y
167−CONFIG_NLS_CODEPAGE_869=y
168−CONFIG_NLS_CODEPAGE_936=y
169−CONFIG_NLS_CODEPAGE_950=y
170−CONFIG_NLS_CODEPAGE_932=y
171−CONFIG_NLS_CODEPAGE_949=y
172−CONFIG_NLS_CODEPAGE_874=y
173−CONFIG_NLS_ISO8859_8=y
174−CONFIG_NLS_CODEPAGE_1250=y
175−CONFIG_NLS_CODEPAGE_1251=y
176−CONFIG_NLS_ASCII=y
177−CONFIG_NLS_ISO8859_1=y
178−CONFIG_NLS_ISO8859_2=y
179−CONFIG_NLS_ISO8859_3=y
180−CONFIG_NLS_ISO8859_4=y
181−CONFIG_NLS_ISO8859_5=y
182−CONFIG_NLS_ISO8859_6=y
183−CONFIG_NLS_ISO8859_7=y
184−CONFIG_NLS_ISO8859_9=y
185−CONFIG_NLS_ISO8859_13=y
186−CONFIG_NLS_ISO8859_14=y
187−CONFIG_NLS_ISO8859_15=y
188−CONFIG_NLS_KOI8_R=y
189−CONFIG_NLS_KOI8_U=y
190−CONFIG_NLS_UTF8=y
191−CONFIG_PRINTK_TIME=y
192−CONFIG_DEBUG_KERNEL=y
193−CONFIG_DEBUG_INFO=y
194−CONFIG_DEBUG_USER=y
195−CONFIG_DEBUG_LL=y
196−# CONFIG_CRYPTO_ANSI_CPRNG is not set
197−# CONFIG_CRYPTO_HW is not set
arch/arm/mach-davinci/board-da830-evm.c+13−73
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818 #include <linux/platform_device.h>
1919 #include <linux/i2c.h>
2020 #include <linux/platform_data/pcf857x.h>
21−#include <linux/platform_data/at24.h>
21+#include <linux/property.h>
2222 #include <linux/mtd/mtd.h>
2323 #include <linux/mtd/partitions.h>
2424 #include <linux/spi/spi.h>
@@ -52,62 +52,19 @@ static const short da830_evm_usb11_pins[] = { · 27 unmodified lines
5252 -1
5353 };
5454
55−static da8xx_ocic_handler_t da830_evm_usb_ocic_handler;
56−
57−static int da830_evm_usb_set_power(unsigned port, int on)
58−{
59− gpio_set_value(ON_BD_USB_DRV, on);
60− return 0;
61−}
62−
63−static int da830_evm_usb_get_power(unsigned port)
64−{
65− return gpio_get_value(ON_BD_USB_DRV);
66−}
67−
68−static int da830_evm_usb_get_oci(unsigned port)
69−{
70− return !gpio_get_value(ON_BD_USB_OVC);
71−}
72−
73−static irqreturn_t da830_evm_usb_ocic_irq(int, void *);
74−
75−static int da830_evm_usb_ocic_notify(da8xx_ocic_handler_t handler)
76−{
77− int irq = gpio_to_irq(ON_BD_USB_OVC);
78− int error = 0;
79−
80− if (handler != NULL) {
81− da830_evm_usb_ocic_handler = handler;
82−
83− error = request_irq(irq, da830_evm_usb_ocic_irq,
84− IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
85− "OHCI over-current indicator", NULL);
86− if (error)
87− pr_err("%s: could not request IRQ to watch over-current indicator changes\n",
88− __func__);
89− } else
90− free_irq(irq, NULL);
91−
92− return error;
93−}
55+static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = {
56+ .dev_id = "ohci-da8xx",
57+ .table = {
58+ GPIO_LOOKUP("davinci_gpio", ON_BD_USB_DRV, "vbus", 0),
59+ GPIO_LOOKUP("davinci_gpio", ON_BD_USB_OVC, "oc", 0),
60+ },
61+};
9462
9563 static struct da8xx_ohci_root_hub da830_evm_usb11_pdata = {
96− .set_power = da830_evm_usb_set_power,
97− .get_power = da830_evm_usb_get_power,
98− .get_oci = da830_evm_usb_get_oci,
99− .ocic_notify = da830_evm_usb_ocic_notify,
100−
10164 /* TPS2065 switch @ 5V */
10265 .potpgt = (3 + 1) / 2, /* 3 ms max */
10366 };
10467
105−static irqreturn_t da830_evm_usb_ocic_irq(int irq, void *dev_id)
106−{
107− da830_evm_usb_ocic_handler(&da830_evm_usb11_pdata, 1);
108− return IRQ_HANDLED;
109−}
110−
11168 static __init void da830_evm_usb_init(void)
11269 {
11370 int ret;
@@ -142,21 +99,7 @@ static __init void da830_evm_usb_init(void) · 28 unmodified lines
14299 return;
143100 }
144101
145− ret = gpio_request(ON_BD_USB_DRV, "ON_BD_USB_DRV");
146− if (ret) {
147− pr_err("%s: failed to request GPIO for USB 1.1 port power control: %d\n",
148− __func__, ret);
149− return;
150− }
151− gpio_direction_output(ON_BD_USB_DRV, 0);
152−
153− ret = gpio_request(ON_BD_USB_OVC, "ON_BD_USB_OVC");
154− if (ret) {
155− pr_err("%s: failed to request GPIO for USB 1.1 port over-current indicator: %d\n",
156− __func__, ret);
157− return;
158− }
159− gpio_direction_input(ON_BD_USB_OVC);
102+ gpiod_add_lookup_table(&da830_evm_usb_gpio_lookup);
160103
161104 ret = da8xx_register_usb11(&da830_evm_usb11_pdata);
162105 if (ret)
@@ -457,12 +400,9 @@ static struct nvmem_cell_lookup da830_evm_nvmem_cell_lookup = { · 294 unmodified lines
457400 .con_id = "mac-address",
458401 };
459402
460−static struct at24_platform_data da830_evm_i2c_eeprom_info = {
461− .byte_len = SZ_256K / 8,
462− .page_size = 64,
463− .flags = AT24_FLAG_ADDR16,
464− .setup = davinci_get_mac_addr,
465− .context = (void *)0x7f00,
403+static const struct property_entry da830_evm_i2c_eeprom_properties[] = {
404+ PROPERTY_ENTRY_U32("pagesize", 64),
405+ { }
466406 };
467407
468408 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 = { · 27 unmodified lines
496436 static struct i2c_board_info __initdata da830_evm_i2c_devices[] = {
497437 {
498438 I2C_BOARD_INFO("24c256", 0x50),
499− .platform_data = &da830_evm_i2c_eeprom_info,
439+ .properties = da830_evm_i2c_eeprom_properties,
500440 },
501441 {
502442 I2C_BOARD_INFO("tlv320aic3x", 0x18),
arch/arm/mach-davinci/board-da850-evm.c+14−36
@@ -150,32 +150,6 @@ static struct spi_board_info da850evm_spi_info[] = { · 149 unmodified lines
150150 },
151151 };
152152
153−#ifdef CONFIG_MTD
154−static void da850_evm_m25p80_notify_add(struct mtd_info *mtd)
155−{
156− char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
157− size_t retlen;
158−
159− if (!strcmp(mtd->name, "MAC-Address")) {
160− mtd_read(mtd, 0, ETH_ALEN, &retlen, mac_addr);
161− if (retlen == ETH_ALEN)
162− pr_info("Read MAC addr from SPI Flash: %pM\n",
163− mac_addr);
164− }
165−}
166−
167−static struct mtd_notifier da850evm_spi_notifier = {
168− .add = da850_evm_m25p80_notify_add,
169−};
170−
171−static void da850_evm_setup_mac_addr(void)
172−{
173− register_mtd_user(&da850evm_spi_notifier);
174−}
175−#else
176−static void da850_evm_setup_mac_addr(void) { }
177−#endif
178−
179153 static struct mtd_partition da850_evm_norflash_partition[] = {
180154 {
181155 .name = "bootloaders + env",
@@ -1064,6 +1038,17 @@ static const short da850_evm_rmii_pins[] = { · 882 unmodified lines
10641038 -1
10651039 };
10661040
1041+static struct gpiod_hog da850_evm_emac_gpio_hogs[] = {
1042+ {
1043+ .chip_label = "davinci_gpio",
1044+ .chip_hwnum = DA850_MII_MDIO_CLKEN_PIN,
1045+ .line_name = "mdio_clk_en",
1046+ .lflags = 0,
1047+ /* dflags set in da850_evm_config_emac() */
1048+ },
1049+ { }
1050+};
1051+
10671052 static int __init da850_evm_config_emac(void)
10681053 {
10691054 void __iomem *cfg_chip3_base;
@@ -1102,14 +1087,9 @@ static int __init da850_evm_config_emac(void) · 32 unmodified lines
11021087 if (ret)
11031088 pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);
11041089
1105− ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en");
1106− if (ret) {
1107− pr_warn("Cannot open GPIO %d\n", DA850_MII_MDIO_CLKEN_PIN);
1108− return ret;
1109− }
1110−
1111− /* Enable/Disable MII MDIO clock */
1112− gpio_direction_output(DA850_MII_MDIO_CLKEN_PIN, rmii_en);
1090+ da850_evm_emac_gpio_hogs[0].dflags = rmii_en ? GPIOD_OUT_HIGH
1091+ : GPIOD_OUT_LOW;
1092+ gpiod_add_hogs(da850_evm_emac_gpio_hogs);
11131093
11141094 soc_info->emac_pdata->phy_id = DA850_EVM_PHY_ID;
11151095
@@ -1494,8 +1474,6 @@ static __init void da850_evm_init(void) · 378 unmodified lines
14941474 if (ret)
14951475 pr_warn("%s: SATA registration failed: %d\n", __func__, ret);
14961476
1497− da850_evm_setup_mac_addr();
1498−
14991477 ret = da8xx_register_rproc();
15001478 if (ret)
15011479 pr_warn("%s: dsp/rproc registration failed: %d\n",
arch/arm/mach-davinci/board-dm365-evm.c+5−8
@@ -18,7 +18,7 @@ · 17 unmodified lines
1818 #include <linux/i2c.h>
1919 #include <linux/io.h>
2020 #include <linux/clk.h>
21−#include <linux/platform_data/at24.h>
21+#include <linux/property.h>
2222 #include <linux/leds.h>
2323 #include <linux/mtd/mtd.h>
2424 #include <linux/mtd/partitions.h>
@@ -225,18 +225,15 @@ static struct nvmem_cell_lookup davinci_nvmem_cell_lookup = { · 200 unmodified lines
225225 .con_id = "mac-address",
226226 };
227227
228−static struct at24_platform_data eeprom_info = {
229− .byte_len = (256*1024) / 8,
230− .page_size = 64,
231− .flags = AT24_FLAG_ADDR16,
232− .setup = davinci_get_mac_addr,
233− .context = (void *)0x7f00,
228+static const struct property_entry eeprom_properties[] = {
229+ PROPERTY_ENTRY_U32("pagesize", 64),
230+ { }
234231 };
235232
236233 static struct i2c_board_info i2c_info[] = {
237234 {
238235 I2C_BOARD_INFO("24c256", 0x50),
239− .platform_data = &eeprom_info,
236+ .properties = eeprom_properties,
240237 },
241238 {
242239 I2C_BOARD_INFO("tlv320aic3x", 0x18),
arch/arm/mach-davinci/board-dm644x-evm.c+5−8
@@ -16,8 +16,8 @@ · 15 unmodified lines
1616 #include <linux/gpio/machine.h>
1717 #include <linux/i2c.h>
1818 #include <linux/platform_data/pcf857x.h>
19−#include <linux/platform_data/at24.h>
2019 #include <linux/platform_data/gpio-davinci.h>
20+#include <linux/property.h>
2121 #include <linux/mtd/mtd.h>
2222 #include <linux/mtd/rawnand.h>
2323 #include <linux/mtd/partitions.h>
@@ -532,12 +532,9 @@ static struct nvmem_cell_lookup dm644evm_nvmem_cell_lookup = { · 508 unmodified lines
532532 .con_id = "mac-address",
533533 };
534534
535−static struct at24_platform_data eeprom_info = {
536− .byte_len = (256*1024) / 8,
537− .page_size = 64,
538− .flags = AT24_FLAG_ADDR16,
539− .setup = davinci_get_mac_addr,
540− .context = (void *)0x7f00,
535+static const struct property_entry eeprom_properties[] = {
536+ PROPERTY_ENTRY_U32("pagesize", 64),
537+ { }
541538 };
542539
543540 /*
@@ -647,7 +644,7 @@ static struct i2c_board_info __initdata i2c_info[] = { · 103 unmodified lines
647644 },
648645 {
649646 I2C_BOARD_INFO("24c256", 0x50),
650− .platform_data = &eeprom_info,
647+ .properties = eeprom_properties,
651648 },
652649 {
653650 I2C_BOARD_INFO("tlv320aic33", 0x1b),
arch/arm/mach-davinci/board-dm646x-evm.c+5−8
@@ -22,7 +22,7 @@ · 21 unmodified lines
2222 #include <linux/gpio.h>
2323 #include <linux/platform_device.h>
2424 #include <linux/i2c.h>
25−#include <linux/platform_data/at24.h>
25+#include <linux/property.h>
2626 #include <linux/platform_data/pcf857x.h>
2727 #include <linux/platform_data/ti-aemif.h>
2828
@@ -364,12 +364,9 @@ static struct nvmem_cell_lookup dm646x_evm_nvmem_cell_lookup = { · 335 unmodified lines
364364 .con_id = "mac-address",
365365 };
366366
367−static struct at24_platform_data eeprom_info = {
368− .byte_len = (256*1024) / 8,
369− .page_size = 64,
370− .flags = AT24_FLAG_ADDR16,
371− .setup = davinci_get_mac_addr,
372− .context = (void *)0x7f00,
367+static const struct property_entry eeprom_properties[] = {
368+ PROPERTY_ENTRY_U32("pagesize", 64),
369+ { }
373370 };
374371 #endif
375372
@@ -440,7 +437,7 @@ static void evm_init_cpld(void) · 64 unmodified lines
440437 static struct i2c_board_info __initdata i2c_info[] = {
441438 {
442439 I2C_BOARD_INFO("24c256", 0x50),
443− .platform_data = &eeprom_info,
440+ .properties = eeprom_properties,
444441 },
445442 {
446443 I2C_BOARD_INFO("pcf8574a", 0x38),
arch/arm/mach-davinci/board-mityomapl138.c+21−17
@@ -14,11 +14,13 @@ · 13 unmodified lines
1414 #include <linux/init.h>
1515 #include <linux/console.h>
1616 #include <linux/platform_device.h>
17+#include <linux/property.h>
1718 #include <linux/mtd/partitions.h>
19+#include <linux/notifier.h>
20+#include <linux/nvmem-consumer.h>
1821 #include <linux/nvmem-provider.h>
1922 #include <linux/regulator/machine.h>
2023 #include <linux/i2c.h>
21−#include <linux/platform_data/at24.h>
2224 #include <linux/etherdevice.h>
2325 #include <linux/spi/spi.h>
2426 #include <linux/spi/flash.h>
@@ -117,11 +119,15 @@ static void mityomapl138_cpufreq_init(const char *partnum) · 92 unmodified lines
117119 static void mityomapl138_cpufreq_init(const char *partnum) { }
118120 #endif
119121
120−static void read_factory_config(struct nvmem_device *nvmem, void *context)
122+static int read_factory_config(struct notifier_block *nb,
123+ unsigned long event, void *data)
121124 {
122125 int ret;
123126 const char *partnum = NULL;
124− struct davinci_soc_info *soc_info = &davinci_soc_info;
127+ struct nvmem_device *nvmem = data;
128+
129+ if (strcmp(nvmem_dev_name(nvmem), "1-00500") != 0)
130+ return NOTIFY_DONE;
125131
126132 if (!IS_BUILTIN(CONFIG_NVMEM)) {
127133 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) · 19 unmodified lines
147153 goto bad_config;
148154 }
149155
150− pr_info("Found MAC = %pM\n", factory_config.mac);
151− if (is_valid_ether_addr(factory_config.mac))
152− memcpy(soc_info->emac_pdata->mac_addr,
153− factory_config.mac, ETH_ALEN);
154− else
155− pr_warn("Invalid MAC found in factory config block\n");
156−
157156 partnum = factory_config.partnum;
158157 pr_info("Part Number = %s\n", partnum);
159158
160159 bad_config:
161160 /* default maximum speed is valid for all platforms */
162161 mityomapl138_cpufreq_init(partnum);
162+
163+ return NOTIFY_STOP;
163164 }
164165
166+static struct notifier_block mityomapl138_nvmem_notifier = {
167+ .notifier_call = read_factory_config,
168+};
169+
165170 /*
166171 * We don't define a cell for factory config as it will be accessed from the
167172 * board file using the nvmem notifier chain.
@@ -187,12 +192,10 @@ static struct nvmem_cell_lookup mityomapl138_nvmem_cell_lookup = { · 19 unmodified lines
187192 .con_id = "mac-address",
188193 };
189194
190−static struct at24_platform_data mityomapl138_fd_chip = {
191− .byte_len = 256,
192− .page_size = 8,
193− .flags = AT24_FLAG_READONLY | AT24_FLAG_IRUGO,
194− .setup = read_factory_config,
195− .context = NULL,
195+static const struct property_entry mityomapl138_fd_chip_properties[] = {
196+ PROPERTY_ENTRY_U32("pagesize", 8),
197+ PROPERTY_ENTRY_BOOL("read-only"),
198+ { }
196199 };
197200
198201 static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = {
@@ -321,7 +324,7 @@ static struct i2c_board_info __initdata mityomap_tps65023_info[] = { · 122 unmodified lines
321324 },
322325 {
323326 I2C_BOARD_INFO("24c02", 0x50),
324− .platform_data = &mityomapl138_fd_chip,
327+ .properties = mityomapl138_fd_chip_properties,
325328 },
326329 };
327330
@@ -569,6 +572,7 @@ static void __init mityomapl138_init(void) · 241 unmodified lines
569572
570573 davinci_serial_init(da8xx_serial_device);
571574
575+ nvmem_register_notifier(&mityomapl138_nvmem_notifier);
572576 nvmem_add_cell_table(&mityomapl138_nvmem_cell_table);
573577 nvmem_add_cell_lookups(&mityomapl138_nvmem_cell_lookup, 1);
574578
arch/arm/mach-davinci/board-omapl138-hawk.c+9−72
@@ -294,66 +294,24 @@ static int omapl138_hawk_register_aemif(void) · 293 unmodified lines
294294 return platform_device_register(&omapl138_hawk_aemif_device);
295295 }
296296
297−static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id);
298−static da8xx_ocic_handler_t hawk_usb_ocic_handler;
299−
300297 static const short da850_hawk_usb11_pins[] = {
301298 DA850_GPIO2_4, DA850_GPIO6_13,
302299 -1
303300 };
304301
305−static int hawk_usb_set_power(unsigned port, int on)
306−{
307− gpio_set_value(DA850_USB1_VBUS_PIN, on);
308− return 0;
309−}
310−
311−static int hawk_usb_get_power(unsigned port)
312−{
313− return gpio_get_value(DA850_USB1_VBUS_PIN);
314−}
315−
316−static int hawk_usb_get_oci(unsigned port)
317−{
318− return !gpio_get_value(DA850_USB1_OC_PIN);
319−}
320−
321−static int hawk_usb_ocic_notify(da8xx_ocic_handler_t handler)
322−{
323− int irq = gpio_to_irq(DA850_USB1_OC_PIN);
324− int error = 0;
325−
326− if (handler != NULL) {
327− hawk_usb_ocic_handler = handler;
328−
329− error = request_irq(irq, omapl138_hawk_usb_ocic_irq,
330− IRQF_TRIGGER_RISING |
331− IRQF_TRIGGER_FALLING,
332− "OHCI over-current indicator", NULL);
333− if (error)
334− pr_err("%s: could not request IRQ to watch "
335− "over-current indicator changes\n", __func__);
336− } else {
337− free_irq(irq, NULL);
338− }
339− return error;
340−}
302+static struct gpiod_lookup_table hawk_usb_gpio_lookup = {
303+ .dev_id = "ohci-da8xx",
304+ .table = {
305+ GPIO_LOOKUP("davinci_gpio", DA850_USB1_VBUS_PIN, "vbus", 0),
306+ GPIO_LOOKUP("davinci_gpio", DA850_USB1_OC_PIN, "oc", 0),
307+ },
308+};
341309
342310 static struct da8xx_ohci_root_hub omapl138_hawk_usb11_pdata = {
343− .set_power = hawk_usb_set_power,
344− .get_power = hawk_usb_get_power,
345− .get_oci = hawk_usb_get_oci,
346− .ocic_notify = hawk_usb_ocic_notify,
347311 /* TPS2087 switch @ 5V */
348312 .potpgt = (3 + 1) / 2, /* 3 ms max */
349313 };
350314
351−static irqreturn_t omapl138_hawk_usb_ocic_irq(int irq, void *dev_id)
352−{
353− hawk_usb_ocic_handler(&omapl138_hawk_usb11_pdata, 1);
354− return IRQ_HANDLED;
355−}
356−
357315 static __init void omapl138_hawk_usb_init(void)
358316 {
359317 int ret;
@@ -374,34 +332,13 @@ static __init void omapl138_hawk_usb_init(void) · 14 unmodified lines
374332 pr_warn("%s: USB PHY registration failed: %d\n",
375333 __func__, ret);
376334
377− ret = gpio_request_one(DA850_USB1_VBUS_PIN,
378− GPIOF_DIR_OUT, "USB1 VBUS");
379− if (ret < 0) {
380− pr_err("%s: failed to request GPIO for USB 1.1 port "
381− "power control: %d\n", __func__, ret);
382− return;
383− }
384−
385− ret = gpio_request_one(DA850_USB1_OC_PIN,
386− GPIOF_DIR_IN, "USB1 OC");
387− if (ret < 0) {
388− pr_err("%s: failed to request GPIO for USB 1.1 port "
389− "over-current indicator: %d\n", __func__, ret);
390− goto usb11_setup_oc_fail;
391− }
335+ gpiod_add_lookup_table(&hawk_usb_gpio_lookup);
392336
393337 ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata);
394− if (ret) {
338+ if (ret)
395339 pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret);
396− goto usb11_setup_fail;
397− }
398340
399341 return;
400−
401−usb11_setup_fail:
402− gpio_free(DA850_USB1_OC_PIN);
403−usb11_setup_oc_fail:
404− gpio_free(DA850_USB1_VBUS_PIN);
405342 }
406343
407344 static __init void omapl138_hawk_init(void)
arch/arm/mach-davinci/board-sffsdr.c+6−7
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 #include <linux/init.h>
2727 #include <linux/platform_device.h>
2828 #include <linux/i2c.h>
29−#include <linux/platform_data/at24.h>
29+#include <linux/property.h>
3030 #include <linux/mtd/mtd.h>
3131 #include <linux/mtd/rawnand.h>
3232 #include <linux/mtd/partitions.h>
@@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = { · 59 unmodified lines
9292 .resource = davinci_sffsdr_nandflash_resource,
9393 };
9494
95−static struct at24_platform_data eeprom_info = {
96− .byte_len = (64*1024) / 8,
97− .page_size = 32,
98− .flags = AT24_FLAG_ADDR16,
95+static const struct property_entry eeprom_properties[] = {
96+ PROPERTY_ENTRY_U32("pagesize", 32),
97+ { }
9998 };
10099
101100 static struct i2c_board_info __initdata i2c_info[] = {
102101 {
103− I2C_BOARD_INFO("24lc64", 0x50),
104− .platform_data = &eeprom_info,
102+ I2C_BOARD_INFO("24c64", 0x50),
103+ .properties = eeprom_properties,
105104 },
106105 /* Other I2C devices:
107106 * MSP430, addr 0x23 (not used)
arch/arm/mach-davinci/common.c+0−15
@@ -26,21 +26,6 @@ EXPORT_SYMBOL(davinci_soc_info); · 25 unmodified lines
2626 void __iomem *davinci_intc_base;
2727 int davinci_intc_type;
2828
29−void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context)
30−{
31− char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
32− off_t offset = (off_t)context;
33−
34− if (!IS_BUILTIN(CONFIG_NVMEM)) {
35− pr_warn("Cannot read MAC addr from EEPROM without CONFIG_NVMEM\n");
36− return;
37− }
38−
39− /* Read MAC addr from EEPROM */
40− if (nvmem_device_read(nvmem, offset, ETH_ALEN, mac_addr) == ETH_ALEN)
41− pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr);
42−}
43−
4429 static int __init davinci_init_id(struct davinci_soc_info *soc_info)
4530 {
4631 int i;
arch/arm/mach-ep93xx/ts72xx.c+0−1
@@ -26,7 +26,6 @@ · 25 unmodified lines
2626 #include <mach/gpio-ep93xx.h>
2727 #include <mach/hardware.h>
2828 #include <mach/irqs.h>
29−#include <mach/gpio-ep93xx.h>
3029
3130 #include <asm/mach-types.h>
3231 #include <asm/mach/map.h>
arch/arm/mach-exynos/platsmp.c+2−2
@@ -336,9 +336,9 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) · 335 unmodified lines
336336 /* wait max 10 ms until cpu1 is on */
337337 while (exynos_cpu_power_state(core_id)
338338 != S5P_CORE_LOCAL_PWR_EN) {
339− if (timeout-- == 0)
339+ if (timeout == 0)
340340 break;
341−
341+ timeout--;
342342 mdelay(1);
343343 }
344344
arch/arm/mach-imx/Makefile+2−1
@@ -29,9 +29,10 @@ obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o · 28 unmodified lines
2929 obj-$(CONFIG_SOC_IMX6SLL) += cpuidle-imx6sx.o
3030 obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6sx.o
3131 obj-$(CONFIG_SOC_IMX6UL) += cpuidle-imx6sx.o
32+obj-$(CONFIG_SOC_IMX7ULP) += cpuidle-imx7ulp.o
3233 endif
3334
34−ifdef CONFIG_SND_IMX_SOC
35+ifdef CONFIG_SND_SOC_IMX_PCM_FIQ
3536 obj-y += ssi-fiq.o
3637 obj-y += ssi-fiq-ksym.o
3738 endif
arch/arm/mach-imx/common.h+10−0
@@ -72,6 +72,15 @@ enum mxc_cpu_pwr_mode { · 71 unmodified lines
7272 STOP_POWER_OFF, /* STOP + SRPG */
7373 };
7474
75+enum ulp_cpu_pwr_mode {
76+ ULP_PM_HSRUN, /* High speed run mode */
77+ ULP_PM_RUN, /* Run mode */
78+ ULP_PM_WAIT, /* Wait mode */
79+ ULP_PM_STOP, /* Stop mode */
80+ ULP_PM_VLPS, /* Very low power stop mode */
81+ ULP_PM_VLLS, /* very low leakage stop mode */
82+};
83+
7584 void imx_enable_cpu(int cpu, bool enable);
7685 void imx_set_cpu_jump(int cpu, void *jump_addr);
7786 u32 imx_get_cpu_arg(int cpu);
@@ -98,6 +107,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode); · 20 unmodified lines
98107 void imx6_set_int_mem_clk_lpm(bool enable);
99108 void imx6sl_set_wait_clk(bool enter);
100109 int imx_mmdc_get_ddr_type(void);
110+int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode);
101111
102112 void imx_cpu_die(unsigned int cpu);
103113 int imx_cpu_kill(unsigned int cpu);
arch/arm/mach-imx/cpuidle-imx7ulp.c+60−0
@@ -0,0 +1,60 @@
1+// SPDX-License-Identifier: GPL-2.0+
2+/*
3+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
4+ * Copyright 2017-2018 NXP
5+ * Anson Huang <Anson.Huang@nxp.com>
6+ */
7+
8+#include <linux/cpuidle.h>
9+#include <linux/module.h>
10+#include <asm/cpuidle.h>
11+
12+#include "common.h"
13+#include "cpuidle.h"
14+
15+static int imx7ulp_enter_wait(struct cpuidle_device *dev,
16+ struct cpuidle_driver *drv, int index)
17+{
18+ if (index == 1)
19+ imx7ulp_set_lpm(ULP_PM_WAIT);
20+ else
21+ imx7ulp_set_lpm(ULP_PM_STOP);
22+
23+ cpu_do_idle();
24+
25+ imx7ulp_set_lpm(ULP_PM_RUN);
26+
27+ return index;
28+}
29+
30+static struct cpuidle_driver imx7ulp_cpuidle_driver = {
31+ .name = "imx7ulp_cpuidle",
32+ .owner = THIS_MODULE,
33+ .states = {
34+ /* WFI */
35+ ARM_CPUIDLE_WFI_STATE,
36+ /* WAIT */
37+ {
38+ .exit_latency = 50,
39+ .target_residency = 75,
40+ .enter = imx7ulp_enter_wait,
41+ .name = "WAIT",
42+ .desc = "PSTOP2",
43+ },
44+ /* STOP */
45+ {
46+ .exit_latency = 100,
47+ .target_residency = 150,
48+ .enter = imx7ulp_enter_wait,
49+ .name = "STOP",
50+ .desc = "PSTOP1",
51+ },
52+ },
53+ .state_count = 3,
54+ .safe_state_index = 0,
55+};
56+
57+int __init imx7ulp_cpuidle_init(void)
58+{
59+ return cpuidle_register(&imx7ulp_cpuidle_driver, NULL);
60+}
arch/arm/mach-imx/cpuidle.h+5−0
@@ -15,6 +15,7 @@ extern int imx5_cpuidle_init(void); · 14 unmodified lines
1515 extern int imx6q_cpuidle_init(void);
1616 extern int imx6sl_cpuidle_init(void);
1717 extern int imx6sx_cpuidle_init(void);
18+extern int imx7ulp_cpuidle_init(void);
1819 #else
1920 static inline int imx5_cpuidle_init(void)
2021 {
@@ -32,4 +33,8 @@ static inline int imx6sx_cpuidle_init(void) · 11 unmodified lines
3233 {
3334 return 0;
3435 }
36+static inline int imx7ulp_cpuidle_init(void)
37+{
38+ return 0;
39+}
3540 #endif
arch/arm/mach-imx/mach-imx7ulp.c+46−0
@@ -6,17 +6,57 @@ · 5 unmodified lines
66 */
77
88 #include <linux/irqchip.h>
9+#include <linux/mfd/syscon.h>
910 #include <linux/of_platform.h>
11+#include <linux/regmap.h>
1012 #include <asm/mach/arch.h>
1113
1214 #include "common.h"
15+#include "cpuidle.h"
1316 #include "hardware.h"
1417
18+#define SIM_JTAG_ID_REG 0x8c
19+
20+static void __init imx7ulp_set_revision(void)
21+{
22+ struct regmap *sim;
23+ u32 revision;
24+
25+ sim = syscon_regmap_lookup_by_compatible("fsl,imx7ulp-sim");
26+ if (IS_ERR(sim)) {
27+ pr_warn("failed to find fsl,imx7ulp-sim regmap!\n");
28+ return;
29+ }
30+
31+ if (regmap_read(sim, SIM_JTAG_ID_REG, &revision)) {
32+ pr_warn("failed to read sim regmap!\n");
33+ return;
34+ }
35+
36+ /*
37+ * bit[31:28] of JTAG_ID register defines revision as below from B0:
38+ * 0001 B0
39+ * 0010 B1
40+ */
41+ switch (revision >> 28) {
42+ case 1:
43+ imx_set_soc_revision(IMX_CHIP_REVISION_2_0);
44+ break;
45+ case 2:
46+ imx_set_soc_revision(IMX_CHIP_REVISION_2_1);
47+ break;
48+ default:
49+ imx_set_soc_revision(IMX_CHIP_REVISION_1_0);
50+ break;
51+ }
52+}
53+
1554 static void __init imx7ulp_init_machine(void)
1655 {
1756 imx7ulp_pm_init();
1857
1958 mxc_set_cpu_type(MXC_CPU_IMX7ULP);
59+ imx7ulp_set_revision();
2060 of_platform_default_populate(NULL, NULL, imx_soc_device_init());
2161 }
2262
@@ -25,7 +65,13 @@ static const char *const imx7ulp_dt_compat[] __initconst = { · 2 unmodified lines
2565 NULL,
2666 };
2767
68+static void __init imx7ulp_init_late(void)
69+{
70+ imx7ulp_cpuidle_init();
71+}
72+
2873 DT_MACHINE_START(IMX7ulp, "Freescale i.MX7ULP (Device Tree)")
2974 .init_machine = imx7ulp_init_machine,
3075 .dt_compat = imx7ulp_dt_compat,
76+ .init_late = imx7ulp_init_late,
3177 MACHINE_END
arch/arm/mach-imx/pm-imx7ulp.c+44−5
@@ -9,21 +9,60 @@ · 8 unmodified lines
99 #include <linux/of.h>
1010 #include <linux/of_address.h>
1111
12+#include "common.h"
13+
1214 #define SMC_PMCTRL 0x10
1315 #define BP_PMCTRL_PSTOPO 16
1416 #define PSTOPO_PSTOP3 0x3
17+#define PSTOPO_PSTOP2 0x2
18+#define PSTOPO_PSTOP1 0x1
19+#define BP_PMCTRL_RUNM 8
20+#define RUNM_RUN 0
21+#define BP_PMCTRL_STOPM 0
22+#define STOPM_STOP 0
23+
24+#define BM_PMCTRL_PSTOPO (3 << BP_PMCTRL_PSTOPO)
25+#define BM_PMCTRL_RUNM (3 << BP_PMCTRL_RUNM)
26+#define BM_PMCTRL_STOPM (7 << BP_PMCTRL_STOPM)
27+
28+static void __iomem *smc1_base;
29+
30+int imx7ulp_set_lpm(enum ulp_cpu_pwr_mode mode)
31+{
32+ u32 val = readl_relaxed(smc1_base + SMC_PMCTRL);
33+
34+ /* clear all */
35+ val &= ~(BM_PMCTRL_RUNM | BM_PMCTRL_STOPM | BM_PMCTRL_PSTOPO);
36+
37+ switch (mode) {
38+ case ULP_PM_RUN:
39+ /* system/bus clock enabled */
40+ val |= PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO;
41+ break;
42+ case ULP_PM_WAIT:
43+ /* system clock disabled, bus clock enabled */
44+ val |= PSTOPO_PSTOP2 << BP_PMCTRL_PSTOPO;
45+ break;
46+ case ULP_PM_STOP:
47+ /* system/bus clock disabled */
48+ val |= PSTOPO_PSTOP1 << BP_PMCTRL_PSTOPO;
49+ break;
50+ default:
51+ return -EINVAL;
52+ }
53+
54+ writel_relaxed(val, smc1_base + SMC_PMCTRL);
55+
56+ return 0;
57+}
1558
1659 void __init imx7ulp_pm_init(void)
1760 {
1861 struct device_node *np;
19− void __iomem *smc1_base;
2062
2163 np = of_find_compatible_node(NULL, NULL, "fsl,imx7ulp-smc1");
2264 smc1_base = of_iomap(np, 0);
2365 WARN_ON(!smc1_base);
2466
25− /* Partial Stop mode 3 with system/bus clock enabled */
26− writel_relaxed(PSTOPO_PSTOP3 << BP_PMCTRL_PSTOPO,
27− smc1_base + SMC_PMCTRL);
28− iounmap(smc1_base);
67+ imx7ulp_set_lpm(ULP_PM_RUN);
2968 }
arch/arm/mach-lpc32xx/phy3250.c+0−84
@@ -45,73 +45,6 @@ · 44 unmodified lines
4545 #include <mach/board.h>
4646 #include "common.h"
4747
48−/*
49− * AMBA LCD controller
50− */
51−static struct clcd_panel conn_lcd_panel = {
52− .mode = {
53− .name = "QVGA portrait",
54− .refresh = 60,
55− .xres = 240,
56− .yres = 320,
57− .pixclock = 191828,
58− .left_margin = 22,
59− .right_margin = 11,
60− .upper_margin = 2,
61− .lower_margin = 1,
62− .hsync_len = 5,
63− .vsync_len = 2,
64− .sync = 0,
65− .vmode = FB_VMODE_NONINTERLACED,
66− },
67− .width = -1,
68− .height = -1,
69− .tim2 = (TIM2_IVS | TIM2_IHS),
70− .cntl = (CNTL_BGR | CNTL_LCDTFT | CNTL_LCDVCOMP(1) |
71− CNTL_LCDBPP16_565),
72− .bpp = 16,
73−};
74−#define PANEL_SIZE (3 * SZ_64K)
75−
76−static int lpc32xx_clcd_setup(struct clcd_fb *fb)
77−{
78− dma_addr_t dma;
79−
80− fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, PANEL_SIZE, &dma,
81− GFP_KERNEL);
82− if (!fb->fb.screen_base) {
83− printk(KERN_ERR "CLCD: unable to map framebuffer\n");
84− return -ENOMEM;
85− }
86−
87− fb->fb.fix.smem_start = dma;
88− fb->fb.fix.smem_len = PANEL_SIZE;
89− fb->panel = &conn_lcd_panel;
90−
91− return 0;
92−}
93−
94−static int lpc32xx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
95−{
96− return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
97− fb->fb.fix.smem_start, fb->fb.fix.smem_len);
98−}
99−
100−static void lpc32xx_clcd_remove(struct clcd_fb *fb)
101−{
102− dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base,
103− fb->fb.fix.smem_start);
104−}
105−
106−static struct clcd_board lpc32xx_clcd_data = {
107− .name = "Phytec LCD",
108− .check = clcdfb_check,
109− .decode = clcdfb_decode,
110− .setup = lpc32xx_clcd_setup,
111− .mmap = lpc32xx_clcd_mmap,
112− .remove = lpc32xx_clcd_remove,
113−};
114−
11548 static struct pl08x_channel_data pl08x_slave_channels[] = {
11649 {
11750 .bus_id = "nand-slc",
@@ -148,11 +81,6 @@ static struct pl08x_platform_data pl08x_pd = { · 30 unmodified lines
14881 .mem_buses = PL08X_AHB1,
14982 };
15083
151−static struct mmci_platform_data lpc32xx_mmci_data = {
152− .ocr_mask = MMC_VDD_30_31 | MMC_VDD_31_32 |
153− MMC_VDD_32_33 | MMC_VDD_33_34,
154−};
155−
15684 static struct lpc32xx_slc_platform_data lpc32xx_slc_data = {
15785 .dma_filter = pl08x_filter_id,
15886 };
@@ -164,10 +92,7 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = { · 5 unmodified lines
16492 static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = {
16593 OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL),
16694 OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL),
167− OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data),
16895 OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd),
169− OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd",
170− &lpc32xx_mmci_data),
17196 OF_DEV_AUXDATA("nxp,lpc3220-slc", 0x20020000, "20020000.flash",
17297 &lpc32xx_slc_data),
17398 OF_DEV_AUXDATA("nxp,lpc3220-mlc", 0x200a8000, "200a8000.flash",
@@ -177,15 +102,6 @@ static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = { · 3 unmodified lines
177102
178103 static void __init lpc3250_machine_init(void)
179104 {
180− u32 tmp;
181−
182− /* Setup LCD muxing to RGB565 */
183− tmp = __raw_readl(LPC32XX_CLKPWR_LCDCLK_CTRL) &
184− ~(LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_MSK |
185− LPC32XX_CLKPWR_LCDCTRL_PSCALE_MSK);
186− tmp |= LPC32XX_CLKPWR_LCDCTRL_LCDTYPE_TFT16;
187− __raw_writel(tmp, LPC32XX_CLKPWR_LCDCLK_CTRL);
188−
189105 lpc32xx_serial_init();
190106
191107 /* Test clock needed for UDA1380 initial init */
arch/arm/mach-lpc32xx/pm.c+3−10
@@ -86,17 +86,10 @@ static int lpc32xx_pm_enter(suspend_state_t state) · 85 unmodified lines
8686 void *iram_swap_area;
8787
8888 /* Allocate some space for temporary IRAM storage */
89− iram_swap_area = kmalloc(lpc32xx_sys_suspend_sz, GFP_KERNEL);
90− if (!iram_swap_area) {
91− printk(KERN_ERR
92− "PM Suspend: cannot allocate memory to save portion "
93− "of SRAM\n");
89+ iram_swap_area = kmemdup((void *)TEMP_IRAM_AREA,
90+ lpc32xx_sys_suspend_sz, GFP_KERNEL);
91+ if (!iram_swap_area)
9492 return -ENOMEM;
95− }
96−
97− /* Backup a small area of IRAM used for the suspend code */
98− memcpy(iram_swap_area, (void *) TEMP_IRAM_AREA,
99− lpc32xx_sys_suspend_sz);
10093
10194 /*
10295 * Copy code to suspend system into IRAM. The suspend code
arch/arm/mach-mediatek/Kconfig+4−0
@@ -26,6 +26,10 @@ config MACH_MT7623 · 25 unmodified lines
2626 bool "MediaTek MT7623 SoCs support"
2727 default ARCH_MEDIATEK
2828
29+config MACH_MT7629
30+ bool "MediaTek MT7629 SoCs support"
31+ default ARCH_MEDIATEK
32+
2933 config MACH_MT8127
3034 bool "MediaTek MT8127 SoCs support"
3135 default ARCH_MEDIATEK
arch/arm/mach-mediatek/mediatek.c+1−2
@@ -30,7 +30,6 @@ static void __init mediatek_timer_init(void) · 29 unmodified lines
3030
3131 if (of_machine_is_compatible("mediatek,mt6589") ||
3232 of_machine_is_compatible("mediatek,mt7623") ||
33− of_machine_is_compatible("mediatek,mt7623a") ||
3433 of_machine_is_compatible("mediatek,mt8135") ||
3534 of_machine_is_compatible("mediatek,mt8127")) {
3635 /* turn on GPT6 which ungates arch timer clocks */
@@ -50,7 +49,7 @@ static const char * const mediatek_board_dt_compat[] = { · 13 unmodified lines
5049 "mediatek,mt6589",
5150 "mediatek,mt6592",
5251 "mediatek,mt7623",
53− "mediatek,mt7623a",
52+ "mediatek,mt7629",
5453 "mediatek,mt8127",
5554 "mediatek,mt8135",
5655 NULL,
arch/arm/mach-mediatek/platsmp.c+1−1
@@ -60,7 +60,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { · 59 unmodified lines
6060 static const struct of_device_id mtk_smp_boot_infos[] __initconst = {
6161 { .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot },
6262 { .compatible = "mediatek,mt7623", .data = &mtk_mt7623_boot },
63− { .compatible = "mediatek,mt7623a", .data = &mtk_mt7623_boot },
63+ { .compatible = "mediatek,mt7629", .data = &mtk_mt7623_boot },
6464 {},
6565 };
6666
arch/arm/mach-meson/Kconfig+0−1
@@ -9,7 +9,6 @@ menuconfig ARCH_MESON · 8 unmodified lines
99 select PINCTRL
1010 select PINCTRL_MESON
1111 select COMMON_CLK
12− select COMMON_CLK_AMLOGIC
1312 select HAVE_ARM_SCU if SMP
1413 select HAVE_ARM_TWD if SMP
1514
arch/arm/mach-pxa/Kconfig+0−18
@@ -454,24 +454,6 @@ config MACH_TREO680 · 453 unmodified lines
454454 Say Y here if you intend to run this kernel on Palm Treo 680
455455 smartphone.
456456
457−config MACH_RAUMFELD_RC
458− bool "Raumfeld Controller"
459− select CPU_PXA300
460− select POWER_SUPPLY
461− select PXA3xx
462−
463−config MACH_RAUMFELD_CONNECTOR
464− bool "Raumfeld Connector"
465− select CPU_PXA300
466− select POWER_SUPPLY
467− select PXA3xx
468−
469−config MACH_RAUMFELD_SPEAKER
470− bool "Raumfeld Speaker"
471− select CPU_PXA300
472− select POWER_SUPPLY
473− select PXA3xx
474−
475457 config PXA_SHARPSL
476458 bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
477459 select SHARP_PARAM
arch/arm/mach-pxa/Makefile+0−3
@@ -86,9 +86,6 @@ obj-$(CONFIG_MACH_POODLE) += poodle.o · 85 unmodified lines
8686 obj-$(CONFIG_MACH_TOSA) += tosa.o
8787 obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o
8888 obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
89−obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o
90−obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o
91−obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o
9289 obj-$(CONFIG_MACH_ZIPIT2) += z2.o
9390
9491 obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o
arch/arm/mach-pxa/include/mach/pxa25x-udc.h+0−0

Empty file deleted.

arch/arm/mach-pxa/raumfeld.c+0−1186
@@ -1,1186 +0,0 @@
1−/*
2− * arch/arm/mach-pxa/raumfeld.c
3− *
4− * Support for the following Raumfeld devices:
5− *
6− * * Controller
7− * * Connector
8− * * Speaker S/M
9− *
10− * See http://www.raumfeld.com for details.
11− *
12− * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
13− *
14− * This program is free software; you can redistribute it and/or modify
15− * it under the terms of the GNU General Public License version 2 as
16− * published by the Free Software Foundation.
17− */
18−
19−#include <linux/init.h>
20−#include <linux/kernel.h>
21−#include <linux/property.h>
22−#include <linux/platform_device.h>
23−#include <linux/interrupt.h>
24−#include <linux/gpio.h>
25−#include <linux/gpio/machine.h>
26−#include <linux/smsc911x.h>
27−#include <linux/input.h>
28−#include <linux/gpio_keys.h>
29−#include <linux/leds.h>
30−#include <linux/w1-gpio.h>
31−#include <linux/sched.h>
32−#include <linux/pwm.h>
33−#include <linux/pwm_backlight.h>
34−#include <linux/i2c.h>
35−#include <linux/platform_data/i2c-pxa.h>
36−#include <linux/spi/spi.h>
37−#include <linux/spi/spi_gpio.h>
38−#include <linux/lis3lv02d.h>
39−#include <linux/pda_power.h>
40−#include <linux/power_supply.h>
41−#include <linux/regulator/max8660.h>
42−#include <linux/regulator/machine.h>
43−#include <linux/regulator/fixed.h>
44−#include <linux/regulator/consumer.h>
45−#include <linux/delay.h>
46−
47−#include <asm/system_info.h>
48−
49−#include <asm/mach-types.h>
50−#include <asm/mach/arch.h>
51−
52−#include "pxa300.h"
53−#include <linux/platform_data/usb-ohci-pxa27x.h>
54−#include <linux/platform_data/video-pxafb.h>
55−#include <linux/platform_data/mmc-pxamci.h>
56−#include <linux/platform_data/mtd-nand-pxa3xx.h>
57−
58−#include "generic.h"
59−#include "devices.h"
60−
61−/* common GPIO definitions */
62−
63−/* inputs */
64−#define GPIO_ON_OFF (14)
65−#define GPIO_VOLENC_A (19)
66−#define GPIO_VOLENC_B (20)
67−#define GPIO_CHARGE_DONE (23)
68−#define GPIO_CHARGE_IND (27)
69−#define GPIO_TOUCH_IRQ (32)
70−#define GPIO_ETH_IRQ (40)
71−#define GPIO_SPI_MISO (98)
72−#define GPIO_ACCEL_IRQ (104)
73−#define GPIO_RESCUE_BOOT (115)
74−#define GPIO_DOCK_DETECT (116)
75−#define GPIO_KEY1 (117)
76−#define GPIO_KEY2 (118)
77−#define GPIO_KEY3 (119)
78−#define GPIO_CHARGE_USB_OK (112)
79−#define GPIO_CHARGE_DC_OK (101)
80−#define GPIO_CHARGE_USB_SUSP (102)
81−
82−/* outputs */
83−#define GPIO_SHUTDOWN_SUPPLY (16)
84−#define GPIO_SHUTDOWN_BATT (18)
85−#define GPIO_CHRG_PEN2 (31)
86−#define GPIO_TFT_VA_EN (33)
87−#define GPIO_SPDIF_CS (34)
88−#define GPIO_LED2 (35)
89−#define GPIO_LED1 (36)
90−#define GPIO_SPDIF_RESET (38)
91−#define GPIO_SPI_CLK (95)
92−#define GPIO_MCLK_DAC_CS (96)
93−#define GPIO_SPI_MOSI (97)
94−#define GPIO_W1_PULLUP_ENABLE (105)
95−#define GPIO_DISPLAY_ENABLE (106)
96−#define GPIO_MCLK_RESET (111)
97−#define GPIO_W2W_RESET (113)
98−#define GPIO_W2W_PDN (114)
99−#define GPIO_CODEC_RESET (120)
100−#define GPIO_AUDIO_VA_ENABLE (124)
101−#define GPIO_ACCEL_CS (125)
102−#define GPIO_ONE_WIRE (126)
103−
104−/*
105− * GPIO configurations
106− */
107−static mfp_cfg_t raumfeld_controller_pin_config[] __initdata = {
108− /* UART1 */
109− GPIO77_UART1_RXD,
110− GPIO78_UART1_TXD,
111− GPIO79_UART1_CTS,
112− GPIO81_UART1_DSR,
113− GPIO83_UART1_DTR,
114− GPIO84_UART1_RTS,
115−
116− /* UART3 */
117− GPIO110_UART3_RXD,
118−
119− /* USB Host */
120− GPIO0_2_USBH_PEN,
121− GPIO1_2_USBH_PWR,
122−
123− /* I2C */
124− GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
125− GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
126−
127− /* SPI */
128− GPIO34_GPIO, /* SPDIF_CS */
129− GPIO96_GPIO, /* MCLK_CS */
130− GPIO125_GPIO, /* ACCEL_CS */
131−
132− /* MMC */
133− GPIO3_MMC1_DAT0,
134− GPIO4_MMC1_DAT1,
135− GPIO5_MMC1_DAT2,
136− GPIO6_MMC1_DAT3,
137− GPIO7_MMC1_CLK,
138− GPIO8_MMC1_CMD,
139−
140− /* One-wire */
141− GPIO126_GPIO | MFP_LPM_FLOAT,
142− GPIO105_GPIO | MFP_PULL_LOW | MFP_LPM_PULL_LOW,
143−
144− /* CHRG_USB_OK */
145− GPIO101_GPIO | MFP_PULL_HIGH,
146− /* CHRG_USB_OK */
147− GPIO112_GPIO | MFP_PULL_HIGH,
148− /* CHRG_USB_SUSP */
149− GPIO102_GPIO,
150− /* DISPLAY_ENABLE */
151− GPIO106_GPIO,
152− /* DOCK_DETECT */
153− GPIO116_GPIO | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
154−
155− /* LCD */
156− GPIO54_LCD_LDD_0,
157− GPIO55_LCD_LDD_1,
158− GPIO56_LCD_LDD_2,
159− GPIO57_LCD_LDD_3,
160− GPIO58_LCD_LDD_4,
161− GPIO59_LCD_LDD_5,
162− GPIO60_LCD_LDD_6,
163− GPIO61_LCD_LDD_7,
164− GPIO62_LCD_LDD_8,
165− GPIO63_LCD_LDD_9,
166− GPIO64_LCD_LDD_10,
167− GPIO65_LCD_LDD_11,
168− GPIO66_LCD_LDD_12,
169− GPIO67_LCD_LDD_13,
170− GPIO68_LCD_LDD_14,
171− GPIO69_LCD_LDD_15,
172− GPIO70_LCD_LDD_16,
173− GPIO71_LCD_LDD_17,
174− GPIO72_LCD_FCLK,
175− GPIO73_LCD_LCLK,
176− GPIO74_LCD_PCLK,
177− GPIO75_LCD_BIAS,
178−};
179−
180−static mfp_cfg_t raumfeld_connector_pin_config[] __initdata = {
181− /* UART1 */
182− GPIO77_UART1_RXD,
183− GPIO78_UART1_TXD,
184− GPIO79_UART1_CTS,
185− GPIO81_UART1_DSR,
186− GPIO83_UART1_DTR,
187− GPIO84_UART1_RTS,
188−
189− /* UART3 */
190− GPIO110_UART3_RXD,
191−
192− /* USB Host */
193− GPIO0_2_USBH_PEN,
194− GPIO1_2_USBH_PWR,
195−
196− /* I2C */
197− GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
198− GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
199−
200− /* SPI */
201− GPIO34_GPIO, /* SPDIF_CS */
202− GPIO96_GPIO, /* MCLK_CS */
203− GPIO125_GPIO, /* ACCEL_CS */
204−
205− /* MMC */
206− GPIO3_MMC1_DAT0,
207− GPIO4_MMC1_DAT1,
208− GPIO5_MMC1_DAT2,
209− GPIO6_MMC1_DAT3,
210− GPIO7_MMC1_CLK,
211− GPIO8_MMC1_CMD,
212−
213− /* Ethernet */
214− GPIO1_nCS2, /* CS */
215− GPIO40_GPIO | MFP_PULL_HIGH, /* IRQ */
216−
217− /* SSP for I2S */
218− GPIO85_SSP1_SCLK,
219− GPIO89_SSP1_EXTCLK,
220− GPIO86_SSP1_FRM,
221− GPIO87_SSP1_TXD,
222− GPIO88_SSP1_RXD,
223− GPIO90_SSP1_SYSCLK,
224−
225− /* SSP2 for S/PDIF */
226− GPIO25_SSP2_SCLK,
227− GPIO26_SSP2_FRM,
228− GPIO27_SSP2_TXD,
229− GPIO29_SSP2_EXTCLK,
230−
231− /* LEDs */
232− GPIO35_GPIO | MFP_LPM_PULL_LOW,
233− GPIO36_GPIO | MFP_LPM_DRIVE_HIGH,
234−};
235−
236−static mfp_cfg_t raumfeld_speaker_pin_config[] __initdata = {
237− /* UART1 */
238− GPIO77_UART1_RXD,
239− GPIO78_UART1_TXD,
240− GPIO79_UART1_CTS,
241− GPIO81_UART1_DSR,
242− GPIO83_UART1_DTR,
243− GPIO84_UART1_RTS,
244−
245− /* UART3 */
246− GPIO110_UART3_RXD,
247−
248− /* USB Host */
249− GPIO0_2_USBH_PEN,
250− GPIO1_2_USBH_PWR,
251−
252− /* I2C */
253− GPIO21_I2C_SCL | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
254− GPIO22_I2C_SDA | MFP_LPM_FLOAT | MFP_PULL_FLOAT,
255−
256− /* SPI */
257− GPIO34_GPIO, /* SPDIF_CS */
258− GPIO96_GPIO, /* MCLK_CS */
259− GPIO125_GPIO, /* ACCEL_CS */
260−
261− /* MMC */
262− GPIO3_MMC1_DAT0,
263− GPIO4_MMC1_DAT1,
264− GPIO5_MMC1_DAT2,
265− GPIO6_MMC1_DAT3,
266− GPIO7_MMC1_CLK,
267− GPIO8_MMC1_CMD,
268−
269− /* Ethernet */
270− GPIO1_nCS2, /* CS */
271− GPIO40_GPIO | MFP_PULL_HIGH, /* IRQ */
272−
273− /* SSP for I2S */
274− GPIO85_SSP1_SCLK,
275− GPIO89_SSP1_EXTCLK,
276− GPIO86_SSP1_FRM,
277− GPIO87_SSP1_TXD,
278− GPIO88_SSP1_RXD,
279− GPIO90_SSP1_SYSCLK,
280−
281− /* LEDs */
282− GPIO35_GPIO | MFP_LPM_PULL_LOW,
283− GPIO36_GPIO | MFP_LPM_DRIVE_HIGH,
284−};
285−
286−/*
287− * SMSC LAN9220 Ethernet
288− */
289−
290−static struct resource smc91x_resources[] = {
291− {
292− .start = PXA3xx_CS2_PHYS,
293− .end = PXA3xx_CS2_PHYS + 0xfffff,
294− .flags = IORESOURCE_MEM,
295− },
296− {
297− .start = PXA_GPIO_TO_IRQ(GPIO_ETH_IRQ),
298− .end = PXA_GPIO_TO_IRQ(GPIO_ETH_IRQ),
299− .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING,
300− }
301−};
302−
303−static struct smsc911x_platform_config raumfeld_smsc911x_config = {
304− .phy_interface = PHY_INTERFACE_MODE_MII,
305− .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
306− .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
307− .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
308−};
309−
310−static struct platform_device smc91x_device = {
311− .name = "smsc911x",
312− .id = -1,
313− .num_resources = ARRAY_SIZE(smc91x_resources),
314− .resource = smc91x_resources,
315− .dev = {
316− .platform_data = &raumfeld_smsc911x_config,
317− }
318−};
319−
320−/**
321− * NAND
322− */
323−
324−static struct mtd_partition raumfeld_nand_partitions[] = {
325− {
326− .name = "Bootloader",
327− .offset = 0,
328− .size = 0xa0000,
329− .mask_flags = MTD_WRITEABLE, /* force read-only */
330− },
331− {
332− .name = "BootloaderEnvironment",
333− .offset = 0xa0000,
334− .size = 0x20000,
335− },
336− {
337− .name = "BootloaderSplashScreen",
338− .offset = 0xc0000,
339− .size = 0x60000,
340− },
341− {
342− .name = "UBI",
343− .offset = 0x120000,
344− .size = MTDPART_SIZ_FULL,
345− },
346−};
347−
348−static struct pxa3xx_nand_platform_data raumfeld_nand_info = {
349− .keep_config = 1,
350− .parts = raumfeld_nand_partitions,
351− .nr_parts = ARRAY_SIZE(raumfeld_nand_partitions),
352−};
353−
354−/**
355− * USB (OHCI) support
356− */
357−
358−static struct pxaohci_platform_data raumfeld_ohci_info = {
359− .port_mode = PMM_GLOBAL_MODE,
360− .flags = ENABLE_PORT1,
361−};
362−
363−/**
364− * Rotary encoder input device
365− */
366−
367−static struct gpiod_lookup_table raumfeld_rotary_gpios_table = {
368− .dev_id = "rotary-encoder.0",
369− .table = {
370− GPIO_LOOKUP_IDX("gpio-0",
371− GPIO_VOLENC_A, NULL, 0, GPIO_ACTIVE_LOW),
372− GPIO_LOOKUP_IDX("gpio-0",
373− GPIO_VOLENC_B, NULL, 1, GPIO_ACTIVE_HIGH),
374− { },
375− },
376−};
377−
378−static const struct property_entry raumfeld_rotary_properties[] __initconst = {
379− PROPERTY_ENTRY_U32("rotary-encoder,steps-per-period", 24),
380− PROPERTY_ENTRY_U32("linux,axis", REL_X),
381− PROPERTY_ENTRY_U32("rotary-encoder,relative_axis", 1),
382− { },
383−};
384−
385−static struct platform_device rotary_encoder_device = {
386− .name = "rotary-encoder",
387− .id = 0,
388−};
389−
390−/**
391− * GPIO buttons
392− */
393−
394−static struct gpio_keys_button gpio_keys_button[] = {
395− {
396− .code = KEY_F1,
397− .type = EV_KEY,
398− .gpio = GPIO_KEY1,
399− .active_low = 1,
400− .wakeup = 0,
401− .debounce_interval = 5, /* ms */
402− .desc = "Button 1",
403− },
404− {
405− .code = KEY_F2,
406− .type = EV_KEY,
407− .gpio = GPIO_KEY2,
408− .active_low = 1,
409− .wakeup = 0,
410− .debounce_interval = 5, /* ms */
411− .desc = "Button 2",
412− },
413− {
414− .code = KEY_F3,
415− .type = EV_KEY,
416− .gpio = GPIO_KEY3,
417− .active_low = 1,
418− .wakeup = 0,
419− .debounce_interval = 5, /* ms */
420− .desc = "Button 3",
421− },
422− {
423− .code = KEY_F4,
424− .type = EV_KEY,
425− .gpio = GPIO_RESCUE_BOOT,
426− .active_low = 0,
427− .wakeup = 0,
428− .debounce_interval = 5, /* ms */
429− .desc = "rescue boot button",
430− },
431− {
432− .code = KEY_F5,
433− .type = EV_KEY,
434− .gpio = GPIO_DOCK_DETECT,
435− .active_low = 1,
436− .wakeup = 0,
437− .debounce_interval = 5, /* ms */
438− .desc = "dock detect",
439− },
440− {
441− .code = KEY_F6,
442− .type = EV_KEY,
443− .gpio = GPIO_ON_OFF,
444− .active_low = 0,
445− .wakeup = 0,
446− .debounce_interval = 5, /* ms */
447− .desc = "on_off button",
448− },
449−};
450−
451−static struct gpio_keys_platform_data gpio_keys_platform_data = {
452− .buttons = gpio_keys_button,
453− .nbuttons = ARRAY_SIZE(gpio_keys_button),
454− .rep = 0,
455−};
456−
457−static struct platform_device raumfeld_gpio_keys_device = {
458− .name = "gpio-keys",
459− .id = -1,
460− .dev = {
461− .platform_data = &gpio_keys_platform_data,
462− }
463−};
464−
465−/**
466− * GPIO LEDs
467− */
468−
469−static struct gpio_led raumfeld_leds[] = {
470− {
471− .name = "raumfeld:1",
472− .gpio = GPIO_LED1,
473− .active_low = 1,
474− .default_state = LEDS_GPIO_DEFSTATE_ON,
475− },
476− {
477− .name = "raumfeld:2",
478− .gpio = GPIO_LED2,
479− .active_low = 0,
480− .default_state = LEDS_GPIO_DEFSTATE_OFF,
481− }
482−};
483−
484−static struct gpio_led_platform_data raumfeld_led_platform_data = {
485− .leds = raumfeld_leds,
486− .num_leds = ARRAY_SIZE(raumfeld_leds),
487−};
488−
489−static struct platform_device raumfeld_led_device = {
490− .name = "leds-gpio",
491− .id = -1,
492− .dev = {
493− .platform_data = &raumfeld_led_platform_data,
494− },
495−};
496−
497−/**
498− * One-wire (W1 bus) support
499− */
500−
501−static void w1_enable_external_pullup(int enable)
502−{
503− gpio_set_value(GPIO_W1_PULLUP_ENABLE, enable);
504− msleep(100);
505−}
506−
507−static struct gpiod_lookup_table raumfeld_w1_gpiod_table = {
508− .dev_id = "w1-gpio",
509− .table = {
510− GPIO_LOOKUP_IDX("gpio-pxa", GPIO_ONE_WIRE, NULL, 0,
511− GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
512− },
513−};
514−
515−static struct w1_gpio_platform_data w1_gpio_platform_data = {
516− .enable_external_pullup = w1_enable_external_pullup,
517−};
518−
519−static struct platform_device raumfeld_w1_gpio_device = {
520− .name = "w1-gpio",
521− .dev = {
522− .platform_data = &w1_gpio_platform_data
523− }
524−};
525−
526−static void __init raumfeld_w1_init(void)
527−{
528− int ret = gpio_request(GPIO_W1_PULLUP_ENABLE,
529− "W1 external pullup enable");
530−
531− if (ret < 0)
532− pr_warn("Unable to request GPIO_W1_PULLUP_ENABLE\n");
533− else
534− gpio_direction_output(GPIO_W1_PULLUP_ENABLE, 0);
535−
536− gpiod_add_lookup_table(&raumfeld_w1_gpiod_table);
537− platform_device_register(&raumfeld_w1_gpio_device);
538−}
539−
540−/**
541− * Framebuffer device
542− */
543−
544−static struct pwm_lookup raumfeld_pwm_lookup[] = {
545− PWM_LOOKUP("pxa27x-pwm.0", 0, "pwm-backlight", NULL, 10000,
546− PWM_POLARITY_NORMAL),
547−};
548−
549−/* PWM controlled backlight */
550−static struct platform_pwm_backlight_data raumfeld_pwm_backlight_data = {
551− .max_brightness = 100,
552− .dft_brightness = 100,
553− .enable_gpio = -1,
554−};
555−
556−static struct platform_device raumfeld_pwm_backlight_device = {
557− .name = "pwm-backlight",
558− .dev = {
559− .parent = &pxa27x_device_pwm0.dev,
560− .platform_data = &raumfeld_pwm_backlight_data,
561− }
562−};
563−
564−/* LT3593 controlled backlight */
565−static struct gpio_led raumfeld_lt3593_led = {
566− .name = "backlight",
567− .gpio = mfp_to_gpio(MFP_PIN_GPIO17),
568− .default_state = LEDS_GPIO_DEFSTATE_ON,
569−};
570−
571−static struct gpio_led_platform_data raumfeld_lt3593_platform_data = {
572− .leds = &raumfeld_lt3593_led,
573− .num_leds = 1,
574−};
575−
576−static struct platform_device raumfeld_lt3593_device = {
577− .name = "leds-lt3593",
578− .id = -1,
579− .dev = {
580− .platform_data = &raumfeld_lt3593_platform_data,
581− },
582−};
583−
584−static struct pxafb_mode_info sharp_lq043t3dx02_mode = {
585− .pixclock = 111000,
586− .xres = 480,
587− .yres = 272,
588− .bpp = 16,
589− .hsync_len = 41,
590− .left_margin = 2,
591− .right_margin = 1,
592− .vsync_len = 10,
593− .upper_margin = 3,
594− .lower_margin = 1,
595− .sync = 0,
596−};
597−
598−static struct pxafb_mach_info raumfeld_sharp_lcd_info = {
599− .modes = &sharp_lq043t3dx02_mode,
600− .num_modes = 1,
601− .video_mem_size = 0x400000,
602− .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
603−#ifdef CONFIG_PXA3XX_GCU
604− .acceleration_enabled = 1,
605−#endif
606−};
607−
608−static void __init raumfeld_lcd_init(void)
609−{
610− int ret;
611−
612− ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable");
613− if (ret < 0)
614− pr_warn("Unable to request GPIO_TFT_VA_EN\n");
615− else
616− gpio_direction_output(GPIO_TFT_VA_EN, 1);
617−
618− msleep(100);
619−
620− ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable");
621− if (ret < 0)
622− pr_warn("Unable to request GPIO_DISPLAY_ENABLE\n");
623− else
624− gpio_direction_output(GPIO_DISPLAY_ENABLE, 1);
625−
626− /* Hardware revision 2 has the backlight regulator controlled
627− * by an LT3593, earlier and later devices use PWM for that. */
628− if ((system_rev & 0xff) == 2) {
629− platform_device_register(&raumfeld_lt3593_device);
630− } else {
631− mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT;
632− pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1);
633− pwm_add_table(raumfeld_pwm_lookup,
634− ARRAY_SIZE(raumfeld_pwm_lookup));
635− platform_device_register(&raumfeld_pwm_backlight_device);
636− }
637−
638− pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info);
639− platform_device_register(&pxa3xx_device_gcu);
640−}
641−
642−/**
643− * SPI devices
644− */
645−
646−static struct spi_gpio_platform_data raumfeld_spi_platform_data = {
647− .num_chipselect = 3,
648−};
649−
650−static struct platform_device raumfeld_spi_device = {
651− .name = "spi_gpio",
652− .id = 0,
653− .dev = {
654− .platform_data = &raumfeld_spi_platform_data,
655− }
656−};
657−
658−static struct gpiod_lookup_table raumfeld_spi_gpiod_table = {
659− .dev_id = "spi_gpio",
660− .table = {
661− GPIO_LOOKUP("gpio-0", GPIO_SPI_CLK,
662− "sck", GPIO_ACTIVE_HIGH),
663− GPIO_LOOKUP("gpio-0", GPIO_SPI_MOSI,
664− "mosi", GPIO_ACTIVE_HIGH),
665− GPIO_LOOKUP("gpio-0", GPIO_SPI_MISO,
666− "miso", GPIO_ACTIVE_HIGH),
667− GPIO_LOOKUP_IDX("gpio-0", GPIO_SPDIF_CS,
668− "cs", 0, GPIO_ACTIVE_HIGH),
669− GPIO_LOOKUP_IDX("gpio-0", GPIO_ACCEL_CS,
670− "cs", 1, GPIO_ACTIVE_HIGH),
671− GPIO_LOOKUP_IDX("gpio-0", GPIO_MCLK_DAC_CS,
672− "cs", 2, GPIO_ACTIVE_HIGH),
673− { },
674− },
675−};
676−
677−static struct lis3lv02d_platform_data lis3_pdata = {
678− .click_flags = LIS3_CLICK_SINGLE_X |
679− LIS3_CLICK_SINGLE_Y |
680− LIS3_CLICK_SINGLE_Z,
681− .irq_cfg = LIS3_IRQ1_CLICK | LIS3_IRQ2_CLICK,
682− .wakeup_flags = LIS3_WAKEUP_X_LO | LIS3_WAKEUP_X_HI |
683− LIS3_WAKEUP_Y_LO | LIS3_WAKEUP_Y_HI |
684− LIS3_WAKEUP_Z_LO | LIS3_WAKEUP_Z_HI,
685− .wakeup_thresh = 10,
686− .click_thresh_x = 10,
687− .click_thresh_y = 10,
688− .click_thresh_z = 10,
689−};
690−
691−#define SPI_AK4104 \
692−{ \
693− .modalias = "ak4104-codec", \
694− .max_speed_hz = 10000, \
695− .bus_num = 0, \
696− .chip_select = 0, \
697−}
698−
699−#define SPI_LIS3 \
700−{ \
701− .modalias = "lis3lv02d_spi", \
702− .max_speed_hz = 1000000, \
703− .bus_num = 0, \
704− .chip_select = 1, \
705− .platform_data = &lis3_pdata, \
706− .irq = PXA_GPIO_TO_IRQ(GPIO_ACCEL_IRQ), \
707−}
708−
709−#define SPI_DAC7512 \
710−{ \
711− .modalias = "dac7512", \
712− .max_speed_hz = 1000000, \
713− .bus_num = 0, \
714− .chip_select = 2, \
715−}
716−
717−static struct spi_board_info connector_spi_devices[] __initdata = {
718− SPI_AK4104,
719− SPI_DAC7512,
720−};
721−
722−static struct spi_board_info speaker_spi_devices[] __initdata = {
723− SPI_DAC7512,
724−};
725−
726−static struct spi_board_info controller_spi_devices[] __initdata = {
727− SPI_LIS3,
728−};
729−
730−/**
731− * MMC for Marvell Libertas 8688 via SDIO
732− */
733−
734−static int raumfeld_mci_init(struct device *dev, irq_handler_t isr, void *data)
735−{
736− gpio_set_value(GPIO_W2W_RESET, 1);
737− gpio_set_value(GPIO_W2W_PDN, 1);
738−
739− return 0;
740−}
741−
742−static void raumfeld_mci_exit(struct device *dev, void *data)
743−{
744− gpio_set_value(GPIO_W2W_RESET, 0);
745− gpio_set_value(GPIO_W2W_PDN, 0);
746−}
747−
748−static struct pxamci_platform_data raumfeld_mci_platform_data = {
749− .init = raumfeld_mci_init,
750− .exit = raumfeld_mci_exit,
751− .detect_delay_ms = 200,
752−};
753−
754−/*
755− * External power / charge logic
756− */
757−
758−static int power_supply_init(struct device *dev)
759−{
760− return 0;
761−}
762−
763−static void power_supply_exit(struct device *dev)
764−{
765−}
766−
767−static int raumfeld_is_ac_online(void)
768−{
769− return !gpio_get_value(GPIO_CHARGE_DC_OK);
770−}
771−
772−static int raumfeld_is_usb_online(void)
773−{
774− return 0;
775−}
776−
777−static char *raumfeld_power_supplicants[] = { "ds2760-battery.0" };
778−
779−static void raumfeld_power_signal_charged(void)
780−{
781− struct power_supply *psy =
782− power_supply_get_by_name(raumfeld_power_supplicants[0]);
783−
784− if (psy) {
785− power_supply_set_battery_charged(psy);
786− power_supply_put(psy);
787− }
788−}
789−
790−static int raumfeld_power_resume(void)
791−{
792− /* check if GPIO_CHARGE_DONE went low while we were sleeping */
793− if (!gpio_get_value(GPIO_CHARGE_DONE))
794− raumfeld_power_signal_charged();
795−
796− return 0;
797−}
798−
799−static struct pda_power_pdata power_supply_info = {
800− .init = power_supply_init,
801− .is_ac_online = raumfeld_is_ac_online,
802− .is_usb_online = raumfeld_is_usb_online,
803− .exit = power_supply_exit,
804− .supplied_to = raumfeld_power_supplicants,
805− .num_supplicants = ARRAY_SIZE(raumfeld_power_supplicants),
806− .resume = raumfeld_power_resume,
807−};
808−
809−static struct resource power_supply_resources[] = {
810− {
811− .name = "ac",
812− .flags = IORESOURCE_IRQ |
813− IORESOURCE_IRQ_HIGHEDGE | IORESOURCE_IRQ_LOWEDGE,
814− .start = GPIO_CHARGE_DC_OK,
815− .end = GPIO_CHARGE_DC_OK,
816− },
817−};
818−
819−static irqreturn_t charge_done_irq(int irq, void *dev_id)
820−{
821− raumfeld_power_signal_charged();
822− return IRQ_HANDLED;
823−}
824−
825−static struct platform_device raumfeld_power_supply = {
826− .name = "pda-power",
827− .id = -1,
828− .dev = {
829− .platform_data = &power_supply_info,
830− },
831− .resource = power_supply_resources,
832− .num_resources = ARRAY_SIZE(power_supply_resources),
833−};
834−
835−static void __init raumfeld_power_init(void)
836−{
837− int ret;
838−
839− /* Set PEN2 high to enable maximum charge current */
840− ret = gpio_request(GPIO_CHRG_PEN2, "CHRG_PEN2");
841− if (ret < 0)
842− pr_warn("Unable to request GPIO_CHRG_PEN2\n");
843− else
844− gpio_direction_output(GPIO_CHRG_PEN2, 1);
845−
846− ret = gpio_request(GPIO_CHARGE_DC_OK, "CABLE_DC_OK");
847− if (ret < 0)
848− pr_warn("Unable to request GPIO_CHARGE_DC_OK\n");
849−
850− ret = gpio_request(GPIO_CHARGE_USB_SUSP, "CHARGE_USB_SUSP");
851− if (ret < 0)
852− pr_warn("Unable to request GPIO_CHARGE_USB_SUSP\n");
853− else
854− gpio_direction_output(GPIO_CHARGE_USB_SUSP, 0);
855−
856− power_supply_resources[0].start = gpio_to_irq(GPIO_CHARGE_DC_OK);
857− power_supply_resources[0].end = gpio_to_irq(GPIO_CHARGE_DC_OK);
858−
859− ret = request_irq(gpio_to_irq(GPIO_CHARGE_DONE),
860− &charge_done_irq, IORESOURCE_IRQ_LOWEDGE,
861− "charge_done", NULL);
862−
863− if (ret < 0)
864− printk(KERN_ERR "%s: unable to register irq %d\n", __func__,
865− GPIO_CHARGE_DONE);
866− else
867− platform_device_register(&raumfeld_power_supply);
868−}
869−
870−/* Fixed regulator for AUDIO_VA, 0-0048 maps to the cs4270 codec device */
871−
872−static struct regulator_consumer_supply audio_va_consumer_supply =
873− REGULATOR_SUPPLY("va", "0-0048");
874−
875−static struct regulator_init_data audio_va_initdata = {
876− .consumer_supplies = &audio_va_consumer_supply,
877− .num_consumer_supplies = 1,
878− .constraints = {
879− .valid_ops_mask = REGULATOR_CHANGE_STATUS,
880− },
881−};
882−
883−static struct fixed_voltage_config audio_va_config = {
884− .supply_name = "audio_va",
885− .microvolts = 5000000,
886− .enabled_at_boot = 0,
887− .init_data = &audio_va_initdata,
888−};
889−
890−static struct platform_device audio_va_device = {
891− .name = "reg-fixed-voltage",
892− .id = 0,
893− .dev = {
894− .platform_data = &audio_va_config,
895− },
896−};
897−
898−static struct gpiod_lookup_table audio_va_gpiod_table = {
899− .dev_id = "reg-fixed-voltage.0",
900− .table = {
901− GPIO_LOOKUP("gpio-pxa", GPIO_AUDIO_VA_ENABLE,
902− NULL, GPIO_ACTIVE_HIGH),
903− { },
904− },
905−};
906−
907−/* Dummy supplies for Codec's VD/VLC */
908−
909−static struct regulator_consumer_supply audio_dummy_supplies[] = {
910− REGULATOR_SUPPLY("vd", "0-0048"),
911− REGULATOR_SUPPLY("vlc", "0-0048"),
912−};
913−
914−static struct regulator_init_data audio_dummy_initdata = {
915− .consumer_supplies = audio_dummy_supplies,
916− .num_consumer_supplies = ARRAY_SIZE(audio_dummy_supplies),
917− .constraints = {
918− .valid_ops_mask = REGULATOR_CHANGE_STATUS,
919− },
920−};
921−
922−static struct fixed_voltage_config audio_dummy_config = {
923− .supply_name = "audio_vd",
924− .microvolts = 3300000,
925− .init_data = &audio_dummy_initdata,
926−};
927−
928−static struct platform_device audio_supply_dummy_device = {
929− .name = "reg-fixed-voltage",
930− .id = 1,
931− .dev = {
932− .platform_data = &audio_dummy_config,
933− },
934−};
935−
936−static struct platform_device *audio_regulator_devices[] = {
937− &audio_va_device,
938− &audio_supply_dummy_device,
939−};
940−
941−/**
942− * Regulator support via MAX8660
943− */
944−
945−static struct regulator_consumer_supply vcc_mmc_supply =
946− REGULATOR_SUPPLY("vmmc", "pxa2xx-mci.0");
947−
948−static struct regulator_init_data vcc_mmc_init_data = {
949− .constraints = {
950− .min_uV = 3300000,
951− .max_uV = 3300000,
952− .valid_modes_mask = REGULATOR_MODE_NORMAL,
953− .valid_ops_mask = REGULATOR_CHANGE_STATUS |
954− REGULATOR_CHANGE_VOLTAGE |
955− REGULATOR_CHANGE_MODE,
956− },
957− .consumer_supplies = &vcc_mmc_supply,
958− .num_consumer_supplies = 1,
959−};
960−
961−static struct max8660_subdev_data max8660_v6_subdev_data = {
962− .id = MAX8660_V6,
963− .name = "vmmc",
964− .platform_data = &vcc_mmc_init_data,
965−};
966−
967−static struct max8660_platform_data max8660_pdata = {
968− .subdevs = &max8660_v6_subdev_data,
969− .num_subdevs = 1,
970−};
971−
972−/**
973− * I2C devices
974− */
975−
976−static struct i2c_board_info raumfeld_pwri2c_board_info = {
977− .type = "max8660",
978− .addr = 0x34,
979− .platform_data = &max8660_pdata,
980−};
981−
982−static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
983− .type = "cs4270",
984− .addr = 0x48,
985−};
986−
987−static struct gpiod_lookup_table raumfeld_controller_gpios_table = {
988− .dev_id = "0-000a",
989− .table = {
990− GPIO_LOOKUP("gpio-pxa",
991− GPIO_TOUCH_IRQ, "attn", GPIO_ACTIVE_HIGH),
992− { },
993− },
994−};
995−
996−static const struct resource raumfeld_controller_resources[] __initconst = {
997− {
998− .start = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
999− .end = PXA_GPIO_TO_IRQ(GPIO_TOUCH_IRQ),
1000− .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
1001− },
1002−};
1003−
1004−static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
1005− .type = "eeti_ts",
1006− .addr = 0x0a,
1007− .resources = raumfeld_controller_resources,
1008− .num_resources = ARRAY_SIZE(raumfeld_controller_resources),
1009−};
1010−
1011−static struct platform_device *raumfeld_common_devices[] = {
1012− &raumfeld_gpio_keys_device,
1013− &raumfeld_led_device,
1014− &raumfeld_spi_device,
1015−};
1016−
1017−static void __init raumfeld_audio_init(void)
1018−{
1019− int ret;
1020−
1021− ret = gpio_request(GPIO_CODEC_RESET, "cs4270 reset");
1022− if (ret < 0)
1023− pr_warn("unable to request GPIO_CODEC_RESET\n");
1024− else
1025− gpio_direction_output(GPIO_CODEC_RESET, 1);
1026−
1027− ret = gpio_request(GPIO_SPDIF_RESET, "ak4104 s/pdif reset");
1028− if (ret < 0)
1029− pr_warn("unable to request GPIO_SPDIF_RESET\n");
1030− else
1031− gpio_direction_output(GPIO_SPDIF_RESET, 1);
1032−
1033− ret = gpio_request(GPIO_MCLK_RESET, "MCLK reset");
1034− if (ret < 0)
1035− pr_warn("unable to request GPIO_MCLK_RESET\n");
1036− else
1037− gpio_direction_output(GPIO_MCLK_RESET, 1);
1038−
1039− gpiod_add_lookup_table(&audio_va_gpiod_table);
1040− platform_add_devices(ARRAY_AND_SIZE(audio_regulator_devices));
1041−}
1042−
1043−static void __init raumfeld_common_init(void)
1044−{
1045− int ret;
1046−
1047− /* The on/off button polarity has changed after revision 1 */
1048− if ((system_rev & 0xff) > 1) {
1049− int i;
1050−
1051− for (i = 0; i < ARRAY_SIZE(gpio_keys_button); i++)
1052− if (!strcmp(gpio_keys_button[i].desc, "on_off button"))
1053− gpio_keys_button[i].active_low = 1;
1054− }
1055−
1056− enable_irq_wake(IRQ_WAKEUP0);
1057−
1058− pxa3xx_set_nand_info(&raumfeld_nand_info);
1059− pxa3xx_set_i2c_power_info(NULL);
1060− pxa_set_ohci_info(&raumfeld_ohci_info);
1061− pxa_set_mci_info(&raumfeld_mci_platform_data);
1062− pxa_set_i2c_info(NULL);
1063− pxa_set_ffuart_info(NULL);
1064−
1065− ret = gpio_request(GPIO_W2W_RESET, "Wi2Wi reset");
1066− if (ret < 0)
1067− pr_warn("Unable to request GPIO_W2W_RESET\n");
1068− else
1069− gpio_direction_output(GPIO_W2W_RESET, 0);
1070−
1071− ret = gpio_request(GPIO_W2W_PDN, "Wi2Wi powerup");
1072− if (ret < 0)
1073− pr_warn("Unable to request GPIO_W2W_PDN\n");
1074− else
1075− gpio_direction_output(GPIO_W2W_PDN, 0);
1076−
1077− /* this can be used to switch off the device */
1078− ret = gpio_request(GPIO_SHUTDOWN_SUPPLY, "supply shutdown");
1079− if (ret < 0)
1080− pr_warn("Unable to request GPIO_SHUTDOWN_SUPPLY\n");
1081− else
1082− gpio_direction_output(GPIO_SHUTDOWN_SUPPLY, 0);
1083−
1084− gpiod_add_lookup_table(&raumfeld_spi_gpiod_table);
1085− platform_add_devices(ARRAY_AND_SIZE(raumfeld_common_devices));
1086− i2c_register_board_info(1, &raumfeld_pwri2c_board_info, 1);
1087−}
1088−
1089−static void __init __maybe_unused raumfeld_controller_init(void)
1090−{
1091− int ret;
1092−
1093− pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_controller_pin_config));
1094−
1095− gpiod_add_lookup_table(&raumfeld_rotary_gpios_table);
1096− device_add_properties(&rotary_encoder_device.dev,
1097− raumfeld_rotary_properties);
1098− platform_device_register(&rotary_encoder_device);
1099−
1100− spi_register_board_info(ARRAY_AND_SIZE(controller_spi_devices));
1101−
1102− gpiod_add_lookup_table(&raumfeld_controller_gpios_table);
1103− i2c_register_board_info(0, &raumfeld_controller_i2c_board_info, 1);
1104−
1105− ret = gpio_request(GPIO_SHUTDOWN_BATT, "battery shutdown");
1106− if (ret < 0)
1107− pr_warn("Unable to request GPIO_SHUTDOWN_BATT\n");
1108− else
1109− gpio_direction_output(GPIO_SHUTDOWN_BATT, 0);
1110−
1111− raumfeld_common_init();
1112− raumfeld_power_init();
1113− raumfeld_lcd_init();
1114− raumfeld_w1_init();
1115−}
1116−
1117−static void __init __maybe_unused raumfeld_connector_init(void)
1118−{
1119− pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_connector_pin_config));
1120− spi_register_board_info(ARRAY_AND_SIZE(connector_spi_devices));
1121− i2c_register_board_info(0, &raumfeld_connector_i2c_board_info, 1);
1122−
1123− platform_device_register(&smc91x_device);
1124−
1125− raumfeld_audio_init();
1126− raumfeld_common_init();
1127−}
1128−
1129−static void __init __maybe_unused raumfeld_speaker_init(void)
1130−{
1131− pxa3xx_mfp_config(ARRAY_AND_SIZE(raumfeld_speaker_pin_config));
1132− spi_register_board_info(ARRAY_AND_SIZE(speaker_spi_devices));
1133− i2c_register_board_info(0, &raumfeld_connector_i2c_board_info, 1);
1134−
1135− platform_device_register(&smc91x_device);
1136−
1137− gpiod_add_lookup_table(&raumfeld_rotary_gpios_table);
1138− device_add_properties(&rotary_encoder_device.dev,
1139− raumfeld_rotary_properties);
1140− platform_device_register(&rotary_encoder_device);
1141−
1142− raumfeld_audio_init();
1143− raumfeld_common_init();
1144−}
1145−
1146−/* physical memory regions */
1147−#define RAUMFELD_SDRAM_BASE 0xa0000000 /* SDRAM region */
1148−
1149−#ifdef CONFIG_MACH_RAUMFELD_RC
1150−MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
1151− .atag_offset = 0x100,
1152− .init_machine = raumfeld_controller_init,
1153− .map_io = pxa3xx_map_io,
1154− .nr_irqs = PXA_NR_IRQS,
1155− .init_irq = pxa3xx_init_irq,
1156− .handle_irq = pxa3xx_handle_irq,
1157− .init_time = pxa_timer_init,
1158− .restart = pxa_restart,
1159−MACHINE_END
1160−#endif
1161−
1162−#ifdef CONFIG_MACH_RAUMFELD_CONNECTOR
1163−MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
1164− .atag_offset = 0x100,
1165− .init_machine = raumfeld_connector_init,
1166− .map_io = pxa3xx_map_io,
1167− .nr_irqs = PXA_NR_IRQS,
1168− .init_irq = pxa3xx_init_irq,
1169− .handle_irq = pxa3xx_handle_irq,
1170− .init_time = pxa_timer_init,
1171− .restart = pxa_restart,
1172−MACHINE_END
1173−#endif
1174−
1175−#ifdef CONFIG_MACH_RAUMFELD_SPEAKER
1176−MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
1177− .atag_offset = 0x100,
1178− .init_machine = raumfeld_speaker_init,
1179− .map_io = pxa3xx_map_io,
1180− .nr_irqs = PXA_NR_IRQS,
1181− .init_irq = pxa3xx_init_irq,
1182− .handle_irq = pxa3xx_handle_irq,
1183− .init_time = pxa_timer_init,
1184− .restart = pxa_restart,
1185−MACHINE_END
1186−#endif
arch/arm/mach-s3c24xx/mach-osiris-dvs.c+4−4
@@ -65,16 +65,16 @@ static int osiris_dvs_notify(struct notifier_block *nb, · 64 unmodified lines
6565
6666 switch (val) {
6767 case CPUFREQ_PRECHANGE:
68− if (old_dvs & !new_dvs ||
69− cur_dvs & !new_dvs) {
68+ if ((old_dvs && !new_dvs) ||
69+ (cur_dvs && !new_dvs)) {
7070 pr_debug("%s: exiting dvs\n", __func__);
7171 cur_dvs = false;
7272 gpio_set_value(OSIRIS_GPIO_DVS, 1);
7373 }
7474 break;
7575 case CPUFREQ_POSTCHANGE:
76− if (!old_dvs & new_dvs ||
77− !cur_dvs & new_dvs) {
76+ if ((!old_dvs && new_dvs) ||
77+ (!cur_dvs && new_dvs)) {
7878 pr_debug("entering dvs\n");
7979 cur_dvs = true;
8080 gpio_set_value(OSIRIS_GPIO_DVS, 0);
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c+5−0
@@ -40,6 +40,7 @@ · 39 unmodified lines
4040 struct regulator_quirk {
4141 struct list_head list;
4242 const struct of_device_id *id;
43+ struct device_node *np;
4344 struct of_phandle_args irq_args;
4445 struct i2c_msg i2c_msg;
4546 bool shared; /* IRQ line is shared */
@@ -101,6 +102,9 @@ static int regulator_quirk_notify(struct notifier_block *nb, · 55 unmodified lines
101102 if (!pos->shared)
102103 continue;
103104
105+ if (pos->np->parent != client->dev.parent->of_node)
106+ continue;
107+
104108 dev_info(&client->dev, "clearing %s@0x%02x interrupts\n",
105109 pos->id->compatible, pos->i2c_msg.addr);
106110
@@ -165,6 +169,7 @@ static int __init rcar_gen2_regulator_quirk(void) · 58 unmodified lines
165169 memcpy(&quirk->i2c_msg, id->data, sizeof(quirk->i2c_msg));
166170
167171 quirk->id = id;
172+ quirk->np = np;
168173 quirk->i2c_msg.addr = addr;
169174
170175 ret = of_irq_parse_one(np, 0, argsa);
arch/arm/mach-tegra/iomap.h+9−0
@@ -79,15 +79,24 @@ · 78 unmodified lines
7979 #define TEGRA_PMC_BASE 0x7000E400
8080 #define TEGRA_PMC_SIZE SZ_256
8181
82+#define TEGRA_MC_BASE 0x7000F000
83+#define TEGRA_MC_SIZE SZ_1K
84+
8285 #define TEGRA_EMC_BASE 0x7000F400
8386 #define TEGRA_EMC_SIZE SZ_1K
8487
88+#define TEGRA114_MC_BASE 0x70019000
89+#define TEGRA114_MC_SIZE SZ_4K
90+
8591 #define TEGRA_EMC0_BASE 0x7001A000
8692 #define TEGRA_EMC0_SIZE SZ_2K
8793
8894 #define TEGRA_EMC1_BASE 0x7001A800
8995 #define TEGRA_EMC1_SIZE SZ_2K
9096
97+#define TEGRA124_MC_BASE 0x70019000
98+#define TEGRA124_MC_SIZE SZ_4K
99+
91100 #define TEGRA124_EMC_BASE 0x7001B000
92101 #define TEGRA124_EMC_SIZE SZ_2K
93102
arch/arm/mach-tegra/sleep-tegra20.S+0−2
@@ -32,7 +32,6 @@ · 31 unmodified lines
3232
3333 #define EMC_CFG 0xc
3434 #define EMC_ADR_CFG 0x10
35−#define EMC_REFRESH 0x70
3635 #define EMC_NOP 0xdc
3736 #define EMC_SELF_REF 0xe0
3837 #define EMC_REQ_CTRL 0x2b0
@@ -397,7 +396,6 @@ padload_done: · 358 unmodified lines
397396 mov r1, #1
398397 str r1, [r0, #EMC_NOP]
399398 str r1, [r0, #EMC_NOP]
400− str r1, [r0, #EMC_REFRESH]
401399
402400 emc_device_mask r1, r0
403401
arch/arm/mach-tegra/sleep-tegra30.S+23−2
@@ -29,7 +29,6 @@ · 28 unmodified lines
2929 #define EMC_CFG 0xc
3030 #define EMC_ADR_CFG 0x10
3131 #define EMC_TIMING_CONTROL 0x28
32−#define EMC_REFRESH 0x70
3332 #define EMC_NOP 0xdc
3433 #define EMC_SELF_REF 0xe0
3534 #define EMC_MRW 0xe8
@@ -45,6 +44,8 @@ · 9 unmodified lines
4544 #define EMC_XM2VTTGENPADCTRL 0x310
4645 #define EMC_XM2VTTGENPADCTRL2 0x314
4746
47+#define MC_EMEM_ARB_CFG 0x90
48+
4849 #define PMC_CTRL 0x0
4950 #define PMC_CTRL_SIDE_EFFECT_LP0 (1 << 14) /* enter LP0 when CPU pwr gated */
5051
@@ -419,6 +420,22 @@ _pll_m_c_x_done: · 368 unmodified lines
419420 movweq r0, #:lower16:TEGRA124_EMC_BASE
420421 movteq r0, #:upper16:TEGRA124_EMC_BASE
421422
423+ cmp r10, #TEGRA30
424+ moveq r2, #0x20
425+ movweq r4, #:lower16:TEGRA_MC_BASE
426+ movteq r4, #:upper16:TEGRA_MC_BASE
427+ cmp r10, #TEGRA114
428+ moveq r2, #0x34
429+ movweq r4, #:lower16:TEGRA114_MC_BASE
430+ movteq r4, #:upper16:TEGRA114_MC_BASE
431+ cmp r10, #TEGRA124
432+ moveq r2, #0x20
433+ movweq r4, #:lower16:TEGRA124_MC_BASE
434+ movteq r4, #:upper16:TEGRA124_MC_BASE
435+
436+ ldr r1, [r5, r2] @ restore MC_EMEM_ARB_CFG
437+ str r1, [r4, #MC_EMEM_ARB_CFG]
438+
422439 exit_self_refresh:
423440 ldr r1, [r5, #0xC] @ restore EMC_XM2VTTGENPADCTRL
424441 str r1, [r0, #EMC_XM2VTTGENPADCTRL]
@@ -459,7 +476,6 @@ emc_wait_auto_cal_onetime: · 34 unmodified lines
459476 cmp r10, #TEGRA30
460477 streq r1, [r0, #EMC_NOP]
461478 streq r1, [r0, #EMC_NOP]
462− streq r1, [r0, #EMC_REFRESH]
463479
464480 emc_device_mask r1, r0
465481
@@ -521,6 +537,8 @@ zcal_done: · 55 unmodified lines
521537 ldr r1, [r5, #0x0] @ restore EMC_CFG
522538 str r1, [r0, #EMC_CFG]
523539
540+ emc_timing_update r1, r0
541+
524542 /* Tegra114 had dual EMC channel, now config the other one */
525543 cmp r10, #TEGRA114
526544 bne __no_dual_emc_chanl
@@ -546,6 +564,7 @@ tegra30_sdram_pad_address: · 19 unmodified lines
546564 .word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14
547565 .word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18
548566 .word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c
567+ .word TEGRA_MC_BASE + MC_EMEM_ARB_CFG @0x20
549568 tegra30_sdram_pad_address_end:
550569
551570 tegra114_sdram_pad_address:
@@ -562,6 +581,7 @@ tegra114_sdram_pad_address: · 10 unmodified lines
562581 .word TEGRA_EMC1_BASE + EMC_AUTO_CAL_INTERVAL @0x28
563582 .word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL @0x2c
564583 .word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL2 @0x30
584+ .word TEGRA114_MC_BASE + MC_EMEM_ARB_CFG @0x34
565585 tegra114_sdram_pad_adress_end:
566586
567587 tegra124_sdram_pad_address:
@@ -573,6 +593,7 @@ tegra124_sdram_pad_address: · 5 unmodified lines
573593 .word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14
574594 .word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18
575595 .word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c
596+ .word TEGRA124_MC_BASE + MC_EMEM_ARB_CFG @0x20
576597 tegra124_sdram_pad_address_end:
577598
578599 tegra30_sdram_pad_size:
arch/arm64/Kconfig.platforms+7−2
@@ -112,12 +112,13 @@ config ARCH_MESON · 111 unmodified lines
112112 bool "Amlogic Platforms"
113113 select PINCTRL
114114 select PINCTRL_MESON
115− select COMMON_CLK_AMLOGIC
116115 select COMMON_CLK_GXBB
117116 select COMMON_CLK_AXG
117+ select COMMON_CLK_G12A
118118 select MESON_IRQ_GPIO
119119 help
120− This enables support for the Amlogic S905 SoCs.
120+ This enables support for the arm64 based Amlogic SoCs
121+ such as the s905, S905X/D, S912, A113X/D or S905X/D2
121122
122123 config ARCH_MVEBU
123124 bool "Marvell EBU SoC Family"
@@ -146,6 +147,10 @@ config ARCH_MXC · 22 unmodified lines
146147 bool "ARMv8 based NXP i.MX SoC family"
147148 select ARM64_ERRATUM_843419
148149 select ARM64_ERRATUM_845719
150+ select IMX_GPCV2
151+ select IMX_GPCV2_PM_DOMAINS
152+ select PM
153+ select PM_GENERIC_DOMAINS
149154 help
150155 This enables support for the ARMv8 based SoCs in the
151156 NXP i.MX family.
drivers/usb/host/ohci-da8xx.c+60−58
@@ -9,6 +9,7 @@ · 8 unmodified lines
99 */
1010
1111 #include <linux/clk.h>
12+#include <linux/gpio/consumer.h>
1213 #include <linux/io.h>
1314 #include <linux/interrupt.h>
1415 #include <linux/jiffies.h>
@@ -40,6 +41,8 @@ struct da8xx_ohci_hcd { · 25 unmodified lines
4041 struct regulator *vbus_reg;
4142 struct notifier_block nb;
4243 unsigned int reg_enabled;
44+ struct gpio_desc *vbus_gpio;
45+ struct gpio_desc *oc_gpio;
4346 };
4447
4548 #define to_da8xx_ohci(hcd) (struct da8xx_ohci_hcd *)(hcd_to_ohci(hcd)->priv)
@@ -86,12 +89,13 @@ static void ohci_da8xx_disable(struct usb_hcd *hcd) · 40 unmodified lines
8689 static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on)
8790 {
8891 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
89− struct device *dev = hcd->self.controller;
90− struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
92+ struct device *dev = hcd->self.controller;
9193 int ret;
9294
93− if (hub && hub->set_power)
94− return hub->set_power(1, on);
95+ if (da8xx_ohci->vbus_gpio) {
96+ gpiod_set_value_cansleep(da8xx_ohci->vbus_gpio, on);
97+ return 0;
98+ }
9599
96100 if (!da8xx_ohci->vbus_reg)
97101 return 0;
@@ -119,11 +123,9 @@ static int ohci_da8xx_set_power(struct usb_hcd *hcd, int on) · 21 unmodified lines
119123 static int ohci_da8xx_get_power(struct usb_hcd *hcd)
120124 {
121125 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
122− struct device *dev = hcd->self.controller;
123− struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
124126
125− if (hub && hub->get_power)
126− return hub->get_power(1);
127+ if (da8xx_ohci->vbus_gpio)
128+ return gpiod_get_value_cansleep(da8xx_ohci->vbus_gpio);
127129
128130 if (da8xx_ohci->vbus_reg)
129131 return regulator_is_enabled(da8xx_ohci->vbus_reg);
@@ -134,13 +136,11 @@ static int ohci_da8xx_get_power(struct usb_hcd *hcd) · 4 unmodified lines
134136 static int ohci_da8xx_get_oci(struct usb_hcd *hcd)
135137 {
136138 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
137− struct device *dev = hcd->self.controller;
138− struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
139139 unsigned int flags;
140140 int ret;
141141
142− if (hub && hub->get_oci)
143− return hub->get_oci(1);
142+ if (da8xx_ohci->oc_gpio)
143+ return gpiod_get_value_cansleep(da8xx_ohci->oc_gpio);
144144
145145 if (!da8xx_ohci->vbus_reg)
146146 return 0;
@@ -158,10 +158,8 @@ static int ohci_da8xx_get_oci(struct usb_hcd *hcd) · 11 unmodified lines
158158 static int ohci_da8xx_has_set_power(struct usb_hcd *hcd)
159159 {
160160 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
161− struct device *dev = hcd->self.controller;
162− struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
163161
164− if (hub && hub->set_power)
162+ if (da8xx_ohci->vbus_gpio)
165163 return 1;
166164
167165 if (da8xx_ohci->vbus_reg)
@@ -173,10 +171,8 @@ static int ohci_da8xx_has_set_power(struct usb_hcd *hcd) · 5 unmodified lines
173171 static int ohci_da8xx_has_oci(struct usb_hcd *hcd)
174172 {
175173 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
176− struct device *dev = hcd->self.controller;
177− struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
178174
179− if (hub && hub->get_oci)
175+ if (da8xx_ohci->oc_gpio)
180176 return 1;
181177
182178 if (da8xx_ohci->vbus_reg)
@@ -196,19 +192,6 @@ static int ohci_da8xx_has_potpgt(struct usb_hcd *hcd) · 13 unmodified lines
196192 return 0;
197193 }
198194
199−/*
200− * Handle the port over-current indicator change.
201− */
202−static void ohci_da8xx_ocic_handler(struct da8xx_ohci_root_hub *hub,
203− unsigned port)
204−{
205− ocic_mask |= 1 << port;
206−
207− /* Once over-current is detected, the port needs to be powered down */
208− if (hub->get_oci(port) > 0)
209− hub->set_power(port, 0);
210−}
211−
212195 static int ohci_da8xx_regulator_event(struct notifier_block *nb,
213196 unsigned long event, void *data)
214197 {
@@ -223,16 +206,23 @@ static int ohci_da8xx_regulator_event(struct notifier_block *nb, · 8 unmodified lines
223206 return 0;
224207 }
225208
209+static irqreturn_t ohci_da8xx_oc_handler(int irq, void *data)
210+{
211+ struct da8xx_ohci_hcd *da8xx_ohci = data;
212+
213+ if (gpiod_get_value(da8xx_ohci->oc_gpio))
214+ gpiod_set_value(da8xx_ohci->vbus_gpio, 0);
215+
216+ return IRQ_HANDLED;
217+}
218+
226219 static int ohci_da8xx_register_notify(struct usb_hcd *hcd)
227220 {
228221 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
229222 struct device *dev = hcd->self.controller;
230− struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
231223 int ret = 0;
232224
233− if (hub && hub->ocic_notify) {
234− ret = hub->ocic_notify(ohci_da8xx_ocic_handler);
235− } else if (da8xx_ohci->vbus_reg) {
225+ if (!da8xx_ohci->oc_gpio && da8xx_ohci->vbus_reg) {
236226 da8xx_ohci->nb.notifier_call = ohci_da8xx_regulator_event;
237227 ret = devm_regulator_register_notifier(da8xx_ohci->vbus_reg,
238228 &da8xx_ohci->nb);
@@ -244,15 +234,6 @@ static int ohci_da8xx_register_notify(struct usb_hcd *hcd) · 5 unmodified lines
244234 return ret;
245235 }
246236
247−static void ohci_da8xx_unregister_notify(struct usb_hcd *hcd)
248−{
249− struct device *dev = hcd->self.controller;
250− struct da8xx_ohci_root_hub *hub = dev_get_platdata(dev);
251−
252− if (hub && hub->ocic_notify)
253− hub->ocic_notify(NULL);
254−}
255−
256237 static int ohci_da8xx_reset(struct usb_hcd *hcd)
257238 {
258239 struct device *dev = hcd->self.controller;
@@ -402,34 +383,35 @@ MODULE_DEVICE_TABLE(of, da8xx_ohci_ids); · 143 unmodified lines
402383 static int ohci_da8xx_probe(struct platform_device *pdev)
403384 {
404385 struct da8xx_ohci_hcd *da8xx_ohci;
386+ struct device *dev = &pdev->dev;
387+ int error, hcd_irq, oc_irq;
405388 struct usb_hcd *hcd;
406389 struct resource *mem;
407− int error, irq;
408− hcd = usb_create_hcd(&ohci_da8xx_hc_driver, &pdev->dev,
409− dev_name(&pdev->dev));
390+
391+ hcd = usb_create_hcd(&ohci_da8xx_hc_driver, dev, dev_name(dev));
410392 if (!hcd)
411393 return -ENOMEM;
412394
413395 da8xx_ohci = to_da8xx_ohci(hcd);
414396 da8xx_ohci->hcd = hcd;
415397
416− da8xx_ohci->usb11_clk = devm_clk_get(&pdev->dev, NULL);
398+ da8xx_ohci->usb11_clk = devm_clk_get(dev, NULL);
417399 if (IS_ERR(da8xx_ohci->usb11_clk)) {
418400 error = PTR_ERR(da8xx_ohci->usb11_clk);
419401 if (error != -EPROBE_DEFER)
420− dev_err(&pdev->dev, "Failed to get clock.\n");
402+ dev_err(dev, "Failed to get clock.\n");
421403 goto err;
422404 }
423405
424− da8xx_ohci->usb11_phy = devm_phy_get(&pdev->dev, "usb-phy");
406+ da8xx_ohci->usb11_phy = devm_phy_get(dev, "usb-phy");
425407 if (IS_ERR(da8xx_ohci->usb11_phy)) {
426408 error = PTR_ERR(da8xx_ohci->usb11_phy);
427409 if (error != -EPROBE_DEFER)
428− dev_err(&pdev->dev, "Failed to get phy.\n");
410+ dev_err(dev, "Failed to get phy.\n");
429411 goto err;
430412 }
431413
432− da8xx_ohci->vbus_reg = devm_regulator_get_optional(&pdev->dev, "vbus");
414+ da8xx_ohci->vbus_reg = devm_regulator_get_optional(dev, "vbus");
433415 if (IS_ERR(da8xx_ohci->vbus_reg)) {
434416 error = PTR_ERR(da8xx_ohci->vbus_reg);
435417 if (error == -ENODEV) {
@@ -437,13 +419,34 @@ static int ohci_da8xx_probe(struct platform_device *pdev) · 1 unmodified line
437419 } else if (error == -EPROBE_DEFER) {
438420 goto err;
439421 } else {
440− dev_err(&pdev->dev, "Failed to get regulator\n");
422+ dev_err(dev, "Failed to get regulator\n");
441423 goto err;
442424 }
443425 }
444426
427+ da8xx_ohci->vbus_gpio = devm_gpiod_get_optional(dev, "vbus",
428+ GPIOD_OUT_HIGH);
429+ if (IS_ERR(da8xx_ohci->vbus_gpio))
430+ goto err;
431+
432+ da8xx_ohci->oc_gpio = devm_gpiod_get_optional(dev, "oc", GPIOD_IN);
433+ if (IS_ERR(da8xx_ohci->oc_gpio))
434+ goto err;
435+
436+ if (da8xx_ohci->oc_gpio) {
437+ oc_irq = gpiod_to_irq(da8xx_ohci->oc_gpio);
438+ if (oc_irq < 0)
439+ goto err;
440+
441+ error = devm_request_irq(dev, oc_irq, ohci_da8xx_oc_handler,
442+ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
443+ "OHCI over-current indicator", da8xx_ohci);
444+ if (error)
445+ goto err;
446+ }
447+
445448 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
446− hcd->regs = devm_ioremap_resource(&pdev->dev, mem);
449+ hcd->regs = devm_ioremap_resource(dev, mem);
447450 if (IS_ERR(hcd->regs)) {
448451 error = PTR_ERR(hcd->regs);
449452 goto err;
@@ -451,13 +454,13 @@ static int ohci_da8xx_probe(struct platform_device *pdev) · 1 unmodified line
451454 hcd->rsrc_start = mem->start;
452455 hcd->rsrc_len = resource_size(mem);
453456
454− irq = platform_get_irq(pdev, 0);
455− if (irq < 0) {
457+ hcd_irq = platform_get_irq(pdev, 0);
458+ if (hcd_irq < 0) {
456459 error = -ENODEV;
457460 goto err;
458461 }
459462
460− error = usb_add_hcd(hcd, irq, 0);
463+ error = usb_add_hcd(hcd, hcd_irq, 0);
461464 if (error)
462465 goto err;
463466
@@ -480,7 +483,6 @@ static int ohci_da8xx_remove(struct platform_device *pdev) · 16 unmodified lines
480483 {
481484 struct usb_hcd *hcd = platform_get_drvdata(pdev);
482485
483− ohci_da8xx_unregister_notify(hcd);
484486 usb_remove_hcd(hcd);
485487 usb_put_hcd(hcd);
486488
include/dt-bindings/power/mt8173-power.h+3−3
@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
2−#ifndef _DT_BINDINGS_POWER_MT8183_POWER_H
3−#define _DT_BINDINGS_POWER_MT8183_POWER_H
2+#ifndef _DT_BINDINGS_POWER_MT8173_POWER_H
3+#define _DT_BINDINGS_POWER_MT8173_POWER_H
44
55 #define MT8173_POWER_DOMAIN_VDEC 0
66 #define MT8173_POWER_DOMAIN_VENC 1
@@ -13,4 +13,4 @@ · 6 unmodified lines
1313 #define MT8173_POWER_DOMAIN_MFG_2D 8
1414 #define MT8173_POWER_DOMAIN_MFG 9
1515
16−#endif /* _DT_BINDINGS_POWER_MT8183_POWER_H */
16+#endif /* _DT_BINDINGS_POWER_MT8173_POWER_H */
include/linux/davinci_emac.h+0−1
@@ -46,5 +46,4 @@ enum { · 45 unmodified lines
4646 EMAC_VERSION_2, /* DM646x */
4747 };
4848
49−void davinci_get_mac_addr(struct nvmem_device *nvmem, void *context);
5049 #endif
include/linux/platform_data/usb-davinci.h+0−14
@@ -11,22 +11,8 @@ · 10 unmodified lines
1111 #ifndef __ASM_ARCH_USB_H
1212 #define __ASM_ARCH_USB_H
1313
14−struct da8xx_ohci_root_hub;
15−
16−typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,
17− unsigned port);
18−
1914 /* Passed as the platform data to the OHCI driver */
2015 struct da8xx_ohci_root_hub {
21− /* Switch the port power on/off */
22− int (*set_power)(unsigned port, int on);
23− /* Read the port power status */
24− int (*get_power)(unsigned port);
25− /* Read the port over-current indicator */
26− int (*get_oci)(unsigned port);
27− /* Over-current indicator change notification (pass NULL to disable) */
28− int (*ocic_notify)(da8xx_ocic_handler_t handler);
29−
3016 /* Time from power on to power good (in 2 ms units) */
3117 u8 potpgt;
3218 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t