linux/drivers/soc
Stephan Gerhold 4ebd29f916 soc: imx: Register SoC device only on i.MX boards
At the moment, using the ARM32 multi_v7_defconfig always results in two
SoCs being exposed in sysfs. This is wrong, as far as I'm aware the
Qualcomm DragonBoard 410c does not actually make use of a i.MX SoC. :)

  qcom-db410c:/sys/devices/soc0$ grep . *
  family:Freescale i.MX
  machine:Qualcomm Technologies, Inc. APQ 8016 SBC
  revision:0.0
  serial_number:0000000000000000
  soc_id:Unknown

  qcom-db410c:/sys/devices/soc1$ grep . *
  family:Snapdragon
  machine:APQ8016
  ...

This happens because imx_soc_device_init() registers the soc device
unconditionally, even when running on devices that do not make use of i.MX.
Arnd already reported this more than a year ago and even suggested a fix
similar to this commit, but for some reason it was never submitted.

Fix it by checking if the "__mxc_cpu_type" variable was actually
initialized by earlier platform code. On devices without i.MX it will
simply stay 0.

Cc: Peng Fan <peng.fan@nxp.com>
Fixes: d2199b3487 ("ARM: imx: use device_initcall for imx_soc_device_init")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/CAK8P3a0hxO1TmK6oOMQ70AHSWJnP_CAq57YMOutrxkSYNjFeuw@mail.gmail.com/
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2021-12-08 20:30:00 +08:00
..
actions
amlogic soc: amlogic: meson-clk-measure: Make use of the helper function devm_platform_ioremap_resource() 2021-09-13 09:43:00 +02:00
aspeed soc: aspeed: Add UART routing support 2021-10-22 17:32:09 +02:00
atmel drivers: soc: atmel: fix type for same7 2021-02-04 21:54:31 +01:00
bcm soc: bcm: brcmstb: biuctrl: Tune MCP settings for 72116 2021-09-16 15:31:14 -07:00
canaan drivers: bus: Delete CONFIG_SIMPLE_PM_BUS 2021-10-05 17:47:22 +02:00
dove
fsl ARM: SoC fixes for v5.16 2021-11-10 11:25:37 -08:00
gemini
imx soc: imx: Register SoC device only on i.MX boards 2021-12-08 20:30:00 +08:00
ixp4xx soc: ixp4xx/qmgr: fix invalid __iomem access 2021-08-03 10:16:34 +02:00
lantiq
litex drivers/soc/litex: remove 8-bit subregister option 2021-06-11 04:35:40 +09:00
mediatek soc: mediatek: mmsys: Add reset controller support 2021-10-08 15:15:26 +02:00
qcom ARM: SoC drivers for 5.16 2021-11-03 17:00:52 -07:00
renesas soc: renesas: Identify more R-Car Gen3e SoCs 2021-09-13 10:56:29 +02:00
rockchip soc: rockchip: io-domain: Remove unneeded semicolon 2021-08-19 23:56:38 +02:00
samsung soc: samsung: exynos-chipid: add exynosautov9 SoC support 2021-10-26 09:16:53 +02:00
sifive RISC-V: sifive_l2_cache: Update L2 cache driver to support SiFive FU740 2021-01-07 17:28:27 -08:00
sunxi soc: sunxi_sram: Make use of the helper function devm_platform_ioremap_resource() 2021-09-13 09:04:05 +02:00
tegra soc/tegra: pmc: Use devm_platform_ioremap_resource() 2021-10-08 21:42:41 +02:00
ti Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
ux500
versatile
xilinx clk: xilinx: move xlnx_vcu clock driver from soc 2021-02-08 18:31:25 -08:00
Kconfig RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
Makefile ARM: ixp4xx: fix compile-testing soc drivers 2021-08-02 14:31:15 +02:00