diff options
author | Kevin Hilman <khilman@linaro.org> | 2013-08-23 14:38:51 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-08-23 14:38:51 -0400 |
commit | 579673ee1ad62604910c6b8f431aa2a0951589b6 (patch) | |
tree | 28af06d0be0d65e8d9306ea836115d43bb1ce07b | |
parent | 8bd6f53af54b7dbf13625479ae673e73f61ff46a (diff) | |
parent | dc76a1adfa12ad11957bdeec565dbccf37205d04 (diff) |
Merge tag 'imx-soc-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/soc
From Shawn Guo:
It contains a bunch of imx soc updates for 3.12.
- Add more ethernet phy fixups for imx6 boards
- Add some missing imx6q clocks into clock driver
- Add new clock types fixup mux and div to work around some ugly
hardware defect
- Consolidate L2 cache initialization function, so that it can be used
on more i.MX SoCs
- Replace magic numbers in mach-imx6q.c with well defined macros
- Small fixes for imx6q and pllv3 clock drivers
- Some random updates on imx defconfig files
* tag 'imx-soc-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6: (33 commits)
phy: micrel: Add definitions for common Micrel PHY registers
ARM: imx: Re-select CONFIG_SND_SOC_IMX_MC13783 option
ARM: imx: Move anatop related from board file to anatop driver
ARM: imx_v6_v7_defconfig: Enable wireless support
ARM: imx_v4_v5_defconfig: Cleanup imx_v4_v5_defconfig
ARM: imx_v6_v7_defconfig: Add SATA support
ARM: imx_v6_v7_defconfig: Cleanup imx_v6_v7_defconfig
ARM: mx53: Allow suspend/resume
ARM: mach-imx: Select ARM_CPU_SUSPEND at ARCH_MXC level
ARM: imx_v6_v7_defconfig: Select CONFIG_TOUCHSCREEN_EGALAX
ARM: imx6q: add vdoa gate clock
ARM: imx6q: add the missing cko output selection
ARM: imx6q: add cko2 clocks
ARM: imx6q: add spdif gate clock
ARM: imx: clk-pllv3: improve the timeout waiting method
ARM: imx6: change some clocks to fixup clocks
ARM: imx: add common clock support for fixup mux
ARM: imx: add common clock support for fixup div
ARM: imx: Select MIGHT_HAVE_CACHE_L2X0
ARM: imx: fix imx_init_l2cache storage class
...
-rw-r--r-- | Documentation/devicetree/bindings/clock/imx6q-clock.txt | 6 | ||||
-rw-r--r-- | arch/arm/configs/imx_v4_v5_defconfig | 19 | ||||
-rw-r--r-- | arch/arm/configs/imx_v6_v7_defconfig | 51 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-dt-sama5.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/anatop.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-fixup-div.c | 129 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-fixup-mux.c | 107 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 46 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx6sl.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-pllv3.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-imx/common.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 120 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6sl.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx5.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/pm-imx5.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-imx/system.c | 33 | ||||
-rw-r--r-- | include/linux/micrel_phy.h | 6 |
21 files changed, 499 insertions, 143 deletions
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt index a0e104f0527e..5a90a724b520 100644 --- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
@@ -209,6 +209,12 @@ clocks and IDs. | |||
209 | pll5_post_div 194 | 209 | pll5_post_div 194 |
210 | pll5_video_div 195 | 210 | pll5_video_div 195 |
211 | eim_slow 196 | 211 | eim_slow 196 |
212 | spdif 197 | ||
213 | cko2_sel 198 | ||
214 | cko2_podf 199 | ||
215 | cko2 200 | ||
216 | cko 201 | ||
217 | vdoa 202 | ||
212 | 218 | ||
213 | Examples: | 219 | Examples: |
214 | 220 | ||
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig index f07a847b00c9..e958ebe79779 100644 --- a/arch/arm/configs/imx_v4_v5_defconfig +++ b/arch/arm/configs/imx_v4_v5_defconfig | |||
@@ -1,4 +1,3 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_SWAP is not set | 1 | # CONFIG_SWAP is not set |
3 | CONFIG_SYSVIPC=y | 2 | CONFIG_SYSVIPC=y |
4 | CONFIG_POSIX_MQUEUE=y | 3 | CONFIG_POSIX_MQUEUE=y |
@@ -17,16 +16,18 @@ CONFIG_MODULE_UNLOAD=y | |||
17 | # CONFIG_BLK_DEV_BSG is not set | 16 | # CONFIG_BLK_DEV_BSG is not set |
18 | # CONFIG_IOSCHED_DEADLINE is not set | 17 | # CONFIG_IOSCHED_DEADLINE is not set |
19 | # CONFIG_IOSCHED_CFQ is not set | 18 | # CONFIG_IOSCHED_CFQ is not set |
20 | CONFIG_ARCH_MXC=y | ||
21 | CONFIG_ARCH_MULTI_V4T=y | 19 | CONFIG_ARCH_MULTI_V4T=y |
22 | CONFIG_ARCH_MULTI_V5=y | 20 | CONFIG_ARCH_MULTI_V5=y |
23 | # CONFIG_ARCH_MULTI_V7 is not set | 21 | # CONFIG_ARCH_MULTI_V7 is not set |
22 | CONFIG_ARCH_MXC=y | ||
23 | CONFIG_MXC_IRQ_PRIOR=y | ||
24 | CONFIG_ARCH_MX1ADS=y | 24 | CONFIG_ARCH_MX1ADS=y |
25 | CONFIG_MACH_SCB9328=y | 25 | CONFIG_MACH_SCB9328=y |
26 | CONFIG_MACH_APF9328=y | 26 | CONFIG_MACH_APF9328=y |
27 | CONFIG_MACH_MX21ADS=y | 27 | CONFIG_MACH_MX21ADS=y |
28 | CONFIG_MACH_MX25_3DS=y | 28 | CONFIG_MACH_MX25_3DS=y |
29 | CONFIG_MACH_EUKREA_CPUIMX25SD=y | 29 | CONFIG_MACH_EUKREA_CPUIMX25SD=y |
30 | CONFIG_MACH_IMX25_DT=y | ||
30 | CONFIG_MACH_MX27ADS=y | 31 | CONFIG_MACH_MX27ADS=y |
31 | CONFIG_MACH_PCM038=y | 32 | CONFIG_MACH_PCM038=y |
32 | CONFIG_MACH_CPUIMX27=y | 33 | CONFIG_MACH_CPUIMX27=y |
@@ -39,8 +40,6 @@ CONFIG_MACH_PCA100=y | |||
39 | CONFIG_MACH_MXT_TD60=y | 40 | CONFIG_MACH_MXT_TD60=y |
40 | CONFIG_MACH_IMX27IPCAM=y | 41 | CONFIG_MACH_IMX27IPCAM=y |
41 | CONFIG_MACH_IMX27_DT=y | 42 | CONFIG_MACH_IMX27_DT=y |
42 | CONFIG_MXC_IRQ_PRIOR=y | ||
43 | CONFIG_MXC_PWM=y | ||
44 | CONFIG_PREEMPT=y | 43 | CONFIG_PREEMPT=y |
45 | CONFIG_AEABI=y | 44 | CONFIG_AEABI=y |
46 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 45 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
@@ -67,7 +66,6 @@ CONFIG_DEVTMPFS=y | |||
67 | CONFIG_DEVTMPFS_MOUNT=y | 66 | CONFIG_DEVTMPFS_MOUNT=y |
68 | CONFIG_MTD=y | 67 | CONFIG_MTD=y |
69 | CONFIG_MTD_CMDLINE_PARTS=y | 68 | CONFIG_MTD_CMDLINE_PARTS=y |
70 | CONFIG_MTD_CHAR=y | ||
71 | CONFIG_MTD_BLOCK=y | 69 | CONFIG_MTD_BLOCK=y |
72 | CONFIG_MTD_CFI=y | 70 | CONFIG_MTD_CFI=y |
73 | CONFIG_MTD_CFI_ADV_OPTIONS=y | 71 | CONFIG_MTD_CFI_ADV_OPTIONS=y |
@@ -123,24 +121,20 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y | |||
123 | CONFIG_REGULATOR_MC13783=y | 121 | CONFIG_REGULATOR_MC13783=y |
124 | CONFIG_REGULATOR_MC13892=y | 122 | CONFIG_REGULATOR_MC13892=y |
125 | CONFIG_MEDIA_SUPPORT=y | 123 | CONFIG_MEDIA_SUPPORT=y |
126 | CONFIG_VIDEO_DEV=y | ||
127 | CONFIG_V4L_PLATFORM_DRIVERS=y | ||
128 | CONFIG_MEDIA_CAMERA_SUPPORT=y | 124 | CONFIG_MEDIA_CAMERA_SUPPORT=y |
125 | CONFIG_V4L_PLATFORM_DRIVERS=y | ||
129 | CONFIG_SOC_CAMERA=y | 126 | CONFIG_SOC_CAMERA=y |
130 | CONFIG_SOC_CAMERA_OV2640=y | ||
131 | CONFIG_VIDEO_MX2=y | 127 | CONFIG_VIDEO_MX2=y |
132 | CONFIG_V4L_MEM2MEM_DRIVERS=y | 128 | CONFIG_V4L_MEM2MEM_DRIVERS=y |
133 | CONFIG_VIDEO_CODA=y | 129 | CONFIG_VIDEO_CODA=y |
130 | CONFIG_SOC_CAMERA_OV2640=y | ||
134 | CONFIG_FB=y | 131 | CONFIG_FB=y |
135 | CONFIG_FB_IMX=y | 132 | CONFIG_FB_IMX=y |
136 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 133 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
137 | CONFIG_LCD_CLASS_DEVICE=y | 134 | CONFIG_LCD_CLASS_DEVICE=y |
138 | CONFIG_LCD_L4F00242T03=y | 135 | CONFIG_LCD_L4F00242T03=y |
139 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | 136 | CONFIG_BACKLIGHT_CLASS_DEVICE=y |
140 | CONFIG_BACKLIGHT_PWM=y | ||
141 | CONFIG_FRAMEBUFFER_CONSOLE=y | 137 | CONFIG_FRAMEBUFFER_CONSOLE=y |
142 | CONFIG_FONTS=y | ||
143 | CONFIG_FONT_8x8=y | ||
144 | CONFIG_LOGO=y | 138 | CONFIG_LOGO=y |
145 | CONFIG_SOUND=y | 139 | CONFIG_SOUND=y |
146 | CONFIG_SND=y | 140 | CONFIG_SND=y |
@@ -157,7 +151,6 @@ CONFIG_USB_HID=m | |||
157 | CONFIG_USB=y | 151 | CONFIG_USB=y |
158 | CONFIG_USB_EHCI_HCD=y | 152 | CONFIG_USB_EHCI_HCD=y |
159 | CONFIG_USB_EHCI_MXC=y | 153 | CONFIG_USB_EHCI_MXC=y |
160 | CONFIG_USB_ULPI=y | ||
161 | CONFIG_MMC=y | 154 | CONFIG_MMC=y |
162 | CONFIG_MMC_SDHCI=y | 155 | CONFIG_MMC_SDHCI=y |
163 | CONFIG_MMC_SDHCI_PLTFM=y | 156 | CONFIG_MMC_SDHCI_PLTFM=y |
@@ -198,3 +191,5 @@ CONFIG_NLS_CODEPAGE_850=m | |||
198 | CONFIG_NLS_ISO8859_1=y | 191 | CONFIG_NLS_ISO8859_1=y |
199 | CONFIG_NLS_ISO8859_15=m | 192 | CONFIG_NLS_ISO8859_15=m |
200 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | 193 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
194 | CONFIG_FONTS=y | ||
195 | CONFIG_FONT_8x8=y | ||
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 06686e7303a9..5d488c24b132 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig | |||
@@ -1,4 +1,3 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | 1 | # CONFIG_LOCALVERSION_AUTO is not set |
3 | CONFIG_KERNEL_LZO=y | 2 | CONFIG_KERNEL_LZO=y |
4 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
@@ -17,10 +16,8 @@ CONFIG_MODULE_UNLOAD=y | |||
17 | CONFIG_MODVERSIONS=y | 16 | CONFIG_MODVERSIONS=y |
18 | CONFIG_MODULE_SRCVERSION_ALL=y | 17 | CONFIG_MODULE_SRCVERSION_ALL=y |
19 | # CONFIG_BLK_DEV_BSG is not set | 18 | # CONFIG_BLK_DEV_BSG is not set |
20 | CONFIG_ARCH_MXC=y | ||
21 | CONFIG_ARCH_MULTI_V6=y | 19 | CONFIG_ARCH_MULTI_V6=y |
22 | CONFIG_ARCH_MULTI_V7=y | 20 | CONFIG_ARCH_MXC=y |
23 | CONFIG_MACH_IMX31_DT=y | ||
24 | CONFIG_MACH_MX31LILLY=y | 21 | CONFIG_MACH_MX31LILLY=y |
25 | CONFIG_MACH_MX31LITE=y | 22 | CONFIG_MACH_MX31LITE=y |
26 | CONFIG_MACH_PCM037=y | 23 | CONFIG_MACH_PCM037=y |
@@ -30,6 +27,7 @@ CONFIG_MACH_MX31MOBOARD=y | |||
30 | CONFIG_MACH_QONG=y | 27 | CONFIG_MACH_QONG=y |
31 | CONFIG_MACH_ARMADILLO5X0=y | 28 | CONFIG_MACH_ARMADILLO5X0=y |
32 | CONFIG_MACH_KZM_ARM11_01=y | 29 | CONFIG_MACH_KZM_ARM11_01=y |
30 | CONFIG_MACH_IMX31_DT=y | ||
33 | CONFIG_MACH_PCM043=y | 31 | CONFIG_MACH_PCM043=y |
34 | CONFIG_MACH_MX35_3DS=y | 32 | CONFIG_MACH_MX35_3DS=y |
35 | CONFIG_MACH_VPR200=y | 33 | CONFIG_MACH_VPR200=y |
@@ -39,7 +37,6 @@ CONFIG_SOC_IMX53=y | |||
39 | CONFIG_SOC_IMX6Q=y | 37 | CONFIG_SOC_IMX6Q=y |
40 | CONFIG_SOC_IMX6SL=y | 38 | CONFIG_SOC_IMX6SL=y |
41 | CONFIG_SOC_VF610=y | 39 | CONFIG_SOC_VF610=y |
42 | CONFIG_MXC_PWM=y | ||
43 | CONFIG_SMP=y | 40 | CONFIG_SMP=y |
44 | CONFIG_VMSPLIT_2G=y | 41 | CONFIG_VMSPLIT_2G=y |
45 | CONFIG_PREEMPT_VOLUNTARY=y | 42 | CONFIG_PREEMPT_VOLUNTARY=y |
@@ -64,20 +61,24 @@ CONFIG_IP_PNP_DHCP=y | |||
64 | # CONFIG_INET_LRO is not set | 61 | # CONFIG_INET_LRO is not set |
65 | CONFIG_IPV6=y | 62 | CONFIG_IPV6=y |
66 | CONFIG_NETFILTER=y | 63 | CONFIG_NETFILTER=y |
67 | # CONFIG_WIRELESS is not set | 64 | CONFIG_CFG80211=y |
65 | CONFIG_MAC80211=y | ||
66 | CONFIG_RFKILL=y | ||
67 | CONFIG_RFKILL_INPUT=y | ||
68 | CONFIG_DEVTMPFS=y | 68 | CONFIG_DEVTMPFS=y |
69 | CONFIG_DEVTMPFS_MOUNT=y | 69 | CONFIG_DEVTMPFS_MOUNT=y |
70 | # CONFIG_STANDALONE is not set | 70 | # CONFIG_STANDALONE is not set |
71 | CONFIG_IMX_WEIM=y | ||
71 | CONFIG_CONNECTOR=y | 72 | CONFIG_CONNECTOR=y |
72 | CONFIG_MTD=y | 73 | CONFIG_MTD=y |
73 | CONFIG_MTD_CMDLINE_PARTS=y | 74 | CONFIG_MTD_CMDLINE_PARTS=y |
74 | CONFIG_MTD_CHAR=y | ||
75 | CONFIG_MTD_BLOCK=y | 75 | CONFIG_MTD_BLOCK=y |
76 | CONFIG_MTD_CFI=y | 76 | CONFIG_MTD_CFI=y |
77 | CONFIG_MTD_JEDECPROBE=y | 77 | CONFIG_MTD_JEDECPROBE=y |
78 | CONFIG_MTD_CFI_INTELEXT=y | 78 | CONFIG_MTD_CFI_INTELEXT=y |
79 | CONFIG_MTD_CFI_AMDSTD=y | 79 | CONFIG_MTD_CFI_AMDSTD=y |
80 | CONFIG_MTD_CFI_STAA=y | 80 | CONFIG_MTD_CFI_STAA=y |
81 | CONFIG_MTD_PHYSMAP_OF=y | ||
81 | CONFIG_MTD_DATAFLASH=y | 82 | CONFIG_MTD_DATAFLASH=y |
82 | CONFIG_MTD_M25P80=y | 83 | CONFIG_MTD_M25P80=y |
83 | CONFIG_MTD_SST25L=y | 84 | CONFIG_MTD_SST25L=y |
@@ -88,6 +89,7 @@ CONFIG_MTD_UBI=y | |||
88 | CONFIG_BLK_DEV_LOOP=y | 89 | CONFIG_BLK_DEV_LOOP=y |
89 | CONFIG_BLK_DEV_RAM=y | 90 | CONFIG_BLK_DEV_RAM=y |
90 | CONFIG_BLK_DEV_RAM_SIZE=65536 | 91 | CONFIG_BLK_DEV_RAM_SIZE=65536 |
92 | CONFIG_SRAM=y | ||
91 | CONFIG_EEPROM_AT24=y | 93 | CONFIG_EEPROM_AT24=y |
92 | CONFIG_EEPROM_AT25=y | 94 | CONFIG_EEPROM_AT25=y |
93 | # CONFIG_SCSI_PROC_FS is not set | 95 | # CONFIG_SCSI_PROC_FS is not set |
@@ -98,10 +100,11 @@ CONFIG_SCSI_LOGGING=y | |||
98 | CONFIG_SCSI_SCAN_ASYNC=y | 100 | CONFIG_SCSI_SCAN_ASYNC=y |
99 | # CONFIG_SCSI_LOWLEVEL is not set | 101 | # CONFIG_SCSI_LOWLEVEL is not set |
100 | CONFIG_ATA=y | 102 | CONFIG_ATA=y |
103 | CONFIG_SATA_AHCI_PLATFORM=y | ||
104 | CONFIG_AHCI_IMX=y | ||
101 | CONFIG_PATA_IMX=y | 105 | CONFIG_PATA_IMX=y |
102 | CONFIG_NETDEVICES=y | 106 | CONFIG_NETDEVICES=y |
103 | # CONFIG_NET_VENDOR_BROADCOM is not set | 107 | # CONFIG_NET_VENDOR_BROADCOM is not set |
104 | # CONFIG_NET_VENDOR_CHELSIO is not set | ||
105 | CONFIG_CS89x0=y | 108 | CONFIG_CS89x0=y |
106 | CONFIG_CS89x0_PLATFORM=y | 109 | CONFIG_CS89x0_PLATFORM=y |
107 | # CONFIG_NET_VENDOR_FARADAY is not set | 110 | # CONFIG_NET_VENDOR_FARADAY is not set |
@@ -115,7 +118,7 @@ CONFIG_SMC91X=y | |||
115 | CONFIG_SMC911X=y | 118 | CONFIG_SMC911X=y |
116 | CONFIG_SMSC911X=y | 119 | CONFIG_SMSC911X=y |
117 | # CONFIG_NET_VENDOR_STMICRO is not set | 120 | # CONFIG_NET_VENDOR_STMICRO is not set |
118 | # CONFIG_WLAN is not set | 121 | CONFIG_BRCMFMAC=m |
119 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | 122 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set |
120 | CONFIG_INPUT_EVDEV=y | 123 | CONFIG_INPUT_EVDEV=y |
121 | CONFIG_INPUT_EVBUG=m | 124 | CONFIG_INPUT_EVBUG=m |
@@ -124,6 +127,7 @@ CONFIG_KEYBOARD_IMX=y | |||
124 | CONFIG_MOUSE_PS2=m | 127 | CONFIG_MOUSE_PS2=m |
125 | CONFIG_MOUSE_PS2_ELANTECH=y | 128 | CONFIG_MOUSE_PS2_ELANTECH=y |
126 | CONFIG_INPUT_TOUCHSCREEN=y | 129 | CONFIG_INPUT_TOUCHSCREEN=y |
130 | CONFIG_TOUCHSCREEN_EGALAX=y | ||
127 | CONFIG_TOUCHSCREEN_MC13783=y | 131 | CONFIG_TOUCHSCREEN_MC13783=y |
128 | CONFIG_INPUT_MISC=y | 132 | CONFIG_INPUT_MISC=y |
129 | CONFIG_INPUT_MMA8450=y | 133 | CONFIG_INPUT_MMA8450=y |
@@ -133,13 +137,13 @@ CONFIG_VT_HW_CONSOLE_BINDING=y | |||
133 | # CONFIG_DEVKMEM is not set | 137 | # CONFIG_DEVKMEM is not set |
134 | CONFIG_SERIAL_IMX=y | 138 | CONFIG_SERIAL_IMX=y |
135 | CONFIG_SERIAL_IMX_CONSOLE=y | 139 | CONFIG_SERIAL_IMX_CONSOLE=y |
140 | CONFIG_SERIAL_FSL_LPUART=y | ||
141 | CONFIG_SERIAL_FSL_LPUART_CONSOLE=y | ||
136 | CONFIG_HW_RANDOM=y | 142 | CONFIG_HW_RANDOM=y |
137 | CONFIG_HW_RANDOM_MXC_RNGA=y | 143 | CONFIG_HW_RANDOM_MXC_RNGA=y |
138 | CONFIG_I2C=y | ||
139 | # CONFIG_I2C_COMPAT is not set | 144 | # CONFIG_I2C_COMPAT is not set |
140 | CONFIG_I2C_CHARDEV=y | 145 | CONFIG_I2C_CHARDEV=y |
141 | # CONFIG_I2C_HELPER_AUTO is not set | 146 | # CONFIG_I2C_HELPER_AUTO is not set |
142 | CONFIG_I2C_ALGOBIT=m | ||
143 | CONFIG_I2C_ALGOPCF=m | 147 | CONFIG_I2C_ALGOPCF=m |
144 | CONFIG_I2C_ALGOPCA=m | 148 | CONFIG_I2C_ALGOPCA=m |
145 | CONFIG_I2C_IMX=y | 149 | CONFIG_I2C_IMX=y |
@@ -155,30 +159,26 @@ CONFIG_MFD_MC13XXX_SPI=y | |||
155 | CONFIG_MFD_MC13XXX_I2C=y | 159 | CONFIG_MFD_MC13XXX_I2C=y |
156 | CONFIG_REGULATOR=y | 160 | CONFIG_REGULATOR=y |
157 | CONFIG_REGULATOR_FIXED_VOLTAGE=y | 161 | CONFIG_REGULATOR_FIXED_VOLTAGE=y |
158 | CONFIG_REGULATOR_DA9052=y | ||
159 | CONFIG_REGULATOR_ANATOP=y | 162 | CONFIG_REGULATOR_ANATOP=y |
163 | CONFIG_REGULATOR_DA9052=y | ||
160 | CONFIG_REGULATOR_MC13783=y | 164 | CONFIG_REGULATOR_MC13783=y |
161 | CONFIG_REGULATOR_MC13892=y | 165 | CONFIG_REGULATOR_MC13892=y |
162 | CONFIG_MEDIA_SUPPORT=y | 166 | CONFIG_MEDIA_SUPPORT=y |
163 | CONFIG_VIDEO_DEV=y | ||
164 | CONFIG_V4L_PLATFORM_DRIVERS=y | ||
165 | CONFIG_MEDIA_CAMERA_SUPPORT=y | 167 | CONFIG_MEDIA_CAMERA_SUPPORT=y |
168 | CONFIG_V4L_PLATFORM_DRIVERS=y | ||
166 | CONFIG_SOC_CAMERA=y | 169 | CONFIG_SOC_CAMERA=y |
170 | CONFIG_VIDEO_MX3=y | ||
171 | CONFIG_V4L_MEM2MEM_DRIVERS=y | ||
172 | CONFIG_VIDEO_CODA=y | ||
167 | CONFIG_SOC_CAMERA_OV2640=y | 173 | CONFIG_SOC_CAMERA_OV2640=y |
168 | CONFIG_DRM=y | 174 | CONFIG_DRM=y |
169 | CONFIG_VIDEO_MX3=y | ||
170 | CONFIG_FB=y | ||
171 | CONFIG_LCD_PLATFORM=y | ||
172 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 175 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
173 | CONFIG_LCD_CLASS_DEVICE=y | 176 | CONFIG_LCD_CLASS_DEVICE=y |
174 | CONFIG_LCD_L4F00242T03=y | 177 | CONFIG_LCD_L4F00242T03=y |
178 | CONFIG_LCD_PLATFORM=y | ||
175 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | 179 | CONFIG_BACKLIGHT_CLASS_DEVICE=y |
176 | CONFIG_BACKLIGHT_PWM=y | 180 | CONFIG_BACKLIGHT_PWM=y |
177 | CONFIG_FRAMEBUFFER_CONSOLE=y | 181 | CONFIG_FRAMEBUFFER_CONSOLE=y |
178 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
179 | CONFIG_FONTS=y | ||
180 | CONFIG_FONT_8x8=y | ||
181 | CONFIG_FONT_8x16=y | ||
182 | CONFIG_LOGO=y | 182 | CONFIG_LOGO=y |
183 | CONFIG_SOUND=y | 183 | CONFIG_SOUND=y |
184 | CONFIG_SND=y | 184 | CONFIG_SND=y |
@@ -192,11 +192,12 @@ CONFIG_SND_SOC_IMX_MC13783=y | |||
192 | CONFIG_USB=y | 192 | CONFIG_USB=y |
193 | CONFIG_USB_EHCI_HCD=y | 193 | CONFIG_USB_EHCI_HCD=y |
194 | CONFIG_USB_EHCI_MXC=y | 194 | CONFIG_USB_EHCI_MXC=y |
195 | CONFIG_USB_STORAGE=y | ||
195 | CONFIG_USB_CHIPIDEA=y | 196 | CONFIG_USB_CHIPIDEA=y |
196 | CONFIG_USB_CHIPIDEA_HOST=y | 197 | CONFIG_USB_CHIPIDEA_HOST=y |
197 | CONFIG_USB_PHY=y | 198 | CONFIG_USB_PHY=y |
199 | CONFIG_NOP_USB_XCEIV=y | ||
198 | CONFIG_USB_MXS_PHY=y | 200 | CONFIG_USB_MXS_PHY=y |
199 | CONFIG_USB_STORAGE=y | ||
200 | CONFIG_MMC=y | 201 | CONFIG_MMC=y |
201 | CONFIG_MMC_SDHCI=y | 202 | CONFIG_MMC_SDHCI=y |
202 | CONFIG_MMC_SDHCI_PLTFM=y | 203 | CONFIG_MMC_SDHCI_PLTFM=y |
@@ -213,9 +214,10 @@ CONFIG_IMX_SDMA=y | |||
213 | CONFIG_MXS_DMA=y | 214 | CONFIG_MXS_DMA=y |
214 | CONFIG_STAGING=y | 215 | CONFIG_STAGING=y |
215 | CONFIG_DRM_IMX=y | 216 | CONFIG_DRM_IMX=y |
216 | CONFIG_DRM_IMX_TVE=y | ||
217 | CONFIG_DRM_IMX_FB_HELPER=y | 217 | CONFIG_DRM_IMX_FB_HELPER=y |
218 | CONFIG_DRM_IMX_PARALLEL_DISPLAY=y | 218 | CONFIG_DRM_IMX_PARALLEL_DISPLAY=y |
219 | CONFIG_DRM_IMX_TVE=y | ||
220 | CONFIG_DRM_IMX_LDB=y | ||
219 | CONFIG_DRM_IMX_IPUV3_CORE=y | 221 | CONFIG_DRM_IMX_IPUV3_CORE=y |
220 | CONFIG_DRM_IMX_IPUV3=y | 222 | CONFIG_DRM_IMX_IPUV3=y |
221 | CONFIG_COMMON_CLK_DEBUG=y | 223 | CONFIG_COMMON_CLK_DEBUG=y |
@@ -269,3 +271,6 @@ CONFIG_CRC_CCITT=m | |||
269 | CONFIG_CRC_T10DIF=y | 271 | CONFIG_CRC_T10DIF=y |
270 | CONFIG_CRC7=m | 272 | CONFIG_CRC7=m |
271 | CONFIG_LIBCRC32C=m | 273 | CONFIG_LIBCRC32C=m |
274 | CONFIG_FONTS=y | ||
275 | CONFIG_FONT_8x8=y | ||
276 | CONFIG_FONT_8x16=y | ||
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c index ad95f6a23a28..bf00d15d954d 100644 --- a/arch/arm/mach-at91/board-dt-sama5.c +++ b/arch/arm/mach-at91/board-dt-sama5.c | |||
@@ -42,20 +42,15 @@ static int ksz9021rn_phy_fixup(struct phy_device *phy) | |||
42 | { | 42 | { |
43 | int value; | 43 | int value; |
44 | 44 | ||
45 | #define GMII_RCCPSR 260 | ||
46 | #define GMII_RRDPSR 261 | ||
47 | #define GMII_ERCR 11 | ||
48 | #define GMII_ERDWR 12 | ||
49 | |||
50 | /* Set delay values */ | 45 | /* Set delay values */ |
51 | value = GMII_RCCPSR | 0x8000; | 46 | value = MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW | 0x8000; |
52 | phy_write(phy, GMII_ERCR, value); | 47 | phy_write(phy, MICREL_KSZ9021_EXTREG_CTRL, value); |
53 | value = 0xF2F4; | 48 | value = 0xF2F4; |
54 | phy_write(phy, GMII_ERDWR, value); | 49 | phy_write(phy, MICREL_KSZ9021_EXTREG_DATA_WRITE, value); |
55 | value = GMII_RRDPSR | 0x8000; | 50 | value = MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW | 0x8000; |
56 | phy_write(phy, GMII_ERCR, value); | 51 | phy_write(phy, MICREL_KSZ9021_EXTREG_CTRL, value); |
57 | value = 0x2222; | 52 | value = 0x2222; |
58 | phy_write(phy, GMII_ERDWR, value); | 53 | phy_write(phy, MICREL_KSZ9021_EXTREG_DATA_WRITE, value); |
59 | 54 | ||
60 | return 0; | 55 | return 0; |
61 | } | 56 | } |
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index f54656091a9d..546723b305b6 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config ARCH_MXC | 1 | config ARCH_MXC |
2 | bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 | 2 | bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 |
3 | select ARCH_REQUIRE_GPIOLIB | 3 | select ARCH_REQUIRE_GPIOLIB |
4 | select ARM_CPU_SUSPEND if PM | ||
4 | select ARM_PATCH_PHYS_VIRT | 5 | select ARM_PATCH_PHYS_VIRT |
5 | select AUTO_ZRELADDR if !ZBOOT_ROM | 6 | select AUTO_ZRELADDR if !ZBOOT_ROM |
6 | select CLKDEV_LOOKUP | 7 | select CLKDEV_LOOKUP |
@@ -8,6 +9,7 @@ config ARCH_MXC | |||
8 | select GENERIC_ALLOCATOR | 9 | select GENERIC_ALLOCATOR |
9 | select GENERIC_CLOCKEVENTS | 10 | select GENERIC_CLOCKEVENTS |
10 | select GENERIC_IRQ_CHIP | 11 | select GENERIC_IRQ_CHIP |
12 | select MIGHT_HAVE_CACHE_L2X0 if ARCH_MULTI_V6_V7 | ||
11 | select MULTI_IRQ_HANDLER | 13 | select MULTI_IRQ_HANDLER |
12 | select SPARSE_IRQ | 14 | select SPARSE_IRQ |
13 | select USE_OF | 15 | select USE_OF |
@@ -785,7 +787,6 @@ config SOC_IMX6Q | |||
785 | bool "i.MX6 Quad/DualLite support" | 787 | bool "i.MX6 Quad/DualLite support" |
786 | select ARCH_HAS_CPUFREQ | 788 | select ARCH_HAS_CPUFREQ |
787 | select ARCH_HAS_OPP | 789 | select ARCH_HAS_OPP |
788 | select ARM_CPU_SUSPEND if PM | ||
789 | select ARM_ERRATA_754322 | 790 | select ARM_ERRATA_754322 |
790 | select ARM_ERRATA_764369 if SMP | 791 | select ARM_ERRATA_764369 if SMP |
791 | select ARM_ERRATA_775420 | 792 | select ARM_ERRATA_775420 |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index e20f22d58fd8..5383c589ad71 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -15,7 +15,8 @@ imx5-pm-$(CONFIG_PM) += pm-imx5.o | |||
15 | obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(imx5-pm-y) | 15 | obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(imx5-pm-y) |
16 | 16 | ||
17 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ | 17 | obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \ |
18 | clk-pfd.o clk-busy.o clk.o | 18 | clk-pfd.o clk-busy.o clk.o \ |
19 | clk-fixup-div.o clk-fixup-mux.o | ||
19 | 20 | ||
20 | obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o | 21 | obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o |
21 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o | 22 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o |
diff --git a/arch/arm/mach-imx/anatop.c b/arch/arm/mach-imx/anatop.c index 0cfa07dd9aa4..ad3b755abb78 100644 --- a/arch/arm/mach-imx/anatop.c +++ b/arch/arm/mach-imx/anatop.c | |||
@@ -66,7 +66,7 @@ void imx_anatop_post_resume(void) | |||
66 | imx_anatop_enable_weak2p5(false); | 66 | imx_anatop_enable_weak2p5(false); |
67 | } | 67 | } |
68 | 68 | ||
69 | void imx_anatop_usb_chrg_detect_disable(void) | 69 | static void imx_anatop_usb_chrg_detect_disable(void) |
70 | { | 70 | { |
71 | regmap_write(anatop, ANADIG_USB1_CHRG_DETECT, | 71 | regmap_write(anatop, ANADIG_USB1_CHRG_DETECT, |
72 | BM_ANADIG_USB_CHRG_DETECT_EN_B | 72 | BM_ANADIG_USB_CHRG_DETECT_EN_B |
@@ -100,4 +100,6 @@ void __init imx_anatop_init(void) | |||
100 | pr_err("%s: failed to find imx6q-anatop regmap!\n", __func__); | 100 | pr_err("%s: failed to find imx6q-anatop regmap!\n", __func__); |
101 | return; | 101 | return; |
102 | } | 102 | } |
103 | |||
104 | imx_anatop_usb_chrg_detect_disable(); | ||
103 | } | 105 | } |
diff --git a/arch/arm/mach-imx/clk-fixup-div.c b/arch/arm/mach-imx/clk-fixup-div.c new file mode 100644 index 000000000000..21db020b1f2d --- /dev/null +++ b/arch/arm/mach-imx/clk-fixup-div.c | |||
@@ -0,0 +1,129 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/clk-provider.h> | ||
13 | #include <linux/err.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/slab.h> | ||
16 | #include "clk.h" | ||
17 | |||
18 | #define to_clk_div(_hw) container_of(_hw, struct clk_divider, hw) | ||
19 | #define div_mask(d) ((1 << (d->width)) - 1) | ||
20 | |||
21 | /** | ||
22 | * struct clk_fixup_div - imx integer fixup divider clock | ||
23 | * @divider: the parent class | ||
24 | * @ops: pointer to clk_ops of parent class | ||
25 | * @fixup: a hook to fixup the write value | ||
26 | * | ||
27 | * The imx fixup divider clock is a subclass of basic clk_divider | ||
28 | * with an addtional fixup hook. | ||
29 | */ | ||
30 | struct clk_fixup_div { | ||
31 | struct clk_divider divider; | ||
32 | const struct clk_ops *ops; | ||
33 | void (*fixup)(u32 *val); | ||
34 | }; | ||
35 | |||
36 | static inline struct clk_fixup_div *to_clk_fixup_div(struct clk_hw *hw) | ||
37 | { | ||
38 | struct clk_divider *divider = to_clk_div(hw); | ||
39 | |||
40 | return container_of(divider, struct clk_fixup_div, divider); | ||
41 | } | ||
42 | |||
43 | static unsigned long clk_fixup_div_recalc_rate(struct clk_hw *hw, | ||
44 | unsigned long parent_rate) | ||
45 | { | ||
46 | struct clk_fixup_div *fixup_div = to_clk_fixup_div(hw); | ||
47 | |||
48 | return fixup_div->ops->recalc_rate(&fixup_div->divider.hw, parent_rate); | ||
49 | } | ||
50 | |||
51 | static long clk_fixup_div_round_rate(struct clk_hw *hw, unsigned long rate, | ||
52 | unsigned long *prate) | ||
53 | { | ||
54 | struct clk_fixup_div *fixup_div = to_clk_fixup_div(hw); | ||
55 | |||
56 | return fixup_div->ops->round_rate(&fixup_div->divider.hw, rate, prate); | ||
57 | } | ||
58 | |||
59 | static int clk_fixup_div_set_rate(struct clk_hw *hw, unsigned long rate, | ||
60 | unsigned long parent_rate) | ||
61 | { | ||
62 | struct clk_fixup_div *fixup_div = to_clk_fixup_div(hw); | ||
63 | struct clk_divider *div = to_clk_div(hw); | ||
64 | unsigned int divider, value; | ||
65 | unsigned long flags = 0; | ||
66 | u32 val; | ||
67 | |||
68 | divider = parent_rate / rate; | ||
69 | |||
70 | /* Zero based divider */ | ||
71 | value = divider - 1; | ||
72 | |||
73 | if (value > div_mask(div)) | ||
74 | value = div_mask(div); | ||
75 | |||
76 | spin_lock_irqsave(div->lock, flags); | ||
77 | |||
78 | val = readl(div->reg); | ||
79 | val &= ~(div_mask(div) << div->shift); | ||
80 | val |= value << div->shift; | ||
81 | fixup_div->fixup(&val); | ||
82 | writel(val, div->reg); | ||
83 | |||
84 | spin_unlock_irqrestore(div->lock, flags); | ||
85 | |||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | static const struct clk_ops clk_fixup_div_ops = { | ||
90 | .recalc_rate = clk_fixup_div_recalc_rate, | ||
91 | .round_rate = clk_fixup_div_round_rate, | ||
92 | .set_rate = clk_fixup_div_set_rate, | ||
93 | }; | ||
94 | |||
95 | struct clk *imx_clk_fixup_divider(const char *name, const char *parent, | ||
96 | void __iomem *reg, u8 shift, u8 width, | ||
97 | void (*fixup)(u32 *val)) | ||
98 | { | ||
99 | struct clk_fixup_div *fixup_div; | ||
100 | struct clk *clk; | ||
101 | struct clk_init_data init; | ||
102 | |||
103 | if (!fixup) | ||
104 | return ERR_PTR(-EINVAL); | ||
105 | |||
106 | fixup_div = kzalloc(sizeof(*fixup_div), GFP_KERNEL); | ||
107 | if (!fixup_div) | ||
108 | return ERR_PTR(-ENOMEM); | ||
109 | |||
110 | init.name = name; | ||
111 | init.ops = &clk_fixup_div_ops; | ||
112 | init.flags = CLK_SET_RATE_PARENT; | ||
113 | init.parent_names = parent ? &parent : NULL; | ||
114 | init.num_parents = parent ? 1 : 0; | ||
115 | |||
116 | fixup_div->divider.reg = reg; | ||
117 | fixup_div->divider.shift = shift; | ||
118 | fixup_div->divider.width = width; | ||
119 | fixup_div->divider.lock = &imx_ccm_lock; | ||
120 | fixup_div->divider.hw.init = &init; | ||
121 | fixup_div->ops = &clk_divider_ops; | ||
122 | fixup_div->fixup = fixup; | ||
123 | |||
124 | clk = clk_register(NULL, &fixup_div->divider.hw); | ||
125 | if (IS_ERR(clk)) | ||
126 | kfree(fixup_div); | ||
127 | |||
128 | return clk; | ||
129 | } | ||
diff --git a/arch/arm/mach-imx/clk-fixup-mux.c b/arch/arm/mach-imx/clk-fixup-mux.c new file mode 100644 index 000000000000..deb4b8093b30 --- /dev/null +++ b/arch/arm/mach-imx/clk-fixup-mux.c | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | */ | ||
11 | |||
12 | #include <linux/clk-provider.h> | ||
13 | #include <linux/err.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <linux/slab.h> | ||
16 | #include "clk.h" | ||
17 | |||
18 | #define to_clk_mux(_hw) container_of(_hw, struct clk_mux, hw) | ||
19 | |||
20 | /** | ||
21 | * struct clk_fixup_mux - imx integer fixup multiplexer clock | ||
22 | * @mux: the parent class | ||
23 | * @ops: pointer to clk_ops of parent class | ||
24 | * @fixup: a hook to fixup the write value | ||
25 | * | ||
26 | * The imx fixup multiplexer clock is a subclass of basic clk_mux | ||
27 | * with an addtional fixup hook. | ||
28 | */ | ||
29 | struct clk_fixup_mux { | ||
30 | struct clk_mux mux; | ||
31 | const struct clk_ops *ops; | ||
32 | void (*fixup)(u32 *val); | ||
33 | }; | ||
34 | |||
35 | static inline struct clk_fixup_mux *to_clk_fixup_mux(struct clk_hw *hw) | ||
36 | { | ||
37 | struct clk_mux *mux = to_clk_mux(hw); | ||
38 | |||
39 | return container_of(mux, struct clk_fixup_mux, mux); | ||
40 | } | ||
41 | |||
42 | static u8 clk_fixup_mux_get_parent(struct clk_hw *hw) | ||
43 | { | ||
44 | struct clk_fixup_mux *fixup_mux = to_clk_fixup_mux(hw); | ||
45 | |||
46 | return fixup_mux->ops->get_parent(&fixup_mux->mux.hw); | ||
47 | } | ||
48 | |||
49 | static int clk_fixup_mux_set_parent(struct clk_hw *hw, u8 index) | ||
50 | { | ||
51 | struct clk_fixup_mux *fixup_mux = to_clk_fixup_mux(hw); | ||
52 | struct clk_mux *mux = to_clk_mux(hw); | ||
53 | unsigned long flags = 0; | ||
54 | u32 val; | ||
55 | |||
56 | spin_lock_irqsave(mux->lock, flags); | ||
57 | |||
58 | val = readl(mux->reg); | ||
59 | val &= ~(mux->mask << mux->shift); | ||
60 | val |= index << mux->shift; | ||
61 | fixup_mux->fixup(&val); | ||
62 | writel(val, mux->reg); | ||
63 | |||
64 | spin_unlock_irqrestore(mux->lock, flags); | ||
65 | |||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | static const struct clk_ops clk_fixup_mux_ops = { | ||
70 | .get_parent = clk_fixup_mux_get_parent, | ||
71 | .set_parent = clk_fixup_mux_set_parent, | ||
72 | }; | ||
73 | |||
74 | struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg, | ||
75 | u8 shift, u8 width, const char **parents, | ||
76 | int num_parents, void (*fixup)(u32 *val)) | ||
77 | { | ||
78 | struct clk_fixup_mux *fixup_mux; | ||
79 | struct clk *clk; | ||
80 | struct clk_init_data init; | ||
81 | |||
82 | if (!fixup) | ||
83 | return ERR_PTR(-EINVAL); | ||
84 | |||
85 | fixup_mux = kzalloc(sizeof(*fixup_mux), GFP_KERNEL); | ||
86 | if (!fixup_mux) | ||
87 | return ERR_PTR(-ENOMEM); | ||
88 | |||
89 | init.name = name; | ||
90 | init.ops = &clk_fixup_mux_ops; | ||
91 | init.parent_names = parents; | ||
92 | init.num_parents = num_parents; | ||
93 | |||
94 | fixup_mux->mux.reg = reg; | ||
95 | fixup_mux->mux.shift = shift; | ||
96 | fixup_mux->mux.mask = BIT(width) - 1; | ||
97 | fixup_mux->mux.lock = &imx_ccm_lock; | ||
98 | fixup_mux->mux.hw.init = &init; | ||
99 | fixup_mux->ops = &clk_mux_ops; | ||
100 | fixup_mux->fixup = fixup; | ||
101 | |||
102 | clk = clk_register(NULL, &fixup_mux->mux.hw); | ||
103 | if (IS_ERR(clk)) | ||
104 | kfree(fixup_mux); | ||
105 | |||
106 | return clk; | ||
107 | } | ||
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 86567d980b07..bbafa3ccacb5 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -206,6 +206,17 @@ static const char *vpu_axi_sels[] = { "axi", "pll2_pfd2_396m", "pll2_pfd0_352m", | |||
206 | static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div", | 206 | static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div", |
207 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", | 207 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", |
208 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_post_div", }; | 208 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_post_div", }; |
209 | static const char *cko2_sels[] = { | ||
210 | "mmdc_ch0_axi", "mmdc_ch1_axi", "usdhc4", "usdhc1", | ||
211 | "gpu2d_axi", "dummy", "ecspi_root", "gpu3d_axi", | ||
212 | "usdhc3", "dummy", "arm", "ipu1", | ||
213 | "ipu2", "vdo_axi", "osc", "gpu2d_core", | ||
214 | "gpu3d_core", "usdhc2", "ssi1", "ssi2", | ||
215 | "ssi3", "gpu3d_shader", "vpu_axi", "can_root", | ||
216 | "ldb_di0", "ldb_di1", "esai", "eim_slow", | ||
217 | "uart_serial", "spdif", "asrc", "hsi_tx", | ||
218 | }; | ||
219 | static const char *cko_sels[] = { "cko1", "cko2", }; | ||
209 | 220 | ||
210 | enum mx6q_clks { | 221 | enum mx6q_clks { |
211 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, | 222 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, |
@@ -239,7 +250,8 @@ enum mx6q_clks { | |||
239 | pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, | 250 | pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, |
240 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, | 251 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, |
241 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, | 252 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, |
242 | usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow, clk_max | 253 | usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow, |
254 | spdif, cko2_sel, cko2_podf, cko2, cko, vdoa, clk_max | ||
243 | }; | 255 | }; |
244 | 256 | ||
245 | static struct clk *clk[clk_max]; | 257 | static struct clk *clk[clk_max]; |
@@ -384,19 +396,21 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
384 | clk[ipu2_di1_sel] = imx_clk_mux("ipu2_di1_sel", base + 0x38, 9, 3, ipu2_di1_sels, ARRAY_SIZE(ipu2_di1_sels)); | 396 | clk[ipu2_di1_sel] = imx_clk_mux("ipu2_di1_sel", base + 0x38, 9, 3, ipu2_di1_sels, ARRAY_SIZE(ipu2_di1_sels)); |
385 | clk[hsi_tx_sel] = imx_clk_mux("hsi_tx_sel", base + 0x30, 28, 1, hsi_tx_sels, ARRAY_SIZE(hsi_tx_sels)); | 397 | clk[hsi_tx_sel] = imx_clk_mux("hsi_tx_sel", base + 0x30, 28, 1, hsi_tx_sels, ARRAY_SIZE(hsi_tx_sels)); |
386 | clk[pcie_axi_sel] = imx_clk_mux("pcie_axi_sel", base + 0x18, 10, 1, pcie_axi_sels, ARRAY_SIZE(pcie_axi_sels)); | 398 | clk[pcie_axi_sel] = imx_clk_mux("pcie_axi_sel", base + 0x18, 10, 1, pcie_axi_sels, ARRAY_SIZE(pcie_axi_sels)); |
387 | clk[ssi1_sel] = imx_clk_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | 399 | clk[ssi1_sel] = imx_clk_fixup_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
388 | clk[ssi2_sel] = imx_clk_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | 400 | clk[ssi2_sel] = imx_clk_fixup_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
389 | clk[ssi3_sel] = imx_clk_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | 401 | clk[ssi3_sel] = imx_clk_fixup_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
390 | clk[usdhc1_sel] = imx_clk_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | 402 | clk[usdhc1_sel] = imx_clk_fixup_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
391 | clk[usdhc2_sel] = imx_clk_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | 403 | clk[usdhc2_sel] = imx_clk_fixup_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
392 | clk[usdhc3_sel] = imx_clk_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | 404 | clk[usdhc3_sel] = imx_clk_fixup_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
393 | clk[usdhc4_sel] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | 405 | clk[usdhc4_sel] = imx_clk_fixup_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
394 | clk[enfc_sel] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels)); | 406 | clk[enfc_sel] = imx_clk_mux("enfc_sel", base + 0x2c, 16, 2, enfc_sels, ARRAY_SIZE(enfc_sels)); |
395 | clk[emi_sel] = imx_clk_mux("emi_sel", base + 0x1c, 27, 2, emi_sels, ARRAY_SIZE(emi_sels)); | 407 | clk[emi_sel] = imx_clk_fixup_mux("emi_sel", base + 0x1c, 27, 2, emi_sels, ARRAY_SIZE(emi_sels), imx_cscmr1_fixup); |
396 | clk[emi_slow_sel] = imx_clk_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_slow_sels, ARRAY_SIZE(emi_slow_sels)); | 408 | clk[emi_slow_sel] = imx_clk_fixup_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_slow_sels, ARRAY_SIZE(emi_slow_sels), imx_cscmr1_fixup); |
397 | clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); | 409 | clk[vdo_axi_sel] = imx_clk_mux("vdo_axi_sel", base + 0x18, 11, 1, vdo_axi_sels, ARRAY_SIZE(vdo_axi_sels)); |
398 | clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels)); | 410 | clk[vpu_axi_sel] = imx_clk_mux("vpu_axi_sel", base + 0x18, 14, 2, vpu_axi_sels, ARRAY_SIZE(vpu_axi_sels)); |
399 | clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels)); | 411 | clk[cko1_sel] = imx_clk_mux("cko1_sel", base + 0x60, 0, 4, cko1_sels, ARRAY_SIZE(cko1_sels)); |
412 | clk[cko2_sel] = imx_clk_mux("cko2_sel", base + 0x60, 16, 5, cko2_sels, ARRAY_SIZE(cko2_sels)); | ||
413 | clk[cko] = imx_clk_mux("cko", base + 0x60, 8, 1, cko_sels, ARRAY_SIZE(cko_sels)); | ||
400 | 414 | ||
401 | /* name reg shift width busy: reg, shift parent_names num_parents */ | 415 | /* name reg shift width busy: reg, shift parent_names num_parents */ |
402 | clk[periph] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels)); | 416 | clk[periph] = imx_clk_busy_mux("periph", base + 0x14, 25, 1, base + 0x48, 5, periph_sels, ARRAY_SIZE(periph_sels)); |
@@ -406,7 +420,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
406 | clk[periph_clk2] = imx_clk_divider("periph_clk2", "periph_clk2_sel", base + 0x14, 27, 3); | 420 | clk[periph_clk2] = imx_clk_divider("periph_clk2", "periph_clk2_sel", base + 0x14, 27, 3); |
407 | clk[periph2_clk2] = imx_clk_divider("periph2_clk2", "periph2_clk2_sel", base + 0x14, 0, 3); | 421 | clk[periph2_clk2] = imx_clk_divider("periph2_clk2", "periph2_clk2_sel", base + 0x14, 0, 3); |
408 | clk[ipg] = imx_clk_divider("ipg", "ahb", base + 0x14, 8, 2); | 422 | clk[ipg] = imx_clk_divider("ipg", "ahb", base + 0x14, 8, 2); |
409 | clk[ipg_per] = imx_clk_divider("ipg_per", "ipg", base + 0x1c, 0, 6); | 423 | clk[ipg_per] = imx_clk_fixup_divider("ipg_per", "ipg", base + 0x1c, 0, 6, imx_cscmr1_fixup); |
410 | clk[esai_pred] = imx_clk_divider("esai_pred", "esai_sel", base + 0x28, 9, 3); | 424 | clk[esai_pred] = imx_clk_divider("esai_pred", "esai_sel", base + 0x28, 9, 3); |
411 | clk[esai_podf] = imx_clk_divider("esai_podf", "esai_pred", base + 0x28, 25, 3); | 425 | clk[esai_podf] = imx_clk_divider("esai_podf", "esai_pred", base + 0x28, 25, 3); |
412 | clk[asrc_pred] = imx_clk_divider("asrc_pred", "asrc_sel", base + 0x30, 12, 3); | 426 | clk[asrc_pred] = imx_clk_divider("asrc_pred", "asrc_sel", base + 0x30, 12, 3); |
@@ -442,10 +456,11 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
442 | clk[usdhc4_podf] = imx_clk_divider("usdhc4_podf", "usdhc4_sel", base + 0x24, 22, 3); | 456 | clk[usdhc4_podf] = imx_clk_divider("usdhc4_podf", "usdhc4_sel", base + 0x24, 22, 3); |
443 | clk[enfc_pred] = imx_clk_divider("enfc_pred", "enfc_sel", base + 0x2c, 18, 3); | 457 | clk[enfc_pred] = imx_clk_divider("enfc_pred", "enfc_sel", base + 0x2c, 18, 3); |
444 | clk[enfc_podf] = imx_clk_divider("enfc_podf", "enfc_pred", base + 0x2c, 21, 6); | 458 | clk[enfc_podf] = imx_clk_divider("enfc_podf", "enfc_pred", base + 0x2c, 21, 6); |
445 | clk[emi_podf] = imx_clk_divider("emi_podf", "emi_sel", base + 0x1c, 20, 3); | 459 | clk[emi_podf] = imx_clk_fixup_divider("emi_podf", "emi_sel", base + 0x1c, 20, 3, imx_cscmr1_fixup); |
446 | clk[emi_slow_podf] = imx_clk_divider("emi_slow_podf", "emi_slow_sel", base + 0x1c, 23, 3); | 460 | clk[emi_slow_podf] = imx_clk_fixup_divider("emi_slow_podf", "emi_slow_sel", base + 0x1c, 23, 3, imx_cscmr1_fixup); |
447 | clk[vpu_axi_podf] = imx_clk_divider("vpu_axi_podf", "vpu_axi_sel", base + 0x24, 25, 3); | 461 | clk[vpu_axi_podf] = imx_clk_divider("vpu_axi_podf", "vpu_axi_sel", base + 0x24, 25, 3); |
448 | clk[cko1_podf] = imx_clk_divider("cko1_podf", "cko1_sel", base + 0x60, 4, 3); | 462 | clk[cko1_podf] = imx_clk_divider("cko1_podf", "cko1_sel", base + 0x60, 4, 3); |
463 | clk[cko2_podf] = imx_clk_divider("cko2_podf", "cko2_sel", base + 0x60, 21, 3); | ||
449 | 464 | ||
450 | /* name parent_name reg shift width busy: reg, shift */ | 465 | /* name parent_name reg shift width busy: reg, shift */ |
451 | clk[axi] = imx_clk_busy_divider("axi", "axi_sel", base + 0x14, 16, 3, base + 0x48, 0); | 466 | clk[axi] = imx_clk_busy_divider("axi", "axi_sel", base + 0x14, 16, 3, base + 0x48, 0); |
@@ -486,6 +501,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
486 | clk[i2c3] = imx_clk_gate2("i2c3", "ipg_per", base + 0x70, 10); | 501 | clk[i2c3] = imx_clk_gate2("i2c3", "ipg_per", base + 0x70, 10); |
487 | clk[iim] = imx_clk_gate2("iim", "ipg", base + 0x70, 12); | 502 | clk[iim] = imx_clk_gate2("iim", "ipg", base + 0x70, 12); |
488 | clk[enfc] = imx_clk_gate2("enfc", "enfc_podf", base + 0x70, 14); | 503 | clk[enfc] = imx_clk_gate2("enfc", "enfc_podf", base + 0x70, 14); |
504 | clk[vdoa] = imx_clk_gate2("vdoa", "vdo_axi", base + 0x70, 26); | ||
489 | clk[ipu1] = imx_clk_gate2("ipu1", "ipu1_podf", base + 0x74, 0); | 505 | clk[ipu1] = imx_clk_gate2("ipu1", "ipu1_podf", base + 0x74, 0); |
490 | clk[ipu1_di0] = imx_clk_gate2("ipu1_di0", "ipu1_di0_sel", base + 0x74, 2); | 506 | clk[ipu1_di0] = imx_clk_gate2("ipu1_di0", "ipu1_di0_sel", base + 0x74, 2); |
491 | clk[ipu1_di1] = imx_clk_gate2("ipu1_di1", "ipu1_di1_sel", base + 0x74, 4); | 507 | clk[ipu1_di1] = imx_clk_gate2("ipu1_di1", "ipu1_di1_sel", base + 0x74, 4); |
@@ -521,6 +537,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
521 | clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); | 537 | clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); |
522 | clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); | 538 | clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); |
523 | clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); | 539 | clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); |
540 | clk[spdif] = imx_clk_gate2("spdif", "spdif_podf", base + 0x7c, 14); | ||
524 | clk[ssi1_ipg] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18); | 541 | clk[ssi1_ipg] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18); |
525 | clk[ssi2_ipg] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20); | 542 | clk[ssi2_ipg] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20); |
526 | clk[ssi3_ipg] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22); | 543 | clk[ssi3_ipg] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22); |
@@ -535,6 +552,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
535 | clk[vdo_axi] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12); | 552 | clk[vdo_axi] = imx_clk_gate2("vdo_axi", "vdo_axi_sel", base + 0x80, 12); |
536 | clk[vpu_axi] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14); | 553 | clk[vpu_axi] = imx_clk_gate2("vpu_axi", "vpu_axi_podf", base + 0x80, 14); |
537 | clk[cko1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); | 554 | clk[cko1] = imx_clk_gate("cko1", "cko1_podf", base + 0x60, 7); |
555 | clk[cko2] = imx_clk_gate("cko2", "cko2_podf", base + 0x60, 24); | ||
538 | 556 | ||
539 | for (i = 0; i < ARRAY_SIZE(clk); i++) | 557 | for (i = 0; i < ARRAY_SIZE(clk); i++) |
540 | if (IS_ERR(clk[i])) | 558 | if (IS_ERR(clk[i])) |
@@ -554,7 +572,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
554 | clk_register_clkdev(clk[pll4_post_div], "pll4_post_div", NULL); | 572 | clk_register_clkdev(clk[pll4_post_div], "pll4_post_div", NULL); |
555 | clk_register_clkdev(clk[pll4_audio], "pll4_audio", NULL); | 573 | clk_register_clkdev(clk[pll4_audio], "pll4_audio", NULL); |
556 | 574 | ||
557 | if (imx6q_revision() != IMX_CHIP_REVISION_1_0) { | 575 | if ((imx6q_revision() != IMX_CHIP_REVISION_1_0) || cpu_is_imx6dl()) { |
558 | clk_set_parent(clk[ldb_di0_sel], clk[pll5_video_div]); | 576 | clk_set_parent(clk[ldb_di0_sel], clk[pll5_video_div]); |
559 | clk_set_parent(clk[ldb_di1_sel], clk[pll5_video_div]); | 577 | clk_set_parent(clk[ldb_di1_sel], clk[pll5_video_div]); |
560 | } | 578 | } |
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c index a307ac22dffe..a5c3c5d21aee 100644 --- a/arch/arm/mach-imx/clk-imx6sl.c +++ b/arch/arm/mach-imx/clk-imx6sl.c | |||
@@ -138,14 +138,14 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
138 | clks[IMX6SL_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); | 138 | clks[IMX6SL_CLK_PERIPH_CLK2_SEL] = imx_clk_mux("periph_clk2_sel", base + 0x18, 12, 2, periph_clk2_sels, ARRAY_SIZE(periph_clk2_sels)); |
139 | clks[IMX6SL_CLK_CSI_SEL] = imx_clk_mux("csi_sel", base + 0x3c, 9, 2, csi_lcdif_sels, ARRAY_SIZE(csi_lcdif_sels)); | 139 | clks[IMX6SL_CLK_CSI_SEL] = imx_clk_mux("csi_sel", base + 0x3c, 9, 2, csi_lcdif_sels, ARRAY_SIZE(csi_lcdif_sels)); |
140 | clks[IMX6SL_CLK_LCDIF_AXI_SEL] = imx_clk_mux("lcdif_axi_sel", base + 0x3c, 14, 2, csi_lcdif_sels, ARRAY_SIZE(csi_lcdif_sels)); | 140 | clks[IMX6SL_CLK_LCDIF_AXI_SEL] = imx_clk_mux("lcdif_axi_sel", base + 0x3c, 14, 2, csi_lcdif_sels, ARRAY_SIZE(csi_lcdif_sels)); |
141 | clks[IMX6SL_CLK_USDHC1_SEL] = imx_clk_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | 141 | clks[IMX6SL_CLK_USDHC1_SEL] = imx_clk_fixup_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
142 | clks[IMX6SL_CLK_USDHC2_SEL] = imx_clk_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | 142 | clks[IMX6SL_CLK_USDHC2_SEL] = imx_clk_fixup_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
143 | clks[IMX6SL_CLK_USDHC3_SEL] = imx_clk_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | 143 | clks[IMX6SL_CLK_USDHC3_SEL] = imx_clk_fixup_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
144 | clks[IMX6SL_CLK_USDHC4_SEL] = imx_clk_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels)); | 144 | clks[IMX6SL_CLK_USDHC4_SEL] = imx_clk_fixup_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels, ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup); |
145 | clks[IMX6SL_CLK_SSI1_SEL] = imx_clk_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | 145 | clks[IMX6SL_CLK_SSI1_SEL] = imx_clk_fixup_mux("ssi1_sel", base + 0x1c, 10, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
146 | clks[IMX6SL_CLK_SSI2_SEL] = imx_clk_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | 146 | clks[IMX6SL_CLK_SSI2_SEL] = imx_clk_fixup_mux("ssi2_sel", base + 0x1c, 12, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
147 | clks[IMX6SL_CLK_SSI3_SEL] = imx_clk_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels)); | 147 | clks[IMX6SL_CLK_SSI3_SEL] = imx_clk_fixup_mux("ssi3_sel", base + 0x1c, 14, 2, ssi_sels, ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup); |
148 | clks[IMX6SL_CLK_PERCLK_SEL] = imx_clk_mux("perclk_sel", base + 0x1c, 6, 1, perclk_sels, ARRAY_SIZE(perclk_sels)); | 148 | clks[IMX6SL_CLK_PERCLK_SEL] = imx_clk_fixup_mux("perclk_sel", base + 0x1c, 6, 1, perclk_sels, ARRAY_SIZE(perclk_sels), imx_cscmr1_fixup); |
149 | clks[IMX6SL_CLK_PXP_AXI_SEL] = imx_clk_mux("pxp_axi_sel", base + 0x34, 6, 3, epdc_pxp_sels, ARRAY_SIZE(epdc_pxp_sels)); | 149 | clks[IMX6SL_CLK_PXP_AXI_SEL] = imx_clk_mux("pxp_axi_sel", base + 0x34, 6, 3, epdc_pxp_sels, ARRAY_SIZE(epdc_pxp_sels)); |
150 | clks[IMX6SL_CLK_EPDC_AXI_SEL] = imx_clk_mux("epdc_axi_sel", base + 0x34, 15, 3, epdc_pxp_sels, ARRAY_SIZE(epdc_pxp_sels)); | 150 | clks[IMX6SL_CLK_EPDC_AXI_SEL] = imx_clk_mux("epdc_axi_sel", base + 0x34, 15, 3, epdc_pxp_sels, ARRAY_SIZE(epdc_pxp_sels)); |
151 | clks[IMX6SL_CLK_GPU2D_OVG_SEL] = imx_clk_mux("gpu2d_ovg_sel", base + 0x18, 4, 2, gpu2d_ovg_sels, ARRAY_SIZE(gpu2d_ovg_sels)); | 151 | clks[IMX6SL_CLK_GPU2D_OVG_SEL] = imx_clk_mux("gpu2d_ovg_sel", base + 0x18, 4, 2, gpu2d_ovg_sels, ARRAY_SIZE(gpu2d_ovg_sels)); |
@@ -179,14 +179,14 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
179 | clks[IMX6SL_CLK_SSI2_PODF] = imx_clk_divider("ssi2_podf", "ssi2_pred", base + 0x2c, 0, 6); | 179 | clks[IMX6SL_CLK_SSI2_PODF] = imx_clk_divider("ssi2_podf", "ssi2_pred", base + 0x2c, 0, 6); |
180 | clks[IMX6SL_CLK_SSI3_PRED] = imx_clk_divider("ssi3_pred", "ssi3_sel", base + 0x28, 22, 3); | 180 | clks[IMX6SL_CLK_SSI3_PRED] = imx_clk_divider("ssi3_pred", "ssi3_sel", base + 0x28, 22, 3); |
181 | clks[IMX6SL_CLK_SSI3_PODF] = imx_clk_divider("ssi3_podf", "ssi3_pred", base + 0x28, 16, 6); | 181 | clks[IMX6SL_CLK_SSI3_PODF] = imx_clk_divider("ssi3_podf", "ssi3_pred", base + 0x28, 16, 6); |
182 | clks[IMX6SL_CLK_PERCLK] = imx_clk_divider("perclk", "perclk_sel", base + 0x1c, 0, 6); | 182 | clks[IMX6SL_CLK_PERCLK] = imx_clk_fixup_divider("perclk", "perclk_sel", base + 0x1c, 0, 6, imx_cscmr1_fixup); |
183 | clks[IMX6SL_CLK_PXP_AXI_PODF] = imx_clk_divider("pxp_axi_podf", "pxp_axi_sel", base + 0x34, 3, 3); | 183 | clks[IMX6SL_CLK_PXP_AXI_PODF] = imx_clk_divider("pxp_axi_podf", "pxp_axi_sel", base + 0x34, 3, 3); |
184 | clks[IMX6SL_CLK_EPDC_AXI_PODF] = imx_clk_divider("epdc_axi_podf", "epdc_axi_sel", base + 0x34, 12, 3); | 184 | clks[IMX6SL_CLK_EPDC_AXI_PODF] = imx_clk_divider("epdc_axi_podf", "epdc_axi_sel", base + 0x34, 12, 3); |
185 | clks[IMX6SL_CLK_GPU2D_OVG_PODF] = imx_clk_divider("gpu2d_ovg_podf", "gpu2d_ovg_sel", base + 0x18, 26, 3); | 185 | clks[IMX6SL_CLK_GPU2D_OVG_PODF] = imx_clk_divider("gpu2d_ovg_podf", "gpu2d_ovg_sel", base + 0x18, 26, 3); |
186 | clks[IMX6SL_CLK_GPU2D_PODF] = imx_clk_divider("gpu2d_podf", "gpu2d_sel", base + 0x18, 29, 3); | 186 | clks[IMX6SL_CLK_GPU2D_PODF] = imx_clk_divider("gpu2d_podf", "gpu2d_sel", base + 0x18, 29, 3); |
187 | clks[IMX6SL_CLK_LCDIF_PIX_PRED] = imx_clk_divider("lcdif_pix_pred", "lcdif_pix_sel", base + 0x38, 3, 3); | 187 | clks[IMX6SL_CLK_LCDIF_PIX_PRED] = imx_clk_divider("lcdif_pix_pred", "lcdif_pix_sel", base + 0x38, 3, 3); |
188 | clks[IMX6SL_CLK_EPDC_PIX_PRED] = imx_clk_divider("epdc_pix_pred", "epdc_pix_sel", base + 0x38, 12, 3); | 188 | clks[IMX6SL_CLK_EPDC_PIX_PRED] = imx_clk_divider("epdc_pix_pred", "epdc_pix_sel", base + 0x38, 12, 3); |
189 | clks[IMX6SL_CLK_LCDIF_PIX_PODF] = imx_clk_divider("lcdif_pix_podf", "lcdif_pix_pred", base + 0x1c, 20, 3); | 189 | clks[IMX6SL_CLK_LCDIF_PIX_PODF] = imx_clk_fixup_divider("lcdif_pix_podf", "lcdif_pix_pred", base + 0x1c, 20, 3, imx_cscmr1_fixup); |
190 | clks[IMX6SL_CLK_EPDC_PIX_PODF] = imx_clk_divider("epdc_pix_podf", "epdc_pix_pred", base + 0x18, 23, 3); | 190 | clks[IMX6SL_CLK_EPDC_PIX_PODF] = imx_clk_divider("epdc_pix_podf", "epdc_pix_pred", base + 0x18, 23, 3); |
191 | clks[IMX6SL_CLK_SPDIF0_PRED] = imx_clk_divider("spdif0_pred", "spdif0_sel", base + 0x30, 25, 3); | 191 | clks[IMX6SL_CLK_SPDIF0_PRED] = imx_clk_divider("spdif0_pred", "spdif0_sel", base + 0x30, 25, 3); |
192 | clks[IMX6SL_CLK_SPDIF0_PODF] = imx_clk_divider("spdif0_podf", "spdif0_pred", base + 0x30, 22, 3); | 192 | clks[IMX6SL_CLK_SPDIF0_PODF] = imx_clk_divider("spdif0_podf", "spdif0_pred", base + 0x30, 22, 3); |
diff --git a/arch/arm/mach-imx/clk-pllv3.c b/arch/arm/mach-imx/clk-pllv3.c index a9fad5f8d340..f6640b6a7b31 100644 --- a/arch/arm/mach-imx/clk-pllv3.c +++ b/arch/arm/mach-imx/clk-pllv3.c | |||
@@ -48,7 +48,7 @@ struct clk_pllv3 { | |||
48 | static int clk_pllv3_prepare(struct clk_hw *hw) | 48 | static int clk_pllv3_prepare(struct clk_hw *hw) |
49 | { | 49 | { |
50 | struct clk_pllv3 *pll = to_clk_pllv3(hw); | 50 | struct clk_pllv3 *pll = to_clk_pllv3(hw); |
51 | unsigned long timeout = jiffies + msecs_to_jiffies(10); | 51 | unsigned long timeout; |
52 | u32 val; | 52 | u32 val; |
53 | 53 | ||
54 | val = readl_relaxed(pll->base); | 54 | val = readl_relaxed(pll->base); |
@@ -59,12 +59,19 @@ static int clk_pllv3_prepare(struct clk_hw *hw) | |||
59 | val &= ~BM_PLL_POWER; | 59 | val &= ~BM_PLL_POWER; |
60 | writel_relaxed(val, pll->base); | 60 | writel_relaxed(val, pll->base); |
61 | 61 | ||
62 | timeout = jiffies + msecs_to_jiffies(10); | ||
62 | /* Wait for PLL to lock */ | 63 | /* Wait for PLL to lock */ |
63 | while (!(readl_relaxed(pll->base) & BM_PLL_LOCK)) | 64 | do { |
65 | if (readl_relaxed(pll->base) & BM_PLL_LOCK) | ||
66 | break; | ||
64 | if (time_after(jiffies, timeout)) | 67 | if (time_after(jiffies, timeout)) |
65 | return -ETIMEDOUT; | 68 | break; |
69 | } while (1); | ||
66 | 70 | ||
67 | return 0; | 71 | if (readl_relaxed(pll->base) & BM_PLL_LOCK) |
72 | return 0; | ||
73 | else | ||
74 | return -ETIMEDOUT; | ||
68 | } | 75 | } |
69 | 76 | ||
70 | static void clk_pllv3_unprepare(struct clk_hw *hw) | 77 | static void clk_pllv3_unprepare(struct clk_hw *hw) |
diff --git a/arch/arm/mach-imx/clk.c b/arch/arm/mach-imx/clk.c index 55bc80a00666..edc35df7bed4 100644 --- a/arch/arm/mach-imx/clk.c +++ b/arch/arm/mach-imx/clk.c | |||
@@ -37,3 +37,29 @@ struct clk * __init imx_obtain_fixed_clock( | |||
37 | clk = imx_clk_fixed(name, rate); | 37 | clk = imx_clk_fixed(name, rate); |
38 | return clk; | 38 | return clk; |
39 | } | 39 | } |
40 | |||
41 | /* | ||
42 | * This fixups the register CCM_CSCMR1 write value. | ||
43 | * The write/read/divider values of the aclk_podf field | ||
44 | * of that register have the relationship described by | ||
45 | * the following table: | ||
46 | * | ||
47 | * write value read value divider | ||
48 | * 3b'000 3b'110 7 | ||
49 | * 3b'001 3b'111 8 | ||
50 | * 3b'010 3b'100 5 | ||
51 | * 3b'011 3b'101 6 | ||
52 | * 3b'100 3b'010 3 | ||
53 | * 3b'101 3b'011 4 | ||
54 | * 3b'110 3b'000 1 | ||
55 | * 3b'111 3b'001 2(default) | ||
56 | * | ||
57 | * That's why we do the xor operation below. | ||
58 | */ | ||
59 | #define CSCMR1_FIXUP 0x00600000 | ||
60 | |||
61 | void imx_cscmr1_fixup(u32 *val) | ||
62 | { | ||
63 | *val ^= CSCMR1_FIXUP; | ||
64 | return; | ||
65 | } | ||
diff --git a/arch/arm/mach-imx/clk.h b/arch/arm/mach-imx/clk.h index 0e4e8bb261b9..3451f1f8ba1f 100644 --- a/arch/arm/mach-imx/clk.h +++ b/arch/arm/mach-imx/clk.h | |||
@@ -6,6 +6,8 @@ | |||
6 | 6 | ||
7 | extern spinlock_t imx_ccm_lock; | 7 | extern spinlock_t imx_ccm_lock; |
8 | 8 | ||
9 | extern void imx_cscmr1_fixup(u32 *val); | ||
10 | |||
9 | struct clk *imx_clk_pllv1(const char *name, const char *parent, | 11 | struct clk *imx_clk_pllv1(const char *name, const char *parent, |
10 | void __iomem *base); | 12 | void __iomem *base); |
11 | 13 | ||
@@ -49,6 +51,14 @@ struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift, | |||
49 | u8 width, void __iomem *busy_reg, u8 busy_shift, | 51 | u8 width, void __iomem *busy_reg, u8 busy_shift, |
50 | const char **parent_names, int num_parents); | 52 | const char **parent_names, int num_parents); |
51 | 53 | ||
54 | struct clk *imx_clk_fixup_divider(const char *name, const char *parent, | ||
55 | void __iomem *reg, u8 shift, u8 width, | ||
56 | void (*fixup)(u32 *val)); | ||
57 | |||
58 | struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg, | ||
59 | u8 shift, u8 width, const char **parents, | ||
60 | int num_parents, void (*fixup)(u32 *val)); | ||
61 | |||
52 | static inline struct clk *imx_clk_fixed(const char *name, int rate) | 62 | static inline struct clk *imx_clk_fixed(const char *name, int rate) |
53 | { | 63 | { |
54 | return clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT, rate); | 64 | return clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT, rate); |
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index cb6c838b63ed..4517fd760bfc 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -137,7 +137,6 @@ extern void imx_gpc_restore_all(void); | |||
137 | extern void imx_anatop_init(void); | 137 | extern void imx_anatop_init(void); |
138 | extern void imx_anatop_pre_suspend(void); | 138 | extern void imx_anatop_pre_suspend(void); |
139 | extern void imx_anatop_post_resume(void); | 139 | extern void imx_anatop_post_resume(void); |
140 | extern void imx_anatop_usb_chrg_detect_disable(void); | ||
141 | extern u32 imx_anatop_get_digprog(void); | 140 | extern u32 imx_anatop_get_digprog(void); |
142 | extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); | 141 | extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); |
143 | extern void imx6q_set_chicken_bit(void); | 142 | extern void imx6q_set_chicken_bit(void); |
@@ -147,12 +146,10 @@ extern int imx_cpu_kill(unsigned int cpu); | |||
147 | 146 | ||
148 | #ifdef CONFIG_PM | 147 | #ifdef CONFIG_PM |
149 | extern void imx6q_pm_init(void); | 148 | extern void imx6q_pm_init(void); |
150 | extern void imx51_pm_init(void); | 149 | extern void imx5_pm_init(void); |
151 | extern void imx53_pm_init(void); | ||
152 | #else | 150 | #else |
153 | static inline void imx6q_pm_init(void) {} | 151 | static inline void imx6q_pm_init(void) {} |
154 | static inline void imx51_pm_init(void) {} | 152 | static inline void imx5_pm_init(void) {} |
155 | static inline void imx53_pm_init(void) {} | ||
156 | #endif | 153 | #endif |
157 | 154 | ||
158 | #ifdef CONFIG_NEON | 155 | #ifdef CONFIG_NEON |
@@ -161,6 +158,12 @@ extern int mx51_neon_fixup(void); | |||
161 | static inline int mx51_neon_fixup(void) { return 0; } | 158 | static inline int mx51_neon_fixup(void) { return 0; } |
162 | #endif | 159 | #endif |
163 | 160 | ||
161 | #ifdef CONFIG_CACHE_L2X0 | ||
162 | extern void imx_init_l2cache(void); | ||
163 | #else | ||
164 | static inline void imx_init_l2cache(void) {} | ||
165 | #endif | ||
166 | |||
164 | extern struct smp_operations imx_smp_ops; | 167 | extern struct smp_operations imx_smp_ops; |
165 | 168 | ||
166 | #endif | 169 | #endif |
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 7be13f8e69a0..1e093abe7b95 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/regmap.h> | 31 | #include <linux/regmap.h> |
32 | #include <linux/micrel_phy.h> | 32 | #include <linux/micrel_phy.h> |
33 | #include <linux/mfd/syscon.h> | 33 | #include <linux/mfd/syscon.h> |
34 | #include <asm/hardware/cache-l2x0.h> | 34 | #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> |
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
37 | #include <asm/system_misc.h> | 37 | #include <asm/system_misc.h> |
@@ -103,18 +103,65 @@ static int ksz9021rn_phy_fixup(struct phy_device *phydev) | |||
103 | { | 103 | { |
104 | if (IS_BUILTIN(CONFIG_PHYLIB)) { | 104 | if (IS_BUILTIN(CONFIG_PHYLIB)) { |
105 | /* min rx data delay */ | 105 | /* min rx data delay */ |
106 | phy_write(phydev, 0x0b, 0x8105); | 106 | phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, |
107 | phy_write(phydev, 0x0c, 0x0000); | 107 | 0x8000 | MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW); |
108 | phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0x0000); | ||
108 | 109 | ||
109 | /* max rx/tx clock delay, min rx/tx control delay */ | 110 | /* max rx/tx clock delay, min rx/tx control delay */ |
110 | phy_write(phydev, 0x0b, 0x8104); | 111 | phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, |
111 | phy_write(phydev, 0x0c, 0xf0f0); | 112 | 0x8000 | MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW); |
112 | phy_write(phydev, 0x0b, 0x104); | 113 | phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0xf0f0); |
114 | phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL, | ||
115 | MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW); | ||
113 | } | 116 | } |
114 | 117 | ||
115 | return 0; | 118 | return 0; |
116 | } | 119 | } |
117 | 120 | ||
121 | static void mmd_write_reg(struct phy_device *dev, int device, int reg, int val) | ||
122 | { | ||
123 | phy_write(dev, 0x0d, device); | ||
124 | phy_write(dev, 0x0e, reg); | ||
125 | phy_write(dev, 0x0d, (1 << 14) | device); | ||
126 | phy_write(dev, 0x0e, val); | ||
127 | } | ||
128 | |||
129 | static int ksz9031rn_phy_fixup(struct phy_device *dev) | ||
130 | { | ||
131 | /* | ||
132 | * min rx data delay, max rx/tx clock delay, | ||
133 | * min rx/tx control delay | ||
134 | */ | ||
135 | mmd_write_reg(dev, 2, 4, 0); | ||
136 | mmd_write_reg(dev, 2, 5, 0); | ||
137 | mmd_write_reg(dev, 2, 8, 0x003ff); | ||
138 | |||
139 | return 0; | ||
140 | } | ||
141 | |||
142 | static int ar8031_phy_fixup(struct phy_device *dev) | ||
143 | { | ||
144 | u16 val; | ||
145 | |||
146 | /* To enable AR8031 output a 125MHz clk from CLK_25M */ | ||
147 | phy_write(dev, 0xd, 0x7); | ||
148 | phy_write(dev, 0xe, 0x8016); | ||
149 | phy_write(dev, 0xd, 0x4007); | ||
150 | |||
151 | val = phy_read(dev, 0xe); | ||
152 | val &= 0xffe3; | ||
153 | val |= 0x18; | ||
154 | phy_write(dev, 0xe, val); | ||
155 | |||
156 | /* introduce tx clock delay */ | ||
157 | phy_write(dev, 0x1d, 0x5); | ||
158 | val = phy_read(dev, 0x1e); | ||
159 | val |= 0x0100; | ||
160 | phy_write(dev, 0x1e, val); | ||
161 | |||
162 | return 0; | ||
163 | } | ||
164 | |||
118 | static void __init imx6q_sabrelite_cko1_setup(void) | 165 | static void __init imx6q_sabrelite_cko1_setup(void) |
119 | { | 166 | { |
120 | struct clk *cko1_sel, *ahb, *cko1; | 167 | struct clk *cko1_sel, *ahb, *cko1; |
@@ -139,12 +186,18 @@ put_clk: | |||
139 | clk_put(cko1); | 186 | clk_put(cko1); |
140 | } | 187 | } |
141 | 188 | ||
142 | static void __init imx6q_sabrelite_init(void) | 189 | #define PHY_ID_AR8031 0x004dd074 |
190 | |||
191 | static void __init imx6q_enet_phy_init(void) | ||
143 | { | 192 | { |
144 | if (IS_BUILTIN(CONFIG_PHYLIB)) | 193 | if (IS_BUILTIN(CONFIG_PHYLIB)) { |
145 | phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, | 194 | phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, |
146 | ksz9021rn_phy_fixup); | 195 | ksz9021rn_phy_fixup); |
147 | imx6q_sabrelite_cko1_setup(); | 196 | phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK, |
197 | ksz9031rn_phy_fixup); | ||
198 | phy_register_fixup_for_uid(PHY_ID_AR8031, 0xffffffff, | ||
199 | ar8031_phy_fixup); | ||
200 | } | ||
148 | } | 201 | } |
149 | 202 | ||
150 | static void __init imx6q_sabresd_cko1_setup(void) | 203 | static void __init imx6q_sabresd_cko1_setup(void) |
@@ -192,29 +245,28 @@ static void __init imx6q_1588_init(void) | |||
192 | 245 | ||
193 | gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); | 246 | gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); |
194 | if (!IS_ERR(gpr)) | 247 | if (!IS_ERR(gpr)) |
195 | regmap_update_bits(gpr, 0x4, 1 << 21, 1 << 21); | 248 | regmap_update_bits(gpr, IOMUXC_GPR1, |
249 | IMX6Q_GPR1_ENET_CLK_SEL_MASK, | ||
250 | IMX6Q_GPR1_ENET_CLK_SEL_ANATOP); | ||
196 | else | 251 | else |
197 | pr_err("failed to find fsl,imx6q-iomux-gpr regmap\n"); | 252 | pr_err("failed to find fsl,imx6q-iomux-gpr regmap\n"); |
198 | 253 | ||
199 | } | 254 | } |
200 | static void __init imx6q_usb_init(void) | ||
201 | { | ||
202 | imx_anatop_usb_chrg_detect_disable(); | ||
203 | } | ||
204 | 255 | ||
205 | static void __init imx6q_init_machine(void) | 256 | static void __init imx6q_init_machine(void) |
206 | { | 257 | { |
207 | if (of_machine_is_compatible("fsl,imx6q-sabrelite")) | 258 | if (of_machine_is_compatible("fsl,imx6q-sabrelite")) |
208 | imx6q_sabrelite_init(); | 259 | imx6q_sabrelite_cko1_setup(); |
209 | else if (of_machine_is_compatible("fsl,imx6q-sabresd") || | 260 | else if (of_machine_is_compatible("fsl,imx6q-sabresd") || |
210 | of_machine_is_compatible("fsl,imx6dl-sabresd")) | 261 | of_machine_is_compatible("fsl,imx6dl-sabresd")) |
211 | imx6q_sabresd_init(); | 262 | imx6q_sabresd_init(); |
212 | 263 | ||
264 | imx6q_enet_phy_init(); | ||
265 | |||
213 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 266 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
214 | 267 | ||
215 | imx_anatop_init(); | 268 | imx_anatop_init(); |
216 | imx6q_pm_init(); | 269 | imx6q_pm_init(); |
217 | imx6q_usb_init(); | ||
218 | imx6q_1588_init(); | 270 | imx6q_1588_init(); |
219 | } | 271 | } |
220 | 272 | ||
@@ -297,44 +349,10 @@ static void __init imx6q_map_io(void) | |||
297 | imx_scu_map_io(); | 349 | imx_scu_map_io(); |
298 | } | 350 | } |
299 | 351 | ||
300 | #ifdef CONFIG_CACHE_L2X0 | ||
301 | static void __init imx6q_init_l2cache(void) | ||
302 | { | ||
303 | void __iomem *l2x0_base; | ||
304 | struct device_node *np; | ||
305 | unsigned int val; | ||
306 | |||
307 | np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); | ||
308 | if (!np) | ||
309 | goto out; | ||
310 | |||
311 | l2x0_base = of_iomap(np, 0); | ||
312 | if (!l2x0_base) { | ||
313 | of_node_put(np); | ||
314 | goto out; | ||
315 | } | ||
316 | |||
317 | /* Configure the L2 PREFETCH and POWER registers */ | ||
318 | val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL); | ||
319 | val |= 0x70800000; | ||
320 | writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL); | ||
321 | val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN; | ||
322 | writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL); | ||
323 | |||
324 | iounmap(l2x0_base); | ||
325 | of_node_put(np); | ||
326 | |||
327 | out: | ||
328 | l2x0_of_init(0, ~0UL); | ||
329 | } | ||
330 | #else | ||
331 | static inline void imx6q_init_l2cache(void) {} | ||
332 | #endif | ||
333 | |||
334 | static void __init imx6q_init_irq(void) | 352 | static void __init imx6q_init_irq(void) |
335 | { | 353 | { |
336 | imx6q_init_revision(); | 354 | imx6q_init_revision(); |
337 | imx6q_init_l2cache(); | 355 | imx_init_l2cache(); |
338 | imx_src_init(); | 356 | imx_src_init(); |
339 | imx_gpc_init(); | 357 | imx_gpc_init(); |
340 | irqchip_init(); | 358 | irqchip_init(); |
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index 132db2609507..0d75dc54f715 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/irqchip.h> | 11 | #include <linux/irqchip.h> |
12 | #include <linux/of.h> | 12 | #include <linux/of.h> |
13 | #include <linux/of_platform.h> | 13 | #include <linux/of_platform.h> |
14 | #include <asm/hardware/cache-l2x0.h> | ||
15 | #include <asm/mach/arch.h> | 14 | #include <asm/mach/arch.h> |
16 | #include <asm/mach/map.h> | 15 | #include <asm/mach/map.h> |
17 | 16 | ||
@@ -26,7 +25,7 @@ static void __init imx6sl_init_machine(void) | |||
26 | 25 | ||
27 | static void __init imx6sl_init_irq(void) | 26 | static void __init imx6sl_init_irq(void) |
28 | { | 27 | { |
29 | l2x0_of_init(0, ~0UL); | 28 | imx_init_l2cache(); |
30 | imx_src_init(); | 29 | imx_src_init(); |
31 | imx_gpc_init(); | 30 | imx_gpc_init(); |
32 | irqchip_init(); | 31 | irqchip_init(); |
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c index cf193d87274a..a8229b7f10bf 100644 --- a/arch/arm/mach-imx/mm-imx5.c +++ b/arch/arm/mach-imx/mm-imx5.c | |||
@@ -153,10 +153,10 @@ void __init imx51_soc_init(void) | |||
153 | void __init imx51_init_late(void) | 153 | void __init imx51_init_late(void) |
154 | { | 154 | { |
155 | mx51_neon_fixup(); | 155 | mx51_neon_fixup(); |
156 | imx51_pm_init(); | 156 | imx5_pm_init(); |
157 | } | 157 | } |
158 | 158 | ||
159 | void __init imx53_init_late(void) | 159 | void __init imx53_init_late(void) |
160 | { | 160 | { |
161 | imx53_pm_init(); | 161 | imx5_pm_init(); |
162 | } | 162 | } |
diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c index 82e79c658eb2..58aeaf5baaf6 100644 --- a/arch/arm/mach-imx/pm-imx5.c +++ b/arch/arm/mach-imx/pm-imx5.c | |||
@@ -169,14 +169,9 @@ static int __init imx5_pm_common_init(void) | |||
169 | return imx5_cpuidle_init(); | 169 | return imx5_cpuidle_init(); |
170 | } | 170 | } |
171 | 171 | ||
172 | void __init imx51_pm_init(void) | 172 | void __init imx5_pm_init(void) |
173 | { | 173 | { |
174 | int ret = imx5_pm_common_init(); | 174 | int ret = imx5_pm_common_init(); |
175 | if (!ret) | 175 | if (!ret) |
176 | suspend_set_ops(&mx5_suspend_ops); | 176 | suspend_set_ops(&mx5_suspend_ops); |
177 | } | 177 | } |
178 | |||
179 | void __init imx53_pm_init(void) | ||
180 | { | ||
181 | imx5_pm_common_init(); | ||
182 | } | ||
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c index 6fe81bb4d3c9..64ff37ea72b1 100644 --- a/arch/arm/mach-imx/system.c +++ b/arch/arm/mach-imx/system.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/system_misc.h> | 27 | #include <asm/system_misc.h> |
28 | #include <asm/proc-fns.h> | 28 | #include <asm/proc-fns.h> |
29 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
30 | #include <asm/hardware/cache-l2x0.h> | ||
30 | 31 | ||
31 | #include "common.h" | 32 | #include "common.h" |
32 | #include "hardware.h" | 33 | #include "hardware.h" |
@@ -95,3 +96,35 @@ void __init mxc_arch_reset_init_dt(void) | |||
95 | 96 | ||
96 | clk_prepare(wdog_clk); | 97 | clk_prepare(wdog_clk); |
97 | } | 98 | } |
99 | |||
100 | #ifdef CONFIG_CACHE_L2X0 | ||
101 | void __init imx_init_l2cache(void) | ||
102 | { | ||
103 | void __iomem *l2x0_base; | ||
104 | struct device_node *np; | ||
105 | unsigned int val; | ||
106 | |||
107 | np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); | ||
108 | if (!np) | ||
109 | goto out; | ||
110 | |||
111 | l2x0_base = of_iomap(np, 0); | ||
112 | if (!l2x0_base) { | ||
113 | of_node_put(np); | ||
114 | goto out; | ||
115 | } | ||
116 | |||
117 | /* Configure the L2 PREFETCH and POWER registers */ | ||
118 | val = readl_relaxed(l2x0_base + L2X0_PREFETCH_CTRL); | ||
119 | val |= 0x70800000; | ||
120 | writel_relaxed(val, l2x0_base + L2X0_PREFETCH_CTRL); | ||
121 | val = L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN; | ||
122 | writel_relaxed(val, l2x0_base + L2X0_POWER_CTRL); | ||
123 | |||
124 | iounmap(l2x0_base); | ||
125 | of_node_put(np); | ||
126 | |||
127 | out: | ||
128 | l2x0_of_init(0, ~0UL); | ||
129 | } | ||
130 | #endif | ||
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index 8752dbbc6135..ad05ce60c1c9 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #define PHY_ID_KSZ8873MLL 0x000e7237 | 18 | #define PHY_ID_KSZ8873MLL 0x000e7237 |
19 | #define PHY_ID_KSZ9021 0x00221610 | 19 | #define PHY_ID_KSZ9021 0x00221610 |
20 | #define PHY_ID_KSZ9021RLRN 0x00221611 | ||
20 | #define PHY_ID_KS8737 0x00221720 | 21 | #define PHY_ID_KS8737 0x00221720 |
21 | #define PHY_ID_KSZ8021 0x00221555 | 22 | #define PHY_ID_KSZ8021 0x00221555 |
22 | #define PHY_ID_KSZ8031 0x00221556 | 23 | #define PHY_ID_KSZ8031 0x00221556 |
@@ -35,4 +36,9 @@ | |||
35 | /* struct phy_device dev_flags definitions */ | 36 | /* struct phy_device dev_flags definitions */ |
36 | #define MICREL_PHY_50MHZ_CLK 0x00000001 | 37 | #define MICREL_PHY_50MHZ_CLK 0x00000001 |
37 | 38 | ||
39 | #define MICREL_KSZ9021_EXTREG_CTRL 0xB | ||
40 | #define MICREL_KSZ9021_EXTREG_DATA_WRITE 0xC | ||
41 | #define MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW 0x104 | ||
42 | #define MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW 0x105 | ||
43 | |||
38 | #endif /* _MICREL_PHY_H */ | 44 | #endif /* _MICREL_PHY_H */ |