* [PATCH 01/50] ARM: i.MX: Move mach header files to include/mach/imx
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 02/50] ARM: Rockchip: Move mach header files to include/mach/rockchip Sascha Hauer
` (48 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with #include <mach/xxx.h>.
With upcoming multi-arch support this is no longer possible as there
won't be a single mach anymore.
Move all i.MX specific header files to include/mach/imx/ to prepare for
multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ac-sxb/board.c | 2 +-
arch/arm/boards/ac-sxb/lowlevel.c | 14 ++++-----
arch/arm/boards/advantech-mx6/board.c | 2 +-
arch/arm/boards/advantech-mx6/lowlevel.c | 6 ++--
.../boards/boundarydevices-nitrogen6/board.c | 4 +--
| 4 +--
| 4 +--
| 4 +--
| 4 +--
| 4 +--
.../boundarydevices-nitrogen6/lowlevel.c | 4 +--
arch/arm/boards/ccxmx51/ccxmx51.c | 12 ++++----
arch/arm/boards/ccxmx51/lowlevel.c | 10 +++----
arch/arm/boards/ccxmx53/board.c | 12 ++++----
arch/arm/boards/ccxmx53/lowlevel.c | 6 ++--
arch/arm/boards/cm-fx6/board.c | 8 ++---
arch/arm/boards/cm-fx6/lowlevel.c | 12 ++++----
arch/arm/boards/datamodul-edm-qmx6/board.c | 12 ++++----
arch/arm/boards/datamodul-edm-qmx6/lowlevel.c | 4 +--
arch/arm/boards/dfi-fs700-m60/board.c | 6 ++--
| 4 +--
| 4 +--
| 4 +--
arch/arm/boards/dfi-fs700-m60/lowlevel.c | 4 +--
arch/arm/boards/digi-ccimx6ulsom/board.c | 4 +--
arch/arm/boards/digi-ccimx6ulsom/lowlevel.c | 4 +--
arch/arm/boards/efika-mx-smartbook/board.c | 14 ++++-----
arch/arm/boards/efika-mx-smartbook/lowlevel.c | 6 ++--
arch/arm/boards/element14-warp7/board.c | 4 +--
| 2 +-
arch/arm/boards/element14-warp7/lowlevel.c | 4 +--
arch/arm/boards/eltec-hipercam/board.c | 2 +-
| 4 +--
arch/arm/boards/eltec-hipercam/lowlevel.c | 2 +-
arch/arm/boards/embedsky-e9/board.c | 16 +++++-----
| 4 +--
arch/arm/boards/embedsky-e9/lowlevel.c | 2 +-
arch/arm/boards/embest-marsboard/board.c | 2 +-
arch/arm/boards/embest-marsboard/lowlevel.c | 6 ++--
arch/arm/boards/embest-riotboard/board.c | 8 ++---
| 4 +--
arch/arm/boards/embest-riotboard/lowlevel.c | 2 +-
.../arm/boards/freescale-mx51-babbage/board.c | 18 +++++------
.../boards/freescale-mx51-babbage/lowlevel.c | 8 ++---
.../arm/boards/freescale-mx51-babbage/power.c | 4 +--
arch/arm/boards/freescale-mx53-qsb/board.c | 12 ++++----
arch/arm/boards/freescale-mx53-qsb/lowlevel.c | 6 ++--
arch/arm/boards/freescale-mx53-vmx53/board.c | 4 +--
.../boards/freescale-mx53-vmx53/lowlevel.c | 4 +--
.../boards/freescale-mx6-sabrelite/board.c | 16 +++++-----
| 4 +--
.../boards/freescale-mx6-sabrelite/lowlevel.c | 8 ++---
arch/arm/boards/freescale-mx6-sabresd/board.c | 14 ++++-----
.../boards/freescale-mx6-sabresd/lowlevel.c | 4 +--
.../boards/freescale-mx6sx-sabresdb/board.c | 12 ++++----
.../freescale-mx6sx-sabresdb/lowlevel.c | 2 +-
arch/arm/boards/freescale-mx7-sabresd/board.c | 2 +-
| 2 +-
.../boards/freescale-mx7-sabresd/lowlevel.c | 10 +++----
| 12 ++++----
.../arm/boards/freescale-vf610-twr/lowlevel.c | 10 +++----
arch/arm/boards/gateworks-ventana/board.c | 4 +--
| 4 +--
arch/arm/boards/gateworks-ventana/lowlevel.c | 2 +-
arch/arm/boards/gk802/board.c | 6 ++--
| 4 +--
arch/arm/boards/gk802/lowlevel.c | 2 +-
arch/arm/boards/grinn-liteboard/board.c | 4 +--
arch/arm/boards/grinn-liteboard/lowlevel.c | 4 +--
arch/arm/boards/guf-santaro/board.c | 8 ++---
| 4 +--
arch/arm/boards/guf-santaro/lowlevel.c | 6 ++--
arch/arm/boards/guf-vincell/board.c | 10 +++----
arch/arm/boards/guf-vincell/lowlevel.c | 14 ++++-----
arch/arm/boards/innocomm-imx8mm-wb15/board.c | 2 +-
.../boards/innocomm-imx8mm-wb15/lowlevel.c | 12 ++++----
| 2 +-
.../kamstrup-mx7-concentrator/lowlevel.c | 10 +++----
arch/arm/boards/karo-tx25/board.c | 14 ++++-----
arch/arm/boards/karo-tx25/lowlevel.c | 6 ++--
arch/arm/boards/karo-tx53/board.c | 16 +++++-----
arch/arm/boards/karo-tx53/lowlevel.c | 8 ++---
arch/arm/boards/karo-tx6x/board.c | 4 +--
| 4 +--
| 4 +--
| 4 +--
| 4 +--
arch/arm/boards/karo-tx6x/lowlevel.c | 4 +--
arch/arm/boards/kindle-mx50/board.c | 8 ++---
arch/arm/boards/kindle-mx50/lowlevel.c | 4 +--
arch/arm/boards/kontron-samx6i/board.c | 4 +--
arch/arm/boards/kontron-samx6i/lowlevel.c | 4 +--
arch/arm/boards/kontron-samx6i/mem.c | 6 ++--
arch/arm/boards/meerkat96/lowlevel.c | 8 ++---
arch/arm/boards/mnt-reform/board.c | 2 +-
| 2 +-
arch/arm/boards/mnt-reform/lowlevel.c | 16 +++++-----
arch/arm/boards/novena/lowlevel.c | 12 ++++----
arch/arm/boards/nxp-imx6ull-evk/board.c | 2 +-
arch/arm/boards/nxp-imx6ull-evk/lowlevel.c | 6 ++--
arch/arm/boards/nxp-imx8mm-evk/board.c | 2 +-
arch/arm/boards/nxp-imx8mm-evk/lowlevel.c | 12 ++++----
arch/arm/boards/nxp-imx8mn-evk/board.c | 2 +-
arch/arm/boards/nxp-imx8mn-evk/lowlevel.c | 14 ++++-----
arch/arm/boards/nxp-imx8mp-evk/board.c | 4 +--
arch/arm/boards/nxp-imx8mp-evk/lowlevel.c | 14 ++++-----
arch/arm/boards/nxp-imx8mq-evk/board.c | 2 +-
| 2 +-
arch/arm/boards/nxp-imx8mq-evk/lowlevel.c | 12 ++++----
.../boards/phytec-phycard-imx27/lowlevel.c | 8 ++---
arch/arm/boards/phytec-phycard-imx27/pca100.c | 12 ++++----
.../boards/phytec-phycore-imx27/lowlevel.c | 8 ++---
arch/arm/boards/phytec-phycore-imx27/pcm038.c | 10 +++----
arch/arm/boards/phytec-phycore-imx27/pcm970.c | 4 +--
arch/arm/boards/phytec-phycore-imx7/board.c | 6 ++--
| 2 +-
.../arm/boards/phytec-phycore-imx7/lowlevel.c | 4 +--
arch/arm/boards/phytec-som-imx6/board.c | 6 ++--
| 2 +-
| 2 +-
| 2 +-
| 4 +--
| 2 +-
| 2 +-
| 2 +-
| 2 +-
| 2 +-
| 4 +--
| 2 +-
| 2 +-
| 2 +-
| 2 +-
| 4 +--
| 2 +-
| 2 +-
| 2 +-
| 2 +-
| 2 +-
| 2 +-
| 4 +--
| 2 +-
| 2 +-
| 4 +--
| 2 +-
| 2 +-
| 2 +-
arch/arm/boards/phytec-som-imx6/lowlevel.c | 2 +-
arch/arm/boards/phytec-som-imx8mq/board.c | 2 +-
arch/arm/boards/phytec-som-imx8mq/lowlevel.c | 12 ++++----
arch/arm/boards/polyhex-debix/board.c | 4 +--
arch/arm/boards/polyhex-debix/lowlevel.c | 14 ++++-----
arch/arm/boards/protonic-imx6/board.c | 6 ++--
arch/arm/boards/protonic-imx6/lowlevel.c | 4 +--
arch/arm/boards/protonic-imx8m/board.c | 2 +-
.../boards/protonic-imx8m/lowlevel-prt8mm.c | 14 ++++-----
arch/arm/boards/scb9328/lowlevel.c | 8 ++---
arch/arm/boards/scb9328/lowlevel_init.S | 2 +-
arch/arm/boards/scb9328/scb9328.c | 8 ++---
arch/arm/boards/skov-imx6/board.c | 2 +-
arch/arm/boards/skov-imx6/lowlevel.c | 16 +++++-----
arch/arm/boards/skov-imx6/version.c | 6 ++--
arch/arm/boards/solidrun-microsom/board.c | 8 ++---
| 4 +--
| 4 +--
| 4 +--
| 4 +--
arch/arm/boards/solidrun-microsom/lowlevel.c | 4 +--
.../arm/boards/technexion-pico-hobbit/board.c | 8 ++---
.../boards/technexion-pico-hobbit/lowlevel.c | 6 ++--
arch/arm/boards/technexion-wandboard/board.c | 8 ++---
.../boards/technexion-wandboard/lowlevel.c | 12 ++++----
arch/arm/boards/tqma53/board.c | 2 +-
arch/arm/boards/tqma53/lowlevel.c | 8 ++---
arch/arm/boards/tqma6ulx/board.c | 4 +--
| 2 +-
arch/arm/boards/tqma6ulx/lowlevel.c | 6 ++--
arch/arm/boards/tqma6x/board.c | 12 ++++----
| 4 +--
| 4 +--
arch/arm/boards/tqma6x/lowlevel.c | 2 +-
arch/arm/boards/tqma8mpxl/board.c | 4 +--
arch/arm/boards/tqma8mpxl/lowlevel.c | 14 ++++-----
arch/arm/boards/udoo-neo/board.c | 4 +--
arch/arm/boards/udoo-neo/lowlevel.c | 4 +--
arch/arm/boards/udoo/board.c | 16 +++++-----
| 4 +--
arch/arm/boards/udoo/lowlevel.c | 2 +-
.../variscite-dt8mcustomboard-imx8mp/board.c | 4 +--
.../lowlevel.c | 14 ++++-----
arch/arm/boards/variscite-mx6/board.c | 10 +++----
| 4 +--
arch/arm/boards/variscite-mx6/lowlevel.c | 2 +-
arch/arm/boards/webasto-ccbv2/board.c | 4 +--
| 2 +-
| 2 +-
arch/arm/boards/webasto-ccbv2/lowlevel.c | 6 ++--
arch/arm/boards/zii-imx51-rdu1/board.c | 4 +--
arch/arm/boards/zii-imx51-rdu1/lowlevel.c | 8 ++---
arch/arm/boards/zii-imx6q-rdu2/board.c | 4 +--
arch/arm/boards/zii-imx6q-rdu2/lowlevel.c | 10 +++----
arch/arm/boards/zii-imx7d-dev/board.c | 4 +--
| 2 +-
arch/arm/boards/zii-imx7d-dev/lowlevel.c | 10 +++----
arch/arm/boards/zii-imx8mq-dev/board.c | 2 +-
arch/arm/boards/zii-imx8mq-dev/lowlevel.c | 12 ++++----
arch/arm/boards/zii-vf610-dev/board.c | 2 +-
| 12 ++++----
arch/arm/boards/zii-vf610-dev/lowlevel.c | 10 +++----
arch/arm/include/asm/debug_ll.h | 6 ++--
arch/arm/mach-imx/atf.c | 8 ++---
arch/arm/mach-imx/boot.c | 30 +++++++++----------
arch/arm/mach-imx/bootrom-cmd.c | 4 +--
arch/arm/mach-imx/cpu_init.c | 8 ++---
arch/arm/mach-imx/devices.c | 2 +-
arch/arm/mach-imx/esdctl-v4.c | 4 +--
arch/arm/mach-imx/esdctl.c | 30 +++++++++----------
arch/arm/mach-imx/external-nand-boot.c | 16 +++++-----
arch/arm/mach-imx/iim.c | 10 +++----
arch/arm/mach-imx/imx-bbu-external-nand.c | 4 +--
arch/arm/mach-imx/imx-bbu-internal.c | 4 +--
arch/arm/mach-imx/imx.c | 6 ++--
arch/arm/mach-imx/imx1.c | 10 +++----
arch/arm/mach-imx/imx21.c | 8 ++---
arch/arm/mach-imx/imx25.c | 8 ++---
arch/arm/mach-imx/imx27.c | 10 +++----
arch/arm/mach-imx/imx31.c | 6 ++--
arch/arm/mach-imx/imx35.c | 10 +++----
arch/arm/mach-imx/imx5.c | 4 +--
arch/arm/mach-imx/imx50.c | 14 ++++-----
arch/arm/mach-imx/imx51.c | 14 ++++-----
arch/arm/mach-imx/imx53.c | 14 ++++-----
arch/arm/mach-imx/imx6-mmdc.c | 6 ++--
arch/arm/mach-imx/imx6.c | 18 +++++------
arch/arm/mach-imx/imx7.c | 10 +++----
arch/arm/mach-imx/imx8m.c | 16 +++++-----
arch/arm/mach-imx/nand.c | 12 ++++----
arch/arm/mach-imx/romapi.c | 8 ++---
arch/arm/mach-imx/tzasc.c | 4 +--
arch/arm/mach-imx/vf610.c | 10 +++----
arch/arm/mach-imx/xload-common.c | 6 ++--
arch/arm/mach-imx/xload-gpmi-nand.c | 8 ++---
arch/arm/mach-imx/xload-imx-nand.c | 8 ++---
arch/arm/mach-imx/xload-spi.c | 6 ++--
common/filetype.c | 2 +-
common/imx-bbu-nand-fcb.c | 8 +++--
drivers/ata/sata-imx.c | 4 +--
drivers/clk/imx/clk-imx1.c | 2 +-
drivers/clk/imx/clk-imx21.c | 2 +-
drivers/clk/imx/clk-imx25.c | 2 +-
drivers/clk/imx/clk-imx27.c | 6 ++--
drivers/clk/imx/clk-imx31.c | 2 +-
drivers/clk/imx/clk-imx35.c | 2 +-
drivers/clk/imx/clk-imx5.c | 6 ++--
drivers/clk/imx/clk-imx6.c | 6 ++--
drivers/clk/imx/clk-imx6sl.c | 6 ++--
drivers/clk/imx/clk-imx6sx.c | 6 ++--
drivers/clk/imx/clk-imx6ul.c | 6 ++--
drivers/clk/imx/clk-imx7.c | 4 +--
drivers/clk/imx/clk-vf610.c | 4 +--
drivers/ddr/imx8m/ddr_init.c | 6 ++--
drivers/ddr/imx8m/ddrphy_train.c | 2 +-
drivers/ddr/imx8m/ddrphy_utils.c | 4 +--
drivers/hab/hab.c | 8 ++---
drivers/hab/habv3.c | 2 +-
drivers/hab/habv4.c | 4 +--
drivers/mci/imx-esdhc-pbl.c | 14 ++++-----
drivers/mtd/nand/nand_imx.c | 4 +--
drivers/mtd/nand/nand_mxs.c | 2 +-
drivers/nvmem/ocotp.c | 7 ++++-
drivers/pinctrl/imx-iomux-v1.c | 2 +-
drivers/pinctrl/imx-iomux-v3.c | 4 +--
drivers/pinctrl/pinctrl-vf610.c | 2 +-
drivers/spi/dspi_spi.c | 4 +--
drivers/spi/imx_spi.c | 4 +--
drivers/usb/gadget/fsl_udc_pbl.c | 6 ++--
drivers/usb/imx/imx-usb-misc.c | 4 +--
drivers/video/imx-ipu-v3/imx-hdmi.c | 4 +--
drivers/video/imx-ipu-v3/imx-ldb.c | 4 +--
drivers/video/imx-ipu-v3/ipu-common.c | 8 ++---
.../include/mach => include/mach/imx}/atf.h | 0
.../include/mach => include/mach/imx}/bbu.h | 0
.../include/mach => include/mach/imx}/ccm.h | 0
.../mach/imx}/clock-imx51_53.h | 0
.../mach => include/mach/imx}/clock-imx6.h | 0
.../mach => include/mach/imx}/clock-vf610.h | 0
.../mach => include/mach/imx}/debug_ll.h | 26 ++++++++--------
.../mach => include/mach/imx}/devices-imx1.h | 4 +--
.../mach => include/mach/imx}/devices-imx21.h | 4 +--
.../mach => include/mach/imx}/devices-imx25.h | 4 +--
.../mach => include/mach/imx}/devices-imx27.h | 4 +--
.../mach => include/mach/imx}/devices-imx31.h | 4 +--
.../mach => include/mach/imx}/devices-imx35.h | 4 +--
.../mach => include/mach/imx}/devices-imx50.h | 4 +--
.../mach => include/mach/imx}/devices-imx51.h | 4 +--
.../mach => include/mach/imx}/devices-imx53.h | 4 +--
.../mach => include/mach/imx}/devices-imx6.h | 4 +--
.../mach => include/mach/imx}/devices.h | 6 ++--
.../mach => include/mach/imx}/esdctl-v4.h | 0
.../mach => include/mach/imx}/esdctl.h | 0
| 2 +-
| 0
| 0
| 0
.../vf610-iomux-ddr-default.imxcfg | 0
.../mach => include/mach/imx}/generic.h | 2 +-
.../mach/imx}/habv3-imx25-gencsf.h | 0
.../mach/imx}/habv4-imx6-gencsf-template.h | 0
.../mach/imx}/habv4-imx6-gencsf.h | 2 +-
.../mach/imx}/habv4-imx6ull-gencsf.h | 2 +-
.../mach/imx}/habv4-imx8-gencsf.h | 0
.../include/mach => include/mach/imx}/iim.h | 0
.../mach => include/mach/imx}/imx-gpio.h | 0
| 0
.../mach => include/mach/imx}/imx-ipu-fb.h | 0
.../mach => include/mach/imx}/imx-nand.h | 0
.../mach => include/mach/imx}/imx-pll.h | 0
.../mach => include/mach/imx}/imx1-regs.h | 0
.../mach => include/mach/imx}/imx21-regs.h | 0
.../mach => include/mach/imx}/imx25-fusemap.h | 2 +-
.../mach => include/mach/imx}/imx25-regs.h | 0
.../mach => include/mach/imx}/imx27-regs.h | 0
.../mach => include/mach/imx}/imx31-regs.h | 0
.../mach => include/mach/imx}/imx35-regs.h | 0
.../include/mach => include/mach/imx}/imx5.h | 0
.../mach => include/mach/imx}/imx50-regs.h | 0
.../mach => include/mach/imx}/imx51-regs.h | 0
.../mach => include/mach/imx}/imx53-regs.h | 0
.../mach => include/mach/imx}/imx6-anadig.h | 0
.../mach => include/mach/imx}/imx6-ddr-regs.h | 0
.../mach => include/mach/imx}/imx6-fusemap.h | 2 +-
.../mach => include/mach/imx}/imx6-mmdc.h | 2 +-
.../mach => include/mach/imx}/imx6-regs.h | 0
.../include/mach => include/mach/imx}/imx6.h | 6 ++--
.../mach/imx}/imx6dl-ddr-regs.h | 0
.../mach/imx}/imx6q-ddr-regs.h | 0
.../mach => include/mach/imx}/imx7-ccm-regs.h | 0
.../mach => include/mach/imx}/imx7-ddr-regs.h | 0
.../mach => include/mach/imx}/imx7-regs.h | 0
.../include/mach => include/mach/imx}/imx7.h | 6 ++--
.../mach/imx}/imx8m-ccm-regs.h | 2 +-
.../mach => include/mach/imx}/imx8m-regs.h | 0
.../mach => include/mach/imx}/imx8mm-regs.h | 2 +-
.../mach => include/mach/imx}/imx8mn-regs.h | 2 +-
.../mach => include/mach/imx}/imx8mp-regs.h | 2 +-
.../mach => include/mach/imx}/imx8mq-regs.h | 2 +-
.../mach => include/mach/imx}/imx8mq.h | 12 ++++----
.../mach => include/mach/imx}/imx_cpu_types.h | 0
.../mach => include/mach/imx}/iomux-mx1.h | 2 +-
.../mach => include/mach/imx}/iomux-mx21.h | 4 +--
.../mach => include/mach/imx}/iomux-mx25.h | 2 +-
.../mach => include/mach/imx}/iomux-mx27.h | 4 +--
.../mach => include/mach/imx}/iomux-mx2x.h | 0
.../mach => include/mach/imx}/iomux-mx31.h | 0
.../mach => include/mach/imx}/iomux-mx35.h | 2 +-
.../mach => include/mach/imx}/iomux-mx50.h | 2 +-
.../mach => include/mach/imx}/iomux-mx51.h | 2 +-
.../mach => include/mach/imx}/iomux-mx53.h | 2 +-
.../mach => include/mach/imx}/iomux-mx6.h | 2 +-
.../mach => include/mach/imx}/iomux-mx6ul.h | 2 +-
.../mach => include/mach/imx}/iomux-mx7.h | 4 +--
.../mach => include/mach/imx}/iomux-mx8m.h | 2 +-
.../mach => include/mach/imx}/iomux-mx8mm.h | 6 ++--
.../mach => include/mach/imx}/iomux-mx8mn.h | 6 ++--
.../mach => include/mach/imx}/iomux-mx8mp.h | 6 ++--
.../mach => include/mach/imx}/iomux-mx8mq.h | 6 ++--
.../mach => include/mach/imx}/iomux-v1.h | 6 ++--
.../mach => include/mach/imx}/iomux-v3.h | 0
.../mach => include/mach/imx}/iomux-vf610.h | 2 +-
.../mach => include/mach/imx}/ocotp-fusemap.h | 2 +-
.../include/mach => include/mach/imx}/ocotp.h | 0
.../mach => include/mach/imx}/reset-reason.h | 0
.../mach => include/mach/imx}/revision.h | 0
.../mach => include/mach/imx}/romapi.h | 2 +-
.../include/mach => include/mach/imx}/spi.h | 0
.../include/mach => include/mach/imx}/tzasc.h | 0
.../include/mach => include/mach/imx}/usb.h | 0
.../mach/imx}/vf610-ddrmc-regs.h | 0
.../mach => include/mach/imx}/vf610-ddrmc.h | 2 +-
.../mach => include/mach/imx}/vf610-fusemap.h | 2 +-
.../mach/imx}/vf610-iomux-regs.h | 0
.../mach => include/mach/imx}/vf610-regs.h | 0
.../include/mach => include/mach/imx}/vf610.h | 6 ++--
.../include/mach => include/mach/imx}/weim.h | 0
.../include/mach => include/mach/imx}/xload.h | 0
scripts/imx/Makefile | 10 +++----
scripts/imx/imx.h | 4 +--
386 files changed, 965 insertions(+), 956 deletions(-)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/atf.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/bbu.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/ccm.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/clock-imx51_53.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/clock-imx6.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/clock-vf610.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/debug_ll.h (89%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx1.h (81%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx21.h (92%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx25.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx27.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx31.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx35.h (96%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx50.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx51.h (98%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx53.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices-imx6.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/devices.h (94%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/esdctl-v4.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/esdctl.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/flash-header/imx7d-ddr-sabresd.imxcfg (98%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/flash-header/vf610-ddr-cr-default.imxcfg (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/flash-header/vf610-ddr-phy-default.imxcfg (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/flash-header/vf610-ddr-pll2-400mhz.imxcfg (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/flash-header/vf610-iomux-ddr-default.imxcfg (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/generic.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/habv3-imx25-gencsf.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/habv4-imx6-gencsf-template.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/habv4-imx6-gencsf.h (70%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/habv4-imx6ull-gencsf.h (60%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/habv4-imx8-gencsf.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iim.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx-gpio.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx-header.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx-ipu-fb.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx-nand.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx-pll.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx1-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx21-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx25-fusemap.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx25-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx27-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx31-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx35-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx5.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx50-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx51-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx53-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx6-anadig.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx6-ddr-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx6-fusemap.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx6-mmdc.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx6-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx6.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx6dl-ddr-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx6q-ddr-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx7-ccm-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx7-ddr-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx7-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx7.h (92%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx8m-ccm-regs.h (98%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx8m-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx8mm-regs.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx8mn-regs.h (96%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx8mp-regs.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx8mq-regs.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx8mq.h (91%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/imx_cpu_types.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx1.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx21.h (98%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx25.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx27.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx2x.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx31.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx35.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx50.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx51.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx53.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx6.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx6ul.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx7.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx8m.h (95%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx8mm.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx8mn.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx8mp.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-mx8mq.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-v1.h (95%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-v3.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/iomux-vf610.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/ocotp-fusemap.h (99%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/ocotp.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/reset-reason.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/revision.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/romapi.h (97%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/spi.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/tzasc.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/usb.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/vf610-ddrmc-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/vf610-ddrmc.h (93%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/vf610-fusemap.h (95%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/vf610-iomux-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/vf610-regs.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/vf610.h (92%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/weim.h (100%)
rename {arch/arm/mach-imx/include/mach => include/mach/imx}/xload.h (100%)
diff --git a/arch/arm/boards/ac-sxb/board.c b/arch/arm/boards/ac-sxb/board.c
index 3ea40dfb7d..d631bb543a 100644
--- a/arch/arm/boards/ac-sxb/board.c
+++ b/arch/arm/boards/ac-sxb/board.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int sxb_coredevices_init(void)
{
diff --git a/arch/arm/boards/ac-sxb/lowlevel.c b/arch/arm/boards/ac-sxb/lowlevel.c
index a264549683..b7d24399b4 100644
--- a/arch/arm/boards/ac-sxb/lowlevel.c
+++ b/arch/arm/boards/ac-sxb/lowlevel.c
@@ -8,16 +8,16 @@
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx7-ccm-regs.h>
-#include <mach/iomux-mx7.h>
-#include <mach/debug_ll.h>
+#include <mach/imx/imx7-ccm-regs.h>
+#include <mach/imx/iomux-mx7.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
-#include <mach/esdctl.h>
-#include <mach/xload.h>
-#include <mach/imx7-ddr-regs.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/imx7-ddr-regs.h>
struct reginit {
u32 address;
diff --git a/arch/arm/boards/advantech-mx6/board.c b/arch/arm/boards/advantech-mx6/board.c
index 67149d8994..8261875d63 100644
--- a/arch/arm/boards/advantech-mx6/board.c
+++ b/arch/arm/boards/advantech-mx6/board.c
@@ -5,7 +5,7 @@
#include <init.h>
#include <platform_data/eth-fec.h>
#include <bootsource.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int ar8035_phy_fixup(struct phy_device *dev)
{
diff --git a/arch/arm/boards/advantech-mx6/lowlevel.c b/arch/arm/boards/advantech-mx6/lowlevel.c
index d762f0e9a7..ea77af8a31 100644
--- a/arch/arm/boards/advantech-mx6/lowlevel.c
+++ b/arch/arm/boards/advantech-mx6/lowlevel.c
@@ -6,9 +6,9 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <image-metadata.h>
-#include <mach/generic.h>
-#include <mach/esdctl.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/iomux-mx6.h>
#include <linux/sizes.h>
static inline void setup_uart(void)
diff --git a/arch/arm/boards/boundarydevices-nitrogen6/board.c b/arch/arm/boards/boundarydevices-nitrogen6/board.c
index dc2d5aa41c..a57cef4fbe 100644
--- a/arch/arm/boards/boundarydevices-nitrogen6/board.c
+++ b/arch/arm/boards/boundarydevices-nitrogen6/board.c
@@ -4,10 +4,10 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <linux/phy.h>
#include <linux/micrel_phy.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6.h>
static int nitrogen6x_devices_init(void)
{
--git a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6dl-1g.imxcfg b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6dl-1g.imxcfg
index 8282d4140c..8aa14f3080 100644
--- a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6dl-1g.imxcfg
+++ b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6dl-1g.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
#include "ram-base.imxcfg"
#include "800mhz_4x128mx16.imxcfg"
--git a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6dl-2g.imxcfg b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6dl-2g.imxcfg
index 9ef9b5789f..5544c25e36 100644
--- a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6dl-2g.imxcfg
+++ b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6dl-2g.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
#include "ram-base.imxcfg"
#include "800mhz_4x256mx16.imxcfg"
--git a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg
index 5c5af546a7..4cde5c0818 100644
--- a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg
+++ b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
#include "ram-base.imxcfg"
#include "1066mhz_4x128mx16.imxcfg"
--git a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6q-2g.imxcfg b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6q-2g.imxcfg
index 58b9dc7468..4b38b1bfc9 100644
--- a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6q-2g.imxcfg
+++ b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6q-2g.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
#include "ram-base.imxcfg"
#include "1066mhz_4x256mx16.imxcfg"
--git a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6qp-max.imxcfg b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6qp-max.imxcfg
index 4ab0a653bd..2d43222530 100644
--- a/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6qp-max.imxcfg
+++ b/arch/arm/boards/boundarydevices-nitrogen6/flash-header-nitrogen6qp-max.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
#include "ram-base.imxcfg"
#include "1066mhz_4x512mx16-qp.imxcfg"
diff --git a/arch/arm/boards/boundarydevices-nitrogen6/lowlevel.c b/arch/arm/boards/boundarydevices-nitrogen6/lowlevel.c
index 9312a1d4aa..8ab5116d8e 100644
--- a/arch/arm/boards/boundarydevices-nitrogen6/lowlevel.c
+++ b/arch/arm/boards/boundarydevices-nitrogen6/lowlevel.c
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
-#include <mach/generic.h>
-#include <mach/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/esdctl.h>
#include <asm/barebox-arm.h>
extern char __dtb_imx6q_nitrogen6x_start[];
diff --git a/arch/arm/boards/ccxmx51/ccxmx51.c b/arch/arm/boards/ccxmx51/ccxmx51.c
index 4288efe2e0..4ea71fe26b 100644
--- a/arch/arm/boards/ccxmx51/ccxmx51.c
+++ b/arch/arm/boards/ccxmx51/ccxmx51.c
@@ -16,12 +16,12 @@
#include <mfd/mc13xxx.h>
#include <mfd/mc13892.h>
-#include <mach/bbu.h>
-#include <mach/esdctl.h>
-#include <mach/iim.h>
-#include <mach/imx5.h>
-#include <mach/imx51-regs.h>
-#include <mach/revision.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/iim.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/imx51-regs.h>
+#include <mach/imx/revision.h>
static const struct ccxmx_ident {
char *id_string;
diff --git a/arch/arm/boards/ccxmx51/lowlevel.c b/arch/arm/boards/ccxmx51/lowlevel.c
index 49bc7bfe32..1fa55346eb 100644
--- a/arch/arm/boards/ccxmx51/lowlevel.c
+++ b/arch/arm/boards/ccxmx51/lowlevel.c
@@ -3,13 +3,13 @@
#include <common.h>
#include <debug_ll.h>
-#include <mach/clock-imx51_53.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/iomux-mx51.h>
+#include <mach/imx/clock-imx51_53.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/iomux-mx51.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
-#include <mach/imx51-regs.h>
+#include <mach/imx/imx51-regs.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/boards/ccxmx53/board.c b/arch/arm/boards/ccxmx53/board.c
index b0faf8d280..06fc3d715f 100644
--- a/arch/arm/boards/ccxmx53/board.c
+++ b/arch/arm/boards/ccxmx53/board.c
@@ -10,13 +10,13 @@
#include <gpio.h>
#include <generated/mach-types.h>
-#include <mach/imx5.h>
-#include <mach/generic.h>
-#include <mach/imx53-regs.h>
-#include <mach/esdctl.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/esdctl.h>
#include <asm/armlinux.h>
-#include <mach/bbu.h>
-#include <mach/iim.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/iim.h>
struct ccwmx53_ident {
diff --git a/arch/arm/boards/ccxmx53/lowlevel.c b/arch/arm/boards/ccxmx53/lowlevel.c
index 5833ad4739..74fde99337 100644
--- a/arch/arm/boards/ccxmx53/lowlevel.c
+++ b/arch/arm/boards/ccxmx53/lowlevel.c
@@ -5,9 +5,9 @@
#include <common.h>
#include <linux/sizes.h>
#include <io.h>
-#include <mach/imx53-regs.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
#include <image-metadata.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/cm-fx6/board.c b/arch/arm/boards/cm-fx6/board.c
index 5a1110860f..c70989476b 100644
--- a/arch/arm/boards/cm-fx6/board.c
+++ b/arch/arm/boards/cm-fx6/board.c
@@ -4,13 +4,13 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/imx6-regs.h>
-#include <mach/bbu.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/bbu.h>
#include <asm/armlinux.h>
#include <linux/phy.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6.h>
#include <net.h>
static int phy_fixup(struct phy_device *phydev)
diff --git a/arch/arm/boards/cm-fx6/lowlevel.c b/arch/arm/boards/cm-fx6/lowlevel.c
index 27c15f5412..137ae3e107 100644
--- a/arch/arm/boards/cm-fx6/lowlevel.c
+++ b/arch/arm/boards/cm-fx6/lowlevel.c
@@ -4,16 +4,16 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <debug_ll.h>
#include <io.h>
-#include <mach/imx6-mmdc.h>
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6.h>
-#include <mach/xload.h>
-#include <mach/esdctl.h>
+#include <mach/imx/imx6-mmdc.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/esdctl.h>
#include <serial/imx-uart.h>
enum ddr_config {
diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c
index 76fb17b4bd..9adb3ee0f8 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/board.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/board.c
@@ -17,12 +17,12 @@
#include <asm/armlinux.h>
#include <asm/io.h>
-#include <mach/devices-imx6.h>
-#include <mach/imx6-regs.h>
-#include <mach/iomux-mx6.h>
-#include <mach/generic.h>
-#include <mach/imx6.h>
-#include <mach/bbu.h>
+#include <mach/imx/devices-imx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/iomux-mx6.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/bbu.h>
#define RQ7_GPIO_ENET_PHYADD2 IMX_GPIO_NR(6, 30)
#define RQ7_GPIO_ENET_MODE0 IMX_GPIO_NR(6, 25)
diff --git a/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c b/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
index 8ac9317cb0..9566e492e3 100644
--- a/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
+++ b/arch/arm/boards/datamodul-edm-qmx6/lowlevel.c
@@ -9,8 +9,8 @@
#include <asm/mmu.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx6-mmdc.h>
-#include <mach/generic.h>
+#include <mach/imx/imx6-mmdc.h>
+#include <mach/imx/generic.h>
static void sdram_init(void)
{
diff --git a/arch/arm/boards/dfi-fs700-m60/board.c b/arch/arm/boards/dfi-fs700-m60/board.c
index 99e36da2ec..6d8494d086 100644
--- a/arch/arm/boards/dfi-fs700-m60/board.c
+++ b/arch/arm/boards/dfi-fs700-m60/board.c
@@ -20,9 +20,9 @@
#include <asm/mmu.h>
#include <asm/io.h>
-#include <mach/imx6-regs.h>
-#include <mach/generic.h>
-#include <mach/bbu.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/bbu.h>
/*
* This board can have 512MiB, 1GiB or 2GiB of SDRAM. The actual amount of SDRAM
--git a/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6q-micron.imxcfg b/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6q-micron.imxcfg
index 9f82165066..8eec14b014 100644
--- a/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6q-micron.imxcfg
+++ b/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6q-micron.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x27800000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_DRAM_SDQS5 0x00000030
wm 32 MX6_IOM_DRAM_DQM5 0x00020030
--git a/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6q-nanya.imxcfg b/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6q-nanya.imxcfg
index ccb3e68487..9573459bd5 100644
--- a/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6q-nanya.imxcfg
+++ b/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6q-nanya.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x27800000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000C0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
--git a/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6s.imxcfg b/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6s.imxcfg
index 5b8bc26257..b6318e8812 100644
--- a/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6s.imxcfg
+++ b/arch/arm/boards/dfi-fs700-m60/flash-header-fs700-m60-6s.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x17800000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000c0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
diff --git a/arch/arm/boards/dfi-fs700-m60/lowlevel.c b/arch/arm/boards/dfi-fs700-m60/lowlevel.c
index d898cb5c1e..1ca0d6f090 100644
--- a/arch/arm/boards/dfi-fs700-m60/lowlevel.c
+++ b/arch/arm/boards/dfi-fs700-m60/lowlevel.c
@@ -8,8 +8,8 @@
#include <asm/mmu.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx6-regs.h>
-#include <mach/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/generic.h>
#include <debug_ll.h>
diff --git a/arch/arm/boards/digi-ccimx6ulsom/board.c b/arch/arm/boards/digi-ccimx6ulsom/board.c
index b4fcc17e09..ef6828c02c 100644
--- a/arch/arm/boards/digi-ccimx6ulsom/board.c
+++ b/arch/arm/boards/digi-ccimx6ulsom/board.c
@@ -3,8 +3,8 @@
#include <common.h>
#include <init.h>
-#include <mach/generic.h>
-#include <mach/bbu.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/bbu.h>
static int digi_ccimx6ulsbcpro_device_init(void)
{
diff --git a/arch/arm/boards/digi-ccimx6ulsom/lowlevel.c b/arch/arm/boards/digi-ccimx6ulsom/lowlevel.c
index ba562a501f..08651f0779 100644
--- a/arch/arm/boards/digi-ccimx6ulsom/lowlevel.c
+++ b/arch/arm/boards/digi-ccimx6ulsom/lowlevel.c
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
#include <asm/cache.h>
diff --git a/arch/arm/boards/efika-mx-smartbook/board.c b/arch/arm/boards/efika-mx-smartbook/board.c
index 0d979876a5..f5a3f3cec4 100644
--- a/arch/arm/boards/efika-mx-smartbook/board.c
+++ b/arch/arm/boards/efika-mx-smartbook/board.c
@@ -19,13 +19,13 @@
#include <asm/armlinux.h>
-#include <mach/devices-imx51.h>
-#include <mach/imx51-regs.h>
-#include <mach/iomux-mx51.h>
-#include <mach/revision.h>
-#include <mach/generic.h>
-#include <mach/imx5.h>
-#include <mach/bbu.h>
+#include <mach/imx/devices-imx51.h>
+#include <mach/imx/imx51-regs.h>
+#include <mach/imx/iomux-mx51.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/bbu.h>
#define GPIO_BACKLIGHT_POWER IMX_GPIO_NR(4, 12)
#define GPIO_BACKLIGHT_PWM IMX_GPIO_NR(1, 2)
diff --git a/arch/arm/boards/efika-mx-smartbook/lowlevel.c b/arch/arm/boards/efika-mx-smartbook/lowlevel.c
index 5375578c94..cf2f145e74 100644
--- a/arch/arm/boards/efika-mx-smartbook/lowlevel.c
+++ b/arch/arm/boards/efika-mx-smartbook/lowlevel.c
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx5.h>
+#include <mach/imx/imx5.h>
extern char __dtb_imx51_genesi_efika_sb_start[];
diff --git a/arch/arm/boards/element14-warp7/board.c b/arch/arm/boards/element14-warp7/board.c
index 50b628ba58..ec967d1c4c 100644
--- a/arch/arm/boards/element14-warp7/board.c
+++ b/arch/arm/boards/element14-warp7/board.c
@@ -4,10 +4,10 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
static int warp7_devices_init(void)
--git a/arch/arm/boards/element14-warp7/flash-header-mx7-warp.imxcfg b/arch/arm/boards/element14-warp7/flash-header-mx7-warp.imxcfg
index 798f2cbcb0..c17321ad3a 100644
--- a/arch/arm/boards/element14-warp7/flash-header-mx7-warp.imxcfg
+++ b/arch/arm/boards/element14-warp7/flash-header-mx7-warp.imxcfg
@@ -13,7 +13,7 @@ soc imx7
loadaddr 0x80000000
ivtofs 0x400
-#include <mach/imx7-ddr-regs.h>
+#include <mach/imx/imx7-ddr-regs.h>
wm 32 0x30340004 0x4F400005
diff --git a/arch/arm/boards/element14-warp7/lowlevel.c b/arch/arm/boards/element14-warp7/lowlevel.c
index 94b7eb598b..5581b958c7 100644
--- a/arch/arm/boards/element14-warp7/lowlevel.c
+++ b/arch/arm/boards/element14-warp7/lowlevel.c
@@ -4,10 +4,10 @@
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
extern char __dtb_imx7s_warp_start[];
diff --git a/arch/arm/boards/eltec-hipercam/board.c b/arch/arm/boards/eltec-hipercam/board.c
index e192c4c2f5..b8ad17992c 100644
--- a/arch/arm/boards/eltec-hipercam/board.c
+++ b/arch/arm/boards/eltec-hipercam/board.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <init.h>
#include <bbu.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int hipercam_init(void)
{
--git a/arch/arm/boards/eltec-hipercam/flash-header-eltec-hipercam.imxcfg b/arch/arm/boards/eltec-hipercam/flash-header-eltec-hipercam.imxcfg
index e53f1c107f..3a96910708 100644
--- a/arch/arm/boards/eltec-hipercam/flash-header-eltec-hipercam.imxcfg
+++ b/arch/arm/boards/eltec-hipercam/flash-header-eltec-hipercam.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x10000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
wm 32 MX6_IOM_DRAM_SDQS0 0x00000030
wm 32 MX6_IOM_DRAM_SDQS1 0x00000030
diff --git a/arch/arm/boards/eltec-hipercam/lowlevel.c b/arch/arm/boards/eltec-hipercam/lowlevel.c
index 7baed55706..8e1eb1c4d3 100644
--- a/arch/arm/boards/eltec-hipercam/lowlevel.c
+++ b/arch/arm/boards/eltec-hipercam/lowlevel.c
@@ -9,7 +9,7 @@
#include <asm/mmu.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
static void setup_uart(void)
{
diff --git a/arch/arm/boards/embedsky-e9/board.c b/arch/arm/boards/embedsky-e9/board.c
index bca714f977..f7a3f1bdb8 100644
--- a/arch/arm/boards/embedsky-e9/board.c
+++ b/arch/arm/boards/embedsky-e9/board.c
@@ -13,25 +13,25 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <linux/phy.h>
#include <asm/io.h>
#include <asm/mmu.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
#include <net.h>
-#include <mach/imx6.h>
-#include <mach/devices-imx6.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/devices-imx6.h>
+#include <mach/imx/iomux-mx6.h>
#include <spi/spi.h>
-#include <mach/spi.h>
-#include <mach/usb.h>
+#include <mach/imx/spi.h>
+#include <mach/imx/usb.h>
#include <envfs.h>
#include <bootsource.h>
#include <bbu.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#define PHY_ID_RTL8211E 0x001cc915
#define PHY_ID_MASK 0xffffffff
--git a/arch/arm/boards/embedsky-e9/flash-header-e9.imxcfg b/arch/arm/boards/embedsky-e9/flash-header-e9.imxcfg
index 474ad3a159..19e0039980 100644
--- a/arch/arm/boards/embedsky-e9/flash-header-e9.imxcfg
+++ b/arch/arm/boards/embedsky-e9/flash-header-e9.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x27800000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000c0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
diff --git a/arch/arm/boards/embedsky-e9/lowlevel.c b/arch/arm/boards/embedsky-e9/lowlevel.c
index 1cda6e07e2..fddc88df52 100644
--- a/arch/arm/boards/embedsky-e9/lowlevel.c
+++ b/arch/arm/boards/embedsky-e9/lowlevel.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/embest-marsboard/board.c b/arch/arm/boards/embest-marsboard/board.c
index 028e1d7bb1..7835a9265a 100644
--- a/arch/arm/boards/embest-marsboard/board.c
+++ b/arch/arm/boards/embest-marsboard/board.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <init.h>
#include <envfs.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <linux/phy.h>
#include <deep-probe.h>
diff --git a/arch/arm/boards/embest-marsboard/lowlevel.c b/arch/arm/boards/embest-marsboard/lowlevel.c
index 9e20a2ec06..d1af90ba44 100644
--- a/arch/arm/boards/embest-marsboard/lowlevel.c
+++ b/arch/arm/boards/embest-marsboard/lowlevel.c
@@ -6,9 +6,9 @@
#include <common.h>
#include <io.h>
#include <asm/barebox-arm.h>
-#include <mach/imx6.h>
-#include <mach/esdctl.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/iomux-mx6.h>
#include <debug_ll.h>
static inline void setup_uart(void)
diff --git a/arch/arm/boards/embest-riotboard/board.c b/arch/arm/boards/embest-riotboard/board.c
index cd912f79e5..ebaff48388 100644
--- a/arch/arm/boards/embest-riotboard/board.c
+++ b/arch/arm/boards/embest-riotboard/board.c
@@ -10,10 +10,10 @@
#include <envfs.h>
#include <gpio.h>
#include <init.h>
-#include <mach/generic.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx6.h>
-#include <mach/bbu.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/bbu.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include <linux/sizes.h>
#include <linux/phy.h>
--git a/arch/arm/boards/embest-riotboard/flash-header-embest-riotboard.imxcfg b/arch/arm/boards/embest-riotboard/flash-header-embest-riotboard.imxcfg
index a005b500de..5464e2461d 100644
--- a/arch/arm/boards/embest-riotboard/flash-header-embest-riotboard.imxcfg
+++ b/arch/arm/boards/embest-riotboard/flash-header-embest-riotboard.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x20000000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000c0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
diff --git a/arch/arm/boards/embest-riotboard/lowlevel.c b/arch/arm/boards/embest-riotboard/lowlevel.c
index 4093bf3bba..b8a7983aa8 100644
--- a/arch/arm/boards/embest-riotboard/lowlevel.c
+++ b/arch/arm/boards/embest-riotboard/lowlevel.c
@@ -9,7 +9,7 @@
#include <asm/sections.h>
#include <asm/cache.h>
#include <asm/mmu.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6.h>
extern char __dtb_imx6s_riotboard_start[];
diff --git a/arch/arm/boards/freescale-mx51-babbage/board.c b/arch/arm/boards/freescale-mx51-babbage/board.c
index c0c3e88039..be313c2b69 100644
--- a/arch/arm/boards/freescale-mx51-babbage/board.c
+++ b/arch/arm/boards/freescale-mx51-babbage/board.c
@@ -6,26 +6,26 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/imx51-regs.h>
+#include <mach/imx/imx51-regs.h>
#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <fs.h>
#include <of.h>
#include <fcntl.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <nand.h>
#include <notifier.h>
#include <spi/spi.h>
#include <io.h>
#include <asm/mmu.h>
-#include <mach/imx5.h>
-#include <mach/imx-nand.h>
-#include <mach/spi.h>
-#include <mach/generic.h>
-#include <mach/iomux-mx51.h>
-#include <mach/devices-imx51.h>
-#include <mach/revision.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/imx-nand.h>
+#include <mach/imx/spi.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/iomux-mx51.h>
+#include <mach/imx/devices-imx51.h>
+#include <mach/imx/revision.h>
#define MX51_CCM_CACRR 0x10
diff --git a/arch/arm/boards/freescale-mx51-babbage/lowlevel.c b/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
index e95324e645..5d41f34fd8 100644
--- a/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
+++ b/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
-#include <mach/clock-imx51_53.h>
-#include <mach/iomux-mx51.h>
+#include <mach/imx/clock-imx51_53.h>
+#include <mach/imx/iomux-mx51.h>
#include <common.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/freescale-mx51-babbage/power.c b/arch/arm/boards/freescale-mx51-babbage/power.c
index ce44f3ae42..48dc74dd77 100644
--- a/arch/arm/boards/freescale-mx51-babbage/power.c
+++ b/arch/arm/boards/freescale-mx51-babbage/power.c
@@ -5,8 +5,8 @@
#include <common.h>
#include <init.h>
#include <notifier.h>
-#include <mach/revision.h>
-#include <mach/imx5.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/imx5.h>
#include <mfd/mc13xxx.h>
static void babbage_power_init(struct mc13xxx *mc13xxx)
diff --git a/arch/arm/boards/freescale-mx53-qsb/board.c b/arch/arm/boards/freescale-mx53-qsb/board.c
index ee2277cfc7..92dd164d3c 100644
--- a/arch/arm/boards/freescale-mx53-qsb/board.c
+++ b/arch/arm/boards/freescale-mx53-qsb/board.c
@@ -19,12 +19,12 @@
#include <generated/mach-types.h>
-#include <mach/imx53-regs.h>
-#include <mach/revision.h>
-#include <mach/generic.h>
-#include <mach/imx5.h>
-#include <mach/bbu.h>
-#include <mach/iim.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/iim.h>
/*
* Revision to be passed to kernel. The kernel provided
diff --git a/arch/arm/boards/freescale-mx53-qsb/lowlevel.c b/arch/arm/boards/freescale-mx53-qsb/lowlevel.c
index e845fa4a3e..5870f266d2 100644
--- a/arch/arm/boards/freescale-mx53-qsb/lowlevel.c
+++ b/arch/arm/boards/freescale-mx53-qsb/lowlevel.c
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
-#include <mach/imx53-regs.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <image-metadata.h>
diff --git a/arch/arm/boards/freescale-mx53-vmx53/board.c b/arch/arm/boards/freescale-mx53-vmx53/board.c
index aa93336ca2..785776b5cc 100644
--- a/arch/arm/boards/freescale-mx53-vmx53/board.c
+++ b/arch/arm/boards/freescale-mx53-vmx53/board.c
@@ -11,9 +11,9 @@
#include <linux/sizes.h>
#include <generated/mach-types.h>
-#include <mach/imx5.h>
+#include <mach/imx/imx5.h>
#include <asm/armlinux.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int vmx53_late_init(void)
{
diff --git a/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c b/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
index 58eca49455..4543171ec2 100644
--- a/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
+++ b/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/board.c b/arch/arm/boards/freescale-mx6-sabrelite/board.c
index 8700c9faf4..1595bf1c86 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/board.c
+++ b/arch/arm/boards/freescale-mx6-sabrelite/board.c
@@ -8,9 +8,9 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <gpio.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <of.h>
@@ -18,16 +18,16 @@
#include <linux/phy.h>
#include <asm/io.h>
#include <asm/mmu.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
#include <net.h>
#include <linux/micrel_phy.h>
-#include <mach/imx6.h>
-#include <mach/devices-imx6.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/devices-imx6.h>
+#include <mach/imx/iomux-mx6.h>
#include <spi/spi.h>
-#include <mach/spi.h>
-#include <mach/usb.h>
+#include <mach/imx/spi.h>
+#include <mach/imx/usb.h>
static iomux_v3_cfg_t sabrelite_enet_gpio_pads[] = {
/* Ethernet */
--git a/arch/arm/boards/freescale-mx6-sabrelite/flash-header-mx6-sabrelite.imxcfg b/arch/arm/boards/freescale-mx6-sabrelite/flash-header-mx6-sabrelite.imxcfg
index af2807134e..7dcaefd697 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/flash-header-mx6-sabrelite.imxcfg
+++ b/arch/arm/boards/freescale-mx6-sabrelite/flash-header-mx6-sabrelite.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_DRAM_SDQS0 0x00000030
wm 32 MX6_IOM_DRAM_SDQS1 0x00000030
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c b/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
index 0d8c51242a..f1ed31ccad 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
@@ -2,13 +2,13 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <io.h>
-#include <mach/debug_ll.h>
-#include <mach/esdctl.h>
+#include <mach/imx/debug_ll.h>
+#include <mach/imx/esdctl.h>
#include <asm/cache.h>
extern char __dtb_imx6q_sabrelite_start[];
diff --git a/arch/arm/boards/freescale-mx6-sabresd/board.c b/arch/arm/boards/freescale-mx6-sabresd/board.c
index 04df051882..97300ebbe0 100644
--- a/arch/arm/boards/freescale-mx6-sabresd/board.c
+++ b/arch/arm/boards/freescale-mx6-sabresd/board.c
@@ -10,21 +10,21 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <linux/phy.h>
#include <asm/io.h>
#include <asm/mmu.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
#include <net.h>
-#include <mach/imx6.h>
-#include <mach/devices-imx6.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/devices-imx6.h>
+#include <mach/imx/iomux-mx6.h>
#include <spi/spi.h>
-#include <mach/spi.h>
-#include <mach/usb.h>
+#include <mach/imx/spi.h>
+#include <mach/imx/usb.h>
#define PHY_ID_AR8031 0x004dd074
#define AR_PHY_ID_MASK 0xffffffff
diff --git a/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c b/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
index d902dbeafb..a6e5e92896 100644
--- a/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
@@ -3,8 +3,8 @@
#include <debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/iomux-mx6.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/freescale-mx6sx-sabresdb/board.c b/arch/arm/boards/freescale-mx6sx-sabresdb/board.c
index 8718e5a752..9ae1ab6661 100644
--- a/arch/arm/boards/freescale-mx6sx-sabresdb/board.c
+++ b/arch/arm/boards/freescale-mx6sx-sabresdb/board.c
@@ -15,12 +15,12 @@
#include <asm/armlinux.h>
-#include <mach/devices-imx6.h>
-#include <mach/imx6-regs.h>
-#include <mach/iomux-mx6.h>
-#include <mach/generic.h>
-#include <mach/imx6.h>
-#include <mach/bbu.h>
+#include <mach/imx/devices-imx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/iomux-mx6.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/bbu.h>
#define PFUZE100_DEVICEID 0x0
#define PFUZE100_REVID 0x3
diff --git a/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c b/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c
index d3b58ac1be..3d4e6917af 100644
--- a/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c
@@ -4,7 +4,7 @@
#include <debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/freescale-mx7-sabresd/board.c b/arch/arm/boards/freescale-mx7-sabresd/board.c
index e41d67017f..03658ddc7c 100644
--- a/arch/arm/boards/freescale-mx7-sabresd/board.c
+++ b/arch/arm/boards/freescale-mx7-sabresd/board.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/imx7-regs.h>
+#include <mach/imx/imx7-regs.h>
#include <linux/phy.h>
#include <mfd/imx7-iomuxc-gpr.h>
--git a/arch/arm/boards/freescale-mx7-sabresd/flash-header-mx7-sabresd.imxcfg b/arch/arm/boards/freescale-mx7-sabresd/flash-header-mx7-sabresd.imxcfg
index 9194b19fe4..0b0780ed9b 100644
--- a/arch/arm/boards/freescale-mx7-sabresd/flash-header-mx7-sabresd.imxcfg
+++ b/arch/arm/boards/freescale-mx7-sabresd/flash-header-mx7-sabresd.imxcfg
@@ -4,4 +4,4 @@ soc imx7
loadaddr 0x80000000
ivtofs 0x400
-#include <mach/flash-header/imx7d-ddr-sabresd.imxcfg>
+#include <mach/imx/flash-header/imx7d-ddr-sabresd.imxcfg>
diff --git a/arch/arm/boards/freescale-mx7-sabresd/lowlevel.c b/arch/arm/boards/freescale-mx7-sabresd/lowlevel.c
index 6d393bf2b1..ebaea9daf3 100644
--- a/arch/arm/boards/freescale-mx7-sabresd/lowlevel.c
+++ b/arch/arm/boards/freescale-mx7-sabresd/lowlevel.c
@@ -4,14 +4,14 @@
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx7-ccm-regs.h>
-#include <mach/iomux-mx7.h>
-#include <mach/debug_ll.h>
+#include <mach/imx/imx7-ccm-regs.h>
+#include <mach/imx/iomux-mx7.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
extern char __dtb_imx7d_sdb_start[];
--git a/arch/arm/boards/freescale-vf610-twr/flash-header-vf610-twr.imxcfg b/arch/arm/boards/freescale-vf610-twr/flash-header-vf610-twr.imxcfg
index 06d5a40a69..bad742831a 100644
--- a/arch/arm/boards/freescale-vf610-twr/flash-header-vf610-twr.imxcfg
+++ b/arch/arm/boards/freescale-vf610-twr/flash-header-vf610-twr.imxcfg
@@ -4,13 +4,13 @@ soc vf610
loadaddr 0x80000000
ivtofs 0x400
-#include <mach/vf610-iomux-regs.h>
-#include <mach/vf610-ddrmc-regs.h>
+#include <mach/imx/vf610-iomux-regs.h>
+#include <mach/imx/vf610-ddrmc-regs.h>
-#include <mach/flash-header/vf610-ddr-pll2-400mhz.imxcfg>
-#include <mach/flash-header/vf610-iomux-ddr-default.imxcfg>
-#include <mach/flash-header/vf610-ddr-cr-default.imxcfg>
-#include <mach/flash-header/vf610-ddr-phy-default.imxcfg>
+#include <mach/imx/flash-header/vf610-ddr-pll2-400mhz.imxcfg>
+#include <mach/imx/flash-header/vf610-iomux-ddr-default.imxcfg>
+#include <mach/imx/flash-header/vf610-ddr-cr-default.imxcfg>
+#include <mach/imx/flash-header/vf610-ddr-phy-default.imxcfg>
wm 32 DDRMC_CR00 DDRMC_CR00_DRAM_CLASS_DDR3_START
diff --git a/arch/arm/boards/freescale-vf610-twr/lowlevel.c b/arch/arm/boards/freescale-vf610-twr/lowlevel.c
index 9c7fafe4d6..b2968b8d95 100644
--- a/arch/arm/boards/freescale-vf610-twr/lowlevel.c
+++ b/arch/arm/boards/freescale-vf610-twr/lowlevel.c
@@ -2,13 +2,13 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/esdctl.h>
-#include <mach/vf610-regs.h>
-#include <mach/clock-vf610.h>
-#include <mach/iomux-vf610.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/vf610-regs.h>
+#include <mach/imx/clock-vf610.h>
+#include <mach/imx/iomux-vf610.h>
#include <debug_ll.h>
static inline void setup_uart(void)
diff --git a/arch/arm/boards/gateworks-ventana/board.c b/arch/arm/boards/gateworks-ventana/board.c
index 07a21b6d60..aa2137a971 100644
--- a/arch/arm/boards/gateworks-ventana/board.c
+++ b/arch/arm/boards/gateworks-ventana/board.c
@@ -8,8 +8,8 @@
#include <linux/marvell_phy.h>
#include <linux/pci.h>
#include <linux/phy.h>
-#include <mach/bbu.h>
-#include <mach/imx6.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx6.h>
#include <net.h>
#include "gsc.h"
--git a/arch/arm/boards/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg b/arch/arm/boards/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg
index 8f155a88dd..cde49ef029 100644
--- a/arch/arm/boards/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg
+++ b/arch/arm/boards/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
#include "ram-base.imxcfg"
#include "quad_128x64.imxcfg"
diff --git a/arch/arm/boards/gateworks-ventana/lowlevel.c b/arch/arm/boards/gateworks-ventana/lowlevel.c
index 50386d8aed..db18b53139 100644
--- a/arch/arm/boards/gateworks-ventana/lowlevel.c
+++ b/arch/arm/boards/gateworks-ventana/lowlevel.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/gk802/board.c b/arch/arm/boards/gk802/board.c
index 2713d6e756..c4a90306e8 100644
--- a/arch/arm/boards/gk802/board.c
+++ b/arch/arm/boards/gk802/board.c
@@ -9,9 +9,9 @@
#include <envfs.h>
#include <gpio.h>
#include <init.h>
-#include <mach/generic.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx6.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx6.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include <linux/sizes.h>
#include <of.h>
--git a/arch/arm/boards/gk802/flash-header.imxcfg b/arch/arm/boards/gk802/flash-header.imxcfg
index aa5aef554f..e77f4601cb 100644
--- a/arch/arm/boards/gk802/flash-header.imxcfg
+++ b/arch/arm/boards/gk802/flash-header.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x10000000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_DRAM_SDQS0 0x00000030
wm 32 MX6_IOM_DRAM_SDQS1 0x00000030
diff --git a/arch/arm/boards/gk802/lowlevel.c b/arch/arm/boards/gk802/lowlevel.c
index 385ec3e737..7c56a6a1a6 100644
--- a/arch/arm/boards/gk802/lowlevel.c
+++ b/arch/arm/boards/gk802/lowlevel.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/grinn-liteboard/board.c b/arch/arm/boards/grinn-liteboard/board.c
index 5b52c8de18..6d390a5287 100644
--- a/arch/arm/boards/grinn-liteboard/board.c
+++ b/arch/arm/boards/grinn-liteboard/board.c
@@ -9,8 +9,8 @@
#include <common.h>
#include <envfs.h>
#include <init.h>
-#include <mach/bbu.h>
-#include <mach/imx6.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx6.h>
#include <malloc.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include <of.h>
diff --git a/arch/arm/boards/grinn-liteboard/lowlevel.c b/arch/arm/boards/grinn-liteboard/lowlevel.c
index d3ee212ca9..0fa7ae93f8 100644
--- a/arch/arm/boards/grinn-liteboard/lowlevel.c
+++ b/arch/arm/boards/grinn-liteboard/lowlevel.c
@@ -13,8 +13,8 @@
#include <asm/sections.h>
#include <asm/cache.h>
#include <asm/mmu.h>
-#include <mach/esdctl.h>
-#include <mach/imx6.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/imx6.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/boards/guf-santaro/board.c b/arch/arm/boards/guf-santaro/board.c
index cfc85af59e..acc3fc7f07 100644
--- a/arch/arm/boards/guf-santaro/board.c
+++ b/arch/arm/boards/guf-santaro/board.c
@@ -6,16 +6,16 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <asm/armlinux.h>
#include <asm/io.h>
#include <asm/mmu.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
#include <bootsource.h>
#include <bbu.h>
-#include <mach/bbu.h>
-#include <mach/imx6.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx6.h>
#include <i2c/i2c.h>
#include <gpio.h>
--git a/arch/arm/boards/guf-santaro/flash-header.imxcfg b/arch/arm/boards/guf-santaro/flash-header.imxcfg
index eff9f66f94..6d5bbae5d8 100644
--- a/arch/arm/boards/guf-santaro/flash-header.imxcfg
+++ b/arch/arm/boards/guf-santaro/flash-header.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x10000000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000c0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
diff --git a/arch/arm/boards/guf-santaro/lowlevel.c b/arch/arm/boards/guf-santaro/lowlevel.c
index ee39903c80..8badce5da9 100644
--- a/arch/arm/boards/guf-santaro/lowlevel.c
+++ b/arch/arm/boards/guf-santaro/lowlevel.c
@@ -6,11 +6,11 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <asm/cache.h>
-#include <mach/generic.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6-regs.h>
#include <debug_ll.h>
#include <console.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/boards/guf-vincell/board.c b/arch/arm/boards/guf-vincell/board.c
index c0bb9d9e74..00a343ef99 100644
--- a/arch/arm/boards/guf-vincell/board.c
+++ b/arch/arm/boards/guf-vincell/board.c
@@ -11,11 +11,11 @@
#include <io.h>
#include <linux/clk.h>
-#include <mach/devices-imx53.h>
-#include <mach/generic.h>
-#include <mach/iim.h>
-#include <mach/bbu.h>
-#include <mach/imx5.h>
+#include <mach/imx/devices-imx53.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/iim.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx5.h>
static int vincell_devices_init(void)
{
diff --git a/arch/arm/boards/guf-vincell/lowlevel.c b/arch/arm/boards/guf-vincell/lowlevel.c
index 97f1ffc3a9..2479d17799 100644
--- a/arch/arm/boards/guf-vincell/lowlevel.c
+++ b/arch/arm/boards/guf-vincell/lowlevel.c
@@ -4,13 +4,13 @@
#include <debug_ll.h>
#include <io.h>
#include <init.h>
-#include <mach/imx53-regs.h>
-#include <mach/clock-imx51_53.h>
-#include <mach/imx5.h>
-#include <mach/iomux-v3.h>
-#include <mach/esdctl-v4.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/clock-imx51_53.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/iomux-v3.h>
+#include <mach/imx/esdctl-v4.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
#include <asm/cache.h>
diff --git a/arch/arm/boards/innocomm-imx8mm-wb15/board.c b/arch/arm/boards/innocomm-imx8mm-wb15/board.c
index e647200b83..5bb285b189 100644
--- a/arch/arm/boards/innocomm-imx8mm-wb15/board.c
+++ b/arch/arm/boards/innocomm-imx8mm-wb15/board.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <deep-probe.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int innocomm_wb15_evk_probe(struct device *dev)
{
diff --git a/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c b/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c
index f7753bd326..b180de5715 100644
--- a/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c
+++ b/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c
@@ -5,13 +5,13 @@
#include <asm/barebox-arm.h>
#include <pbl/i2c.h>
#include <pbl/pmic.h>
-#include <mach/esdctl.h>
-#include <mach/atf.h>
-#include <mach/generic.h>
-#include <mach/iomux-mx8mm.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/iomux-mx8mm.h>
+#include <mach/imx/imx8m-ccm-regs.h>
#include <mfd/bd71837.h>
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
#include <soc/imx8m/ddr.h>
#include <image-metadata.h>
--git a/arch/arm/boards/kamstrup-mx7-concentrator/flash-header-tqma7d.imxcfg b/arch/arm/boards/kamstrup-mx7-concentrator/flash-header-tqma7d.imxcfg
index 564fa62b91..12e0754912 100644
--- a/arch/arm/boards/kamstrup-mx7-concentrator/flash-header-tqma7d.imxcfg
+++ b/arch/arm/boards/kamstrup-mx7-concentrator/flash-header-tqma7d.imxcfg
@@ -4,7 +4,7 @@ soc imx7
loadaddr 0xbfbff000
ivtofs 0x400
-#include <mach/imx7-ddr-regs.h>
+#include <mach/imx/imx7-ddr-regs.h>
wm 32 0x30340004 0x4F400005 /* IOMUXC_GPR_GPR1 */
/* Clear then set bit30 to ensure exit from DDR retention */
diff --git a/arch/arm/boards/kamstrup-mx7-concentrator/lowlevel.c b/arch/arm/boards/kamstrup-mx7-concentrator/lowlevel.c
index 58240d22f7..89b8c89864 100644
--- a/arch/arm/boards/kamstrup-mx7-concentrator/lowlevel.c
+++ b/arch/arm/boards/kamstrup-mx7-concentrator/lowlevel.c
@@ -4,14 +4,14 @@
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx7-ccm-regs.h>
-#include <mach/iomux-mx7.h>
-#include <mach/debug_ll.h>
+#include <mach/imx/imx7-ccm-regs.h>
+#include <mach/imx/iomux-mx7.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
extern char __dtb_z_imx7d_flex_concentrator_mfg_start[];
diff --git a/arch/arm/boards/karo-tx25/board.c b/arch/arm/boards/karo-tx25/board.c
index bbcc32227c..0ed2a6868f 100644
--- a/arch/arm/boards/karo-tx25/board.c
+++ b/arch/arm/boards/karo-tx25/board.c
@@ -9,19 +9,19 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <environment.h>
-#include <mach/imx25-regs.h>
+#include <mach/imx/imx25-regs.h>
#include <asm/armlinux.h>
#include <asm/sections.h>
#include <asm/barebox-arm.h>
#include <io.h>
#include <generated/mach-types.h>
-#include <mach/imx-nand.h>
-#include <mach/iomux-mx25.h>
-#include <mach/generic.h>
-#include <mach/iim.h>
+#include <mach/imx/imx-nand.h>
+#include <mach/imx/iomux-mx25.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/iim.h>
#include <linux/err.h>
-#include <mach/devices-imx25.h>
-#include <mach/bbu.h>
+#include <mach/imx/devices-imx25.h>
+#include <mach/imx/bbu.h>
#include <asm/mmu.h>
#define TX25_FEC_PWR_GPIO IMX_GPIO_NR(4, 9)
diff --git a/arch/arm/boards/karo-tx25/lowlevel.c b/arch/arm/boards/karo-tx25/lowlevel.c
index f20c659d5d..d6658b535f 100644
--- a/arch/arm/boards/karo-tx25/lowlevel.c
+++ b/arch/arm/boards/karo-tx25/lowlevel.c
@@ -3,11 +3,11 @@
#include <common.h>
#include <init.h>
-#include <mach/imx25-regs.h>
-#include <mach/esdctl.h>
+#include <mach/imx/imx25-regs.h>
+#include <mach/imx/esdctl.h>
#include <io.h>
#include <linux/sizes.h>
-#include <mach/imx-nand.h>
+#include <mach/imx/imx-nand.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
#include <asm/system.h>
diff --git a/arch/arm/boards/karo-tx53/board.c b/arch/arm/boards/karo-tx53/board.c
index 92a44a893d..57e891acd3 100644
--- a/arch/arm/boards/karo-tx53/board.c
+++ b/arch/arm/boards/karo-tx53/board.c
@@ -16,14 +16,14 @@
#include <generated/mach-types.h>
-#include <mach/imx53-regs.h>
-#include <mach/iomux-mx53.h>
-#include <mach/devices-imx53.h>
-#include <mach/generic.h>
-#include <mach/imx-nand.h>
-#include <mach/iim.h>
-#include <mach/imx5.h>
-#include <mach/bbu.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/iomux-mx53.h>
+#include <mach/imx/devices-imx53.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx-nand.h>
+#include <mach/imx/iim.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/bbu.h>
#include <asm/armlinux.h>
#include <io.h>
diff --git a/arch/arm/boards/karo-tx53/lowlevel.c b/arch/arm/boards/karo-tx53/lowlevel.c
index e1bce4d329..b51846b543 100644
--- a/arch/arm/boards/karo-tx53/lowlevel.c
+++ b/arch/arm/boards/karo-tx53/lowlevel.c
@@ -4,10 +4,10 @@
#include <debug_ll.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx5.h>
-#include <mach/imx53-regs.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
#include <asm/cache.h>
extern char __dtb_imx53_tx53_xx30_start[];
diff --git a/arch/arm/boards/karo-tx6x/board.c b/arch/arm/boards/karo-tx6x/board.c
index ec66749558..f964ddefd1 100644
--- a/arch/arm/boards/karo-tx6x/board.c
+++ b/arch/arm/boards/karo-tx6x/board.c
@@ -16,8 +16,8 @@
#include <linux/clk.h>
#include <linux/kernel.h>
#include <environment.h>
-#include <mach/bbu.h>
-#include <mach/imx6.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx6.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include "pmic.h"
--git a/arch/arm/boards/karo-tx6x/flash-header-tx6dl-1g.imxcfg b/arch/arm/boards/karo-tx6x/flash-header-tx6dl-1g.imxcfg
index d860a5e2af..3d15238c20 100644
--- a/arch/arm/boards/karo-tx6x/flash-header-tx6dl-1g.imxcfg
+++ b/arch/arm/boards/karo-tx6x/flash-header-tx6dl-1g.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
#include "ram-base.imxcfg"
#include "1600mhz_4x128mx16.imxcfg"
--git a/arch/arm/boards/karo-tx6x/flash-header-tx6dl-512m.imxcfg b/arch/arm/boards/karo-tx6x/flash-header-tx6dl-512m.imxcfg
index 51f600d490..bfc9a80a3e 100644
--- a/arch/arm/boards/karo-tx6x/flash-header-tx6dl-512m.imxcfg
+++ b/arch/arm/boards/karo-tx6x/flash-header-tx6dl-512m.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
wm 32 0x020e0158 0x00000016
wm 32 0x020e0174 0x00000011
--git a/arch/arm/boards/karo-tx6x/flash-header-tx6q-1g.imxcfg b/arch/arm/boards/karo-tx6x/flash-header-tx6q-1g.imxcfg
index 697ce45480..b05c4a186b 100644
--- a/arch/arm/boards/karo-tx6x/flash-header-tx6q-1g.imxcfg
+++ b/arch/arm/boards/karo-tx6x/flash-header-tx6q-1g.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 0x020e00a4 0x00000016
wm 32 0x020e00c4 0x00000011
--git a/arch/arm/boards/karo-tx6x/flash-header-tx6qp-2g.imxcfg b/arch/arm/boards/karo-tx6x/flash-header-tx6qp-2g.imxcfg
index 8756e8dfb5..bbb9e01022 100644
--- a/arch/arm/boards/karo-tx6x/flash-header-tx6qp-2g.imxcfg
+++ b/arch/arm/boards/karo-tx6x/flash-header-tx6qp-2g.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 0x020e00a4 0x00000016
wm 32 0x020e00c4 0x00000011
diff --git a/arch/arm/boards/karo-tx6x/lowlevel.c b/arch/arm/boards/karo-tx6x/lowlevel.c
index a80862025a..84ba40b86b 100644
--- a/arch/arm/boards/karo-tx6x/lowlevel.c
+++ b/arch/arm/boards/karo-tx6x/lowlevel.c
@@ -6,8 +6,8 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <image-metadata.h>
-#include <mach/generic.h>
-#include <mach/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/esdctl.h>
#include <linux/sizes.h>
static inline void setup_uart(void)
diff --git a/arch/arm/boards/kindle-mx50/board.c b/arch/arm/boards/kindle-mx50/board.c
index 7366047582..b7b51d6209 100644
--- a/arch/arm/boards/kindle-mx50/board.c
+++ b/arch/arm/boards/kindle-mx50/board.c
@@ -16,10 +16,10 @@
#include <generated/mach-types.h>
#include <linux/sizes.h>
#include <usb/fsl_usb2.h>
-#include <mach/generic.h>
-#include <mach/imx50-regs.h>
-#include <mach/imx5.h>
-#include <mach/revision.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx50-regs.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/revision.h>
/* 16 byte id for serial number */
#define ATAG_SERIAL16 0x5441000a
diff --git a/arch/arm/boards/kindle-mx50/lowlevel.c b/arch/arm/boards/kindle-mx50/lowlevel.c
index fce23ec6e0..61d2b037fe 100644
--- a/arch/arm/boards/kindle-mx50/lowlevel.c
+++ b/arch/arm/boards/kindle-mx50/lowlevel.c
@@ -8,8 +8,8 @@
#include <asm/sections.h>
#include <asm/cache.h>
#include <asm/mmu.h>
-#include <mach/imx50-regs.h>
-#include <mach/generic.h>
+#include <mach/imx/imx50-regs.h>
+#include <mach/imx/generic.h>
extern char __dtb_imx50_kindle_d01100_start[];
extern char __dtb_imx50_kindle_d01200_start[];
diff --git a/arch/arm/boards/kontron-samx6i/board.c b/arch/arm/boards/kontron-samx6i/board.c
index b4b0eac824..376548f549 100644
--- a/arch/arm/boards/kontron-samx6i/board.c
+++ b/arch/arm/boards/kontron-samx6i/board.c
@@ -18,8 +18,8 @@
#include <common.h>
#include <init.h>
#include <of.h>
-#include <mach/bbu.h>
-#include <mach/esdctl.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/esdctl.h>
#include <asm/armlinux.h>
diff --git a/arch/arm/boards/kontron-samx6i/lowlevel.c b/arch/arm/boards/kontron-samx6i/lowlevel.c
index afb7372323..beab190334 100644
--- a/arch/arm/boards/kontron-samx6i/lowlevel.c
+++ b/arch/arm/boards/kontron-samx6i/lowlevel.c
@@ -17,8 +17,8 @@
#include <asm/sections.h>
#include <asm/cache.h>
#include <asm/mmu.h>
-#include <mach/imx6.h>
-#include <mach/esdctl.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/esdctl.h>
#include "mem.h"
diff --git a/arch/arm/boards/kontron-samx6i/mem.c b/arch/arm/boards/kontron-samx6i/mem.c
index 08dceb55c0..19e2ac2dd8 100644
--- a/arch/arm/boards/kontron-samx6i/mem.c
+++ b/arch/arm/boards/kontron-samx6i/mem.c
@@ -11,9 +11,9 @@
#include <linux/sizes.h>
#include <common.h>
-#include <mach/iomux-mx6.h>
-#include <mach/imx-gpio.h>
-#include <mach/imx6.h>
+#include <mach/imx/iomux-mx6.h>
+#include <mach/imx/imx-gpio.h>
+#include <mach/imx/imx6.h>
#include "mem.h"
diff --git a/arch/arm/boards/meerkat96/lowlevel.c b/arch/arm/boards/meerkat96/lowlevel.c
index e65726ef1c..03a1a11466 100644
--- a/arch/arm/boards/meerkat96/lowlevel.c
+++ b/arch/arm/boards/meerkat96/lowlevel.c
@@ -3,10 +3,10 @@
#include <debug_ll.h>
#include <io.h>
#include <linux/sizes.h>
-#include <mach/debug_ll.h>
-#include <mach/iomux-mx7.h>
-#include <mach/imx7-ccm-regs.h>
-#include <mach/generic.h>
+#include <mach/imx/debug_ll.h>
+#include <mach/imx/iomux-mx7.h>
+#include <mach/imx/imx7-ccm-regs.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <asm/cache.h>
diff --git a/arch/arm/boards/mnt-reform/board.c b/arch/arm/boards/mnt-reform/board.c
index e8a406f777..8b56d108e6 100644
--- a/arch/arm/boards/mnt-reform/board.c
+++ b/arch/arm/boards/mnt-reform/board.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <deep-probe.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int mnt_reform_probe(struct device *dev)
{
--git a/arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg b/arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg
index 180a44fda3..0f68c25b91 100644
--- a/arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg
+++ b/arch/arm/boards/mnt-reform/flash-header-mnt-reform.imxcfg
@@ -5,4 +5,4 @@ soc imx8mq
loadaddr 0x007E1000
max_load_size 0x3F000
ivtofs 0x400
-#include <mach/habv4-imx8-gencsf.h>
+#include <mach/imx/habv4-imx8-gencsf.h>
diff --git a/arch/arm/boards/mnt-reform/lowlevel.c b/arch/arm/boards/mnt-reform/lowlevel.c
index d22c8b8a74..c76037c36d 100644
--- a/arch/arm/boards/mnt-reform/lowlevel.c
+++ b/arch/arm/boards/mnt-reform/lowlevel.c
@@ -9,14 +9,14 @@
#include <firmware.h>
#include <pbl/i2c.h>
#include <pbl/pmic.h>
-#include <mach/atf.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx-gpio.h>
-#include <mach/imx8m-ccm-regs.h>
-#include <mach/imx8mq-regs.h>
-#include <mach/iomux-mx8mq.h>
-#include <mach/xload.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx-gpio.h>
+#include <mach/imx/imx8m-ccm-regs.h>
+#include <mach/imx/imx8mq-regs.h>
+#include <mach/imx/iomux-mx8mq.h>
+#include <mach/imx/xload.h>
#include <soc/imx8m/ddr.h>
extern char __dtb_z_imx8mq_mnt_reform2_start[];
diff --git a/arch/arm/boards/novena/lowlevel.c b/arch/arm/boards/novena/lowlevel.c
index 178c874892..5b358ef0a3 100644
--- a/arch/arm/boards/novena/lowlevel.c
+++ b/arch/arm/boards/novena/lowlevel.c
@@ -6,12 +6,12 @@
#include <ddr_dimms.h>
#include <ddr_spd.h>
#include <debug_ll.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx6.h>
-#include <mach/imx6-mmdc.h>
-#include <mach/iomux-mx6.h>
-#include <mach/xload.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/imx6-mmdc.h>
+#include <mach/imx/iomux-mx6.h>
+#include <mach/imx/xload.h>
#include <pbl/i2c.h>
#include <soc/fsl/fsl_udc.h>
#include "ddr_regs.h"
diff --git a/arch/arm/boards/nxp-imx6ull-evk/board.c b/arch/arm/boards/nxp-imx6ull-evk/board.c
index 5959501a26..fb168662b9 100644
--- a/arch/arm/boards/nxp-imx6ull-evk/board.c
+++ b/arch/arm/boards/nxp-imx6ull-evk/board.c
@@ -3,7 +3,7 @@
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <linux/phy.h>
#include <linux/micrel_phy.h>
diff --git a/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c
index afef4c4498..ff72763f54 100644
--- a/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c
@@ -2,13 +2,13 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <io.h>
#include <debug_ll.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <image-metadata.h>
diff --git a/arch/arm/boards/nxp-imx8mm-evk/board.c b/arch/arm/boards/nxp-imx8mm-evk/board.c
index d726160e1d..fd748262f7 100644
--- a/arch/arm/boards/nxp-imx8mm-evk/board.c
+++ b/arch/arm/boards/nxp-imx8mm-evk/board.c
@@ -7,7 +7,7 @@
#include <init.h>
#include <linux/phy.h>
#include <linux/sizes.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <deep-probe.h>
#include <envfs.h>
diff --git a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
index 5861d8d8be..038dd9d659 100644
--- a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
@@ -10,14 +10,14 @@
#include <pbl/i2c.h>
#include <pbl/pmic.h>
#include <linux/sizes.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx8mm-regs.h>
-#include <mach/iomux-mx8mm.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8mm-regs.h>
+#include <mach/imx/iomux-mx8mm.h>
+#include <mach/imx/imx8m-ccm-regs.h>
#include <mfd/bd71837.h>
#include <mfd/pca9450.h>
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
#include <soc/imx8m/ddr.h>
#include <image-metadata.h>
diff --git a/arch/arm/boards/nxp-imx8mn-evk/board.c b/arch/arm/boards/nxp-imx8mn-evk/board.c
index 7d928f0b30..13efc62a58 100644
--- a/arch/arm/boards/nxp-imx8mn-evk/board.c
+++ b/arch/arm/boards/nxp-imx8mn-evk/board.c
@@ -9,7 +9,7 @@
#include <init.h>
#include <linux/phy.h>
#include <linux/sizes.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <envfs.h>
#define PHY_ID_AR8031 0x004dd074
diff --git a/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
index 7da9c33565..a1fb577224 100644
--- a/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
@@ -12,13 +12,13 @@
#include <pbl/i2c.h>
#include <pbl/pmic.h>
#include <linux/sizes.h>
-#include <mach/atf.h>
-#include <mach/xload.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx8mn-regs.h>
-#include <mach/iomux-mx8mn.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8mn-regs.h>
+#include <mach/imx/iomux-mx8mn.h>
+#include <mach/imx/imx8m-ccm-regs.h>
#include <mfd/pca9450.h>
#include <mfd/bd71837.h>
#include <soc/imx8m/ddr.h>
diff --git a/arch/arm/boards/nxp-imx8mp-evk/board.c b/arch/arm/boards/nxp-imx8mp-evk/board.c
index d557d17004..0c9fe7835b 100644
--- a/arch/arm/boards/nxp-imx8mp-evk/board.c
+++ b/arch/arm/boards/nxp-imx8mp-evk/board.c
@@ -10,8 +10,8 @@
#include <init.h>
#include <linux/phy.h>
#include <linux/sizes.h>
-#include <mach/bbu.h>
-#include <mach/iomux-mx8mp.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/iomux-mx8mp.h>
#include <gpio.h>
#include <envfs.h>
diff --git a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
index d6fc32e65b..9d17e6d1ab 100644
--- a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
@@ -13,13 +13,13 @@
#include <pbl/i2c.h>
#include <pbl/pmic.h>
#include <linux/sizes.h>
-#include <mach/atf.h>
-#include <mach/xload.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx8mp-regs.h>
-#include <mach/iomux-mx8mp.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8mp-regs.h>
+#include <mach/imx/iomux-mx8mp.h>
+#include <mach/imx/imx8m-ccm-regs.h>
#include <mfd/pca9450.h>
#include <soc/imx8m/ddr.h>
#include <soc/fsl/fsl_udc.h>
diff --git a/arch/arm/boards/nxp-imx8mq-evk/board.c b/arch/arm/boards/nxp-imx8mq-evk/board.c
index 8d88bfe8c2..d86666958a 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/board.c
+++ b/arch/arm/boards/nxp-imx8mq-evk/board.c
@@ -7,7 +7,7 @@
#include <init.h>
#include <linux/phy.h>
#include <linux/sizes.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <envfs.h>
--git a/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg b/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
index 180a44fda3..0f68c25b91 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
+++ b/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
@@ -5,4 +5,4 @@ soc imx8mq
loadaddr 0x007E1000
max_load_size 0x3F000
ivtofs 0x400
-#include <mach/habv4-imx8-gencsf.h>
+#include <mach/imx/habv4-imx8-gencsf.h>
diff --git a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
index 0c9f6345ff..61aaab0287 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
@@ -4,20 +4,20 @@
#include <firmware.h>
#include <image-metadata.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx8m-ccm-regs.h>
-#include <mach/iomux-mx8mq.h>
+#include <mach/imx/imx8m-ccm-regs.h>
+#include <mach/imx/iomux-mx8mq.h>
#include <soc/imx8m/ddr.h>
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
#include <io.h>
#include <debug_ll.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <asm/mmu.h>
-#include <mach/atf.h>
-#include <mach/esdctl.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/esdctl.h>
#include "ddr.h"
diff --git a/arch/arm/boards/phytec-phycard-imx27/lowlevel.c b/arch/arm/boards/phytec-phycard-imx27/lowlevel.c
index 8ab682b9db..a43406e1a2 100644
--- a/arch/arm/boards/phytec-phycard-imx27/lowlevel.c
+++ b/arch/arm/boards/phytec-phycard-imx27/lowlevel.c
@@ -12,10 +12,10 @@
#include <config.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
-#include <mach/imx27-regs.h>
-#include <mach/imx-pll.h>
-#include <mach/esdctl.h>
-#include <mach/imx-nand.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/imx-pll.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/imx-nand.h>
enum {
PHYCARD_MICRON_64MB,
diff --git a/arch/arm/boards/phytec-phycard-imx27/pca100.c b/arch/arm/boards/phytec-phycard-imx27/pca100.c
index fa285f3d16..e64ef72026 100644
--- a/arch/arm/boards/phytec-phycard-imx27/pca100.c
+++ b/arch/arm/boards/phytec-phycard-imx27/pca100.c
@@ -5,7 +5,7 @@
#include <net.h>
#include <init.h>
#include <environment.h>
-#include <mach/imx27-regs.h>
+#include <mach/imx/imx27-regs.h>
#include <gpio.h>
#include <linux/sizes.h>
#include <asm/armlinux.h>
@@ -16,14 +16,14 @@
#include <nand.h>
#include <spi/spi.h>
#include <io.h>
-#include <mach/imx-nand.h>
-#include <mach/imx-pll.h>
+#include <mach/imx/imx-nand.h>
+#include <mach/imx/imx-pll.h>
#include <platform_data/imxfb.h>
#include <asm/mmu.h>
#include <usb/ulpi.h>
-#include <mach/bbu.h>
-#include <mach/iomux-mx27.h>
-#include <mach/devices-imx27.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/iomux-mx27.h>
+#include <mach/imx/devices-imx27.h>
#if defined(CONFIG_USB) && defined(CONFIG_USB_ULPI)
static void pca100_usb_register(void)
diff --git a/arch/arm/boards/phytec-phycore-imx27/lowlevel.c b/arch/arm/boards/phytec-phycore-imx27/lowlevel.c
index 4e2f44d216..a42b30a7bb 100644
--- a/arch/arm/boards/phytec-phycore-imx27/lowlevel.c
+++ b/arch/arm/boards/phytec-phycore-imx27/lowlevel.c
@@ -3,11 +3,11 @@
#include <common.h>
#include <init.h>
-#include <mach/imx27-regs.h>
-#include <mach/imx-pll.h>
-#include <mach/esdctl.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/imx-pll.h>
+#include <mach/imx/esdctl.h>
#include <io.h>
-#include <mach/imx-nand.h>
+#include <mach/imx/imx-nand.h>
#include <asm/barebox-arm.h>
#include <asm/system.h>
#include <asm-generic/memory_layout.h>
diff --git a/arch/arm/boards/phytec-phycore-imx27/pcm038.c b/arch/arm/boards/phytec-phycore-imx27/pcm038.c
index 183b64094b..69a0458f05 100644
--- a/arch/arm/boards/phytec-phycore-imx27/pcm038.c
+++ b/arch/arm/boards/phytec-phycore-imx27/pcm038.c
@@ -11,13 +11,13 @@
#include <notifier.h>
#include <linux/sizes.h>
#include <envfs.h>
-#include <mach/devices-imx27.h>
-#include <mach/imx-pll.h>
-#include <mach/imx27-regs.h>
+#include <mach/imx/devices-imx27.h>
+#include <mach/imx/imx-pll.h>
+#include <mach/imx/imx27-regs.h>
#include <platform_data/imxfb.h>
-#include <mach/iomux-mx27.h>
+#include <mach/imx/iomux-mx27.h>
#include <mfd/mc13xxx.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include "pll.h"
diff --git a/arch/arm/boards/phytec-phycore-imx27/pcm970.c b/arch/arm/boards/phytec-phycore-imx27/pcm970.c
index 479e5566a0..1e466e0ec8 100644
--- a/arch/arm/boards/phytec-phycore-imx27/pcm970.c
+++ b/arch/arm/boards/phytec-phycore-imx27/pcm970.c
@@ -6,8 +6,8 @@
#include <io.h>
#include <platform_data/ide.h>
#include <linux/sizes.h>
-#include <mach/imx27-regs.h>
-#include <mach/iomux-mx27.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/iomux-mx27.h>
#define GPIO_IDE_POWER (GPIO_PORTE + 18)
#define GPIO_IDE_PCOE (GPIO_PORTF + 7)
diff --git a/arch/arm/boards/phytec-phycore-imx7/board.c b/arch/arm/boards/phytec-phycore-imx7/board.c
index f603ef3c2e..f400e07e86 100644
--- a/arch/arm/boards/phytec-phycore-imx7/board.c
+++ b/arch/arm/boards/phytec-phycore-imx7/board.c
@@ -4,14 +4,14 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
#include <asm/psci.h>
#include <io.h>
-#include <mach/imx7-regs.h>
+#include <mach/imx/imx7-regs.h>
#include <serial/imx-uart.h>
#include <asm/secure.h>
--git a/arch/arm/boards/phytec-phycore-imx7/flash-header-phytec-phycore-imx7.imxcfg b/arch/arm/boards/phytec-phycore-imx7/flash-header-phytec-phycore-imx7.imxcfg
index a18f3dbed1..03cdbe8bc8 100644
--- a/arch/arm/boards/phytec-phycore-imx7/flash-header-phytec-phycore-imx7.imxcfg
+++ b/arch/arm/boards/phytec-phycore-imx7/flash-header-phytec-phycore-imx7.imxcfg
@@ -13,7 +13,7 @@ soc imx7
loadaddr 0x80000000
ivtofs 0x400
-#include <mach/imx7-ddr-regs.h>
+#include <mach/imx/imx7-ddr-regs.h>
wm 32 0x30340004 0x4F400005
/* Clear then set bit30 to ensure exit from DDR retention */
diff --git a/arch/arm/boards/phytec-phycore-imx7/lowlevel.c b/arch/arm/boards/phytec-phycore-imx7/lowlevel.c
index f8dcb3ce54..1f3c08ac62 100644
--- a/arch/arm/boards/phytec-phycore-imx7/lowlevel.c
+++ b/arch/arm/boards/phytec-phycore-imx7/lowlevel.c
@@ -4,10 +4,10 @@
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
extern char __dtb_imx7d_phyboard_zeta_start[];
diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index b3a74c7dee..bff95221ab 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -16,15 +16,15 @@
#include <of.h>
#include <deep-probe.h>
#include <i2c/i2c.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <platform_data/eth-fec.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include <linux/micrel_phy.h>
#include <globalvar.h>
-#include <mach/iomux-mx6.h>
-#include <mach/imx6.h>
+#include <mach/imx/iomux-mx6.h>
+#include <mach/imx/imx6.h>
#define PHYFLEX_MODULE_REV_1 0x1
#define PHYFLEX_MODULE_REV_2 0x2
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib-1bank.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib-1bank.imxcfg
index d124518930..3b3e290fbe 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib-1bank.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib-1bank.imxcfg
@@ -9,4 +9,4 @@
wm 32 0x021b0000 0x831a0000
#include "flash-header-phytec-pcaaxl3.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib.imxcfg
index 4c3e5b06c9..4c8c527043 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib.imxcfg
@@ -9,4 +9,4 @@
wm 32 0x021b0000 0xc21a0000
#include "flash-header-phytec-pcaaxl3.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-2gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-2gib.imxcfg
index bb858e874d..a2f932e12a 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-2gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3-2gib.imxcfg
@@ -9,4 +9,4 @@
wm 32 0x021b0000 0xc31a0000
#include "flash-header-phytec-pcaaxl3.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3.h b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3.h
index 3d1952fb99..c6cd180176 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3.h
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcaaxl3.h
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x10000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_DRAM_SDQS0 0x00000028
wm 32 MX6_IOM_DRAM_SDQS1 0x00000028
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ul-512mb.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ul-512mb.imxcfg
index 225f8a32aa..1a987c2c1f 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ul-512mb.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ul-512mb.imxcfg
@@ -1,4 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include "flash-header-phytec-pcl063-512mb.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg
index 44f1036032..f519abf1a0 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-256mb.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021B0000 0x83180000
#include "flash-header-phytec-pcl063.h"
-#include <mach/habv4-imx6ull-gencsf.h>
+#include <mach/imx/habv4-imx6ull-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg
index e976979118..6935bd2ef3 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcl063ull-512mb.imxcfg
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
#include "flash-header-phytec-pcl063-512mb.h"
-#include <mach/habv4-imx6ull-gencsf.h>
+#include <mach/imx/habv4-imx6ull-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-1gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-1gib.imxcfg
index b2ea8ee0e8..131e08cf4b 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-1gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-1gib.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x831A0000
#include "flash-header-phytec-pcm058.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
index f6895a0587..be638ab1c1 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x841A0000
#include "flash-header-phytec-pcm058.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058.h b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058.h
index d213403467..eaa2a3da6e 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058.h
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058.h
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x10000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000C0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib-32bit.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib-32bit.imxcfg
index ec5beb937c..83f8480bfe 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib-32bit.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib-32bit.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x84190000
#include "flash-header-phytec-pcm058dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
index a5b3cdc633..708e5bb21d 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x831A0000
#include "flash-header-phytec-pcm058dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-256mb.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-256mb.imxcfg
index 26755f946a..be3cd5a20d 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-256mb.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-256mb.imxcfg
@@ -8,5 +8,5 @@
wm 32 0x021b0000 0x82190000
#include "flash-header-phytec-pcm058dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-512mb.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-512mb.imxcfg
index cd1d2d185e..4fcf36990d 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-512mb.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl-512mb.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x83190000
#include "flash-header-phytec-pcm058dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h
index 94ca4bcc0e..2d90faad4c 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058dl.h
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x10000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000C0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058qp-1gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058qp-1gib.imxcfg
index 0d2d245fc2..e15d220428 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058qp-1gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pcm058qp-1gib.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x831A0000
#include "flash-header-phytec-pcm058qp.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
index 77ef6358ec..48b1321b51 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x831a0000
#include "flash-header-phytec-pfla02.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-1gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-1gib.imxcfg
index dd222ed7a1..8bd6a83786 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-1gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-1gib.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0xc21a0000
#include "flash-header-phytec-pfla02.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-2gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-2gib.imxcfg
index de5aab6242..fe2fa2c637 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-2gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-2gib.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0xC31A0000
#include "flash-header-phytec-pfla02.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-4gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-4gib.imxcfg
index c3819e958f..6f8645c4e6 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-4gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-4gib.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0xC41A0000
#include "flash-header-phytec-pfla02.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-512mb-1bank.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-512mb-1bank.imxcfg
index 08d579241e..edafe2d47c 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-512mb-1bank.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02-512mb-1bank.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x821a0000
#include "flash-header-phytec-pfla02.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02.h b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02.h
index 9984117844..26a9341dda 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02.h
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02.h
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x10000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000C0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib-1bank.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib-1bank.imxcfg
index c851cc2844..553ba8d40a 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib-1bank.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib-1bank.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x831a0000
#include "flash-header-phytec-pfla02dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib.imxcfg
index 7276adad60..5c37061853 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0xc21a0000
#include "flash-header-phytec-pfla02dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl.h b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl.h
index 48d2001fb2..537a93eda9 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl.h
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02dl.h
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x10000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000C0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-128mb-1bank.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-128mb-1bank.imxcfg
index d450ec1efd..331692af49 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-128mb-1bank.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-128mb-1bank.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x82180000
#include "flash-header-phytec-pfla02dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-256mb-1bank.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-256mb-1bank.imxcfg
index 7f1535d0e0..bd830865ec 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-256mb-1bank.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-256mb-1bank.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x82190000
#include "flash-header-phytec-pfla02dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-512mb-1bank.imxcfg b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-512mb-1bank.imxcfg
index b6fd2db254..7e57e7cd9e 100644
--- a/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-512mb-1bank.imxcfg
+++ b/arch/arm/boards/phytec-som-imx6/flash-header-phytec-pfla02s-512mb-1bank.imxcfg
@@ -8,4 +8,4 @@
wm 32 0x021b0000 0x83190000
#include "flash-header-phytec-pfla02dl.h"
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
diff --git a/arch/arm/boards/phytec-som-imx6/lowlevel.c b/arch/arm/boards/phytec-som-imx6/lowlevel.c
index 62a1c8de73..a783bcb477 100644
--- a/arch/arm/boards/phytec-som-imx6/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx6/lowlevel.c
@@ -15,7 +15,7 @@
#include <asm/sections.h>
#include <asm/cache.h>
#include <asm/mmu.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/boards/phytec-som-imx8mq/board.c b/arch/arm/boards/phytec-som-imx8mq/board.c
index 6d331281e6..5dbfaf13db 100644
--- a/arch/arm/boards/phytec-som-imx8mq/board.c
+++ b/arch/arm/boards/phytec-som-imx8mq/board.c
@@ -9,7 +9,7 @@
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <mfd/pfuze.h>
#include <envfs.h>
diff --git a/arch/arm/boards/phytec-som-imx8mq/lowlevel.c b/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
index d35f9b0d39..559afa4e15 100644
--- a/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
@@ -6,20 +6,20 @@
#include <common.h>
#include <firmware.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx8m-ccm-regs.h>
-#include <mach/iomux-mx8mq.h>
+#include <mach/imx/imx8m-ccm-regs.h>
+#include <mach/imx/iomux-mx8mq.h>
#include <soc/imx8m/ddr.h>
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
#include <io.h>
#include <debug_ll.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <asm/mmu.h>
-#include <mach/atf.h>
-#include <mach/esdctl.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/esdctl.h>
#include "ddr.h"
diff --git a/arch/arm/boards/polyhex-debix/board.c b/arch/arm/boards/polyhex-debix/board.c
index 8a8f286ea5..d668dd1816 100644
--- a/arch/arm/boards/polyhex-debix/board.c
+++ b/arch/arm/boards/polyhex-debix/board.c
@@ -6,8 +6,8 @@
#include <envfs.h>
#include <init.h>
#include <io.h>
-#include <mach/bbu.h>
-#include <mach/iomux-mx8mp.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/iomux-mx8mp.h>
static int polyhex_debix_probe(struct device *dev)
{
diff --git a/arch/arm/boards/polyhex-debix/lowlevel.c b/arch/arm/boards/polyhex-debix/lowlevel.c
index 3f1911f3b4..bef0bace98 100644
--- a/arch/arm/boards/polyhex-debix/lowlevel.c
+++ b/arch/arm/boards/polyhex-debix/lowlevel.c
@@ -4,13 +4,13 @@
#include <asm/barebox-arm-head.h>
#include <common.h>
#include <debug_ll.h>
-#include <mach/atf.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx8m-ccm-regs.h>
-#include <mach/imx8mp-regs.h>
-#include <mach/iomux-mx8mp.h>
-#include <mach/xload.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8m-ccm-regs.h>
+#include <mach/imx/imx8mp-regs.h>
+#include <mach/imx/iomux-mx8mp.h>
+#include <mach/imx/xload.h>
#include <mfd/pca9450.h>
#include <pbl/i2c.h>
#include <pbl/pmic.h>
diff --git a/arch/arm/boards/protonic-imx6/board.c b/arch/arm/boards/protonic-imx6/board.c
index 2db66189e0..d35d97209b 100644
--- a/arch/arm/boards/protonic-imx6/board.c
+++ b/arch/arm/boards/protonic-imx6/board.c
@@ -13,9 +13,9 @@
#include <globalvar.h>
#include <gpio.h>
#include <i2c/i2c.h>
-#include <mach/bbu.h>
-#include <mach/imx6.h>
-#include <mach/ocotp-fusemap.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/ocotp-fusemap.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include <mfd/syscon.h>
#include <net.h>
diff --git a/arch/arm/boards/protonic-imx6/lowlevel.c b/arch/arm/boards/protonic-imx6/lowlevel.c
index ef8e7016d1..38e65037e6 100644
--- a/arch/arm/boards/protonic-imx6/lowlevel.c
+++ b/arch/arm/boards/protonic-imx6/lowlevel.c
@@ -6,8 +6,8 @@
#include <asm/barebox-arm.h>
#include <common.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
extern char __dtb_z_imx6q_prti6q_start[];
extern char __dtb_z_imx6q_prtwd2_start[];
diff --git a/arch/arm/boards/protonic-imx8m/board.c b/arch/arm/boards/protonic-imx8m/board.c
index 69b3e22d22..438cef412d 100644
--- a/arch/arm/boards/protonic-imx8m/board.c
+++ b/arch/arm/boards/protonic-imx8m/board.c
@@ -7,7 +7,7 @@
#include <environment.h>
#include <i2c/i2c.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int prt_prt8mm_init_power(void)
{
diff --git a/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c b/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c
index bfae39ea52..40fab934aa 100644
--- a/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c
+++ b/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c
@@ -5,13 +5,13 @@
#include <image-metadata.h>
#include <debug_ll.h>
#include <firmware.h>
-#include <mach/atf.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx8m-ccm-regs.h>
-#include <mach/imx8mm-regs.h>
-#include <mach/iomux-mx8mm.h>
-#include <mach/xload.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8m-ccm-regs.h>
+#include <mach/imx/imx8mm-regs.h>
+#include <mach/imx/iomux-mx8mm.h>
+#include <mach/imx/xload.h>
#include <soc/fsl/fsl_udc.h>
#include <soc/imx8m/ddr.h>
diff --git a/arch/arm/boards/scb9328/lowlevel.c b/arch/arm/boards/scb9328/lowlevel.c
index a2057f0c6b..d8b0d1cf18 100644
--- a/arch/arm/boards/scb9328/lowlevel.c
+++ b/arch/arm/boards/scb9328/lowlevel.c
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: GPL-2.0
#include <common.h>
-#include <mach/imx1-regs.h>
-#include <mach/iomux-v1.h>
-#include <mach/iomux-mx1.h>
+#include <mach/imx/imx1-regs.h>
+#include <mach/imx/iomux-v1.h>
+#include <mach/imx/iomux-mx1.h>
#include <asm/barebox-arm.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
extern char __dtb_imx1_scb9328_start[];
diff --git a/arch/arm/boards/scb9328/lowlevel_init.S b/arch/arm/boards/scb9328/lowlevel_init.S
index eff5a5088f..6c23d2cfea 100644
--- a/arch/arm/boards/scb9328/lowlevel_init.S
+++ b/arch/arm/boards/scb9328/lowlevel_init.S
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: 2004 Sascha Hauer, Synertronixx GmbH
-#include <mach/imx1-regs.h>
+#include <mach/imx/imx1-regs.h>
#include <asm/barebox-arm-head.h>
#define CFG_MPCTL0_VAL 0x00321431
diff --git a/arch/arm/boards/scb9328/scb9328.c b/arch/arm/boards/scb9328/scb9328.c
index 759fa8afa4..2f5e73e662 100644
--- a/arch/arm/boards/scb9328/scb9328.c
+++ b/arch/arm/boards/scb9328/scb9328.c
@@ -6,14 +6,14 @@
#include <init.h>
#include <environment.h>
#include <generated/mach-types.h>
-#include <mach/imx1-regs.h>
+#include <mach/imx/imx1-regs.h>
#include <asm/armlinux.h>
-#include <mach/weim.h>
+#include <mach/imx/weim.h>
#include <io.h>
#include <fs.h>
#include <envfs.h>
-#include <mach/iomux-mx1.h>
-#include <mach/devices-imx1.h>
+#include <mach/imx/iomux-mx1.h>
+#include <mach/imx/devices-imx1.h>
static int scb9328_devices_init(void)
{
diff --git a/arch/arm/boards/skov-imx6/board.c b/arch/arm/boards/skov-imx6/board.c
index 8f4d7efe42..8f941623cb 100644
--- a/arch/arm/boards/skov-imx6/board.c
+++ b/arch/arm/boards/skov-imx6/board.c
@@ -11,7 +11,7 @@
#include <gpio.h>
#include <init.h>
#include <linux/micrel_phy.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <net.h>
#include <of_gpio.h>
diff --git a/arch/arm/boards/skov-imx6/lowlevel.c b/arch/arm/boards/skov-imx6/lowlevel.c
index ea6de36a36..c12a7123f0 100644
--- a/arch/arm/boards/skov-imx6/lowlevel.c
+++ b/arch/arm/boards/skov-imx6/lowlevel.c
@@ -3,19 +3,19 @@
#define pr_fmt(fmt) "skov-imx6: " fmt
#include <common.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <debug_ll.h>
#include <io.h>
-#include <mach/imx6-mmdc.h>
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6.h>
-#include <mach/xload.h>
-#include <mach/esdctl.h>
+#include <mach/imx/imx6-mmdc.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/esdctl.h>
#include <serial/imx-uart.h>
-#include <mach/iomux-mx6.h>
-#include <mach/imx-gpio.h>
+#include <mach/imx/iomux-mx6.h>
+#include <mach/imx/imx-gpio.h>
#include "version.h"
static void __udelay(int us)
diff --git a/arch/arm/boards/skov-imx6/version.c b/arch/arm/boards/skov-imx6/version.c
index 5a6a0625ca..503a60366f 100644
--- a/arch/arm/boards/skov-imx6/version.c
+++ b/arch/arm/boards/skov-imx6/version.c
@@ -3,9 +3,9 @@
#define pr_fmt(fmt) "skov-imx6: " fmt
#include <common.h>
-#include <mach/iomux-mx6.h>
-#include <mach/imx-gpio.h>
-#include <mach/imx6.h>
+#include <mach/imx/iomux-mx6.h>
+#include <mach/imx/imx-gpio.h>
+#include <mach/imx/imx6.h>
#include "version.h"
diff --git a/arch/arm/boards/solidrun-microsom/board.c b/arch/arm/boards/solidrun-microsom/board.c
index 85e1ab4250..c55dcdd74f 100644
--- a/arch/arm/boards/solidrun-microsom/board.c
+++ b/arch/arm/boards/solidrun-microsom/board.c
@@ -9,10 +9,10 @@
#include <envfs.h>
#include <gpio.h>
#include <init.h>
-#include <mach/bbu.h>
-#include <mach/generic.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx6.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx6.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include <linux/clk.h>
#include <linux/sizes.h>
--git a/arch/arm/boards/solidrun-microsom/flash-header-microsom-i1.imxcfg b/arch/arm/boards/solidrun-microsom/flash-header-microsom-i1.imxcfg
index 374ea2e8a2..b049cfc746 100644
--- a/arch/arm/boards/solidrun-microsom/flash-header-microsom-i1.imxcfg
+++ b/arch/arm/boards/solidrun-microsom/flash-header-microsom-i1.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x10000000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
#include "800mhz-32b.imxcfg"
#include "800mhz-2x128mx16.imxcfg"
--git a/arch/arm/boards/solidrun-microsom/flash-header-microsom-i2.imxcfg b/arch/arm/boards/solidrun-microsom/flash-header-microsom-i2.imxcfg
index 7c1b17f6f2..b6634446f3 100644
--- a/arch/arm/boards/solidrun-microsom/flash-header-microsom-i2.imxcfg
+++ b/arch/arm/boards/solidrun-microsom/flash-header-microsom-i2.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x10000000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
#include "800mhz-64b.imxcfg"
#include "800mhz-4x128mx16.imxcfg"
--git a/arch/arm/boards/solidrun-microsom/flash-header-microsom-i2eX.imxcfg b/arch/arm/boards/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
index f777784e44..e1447b9d5a 100644
--- a/arch/arm/boards/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
+++ b/arch/arm/boards/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x10000000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
#include "1066mhz-64b.imxcfg"
#include "1066mhz-4x128mx16.imxcfg"
--git a/arch/arm/boards/solidrun-microsom/flash-header-microsom-i4.imxcfg b/arch/arm/boards/solidrun-microsom/flash-header-microsom-i4.imxcfg
index 2a12b05340..ec9c3e385e 100644
--- a/arch/arm/boards/solidrun-microsom/flash-header-microsom-i4.imxcfg
+++ b/arch/arm/boards/solidrun-microsom/flash-header-microsom-i4.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x10000000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
#include "1066mhz-64b.imxcfg"
#include "1066mhz-4x256mx16.imxcfg"
diff --git a/arch/arm/boards/solidrun-microsom/lowlevel.c b/arch/arm/boards/solidrun-microsom/lowlevel.c
index b8f68fa22c..801678e777 100644
--- a/arch/arm/boards/solidrun-microsom/lowlevel.c
+++ b/arch/arm/boards/solidrun-microsom/lowlevel.c
@@ -2,8 +2,8 @@
#include <asm/barebox-arm.h>
#include <common.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
extern char __dtb_imx6dl_hummingboard_start[];
extern char __dtb_imx6q_hummingboard_start[];
diff --git a/arch/arm/boards/technexion-pico-hobbit/board.c b/arch/arm/boards/technexion-pico-hobbit/board.c
index a190959d0a..202b76bc8e 100644
--- a/arch/arm/boards/technexion-pico-hobbit/board.c
+++ b/arch/arm/boards/technexion-pico-hobbit/board.c
@@ -9,10 +9,10 @@
#include <envfs.h>
#include <gpio.h>
#include <init.h>
-#include <mach/generic.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx6.h>
-#include <mach/bbu.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/bbu.h>
#include <linux/sizes.h>
#include <linux/phy.h>
#include <mfd/imx6q-iomuxc-gpr.h>
diff --git a/arch/arm/boards/technexion-pico-hobbit/lowlevel.c b/arch/arm/boards/technexion-pico-hobbit/lowlevel.c
index 43259675b0..2e81862993 100644
--- a/arch/arm/boards/technexion-pico-hobbit/lowlevel.c
+++ b/arch/arm/boards/technexion-pico-hobbit/lowlevel.c
@@ -2,13 +2,13 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <io.h>
#include <debug_ll.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <image-metadata.h>
diff --git a/arch/arm/boards/technexion-wandboard/board.c b/arch/arm/boards/technexion-wandboard/board.c
index 8d63b9fff7..a594adb411 100644
--- a/arch/arm/boards/technexion-wandboard/board.c
+++ b/arch/arm/boards/technexion-wandboard/board.c
@@ -8,10 +8,10 @@
#include <envfs.h>
#include <gpio.h>
#include <init.h>
-#include <mach/bbu.h>
-#include <mach/generic.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx6.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx6.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include <linux/sizes.h>
#include <linux/phy.h>
diff --git a/arch/arm/boards/technexion-wandboard/lowlevel.c b/arch/arm/boards/technexion-wandboard/lowlevel.c
index 33babbbb2f..448e81a61c 100644
--- a/arch/arm/boards/technexion-wandboard/lowlevel.c
+++ b/arch/arm/boards/technexion-wandboard/lowlevel.c
@@ -3,14 +3,14 @@
#include <debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx6-mmdc.h>
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6.h>
-#include <mach/xload.h>
-#include <mach/esdctl.h>
+#include <mach/imx/imx6-mmdc.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/esdctl.h>
#include <serial/imx-uart.h>
static void __udelay(int us)
diff --git a/arch/arm/boards/tqma53/board.c b/arch/arm/boards/tqma53/board.c
index 14e514ee78..54e661c395 100644
--- a/arch/arm/boards/tqma53/board.c
+++ b/arch/arm/boards/tqma53/board.c
@@ -8,7 +8,7 @@
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int tqma53_devices_init(void)
{
diff --git a/arch/arm/boards/tqma53/lowlevel.c b/arch/arm/boards/tqma53/lowlevel.c
index 37a0984161..898b251d66 100644
--- a/arch/arm/boards/tqma53/lowlevel.c
+++ b/arch/arm/boards/tqma53/lowlevel.c
@@ -3,12 +3,12 @@
#include <common.h>
#include <debug_ll.h>
#include <io.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx5.h>
-#include <mach/imx53-regs.h>
-#include <mach/generic.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/generic.h>
#include <image-metadata.h>
extern char __dtb_imx53_mba53_start[];
diff --git a/arch/arm/boards/tqma6ulx/board.c b/arch/arm/boards/tqma6ulx/board.c
index c25b0ce2e3..fd9a299511 100644
--- a/arch/arm/boards/tqma6ulx/board.c
+++ b/arch/arm/boards/tqma6ulx/board.c
@@ -6,8 +6,8 @@
#include <common.h>
#include <bootsource.h>
#include <init.h>
-#include <mach/generic.h>
-#include <mach/bbu.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/bbu.h>
#include <of.h>
#include <string.h>
--git a/arch/arm/boards/tqma6ulx/flash-header-imx6ul-tqma6ulx.imxcfg b/arch/arm/boards/tqma6ulx/flash-header-imx6ul-tqma6ulx.imxcfg
index 4f71136149..9c9fb33743 100644
--- a/arch/arm/boards/tqma6ulx/flash-header-imx6ul-tqma6ulx.imxcfg
+++ b/arch/arm/boards/tqma6ulx/flash-header-imx6ul-tqma6ulx.imxcfg
@@ -99,4 +99,4 @@ wm 32 0x021B0004 0x0002552D /* MMDC0_MDPDC now SDCTL power down enabled */
wm 32 0x021B0404 0x00011006 /* MMDC0_MAPSR ADOPT power down enabled */
wm 32 0x021B001C 0x00000000 /* MMDC0_MDSCR, clear this register (especially the configuration bit as initialization is complete) */
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
diff --git a/arch/arm/boards/tqma6ulx/lowlevel.c b/arch/arm/boards/tqma6ulx/lowlevel.c
index db77d1f532..104a998566 100644
--- a/arch/arm/boards/tqma6ulx/lowlevel.c
+++ b/arch/arm/boards/tqma6ulx/lowlevel.c
@@ -6,10 +6,10 @@
#include <common.h>
#include <debug_ll.h>
#include <firmware.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm.h>
-#include <mach/esdctl.h>
-#include <mach/iomux-mx6ul.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/iomux-mx6ul.h>
#include <asm/cache.h>
extern char __dtb_z_imx6ul_mba6ulx_start[];
diff --git a/arch/arm/boards/tqma6x/board.c b/arch/arm/boards/tqma6x/board.c
index 7a770bd3c3..5f59a259e6 100644
--- a/arch/arm/boards/tqma6x/board.c
+++ b/arch/arm/boards/tqma6x/board.c
@@ -17,12 +17,12 @@
#include <asm/armlinux.h>
#include <asm/io.h>
-#include <mach/devices-imx6.h>
-#include <mach/imx6-regs.h>
-#include <mach/iomux-mx6.h>
-#include <mach/generic.h>
-#include <mach/imx6.h>
-#include <mach/bbu.h>
+#include <mach/imx/devices-imx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/iomux-mx6.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/bbu.h>
#define RQ7_GPIO_ENET_PHYADD2 IMX_GPIO_NR(6, 30)
#define RQ7_GPIO_ENET_MODE0 IMX_GPIO_NR(6, 25)
--git a/arch/arm/boards/tqma6x/flash-header-tqma6dl.imxcfg b/arch/arm/boards/tqma6x/flash-header-tqma6dl.imxcfg
index 9f8d9c0d26..e93d53ed79 100644
--- a/arch/arm/boards/tqma6x/flash-header-tqma6dl.imxcfg
+++ b/arch/arm/boards/tqma6x/flash-header-tqma6dl.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6dl-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6dl-ddr-regs.h>
wm 32 MX6_IOM_DRAM_SDQS0 0x00000030
wm 32 MX6_IOM_DRAM_SDQS1 0x00000030
--git a/arch/arm/boards/tqma6x/flash-header-tqma6q.imxcfg b/arch/arm/boards/tqma6x/flash-header-tqma6q.imxcfg
index b0923e77f9..ec682e0109 100644
--- a/arch/arm/boards/tqma6x/flash-header-tqma6q.imxcfg
+++ b/arch/arm/boards/tqma6x/flash-header-tqma6q.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_DRAM_SDQS0 0x00000030
wm 32 MX6_IOM_DRAM_SDQS1 0x00000030
diff --git a/arch/arm/boards/tqma6x/lowlevel.c b/arch/arm/boards/tqma6x/lowlevel.c
index 845390642b..8af644d2a1 100644
--- a/arch/arm/boards/tqma6x/lowlevel.c
+++ b/arch/arm/boards/tqma6x/lowlevel.c
@@ -10,7 +10,7 @@
#include <asm/sections.h>
#include <asm/cache.h>
#include <asm/mmu.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6.h>
extern char __dtb_imx6q_mba6x_start[];
extern char __dtb_imx6dl_mba6x_start[];
diff --git a/arch/arm/boards/tqma8mpxl/board.c b/arch/arm/boards/tqma8mpxl/board.c
index 18c3d413ff..39d1bd24d4 100644
--- a/arch/arm/boards/tqma8mpxl/board.c
+++ b/arch/arm/boards/tqma8mpxl/board.c
@@ -10,8 +10,8 @@
#include <init.h>
#include <linux/phy.h>
#include <linux/sizes.h>
-#include <mach/bbu.h>
-#include <mach/iomux-mx8mp.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/iomux-mx8mp.h>
#include <gpio.h>
#include <envfs.h>
diff --git a/arch/arm/boards/tqma8mpxl/lowlevel.c b/arch/arm/boards/tqma8mpxl/lowlevel.c
index 037c7abf4b..9a17cd2514 100644
--- a/arch/arm/boards/tqma8mpxl/lowlevel.c
+++ b/arch/arm/boards/tqma8mpxl/lowlevel.c
@@ -9,13 +9,13 @@
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
#include <linux/sizes.h>
-#include <mach/atf.h>
-#include <mach/xload.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx8mp-regs.h>
-#include <mach/iomux-mx8mp.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8mp-regs.h>
+#include <mach/imx/iomux-mx8mp.h>
+#include <mach/imx/imx8m-ccm-regs.h>
#include <mfd/pca9450.h>
#include <pbl/i2c.h>
#include <pbl/pmic.h>
diff --git a/arch/arm/boards/udoo-neo/board.c b/arch/arm/boards/udoo-neo/board.c
index 075423099b..d9b9517fc1 100644
--- a/arch/arm/boards/udoo-neo/board.c
+++ b/arch/arm/boards/udoo-neo/board.c
@@ -4,8 +4,8 @@
#include <common.h>
#include <deep-probe.h>
#include <gpio.h>
-#include <mach/bbu.h>
-#include <mach/imx6.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx6.h>
/**
* Detects the board model by checking the R184 and R185 resistors.
diff --git a/arch/arm/boards/udoo-neo/lowlevel.c b/arch/arm/boards/udoo-neo/lowlevel.c
index 83530fb190..269fda04dc 100644
--- a/arch/arm/boards/udoo-neo/lowlevel.c
+++ b/arch/arm/boards/udoo-neo/lowlevel.c
@@ -3,10 +3,10 @@
#include <debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/boards/udoo/board.c b/arch/arm/boards/udoo/board.c
index ae65ba41a5..2705b48e46 100644
--- a/arch/arm/boards/udoo/board.c
+++ b/arch/arm/boards/udoo/board.c
@@ -7,24 +7,24 @@
#include <common.h>
#include <init.h>
#include <environment.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <gpio.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <linux/phy.h>
#include <asm/io.h>
#include <asm/mmu.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
#include <net.h>
#include <linux/micrel_phy.h>
-#include <mach/imx6.h>
-#include <mach/devices-imx6.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/devices-imx6.h>
+#include <mach/imx/iomux-mx6.h>
#include <spi/spi.h>
-#include <mach/spi.h>
-#include <mach/usb.h>
+#include <mach/imx/spi.h>
+#include <mach/imx/usb.h>
static iomux_v3_cfg_t udoo_enet_gpio_pads_1[] = {
/* RGMII reset */
--git a/arch/arm/boards/udoo/flash-header-mx6-udoo.imxcfg b/arch/arm/boards/udoo/flash-header-mx6-udoo.imxcfg
index 0d364bf8ce..95ba1ddc41 100644
--- a/arch/arm/boards/udoo/flash-header-mx6-udoo.imxcfg
+++ b/arch/arm/boards/udoo/flash-header-mx6-udoo.imxcfg
@@ -4,8 +4,8 @@ soc imx6
loadaddr 0x20000000
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
/* MX6_IOM_DRAM_SDQS0 -> MX6_IOM_DRAM_SDQS7 */
wm 32 MX6_IOM_DRAM_SDQS0 0x00000030
diff --git a/arch/arm/boards/udoo/lowlevel.c b/arch/arm/boards/udoo/lowlevel.c
index 0f9e2d69a4..2570239b96 100644
--- a/arch/arm/boards/udoo/lowlevel.c
+++ b/arch/arm/boards/udoo/lowlevel.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/board.c b/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/board.c
index 35d78ea5e1..154931d534 100644
--- a/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/board.c
+++ b/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/board.c
@@ -10,8 +10,8 @@
#include <init.h>
#include <linux/phy.h>
#include <linux/sizes.h>
-#include <mach/bbu.h>
-#include <mach/iomux-mx8mp.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/iomux-mx8mp.h>
#include <gpio.h>
#include <envfs.h>
diff --git a/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c b/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c
index 3eebb9e646..e8c3dd0c49 100644
--- a/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c
+++ b/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c
@@ -13,13 +13,13 @@
#include <pbl/i2c.h>
#include <pbl/pmic.h>
#include <linux/sizes.h>
-#include <mach/atf.h>
-#include <mach/xload.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx8mp-regs.h>
-#include <mach/iomux-mx8mp.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8mp-regs.h>
+#include <mach/imx/iomux-mx8mp.h>
+#include <mach/imx/imx8m-ccm-regs.h>
#include <mfd/pca9450.h>
#include <soc/imx8m/ddr.h>
#include <soc/fsl/fsl_udc.h>
diff --git a/arch/arm/boards/variscite-mx6/board.c b/arch/arm/boards/variscite-mx6/board.c
index 6dd89e6f7b..a0c1dde84e 100644
--- a/arch/arm/boards/variscite-mx6/board.c
+++ b/arch/arm/boards/variscite-mx6/board.c
@@ -19,13 +19,13 @@
#include <generated/mach-types.h>
#include <asm/io.h>
#include <asm/mmu.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
-#include <mach/imx6.h>
-#include <mach/devices-imx6.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/devices-imx6.h>
+#include <mach/imx/iomux-mx6.h>
#include <spi/spi.h>
-#include <mach/spi.h>
+#include <mach/imx/spi.h>
#include <i2c/i2c.h>
#define ETH_PHY_RST IMX_GPIO_NR(1, 25)
--git a/arch/arm/boards/variscite-mx6/flash-header-variscite.imxcfg b/arch/arm/boards/variscite-mx6/flash-header-variscite.imxcfg
index b0a31a0b96..34790120ac 100644
--- a/arch/arm/boards/variscite-mx6/flash-header-variscite.imxcfg
+++ b/arch/arm/boards/variscite-mx6/flash-header-variscite.imxcfg
@@ -4,8 +4,8 @@ loadaddr 0x10000000
soc imx6
ivtofs 0x400
-#include <mach/imx6-ddr-regs.h>
-#include <mach/imx6q-ddr-regs.h>
+#include <mach/imx/imx6-ddr-regs.h>
+#include <mach/imx/imx6q-ddr-regs.h>
wm 32 MX6_IOM_GRP_DDR_TYPE 0x000C0000
wm 32 MX6_IOM_GRP_DDRPKE 0x00000000
diff --git a/arch/arm/boards/variscite-mx6/lowlevel.c b/arch/arm/boards/variscite-mx6/lowlevel.c
index 99455b2a45..d2dabd091b 100644
--- a/arch/arm/boards/variscite-mx6/lowlevel.c
+++ b/arch/arm/boards/variscite-mx6/lowlevel.c
@@ -14,7 +14,7 @@
#include <asm/sections.h>
#include <asm/cache.h>
#include <asm/mmu.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/boards/webasto-ccbv2/board.c b/arch/arm/boards/webasto-ccbv2/board.c
index 71e35e0970..13f3ed129f 100644
--- a/arch/arm/boards/webasto-ccbv2/board.c
+++ b/arch/arm/boards/webasto-ccbv2/board.c
@@ -5,8 +5,8 @@
#include <common.h>
#include <init.h>
-#include <mach/generic.h>
-#include <mach/bbu.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/bbu.h>
#include <of.h>
#include <string.h>
--git a/arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-256.imxcfg b/arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-256.imxcfg
index ea327b2630..ef73ec71db 100644
--- a/arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-256.imxcfg
+++ b/arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-256.imxcfg
@@ -85,4 +85,4 @@ wm 32 0x021B001C 0x00000000
/* Disable TZASC bypass */
wm 32 0x020E4024 0x00000001
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
--git a/arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-512.imxcfg b/arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-512.imxcfg
index d438a665f1..56ca917d10 100644
--- a/arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-512.imxcfg
+++ b/arch/arm/boards/webasto-ccbv2/flash-header-imx6ul-webasto-ccbv2-512.imxcfg
@@ -85,4 +85,4 @@ wm 32 0x021B001C 0x00000000
/* Disable TZASC bypass */
wm 32 0x020E4024 0x00000001
-#include <mach/habv4-imx6-gencsf.h>
+#include <mach/imx/habv4-imx6-gencsf.h>
diff --git a/arch/arm/boards/webasto-ccbv2/lowlevel.c b/arch/arm/boards/webasto-ccbv2/lowlevel.c
index 2bf0c3636f..7e0bfe1ee0 100644
--- a/arch/arm/boards/webasto-ccbv2/lowlevel.c
+++ b/arch/arm/boards/webasto-ccbv2/lowlevel.c
@@ -6,10 +6,10 @@
#include <common.h>
#include <debug_ll.h>
#include <firmware.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm.h>
-#include <mach/esdctl.h>
-#include <mach/iomux-mx6ul.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/iomux-mx6ul.h>
#include <asm/cache.h>
#include <tee/optee.h>
diff --git a/arch/arm/boards/zii-imx51-rdu1/board.c b/arch/arm/boards/zii-imx51-rdu1/board.c
index 0b5271b8de..b72219b4bc 100644
--- a/arch/arm/boards/zii-imx51-rdu1/board.c
+++ b/arch/arm/boards/zii-imx51-rdu1/board.c
@@ -19,9 +19,9 @@
#include <envfs.h>
#include <init.h>
#include <environment.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include <libfile.h>
-#include <mach/imx5.h>
+#include <mach/imx/imx5.h>
#include <net.h>
#include <linux/crc8.h>
#include <linux/sizes.h>
diff --git a/arch/arm/boards/zii-imx51-rdu1/lowlevel.c b/arch/arm/boards/zii-imx51-rdu1/lowlevel.c
index 14136358dd..38588d43f9 100644
--- a/arch/arm/boards/zii-imx51-rdu1/lowlevel.c
+++ b/arch/arm/boards/zii-imx51-rdu1/lowlevel.c
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
-#include <mach/clock-imx51_53.h>
-#include <mach/iomux-mx51.h>
+#include <mach/imx/clock-imx51_53.h>
+#include <mach/imx/iomux-mx51.h>
#include <common.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/zii-imx6q-rdu2/board.c b/arch/arm/boards/zii-imx6q-rdu2/board.c
index f57827cd13..88912a5108 100644
--- a/arch/arm/boards/zii-imx6q-rdu2/board.c
+++ b/arch/arm/boards/zii-imx6q-rdu2/board.c
@@ -9,8 +9,8 @@
#include <gpio.h>
#include <i2c/i2c.h>
#include <init.h>
-#include <mach/bbu.h>
-#include <mach/imx6.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx6.h>
#include <net.h>
#include <linux/nvmem-consumer.h>
#include "../zii-common/pn-fixup.h"
diff --git a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
index a80ce0afc5..3ab2da17f0 100644
--- a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
+++ b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
@@ -5,11 +5,11 @@
#include <debug_ll.h>
#include <common.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx6.h>
-#include <mach/xload.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/iomux-mx6.h>
#include <asm/barebox-arm.h>
struct reginit {
diff --git a/arch/arm/boards/zii-imx7d-dev/board.c b/arch/arm/boards/zii-imx7d-dev/board.c
index 5f7314b0b8..2d7b589908 100644
--- a/arch/arm/boards/zii-imx7d-dev/board.c
+++ b/arch/arm/boards/zii-imx7d-dev/board.c
@@ -9,11 +9,11 @@
#include <init.h>
#include <io.h>
#include <gpio.h>
-#include <mach/imx7-regs.h>
+#include <mach/imx/imx7-regs.h>
#include <mfd/imx7-iomuxc-gpr.h>
#include <environment.h>
#include <envfs.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static void zii_imx7d_rpu2_init_fec(void)
{
--git a/arch/arm/boards/zii-imx7d-dev/flash-header-zii-imx7d-dev.imxcfg b/arch/arm/boards/zii-imx7d-dev/flash-header-zii-imx7d-dev.imxcfg
index 05f95bbed1..053680f76d 100644
--- a/arch/arm/boards/zii-imx7d-dev/flash-header-zii-imx7d-dev.imxcfg
+++ b/arch/arm/boards/zii-imx7d-dev/flash-header-zii-imx7d-dev.imxcfg
@@ -4,5 +4,5 @@ soc imx7
loadaddr 0x80000000
ivtofs 0x400
-#include <mach/flash-header/imx7d-ddr-sabresd.imxcfg>
+#include <mach/imx/flash-header/imx7d-ddr-sabresd.imxcfg>
diff --git a/arch/arm/boards/zii-imx7d-dev/lowlevel.c b/arch/arm/boards/zii-imx7d-dev/lowlevel.c
index 0e316b6024..2b2ad6aa84 100644
--- a/arch/arm/boards/zii-imx7d-dev/lowlevel.c
+++ b/arch/arm/boards/zii-imx7d-dev/lowlevel.c
@@ -9,14 +9,14 @@
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx7-ccm-regs.h>
-#include <mach/iomux-mx7.h>
-#include <mach/debug_ll.h>
+#include <mach/imx/imx7-ccm-regs.h>
+#include <mach/imx/iomux-mx7.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
extern char __dtb_z_imx7d_zii_rpu2_start[];
extern char __dtb_z_imx7d_zii_rmu2_start[];
diff --git a/arch/arm/boards/zii-imx8mq-dev/board.c b/arch/arm/boards/zii-imx8mq-dev/board.c
index a56ebbc669..3581c7251d 100644
--- a/arch/arm/boards/zii-imx8mq-dev/board.c
+++ b/arch/arm/boards/zii-imx8mq-dev/board.c
@@ -10,7 +10,7 @@
#include <init.h>
#include <asm/memory.h>
#include <linux/sizes.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
#include "../zii-common/pn-fixup.h"
#define LRU_FLAG_EGALAX BIT(0)
diff --git a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
index cf53fb2def..8e755955d5 100644
--- a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
+++ b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
@@ -8,20 +8,20 @@
#include <firmware.h>
#include <image-metadata.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx8m-ccm-regs.h>
-#include <mach/iomux-mx8mq.h>
+#include <mach/imx/imx8m-ccm-regs.h>
+#include <mach/imx/iomux-mx8mq.h>
#include <soc/imx8m/ddr.h>
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
#include <io.h>
#include <debug_ll.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <asm/mmu.h>
-#include <mach/atf.h>
-#include <mach/esdctl.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/esdctl.h>
#include "ddr.h"
diff --git a/arch/arm/boards/zii-vf610-dev/board.c b/arch/arm/boards/zii-vf610-dev/board.c
index 3a3ba2d58c..675f13b882 100644
--- a/arch/arm/boards/zii-vf610-dev/board.c
+++ b/arch/arm/boards/zii-vf610-dev/board.c
@@ -10,7 +10,7 @@
#include <linux/clk.h>
#include <dt-bindings/clock/vf610-clock.h>
#include <envfs.h>
-#include <mach/bbu.h>
+#include <mach/imx/bbu.h>
static int expose_signals(const struct gpio *signals,
--git a/arch/arm/boards/zii-vf610-dev/flash-header-zii-vf610-dev.imxcfg b/arch/arm/boards/zii-vf610-dev/flash-header-zii-vf610-dev.imxcfg
index 617245b2d3..aace9e9226 100644
--- a/arch/arm/boards/zii-vf610-dev/flash-header-zii-vf610-dev.imxcfg
+++ b/arch/arm/boards/zii-vf610-dev/flash-header-zii-vf610-dev.imxcfg
@@ -4,12 +4,12 @@ soc vf610
loadaddr 0x80000000
ivtofs 0x400
-#include <mach/vf610-iomux-regs.h>
-#include <mach/vf610-ddrmc-regs.h>
+#include <mach/imx/vf610-iomux-regs.h>
+#include <mach/imx/vf610-ddrmc-regs.h>
-#include <mach/flash-header/vf610-ddr-pll2-400mhz.imxcfg>
-#include <mach/flash-header/vf610-iomux-ddr-default.imxcfg>
-#include <mach/flash-header/vf610-ddr-cr-default.imxcfg>
+#include <mach/imx/flash-header/vf610-ddr-pll2-400mhz.imxcfg>
+#include <mach/imx/flash-header/vf610-iomux-ddr-default.imxcfg>
+#include <mach/imx/flash-header/vf610-ddr-cr-default.imxcfg>
wm 32 DDRMC_CR26 0x0c300068
wm 32 DDRMC_CR31 0x006c0200
@@ -21,7 +21,7 @@ wm 32 DDRMC_CR73 0x0a010100
*/
wm 32 DDRMC_CR73 0x0a010100
-#include <mach/flash-header/vf610-ddr-phy-default.imxcfg>
+#include <mach/imx/flash-header/vf610-ddr-phy-default.imxcfg>
wm 32 DDRMC_CR00 DDRMC_CR00_DRAM_CLASS_DDR3_START
diff --git a/arch/arm/boards/zii-vf610-dev/lowlevel.c b/arch/arm/boards/zii-vf610-dev/lowlevel.c
index a05515db16..8fe779c9e5 100644
--- a/arch/arm/boards/zii-vf610-dev/lowlevel.c
+++ b/arch/arm/boards/zii-vf610-dev/lowlevel.c
@@ -5,13 +5,13 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/esdctl.h>
-#include <mach/vf610-regs.h>
-#include <mach/clock-vf610.h>
-#include <mach/iomux-vf610.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/vf610-regs.h>
+#include <mach/imx/clock-vf610.h>
+#include <mach/imx/iomux-vf610.h>
#include <debug_ll.h>
static inline void setup_uart(void)
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index b0f690118b..ea4407b6fa 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -6,10 +6,12 @@
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
-#endif
-
+#elif defined CONFIG_ARCH_IMX
+#include <mach/imx/debug_ll.h>
+#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
#endif
+#endif
#endif
diff --git a/arch/arm/mach-imx/atf.c b/arch/arm/mach-imx/atf.c
index 2a3e3f53b8..39bc1e8bac 100644
--- a/arch/arm/mach-imx/atf.c
+++ b/arch/arm/mach-imx/atf.c
@@ -3,10 +3,10 @@
#include <asm/sections.h>
#include <common.h>
#include <firmware.h>
-#include <mach/atf.h>
-#include <mach/generic.h>
-#include <mach/xload.h>
-#include <mach/romapi.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/romapi.h>
#include <soc/fsl/fsl_udc.h>
#include <soc/fsl/caam.h>
diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
index c0193cfa43..a6322e4850 100644
--- a/arch/arm/mach-imx/boot.c
+++ b/arch/arm/mach-imx/boot.c
@@ -8,21 +8,21 @@
#include <magicvar.h>
#include <io.h>
-#include <mach/clock-imx6.h>
-#include <mach/generic.h>
-#include <mach/imx25-regs.h>
-#include <mach/imx27-regs.h>
-#include <mach/imx35-regs.h>
-#include <mach/imx51-regs.h>
-#include <mach/imx53-regs.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx7-regs.h>
-#include <mach/imx8mm-regs.h>
-#include <mach/imx8mp-regs.h>
-#include <mach/imx8mq-regs.h>
-#include <mach/vf610-regs.h>
-#include <mach/imx8mq.h>
-#include <mach/imx6.h>
+#include <mach/imx/clock-imx6.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx25-regs.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/imx35-regs.h>
+#include <mach/imx/imx51-regs.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx7-regs.h>
+#include <mach/imx/imx8mm-regs.h>
+#include <mach/imx/imx8mp-regs.h>
+#include <mach/imx/imx8mq-regs.h>
+#include <mach/imx/vf610-regs.h>
+#include <mach/imx/imx8mq.h>
+#include <mach/imx/imx6.h>
#include <soc/fsl/fsl_udc.h>
diff --git a/arch/arm/mach-imx/bootrom-cmd.c b/arch/arm/mach-imx/bootrom-cmd.c
index 35e52b0f92..08e393b01a 100644
--- a/arch/arm/mach-imx/bootrom-cmd.c
+++ b/arch/arm/mach-imx/bootrom-cmd.c
@@ -6,8 +6,8 @@
#include <printk.h>
#include <linux/bitops.h>
#include <linux/bitfield.h>
-#include <mach/imx8m-regs.h>
-#include <mach/romapi.h>
+#include <mach/imx/imx8m-regs.h>
+#include <mach/imx/romapi.h>
/* i.MX7 and later ID field is swapped compared to i.MX6 */
#define ROM_EVENT_FORMAT_V0_RES GENMASK(31, 24)
diff --git a/arch/arm/mach-imx/cpu_init.c b/arch/arm/mach-imx/cpu_init.c
index 3f16ca70ce..4e55d72857 100644
--- a/arch/arm/mach-imx/cpu_init.c
+++ b/arch/arm/mach-imx/cpu_init.c
@@ -6,10 +6,10 @@
#include <asm/errata.h>
#include <linux/types.h>
#include <linux/bitops.h>
-#include <mach/generic.h>
-#include <mach/imx7-regs.h>
-#include <mach/imx8mq-regs.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx7-regs.h>
+#include <mach/imx/imx8mq-regs.h>
+#include <mach/imx/imx8m-ccm-regs.h>
#include <io.h>
#include <asm/syscounter.h>
#include <asm/system.h>
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c
index ae2769d259..7572738d0e 100644
--- a/arch/arm/mach-imx/devices.c
+++ b/arch/arm/mach-imx/devices.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <driver.h>
-#include <mach/devices.h>
+#include <mach/imx/devices.h>
static inline struct device *imx_add_device(char *name, int id, void *base, int size, void *pdata)
{
diff --git a/arch/arm/mach-imx/esdctl-v4.c b/arch/arm/mach-imx/esdctl-v4.c
index 14a967d521..26f476f0f5 100644
--- a/arch/arm/mach-imx/esdctl-v4.c
+++ b/arch/arm/mach-imx/esdctl-v4.c
@@ -5,8 +5,8 @@
#include <common.h>
#include <io.h>
-#include <mach/esdctl-v4.h>
-#include <mach/imx53-regs.h>
+#include <mach/imx/esdctl-v4.h>
+#include <mach/imx/imx53-regs.h>
#include <asm/system.h>
void imx_esdctlv4_do_write_leveling(void)
diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-imx/esdctl.c
index 29e9929334..bbf8163e93 100644
--- a/arch/arm/mach-imx/esdctl.c
+++ b/arch/arm/mach-imx/esdctl.c
@@ -13,21 +13,21 @@
#include <linux/bitfield.h>
#include <asm/barebox-arm.h>
#include <asm/memory.h>
-#include <mach/esdctl.h>
-#include <mach/esdctl-v4.h>
-#include <mach/imx6-mmdc.h>
-#include <mach/imx1-regs.h>
-#include <mach/imx21-regs.h>
-#include <mach/imx25-regs.h>
-#include <mach/imx27-regs.h>
-#include <mach/imx31-regs.h>
-#include <mach/imx35-regs.h>
-#include <mach/imx51-regs.h>
-#include <mach/imx53-regs.h>
-#include <mach/imx6-regs.h>
-#include <mach/vf610-ddrmc.h>
-#include <mach/imx8m-regs.h>
-#include <mach/imx7-regs.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/esdctl-v4.h>
+#include <mach/imx/imx6-mmdc.h>
+#include <mach/imx/imx1-regs.h>
+#include <mach/imx/imx21-regs.h>
+#include <mach/imx/imx25-regs.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/imx31-regs.h>
+#include <mach/imx/imx35-regs.h>
+#include <mach/imx/imx51-regs.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/vf610-ddrmc.h>
+#include <mach/imx/imx8m-regs.h>
+#include <mach/imx/imx7-regs.h>
struct imx_esdctl_data {
unsigned long base0;
diff --git a/arch/arm/mach-imx/external-nand-boot.c b/arch/arm/mach-imx/external-nand-boot.c
index 92dcaeaaf8..79cedbd68a 100644
--- a/arch/arm/mach-imx/external-nand-boot.c
+++ b/arch/arm/mach-imx/external-nand-boot.c
@@ -9,14 +9,14 @@
#include <asm/sections.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
-#include <mach/imx-nand.h>
-#include <mach/esdctl.h>
-#include <mach/generic.h>
-#include <mach/imx21-regs.h>
-#include <mach/imx25-regs.h>
-#include <mach/imx27-regs.h>
-#include <mach/imx31-regs.h>
-#include <mach/imx35-regs.h>
+#include <mach/imx/imx-nand.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx21-regs.h>
+#include <mach/imx/imx25-regs.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/imx31-regs.h>
+#include <mach/imx/imx35-regs.h>
#define BARE_INIT_FUNCTION(name) \
__section(.text_bare_init_##name) \
diff --git a/arch/arm/mach-imx/iim.c b/arch/arm/mach-imx/iim.c
index f5190ef3c7..d403fa9f86 100644
--- a/arch/arm/mach-imx/iim.c
+++ b/arch/arm/mach-imx/iim.c
@@ -23,11 +23,11 @@
#include <regulator.h>
#include <linux/err.h>
-#include <mach/iim.h>
-#include <mach/imx51-regs.h>
-#include <mach/imx53-regs.h>
-#include <mach/clock-imx51_53.h>
-#include <mach/imx25-fusemap.h>
+#include <mach/imx/iim.h>
+#include <mach/imx/imx51-regs.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/clock-imx51_53.h>
+#include <mach/imx/imx25-fusemap.h>
#define DRIVERNAME "imx_iim"
#define IIM_NUM_BANKS 8
diff --git a/arch/arm/mach-imx/imx-bbu-external-nand.c b/arch/arm/mach-imx/imx-bbu-external-nand.c
index 40dbaabdc7..7523008cdb 100644
--- a/arch/arm/mach-imx/imx-bbu-external-nand.c
+++ b/arch/arm/mach-imx/imx-bbu-external-nand.c
@@ -17,8 +17,8 @@
#include <linux/mtd/mtd-abi.h>
#include <linux/stat.h>
#include <ioctl.h>
-#include <mach/bbu.h>
-#include <mach/imx-nand.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/imx-nand.h>
#include <asm/barebox-arm-head.h>
static int imx_bbu_external_nand_update(struct bbu_handler *handler, struct bbu_data *data)
diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c
index 3b0c587cc5..a86bd75253 100644
--- a/arch/arm/mach-imx/imx-bbu-internal.c
+++ b/arch/arm/mach-imx/imx-bbu-internal.c
@@ -17,8 +17,8 @@
#include <linux/stat.h>
#include <ioctl.h>
#include <environment.h>
-#include <mach/bbu.h>
-#include <mach/generic.h>
+#include <mach/imx/bbu.h>
+#include <mach/imx/generic.h>
#include <libfile.h>
#define IMX_INTERNAL_FLAG_ERASE BIT(30)
diff --git a/arch/arm/mach-imx/imx.c b/arch/arm/mach-imx/imx.c
index 489cef6d86..eb34036a71 100644
--- a/arch/arm/mach-imx/imx.c
+++ b/arch/arm/mach-imx/imx.c
@@ -4,9 +4,9 @@
#include <of.h>
#include <init.h>
#include <io.h>
-#include <mach/revision.h>
-#include <mach/generic.h>
-#include <mach/reset-reason.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/reset-reason.h>
static int __imx_silicon_revision = IMX_CHIP_REV_UNKNOWN;
diff --git a/arch/arm/mach-imx/imx1.c b/arch/arm/mach-imx/imx1.c
index 6cf95667c9..817095da82 100644
--- a/arch/arm/mach-imx/imx1.c
+++ b/arch/arm/mach-imx/imx1.c
@@ -3,10 +3,10 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/imx1-regs.h>
-#include <mach/weim.h>
-#include <mach/iomux-v1.h>
-#include <mach/generic.h>
+#include <mach/imx/imx1-regs.h>
+#include <mach/imx/weim.h>
+#include <mach/imx/iomux-v1.h>
+#include <mach/imx/generic.h>
#include <reset_source.h>
#define MX1_RSR MX1_SCM_BASE_ADDR
@@ -39,7 +39,7 @@ void imx1_setup_eimcs(size_t cs, unsigned upper, unsigned lower)
writel(lower, MX1_EIM_BASE_ADDR + 4 + cs * 8);
}
-#include <mach/esdctl.h>
+#include <mach/imx/esdctl.h>
int imx1_init(void)
{
diff --git a/arch/arm/mach-imx/imx21.c b/arch/arm/mach-imx/imx21.c
index 223a390c9c..4271fb92d7 100644
--- a/arch/arm/mach-imx/imx21.c
+++ b/arch/arm/mach-imx/imx21.c
@@ -3,10 +3,10 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/imx21-regs.h>
-#include <mach/weim.h>
-#include <mach/iomux-v1.h>
-#include <mach/generic.h>
+#include <mach/imx/imx21-regs.h>
+#include <mach/imx/weim.h>
+#include <mach/imx/iomux-v1.h>
+#include <mach/imx/generic.h>
void imx21_setup_eimcs(size_t cs, unsigned upper, unsigned lower)
{
diff --git a/arch/arm/mach-imx/imx25.c b/arch/arm/mach-imx/imx25.c
index a855ff0714..2f6d6f0523 100644
--- a/arch/arm/mach-imx/imx25.c
+++ b/arch/arm/mach-imx/imx25.c
@@ -2,11 +2,11 @@
#include <common.h>
#include <init.h>
-#include <mach/imx25-regs.h>
-#include <mach/iim.h>
+#include <mach/imx/imx25-regs.h>
+#include <mach/imx/iim.h>
#include <io.h>
-#include <mach/weim.h>
-#include <mach/generic.h>
+#include <mach/imx/weim.h>
+#include <mach/imx/generic.h>
#include <linux/sizes.h>
#define MX25_BOOTROM_HAB_MAGIC 0x3c95cac6
diff --git a/arch/arm/mach-imx/imx27.c b/arch/arm/mach-imx/imx27.c
index 97e6792d87..4dcc2e028e 100644
--- a/arch/arm/mach-imx/imx27.c
+++ b/arch/arm/mach-imx/imx27.c
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <common.h>
-#include <mach/imx27-regs.h>
-#include <mach/weim.h>
-#include <mach/iomux-v1.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/weim.h>
+#include <mach/imx/iomux-v1.h>
#include <linux/sizes.h>
-#include <mach/revision.h>
-#include <mach/generic.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/generic.h>
#include <init.h>
#include <io.h>
diff --git a/arch/arm/mach-imx/imx31.c b/arch/arm/mach-imx/imx31.c
index b524d0105e..20ca9299f1 100644
--- a/arch/arm/mach-imx/imx31.c
+++ b/arch/arm/mach-imx/imx31.c
@@ -4,9 +4,9 @@
#include <init.h>
#include <linux/sizes.h>
#include <io.h>
-#include <mach/imx31-regs.h>
-#include <mach/weim.h>
-#include <mach/generic.h>
+#include <mach/imx/imx31-regs.h>
+#include <mach/imx/weim.h>
+#include <mach/imx/generic.h>
void imx31_setup_weimcs(size_t cs, unsigned upper, unsigned lower,
unsigned additional)
diff --git a/arch/arm/mach-imx/imx35.c b/arch/arm/mach-imx/imx35.c
index c6ded7407d..29b77b42c2 100644
--- a/arch/arm/mach-imx/imx35.c
+++ b/arch/arm/mach-imx/imx35.c
@@ -4,11 +4,11 @@
#include <linux/sizes.h>
#include <init.h>
#include <io.h>
-#include <mach/weim.h>
-#include <mach/imx35-regs.h>
-#include <mach/iim.h>
-#include <mach/revision.h>
-#include <mach/generic.h>
+#include <mach/imx/weim.h>
+#include <mach/imx/imx35-regs.h>
+#include <mach/imx/iim.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/generic.h>
void imx35_setup_weimcs(size_t cs, unsigned upper, unsigned lower,
unsigned additional)
diff --git a/arch/arm/mach-imx/imx5.c b/arch/arm/mach-imx/imx5.c
index 072e960e53..10a3ae7bca 100644
--- a/arch/arm/mach-imx/imx5.c
+++ b/arch/arm/mach-imx/imx5.c
@@ -3,8 +3,8 @@
#include <common.h>
#include <io.h>
#include <linux/sizes.h>
-#include <mach/imx5.h>
-#include <mach/clock-imx51_53.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/clock-imx51_53.h>
void imx5_setup_pll(void __iomem *base, int freq, u32 op, u32 mfd, u32 mfn)
{
diff --git a/arch/arm/mach-imx/imx50.c b/arch/arm/mach-imx/imx50.c
index e1a743f403..de82ce2ae7 100644
--- a/arch/arm/mach-imx/imx50.c
+++ b/arch/arm/mach-imx/imx50.c
@@ -5,13 +5,13 @@
#include <io.h>
#include <notifier.h>
#include <linux/sizes.h>
-#include <mach/imx5.h>
-#include <mach/imx50-regs.h>
-#include <mach/revision.h>
-#include <mach/clock-imx51_53.h>
-#include <mach/generic.h>
-#include <mach/reset-reason.h>
-#include <mach/usb.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/imx50-regs.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/clock-imx51_53.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/reset-reason.h>
+#include <mach/imx/usb.h>
#define SI_REV 0x48
diff --git a/arch/arm/mach-imx/imx51.c b/arch/arm/mach-imx/imx51.c
index 214a4031ec..69b892b01a 100644
--- a/arch/arm/mach-imx/imx51.c
+++ b/arch/arm/mach-imx/imx51.c
@@ -5,13 +5,13 @@
#include <linux/sizes.h>
#include <environment.h>
#include <io.h>
-#include <mach/imx5.h>
-#include <mach/imx51-regs.h>
-#include <mach/revision.h>
-#include <mach/clock-imx51_53.h>
-#include <mach/generic.h>
-#include <mach/reset-reason.h>
-#include <mach/usb.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/imx51-regs.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/clock-imx51_53.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/reset-reason.h>
+#include <mach/imx/usb.h>
#define IIM_SREV 0x24
diff --git a/arch/arm/mach-imx/imx53.c b/arch/arm/mach-imx/imx53.c
index e5da326a7f..e7eb3ea796 100644
--- a/arch/arm/mach-imx/imx53.c
+++ b/arch/arm/mach-imx/imx53.c
@@ -5,13 +5,13 @@
#include <io.h>
#include <notifier.h>
#include <linux/sizes.h>
-#include <mach/imx5.h>
-#include <mach/imx53-regs.h>
-#include <mach/revision.h>
-#include <mach/clock-imx51_53.h>
-#include <mach/generic.h>
-#include <mach/reset-reason.h>
-#include <mach/usb.h>
+#include <mach/imx/imx5.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/clock-imx51_53.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/reset-reason.h>
+#include <mach/imx/usb.h>
#define SI_REV 0x48
diff --git a/arch/arm/mach-imx/imx6-mmdc.c b/arch/arm/mach-imx/imx6-mmdc.c
index e0497071d1..134a41bad5 100644
--- a/arch/arm/mach-imx/imx6-mmdc.c
+++ b/arch/arm/mach-imx/imx6-mmdc.c
@@ -7,9 +7,9 @@
*/
#include <common.h>
#include <io.h>
-#include <mach/imx6-mmdc.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6-mmdc.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx6.h>
static bool wlcalib_failed(void __iomem *ips)
{
diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index 697a8a21fa..b0d3d8ef2f 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -6,15 +6,15 @@
#include <io.h>
#include <linux/sizes.h>
#include <mfd/imx6q-iomuxc-gpr.h>
-#include <mach/clock-imx6.h>
-#include <mach/imx6.h>
-#include <mach/generic.h>
-#include <mach/revision.h>
-#include <mach/reset-reason.h>
-#include <mach/imx6-anadig.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx6-fusemap.h>
-#include <mach/usb.h>
+#include <mach/imx/clock-imx6.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/reset-reason.h>
+#include <mach/imx/imx6-anadig.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx6-fusemap.h>
+#include <mach/imx/usb.h>
#include <asm/mmu.h>
#include <asm/cache-l2x0.h>
#include <mfd/pfuze.h>
diff --git a/arch/arm/mach-imx/imx7.c b/arch/arm/mach-imx/imx7.c
index 8f9d5034ab..31d49c35e7 100644
--- a/arch/arm/mach-imx/imx7.c
+++ b/arch/arm/mach-imx/imx7.c
@@ -5,11 +5,11 @@
#include <io.h>
#include <linux/sizes.h>
#include <asm/psci.h>
-#include <mach/imx7.h>
-#include <mach/generic.h>
-#include <mach/revision.h>
-#include <mach/reset-reason.h>
-#include <mach/imx7-regs.h>
+#include <mach/imx/imx7.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/reset-reason.h>
+#include <mach/imx/imx7-regs.h>
void imx7_init_lowlevel(void)
{
diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
index 7f3856e545..37ef17bc8e 100644
--- a/arch/arm/mach-imx/imx8m.c
+++ b/arch/arm/mach-imx/imx8m.c
@@ -5,14 +5,14 @@
#include <io.h>
#include <asm/syscounter.h>
#include <asm/system.h>
-#include <mach/generic.h>
-#include <mach/revision.h>
-#include <mach/imx8mq.h>
-#include <mach/imx8m-ccm-regs.h>
-#include <mach/reset-reason.h>
-#include <mach/ocotp.h>
-#include <mach/imx8mp-regs.h>
-#include <mach/imx8mq-regs.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/imx8mq.h>
+#include <mach/imx/imx8m-ccm-regs.h>
+#include <mach/imx/reset-reason.h>
+#include <mach/imx/ocotp.h>
+#include <mach/imx/imx8mp-regs.h>
+#include <mach/imx/imx8mq-regs.h>
#include <soc/imx8m/clk-early.h>
#include <linux/iopoll.h>
diff --git a/arch/arm/mach-imx/nand.c b/arch/arm/mach-imx/nand.c
index 718cada052..bbfcfac457 100644
--- a/arch/arm/mach-imx/nand.c
+++ b/arch/arm/mach-imx/nand.c
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <common.h>
-#include <mach/generic.h>
-#include <mach/imx21-regs.h>
-#include <mach/imx25-regs.h>
-#include <mach/imx27-regs.h>
-#include <mach/imx35-regs.h>
-#include <mach/imx-nand.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx21-regs.h>
+#include <mach/imx/imx25-regs.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/imx35-regs.h>
+#include <mach/imx/imx-nand.h>
#include <io.h>
#define RCSR_NFC_FMS (1 << 8)
diff --git a/arch/arm/mach-imx/romapi.c b/arch/arm/mach-imx/romapi.c
index 0936c855fd..c39ccdfba8 100644
--- a/arch/arm/mach-imx/romapi.c
+++ b/arch/arm/mach-imx/romapi.c
@@ -4,10 +4,10 @@
#include <common.h>
#include <asm/sections.h>
-#include <mach/romapi.h>
-#include <mach/atf.h>
-#include <mach/imx8m-regs.h>
-#include <mach/xload.h>
+#include <mach/imx/romapi.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/imx8m-regs.h>
+#include <mach/imx/xload.h>
#include <asm/barebox-arm.h>
#include <zero_page.h>
#include <pbl.h>
diff --git a/arch/arm/mach-imx/tzasc.c b/arch/arm/mach-imx/tzasc.c
index 9af0b7ef65..9c71108c99 100644
--- a/arch/arm/mach-imx/tzasc.c
+++ b/arch/arm/mach-imx/tzasc.c
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
-#include <mach/tzasc.h>
+#include <mach/imx/tzasc.h>
#include <linux/bitops.h>
-#include <mach/imx8m-regs.h>
+#include <mach/imx/imx8m-regs.h>
#include <io.h>
#define GPR_TZASC_EN BIT(0)
diff --git a/arch/arm/mach-imx/vf610.c b/arch/arm/mach-imx/vf610.c
index ccef9d48d9..74d190d7bc 100644
--- a/arch/arm/mach-imx/vf610.c
+++ b/arch/arm/mach-imx/vf610.c
@@ -4,11 +4,11 @@
#include <common.h>
#include <io.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
-#include <mach/revision.h>
-#include <mach/vf610.h>
-#include <mach/reset-reason.h>
-#include <mach/ocotp.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/vf610.h>
+#include <mach/imx/reset-reason.h>
+#include <mach/imx/ocotp.h>
static const struct imx_reset_reason vf610_reset_reasons[] = {
{ VF610_SRC_SRSR_POR_RST, RESET_POR, 0 },
diff --git a/arch/arm/mach-imx/xload-common.c b/arch/arm/mach-imx/xload-common.c
index 710dcc1ed9..5a437b185d 100644
--- a/arch/arm/mach-imx/xload-common.c
+++ b/arch/arm/mach-imx/xload-common.c
@@ -3,9 +3,9 @@
#include <common.h>
#include <asm/sections.h>
#include <linux/sizes.h>
-#include <mach/xload.h>
-#include <mach/esdctl.h>
-#include <mach/imx8m-regs.h>
+#include <mach/imx/xload.h>
+#include <mach/imx/esdctl.h>
+#include <mach/imx/imx8m-regs.h>
#include <asm/barebox-arm.h>
int imx_image_size(void)
diff --git a/arch/arm/mach-imx/xload-gpmi-nand.c b/arch/arm/mach-imx/xload-gpmi-nand.c
index dcef8cda48..8221e1ace0 100644
--- a/arch/arm/mach-imx/xload-gpmi-nand.c
+++ b/arch/arm/mach-imx/xload-gpmi-nand.c
@@ -9,13 +9,13 @@
#include <linux/mtd/nand.h>
#include <linux/bitfield.h>
#include <asm/cache.h>
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
#include <soc/imx/imx-nand-bcb.h>
#include <linux/mtd/rawnand.h>
#include <soc/imx/gpmi-nand.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx7-regs.h>
-#include <mach/clock-imx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx7-regs.h>
+#include <mach/imx/clock-imx6.h>
#include <dma/apbh-dma.h>
struct apbh_dma {
diff --git a/arch/arm/mach-imx/xload-imx-nand.c b/arch/arm/mach-imx/xload-imx-nand.c
index 3838d9164d..e80f99eb99 100644
--- a/arch/arm/mach-imx/xload-imx-nand.c
+++ b/arch/arm/mach-imx/xload-imx-nand.c
@@ -7,10 +7,10 @@
#include <io.h>
#include <linux/mtd/rawnand.h>
#include <linux/mtd/nand.h>
-#include <mach/imx-nand.h>
-#include <mach/generic.h>
-#include <mach/imx53-regs.h>
-#include <mach/xload.h>
+#include <mach/imx/imx-nand.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/xload.h>
struct imx_nand {
void __iomem *base;
diff --git a/arch/arm/mach-imx/xload-spi.c b/arch/arm/mach-imx/xload-spi.c
index 2a01b0d806..621e9557be 100644
--- a/arch/arm/mach-imx/xload-spi.c
+++ b/arch/arm/mach-imx/xload-spi.c
@@ -3,12 +3,12 @@
#include <common.h>
#include <io.h>
#include <spi/imx-spi.h>
-#include <mach/imx6-regs.h>
-#include <mach/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/generic.h>
#include <bootsource.h>
#include <asm/sections.h>
#include <linux/sizes.h>
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
static int cspi_2_3_read_data(void __iomem *base, u32 *data)
{
diff --git a/common/filetype.c b/common/filetype.c
index 8f79f48bc1..68ea45861d 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -18,7 +18,7 @@
#include <image-sparse.h>
#include <elf.h>
-#include <arm/mach-imx/include/mach/imx-header.h>
+#include <mach/imx/imx-header.h>
struct filetype_str {
const char *name; /* human readable filetype */
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index 24b0e7592e..f154f6705d 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -25,11 +25,13 @@
#include <linux/bitops.h>
#include <io.h>
#include <crc.h>
-#include <mach/generic.h>
#include <mtd/mtd-peb.h>
#include <soc/imx/imx-nand-bcb.h>
#ifdef CONFIG_ARCH_IMX
-#include <mach/imx6.h>
+#include <mach/imx/imx6.h>
+#include <mach/imx/generic.h>
+#else
+#include <mach/generic.h>
#endif
static inline int fcb_is_bch_encoded(void)
@@ -1566,7 +1568,7 @@ static int imx7_fcb_read(struct mtd_info *mtd, int block, struct fcb_block **ret
}
#ifdef CONFIG_ARCH_IMX7
-#include <mach/imx7-regs.h>
+#include <mach/imx/imx7-regs.h>
static void imx7_fcb_create(struct imx_nand_fcb_bbu_handler *imx_handler,
struct fcb_block *fcb, struct mtd_info *mtd)
diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c
index fce72987bb..dc3a5c5fd5 100644
--- a/drivers/ata/sata-imx.c
+++ b/drivers/ata/sata-imx.c
@@ -10,8 +10,8 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <malloc.h>
-#include <mach/imx53-regs.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/imx6-regs.h>
#include <mfd/imx6q-iomuxc-gpr.h>
#include "ahci.h"
diff --git a/drivers/clk/imx/clk-imx1.c b/drivers/clk/imx/clk-imx1.c
index 7c6e09316e..e44f71ffcc 100644
--- a/drivers/clk/imx/clk-imx1.c
+++ b/drivers/clk/imx/clk-imx1.c
@@ -10,7 +10,7 @@
#include <io.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx1-regs.h>
+#include <mach/imx/imx1-regs.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx21.c b/drivers/clk/imx/clk-imx21.c
index 57ad1b466b..bdbd1c7983 100644
--- a/drivers/clk/imx/clk-imx21.c
+++ b/drivers/clk/imx/clk-imx21.c
@@ -12,7 +12,7 @@
#include <io.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx21-regs.h>
+#include <mach/imx/imx21-regs.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx25.c b/drivers/clk/imx/clk-imx25.c
index 285a1b5a05..d0ab4008d0 100644
--- a/drivers/clk/imx/clk-imx25.c
+++ b/drivers/clk/imx/clk-imx25.c
@@ -10,7 +10,7 @@
#include <io.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx25-regs.h>
+#include <mach/imx/imx25-regs.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx27.c b/drivers/clk/imx/clk-imx27.c
index 3a4be36d2a..1489fd1be7 100644
--- a/drivers/clk/imx/clk-imx27.c
+++ b/drivers/clk/imx/clk-imx27.c
@@ -6,9 +6,9 @@
#include <io.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx27-regs.h>
-#include <mach/generic.h>
-#include <mach/revision.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/revision.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx31.c b/drivers/clk/imx/clk-imx31.c
index adee9b83b6..349e4d20b4 100644
--- a/drivers/clk/imx/clk-imx31.c
+++ b/drivers/clk/imx/clk-imx31.c
@@ -10,7 +10,7 @@
#include <io.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx31-regs.h>
+#include <mach/imx/imx31-regs.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx35.c b/drivers/clk/imx/clk-imx35.c
index f8f503cb99..cd67d67b16 100644
--- a/drivers/clk/imx/clk-imx35.c
+++ b/drivers/clk/imx/clk-imx35.c
@@ -9,7 +9,7 @@
#include <io.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx35-regs.h>
+#include <mach/imx/imx35-regs.h>
#include <reset_source.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx5.c b/drivers/clk/imx/clk-imx5.c
index 68df361fb4..b6cb645ac1 100644
--- a/drivers/clk/imx/clk-imx5.c
+++ b/drivers/clk/imx/clk-imx5.c
@@ -10,9 +10,9 @@
#include <of.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx50-regs.h>
-#include <mach/imx51-regs.h>
-#include <mach/imx53-regs.h>
+#include <mach/imx/imx50-regs.h>
+#include <mach/imx/imx51-regs.h>
+#include <mach/imx/imx53-regs.h>
#include <dt-bindings/clock/imx5-clock.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx6.c b/drivers/clk/imx/clk-imx6.c
index 6d2d5329cf..f03696fbbc 100644
--- a/drivers/clk/imx/clk-imx6.c
+++ b/drivers/clk/imx/clk-imx6.c
@@ -12,9 +12,9 @@
#include <of.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx6-regs.h>
-#include <mach/revision.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/imx6.h>
#include <dt-bindings/clock/imx6qdl-clock.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx6sl.c b/drivers/clk/imx/clk-imx6sl.c
index ca184b4a44..7159ffb8d9 100644
--- a/drivers/clk/imx/clk-imx6sl.c
+++ b/drivers/clk/imx/clk-imx6sl.c
@@ -12,9 +12,9 @@
#include <linux/clkdev.h>
#include <linux/err.h>
#include <linux/clk.h>
-#include <mach/imx6-regs.h>
-#include <mach/revision.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/imx6.h>
#include "clk.h"
#include "common.h"
diff --git a/drivers/clk/imx/clk-imx6sx.c b/drivers/clk/imx/clk-imx6sx.c
index 57840b4c3c..21b40a73a2 100644
--- a/drivers/clk/imx/clk-imx6sx.c
+++ b/drivers/clk/imx/clk-imx6sx.c
@@ -12,9 +12,9 @@
#include <linux/clkdev.h>
#include <linux/err.h>
#include <linux/clk.h>
-#include <mach/imx6-regs.h>
-#include <mach/revision.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/imx6.h>
#include "clk.h"
#include "common.h"
diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c
index 08546009b3..f3ee60794d 100644
--- a/drivers/clk/imx/clk-imx6ul.c
+++ b/drivers/clk/imx/clk-imx6ul.c
@@ -11,9 +11,9 @@
#include <of.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx6-regs.h>
-#include <mach/revision.h>
-#include <mach/imx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/revision.h>
+#include <mach/imx/imx6.h>
#include <dt-bindings/clock/imx6ul-clock.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx7.c b/drivers/clk/imx/clk-imx7.c
index 15254d10df..0b8e96b87d 100644
--- a/drivers/clk/imx/clk-imx7.c
+++ b/drivers/clk/imx/clk-imx7.c
@@ -12,8 +12,8 @@
#include <of.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx7-regs.h>
-#include <mach/revision.h>
+#include <mach/imx/imx7-regs.h>
+#include <mach/imx/revision.h>
#include <dt-bindings/clock/imx7d-clock.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-vf610.c b/drivers/clk/imx/clk-vf610.c
index 1bd1fe5c44..89899e0dc9 100644
--- a/drivers/clk/imx/clk-vf610.c
+++ b/drivers/clk/imx/clk-vf610.c
@@ -13,8 +13,8 @@
#include <linux/clk.h>
#include <notifier.h>
#include <dt-bindings/clock/vf610-clock.h>
-#include <mach/vf610-regs.h>
-#include <mach/vf610-fusemap.h>
+#include <mach/imx/vf610-regs.h>
+#include <mach/imx/vf610-fusemap.h>
#include "clk.h"
diff --git a/drivers/ddr/imx8m/ddr_init.c b/drivers/ddr/imx8m/ddr_init.c
index 18969ddb53..1645368006 100644
--- a/drivers/ddr/imx8m/ddr_init.c
+++ b/drivers/ddr/imx8m/ddr_init.c
@@ -9,9 +9,9 @@
#include <errno.h>
#include <io.h>
#include <soc/imx8m/ddr.h>
-#include <mach/generic.h>
-#include <mach/imx8m-regs.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8m-regs.h>
+#include <mach/imx/imx8m-ccm-regs.h>
bool imx8m_ddr_old_spreadsheet = true;
diff --git a/drivers/ddr/imx8m/ddrphy_train.c b/drivers/ddr/imx8m/ddrphy_train.c
index e9d35afdfb..6a98fa0545 100644
--- a/drivers/ddr/imx8m/ddrphy_train.c
+++ b/drivers/ddr/imx8m/ddrphy_train.c
@@ -9,7 +9,7 @@
#include <linux/kernel.h>
#include <soc/imx8m/ddr.h>
#include <firmware.h>
-#include <mach/imx8m-regs.h>
+#include <mach/imx/imx8m-regs.h>
static const u16 *lpddr4_imem_1d;
static size_t lpddr4_imem_1d_size;
diff --git a/drivers/ddr/imx8m/ddrphy_utils.c b/drivers/ddr/imx8m/ddrphy_utils.c
index 7f863a1736..353a265136 100644
--- a/drivers/ddr/imx8m/ddrphy_utils.c
+++ b/drivers/ddr/imx8m/ddrphy_utils.c
@@ -10,8 +10,8 @@
#include <io.h>
#include <linux/iopoll.h>
#include <soc/imx8m/ddr.h>
-#include <mach/imx8m-regs.h>
-#include <mach/imx8m-ccm-regs.h>
+#include <mach/imx/imx8m-regs.h>
+#include <mach/imx/imx8m-ccm-regs.h>
/* DDR Transfer rate, bus clock is transfer rate / 2, and the DDRC runs at bus
* clock / 2, which is therefor transfer rate / 4. */
diff --git a/drivers/hab/hab.c b/drivers/hab/hab.c
index 2746f27a1e..65384a6c10 100644
--- a/drivers/hab/hab.c
+++ b/drivers/hab/hab.c
@@ -9,10 +9,10 @@
#include <hab.h>
#include <regmap.h>
#include <fs.h>
-#include <mach/iim.h>
-#include <mach/imx25-fusemap.h>
-#include <mach/ocotp.h>
-#include <mach/imx6-fusemap.h>
+#include <mach/imx/iim.h>
+#include <mach/imx/imx25-fusemap.h>
+#include <mach/imx/ocotp.h>
+#include <mach/imx/imx6-fusemap.h>
bool imx_hab_srk_hash_valid(const void *buf)
{
diff --git a/drivers/hab/habv3.c b/drivers/hab/habv3.c
index 235db78c10..4818dae7d1 100644
--- a/drivers/hab/habv3.c
+++ b/drivers/hab/habv3.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <hab.h>
#include <io.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
struct hab_status {
u8 value;
diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index 9101fc1cae..252e38f655 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -14,8 +14,8 @@
#include <linux/arm-smccc.h>
#include <asm/cache.h>
-#include <mach/generic.h>
-#include <mach/imx8mq.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8mq.h>
#define HABV4_RVT_IMX28 0xffff8af8
#define HABV4_RVT_IMX6_OLD 0x00000094
diff --git a/drivers/mci/imx-esdhc-pbl.c b/drivers/mci/imx-esdhc-pbl.c
index ea0b395bef..40c2882dc4 100644
--- a/drivers/mci/imx-esdhc-pbl.c
+++ b/drivers/mci/imx-esdhc-pbl.c
@@ -8,14 +8,14 @@
#include <linux/sizes.h>
#include <asm/sections.h>
#include <asm/cache.h>
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
#ifdef CONFIG_ARCH_IMX
-#include <mach/atf.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx7-regs.h>
-#include <mach/imx8mq-regs.h>
-#include <mach/imx8mm-regs.h>
-#include <mach/imx-header.h>
+#include <mach/imx/atf.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx7-regs.h>
+#include <mach/imx/imx8mq-regs.h>
+#include <mach/imx/imx8mm-regs.h>
+#include <mach/imx/imx-header.h>
#endif
#ifdef CONFIG_ARCH_LS1046
#include <mach/layerscape/xload.h>
diff --git a/drivers/mtd/nand/nand_imx.c b/drivers/mtd/nand/nand_imx.c
index 3438e9fc79..39cb2787f4 100644
--- a/drivers/mtd/nand/nand_imx.c
+++ b/drivers/mtd/nand/nand_imx.c
@@ -18,8 +18,8 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
-#include <mach/generic.h>
-#include <mach/imx-nand.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx-nand.h>
#include <io.h>
#include <of_mtd.h>
#include <errno.h>
diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c
index 213e0d25d4..17099f7db2 100644
--- a/drivers/mtd/nand/nand_mxs.c
+++ b/drivers/mtd/nand/nand_mxs.c
@@ -32,7 +32,7 @@
#include <io.h>
#include <dma/apbh-dma.h>
#include <stmp-device.h>
-#include <mach/generic.h>
+#include <mach/imx/generic.h>
#include <soc/imx/gpmi-nand.h>
#include "internals.h"
diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index b478ece306..ff1e815c6b 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -25,9 +25,14 @@
#include <clock.h>
#include <regmap.h>
#include <linux/clk.h>
-#include <mach/ocotp.h>
#include <machine_id.h>
+#ifdef CONFIG_ARCH_IMX
+#include <mach/imx/ocotp.h>
+#include <mach/imx/ocotp-fusemap.h>
+#else
+#include <mach/ocotp.h>
#include <mach/ocotp-fusemap.h>
+#endif
#include <soc/imx8m/featctrl.h>
#include <linux/nvmem-provider.h>
diff --git a/drivers/pinctrl/imx-iomux-v1.c b/drivers/pinctrl/imx-iomux-v1.c
index ccbacebab9..6fe0286a6a 100644
--- a/drivers/pinctrl/imx-iomux-v1.c
+++ b/drivers/pinctrl/imx-iomux-v1.c
@@ -4,7 +4,7 @@
#include <init.h>
#include <malloc.h>
#include <pinctrl.h>
-#include <mach/iomux-v1.h>
+#include <mach/imx/iomux-v1.h>
#include <linux/err.h>
/*
diff --git a/drivers/pinctrl/imx-iomux-v3.c b/drivers/pinctrl/imx-iomux-v3.c
index aacab2ad51..7952c65a50 100644
--- a/drivers/pinctrl/imx-iomux-v3.c
+++ b/drivers/pinctrl/imx-iomux-v3.c
@@ -11,8 +11,8 @@
#include <of.h>
#include <pinctrl.h>
#include <malloc.h>
-#include <mach/iomux-v3.h>
-#include <mach/generic.h>
+#include <mach/imx/iomux-v3.h>
+#include <mach/imx/generic.h>
struct imx_iomux_v3 {
void __iomem *base;
diff --git a/drivers/pinctrl/pinctrl-vf610.c b/drivers/pinctrl/pinctrl-vf610.c
index 73194e9efa..9f150cd89d 100644
--- a/drivers/pinctrl/pinctrl-vf610.c
+++ b/drivers/pinctrl/pinctrl-vf610.c
@@ -12,7 +12,7 @@
#include <malloc.h>
#include <gpio.h>
-#include <mach/iomux-vf610.h>
+#include <mach/imx/iomux-vf610.h>
enum {
PINCTRL_VF610_MUX_LINE_SIZE = 20,
diff --git a/drivers/spi/dspi_spi.c b/drivers/spi/dspi_spi.c
index 5ad9bd0179..8d6687cda4 100644
--- a/drivers/spi/dspi_spi.c
+++ b/drivers/spi/dspi_spi.c
@@ -21,8 +21,8 @@
#include <gpio.h>
#include <of_gpio.h>
#include <of_device.h>
-#include <mach/spi.h>
-#include <mach/generic.h>
+#include <mach/imx/spi.h>
+#include <mach/imx/generic.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <clock.h>
diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
index f81d9e851f..f45b429699 100644
--- a/drivers/spi/imx_spi.c
+++ b/drivers/spi/imx_spi.c
@@ -15,8 +15,8 @@
#include <malloc.h>
#include <gpio.h>
#include <of_gpio.h>
-#include <mach/spi.h>
-#include <mach/generic.h>
+#include <mach/imx/spi.h>
+#include <mach/imx/generic.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <clock.h>
diff --git a/drivers/usb/gadget/fsl_udc_pbl.c b/drivers/usb/gadget/fsl_udc_pbl.c
index d2f2b9e195..218d61db3c 100644
--- a/drivers/usb/gadget/fsl_udc_pbl.c
+++ b/drivers/usb/gadget/fsl_udc_pbl.c
@@ -3,9 +3,9 @@
#include <common.h>
#include <usb/ch9.h>
#include <soc/fsl/fsl_udc.h>
-#include <mach/imx8mm-regs.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx7-regs.h>
+#include <mach/imx/imx8mm-regs.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx7-regs.h>
static void fsl_queue_td(struct usb_dr_device *dr, struct ep_td_struct *dtd,
int ep_is_in)
diff --git a/drivers/usb/imx/imx-usb-misc.c b/drivers/usb/imx/imx-usb-misc.c
index ec3ad81cdd..bd91ac2e57 100644
--- a/drivers/usb/imx/imx-usb-misc.c
+++ b/drivers/usb/imx/imx-usb-misc.c
@@ -10,8 +10,8 @@
#include <of.h>
#include <errno.h>
#include <usb/chipidea-imx.h>
-#include <mach/imx6-regs.h>
-#include <mach/iomux-mx6.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/iomux-mx6.h>
#define MX25_OTG_SIC_SHIFT 29
#define MX25_OTG_SIC_MASK (0x3 << MX25_OTG_SIC_SHIFT)
diff --git a/drivers/video/imx-ipu-v3/imx-hdmi.c b/drivers/video/imx-ipu-v3/imx-hdmi.c
index 84b5d92fa6..06fa929352 100644
--- a/drivers/video/imx-ipu-v3/imx-hdmi.c
+++ b/drivers/video/imx-ipu-v3/imx-hdmi.c
@@ -18,8 +18,8 @@
#include <i2c/i2c.h>
#include <video/media-bus-format.h>
#include <video/vpl.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx53-regs.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx53-regs.h>
#include "imx-ipu-v3.h"
#include "ipuv3-plane.h"
diff --git a/drivers/video/imx-ipu-v3/imx-ldb.c b/drivers/video/imx-ipu-v3/imx-ldb.c
index 36e7f7a80a..4a24a3479a 100644
--- a/drivers/video/imx-ipu-v3/imx-ldb.c
+++ b/drivers/video/imx-ipu-v3/imx-ldb.c
@@ -19,8 +19,8 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/math64.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx53-regs.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx53-regs.h>
#include "imx-ipu-v3.h"
#include "ipuv3-plane.h"
diff --git a/drivers/video/imx-ipu-v3/ipu-common.c b/drivers/video/imx-ipu-v3/ipu-common.c
index 4da027c584..576387dab3 100644
--- a/drivers/video/imx-ipu-v3/ipu-common.c
+++ b/drivers/video/imx-ipu-v3/ipu-common.c
@@ -11,10 +11,10 @@
#include <driver.h>
#include <init.h>
#include <linux/mutex.h>
-#include <mach/generic.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx53-regs.h>
-#include <mach/imx51-regs.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/imx51-regs.h>
#include "imx-ipu-v3.h"
#include "ipu-prv.h"
diff --git a/arch/arm/mach-imx/include/mach/atf.h b/include/mach/imx/atf.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/atf.h
rename to include/mach/imx/atf.h
diff --git a/arch/arm/mach-imx/include/mach/bbu.h b/include/mach/imx/bbu.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/bbu.h
rename to include/mach/imx/bbu.h
diff --git a/arch/arm/mach-imx/include/mach/ccm.h b/include/mach/imx/ccm.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/ccm.h
rename to include/mach/imx/ccm.h
diff --git a/arch/arm/mach-imx/include/mach/clock-imx51_53.h b/include/mach/imx/clock-imx51_53.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/clock-imx51_53.h
rename to include/mach/imx/clock-imx51_53.h
diff --git a/arch/arm/mach-imx/include/mach/clock-imx6.h b/include/mach/imx/clock-imx6.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/clock-imx6.h
rename to include/mach/imx/clock-imx6.h
diff --git a/arch/arm/mach-imx/include/mach/clock-vf610.h b/include/mach/imx/clock-vf610.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/clock-vf610.h
rename to include/mach/imx/clock-vf610.h
diff --git a/arch/arm/mach-imx/include/mach/debug_ll.h b/include/mach/imx/debug_ll.h
similarity index 89%
rename from arch/arm/mach-imx/include/mach/debug_ll.h
rename to include/mach/imx/debug_ll.h
index 98aec5198f..1b554b2d22 100644
--- a/arch/arm/mach-imx/include/mach/debug_ll.h
+++ b/include/mach/imx/debug_ll.h
@@ -6,19 +6,19 @@
#include <io.h>
#include <config.h>
#include <common.h>
-#include <mach/imx1-regs.h>
-#include <mach/imx21-regs.h>
-#include <mach/imx25-regs.h>
-#include <mach/imx27-regs.h>
-#include <mach/imx31-regs.h>
-#include <mach/imx35-regs.h>
-#include <mach/imx50-regs.h>
-#include <mach/imx51-regs.h>
-#include <mach/imx53-regs.h>
-#include <mach/imx6-regs.h>
-#include <mach/imx7-regs.h>
-#include <mach/imx8m-regs.h>
-#include <mach/vf610-regs.h>
+#include <mach/imx/imx1-regs.h>
+#include <mach/imx/imx21-regs.h>
+#include <mach/imx/imx25-regs.h>
+#include <mach/imx/imx27-regs.h>
+#include <mach/imx/imx31-regs.h>
+#include <mach/imx/imx35-regs.h>
+#include <mach/imx/imx50-regs.h>
+#include <mach/imx/imx51-regs.h>
+#include <mach/imx/imx53-regs.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/imx7-regs.h>
+#include <mach/imx/imx8m-regs.h>
+#include <mach/imx/vf610-regs.h>
#include <serial/imx-uart.h>
#include <serial/lpuart.h>
diff --git a/arch/arm/mach-imx/include/mach/devices-imx1.h b/include/mach/imx/devices-imx1.h
similarity index 81%
rename from arch/arm/mach-imx/include/mach/devices-imx1.h
rename to include/mach/imx/devices-imx1.h
index 795149c92f..64c917d714 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx1.h
+++ b/include/mach/imx/devices-imx1.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/devices.h>
-#include <mach/imx1-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx1-regs.h>
static inline struct device *imx1_add_uart0(void)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx21.h b/include/mach/imx/devices-imx21.h
similarity index 92%
rename from arch/arm/mach-imx/include/mach/devices-imx21.h
rename to include/mach/imx/devices-imx21.h
index c4951f7fd9..bcc91276f4 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx21.h
+++ b/include/mach/imx/devices-imx21.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/devices.h>
-#include <mach/imx21-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx21-regs.h>
static inline struct device *imx21_add_uart0(void)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx25.h b/include/mach/imx/devices-imx25.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/devices-imx25.h
rename to include/mach/imx/devices-imx25.h
index 6c768218c4..058f2a89a1 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx25.h
+++ b/include/mach/imx/devices-imx25.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/devices.h>
-#include <mach/imx25-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx25-regs.h>
static inline struct device *imx25_add_i2c0(struct i2c_platform_data *pdata)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx27.h b/include/mach/imx/devices-imx27.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/devices-imx27.h
rename to include/mach/imx/devices-imx27.h
index 0e1c90e697..28013e3bf5 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx27.h
+++ b/include/mach/imx/devices-imx27.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/devices.h>
-#include <mach/imx27-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx27-regs.h>
static inline struct device *imx27_add_spi0(struct spi_imx_master *pdata)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx31.h b/include/mach/imx/devices-imx31.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/devices-imx31.h
rename to include/mach/imx/devices-imx31.h
index b926a6ac33..8be3e0d582 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx31.h
+++ b/include/mach/imx/devices-imx31.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/imx31-regs.h>
-#include <mach/devices.h>
+#include <mach/imx/imx31-regs.h>
+#include <mach/imx/devices.h>
static inline struct device *imx31_add_i2c0(void *pdata)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx35.h b/include/mach/imx/devices-imx35.h
similarity index 96%
rename from arch/arm/mach-imx/include/mach/devices-imx35.h
rename to include/mach/imx/devices-imx35.h
index a48641bdbb..68d6671592 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx35.h
+++ b/include/mach/imx/devices-imx35.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/devices.h>
-#include <mach/imx35-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx35-regs.h>
static inline struct device *imx35_add_i2c0(struct i2c_platform_data *pdata)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx50.h b/include/mach/imx/devices-imx50.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/devices-imx50.h
rename to include/mach/imx/devices-imx50.h
index ebfc9c07c1..ee577d99ec 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx50.h
+++ b/include/mach/imx/devices-imx50.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/devices.h>
-#include <mach/imx50-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx50-regs.h>
static inline struct device *imx50_add_spi0(struct spi_imx_master *pdata)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx51.h b/include/mach/imx/devices-imx51.h
similarity index 98%
rename from arch/arm/mach-imx/include/mach/devices-imx51.h
rename to include/mach/imx/devices-imx51.h
index 453ae9a0aa..34e550d3c8 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx51.h
+++ b/include/mach/imx/devices-imx51.h
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <linux/sizes.h>
-#include <mach/devices.h>
-#include <mach/imx51-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx51-regs.h>
static inline struct device *imx51_add_spi0(struct spi_imx_master *pdata)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx53.h b/include/mach/imx/devices-imx53.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/devices-imx53.h
rename to include/mach/imx/devices-imx53.h
index 392687a191..080573dfd4 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx53.h
+++ b/include/mach/imx/devices-imx53.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/devices.h>
-#include <mach/imx53-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx53-regs.h>
static inline struct device *imx53_add_cspi(struct spi_imx_master *pdata)
{
diff --git a/arch/arm/mach-imx/include/mach/devices-imx6.h b/include/mach/imx/devices-imx6.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/devices-imx6.h
rename to include/mach/imx/devices-imx6.h
index 38a940391e..9c9c788e51 100644
--- a/arch/arm/mach-imx/include/mach/devices-imx6.h
+++ b/include/mach/imx/devices-imx6.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <mach/devices.h>
-#include <mach/imx6-regs.h>
+#include <mach/imx/devices.h>
+#include <mach/imx/imx6-regs.h>
static inline struct device *imx6_add_uart0(void)
{
diff --git a/arch/arm/mach-imx/include/mach/devices.h b/include/mach/imx/devices.h
similarity index 94%
rename from arch/arm/mach-imx/include/mach/devices.h
rename to include/mach/imx/devices.h
index 0e68125f26..3d1f8eb237 100644
--- a/arch/arm/mach-imx/include/mach/devices.h
+++ b/include/mach/imx/devices.h
@@ -3,10 +3,10 @@
#include <platform_data/eth-fec.h>
#include <input/matrix_keypad.h>
#include <i2c/i2c.h>
-#include <mach/spi.h>
-#include <mach/imx-nand.h>
+#include <mach/imx/spi.h>
+#include <mach/imx/imx-nand.h>
#include <platform_data/imxfb.h>
-#include <mach/imx-ipu-fb.h>
+#include <mach/imx/imx-ipu-fb.h>
#include <platform_data/mmc-esdhc-imx.h>
#include <usb/chipidea-imx.h>
diff --git a/arch/arm/mach-imx/include/mach/esdctl-v4.h b/include/mach/imx/esdctl-v4.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/esdctl-v4.h
rename to include/mach/imx/esdctl-v4.h
diff --git a/arch/arm/mach-imx/include/mach/esdctl.h b/include/mach/imx/esdctl.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/esdctl.h
rename to include/mach/imx/esdctl.h
diff --git a/arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-sabresd.imxcfg b/include/mach/imx/flash-header/imx7d-ddr-sabresd.imxcfg
similarity index 98%
rename from arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-sabresd.imxcfg
rename to include/mach/imx/flash-header/imx7d-ddr-sabresd.imxcfg
index e98f055eea..3bcff8d8b0 100644
--- a/arch/arm/mach-imx/include/mach/flash-header/imx7d-ddr-sabresd.imxcfg
+++ b/include/mach/imx/flash-header/imx7d-ddr-sabresd.imxcfg
@@ -12,7 +12,7 @@
* 1a8150d4b16fbafa6f1d207ddb85eda7dc399e2d
*/
-#include <mach/imx7-ddr-regs.h>
+#include <mach/imx/imx7-ddr-regs.h>
wm 32 0x30340004 0x4F400005
diff --git a/arch/arm/mach-imx/include/mach/flash-header/vf610-ddr-cr-default.imxcfg b/include/mach/imx/flash-header/vf610-ddr-cr-default.imxcfg
similarity index 100%
rename from arch/arm/mach-imx/include/mach/flash-header/vf610-ddr-cr-default.imxcfg
rename to include/mach/imx/flash-header/vf610-ddr-cr-default.imxcfg
diff --git a/arch/arm/mach-imx/include/mach/flash-header/vf610-ddr-phy-default.imxcfg b/include/mach/imx/flash-header/vf610-ddr-phy-default.imxcfg
similarity index 100%
rename from arch/arm/mach-imx/include/mach/flash-header/vf610-ddr-phy-default.imxcfg
rename to include/mach/imx/flash-header/vf610-ddr-phy-default.imxcfg
diff --git a/arch/arm/mach-imx/include/mach/flash-header/vf610-ddr-pll2-400mhz.imxcfg b/include/mach/imx/flash-header/vf610-ddr-pll2-400mhz.imxcfg
similarity index 100%
rename from arch/arm/mach-imx/include/mach/flash-header/vf610-ddr-pll2-400mhz.imxcfg
rename to include/mach/imx/flash-header/vf610-ddr-pll2-400mhz.imxcfg
diff --git a/arch/arm/mach-imx/include/mach/flash-header/vf610-iomux-ddr-default.imxcfg b/include/mach/imx/flash-header/vf610-iomux-ddr-default.imxcfg
similarity index 100%
rename from arch/arm/mach-imx/include/mach/flash-header/vf610-iomux-ddr-default.imxcfg
rename to include/mach/imx/flash-header/vf610-iomux-ddr-default.imxcfg
diff --git a/arch/arm/mach-imx/include/mach/generic.h b/include/mach/imx/generic.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/generic.h
rename to include/mach/imx/generic.h
index 12a7c208b7..f674e28697 100644
--- a/arch/arm/mach-imx/include/mach/generic.h
+++ b/include/mach/imx/generic.h
@@ -6,7 +6,7 @@
#include <linux/compiler.h>
#include <linux/types.h>
#include <bootsource.h>
-#include <mach/imx_cpu_types.h>
+#include <mach/imx/imx_cpu_types.h>
u64 imx_uid(void);
diff --git a/arch/arm/mach-imx/include/mach/habv3-imx25-gencsf.h b/include/mach/imx/habv3-imx25-gencsf.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/habv3-imx25-gencsf.h
rename to include/mach/imx/habv3-imx25-gencsf.h
diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h b/include/mach/imx/habv4-imx6-gencsf-template.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
rename to include/mach/imx/habv4-imx6-gencsf-template.h
diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h b/include/mach/imx/habv4-imx6-gencsf.h
similarity index 70%
rename from arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h
rename to include/mach/imx/habv4-imx6-gencsf.h
index 2044f23c7a..fcf6c8aedc 100644
--- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf.h
+++ b/include/mach/imx/habv4-imx6-gencsf.h
@@ -3,4 +3,4 @@
#define SETUP_HABV4_ENGINE CAAM
#define SETUP_HABV4_FEATURES RNG, MID
-#include <mach/habv4-imx6-gencsf-template.h>
+#include <mach/imx/habv4-imx6-gencsf-template.h>
diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6ull-gencsf.h b/include/mach/imx/habv4-imx6ull-gencsf.h
similarity index 60%
rename from arch/arm/mach-imx/include/mach/habv4-imx6ull-gencsf.h
rename to include/mach/imx/habv4-imx6ull-gencsf.h
index 0efd09888f..c36f473d8e 100644
--- a/arch/arm/mach-imx/include/mach/habv4-imx6ull-gencsf.h
+++ b/include/mach/imx/habv4-imx6ull-gencsf.h
@@ -2,4 +2,4 @@
#define SETUP_HABV4_ENGINE SW
-#include <mach/habv4-imx6-gencsf-template.h>
+#include <mach/imx/habv4-imx6-gencsf-template.h>
diff --git a/arch/arm/mach-imx/include/mach/habv4-imx8-gencsf.h b/include/mach/imx/habv4-imx8-gencsf.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/habv4-imx8-gencsf.h
rename to include/mach/imx/habv4-imx8-gencsf.h
diff --git a/arch/arm/mach-imx/include/mach/iim.h b/include/mach/imx/iim.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/iim.h
rename to include/mach/imx/iim.h
diff --git a/arch/arm/mach-imx/include/mach/imx-gpio.h b/include/mach/imx/imx-gpio.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx-gpio.h
rename to include/mach/imx/imx-gpio.h
diff --git a/arch/arm/mach-imx/include/mach/imx-header.h b/include/mach/imx/imx-header.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx-header.h
rename to include/mach/imx/imx-header.h
diff --git a/arch/arm/mach-imx/include/mach/imx-ipu-fb.h b/include/mach/imx/imx-ipu-fb.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx-ipu-fb.h
rename to include/mach/imx/imx-ipu-fb.h
diff --git a/arch/arm/mach-imx/include/mach/imx-nand.h b/include/mach/imx/imx-nand.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx-nand.h
rename to include/mach/imx/imx-nand.h
diff --git a/arch/arm/mach-imx/include/mach/imx-pll.h b/include/mach/imx/imx-pll.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx-pll.h
rename to include/mach/imx/imx-pll.h
diff --git a/arch/arm/mach-imx/include/mach/imx1-regs.h b/include/mach/imx/imx1-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx1-regs.h
rename to include/mach/imx/imx1-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx21-regs.h b/include/mach/imx/imx21-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx21-regs.h
rename to include/mach/imx/imx21-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx25-fusemap.h b/include/mach/imx/imx25-fusemap.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/imx25-fusemap.h
rename to include/mach/imx/imx25-fusemap.h
index f21e3d9505..0b674fb580 100644
--- a/arch/arm/mach-imx/include/mach/imx25-fusemap.h
+++ b/include/mach/imx/imx25-fusemap.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IMX25_FUSEMAP_H
#define __MACH_IMX25_FUSEMAP_H
-#include <mach/iim.h>
+#include <mach/imx/iim.h>
/* Fuse bank write protect */
#define IMX25_IIM_FBWP(bank) (IIM_BANK(bank) | IIM_BYTE(0) | IIM_BIT(7))
diff --git a/arch/arm/mach-imx/include/mach/imx25-regs.h b/include/mach/imx/imx25-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx25-regs.h
rename to include/mach/imx/imx25-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx27-regs.h b/include/mach/imx/imx27-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx27-regs.h
rename to include/mach/imx/imx27-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx31-regs.h b/include/mach/imx/imx31-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx31-regs.h
rename to include/mach/imx/imx31-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx35-regs.h b/include/mach/imx/imx35-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx35-regs.h
rename to include/mach/imx/imx35-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx5.h b/include/mach/imx/imx5.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx5.h
rename to include/mach/imx/imx5.h
diff --git a/arch/arm/mach-imx/include/mach/imx50-regs.h b/include/mach/imx/imx50-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx50-regs.h
rename to include/mach/imx/imx50-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx51-regs.h b/include/mach/imx/imx51-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx51-regs.h
rename to include/mach/imx/imx51-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx53-regs.h b/include/mach/imx/imx53-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx53-regs.h
rename to include/mach/imx/imx53-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx6-anadig.h b/include/mach/imx/imx6-anadig.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx6-anadig.h
rename to include/mach/imx/imx6-anadig.h
diff --git a/arch/arm/mach-imx/include/mach/imx6-ddr-regs.h b/include/mach/imx/imx6-ddr-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx6-ddr-regs.h
rename to include/mach/imx/imx6-ddr-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx6-fusemap.h b/include/mach/imx/imx6-fusemap.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/imx6-fusemap.h
rename to include/mach/imx/imx6-fusemap.h
index de5eb51e5d..42abcd1dfd 100644
--- a/arch/arm/mach-imx/include/mach/imx6-fusemap.h
+++ b/include/mach/imx/imx6-fusemap.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IMX_IMX6_OCOTP_H
#define __MACH_IMX_IMX6_OCOTP_H
-#include <mach/ocotp-fusemap.h>
+#include <mach/imx/ocotp-fusemap.h>
#define IMX6_OCOTP_SI_REV (OCOTP_WORD(0x430) | OCOTP_BIT(16) | OCOTP_WIDTH(4))
#define IMX6_OCOTP_SATA_RST_SRC (OCOTP_WORD(0x430) | OCOTP_BIT(24) | OCOTP_WIDTH(1))
diff --git a/arch/arm/mach-imx/include/mach/imx6-mmdc.h b/include/mach/imx/imx6-mmdc.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/imx6-mmdc.h
rename to include/mach/imx/imx6-mmdc.h
index 098ba4f5bf..bf8d41fe58 100644
--- a/arch/arm/mach-imx/include/mach/imx6-mmdc.h
+++ b/include/mach/imx/imx6-mmdc.h
@@ -3,7 +3,7 @@
#ifndef __MACH_MMDC_H
#define __MACH_MMDC_H
-#include <mach/imx6-regs.h>
+#include <mach/imx/imx6-regs.h>
#define P0_IPS (void __iomem *)MX6_MMDC_P0_BASE_ADDR
#define P1_IPS (void __iomem *)MX6_MMDC_P1_BASE_ADDR
diff --git a/arch/arm/mach-imx/include/mach/imx6-regs.h b/include/mach/imx/imx6-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx6-regs.h
rename to include/mach/imx/imx6-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx6.h b/include/mach/imx/imx6.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/imx6.h
rename to include/mach/imx/imx6.h
index 0f3397006a..a67cc9df96 100644
--- a/arch/arm/mach-imx/include/mach/imx6.h
+++ b/include/mach/imx/imx6.h
@@ -4,9 +4,9 @@
#define __MACH_IMX6_H
#include <io.h>
-#include <mach/generic.h>
-#include <mach/imx6-regs.h>
-#include <mach/revision.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx6-regs.h>
+#include <mach/imx/revision.h>
#include <poweroff.h>
diff --git a/arch/arm/mach-imx/include/mach/imx6dl-ddr-regs.h b/include/mach/imx/imx6dl-ddr-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx6dl-ddr-regs.h
rename to include/mach/imx/imx6dl-ddr-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx6q-ddr-regs.h b/include/mach/imx/imx6q-ddr-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx6q-ddr-regs.h
rename to include/mach/imx/imx6q-ddr-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx7-ccm-regs.h b/include/mach/imx/imx7-ccm-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx7-ccm-regs.h
rename to include/mach/imx/imx7-ccm-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx7-ddr-regs.h b/include/mach/imx/imx7-ddr-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx7-ddr-regs.h
rename to include/mach/imx/imx7-ddr-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx7-regs.h b/include/mach/imx/imx7-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx7-regs.h
rename to include/mach/imx/imx7-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx7.h b/include/mach/imx/imx7.h
similarity index 92%
rename from arch/arm/mach-imx/include/mach/imx7.h
rename to include/mach/imx/imx7.h
index bc131805af..f2db486b48 100644
--- a/arch/arm/mach-imx/include/mach/imx7.h
+++ b/include/mach/imx/imx7.h
@@ -4,9 +4,9 @@
#define __MACH_IMX7_H
#include <io.h>
-#include <mach/generic.h>
-#include <mach/imx7-regs.h>
-#include <mach/revision.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx7-regs.h>
+#include <mach/imx/revision.h>
void imx7_init_lowlevel(void);
diff --git a/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h b/include/mach/imx/imx8m-ccm-regs.h
similarity index 98%
rename from arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h
rename to include/mach/imx/imx8m-ccm-regs.h
index 659615e1cc..29186eb8a7 100644
--- a/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h
+++ b/include/mach/imx/imx8m-ccm-regs.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IMX8_CCM_REGS_H__
#define __MACH_IMX8_CCM_REGS_H__
-#include <mach/imx8mq-regs.h>
+#include <mach/imx/imx8mq-regs.h>
#define IMX8M_CCM_CCGR_DDR1 5
#define IMX8M_CCM_CCGR_I2C1 23
diff --git a/arch/arm/mach-imx/include/mach/imx8m-regs.h b/include/mach/imx/imx8m-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx8m-regs.h
rename to include/mach/imx/imx8m-regs.h
diff --git a/arch/arm/mach-imx/include/mach/imx8mm-regs.h b/include/mach/imx/imx8mm-regs.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/imx8mm-regs.h
rename to include/mach/imx/imx8mm-regs.h
index 4c6cabe5af..dae062854c 100644
--- a/arch/arm/mach-imx/include/mach/imx8mm-regs.h
+++ b/include/mach/imx/imx8mm-regs.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IMX8MM_REGS_H
#define __MACH_IMX8MM_REGS_H
-#include <mach/imx8m-regs.h>
+#include <mach/imx/imx8m-regs.h>
#define MX8MM_M4_BOOTROM_BASE_ADDR 0x007e0000
diff --git a/arch/arm/mach-imx/include/mach/imx8mn-regs.h b/include/mach/imx/imx8mn-regs.h
similarity index 96%
rename from arch/arm/mach-imx/include/mach/imx8mn-regs.h
rename to include/mach/imx/imx8mn-regs.h
index 9d0ec513c2..387686b426 100644
--- a/arch/arm/mach-imx/include/mach/imx8mn-regs.h
+++ b/include/mach/imx/imx8mn-regs.h
@@ -2,7 +2,7 @@
#ifndef __MACH_IMX8MN_REGS_H
#define __MACH_IMX8MN_REGS_H
-#include <mach/imx8m-regs.h>
+#include <mach/imx/imx8m-regs.h>
#define MX8MN_GPIO1_BASE_ADDR 0x30200000
#define MX8MN_GPIO2_BASE_ADDR 0x30210000
diff --git a/arch/arm/mach-imx/include/mach/imx8mp-regs.h b/include/mach/imx/imx8mp-regs.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/imx8mp-regs.h
rename to include/mach/imx/imx8mp-regs.h
index 08f662bcde..ac15a316b8 100644
--- a/arch/arm/mach-imx/include/mach/imx8mp-regs.h
+++ b/include/mach/imx/imx8mp-regs.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IMX8MP_REGS_H
#define __MACH_IMX8MP_REGS_H
-#include <mach/imx8m-regs.h>
+#include <mach/imx/imx8m-regs.h>
#define MX8MP_M4_BOOTROM_BASE_ADDR 0x007e0000
diff --git a/arch/arm/mach-imx/include/mach/imx8mq-regs.h b/include/mach/imx/imx8mq-regs.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/imx8mq-regs.h
rename to include/mach/imx/imx8mq-regs.h
index e2fde2ba0c..64b988e064 100644
--- a/arch/arm/mach-imx/include/mach/imx8mq-regs.h
+++ b/include/mach/imx/imx8mq-regs.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IMX8MQ_REGS_H
#define __MACH_IMX8MQ_REGS_H
-#include <mach/imx8m-regs.h>
+#include <mach/imx/imx8m-regs.h>
#define MX8MQ_M4_BOOTROM_BASE_ADDR 0x007E0000
diff --git a/arch/arm/mach-imx/include/mach/imx8mq.h b/include/mach/imx/imx8mq.h
similarity index 91%
rename from arch/arm/mach-imx/include/mach/imx8mq.h
rename to include/mach/imx/imx8mq.h
index e58a3935f7..df28b2a22c 100644
--- a/arch/arm/mach-imx/include/mach/imx8mq.h
+++ b/include/mach/imx/imx8mq.h
@@ -4,12 +4,12 @@
#define __MACH_IMX8MQ_H
#include <io.h>
-#include <mach/generic.h>
-#include <mach/imx8mq-regs.h>
-#include <mach/imx8mm-regs.h>
-#include <mach/imx8mn-regs.h>
-#include <mach/imx8mp-regs.h>
-#include <mach/revision.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/imx8mq-regs.h>
+#include <mach/imx/imx8mm-regs.h>
+#include <mach/imx/imx8mn-regs.h>
+#include <mach/imx/imx8mp-regs.h>
+#include <mach/imx/revision.h>
#include <linux/bitfield.h>
#define IMX8MQ_ROM_VERSION_A0 0x800
diff --git a/arch/arm/mach-imx/include/mach/imx_cpu_types.h b/include/mach/imx/imx_cpu_types.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/imx_cpu_types.h
rename to include/mach/imx/imx_cpu_types.h
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx1.h b/include/mach/imx/iomux-mx1.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx1.h
rename to include/mach/imx/iomux-mx1.h
index 000b2055ee..95b20a88dd 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx1.h
+++ b/include/mach/imx/iomux-mx1.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IOMUX_MX1_H
#define __MACH_IOMUX_MX1_H
-#include <mach/iomux-v1.h>
+#include <mach/imx/iomux-v1.h>
/*
* FIXME: This list is not completed. The correct directions are
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx21.h b/include/mach/imx/iomux-mx21.h
similarity index 98%
rename from arch/arm/mach-imx/include/mach/iomux-mx21.h
rename to include/mach/imx/iomux-mx21.h
index 308bfac99b..5eb31411b9 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx21.h
+++ b/include/mach/imx/iomux-mx21.h
@@ -4,8 +4,8 @@
#ifndef __MACH_IOMUX_MX21_H__
#define __MACH_IOMUX_MX21_H__
-#include <mach/iomux-v1.h>
-#include <mach/iomux-mx2x.h>
+#include <mach/imx/iomux-v1.h>
+#include <mach/imx/iomux-mx2x.h>
/* Primary GPIO pin functions */
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx25.h b/include/mach/imx/iomux-mx25.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx25.h
rename to include/mach/imx/iomux-mx25.h
index 58761b5e77..2b7fb4014b 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx25.h
+++ b/include/mach/imx/iomux-mx25.h
@@ -19,7 +19,7 @@
#ifndef __MACH_IOMUX_MX25_H__
#define __MACH_IOMUX_MX25_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
/*
* IOMUX/PAD Bit field definitions
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx27.h b/include/mach/imx/iomux-mx27.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx27.h
rename to include/mach/imx/iomux-mx27.h
index 5f8a3826f6..6aa8aae4f0 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx27.h
+++ b/include/mach/imx/iomux-mx27.h
@@ -5,8 +5,8 @@
#ifndef __MACH_IOMUX_MX27_H__
#define __MACH_IOMUX_MX27_H__
-#include <mach/iomux-v1.h>
-#include <mach/iomux-mx2x.h>
+#include <mach/imx/iomux-v1.h>
+#include <mach/imx/iomux-mx2x.h>
/* Primary GPIO pin functions */
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx2x.h b/include/mach/imx/iomux-mx2x.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/iomux-mx2x.h
rename to include/mach/imx/iomux-mx2x.h
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx31.h b/include/mach/imx/iomux-mx31.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/iomux-mx31.h
rename to include/mach/imx/iomux-mx31.h
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx35.h b/include/mach/imx/iomux-mx35.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx35.h
rename to include/mach/imx/iomux-mx35.h
index 18f9a11171..51f1975102 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx35.h
+++ b/include/mach/imx/iomux-mx35.h
@@ -4,7 +4,7 @@
#ifndef __MACH_IOMUX_MX35_H__
#define __MACH_IOMUX_MX35_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
/*
* The naming convention for the pad modes is MX35_PAD_<padname>__<padmode>
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx50.h b/include/mach/imx/iomux-mx50.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx50.h
rename to include/mach/imx/iomux-mx50.h
index aeb47092df..a03e907e67 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx50.h
+++ b/include/mach/imx/iomux-mx50.h
@@ -7,7 +7,7 @@
#ifndef __MACH_IOMUX_MX50_H__
#define __MACH_IOMUX_MX50_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
/* These 2 defines are for pins that may not have a mux register, but could
* have a pad setting register, and vice-versa. */
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx51.h b/include/mach/imx/iomux-mx51.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx51.h
rename to include/mach/imx/iomux-mx51.h
index 2623e7a2e1..a2d8575087 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx51.h
+++ b/include/mach/imx/iomux-mx51.h
@@ -13,7 +13,7 @@
#ifndef __MACH_IOMUX_MX51_H__
#define __MACH_IOMUX_MX51_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
#define __NA_ 0x000
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx53.h b/include/mach/imx/iomux-mx53.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx53.h
rename to include/mach/imx/iomux-mx53.h
index 010fb6e5cc..f11e38f091 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx53.h
+++ b/include/mach/imx/iomux-mx53.h
@@ -4,7 +4,7 @@
#ifndef __MACH_IOMUX_MX53_H__
#define __MACH_IOMUX_MX53_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
/* These 2 defines are for pins that may not have a mux register, but could
* have a pad setting register, and vice-versa. */
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx6.h b/include/mach/imx/iomux-mx6.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx6.h
rename to include/mach/imx/iomux-mx6.h
index 36e31e0657..9913000600 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx6.h
+++ b/include/mach/imx/iomux-mx6.h
@@ -6,7 +6,7 @@
#ifndef __MACH_IOMUX_MX6Q_H__
#define __MACH_IOMUX_MX6Q_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
#define NON_MUX_I 0x3FF
#define NON_PAD_I 0x7FF
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx6ul.h b/include/mach/imx/iomux-mx6ul.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx6ul.h
rename to include/mach/imx/iomux-mx6ul.h
index b7727191c2..6eafe69a8d 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx6ul.h
+++ b/include/mach/imx/iomux-mx6ul.h
@@ -6,7 +6,7 @@
#ifndef __ASM_ARCH_IMX6UL_PINS_H__
#define __ASM_ARCH_IMX6UL_PINS_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
enum {
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx7.h b/include/mach/imx/iomux-mx7.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx7.h
rename to include/mach/imx/iomux-mx7.h
index def9cf4d44..b37c3bb2a8 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx7.h
+++ b/include/mach/imx/iomux-mx7.h
@@ -7,8 +7,8 @@
#ifndef __MACH_IOMUX_IMX7D_H__
#define __MACH_IOMUX_IMX7D_H__
-#include <mach/iomux-v3.h>
-#include <mach/imx7-regs.h>
+#include <mach/imx/iomux-v3.h>
+#include <mach/imx/imx7-regs.h>
enum {
MX7D_PAD_GPIO1_IO00__GPIO1_IO0 = IOMUX_PAD(0x0030, 0x0000, IOMUX_CONFIG_LPSR | 0, 0x0000, 0, 0),
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8m.h b/include/mach/imx/iomux-mx8m.h
similarity index 95%
rename from arch/arm/mach-imx/include/mach/iomux-mx8m.h
rename to include/mach/imx/iomux-mx8m.h
index 68f2765609..35d194252c 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8m.h
+++ b/include/mach/imx/iomux-mx8m.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IOMUX_IMX8M_H__
#define __MACH_IOMUX_IMX8M_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
#define PAD_CTL_DSE_3P3V_45_OHM 0b110
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8mm.h b/include/mach/imx/iomux-mx8mm.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx8mm.h
rename to include/mach/imx/iomux-mx8mm.h
index f91671865d..f2ebde3d3b 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8mm.h
+++ b/include/mach/imx/iomux-mx8mm.h
@@ -6,9 +6,9 @@
#ifndef __ASM_ARCH_IMX8MM_PINS_H__
#define __ASM_ARCH_IMX8MM_PINS_H__
-#include <mach/iomux-v3.h>
-#include <mach/imx8mm-regs.h>
-#include <mach/iomux-mx8m.h>
+#include <mach/imx/iomux-v3.h>
+#include <mach/imx/imx8mm-regs.h>
+#include <mach/imx/iomux-mx8m.h>
enum {
IMX8MM_PAD_GPIO1_IO00_GPIO1_IO0 = IOMUX_PAD(0x0290, 0x0028, 0, 0x0000, 0, 0),
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8mn.h b/include/mach/imx/iomux-mx8mn.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx8mn.h
rename to include/mach/imx/iomux-mx8mn.h
index 3c3e0ecba3..981c0465d9 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8mn.h
+++ b/include/mach/imx/iomux-mx8mn.h
@@ -6,9 +6,9 @@
#ifndef __ASM_ARCH_IMX8MN_PINS_H__
#define __ASM_ARCH_IMX8MN_PINS_H__
-#include <mach/iomux-v3.h>
-#include <mach/imx8mn-regs.h>
-#include <mach/iomux-mx8m.h>
+#include <mach/imx/iomux-v3.h>
+#include <mach/imx/imx8mn-regs.h>
+#include <mach/imx/iomux-mx8m.h>
enum {
IMX8MN_PAD_BOOT_MODE2__CCMSRCGPCMIX_BOOT_MODE2 = IOMUX_PAD(0x025C, 0x0020, 0, 0x0000, 0, 0),
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8mp.h b/include/mach/imx/iomux-mx8mp.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx8mp.h
rename to include/mach/imx/iomux-mx8mp.h
index 2607ba21f6..b410eaebc8 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8mp.h
+++ b/include/mach/imx/iomux-mx8mp.h
@@ -6,9 +6,9 @@
#ifndef __ASM_ARCH_IMX8MP_PINS_H__
#define __ASM_ARCH_IMX8MP_PINS_H__
-#include <mach/iomux-v3.h>
-#include <mach/imx8mp-regs.h>
-#include <mach/iomux-mx8m.h>
+#include <mach/imx/iomux-v3.h>
+#include <mach/imx/imx8mp-regs.h>
+#include <mach/imx/iomux-mx8m.h>
enum {
MX8MP_PAD_GPIO1_IO00__GPIO1_IO00 = IOMUX_PAD(0x0274, 0x0014, 0, 0x0000, 0, 0),
diff --git a/arch/arm/mach-imx/include/mach/iomux-mx8mq.h b/include/mach/imx/iomux-mx8mq.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-mx8mq.h
rename to include/mach/imx/iomux-mx8mq.h
index b6efdda4ff..e6a00e3462 100644
--- a/arch/arm/mach-imx/include/mach/iomux-mx8mq.h
+++ b/include/mach/imx/iomux-mx8mq.h
@@ -7,9 +7,9 @@
#ifndef __MACH_IOMUX_IMX8MQ_H__
#define __MACH_IOMUX_IMX8MQ_H__
-#include <mach/iomux-v3.h>
-#include <mach/iomux-mx8m.h>
-#include <mach/imx8mq-regs.h>
+#include <mach/imx/iomux-v3.h>
+#include <mach/imx/iomux-mx8m.h>
+#include <mach/imx/imx8mq-regs.h>
enum {
IMX8MQ_PAD_GPIO1_IO00__GPIO1_IO0 = IOMUX_PAD(0x0290, 0x0028, 0, 0x0000, 0, 0),
diff --git a/arch/arm/mach-imx/include/mach/iomux-v1.h b/include/mach/imx/iomux-v1.h
similarity index 95%
rename from arch/arm/mach-imx/include/mach/iomux-v1.h
rename to include/mach/imx/iomux-v1.h
index 132b129767..def028cdc5 100644
--- a/arch/arm/mach-imx/include/mach/iomux-v1.h
+++ b/include/mach/imx/iomux-v1.h
@@ -50,9 +50,9 @@
void imx_iomuxv1_init(void __iomem *base);
void imx_gpio_mode(void __iomem *base, int gpio_mode);
-#include <mach/imx1-regs.h>
-#include <mach/imx21-regs.h>
-#include <mach/imx27-regs.h>
+#include <mach/imx/imx1-regs.h>
+#include <mach/imx/imx21-regs.h>
+#include <mach/imx/imx27-regs.h>
static inline void imx1_gpio_mode(int gpio_mode)
{
diff --git a/arch/arm/mach-imx/include/mach/iomux-v3.h b/include/mach/imx/iomux-v3.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/iomux-v3.h
rename to include/mach/imx/iomux-v3.h
diff --git a/arch/arm/mach-imx/include/mach/iomux-vf610.h b/include/mach/imx/iomux-vf610.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/iomux-vf610.h
rename to include/mach/imx/iomux-vf610.h
index b9e509b396..3595d78280 100644
--- a/arch/arm/mach-imx/include/mach/iomux-vf610.h
+++ b/include/mach/imx/iomux-vf610.h
@@ -7,7 +7,7 @@
#ifndef __MACH_IOMUX_VF610_H__
#define __MACH_IOMUX_VF610_H__
-#include <mach/iomux-v3.h>
+#include <mach/imx/iomux-v3.h>
#undef PAD_CTL_ODE
#undef PAD_CTL_PKE
diff --git a/arch/arm/mach-imx/include/mach/ocotp-fusemap.h b/include/mach/imx/ocotp-fusemap.h
similarity index 99%
rename from arch/arm/mach-imx/include/mach/ocotp-fusemap.h
rename to include/mach/imx/ocotp-fusemap.h
index 603bec49fd..6ba794c166 100644
--- a/arch/arm/mach-imx/include/mach/ocotp-fusemap.h
+++ b/include/mach/imx/ocotp-fusemap.h
@@ -3,7 +3,7 @@
#ifndef __MACH_IMX_OCOTP_FUSEMAP_H
#define __MACH_IMX_OCOTP_FUSEMAP_H
-#include <mach/ocotp.h>
+#include <mach/imx/ocotp.h>
#define OCOTP_TESTER_LOCK (OCOTP_WORD(0x400) | OCOTP_BIT(0) | OCOTP_WIDTH(2))
#define OCOTP_BOOT_CFG_LOCK (OCOTP_WORD(0x400) | OCOTP_BIT(2) | OCOTP_WIDTH(2))
diff --git a/arch/arm/mach-imx/include/mach/ocotp.h b/include/mach/imx/ocotp.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/ocotp.h
rename to include/mach/imx/ocotp.h
diff --git a/arch/arm/mach-imx/include/mach/reset-reason.h b/include/mach/imx/reset-reason.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/reset-reason.h
rename to include/mach/imx/reset-reason.h
diff --git a/arch/arm/mach-imx/include/mach/revision.h b/include/mach/imx/revision.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/revision.h
rename to include/mach/imx/revision.h
diff --git a/arch/arm/mach-imx/include/mach/romapi.h b/include/mach/imx/romapi.h
similarity index 97%
rename from arch/arm/mach-imx/include/mach/romapi.h
rename to include/mach/imx/romapi.h
index 2cb8e37ce9..2243fdcf6d 100644
--- a/arch/arm/mach-imx/include/mach/romapi.h
+++ b/include/mach/imx/romapi.h
@@ -2,7 +2,7 @@
#ifndef __MACH_IMX_ROMAPI_H
#define __MACH_IMX_ROMAPI_H
-#include <mach/xload.h>
+#include <mach/imx/xload.h>
#include <linux/types.h>
struct rom_api {
diff --git a/arch/arm/mach-imx/include/mach/spi.h b/include/mach/imx/spi.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/spi.h
rename to include/mach/imx/spi.h
diff --git a/arch/arm/mach-imx/include/mach/tzasc.h b/include/mach/imx/tzasc.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/tzasc.h
rename to include/mach/imx/tzasc.h
diff --git a/arch/arm/mach-imx/include/mach/usb.h b/include/mach/imx/usb.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/usb.h
rename to include/mach/imx/usb.h
diff --git a/arch/arm/mach-imx/include/mach/vf610-ddrmc-regs.h b/include/mach/imx/vf610-ddrmc-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/vf610-ddrmc-regs.h
rename to include/mach/imx/vf610-ddrmc-regs.h
diff --git a/arch/arm/mach-imx/include/mach/vf610-ddrmc.h b/include/mach/imx/vf610-ddrmc.h
similarity index 93%
rename from arch/arm/mach-imx/include/mach/vf610-ddrmc.h
rename to include/mach/imx/vf610-ddrmc.h
index 79b88e19fd..bc99d27efe 100644
--- a/arch/arm/mach-imx/include/mach/vf610-ddrmc.h
+++ b/include/mach/imx/vf610-ddrmc.h
@@ -3,7 +3,7 @@
#ifndef __MACH_DDRMC_H
#define __MACH_DDRMC_H
-#include <mach/vf610-regs.h>
+#include <mach/imx/vf610-regs.h>
#define DDRMC_CR(x) ((x) * 4)
diff --git a/arch/arm/mach-imx/include/mach/vf610-fusemap.h b/include/mach/imx/vf610-fusemap.h
similarity index 95%
rename from arch/arm/mach-imx/include/mach/vf610-fusemap.h
rename to include/mach/imx/vf610-fusemap.h
index c222a8f27f..f3db1ba259 100644
--- a/arch/arm/mach-imx/include/mach/vf610-fusemap.h
+++ b/include/mach/imx/vf610-fusemap.h
@@ -3,7 +3,7 @@
#ifndef __MACH_VF610_OCOTP_H
#define __MACH_VF610_OCOTP_H
-#include <mach/ocotp-fusemap.h>
+#include <mach/imx/ocotp-fusemap.h>
#define VF610_OCOTP_CPU_BUS_FRQ OCOTP_WORD(0x430) | OCOTP_BIT(22) | OCOTP_WIDTH(1)
#define VF610_OCOTP_OVG_DISABLE OCOTP_WORD(0x430) | OCOTP_BIT(30) | OCOTP_WIDTH(1)
diff --git a/arch/arm/mach-imx/include/mach/vf610-iomux-regs.h b/include/mach/imx/vf610-iomux-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/vf610-iomux-regs.h
rename to include/mach/imx/vf610-iomux-regs.h
diff --git a/arch/arm/mach-imx/include/mach/vf610-regs.h b/include/mach/imx/vf610-regs.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/vf610-regs.h
rename to include/mach/imx/vf610-regs.h
diff --git a/arch/arm/mach-imx/include/mach/vf610.h b/include/mach/imx/vf610.h
similarity index 92%
rename from arch/arm/mach-imx/include/mach/vf610.h
rename to include/mach/imx/vf610.h
index 505aab0211..9c4fc5eb61 100644
--- a/arch/arm/mach-imx/include/mach/vf610.h
+++ b/include/mach/imx/vf610.h
@@ -4,9 +4,9 @@
#define __MACH_VF610_H
#include <io.h>
-#include <mach/generic.h>
-#include <mach/vf610-regs.h>
-#include <mach/revision.h>
+#include <mach/imx/generic.h>
+#include <mach/imx/vf610-regs.h>
+#include <mach/imx/revision.h>
#define VF610_CPUTYPE_VFx10 0x010
diff --git a/arch/arm/mach-imx/include/mach/weim.h b/include/mach/imx/weim.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/weim.h
rename to include/mach/imx/weim.h
diff --git a/arch/arm/mach-imx/include/mach/xload.h b/include/mach/imx/xload.h
similarity index 100%
rename from arch/arm/mach-imx/include/mach/xload.h
rename to include/mach/imx/xload.h
diff --git a/scripts/imx/Makefile b/scripts/imx/Makefile
index d62277bb54..dbfa82910a 100644
--- a/scripts/imx/Makefile
+++ b/scripts/imx/Makefile
@@ -9,11 +9,11 @@ HOSTLDLIBS_imx-usb-loader = `pkg-config --libs libusb-1.0`
imx-usb-loader-target-userccflags += `$(CROSS_PKG_CONFIG) --cflags libusb-1.0`
imx-usb-loader-target-userldlibs += `$(CROSS_PKG_CONFIG) --libs libusb-1.0`
-HOSTCFLAGS_imx.o = -I$(srctree)/arch/arm/mach-imx/include
-imx-target-userccflags += -I$(srctree)/arch/arm/mach-imx/include
-HOSTCFLAGS_imx-image.o = -I$(srctree) -I$(srctree)/arch/arm/mach-imx/include
-HOSTCFLAGS_imx-usb-loader.o += -I$(srctree) -I$(srctree)/arch/arm/mach-imx/include
-imx-usb-loader-target-userccflags += -I$(srctree) -I$(srctree)/arch/arm/mach-imx/include
+HOSTCFLAGS_imx.o = -I$(srctree)/include/mach
+imx-target-userccflags += -I$(srctree)/include/mach
+HOSTCFLAGS_imx-image.o = -I$(srctree) -I$(srctree)/include/mach
+HOSTCFLAGS_imx-usb-loader.o += -I$(srctree) -I$(srctree)/include/mach
+imx-usb-loader-target-userccflags += -I$(srctree) -I$(srctree)/include/mach
ifdef CONFIG_ARCH_IMX_IMXIMAGE_SSL_SUPPORT
HOSTCFLAGS_imx-image.o += -DIMXIMAGE_SSL_SUPPORT
HOSTLDLIBS_imx-image = `pkg-config --libs openssl`
diff --git a/scripts/imx/imx.h b/scripts/imx/imx.h
index 77dea7c54a..08cdf8321a 100644
--- a/scripts/imx/imx.h
+++ b/scripts/imx/imx.h
@@ -1,6 +1,6 @@
-#include <mach/imx-header.h>
-#include <mach/imx_cpu_types.h>
+#include <imx/imx-header.h>
+#include <imx/imx_cpu_types.h>
static inline int cpu_is_mx8m(const struct config_data *data)
{
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 02/50] ARM: Rockchip: Move mach header files to include/mach/rockchip
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
2023-03-03 9:20 ` [PATCH 01/50] ARM: i.MX: Move mach header files to include/mach/imx Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 03/50] ARM: Zynqmp: Move mach header files to include/mach/zynqmp Sascha Hauer
` (47 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
possible as there won't be a single mach anymore.
Move all Rockchip specific header files to include/mach/rockchip/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/phytec-som-rk3288/lowlevel.c | 6 +++---
arch/arm/boards/pine64-quartz64/lowlevel.c | 6 +++---
arch/arm/boards/radxa-rock/board.c | 2 +-
arch/arm/boards/radxa-rock3/board.c | 2 +-
arch/arm/boards/radxa-rock3/lowlevel.c | 6 +++---
arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c | 2 +-
arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c | 6 +++---
arch/arm/boards/rockchip-rk3568-evb/board.c | 2 +-
arch/arm/boards/rockchip-rk3568-evb/lowlevel.c | 6 +++---
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-rockchip/atf.c | 2 +-
arch/arm/mach-rockchip/bbu.c | 4 ++--
arch/arm/mach-rockchip/rk3188.c | 4 ++--
arch/arm/mach-rockchip/rk3288.c | 8 ++++----
arch/arm/mach-rockchip/rk3568.c | 4 ++--
arch/arm/mach-rockchip/rockchip.c | 2 +-
drivers/clocksource/rk_timer.c | 4 ++--
.../include/mach => include/mach/rockchip}/atf.h | 0
.../include/mach => include/mach/rockchip}/bbu.h | 0
.../include/mach => include/mach/rockchip}/cru_rk3288.h | 0
.../include/mach => include/mach/rockchip}/debug_ll.h | 8 ++++----
.../include/mach => include/mach/rockchip}/grf_rk3288.h | 0
.../include/mach => include/mach/rockchip}/hardware.h | 0
.../include/mach => include/mach/rockchip}/rk3188-regs.h | 0
.../include/mach => include/mach/rockchip}/rk3288-regs.h | 0
.../include/mach => include/mach/rockchip}/rk3399-regs.h | 0
.../include/mach => include/mach/rockchip}/rk3568-regs.h | 0
.../include/mach => include/mach/rockchip}/rockchip.h | 0
28 files changed, 39 insertions(+), 37 deletions(-)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/atf.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/bbu.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/cru_rk3288.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/debug_ll.h (93%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/grf_rk3288.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/hardware.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/rk3188-regs.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/rk3288-regs.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/rk3399-regs.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/rk3568-regs.h (100%)
rename {arch/arm/mach-rockchip/include/mach => include/mach/rockchip}/rockchip.h (100%)
diff --git a/arch/arm/boards/phytec-som-rk3288/lowlevel.c b/arch/arm/boards/phytec-som-rk3288/lowlevel.c
index 1a60959562..dc29113c39 100644
--- a/arch/arm/boards/phytec-som-rk3288/lowlevel.c
+++ b/arch/arm/boards/phytec-som-rk3288/lowlevel.c
@@ -7,9 +7,9 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/rk3288-regs.h>
-#include <mach/grf_rk3288.h>
-#include <mach/hardware.h>
+#include <mach/rockchip/rk3288-regs.h>
+#include <mach/rockchip/grf_rk3288.h>
+#include <mach/rockchip/hardware.h>
#include <debug_ll.h>
extern char __dtb_rk3288_phycore_som_start[];
diff --git a/arch/arm/boards/pine64-quartz64/lowlevel.c b/arch/arm/boards/pine64-quartz64/lowlevel.c
index ae1f0cf920..1e63c0e698 100644
--- a/arch/arm/boards/pine64-quartz64/lowlevel.c
+++ b/arch/arm/boards/pine64-quartz64/lowlevel.c
@@ -3,10 +3,10 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/hardware.h>
-#include <mach/atf.h>
+#include <mach/rockchip/hardware.h>
+#include <mach/rockchip/atf.h>
#include <debug_ll.h>
-#include <mach/rockchip.h>
+#include <mach/rockchip/rockchip.h>
extern char __dtb_rk3566_quartz64_a_start[];
diff --git a/arch/arm/boards/radxa-rock/board.c b/arch/arm/boards/radxa-rock/board.c
index 0ada54a849..1c93d6e522 100644
--- a/arch/arm/boards/radxa-rock/board.c
+++ b/arch/arm/boards/radxa-rock/board.c
@@ -7,7 +7,7 @@
#include <envfs.h>
#include <i2c/i2c.h>
#include <i2c/i2c-gpio.h>
-#include <mach/rk3188-regs.h>
+#include <mach/rockchip/rk3188-regs.h>
#include <mfd/act8846.h>
#include <asm/armlinux.h>
diff --git a/arch/arm/boards/radxa-rock3/board.c b/arch/arm/boards/radxa-rock3/board.c
index 235c431ab6..4b4e0613d3 100644
--- a/arch/arm/boards/radxa-rock3/board.c
+++ b/arch/arm/boards/radxa-rock3/board.c
@@ -3,7 +3,7 @@
#include <common.h>
#include <deep-probe.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/rockchip/bbu.h>
struct rock3_model {
const char *name;
diff --git a/arch/arm/boards/radxa-rock3/lowlevel.c b/arch/arm/boards/radxa-rock3/lowlevel.c
index a62f60dff8..a8226749d4 100644
--- a/arch/arm/boards/radxa-rock3/lowlevel.c
+++ b/arch/arm/boards/radxa-rock3/lowlevel.c
@@ -3,10 +3,10 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/hardware.h>
-#include <mach/atf.h>
+#include <mach/rockchip/hardware.h>
+#include <mach/rockchip/atf.h>
#include <debug_ll.h>
-#include <mach/rockchip.h>
+#include <mach/rockchip/rockchip.h>
extern char __dtb_rk3568_rock_3a_start[];
diff --git a/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c b/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
index c88d7f8b6d..94d1dac2c2 100644
--- a/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
+++ b/arch/arm/boards/rockchip-rk3568-bpi-r2pro/board.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/rockchip/bbu.h>
#include <aiodev.h>
#include <bootsource.h>
#include <environment.h>
diff --git a/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c b/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c
index 4336d99365..23bacc91d9 100644
--- a/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c
+++ b/arch/arm/boards/rockchip-rk3568-bpi-r2pro/lowlevel.c
@@ -4,10 +4,10 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/hardware.h>
-#include <mach/atf.h>
+#include <mach/rockchip/hardware.h>
+#include <mach/rockchip/atf.h>
#include <debug_ll.h>
-#include <mach/rockchip.h>
+#include <mach/rockchip/rockchip.h>
extern char __dtb_rk3568_bpi_r2_pro_start[];
diff --git a/arch/arm/boards/rockchip-rk3568-evb/board.c b/arch/arm/boards/rockchip-rk3568-evb/board.c
index db6275bdad..f404af217b 100644
--- a/arch/arm/boards/rockchip-rk3568-evb/board.c
+++ b/arch/arm/boards/rockchip-rk3568-evb/board.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/rockchip/bbu.h>
#include <aiodev.h>
#include <bootsource.h>
#include <environment.h>
diff --git a/arch/arm/boards/rockchip-rk3568-evb/lowlevel.c b/arch/arm/boards/rockchip-rk3568-evb/lowlevel.c
index 9ab436135c..8720e6d9ae 100644
--- a/arch/arm/boards/rockchip-rk3568-evb/lowlevel.c
+++ b/arch/arm/boards/rockchip-rk3568-evb/lowlevel.c
@@ -4,10 +4,10 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/hardware.h>
-#include <mach/atf.h>
+#include <mach/rockchip/hardware.h>
+#include <mach/rockchip/atf.h>
#include <debug_ll.h>
-#include <mach/rockchip.h>
+#include <mach/rockchip/rockchip.h>
extern char __dtb_rk3568_evb1_v10_start[];
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index ea4407b6fa..d3933ae508 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -8,6 +8,8 @@
#include <debug_ll/pl011.h>
#elif defined CONFIG_ARCH_IMX
#include <mach/imx/debug_ll.h>
+#elif defined CONFIG_ARCH_ROCKCHIP
+#include <mach/rockchip/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-rockchip/atf.c b/arch/arm/mach-rockchip/atf.c
index 0512ff99f4..93025faf68 100644
--- a/arch/arm/mach-rockchip/atf.c
+++ b/arch/arm/mach-rockchip/atf.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <firmware.h>
#include <asm/system.h>
-#include <mach/atf.h>
+#include <mach/rockchip/atf.h>
#include <elf.h>
#include <asm/atf_common.h>
diff --git a/arch/arm/mach-rockchip/bbu.c b/arch/arm/mach-rockchip/bbu.c
index 71bbac27e8..435ef45ccd 100644
--- a/arch/arm/mach-rockchip/bbu.c
+++ b/arch/arm/mach-rockchip/bbu.c
@@ -10,10 +10,10 @@
#include <linux/stat.h>
#include <ioctl.h>
#include <environment.h>
-#include <mach/bbu.h>
+#include <mach/rockchip/bbu.h>
#include <libfile.h>
#include <linux/bitfield.h>
-#include <mach/rk3568-regs.h>
+#include <mach/rockchip/rk3568-regs.h>
/* The MaskROM looks for images on these locations: */
#define IMG_OFFSET_0 (0 * SZ_1K + SZ_32K)
diff --git a/arch/arm/mach-rockchip/rk3188.c b/arch/arm/mach-rockchip/rk3188.c
index 178bf2be1d..f1c20f6e52 100644
--- a/arch/arm/mach-rockchip/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188.c
@@ -15,8 +15,8 @@
#include <common.h>
#include <init.h>
#include <restart.h>
-#include <mach/rk3188-regs.h>
-#include <mach/rockchip.h>
+#include <mach/rockchip/rk3188-regs.h>
+#include <mach/rockchip/rockchip.h>
static void __noreturn rockchip_restart_soc(struct restart_handler *rst)
{
diff --git a/arch/arm/mach-rockchip/rk3288.c b/arch/arm/mach-rockchip/rk3288.c
index f623af6731..3a43e911db 100644
--- a/arch/arm/mach-rockchip/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288.c
@@ -18,10 +18,10 @@
#include <restart.h>
#include <reset_source.h>
#include <bootsource.h>
-#include <mach/rk3288-regs.h>
-#include <mach/cru_rk3288.h>
-#include <mach/hardware.h>
-#include <mach/rockchip.h>
+#include <mach/rockchip/rk3288-regs.h>
+#include <mach/rockchip/cru_rk3288.h>
+#include <mach/rockchip/hardware.h>
+#include <mach/rockchip/rockchip.h>
static void __noreturn rockchip_restart_soc(struct restart_handler *rst)
{
diff --git a/arch/arm/mach-rockchip/rk3568.c b/arch/arm/mach-rockchip/rk3568.c
index 19dfa9b871..39bd4772a6 100644
--- a/arch/arm/mach-rockchip/rk3568.c
+++ b/arch/arm/mach-rockchip/rk3568.c
@@ -2,8 +2,8 @@
#include <common.h>
#include <io.h>
#include <bootsource.h>
-#include <mach/rk3568-regs.h>
-#include <mach/rockchip.h>
+#include <mach/rockchip/rk3568-regs.h>
+#include <mach/rockchip/rockchip.h>
#define GRF_BASE 0xfdc60000
#define GRF_GPIO1B_DS_2 0x218
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 698d23e3a5..0a89ab1841 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
#include <init.h>
-#include <mach/rockchip.h>
+#include <mach/rockchip/rockchip.h>
static int rockchip_init(void)
{
diff --git a/drivers/clocksource/rk_timer.c b/drivers/clocksource/rk_timer.c
index 1d4b764561..af5d48670d 100644
--- a/drivers/clocksource/rk_timer.c
+++ b/drivers/clocksource/rk_timer.c
@@ -11,8 +11,8 @@
#include <init.h>
#include <io.h>
#include <stdio.h>
-#include <mach/hardware.h>
-#include <mach/cru_rk3288.h>
+#include <mach/rockchip/hardware.h>
+#include <mach/rockchip/cru_rk3288.h>
#include <common.h>
struct rk_timer {
diff --git a/arch/arm/mach-rockchip/include/mach/atf.h b/include/mach/rockchip/atf.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/atf.h
rename to include/mach/rockchip/atf.h
diff --git a/arch/arm/mach-rockchip/include/mach/bbu.h b/include/mach/rockchip/bbu.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/bbu.h
rename to include/mach/rockchip/bbu.h
diff --git a/arch/arm/mach-rockchip/include/mach/cru_rk3288.h b/include/mach/rockchip/cru_rk3288.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/cru_rk3288.h
rename to include/mach/rockchip/cru_rk3288.h
diff --git a/arch/arm/mach-rockchip/include/mach/debug_ll.h b/include/mach/rockchip/debug_ll.h
similarity index 93%
rename from arch/arm/mach-rockchip/include/mach/debug_ll.h
rename to include/mach/rockchip/debug_ll.h
index 91a7ba9020..c7a5b2f7d9 100644
--- a/arch/arm/mach-rockchip/include/mach/debug_ll.h
+++ b/include/mach/rockchip/debug_ll.h
@@ -5,10 +5,10 @@
#include <common.h>
#include <io.h>
-#include <mach/rk3188-regs.h>
-#include <mach/rk3288-regs.h>
-#include <mach/rk3568-regs.h>
-#include <mach/rk3399-regs.h>
+#include <mach/rockchip/rk3188-regs.h>
+#include <mach/rockchip/rk3288-regs.h>
+#include <mach/rockchip/rk3568-regs.h>
+#include <mach/rockchip/rk3399-regs.h>
#ifdef CONFIG_DEBUG_LL
diff --git a/arch/arm/mach-rockchip/include/mach/grf_rk3288.h b/include/mach/rockchip/grf_rk3288.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/grf_rk3288.h
rename to include/mach/rockchip/grf_rk3288.h
diff --git a/arch/arm/mach-rockchip/include/mach/hardware.h b/include/mach/rockchip/hardware.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/hardware.h
rename to include/mach/rockchip/hardware.h
diff --git a/arch/arm/mach-rockchip/include/mach/rk3188-regs.h b/include/mach/rockchip/rk3188-regs.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/rk3188-regs.h
rename to include/mach/rockchip/rk3188-regs.h
diff --git a/arch/arm/mach-rockchip/include/mach/rk3288-regs.h b/include/mach/rockchip/rk3288-regs.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/rk3288-regs.h
rename to include/mach/rockchip/rk3288-regs.h
diff --git a/arch/arm/mach-rockchip/include/mach/rk3399-regs.h b/include/mach/rockchip/rk3399-regs.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/rk3399-regs.h
rename to include/mach/rockchip/rk3399-regs.h
diff --git a/arch/arm/mach-rockchip/include/mach/rk3568-regs.h b/include/mach/rockchip/rk3568-regs.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/rk3568-regs.h
rename to include/mach/rockchip/rk3568-regs.h
diff --git a/arch/arm/mach-rockchip/include/mach/rockchip.h b/include/mach/rockchip/rockchip.h
similarity index 100%
rename from arch/arm/mach-rockchip/include/mach/rockchip.h
rename to include/mach/rockchip/rockchip.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 03/50] ARM: Zynqmp: Move mach header files to include/mach/zynqmp
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
2023-03-03 9:20 ` [PATCH 01/50] ARM: i.MX: Move mach header files to include/mach/imx Sascha Hauer
2023-03-03 9:20 ` [PATCH 02/50] ARM: Rockchip: Move mach header files to include/mach/rockchip Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 04/50] ARM: mvebu: Move mach header files to include/mach/mvebu Sascha Hauer
` (46 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
possible as there won't be a single mach anymore.
Move all Zynqmp specific header files to include/mach/zynqmp/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/xilinx-zcu104/board.c | 2 +-
arch/arm/boards/xilinx-zcu106/board.c | 2 +-
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-zynqmp/firmware-zynqmp.c | 2 +-
arch/arm/mach-zynqmp/zynqmp-bbu.c | 2 +-
drivers/clk/zynqmp/clk-divider-zynqmp.c | 2 +-
drivers/clk/zynqmp/clk-gate-zynqmp.c | 2 +-
drivers/clk/zynqmp/clk-mux-zynqmp.c | 2 +-
drivers/clk/zynqmp/clk-pll-zynqmp.c | 2 +-
drivers/clk/zynqmp/clkc.c | 2 +-
drivers/firmware/zynqmp-fpga.c | 2 +-
.../mach-zynqmp/include/mach => include/mach/zynqmp}/debug_ll.h | 0
.../include/mach => include/mach/zynqmp}/firmware-zynqmp.h | 0
.../include/mach => include/mach/zynqmp}/zynqmp-bbu.h | 0
14 files changed, 12 insertions(+), 10 deletions(-)
rename {arch/arm/mach-zynqmp/include/mach => include/mach/zynqmp}/debug_ll.h (100%)
rename {arch/arm/mach-zynqmp/include/mach => include/mach/zynqmp}/firmware-zynqmp.h (100%)
rename {arch/arm/mach-zynqmp/include/mach => include/mach/zynqmp}/zynqmp-bbu.h (100%)
diff --git a/arch/arm/boards/xilinx-zcu104/board.c b/arch/arm/boards/xilinx-zcu104/board.c
index 7654d2bfac..26dc6c9613 100644
--- a/arch/arm/boards/xilinx-zcu104/board.c
+++ b/arch/arm/boards/xilinx-zcu104/board.c
@@ -5,7 +5,7 @@
#include <common.h>
#include <init.h>
-#include <mach/zynqmp-bbu.h>
+#include <mach/zynqmp/zynqmp-bbu.h>
static int zcu104_register_update_handler(void)
{
diff --git a/arch/arm/boards/xilinx-zcu106/board.c b/arch/arm/boards/xilinx-zcu106/board.c
index 0cb5ce86ea..3c8c3d21f2 100644
--- a/arch/arm/boards/xilinx-zcu106/board.c
+++ b/arch/arm/boards/xilinx-zcu106/board.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <init.h>
-#include <mach/zynqmp-bbu.h>
+#include <mach/zynqmp/zynqmp-bbu.h>
static int zcu106_register_update_handler(void)
{
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index d3933ae508..61d66e7bc1 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -10,6 +10,8 @@
#include <mach/imx/debug_ll.h>
#elif defined CONFIG_ARCH_ROCKCHIP
#include <mach/rockchip/debug_ll.h>
+#elif defined CONFIG_ARCH_ZYNQMP
+#include <mach/zynqmp/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-zynqmp/firmware-zynqmp.c b/arch/arm/mach-zynqmp/firmware-zynqmp.c
index 0406e66c5d..521a70bac4 100644
--- a/arch/arm/mach-zynqmp/firmware-zynqmp.c
+++ b/arch/arm/mach-zynqmp/firmware-zynqmp.c
@@ -16,7 +16,7 @@
#include <init.h>
#include <linux/arm-smccc.h>
-#include <mach/firmware-zynqmp.h>
+#include <mach/zynqmp/firmware-zynqmp.h>
#define ZYNQMP_TZ_VERSION(MAJOR, MINOR) ((MAJOR << 16) | MINOR)
diff --git a/arch/arm/mach-zynqmp/zynqmp-bbu.c b/arch/arm/mach-zynqmp/zynqmp-bbu.c
index 7ac8c2b8a9..3c5e2fe885 100644
--- a/arch/arm/mach-zynqmp/zynqmp-bbu.c
+++ b/arch/arm/mach-zynqmp/zynqmp-bbu.c
@@ -4,7 +4,7 @@
*/
#include <common.h>
-#include <mach/zynqmp-bbu.h>
+#include <mach/zynqmp/zynqmp-bbu.h>
int zynqmp_bbu_register_handler(const char *name, char *devicefile,
unsigned long flags)
diff --git a/drivers/clk/zynqmp/clk-divider-zynqmp.c b/drivers/clk/zynqmp/clk-divider-zynqmp.c
index 38c7baa0c6..d78cda38b7 100644
--- a/drivers/clk/zynqmp/clk-divider-zynqmp.c
+++ b/drivers/clk/zynqmp/clk-divider-zynqmp.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <linux/clk.h>
-#include <mach/firmware-zynqmp.h>
+#include <mach/zynqmp/firmware-zynqmp.h>
#include "clk-zynqmp.h"
diff --git a/drivers/clk/zynqmp/clk-gate-zynqmp.c b/drivers/clk/zynqmp/clk-gate-zynqmp.c
index 7b5a432aa8..daa17c34b8 100644
--- a/drivers/clk/zynqmp/clk-gate-zynqmp.c
+++ b/drivers/clk/zynqmp/clk-gate-zynqmp.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <linux/clk.h>
-#include <mach/firmware-zynqmp.h>
+#include <mach/zynqmp/firmware-zynqmp.h>
#include "clk-zynqmp.h"
diff --git a/drivers/clk/zynqmp/clk-mux-zynqmp.c b/drivers/clk/zynqmp/clk-mux-zynqmp.c
index 29bd9e6ef0..fe31cff4b6 100644
--- a/drivers/clk/zynqmp/clk-mux-zynqmp.c
+++ b/drivers/clk/zynqmp/clk-mux-zynqmp.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <linux/clk.h>
-#include <mach/firmware-zynqmp.h>
+#include <mach/zynqmp/firmware-zynqmp.h>
#include "clk-zynqmp.h"
diff --git a/drivers/clk/zynqmp/clk-pll-zynqmp.c b/drivers/clk/zynqmp/clk-pll-zynqmp.c
index 791f31a5a5..b386780f18 100644
--- a/drivers/clk/zynqmp/clk-pll-zynqmp.c
+++ b/drivers/clk/zynqmp/clk-pll-zynqmp.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <linux/clk.h>
-#include <mach/firmware-zynqmp.h>
+#include <mach/zynqmp/firmware-zynqmp.h>
#include "clk-zynqmp.h"
diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
index afa6693caf..9dd58a2db3 100644
--- a/drivers/clk/zynqmp/clkc.c
+++ b/drivers/clk/zynqmp/clkc.c
@@ -14,7 +14,7 @@
#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
-#include <mach/firmware-zynqmp.h>
+#include <mach/zynqmp/firmware-zynqmp.h>
#include "clk-zynqmp.h"
diff --git a/drivers/firmware/zynqmp-fpga.c b/drivers/firmware/zynqmp-fpga.c
index f4e8456843..2544d015d6 100644
--- a/drivers/firmware/zynqmp-fpga.c
+++ b/drivers/firmware/zynqmp-fpga.c
@@ -15,7 +15,7 @@
#include <common.h>
#include <init.h>
#include <dma.h>
-#include <mach/firmware-zynqmp.h>
+#include <mach/zynqmp/firmware-zynqmp.h>
#define ZYNQMP_PM_FEATURE_BYTE_ORDER_IRREL BIT(0)
#define ZYNQMP_PM_FEATURE_SIZE_NOT_NEEDED BIT(1)
diff --git a/arch/arm/mach-zynqmp/include/mach/debug_ll.h b/include/mach/zynqmp/debug_ll.h
similarity index 100%
rename from arch/arm/mach-zynqmp/include/mach/debug_ll.h
rename to include/mach/zynqmp/debug_ll.h
diff --git a/arch/arm/mach-zynqmp/include/mach/firmware-zynqmp.h b/include/mach/zynqmp/firmware-zynqmp.h
similarity index 100%
rename from arch/arm/mach-zynqmp/include/mach/firmware-zynqmp.h
rename to include/mach/zynqmp/firmware-zynqmp.h
diff --git a/arch/arm/mach-zynqmp/include/mach/zynqmp-bbu.h b/include/mach/zynqmp/zynqmp-bbu.h
similarity index 100%
rename from arch/arm/mach-zynqmp/include/mach/zynqmp-bbu.h
rename to include/mach/zynqmp/zynqmp-bbu.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 04/50] ARM: mvebu: Move mach header files to include/mach/mvebu
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (2 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 03/50] ARM: Zynqmp: Move mach header files to include/mach/zynqmp Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 05/50] ARM: davinci: Move mach header files to include/mach/davinci Sascha Hauer
` (45 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
possible as there won't be a single mach anymore.
Move all mvebu specific header files to include/mach/mvebu/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/globalscale-guruplug/lowlevel.c | 4 ++--
arch/arm/boards/globalscale-mirabox/lowlevel.c | 4 ++--
arch/arm/boards/lenovo-ix4-300d/lowlevel.c | 4 ++--
arch/arm/boards/marvell-armada-xp-db/lowlevel.c | 4 ++--
arch/arm/boards/marvell-armada-xp-gp/lowlevel.c | 4 ++--
arch/arm/boards/netgear-rn104/lowlevel.c | 4 ++--
arch/arm/boards/netgear-rn2120/lowlevel.c | 6 +++---
arch/arm/boards/plathome-openblocks-a6/lowlevel.c | 4 ++--
arch/arm/boards/plathome-openblocks-ax3/lowlevel.c | 4 ++--
arch/arm/boards/solidrun-cubox/board.c | 2 +-
arch/arm/boards/solidrun-cubox/lowlevel.c | 4 ++--
arch/arm/boards/turris-omnia/lowlevel.c | 4 ++--
arch/arm/boards/usi-topkick/lowlevel.c | 4 ++--
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-mvebu/armada-370-xp.c | 4 ++--
arch/arm/mach-mvebu/common.c | 6 +++---
arch/arm/mach-mvebu/dove.c | 2 +-
arch/arm/mach-mvebu/kirkwood.c | 2 +-
arch/arm/mach-mvebu/kwb_bbu.c | 2 +-
arch/arm/mach-mvebu/kwbootimage.c | 2 +-
drivers/bus/mvebu-mbus.c | 2 +-
.../mach => include/mach/mvebu}/armada-370-xp-regs.h | 2 +-
.../include/mach => include/mach/mvebu}/barebox-arm-head.h | 2 +-
.../mach-mvebu/include/mach => include/mach/mvebu}/bbu.h | 0
.../mach-mvebu/include/mach => include/mach/mvebu}/common.h | 0
.../include/mach => include/mach/mvebu}/debug_ll.h | 0
.../include/mach => include/mach/mvebu}/dove-regs.h | 2 +-
.../include/mach => include/mach/mvebu}/kirkwood-regs.h | 2 +-
.../include/mach => include/mach/mvebu}/lowlevel.h | 0
.../mach-mvebu/include/mach => include/mach/mvebu}/socid.h | 0
30 files changed, 42 insertions(+), 40 deletions(-)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/armada-370-xp-regs.h (98%)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/barebox-arm-head.h (97%)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/bbu.h (100%)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/common.h (100%)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/debug_ll.h (100%)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/dove-regs.h (98%)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/kirkwood-regs.h (97%)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/lowlevel.h (100%)
rename {arch/arm/mach-mvebu/include/mach => include/mach/mvebu}/socid.h (100%)
diff --git a/arch/arm/boards/globalscale-guruplug/lowlevel.c b/arch/arm/boards/globalscale-guruplug/lowlevel.c
index 35b2150960..a54d848c04 100644
--- a/arch/arm/boards/globalscale-guruplug/lowlevel.c
+++ b/arch/arm/boards/globalscale-guruplug/lowlevel.c
@@ -4,8 +4,8 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_kirkwood_guruplug_server_plus_bb_start[];
diff --git a/arch/arm/boards/globalscale-mirabox/lowlevel.c b/arch/arm/boards/globalscale-mirabox/lowlevel.c
index 9d03dfd418..da08e80d74 100644
--- a/arch/arm/boards/globalscale-mirabox/lowlevel.c
+++ b/arch/arm/boards/globalscale-mirabox/lowlevel.c
@@ -4,8 +4,8 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_armada_370_mirabox_bb_start[];
diff --git a/arch/arm/boards/lenovo-ix4-300d/lowlevel.c b/arch/arm/boards/lenovo-ix4-300d/lowlevel.c
index 2ca6c6b5f9..d76e4af30d 100644
--- a/arch/arm/boards/lenovo-ix4-300d/lowlevel.c
+++ b/arch/arm/boards/lenovo-ix4-300d/lowlevel.c
@@ -3,9 +3,9 @@
#include <common.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
+#include <mach/mvebu/barebox-arm-head.h>
#include <linux/sizes.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_armada_xp_lenovo_ix4_300d_bb_start[];
diff --git a/arch/arm/boards/marvell-armada-xp-db/lowlevel.c b/arch/arm/boards/marvell-armada-xp-db/lowlevel.c
index 4850cf4c2f..14059fe8c5 100644
--- a/arch/arm/boards/marvell-armada-xp-db/lowlevel.c
+++ b/arch/arm/boards/marvell-armada-xp-db/lowlevel.c
@@ -7,8 +7,8 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
#include <io.h>
extern char __dtb_armada_xp_db_bb_start[];
diff --git a/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c b/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c
index e6242e36a7..ae5ad2822a 100644
--- a/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c
+++ b/arch/arm/boards/marvell-armada-xp-gp/lowlevel.c
@@ -4,8 +4,8 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_armada_xp_gp_bb_start[];
diff --git a/arch/arm/boards/netgear-rn104/lowlevel.c b/arch/arm/boards/netgear-rn104/lowlevel.c
index 5005129555..e693d13993 100644
--- a/arch/arm/boards/netgear-rn104/lowlevel.c
+++ b/arch/arm/boards/netgear-rn104/lowlevel.c
@@ -6,8 +6,8 @@
#include <common.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_armada_370_rn104_bb_start[];
diff --git a/arch/arm/boards/netgear-rn2120/lowlevel.c b/arch/arm/boards/netgear-rn2120/lowlevel.c
index f88f46c037..f923be5a27 100644
--- a/arch/arm/boards/netgear-rn2120/lowlevel.c
+++ b/arch/arm/boards/netgear-rn2120/lowlevel.c
@@ -3,10 +3,10 @@
#include <common.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
+#include <mach/mvebu/barebox-arm-head.h>
#include <asm/io.h>
-#include <mach/lowlevel.h>
-#include <mach/common.h>
+#include <mach/mvebu/lowlevel.h>
+#include <mach/mvebu/common.h>
extern char __dtb_armada_xp_rn2120_bb_start[];
diff --git a/arch/arm/boards/plathome-openblocks-a6/lowlevel.c b/arch/arm/boards/plathome-openblocks-a6/lowlevel.c
index daa482dd4f..8a58d692d8 100644
--- a/arch/arm/boards/plathome-openblocks-a6/lowlevel.c
+++ b/arch/arm/boards/plathome-openblocks-a6/lowlevel.c
@@ -3,8 +3,8 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_kirkwood_openblocks_a6_bb_start[];
diff --git a/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c b/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
index bab44590c7..35888a0b83 100644
--- a/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
+++ b/arch/arm/boards/plathome-openblocks-ax3/lowlevel.c
@@ -4,8 +4,8 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_armada_xp_openblocks_ax3_4_bb_start[];
diff --git a/arch/arm/boards/solidrun-cubox/board.c b/arch/arm/boards/solidrun-cubox/board.c
index f3cb5c92f5..3c12c28594 100644
--- a/arch/arm/boards/solidrun-cubox/board.c
+++ b/arch/arm/boards/solidrun-cubox/board.c
@@ -3,7 +3,7 @@
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/mvebu/bbu.h>
static int cubox_devices_init(void)
{
diff --git a/arch/arm/boards/solidrun-cubox/lowlevel.c b/arch/arm/boards/solidrun-cubox/lowlevel.c
index 5bcd0751fc..8f1515e3b2 100644
--- a/arch/arm/boards/solidrun-cubox/lowlevel.c
+++ b/arch/arm/boards/solidrun-cubox/lowlevel.c
@@ -5,8 +5,8 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_dove_cubox_bb_start[];
diff --git a/arch/arm/boards/turris-omnia/lowlevel.c b/arch/arm/boards/turris-omnia/lowlevel.c
index 8ec2a0bf82..97d57e6ce0 100644
--- a/arch/arm/boards/turris-omnia/lowlevel.c
+++ b/arch/arm/boards/turris-omnia/lowlevel.c
@@ -3,8 +3,8 @@
#include <common.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
#include <asm/io.h>
diff --git a/arch/arm/boards/usi-topkick/lowlevel.c b/arch/arm/boards/usi-topkick/lowlevel.c
index 51aa29e047..d9118f5d2c 100644
--- a/arch/arm/boards/usi-topkick/lowlevel.c
+++ b/arch/arm/boards/usi-topkick/lowlevel.c
@@ -4,8 +4,8 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/barebox-arm.h>
-#include <mach/barebox-arm-head.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/barebox-arm-head.h>
+#include <mach/mvebu/lowlevel.h>
extern char __dtb_kirkwood_topkick_bb_start[];
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 61d66e7bc1..37c40219bc 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -12,6 +12,8 @@
#include <mach/rockchip/debug_ll.h>
#elif defined CONFIG_ARCH_ZYNQMP
#include <mach/zynqmp/debug_ll.h>
+#elif defined CONFIG_ARCH_MVEBU
+#include <mach/mvebu/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 0b40754231..0a0a1160fc 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -9,8 +9,8 @@
#include <of_address.h>
#include <asm/memory.h>
#include <linux/mbus.h>
-#include <mach/armada-370-xp-regs.h>
-#include <mach/socid.h>
+#include <mach/mvebu/armada-370-xp-regs.h>
+#include <mach/mvebu/socid.h>
static const struct of_device_id armada_370_xp_pcie_of_ids[] = {
{ .compatible = "marvell,armada-xp-pcie", },
diff --git a/arch/arm/mach-mvebu/common.c b/arch/arm/mach-mvebu/common.c
index ed0745c62a..aea2c43849 100644
--- a/arch/arm/mach-mvebu/common.c
+++ b/arch/arm/mach-mvebu/common.c
@@ -8,11 +8,11 @@
#include <of.h>
#include <of_address.h>
#include <linux/clk.h>
-#include <mach/common.h>
-#include <mach/socid.h>
+#include <mach/mvebu/common.h>
+#include <mach/mvebu/socid.h>
#include <asm/barebox-arm.h>
#include <asm/memory.h>
-#include <mach/lowlevel.h>
+#include <mach/mvebu/lowlevel.h>
/*
* The different SoC headers containing register definitions (mach/dove-regs.h,
diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c
index d085894d19..2dd461c5c3 100644
--- a/arch/arm/mach-mvebu/dove.c
+++ b/arch/arm/mach-mvebu/dove.c
@@ -7,7 +7,7 @@
#include <restart.h>
#include <asm/memory.h>
#include <linux/mbus.h>
-#include <mach/dove-regs.h>
+#include <mach/mvebu/dove-regs.h>
static void __noreturn dove_restart_soc(struct restart_handler *rst)
{
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index d311058a61..4b5d1b716b 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -7,7 +7,7 @@
#include <restart.h>
#include <asm/memory.h>
#include <linux/mbus.h>
-#include <mach/kirkwood-regs.h>
+#include <mach/mvebu/kirkwood-regs.h>
static void __noreturn kirkwood_restart_soc(struct restart_handler *rst)
{
diff --git a/arch/arm/mach-mvebu/kwb_bbu.c b/arch/arm/mach-mvebu/kwb_bbu.c
index eb205b2799..0fde9abb57 100644
--- a/arch/arm/mach-mvebu/kwb_bbu.c
+++ b/arch/arm/mach-mvebu/kwb_bbu.c
@@ -4,7 +4,7 @@
#include <libfile.h>
#include <linux/printk.h>
-#include <mach/bbu.h>
+#include <mach/mvebu/bbu.h>
struct mvebu_bbu_handler {
struct bbu_handler bbuh;
diff --git a/arch/arm/mach-mvebu/kwbootimage.c b/arch/arm/mach-mvebu/kwbootimage.c
index 7189faa751..2bcc42fe57 100644
--- a/arch/arm/mach-mvebu/kwbootimage.c
+++ b/arch/arm/mach-mvebu/kwbootimage.c
@@ -10,7 +10,7 @@
#include <restart.h>
#include <unistd.h>
#include <asm/unaligned.h>
-#include <mach/common.h>
+#include <mach/mvebu/common.h>
static int do_bootm_kwbimage_v0_v1(struct image_data *data)
{
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index 46fe5dd398..5d4dbeb4df 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -60,7 +60,7 @@
#include <of.h>
#include <of_address.h>
#include <linux/mbus.h>
-#include <mach/common.h>
+#include <mach/mvebu/common.h>
/* DDR target is the same on all platforms */
#define TARGET_DDR 0
diff --git a/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h b/include/mach/mvebu/armada-370-xp-regs.h
similarity index 98%
rename from arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h
rename to include/mach/mvebu/armada-370-xp-regs.h
index bed2239aa3..c9edb8cbf0 100644
--- a/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h
+++ b/include/mach/mvebu/armada-370-xp-regs.h
@@ -4,7 +4,7 @@
#ifndef __MACH_MVEBU_ARMADA_370_XP_REGS_H
#define __MACH_MVEBU_ARMADA_370_XP_REGS_H
-#include <mach/common.h>
+#include <mach/mvebu/common.h>
#define ARMADA_370_XP_INT_REGS_BASE IOMEM(MVEBU_REMAP_INT_REG_BASE)
#define ARMADA_370_XP_UART_BASE (ARMADA_370_XP_INT_REGS_BASE + 0x12000)
diff --git a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h b/include/mach/mvebu/barebox-arm-head.h
similarity index 97%
rename from arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
rename to include/mach/mvebu/barebox-arm-head.h
index 72afd10005..76e426e3b8 100644
--- a/arch/arm/mach-mvebu/include/mach/barebox-arm-head.h
+++ b/include/mach/mvebu/barebox-arm-head.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <linux/stringify.h>
-#include <mach/common.h>
+#include <mach/mvebu/common.h>
static inline void __barebox_mvebu_head(void)
{
diff --git a/arch/arm/mach-mvebu/include/mach/bbu.h b/include/mach/mvebu/bbu.h
similarity index 100%
rename from arch/arm/mach-mvebu/include/mach/bbu.h
rename to include/mach/mvebu/bbu.h
diff --git a/arch/arm/mach-mvebu/include/mach/common.h b/include/mach/mvebu/common.h
similarity index 100%
rename from arch/arm/mach-mvebu/include/mach/common.h
rename to include/mach/mvebu/common.h
diff --git a/arch/arm/mach-mvebu/include/mach/debug_ll.h b/include/mach/mvebu/debug_ll.h
similarity index 100%
rename from arch/arm/mach-mvebu/include/mach/debug_ll.h
rename to include/mach/mvebu/debug_ll.h
diff --git a/arch/arm/mach-mvebu/include/mach/dove-regs.h b/include/mach/mvebu/dove-regs.h
similarity index 98%
rename from arch/arm/mach-mvebu/include/mach/dove-regs.h
rename to include/mach/mvebu/dove-regs.h
index a1335154be..3fbb3dd720 100644
--- a/arch/arm/mach-mvebu/include/mach/dove-regs.h
+++ b/include/mach/mvebu/dove-regs.h
@@ -4,7 +4,7 @@
#ifndef __MACH_MVEBU_DOVE_REGS_H
#define __MACH_MVEBU_DOVE_REGS_H
-#include <mach/common.h>
+#include <mach/mvebu/common.h>
/*
* Even after MVEBU SoC internal register base remap. Dove MC
diff --git a/arch/arm/mach-mvebu/include/mach/kirkwood-regs.h b/include/mach/mvebu/kirkwood-regs.h
similarity index 97%
rename from arch/arm/mach-mvebu/include/mach/kirkwood-regs.h
rename to include/mach/mvebu/kirkwood-regs.h
index 5e21c4a587..e47882cfd8 100644
--- a/arch/arm/mach-mvebu/include/mach/kirkwood-regs.h
+++ b/include/mach/mvebu/kirkwood-regs.h
@@ -4,7 +4,7 @@
#ifndef __MACH_MVEBU_KIRKWOOD_REGS_H
#define __MACH_MVEBU_KIRKWOOD_REGS_H
-#include <mach/common.h>
+#include <mach/mvebu/common.h>
#define KIRKWOOD_INT_REGS_BASE IOMEM(MVEBU_REMAP_INT_REG_BASE)
diff --git a/arch/arm/mach-mvebu/include/mach/lowlevel.h b/include/mach/mvebu/lowlevel.h
similarity index 100%
rename from arch/arm/mach-mvebu/include/mach/lowlevel.h
rename to include/mach/mvebu/lowlevel.h
diff --git a/arch/arm/mach-mvebu/include/mach/socid.h b/include/mach/mvebu/socid.h
similarity index 100%
rename from arch/arm/mach-mvebu/include/mach/socid.h
rename to include/mach/mvebu/socid.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 05/50] ARM: davinci: Move mach header files to include/mach/davinci
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (3 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 04/50] ARM: mvebu: Move mach header files to include/mach/mvebu Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 06/50] ARM: bcm283x: Move mach header files to include/mach/bcm283x Sascha Hauer
` (44 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
possible as there won't be a single mach anymore.
Move all davinci specific header files to include/mach/davinci/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-davinci/time.c | 2 +-
.../include/mach => include/mach/davinci}/debug_ll.h | 2 +-
.../include/mach => include/mach/davinci}/hardware.h | 0
.../mach-davinci/include/mach => include/mach/davinci}/serial.h | 2 +-
.../mach-davinci/include/mach => include/mach/davinci}/time.h | 2 +-
6 files changed, 6 insertions(+), 4 deletions(-)
rename {arch/arm/mach-davinci/include/mach => include/mach/davinci}/debug_ll.h (95%)
rename {arch/arm/mach-davinci/include/mach => include/mach/davinci}/hardware.h (100%)
rename {arch/arm/mach-davinci/include/mach => include/mach/davinci}/serial.h (92%)
rename {arch/arm/mach-davinci/include/mach => include/mach/davinci}/time.h (93%)
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 37c40219bc..42160295e3 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -14,6 +14,8 @@
#include <mach/zynqmp/debug_ll.h>
#elif defined CONFIG_ARCH_MVEBU
#include <mach/mvebu/debug_ll.h>
+#elif defined CONFIG_ARCH_DAVINCI
+#include <mach/davinci/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index c54e49470b..5456820009 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -13,7 +13,7 @@
#include <restart.h>
#include <clock.h>
-#include <mach/time.h>
+#include <mach/davinci/time.h>
/* Timer register offsets */
#define PID12 0x0
diff --git a/arch/arm/mach-davinci/include/mach/debug_ll.h b/include/mach/davinci/debug_ll.h
similarity index 95%
rename from arch/arm/mach-davinci/include/mach/debug_ll.h
rename to include/mach/davinci/debug_ll.h
index 60a8d2a5f1..5867da8544 100644
--- a/arch/arm/mach-davinci/include/mach/debug_ll.h
+++ b/include/mach/davinci/debug_ll.h
@@ -8,7 +8,7 @@
#define __INCLUDE_ARCH_DEBUG_LL_H__
#include <asm/io.h>
-#include <mach/serial.h>
+#include <mach/davinci/serial.h>
#define DEBUG_LL_UART_ADDR DAVINCI_UART0_BASE
#define DEBUG_LL_UART_RSHFT 2
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/include/mach/davinci/hardware.h
similarity index 100%
rename from arch/arm/mach-davinci/include/mach/hardware.h
rename to include/mach/davinci/hardware.h
diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/include/mach/davinci/serial.h
similarity index 92%
rename from arch/arm/mach-davinci/include/mach/serial.h
rename to include/mach/davinci/serial.h
index 03e8ef43dd..cc14c5cf29 100644
--- a/arch/arm/mach-davinci/include/mach/serial.h
+++ b/include/mach/davinci/serial.h
@@ -9,7 +9,7 @@
#ifndef __ASM_ARCH_SERIAL_H
#define __ASM_ARCH_SERIAL_H
-#include <mach/hardware.h>
+#include <mach/davinci/hardware.h>
#define DAVINCI_UART0_BASE (IO_PHYS + 0x20000)
#define DAVINCI_UART1_BASE (IO_PHYS + 0x20400)
diff --git a/arch/arm/mach-davinci/include/mach/time.h b/include/mach/davinci/time.h
similarity index 93%
rename from arch/arm/mach-davinci/include/mach/time.h
rename to include/mach/davinci/time.h
index 6456205859..d7d90efea9 100644
--- a/arch/arm/mach-davinci/include/mach/time.h
+++ b/include/mach/davinci/time.h
@@ -9,7 +9,7 @@
#ifndef __ARCH_ARM_MACH_DAVINCI_TIME_H
#define __ARCH_ARM_MACH_DAVINCI_TIME_H
-#include <mach/hardware.h>
+#include <mach/davinci/hardware.h>
#define DAVINCI_TIMER0_BASE (IO_PHYS + 0x21400)
#define DAVINCI_TIMER1_BASE (IO_PHYS + 0x21800)
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 06/50] ARM: bcm283x: Move mach header files to include/mach/bcm283x
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (4 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 05/50] ARM: davinci: Move mach header files to include/mach/davinci Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 07/50] ARM: stm32mp: Move mach header files to include/mach/stm32mp Sascha Hauer
` (43 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all bcm283x specific header files to include/mach/bcm283x/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/raspberry-pi/lowlevel.c | 4 ++--
arch/arm/boards/raspberry-pi/mbox-helpers.c | 2 +-
arch/arm/boards/raspberry-pi/rpi-common.c | 6 +++---
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-bcm283x/core.c | 2 +-
arch/arm/mach-bcm283x/mbox.c | 4 ++--
drivers/clk/clk-rpi.c | 6 +++---
drivers/gpio/gpio-raspberrypi-exp.c | 2 +-
drivers/regulator/bcm2835.c | 2 +-
drivers/video/bcm2835.c | 2 +-
.../include/mach => include/mach/bcm283x}/core.h | 2 +-
.../include/mach => include/mach/bcm283x}/debug_ll.h | 2 +-
.../include/mach => include/mach/bcm283x}/mbox.h | 2 +-
.../include/mach => include/mach/bcm283x}/platform.h | 0
14 files changed, 20 insertions(+), 18 deletions(-)
rename {arch/arm/mach-bcm283x/include/mach => include/mach/bcm283x}/core.h (93%)
rename {arch/arm/mach-bcm283x/include/mach => include/mach/bcm283x}/debug_ll.h (98%)
rename {arch/arm/mach-bcm283x/include/mach => include/mach/bcm283x}/mbox.h (99%)
rename {arch/arm/mach-bcm283x/include/mach => include/mach/bcm283x}/platform.h (100%)
diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c
index 5ead895767..449dfa4575 100644
--- a/arch/arm/boards/raspberry-pi/lowlevel.c
+++ b/arch/arm/boards/raspberry-pi/lowlevel.c
@@ -5,9 +5,9 @@
#include <common.h>
#include <linux/sizes.h>
#include <asm/unaligned.h>
-#include <mach/platform.h>
+#include <mach/bcm283x/platform.h>
#include <debug_ll.h>
-#include <mach/mbox.h>
+#include <mach/bcm283x/mbox.h>
#include <of.h>
#include "lowlevel.h"
diff --git a/arch/arm/boards/raspberry-pi/mbox-helpers.c b/arch/arm/boards/raspberry-pi/mbox-helpers.c
index 9f252c68ff..3a76ac2b01 100644
--- a/arch/arm/boards/raspberry-pi/mbox-helpers.c
+++ b/arch/arm/boards/raspberry-pi/mbox-helpers.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: 2009 Carlo Caione <carlo@carlocaione.org>
-#include <mach/mbox.h>
+#include <mach/bcm283x/mbox.h>
#include "lowlevel.h"
struct msg_get_arm_mem {
diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 13df6a140c..367033c02a 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -25,9 +25,9 @@
#include <asm/system_info.h>
#include <reset_source.h>
-#include <mach/core.h>
-#include <mach/mbox.h>
-#include <mach/platform.h>
+#include <mach/bcm283x/core.h>
+#include <mach/bcm283x/mbox.h>
+#include <mach/bcm283x/platform.h>
#include <soc/bcm283x/wdt.h>
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 42160295e3..77a959c93b 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -16,6 +16,8 @@
#include <mach/mvebu/debug_ll.h>
#elif defined CONFIG_ARCH_DAVINCI
#include <mach/davinci/debug_ll.h>
+#elif defined CONFIG_ARCH_BCM283X
+#include <mach/bcm283x/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach-bcm283x/core.c
index 40882fb6d6..1091ad0b56 100644
--- a/arch/arm/mach-bcm283x/core.c
+++ b/arch/arm/mach-bcm283x/core.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/types.h>
-#include <mach/core.h>
+#include <mach/bcm283x/core.h>
#include <asm/system_info.h>
void __iomem *bcm2835_get_mmio_base_by_cpuid(void)
diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index 4959a1a652..3abb81cc9b 100644
--- a/arch/arm/mach-bcm283x/mbox.c
+++ b/arch/arm/mach-bcm283x/mbox.c
@@ -16,8 +16,8 @@
#include <of_address.h>
#include <pbl.h>
-#include <mach/mbox.h>
-#include <mach/core.h>
+#include <mach/bcm283x/mbox.h>
+#include <mach/bcm283x/core.h>
#define TIMEOUT (MSECOND * 1000)
diff --git a/drivers/clk/clk-rpi.c b/drivers/clk/clk-rpi.c
index 49d69709d2..14359c5eb1 100644
--- a/drivers/clk/clk-rpi.c
+++ b/drivers/clk/clk-rpi.c
@@ -8,9 +8,9 @@
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/core.h>
-#include <mach/mbox.h>
-#include <mach/platform.h>
+#include <mach/bcm283x/core.h>
+#include <mach/bcm283x/mbox.h>
+#include <mach/bcm283x/platform.h>
#include <dt-bindings/clock/bcm2835.h>
#define BCM2711_CLOCK_END (BCM2711_CLOCK_EMMC2 + 1)
diff --git a/drivers/gpio/gpio-raspberrypi-exp.c b/drivers/gpio/gpio-raspberrypi-exp.c
index c6344996db..3eba43a918 100644
--- a/drivers/gpio/gpio-raspberrypi-exp.c
+++ b/drivers/gpio/gpio-raspberrypi-exp.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <gpio.h>
#include <init.h>
-#include <mach/mbox.h>
+#include <mach/bcm283x/mbox.h>
#define NUM_GPIO 8
diff --git a/drivers/regulator/bcm2835.c b/drivers/regulator/bcm2835.c
index 61dc7cda1f..34e0429dfd 100644
--- a/drivers/regulator/bcm2835.c
+++ b/drivers/regulator/bcm2835.c
@@ -9,7 +9,7 @@
#include <init.h>
#include <regulator.h>
-#include <mach/mbox.h>
+#include <mach/bcm283x/mbox.h>
#define REG_DEV(_id, _name) \
{ \
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index 43593785f3..070d1b4902 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -15,7 +15,7 @@
#include <xfuncs.h>
#include <of_address.h>
-#include <mach/mbox.h>
+#include <mach/bcm283x/mbox.h>
struct bcm2835fb_info {
struct fb_info fbi;
diff --git a/arch/arm/mach-bcm283x/include/mach/core.h b/include/mach/bcm283x/core.h
similarity index 93%
rename from arch/arm/mach-bcm283x/include/mach/core.h
rename to include/mach/bcm283x/core.h
index c8547351a3..c6edee2a8c 100644
--- a/arch/arm/mach-bcm283x/include/mach/core.h
+++ b/include/mach/bcm283x/core.h
@@ -10,7 +10,7 @@
#include <linux/types.h>
#include <linux/sizes.h>
#include <asm/memory.h>
-#include <mach/platform.h>
+#include <mach/bcm283x/platform.h>
static void inline bcm2835_add_device_sdram(u32 size)
{
diff --git a/arch/arm/mach-bcm283x/include/mach/debug_ll.h b/include/mach/bcm283x/debug_ll.h
similarity index 98%
rename from arch/arm/mach-bcm283x/include/mach/debug_ll.h
rename to include/mach/bcm283x/debug_ll.h
index fdb63b4f5a..424de8be4e 100644
--- a/arch/arm/mach-bcm283x/include/mach/debug_ll.h
+++ b/include/mach/bcm283x/debug_ll.h
@@ -17,7 +17,7 @@
#ifndef __MACH_BCM2835_DEBUG_LL_H__
#define __MACH_BCM2835_DEBUG_LL_H__
-#include <mach/platform.h>
+#include <mach/bcm283x/platform.h>
#include <io.h>
#ifdef CONFIG_DEBUG_RPI1_UART
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/include/mach/bcm283x/mbox.h
similarity index 99%
rename from arch/arm/mach-bcm283x/include/mach/mbox.h
rename to include/mach/bcm283x/mbox.h
index 92cadba62c..908ba17dba 100644
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
+++ b/include/mach/bcm283x/mbox.h
@@ -11,7 +11,7 @@
#include <common.h>
-#include <mach/platform.h>
+#include <mach/bcm283x/platform.h>
/*
* The BCM2835 SoC contains (at least) two CPUs; the VideoCore (a/k/a "GPU")
diff --git a/arch/arm/mach-bcm283x/include/mach/platform.h b/include/mach/bcm283x/platform.h
similarity index 100%
rename from arch/arm/mach-bcm283x/include/mach/platform.h
rename to include/mach/bcm283x/platform.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 07/50] ARM: stm32mp: Move mach header files to include/mach/stm32mp
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (5 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 06/50] ARM: bcm283x: Move mach header files to include/mach/bcm283x Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 08/50] ARM: zynq: Move mach header files to include/mach/zynq Sascha Hauer
` (42 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all stm32mp specific header files to include/mach/stm32mp/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/lxa-mc1/board.c | 2 +-
arch/arm/boards/lxa-mc1/lowlevel.c | 2 +-
arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c | 2 +-
arch/arm/boards/protonic-stm32mp1/board.c | 2 +-
arch/arm/boards/protonic-stm32mp1/lowlevel.c | 2 +-
arch/arm/boards/seeed-odyssey/board.c | 2 +-
arch/arm/boards/seeed-odyssey/lowlevel.c | 2 +-
arch/arm/boards/stm32mp13xx-dk/lowlevel.c | 2 +-
arch/arm/boards/stm32mp15x-ev1/board.c | 2 +-
arch/arm/boards/stm32mp15x-ev1/lowlevel.c | 2 +-
arch/arm/boards/stm32mp15xx-dkx/board.c | 2 +-
arch/arm/boards/stm32mp15xx-dkx/lowlevel.c | 4 ++--
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-stm32mp/bbu.c | 2 +-
arch/arm/mach-stm32mp/bl33-generic.c | 2 +-
arch/arm/mach-stm32mp/ddrctrl.c | 8 ++++----
arch/arm/mach-stm32mp/init.c | 8 ++++----
drivers/nvmem/bsec.c | 2 +-
drivers/remoteproc/stm32_rproc.c | 2 +-
.../include/mach => include/mach/stm32mp}/bbu.h | 0
.../include/mach => include/mach/stm32mp}/bootsource.h | 0
.../include/mach => include/mach/stm32mp}/bsec.h | 2 +-
.../include/mach => include/mach/stm32mp}/ddr_regs.h | 0
.../include/mach => include/mach/stm32mp}/debug_ll.h | 2 +-
.../include/mach => include/mach/stm32mp}/entry.h | 0
.../include/mach => include/mach/stm32mp}/revision.h | 4 ++--
.../include/mach => include/mach/stm32mp}/smc.h | 0
.../include/mach => include/mach/stm32mp}/stm32.h | 0
28 files changed, 31 insertions(+), 29 deletions(-)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/bbu.h (100%)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/bootsource.h (100%)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/bsec.h (96%)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/ddr_regs.h (100%)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/debug_ll.h (94%)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/entry.h (100%)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/revision.h (97%)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/smc.h (100%)
rename {arch/arm/mach-stm32mp/include/mach => include/mach/stm32mp}/stm32.h (100%)
diff --git a/arch/arm/boards/lxa-mc1/board.c b/arch/arm/boards/lxa-mc1/board.c
index 3e8158c9b5..b377d4323e 100644
--- a/arch/arm/boards/lxa-mc1/board.c
+++ b/arch/arm/boards/lxa-mc1/board.c
@@ -3,7 +3,7 @@
#include <linux/sizes.h>
#include <init.h>
#include <asm/memory.h>
-#include <mach/bbu.h>
+#include <mach/stm32mp/bbu.h>
#include <bootsource.h>
#include <deep-probe.h>
#include <of.h>
diff --git a/arch/arm/boards/lxa-mc1/lowlevel.c b/arch/arm/boards/lxa-mc1/lowlevel.c
index 274f824a16..86211bf9d8 100644
--- a/arch/arm/boards/lxa-mc1/lowlevel.c
+++ b/arch/arm/boards/lxa-mc1/lowlevel.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
-#include <mach/entry.h>
+#include <mach/stm32mp/entry.h>
#include <debug_ll.h>
extern char __dtb_z_stm32mp157c_lxa_mc1_start[];
diff --git a/arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c b/arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c
index f76bad86a1..8174e060af 100644
--- a/arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c
+++ b/arch/arm/boards/phytec-phycore-stm32mp1/lowlevel.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
-#include <mach/entry.h>
+#include <mach/stm32mp/entry.h>
#include <debug_ll.h>
extern char __dtb_z_stm32mp157c_phycore_stm32mp1_3_start[];
diff --git a/arch/arm/boards/protonic-stm32mp1/board.c b/arch/arm/boards/protonic-stm32mp1/board.c
index e8bbbd1bb1..68297debab 100644
--- a/arch/arm/boards/protonic-stm32mp1/board.c
+++ b/arch/arm/boards/protonic-stm32mp1/board.c
@@ -5,7 +5,7 @@
#include <bootsource.h>
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/stm32mp/bbu.h>
#include <of_device.h>
#include <deep-probe.h>
diff --git a/arch/arm/boards/protonic-stm32mp1/lowlevel.c b/arch/arm/boards/protonic-stm32mp1/lowlevel.c
index 583f72dfe7..2fd7f8ba8b 100644
--- a/arch/arm/boards/protonic-stm32mp1/lowlevel.c
+++ b/arch/arm/boards/protonic-stm32mp1/lowlevel.c
@@ -3,7 +3,7 @@
#include <common.h>
#include <debug_ll.h>
-#include <mach/entry.h>
+#include <mach/stm32mp/entry.h>
extern char __dtb_z_stm32mp151_prtt1a_start[];
extern char __dtb_z_stm32mp151_prtt1c_start[];
diff --git a/arch/arm/boards/seeed-odyssey/board.c b/arch/arm/boards/seeed-odyssey/board.c
index beae8ec24c..af078e451e 100644
--- a/arch/arm/boards/seeed-odyssey/board.c
+++ b/arch/arm/boards/seeed-odyssey/board.c
@@ -3,7 +3,7 @@
#include <linux/sizes.h>
#include <init.h>
#include <asm/memory.h>
-#include <mach/bbu.h>
+#include <mach/stm32mp/bbu.h>
#include <bootsource.h>
#include <of.h>
diff --git a/arch/arm/boards/seeed-odyssey/lowlevel.c b/arch/arm/boards/seeed-odyssey/lowlevel.c
index 5ab1639dfe..a0e6173d49 100644
--- a/arch/arm/boards/seeed-odyssey/lowlevel.c
+++ b/arch/arm/boards/seeed-odyssey/lowlevel.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
-#include <mach/entry.h>
+#include <mach/stm32mp/entry.h>
#include <debug_ll.h>
extern char __dtb_z_stm32mp157c_odyssey_start[];
diff --git a/arch/arm/boards/stm32mp13xx-dk/lowlevel.c b/arch/arm/boards/stm32mp13xx-dk/lowlevel.c
index ac4fa40e19..4253dde9d6 100644
--- a/arch/arm/boards/stm32mp13xx-dk/lowlevel.c
+++ b/arch/arm/boards/stm32mp13xx-dk/lowlevel.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
-#include <mach/entry.h>
+#include <mach/stm32mp/entry.h>
#include <debug_ll.h>
extern char __dtb_z_stm32mp135f_dk_start[];
diff --git a/arch/arm/boards/stm32mp15x-ev1/board.c b/arch/arm/boards/stm32mp15x-ev1/board.c
index 76c148a752..99a2f911d8 100644
--- a/arch/arm/boards/stm32mp15x-ev1/board.c
+++ b/arch/arm/boards/stm32mp15x-ev1/board.c
@@ -3,7 +3,7 @@
#include <bootsource.h>
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/stm32mp/bbu.h>
static int ed1_probe(struct device *dev)
{
diff --git a/arch/arm/boards/stm32mp15x-ev1/lowlevel.c b/arch/arm/boards/stm32mp15x-ev1/lowlevel.c
index 06ff6291b8..13f16f8dcb 100644
--- a/arch/arm/boards/stm32mp15x-ev1/lowlevel.c
+++ b/arch/arm/boards/stm32mp15x-ev1/lowlevel.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
-#include <mach/entry.h>
+#include <mach/stm32mp/entry.h>
#include <debug_ll.h>
extern char __dtb_z_stm32mp157c_ev1_start[];
diff --git a/arch/arm/boards/stm32mp15xx-dkx/board.c b/arch/arm/boards/stm32mp15xx-dkx/board.c
index 56e7ac25de..b00781769b 100644
--- a/arch/arm/boards/stm32mp15xx-dkx/board.c
+++ b/arch/arm/boards/stm32mp15xx-dkx/board.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
#include <init.h>
-#include <mach/bbu.h>
+#include <mach/stm32mp/bbu.h>
static int dkx_probe(struct device *dev)
{
diff --git a/arch/arm/boards/stm32mp15xx-dkx/lowlevel.c b/arch/arm/boards/stm32mp15xx-dkx/lowlevel.c
index 65f4bbb4da..f52a3f4375 100644
--- a/arch/arm/boards/stm32mp15xx-dkx/lowlevel.c
+++ b/arch/arm/boards/stm32mp15xx-dkx/lowlevel.c
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0+
#include <common.h>
-#include <mach/entry.h>
+#include <mach/stm32mp/entry.h>
#include <debug_ll.h>
-#include <mach/revision.h>
+#include <mach/stm32mp/revision.h>
extern char __dtb_z_stm32mp157c_dk2_start[];
extern char __dtb_z_stm32mp157a_dk1_start[];
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 77a959c93b..e914894a7a 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -18,6 +18,8 @@
#include <mach/davinci/debug_ll.h>
#elif defined CONFIG_ARCH_BCM283X
#include <mach/bcm283x/debug_ll.h>
+#elif defined CONFIG_ARCH_STM32MP
+#include <mach/stm32mp/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-stm32mp/bbu.c b/arch/arm/mach-stm32mp/bbu.c
index 545965198f..56fd4941d0 100644
--- a/arch/arm/mach-stm32mp/bbu.c
+++ b/arch/arm/mach-stm32mp/bbu.c
@@ -11,7 +11,7 @@
#include <linux/sizes.h>
#include <linux/stat.h>
#include <ioctl.h>
-#include <mach/bbu.h>
+#include <mach/stm32mp/bbu.h>
#include <libfile.h>
#include <linux/bitfield.h>
diff --git a/arch/arm/mach-stm32mp/bl33-generic.c b/arch/arm/mach-stm32mp/bl33-generic.c
index 6f779b19cf..dda0135a07 100644
--- a/arch/arm/mach-stm32mp/bl33-generic.c
+++ b/arch/arm/mach-stm32mp/bl33-generic.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
-#include <mach/entry.h>
+#include <mach/stm32mp/entry.h>
#include <debug_ll.h>
/*
diff --git a/arch/arm/mach-stm32mp/ddrctrl.c b/arch/arm/mach-stm32mp/ddrctrl.c
index ffda1ba61f..ad3d970e9c 100644
--- a/arch/arm/mach-stm32mp/ddrctrl.c
+++ b/arch/arm/mach-stm32mp/ddrctrl.c
@@ -5,10 +5,10 @@
#include <common.h>
#include <init.h>
-#include <mach/ddr_regs.h>
-#include <mach/entry.h>
-#include <mach/stm32.h>
-#include <mach/revision.h>
+#include <mach/stm32mp/ddr_regs.h>
+#include <mach/stm32mp/entry.h>
+#include <mach/stm32mp/stm32.h>
+#include <mach/stm32mp/revision.h>
#include <asm/barebox-arm.h>
#include <asm/memory.h>
#include <pbl.h>
diff --git a/arch/arm/mach-stm32mp/init.c b/arch/arm/mach-stm32mp/init.c
index 938dea3c3d..d46762e0b7 100644
--- a/arch/arm/mach-stm32mp/init.c
+++ b/arch/arm/mach-stm32mp/init.c
@@ -8,10 +8,10 @@
#include <common.h>
#include <init.h>
-#include <mach/stm32.h>
-#include <mach/bsec.h>
-#include <mach/revision.h>
-#include <mach/bootsource.h>
+#include <mach/stm32mp/stm32.h>
+#include <mach/stm32mp/bsec.h>
+#include <mach/stm32mp/revision.h>
+#include <mach/stm32mp/bootsource.h>
#include <bootsource.h>
#include <dt-bindings/pinctrl/stm32-pinfunc.h>
diff --git a/drivers/nvmem/bsec.c b/drivers/nvmem/bsec.c
index dfb6ad8bc9..31d9750194 100644
--- a/drivers/nvmem/bsec.c
+++ b/drivers/nvmem/bsec.c
@@ -14,7 +14,7 @@
#include <io.h>
#include <of.h>
#include <regmap.h>
-#include <mach/bsec.h>
+#include <mach/stm32mp/bsec.h>
#include <machine_id.h>
#include <linux/nvmem-provider.h>
diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
index afd78026f5..d81bcabace 100644
--- a/drivers/remoteproc/stm32_rproc.c
+++ b/drivers/remoteproc/stm32_rproc.c
@@ -10,7 +10,7 @@
#include <driver.h>
#include <init.h>
#include <io.h>
-#include <mach/smc.h>
+#include <mach/stm32mp/smc.h>
#include <mfd/syscon.h>
#include <of_address.h>
#include <regmap.h>
diff --git a/arch/arm/mach-stm32mp/include/mach/bbu.h b/include/mach/stm32mp/bbu.h
similarity index 100%
rename from arch/arm/mach-stm32mp/include/mach/bbu.h
rename to include/mach/stm32mp/bbu.h
diff --git a/arch/arm/mach-stm32mp/include/mach/bootsource.h b/include/mach/stm32mp/bootsource.h
similarity index 100%
rename from arch/arm/mach-stm32mp/include/mach/bootsource.h
rename to include/mach/stm32mp/bootsource.h
diff --git a/arch/arm/mach-stm32mp/include/mach/bsec.h b/include/mach/stm32mp/bsec.h
similarity index 96%
rename from arch/arm/mach-stm32mp/include/mach/bsec.h
rename to include/mach/stm32mp/bsec.h
index 7206a02099..45eb0a3f45 100644
--- a/arch/arm/mach-stm32mp/include/mach/bsec.h
+++ b/include/mach/stm32mp/bsec.h
@@ -3,7 +3,7 @@
#ifndef __MACH_STM32_BSEC_H__
#define __MACH_STM32_BSEC_H__
-#include <mach/smc.h>
+#include <mach/stm32mp/smc.h>
/* Return status */
enum bsec_smc {
diff --git a/arch/arm/mach-stm32mp/include/mach/ddr_regs.h b/include/mach/stm32mp/ddr_regs.h
similarity index 100%
rename from arch/arm/mach-stm32mp/include/mach/ddr_regs.h
rename to include/mach/stm32mp/ddr_regs.h
diff --git a/arch/arm/mach-stm32mp/include/mach/debug_ll.h b/include/mach/stm32mp/debug_ll.h
similarity index 94%
rename from arch/arm/mach-stm32mp/include/mach/debug_ll.h
rename to include/mach/stm32mp/debug_ll.h
index 22c5c12633..03bb60a239 100644
--- a/arch/arm/mach-stm32mp/include/mach/debug_ll.h
+++ b/include/mach/stm32mp/debug_ll.h
@@ -4,7 +4,7 @@
#define __MACH_STM32MP1_DEBUG_LL_H
#include <io.h>
-#include <mach/stm32.h>
+#include <mach/stm32mp/stm32.h>
#define DEBUG_LL_UART_ADDR STM32_UART4_BASE
diff --git a/arch/arm/mach-stm32mp/include/mach/entry.h b/include/mach/stm32mp/entry.h
similarity index 100%
rename from arch/arm/mach-stm32mp/include/mach/entry.h
rename to include/mach/stm32mp/entry.h
diff --git a/arch/arm/mach-stm32mp/include/mach/revision.h b/include/mach/stm32mp/revision.h
similarity index 97%
rename from arch/arm/mach-stm32mp/include/mach/revision.h
rename to include/mach/stm32mp/revision.h
index c141b925a1..63bdcb3a4d 100644
--- a/arch/arm/mach-stm32mp/include/mach/revision.h
+++ b/include/mach/stm32mp/revision.h
@@ -6,9 +6,9 @@
#ifndef __MACH_CPUTYPE_H__
#define __MACH_CPUTYPE_H__
-#include <mach/bsec.h>
+#include <mach/stm32mp/bsec.h>
#include <asm/io.h>
-#include <mach/stm32.h>
+#include <mach/stm32mp/stm32.h>
/* ID = Device Version (bit31:16) + Device Part Number (RPN) (bit7:0)
* 157X: 2x Cortex-A7, Cortex-M4, CAN FD, GPU, DSI
diff --git a/arch/arm/mach-stm32mp/include/mach/smc.h b/include/mach/stm32mp/smc.h
similarity index 100%
rename from arch/arm/mach-stm32mp/include/mach/smc.h
rename to include/mach/stm32mp/smc.h
diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/include/mach/stm32mp/stm32.h
similarity index 100%
rename from arch/arm/mach-stm32mp/include/mach/stm32.h
rename to include/mach/stm32mp/stm32.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 08/50] ARM: zynq: Move mach header files to include/mach/zynq
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (6 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 07/50] ARM: stm32mp: Move mach header files to include/mach/stm32mp Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 09/50] ARM: vexpress: Move mach header files to include/mach/vexpress Sascha Hauer
` (41 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all zynq specific header files to include/mach/zynq/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/avnet-zedboard/board.c | 2 +-
arch/arm/boards/avnet-zedboard/lowlevel.c | 4 ++--
arch/arm/boards/avnet-zedboard/zedboard.zynqcfg | 4 ++--
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-zynq/cpu_init.c | 2 +-
arch/arm/mach-zynq/zynq.c | 2 +-
drivers/clk/zynq/clkc.c | 2 +-
images/Makefile.zynq | 2 +-
.../mach-zynq/include/mach => include/mach/zynq}/debug_ll.h | 2 +-
{arch/arm/mach-zynq/include/mach => include/mach/zynq}/init.h | 0
| 0
| 0
.../include/mach => include/mach/zynq}/zynq7000-regs.h | 0
scripts/Makefile | 2 +-
scripts/zynq_mkimage.c | 2 +-
15 files changed, 14 insertions(+), 12 deletions(-)
rename {arch/arm/mach-zynq/include/mach => include/mach/zynq}/debug_ll.h (95%)
rename {arch/arm/mach-zynq/include/mach => include/mach/zynq}/init.h (100%)
rename {arch/arm/mach-zynq/include/mach => include/mach/zynq}/zynq-flash-header.h (100%)
rename {arch/arm/mach-zynq/include/mach => include/mach/zynq}/zynq7000-header-regs.h (100%)
rename {arch/arm/mach-zynq/include/mach => include/mach/zynq}/zynq7000-regs.h (100%)
diff --git a/arch/arm/boards/avnet-zedboard/board.c b/arch/arm/boards/avnet-zedboard/board.c
index b8396d1996..2a6b1ab701 100644
--- a/arch/arm/boards/avnet-zedboard/board.c
+++ b/arch/arm/boards/avnet-zedboard/board.c
@@ -6,7 +6,7 @@
#include <environment.h>
#include <generated/mach-types.h>
#include <init.h>
-#include <mach/zynq7000-regs.h>
+#include <mach/zynq/zynq7000-regs.h>
#include <linux/sizes.h>
diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c
index 87ce79863d..6e5a17d7ef 100644
--- a/arch/arm/boards/avnet-zedboard/lowlevel.c
+++ b/arch/arm/boards/avnet-zedboard/lowlevel.c
@@ -5,8 +5,8 @@
#include <io.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
-#include <mach/init.h>
-#include <mach/zynq7000-regs.h>
+#include <mach/zynq/init.h>
+#include <mach/zynq/zynq7000-regs.h>
#include <serial/cadence.h>
#define DCI_DONE (1 << 13)
diff --git a/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg b/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
index 3f8808d3d7..c6a96aec7b 100644
--- a/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
+++ b/arch/arm/boards/avnet-zedboard/zedboard.zynqcfg
@@ -1,4 +1,4 @@
-#include <mach/zynq7000-header-regs.h>
+#include <zynq/zynq7000-header-regs.h>
wm 32 ZYNQ_SLCR_UNLOCK 0x0000DF0D
wm 32 ZYNQ_CLK_621_TRUE 0x00000001
@@ -21,4 +21,4 @@ wm 32 ZYNQ_IO_PLL_CTRL 0x0001E000
wm 32 ZYNQ_SDIO_CLK_CTRL 0x00000a03
/* stop */
-wm 32 0xFFFFFFFF 0x00000000
\ No newline at end of file
+wm 32 0xFFFFFFFF 0x00000000
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index e914894a7a..caf13e52f2 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -20,6 +20,8 @@
#include <mach/bcm283x/debug_ll.h>
#elif defined CONFIG_ARCH_STM32MP
#include <mach/stm32mp/debug_ll.h>
+#elif defined CONFIG_ARCH_ZYNQ
+#include <mach/zynq/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-zynq/cpu_init.c b/arch/arm/mach-zynq/cpu_init.c
index ca7c4b2979..7194c7e216 100644
--- a/arch/arm/mach-zynq/cpu_init.c
+++ b/arch/arm/mach-zynq/cpu_init.c
@@ -3,7 +3,7 @@
#include <common.h>
#include <asm/barebox-arm-head.h>
#include <asm/errata.h>
-#include <mach/init.h>
+#include <mach/zynq/init.h>
void zynq_cpu_lowlevel_init(void)
{
diff --git a/arch/arm/mach-zynq/zynq.c b/arch/arm/mach-zynq/zynq.c
index 5abd52f6a2..2d76a68a5e 100644
--- a/arch/arm/mach-zynq/zynq.c
+++ b/arch/arm/mach-zynq/zynq.c
@@ -18,7 +18,7 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/zynq7000-regs.h>
+#include <mach/zynq/zynq7000-regs.h>
#include <restart.h>
static void __noreturn zynq_restart_soc(struct restart_handler *rst)
diff --git a/drivers/clk/zynq/clkc.c b/drivers/clk/zynq/clkc.c
index 53b4592c7f..8e4beda295 100644
--- a/drivers/clk/zynq/clkc.c
+++ b/drivers/clk/zynq/clkc.c
@@ -15,7 +15,7 @@
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/zynq7000-regs.h>
+#include <mach/zynq/zynq7000-regs.h>
#include <malloc.h>
enum zynq_clk {
diff --git a/images/Makefile.zynq b/images/Makefile.zynq
index 3e61ad6eb6..ac9ce8157b 100644
--- a/images/Makefile.zynq
+++ b/images/Makefile.zynq
@@ -4,7 +4,7 @@
#
zynqcfg_cpp_flags = -Wp,-MD,$(depfile) -nostdinc -x assembler-with-cpp \
- -I $(srctree)/arch/arm/mach-zynq/include
+ -I $(srctree)/include/mach
zynqcfg-tmp = $(subst $(comma),_,$(dot-target).zynqcfg.tmp)
diff --git a/arch/arm/mach-zynq/include/mach/debug_ll.h b/include/mach/zynq/debug_ll.h
similarity index 95%
rename from arch/arm/mach-zynq/include/mach/debug_ll.h
rename to include/mach/zynq/debug_ll.h
index 1f626cd413..e360fee15e 100644
--- a/arch/arm/mach-zynq/include/mach/debug_ll.h
+++ b/include/mach/zynq/debug_ll.h
@@ -8,7 +8,7 @@
#define __MACH_DEBUG_LL_H__
#include <io.h>
-#include <mach/zynq7000-regs.h>
+#include <mach/zynq/zynq7000-regs.h>
#ifndef CONFIG_ZYNQ_DEBUG_LL_UART_BASE
#warning define ZYNQ_DEBUG_LL_UART_BASE properly for debug_ll
diff --git a/arch/arm/mach-zynq/include/mach/init.h b/include/mach/zynq/init.h
similarity index 100%
rename from arch/arm/mach-zynq/include/mach/init.h
rename to include/mach/zynq/init.h
diff --git a/arch/arm/mach-zynq/include/mach/zynq-flash-header.h b/include/mach/zynq/zynq-flash-header.h
similarity index 100%
rename from arch/arm/mach-zynq/include/mach/zynq-flash-header.h
rename to include/mach/zynq/zynq-flash-header.h
diff --git a/arch/arm/mach-zynq/include/mach/zynq7000-header-regs.h b/include/mach/zynq/zynq7000-header-regs.h
similarity index 100%
rename from arch/arm/mach-zynq/include/mach/zynq7000-header-regs.h
rename to include/mach/zynq/zynq7000-header-regs.h
diff --git a/arch/arm/mach-zynq/include/mach/zynq7000-regs.h b/include/mach/zynq/zynq7000-regs.h
similarity index 100%
rename from arch/arm/mach-zynq/include/mach/zynq7000-regs.h
rename to include/mach/zynq/zynq7000-regs.h
diff --git a/scripts/Makefile b/scripts/Makefile
index ac88ebb240..72ad9ad7a6 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -20,7 +20,7 @@ hostprogs-always-$(CONFIG_MIPS) += mips-relocs
hostprogs-always-$(CONFIG_MVEBU_HOSTTOOLS) += kwbimage kwboot mvebuimg
hostprogs-always-$(CONFIG_OMAP_IMAGE) += omap_signGP mk-omap-image
hostprogs-always-$(CONFIG_DAVINCI_IMAGE) += mkublheader
-HOSTCFLAGS_zynq_mkimage.o = -I$(srctree) -I$(srctree)/arch/arm/mach-zynq/include
+HOSTCFLAGS_zynq_mkimage.o = -I$(srctree) -I$(srctree)/include/mach
hostprogs-always-$(CONFIG_ZYNQ_MKIMAGE) += zynq_mkimage
hostprogs-always-$(CONFIG_SOCFPGA_MKIMAGE) += socfpga_mkimage
hostprogs-always-$(CONFIG_MXS_HOSTTOOLS) += mxsimage mxsboot
diff --git a/scripts/zynq_mkimage.c b/scripts/zynq_mkimage.c
index b611d5c69b..9c1e23ef00 100644
--- a/scripts/zynq_mkimage.c
+++ b/scripts/zynq_mkimage.c
@@ -5,7 +5,7 @@
#include <errno.h>
#include <getopt.h>
#include <linux/kernel.h>
-#include <mach/zynq-flash-header.h>
+#include <zynq/zynq-flash-header.h>
#include <malloc.h>
#include <stdint.h>
#include <stdio.h>
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 09/50] ARM: vexpress: Move mach header files to include/mach/vexpress
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (7 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 08/50] ARM: zynq: Move mach header files to include/mach/zynq Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 10/50] ARM: versatile: Move mach header files to include/mach/versatile Sascha Hauer
` (40 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all vexpress specific header files to include/mach/vexpress/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/vexpress/init.c | 2 +-
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-vexpress/reset.c | 2 +-
arch/arm/mach-vexpress/v2m.c | 2 +-
.../include/mach => include/mach/vexpress}/debug_ll.h | 0
.../include/mach => include/mach/vexpress}/devices.h | 0
6 files changed, 5 insertions(+), 3 deletions(-)
rename {arch/arm/mach-vexpress/include/mach => include/mach/vexpress}/debug_ll.h (100%)
rename {arch/arm/mach-vexpress/include/mach => include/mach/vexpress}/devices.h (100%)
diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c
index a60556d67b..d2f82c1d19 100644
--- a/arch/arm/boards/vexpress/init.c
+++ b/arch/arm/boards/vexpress/init.c
@@ -9,7 +9,7 @@
#include <asm/armlinux.h>
#include <asm/system_info.h>
#include <generated/mach-types.h>
-#include <mach/devices.h>
+#include <mach/vexpress/devices.h>
#include <environment.h>
#include <linux/sizes.h>
#include <io.h>
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index caf13e52f2..1a31083cbe 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -22,6 +22,8 @@
#include <mach/stm32mp/debug_ll.h>
#elif defined CONFIG_ARCH_ZYNQ
#include <mach/zynq/debug_ll.h>
+#elif defined CONFIG_ARCH_VEXPRESS
+#include <mach/vexpress/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-vexpress/reset.c b/arch/arm/mach-vexpress/reset.c
index 01cd01e6df..f0fa75330e 100644
--- a/arch/arm/mach-vexpress/reset.c
+++ b/arch/arm/mach-vexpress/reset.c
@@ -10,7 +10,7 @@
#include <restart.h>
#include <linux/amba/sp805.h>
-#include <mach/devices.h>
+#include <mach/vexpress/devices.h>
void __iomem *v2m_wdt_base;
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index c60e9dbd75..9181d7e2ef 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -7,7 +7,7 @@
#include <common.h>
#include <io.h>
#include <asm/hardware/sp810.h>
-#include <mach/devices.h>
+#include <mach/vexpress/devices.h>
void __iomem *v2m_sysreg_base;
diff --git a/arch/arm/mach-vexpress/include/mach/debug_ll.h b/include/mach/vexpress/debug_ll.h
similarity index 100%
rename from arch/arm/mach-vexpress/include/mach/debug_ll.h
rename to include/mach/vexpress/debug_ll.h
diff --git a/arch/arm/mach-vexpress/include/mach/devices.h b/include/mach/vexpress/devices.h
similarity index 100%
rename from arch/arm/mach-vexpress/include/mach/devices.h
rename to include/mach/vexpress/devices.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 10/50] ARM: versatile: Move mach header files to include/mach/versatile
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (8 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 09/50] ARM: vexpress: Move mach header files to include/mach/vexpress Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 11/50] ARM: layerscape: Move mach header files to include/mach/layerscape Sascha Hauer
` (39 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all versatile specific header files to include/mach/versatile/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/versatile/versatilepb.c | 4 ++--
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-versatile/core.c | 4 ++--
.../include/mach => include/mach/versatile}/debug_ll.h | 0
.../include/mach => include/mach/versatile}/init.h | 0
.../include/mach => include/mach/versatile}/platform.h | 0
6 files changed, 6 insertions(+), 4 deletions(-)
rename {arch/arm/mach-versatile/include/mach => include/mach/versatile}/debug_ll.h (100%)
rename {arch/arm/mach-versatile/include/mach => include/mach/versatile}/init.h (100%)
rename {arch/arm/mach-versatile/include/mach => include/mach/versatile}/platform.h (100%)
diff --git a/arch/arm/boards/versatile/versatilepb.c b/arch/arm/boards/versatile/versatilepb.c
index 9a9ef0e095..923dbd2564 100644
--- a/arch/arm/boards/versatile/versatilepb.c
+++ b/arch/arm/boards/versatile/versatilepb.c
@@ -14,8 +14,8 @@
#include <asm/armlinux.h>
#include <asm/system_info.h>
#include <generated/mach-types.h>
-#include <mach/init.h>
-#include <mach/platform.h>
+#include <mach/versatile/init.h>
+#include <mach/versatile/platform.h>
#include <environment.h>
#include <linux/sizes.h>
#include <platform_data/eth-smc91111.h>
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 1a31083cbe..ca075ae411 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -24,6 +24,8 @@
#include <mach/zynq/debug_ll.h>
#elif defined CONFIG_ARCH_VEXPRESS
#include <mach/vexpress/debug_ll.h>
+#elif defined CONFIG_ARCH_VERSATILE
+#include <mach/versatile/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 9a81b5b6f3..1e1ee92c2d 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -38,8 +38,8 @@
#include <asm/hardware/arm_timer.h>
#include <asm/armlinux.h>
-#include <mach/platform.h>
-#include <mach/init.h>
+#include <mach/versatile/platform.h>
+#include <mach/versatile/init.h>
struct clk {
unsigned long rate;
diff --git a/arch/arm/mach-versatile/include/mach/debug_ll.h b/include/mach/versatile/debug_ll.h
similarity index 100%
rename from arch/arm/mach-versatile/include/mach/debug_ll.h
rename to include/mach/versatile/debug_ll.h
diff --git a/arch/arm/mach-versatile/include/mach/init.h b/include/mach/versatile/init.h
similarity index 100%
rename from arch/arm/mach-versatile/include/mach/init.h
rename to include/mach/versatile/init.h
diff --git a/arch/arm/mach-versatile/include/mach/platform.h b/include/mach/versatile/platform.h
similarity index 100%
rename from arch/arm/mach-versatile/include/mach/platform.h
rename to include/mach/versatile/platform.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 11/50] ARM: layerscape: Move mach header files to include/mach/layerscape
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (9 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 10/50] ARM: versatile: Move mach header files to include/mach/versatile Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 12/50] ARM: tegra: Move mach header files to include/mach/tegra Sascha Hauer
` (38 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all layerscape specific header files to include/mach/layerscape/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ls1046ardb/board.c | 4 ++--
arch/arm/boards/ls1046ardb/lowlevel.c | 8 ++++----
arch/arm/boards/tqmls1046a/board.c | 4 ++--
arch/arm/boards/tqmls1046a/lowlevel.c | 8 ++++----
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-layerscape/boot.c | 2 +-
arch/arm/mach-layerscape/errata.c | 4 ++--
arch/arm/mach-layerscape/lowlevel-ls1046a.c | 4 ++--
arch/arm/mach-layerscape/ppa.c | 2 +-
arch/arm/mach-layerscape/xload-qspi.c | 4 ++--
arch/arm/mach-layerscape/xload.c | 4 ++--
.../include/mach => include/mach/layerscape}/bbu.h | 0
.../include/mach => include/mach/layerscape}/debug_ll.h | 0
.../include/mach => include/mach/layerscape}/errata.h | 0
.../include/mach => include/mach/layerscape}/layerscape.h | 0
.../include/mach => include/mach/layerscape}/lowlevel.h | 0
.../include/mach => include/mach/layerscape}/xload.h | 0
17 files changed, 24 insertions(+), 22 deletions(-)
rename {arch/arm/mach-layerscape/include/mach => include/mach/layerscape}/bbu.h (100%)
rename {arch/arm/mach-layerscape/include/mach => include/mach/layerscape}/debug_ll.h (100%)
rename {arch/arm/mach-layerscape/include/mach => include/mach/layerscape}/errata.h (100%)
rename {arch/arm/mach-layerscape/include/mach => include/mach/layerscape}/layerscape.h (100%)
rename {arch/arm/mach-layerscape/include/mach => include/mach/layerscape}/lowlevel.h (100%)
rename {arch/arm/mach-layerscape/include/mach => include/mach/layerscape}/xload.h (100%)
diff --git a/arch/arm/boards/ls1046ardb/board.c b/arch/arm/boards/ls1046ardb/board.c
index 5e42209c8b..921629d2a8 100644
--- a/arch/arm/boards/ls1046ardb/board.c
+++ b/arch/arm/boards/ls1046ardb/board.c
@@ -13,8 +13,8 @@
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <asm/system.h>
-#include <mach/layerscape.h>
-#include <mach/bbu.h>
+#include <mach/layerscape/layerscape.h>
+#include <mach/layerscape/bbu.h>
#include <of_address.h>
#include <linux/fsl_ifc.h>
diff --git a/arch/arm/boards/ls1046ardb/lowlevel.c b/arch/arm/boards/ls1046ardb/lowlevel.c
index 9eae032377..dc937c1f88 100644
--- a/arch/arm/boards/ls1046ardb/lowlevel.c
+++ b/arch/arm/boards/ls1046ardb/lowlevel.c
@@ -12,10 +12,10 @@
#include <asm/barebox-arm.h>
#include <asm/syscounter.h>
#include <asm/cache.h>
-#include <mach/errata.h>
-#include <mach/lowlevel.h>
-#include <mach/xload.h>
-#include <mach/layerscape.h>
+#include <mach/layerscape/errata.h>
+#include <mach/layerscape/lowlevel.h>
+#include <mach/layerscape/xload.h>
+#include <mach/layerscape/layerscape.h>
struct board_specific_parameters {
u32 n_ranks;
diff --git a/arch/arm/boards/tqmls1046a/board.c b/arch/arm/boards/tqmls1046a/board.c
index 028be890e0..25a4c7b754 100644
--- a/arch/arm/boards/tqmls1046a/board.c
+++ b/arch/arm/boards/tqmls1046a/board.c
@@ -10,8 +10,8 @@
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <soc/fsl/immap_lsch2.h>
-#include <mach/bbu.h>
-#include <mach/layerscape.h>
+#include <mach/layerscape/bbu.h>
+#include <mach/layerscape/layerscape.h>
static int tqmls1046a_mem_init(void)
{
diff --git a/arch/arm/boards/tqmls1046a/lowlevel.c b/arch/arm/boards/tqmls1046a/lowlevel.c
index 99dcf1eff7..91e08c0b74 100644
--- a/arch/arm/boards/tqmls1046a/lowlevel.c
+++ b/arch/arm/boards/tqmls1046a/lowlevel.c
@@ -9,10 +9,10 @@
#include <asm/barebox-arm.h>
#include <asm/syscounter.h>
#include <asm/cache.h>
-#include <mach/errata.h>
-#include <mach/lowlevel.h>
-#include <mach/xload.h>
-#include <mach/layerscape.h>
+#include <mach/layerscape/errata.h>
+#include <mach/layerscape/lowlevel.h>
+#include <mach/layerscape/xload.h>
+#include <mach/layerscape/layerscape.h>
static struct fsl_ddr_controller ddrc[] = {
{
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index ca075ae411..4ba0d932f6 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -26,6 +26,8 @@
#include <mach/vexpress/debug_ll.h>
#elif defined CONFIG_ARCH_VERSATILE
#include <mach/versatile/debug_ll.h>
+#elif defined CONFIG_ARCH_LAYERSCAPE
+#include <mach/layerscape/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-layerscape/boot.c b/arch/arm/mach-layerscape/boot.c
index c6f816444a..4746d0476d 100644
--- a/arch/arm/mach-layerscape/boot.c
+++ b/arch/arm/mach-layerscape/boot.c
@@ -3,7 +3,7 @@
#include <common.h>
#include <init.h>
#include <bootsource.h>
-#include <mach/layerscape.h>
+#include <mach/layerscape/layerscape.h>
#include <soc/fsl/immap_lsch2.h>
enum bootsource ls1046_bootsource_get(void)
diff --git a/arch/arm/mach-layerscape/errata.c b/arch/arm/mach-layerscape/errata.c
index 4f4b759ddb..3a329959fe 100644
--- a/arch/arm/mach-layerscape/errata.c
+++ b/arch/arm/mach-layerscape/errata.c
@@ -4,8 +4,8 @@
#include <soc/fsl/immap_lsch2.h>
#include <soc/fsl/fsl_ddr_sdram.h>
#include <asm/system.h>
-#include <mach/errata.h>
-#include <mach/lowlevel.h>
+#include <mach/layerscape/errata.h>
+#include <mach/layerscape/lowlevel.h>
#define scfg_clrsetbits32(addr, clear, set) clrsetbits_be32(addr, clear, set)
#define scfg_clrbits32(addr, clear) clrbits_be32(addr, clear)
diff --git a/arch/arm/mach-layerscape/lowlevel-ls1046a.c b/arch/arm/mach-layerscape/lowlevel-ls1046a.c
index 32f825ec25..b2aa839f55 100644
--- a/arch/arm/mach-layerscape/lowlevel-ls1046a.c
+++ b/arch/arm/mach-layerscape/lowlevel-ls1046a.c
@@ -3,8 +3,8 @@
#include <io.h>
#include <asm/syscounter.h>
#include <asm/system.h>
-#include <mach/errata.h>
-#include <mach/lowlevel.h>
+#include <mach/layerscape/errata.h>
+#include <mach/layerscape/lowlevel.h>
#include <soc/fsl/immap_lsch2.h>
#include <soc/fsl/fsl_immap.h>
diff --git a/arch/arm/mach-layerscape/ppa.c b/arch/arm/mach-layerscape/ppa.c
index 144d052475..3fa73d555f 100644
--- a/arch/arm/mach-layerscape/ppa.c
+++ b/arch/arm/mach-layerscape/ppa.c
@@ -13,7 +13,7 @@
#include <asm/system.h>
#include <image-fit.h>
#include <asm/psci.h>
-#include <mach/layerscape.h>
+#include <mach/layerscape/layerscape.h>
#include <asm/cache.h>
int ppa_entry(const void *, u32 *, u32 *);
diff --git a/arch/arm/mach-layerscape/xload-qspi.c b/arch/arm/mach-layerscape/xload-qspi.c
index 192aea64b4..19ee5c14dc 100644
--- a/arch/arm/mach-layerscape/xload-qspi.c
+++ b/arch/arm/mach-layerscape/xload-qspi.c
@@ -4,8 +4,8 @@
#include <soc/fsl/immap_lsch2.h>
#include <asm-generic/sections.h>
#include <asm/cache.h>
-#include <mach/xload.h>
-#include <mach/layerscape.h>
+#include <mach/layerscape/xload.h>
+#include <mach/layerscape/layerscape.h>
/*
* The offset of the 2nd stage image in the output file. This must match with the
diff --git a/arch/arm/mach-layerscape/xload.c b/arch/arm/mach-layerscape/xload.c
index 54495d7f97..6496a1b4cd 100644
--- a/arch/arm/mach-layerscape/xload.c
+++ b/arch/arm/mach-layerscape/xload.c
@@ -2,8 +2,8 @@
#include <common.h>
#include <bootsource.h>
-#include <mach/layerscape.h>
-#include <mach/xload.h>
+#include <mach/layerscape/layerscape.h>
+#include <mach/layerscape/xload.h>
int ls1046a_xload_start_image(unsigned long r0, unsigned long r1,
unsigned long r2)
diff --git a/arch/arm/mach-layerscape/include/mach/bbu.h b/include/mach/layerscape/bbu.h
similarity index 100%
rename from arch/arm/mach-layerscape/include/mach/bbu.h
rename to include/mach/layerscape/bbu.h
diff --git a/arch/arm/mach-layerscape/include/mach/debug_ll.h b/include/mach/layerscape/debug_ll.h
similarity index 100%
rename from arch/arm/mach-layerscape/include/mach/debug_ll.h
rename to include/mach/layerscape/debug_ll.h
diff --git a/arch/arm/mach-layerscape/include/mach/errata.h b/include/mach/layerscape/errata.h
similarity index 100%
rename from arch/arm/mach-layerscape/include/mach/errata.h
rename to include/mach/layerscape/errata.h
diff --git a/arch/arm/mach-layerscape/include/mach/layerscape.h b/include/mach/layerscape/layerscape.h
similarity index 100%
rename from arch/arm/mach-layerscape/include/mach/layerscape.h
rename to include/mach/layerscape/layerscape.h
diff --git a/arch/arm/mach-layerscape/include/mach/lowlevel.h b/include/mach/layerscape/lowlevel.h
similarity index 100%
rename from arch/arm/mach-layerscape/include/mach/lowlevel.h
rename to include/mach/layerscape/lowlevel.h
diff --git a/arch/arm/mach-layerscape/include/mach/xload.h b/include/mach/layerscape/xload.h
similarity index 100%
rename from arch/arm/mach-layerscape/include/mach/xload.h
rename to include/mach/layerscape/xload.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 12/50] ARM: tegra: Move mach header files to include/mach/tegra
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (10 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 11/50] ARM: layerscape: Move mach header files to include/mach/layerscape Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 13/50] ARM: uemd: Move mach header files to include/mach/uemd Sascha Hauer
` (37 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all tegra specific header files to include/mach/tegra/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/nvidia-beaver/board.c | 2 +-
arch/arm/boards/nvidia-beaver/entry.c | 4 ++--
arch/arm/boards/nvidia-jetson-tk1/board.c | 2 +-
arch/arm/boards/nvidia-jetson-tk1/entry.c | 4 ++--
arch/arm/boards/toradex-colibri-t20/entry.c | 2 +-
arch/arm/boards/toshiba-ac100/board.c | 2 +-
arch/arm/boards/toshiba-ac100/entry.c | 2 +-
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-tegra/tegra-bbu.c | 2 +-
arch/arm/mach-tegra/tegra20-pmc.c | 6 +++---
arch/arm/mach-tegra/tegra20-timer.c | 2 +-
arch/arm/mach-tegra/tegra20.c | 6 +++---
arch/arm/mach-tegra/tegra_avp_init.c | 12 ++++++------
arch/arm/mach-tegra/tegra_maincomplex_init.c | 6 +++---
drivers/clk/tegra/clk-pll.c | 2 +-
drivers/clk/tegra/clk-tegra124.c | 6 +++---
drivers/clk/tegra/clk-tegra20.c | 4 ++--
drivers/clk/tegra/clk-tegra30.c | 6 +++---
drivers/clk/tegra/clk.c | 2 +-
drivers/pci/pci-tegra.c | 2 +-
.../include/mach => include/mach/tegra}/debug_ll.h | 2 +-
.../include/mach => include/mach/tegra}/iomap.h | 0
.../mach => include/mach/tegra}/lowlevel-dvc.h | 4 ++--
.../include/mach => include/mach/tegra}/lowlevel.h | 2 +-
.../include/mach => include/mach/tegra}/tegra-bbu.h | 0
.../mach => include/mach/tegra}/tegra-powergate.h | 0
.../mach => include/mach/tegra}/tegra114-sysctr.h | 0
.../mach => include/mach/tegra}/tegra124-car.h | 0
.../mach => include/mach/tegra}/tegra20-car.h | 0
.../mach => include/mach/tegra}/tegra20-pmc.h | 0
.../mach => include/mach/tegra}/tegra30-car.h | 0
.../mach => include/mach/tegra}/tegra30-flow.h | 0
32 files changed, 43 insertions(+), 41 deletions(-)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/debug_ll.h (97%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/iomap.h (100%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/lowlevel-dvc.h (98%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/lowlevel.h (99%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/tegra-bbu.h (100%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/tegra-powergate.h (100%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/tegra114-sysctr.h (100%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/tegra124-car.h (100%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/tegra20-car.h (100%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/tegra20-pmc.h (100%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/tegra30-car.h (100%)
rename {arch/arm/mach-tegra/include/mach => include/mach/tegra}/tegra30-flow.h (100%)
diff --git a/arch/arm/boards/nvidia-beaver/board.c b/arch/arm/boards/nvidia-beaver/board.c
index 0ef37780b4..2537e75337 100644
--- a/arch/arm/boards/nvidia-beaver/board.c
+++ b/arch/arm/boards/nvidia-beaver/board.c
@@ -6,7 +6,7 @@
#include <gpio.h>
#include <i2c/i2c.h>
#include <init.h>
-#include <mach/tegra-bbu.h>
+#include <mach/tegra/tegra-bbu.h>
static int nvidia_beaver_fs_init(void)
{
diff --git a/arch/arm/boards/nvidia-beaver/entry.c b/arch/arm/boards/nvidia-beaver/entry.c
index a89d419797..c79057cd9d 100644
--- a/arch/arm/boards/nvidia-beaver/entry.c
+++ b/arch/arm/boards/nvidia-beaver/entry.c
@@ -2,8 +2,8 @@
// SPDX-FileCopyrightText: 2014 Lucas Stach <l.stach@pengutronix.de>
#include <common.h>
-#include <mach/lowlevel.h>
-#include <mach/lowlevel-dvc.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/lowlevel-dvc.h>
extern char __dtb_tegra30_beaver_start[];
diff --git a/arch/arm/boards/nvidia-jetson-tk1/board.c b/arch/arm/boards/nvidia-jetson-tk1/board.c
index fca3038170..6f72466d76 100644
--- a/arch/arm/boards/nvidia-jetson-tk1/board.c
+++ b/arch/arm/boards/nvidia-jetson-tk1/board.c
@@ -6,7 +6,7 @@
#include <gpio.h>
#include <i2c/i2c.h>
#include <init.h>
-#include <mach/tegra-bbu.h>
+#include <mach/tegra/tegra-bbu.h>
#define AS3722_SD_VOLTAGE(n) (0x00 + (n))
#define AS3722_GPIO_CONTROL(n) (0x08 + (n))
diff --git a/arch/arm/boards/nvidia-jetson-tk1/entry.c b/arch/arm/boards/nvidia-jetson-tk1/entry.c
index 22b6c743ee..db9b1d9ebf 100644
--- a/arch/arm/boards/nvidia-jetson-tk1/entry.c
+++ b/arch/arm/boards/nvidia-jetson-tk1/entry.c
@@ -2,8 +2,8 @@
// SPDX-FileCopyrightText: 2014 Lucas Stach <l.stach@pengutronix.de>
#include <common.h>
-#include <mach/lowlevel.h>
-#include <mach/lowlevel-dvc.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/lowlevel-dvc.h>
extern char __dtb_tegra124_jetson_tk1_start[];
diff --git a/arch/arm/boards/toradex-colibri-t20/entry.c b/arch/arm/boards/toradex-colibri-t20/entry.c
index 955052f03f..af55689402 100644
--- a/arch/arm/boards/toradex-colibri-t20/entry.c
+++ b/arch/arm/boards/toradex-colibri-t20/entry.c
@@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2013 Lucas Stach <l.stach@pengutronix.de>
#include <common.h>
-#include <mach/lowlevel.h>
+#include <mach/tegra/lowlevel.h>
extern char __dtb_tegra20_colibri_iris_start[];
diff --git a/arch/arm/boards/toshiba-ac100/board.c b/arch/arm/boards/toshiba-ac100/board.c
index 01aaf47034..0248bf1cc5 100644
--- a/arch/arm/boards/toshiba-ac100/board.c
+++ b/arch/arm/boards/toshiba-ac100/board.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <init.h>
#include <usb/ehci.h>
-#include <mach/iomap.h>
+#include <mach/tegra/iomap.h>
static struct ehci_platform_data ehci_pdata = {
.flags = EHCI_HAS_TT,
diff --git a/arch/arm/boards/toshiba-ac100/entry.c b/arch/arm/boards/toshiba-ac100/entry.c
index 918ca4b9d8..1cb5b1c0d0 100644
--- a/arch/arm/boards/toshiba-ac100/entry.c
+++ b/arch/arm/boards/toshiba-ac100/entry.c
@@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2013 Lucas Stach <l.stach@pengutronix.de>
#include <common.h>
-#include <mach/lowlevel.h>
+#include <mach/tegra/lowlevel.h>
extern char __dtb_tegra20_paz00_start[];
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 4ba0d932f6..b3bd8530de 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -28,6 +28,8 @@
#include <mach/versatile/debug_ll.h>
#elif defined CONFIG_ARCH_LAYERSCAPE
#include <mach/layerscape/debug_ll.h>
+#elif defined CONFIG_ARCH_TEGRA
+#include <mach/tegra/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-tegra/tegra-bbu.c b/arch/arm/mach-tegra/tegra-bbu.c
index 089e6c736a..0a59da04db 100644
--- a/arch/arm/mach-tegra/tegra-bbu.c
+++ b/arch/arm/mach-tegra/tegra-bbu.c
@@ -17,7 +17,7 @@
#include <common.h>
#include <fcntl.h>
#include <fs.h>
-#include <mach/tegra-bbu.h>
+#include <mach/tegra/tegra-bbu.h>
#include <malloc.h>
static int tegra_bbu_emmc_handler(struct bbu_handler *handler,
diff --git a/arch/arm/mach-tegra/tegra20-pmc.c b/arch/arm/mach-tegra/tegra20-pmc.c
index 6efff56746..9965d41383 100644
--- a/arch/arm/mach-tegra/tegra20-pmc.c
+++ b/arch/arm/mach-tegra/tegra20-pmc.c
@@ -27,11 +27,11 @@
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/reset.h>
-#include <mach/lowlevel.h>
-#include <mach/tegra-powergate.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/tegra-powergate.h>
#include <reset_source.h>
-#include <mach/tegra20-pmc.h>
+#include <mach/tegra/tegra20-pmc.h>
static void __iomem *pmc_base;
static int tegra_num_powerdomains;
diff --git a/arch/arm/mach-tegra/tegra20-timer.c b/arch/arm/mach-tegra/tegra20-timer.c
index 0dc6fc2d11..3dbb2a8fc4 100644
--- a/arch/arm/mach-tegra/tegra20-timer.c
+++ b/arch/arm/mach-tegra/tegra20-timer.c
@@ -25,7 +25,7 @@
#include <io.h>
#include <linux/clk.h>
#include <linux/err.h>
-#include <mach/lowlevel.h>
+#include <mach/tegra/lowlevel.h>
/* register definitions */
#define TIMERUS_CNTR_1US 0x10
diff --git a/arch/arm/mach-tegra/tegra20.c b/arch/arm/mach-tegra/tegra20.c
index 10c149a955..d27f775cf9 100644
--- a/arch/arm/mach-tegra/tegra20.c
+++ b/arch/arm/mach-tegra/tegra20.c
@@ -17,9 +17,9 @@
#include <common.h>
#include <init.h>
#include <asm/memory.h>
-#include <mach/iomap.h>
-#include <mach/lowlevel.h>
-#include <mach/tegra114-sysctr.h>
+#include <mach/tegra/iomap.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/tegra114-sysctr.h>
static int tegra20_mem_init(void)
{
diff --git a/arch/arm/mach-tegra/tegra_avp_init.c b/arch/arm/mach-tegra/tegra_avp_init.c
index 8a11e06c53..021bcb6d95 100644
--- a/arch/arm/mach-tegra/tegra_avp_init.c
+++ b/arch/arm/mach-tegra/tegra_avp_init.c
@@ -20,12 +20,12 @@
#include <common.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/lowlevel.h>
-#include <mach/tegra20-car.h>
-#include <mach/tegra20-pmc.h>
-#include <mach/tegra30-car.h>
-#include <mach/tegra30-flow.h>
-#include <mach/tegra124-car.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/tegra20-car.h>
+#include <mach/tegra/tegra20-pmc.h>
+#include <mach/tegra/tegra30-car.h>
+#include <mach/tegra/tegra30-flow.h>
+#include <mach/tegra/tegra124-car.h>
/* instruct the PMIC to enable the CPU power rail */
static void enable_maincomplex_powerrail(void)
diff --git a/arch/arm/mach-tegra/tegra_maincomplex_init.c b/arch/arm/mach-tegra/tegra_maincomplex_init.c
index 27bb3363a3..2a2272a99f 100644
--- a/arch/arm/mach-tegra/tegra_maincomplex_init.c
+++ b/arch/arm/mach-tegra/tegra_maincomplex_init.c
@@ -19,9 +19,9 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <asm/errata.h>
-#include <mach/lowlevel.h>
-#include <mach/tegra20-pmc.h>
-#include <mach/tegra20-car.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/tegra20-pmc.h>
+#include <mach/tegra/tegra20-car.h>
void tegra_maincomplex_entry(char *fdt)
{
diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 0d364f318d..32f57cc2e4 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
@@ -13,7 +13,7 @@
#include <linux/clk.h>
#include <linux/err.h>
-#include <mach/iomap.h>
+#include <mach/tegra/iomap.h>
#include "clk.h"
diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c
index 18cfac33e9..bad8110829 100644
--- a/drivers/clk/tegra/clk-tegra124.c
+++ b/drivers/clk/tegra/clk-tegra124.c
@@ -12,9 +12,9 @@
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/lowlevel.h>
-#include <mach/tegra20-car.h>
-#include <mach/tegra30-car.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/tegra20-car.h>
+#include <mach/tegra/tegra30-car.h>
#include "clk.h"
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index 2ecfa33561..319c7bc7c1 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -12,8 +12,8 @@
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/lowlevel.h>
-#include <mach/tegra20-car.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/tegra20-car.h>
#include "clk.h"
diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
index b602832bc6..0cecc19b66 100644
--- a/drivers/clk/tegra/clk-tegra30.c
+++ b/drivers/clk/tegra/clk-tegra30.c
@@ -12,9 +12,9 @@
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/lowlevel.h>
-#include <mach/tegra20-car.h>
-#include <mach/tegra30-car.h>
+#include <mach/tegra/lowlevel.h>
+#include <mach/tegra/tegra20-car.h>
+#include <mach/tegra/tegra30-car.h>
#include "clk.h"
diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c
index 26ff9f2580..ad384d8d4d 100644
--- a/drivers/clk/tegra/clk.c
+++ b/drivers/clk/tegra/clk.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <linux/clk.h>
#include <linux/reset-controller.h>
-#include <mach/lowlevel.h>
+#include <mach/tegra/lowlevel.h>
#include "clk.h"
diff --git a/drivers/pci/pci-tegra.c b/drivers/pci/pci-tegra.c
index 06a5bd9d82..afff5f6138 100644
--- a/drivers/pci/pci-tegra.c
+++ b/drivers/pci/pci-tegra.c
@@ -22,7 +22,7 @@
#include <linux/phy/phy.h>
#include <linux/reset.h>
#include <linux/sizes.h>
-#include <mach/tegra-powergate.h>
+#include <mach/tegra/tegra-powergate.h>
#include <regulator.h>
/* register definitions */
diff --git a/arch/arm/mach-tegra/include/mach/debug_ll.h b/include/mach/tegra/debug_ll.h
similarity index 97%
rename from arch/arm/mach-tegra/include/mach/debug_ll.h
rename to include/mach/tegra/debug_ll.h
index 86218df63e..ff0439e5f3 100644
--- a/arch/arm/mach-tegra/include/mach/debug_ll.h
+++ b/include/mach/tegra/debug_ll.h
@@ -21,7 +21,7 @@
#define __INCLUDE_ARCH_DEBUG_LL_H__
#include <asm/io.h>
-#include <mach/iomap.h>
+#include <mach/tegra/iomap.h>
#define DEBUG_LL_UART_ADDR TEGRA_UARTA_BASE
#define DEBUG_LL_UART_RSHFT 2
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/include/mach/tegra/iomap.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/iomap.h
rename to include/mach/tegra/iomap.h
diff --git a/arch/arm/mach-tegra/include/mach/lowlevel-dvc.h b/include/mach/tegra/lowlevel-dvc.h
similarity index 98%
rename from arch/arm/mach-tegra/include/mach/lowlevel-dvc.h
rename to include/mach/tegra/lowlevel-dvc.h
index 1deae4e565..ec2f0c3112 100644
--- a/arch/arm/mach-tegra/include/mach/lowlevel-dvc.h
+++ b/include/mach/tegra/lowlevel-dvc.h
@@ -15,8 +15,8 @@
*/
#include <linux/compiler.h>
-#include "mach/tegra20-car.h"
-#include "mach/lowlevel.h"
+#include <mach/tegra/tegra20-car.h>
+#include <mach/tegra/lowlevel.h>
static __always_inline
void tegra_dvc_init(void)
diff --git a/arch/arm/mach-tegra/include/mach/lowlevel.h b/include/mach/tegra/lowlevel.h
similarity index 99%
rename from arch/arm/mach-tegra/include/mach/lowlevel.h
rename to include/mach/tegra/lowlevel.h
index 31f99eb175..26228e48a8 100644
--- a/arch/arm/mach-tegra/include/mach/lowlevel.h
+++ b/include/mach/tegra/lowlevel.h
@@ -28,7 +28,7 @@
#include <linux/compiler.h>
#include <linux/sizes.h>
#include <io.h>
-#include <mach/iomap.h>
+#include <mach/tegra/iomap.h>
/* Bootinfotable */
diff --git a/arch/arm/mach-tegra/include/mach/tegra-bbu.h b/include/mach/tegra/tegra-bbu.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/tegra-bbu.h
rename to include/mach/tegra/tegra-bbu.h
diff --git a/arch/arm/mach-tegra/include/mach/tegra-powergate.h b/include/mach/tegra/tegra-powergate.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/tegra-powergate.h
rename to include/mach/tegra/tegra-powergate.h
diff --git a/arch/arm/mach-tegra/include/mach/tegra114-sysctr.h b/include/mach/tegra/tegra114-sysctr.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/tegra114-sysctr.h
rename to include/mach/tegra/tegra114-sysctr.h
diff --git a/arch/arm/mach-tegra/include/mach/tegra124-car.h b/include/mach/tegra/tegra124-car.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/tegra124-car.h
rename to include/mach/tegra/tegra124-car.h
diff --git a/arch/arm/mach-tegra/include/mach/tegra20-car.h b/include/mach/tegra/tegra20-car.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/tegra20-car.h
rename to include/mach/tegra/tegra20-car.h
diff --git a/arch/arm/mach-tegra/include/mach/tegra20-pmc.h b/include/mach/tegra/tegra20-pmc.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/tegra20-pmc.h
rename to include/mach/tegra/tegra20-pmc.h
diff --git a/arch/arm/mach-tegra/include/mach/tegra30-car.h b/include/mach/tegra/tegra30-car.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/tegra30-car.h
rename to include/mach/tegra/tegra30-car.h
diff --git a/arch/arm/mach-tegra/include/mach/tegra30-flow.h b/include/mach/tegra/tegra30-flow.h
similarity index 100%
rename from arch/arm/mach-tegra/include/mach/tegra30-flow.h
rename to include/mach/tegra/tegra30-flow.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 13/50] ARM: uemd: Move mach header files to include/mach/uemd
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (11 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 12/50] ARM: tegra: Move mach header files to include/mach/tegra Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 14/50] ARM: socfpga: Move mach header files to include/mach/socfpga Sascha Hauer
` (36 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all uemd specific header files to include/mach/uemd/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/module-mb7707/board.c | 2 +-
arch/arm/include/asm/debug_ll.h | 2 ++
.../arm/mach-uemd/include/mach => include/mach/uemd}/debug_ll.h | 2 +-
.../arm/mach-uemd/include/mach => include/mach/uemd}/hardware.h | 0
4 files changed, 4 insertions(+), 2 deletions(-)
rename {arch/arm/mach-uemd/include/mach => include/mach/uemd}/debug_ll.h (97%)
rename {arch/arm/mach-uemd/include/mach => include/mach/uemd}/hardware.h (100%)
diff --git a/arch/arm/boards/module-mb7707/board.c b/arch/arm/boards/module-mb7707/board.c
index c4f78a8135..122348210d 100644
--- a/arch/arm/boards/module-mb7707/board.c
+++ b/arch/arm/boards/module-mb7707/board.c
@@ -7,7 +7,7 @@
#include <init.h>
#include <driver.h>
#include <usb/ehci.h>
-#include <mach/hardware.h>
+#include <mach/uemd/hardware.h>
static int hostname_init(void)
{
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index b3bd8530de..63bd8c022a 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -30,6 +30,8 @@
#include <mach/layerscape/debug_ll.h>
#elif defined CONFIG_ARCH_TEGRA
#include <mach/tegra/debug_ll.h>
+#elif defined CONFIG_ARCH_UEMD
+#include <mach/uemd/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-uemd/include/mach/debug_ll.h b/include/mach/uemd/debug_ll.h
similarity index 97%
rename from arch/arm/mach-uemd/include/mach/debug_ll.h
rename to include/mach/uemd/debug_ll.h
index a565b67275..df24e1d938 100644
--- a/arch/arm/mach-uemd/include/mach/debug_ll.h
+++ b/include/mach/uemd/debug_ll.h
@@ -21,7 +21,7 @@
#define __INCLUDE_ARCH_DEBUG_LL_H__
#include <asm/io.h>
-#include <mach/hardware.h>
+#include <mach/uemd/hardware.h>
#define DEBUG_LL_UART_ADDR UEMD_UART0_BASE
#define DEBUG_LL_UART_RSHFT 2
diff --git a/arch/arm/mach-uemd/include/mach/hardware.h b/include/mach/uemd/hardware.h
similarity index 100%
rename from arch/arm/mach-uemd/include/mach/hardware.h
rename to include/mach/uemd/hardware.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 14/50] ARM: socfpga: Move mach header files to include/mach/socfpga
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (12 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 13/50] ARM: uemd: Move mach header files to include/mach/uemd Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 15/50] ARM: pxa: Move mach header files to include/mach/pxa Sascha Hauer
` (35 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all socfpga specific header files to include/mach/socfpga/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/altera-socdk/board.c | 2 +-
.../altera-socdk/iocsr_config_cyclone5.c | 2 +-
arch/arm/boards/altera-socdk/lowlevel.c | 2 +-
arch/arm/boards/ebv-socrates/board.c | 2 +-
.../ebv-socrates/iocsr_config_cyclone5.c | 2 +-
arch/arm/boards/ebv-socrates/lowlevel.c | 2 +-
arch/arm/boards/enclustra-aa1/board.c | 2 +-
arch/arm/boards/enclustra-aa1/lowlevel.c | 18 +++++++++---------
.../enclustra-aa1/pinmux-config-arria10.c | 2 +-
.../boards/enclustra-aa1/pll-config-arria10.c | 2 +-
arch/arm/boards/reflex-achilles/board.c | 2 +-
arch/arm/boards/reflex-achilles/lowlevel.c | 16 ++++++++--------
.../reflex-achilles/pinmux-config-arria10.c | 2 +-
.../reflex-achilles/pll-config-arria10.c | 2 +-
arch/arm/boards/terasic-de0-nano-soc/board.c | 2 +-
.../iocsr_config_cyclone5.c | 2 +-
.../arm/boards/terasic-de0-nano-soc/lowlevel.c | 2 +-
arch/arm/boards/terasic-de10-nano/board.c | 2 +-
.../terasic-de10-nano/iocsr_config_cyclone5.c | 2 +-
arch/arm/boards/terasic-de10-nano/lowlevel.c | 2 +-
.../terasic-sockit/iocsr_config_cyclone5.c | 2 +-
arch/arm/boards/terasic-sockit/lowlevel.c | 2 +-
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-socfpga/arria10-bootsource.c | 4 ++--
arch/arm/mach-socfpga/arria10-clock-manager.c | 6 +++---
arch/arm/mach-socfpga/arria10-generic.c | 8 ++++----
arch/arm/mach-socfpga/arria10-init.c | 12 ++++++------
arch/arm/mach-socfpga/arria10-reset-manager.c | 10 +++++-----
arch/arm/mach-socfpga/arria10-sdram.c | 8 ++++----
arch/arm/mach-socfpga/arria10-xload-emmc.c | 8 ++++----
arch/arm/mach-socfpga/arria10-xload.c | 12 ++++++------
arch/arm/mach-socfpga/cpu_init.c | 2 +-
arch/arm/mach-socfpga/cyclone5-bootsource.c | 6 +++---
arch/arm/mach-socfpga/cyclone5-clock-manager.c | 6 +++---
.../mach-socfpga/cyclone5-freeze-controller.c | 4 ++--
arch/arm/mach-socfpga/cyclone5-generic.c | 10 +++++-----
arch/arm/mach-socfpga/cyclone5-init.c | 12 ++++++------
arch/arm/mach-socfpga/cyclone5-reset-manager.c | 4 ++--
arch/arm/mach-socfpga/cyclone5-scan-manager.c | 4 ++--
.../arm/mach-socfpga/cyclone5-system-manager.c | 4 ++--
arch/arm/mach-socfpga/nic301.c | 4 ++--
arch/arm/mach-socfpga/xload.c | 6 +++---
drivers/clk/socfpga/clk-gate-a10.c | 4 ++--
drivers/firmware/socfpga.c | 8 ++++----
.../mach/socfpga}/arria10-clock-manager.h | 0
.../mach/socfpga}/arria10-fpga.h | 2 +-
.../mach/socfpga}/arria10-pinmux.h | 2 +-
.../mach/socfpga}/arria10-regs.h | 0
.../mach/socfpga}/arria10-reset-manager.h | 0
.../mach/socfpga}/arria10-sdram.h | 2 +-
.../mach/socfpga}/arria10-system-manager.h | 2 +-
.../mach/socfpga}/arria10-xload.h | 0
.../mach/socfpga}/barebox-arm-head.h | 0
.../mach/socfpga}/cyclone5-clock-manager.h | 0
.../mach/socfpga}/cyclone5-freeze-controller.h | 2 +-
.../mach/socfpga}/cyclone5-regs.h | 0
.../mach/socfpga}/cyclone5-reset-manager.h | 0
.../mach/socfpga}/cyclone5-scan-manager.h | 2 +-
.../mach/socfpga}/cyclone5-sdram-config.h | 6 +++---
.../mach/socfpga}/cyclone5-sdram.h | 0
.../mach/socfpga}/cyclone5-sequencer.c | 2 +-
.../mach/socfpga}/cyclone5-sequencer.h | 0
.../mach/socfpga}/cyclone5-system-manager.h | 0
.../mach => include/mach/socfpga}/debug_ll.h | 0
.../mach => include/mach/socfpga}/generic.h | 0
.../mach => include/mach/socfpga}/init.h | 0
.../mach => include/mach/socfpga}/lowlevel.h | 8 ++++----
.../mach => include/mach/socfpga}/nic301.h | 0
.../mach => include/mach/socfpga}/pll_config.h | 2 +-
.../mach => include/mach/socfpga}/sdram_io.h | 2 +-
.../mach => include/mach/socfpga}/system.h | 0
.../mach => include/mach/socfpga}/tclrpt.h | 0
72 files changed, 126 insertions(+), 124 deletions(-)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/arria10-clock-manager.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/arria10-fpga.h (98%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/arria10-pinmux.h (99%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/arria10-regs.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/arria10-reset-manager.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/arria10-sdram.h (99%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/arria10-system-manager.h (99%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/arria10-xload.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/barebox-arm-head.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-clock-manager.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-freeze-controller.h (98%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-regs.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-reset-manager.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-scan-manager.h (99%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-sdram-config.h (98%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-sdram.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-sequencer.c (99%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-sequencer.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/cyclone5-system-manager.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/debug_ll.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/generic.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/init.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/lowlevel.h (91%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/nic301.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/pll_config.h (98%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/sdram_io.h (98%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/system.h (100%)
rename {arch/arm/mach-socfpga/include/mach => include/mach/socfpga}/tclrpt.h (100%)
diff --git a/arch/arm/boards/altera-socdk/board.c b/arch/arm/boards/altera-socdk/board.c
index 1c91d2a10d..bf0a5664fe 100644
--- a/arch/arm/boards/altera-socdk/board.c
+++ b/arch/arm/boards/altera-socdk/board.c
@@ -10,7 +10,7 @@
#include <linux/sizes.h>
#include <fcntl.h>
#include <fs.h>
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-regs.h>
static int ksz9021rn_phy_fixup(struct phy_device *dev)
{
diff --git a/arch/arm/boards/altera-socdk/iocsr_config_cyclone5.c b/arch/arm/boards/altera-socdk/iocsr_config_cyclone5.c
index 9777d15dfe..982bef52bf 100644
--- a/arch/arm/boards/altera-socdk/iocsr_config_cyclone5.c
+++ b/arch/arm/boards/altera-socdk/iocsr_config_cyclone5.c
@@ -27,7 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <mach/cyclone5-scan-manager.h>
+#include <mach/socfpga/cyclone5-scan-manager.h>
static const unsigned long iocsr_scan_chain0_table[((CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH / 32) + 1)]
= {
diff --git a/arch/arm/boards/altera-socdk/lowlevel.c b/arch/arm/boards/altera-socdk/lowlevel.c
index 537453b676..1e62ab70e7 100644
--- a/arch/arm/boards/altera-socdk/lowlevel.c
+++ b/arch/arm/boards/altera-socdk/lowlevel.c
@@ -9,7 +9,7 @@
#include "sequencer_auto_ac_init.c"
#include "iocsr_config_cyclone5.c"
-#include <mach/lowlevel.h>
+#include <mach/socfpga/lowlevel.h>
SOCFPGA_C5_ENTRY(start_socfpga_socdk, socfpga_cyclone5_socdk, SZ_1G);
SOCFPGA_C5_XLOAD_ENTRY(start_socfpga_socdk_xload, SZ_1G);
diff --git a/arch/arm/boards/ebv-socrates/board.c b/arch/arm/boards/ebv-socrates/board.c
index c2a8edac98..79085a5bb5 100644
--- a/arch/arm/boards/ebv-socrates/board.c
+++ b/arch/arm/boards/ebv-socrates/board.c
@@ -13,7 +13,7 @@
#include <linux/sizes.h>
#include <fcntl.h>
#include <fs.h>
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-regs.h>
static int phy_fixup(struct phy_device *dev)
{
diff --git a/arch/arm/boards/ebv-socrates/iocsr_config_cyclone5.c b/arch/arm/boards/ebv-socrates/iocsr_config_cyclone5.c
index 9a814cba79..a769ff5366 100644
--- a/arch/arm/boards/ebv-socrates/iocsr_config_cyclone5.c
+++ b/arch/arm/boards/ebv-socrates/iocsr_config_cyclone5.c
@@ -27,7 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <mach/cyclone5-scan-manager.h>
+#include <mach/socfpga/cyclone5-scan-manager.h>
static const unsigned long iocsr_scan_chain0_table[((CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH / 32) + 1)] = {
0x00000000,
diff --git a/arch/arm/boards/ebv-socrates/lowlevel.c b/arch/arm/boards/ebv-socrates/lowlevel.c
index 1f5b835df2..56b0f43a33 100644
--- a/arch/arm/boards/ebv-socrates/lowlevel.c
+++ b/arch/arm/boards/ebv-socrates/lowlevel.c
@@ -9,7 +9,7 @@
#include "sequencer_auto_ac_init.c"
#include "iocsr_config_cyclone5.c"
-#include <mach/lowlevel.h>
+#include <mach/socfpga/lowlevel.h>
static inline void ledon(void)
{
diff --git a/arch/arm/boards/enclustra-aa1/board.c b/arch/arm/boards/enclustra-aa1/board.c
index 6261eb4b83..de886f21aa 100644
--- a/arch/arm/boards/enclustra-aa1/board.c
+++ b/arch/arm/boards/enclustra-aa1/board.c
@@ -4,7 +4,7 @@
#include <init.h>
#include <io.h>
#include <bbu.h>
-#include <mach/arria10-system-manager.h>
+#include <mach/socfpga/arria10-system-manager.h>
static int aa1_init(void)
{
diff --git a/arch/arm/boards/enclustra-aa1/lowlevel.c b/arch/arm/boards/enclustra-aa1/lowlevel.c
index 901adc4640..ba4d562e5f 100644
--- a/arch/arm/boards/enclustra-aa1/lowlevel.c
+++ b/arch/arm/boards/enclustra-aa1/lowlevel.c
@@ -10,17 +10,17 @@
#include <asm/unaligned.h>
#include <debug_ll.h>
#include <pbl.h>
-#include <mach/arria10-sdram.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-reset-manager.h>
-#include <mach/arria10-clock-manager.h>
-#include <mach/arria10-pinmux.h>
-#include <mach/arria10-fpga.h>
-#include <mach/init.h>
+#include <mach/socfpga/arria10-sdram.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-reset-manager.h>
+#include <mach/socfpga/arria10-clock-manager.h>
+#include <mach/socfpga/arria10-pinmux.h>
+#include <mach/socfpga/arria10-fpga.h>
+#include <mach/socfpga/init.h>
#include "pll-config-arria10.c"
#include "pinmux-config-arria10.c"
-#include <mach/generic.h>
-#include <mach/init.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/init.h>
#define BAREBOX_PART 0
// the bitstream is located in the second partition in the partition table
diff --git a/arch/arm/boards/enclustra-aa1/pinmux-config-arria10.c b/arch/arm/boards/enclustra-aa1/pinmux-config-arria10.c
index 3e250dbf6f..fea88e3336 100644
--- a/arch/arm/boards/enclustra-aa1/pinmux-config-arria10.c
+++ b/arch/arm/boards/enclustra-aa1/pinmux-config-arria10.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
-#include <mach/arria10-pinmux.h>
+#include <mach/socfpga/arria10-pinmux.h>
static uint32_t pinmux[] = {
[arria10_pinmux_shared_io_q3_7] = 0,
diff --git a/arch/arm/boards/enclustra-aa1/pll-config-arria10.c b/arch/arm/boards/enclustra-aa1/pll-config-arria10.c
index 41aad354bc..8178550d7d 100644
--- a/arch/arm/boards/enclustra-aa1/pll-config-arria10.c
+++ b/arch/arm/boards/enclustra-aa1/pll-config-arria10.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
-#include <mach/arria10-clock-manager.h>
+#include <mach/socfpga/arria10-clock-manager.h>
static struct arria10_mainpll_cfg mainpll_cfg = {
.cntr15clk_cnt = 900,
diff --git a/arch/arm/boards/reflex-achilles/board.c b/arch/arm/boards/reflex-achilles/board.c
index 0fbb967ff9..96da18f22e 100644
--- a/arch/arm/boards/reflex-achilles/board.c
+++ b/arch/arm/boards/reflex-achilles/board.c
@@ -4,7 +4,7 @@
#include <init.h>
#include <io.h>
#include <bbu.h>
-#include <mach/arria10-system-manager.h>
+#include <mach/socfpga/arria10-system-manager.h>
static int achilles_init(void)
{
diff --git a/arch/arm/boards/reflex-achilles/lowlevel.c b/arch/arm/boards/reflex-achilles/lowlevel.c
index 511b41fd01..12ead6d6dd 100644
--- a/arch/arm/boards/reflex-achilles/lowlevel.c
+++ b/arch/arm/boards/reflex-achilles/lowlevel.c
@@ -10,16 +10,16 @@
#include <asm/unaligned.h>
#include <debug_ll.h>
#include <pbl.h>
-#include <mach/arria10-sdram.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-reset-manager.h>
-#include <mach/arria10-clock-manager.h>
-#include <mach/arria10-pinmux.h>
-#include <mach/arria10-fpga.h>
-#include <mach/init.h>
+#include <mach/socfpga/arria10-sdram.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-reset-manager.h>
+#include <mach/socfpga/arria10-clock-manager.h>
+#include <mach/socfpga/arria10-pinmux.h>
+#include <mach/socfpga/arria10-fpga.h>
+#include <mach/socfpga/init.h>
#include "pll-config-arria10.c"
#include "pinmux-config-arria10.c"
-#include <mach/generic.h>
+#include <mach/socfpga/generic.h>
#define BAREBOX_PART 0
#define BITSTREAM_PART 1
diff --git a/arch/arm/boards/reflex-achilles/pinmux-config-arria10.c b/arch/arm/boards/reflex-achilles/pinmux-config-arria10.c
index 146bb5405d..aa65770fdd 100644
--- a/arch/arm/boards/reflex-achilles/pinmux-config-arria10.c
+++ b/arch/arm/boards/reflex-achilles/pinmux-config-arria10.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
-#include <mach/arria10-pinmux.h>
+#include <mach/socfpga/arria10-pinmux.h>
static uint32_t pinmux[] = {
[arria10_pinmux_shared_io_q4_12] = 8,
diff --git a/arch/arm/boards/reflex-achilles/pll-config-arria10.c b/arch/arm/boards/reflex-achilles/pll-config-arria10.c
index 27dbe01b58..35d475bcfb 100644
--- a/arch/arm/boards/reflex-achilles/pll-config-arria10.c
+++ b/arch/arm/boards/reflex-achilles/pll-config-arria10.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
-#include <mach/arria10-clock-manager.h>
+#include <mach/socfpga/arria10-clock-manager.h>
static struct arria10_mainpll_cfg mainpll_cfg = {
.cntr15clk_cnt = 900,
diff --git a/arch/arm/boards/terasic-de0-nano-soc/board.c b/arch/arm/boards/terasic-de0-nano-soc/board.c
index 4019dae6a4..19f74b784c 100644
--- a/arch/arm/boards/terasic-de0-nano-soc/board.c
+++ b/arch/arm/boards/terasic-de0-nano-soc/board.c
@@ -10,7 +10,7 @@
#include <linux/sizes.h>
#include <fcntl.h>
#include <fs.h>
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-regs.h>
static int phy_fixup(struct phy_device *dev)
{
diff --git a/arch/arm/boards/terasic-de0-nano-soc/iocsr_config_cyclone5.c b/arch/arm/boards/terasic-de0-nano-soc/iocsr_config_cyclone5.c
index 1458e76ba8..27af250232 100644
--- a/arch/arm/boards/terasic-de0-nano-soc/iocsr_config_cyclone5.c
+++ b/arch/arm/boards/terasic-de0-nano-soc/iocsr_config_cyclone5.c
@@ -27,7 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <mach/cyclone5-scan-manager.h>
+#include <mach/socfpga/cyclone5-scan-manager.h>
static const unsigned long iocsr_scan_chain0_table[((CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH / 32) + 1)] = {
0x00000000,
diff --git a/arch/arm/boards/terasic-de0-nano-soc/lowlevel.c b/arch/arm/boards/terasic-de0-nano-soc/lowlevel.c
index 91bfd1a776..71121b6d4c 100644
--- a/arch/arm/boards/terasic-de0-nano-soc/lowlevel.c
+++ b/arch/arm/boards/terasic-de0-nano-soc/lowlevel.c
@@ -9,7 +9,7 @@
#include "sequencer_auto_ac_init.c"
#include "iocsr_config_cyclone5.c"
-#include <mach/lowlevel.h>
+#include <mach/socfpga/lowlevel.h>
SOCFPGA_C5_ENTRY(start_socfpga_de0_nano_soc, socfpga_cyclone5_de0_nano_soc, SZ_1G);
SOCFPGA_C5_XLOAD_ENTRY(start_socfpga_de0_nano_soc_xload, SZ_1G);
diff --git a/arch/arm/boards/terasic-de10-nano/board.c b/arch/arm/boards/terasic-de10-nano/board.c
index f8df37eadf..580c898012 100644
--- a/arch/arm/boards/terasic-de10-nano/board.c
+++ b/arch/arm/boards/terasic-de10-nano/board.c
@@ -10,7 +10,7 @@
#include <linux/sizes.h>
#include <fcntl.h>
#include <fs.h>
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-regs.h>
static int phy_fixup(struct phy_device *dev)
{
diff --git a/arch/arm/boards/terasic-de10-nano/iocsr_config_cyclone5.c b/arch/arm/boards/terasic-de10-nano/iocsr_config_cyclone5.c
index c1291dea40..2f30d836d6 100644
--- a/arch/arm/boards/terasic-de10-nano/iocsr_config_cyclone5.c
+++ b/arch/arm/boards/terasic-de10-nano/iocsr_config_cyclone5.c
@@ -27,7 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <mach/cyclone5-scan-manager.h>
+#include <mach/socfpga/cyclone5-scan-manager.h>
static const unsigned long iocsr_scan_chain0_table[((CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH / 32) + 1)]
= {
diff --git a/arch/arm/boards/terasic-de10-nano/lowlevel.c b/arch/arm/boards/terasic-de10-nano/lowlevel.c
index f6a3e39634..74c8aec99d 100644
--- a/arch/arm/boards/terasic-de10-nano/lowlevel.c
+++ b/arch/arm/boards/terasic-de10-nano/lowlevel.c
@@ -9,7 +9,7 @@
#include "sequencer_auto_ac_init.c"
#include "iocsr_config_cyclone5.c"
-#include <mach/lowlevel.h>
+#include <mach/socfpga/lowlevel.h>
SOCFPGA_C5_ENTRY(start_socfpga_de10_nano, socfpga_cyclone5_de10_nano, SZ_1G);
SOCFPGA_C5_XLOAD_ENTRY(start_socfpga_de10_nano_xload, SZ_1G);
diff --git a/arch/arm/boards/terasic-sockit/iocsr_config_cyclone5.c b/arch/arm/boards/terasic-sockit/iocsr_config_cyclone5.c
index 9367b0d110..8e5b02be2f 100644
--- a/arch/arm/boards/terasic-sockit/iocsr_config_cyclone5.c
+++ b/arch/arm/boards/terasic-sockit/iocsr_config_cyclone5.c
@@ -27,7 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <mach/cyclone5-scan-manager.h>
+#include <mach/socfpga/cyclone5-scan-manager.h>
static const unsigned long iocsr_scan_chain0_table[((CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH / 32) + 1)] = {
0x00000000,
diff --git a/arch/arm/boards/terasic-sockit/lowlevel.c b/arch/arm/boards/terasic-sockit/lowlevel.c
index dbe99ac1df..9ce0fd4423 100644
--- a/arch/arm/boards/terasic-sockit/lowlevel.c
+++ b/arch/arm/boards/terasic-sockit/lowlevel.c
@@ -9,7 +9,7 @@
#include "sequencer_auto_ac_init.c"
#include "iocsr_config_cyclone5.c"
-#include <mach/lowlevel.h>
+#include <mach/socfpga/lowlevel.h>
static inline void ledon(int led)
{
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 63bd8c022a..0c1f22e819 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -32,6 +32,8 @@
#include <mach/tegra/debug_ll.h>
#elif defined CONFIG_ARCH_UEMD
#include <mach/uemd/debug_ll.h>
+#elif defined CONFIG_ARCH_SOCFPGA
+#include <mach/socfpga/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-socfpga/arria10-bootsource.c b/arch/arm/mach-socfpga/arria10-bootsource.c
index 9055570c07..4aa36a7ffe 100644
--- a/arch/arm/mach-socfpga/arria10-bootsource.c
+++ b/arch/arm/mach-socfpga/arria10-bootsource.c
@@ -15,8 +15,8 @@
#include <bootsource.h>
#include <init.h>
#include <io.h>
-#include <mach/generic.h>
-#include <mach/arria10-system-manager.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/arria10-system-manager.h>
enum bootsource arria10_get_bootsource(void) {
enum bootsource src = BOOTSOURCE_UNKNOWN;
diff --git a/arch/arm/mach-socfpga/arria10-clock-manager.c b/arch/arm/mach-socfpga/arria10-clock-manager.c
index 8052afe2d8..372617acb9 100644
--- a/arch/arm/mach-socfpga/arria10-clock-manager.c
+++ b/arch/arm/mach-socfpga/arria10-clock-manager.c
@@ -6,9 +6,9 @@
#include <common.h>
#include <asm/io.h>
-#include <mach/generic.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-clock-manager.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-clock-manager.h>
static const struct arria10_clock_manager *arria10_clkmgr_base =
(void *)ARRIA10_CLKMGR_ADDR;
diff --git a/arch/arm/mach-socfpga/arria10-generic.c b/arch/arm/mach-socfpga/arria10-generic.c
index d3990e1281..fc2ef3e292 100644
--- a/arch/arm/mach-socfpga/arria10-generic.c
+++ b/arch/arm/mach-socfpga/arria10-generic.c
@@ -4,10 +4,10 @@
#include <io.h>
#include <init.h>
#include <restart.h>
-#include <mach/generic.h>
-#include <mach/arria10-reset-manager.h>
-#include <mach/arria10-system-manager.h>
-#include <mach/arria10-regs.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/arria10-reset-manager.h>
+#include <mach/socfpga/arria10-system-manager.h>
+#include <mach/socfpga/arria10-regs.h>
/* Some initialization for the EMAC */
static void arria10_init_emac(void)
diff --git a/arch/arm/mach-socfpga/arria10-init.c b/arch/arm/mach-socfpga/arria10-init.c
index 93bc3368d3..d1586c2d40 100644
--- a/arch/arm/mach-socfpga/arria10-init.c
+++ b/arch/arm/mach-socfpga/arria10-init.c
@@ -6,12 +6,12 @@
#include <common.h>
#include <debug_ll.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-clock-manager.h>
-#include <mach/arria10-pinmux.h>
-#include <mach/arria10-reset-manager.h>
-#include <mach/arria10-system-manager.h>
-#include <mach/generic.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-clock-manager.h>
+#include <mach/socfpga/arria10-pinmux.h>
+#include <mach/socfpga/arria10-reset-manager.h>
+#include <mach/socfpga/arria10-system-manager.h>
+#include <mach/socfpga/generic.h>
#include <asm/io.h>
#include <asm/cache-l2x0.h>
#include <asm/errata.h>
diff --git a/arch/arm/mach-socfpga/arria10-reset-manager.c b/arch/arm/mach-socfpga/arria10-reset-manager.c
index 76adc1702c..05440cf903 100644
--- a/arch/arm/mach-socfpga/arria10-reset-manager.c
+++ b/arch/arm/mach-socfpga/arria10-reset-manager.c
@@ -8,11 +8,11 @@
#include <bootsource.h>
#include <errno.h>
#include <io.h>
-#include <mach/generic.h>
-#include <mach/arria10-pinmux.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-reset-manager.h>
-#include <mach/arria10-system-manager.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/arria10-pinmux.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-reset-manager.h>
+#include <mach/socfpga/arria10-system-manager.h>
void arria10_reset_peripherals(void)
{
diff --git a/arch/arm/mach-socfpga/arria10-sdram.c b/arch/arm/mach-socfpga/arria10-sdram.c
index a6eb63299a..70d4edd973 100644
--- a/arch/arm/mach-socfpga/arria10-sdram.c
+++ b/arch/arm/mach-socfpga/arria10-sdram.c
@@ -7,10 +7,10 @@
#include <common.h>
#include <io.h>
#include <debug_ll.h>
-#include <mach/generic.h>
-#include <mach/arria10-sdram.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-reset-manager.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/arria10-sdram.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-reset-manager.h>
/* FAWBANK - Number of Bank of a given device involved in the FAW period. */
diff --git a/arch/arm/mach-socfpga/arria10-xload-emmc.c b/arch/arm/mach-socfpga/arria10-xload-emmc.c
index 98d219b6ef..ed24faf9bf 100644
--- a/arch/arm/mach-socfpga/arria10-xload-emmc.c
+++ b/arch/arm/mach-socfpga/arria10-xload-emmc.c
@@ -3,10 +3,10 @@
#include <common.h>
#include <init.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-system-manager.h>
-#include <mach/arria10-xload.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-system-manager.h>
+#include <mach/socfpga/arria10-xload.h>
#include <mci.h>
#include "../../../drivers/mci/sdhci.h"
#include "../../../drivers/mci/dw_mmc.h"
diff --git a/arch/arm/mach-socfpga/arria10-xload.c b/arch/arm/mach-socfpga/arria10-xload.c
index fb92c01ddb..9d54a1de58 100644
--- a/arch/arm/mach-socfpga/arria10-xload.c
+++ b/arch/arm/mach-socfpga/arria10-xload.c
@@ -8,12 +8,12 @@
#include <filetype.h>
#include <io.h>
#include <asm/unaligned.h>
-#include <mach/arria10-pinmux.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-system-manager.h>
-#include <mach/arria10-fpga.h>
-#include <mach/arria10-xload.h>
-#include <mach/generic.h>
+#include <mach/socfpga/arria10-pinmux.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-system-manager.h>
+#include <mach/socfpga/arria10-fpga.h>
+#include <mach/socfpga/arria10-xload.h>
+#include <mach/socfpga/generic.h>
#include <linux/sizes.h>
int a10_update_bits(unsigned int reg, unsigned int mask,
diff --git a/arch/arm/mach-socfpga/cpu_init.c b/arch/arm/mach-socfpga/cpu_init.c
index 1e0df1f6a5..73b69c34c5 100644
--- a/arch/arm/mach-socfpga/cpu_init.c
+++ b/arch/arm/mach-socfpga/cpu_init.c
@@ -3,7 +3,7 @@
#include <common.h>
#include <asm/barebox-arm-head.h>
#include <asm/errata.h>
-#include <mach/init.h>
+#include <mach/socfpga/init.h>
void arria10_cpu_lowlevel_init(void)
{
diff --git a/arch/arm/mach-socfpga/cyclone5-bootsource.c b/arch/arm/mach-socfpga/cyclone5-bootsource.c
index ab18d03302..d69eb65ce4 100644
--- a/arch/arm/mach-socfpga/cyclone5-bootsource.c
+++ b/arch/arm/mach-socfpga/cyclone5-bootsource.c
@@ -16,9 +16,9 @@
#include <environment.h>
#include <init.h>
#include <io.h>
-#include <mach/cyclone5-system-manager.h>
-#include <mach/cyclone5-regs.h>
-#include <mach/arria10-system-manager.h>
+#include <mach/socfpga/cyclone5-system-manager.h>
+#include <mach/socfpga/cyclone5-regs.h>
+#include <mach/socfpga/arria10-system-manager.h>
#define CYCLONE5_SYSMGR_BOOTINFO 0x14
diff --git a/arch/arm/mach-socfpga/cyclone5-clock-manager.c b/arch/arm/mach-socfpga/cyclone5-clock-manager.c
index 79c8b6bf28..06ca1af22c 100644
--- a/arch/arm/mach-socfpga/cyclone5-clock-manager.c
+++ b/arch/arm/mach-socfpga/cyclone5-clock-manager.c
@@ -17,9 +17,9 @@
#include <common.h>
#include <io.h>
-#include <mach/cyclone5-clock-manager.h>
-#include <mach/cyclone5-regs.h>
-#include <mach/generic.h>
+#include <mach/socfpga/cyclone5-clock-manager.h>
+#include <mach/socfpga/cyclone5-regs.h>
+#include <mach/socfpga/generic.h>
static inline void cm_wait_for_lock(void __iomem *cm, uint32_t mask)
{
diff --git a/arch/arm/mach-socfpga/cyclone5-freeze-controller.c b/arch/arm/mach-socfpga/cyclone5-freeze-controller.c
index 87160161b0..53fb6a2b50 100644
--- a/arch/arm/mach-socfpga/cyclone5-freeze-controller.c
+++ b/arch/arm/mach-socfpga/cyclone5-freeze-controller.c
@@ -17,8 +17,8 @@
#include <common.h>
#include <io.h>
-#include <mach/generic.h>
-#include <mach/cyclone5-freeze-controller.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/cyclone5-freeze-controller.h>
#define SYSMGR_FRZCTRL_LOOP_PARAM (1000)
#define SYSMGR_FRZCTRL_DELAY_LOOP_PARAM (10)
diff --git a/arch/arm/mach-socfpga/cyclone5-generic.c b/arch/arm/mach-socfpga/cyclone5-generic.c
index 5931653a63..ae8142b31c 100644
--- a/arch/arm/mach-socfpga/cyclone5-generic.c
+++ b/arch/arm/mach-socfpga/cyclone5-generic.c
@@ -12,11 +12,11 @@
#include <linux/stat.h>
#include <linux/sizes.h>
#include <asm/memory.h>
-#include <mach/cyclone5-system-manager.h>
-#include <mach/cyclone5-reset-manager.h>
-#include <mach/cyclone5-regs.h>
-#include <mach/generic.h>
-#include <mach/nic301.h>
+#include <mach/socfpga/cyclone5-system-manager.h>
+#include <mach/socfpga/cyclone5-reset-manager.h>
+#include <mach/socfpga/cyclone5-regs.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/nic301.h>
#include <platform_data/dw_mmc.h>
#include <platform_data/serial-ns16550.h>
#include <platform_data/cadence_qspi.h>
diff --git a/arch/arm/mach-socfpga/cyclone5-init.c b/arch/arm/mach-socfpga/cyclone5-init.c
index 68fd02430c..79a9b15d87 100644
--- a/arch/arm/mach-socfpga/cyclone5-init.c
+++ b/arch/arm/mach-socfpga/cyclone5-init.c
@@ -4,12 +4,12 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/cyclone5-freeze-controller.h>
-#include <mach/cyclone5-system-manager.h>
-#include <mach/cyclone5-clock-manager.h>
-#include <mach/cyclone5-reset-manager.h>
-#include <mach/cyclone5-scan-manager.h>
-#include <mach/generic.h>
+#include <mach/socfpga/cyclone5-freeze-controller.h>
+#include <mach/socfpga/cyclone5-system-manager.h>
+#include <mach/socfpga/cyclone5-clock-manager.h>
+#include <mach/socfpga/cyclone5-reset-manager.h>
+#include <mach/socfpga/cyclone5-scan-manager.h>
+#include <mach/socfpga/generic.h>
void socfpga_lowlevel_init(struct socfpga_cm_config *cm_config,
struct socfpga_io_config *io_config)
diff --git a/arch/arm/mach-socfpga/cyclone5-reset-manager.c b/arch/arm/mach-socfpga/cyclone5-reset-manager.c
index 4ee90b1bb0..5ddf379e3d 100644
--- a/arch/arm/mach-socfpga/cyclone5-reset-manager.c
+++ b/arch/arm/mach-socfpga/cyclone5-reset-manager.c
@@ -19,8 +19,8 @@
#include <io.h>
#include <init.h>
#include <restart.h>
-#include <mach/cyclone5-regs.h>
-#include <mach/cyclone5-reset-manager.h>
+#include <mach/socfpga/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-reset-manager.h>
/* Write the reset manager register to cause reset */
static void __noreturn socfpga_restart_soc(struct restart_handler *rst)
diff --git a/arch/arm/mach-socfpga/cyclone5-scan-manager.c b/arch/arm/mach-socfpga/cyclone5-scan-manager.c
index cf076c3885..0978ed832f 100644
--- a/arch/arm/mach-socfpga/cyclone5-scan-manager.c
+++ b/arch/arm/mach-socfpga/cyclone5-scan-manager.c
@@ -17,8 +17,8 @@
#include <common.h>
#include <io.h>
-#include <mach/cyclone5-freeze-controller.h>
-#include <mach/cyclone5-scan-manager.h>
+#include <mach/socfpga/cyclone5-freeze-controller.h>
+#include <mach/socfpga/cyclone5-scan-manager.h>
/*
* @fn scan_mgr_io_scan_chain_engine_is_idle
diff --git a/arch/arm/mach-socfpga/cyclone5-system-manager.c b/arch/arm/mach-socfpga/cyclone5-system-manager.c
index 7e86692c39..aab2813da5 100644
--- a/arch/arm/mach-socfpga/cyclone5-system-manager.c
+++ b/arch/arm/mach-socfpga/cyclone5-system-manager.c
@@ -17,8 +17,8 @@
#include <common.h>
#include <io.h>
-#include <mach/cyclone5-system-manager.h>
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-system-manager.h>
+#include <mach/socfpga/cyclone5-regs.h>
void socfpga_sysmgr_pinmux_init(unsigned long *sys_mgr_init_table, int num)
{
diff --git a/arch/arm/mach-socfpga/nic301.c b/arch/arm/mach-socfpga/nic301.c
index 7069c6e5b9..9b33a19687 100644
--- a/arch/arm/mach-socfpga/nic301.c
+++ b/arch/arm/mach-socfpga/nic301.c
@@ -17,8 +17,8 @@
#include <common.h>
#include <io.h>
-#include <mach/nic301.h>
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/nic301.h>
+#include <mach/socfpga/cyclone5-regs.h>
/*
* Convert all slave from secure to non secure
diff --git a/arch/arm/mach-socfpga/xload.c b/arch/arm/mach-socfpga/xload.c
index 81c1a74886..5ae4eeb331 100644
--- a/arch/arm/mach-socfpga/xload.c
+++ b/arch/arm/mach-socfpga/xload.c
@@ -16,9 +16,9 @@
#include <linux/stat.h>
#include <linux/clk.h>
-#include <mach/generic.h>
-#include <mach/cyclone5-system-manager.h>
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/generic.h>
+#include <mach/socfpga/cyclone5-system-manager.h>
+#include <mach/socfpga/cyclone5-regs.h>
static struct socfpga_barebox_part default_parts[] = {
{
diff --git a/drivers/clk/socfpga/clk-gate-a10.c b/drivers/clk/socfpga/clk-gate-a10.c
index cbdec98fc6..a78732124e 100644
--- a/drivers/clk/socfpga/clk-gate-a10.c
+++ b/drivers/clk/socfpga/clk-gate-a10.c
@@ -9,8 +9,8 @@
#include <regmap.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
-#include <mach/arria10-regs.h>
-#include <mach/arria10-system-manager.h>
+#include <mach/socfpga/arria10-regs.h>
+#include <mach/socfpga/arria10-system-manager.h>
#include "clk.h"
diff --git a/drivers/firmware/socfpga.c b/drivers/firmware/socfpga.c
index b6bc15785b..4655559c7a 100644
--- a/drivers/firmware/socfpga.c
+++ b/drivers/firmware/socfpga.c
@@ -14,10 +14,10 @@
#include <fcntl.h>
#include <init.h>
#include <io.h>
-#include <mach/cyclone5-system-manager.h>
-#include <mach/cyclone5-reset-manager.h>
-#include <mach/cyclone5-regs.h>
-#include <mach/cyclone5-sdram.h>
+#include <mach/socfpga/cyclone5-system-manager.h>
+#include <mach/socfpga/cyclone5-reset-manager.h>
+#include <mach/socfpga/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-sdram.h>
#include <asm/fncpy.h>
#include <mmu.h>
#include <asm/cache.h>
diff --git a/arch/arm/mach-socfpga/include/mach/arria10-clock-manager.h b/include/mach/socfpga/arria10-clock-manager.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/arria10-clock-manager.h
rename to include/mach/socfpga/arria10-clock-manager.h
diff --git a/arch/arm/mach-socfpga/include/mach/arria10-fpga.h b/include/mach/socfpga/arria10-fpga.h
similarity index 98%
rename from arch/arm/mach-socfpga/include/mach/arria10-fpga.h
rename to include/mach/socfpga/arria10-fpga.h
index 2e29c864f6..3efad9a4f5 100644
--- a/arch/arm/mach-socfpga/include/mach/arria10-fpga.h
+++ b/include/mach/socfpga/arria10-fpga.h
@@ -20,7 +20,7 @@
#define __A10_FPGAMGR_H__
#include <linux/bitops.h>
-#include <mach/arria10-regs.h>
+#include <mach/socfpga/arria10-regs.h>
#define A10_FPGAMGR_DCLKCNT_OFST 0x08
#define A10_FPGAMGR_DCLKSTAT_OFST 0x0c
diff --git a/arch/arm/mach-socfpga/include/mach/arria10-pinmux.h b/include/mach/socfpga/arria10-pinmux.h
similarity index 99%
rename from arch/arm/mach-socfpga/include/mach/arria10-pinmux.h
rename to include/mach/socfpga/arria10-pinmux.h
index 979e4769db..1b04915d58 100644
--- a/arch/arm/mach-socfpga/include/mach/arria10-pinmux.h
+++ b/include/mach/socfpga/arria10-pinmux.h
@@ -16,7 +16,7 @@
#ifndef _ARRIA10_PINMUX_H_
#define _ARRIA10_PINMUX_H_
-#include <mach/arria10-regs.h>
+#include <mach/socfpga/arria10-regs.h>
#define ARRIA10_PINMUX_SHARED_IO_Q1_1_ADDR ARRIA10_PINMUX_SHARED_3V_IO_GRP_ADDR + 0x00
#define ARRIA10_PINMUX_SHARED_IO_Q1_2_ADDR ARRIA10_PINMUX_SHARED_3V_IO_GRP_ADDR + 0x04
diff --git a/arch/arm/mach-socfpga/include/mach/arria10-regs.h b/include/mach/socfpga/arria10-regs.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/arria10-regs.h
rename to include/mach/socfpga/arria10-regs.h
diff --git a/arch/arm/mach-socfpga/include/mach/arria10-reset-manager.h b/include/mach/socfpga/arria10-reset-manager.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/arria10-reset-manager.h
rename to include/mach/socfpga/arria10-reset-manager.h
diff --git a/arch/arm/mach-socfpga/include/mach/arria10-sdram.h b/include/mach/socfpga/arria10-sdram.h
similarity index 99%
rename from arch/arm/mach-socfpga/include/mach/arria10-sdram.h
rename to include/mach/socfpga/arria10-sdram.h
index 07e4dd0130..55eba6b835 100644
--- a/arch/arm/mach-socfpga/include/mach/arria10-sdram.h
+++ b/include/mach/socfpga/arria10-sdram.h
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0
*/
-#include <mach/arria10-system-manager.h>
+#include <mach/socfpga/arria10-system-manager.h>
#ifndef _ARRIA10_SDRAM_H_
#define _ARRIA10_SDRAM_H_
diff --git a/arch/arm/mach-socfpga/include/mach/arria10-system-manager.h b/include/mach/socfpga/arria10-system-manager.h
similarity index 99%
rename from arch/arm/mach-socfpga/include/mach/arria10-system-manager.h
rename to include/mach/socfpga/arria10-system-manager.h
index 9117a93b18..f92025ae32 100644
--- a/arch/arm/mach-socfpga/include/mach/arria10-system-manager.h
+++ b/include/mach/socfpga/arria10-system-manager.h
@@ -7,7 +7,7 @@
#ifndef _ARRIA10_SYSTEM_MANAGER_H_
#define _ARRIA10_SYSTEM_MANAGER_H_
-#include <mach/arria10-regs.h>
+#include <mach/socfpga/arria10-regs.h>
#define ARRIA10_SYSMGR_SILICONID1 (ARRIA10_SYSMGR_ADDR + 0x00)
#define ARRIA10_SYSMGR_SILICONID2 (ARRIA10_SYSMGR_ADDR + 0x04)
diff --git a/arch/arm/mach-socfpga/include/mach/arria10-xload.h b/include/mach/socfpga/arria10-xload.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/arria10-xload.h
rename to include/mach/socfpga/arria10-xload.h
diff --git a/arch/arm/mach-socfpga/include/mach/barebox-arm-head.h b/include/mach/socfpga/barebox-arm-head.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/barebox-arm-head.h
rename to include/mach/socfpga/barebox-arm-head.h
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-clock-manager.h b/include/mach/socfpga/cyclone5-clock-manager.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-clock-manager.h
rename to include/mach/socfpga/cyclone5-clock-manager.h
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-freeze-controller.h b/include/mach/socfpga/cyclone5-freeze-controller.h
similarity index 98%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-freeze-controller.h
rename to include/mach/socfpga/cyclone5-freeze-controller.h
index 93ce5152ed..ff22b78c1a 100644
--- a/arch/arm/mach-socfpga/include/mach/cyclone5-freeze-controller.h
+++ b/include/mach/socfpga/cyclone5-freeze-controller.h
@@ -18,7 +18,7 @@
#ifndef _CYCLONE5_FREEZE_CONTROLLER_H_
#define _CYCLONE5_FREEZE_CONTROLLER_H_
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-regs.h>
#define SYSMGR_FRZCTRL_ADDRESS 0x40
#define SYSMGR_FRZCTRL_VIOCTRL_ADDRESS 0x40
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-regs.h b/include/mach/socfpga/cyclone5-regs.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-regs.h
rename to include/mach/socfpga/cyclone5-regs.h
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-reset-manager.h b/include/mach/socfpga/cyclone5-reset-manager.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-reset-manager.h
rename to include/mach/socfpga/cyclone5-reset-manager.h
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-scan-manager.h b/include/mach/socfpga/cyclone5-scan-manager.h
similarity index 99%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-scan-manager.h
rename to include/mach/socfpga/cyclone5-scan-manager.h
index df720a7e08..ddafbae45c 100644
--- a/arch/arm/mach-socfpga/include/mach/cyclone5-scan-manager.h
+++ b/include/mach/socfpga/cyclone5-scan-manager.h
@@ -19,7 +19,7 @@
#define _SCAN_MANAGER_H_
#include <io.h>
-#include <mach/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-regs.h>
/***********************************************************
* *
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-sdram-config.h b/include/mach/socfpga/cyclone5-sdram-config.h
similarity index 98%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-sdram-config.h
rename to include/mach/socfpga/cyclone5-sdram-config.h
index 7b11d8d088..06f06ef5d7 100644
--- a/arch/arm/mach-socfpga/include/mach/cyclone5-sdram-config.h
+++ b/include/mach/socfpga/cyclone5-sdram-config.h
@@ -3,9 +3,9 @@
#ifndef __MACH_SDRAM_CONFIG_H
#define __MACH_SDRAM_CONFIG_H
-#include <mach/cyclone5-sdram.h>
-#include <mach/cyclone5-regs.h>
-#include <mach/cyclone5-system-manager.h>
+#include <mach/socfpga/cyclone5-sdram.h>
+#include <mach/socfpga/cyclone5-regs.h>
+#include <mach/socfpga/cyclone5-system-manager.h>
static inline void sdram_write(unsigned register_offset, unsigned val)
{
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-sdram.h b/include/mach/socfpga/cyclone5-sdram.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-sdram.h
rename to include/mach/socfpga/cyclone5-sdram.h
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-sequencer.c b/include/mach/socfpga/cyclone5-sequencer.c
similarity index 99%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-sequencer.c
rename to include/mach/socfpga/cyclone5-sequencer.c
index e5ecb0f1b8..1902559630 100644
--- a/arch/arm/mach-socfpga/include/mach/cyclone5-sequencer.c
+++ b/include/mach/socfpga/cyclone5-sequencer.c
@@ -55,7 +55,7 @@ asm(".global __alt_stack_pointer");
asm("__alt_stack_pointer = " STRINGIFY(STACK_POINTER));
#endif
-#include <mach/cyclone5-sdram.h>
+#include <mach/socfpga/cyclone5-sdram.h>
#define NEWVERSION_RDDESKEW 1
#define NEWVERSION_WRDESKEW 1
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-sequencer.h b/include/mach/socfpga/cyclone5-sequencer.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-sequencer.h
rename to include/mach/socfpga/cyclone5-sequencer.h
diff --git a/arch/arm/mach-socfpga/include/mach/cyclone5-system-manager.h b/include/mach/socfpga/cyclone5-system-manager.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/cyclone5-system-manager.h
rename to include/mach/socfpga/cyclone5-system-manager.h
diff --git a/arch/arm/mach-socfpga/include/mach/debug_ll.h b/include/mach/socfpga/debug_ll.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/debug_ll.h
rename to include/mach/socfpga/debug_ll.h
diff --git a/arch/arm/mach-socfpga/include/mach/generic.h b/include/mach/socfpga/generic.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/generic.h
rename to include/mach/socfpga/generic.h
diff --git a/arch/arm/mach-socfpga/include/mach/init.h b/include/mach/socfpga/init.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/init.h
rename to include/mach/socfpga/init.h
diff --git a/arch/arm/mach-socfpga/include/mach/lowlevel.h b/include/mach/socfpga/lowlevel.h
similarity index 91%
rename from arch/arm/mach-socfpga/include/mach/lowlevel.h
rename to include/mach/socfpga/lowlevel.h
index 8f3b682fa4..f5b8d579e1 100644
--- a/arch/arm/mach-socfpga/include/mach/lowlevel.h
+++ b/include/mach/socfpga/lowlevel.h
@@ -8,12 +8,12 @@
#include <io.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/generic.h>
+#include <mach/socfpga/generic.h>
#include <debug_ll.h>
#include <asm/cache.h>
-#include <mach/cyclone5-sdram-config.h>
-#include <mach/pll_config.h>
-#include <mach/cyclone5-sequencer.c>
+#include <mach/socfpga/cyclone5-sdram-config.h>
+#include <mach/socfpga/pll_config.h>
+#include <mach/socfpga/cyclone5-sequencer.c>
static void __noreturn start_socfpga_c5_common(uint32_t size, void *fdt_blob)
{
diff --git a/arch/arm/mach-socfpga/include/mach/nic301.h b/include/mach/socfpga/nic301.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/nic301.h
rename to include/mach/socfpga/nic301.h
diff --git a/arch/arm/mach-socfpga/include/mach/pll_config.h b/include/mach/socfpga/pll_config.h
similarity index 98%
rename from arch/arm/mach-socfpga/include/mach/pll_config.h
rename to include/mach/socfpga/pll_config.h
index ded3c0d09e..aca9ba3cdb 100644
--- a/arch/arm/mach-socfpga/include/mach/pll_config.h
+++ b/include/mach/socfpga/pll_config.h
@@ -3,7 +3,7 @@
#ifndef _MACH_SOCFPGA_PRELOADER_PLL_CONFIG_H_
#define _MACH_SOCFPGA_PRELOADER_PLL_CONFIG_H_
-#include <mach/cyclone5-clock-manager.h>
+#include <mach/socfpga/cyclone5-clock-manager.h>
static struct socfpga_cm_config cm_default_cfg = {
/* main group */
diff --git a/arch/arm/mach-socfpga/include/mach/sdram_io.h b/include/mach/socfpga/sdram_io.h
similarity index 98%
rename from arch/arm/mach-socfpga/include/mach/sdram_io.h
rename to include/mach/socfpga/sdram_io.h
index ef87bdaf63..a9056ea3d3 100644
--- a/arch/arm/mach-socfpga/include/mach/sdram_io.h
+++ b/include/mach/socfpga/sdram_io.h
@@ -26,7 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <mach/cyclone5-sdram.h>
+#include <mach/socfpga/cyclone5-sdram.h>
#define MGR_SELECT_MASK 0xf8000
diff --git a/arch/arm/mach-socfpga/include/mach/system.h b/include/mach/socfpga/system.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/system.h
rename to include/mach/socfpga/system.h
diff --git a/arch/arm/mach-socfpga/include/mach/tclrpt.h b/include/mach/socfpga/tclrpt.h
similarity index 100%
rename from arch/arm/mach-socfpga/include/mach/tclrpt.h
rename to include/mach/socfpga/tclrpt.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 15/50] ARM: pxa: Move mach header files to include/mach/pxa
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (13 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 14/50] ARM: socfpga: Move mach header files to include/mach/socfpga Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 16/50] ARM: omap: Move mach header files to include/mach/omap Sascha Hauer
` (34 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all pxa specific header files to include/mach/pxa/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/lubbock/board.c | 10 +++++-----
arch/arm/boards/lubbock/lowlevel.c | 4 ++--
arch/arm/boards/mainstone/board.c | 10 +++++-----
arch/arm/boards/mainstone/lowlevel.c | 4 ++--
arch/arm/boards/mioa701/board.c | 10 +++++-----
arch/arm/boards/phytec-phycore-pxa270/board.c | 8 ++++----
arch/arm/boards/phytec-phycore-pxa270/lowlevel_init.S | 6 +++---
arch/arm/boards/zylonite/board.c | 6 +++---
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-pxa/common.c | 2 +-
arch/arm/mach-pxa/devices.c | 4 ++--
arch/arm/mach-pxa/gpio.c | 2 +-
arch/arm/mach-pxa/mfp-pxa2xx.c | 8 ++++----
arch/arm/mach-pxa/mfp-pxa3xx.c | 6 +++---
arch/arm/mach-pxa/pxa2xx.c | 4 ++--
arch/arm/mach-pxa/pxa3xx.c | 4 ++--
arch/arm/mach-pxa/sleep.S | 4 ++--
arch/arm/mach-pxa/speed-pxa25x.c | 4 ++--
arch/arm/mach-pxa/speed-pxa27x.c | 4 ++--
arch/arm/mach-pxa/speed-pxa3xx.c | 4 ++--
drivers/mci/pxamci.c | 6 +++---
drivers/pwm/pxa_pwm.c | 8 ++++----
drivers/serial/serial_pxa.c | 2 +-
drivers/usb/gadget/pxa27x_udc.c | 4 ++--
drivers/video/pxa.c | 8 ++++----
.../mach-pxa/include/mach => include/mach/pxa}/clock.h | 0
.../include/mach => include/mach/pxa}/devices.h | 2 +-
.../mach-pxa/include/mach => include/mach/pxa}/gpio.h | 2 +-
.../include/mach => include/mach/pxa}/hardware.h | 0
.../include/mach => include/mach/pxa}/mci_pxa2xx.h | 0
.../include/mach => include/mach/pxa}/mfp-pxa27x.h | 2 +-
.../include/mach => include/mach/pxa}/mfp-pxa2xx.h | 2 +-
.../include/mach => include/mach/pxa}/mfp-pxa3xx.h | 2 +-
.../mach-pxa/include/mach => include/mach/pxa}/mfp.h | 0
.../include/mach => include/mach/pxa}/pxa-regs.h | 10 +++++-----
.../include/mach => include/mach/pxa}/pxa25x-regs.h | 0
.../include/mach => include/mach/pxa}/pxa27x-regs.h | 0
.../include/mach => include/mach/pxa}/pxa2xx-regs.h | 2 +-
.../include/mach => include/mach/pxa}/pxa3xx-regs.h | 2 +-
.../mach-pxa/include/mach => include/mach/pxa}/pxafb.h | 0
.../include/mach => include/mach/pxa}/regs-intc.h | 2 +-
.../include/mach => include/mach/pxa}/regs-lcd.h | 0
.../include/mach => include/mach/pxa}/regs-ost.h | 2 +-
.../include/mach => include/mach/pxa}/regs-pwm.h | 2 +-
.../include/mach => include/mach/pxa}/udc_pxa2xx.h | 0
45 files changed, 83 insertions(+), 81 deletions(-)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/clock.h (100%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/devices.h (97%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/gpio.h (99%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/hardware.h (100%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/mci_pxa2xx.h (100%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/mfp-pxa27x.h (99%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/mfp-pxa2xx.h (99%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/mfp-pxa3xx.h (95%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/mfp.h (100%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/pxa-regs.h (80%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/pxa25x-regs.h (100%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/pxa27x-regs.h (100%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/pxa2xx-regs.h (99%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/pxa3xx-regs.h (99%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/pxafb.h (100%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/regs-intc.h (98%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/regs-lcd.h (100%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/regs-ost.h (97%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/regs-pwm.h (93%)
rename {arch/arm/mach-pxa/include/mach => include/mach/pxa}/udc_pxa2xx.h (100%)
diff --git a/arch/arm/boards/lubbock/board.c b/arch/arm/boards/lubbock/board.c
index 9383a0c7af..dfbee7ab8b 100644
--- a/arch/arm/boards/lubbock/board.c
+++ b/arch/arm/boards/lubbock/board.c
@@ -11,11 +11,11 @@
#include <pwm.h>
#include <linux/sizes.h>
-#include <mach/devices.h>
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
-#include <mach/udc_pxa2xx.h>
-#include <mach/mci_pxa2xx.h>
+#include <mach/pxa/devices.h>
+#include <mach/pxa/mfp-pxa27x.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/udc_pxa2xx.h>
+#include <mach/pxa/mci_pxa2xx.h>
#include <platform_data/eth-smc91111.h>
#include <asm/armlinux.h>
diff --git a/arch/arm/boards/lubbock/lowlevel.c b/arch/arm/boards/lubbock/lowlevel.c
index f93a2ff47b..ef6b544a26 100644
--- a/arch/arm/boards/lubbock/lowlevel.c
+++ b/arch/arm/boards/lubbock/lowlevel.c
@@ -7,8 +7,8 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <linux/sizes.h>
-#include <mach/pxa-regs.h>
-#include <mach/regs-ost.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/regs-ost.h>
/*
* Memory settings
diff --git a/arch/arm/boards/mainstone/board.c b/arch/arm/boards/mainstone/board.c
index 2e4b634e35..fb39965c4e 100644
--- a/arch/arm/boards/mainstone/board.c
+++ b/arch/arm/boards/mainstone/board.c
@@ -11,11 +11,11 @@
#include <pwm.h>
#include <linux/sizes.h>
-#include <mach/devices.h>
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
-#include <mach/udc_pxa2xx.h>
-#include <mach/mci_pxa2xx.h>
+#include <mach/pxa/devices.h>
+#include <mach/pxa/mfp-pxa27x.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/udc_pxa2xx.h>
+#include <mach/pxa/mci_pxa2xx.h>
#include <platform_data/eth-smc91111.h>
#include <asm/armlinux.h>
diff --git a/arch/arm/boards/mainstone/lowlevel.c b/arch/arm/boards/mainstone/lowlevel.c
index 1ec1d1e028..29d12f7424 100644
--- a/arch/arm/boards/mainstone/lowlevel.c
+++ b/arch/arm/boards/mainstone/lowlevel.c
@@ -7,8 +7,8 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <linux/sizes.h>
-#include <mach/pxa-regs.h>
-#include <mach/regs-ost.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/regs-ost.h>
/*
* Memory settings
diff --git a/arch/arm/boards/mioa701/board.c b/arch/arm/boards/mioa701/board.c
index 5147750a3d..9f28f7b94b 100644
--- a/arch/arm/boards/mioa701/board.c
+++ b/arch/arm/boards/mioa701/board.c
@@ -10,11 +10,11 @@
#include <gpio.h>
#include <pwm.h>
-#include <mach/devices.h>
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
-#include <mach/udc_pxa2xx.h>
-#include <mach/mci_pxa2xx.h>
+#include <mach/pxa/devices.h>
+#include <mach/pxa/mfp-pxa27x.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/udc_pxa2xx.h>
+#include <mach/pxa/mci_pxa2xx.h>
#include <asm/armlinux.h>
#include <asm/io.h>
diff --git a/arch/arm/boards/phytec-phycore-pxa270/board.c b/arch/arm/boards/phytec-phycore-pxa270/board.c
index 5d31617c82..0862ef3a40 100644
--- a/arch/arm/boards/phytec-phycore-pxa270/board.c
+++ b/arch/arm/boards/phytec-phycore-pxa270/board.c
@@ -10,10 +10,10 @@
#include <linux/sizes.h>
#include <gpio.h>
-#include <mach/mfp-pxa27x.h>
-#include <mach/pxa-regs.h>
-#include <mach/pxafb.h>
-#include <mach/devices.h>
+#include <mach/pxa/mfp-pxa27x.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/pxafb.h>
+#include <mach/pxa/devices.h>
#include <asm/armlinux.h>
#include <asm/io.h>
diff --git a/arch/arm/boards/phytec-phycore-pxa270/lowlevel_init.S b/arch/arm/boards/phytec-phycore-pxa270/lowlevel_init.S
index 8790bdfc09..f8f1a037e0 100644
--- a/arch/arm/boards/phytec-phycore-pxa270/lowlevel_init.S
+++ b/arch/arm/boards/phytec-phycore-pxa270/lowlevel_init.S
@@ -13,9 +13,9 @@
#include <config.h>
#include <linux/sizes.h>
-#include <mach/pxa-regs.h>
-#include <mach/regs-ost.h>
-#include <mach/regs-intc.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/regs-ost.h>
+#include <mach/pxa/regs-intc.h>
#include <asm/barebox-arm-head.h>
#include "config.h"
diff --git a/arch/arm/boards/zylonite/board.c b/arch/arm/boards/zylonite/board.c
index d5b717474a..99719b738c 100644
--- a/arch/arm/boards/zylonite/board.c
+++ b/arch/arm/boards/zylonite/board.c
@@ -16,9 +16,9 @@
#include <linux/clkdev.h>
#include <linux/sizes.h>
-#include <mach/devices.h>
-#include <mach/mfp-pxa3xx.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/devices.h>
+#include <mach/pxa/mfp-pxa3xx.h>
+#include <mach/pxa/pxa-regs.h>
#include <asm/armlinux.h>
#include <asm/io.h>
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 0c1f22e819..acc6be7e8f 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -34,6 +34,8 @@
#include <mach/uemd/debug_ll.h>
#elif defined CONFIG_ARCH_SOCFPGA
#include <mach/socfpga/debug_ll.h>
+#elif defined CONFIG_ARCH_PXA
+#include <mach/pxa/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-pxa/common.c b/arch/arm/mach-pxa/common.c
index 5b980cb81b..e0bf1de461 100644
--- a/arch/arm/mach-pxa/common.c
+++ b/arch/arm/mach-pxa/common.c
@@ -15,7 +15,7 @@
#include <common.h>
#include <init.h>
#include <restart.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/pxa-regs.h>
#include <asm/io.h>
#define OSMR3 0x40A0000C
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 4c43f6374e..b5d098bd91 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -14,8 +14,8 @@
*/
#include <common.h>
#include <driver.h>
-#include <mach/devices.h>
-#include <mach/pxafb.h>
+#include <mach/pxa/devices.h>
+#include <mach/pxa/pxafb.h>
static inline struct device *pxa_add_device(char *name, int id, void *base,
int size, void *pdata)
diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
index ebda6bbe2a..130faa404b 100644
--- a/arch/arm/mach-pxa/gpio.c
+++ b/arch/arm/mach-pxa/gpio.c
@@ -14,7 +14,7 @@
#include <errno.h>
#include <gpio.h>
-#include <mach/gpio.h>
+#include <mach/pxa/gpio.h>
#include <asm/io.h>
int pxa_last_gpio;
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index 2456cef936..aca46c45b3 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -17,10 +17,10 @@
#include <errno.h>
#include <init.h>
-#include <mach/gpio.h>
-#include <mach/hardware.h>
-#include <mach/mfp-pxa2xx.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/gpio.h>
+#include <mach/pxa/hardware.h>
+#include <mach/pxa/mfp-pxa2xx.h>
+#include <mach/pxa/pxa-regs.h>
#define PGSR(x) __REG2(0x40F00020, (x) << 2)
#define __GAFR(u, x) __REG2((u) ? 0x40E00058 : 0x40E00054, (x) << 3)
diff --git a/arch/arm/mach-pxa/mfp-pxa3xx.c b/arch/arm/mach-pxa/mfp-pxa3xx.c
index af80ab24ad..7f9e5113b8 100644
--- a/arch/arm/mach-pxa/mfp-pxa3xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa3xx.c
@@ -16,9 +16,9 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/hardware.h>
-#include <mach/mfp-pxa3xx.h>
-#include <mach/mfp.h>
+#include <mach/pxa/hardware.h>
+#include <mach/pxa/mfp-pxa3xx.h>
+#include <mach/pxa/mfp.h>
#define MFPR_SIZE (PAGE_SIZE)
diff --git a/arch/arm/mach-pxa/pxa2xx.c b/arch/arm/mach-pxa/pxa2xx.c
index e28378e6db..496ceb39d5 100644
--- a/arch/arm/mach-pxa/pxa2xx.c
+++ b/arch/arm/mach-pxa/pxa2xx.c
@@ -16,8 +16,8 @@
#include <init.h>
#include <poweroff.h>
#include <reset_source.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/hardware.h>
+#include <mach/pxa/pxa-regs.h>
extern void pxa_suspend(int mode);
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index ccfd952b5e..ec49983962 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -16,8 +16,8 @@
#include <init.h>
#include <poweroff.h>
#include <reset_source.h>
-#include <mach/hardware.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/hardware.h>
+#include <mach/pxa/pxa-regs.h>
extern void pxa3xx_suspend(int mode);
diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S
index 1c678158c9..3d12dc54de 100644
--- a/arch/arm/mach-pxa/sleep.S
+++ b/arch/arm/mach-pxa/sleep.S
@@ -13,8 +13,8 @@
#include <linux/linkage.h>
#include <asm/assembler.h>
-#include <mach/hardware.h>
-#include <mach/pxa2xx-regs.h>
+#include <mach/pxa/hardware.h>
+#include <mach/pxa/pxa2xx-regs.h>
#define MDREFR_KDIV 0x200a4000 // all banks
#define CCCR_SLEEP 0x00000107 // L=7 2N=2 A=0 PPDIS=0 CPDIS=0
diff --git a/arch/arm/mach-pxa/speed-pxa25x.c b/arch/arm/mach-pxa/speed-pxa25x.c
index 69143431e4..de3d5c251c 100644
--- a/arch/arm/mach-pxa/speed-pxa25x.c
+++ b/arch/arm/mach-pxa/speed-pxa25x.c
@@ -8,8 +8,8 @@
*/
#include <common.h>
-#include <mach/clock.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/clock.h>
+#include <mach/pxa/pxa-regs.h>
/* Crystal clock: 13MHz */
#define BASE_CLK 13000000
diff --git a/arch/arm/mach-pxa/speed-pxa27x.c b/arch/arm/mach-pxa/speed-pxa27x.c
index 1de034c677..5441dc3d70 100644
--- a/arch/arm/mach-pxa/speed-pxa27x.c
+++ b/arch/arm/mach-pxa/speed-pxa27x.c
@@ -8,8 +8,8 @@
*/
#include <common.h>
-#include <mach/clock.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/clock.h>
+#include <mach/pxa/pxa-regs.h>
/* Crystal clock: 13MHz */
#define BASE_CLK 13000000
diff --git a/arch/arm/mach-pxa/speed-pxa3xx.c b/arch/arm/mach-pxa/speed-pxa3xx.c
index b24b7a8fc3..2579966f41 100644
--- a/arch/arm/mach-pxa/speed-pxa3xx.c
+++ b/arch/arm/mach-pxa/speed-pxa3xx.c
@@ -11,8 +11,8 @@
#include <init.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
-#include <mach/clock.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/clock.h>
+#include <mach/pxa/pxa-regs.h>
/* Crystal clock: 13MHz */
#define BASE_CLK 13000000
diff --git a/drivers/mci/pxamci.c b/drivers/mci/pxamci.c
index d5807c0fc9..8d8e9e88bb 100644
--- a/drivers/mci/pxamci.c
+++ b/drivers/mci/pxamci.c
@@ -15,9 +15,9 @@
#include <mci.h>
#include <linux/err.h>
-#include <mach/clock.h>
-#include <mach/mci_pxa2xx.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/clock.h>
+#include <mach/pxa/mci_pxa2xx.h>
+#include <mach/pxa/pxa-regs.h>
#include "pxamci.h"
#define DRIVER_NAME "pxa-mmc"
diff --git a/drivers/pwm/pxa_pwm.c b/drivers/pwm/pxa_pwm.c
index 305dc06bdd..0ed69d999f 100644
--- a/drivers/pwm/pxa_pwm.c
+++ b/drivers/pwm/pxa_pwm.c
@@ -13,10 +13,10 @@
#include <io.h>
#include <pwm.h>
-#include <mach/hardware.h>
-#include <mach/clock.h>
-#include <mach/pxa-regs.h>
-#include <mach/regs-pwm.h>
+#include <mach/pxa/hardware.h>
+#include <mach/pxa/clock.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/regs-pwm.h>
#include <linux/math64.h>
#include <linux/compiler.h>
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c
index 9a591a0be8..97342f923e 100644
--- a/drivers/serial/serial_pxa.c
+++ b/drivers/serial/serial_pxa.c
@@ -9,7 +9,7 @@
#include <init.h>
#include <malloc.h>
-#include <mach/clock.h>
+#include <mach/pxa/clock.h>
#include <asm/io.h>
#define RBR 0x00 /* Receive Buffer Register (read only) */
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index bae0a40642..e5e2ca2b7c 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -18,8 +18,8 @@
#include <usb/gadget.h>
#include "pxa27x_udc.h"
-#include <mach/udc_pxa2xx.h>
-#include <mach/pxa-regs.h>
+#include <mach/pxa/udc_pxa2xx.h>
+#include <mach/pxa/pxa-regs.h>
#define DRIVER_VERSION "2008-04-18"
#define DRIVER_DESC "PXA 27x USB Device Controller driver"
diff --git a/drivers/video/pxa.c b/drivers/video/pxa.c
index 99aa435bbe..561a73fb32 100644
--- a/drivers/video/pxa.c
+++ b/drivers/video/pxa.c
@@ -23,10 +23,10 @@
#include <malloc.h>
#include <linux/err.h>
-#include <mach/clock.h>
-#include <mach/pxa-regs.h>
-#include <mach/regs-lcd.h>
-#include <mach/pxafb.h>
+#include <mach/pxa/clock.h>
+#include <mach/pxa/pxa-regs.h>
+#include <mach/pxa/regs-lcd.h>
+#include <mach/pxa/pxafb.h>
#include <asm/io.h>
#include <linux/math64.h>
diff --git a/arch/arm/mach-pxa/include/mach/clock.h b/include/mach/pxa/clock.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/clock.h
rename to include/mach/pxa/clock.h
diff --git a/arch/arm/mach-pxa/include/mach/devices.h b/include/mach/pxa/devices.h
similarity index 97%
rename from arch/arm/mach-pxa/include/mach/devices.h
rename to include/mach/pxa/devices.h
index a50a1862d0..e4d1d07091 100644
--- a/arch/arm/mach-pxa/include/mach/devices.h
+++ b/include/mach/pxa/devices.h
@@ -13,7 +13,7 @@
*
*/
#include <i2c/i2c.h>
-#include <mach/pxafb.h>
+#include <mach/pxa/pxafb.h>
struct device *pxa_add_i2c(void *base, int id,
struct i2c_platform_data *pdata);
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/include/mach/pxa/gpio.h
similarity index 99%
rename from arch/arm/mach-pxa/include/mach/gpio.h
rename to include/mach/pxa/gpio.h
index d8eac99fbc..06e6f3e42b 100644
--- a/arch/arm/mach-pxa/include/mach/gpio.h
+++ b/include/mach/pxa/gpio.h
@@ -20,7 +20,7 @@
#ifndef __ASM_ARCH_PXA_GPIO_H
#define __ASM_ARCH_PXA_GPIO_H
-#include <mach/hardware.h>
+#include <mach/pxa/hardware.h>
#define GPIO_REGS_VIRT (0x40E00000)
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/include/mach/pxa/hardware.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/hardware.h
rename to include/mach/pxa/hardware.h
diff --git a/arch/arm/mach-pxa/include/mach/mci_pxa2xx.h b/include/mach/pxa/mci_pxa2xx.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/mci_pxa2xx.h
rename to include/mach/pxa/mci_pxa2xx.h
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/include/mach/pxa/mfp-pxa27x.h
similarity index 99%
rename from arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
rename to include/mach/pxa/mfp-pxa27x.h
index 5db786a85a..6193a440cb 100644
--- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
+++ b/include/mach/pxa/mfp-pxa27x.h
@@ -10,7 +10,7 @@
* specific controller, and this should work in most cases.
*/
-#include <mach/mfp-pxa2xx.h>
+#include <mach/pxa/mfp-pxa2xx.h>
/* Note: GPIO3/GPIO4 will be driven by Power I2C when PCFR/PI2C_EN
* bit is set, regardless of the GPIO configuration
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h b/include/mach/pxa/mfp-pxa2xx.h
similarity index 99%
rename from arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
rename to include/mach/pxa/mfp-pxa2xx.h
index 2713d4cc9f..00bae5e063 100644
--- a/arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h
+++ b/include/mach/pxa/mfp-pxa2xx.h
@@ -3,7 +3,7 @@
#ifndef __ASM_ARCH_MFP_PXA2XX_H
#define __ASM_ARCH_MFP_PXA2XX_H
-#include <mach/mfp.h>
+#include <mach/pxa/mfp.h>
/*
* the following MFP_xxx bit definitions in mfp.h are re-used for pxa2xx:
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h b/include/mach/pxa/mfp-pxa3xx.h
similarity index 95%
rename from arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h
rename to include/mach/pxa/mfp-pxa3xx.h
index 8e4af7cde8..9d5c4b6215 100644
--- a/arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h
+++ b/include/mach/pxa/mfp-pxa3xx.h
@@ -3,7 +3,7 @@
#ifndef __ASM_ARCH_MFP_PXA3XX_H
#define __ASM_ARCH_MFP_PXA3XX_H
-#include <mach/mfp.h>
+#include <mach/pxa/mfp.h>
#define MFPR_BASE (0x40e10000)
diff --git a/arch/arm/mach-pxa/include/mach/mfp.h b/include/mach/pxa/mfp.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/mfp.h
rename to include/mach/pxa/mfp.h
diff --git a/arch/arm/mach-pxa/include/mach/pxa-regs.h b/include/mach/pxa/pxa-regs.h
similarity index 80%
rename from arch/arm/mach-pxa/include/mach/pxa-regs.h
rename to include/mach/pxa/pxa-regs.h
index 9bcb5efb7f..55bfae67be 100644
--- a/arch/arm/mach-pxa/include/mach/pxa-regs.h
+++ b/include/mach/pxa/pxa-regs.h
@@ -21,17 +21,17 @@
#endif
#ifdef CONFIG_ARCH_PXA2XX
-# include <mach/pxa2xx-regs.h>
+#include <mach/pxa/pxa2xx-regs.h>
#endif
#if defined(CONFIG_ARCH_PXA27X)
-# include <mach/pxa27x-regs.h>
+#include <mach/pxa/pxa27x-regs.h>
#elif defined(CONFIG_ARCH_PXA3XX)
-# include <mach/pxa3xx-regs.h>
+#include <mach/pxa/pxa3xx-regs.h>
#elif defined(CONFIG_ARCH_PXA25X)
-# include <mach/pxa25x-regs.h>
+#include <mach/pxa/pxa25x-regs.h>
#else
-# error "unknown PXA soc type"
+#error "unknown PXA soc type"
#endif
#endif /* !__MACH_PXA_REGS_H */
diff --git a/arch/arm/mach-pxa/include/mach/pxa25x-regs.h b/include/mach/pxa/pxa25x-regs.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/pxa25x-regs.h
rename to include/mach/pxa/pxa25x-regs.h
diff --git a/arch/arm/mach-pxa/include/mach/pxa27x-regs.h b/include/mach/pxa/pxa27x-regs.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/pxa27x-regs.h
rename to include/mach/pxa/pxa27x-regs.h
diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h b/include/mach/pxa/pxa2xx-regs.h
similarity index 99%
rename from arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
rename to include/mach/pxa/pxa2xx-regs.h
index dc7704eda2..9e5aeb467d 100644
--- a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h
+++ b/include/mach/pxa/pxa2xx-regs.h
@@ -14,7 +14,7 @@
#ifndef __PXA2XX_REGS_H
#define __PXA2XX_REGS_H
-#include <mach/hardware.h>
+#include <mach/pxa/hardware.h>
/*
* PXA Chip selects
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h b/include/mach/pxa/pxa3xx-regs.h
similarity index 99%
rename from arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
rename to include/mach/pxa/pxa3xx-regs.h
index 373711d92f..0ecdb6ae87 100644
--- a/arch/arm/mach-pxa/include/mach/pxa3xx-regs.h
+++ b/include/mach/pxa/pxa3xx-regs.h
@@ -13,7 +13,7 @@
#ifndef __MACH_PXA3XX_REGS
#define __MACH_PXA3XX_REGS
-#include <mach/hardware.h>
+#include <mach/pxa/hardware.h>
/*
* Oscillator Configuration Register (OSCC)
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/include/mach/pxa/pxafb.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/pxafb.h
rename to include/mach/pxa/pxafb.h
diff --git a/arch/arm/mach-pxa/include/mach/regs-intc.h b/include/mach/pxa/regs-intc.h
similarity index 98%
rename from arch/arm/mach-pxa/include/mach/regs-intc.h
rename to include/mach/pxa/regs-intc.h
index 91760b2678..b247feada4 100644
--- a/arch/arm/mach-pxa/include/mach/regs-intc.h
+++ b/include/mach/pxa/regs-intc.h
@@ -3,7 +3,7 @@
#ifndef __ASM_MACH_REGS_INTC_H
#define __ASM_MACH_REGS_INTC_H
-#include <mach/hardware.h>
+#include <mach/pxa/hardware.h>
/*
* Interrupt Controller
diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/include/mach/pxa/regs-lcd.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/regs-lcd.h
rename to include/mach/pxa/regs-lcd.h
diff --git a/arch/arm/mach-pxa/include/mach/regs-ost.h b/include/mach/pxa/regs-ost.h
similarity index 97%
rename from arch/arm/mach-pxa/include/mach/regs-ost.h
rename to include/mach/pxa/regs-ost.h
index aefdee44f8..6a81c92548 100644
--- a/arch/arm/mach-pxa/include/mach/regs-ost.h
+++ b/include/mach/pxa/regs-ost.h
@@ -3,7 +3,7 @@
#ifndef __ASM_MACH_REGS_OST_H
#define __ASM_MACH_REGS_OST_H
-#include <mach/hardware.h>
+#include <mach/pxa/hardware.h>
/*
* OS Timer & Match Registers
diff --git a/arch/arm/mach-pxa/include/mach/regs-pwm.h b/include/mach/pxa/regs-pwm.h
similarity index 93%
rename from arch/arm/mach-pxa/include/mach/regs-pwm.h
rename to include/mach/pxa/regs-pwm.h
index 9fdcbb64ae..773a4e257c 100644
--- a/arch/arm/mach-pxa/include/mach/regs-pwm.h
+++ b/include/mach/pxa/regs-pwm.h
@@ -7,7 +7,7 @@
#ifndef __ASM_MACH_REGS_PWM_H
#define __ASM_MACH_REGS_PWM_H
-#include <mach/hardware.h>
+#include <mach/pxa/hardware.h>
/*
* Pulse modulator registers
diff --git a/arch/arm/mach-pxa/include/mach/udc_pxa2xx.h b/include/mach/pxa/udc_pxa2xx.h
similarity index 100%
rename from arch/arm/mach-pxa/include/mach/udc_pxa2xx.h
rename to include/mach/pxa/udc_pxa2xx.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 16/50] ARM: omap: Move mach header files to include/mach/omap
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (14 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 15/50] ARM: pxa: Move mach header files to include/mach/pxa Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 17/50] ARM: nomadik: Move mach header files to include/mach/nomadik Sascha Hauer
` (33 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all omap specific header files to include/mach/omap/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/afi-gf/board.c | 4 ++--
arch/arm/boards/afi-gf/lowlevel.c | 18 +++++++--------
arch/arm/boards/archosg9/board.c | 8 +++----
arch/arm/boards/archosg9/lowlevel.c | 12 +++++-----
arch/arm/boards/archosg9/mux.c | 6 ++---
arch/arm/boards/beagle/board.c | 8 +++----
arch/arm/boards/beagle/lowlevel.c | 16 +++++++-------
arch/arm/boards/beaglebone/beaglebone.h | 2 +-
arch/arm/boards/beaglebone/board.c | 10 ++++-----
arch/arm/boards/beaglebone/lowlevel.c | 16 +++++++-------
arch/arm/boards/myirtech-x335x/board.c | 2 +-
arch/arm/boards/myirtech-x335x/lowlevel.c | 12 +++++-----
arch/arm/boards/omap343xdsp/board.c | 6 ++---
arch/arm/boards/omap343xdsp/lowlevel.c | 16 +++++++-------
arch/arm/boards/omap3evm/board.c | 8 +++----
arch/arm/boards/omap3evm/lowlevel.c | 16 +++++++-------
arch/arm/boards/panda/board.c | 12 +++++-----
arch/arm/boards/panda/lowlevel.c | 12 +++++-----
arch/arm/boards/panda/mux.c | 6 ++---
.../boards/phytec-phycard-omap3/lowlevel.c | 16 +++++++-------
.../boards/phytec-phycard-omap3/pca-a-l1.c | 14 ++++++------
.../boards/phytec-phycard-omap4/lowlevel.c | 12 +++++-----
arch/arm/boards/phytec-phycard-omap4/mux.c | 6 ++---
.../boards/phytec-phycard-omap4/pca-a-xl2.c | 18 +++++++--------
.../boards/phytec-phycore-omap4460/board.c | 20 ++++++++---------
.../boards/phytec-phycore-omap4460/lowlevel.c | 12 +++++-----
arch/arm/boards/phytec-phycore-omap4460/mux.c | 6 ++---
arch/arm/boards/phytec-som-am335x/board.c | 6 ++---
arch/arm/boards/phytec-som-am335x/lowlevel.c | 16 +++++++-------
arch/arm/boards/vscom-baltos/board.c | 12 +++++-----
arch/arm/boards/vscom-baltos/lowlevel.c | 16 +++++++-------
arch/arm/boards/wago-pfc-am35xx/board-mlo.c | 10 ++++-----
arch/arm/boards/wago-pfc-am35xx/board.c | 2 +-
arch/arm/boards/wago-pfc-am35xx/lowlevel.c | 20 ++++++++---------
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-omap/am33xx_bbu_emmc.c | 2 +-
arch/arm/mach-omap/am33xx_bbu_nand.c | 2 +-
arch/arm/mach-omap/am33xx_bbu_spi_mlo.c | 2 +-
arch/arm/mach-omap/am33xx_clock.c | 4 ++--
arch/arm/mach-omap/am33xx_generic.c | 14 ++++++------
arch/arm/mach-omap/am33xx_mux.c | 4 ++--
arch/arm/mach-omap/am33xx_scrm.c | 4 ++--
arch/arm/mach-omap/am3xxx.c | 2 +-
arch/arm/mach-omap/boot_order.c | 2 +-
arch/arm/mach-omap/devices-gpmc-nand.c | 4 ++--
arch/arm/mach-omap/emif4.c | 2 +-
arch/arm/mach-omap/gpmc.c | 14 ++++++------
arch/arm/mach-omap/omap3_clock.c | 14 ++++++------
arch/arm/mach-omap/omap3_generic.c | 22 +++++++++----------
arch/arm/mach-omap/omap3_xload_usb.c | 4 ++--
arch/arm/mach-omap/omap4_clock.c | 8 +++----
arch/arm/mach-omap/omap4_generic.c | 16 +++++++-------
arch/arm/mach-omap/omap4_rom_usb.c | 6 ++---
arch/arm/mach-omap/omap4_twl6030_mmc.c | 2 +-
arch/arm/mach-omap/omap_devices.c | 2 +-
arch/arm/mach-omap/omap_generic.c | 16 +++++++-------
arch/arm/mach-omap/syslib.c | 2 +-
arch/arm/mach-omap/xload.c | 6 ++---
drivers/bus/omap-gpmc.c | 4 ++--
drivers/clocksource/timer-ti-32k.c | 12 +++++-----
drivers/clocksource/timer-ti-dm.c | 4 ++--
drivers/i2c/busses/i2c-omap.c | 4 ++--
drivers/mci/omap_hsmmc.c | 4 ++--
drivers/mtd/nand/nand_omap_gpmc.c | 4 ++--
drivers/net/cpsw.c | 2 +-
drivers/net/davinci_emac.c | 2 +-
drivers/serial/serial_omap4_usbboot.c | 2 +-
drivers/usb/host/ehci-omap.c | 10 ++++-----
fs/omap4_usbbootfs.c | 2 +-
.../mach => include/mach/omap}/am33xx-clock.h | 0
.../mach/omap}/am33xx-generic.h | 4 ++--
.../mach => include/mach/omap}/am33xx-mux.h | 0
.../mach/omap}/am33xx-silicon.h | 0
.../mach/omap}/am3xxx-silicon.h | 0
.../include/mach => include/mach/omap}/bbu.h | 0
.../mach => include/mach/omap}/clocks.h | 0
.../mach/omap}/cm-regbits-34xx.h | 0
.../mach => include/mach/omap}/control.h | 0
.../include/mach => include/mach/omap}/cpsw.h | 0
.../mach => include/mach/omap}/debug_ll.h | 6 ++---
.../mach => include/mach/omap}/devices.h | 2 +-
.../include/mach => include/mach/omap}/ehci.h | 0
.../mach => include/mach/omap}/emac_defs.h | 0
.../mach => include/mach/omap}/emif4.h | 0
.../mach => include/mach/omap}/generic.h | 0
.../include/mach => include/mach/omap}/gpmc.h | 0
.../mach => include/mach/omap}/gpmc_nand.h | 0
.../include/mach => include/mach/omap}/intc.h | 0
.../mach => include/mach/omap}/mcspi.h | 0
.../mach => include/mach/omap}/omap3-clock.h | 0
.../mach/omap}/omap3-devices.h | 8 +++----
.../mach/omap}/omap3-generic.h | 4 ++--
.../mach => include/mach/omap}/omap3-mux.h | 0
.../mach/omap}/omap3-silicon.h | 0
.../mach => include/mach/omap}/omap3-smx.h | 0
.../mach => include/mach/omap}/omap4-clock.h | 0
.../mach/omap}/omap4-devices.h | 8 +++----
.../mach/omap}/omap4-generic.h | 4 ++--
.../mach => include/mach/omap}/omap4-mux.h | 0
.../mach/omap}/omap4-silicon.h | 0
.../mach/omap}/omap4_rom_usb.h | 0
.../mach/omap}/omap4_twl6030_mmc.h | 0
.../mach => include/mach/omap}/omap_hsmmc.h | 0
.../include/mach => include/mach/omap}/sdrc.h | 0
.../mach => include/mach/omap}/sys_info.h | 0
.../mach => include/mach/omap}/syslib.h | 0
.../mach => include/mach/omap}/timers.h | 0
107 files changed, 310 insertions(+), 308 deletions(-)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/am33xx-clock.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/am33xx-generic.h (92%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/am33xx-mux.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/am33xx-silicon.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/am3xxx-silicon.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/bbu.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/clocks.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/cm-regbits-34xx.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/control.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/cpsw.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/debug_ll.h (95%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/devices.h (92%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/ehci.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/emac_defs.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/emif4.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/generic.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/gpmc.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/gpmc_nand.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/intc.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/mcspi.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap3-clock.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap3-devices.h (94%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap3-generic.h (90%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap3-mux.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap3-silicon.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap3-smx.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap4-clock.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap4-devices.h (94%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap4-generic.h (88%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap4-mux.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap4-silicon.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap4_rom_usb.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap4_twl6030_mmc.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/omap_hsmmc.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/sdrc.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/sys_info.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/syslib.h (100%)
rename {arch/arm/mach-omap/include/mach => include/mach/omap}/timers.h (100%)
diff --git a/arch/arm/boards/afi-gf/board.c b/arch/arm/boards/afi-gf/board.c
index 53d3b67008..66288ca5b7 100644
--- a/arch/arm/boards/afi-gf/board.c
+++ b/arch/arm/boards/afi-gf/board.c
@@ -8,8 +8,8 @@
#include <envfs.h>
#include <bootsource.h>
#include <asm/armlinux.h>
-#include <mach/bbu.h>
-#include <mach/am33xx-generic.h>
+#include <mach/omap/bbu.h>
+#include <mach/omap/am33xx-generic.h>
static int board_console_init(void)
{
diff --git a/arch/arm/boards/afi-gf/lowlevel.c b/arch/arm/boards/afi-gf/lowlevel.c
index 7c94b19c9f..1b08d14205 100644
--- a/arch/arm/boards/afi-gf/lowlevel.c
+++ b/arch/arm/boards/afi-gf/lowlevel.c
@@ -7,15 +7,15 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <linux/bitops.h>
-#include <mach/am33xx-generic.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/am33xx-clock.h>
-#include <mach/emif4.h>
-#include <mach/generic.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/am33xx-mux.h>
+#include <mach/omap/am33xx-generic.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/am33xx-clock.h>
+#include <mach/omap/emif4.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/am33xx-mux.h>
#include <debug_ll.h>
/* AM335X EMIF Register values */
diff --git a/arch/arm/boards/archosg9/board.c b/arch/arm/boards/archosg9/board.c
index 597830432b..8aa35262d3 100644
--- a/arch/arm/boards/archosg9/board.c
+++ b/arch/arm/boards/archosg9/board.c
@@ -5,10 +5,10 @@
#include <init.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/devices.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-devices.h>
-#include <mach/omap4_rom_usb.h>
+#include <mach/omap/devices.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-devices.h>
+#include <mach/omap/omap4_rom_usb.h>
#include <linux/sizes.h>
#include <i2c/i2c.h>
#include <gpio.h>
diff --git a/arch/arm/boards/archosg9/lowlevel.c b/arch/arm/boards/archosg9/lowlevel.c
index f31ef1a7f2..2c3d0e1ee4 100644
--- a/arch/arm/boards/archosg9/lowlevel.c
+++ b/arch/arm/boards/archosg9/lowlevel.c
@@ -4,12 +4,12 @@
#include <io.h>
#include <init.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
-#include <mach/omap4-mux.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-generic.h>
-#include <mach/omap4-clock.h>
-#include <mach/syslib.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-generic.h>
+#include <mach/omap/omap4-clock.h>
+#include <mach/omap/syslib.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
#include "mux.h"
diff --git a/arch/arm/boards/archosg9/mux.c b/arch/arm/boards/archosg9/mux.c
index dc85271208..d51ccefba4 100644
--- a/arch/arm/boards/archosg9/mux.c
+++ b/arch/arm/boards/archosg9/mux.c
@@ -3,9 +3,9 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-mux.h>
-#include <mach/omap4-clock.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/omap4-clock.h>
#include "mux.h"
static const struct pad_conf_entry core_padconf_array[] = {
diff --git a/arch/arm/boards/beagle/board.c b/arch/arm/boards/beagle/board.c
index 7caac5727f..53a93e1ed3 100644
--- a/arch/arm/boards/beagle/board.c
+++ b/arch/arm/boards/beagle/board.c
@@ -12,10 +12,10 @@
#include <envfs.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/gpmc.h>
-#include <mach/gpmc_nand.h>
-#include <mach/ehci.h>
-#include <mach/omap3-devices.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
+#include <mach/omap/ehci.h>
+#include <mach/omap/omap3-devices.h>
#include <i2c/i2c.h>
#include <linux/err.h>
#include <usb/ehci.h>
diff --git a/arch/arm/boards/beagle/lowlevel.c b/arch/arm/boards/beagle/lowlevel.c
index 683ab552f4..ff822e5c24 100644
--- a/arch/arm/boards/beagle/lowlevel.c
+++ b/arch/arm/boards/beagle/lowlevel.c
@@ -6,14 +6,14 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/control.h>
-#include <mach/generic.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-generic.h>
-#include <mach/omap3-mux.h>
-#include <mach/sdrc.h>
-#include <mach/syslib.h>
-#include <mach/sys_info.h>
+#include <mach/omap/control.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-generic.h>
+#include <mach/omap/omap3-mux.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/sys_info.h>
#include <generated/mach-types.h>
/**
diff --git a/arch/arm/boards/beaglebone/beaglebone.h b/arch/arm/boards/beaglebone/beaglebone.h
index 9f1f906699..c95936a84f 100644
--- a/arch/arm/boards/beaglebone/beaglebone.h
+++ b/arch/arm/boards/beaglebone/beaglebone.h
@@ -3,7 +3,7 @@
#ifndef __BOARD_BEAGLEBONE_H
#define __BOARD_BEAGLEBONE_H
-#include <mach/am33xx-generic.h>
+#include <mach/omap/am33xx-generic.h>
static inline int is_beaglebone_black(void)
{
diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
index 6d2144f95b..f42ff368b4 100644
--- a/arch/arm/boards/beaglebone/board.c
+++ b/arch/arm/boards/beaglebone/board.c
@@ -18,12 +18,12 @@
#include <bootsource.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/gpmc.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/gpmc.h>
#include <linux/err.h>
-#include <mach/bbu.h>
+#include <mach/omap/bbu.h>
#include "beaglebone.h"
diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c
index ebec4b5419..6978723fbb 100644
--- a/arch/arm/boards/beaglebone/lowlevel.c
+++ b/arch/arm/boards/beaglebone/lowlevel.c
@@ -7,14 +7,14 @@
#include <debug_ll.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/am33xx-clock.h>
-#include <mach/generic.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/am33xx-mux.h>
-#include <mach/am33xx-generic.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/am33xx-clock.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/am33xx-mux.h>
+#include <mach/omap/am33xx-generic.h>
#include "beaglebone.h"
diff --git a/arch/arm/boards/myirtech-x335x/board.c b/arch/arm/boards/myirtech-x335x/board.c
index c6d808284e..82bb612032 100644
--- a/arch/arm/boards/myirtech-x335x/board.c
+++ b/arch/arm/boards/myirtech-x335x/board.c
@@ -7,7 +7,7 @@
#include <envfs.h>
#include <init.h>
#include <linux/sizes.h>
-#include <mach/am33xx-generic.h>
+#include <mach/omap/am33xx-generic.h>
static struct omap_barebox_part myir_barebox_part = {
.nand_offset = SZ_128K * 4,
diff --git a/arch/arm/boards/myirtech-x335x/lowlevel.c b/arch/arm/boards/myirtech-x335x/lowlevel.c
index c394253320..66d2dc1a53 100644
--- a/arch/arm/boards/myirtech-x335x/lowlevel.c
+++ b/arch/arm/boards/myirtech-x335x/lowlevel.c
@@ -8,12 +8,12 @@
#include <debug_ll.h>
#include <init.h>
#include <linux/sizes.h>
-#include <mach/am33xx-clock.h>
-#include <mach/am33xx-generic.h>
-#include <mach/am33xx-mux.h>
-#include <mach/generic.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
+#include <mach/omap/am33xx-clock.h>
+#include <mach/omap/am33xx-generic.h>
+#include <mach/omap/am33xx-mux.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
#define AM335X_ZCZ_1000 0x1c2f
diff --git a/arch/arm/boards/omap343xdsp/board.c b/arch/arm/boards/omap343xdsp/board.c
index 045a8b1bca..ca1cf9c58c 100644
--- a/arch/arm/boards/omap343xdsp/board.c
+++ b/arch/arm/boards/omap343xdsp/board.c
@@ -7,9 +7,9 @@
#include <driver.h>
#include <io.h>
#include <asm/armlinux.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-devices.h>
-#include <mach/gpmc.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-devices.h>
+#include <mach/omap/gpmc.h>
#include <errno.h>
/**
diff --git a/arch/arm/boards/omap343xdsp/lowlevel.c b/arch/arm/boards/omap343xdsp/lowlevel.c
index 271b122d4d..3a8165f885 100644
--- a/arch/arm/boards/omap343xdsp/lowlevel.c
+++ b/arch/arm/boards/omap343xdsp/lowlevel.c
@@ -6,14 +6,14 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/generic.h>
-#include <mach/omap3-mux.h>
-#include <mach/sdrc.h>
-#include <mach/control.h>
-#include <mach/syslib.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-generic.h>
-#include <mach/sys_info.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap3-mux.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/control.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-generic.h>
+#include <mach/omap/sys_info.h>
/**
* @brief Do the SDRC initialization for 128Meg Infenion DDR for CS0
diff --git a/arch/arm/boards/omap3evm/board.c b/arch/arm/boards/omap3evm/board.c
index 62b1a1c00f..4099c97d31 100644
--- a/arch/arm/boards/omap3evm/board.c
+++ b/arch/arm/boards/omap3evm/board.c
@@ -32,12 +32,12 @@
#include <io.h>
#include <linux/sizes.h>
#include <asm/armlinux.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-mux.h>
-#include <mach/gpmc.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-mux.h>
+#include <mach/omap/gpmc.h>
#include <errno.h>
#include <generated/mach-types.h>
-#include <mach/omap3-devices.h>
+#include <mach/omap/omap3-devices.h>
/**
* @brief Initialize the serial port to be used as console.
diff --git a/arch/arm/boards/omap3evm/lowlevel.c b/arch/arm/boards/omap3evm/lowlevel.c
index 1dcfbc27ba..5797acc14e 100644
--- a/arch/arm/boards/omap3evm/lowlevel.c
+++ b/arch/arm/boards/omap3evm/lowlevel.c
@@ -5,14 +5,14 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/generic.h>
-#include <mach/omap3-mux.h>
-#include <mach/sdrc.h>
-#include <mach/control.h>
-#include <mach/syslib.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-generic.h>
-#include <mach/sys_info.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap3-mux.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/control.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-generic.h>
+#include <mach/omap/sys_info.h>
/*
diff --git a/arch/arm/boards/panda/board.c b/arch/arm/boards/panda/board.c
index 01189ebd76..276aeb287d 100644
--- a/arch/arm/boards/panda/board.c
+++ b/arch/arm/boards/panda/board.c
@@ -8,12 +8,12 @@
#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-devices.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/control.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-devices.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/control.h>
#include <usb/ehci.h>
#include <linux/err.h>
#include <linux/sizes.h>
diff --git a/arch/arm/boards/panda/lowlevel.c b/arch/arm/boards/panda/lowlevel.c
index 4fe445b17d..f535e7f9a4 100644
--- a/arch/arm/boards/panda/lowlevel.c
+++ b/arch/arm/boards/panda/lowlevel.c
@@ -5,12 +5,12 @@
#include <init.h>
#include <io.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
-#include <mach/omap4-mux.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-generic.h>
-#include <mach/omap4-clock.h>
-#include <mach/syslib.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-generic.h>
+#include <mach/omap/omap4-clock.h>
+#include <mach/omap/syslib.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
diff --git a/arch/arm/boards/panda/mux.c b/arch/arm/boards/panda/mux.c
index 25def93ea2..b5e1e79c8f 100644
--- a/arch/arm/boards/panda/mux.c
+++ b/arch/arm/boards/panda/mux.c
@@ -3,9 +3,9 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-mux.h>
-#include <mach/omap4-clock.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/omap4-clock.h>
#include "mux.h"
diff --git a/arch/arm/boards/phytec-phycard-omap3/lowlevel.c b/arch/arm/boards/phytec-phycard-omap3/lowlevel.c
index 6f24108ef2..56fbdf12ad 100644
--- a/arch/arm/boards/phytec-phycard-omap3/lowlevel.c
+++ b/arch/arm/boards/phytec-phycard-omap3/lowlevel.c
@@ -6,14 +6,14 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/omap3-mux.h>
-#include <mach/generic.h>
-#include <mach/sdrc.h>
-#include <mach/control.h>
-#include <mach/syslib.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-generic.h>
-#include <mach/sys_info.h>
+#include <mach/omap/omap3-mux.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/control.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-generic.h>
+#include <mach/omap/sys_info.h>
/* Slower full frequency range default timings for x32 operation */
#define SDP_SDRC_SHARING 0x00000100
diff --git a/arch/arm/boards/phytec-phycard-omap3/pca-a-l1.c b/arch/arm/boards/phytec-phycard-omap3/pca-a-l1.c
index 0128401e1a..ef22d807a8 100644
--- a/arch/arm/boards/phytec-phycard-omap3/pca-a-l1.c
+++ b/arch/arm/boards/phytec-phycard-omap3/pca-a-l1.c
@@ -42,13 +42,13 @@
#include <asm/io.h>
#include <generated/mach-types.h>
#include <linux/err.h>
-#include <mach/gpmc.h>
-#include <mach/gpmc_nand.h>
-#include <mach/omap_hsmmc.h>
-#include <mach/sdrc.h>
-#include <mach/omap3-silicon.h>
-#include <mach/sys_info.h>
-#include <mach/omap3-devices.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
+#include <mach/omap/omap_hsmmc.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/omap3-devices.h>
#define SMC911X_BASE 0x2c000000
diff --git a/arch/arm/boards/phytec-phycard-omap4/lowlevel.c b/arch/arm/boards/phytec-phycard-omap4/lowlevel.c
index 6ccaf3e342..b5906234d3 100644
--- a/arch/arm/boards/phytec-phycard-omap4/lowlevel.c
+++ b/arch/arm/boards/phytec-phycard-omap4/lowlevel.c
@@ -5,12 +5,12 @@
#include <init.h>
#include <io.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
-#include <mach/omap4-mux.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-generic.h>
-#include <mach/omap4-clock.h>
-#include <mach/syslib.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-generic.h>
+#include <mach/omap/omap4-clock.h>
+#include <mach/omap/syslib.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
diff --git a/arch/arm/boards/phytec-phycard-omap4/mux.c b/arch/arm/boards/phytec-phycard-omap4/mux.c
index b0bbfa5906..a545ca5948 100644
--- a/arch/arm/boards/phytec-phycard-omap4/mux.c
+++ b/arch/arm/boards/phytec-phycard-omap4/mux.c
@@ -3,9 +3,9 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-mux.h>
-#include <mach/omap4-clock.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/omap4-clock.h>
#include "mux.h"
diff --git a/arch/arm/boards/phytec-phycard-omap4/pca-a-xl2.c b/arch/arm/boards/phytec-phycard-omap4/pca-a-xl2.c
index 1724bc6dc6..da2a21d616 100644
--- a/arch/arm/boards/phytec-phycard-omap4/pca-a-xl2.c
+++ b/arch/arm/boards/phytec-phycard-omap4/pca-a-xl2.c
@@ -9,19 +9,19 @@
#include <gpio.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/omap4-silicon.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/control.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/control.h>
#include <linux/err.h>
#include <linux/sizes.h>
#include <nand.h>
#include <asm/mmu.h>
-#include <mach/gpmc.h>
-#include <mach/gpmc_nand.h>
-#include <mach/omap_hsmmc.h>
-#include <mach/omap4-devices.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
+#include <mach/omap/omap_hsmmc.h>
+#include <mach/omap/omap4-devices.h>
#include <i2c/i2c.h>
static int pcaaxl2_console_init(void)
diff --git a/arch/arm/boards/phytec-phycore-omap4460/board.c b/arch/arm/boards/phytec-phycore-omap4460/board.c
index 6c69fb7e1b..0b1ffe77a6 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/board.c
+++ b/arch/arm/boards/phytec-phycore-omap4460/board.c
@@ -10,20 +10,20 @@
#include <envfs.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/devices.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-devices.h>
-#include <mach/omap4-clock.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/control.h>
+#include <mach/omap/devices.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-devices.h>
+#include <mach/omap/omap4-clock.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/control.h>
#include <linux/err.h>
#include <linux/sizes.h>
#include <nand.h>
#include <asm/mmu.h>
-#include <mach/gpmc.h>
-#include <mach/gpmc_nand.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
#include <i2c/i2c.h>
static int pcm049_console_init(void)
diff --git a/arch/arm/boards/phytec-phycore-omap4460/lowlevel.c b/arch/arm/boards/phytec-phycore-omap4460/lowlevel.c
index 2a65e40e6b..17194c6562 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/lowlevel.c
+++ b/arch/arm/boards/phytec-phycore-omap4460/lowlevel.c
@@ -5,12 +5,12 @@
#include <init.h>
#include <io.h>
#include <linux/sizes.h>
-#include <mach/generic.h>
-#include <mach/omap4-mux.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-generic.h>
-#include <mach/omap4-clock.h>
-#include <mach/syslib.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-generic.h>
+#include <mach/omap/omap4-clock.h>
+#include <mach/omap/syslib.h>
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
diff --git a/arch/arm/boards/phytec-phycore-omap4460/mux.c b/arch/arm/boards/phytec-phycore-omap4460/mux.c
index 9cd10e06f8..287c2a4826 100644
--- a/arch/arm/boards/phytec-phycore-omap4460/mux.c
+++ b/arch/arm/boards/phytec-phycore-omap4460/mux.c
@@ -3,9 +3,9 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-mux.h>
-#include <mach/omap4-clock.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/omap4-clock.h>
#include "mux.h"
diff --git a/arch/arm/boards/phytec-som-am335x/board.c b/arch/arm/boards/phytec-som-am335x/board.c
index 11acd06c53..5e726b56fc 100644
--- a/arch/arm/boards/phytec-som-am335x/board.c
+++ b/arch/arm/boards/phytec-som-am335x/board.c
@@ -21,9 +21,9 @@
#include <generated/mach-types.h>
#include <linux/phy.h>
#include <linux/micrel_phy.h>
-#include <mach/am33xx-generic.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/bbu.h>
+#include <mach/omap/am33xx-generic.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/bbu.h>
static int physom_coredevice_init(void)
{
diff --git a/arch/arm/boards/phytec-som-am335x/lowlevel.c b/arch/arm/boards/phytec-som-am335x/lowlevel.c
index 8e506bc4ed..445ec18d5a 100644
--- a/arch/arm/boards/phytec-som-am335x/lowlevel.c
+++ b/arch/arm/boards/phytec-som-am335x/lowlevel.c
@@ -7,14 +7,14 @@
#include <init.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/am33xx-clock.h>
-#include <mach/generic.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/am33xx-mux.h>
-#include <mach/am33xx-generic.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/am33xx-clock.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/am33xx-mux.h>
+#include <mach/omap/am33xx-generic.h>
#include <debug_ll.h>
#include "ram-timings.h"
diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c
index b9ce356264..20f990c404 100644
--- a/arch/arm/boards/vscom-baltos/board.c
+++ b/arch/arm/boards/vscom-baltos/board.c
@@ -18,13 +18,13 @@
#include <bootsource.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
-#include <mach/am33xx-generic.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/gpmc.h>
+#include <mach/omap/am33xx-generic.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/gpmc.h>
#include <linux/err.h>
-#include <mach/bbu.h>
+#include <mach/omap/bbu.h>
#include <libfile.h>
#include <gpio.h>
diff --git a/arch/arm/boards/vscom-baltos/lowlevel.c b/arch/arm/boards/vscom-baltos/lowlevel.c
index 2fa8a0fdc3..f1dcc731a0 100644
--- a/arch/arm/boards/vscom-baltos/lowlevel.c
+++ b/arch/arm/boards/vscom-baltos/lowlevel.c
@@ -8,14 +8,14 @@
#include <debug_ll.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/am33xx-clock.h>
-#include <mach/generic.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/am33xx-mux.h>
-#include <mach/am33xx-generic.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/am33xx-clock.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/am33xx-mux.h>
+#include <mach/omap/am33xx-generic.h>
static const struct am33xx_ddr_data ddr3_data = {
.rd_slave_ratio0 = 0x38,
diff --git a/arch/arm/boards/wago-pfc-am35xx/board-mlo.c b/arch/arm/boards/wago-pfc-am35xx/board-mlo.c
index c940565b4a..c5ccdf7faf 100644
--- a/arch/arm/boards/wago-pfc-am35xx/board-mlo.c
+++ b/arch/arm/boards/wago-pfc-am35xx/board-mlo.c
@@ -8,12 +8,12 @@
#include <init.h>
#include <io.h>
#include <linux/sizes.h>
-#include <mach/omap3-silicon.h>
-#include <mach/gpmc.h>
-#include <mach/gpmc_nand.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
#include <errno.h>
-#include <mach/omap3-devices.h>
-#include <mach/generic.h>
+#include <mach/omap/omap3-devices.h>
+#include <mach/omap/generic.h>
/* map first four erase blocks */
static struct omap_barebox_part pfc200_mlo_part = {
diff --git a/arch/arm/boards/wago-pfc-am35xx/board.c b/arch/arm/boards/wago-pfc-am35xx/board.c
index c0a039ba50..091e606e21 100644
--- a/arch/arm/boards/wago-pfc-am35xx/board.c
+++ b/arch/arm/boards/wago-pfc-am35xx/board.c
@@ -14,7 +14,7 @@
#include <linux/phy.h>
#include <linux/micrel_phy.h>
#include <asm/memory.h>
-#include <mach/generic.h>
+#include <mach/omap/generic.h>
static int pfc200_mem_init(void)
{
diff --git a/arch/arm/boards/wago-pfc-am35xx/lowlevel.c b/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
index 9018bedf22..04e036c233 100644
--- a/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
+++ b/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
@@ -12,19 +12,19 @@
#include <debug_ll.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/generic.h>
-#include <mach/sdrc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/omap3-mux.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-generic.h>
-#include <mach/omap3-clock.h>
-#include <mach/control.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/omap3-mux.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-generic.h>
+#include <mach/omap/omap3-clock.h>
+#include <mach/omap/control.h>
#include <asm/common.h>
#include <asm-generic/memory_layout.h>
-#include <mach/emif4.h>
+#include <mach/omap/emif4.h>
static void mux_config(void)
{
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index acc6be7e8f..25f7559527 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -36,6 +36,8 @@
#include <mach/socfpga/debug_ll.h>
#elif defined CONFIG_ARCH_PXA
#include <mach/pxa/debug_ll.h>
+#elif defined CONFIG_ARCH_OMAP
+#include <mach/omap/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-omap/am33xx_bbu_emmc.c b/arch/arm/mach-omap/am33xx_bbu_emmc.c
index c3d4f9c422..3cae31d34c 100644
--- a/arch/arm/mach-omap/am33xx_bbu_emmc.c
+++ b/arch/arm/mach-omap/am33xx_bbu_emmc.c
@@ -18,7 +18,7 @@
#include <fs.h>
#include <fcntl.h>
#include <filetype.h>
-#include <mach/bbu.h>
+#include <mach/omap/bbu.h>
#define PART_TABLE_SIZE 66
#define PART_TABLE_OFFSET 0x1BE
diff --git a/arch/arm/mach-omap/am33xx_bbu_nand.c b/arch/arm/mach-omap/am33xx_bbu_nand.c
index 8c487c8ebb..2041cf3c0b 100644
--- a/arch/arm/mach-omap/am33xx_bbu_nand.c
+++ b/arch/arm/mach-omap/am33xx_bbu_nand.c
@@ -24,7 +24,7 @@
#include <filetype.h>
#include <linux/mtd/mtd.h>
#include <mtd/mtd-peb.h>
-#include <mach/bbu.h>
+#include <mach/omap/bbu.h>
struct nand_bbu_handler {
struct bbu_handler bbu_handler;
diff --git a/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c b/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
index f36c2c3bf0..2c58c9ae69 100644
--- a/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
+++ b/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
@@ -20,7 +20,7 @@
#include <fs.h>
#include <fcntl.h>
#include <linux/stat.h>
-#include <mach/bbu.h>
+#include <mach/omap/bbu.h>
/*
* AM35xx, AM33xx chips use big endian MLO for SPI NOR flash
diff --git a/arch/arm/mach-omap/am33xx_clock.c b/arch/arm/mach-omap/am33xx_clock.c
index a5ac6f68c0..eeb7e93329 100644
--- a/arch/arm/mach-omap/am33xx_clock.c
+++ b/arch/arm/mach-omap/am33xx_clock.c
@@ -14,8 +14,8 @@
*/
#include <common.h>
#include <asm/io.h>
-#include <mach/am33xx-clock.h>
-#include <mach/am33xx-generic.h>
+#include <mach/omap/am33xx-clock.h>
+#include <mach/omap/am33xx-generic.h>
#include <linux/math64.h>
#define PRCM_MOD_EN 0x2
diff --git a/arch/arm/mach-omap/am33xx_generic.c b/arch/arm/mach-omap/am33xx_generic.c
index 94fe26b2b2..850fbceaec 100644
--- a/arch/arm/mach-omap/am33xx_generic.c
+++ b/arch/arm/mach-omap/am33xx_generic.c
@@ -21,13 +21,13 @@
#include <net.h>
#include <restart.h>
#include <asm/barebox-arm.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/am33xx-clock.h>
-#include <mach/emif4.h>
-#include <mach/generic.h>
-#include <mach/sys_info.h>
-#include <mach/am33xx-generic.h>
-#include <mach/gpmc.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/am33xx-clock.h>
+#include <mach/omap/emif4.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/am33xx-generic.h>
+#include <mach/omap/gpmc.h>
#include <reset_source.h>
static void __noreturn am33xx_restart_soc(struct restart_handler *rst)
diff --git a/arch/arm/mach-omap/am33xx_mux.c b/arch/arm/mach-omap/am33xx_mux.c
index cc96ced18e..3192e332c6 100644
--- a/arch/arm/mach-omap/am33xx_mux.c
+++ b/arch/arm/mach-omap/am33xx_mux.c
@@ -15,8 +15,8 @@
#include <common.h>
#include <config.h>
#include <asm/io.h>
-#include <mach/am33xx-mux.h>
-#include <mach/am33xx-silicon.h>
+#include <mach/omap/am33xx-mux.h>
+#include <mach/omap/am33xx-silicon.h>
#define MUX_CFG(value, offset) \
__raw_writel(value, (AM33XX_CTRL_BASE + offset));
diff --git a/arch/arm/mach-omap/am33xx_scrm.c b/arch/arm/mach-omap/am33xx_scrm.c
index aeb828001c..c2ae73d53e 100644
--- a/arch/arm/mach-omap/am33xx_scrm.c
+++ b/arch/arm/mach-omap/am33xx_scrm.c
@@ -20,8 +20,8 @@
#include <of.h>
#include <asm/barebox-arm.h>
#include <asm/memory.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/emif4.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/emif4.h>
static int am33xx_scrm_probe(struct device *dev)
{
diff --git a/arch/arm/mach-omap/am3xxx.c b/arch/arm/mach-omap/am3xxx.c
index 60a6e4b825..faf230a027 100644
--- a/arch/arm/mach-omap/am3xxx.c
+++ b/arch/arm/mach-omap/am3xxx.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <io.h>
-#include <mach/am3xxx-silicon.h>
+#include <mach/omap/am3xxx-silicon.h>
/* UART Defines */
#define UART_SYSCFG_OFFSET 0x54
diff --git a/arch/arm/mach-omap/boot_order.c b/arch/arm/mach-omap/boot_order.c
index 4b74fdba66..4fed99743f 100644
--- a/arch/arm/mach-omap/boot_order.c
+++ b/arch/arm/mach-omap/boot_order.c
@@ -15,7 +15,7 @@
#include <common.h>
#include <command.h>
#include <complete.h>
-#include <mach/omap4-silicon.h>
+#include <mach/omap/omap4-silicon.h>
struct bootsrc {
const char *name;
diff --git a/arch/arm/mach-omap/devices-gpmc-nand.c b/arch/arm/mach-omap/devices-gpmc-nand.c
index c4ddc951fe..1cfba5af71 100644
--- a/arch/arm/mach-omap/devices-gpmc-nand.c
+++ b/arch/arm/mach-omap/devices-gpmc-nand.c
@@ -24,8 +24,8 @@
#include <clock.h>
#include <io.h>
-#include <mach/gpmc.h>
-#include <mach/gpmc_nand.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
#define GPMC_CONF1_VALx8 0x00000800
#define GPMC_CONF1_VALx16 0x00001800
diff --git a/arch/arm/mach-omap/emif4.c b/arch/arm/mach-omap/emif4.c
index b5a53e8c63..db16d6c760 100644
--- a/arch/arm/mach-omap/emif4.c
+++ b/arch/arm/mach-omap/emif4.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <io.h>
-#include <mach/emif4.h>
+#include <mach/omap/emif4.h>
/*
* AM35xx configuration values
diff --git a/arch/arm/mach-omap/gpmc.c b/arch/arm/mach-omap/gpmc.c
index 07eeae1ace..1cee845012 100644
--- a/arch/arm/mach-omap/gpmc.c
+++ b/arch/arm/mach-omap/gpmc.c
@@ -24,13 +24,13 @@
#include <init.h>
#include <io.h>
#include <errno.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap4-silicon.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/gpmc.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/generic.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/generic.h>
/**
* @brief Do a Generic initialization of GPMC. if you choose otherwise,
diff --git a/arch/arm/mach-omap/omap3_clock.c b/arch/arm/mach-omap/omap3_clock.c
index 03b866c28e..f66316a536 100644
--- a/arch/arm/mach-omap/omap3_clock.c
+++ b/arch/arm/mach-omap/omap3_clock.c
@@ -32,13 +32,13 @@
#include <common.h>
#include <io.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-generic.h>
-#include <mach/clocks.h>
-#include <mach/omap3-clock.h>
-#include <mach/timers.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-generic.h>
+#include <mach/omap/clocks.h>
+#include <mach/omap/omap3-clock.h>
+#include <mach/omap/timers.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
#define S32K_CR (OMAP3_32KTIMER_BASE + 0x10)
diff --git a/arch/arm/mach-omap/omap3_generic.c b/arch/arm/mach-omap/omap3_generic.c
index cb6105cc04..8230b37619 100644
--- a/arch/arm/mach-omap/omap3_generic.c
+++ b/arch/arm/mach-omap/omap3_generic.c
@@ -32,17 +32,17 @@
#include <init.h>
#include <io.h>
#include <restart.h>
-#include <mach/omap3-silicon.h>
-#include <mach/gpmc.h>
-#include <mach/generic.h>
-#include <mach/sdrc.h>
-#include <mach/control.h>
-#include <mach/omap3-smx.h>
-#include <mach/clocks.h>
-#include <mach/omap3-clock.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
-#include <mach/omap3-generic.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/sdrc.h>
+#include <mach/omap/control.h>
+#include <mach/omap/omap3-smx.h>
+#include <mach/omap/clocks.h>
+#include <mach/omap/omap3-clock.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/omap3-generic.h>
#include <reset_source.h>
/**
diff --git a/arch/arm/mach-omap/omap3_xload_usb.c b/arch/arm/mach-omap/omap3_xload_usb.c
index ac6a434643..01e958da6f 100644
--- a/arch/arm/mach-omap/omap3_xload_usb.c
+++ b/arch/arm/mach-omap/omap3_xload_usb.c
@@ -19,8 +19,8 @@
#include <common.h>
#include <io.h>
#include <malloc.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-generic.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-generic.h>
static void __iomem *omap3_usb_base = (void __iomem *)OMAP3_MUSB0_BASE;
diff --git a/arch/arm/mach-omap/omap4_clock.c b/arch/arm/mach-omap/omap4_clock.c
index 6f53c706d6..aa314b70ec 100644
--- a/arch/arm/mach-omap/omap4_clock.c
+++ b/arch/arm/mach-omap/omap4_clock.c
@@ -2,10 +2,10 @@
#include <common.h>
#include <io.h>
-#include <mach/syslib.h>
-#include <mach/omap4-silicon.h>
-#include <mach/clocks.h>
-#include <mach/omap4-clock.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/clocks.h>
+#include <mach/omap/omap4-clock.h>
#define LDELAY 12000000
diff --git a/arch/arm/mach-omap/omap4_generic.c b/arch/arm/mach-omap/omap4_generic.c
index 7c8374eba7..10190b152b 100644
--- a/arch/arm/mach-omap/omap4_generic.c
+++ b/arch/arm/mach-omap/omap4_generic.c
@@ -5,14 +5,14 @@
#include <init.h>
#include <restart.h>
#include <io.h>
-#include <mach/omap4-clock.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4-mux.h>
-#include <mach/syslib.h>
-#include <mach/generic.h>
-#include <mach/gpmc.h>
-#include <mach/omap4_rom_usb.h>
-#include <mach/omap4-generic.h>
+#include <mach/omap/omap4-clock.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4-mux.h>
+#include <mach/omap/syslib.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/omap4_rom_usb.h>
+#include <mach/omap/omap4-generic.h>
/*
* The following several lines are taken from U-Boot to support
diff --git a/arch/arm/mach-omap/omap4_rom_usb.c b/arch/arm/mach-omap/omap4_rom_usb.c
index 0b31240590..a3e447128f 100644
--- a/arch/arm/mach-omap/omap4_rom_usb.c
+++ b/arch/arm/mach-omap/omap4_rom_usb.c
@@ -31,9 +31,9 @@
*/
#include <common.h>
-#include <mach/omap4-silicon.h>
-#include <mach/omap4_rom_usb.h>
-#include <mach/generic.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/omap4_rom_usb.h>
+#include <mach/omap/generic.h>
#include <init.h>
static struct omap4_usbboot omap4_usbboot_data;
diff --git a/arch/arm/mach-omap/omap4_twl6030_mmc.c b/arch/arm/mach-omap/omap4_twl6030_mmc.c
index 67a9a5d6b5..c5fa0e77aa 100644
--- a/arch/arm/mach-omap/omap4_twl6030_mmc.c
+++ b/arch/arm/mach-omap/omap4_twl6030_mmc.c
@@ -17,7 +17,7 @@
#include <io.h>
#include <mfd/twl6030.h>
-#include <mach/omap4_twl6030_mmc.h>
+#include <mach/omap/omap4_twl6030_mmc.h>
/* MMC voltage */
#define OMAP4_CONTROL_PBIASLITE 0x4A100600
diff --git a/arch/arm/mach-omap/omap_devices.c b/arch/arm/mach-omap/omap_devices.c
index 15a4618931..3ade3225df 100644
--- a/arch/arm/mach-omap/omap_devices.c
+++ b/arch/arm/mach-omap/omap_devices.c
@@ -3,7 +3,7 @@
#include <driver.h>
#include <asm/armlinux.h>
-#include <mach/omap3-devices.h>
+#include <mach/omap/omap3-devices.h>
void omap_add_ram0(resource_size_t size)
{
diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.c
index 6bb26a6ef0..59c1ce7666 100644
--- a/arch/arm/mach-omap/omap_generic.c
+++ b/arch/arm/mach-omap/omap_generic.c
@@ -22,14 +22,14 @@
#include <malloc.h>
#include <libfile.h>
#include <linux/stat.h>
-#include <mach/gpmc.h>
-#include <mach/generic.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap4-silicon.h>
-#include <mach/am33xx-generic.h>
-#include <mach/omap3-generic.h>
-#include <mach/omap4-generic.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/am33xx-generic.h>
+#include <mach/omap/omap3-generic.h>
+#include <mach/omap/omap4-generic.h>
void __iomem *omap_gpmc_base;
diff --git a/arch/arm/mach-omap/syslib.c b/arch/arm/mach-omap/syslib.c
index 488f0ab859..f8fad243c6 100644
--- a/arch/arm/mach-omap/syslib.c
+++ b/arch/arm/mach-omap/syslib.c
@@ -25,7 +25,7 @@
#include <config.h>
#include <common.h>
#include <io.h>
-#include <mach/syslib.h>
+#include <mach/omap/syslib.h>
/**
* @brief simple spin loop
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index 5591f01c9c..e61e2ce652 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -13,9 +13,9 @@
#include <malloc.h>
#include <filetype.h>
#include <xymodem.h>
-#include <mach/generic.h>
-#include <mach/am33xx-generic.h>
-#include <mach/omap3-generic.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/am33xx-generic.h>
+#include <mach/omap/omap3-generic.h>
#include <net.h>
#include <environment.h>
#include <dhcp.h>
diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c
index 1f4580e5d7..4661220c86 100644
--- a/drivers/bus/omap-gpmc.c
+++ b/drivers/bus/omap-gpmc.c
@@ -16,8 +16,8 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/mtd/rawnand.h>
-#include <mach/gpmc_nand.h>
-#include <mach/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
+#include <mach/omap/gpmc.h>
#define GPMC_CS_NUM 8
#define GPMC_NR_WAITPINS 4
diff --git a/drivers/clocksource/timer-ti-32k.c b/drivers/clocksource/timer-ti-32k.c
index 658e0a226c..2b3ef4360a 100644
--- a/drivers/clocksource/timer-ti-32k.c
+++ b/drivers/clocksource/timer-ti-32k.c
@@ -16,12 +16,12 @@
#include <clock.h>
#include <init.h>
#include <io.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap4-silicon.h>
-#include <mach/clocks.h>
-#include <mach/timers.h>
-#include <mach/sys_info.h>
-#include <mach/syslib.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/clocks.h>
+#include <mach/omap/timers.h>
+#include <mach/omap/sys_info.h>
+#include <mach/omap/syslib.h>
/** Sync 32Khz Timer registers */
#define S32K_CR 0x10
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 17412198b9..88bc61dbbf 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -21,8 +21,8 @@
#include <clock.h>
#include <init.h>
#include <io.h>
-#include <mach/am33xx-silicon.h>
-#include <mach/am33xx-clock.h>
+#include <mach/omap/am33xx-silicon.h>
+#include <mach/omap/am33xx-clock.h>
#include <stdio.h>
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index d9436b17c0..5cf33039ed 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -28,8 +28,8 @@
#include <io.h>
#include <i2c/i2c.h>
-#include <mach/generic.h>
-#include <mach/omap3-clock.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap3-clock.h>
/* This will be the driver name */
#define DRIVER_NAME "i2c-omap"
diff --git a/drivers/mci/omap_hsmmc.c b/drivers/mci/omap_hsmmc.c
index 205d5b434a..0052d89525 100644
--- a/drivers/mci/omap_hsmmc.c
+++ b/drivers/mci/omap_hsmmc.c
@@ -12,12 +12,12 @@
#include <io.h>
#include <linux/err.h>
-#include <mach/omap_hsmmc.h>
+#include <mach/omap/omap_hsmmc.h>
#if defined(CONFIG_MFD_TWL6030) && \
defined(CONFIG_MCI_OMAP_HSMMC) && \
defined(CONFIG_ARCH_OMAP4)
-#include <mach/omap4_twl6030_mmc.h>
+#include <mach/omap/omap4_twl6030_mmc.h>
#endif
struct hsmmc {
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index c7252ce72a..c5e50d27c8 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -68,8 +68,8 @@
#include <linux/mtd/rawnand.h>
#include <linux/mtd/nand_ecc.h>
#include <io.h>
-#include <mach/gpmc.h>
-#include <mach/gpmc_nand.h>
+#include <mach/omap/gpmc.h>
+#include <mach/omap/gpmc_nand.h>
#include <platform_data/elm.h>
#include "nand_omap_bch_decoder.h"
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 82a1fb974e..eacb382afe 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -22,7 +22,7 @@
#include <asm/system.h>
#include <linux/err.h>
-#include <mach/cpsw.h>
+#include <mach/omap/cpsw.h>
#define CPSW_VERSION_1 0x19010a
#define CPSW_VERSION_2 0x19010c
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 2415aa7443..7f2e1af3f7 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -31,7 +31,7 @@
#include <init.h>
#include <asm/system.h>
#include <linux/phy.h>
-#include <mach/emac_defs.h>
+#include <mach/omap/emac_defs.h>
#include <of_net.h>
#include "davinci_emac.h"
diff --git a/drivers/serial/serial_omap4_usbboot.c b/drivers/serial/serial_omap4_usbboot.c
index ea018444d5..463d217f97 100644
--- a/drivers/serial/serial_omap4_usbboot.c
+++ b/drivers/serial/serial_omap4_usbboot.c
@@ -4,7 +4,7 @@
#include <init.h>
#include <malloc.h>
#include <errno.h>
-#include <mach/omap4_rom_usb.h>
+#include <mach/omap/omap4_rom_usb.h>
struct serial_omap4_usbboot_priv {
struct console_device cdev;
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 858dc55f32..dd18c4af39 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -11,15 +11,15 @@
#include <mfd/twl4030.h>
#include <usb/twl4030.h>
-#include <mach/ehci.h>
+#include <mach/omap/ehci.h>
#include <common.h>
#include <io.h>
#include <clock.h>
#include <gpio.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap3-clock.h>
-#include <mach/cm-regbits-34xx.h>
-#include <mach/sys_info.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap3-clock.h>
+#include <mach/omap/cm-regbits-34xx.h>
+#include <mach/omap/sys_info.h>
void omap_usb_utmi_init(struct omap_hcd *omap, u8 tll_channel_mask)
{
diff --git a/fs/omap4_usbbootfs.c b/fs/omap4_usbbootfs.c
index 985d968cc5..9b0755d539 100644
--- a/fs/omap4_usbbootfs.c
+++ b/fs/omap4_usbbootfs.c
@@ -17,7 +17,7 @@
#include <init.h>
#include <linux/stat.h>
#include <linux/err.h>
-#include <mach/omap4_rom_usb.h>
+#include <mach/omap/omap4_rom_usb.h>
#define OMAP4_USBBOOT_FS_MAGIC 0x5562464D
#define OMAP4_USBBOOT_FS_CMD_OPEN 0x46530000
diff --git a/arch/arm/mach-omap/include/mach/am33xx-clock.h b/include/mach/omap/am33xx-clock.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/am33xx-clock.h
rename to include/mach/omap/am33xx-clock.h
diff --git a/arch/arm/mach-omap/include/mach/am33xx-generic.h b/include/mach/omap/am33xx-generic.h
similarity index 92%
rename from arch/arm/mach-omap/include/mach/am33xx-generic.h
rename to include/mach/omap/am33xx-generic.h
index e146bf0909..30aa139741 100644
--- a/arch/arm/mach-omap/include/mach/am33xx-generic.h
+++ b/include/mach/omap/am33xx-generic.h
@@ -4,8 +4,8 @@
#define __MACH_AM33XX_GENERIC_H
#include <string.h>
-#include <mach/generic.h>
-#include <mach/am33xx-silicon.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/am33xx-silicon.h>
int am33xx_register_ethaddr(int eth_id, int mac_id);
diff --git a/arch/arm/mach-omap/include/mach/am33xx-mux.h b/include/mach/omap/am33xx-mux.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/am33xx-mux.h
rename to include/mach/omap/am33xx-mux.h
diff --git a/arch/arm/mach-omap/include/mach/am33xx-silicon.h b/include/mach/omap/am33xx-silicon.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/am33xx-silicon.h
rename to include/mach/omap/am33xx-silicon.h
diff --git a/arch/arm/mach-omap/include/mach/am3xxx-silicon.h b/include/mach/omap/am3xxx-silicon.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/am3xxx-silicon.h
rename to include/mach/omap/am3xxx-silicon.h
diff --git a/arch/arm/mach-omap/include/mach/bbu.h b/include/mach/omap/bbu.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/bbu.h
rename to include/mach/omap/bbu.h
diff --git a/arch/arm/mach-omap/include/mach/clocks.h b/include/mach/omap/clocks.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/clocks.h
rename to include/mach/omap/clocks.h
diff --git a/arch/arm/mach-omap/include/mach/cm-regbits-34xx.h b/include/mach/omap/cm-regbits-34xx.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/cm-regbits-34xx.h
rename to include/mach/omap/cm-regbits-34xx.h
diff --git a/arch/arm/mach-omap/include/mach/control.h b/include/mach/omap/control.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/control.h
rename to include/mach/omap/control.h
diff --git a/arch/arm/mach-omap/include/mach/cpsw.h b/include/mach/omap/cpsw.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/cpsw.h
rename to include/mach/omap/cpsw.h
diff --git a/arch/arm/mach-omap/include/mach/debug_ll.h b/include/mach/omap/debug_ll.h
similarity index 95%
rename from arch/arm/mach-omap/include/mach/debug_ll.h
rename to include/mach/omap/debug_ll.h
index 25ddd485be..b0a3b0abde 100644
--- a/arch/arm/mach-omap/include/mach/debug_ll.h
+++ b/include/mach/omap/debug_ll.h
@@ -18,9 +18,9 @@
#define __MACH_DEBUG_LL_H__
#include <io.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap4-silicon.h>
-#include <mach/am33xx-silicon.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/am33xx-silicon.h>
#define LSR_THRE 0x20 /* Xmit holding register empty */
#define LCR_BKSE 0x80 /* Bank select enable */
diff --git a/arch/arm/mach-omap/include/mach/devices.h b/include/mach/omap/devices.h
similarity index 92%
rename from arch/arm/mach-omap/include/mach/devices.h
rename to include/mach/omap/devices.h
index 0549dbb2f1..ef2e186e14 100644
--- a/arch/arm/mach-omap/include/mach/devices.h
+++ b/include/mach/omap/devices.h
@@ -3,7 +3,7 @@
#ifndef __MACH_OMAP_DEVICES_H
#define __MACH_OMAP_DEVICES_H
-#include <mach/omap_hsmmc.h>
+#include <mach/omap/omap_hsmmc.h>
#include <video/omap-fb.h>
void omap_add_ram0(resource_size_t size);
diff --git a/arch/arm/mach-omap/include/mach/ehci.h b/include/mach/omap/ehci.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/ehci.h
rename to include/mach/omap/ehci.h
diff --git a/arch/arm/mach-omap/include/mach/emac_defs.h b/include/mach/omap/emac_defs.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/emac_defs.h
rename to include/mach/omap/emac_defs.h
diff --git a/arch/arm/mach-omap/include/mach/emif4.h b/include/mach/omap/emif4.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/emif4.h
rename to include/mach/omap/emif4.h
diff --git a/arch/arm/mach-omap/include/mach/generic.h b/include/mach/omap/generic.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/generic.h
rename to include/mach/omap/generic.h
diff --git a/arch/arm/mach-omap/include/mach/gpmc.h b/include/mach/omap/gpmc.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/gpmc.h
rename to include/mach/omap/gpmc.h
diff --git a/arch/arm/mach-omap/include/mach/gpmc_nand.h b/include/mach/omap/gpmc_nand.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/gpmc_nand.h
rename to include/mach/omap/gpmc_nand.h
diff --git a/arch/arm/mach-omap/include/mach/intc.h b/include/mach/omap/intc.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/intc.h
rename to include/mach/omap/intc.h
diff --git a/arch/arm/mach-omap/include/mach/mcspi.h b/include/mach/omap/mcspi.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/mcspi.h
rename to include/mach/omap/mcspi.h
diff --git a/arch/arm/mach-omap/include/mach/omap3-clock.h b/include/mach/omap/omap3-clock.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap3-clock.h
rename to include/mach/omap/omap3-clock.h
diff --git a/arch/arm/mach-omap/include/mach/omap3-devices.h b/include/mach/omap/omap3-devices.h
similarity index 94%
rename from arch/arm/mach-omap/include/mach/omap3-devices.h
rename to include/mach/omap/omap3-devices.h
index 16ef2184db..6203de883a 100644
--- a/arch/arm/mach-omap/include/mach/omap3-devices.h
+++ b/include/mach/omap/omap3-devices.h
@@ -5,10 +5,10 @@
#include <driver.h>
#include <linux/sizes.h>
-#include <mach/omap3-silicon.h>
-#include <mach/devices.h>
-#include <mach/mcspi.h>
-#include <mach/omap_hsmmc.h>
+#include <mach/omap/omap3-silicon.h>
+#include <mach/omap/devices.h>
+#include <mach/omap/mcspi.h>
+#include <mach/omap/omap_hsmmc.h>
static inline void omap3_add_sram0(void)
diff --git a/arch/arm/mach-omap/include/mach/omap3-generic.h b/include/mach/omap/omap3-generic.h
similarity index 90%
rename from arch/arm/mach-omap/include/mach/omap3-generic.h
rename to include/mach/omap/omap3-generic.h
index 6304ac7bb8..e70d28fb9e 100644
--- a/arch/arm/mach-omap/include/mach/omap3-generic.h
+++ b/include/mach/omap/omap3-generic.h
@@ -5,8 +5,8 @@
#include <linux/sizes.h>
#include <linux/string.h>
-#include <mach/generic.h>
-#include <mach/omap3-silicon.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap3-silicon.h>
static inline void omap3_save_bootinfo(uint32_t *info)
{
diff --git a/arch/arm/mach-omap/include/mach/omap3-mux.h b/include/mach/omap/omap3-mux.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap3-mux.h
rename to include/mach/omap/omap3-mux.h
diff --git a/arch/arm/mach-omap/include/mach/omap3-silicon.h b/include/mach/omap/omap3-silicon.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap3-silicon.h
rename to include/mach/omap/omap3-silicon.h
diff --git a/arch/arm/mach-omap/include/mach/omap3-smx.h b/include/mach/omap/omap3-smx.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap3-smx.h
rename to include/mach/omap/omap3-smx.h
diff --git a/arch/arm/mach-omap/include/mach/omap4-clock.h b/include/mach/omap/omap4-clock.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap4-clock.h
rename to include/mach/omap/omap4-clock.h
diff --git a/arch/arm/mach-omap/include/mach/omap4-devices.h b/include/mach/omap/omap4-devices.h
similarity index 94%
rename from arch/arm/mach-omap/include/mach/omap4-devices.h
rename to include/mach/omap/omap4-devices.h
index 530132998c..de73062bc5 100644
--- a/arch/arm/mach-omap/include/mach/omap4-devices.h
+++ b/include/mach/omap/omap4-devices.h
@@ -5,10 +5,10 @@
#include <driver.h>
#include <linux/sizes.h>
-#include <mach/devices.h>
-#include <mach/omap4-silicon.h>
-#include <mach/mcspi.h>
-#include <mach/omap_hsmmc.h>
+#include <mach/omap/devices.h>
+#include <mach/omap/omap4-silicon.h>
+#include <mach/omap/mcspi.h>
+#include <mach/omap/omap_hsmmc.h>
static inline void omap44xx_add_sram0(void)
{
diff --git a/arch/arm/mach-omap/include/mach/omap4-generic.h b/include/mach/omap/omap4-generic.h
similarity index 88%
rename from arch/arm/mach-omap/include/mach/omap4-generic.h
rename to include/mach/omap/omap4-generic.h
index b6a72cfc55..38fa79a1f8 100644
--- a/arch/arm/mach-omap/include/mach/omap4-generic.h
+++ b/include/mach/omap/omap4-generic.h
@@ -4,8 +4,8 @@
#define __MACH_OMAP4_GENERIC_H
#include <linux/sizes.h>
-#include <mach/generic.h>
-#include <mach/omap4-silicon.h>
+#include <mach/omap/generic.h>
+#include <mach/omap/omap4-silicon.h>
static inline void omap4_save_bootinfo(uint32_t *info)
{
diff --git a/arch/arm/mach-omap/include/mach/omap4-mux.h b/include/mach/omap/omap4-mux.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap4-mux.h
rename to include/mach/omap/omap4-mux.h
diff --git a/arch/arm/mach-omap/include/mach/omap4-silicon.h b/include/mach/omap/omap4-silicon.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap4-silicon.h
rename to include/mach/omap/omap4-silicon.h
diff --git a/arch/arm/mach-omap/include/mach/omap4_rom_usb.h b/include/mach/omap/omap4_rom_usb.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap4_rom_usb.h
rename to include/mach/omap/omap4_rom_usb.h
diff --git a/arch/arm/mach-omap/include/mach/omap4_twl6030_mmc.h b/include/mach/omap/omap4_twl6030_mmc.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap4_twl6030_mmc.h
rename to include/mach/omap/omap4_twl6030_mmc.h
diff --git a/arch/arm/mach-omap/include/mach/omap_hsmmc.h b/include/mach/omap/omap_hsmmc.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/omap_hsmmc.h
rename to include/mach/omap/omap_hsmmc.h
diff --git a/arch/arm/mach-omap/include/mach/sdrc.h b/include/mach/omap/sdrc.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/sdrc.h
rename to include/mach/omap/sdrc.h
diff --git a/arch/arm/mach-omap/include/mach/sys_info.h b/include/mach/omap/sys_info.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/sys_info.h
rename to include/mach/omap/sys_info.h
diff --git a/arch/arm/mach-omap/include/mach/syslib.h b/include/mach/omap/syslib.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/syslib.h
rename to include/mach/omap/syslib.h
diff --git a/arch/arm/mach-omap/include/mach/timers.h b/include/mach/omap/timers.h
similarity index 100%
rename from arch/arm/mach-omap/include/mach/timers.h
rename to include/mach/omap/timers.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 17/50] ARM: nomadik: Move mach header files to include/mach/nomadik
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (15 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 16/50] ARM: omap: Move mach header files to include/mach/omap Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:20 ` [PATCH 18/50] ARM: mxs: Move mach header files to include/mach/mxs Sascha Hauer
` (32 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all nomadik specific header files to include/mach/nomadik/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/nhk8815/setup.c | 8 ++++----
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-nomadik/8815.c | 4 ++--
arch/arm/mach-nomadik/reset.c | 2 +-
arch/arm/mach-nomadik/timer.c | 2 +-
drivers/mtd/nand/nomadik_nand.c | 4 ++--
.../include/mach => include/mach/nomadik}/board.h | 0
.../include/mach => include/mach/nomadik}/fsmc.h | 2 +-
.../include/mach => include/mach/nomadik}/hardware.h | 0
.../include/mach => include/mach/nomadik}/nand.h | 0
10 files changed, 13 insertions(+), 11 deletions(-)
rename {arch/arm/mach-nomadik/include/mach => include/mach/nomadik}/board.h (100%)
rename {arch/arm/mach-nomadik/include/mach => include/mach/nomadik}/fsmc.h (96%)
rename {arch/arm/mach-nomadik/include/mach => include/mach/nomadik}/hardware.h (100%)
rename {arch/arm/mach-nomadik/include/mach => include/mach/nomadik}/nand.h (100%)
diff --git a/arch/arm/boards/nhk8815/setup.c b/arch/arm/boards/nhk8815/setup.c
index 90ec33f710..42165c06c0 100644
--- a/arch/arm/boards/nhk8815/setup.c
+++ b/arch/arm/boards/nhk8815/setup.c
@@ -11,10 +11,10 @@
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
-#include <mach/board.h>
-#include <mach/nand.h>
-#include <mach/fsmc.h>
+#include <mach/nomadik/hardware.h>
+#include <mach/nomadik/board.h>
+#include <mach/nomadik/nand.h>
+#include <mach/nomadik/fsmc.h>
static int nhk8815_nand_init(void)
{
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 25f7559527..1c021acf6f 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -38,6 +38,8 @@
#include <mach/pxa/debug_ll.h>
#elif defined CONFIG_ARCH_OMAP
#include <mach/omap/debug_ll.h>
+#elif defined CONFIG_ARCH_NOMADIK
+#include <mach/nomadik/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-nomadik/8815.c b/arch/arm/mach-nomadik/8815.c
index 9f9c0342b4..d911de38c4 100644
--- a/arch/arm/mach-nomadik/8815.c
+++ b/arch/arm/mach-nomadik/8815.c
@@ -17,8 +17,8 @@
#include <common.h>
#include <init.h>
#include <linux/clkdev.h>
-#include <mach/hardware.h>
-#include <mach/board.h>
+#include <mach/nomadik/hardware.h>
+#include <mach/nomadik/board.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <linux/amba/bus.h>
diff --git a/arch/arm/mach-nomadik/reset.c b/arch/arm/mach-nomadik/reset.c
index d5266068e2..d3d54de07e 100644
--- a/arch/arm/mach-nomadik/reset.c
+++ b/arch/arm/mach-nomadik/reset.c
@@ -18,7 +18,7 @@
#include <init.h>
#include <io.h>
#include <restart.h>
-#include <mach/hardware.h>
+#include <mach/nomadik/hardware.h>
static void __noreturn nomadik_restart_soc(struct restart_handler *rst)
{
diff --git a/arch/arm/mach-nomadik/timer.c b/arch/arm/mach-nomadik/timer.c
index 0b8dc866eb..73abbe9b91 100644
--- a/arch/arm/mach-nomadik/timer.c
+++ b/arch/arm/mach-nomadik/timer.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/nomadik/hardware.h>
/* Initial value for SRC control register: all timers use MXTAL/8 source */
#define SRC_CR_INIT_MASK 0x00007fff
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c
index ef8df3ef80..940ed9809e 100644
--- a/drivers/mtd/nand/nomadik_nand.c
+++ b/drivers/mtd/nand/nomadik_nand.c
@@ -24,8 +24,8 @@
#include <linux/mtd/rawnand.h>
#include <io.h>
-#include <mach/nand.h>
-#include <mach/fsmc.h>
+#include <mach/nomadik/nand.h>
+#include <mach/nomadik/fsmc.h>
#include <errno.h>
diff --git a/arch/arm/mach-nomadik/include/mach/board.h b/include/mach/nomadik/board.h
similarity index 100%
rename from arch/arm/mach-nomadik/include/mach/board.h
rename to include/mach/nomadik/board.h
diff --git a/arch/arm/mach-nomadik/include/mach/fsmc.h b/include/mach/nomadik/fsmc.h
similarity index 96%
rename from arch/arm/mach-nomadik/include/mach/fsmc.h
rename to include/mach/nomadik/fsmc.h
index 3d46eb2a47..be0f9569b5 100644
--- a/arch/arm/mach-nomadik/include/mach/fsmc.h
+++ b/include/mach/nomadik/fsmc.h
@@ -5,7 +5,7 @@
#ifndef __ASM_ARCH_FSMC_H
#define __ASM_ARCH_FSMC_H
-#include <mach/hardware.h>
+#include <mach/nomadik/hardware.h>
/*
* Register list
*/
diff --git a/arch/arm/mach-nomadik/include/mach/hardware.h b/include/mach/nomadik/hardware.h
similarity index 100%
rename from arch/arm/mach-nomadik/include/mach/hardware.h
rename to include/mach/nomadik/hardware.h
diff --git a/arch/arm/mach-nomadik/include/mach/nand.h b/include/mach/nomadik/nand.h
similarity index 100%
rename from arch/arm/mach-nomadik/include/mach/nand.h
rename to include/mach/nomadik/nand.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 18/50] ARM: mxs: Move mach header files to include/mach/mxs
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (16 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 17/50] ARM: nomadik: Move mach header files to include/mach/nomadik Sascha Hauer
@ 2023-03-03 9:20 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 19/50] ARM: ep93xx: Move mach header files to include/mach/ep93xx Sascha Hauer
` (31 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:20 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all mxs specific header files to include/mach/mxs/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/chumby_falconwing/falconwing.c | 10 +++++-----
arch/arm/boards/chumby_falconwing/lowlevel.c | 2 +-
arch/arm/boards/crystalfontz-cfa10036/cfa10036.c | 8 ++++----
arch/arm/boards/crystalfontz-cfa10036/lowlevel.c | 2 +-
arch/arm/boards/duckbill/board.c | 12 ++++++------
arch/arm/boards/duckbill/lowlevel.c | 6 +++---
arch/arm/boards/freescale-mx23-evk/lowlevel.c | 2 +-
arch/arm/boards/freescale-mx23-evk/mx23-evk.c | 8 ++++----
arch/arm/boards/freescale-mx28-evk/board.c | 2 +-
arch/arm/boards/freescale-mx28-evk/lowlevel.c | 6 +++---
.../boards/imx233-olinuxino/imx23-olinuxino.c | 8 ++++----
arch/arm/boards/imx233-olinuxino/lowlevel.c | 6 +++---
arch/arm/boards/karo-tx28/lowlevel.c | 6 +++---
arch/arm/boards/karo-tx28/tx28-stk5.c | 10 +++++-----
arch/arm/boards/karo-tx28/tx28.c | 6 +++---
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-mxs/bcb.c | 2 +-
arch/arm/mach-mxs/clocksource-imx23.c | 2 +-
arch/arm/mach-mxs/clocksource-imx28.c | 2 +-
arch/arm/mach-mxs/imx.c | 6 +++---
arch/arm/mach-mxs/iomux-imx.c | 4 ++--
arch/arm/mach-mxs/lradc-init.c | 6 +++---
arch/arm/mach-mxs/mem-init.c | 10 +++++-----
arch/arm/mach-mxs/ocotp.c | 6 +++---
arch/arm/mach-mxs/power-init.c | 16 ++++++++--------
arch/arm/mach-mxs/power.c | 4 ++--
arch/arm/mach-mxs/soc-imx23.c | 4 ++--
arch/arm/mach-mxs/soc-imx28.c | 4 ++--
arch/arm/mach-mxs/usb-imx23.c | 6 +++---
arch/arm/mach-mxs/usb-imx28.c | 4 ++--
common/imx-bbu-nand-fcb.c | 4 ++--
drivers/clk/mxs/clk-imx23.c | 2 +-
drivers/clk/mxs/clk-imx28.c | 2 +-
drivers/mci/mxs.c | 4 ++--
drivers/spi/mxs_spi.c | 4 ++--
drivers/video/stm.c | 2 +-
.../include/mach => include/mach/mxs}/debug_ll.h | 2 +-
.../include/mach => include/mach/mxs}/devices.h | 2 +-
.../include/mach => include/mach/mxs}/fb.h | 0
.../include/mach => include/mach/mxs}/generic.h | 0
.../include/mach => include/mach/mxs}/imx-regs.h | 4 ++--
.../mach => include/mach/mxs}/imx23-regs.h | 0
.../include/mach => include/mach/mxs}/imx23.h | 0
.../mach => include/mach/mxs}/imx28-regs.h | 0
.../include/mach => include/mach/mxs}/imx28.h | 0
.../include/mach => include/mach/mxs}/init.h | 0
.../mach => include/mach/mxs}/iomux-imx23.h | 0
.../mach => include/mach/mxs}/iomux-imx28.h | 0
.../include/mach => include/mach/mxs}/iomux.h | 4 ++--
.../include/mach => include/mach/mxs}/mci.h | 0
.../include/mach => include/mach/mxs}/ocotp.h | 0
.../include/mach => include/mach/mxs}/power.h | 0
.../mach/mxs}/regs-clkctrl-mx23.h | 2 +-
.../mach/mxs}/regs-clkctrl-mx28.h | 2 +-
.../mach => include/mach/mxs}/regs-common.h | 0
.../mach => include/mach/mxs}/regs-lradc.h | 2 +-
.../mach => include/mach/mxs}/regs-power-mx28.h | 2 +-
.../include/mach => include/mach/mxs}/regs-rtc.h | 2 +-
.../include/mach => include/mach/mxs}/revision.h | 0
.../include/mach => include/mach/mxs}/ssp.h | 0
.../include/mach => include/mach/mxs}/usb.h | 0
61 files changed, 107 insertions(+), 105 deletions(-)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/debug_ll.h (93%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/devices.h (97%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/fb.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/generic.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/imx-regs.h (79%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/imx23-regs.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/imx23.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/imx28-regs.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/imx28.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/init.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/iomux-imx23.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/iomux-imx28.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/iomux.h (98%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/mci.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/ocotp.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/power.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/regs-clkctrl-mx23.h (99%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/regs-clkctrl-mx28.h (99%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/regs-common.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/regs-lradc.h (99%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/regs-power-mx28.h (99%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/regs-rtc.h (99%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/revision.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/ssp.h (100%)
rename {arch/arm/mach-mxs/include/mach => include/mach/mxs}/usb.h (100%)
diff --git a/arch/arm/boards/chumby_falconwing/falconwing.c b/arch/arm/boards/chumby_falconwing/falconwing.c
index 44619d0c24..9f51d2253b 100644
--- a/arch/arm/boards/chumby_falconwing/falconwing.c
+++ b/arch/arm/boards/chumby_falconwing/falconwing.c
@@ -15,11 +15,11 @@
#include <io.h>
#include <asm/mmu.h>
#include <generated/mach-types.h>
-#include <mach/imx-regs.h>
-#include <mach/mci.h>
-#include <mach/fb.h>
-#include <mach/usb.h>
-#include <mach/iomux.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/mci.h>
+#include <mach/mxs/fb.h>
+#include <mach/mxs/usb.h>
+#include <mach/mxs/iomux.h>
static struct mxs_mci_platform_data mci_pdata = {
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED,
diff --git a/arch/arm/boards/chumby_falconwing/lowlevel.c b/arch/arm/boards/chumby_falconwing/lowlevel.c
index f0c3143e8d..f68b17bd8a 100644
--- a/arch/arm/boards/chumby_falconwing/lowlevel.c
+++ b/arch/arm/boards/chumby_falconwing/lowlevel.c
@@ -4,7 +4,7 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx23-regs.h>
+#include <mach/mxs/imx23-regs.h>
#include <generated/mach-types.h>
static noinline void continue_imx_entry(size_t size)
diff --git a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
index 69ac71b0c3..c653b2b0e9 100644
--- a/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
+++ b/arch/arm/boards/crystalfontz-cfa10036/cfa10036.c
@@ -19,15 +19,15 @@
#include <i2c/i2c-gpio.h>
#include <i2c/at24.h>
-#include <mach/imx-regs.h>
-#include <mach/iomux.h>
-#include <mach/mci.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/iomux.h>
+#include <mach/mxs/mci.h>
#include <asm/armlinux.h>
#include <asm/mmu.h>
#include <asm/barebox-arm.h>
-#include <mach/fb.h>
+#include <mach/mxs/fb.h>
#include <generated/mach-types.h>
diff --git a/arch/arm/boards/crystalfontz-cfa10036/lowlevel.c b/arch/arm/boards/crystalfontz-cfa10036/lowlevel.c
index 8ebea0fedc..44be83c823 100644
--- a/arch/arm/boards/crystalfontz-cfa10036/lowlevel.c
+++ b/arch/arm/boards/crystalfontz-cfa10036/lowlevel.c
@@ -4,7 +4,7 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx28-regs.h>
+#include <mach/mxs/imx28-regs.h>
#include <generated/mach-types.h>
static noinline void continue_imx_entry(size_t size)
diff --git a/arch/arm/boards/duckbill/board.c b/arch/arm/boards/duckbill/board.c
index 56a4cc1853..4e8f564967 100644
--- a/arch/arm/boards/duckbill/board.c
+++ b/arch/arm/boards/duckbill/board.c
@@ -11,12 +11,12 @@
#include <io.h>
#include <net.h>
-#include <mach/imx-regs.h>
-#include <mach/iomux-imx28.h>
-#include <mach/iomux.h>
-#include <mach/ocotp.h>
-#include <mach/devices.h>
-#include <mach/usb.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/iomux-imx28.h>
+#include <mach/mxs/iomux.h>
+#include <mach/mxs/ocotp.h>
+#include <mach/mxs/devices.h>
+#include <mach/mxs/usb.h>
#include <usb/fsl_usb2.h>
#include <asm/armlinux.h>
diff --git a/arch/arm/boards/duckbill/lowlevel.c b/arch/arm/boards/duckbill/lowlevel.c
index 0f76d9c938..71862ec4b7 100644
--- a/arch/arm/boards/duckbill/lowlevel.c
+++ b/arch/arm/boards/duckbill/lowlevel.c
@@ -7,11 +7,11 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx28-regs.h>
-#include <mach/init.h>
+#include <mach/mxs/imx28-regs.h>
+#include <mach/mxs/init.h>
#include <io.h>
#include <debug_ll.h>
-#include <mach/iomux.h>
+#include <mach/mxs/iomux.h>
#include <stmp-device.h>
extern char __dtb_imx28_duckbill_start[];
diff --git a/arch/arm/boards/freescale-mx23-evk/lowlevel.c b/arch/arm/boards/freescale-mx23-evk/lowlevel.c
index 319e9784a4..b0c8518fbd 100644
--- a/arch/arm/boards/freescale-mx23-evk/lowlevel.c
+++ b/arch/arm/boards/freescale-mx23-evk/lowlevel.c
@@ -5,7 +5,7 @@
#include <generated/mach-types.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx23-regs.h>
+#include <mach/mxs/imx23-regs.h>
static noinline void continue_imx_entry(size_t size)
{
diff --git a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
index b0aa9e1a33..b5dbe5f41a 100644
--- a/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
+++ b/arch/arm/boards/freescale-mx23-evk/mx23-evk.c
@@ -11,11 +11,11 @@
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <asm/barebox-arm.h>
-#include <mach/imx-regs.h>
-#include <mach/mci.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/mci.h>
#include <usb/fsl_usb2.h>
-#include <mach/usb.h>
-#include <mach/iomux.h>
+#include <mach/mxs/usb.h>
+#include <mach/mxs/iomux.h>
static struct mxs_mci_platform_data mci_pdata = {
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED,
diff --git a/arch/arm/boards/freescale-mx28-evk/board.c b/arch/arm/boards/freescale-mx28-evk/board.c
index 92097a2bca..1c5d2da5a6 100644
--- a/arch/arm/boards/freescale-mx28-evk/board.c
+++ b/arch/arm/boards/freescale-mx28-evk/board.c
@@ -9,7 +9,7 @@
#include <common.h>
#include <init.h>
#include <net.h>
-#include <mach/ocotp.h>
+#include <mach/mxs/ocotp.h>
static void mx28_evk_get_ethaddr(void)
{
diff --git a/arch/arm/boards/freescale-mx28-evk/lowlevel.c b/arch/arm/boards/freescale-mx28-evk/lowlevel.c
index 7f0bd8a90e..42ac33fbbd 100644
--- a/arch/arm/boards/freescale-mx28-evk/lowlevel.c
+++ b/arch/arm/boards/freescale-mx28-evk/lowlevel.c
@@ -7,11 +7,11 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx28-regs.h>
-#include <mach/init.h>
+#include <mach/mxs/imx28-regs.h>
+#include <mach/mxs/init.h>
#include <io.h>
#include <debug_ll.h>
-#include <mach/iomux.h>
+#include <mach/mxs/iomux.h>
#include <stmp-device.h>
extern char __dtb_imx28_evk_start[];
diff --git a/arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c b/arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c
index 91151feba1..b164364560 100644
--- a/arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c
+++ b/arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c
@@ -19,11 +19,11 @@
#include <asm/armlinux.h>
#include <asm/barebox-arm.h>
#include <usb/ehci.h>
-#include <mach/usb.h>
+#include <mach/mxs/usb.h>
#include <generated/mach-types.h>
-#include <mach/imx-regs.h>
-#include <mach/mci.h>
-#include <mach/iomux.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/mci.h>
+#include <mach/mxs/iomux.h>
static struct mxs_mci_platform_data mci_pdata = {
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED,
diff --git a/arch/arm/boards/imx233-olinuxino/lowlevel.c b/arch/arm/boards/imx233-olinuxino/lowlevel.c
index 6e80e6889b..f78daa1d8c 100644
--- a/arch/arm/boards/imx233-olinuxino/lowlevel.c
+++ b/arch/arm/boards/imx233-olinuxino/lowlevel.c
@@ -4,11 +4,11 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx23-regs.h>
-#include <mach/init.h>
+#include <mach/mxs/imx23-regs.h>
+#include <mach/mxs/init.h>
#include <io.h>
#include <debug_ll.h>
-#include <mach/iomux.h>
+#include <mach/mxs/iomux.h>
#include <generated/mach-types.h>
static noinline void continue_imx_entry(size_t size)
diff --git a/arch/arm/boards/karo-tx28/lowlevel.c b/arch/arm/boards/karo-tx28/lowlevel.c
index 9e90e40926..668355f9e6 100644
--- a/arch/arm/boards/karo-tx28/lowlevel.c
+++ b/arch/arm/boards/karo-tx28/lowlevel.c
@@ -7,11 +7,11 @@
#include <linux/sizes.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/imx28-regs.h>
-#include <mach/init.h>
+#include <mach/mxs/imx28-regs.h>
+#include <mach/mxs/init.h>
#include <io.h>
#include <debug_ll.h>
-#include <mach/iomux.h>
+#include <mach/mxs/iomux.h>
#include <stmp-device.h>
#include <generated/mach-types.h>
diff --git a/arch/arm/boards/karo-tx28/tx28-stk5.c b/arch/arm/boards/karo-tx28/tx28-stk5.c
index c5e7b1451c..32dcd31ccd 100644
--- a/arch/arm/boards/karo-tx28/tx28-stk5.c
+++ b/arch/arm/boards/karo-tx28/tx28-stk5.c
@@ -14,11 +14,11 @@
#include <asm/sections.h>
#include <asm/barebox-arm.h>
#include <linux/err.h>
-#include <mach/imx-regs.h>
-#include <mach/mci.h>
-#include <mach/fb.h>
-#include <mach/ocotp.h>
-#include <mach/iomux.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/mci.h>
+#include <mach/mxs/fb.h>
+#include <mach/mxs/ocotp.h>
+#include <mach/mxs/iomux.h>
#include <generated/mach-types.h>
#include "tx28.h"
diff --git a/arch/arm/boards/karo-tx28/tx28.c b/arch/arm/boards/karo-tx28/tx28.c
index 8bd2252410..009ba75961 100644
--- a/arch/arm/boards/karo-tx28/tx28.c
+++ b/arch/arm/boards/karo-tx28/tx28.c
@@ -10,9 +10,9 @@
#include <asm/barebox-arm.h>
#include <io.h>
#include <generated/mach-types.h>
-#include <mach/imx-regs.h>
-#include <mach/devices.h>
-#include <mach/iomux.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/devices.h>
+#include <mach/mxs/iomux.h>
#include <asm/mmu.h>
#include "tx28.h"
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 1c021acf6f..e65c008de9 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -40,6 +40,8 @@
#include <mach/omap/debug_ll.h>
#elif defined CONFIG_ARCH_NOMADIK
#include <mach/nomadik/debug_ll.h>
+#elif defined CONFIG_ARCH_MXS
+#include <mach/mxs/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
index 749cf29af6..152a7c3bca 100644
--- a/arch/arm/mach-mxs/bcb.c
+++ b/arch/arm/mach-mxs/bcb.c
@@ -15,7 +15,7 @@
#include <errno.h>
#include <io.h>
-#include <mach/imx-regs.h>
+#include <mach/mxs/imx-regs.h>
#include <linux/err.h>
#include <linux/mtd/nand.h>
diff --git a/arch/arm/mach-mxs/clocksource-imx23.c b/arch/arm/mach-mxs/clocksource-imx23.c
index 2973422229..d1d9f10bec 100644
--- a/arch/arm/mach-mxs/clocksource-imx23.c
+++ b/arch/arm/mach-mxs/clocksource-imx23.c
@@ -5,7 +5,7 @@
#include <init.h>
#include <clock.h>
#include <notifier.h>
-#include <mach/imx23-regs.h>
+#include <mach/mxs/imx23-regs.h>
#include <io.h>
#define TIMROTCTRL 0x00
diff --git a/arch/arm/mach-mxs/clocksource-imx28.c b/arch/arm/mach-mxs/clocksource-imx28.c
index 6280cc64fb..306112ffa0 100644
--- a/arch/arm/mach-mxs/clocksource-imx28.c
+++ b/arch/arm/mach-mxs/clocksource-imx28.c
@@ -5,7 +5,7 @@
#include <init.h>
#include <clock.h>
#include <notifier.h>
-#include <mach/imx28-regs.h>
+#include <mach/mxs/imx28-regs.h>
#include <io.h>
#define TIMROTCTRL 0x00
diff --git a/arch/arm/mach-mxs/imx.c b/arch/arm/mach-mxs/imx.c
index a8a9500918..2b4e682281 100644
--- a/arch/arm/mach-mxs/imx.c
+++ b/arch/arm/mach-mxs/imx.c
@@ -9,9 +9,9 @@
#include <io.h>
#include <stmp-device.h>
-#include <mach/generic.h>
-#include <mach/imx-regs.h>
-#include <mach/revision.h>
+#include <mach/mxs/generic.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/revision.h>
#define HW_RTC_PERSISTENT1 0x070
diff --git a/arch/arm/mach-mxs/iomux-imx.c b/arch/arm/mach-mxs/iomux-imx.c
index 6b96fc4ed9..bf9d600bc7 100644
--- a/arch/arm/mach-mxs/iomux-imx.c
+++ b/arch/arm/mach-mxs/iomux-imx.c
@@ -6,9 +6,9 @@
#include <gpio.h>
#include <errno.h>
#include <io.h>
-#include <mach/iomux.h>
+#include <mach/mxs/iomux.h>
#include <stmp-device.h>
-#include <mach/imx-regs.h>
+#include <mach/mxs/imx-regs.h>
#define HW_PINCTRL_CTRL 0x000
#define HW_PINCTRL_MUXSEL0 0x100
diff --git a/arch/arm/mach-mxs/lradc-init.c b/arch/arm/mach-mxs/lradc-init.c
index 682a47530d..10d0be77fd 100644
--- a/arch/arm/mach-mxs/lradc-init.c
+++ b/arch/arm/mach-mxs/lradc-init.c
@@ -10,9 +10,9 @@
#include <common.h>
#include <config.h>
#include <asm/io.h>
-#include <mach/imx-regs.h>
-#include <mach/regs-lradc.h>
-#include <mach/init.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/regs-lradc.h>
+#include <mach/mxs/init.h>
void mxs_lradc_init(void)
{
diff --git a/arch/arm/mach-mxs/mem-init.c b/arch/arm/mach-mxs/mem-init.c
index 44785c2bfc..0d289266d0 100644
--- a/arch/arm/mach-mxs/mem-init.c
+++ b/arch/arm/mach-mxs/mem-init.c
@@ -12,16 +12,16 @@
#include <common.h>
#include <config.h>
#include <io.h>
-#include <mach/imx-regs.h>
+#include <mach/mxs/imx-regs.h>
#include <linux/compiler.h>
-#include <mach/init.h>
-#include <mach/regs-power-mx28.h>
+#include <mach/mxs/init.h>
+#include <mach/mxs/regs-power-mx28.h>
#if defined CONFIG_ARCH_IMX23
-# include <mach/regs-clkctrl-mx23.h>
+#include <mach/mxs/regs-clkctrl-mx23.h>
#endif
#if defined CONFIG_ARCH_IMX28
-# include <mach/regs-clkctrl-mx28.h>
+#include <mach/mxs/regs-clkctrl-mx28.h>
#endif
/* 1 second delay should be plenty of time for block reset. */
diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs/ocotp.c
index 665c4c9a88..ceda5fb5d9 100644
--- a/arch/arm/mach-mxs/ocotp.c
+++ b/arch/arm/mach-mxs/ocotp.c
@@ -18,9 +18,9 @@
#include <linux/clk.h>
#include <linux/err.h>
-#include <mach/generic.h>
-#include <mach/ocotp.h>
-#include <mach/power.h>
+#include <mach/mxs/generic.h>
+#include <mach/mxs/ocotp.h>
+#include <mach/mxs/power.h>
#define DRIVERNAME "ocotp"
diff --git a/arch/arm/mach-mxs/power-init.c b/arch/arm/mach-mxs/power-init.c
index c89f1f5f5d..408ff8ba99 100644
--- a/arch/arm/mach-mxs/power-init.c
+++ b/arch/arm/mach-mxs/power-init.c
@@ -10,19 +10,19 @@
#include <common.h>
#include <config.h>
#include <io.h>
-#include <mach/imx-regs.h>
+#include <mach/mxs/imx-regs.h>
-#include <mach/generic.h>
-#include <mach/init.h>
+#include <mach/mxs/generic.h>
+#include <mach/mxs/init.h>
#ifdef CONFIG_ARCH_IMX23
-#include <mach/regs-clkctrl-mx23.h>
+#include <mach/mxs/regs-clkctrl-mx23.h>
#endif
#ifdef CONFIG_ARCH_IMX28
-#include <mach/regs-clkctrl-mx28.h>
+#include <mach/mxs/regs-clkctrl-mx28.h>
#endif
-#include <mach/regs-power-mx28.h>
-#include <mach/regs-rtc.h>
-#include <mach/regs-lradc.h>
+#include <mach/mxs/regs-power-mx28.h>
+#include <mach/mxs/regs-rtc.h>
+#include <mach/mxs/regs-lradc.h>
int power_config;
diff --git a/arch/arm/mach-mxs/power.c b/arch/arm/mach-mxs/power.c
index 342f7b0271..2672a014a1 100644
--- a/arch/arm/mach-mxs/power.c
+++ b/arch/arm/mach-mxs/power.c
@@ -8,8 +8,8 @@
#include <io.h>
#include <stmp-device.h>
#include <errno.h>
-#include <mach/imx-regs.h>
-#include <mach/power.h>
+#include <mach/mxs/imx-regs.h>
+#include <mach/mxs/power.h>
#define POWER_CTRL (IMX_POWER_BASE + 0x0)
#define POWER_CTRL_CLKGATE 0x40000000
diff --git a/arch/arm/mach-mxs/soc-imx23.c b/arch/arm/mach-mxs/soc-imx23.c
index 16b1fda5ed..b799812c52 100644
--- a/arch/arm/mach-mxs/soc-imx23.c
+++ b/arch/arm/mach-mxs/soc-imx23.c
@@ -6,10 +6,10 @@
#include <common.h>
#include <init.h>
#include <restart.h>
-#include <mach/imx23-regs.h>
+#include <mach/mxs/imx23-regs.h>
#include <io.h>
#include <asm/memory.h>
-#include <mach/imx23.h>
+#include <mach/mxs/imx23.h>
#define HW_CLKCTRL_RESET 0x120
# define HW_CLKCTRL_RESET_CHIP (1 << 1)
diff --git a/arch/arm/mach-mxs/soc-imx28.c b/arch/arm/mach-mxs/soc-imx28.c
index e3d3cb1c0a..4a9697b8e4 100644
--- a/arch/arm/mach-mxs/soc-imx28.c
+++ b/arch/arm/mach-mxs/soc-imx28.c
@@ -6,10 +6,10 @@
#include <common.h>
#include <init.h>
#include <restart.h>
-#include <mach/imx28-regs.h>
+#include <mach/mxs/imx28-regs.h>
#include <io.h>
#include <asm/memory.h>
-#include <mach/imx28.h>
+#include <mach/mxs/imx28.h>
#define HW_CLKCTRL_RESET 0x1e0
# define HW_CLKCTRL_RESET_CHIP (1 << 1)
diff --git a/arch/arm/mach-mxs/usb-imx23.c b/arch/arm/mach-mxs/usb-imx23.c
index 6acf1bb786..37d267b4a9 100644
--- a/arch/arm/mach-mxs/usb-imx23.c
+++ b/arch/arm/mach-mxs/usb-imx23.c
@@ -5,9 +5,9 @@
#include <common.h>
#include <io.h>
-#include <mach/imx23-regs.h>
-#include <mach/power.h>
-#include <mach/usb.h>
+#include <mach/mxs/imx23-regs.h>
+#include <mach/mxs/power.h>
+#include <mach/mxs/usb.h>
#define USBPHY_PWD (IMX_USBPHY_BASE + 0x0)
diff --git a/arch/arm/mach-mxs/usb-imx28.c b/arch/arm/mach-mxs/usb-imx28.c
index 3793169b59..9c65dc7212 100644
--- a/arch/arm/mach-mxs/usb-imx28.c
+++ b/arch/arm/mach-mxs/usb-imx28.c
@@ -6,8 +6,8 @@
#include <common.h>
#include <io.h>
#include <errno.h>
-#include <mach/imx28-regs.h>
-#include <mach/usb.h>
+#include <mach/mxs/imx28-regs.h>
+#include <mach/mxs/usb.h>
#define POWER_CTRL (IMX_POWER_BASE + 0x0)
#define POWER_CTRL_CLKGATE 0x40000000
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index f154f6705d..0d46192720 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -31,7 +31,7 @@
#include <mach/imx/imx6.h>
#include <mach/imx/generic.h>
#else
-#include <mach/generic.h>
+#include <mach/mxs/generic.h>
#endif
static inline int fcb_is_bch_encoded(void)
@@ -1504,7 +1504,7 @@ int imx6_bbu_nand_register_handler(const char *name, unsigned long flags)
#define MX28_BCH_FLASHLAYOUT1_DATAN_SIZE_MASK 0xfff
#ifdef CONFIG_ARCH_IMX28
-#include <mach/imx28-regs.h>
+#include <mach/mxs/imx28-regs.h>
static void imx28_fcb_create(struct imx_nand_fcb_bbu_handler *imx_handler,
struct fcb_block *fcb, struct mtd_info *mtd)
diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c
index b207e5f194..aa342f3d1b 100644
--- a/drivers/clk/mxs/clk-imx23.c
+++ b/drivers/clk/mxs/clk-imx23.c
@@ -10,7 +10,7 @@
#include <io.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx23-regs.h>
+#include <mach/mxs/imx23-regs.h>
#include "clk.h"
diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c
index 3edf430464..190c997403 100644
--- a/drivers/clk/mxs/clk-imx28.c
+++ b/drivers/clk/mxs/clk-imx28.c
@@ -10,7 +10,7 @@
#include <io.h>
#include <linux/clkdev.h>
#include <linux/err.h>
-#include <mach/imx28-regs.h>
+#include <mach/mxs/imx28-regs.h>
#include <of_address.h>
#include "clk.h"
diff --git a/drivers/mci/mxs.c b/drivers/mci/mxs.c
index 6a348e331e..7c19032230 100644
--- a/drivers/mci/mxs.c
+++ b/drivers/mci/mxs.c
@@ -27,8 +27,8 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <asm/bitops.h>
-#include <mach/mci.h>
-#include <mach/ssp.h>
+#include <mach/mxs/mci.h>
+#include <mach/mxs/ssp.h>
#define CLOCKRATE_MIN (1 * 1000 * 1000)
#define CLOCKRATE_MAX (480 * 1000 * 1000)
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index c435e4f22b..d2ec42f064 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -18,8 +18,8 @@
#include <stmp-device.h>
#include <linux/clk.h>
#include <linux/err.h>
-#include <mach/generic.h>
-#include <mach/ssp.h>
+#include <mach/mxs/generic.h>
+#include <mach/mxs/ssp.h>
#define MXS_SPI_MAX_TIMEOUT (10 * MSECOND)
diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index 1998e1996e..68ac4feed3 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -20,7 +20,7 @@
#include <stmp-device.h>
#include <linux/clk.h>
#include <linux/err.h>
-#include <mach/fb.h>
+#include <mach/mxs/fb.h>
#define HW_LCDIF_CTRL 0x00
# define CTRL_SFTRST (1 << 31)
diff --git a/arch/arm/mach-mxs/include/mach/debug_ll.h b/include/mach/mxs/debug_ll.h
similarity index 93%
rename from arch/arm/mach-mxs/include/mach/debug_ll.h
rename to include/mach/mxs/debug_ll.h
index ac7a0e759d..49c8503765 100644
--- a/arch/arm/mach-mxs/include/mach/debug_ll.h
+++ b/include/mach/mxs/debug_ll.h
@@ -4,7 +4,7 @@
#define __MACH_DEBUG_LL_H__
#include <io.h>
-#include <mach/imx-regs.h>
+#include <mach/mxs/imx-regs.h>
#define UARTDBGDR 0x00
#define UARTDBGFR 0x18
diff --git a/arch/arm/mach-mxs/include/mach/devices.h b/include/mach/mxs/devices.h
similarity index 97%
rename from arch/arm/mach-mxs/include/mach/devices.h
rename to include/mach/mxs/devices.h
index c23f484973..d200b4b5cd 100644
--- a/arch/arm/mach-mxs/include/mach/devices.h
+++ b/include/mach/mxs/devices.h
@@ -7,7 +7,7 @@
#include <linux/sizes.h>
#include <xfuncs.h>
#include <driver.h>
-#include <mach/imx-regs.h>
+#include <mach/mxs/imx-regs.h>
static inline struct device *mxs_add_nand(unsigned long gpmi_base, unsigned long bch_base)
{
diff --git a/arch/arm/mach-mxs/include/mach/fb.h b/include/mach/mxs/fb.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/fb.h
rename to include/mach/mxs/fb.h
diff --git a/arch/arm/mach-mxs/include/mach/generic.h b/include/mach/mxs/generic.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/generic.h
rename to include/mach/mxs/generic.h
diff --git a/arch/arm/mach-mxs/include/mach/imx-regs.h b/include/mach/mxs/imx-regs.h
similarity index 79%
rename from arch/arm/mach-mxs/include/mach/imx-regs.h
rename to include/mach/mxs/imx-regs.h
index 4aede1bc93..648b200bc5 100644
--- a/arch/arm/mach-mxs/include/mach/imx-regs.h
+++ b/include/mach/mxs/imx-regs.h
@@ -5,11 +5,11 @@
# define _IMX_REGS_H
#if defined CONFIG_ARCH_IMX23
-# include <mach/imx23-regs.h>
+#include <mach/mxs/imx23-regs.h>
#endif
#if defined CONFIG_ARCH_IMX28
-# include <mach/imx28-regs.h>
+#include <mach/mxs/imx28-regs.h>
#endif
#endif /* _IMX_REGS_H */
diff --git a/arch/arm/mach-mxs/include/mach/imx23-regs.h b/include/mach/mxs/imx23-regs.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/imx23-regs.h
rename to include/mach/mxs/imx23-regs.h
diff --git a/arch/arm/mach-mxs/include/mach/imx23.h b/include/mach/mxs/imx23.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/imx23.h
rename to include/mach/mxs/imx23.h
diff --git a/arch/arm/mach-mxs/include/mach/imx28-regs.h b/include/mach/mxs/imx28-regs.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/imx28-regs.h
rename to include/mach/mxs/imx28-regs.h
diff --git a/arch/arm/mach-mxs/include/mach/imx28.h b/include/mach/mxs/imx28.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/imx28.h
rename to include/mach/mxs/imx28.h
diff --git a/arch/arm/mach-mxs/include/mach/init.h b/include/mach/mxs/init.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/init.h
rename to include/mach/mxs/init.h
diff --git a/arch/arm/mach-mxs/include/mach/iomux-imx23.h b/include/mach/mxs/iomux-imx23.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/iomux-imx23.h
rename to include/mach/mxs/iomux-imx23.h
diff --git a/arch/arm/mach-mxs/include/mach/iomux-imx28.h b/include/mach/mxs/iomux-imx28.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/iomux-imx28.h
rename to include/mach/mxs/iomux-imx28.h
diff --git a/arch/arm/mach-mxs/include/mach/iomux.h b/include/mach/mxs/iomux.h
similarity index 98%
rename from arch/arm/mach-mxs/include/mach/iomux.h
rename to include/mach/mxs/iomux.h
index 47e843e43f..b61661263e 100644
--- a/arch/arm/mach-mxs/include/mach/iomux.h
+++ b/include/mach/mxs/iomux.h
@@ -86,13 +86,13 @@
*/
# define PORTF(bank,bit) (BANK((bank) / 2) | BANKPIN((((bank) & 1) << 4) | (bit)) | ERROR((bit) & ~15) | ERROR((bank) & ~7))
# define VE_2_5V VOLTAGE(0)
-# include <mach/iomux-imx23.h>
+#include <mach/mxs/iomux-imx23.h>
#endif
#if defined CONFIG_ARCH_IMX28
# define PORTF(bank,bit) (BANK(bank) | BANKPIN(bit))
# define VE_3_3V VOLTAGE(1)
-# include <mach/iomux-imx28.h>
+#include <mach/mxs/iomux-imx28.h>
#endif
void imx_gpio_mode(uint32_t);
diff --git a/arch/arm/mach-mxs/include/mach/mci.h b/include/mach/mxs/mci.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/mci.h
rename to include/mach/mxs/mci.h
diff --git a/arch/arm/mach-mxs/include/mach/ocotp.h b/include/mach/mxs/ocotp.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/ocotp.h
rename to include/mach/mxs/ocotp.h
diff --git a/arch/arm/mach-mxs/include/mach/power.h b/include/mach/mxs/power.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/power.h
rename to include/mach/mxs/power.h
diff --git a/arch/arm/mach-mxs/include/mach/regs-clkctrl-mx23.h b/include/mach/mxs/regs-clkctrl-mx23.h
similarity index 99%
rename from arch/arm/mach-mxs/include/mach/regs-clkctrl-mx23.h
rename to include/mach/mxs/regs-clkctrl-mx23.h
index 289b159b74..ad3e7a21b1 100644
--- a/arch/arm/mach-mxs/include/mach/regs-clkctrl-mx23.h
+++ b/include/mach/mxs/regs-clkctrl-mx23.h
@@ -13,7 +13,7 @@
#ifndef __MX23_REGS_CLKCTRL_H__
#define __MX23_REGS_CLKCTRL_H__
-#include <mach/regs-common.h>
+#include <mach/mxs/regs-common.h>
#ifndef __ASSEMBLY__
struct mxs_clkctrl_regs {
diff --git a/arch/arm/mach-mxs/include/mach/regs-clkctrl-mx28.h b/include/mach/mxs/regs-clkctrl-mx28.h
similarity index 99%
rename from arch/arm/mach-mxs/include/mach/regs-clkctrl-mx28.h
rename to include/mach/mxs/regs-clkctrl-mx28.h
index aebb489d4b..ce01892274 100644
--- a/arch/arm/mach-mxs/include/mach/regs-clkctrl-mx28.h
+++ b/include/mach/mxs/regs-clkctrl-mx28.h
@@ -13,7 +13,7 @@
#ifndef __MX28_REGS_CLKCTRL_H__
#define __MX28_REGS_CLKCTRL_H__
-#include <mach/regs-common.h>
+#include <mach/mxs/regs-common.h>
#ifndef __ASSEMBLY__
struct mxs_clkctrl_regs {
diff --git a/arch/arm/mach-mxs/include/mach/regs-common.h b/include/mach/mxs/regs-common.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/regs-common.h
rename to include/mach/mxs/regs-common.h
diff --git a/arch/arm/mach-mxs/include/mach/regs-lradc.h b/include/mach/mxs/regs-lradc.h
similarity index 99%
rename from arch/arm/mach-mxs/include/mach/regs-lradc.h
rename to include/mach/mxs/regs-lradc.h
index 7f624be4c5..02e6b9bf09 100644
--- a/arch/arm/mach-mxs/include/mach/regs-lradc.h
+++ b/include/mach/mxs/regs-lradc.h
@@ -13,7 +13,7 @@
#ifndef __MX28_REGS_LRADC_H__
#define __MX28_REGS_LRADC_H__
-#include <mach/regs-common.h>
+#include <mach/mxs/regs-common.h>
#ifndef __ASSEMBLY__
struct mxs_lradc_regs {
diff --git a/arch/arm/mach-mxs/include/mach/regs-power-mx28.h b/include/mach/mxs/regs-power-mx28.h
similarity index 99%
rename from arch/arm/mach-mxs/include/mach/regs-power-mx28.h
rename to include/mach/mxs/regs-power-mx28.h
index 7b7349662b..510305a2e2 100644
--- a/arch/arm/mach-mxs/include/mach/regs-power-mx28.h
+++ b/include/mach/mxs/regs-power-mx28.h
@@ -9,7 +9,7 @@
#ifndef __MX28_REGS_POWER_H__
#define __MX28_REGS_POWER_H__
-#include <mach/regs-common.h>
+#include <mach/mxs/regs-common.h>
#ifndef __ASSEMBLY__
struct mxs_power_regs {
diff --git a/arch/arm/mach-mxs/include/mach/regs-rtc.h b/include/mach/mxs/regs-rtc.h
similarity index 99%
rename from arch/arm/mach-mxs/include/mach/regs-rtc.h
rename to include/mach/mxs/regs-rtc.h
index bd8fdad4f7..4d2e218e3b 100644
--- a/arch/arm/mach-mxs/include/mach/regs-rtc.h
+++ b/include/mach/mxs/regs-rtc.h
@@ -10,7 +10,7 @@
#ifndef __MX28_REGS_RTC_H__
#define __MX28_REGS_RTC_H__
-#include <mach/regs-common.h>
+#include <mach/mxs/regs-common.h>
#ifndef __ASSEMBLY__
struct mxs_rtc_regs {
diff --git a/arch/arm/mach-mxs/include/mach/revision.h b/include/mach/mxs/revision.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/revision.h
rename to include/mach/mxs/revision.h
diff --git a/arch/arm/mach-mxs/include/mach/ssp.h b/include/mach/mxs/ssp.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/ssp.h
rename to include/mach/mxs/ssp.h
diff --git a/arch/arm/mach-mxs/include/mach/usb.h b/include/mach/mxs/usb.h
similarity index 100%
rename from arch/arm/mach-mxs/include/mach/usb.h
rename to include/mach/mxs/usb.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 19/50] ARM: ep93xx: Move mach header files to include/mach/ep93xx
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (17 preceding siblings ...)
2023-03-03 9:20 ` [PATCH 18/50] ARM: mxs: Move mach header files to include/mach/mxs Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 20/50] ARM: digic: Move mach header files to include/mach/digic Sascha Hauer
` (30 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all ep93xx specific header files to include/mach/ep93xx/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/edb93xx/edb93xx.c | 2 +-
arch/arm/boards/edb93xx/flash_cfg.c | 2 +-
arch/arm/boards/edb93xx/pll_cfg.h | 2 +-
arch/arm/boards/edb93xx/sdram_cfg.h | 2 +-
arch/arm/include/asm/barebox.lds.h | 2 +-
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-ep93xx/clocksource.c | 2 +-
arch/arm/mach-ep93xx/gpio.c | 2 +-
arch/arm/mach-ep93xx/led.c | 2 +-
arch/arm/mach-ep93xx/lowlevel_init.S | 2 +-
drivers/net/ep93xx.c | 2 +-
.../include/mach => include/mach/ep93xx}/barebox.lds.h | 0
.../include/mach => include/mach/ep93xx}/ep93xx-regs.h | 0
13 files changed, 12 insertions(+), 10 deletions(-)
rename {arch/arm/mach-ep93xx/include/mach => include/mach/ep93xx}/barebox.lds.h (100%)
rename {arch/arm/mach-ep93xx/include/mach => include/mach/ep93xx}/ep93xx-regs.h (100%)
diff --git a/arch/arm/boards/edb93xx/edb93xx.c b/arch/arm/boards/edb93xx/edb93xx.c
index 0112866c30..8f7b5ede12 100644
--- a/arch/arm/boards/edb93xx/edb93xx.c
+++ b/arch/arm/boards/edb93xx/edb93xx.c
@@ -10,7 +10,7 @@
#include <io.h>
#include <malloc.h>
#include <generated/mach-types.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#include <platform_data/eth-ep93xx.h>
#include "edb93xx.h"
diff --git a/arch/arm/boards/edb93xx/flash_cfg.c b/arch/arm/boards/edb93xx/flash_cfg.c
index 8400db69de..2c471c7721 100644
--- a/arch/arm/boards/edb93xx/flash_cfg.c
+++ b/arch/arm/boards/edb93xx/flash_cfg.c
@@ -4,7 +4,7 @@
/* Flash setup for Cirrus edb93xx boards */
#include <common.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#include <io.h>
#define SMC_BCR6_VALUE (2 << SMC_BCR_IDCY_SHIFT | 5 << SMC_BCR_WST1_SHIFT | \
diff --git a/arch/arm/boards/edb93xx/pll_cfg.h b/arch/arm/boards/edb93xx/pll_cfg.h
index b3258b5f7e..662c92337a 100644
--- a/arch/arm/boards/edb93xx/pll_cfg.h
+++ b/arch/arm/boards/edb93xx/pll_cfg.h
@@ -4,7 +4,7 @@
/* PLL register values for Cirrus edb93xx boards */
#include <config.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#if defined(CONFIG_MACH_EDB9301)
/*
diff --git a/arch/arm/boards/edb93xx/sdram_cfg.h b/arch/arm/boards/edb93xx/sdram_cfg.h
index e1f78443e4..ddb9e442ed 100644
--- a/arch/arm/boards/edb93xx/sdram_cfg.h
+++ b/arch/arm/boards/edb93xx/sdram_cfg.h
@@ -3,7 +3,7 @@
// SPDX-FileCopyrightText: 2006 Dominic Rath <Dominic.Rath@gmx.de>
#include <config.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#define SDRAM_BASE_ADDR CONFIG_EP93XX_SDRAM_BANK0_BASE
diff --git a/arch/arm/include/asm/barebox.lds.h b/arch/arm/include/asm/barebox.lds.h
index b9c824c4db..a5c74381d8 100644
--- a/arch/arm/include/asm/barebox.lds.h
+++ b/arch/arm/include/asm/barebox.lds.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#if defined CONFIG_ARCH_EP93XX
-#include <mach/barebox.lds.h>
+#include <mach/ep93xx/barebox.lds.h>
#endif
#ifdef CONFIG_CPU_32
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index e65c008de9..7e7241e908 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -42,6 +42,8 @@
#include <mach/nomadik/debug_ll.h>
#elif defined CONFIG_ARCH_MXS
#include <mach/mxs/debug_ll.h>
+#elif defined CONFIG_ARCH_EP93XX
+#include <mach/ep93xx/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-ep93xx/clocksource.c b/arch/arm/mach-ep93xx/clocksource.c
index e2a3a39780..53aae437b3 100644
--- a/arch/arm/mach-ep93xx/clocksource.c
+++ b/arch/arm/mach-ep93xx/clocksource.c
@@ -18,7 +18,7 @@
#include <clock.h>
#include <io.h>
#include <restart.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#define TIMER_CLKSEL (1 << 3)
#define TIMER_MODE (1 << 6)
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index 20477f83e6..f30798fd4b 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -19,7 +19,7 @@
#include <init.h>
#include <io.h>
#include <gpio.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#define EP93XX_GPIO_NUM_PORTS 8
#define EP93XX_GPIO_NUM_GPIOS (EP93XX_GPIO_NUM_PORTS * 8)
diff --git a/arch/arm/mach-ep93xx/led.c b/arch/arm/mach-ep93xx/led.c
index cbd035b64c..b2909fc070 100644
--- a/arch/arm/mach-ep93xx/led.c
+++ b/arch/arm/mach-ep93xx/led.c
@@ -15,7 +15,7 @@
#include <common.h>
#include <io.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#include "led.h"
diff --git a/arch/arm/mach-ep93xx/lowlevel_init.S b/arch/arm/mach-ep93xx/lowlevel_init.S
index 8b0ce3792a..5cc24a1cc0 100644
--- a/arch/arm/mach-ep93xx/lowlevel_init.S
+++ b/arch/arm/mach-ep93xx/lowlevel_init.S
@@ -18,7 +18,7 @@
*/
#include <linux/sizes.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#include <asm/barebox-arm-head.h>
.globl barebox_arm_reset_vector
diff --git a/drivers/net/ep93xx.c b/drivers/net/ep93xx.c
index ee650cdeea..77f8aa63db 100644
--- a/drivers/net/ep93xx.c
+++ b/drivers/net/ep93xx.c
@@ -21,7 +21,7 @@
#include <malloc.h>
#include <io.h>
#include <linux/types.h>
-#include <mach/ep93xx-regs.h>
+#include <mach/ep93xx/ep93xx-regs.h>
#include <linux/phy.h>
#include <platform_data/eth-ep93xx.h>
#include "ep93xx.h"
diff --git a/arch/arm/mach-ep93xx/include/mach/barebox.lds.h b/include/mach/ep93xx/barebox.lds.h
similarity index 100%
rename from arch/arm/mach-ep93xx/include/mach/barebox.lds.h
rename to include/mach/ep93xx/barebox.lds.h
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/include/mach/ep93xx/ep93xx-regs.h
similarity index 100%
rename from arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
rename to include/mach/ep93xx/ep93xx-regs.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 20/50] ARM: digic: Move mach header files to include/mach/digic
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (18 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 19/50] ARM: ep93xx: Move mach header files to include/mach/ep93xx Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 21/50] ARM: clps711x: Move mach header files to include/mach/clps711x Sascha Hauer
` (29 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all digic specific header files to include/mach/digic/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/include/asm/debug_ll.h | 2 ++
drivers/serial/serial_digic.c | 2 +-
.../mach-digic/include/mach => include/mach/digic}/debug_ll.h | 4 ++--
.../mach-digic/include/mach => include/mach/digic}/digic4.h | 0
.../arm/mach-digic/include/mach => include/mach/digic}/uart.h | 0
5 files changed, 5 insertions(+), 3 deletions(-)
rename {arch/arm/mach-digic/include/mach => include/mach/digic}/debug_ll.h (94%)
rename {arch/arm/mach-digic/include/mach => include/mach/digic}/digic4.h (100%)
rename {arch/arm/mach-digic/include/mach => include/mach/digic}/uart.h (100%)
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 7e7241e908..f9a5ca7566 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -44,6 +44,8 @@
#include <mach/mxs/debug_ll.h>
#elif defined CONFIG_ARCH_EP93XX
#include <mach/ep93xx/debug_ll.h>
+#elif defined CONFIG_ARCH_DIGIC
+#include <mach/digic/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/drivers/serial/serial_digic.c b/drivers/serial/serial_digic.c
index 31880ca996..61ba7d06f3 100644
--- a/drivers/serial/serial_digic.c
+++ b/drivers/serial/serial_digic.c
@@ -10,7 +10,7 @@
#include <malloc.h>
#include <io.h>
-#include <mach/uart.h>
+#include <mach/digic/uart.h>
/*
* This driver is based on the "Serial terminal" docs here:
diff --git a/arch/arm/mach-digic/include/mach/debug_ll.h b/include/mach/digic/debug_ll.h
similarity index 94%
rename from arch/arm/mach-digic/include/mach/debug_ll.h
rename to include/mach/digic/debug_ll.h
index 3b17100dae..1af1a27e91 100644
--- a/arch/arm/mach-digic/include/mach/debug_ll.h
+++ b/include/mach/digic/debug_ll.h
@@ -18,8 +18,8 @@
#define __MACH_DEBUG_LL_H__
#include <io.h>
-#include <mach/digic4.h>
-#include <mach/uart.h>
+#include <mach/digic/digic4.h>
+#include <mach/digic/uart.h>
#define DEBUG_LL_UART DIGIC4_UART
diff --git a/arch/arm/mach-digic/include/mach/digic4.h b/include/mach/digic/digic4.h
similarity index 100%
rename from arch/arm/mach-digic/include/mach/digic4.h
rename to include/mach/digic/digic4.h
diff --git a/arch/arm/mach-digic/include/mach/uart.h b/include/mach/digic/uart.h
similarity index 100%
rename from arch/arm/mach-digic/include/mach/uart.h
rename to include/mach/digic/uart.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 21/50] ARM: clps711x: Move mach header files to include/mach/clps711x
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (19 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 20/50] ARM: digic: Move mach header files to include/mach/digic Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 22/50] ARM: at91: Move mach header files to include/mach/at91 Sascha Hauer
` (28 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all clps711x specific header files to include/mach/clps711x/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/clep7212/lowlevel.c | 2 +-
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-clps711x/clock.c | 2 +-
arch/arm/mach-clps711x/common.c | 2 +-
arch/arm/mach-clps711x/devices.c | 4 ++--
arch/arm/mach-clps711x/lowlevel.c | 2 +-
.../include/mach => include/mach/clps711x}/clps711x.h | 0
.../include/mach => include/mach/clps711x}/debug_ll.h | 2 +-
8 files changed, 9 insertions(+), 7 deletions(-)
rename {arch/arm/mach-clps711x/include/mach => include/mach/clps711x}/clps711x.h (100%)
rename {arch/arm/mach-clps711x/include/mach => include/mach/clps711x}/debug_ll.h (90%)
diff --git a/arch/arm/boards/clep7212/lowlevel.c b/arch/arm/boards/clep7212/lowlevel.c
index 09f2762fac..ba402cecea 100644
--- a/arch/arm/boards/clep7212/lowlevel.c
+++ b/arch/arm/boards/clep7212/lowlevel.c
@@ -4,7 +4,7 @@
#include <common.h>
#include <asm/barebox-arm.h>
#include <linux/sizes.h>
-#include <mach/clps711x.h>
+#include <mach/clps711x/clps711x.h>
extern char __dtb_ep7212_clep7212_start[];
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index f9a5ca7566..96350936f9 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -46,6 +46,8 @@
#include <mach/ep93xx/debug_ll.h>
#elif defined CONFIG_ARCH_DIGIC
#include <mach/digic/debug_ll.h>
+#elif defined CONFIG_ARCH_CLPS711X
+#include <mach/clps711x/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-clps711x/clock.c b/arch/arm/mach-clps711x/clock.c
index fda4e9a01d..0ddfce8269 100644
--- a/arch/arm/mach-clps711x/clock.c
+++ b/arch/arm/mach-clps711x/clock.c
@@ -9,7 +9,7 @@
#include <linux/sizes.h>
#include <dt-bindings/clock/clps711x-clock.h>
-#include <mach/clps711x.h>
+#include <mach/clps711x/clps711x.h>
#define CLPS711X_OSC_FREQ 3686400
#define CLPS711X_EXT_FREQ 13000000
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index d27ed41ef9..ce385fdda3 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -6,7 +6,7 @@
#include <restart.h>
#include <asm/io.h>
#include <asm/mmu.h>
-#include <mach/clps711x.h>
+#include <mach/clps711x/clps711x.h>
#define CLPS711X_MAP_ADDR 0x90000000
diff --git a/arch/arm/mach-clps711x/devices.c b/arch/arm/mach-clps711x/devices.c
index 8eacc70018..a1a261412b 100644
--- a/arch/arm/mach-clps711x/devices.c
+++ b/arch/arm/mach-clps711x/devices.c
@@ -14,8 +14,8 @@
#include <asm/io.h>
#include <asm/memory.h>
-#include <mach/clps711x.h>
-#include <mach/devices.h>
+#include <mach/clps711x/clps711x.h>
+#include <mach/clps711x/devices.h>
static int clps711x_mem_init(void)
{
diff --git a/arch/arm/mach-clps711x/lowlevel.c b/arch/arm/mach-clps711x/lowlevel.c
index 608f0778d7..2ede50538a 100644
--- a/arch/arm/mach-clps711x/lowlevel.c
+++ b/arch/arm/mach-clps711x/lowlevel.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <debug_ll.h>
#include <linux/sizes.h>
-#include <mach/clps711x.h>
+#include <mach/clps711x/clps711x.h>
#define DEBUG_LL_BAUDRATE (57600)
diff --git a/arch/arm/mach-clps711x/include/mach/clps711x.h b/include/mach/clps711x/clps711x.h
similarity index 100%
rename from arch/arm/mach-clps711x/include/mach/clps711x.h
rename to include/mach/clps711x/clps711x.h
diff --git a/arch/arm/mach-clps711x/include/mach/debug_ll.h b/include/mach/clps711x/debug_ll.h
similarity index 90%
rename from arch/arm/mach-clps711x/include/mach/debug_ll.h
rename to include/mach/clps711x/debug_ll.h
index 342bb7628a..1af7cb4f65 100644
--- a/arch/arm/mach-clps711x/include/mach/debug_ll.h
+++ b/include/mach/clps711x/debug_ll.h
@@ -5,7 +5,7 @@
#define __MACH_DEBUG_LL_H__
#include <asm/io.h>
-#include <mach/clps711x.h>
+#include <mach/clps711x/clps711x.h>
static inline void PUTC_LL(char c)
{
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 22/50] ARM: at91: Move mach header files to include/mach/at91
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (20 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 21/50] ARM: clps711x: Move mach header files to include/mach/clps711x Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 23/50] ARM: Drop mach dir include path Sascha Hauer
` (27 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all at91 specific header files to include/mach/at91/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/animeo_ip/init.c | 12 +++++-----
arch/arm/boards/animeo_ip/lowlevel.c | 8 +++----
arch/arm/boards/at91rm9200ek/init.c | 8 +++----
arch/arm/boards/at91rm9200ek/lowlevel.c | 12 +++++-----
arch/arm/boards/at91sam9260ek/init.c | 8 +++----
arch/arm/boards/at91sam9260ek/lowlevel.c | 8 +++----
arch/arm/boards/at91sam9261ek/init.c | 10 ++++----
arch/arm/boards/at91sam9261ek/lowlevel_init.c | 7 +++---
arch/arm/boards/at91sam9263ek/init.c | 10 ++++----
arch/arm/boards/at91sam9263ek/lowlevel_init.c | 4 ++--
arch/arm/boards/at91sam9263ek/of_init.c | 10 ++++----
arch/arm/boards/at91sam9m10g45ek/init.c | 10 ++++----
arch/arm/boards/at91sam9m10g45ek/lowlevel.c | 7 +++---
arch/arm/boards/at91sam9m10ihd/init.c | 8 +++----
arch/arm/boards/at91sam9m10ihd/lowlevel.c | 9 ++++---
arch/arm/boards/at91sam9n12ek/init.c | 14 +++++------
arch/arm/boards/at91sam9n12ek/lowlevel.c | 7 +++---
arch/arm/boards/at91sam9x5ek/init.c | 14 +++++------
arch/arm/boards/at91sam9x5ek/lowlevel.c | 2 +-
arch/arm/boards/dss11/init.c | 10 ++++----
arch/arm/boards/dss11/lowlevel.c | 9 ++++---
arch/arm/boards/haba-knx/init.c | 12 +++++-----
arch/arm/boards/haba-knx/lowlevel.c | 9 ++++---
.../boards/microchip-ksz9477-evb/lowlevel.c | 10 ++++----
arch/arm/boards/pm9261/init.c | 10 ++++----
arch/arm/boards/pm9261/lowlevel_init.c | 7 +++---
arch/arm/boards/pm9263/init.c | 10 ++++----
arch/arm/boards/pm9263/lowlevel_init.c | 7 +++---
arch/arm/boards/pm9g45/init.c | 10 ++++----
arch/arm/boards/pm9g45/lowlevel.c | 8 +++----
arch/arm/boards/qil-a926x/init.c | 12 +++++-----
arch/arm/boards/qil-a926x/lowlevel.c | 9 ++++---
.../arm/boards/sama5d27-giantboard/lowlevel.c | 10 ++++----
arch/arm/boards/sama5d27-som1/lowlevel.c | 10 ++++----
arch/arm/boards/sama5d3_xplained/board.c | 4 ++--
arch/arm/boards/sama5d3_xplained/lowlevel.c | 10 ++++----
arch/arm/boards/sama5d3xek/init.c | 14 +++++------
arch/arm/boards/sama5d3xek/lowlevel.c | 4 ++--
arch/arm/boards/sama5d4_xplained/lowlevel.c | 4 ++--
.../sama5d4_xplained/sama5d4_xplained.c | 14 +++++------
arch/arm/boards/sama5d4ek/lowlevel.c | 4 ++--
arch/arm/boards/sama5d4ek/sama5d4ek.c | 14 +++++------
arch/arm/boards/skov-arm9cpu/board.c | 10 ++++----
arch/arm/boards/skov-arm9cpu/lowlevel.c | 4 ++--
arch/arm/boards/telit-evk-pro3/init.c | 8 +++----
arch/arm/boards/telit-evk-pro3/lowlevel.c | 9 ++++---
arch/arm/boards/tny-a926x/init.c | 14 +++++------
.../arm/boards/tny-a926x/tny_a9260_lowlevel.c | 9 ++++---
.../boards/tny-a926x/tny_a9263_bootstrap.c | 2 +-
.../arm/boards/tny-a926x/tny_a9263_lowlevel.c | 7 +++---
arch/arm/boards/usb-a926x/init.c | 16 ++++++-------
.../arm/boards/usb-a926x/usb_a9260_lowlevel.c | 9 ++++---
.../boards/usb-a926x/usb_a9263_bootstrap.c | 2 +-
.../arm/boards/usb-a926x/usb_a9263_lowlevel.c | 7 +++---
arch/arm/include/asm/debug_ll.h | 2 ++
arch/arm/mach-at91/aic.c | 2 +-
arch/arm/mach-at91/at91_pmc_ll.c | 8 +++----
arch/arm/mach-at91/at91rm9200.c | 4 ++--
arch/arm/mach-at91/at91rm9200_devices.c | 10 ++++----
arch/arm/mach-at91/at91rm9200_time.c | 4 ++--
arch/arm/mach-at91/at91sam9260.c | 8 +++----
arch/arm/mach-at91/at91sam9260_devices.c | 16 ++++++-------
arch/arm/mach-at91/at91sam9261.c | 8 +++----
arch/arm/mach-at91/at91sam9261_devices.c | 16 ++++++-------
arch/arm/mach-at91/at91sam9263.c | 8 +++----
arch/arm/mach-at91/at91sam9263_devices.c | 14 +++++------
arch/arm/mach-at91/at91sam9_reset.S | 4 ++--
arch/arm/mach-at91/at91sam9_rst.c | 2 +-
arch/arm/mach-at91/at91sam9_sdramc_ll.c | 4 ++--
arch/arm/mach-at91/at91sam9_xload_mmc.c | 14 +++++------
arch/arm/mach-at91/at91sam9g45.c | 10 ++++----
arch/arm/mach-at91/at91sam9g45_devices.c | 14 +++++------
arch/arm/mach-at91/at91sam9g45_reset.S | 4 ++--
arch/arm/mach-at91/at91sam9n12.c | 10 ++++----
arch/arm/mach-at91/at91sam9n12_devices.c | 14 +++++------
arch/arm/mach-at91/at91sam9x5.c | 6 ++---
arch/arm/mach-at91/at91sam9x5_devices.c | 14 +++++------
arch/arm/mach-at91/bootm-barebox.c | 2 +-
arch/arm/mach-at91/bootstrap.c | 2 +-
arch/arm/mach-at91/clock.c | 8 +++----
arch/arm/mach-at91/ddramc.c | 8 +++----
arch/arm/mach-at91/ddramc_ll.c | 6 ++---
arch/arm/mach-at91/early_udelay.c | 8 +++----
arch/arm/mach-at91/matrix.c | 4 ++--
arch/arm/mach-at91/sam9263_ll.c | 10 ++++----
arch/arm/mach-at91/sam9_smc.c | 6 ++---
arch/arm/mach-at91/sama5_bootsource.c | 2 +-
arch/arm/mach-at91/sama5d2.c | 6 ++---
arch/arm/mach-at91/sama5d2_ll.c | 14 +++++------
arch/arm/mach-at91/sama5d3.c | 10 ++++----
arch/arm/mach-at91/sama5d3_devices.c | 14 +++++------
arch/arm/mach-at91/sama5d3_ll.c | 6 ++---
arch/arm/mach-at91/sama5d4.c | 10 ++++----
arch/arm/mach-at91/sama5d4_devices.c | 14 +++++------
arch/arm/mach-at91/setup.c | 10 ++++----
arch/arm/mach-at91/xload-mmc.c | 12 +++++-----
drivers/clocksource/timer-atmel-pit.c | 4 ++--
drivers/mci/atmel-sdhci-common.c | 2 +-
drivers/mci/atmel-sdhci-pbl.c | 4 ++--
drivers/mci/atmel_mci_pbl.c | 2 +-
drivers/mtd/nand/atmel/legacy.c | 2 +-
drivers/net/at91_ether.c | 6 ++---
drivers/pinctrl/pinctrl-at91-pio4.c | 2 +-
drivers/pinctrl/pinctrl-at91.c | 6 ++---
drivers/spi/atmel_spi.c | 6 ++---
drivers/usb/gadget/at91_udc.c | 10 ++++----
drivers/usb/host/ohci-at91.c | 2 +-
drivers/video/atmel_hlcdfb.c | 6 ++---
drivers/video/atmel_lcdfb.c | 2 +-
drivers/video/atmel_lcdfb_core.c | 2 +-
drivers/watchdog/at91sam9_wdt.c | 2 +-
.../include/mach => include/mach/at91}/aic.h | 0
.../mach => include/mach/at91}/at91_dbgu.h | 0
.../mach => include/mach/at91}/at91_ddrsdrc.h | 2 +-
.../mach => include/mach/at91}/at91_pio.h | 0
.../mach => include/mach/at91}/at91_pit.h | 0
.../mach => include/mach/at91}/at91_pmc.h | 0
.../mach => include/mach/at91}/at91_pmc_ll.h | 2 +-
.../mach => include/mach/at91}/at91_rstc.h | 0
.../mach => include/mach/at91}/at91_rtt.h | 0
.../mach => include/mach/at91}/at91_wdt.h | 0
.../mach => include/mach/at91}/at91rm9200.h | 0
.../mach/at91}/at91rm9200_emac.h | 0
.../mach/at91}/at91rm9200_mc.h | 2 +-
.../mach/at91}/at91rm9200_st.h | 0
.../mach => include/mach/at91}/at91sam9260.h | 0
.../mach/at91}/at91sam9260_matrix.h | 0
.../mach => include/mach/at91}/at91sam9261.h | 0
.../mach/at91}/at91sam9261_matrix.h | 0
.../mach => include/mach/at91}/at91sam9263.h | 0
.../mach/at91}/at91sam9263_matrix.h | 0
.../mach => include/mach/at91}/at91sam926x.h | 0
.../mach/at91}/at91sam926x_board_init.h | 24 +++++++++----------
.../mach/at91}/at91sam9_sdramc.h | 6 ++---
.../mach => include/mach/at91}/at91sam9_smc.h | 0
.../mach => include/mach/at91}/at91sam9g45.h | 0
.../mach/at91}/at91sam9g45_matrix.h | 0
.../mach => include/mach/at91}/at91sam9n12.h | 0
.../mach/at91}/at91sam9n12_matrix.h | 0
.../mach => include/mach/at91}/at91sam9x5.h | 0
.../mach/at91}/at91sam9x5_matrix.h | 0
.../mach => include/mach/at91}/atmel_hlcdc.h | 0
.../mach => include/mach/at91}/barebox-arm.h | 4 ++--
.../mach => include/mach/at91}/board.h | 4 ++--
.../mach => include/mach/at91}/bootstrap.h | 0
.../include/mach => include/mach/at91}/cpu.h | 0
.../mach => include/mach/at91}/ddramc.h | 0
.../mach => include/mach/at91}/debug_ll.h | 6 ++---
.../mach => include/mach/at91}/early_udelay.h | 0
.../include/mach => include/mach/at91}/gpio.h | 2 +-
.../mach => include/mach/at91}/hardware.h | 20 ++++++++--------
.../mach => include/mach/at91}/iomux.h | 6 ++---
.../mach => include/mach/at91}/matrix.h | 0
.../mach => include/mach/at91}/sam92_ll.h | 16 ++++++-------
.../mach/at91}/sama5_bootsource.h | 2 +-
.../mach/at91}/sama5d2-sip-ddramc.h | 6 ++---
.../mach => include/mach/at91}/sama5d2.h | 0
.../mach => include/mach/at91}/sama5d2_ll.h | 12 +++++-----
.../mach/at91}/sama5d3-xplained-ddramc.h | 6 ++---
.../mach => include/mach/at91}/sama5d3.h | 0
.../mach => include/mach/at91}/sama5d3_ll.h | 6 ++---
.../mach => include/mach/at91}/sama5d4.h | 0
.../mach => include/mach/at91}/tz_matrix.h | 0
.../mach => include/mach/at91}/xload.h | 0
164 files changed, 497 insertions(+), 511 deletions(-)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/aic.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_dbgu.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_ddrsdrc.h (99%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_pio.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_pit.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_pmc.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_pmc_ll.h (99%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_rstc.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_rtt.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91_wdt.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91rm9200.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91rm9200_emac.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91rm9200_mc.h (99%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91rm9200_st.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9260.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9260_matrix.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9261.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9261_matrix.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9263.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9263_matrix.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam926x.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam926x_board_init.h (92%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9_sdramc.h (98%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9_smc.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9g45.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9g45_matrix.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9n12.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9n12_matrix.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9x5.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/at91sam9x5_matrix.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/atmel_hlcdc.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/barebox-arm.h (96%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/board.h (98%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/bootstrap.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/cpu.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/ddramc.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/debug_ll.h (90%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/early_udelay.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/gpio.h (99%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/hardware.h (75%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/iomux.h (98%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/matrix.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sam92_ll.h (80%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sama5_bootsource.h (98%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sama5d2-sip-ddramc.h (91%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sama5d2.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sama5d2_ll.h (94%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sama5d3-xplained-ddramc.h (96%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sama5d3.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sama5d3_ll.h (82%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/sama5d4.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/tz_matrix.h (100%)
rename {arch/arm/mach-at91/include/mach => include/mach/at91}/xload.h (100%)
diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c
index b854f254fb..d8cb0531b1 100644
--- a/arch/arm/boards/animeo_ip/init.c
+++ b/arch/arm/boards/animeo_ip/init.c
@@ -14,18 +14,18 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
#include <local_mac_address.h>
static bool animeo_ip_is_buco;
diff --git a/arch/arm/boards/animeo_ip/lowlevel.c b/arch/arm/boards/animeo_ip/lowlevel.c
index dcea35484c..df02e834c3 100644
--- a/arch/arm/boards/animeo_ip/lowlevel.c
+++ b/arch/arm/boards/animeo_ip/lowlevel.c
@@ -7,11 +7,11 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
+#include <mach/at91/barebox-arm.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9260.h>
-#include <mach/hardware.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_animeo_ip, r0, r1, r2)
{
diff --git a/arch/arm/boards/at91rm9200ek/init.c b/arch/arm/boards/at91rm9200ek/init.c
index 5d5a0ba70b..1db1c0be46 100644
--- a/arch/arm/boards/at91rm9200ek/init.c
+++ b/arch/arm/boards/at91rm9200ek/init.c
@@ -13,10 +13,10 @@
#include <io.h>
#include <envfs.h>
#include <linux/sizes.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
#include <spi/spi.h>
static struct macb_platform_data ether_pdata = {
diff --git a/arch/arm/boards/at91rm9200ek/lowlevel.c b/arch/arm/boards/at91rm9200ek/lowlevel.c
index 2a76e206e3..f412de7d4a 100644
--- a/arch/arm/boards/at91rm9200ek/lowlevel.c
+++ b/arch/arm/boards/at91rm9200ek/lowlevel.c
@@ -7,13 +7,13 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
+#include <mach/at91/barebox-arm.h>
-#include <mach/at91rm9200_mc.h>
-#include <mach/at91rm9200.h>
-#include <mach/at91_pio.h>
-#include <mach/at91_pmc.h>
-#include <mach/hardware.h>
+#include <mach/at91/at91rm9200_mc.h>
+#include <mach/at91/at91rm9200.h>
+#include <mach/at91/at91_pio.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/hardware.h>
#include "config.h"
diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
index 92526c072a..7258dc2255 100644
--- a/arch/arm/boards/at91sam9260ek/init.c
+++ b/arch/arm/boards/at91sam9260ek/init.c
@@ -11,11 +11,11 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
#include <linux/sizes.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_rstc.h>
#include <linux/clk.h>
/*
diff --git a/arch/arm/boards/at91sam9260ek/lowlevel.c b/arch/arm/boards/at91sam9260ek/lowlevel.c
index 40810f43c9..c574e4aeb0 100644
--- a/arch/arm/boards/at91sam9260ek/lowlevel.c
+++ b/arch/arm/boards/at91sam9260ek/lowlevel.c
@@ -7,11 +7,11 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
+#include <mach/at91/barebox-arm.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9260.h>
-#include <mach/hardware.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_at91sam9260ek, r0, r1, r2)
{
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 1ae7d94876..7a620c0ecd 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -11,16 +11,16 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91sam9_smc.h>
#include <platform_data/eth-dm9000.h>
#include <gpio_keys.h>
#include <readkey.h>
diff --git a/arch/arm/boards/at91sam9261ek/lowlevel_init.c b/arch/arm/boards/at91sam9261ek/lowlevel_init.c
index 17c0094522..55393567ea 100644
--- a/arch/arm/boards/at91sam9261ek/lowlevel_init.c
+++ b/arch/arm/boards/at91sam9261ek/lowlevel_init.c
@@ -4,10 +4,9 @@
* Under GPLv2
*/
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam926x_board_init.h>
-#include <mach/at91sam9261_matrix.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam926x_board_init.h>
+#include <mach/at91/at91sam9261_matrix.h>
#define MASTER_CLOCK 200
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index e1eeb78347..e6e09f739f 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -12,15 +12,15 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
#include <gpio.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/at91sam9_smc.h>
static struct atmel_nand_data nand_pdata = {
.ale = 21,
diff --git a/arch/arm/boards/at91sam9263ek/lowlevel_init.c b/arch/arm/boards/at91sam9263ek/lowlevel_init.c
index 0bf0e0fb4e..3e1f471d8e 100644
--- a/arch/arm/boards/at91sam9263ek/lowlevel_init.c
+++ b/arch/arm/boards/at91sam9263ek/lowlevel_init.c
@@ -8,8 +8,8 @@
#include <asm/barebox-arm.h>
-#include <mach/at91sam926x_board_init.h>
-#include <mach/at91sam9263_matrix.h>
+#include <mach/at91/at91sam926x_board_init.h>
+#include <mach/at91/at91sam9263_matrix.h>
#define MASTER_PLL_MUL 171
#define MASTER_PLL_DIV 14
diff --git a/arch/arm/boards/at91sam9263ek/of_init.c b/arch/arm/boards/at91sam9263ek/of_init.c
index 92301c80d6..7bdc6cc0f0 100644
--- a/arch/arm/boards/at91sam9263ek/of_init.c
+++ b/arch/arm/boards/at91sam9263ek/of_init.c
@@ -7,11 +7,11 @@
#include <gpio.h>
#include <io.h>
-#include <mach/at91sam9263_matrix.h>
-#include <mach/at91sam9_smc.h>
-#include <mach/at91_rtt.h>
-#include <mach/hardware.h>
-#include <mach/iomux.h>
+#include <mach/at91/at91sam9263_matrix.h>
+#include <mach/at91/at91sam9_smc.h>
+#include <mach/at91/at91_rtt.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/iomux.h>
static int add_smc_devices(void)
{
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index cb5cfe6b94..f820213cdd 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -14,15 +14,15 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio_keys.h>
#include <readkey.h>
#include <spi/spi.h>
diff --git a/arch/arm/boards/at91sam9m10g45ek/lowlevel.c b/arch/arm/boards/at91sam9m10g45ek/lowlevel.c
index e0cd647b44..a24b26e5cb 100644
--- a/arch/arm/boards/at91sam9m10g45ek/lowlevel.c
+++ b/arch/arm/boards/at91sam9m10g45ek/lowlevel.c
@@ -7,10 +7,9 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/hardware.h>
-#include <mach/at91_ddrsdrc.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_ddrsdrc.h>
AT91_ENTRY_FUNCTION(start_at91sam9m10g45ek, r0, r1, r2)
{
diff --git a/arch/arm/boards/at91sam9m10ihd/init.c b/arch/arm/boards/at91sam9m10ihd/init.c
index 6a6ce9a187..6800e669f9 100644
--- a/arch/arm/boards/at91sam9m10ihd/init.c
+++ b/arch/arm/boards/at91sam9m10ihd/init.c
@@ -14,15 +14,15 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/board.h>
+#include <mach/at91/board.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91sam9_smc.h>
#include <input/qt1070.h>
#include <readkey.h>
#include <linux/w1-gpio.h>
diff --git a/arch/arm/boards/at91sam9m10ihd/lowlevel.c b/arch/arm/boards/at91sam9m10ihd/lowlevel.c
index 4e307c8f41..7eba24f3e4 100644
--- a/arch/arm/boards/at91sam9m10ihd/lowlevel.c
+++ b/arch/arm/boards/at91sam9m10ihd/lowlevel.c
@@ -7,11 +7,10 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91_ddrsdrc.h>
-#include <mach/at91sam9g45.h>
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/at91sam9g45.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_at91sam9m10ihd, r0, r1, r2)
{
diff --git a/arch/arm/boards/at91sam9n12ek/init.c b/arch/arm/boards/at91sam9n12ek/init.c
index 97ab150c14..b148e18912 100644
--- a/arch/arm/boards/at91sam9n12ek/init.c
+++ b/arch/arm/boards/at91sam9n12ek/init.c
@@ -11,18 +11,18 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91sam9x5_matrix.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/at91sam9x5_matrix.h>
#include <input/qt1070.h>
#include <readkey.h>
#include <spi/spi.h>
diff --git a/arch/arm/boards/at91sam9n12ek/lowlevel.c b/arch/arm/boards/at91sam9n12ek/lowlevel.c
index 21a0721ecc..4b981fd49f 100644
--- a/arch/arm/boards/at91sam9n12ek/lowlevel.c
+++ b/arch/arm/boards/at91sam9n12ek/lowlevel.c
@@ -7,10 +7,9 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91_ddrsdrc.h>
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_at91sam9n12ek, r0, r1, r2)
{
diff --git a/arch/arm/boards/at91sam9x5ek/init.c b/arch/arm/boards/at91sam9x5ek/init.c
index 8796702a1a..48bbebae8c 100644
--- a/arch/arm/boards/at91sam9x5ek/init.c
+++ b/arch/arm/boards/at91sam9x5ek/init.c
@@ -11,17 +11,17 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91sam9x5_matrix.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/at91sam9x5_matrix.h>
#include <input/qt1070.h>
#include <readkey.h>
#include <linux/w1-gpio.h>
diff --git a/arch/arm/boards/at91sam9x5ek/lowlevel.c b/arch/arm/boards/at91sam9x5ek/lowlevel.c
index 3d266161ec..350c99100e 100644
--- a/arch/arm/boards/at91sam9x5ek/lowlevel.c
+++ b/arch/arm/boards/at91sam9x5ek/lowlevel.c
@@ -2,7 +2,7 @@
#include <common.h>
#include <linux/sizes.h>
-#include <mach/at91_ddrsdrc.h>
+#include <mach/at91/at91_ddrsdrc.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <io.h>
diff --git a/arch/arm/boards/dss11/init.c b/arch/arm/boards/dss11/init.c
index e24e69f302..7fd566e4be 100644
--- a/arch/arm/boards/dss11/init.c
+++ b/arch/arm/boards/dss11/init.c
@@ -11,15 +11,15 @@
#include <fs.h>
#include <fcntl.h>
#include <asm/io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/mtd/rawnand.h>
#include <linux/mtd/nand.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_rstc.h>
#include <linux/clk.h>
static struct atmel_nand_data nand_pdata = {
diff --git a/arch/arm/boards/dss11/lowlevel.c b/arch/arm/boards/dss11/lowlevel.c
index 427e9d39cd..be2675369c 100644
--- a/arch/arm/boards/dss11/lowlevel.c
+++ b/arch/arm/boards/dss11/lowlevel.c
@@ -7,11 +7,10 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9260.h>
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_dss11, r0, r1, r2)
{
diff --git a/arch/arm/boards/haba-knx/init.c b/arch/arm/boards/haba-knx/init.c
index 4c7bb3978a..e04d8df955 100644
--- a/arch/arm/boards/haba-knx/init.c
+++ b/arch/arm/boards/haba-knx/init.c
@@ -12,19 +12,19 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
#include <led.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
#include <spi/spi.h>
#include <i2c/i2c.h>
#include <libfile.h>
diff --git a/arch/arm/boards/haba-knx/lowlevel.c b/arch/arm/boards/haba-knx/lowlevel.c
index 76275e440a..f71e0098e8 100644
--- a/arch/arm/boards/haba-knx/lowlevel.c
+++ b/arch/arm/boards/haba-knx/lowlevel.c
@@ -7,11 +7,10 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9260.h>
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_haba_knx_lite, r0, r1, r2)
{
diff --git a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
index 6290766caa..bda6a94160 100644
--- a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
+++ b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
@@ -9,11 +9,11 @@
#include <asm/barebox-arm-head.h>
#include <debug_ll.h>
-#include <mach/barebox-arm.h>
-#include <mach/iomux.h>
-#include <mach/sama5d3.h>
-#include <mach/sama5d3-xplained-ddramc.h>
-#include <mach/xload.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/sama5d3.h>
+#include <mach/at91/sama5d3-xplained-ddramc.h>
+#include <mach/at91/xload.h>
/* PCK = 528MHz, MCK = 132MHz */
#define MASTER_CLOCK 132000000
diff --git a/arch/arm/boards/pm9261/init.c b/arch/arm/boards/pm9261/init.c
index 5747a9e995..d6e3df9247 100644
--- a/arch/arm/boards/pm9261/init.c
+++ b/arch/arm/boards/pm9261/init.c
@@ -13,14 +13,14 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91sam9_smc.h>
#include <platform_data/eth-dm9000.h>
#include <linux/w1-gpio.h>
#include <w1_mac_address.h>
diff --git a/arch/arm/boards/pm9261/lowlevel_init.c b/arch/arm/boards/pm9261/lowlevel_init.c
index 7131120e97..6a44981cc1 100644
--- a/arch/arm/boards/pm9261/lowlevel_init.c
+++ b/arch/arm/boards/pm9261/lowlevel_init.c
@@ -4,10 +4,9 @@
* Under GPLv2
*/
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam926x_board_init.h>
-#include <mach/at91sam9261_matrix.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam926x_board_init.h>
+#include <mach/at91/at91sam9261_matrix.h>
#define MASTER_PLL_DIV 15
#define MASTER_PLL_MUL 162
diff --git a/arch/arm/boards/pm9263/init.c b/arch/arm/boards/pm9263/init.c
index fb9f336afe..37432afddf 100644
--- a/arch/arm/boards/pm9263/init.c
+++ b/arch/arm/boards/pm9263/init.c
@@ -12,14 +12,14 @@
#include <gpio.h>
#include <fcntl.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91sam9_smc.h>
#include <linux/w1-gpio.h>
#include <w1_mac_address.h>
diff --git a/arch/arm/boards/pm9263/lowlevel_init.c b/arch/arm/boards/pm9263/lowlevel_init.c
index 7a9993c50b..d06573d1cc 100644
--- a/arch/arm/boards/pm9263/lowlevel_init.c
+++ b/arch/arm/boards/pm9263/lowlevel_init.c
@@ -6,10 +6,9 @@
#include <linux/sizes.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam926x_board_init.h>
-#include <mach/at91sam9263_matrix.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam926x_board_init.h>
+#include <mach/at91/at91sam9263_matrix.h>
#define MASTER_PLL_DIV 6
#define MASTER_PLL_MUL 65
diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 1630cb2d4e..693ad457c9 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -13,14 +13,14 @@
#include <gpio.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91sam9_smc.h>
#include <linux/w1-gpio.h>
#include <w1_mac_address.h>
diff --git a/arch/arm/boards/pm9g45/lowlevel.c b/arch/arm/boards/pm9g45/lowlevel.c
index 017c8d9b12..9cdc2711e6 100644
--- a/arch/arm/boards/pm9g45/lowlevel.c
+++ b/arch/arm/boards/pm9g45/lowlevel.c
@@ -7,11 +7,9 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91_ddrsdrc.h>
-
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_pm9g45, r0, r1, r2)
{
diff --git a/arch/arm/boards/qil-a926x/init.c b/arch/arm/boards/qil-a926x/init.c
index e0b85f6423..819e48e17b 100644
--- a/arch/arm/boards/qil-a926x/init.c
+++ b/arch/arm/boards/qil-a926x/init.c
@@ -15,19 +15,19 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
#include <led.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
static void qil_a9260_set_board_type(void)
{
diff --git a/arch/arm/boards/qil-a926x/lowlevel.c b/arch/arm/boards/qil-a926x/lowlevel.c
index f21d8b8057..314980e84c 100644
--- a/arch/arm/boards/qil-a926x/lowlevel.c
+++ b/arch/arm/boards/qil-a926x/lowlevel.c
@@ -7,11 +7,10 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9260.h>
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_qil_a926x, r0, r1, r2)
{
diff --git a/arch/arm/boards/sama5d27-giantboard/lowlevel.c b/arch/arm/boards/sama5d27-giantboard/lowlevel.c
index fac39dd066..49540bede0 100644
--- a/arch/arm/boards/sama5d27-giantboard/lowlevel.c
+++ b/arch/arm/boards/sama5d27-giantboard/lowlevel.c
@@ -5,11 +5,11 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-#include <mach/sama5d2_ll.h>
-#include <mach/xload.h>
-#include <mach/sama5d2-sip-ddramc.h>
-#include <mach/iomux.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/sama5d2_ll.h>
+#include <mach/at91/xload.h>
+#include <mach/at91/sama5d2-sip-ddramc.h>
+#include <mach/at91/iomux.h>
#include <debug_ll.h>
/* PCK = 492MHz, MCK = 164MHz */
diff --git a/arch/arm/boards/sama5d27-som1/lowlevel.c b/arch/arm/boards/sama5d27-som1/lowlevel.c
index 24c08d9722..67300587fe 100644
--- a/arch/arm/boards/sama5d27-som1/lowlevel.c
+++ b/arch/arm/boards/sama5d27-som1/lowlevel.c
@@ -5,12 +5,12 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-#include <mach/sama5d2_ll.h>
-#include <mach/iomux.h>
-#include <mach/xload.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/sama5d2_ll.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/xload.h>
#include <debug_ll.h>
-#include <mach/sama5d2-sip-ddramc.h>
+#include <mach/at91/sama5d2-sip-ddramc.h>
#define RGB_LED_GREEN (1 << 0)
#define RGB_LED_RED (1 << 1)
diff --git a/arch/arm/boards/sama5d3_xplained/board.c b/arch/arm/boards/sama5d3_xplained/board.c
index 3e07491419..a5f191191b 100644
--- a/arch/arm/boards/sama5d3_xplained/board.c
+++ b/arch/arm/boards/sama5d3_xplained/board.c
@@ -3,8 +3,8 @@
#include <common.h>
#include <init.h>
#include <envfs.h>
-#include <mach/at91sam9_smc.h>
-#include <mach/hardware.h>
+#include <mach/at91/at91sam9_smc.h>
+#include <mach/at91/hardware.h>
#include <linux/clk.h>
static struct sam9_smc_config sama5d3_xplained_nand_smc_config = {
diff --git a/arch/arm/boards/sama5d3_xplained/lowlevel.c b/arch/arm/boards/sama5d3_xplained/lowlevel.c
index be6b2960d4..d66b10fa8f 100644
--- a/arch/arm/boards/sama5d3_xplained/lowlevel.c
+++ b/arch/arm/boards/sama5d3_xplained/lowlevel.c
@@ -9,11 +9,11 @@
#include <asm/barebox-arm-head.h>
#include <debug_ll.h>
-#include <mach/barebox-arm.h>
-#include <mach/iomux.h>
-#include <mach/sama5d3.h>
-#include <mach/sama5d3-xplained-ddramc.h>
-#include <mach/xload.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/sama5d3.h>
+#include <mach/at91/sama5d3-xplained-ddramc.h>
+#include <mach/at91/xload.h>
/* PCK = 528MHz, MCK = 132MHz */
#define MASTER_CLOCK 132000000
diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c
index d364705056..13e77c16ef 100644
--- a/arch/arm/boards/sama5d3xek/init.c
+++ b/arch/arm/boards/sama5d3xek/init.c
@@ -11,18 +11,18 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91sam9x5_matrix.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/at91sam9x5_matrix.h>
#include <input/qt1070.h>
#include <readkey.h>
#include <poller.h>
diff --git a/arch/arm/boards/sama5d3xek/lowlevel.c b/arch/arm/boards/sama5d3xek/lowlevel.c
index 28c07d5053..fe5f172127 100644
--- a/arch/arm/boards/sama5d3xek/lowlevel.c
+++ b/arch/arm/boards/sama5d3xek/lowlevel.c
@@ -10,8 +10,8 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/hardware.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/hardware.h>
void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)
{
diff --git a/arch/arm/boards/sama5d4_xplained/lowlevel.c b/arch/arm/boards/sama5d4_xplained/lowlevel.c
index 3c58a08f3b..183bd9c5a9 100644
--- a/arch/arm/boards/sama5d4_xplained/lowlevel.c
+++ b/arch/arm/boards/sama5d4_xplained/lowlevel.c
@@ -10,8 +10,8 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/hardware.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/hardware.h>
void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)
{
diff --git a/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c b/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
index 8dd9edea60..c88f0d090a 100644
--- a/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
+++ b/arch/arm/boards/sama5d4_xplained/sama5d4_xplained.c
@@ -15,18 +15,18 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91sam9x5_matrix.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/at91sam9x5_matrix.h>
#include <input/qt1070.h>
#include <readkey.h>
#include <spi/spi.h>
diff --git a/arch/arm/boards/sama5d4ek/lowlevel.c b/arch/arm/boards/sama5d4ek/lowlevel.c
index 3c58a08f3b..183bd9c5a9 100644
--- a/arch/arm/boards/sama5d4ek/lowlevel.c
+++ b/arch/arm/boards/sama5d4ek/lowlevel.c
@@ -10,8 +10,8 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/hardware.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/hardware.h>
void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)
{
diff --git a/arch/arm/boards/sama5d4ek/sama5d4ek.c b/arch/arm/boards/sama5d4ek/sama5d4ek.c
index 350e6c4302..0dda34614a 100644
--- a/arch/arm/boards/sama5d4ek/sama5d4ek.c
+++ b/arch/arm/boards/sama5d4ek/sama5d4ek.c
@@ -15,18 +15,18 @@
#include <fs.h>
#include <fcntl.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91sam9x5_matrix.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/at91sam9x5_matrix.h>
#include <input/qt1070.h>
#include <readkey.h>
#include <spi/spi.h>
diff --git a/arch/arm/boards/skov-arm9cpu/board.c b/arch/arm/boards/skov-arm9cpu/board.c
index 4af8c9c04a..cf2b424cdc 100644
--- a/arch/arm/boards/skov-arm9cpu/board.c
+++ b/arch/arm/boards/skov-arm9cpu/board.c
@@ -10,11 +10,11 @@
#include <linux/sizes.h>
-#include <mach/at91sam9263_matrix.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9_smc.h>
-#include <mach/hardware.h>
-#include <mach/iomux.h>
+#include <mach/at91/at91sam9263_matrix.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9_smc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/iomux.h>
static struct sam9_smc_config ek_nand_smc_config = {
.ncs_read_setup = 0,
diff --git a/arch/arm/boards/skov-arm9cpu/lowlevel.c b/arch/arm/boards/skov-arm9cpu/lowlevel.c
index d335953a73..bde5b80e6c 100644
--- a/arch/arm/boards/skov-arm9cpu/lowlevel.c
+++ b/arch/arm/boards/skov-arm9cpu/lowlevel.c
@@ -5,8 +5,8 @@
#include <asm/barebox-arm.h>
-#include <mach/at91sam926x_board_init.h>
-#include <mach/at91sam9263_matrix.h>
+#include <mach/at91/at91sam926x_board_init.h>
+#include <mach/at91/at91sam9263_matrix.h>
#define MASTER_PLL_MUL 171
#define MASTER_PLL_DIV 14
diff --git a/arch/arm/boards/telit-evk-pro3/init.c b/arch/arm/boards/telit-evk-pro3/init.c
index 4c853c647c..43f9cbdf3a 100644
--- a/arch/arm/boards/telit-evk-pro3/init.c
+++ b/arch/arm/boards/telit-evk-pro3/init.c
@@ -9,10 +9,10 @@
#include <linux/clk.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91sam9_smc.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/at91sam9_smc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
#include <nand.h>
#define BOOTSTRAP_SIZE 0xC0000
diff --git a/arch/arm/boards/telit-evk-pro3/lowlevel.c b/arch/arm/boards/telit-evk-pro3/lowlevel.c
index bded2ebf5d..550a0740c5 100644
--- a/arch/arm/boards/telit-evk-pro3/lowlevel.c
+++ b/arch/arm/boards/telit-evk-pro3/lowlevel.c
@@ -7,11 +7,10 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9260.h>
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_telit_evk_pro3, r0, r1, r2)
{
diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c
index a8422f14ee..d9d97e1760 100644
--- a/arch/arm/boards/tny-a926x/init.c
+++ b/arch/arm/boards/tny-a926x/init.c
@@ -11,19 +11,19 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
-#include <mach/at91sam9_sdramc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
+#include <mach/at91/at91sam9_sdramc.h>
#include <gpio.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
#include <spi/eeprom.h>
static void tny_a9260_set_board_type(void)
diff --git a/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c b/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c
index aad5b3de59..91bf68e798 100644
--- a/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c
+++ b/arch/arm/boards/tny-a926x/tny_a9260_lowlevel.c
@@ -7,11 +7,10 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9260.h>
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_tny_a9260, r0, r1, r2)
{
diff --git a/arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c b/arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c
index f26f1eaecb..5739b0f2da 100644
--- a/arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c
+++ b/arch/arm/boards/tny-a926x/tny_a9263_bootstrap.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <bootstrap.h>
-#include <mach/bootstrap.h>
+#include <mach/at91/bootstrap.h>
#ifdef CONFIG_MTD_DATAFLASH
void * bootstrap_board_read_dataflash(void)
diff --git a/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c b/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c
index 34aa10a12a..d20ffe9c71 100644
--- a/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c
+++ b/arch/arm/boards/tny-a926x/tny_a9263_lowlevel.c
@@ -7,10 +7,9 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam926x_board_init.h>
-#include <mach/at91sam9263_matrix.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam926x_board_init.h>
+#include <mach/at91/at91sam9263_matrix.h>
#define MASTER_CLOCK 180
diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c
index a4c55b6236..f91a6b1454 100644
--- a/arch/arm/boards/usb-a926x/init.c
+++ b/arch/arm/boards/usb-a926x/init.c
@@ -11,21 +11,21 @@
#include <fcntl.h>
#include <io.h>
#include <envfs.h>
-#include <mach/hardware.h>
-#include <mach/at91sam926x.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91sam926x.h>
#include <nand.h>
#include <linux/sizes.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/rawnand.h>
#include <linux/clk.h>
-#include <mach/board.h>
-#include <mach/at91sam9_smc.h>
-#include <mach/at91sam9_sdramc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91sam9_smc.h>
+#include <mach/at91/at91sam9_sdramc.h>
#include <gpio.h>
#include <led.h>
-#include <mach/iomux.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_rstc.h>
#include <gpio_keys.h>
#include <readkey.h>
#include <spi/spi.h>
diff --git a/arch/arm/boards/usb-a926x/usb_a9260_lowlevel.c b/arch/arm/boards/usb-a926x/usb_a9260_lowlevel.c
index c2c8d0f7fe..66753669d6 100644
--- a/arch/arm/boards/usb-a926x/usb_a9260_lowlevel.c
+++ b/arch/arm/boards/usb-a926x/usb_a9260_lowlevel.c
@@ -7,11 +7,10 @@
#include <common.h>
#include <init.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9260.h>
-#include <mach/hardware.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/hardware.h>
AT91_ENTRY_FUNCTION(start_usb_a9260, r0, r1, r2)
{
diff --git a/arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c b/arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c
index f26f1eaecb..5739b0f2da 100644
--- a/arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c
+++ b/arch/arm/boards/usb-a926x/usb_a9263_bootstrap.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <bootstrap.h>
-#include <mach/bootstrap.h>
+#include <mach/at91/bootstrap.h>
#ifdef CONFIG_MTD_DATAFLASH
void * bootstrap_board_read_dataflash(void)
diff --git a/arch/arm/boards/usb-a926x/usb_a9263_lowlevel.c b/arch/arm/boards/usb-a926x/usb_a9263_lowlevel.c
index 4b0a80fa83..eda534c68e 100644
--- a/arch/arm/boards/usb-a926x/usb_a9263_lowlevel.c
+++ b/arch/arm/boards/usb-a926x/usb_a9263_lowlevel.c
@@ -6,10 +6,9 @@
#include <linux/sizes.h>
-#include <mach/barebox-arm.h>
-
-#include <mach/at91sam926x_board_init.h>
-#include <mach/at91sam9263_matrix.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91sam926x_board_init.h>
+#include <mach/at91/at91sam9263_matrix.h>
#define MASTER_CLOCK 180
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 96350936f9..2e1d6ba3e4 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -48,6 +48,8 @@
#include <mach/digic/debug_ll.h>
#elif defined CONFIG_ARCH_CLPS711X
#include <mach/clps711x/debug_ll.h>
+#elif defined CONFIG_ARCH_AT91
+#include <mach/at91/debug_ll.h>
#else
#ifndef CONFIG_ARCH_ARM64_VIRT
#include <mach/debug_ll.h>
diff --git a/arch/arm/mach-at91/aic.c b/arch/arm/mach-at91/aic.c
index b40f1d214b..b57fe57361 100644
--- a/arch/arm/mach-at91/aic.c
+++ b/arch/arm/mach-at91/aic.c
@@ -6,7 +6,7 @@
* this software without specific prior written permission.
*/
-#include <mach/aic.h>
+#include <mach/at91/aic.h>
#include <io.h>
#define SFR_AICREDIR 0x54
diff --git a/arch/arm/mach-at91/at91_pmc_ll.c b/arch/arm/mach-at91/at91_pmc_ll.c
index e561f20755..0d377b4ca7 100644
--- a/arch/arm/mach-at91/at91_pmc_ll.c
+++ b/arch/arm/mach-at91/at91_pmc_ll.c
@@ -10,10 +10,10 @@
#define pr_fmt(fmt) "at91pmc: " fmt
#include <common.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_pmc_ll.h>
-#include <mach/early_udelay.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_pmc_ll.h>
+#include <mach/at91/early_udelay.h>
#define SFR_UTMICKTRIM 0x30 /* UTMI Clock Trimming Register */
#define AT91_UTMICKTRIM_FREQ 0x03
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index ef2430576b..a45bf7cdd3 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -3,8 +3,8 @@
#include <common.h>
#include <gpio.h>
#include <init.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
#include "clock.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index b509926d82..8717aefc77 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -7,11 +7,11 @@
#include <common.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/at91rm9200.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
-#include <mach/at91rm9200_mc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91rm9200.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/at91rm9200_mc.h>
#include <i2c/i2c-gpio.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index 110d770881..c8394d3d74 100644
--- a/arch/arm/mach-at91/at91rm9200_time.c
+++ b/arch/arm/mach-at91/at91rm9200_time.c
@@ -6,8 +6,8 @@
#include <init.h>
#include <clock.h>
#include <restart.h>
-#include <mach/hardware.h>
-#include <mach/at91rm9200_st.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91rm9200_st.h>
#include <io.h>
static void __iomem *st = IOMEM(AT91RM9200_BASE_ST);
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 457aecde51..623c01605f 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -4,10 +4,10 @@
#include <gpio.h>
#include <init.h>
#include <restart.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_rstc.h>
#include "generic.h"
#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index 4fc7f2fcbd..435535a917 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_devices.c
@@ -8,14 +8,14 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/board.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91sam9260_matrix.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91_rtt.h>
-#include <mach/iomux.h>
-#include <mach/cpu.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91sam9260_matrix.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91_rtt.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/cpu.h>
#include <i2c/i2c-gpio.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 840c0be382..df35b7239c 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -4,10 +4,10 @@
#include <gpio.h>
#include <init.h>
#include <restart.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_rstc.h>
#include "generic.h"
#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 0c7ef6dade..20446a7077 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -8,14 +8,14 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91sam9261_matrix.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91_rtt.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
-#include <mach/cpu.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91sam9261_matrix.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91_rtt.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/cpu.h>
#include <i2c/i2c-gpio.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 53523d1f9f..2241e568d4 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -4,10 +4,10 @@
#include <gpio.h>
#include <init.h>
#include <restart.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/board.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_rstc.h>
#include "clock.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 0adf1ff0cb..1813eee746 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -8,13 +8,13 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91sam9263_matrix.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91_rtt.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91sam9263_matrix.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91_rtt.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
#include <i2c/i2c-gpio.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9_reset.S b/arch/arm/mach-at91/at91sam9_reset.S
index e50b5e13d5..37d0c8fc5d 100644
--- a/arch/arm/mach-at91/at91sam9_reset.S
+++ b/arch/arm/mach-at91/at91sam9_reset.S
@@ -10,8 +10,8 @@
*/
#include <linux/linkage.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91_rstc.h>
.arm
diff --git a/arch/arm/mach-at91/at91sam9_rst.c b/arch/arm/mach-at91/at91sam9_rst.c
index 741569fa8c..cccbc7e68f 100644
--- a/arch/arm/mach-at91/at91sam9_rst.c
+++ b/arch/arm/mach-at91/at91sam9_rst.c
@@ -9,7 +9,7 @@
#include <restart.h>
#include <linux/bitfield.h>
#include <linux/clk.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/at91_rstc.h>
#include <reset_source.h>
struct at91sam9x_rst {
diff --git a/arch/arm/mach-at91/at91sam9_sdramc_ll.c b/arch/arm/mach-at91/at91sam9_sdramc_ll.c
index 805cfbbe43..5305c94248 100644
--- a/arch/arm/mach-at91/at91sam9_sdramc_ll.c
+++ b/arch/arm/mach-at91/at91sam9_sdramc_ll.c
@@ -3,8 +3,8 @@
* Copyright (c) 2006, Atmel Corporation
*/
-#include <mach/at91sam9_sdramc.h>
-#include <mach/early_udelay.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/early_udelay.h>
static inline void sdramc_wr(const struct at91sam9_sdramc_config *config,
unsigned int offset,
diff --git a/arch/arm/mach-at91/at91sam9_xload_mmc.c b/arch/arm/mach-at91/at91sam9_xload_mmc.c
index 5cf41c483d..26f268ae91 100644
--- a/arch/arm/mach-at91/at91sam9_xload_mmc.c
+++ b/arch/arm/mach-at91/at91sam9_xload_mmc.c
@@ -8,13 +8,13 @@
#include <linux/sizes.h>
#include <asm/cache.h>
-#include <mach/at91_pmc_ll.h>
-#include <mach/at91sam9263.h>
-#include <mach/at91sam926x.h>
-#include <mach/hardware.h>
-#include <mach/iomux.h>
-#include <mach/xload.h>
-#include <mach/gpio.h>
+#include <mach/at91/at91_pmc_ll.h>
+#include <mach/at91/at91sam9263.h>
+#include <mach/at91/at91sam926x.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/xload.h>
+#include <mach/at91/gpio.h>
typedef void (*func)(int zero, int arch, void *params);
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index ee8650db39..0d8d399fc5 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -4,11 +4,11 @@
#include <gpio.h>
#include <init.h>
#include <restart.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/cpu.h>
-#include <mach/board.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/cpu.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_rstc.h>
#include "generic.h"
#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index d55ab4f9ea..e74ba8e917 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -8,13 +8,13 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91sam9g45_matrix.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/at91_rtt.h>
-#include <mach/board.h>
-#include <mach/iomux.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91sam9g45_matrix.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/at91_rtt.h>
+#include <mach/at91/board.h>
+#include <mach/at91/iomux.h>
#include <i2c/i2c-gpio.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9g45_reset.S b/arch/arm/mach-at91/at91sam9g45_reset.S
index 67517bf591..4189c4bfd7 100644
--- a/arch/arm/mach-at91/at91sam9g45_reset.S
+++ b/arch/arm/mach-at91/at91sam9g45_reset.S
@@ -11,8 +11,8 @@
*/
#include <linux/linkage.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/at91_rstc.h>
.arm
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
index dbaabc0533..e6f4495fc1 100644
--- a/arch/arm/mach-at91/at91sam9n12.c
+++ b/arch/arm/mach-at91/at91sam9n12.c
@@ -4,11 +4,11 @@
#include <gpio.h>
#include <init.h>
#include <restart.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/cpu.h>
-#include <mach/board.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/cpu.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_rstc.h>
#include "generic.h"
#include "clock.h"
diff --git a/arch/arm/mach-at91/at91sam9n12_devices.c b/arch/arm/mach-at91/at91sam9n12_devices.c
index ef432f8758..626b267954 100644
--- a/arch/arm/mach-at91/at91sam9n12_devices.c
+++ b/arch/arm/mach-at91/at91sam9n12_devices.c
@@ -8,13 +8,13 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/board.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91sam9n12_matrix.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/iomux.h>
-#include <mach/cpu.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91sam9n12_matrix.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/cpu.h>
#include <i2c/i2c-gpio.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c
index ecc144a37a..0b0fbc6ff3 100644
--- a/arch/arm/mach-at91/at91sam9x5.c
+++ b/arch/arm/mach-at91/at91sam9x5.c
@@ -3,9 +3,9 @@
#include <common.h>
#include <init.h>
#include <restart.h>
-#include <mach/at91sam9x5.h>
-#include <mach/board.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/at91sam9x5.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_rstc.h>
static void at91sam9x5_restart(struct restart_handler *rst)
{
diff --git a/arch/arm/mach-at91/at91sam9x5_devices.c b/arch/arm/mach-at91/at91sam9x5_devices.c
index a2c9f3085c..c5dea4e3d7 100644
--- a/arch/arm/mach-at91/at91sam9x5_devices.c
+++ b/arch/arm/mach-at91/at91sam9x5_devices.c
@@ -7,13 +7,13 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/board.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91sam9x5_matrix.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/iomux.h>
-#include <mach/cpu.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91sam9x5_matrix.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/cpu.h>
#include <i2c/i2c-gpio.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/bootm-barebox.c b/arch/arm/mach-at91/bootm-barebox.c
index 77aa4577c6..5540b8fad3 100644
--- a/arch/arm/mach-at91/bootm-barebox.c
+++ b/arch/arm/mach-at91/bootm-barebox.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <init.h>
#include <memory.h>
-#include <mach/sama5_bootsource.h>
+#include <mach/at91/sama5_bootsource.h>
unsigned long at91_bootsource;
EXPORT_SYMBOL(at91_bootsource);
diff --git a/arch/arm/mach-at91/bootstrap.c b/arch/arm/mach-at91/bootstrap.c
index 0b1567cd23..fbf5fa78a1 100644
--- a/arch/arm/mach-at91/bootstrap.c
+++ b/arch/arm/mach-at91/bootstrap.c
@@ -6,7 +6,7 @@
#include <common.h>
#include <bootstrap.h>
-#include <mach/bootstrap.h>
+#include <mach/at91/bootstrap.h>
#include <linux/sizes.h>
#include <malloc.h>
#include <restart.h>
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c
index 8fe0115765..a3071189bb 100644
--- a/arch/arm/mach-at91/clock.c
+++ b/arch/arm/mach-at91/clock.c
@@ -13,10 +13,10 @@
#include <linux/clk.h>
#include <init.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/cpu.h>
-#include <mach/board.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/cpu.h>
+#include <mach/at91/board.h>
#include "clock.h"
#include "generic.h"
diff --git a/arch/arm/mach-at91/ddramc.c b/arch/arm/mach-at91/ddramc.c
index 1e94fbf9ee..4f348c709f 100644
--- a/arch/arm/mach-at91/ddramc.c
+++ b/arch/arm/mach-at91/ddramc.c
@@ -5,11 +5,11 @@
#include <common.h>
#include <init.h>
-#include <mach/ddramc.h>
-#include <mach/hardware.h>
+#include <mach/at91/ddramc.h>
+#include <mach/at91/hardware.h>
#include <asm/barebox-arm.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/sama5_bootsource.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/sama5_bootsource.h>
#include <asm/memory.h>
#include <pbl.h>
#include <io.h>
diff --git a/arch/arm/mach-at91/ddramc_ll.c b/arch/arm/mach-at91/ddramc_ll.c
index 77d03720cc..001d3d7a22 100644
--- a/arch/arm/mach-at91/ddramc_ll.c
+++ b/arch/arm/mach-at91/ddramc_ll.c
@@ -6,9 +6,9 @@
#include <linux/kconfig.h>
#include <asm/system.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/ddramc.h>
-#include <mach/early_udelay.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/ddramc.h>
+#include <mach/at91/early_udelay.h>
void at91_ddram_initialize(void __iomem *base_address,
void __iomem *ram_address,
diff --git a/arch/arm/mach-at91/early_udelay.c b/arch/arm/mach-at91/early_udelay.c
index 632e797beb..c1a22d901a 100644
--- a/arch/arm/mach-at91/early_udelay.c
+++ b/arch/arm/mach-at91/early_udelay.c
@@ -3,11 +3,11 @@
* Copyright (c) 2012, Atmel Corporation
*/
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <asm/io.h>
-#include <mach/at91_pmc_ll.h>
-#include <mach/at91_pit.h>
-#include <mach/early_udelay.h>
+#include <mach/at91/at91_pmc_ll.h>
+#include <mach/at91/at91_pit.h>
+#include <mach/at91/early_udelay.h>
static unsigned int master_clock;
static void __iomem *pmc, *pit;
diff --git a/arch/arm/mach-at91/matrix.c b/arch/arm/mach-at91/matrix.c
index b2e7345ec1..39ac3648f4 100644
--- a/arch/arm/mach-at91/matrix.c
+++ b/arch/arm/mach-at91/matrix.c
@@ -7,8 +7,8 @@
*/
#include <io.h>
-#include <mach/tz_matrix.h>
-#include <mach/matrix.h>
+#include <mach/at91/tz_matrix.h>
+#include <mach/at91/matrix.h>
static inline void matrix_write(void __iomem *base,
unsigned int offset,
diff --git a/arch/arm/mach-at91/sam9263_ll.c b/arch/arm/mach-at91/sam9263_ll.c
index ffde065f6e..2beeaccd61 100644
--- a/arch/arm/mach-at91/sam9263_ll.c
+++ b/arch/arm/mach-at91/sam9263_ll.c
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: GPL-2.0-only AND BSD-1-Clause
// SPDX-FileCopyrightText: 2017, Microchip Corporation
-#include <mach/at91sam9263_matrix.h>
-#include <mach/barebox-arm.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91_wdt.h>
-#include <mach/sam92_ll.h>
+#include <mach/at91/at91sam9263_matrix.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/at91_wdt.h>
+#include <mach/at91/sam92_ll.h>
static void sam9263_pmc_init(const struct sam92_pmc_config *config)
{
diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c
index 51e6cf4a83..ef58a0153a 100644
--- a/arch/arm/mach-at91/sam9_smc.c
+++ b/arch/arm/mach-at91/sam9_smc.c
@@ -6,11 +6,11 @@
#include <common.h>
#include <init.h>
#include <io.h>
-#include <mach/hardware.h>
-#include <mach/cpu.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/cpu.h>
#include <linux/err.h>
-#include <mach/at91sam9_smc.h>
+#include <mach/at91/at91sam9_smc.h>
#define AT91_SAM9_SMC_CS_STRIDE 0x10
#define AT91_SAMA5_SMC_CS_STRIDE 0x14
diff --git a/arch/arm/mach-at91/sama5_bootsource.c b/arch/arm/mach-at91/sama5_bootsource.c
index 1cbfb4da7d..4ede256e8f 100644
--- a/arch/arm/mach-at91/sama5_bootsource.c
+++ b/arch/arm/mach-at91/sama5_bootsource.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
-#include <mach/sama5_bootsource.h>
+#include <mach/at91/sama5_bootsource.h>
#include <linux/export.h>
#include <bootsource.h>
#include <init.h>
diff --git a/arch/arm/mach-at91/sama5d2.c b/arch/arm/mach-at91/sama5d2.c
index b0a04beb63..f629d1df33 100644
--- a/arch/arm/mach-at91/sama5d2.c
+++ b/arch/arm/mach-at91/sama5d2.c
@@ -3,11 +3,11 @@
#include <common.h>
#include <of.h>
#include <init.h>
-#include <mach/aic.h>
-#include <mach/sama5d2.h>
+#include <mach/at91/aic.h>
+#include <mach/at91/sama5d2.h>
#include <asm/cache-l2x0.h>
#include <asm/mmu.h>
-#include <mach/cpu.h>
+#include <mach/at91/cpu.h>
#define SFR_CAN 0x48
#define SFR_L2CC_HRAMC 0x58
diff --git a/arch/arm/mach-at91/sama5d2_ll.c b/arch/arm/mach-at91/sama5d2_ll.c
index 3366a50e8f..c0adf220a2 100644
--- a/arch/arm/mach-at91/sama5d2_ll.c
+++ b/arch/arm/mach-at91/sama5d2_ll.c
@@ -6,13 +6,13 @@
* from this software without specific prior written permission.
*/
-#include <mach/sama5d2_ll.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/ddramc.h>
-#include <mach/early_udelay.h>
-#include <mach/tz_matrix.h>
-#include <mach/matrix.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/sama5d2_ll.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/ddramc.h>
+#include <mach/at91/early_udelay.h>
+#include <mach/at91/tz_matrix.h>
+#include <mach/at91/matrix.h>
+#include <mach/at91/at91_rstc.h>
#include <asm/barebox-arm.h>
#define sama5d2_pmc_write(off, val) writel(val, SAMA5D2_BASE_PMC + off)
diff --git a/arch/arm/mach-at91/sama5d3.c b/arch/arm/mach-at91/sama5d3.c
index 0c9d9cb023..447ac711b4 100644
--- a/arch/arm/mach-at91/sama5d3.c
+++ b/arch/arm/mach-at91/sama5d3.c
@@ -4,11 +4,11 @@
#include <gpio.h>
#include <init.h>
#include <restart.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/cpu.h>
-#include <mach/board.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/cpu.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_rstc.h>
#include <linux/clk.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/sama5d3_devices.c b/arch/arm/mach-at91/sama5d3_devices.c
index 75f588deff..f6d5617e5f 100644
--- a/arch/arm/mach-at91/sama5d3_devices.c
+++ b/arch/arm/mach-at91/sama5d3_devices.c
@@ -8,13 +8,13 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/board.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91sam9x5_matrix.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/iomux.h>
-#include <mach/cpu.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91sam9x5_matrix.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/cpu.h>
#include <i2c/i2c-gpio.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/sama5d3_ll.c b/arch/arm/mach-at91/sama5d3_ll.c
index 4650593699..65eea93723 100644
--- a/arch/arm/mach-at91/sama5d3_ll.c
+++ b/arch/arm/mach-at91/sama5d3_ll.c
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-only AND BSD-1-Clause
// SPDX-FileCopyrightText: 2017, Microchip Corporation
-#include <mach/at91_wdt.h>
-#include <mach/barebox-arm.h>
-#include <mach/sama5d3_ll.h>
+#include <mach/at91/at91_wdt.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/sama5d3_ll.h>
void sama5d3_lowlevel_init(void)
{
diff --git a/arch/arm/mach-at91/sama5d4.c b/arch/arm/mach-at91/sama5d4.c
index 62e466fe51..8417dedbd1 100644
--- a/arch/arm/mach-at91/sama5d4.c
+++ b/arch/arm/mach-at91/sama5d4.c
@@ -11,11 +11,11 @@
#include <gpio.h>
#include <init.h>
#include <restart.h>
-#include <mach/hardware.h>
-#include <mach/at91_pmc.h>
-#include <mach/cpu.h>
-#include <mach/board.h>
-#include <mach/at91_rstc.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/cpu.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_rstc.h>
#include <linux/clk.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/sama5d4_devices.c b/arch/arm/mach-at91/sama5d4_devices.c
index 6af1d3a4de..e438bd0d10 100644
--- a/arch/arm/mach-at91/sama5d4_devices.c
+++ b/arch/arm/mach-at91/sama5d4_devices.c
@@ -8,13 +8,13 @@
#include <linux/sizes.h>
#include <gpio.h>
#include <asm/armlinux.h>
-#include <mach/hardware.h>
-#include <mach/board.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91sam9x5_matrix.h>
-#include <mach/at91_ddrsdrc.h>
-#include <mach/iomux.h>
-#include <mach/cpu.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/board.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91sam9x5_matrix.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/cpu.h>
#include <i2c/i2c-gpio.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index 3d49624cd5..708c946192 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -11,11 +11,11 @@
#include <restart.h>
#include <linux/clk.h>
-#include <mach/hardware.h>
-#include <mach/cpu.h>
-#include <mach/at91_dbgu.h>
-#include <mach/at91_rstc.h>
-#include <mach/board.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/cpu.h>
+#include <mach/at91/at91_dbgu.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/board.h>
#include "generic.h"
diff --git a/arch/arm/mach-at91/xload-mmc.c b/arch/arm/mach-at91/xload-mmc.c
index 33e5b203fe..9c03d2119c 100644
--- a/arch/arm/mach-at91/xload-mmc.c
+++ b/arch/arm/mach-at91/xload-mmc.c
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
-#include <mach/xload.h>
-#include <mach/sama5_bootsource.h>
-#include <mach/hardware.h>
-#include <mach/sama5d2_ll.h>
-#include <mach/sama5d3_ll.h>
-#include <mach/gpio.h>
+#include <mach/at91/xload.h>
+#include <mach/at91/sama5_bootsource.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/sama5d2_ll.h>
+#include <mach/at91/sama5d3_ll.h>
+#include <mach/at91/gpio.h>
#include <linux/sizes.h>
#include <asm/cache.h>
#include <pbl/bio.h>
diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c
index 1b0f2150db..63244faad0 100644
--- a/drivers/clocksource/timer-atmel-pit.c
+++ b/drivers/clocksource/timer-atmel-pit.c
@@ -15,8 +15,8 @@
#include <common.h>
#include <init.h>
#include <clock.h>
-#include <mach/hardware.h>
-#include <mach/at91_pit.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_pit.h>
#include <io.h>
#include <linux/clk.h>
#include <linux/err.h>
diff --git a/drivers/mci/atmel-sdhci-common.c b/drivers/mci/atmel-sdhci-common.c
index 129480aa55..05a019beb6 100644
--- a/drivers/mci/atmel-sdhci-common.c
+++ b/drivers/mci/atmel-sdhci-common.c
@@ -13,7 +13,7 @@
#include <mci.h>
#include <linux/bitfield.h>
-#include <mach/early_udelay.h>
+#include <mach/at91/early_udelay.h>
#ifdef __PBL__
#define udelay early_udelay
diff --git a/drivers/mci/atmel-sdhci-pbl.c b/drivers/mci/atmel-sdhci-pbl.c
index 2c5f107abd..f5a7279bff 100644
--- a/drivers/mci/atmel-sdhci-pbl.c
+++ b/drivers/mci/atmel-sdhci-pbl.c
@@ -11,10 +11,10 @@
#include <pbl/bio.h>
#include <mci.h>
#include <debug_ll.h>
-#include <mach/xload.h>
+#include <mach/at91/xload.h>
#include "atmel-sdhci.h"
-#include <mach/early_udelay.h>
+#include <mach/at91/early_udelay.h>
#ifdef __PBL__
#define udelay early_udelay
diff --git a/drivers/mci/atmel_mci_pbl.c b/drivers/mci/atmel_mci_pbl.c
index 65d8b3632a..7483e9375f 100644
--- a/drivers/mci/atmel_mci_pbl.c
+++ b/drivers/mci/atmel_mci_pbl.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
-#include <mach/xload.h>
+#include <mach/at91/xload.h>
#include <mci.h>
#include "atmel-mci-regs.h"
diff --git a/drivers/mtd/nand/atmel/legacy.c b/drivers/mtd/nand/atmel/legacy.c
index 1f804eb537..44cd4d07e8 100644
--- a/drivers/mtd/nand/atmel/legacy.c
+++ b/drivers/mtd/nand/atmel/legacy.c
@@ -29,7 +29,7 @@
#include <linux/err.h>
#include <io.h>
-#include <mach/board.h>
+#include <mach/at91/board.h>
#include <errno.h>
diff --git a/drivers/net/at91_ether.c b/drivers/net/at91_ether.c
index 6cf700ad90..5cebb8b44c 100644
--- a/drivers/net/at91_ether.c
+++ b/drivers/net/at91_ether.c
@@ -15,9 +15,9 @@
#include <xfuncs.h>
#include <init.h>
#include <asm/io.h>
-#include <mach/hardware.h>
-#include <mach/at91rm9200_emac.h>
-#include <mach/board.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91rm9200_emac.h>
+#include <mach/at91/board.h>
#include <generated/mach-types.h>
#include <linux/clk.h>
#include <linux/mii.h>
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 7f507bedb4..c9203d6049 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -11,7 +11,7 @@
#include <pinctrl.h>
#include <malloc.h>
#include <gpio.h>
-#include <mach/gpio.h>
+#include <mach/at91/gpio.h>
#include <linux/clk.h>
#include <dt-bindings/pinctrl/at91.h>
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index b80fa85f82..93a7ad0a65 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -18,9 +18,9 @@
#include <getopt.h>
#include <deep-probe.h>
-#include <mach/at91_pio.h>
-#include <mach/gpio.h>
-#include <mach/iomux.h>
+#include <mach/at91/at91_pio.h>
+#include <mach/at91/gpio.h>
+#include <mach/at91/iomux.h>
#include <pinctrl.h>
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 9bf85874c5..166531feb8 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -21,9 +21,9 @@
#include <of_gpio.h>
#include <io.h>
#include <spi/spi.h>
-#include <mach/iomux.h>
-#include <mach/board.h>
-#include <mach/cpu.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/board.h>
+#include <mach/at91/cpu.h>
#include <linux/clk.h>
#include <linux/err.h>
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 9a1a376a7a..fc5f24021d 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -26,11 +26,11 @@
#include <asm/byteorder.h>
-#include <mach/hardware.h>
-#include <mach/at91sam9261.h>
-#include <mach/board.h>
-#include <mach/cpu.h>
-#include <mach/at91sam9261_matrix.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91sam9261.h>
+#include <mach/at91/board.h>
+#include <mach/at91/cpu.h>
+#include <mach/at91/at91sam9261_matrix.h>
#include "at91_udc.h"
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 0738c03890..b1416a20d3 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -14,7 +14,7 @@
#include <of_gpio.h>
#include <io.h>
-#include <mach/board.h>
+#include <mach/at91/board.h>
#include "ohci.h"
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 9817c33ae5..0a24493907 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -9,9 +9,9 @@
#include <io.h>
#include <init.h>
#include <linux/clk.h>
-#include <mach/hardware.h>
-#include <mach/atmel_hlcdc.h>
-#include <mach/cpu.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/atmel_hlcdc.h>
+#include <mach/at91/cpu.h>
#include <errno.h>
#include "atmel_lcdfb.h"
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 8c056a8ffb..2d95a37722 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <io.h>
#include <init.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <errno.h>
#include <linux/clk.h>
diff --git a/drivers/video/atmel_lcdfb_core.c b/drivers/video/atmel_lcdfb_core.c
index 158fe8bbf9..9d3e6682b6 100644
--- a/drivers/video/atmel_lcdfb_core.c
+++ b/drivers/video/atmel_lcdfb_core.c
@@ -14,7 +14,7 @@
#include <linux/clk.h>
#include <malloc.h>
-#include <mach/cpu.h>
+#include <mach/at91/cpu.h>
#include "atmel_lcdfb.h"
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 1b33529124..d5a83cbb85 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -8,7 +8,7 @@
#include <io.h>
#include <watchdog.h>
#include <linux/clk.h>
-#include <mach/at91_wdt.h>
+#include <mach/at91/at91_wdt.h>
#define MIN_WDT_TIMEOUT 1
#define MAX_WDT_TIMEOUT 16
diff --git a/arch/arm/mach-at91/include/mach/aic.h b/include/mach/at91/aic.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/aic.h
rename to include/mach/at91/aic.h
diff --git a/arch/arm/mach-at91/include/mach/at91_dbgu.h b/include/mach/at91/at91_dbgu.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91_dbgu.h
rename to include/mach/at91/at91_dbgu.h
diff --git a/arch/arm/mach-at91/include/mach/at91_ddrsdrc.h b/include/mach/at91/at91_ddrsdrc.h
similarity index 99%
rename from arch/arm/mach-at91/include/mach/at91_ddrsdrc.h
rename to include/mach/at91/at91_ddrsdrc.h
index 7d70fe4cb4..b9b0eb20b3 100644
--- a/arch/arm/mach-at91/include/mach/at91_ddrsdrc.h
+++ b/include/mach/at91/at91_ddrsdrc.h
@@ -295,7 +295,7 @@
#ifndef __ASSEMBLY__
#include <common.h>
#include <io.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
static inline u32 at91_get_ddram_size(void __iomem *base, bool is_nb)
{
diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h b/include/mach/at91/at91_pio.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91_pio.h
rename to include/mach/at91/at91_pio.h
diff --git a/arch/arm/mach-at91/include/mach/at91_pit.h b/include/mach/at91/at91_pit.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91_pit.h
rename to include/mach/at91/at91_pit.h
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/include/mach/at91/at91_pmc.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91_pmc.h
rename to include/mach/at91/at91_pmc.h
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc_ll.h b/include/mach/at91/at91_pmc_ll.h
similarity index 99%
rename from arch/arm/mach-at91/include/mach/at91_pmc_ll.h
rename to include/mach/at91/at91_pmc_ll.h
index 85896a01d5..9832712fe5 100644
--- a/arch/arm/mach-at91/include/mach/at91_pmc_ll.h
+++ b/include/mach/at91/at91_pmc_ll.h
@@ -8,7 +8,7 @@
#include <errno.h>
#include <asm/io.h>
-#include <mach/at91_pmc.h>
+#include <mach/at91/at91_pmc.h>
#define AT91_PMC_LL_FLAG_SAM9X5_PMC (1 << 0)
#define AT91_PMC_LL_FLAG_MEASURE_XTAL (1 << 1)
diff --git a/arch/arm/mach-at91/include/mach/at91_rstc.h b/include/mach/at91/at91_rstc.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91_rstc.h
rename to include/mach/at91/at91_rstc.h
diff --git a/arch/arm/mach-at91/include/mach/at91_rtt.h b/include/mach/at91/at91_rtt.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91_rtt.h
rename to include/mach/at91/at91_rtt.h
diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h b/include/mach/at91/at91_wdt.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91_wdt.h
rename to include/mach/at91/at91_wdt.h
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/include/mach/at91/at91rm9200.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91rm9200.h
rename to include/mach/at91/at91rm9200.h
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_emac.h b/include/mach/at91/at91rm9200_emac.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91rm9200_emac.h
rename to include/mach/at91/at91rm9200_emac.h
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_mc.h b/include/mach/at91/at91rm9200_mc.h
similarity index 99%
rename from arch/arm/mach-at91/include/mach/at91rm9200_mc.h
rename to include/mach/at91/at91rm9200_mc.h
index 41ee1caba7..ea5213aa82 100644
--- a/arch/arm/mach-at91/include/mach/at91rm9200_mc.h
+++ b/include/mach/at91/at91rm9200_mc.h
@@ -155,7 +155,7 @@
#ifndef __ASSEMBLY__
#include <io.h>
-#include <mach/at91rm9200.h>
+#include <mach/at91/at91rm9200.h>
static inline u32 at91rm9200_get_sdram_size(void)
{
u32 cr, mr;
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200_st.h b/include/mach/at91/at91rm9200_st.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91rm9200_st.h
rename to include/mach/at91/at91rm9200_st.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/include/mach/at91/at91sam9260.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9260.h
rename to include/mach/at91/at91sam9260.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h b/include/mach/at91/at91sam9260_matrix.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
rename to include/mach/at91/at91sam9260_matrix.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/include/mach/at91/at91sam9261.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9261.h
rename to include/mach/at91/at91sam9261.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h b/include/mach/at91/at91sam9261_matrix.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
rename to include/mach/at91/at91sam9261_matrix.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/include/mach/at91/at91sam9263.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9263.h
rename to include/mach/at91/at91sam9263.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h b/include/mach/at91/at91sam9263_matrix.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
rename to include/mach/at91/at91sam9263_matrix.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam926x.h b/include/mach/at91/at91sam926x.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam926x.h
rename to include/mach/at91/at91sam926x.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam926x_board_init.h b/include/mach/at91/at91sam926x_board_init.h
similarity index 92%
rename from arch/arm/mach-at91/include/mach/at91sam926x_board_init.h
rename to include/mach/at91/at91sam926x_board_init.h
index 3dab64b71a..c309d45494 100644
--- a/arch/arm/mach-at91/include/mach/at91sam926x_board_init.h
+++ b/include/mach/at91/at91sam926x_board_init.h
@@ -10,15 +10,15 @@
#include <common.h>
#include <init.h>
-#include <mach/at91sam9_sdramc.h>
-#include <mach/at91sam9_smc.h>
-#include <mach/at91_rstc.h>
-#include <mach/at91_pio.h>
-#include <mach/at91_pmc.h>
-#include <mach/at91_wdt.h>
-#include <mach/hardware.h>
-#include <mach/gpio.h>
-#include <mach/at91sam926x.h>
+#include <mach/at91/at91sam9_sdramc.h>
+#include <mach/at91/at91sam9_smc.h>
+#include <mach/at91/at91_rstc.h>
+#include <mach/at91/at91_pio.h>
+#include <mach/at91/at91_pmc.h>
+#include <mach/at91/at91_wdt.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/gpio.h>
+#include <mach/at91/at91sam926x.h>
struct at91sam926x_board_cfg {
/* SoC specific */
@@ -183,19 +183,19 @@ static void __always_inline at91sam926x_board_init(void __iomem *smcbase,
writel(0xffffffff, pmc + AT91_PMC_PCER);
}
-#include <mach/at91sam9260.h>
+#include <mach/at91/at91sam9260.h>
static void __always_inline at91sam9260_board_init(struct at91sam926x_board_cfg *cfg)
{
at91sam926x_board_init(IOMEM(AT91SAM9260_BASE_SMC), cfg);
}
-#include <mach/at91sam9261.h>
+#include <mach/at91/at91sam9261.h>
static void __always_inline at91sam9261_board_init(struct at91sam926x_board_cfg *cfg)
{
at91sam926x_board_init(IOMEM(AT91SAM9261_BASE_SMC), cfg);
}
-#include <mach/at91sam9263.h>
+#include <mach/at91/at91sam9263.h>
static void __always_inline at91sam9263_board_init(struct at91sam926x_board_cfg *cfg)
{
at91sam926x_board_init(IOMEM(AT91SAM9263_BASE_SMC0), cfg);
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h b/include/mach/at91/at91sam9_sdramc.h
similarity index 98%
rename from arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
rename to include/mach/at91/at91sam9_sdramc.h
index 0e05387aa0..a4c88b24d4 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_sdramc.h
+++ b/include/mach/at91/at91sam9_sdramc.h
@@ -177,9 +177,9 @@
#ifndef __ASSEMBLY__
#include <io.h>
-#include <mach/at91sam9260.h>
-#include <mach/at91sam9261.h>
-#include <mach/at91sam9263.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/at91sam9261.h>
+#include <mach/at91/at91sam9263.h>
struct at91sam9_sdramc_config {
void __iomem *sdramc;
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_smc.h b/include/mach/at91/at91sam9_smc.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9_smc.h
rename to include/mach/at91/at91sam9_smc.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/include/mach/at91/at91sam9g45.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9g45.h
rename to include/mach/at91/at91sam9g45.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h b/include/mach/at91/at91sam9g45_matrix.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
rename to include/mach/at91/at91sam9g45_matrix.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12.h b/include/mach/at91/at91sam9n12.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9n12.h
rename to include/mach/at91/at91sam9n12.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h b/include/mach/at91/at91sam9n12_matrix.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h
rename to include/mach/at91/at91sam9n12_matrix.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/include/mach/at91/at91sam9x5.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9x5.h
rename to include/mach/at91/at91sam9x5.h
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h b/include/mach/at91/at91sam9x5_matrix.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
rename to include/mach/at91/at91sam9x5_matrix.h
diff --git a/arch/arm/mach-at91/include/mach/atmel_hlcdc.h b/include/mach/at91/atmel_hlcdc.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/atmel_hlcdc.h
rename to include/mach/at91/atmel_hlcdc.h
diff --git a/arch/arm/mach-at91/include/mach/barebox-arm.h b/include/mach/at91/barebox-arm.h
similarity index 96%
rename from arch/arm/mach-at91/include/mach/barebox-arm.h
rename to include/mach/at91/barebox-arm.h
index a0c51118c9..f1014542be 100644
--- a/arch/arm/mach-at91/include/mach/barebox-arm.h
+++ b/include/mach/at91/barebox-arm.h
@@ -4,8 +4,8 @@
#include <asm/barebox-arm.h>
#include <asm/common.h>
-#include <mach/sama5d3.h>
-#include <mach/sama5d4.h>
+#include <mach/at91/sama5d3.h>
+#include <mach/at91/sama5d4.h>
#ifdef CONFIG_AT91_LOAD_BAREBOX_SRAM
#define AT91_EXV6 ".word _barebox_image_size\n"
diff --git a/arch/arm/mach-at91/include/mach/board.h b/include/mach/at91/board.h
similarity index 98%
rename from arch/arm/mach-at91/include/mach/board.h
rename to include/mach/at91/board.h
index e426e0b3f5..5f04f9c849 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/include/mach/at91/board.h
@@ -6,7 +6,7 @@
#ifndef __ASM_ARCH_BOARD_H
#define __ASM_ARCH_BOARD_H
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
#include <linux/sizes.h>
#include <net.h>
#include <i2c/i2c.h>
@@ -14,7 +14,7 @@
#include <linux/mtd/mtd.h>
#include <fb.h>
#include <video/atmel_lcdc.h>
-#include <mach/atmel_hlcdc.h>
+#include <mach/at91/atmel_hlcdc.h>
#include <linux/phy.h>
#include <platform_data/macb.h>
diff --git a/arch/arm/mach-at91/include/mach/bootstrap.h b/include/mach/at91/bootstrap.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/bootstrap.h
rename to include/mach/at91/bootstrap.h
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/include/mach/at91/cpu.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/cpu.h
rename to include/mach/at91/cpu.h
diff --git a/arch/arm/mach-at91/include/mach/ddramc.h b/include/mach/at91/ddramc.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/ddramc.h
rename to include/mach/at91/ddramc.h
diff --git a/arch/arm/mach-at91/include/mach/debug_ll.h b/include/mach/at91/debug_ll.h
similarity index 90%
rename from arch/arm/mach-at91/include/mach/debug_ll.h
rename to include/mach/at91/debug_ll.h
index b3cbdbc26f..b09ba5f64a 100644
--- a/arch/arm/mach-at91/include/mach/debug_ll.h
+++ b/include/mach/at91/debug_ll.h
@@ -9,9 +9,9 @@
#define __MACH_DEBUG_LL_H__
#include <asm/io.h>
-#include <mach/gpio.h>
-#include <mach/hardware.h>
-#include <mach/at91_dbgu.h>
+#include <mach/at91/gpio.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/at91_dbgu.h>
#define ATMEL_US_CSR 0x0014
#define ATMEL_US_THR 0x001c
diff --git a/arch/arm/mach-at91/include/mach/early_udelay.h b/include/mach/at91/early_udelay.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/early_udelay.h
rename to include/mach/at91/early_udelay.h
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/include/mach/at91/gpio.h
similarity index 99%
rename from arch/arm/mach-at91/include/mach/gpio.h
rename to include/mach/at91/gpio.h
index 7f84f41e5b..73f14caa34 100644
--- a/arch/arm/mach-at91/include/mach/gpio.h
+++ b/include/mach/at91/gpio.h
@@ -9,7 +9,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <asm/io.h>
-#include <mach/at91_pio.h>
+#include <mach/at91/at91_pio.h>
#define MAX_NB_GPIO_PER_BANK 32
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/include/mach/at91/hardware.h
similarity index 75%
rename from arch/arm/mach-at91/include/mach/hardware.h
rename to include/mach/at91/hardware.h
index 0d08a99fe4..c34868cc9f 100644
--- a/arch/arm/mach-at91/include/mach/hardware.h
+++ b/include/mach/at91/hardware.h
@@ -15,16 +15,16 @@
/* sama5d4 */
#define AT91_BASE_DBGU2 0xfc069000
-#include <mach/at91rm9200.h>
-#include <mach/at91sam9260.h>
-#include <mach/at91sam9261.h>
-#include <mach/at91sam9263.h>
-#include <mach/at91sam9g45.h>
-#include <mach/at91sam9n12.h>
-#include <mach/at91sam9x5.h>
-#include <mach/sama5d2.h>
-#include <mach/sama5d3.h>
-#include <mach/sama5d4.h>
+#include <mach/at91/at91rm9200.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/at91sam9261.h>
+#include <mach/at91/at91sam9263.h>
+#include <mach/at91/at91sam9g45.h>
+#include <mach/at91/at91sam9n12.h>
+#include <mach/at91/at91sam9x5.h>
+#include <mach/at91/sama5d2.h>
+#include <mach/at91/sama5d3.h>
+#include <mach/at91/sama5d4.h>
/* External Memory Map */
#define AT91_CHIPSELECT_0 0x10000000
diff --git a/arch/arm/mach-at91/include/mach/iomux.h b/include/mach/at91/iomux.h
similarity index 98%
rename from arch/arm/mach-at91/include/mach/iomux.h
rename to include/mach/at91/iomux.h
index bdd34bed94..84b50e05e0 100644
--- a/arch/arm/mach-at91/include/mach/iomux.h
+++ b/include/mach/at91/iomux.h
@@ -8,9 +8,9 @@
#include <io.h>
#include <asm-generic/errno.h>
-#include <mach/at91_pio.h>
-#include <mach/hardware.h>
-#include <mach/gpio.h>
+#include <mach/at91/at91_pio.h>
+#include <mach/at91/hardware.h>
+#include <mach/at91/gpio.h>
#define AT91_PIN_PA0 (0x00 + 0)
#define AT91_PIN_PA1 (0x00 + 1)
diff --git a/arch/arm/mach-at91/include/mach/matrix.h b/include/mach/at91/matrix.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/matrix.h
rename to include/mach/at91/matrix.h
diff --git a/arch/arm/mach-at91/include/mach/sam92_ll.h b/include/mach/at91/sam92_ll.h
similarity index 80%
rename from arch/arm/mach-at91/include/mach/sam92_ll.h
rename to include/mach/at91/sam92_ll.h
index f5cef197d3..8cfccd6402 100644
--- a/arch/arm/mach-at91/include/mach/sam92_ll.h
+++ b/include/mach/at91/sam92_ll.h
@@ -6,14 +6,14 @@
#include <debug_ll.h>
#include <common.h>
-#include <mach/at91_pmc_ll.h>
-#include <mach/at91sam9260.h>
-#include <mach/at91sam9261.h>
-#include <mach/at91sam9263.h>
-#include <mach/at91sam926x.h>
-#include <mach/debug_ll.h>
-#include <mach/early_udelay.h>
-#include <mach/iomux.h>
+#include <mach/at91/at91_pmc_ll.h>
+#include <mach/at91/at91sam9260.h>
+#include <mach/at91/at91sam9261.h>
+#include <mach/at91/at91sam9263.h>
+#include <mach/at91/at91sam926x.h>
+#include <mach/at91/debug_ll.h>
+#include <mach/at91/early_udelay.h>
+#include <mach/at91/iomux.h>
struct sam92_pmc_config {
unsigned int diva;
diff --git a/arch/arm/mach-at91/include/mach/sama5_bootsource.h b/include/mach/at91/sama5_bootsource.h
similarity index 98%
rename from arch/arm/mach-at91/include/mach/sama5_bootsource.h
rename to include/mach/at91/sama5_bootsource.h
index 8072e7c251..2fb65ce10f 100644
--- a/arch/arm/mach-at91/include/mach/sama5_bootsource.h
+++ b/include/mach/at91/sama5_bootsource.h
@@ -6,7 +6,7 @@
#include <bootsource.h>
#include <linux/bitops.h>
#include <linux/bitfield.h>
-#include <mach/hardware.h>
+#include <mach/at91/hardware.h>
/* Boot modes stored by BootROM in r4 */
#define SAMA5_BOOTSOURCE_SPI 0
diff --git a/arch/arm/mach-at91/include/mach/sama5d2-sip-ddramc.h b/include/mach/at91/sama5d2-sip-ddramc.h
similarity index 91%
rename from arch/arm/mach-at91/include/mach/sama5d2-sip-ddramc.h
rename to include/mach/at91/sama5d2-sip-ddramc.h
index 6a75ac71fc..6b8d1dbf86 100644
--- a/arch/arm/mach-at91/include/mach/sama5d2-sip-ddramc.h
+++ b/include/mach/at91/sama5d2-sip-ddramc.h
@@ -5,9 +5,9 @@
* SAMA5D27 System-in-Package DDRAMC configuration
*/
-#include <mach/at91_ddrsdrc.h>
-#include <mach/ddramc.h>
-#include <mach/sama5d2_ll.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/ddramc.h>
+#include <mach/at91/sama5d2_ll.h>
static inline void sama5d2_d1g_ddrconf(void) /* DDR2 1Gbit SDRAM */
{
diff --git a/arch/arm/mach-at91/include/mach/sama5d2.h b/include/mach/at91/sama5d2.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/sama5d2.h
rename to include/mach/at91/sama5d2.h
diff --git a/arch/arm/mach-at91/include/mach/sama5d2_ll.h b/include/mach/at91/sama5d2_ll.h
similarity index 94%
rename from arch/arm/mach-at91/include/mach/sama5d2_ll.h
rename to include/mach/at91/sama5d2_ll.h
index c78279d7fc..199730d460 100644
--- a/arch/arm/mach-at91/include/mach/sama5d2_ll.h
+++ b/include/mach/at91/sama5d2_ll.h
@@ -3,12 +3,12 @@
#ifndef __MACH_SAMA5D2_LL__
#define __MACH_SAMA5D2_LL__
-#include <mach/sama5d2.h>
-#include <mach/at91_pmc_ll.h>
-#include <mach/iomux.h>
-#include <mach/debug_ll.h>
-#include <mach/early_udelay.h>
-#include <mach/ddramc.h>
+#include <mach/at91/sama5d2.h>
+#include <mach/at91/at91_pmc_ll.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/debug_ll.h>
+#include <mach/at91/early_udelay.h>
+#include <mach/at91/ddramc.h>
#include <common.h>
diff --git a/arch/arm/mach-at91/include/mach/sama5d3-xplained-ddramc.h b/include/mach/at91/sama5d3-xplained-ddramc.h
similarity index 96%
rename from arch/arm/mach-at91/include/mach/sama5d3-xplained-ddramc.h
rename to include/mach/at91/sama5d3-xplained-ddramc.h
index 6f829282c6..675634766e 100644
--- a/arch/arm/mach-at91/include/mach/sama5d3-xplained-ddramc.h
+++ b/include/mach/at91/sama5d3-xplained-ddramc.h
@@ -5,9 +5,9 @@
* SAMA5D27 System-in-Package DDRAMC configuration
*/
-#include <mach/at91_ddrsdrc.h>
-#include <mach/ddramc.h>
-#include <mach/sama5d3_ll.h>
+#include <mach/at91/at91_ddrsdrc.h>
+#include <mach/at91/ddramc.h>
+#include <mach/at91/sama5d3_ll.h>
static inline void sama5d3_xplained_ddrconf(void)
{
diff --git a/arch/arm/mach-at91/include/mach/sama5d3.h b/include/mach/at91/sama5d3.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/sama5d3.h
rename to include/mach/at91/sama5d3.h
diff --git a/arch/arm/mach-at91/include/mach/sama5d3_ll.h b/include/mach/at91/sama5d3_ll.h
similarity index 82%
rename from arch/arm/mach-at91/include/mach/sama5d3_ll.h
rename to include/mach/at91/sama5d3_ll.h
index b5b6b5d820..d9f18794de 100644
--- a/arch/arm/mach-at91/include/mach/sama5d3_ll.h
+++ b/include/mach/at91/sama5d3_ll.h
@@ -3,9 +3,9 @@
#ifndef __SAMA5D3_LL_H__
#define __SAMA5D3_LL_H__
-#include <mach/at91_pmc_ll.h>
-#include <mach/debug_ll.h>
-#include <mach/early_udelay.h>
+#include <mach/at91/at91_pmc_ll.h>
+#include <mach/at91/debug_ll.h>
+#include <mach/at91/early_udelay.h>
void sama5d3_lowlevel_init(void);
diff --git a/arch/arm/mach-at91/include/mach/sama5d4.h b/include/mach/at91/sama5d4.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/sama5d4.h
rename to include/mach/at91/sama5d4.h
diff --git a/arch/arm/mach-at91/include/mach/tz_matrix.h b/include/mach/at91/tz_matrix.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/tz_matrix.h
rename to include/mach/at91/tz_matrix.h
diff --git a/arch/arm/mach-at91/include/mach/xload.h b/include/mach/at91/xload.h
similarity index 100%
rename from arch/arm/mach-at91/include/mach/xload.h
rename to include/mach/at91/xload.h
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 23/50] ARM: Drop mach dir include path
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (21 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 22/50] ARM: at91: Move mach header files to include/mach/at91 Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 24/50] include/mach/: use unique double inclusion protectors Sascha Hauer
` (26 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
arch/arm/mach-*/include/mach no longer exists, drop the include path.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Makefile | 4 ----
arch/arm/include/asm/debug_ll.h | 4 ----
2 files changed, 8 deletions(-)
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 6d4bfa8c45..da65dae548 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -109,10 +109,6 @@ machine-$(CONFIG_ARCH_UEMD) := uemd
machine-$(CONFIG_ARCH_ZYNQ) := zynq
machine-$(CONFIG_ARCH_ZYNQMP) := zynqmp
-machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
-
-KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
-
TEXT_BASE = $(CONFIG_TEXT_BASE)
KBUILD_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 2e1d6ba3e4..1844b85c2e 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -50,10 +50,6 @@
#include <mach/clps711x/debug_ll.h>
#elif defined CONFIG_ARCH_AT91
#include <mach/at91/debug_ll.h>
-#else
-#ifndef CONFIG_ARCH_ARM64_VIRT
-#include <mach/debug_ll.h>
-#endif
#endif
#endif
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 24/50] include/mach/: use unique double inclusion protectors
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (22 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 23/50] ARM: Drop mach dir include path Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 25/50] ARM: i.MX: Only provide PUTC_LL() when activated Sascha Hauer
` (25 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Many macro names used for double inclusion protection in incliude/mach/
are not unique. That may become a problem with multi-arch support.
Fix several of them, more may still be present.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/mach/at91/debug_ll.h | 6 +++---
include/mach/at91/hardware.h | 6 +++---
include/mach/at91/xload.h | 6 +++---
include/mach/clps711x/debug_ll.h | 6 +++---
include/mach/davinci/debug_ll.h | 6 +++---
include/mach/davinci/hardware.h | 6 +++---
include/mach/digic/debug_ll.h | 6 +++---
include/mach/imx/bbu.h | 6 +++---
include/mach/imx/debug_ll.h | 6 +++---
include/mach/imx/xload.h | 6 +++---
include/mach/layerscape/debug_ll.h | 6 +++---
include/mach/layerscape/xload.h | 6 +++---
include/mach/mvebu/debug_ll.h | 6 +++---
include/mach/mxs/debug_ll.h | 6 +++---
include/mach/nomadik/hardware.h | 6 +++---
include/mach/omap/bbu.h | 6 +++---
include/mach/omap/debug_ll.h | 6 +++---
include/mach/rockchip/debug_ll.h | 6 +++---
include/mach/socfpga/debug_ll.h | 6 +++---
include/mach/tegra/debug_ll.h | 6 +++---
include/mach/uemd/debug_ll.h | 6 +++---
include/mach/uemd/hardware.h | 6 +++---
include/mach/versatile/debug_ll.h | 6 +++---
include/mach/vexpress/debug_ll.h | 6 +++---
include/mach/zynq/debug_ll.h | 6 +++---
include/mach/zynqmp/debug_ll.h | 6 +++---
26 files changed, 78 insertions(+), 78 deletions(-)
diff --git a/include/mach/at91/debug_ll.h b/include/mach/at91/debug_ll.h
index b09ba5f64a..06b05fa045 100644
--- a/include/mach/at91/debug_ll.h
+++ b/include/mach/at91/debug_ll.h
@@ -5,8 +5,8 @@
* Under GPLv2
*/
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_AT91_DEBUG_LL_H__
+#define __MACH_AT91_DEBUG_LL_H__
#include <asm/io.h>
#include <mach/at91/gpio.h>
@@ -40,4 +40,4 @@ static inline void PUTC_LL(char c)
at91_dbgu_putc(IOMEM(CONFIG_DEBUG_AT91_UART_BASE), c);
}
-#endif
+#endif /* __MACH_AT91_DEBUG_LL_H__ */
diff --git a/include/mach/at91/hardware.h b/include/mach/at91/hardware.h
index c34868cc9f..5d2fd872ab 100644
--- a/include/mach/at91/hardware.h
+++ b/include/mach/at91/hardware.h
@@ -4,8 +4,8 @@
/* [origin: Linux kernel include/asm-arm/arch-at91/hardware.h] */
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
+#ifndef __MACH_AT91_HARDWARE_H
+#define __MACH_AT91_HARDWARE_H
/* DBGU base */
/* rm9200, 9260/9g20, 9261/9g10, 9rl */
@@ -45,4 +45,4 @@
/* Clocks */
#define AT91_SLOW_CLOCK 32768 /* slow clock */
-#endif
+#endif /* __MACH_AT91_HARDWARE_H */
diff --git a/include/mach/at91/xload.h b/include/mach/at91/xload.h
index 6b9492193b..2886490246 100644
--- a/include/mach/at91/xload.h
+++ b/include/mach/at91/xload.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_XLOAD_H
-#define __MACH_XLOAD_H
+#ifndef __MACH_AT91_XLOAD_H
+#define __MACH_AT91_XLOAD_H
#include <linux/compiler.h>
#include <pbl/bio.h>
@@ -19,4 +19,4 @@ void __noreturn sam9263_atmci_start_image(u32 mmc_id, unsigned int clock,
bool slot_b);
-#endif /* __MACH_XLOAD_H */
+#endif /* __MACH_AT91_XLOAD_H */
diff --git a/include/mach/clps711x/debug_ll.h b/include/mach/clps711x/debug_ll.h
index 1af7cb4f65..9b7d21d165 100644
--- a/include/mach/clps711x/debug_ll.h
+++ b/include/mach/clps711x/debug_ll.h
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-FileCopyrightText: Alexander Shiyan <shc_work@mail.ru>
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_CLPS711X_DEBUG_LL_H__
+#define __MACH_CLPS711X_DEBUG_LL_H__
#include <asm/io.h>
#include <mach/clps711x/clps711x.h>
@@ -18,4 +18,4 @@ static inline void PUTC_LL(char c)
} while (readl(SYSFLG1) & SYSFLG_UBUSY);
}
-#endif
+#endif /* __MACH_CLPS711X_DEBUG_LL_H__ */
diff --git a/include/mach/davinci/debug_ll.h b/include/mach/davinci/debug_ll.h
index 5867da8544..1539bf8ee4 100644
--- a/include/mach/davinci/debug_ll.h
+++ b/include/mach/davinci/debug_ll.h
@@ -4,8 +4,8 @@
/** @file
* This File contains declaration for early output support
*/
-#ifndef __INCLUDE_ARCH_DEBUG_LL_H__
-#define __INCLUDE_ARCH_DEBUG_LL_H__
+#ifndef __MACH_DAVINCI_DEBUG_LL_H__
+#define __MACH_DAVINCI_DEBUG_LL_H__
#include <asm/io.h>
#include <mach/davinci/serial.h>
@@ -25,4 +25,4 @@ static inline void PUTC_LL(char ch)
__raw_writeb(ch, DEBUG_LL_UART_ADDR + rbr);
}
-#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */
+#endif /* __MACH_DAVINCI_DEBUG_LL_H__ */
diff --git a/include/mach/davinci/hardware.h b/include/mach/davinci/hardware.h
index 8ab824800e..a0a1918444 100644
--- a/include/mach/davinci/hardware.h
+++ b/include/mach/davinci/hardware.h
@@ -6,8 +6,8 @@
*
* Author: Kevin Hilman, Deep Root Systems, LLC
*/
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
+#ifndef __MACH_DAVINCI_HARDWARE_H
+#define __MACH_DAVINCI_HARDWARE_H
#include <asm/memory.h>
@@ -24,4 +24,4 @@
*/
#define IO_PHYS UL(0x01c00000)
-#endif /* __ASM_ARCH_HARDWARE_H */
+#endif /* __MACH_DAVINCI_HARDWARE_H */
diff --git a/include/mach/digic/debug_ll.h b/include/mach/digic/debug_ll.h
index 1af1a27e91..f4d99f68c1 100644
--- a/include/mach/digic/debug_ll.h
+++ b/include/mach/digic/debug_ll.h
@@ -14,8 +14,8 @@
*
*/
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_DIGIC_DEBUG_LL_H__
+#define __MACH_DIGIC_DEBUG_LL_H__
#include <io.h>
#include <mach/digic/digic4.h>
@@ -36,4 +36,4 @@ static inline void PUTC_LL(char ch)
writel(ch, DEBUG_LL_UART_TX);
}
-#endif /* __MACH_DEBUG_LL_H__ */
+#endif /* __MACH_DIGIC_DEBUG_LL_H__ */
diff --git a/include/mach/imx/bbu.h b/include/mach/imx/bbu.h
index 207d46e5d1..c9b239c698 100644
--- a/include/mach/imx/bbu.h
+++ b/include/mach/imx/bbu.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_BBU_H
-#define __MACH_BBU_H
+#ifndef __MACH_IMX_BBU_H
+#define __MACH_IMX_BBU_H
#include <bbu.h>
#include <errno.h>
@@ -209,4 +209,4 @@ static inline int imx_bbu_external_nand_register_handler(const char *name, const
}
#endif
-#endif
+#endif /* __MACH_IMX_BBU_H */
diff --git a/include/mach/imx/debug_ll.h b/include/mach/imx/debug_ll.h
index 1b554b2d22..33e3e3afe3 100644
--- a/include/mach/imx/debug_ll.h
+++ b/include/mach/imx/debug_ll.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_IMX_DEBUG_LL_H__
+#define __MACH_IMX_DEBUG_LL_H__
#include <io.h>
#include <config.h>
@@ -164,4 +164,4 @@ static inline void vf610_ungate_all_peripherals(void)
writel(0xffffffff, ccmbase + i);
}
-#endif /* __MACH_DEBUG_LL_H__ */
+#endif /* __MACH_IMX_DEBUG_LL_H__ */
diff --git a/include/mach/imx/xload.h b/include/mach/imx/xload.h
index aa2fa5129a..86270b03dc 100644
--- a/include/mach/imx/xload.h
+++ b/include/mach/imx/xload.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_XLOAD_H
-#define __MACH_XLOAD_H
+#ifndef __MACH_IMX_XLOAD_H
+#define __MACH_IMX_XLOAD_H
#include <linux/compiler.h>
#include <linux/types.h>
@@ -42,4 +42,4 @@ struct imx_scratch_space *__imx8m_scratch_space(int ddr_buswidth);
#define imx8mn_scratch_space() __imx8m_scratch_space(16)
#define imx8mp_scratch_space() __imx8m_scratch_space(32)
-#endif /* __MACH_XLOAD_H */
+#endif /* __MACH_IMX_XLOAD_H */
diff --git a/include/mach/layerscape/debug_ll.h b/include/mach/layerscape/debug_ll.h
index b6630af143..e731de29b6 100644
--- a/include/mach/layerscape/debug_ll.h
+++ b/include/mach/layerscape/debug_ll.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __INCLUDE_ARCH_DEBUG_LL_H__
-#define __INCLUDE_ARCH_DEBUG_LL_H__
+#ifndef __MACH_LAYERSCAPE_DEBUG_LL_H__
+#define __MACH_LAYERSCAPE_DEBUG_LL_H__
#include <io.h>
#include <soc/fsl/immap_lsch2.h>
@@ -33,4 +33,4 @@ static inline void debug_ll_init(void)
debug_ll_ns16550_init(divisor);
}
-#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */
+#endif /* __MACH_LAYERSCAPE_DEBUG_LL_H__ */
diff --git a/include/mach/layerscape/xload.h b/include/mach/layerscape/xload.h
index 0731681b43..2d4d744d89 100644
--- a/include/mach/layerscape/xload.h
+++ b/include/mach/layerscape/xload.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_XLOAD_H
-#define __MACH_XLOAD_H
+#ifndef __MACH_LAYERSCAPE_XLOAD_H
+#define __MACH_LAYERSCAPE_XLOAD_H
int ls1046a_esdhc_start_image(unsigned long r0, unsigned long r1, unsigned long r2);
int ls1046a_qspi_start_image(unsigned long r0, unsigned long r1,
@@ -9,4 +9,4 @@ int ls1046a_qspi_start_image(unsigned long r0, unsigned long r1,
int ls1046a_xload_start_image(unsigned long r0, unsigned long r1,
unsigned long r2);
-#endif /* __MACH_XLOAD_H */
+#endif /* __MACH_LAYERSCAPE_XLOAD_H */
diff --git a/include/mach/mvebu/debug_ll.h b/include/mach/mvebu/debug_ll.h
index d213771573..9197cd68eb 100644
--- a/include/mach/mvebu/debug_ll.h
+++ b/include/mach/mvebu/debug_ll.h
@@ -1,8 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* SPDX-FileCopyrightText: 2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_MVEBU_DEBUG_LL_H__
+#define __MACH_MVEBU_DEBUG_LL_H__
#include <io.h>
@@ -27,4 +27,4 @@ static inline void PUTC_LL(char c)
while (!(readl(EARLY_UART + UART_LSR) & LSR_THRE))
;
}
-#endif
+#endif /* __MACH_MVEBU_DEBUG_LL_H__ */
diff --git a/include/mach/mxs/debug_ll.h b/include/mach/mxs/debug_ll.h
index 49c8503765..41658ba0c5 100644
--- a/include/mach/mxs/debug_ll.h
+++ b/include/mach/mxs/debug_ll.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_MXS_DEBUG_LL_H__
+#define __MACH_MXS_DEBUG_LL_H__
#include <io.h>
#include <mach/mxs/imx-regs.h>
@@ -21,4 +21,4 @@ static inline void PUTC_LL(int c)
writel(c, base + UARTDBGDR);
}
-#endif /* __MACH_DEBUG_LL_H__ */
+#endif /* __MACH_MXS_DEBUG_LL_H__ */
diff --git a/include/mach/nomadik/hardware.h b/include/mach/nomadik/hardware.h
index c050b2f421..00b42cd1ff 100644
--- a/include/mach/nomadik/hardware.h
+++ b/include/mach/nomadik/hardware.h
@@ -11,8 +11,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
+#ifndef __MACH_NOMADIK_HARDWARE_H
+#define __MACH_NOMADIK_HARDWARE_H
/* Nomadik registers live from 0x1000.0000 to 0x1023.0000 -- currently */
#define NOMADIK_IO_VIRTUAL 0xF0000000 /* VA of IO */
@@ -84,4 +84,4 @@
#define NOMADIK_MTU0_VA IO_ADDRESS(NOMADIK_MTU0_BASE)
#define NOMADIK_MTU1_VA IO_ADDRESS(NOMADIK_MTU1_BASE)
-#endif /* __ASM_ARCH_HARDWARE_H */
+#endif /* __MACH_NOMADIK_HARDWARE_H */
diff --git a/include/mach/omap/bbu.h b/include/mach/omap/bbu.h
index 5ca7ec43cc..122dadb892 100644
--- a/include/mach/omap/bbu.h
+++ b/include/mach/omap/bbu.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_BBU_H
-#define __MACH_BBU_H
+#ifndef __MACH_OMAP_BBU_H
+#define __MACH_OMAP_BBU_H
#include <bbu.h>
@@ -65,4 +65,4 @@ static inline int am33xx_bbu_emmc_register_handler(const char *name,
#endif
-#endif
+#endif /* __MACH_OMAP_BBU_H */
diff --git a/include/mach/omap/debug_ll.h b/include/mach/omap/debug_ll.h
index b0a3b0abde..2e723dcb82 100644
--- a/include/mach/omap/debug_ll.h
+++ b/include/mach/omap/debug_ll.h
@@ -14,8 +14,8 @@
* GNU General Public License for more details.
*/
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_OMAP_DEBUG_LL_H__
+#define __MACH_OMAP_DEBUG_LL_H__
#include <io.h>
#include <mach/omap/omap3-silicon.h>
@@ -77,4 +77,4 @@ static inline void PUTC_LL(char c)
}
#endif
-#endif
+#endif /* __MACH_OMAP_DEBUG_LL_H__ */
diff --git a/include/mach/rockchip/debug_ll.h b/include/mach/rockchip/debug_ll.h
index c7a5b2f7d9..c859c3f199 100644
--- a/include/mach/rockchip/debug_ll.h
+++ b/include/mach/rockchip/debug_ll.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_ROCKCHIP_DEBUG_LL_H__
+#define __MACH_ROCKCHIP_DEBUG_LL_H__
#include <common.h>
#include <io.h>
@@ -96,4 +96,4 @@ static inline void INIT_LL(void)
}
#endif
-#endif
+#endif /* __MACH_ROCKCHIP_DEBUG_LL_H__ */
diff --git a/include/mach/socfpga/debug_ll.h b/include/mach/socfpga/debug_ll.h
index 44f56640e8..25b3581634 100644
--- a/include/mach/socfpga/debug_ll.h
+++ b/include/mach/socfpga/debug_ll.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_SOCFPGA_DEBUG_LL_H__
+#define __MACH_SOCFPGA_DEBUG_LL_H__
#include <io.h>
#include <errno.h>
@@ -83,4 +83,4 @@ static inline unsigned int ns16550_calc_divisor(unsigned int clk,
static inline void INIT_LL(void) {}
static inline void PUTC_LL(char c) {}
#endif
-#endif
+#endif /* __MACH_SOCFPGA_DEBUG_LL_H__ */
diff --git a/include/mach/tegra/debug_ll.h b/include/mach/tegra/debug_ll.h
index ff0439e5f3..f8d0d13e2c 100644
--- a/include/mach/tegra/debug_ll.h
+++ b/include/mach/tegra/debug_ll.h
@@ -17,8 +17,8 @@
/** @file
* This File contains declaration for early output support
*/
-#ifndef __INCLUDE_ARCH_DEBUG_LL_H__
-#define __INCLUDE_ARCH_DEBUG_LL_H__
+#ifndef __MACH_TEGRA_DEBUG_LL_H__
+#define __MACH_TEGRA_DEBUG_LL_H__
#include <asm/io.h>
#include <mach/tegra/iomap.h>
@@ -38,4 +38,4 @@ static inline void PUTC_LL(char ch)
__raw_writeb(ch, DEBUG_LL_UART_ADDR + rbr);
}
-#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */
+#endif /* __MACH_TEGRA_DEBUG_LL_H__ */
diff --git a/include/mach/uemd/debug_ll.h b/include/mach/uemd/debug_ll.h
index df24e1d938..c6ae3fe294 100644
--- a/include/mach/uemd/debug_ll.h
+++ b/include/mach/uemd/debug_ll.h
@@ -17,8 +17,8 @@
/** @file
* This File contains declaration for early output support
*/
-#ifndef __INCLUDE_ARCH_DEBUG_LL_H__
-#define __INCLUDE_ARCH_DEBUG_LL_H__
+#ifndef __MACH_UEMD_DEBUG_LL_H__
+#define __MACH_UEMD_DEBUG_LL_H__
#include <asm/io.h>
#include <mach/uemd/hardware.h>
@@ -38,4 +38,4 @@ static inline void PUTC_LL(char ch)
__raw_writeb(ch, DEBUG_LL_UART_ADDR + rbr);
}
-#endif /* __INCLUDE_ARCH_DEBUG_LL_H__ */
+#endif /* __MACH_UEMD_DEBUG_LL_H__ */
diff --git a/include/mach/uemd/hardware.h b/include/mach/uemd/hardware.h
index 5c75b35dde..5cdf4403ad 100644
--- a/include/mach/uemd/hardware.h
+++ b/include/mach/uemd/hardware.h
@@ -1,9 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
+#ifndef __MACH_UEMD_HARDWARE_H
+#define __MACH_UEMD_HARDWARE_H
#define UEMD_EHCI_BASE 0x10040000
#define UEMD_UART0_BASE 0x2002b000
-#endif /* __ASM_ARCH_HARDWARE_H */
+#endif /* __MACH_UEMD_HARDWARE_H */
diff --git a/include/mach/versatile/debug_ll.h b/include/mach/versatile/debug_ll.h
index 073402c51a..0c46e2a6bb 100644
--- a/include/mach/versatile/debug_ll.h
+++ b/include/mach/versatile/debug_ll.h
@@ -13,11 +13,11 @@
* GNU General Public License for more details.
*/
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_VERSATILE_DEBUG_LL_H__
+#define __MACH_VERSATILE_DEBUG_LL_H__
#define DEBUG_LL_UART_ADDR 0x101F1000
#include <debug_ll/pl011.h>
-#endif
+#endif /* __MACH_VERSATILE_DEBUG_LL_H__ */
diff --git a/include/mach/vexpress/debug_ll.h b/include/mach/vexpress/debug_ll.h
index d59f68ea19..cd01d5d018 100644
--- a/include/mach/vexpress/debug_ll.h
+++ b/include/mach/vexpress/debug_ll.h
@@ -4,8 +4,8 @@
* GPLv2 only
*/
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_VEXPRESS_DEBUG_LL_H__
+#define __MACH_VEXPRESS_DEBUG_LL_H__
#include <linux/amba/serial.h>
#include <io.h>
@@ -21,4 +21,4 @@
#include <debug_ll/pl011.h>
-#endif
+#endif /* __MACH_VEXPRESS_DEBUG_LL_H__ */
diff --git a/include/mach/zynq/debug_ll.h b/include/mach/zynq/debug_ll.h
index e360fee15e..3105211c1b 100644
--- a/include/mach/zynq/debug_ll.h
+++ b/include/mach/zynq/debug_ll.h
@@ -4,8 +4,8 @@
* based on mach-imx/include/mach/debug_ll.h
*/
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_ZYNQ_DEBUG_LL_H__
+#define __MACH_ZYNQ_DEBUG_LL_H__
#include <io.h>
#include <mach/zynq/zynq7000-regs.h>
@@ -36,4 +36,4 @@ static inline void PUTC_LL(int c)
writel(c, base + ZYNQ_UART_RXTXFIFO);
}
-#endif
+#endif /* __MACH_ZYNQ_DEBUG_LL_H__ */
diff --git a/include/mach/zynqmp/debug_ll.h b/include/mach/zynqmp/debug_ll.h
index 67571fe2e1..7642e37a4e 100644
--- a/include/mach/zynqmp/debug_ll.h
+++ b/include/mach/zynqmp/debug_ll.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
+#ifndef __MACH_ZYNQMP_DEBUG_LL_H__
+#define __MACH_ZYNQMP_DEBUG_LL_H__
#include <io.h>
@@ -28,4 +28,4 @@ static inline void PUTC_LL(int c)
writel(c, base + 0x30);
}
-#endif
+#endif /* __MACH_ZYNQMP_DEBUG_LL_H__ */
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 25/50] ARM: i.MX: Only provide PUTC_LL() when activated
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (23 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 24/50] include/mach/: use unique double inclusion protectors Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 26/50] debug_ll ns16550: Do not define PUTC_LL() Sascha Hauer
` (24 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the i.MX specific debug_ll.h only
provides PUTC_LL() when specified.
The i.MX specific debug_ll.h also provides other functions needed
by board code regardless if the i.MX debug_ll port is enabled or
not, so include it explicitly where needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/ac-sxb/lowlevel.c | 1 +
arch/arm/boards/advantech-mx6/lowlevel.c | 1 +
arch/arm/boards/ccxmx51/lowlevel.c | 1 +
arch/arm/boards/cm-fx6/lowlevel.c | 1 +
arch/arm/boards/element14-warp7/lowlevel.c | 1 +
arch/arm/boards/eltec-hipercam/lowlevel.c | 1 +
arch/arm/boards/embest-marsboard/lowlevel.c | 1 +
arch/arm/boards/embest-riotboard/lowlevel.c | 1 +
arch/arm/boards/freescale-mx51-babbage/lowlevel.c | 1 +
arch/arm/boards/freescale-mx6-sabresd/lowlevel.c | 1 +
.../boards/freescale-mx6sx-sabresdb/lowlevel.c | 1 +
arch/arm/boards/freescale-mx7-sabresd/lowlevel.c | 1 +
arch/arm/boards/freescale-vf610-twr/lowlevel.c | 1 +
arch/arm/boards/grinn-liteboard/lowlevel.c | 1 +
arch/arm/boards/guf-santaro/lowlevel.c | 1 +
arch/arm/boards/guf-vincell/lowlevel.c | 1 +
arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c | 1 +
.../boards/kamstrup-mx7-concentrator/lowlevel.c | 1 +
arch/arm/boards/karo-tx53/lowlevel.c | 1 +
arch/arm/boards/karo-tx6x/lowlevel.c | 1 +
arch/arm/boards/kontron-samx6i/lowlevel.c | 1 +
arch/arm/boards/mnt-reform/lowlevel.c | 1 +
arch/arm/boards/novena/lowlevel.c | 1 +
arch/arm/boards/nxp-imx6ull-evk/lowlevel.c | 1 +
arch/arm/boards/nxp-imx8mm-evk/lowlevel.c | 1 +
arch/arm/boards/nxp-imx8mn-evk/lowlevel.c | 1 +
arch/arm/boards/nxp-imx8mp-evk/lowlevel.c | 1 +
arch/arm/boards/nxp-imx8mq-evk/lowlevel.c | 1 +
arch/arm/boards/phytec-som-imx6/lowlevel.c | 1 +
arch/arm/boards/phytec-som-imx8mq/lowlevel.c | 1 +
arch/arm/boards/polyhex-debix/lowlevel.c | 1 +
arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c | 1 +
arch/arm/boards/skov-imx6/lowlevel.c | 1 +
arch/arm/boards/technexion-pico-hobbit/lowlevel.c | 1 +
arch/arm/boards/technexion-wandboard/lowlevel.c | 1 +
arch/arm/boards/tqma6ulx/lowlevel.c | 1 +
arch/arm/boards/tqma6x/lowlevel.c | 1 +
arch/arm/boards/tqma8mpxl/lowlevel.c | 1 +
arch/arm/boards/udoo-neo/lowlevel.c | 1 +
.../variscite-dt8mcustomboard-imx8mp/lowlevel.c | 1 +
arch/arm/boards/variscite-mx6/lowlevel.c | 1 +
arch/arm/boards/webasto-ccbv2/lowlevel.c | 1 +
arch/arm/boards/zii-imx51-rdu1/lowlevel.c | 1 +
arch/arm/boards/zii-imx6q-rdu2/lowlevel.c | 1 +
arch/arm/boards/zii-imx8mq-dev/lowlevel.c | 1 +
arch/arm/boards/zii-vf610-dev/lowlevel.c | 1 +
arch/arm/include/asm/debug_ll.h | 6 ++++--
common/Kconfig | 15 +++++++++++++++
include/mach/imx/debug_ll.h | 2 +-
49 files changed, 66 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boards/ac-sxb/lowlevel.c b/arch/arm/boards/ac-sxb/lowlevel.c
index b7d24399b4..713d8ce5f8 100644
--- a/arch/arm/boards/ac-sxb/lowlevel.c
+++ b/arch/arm/boards/ac-sxb/lowlevel.c
@@ -5,6 +5,7 @@
*/
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
diff --git a/arch/arm/boards/advantech-mx6/lowlevel.c b/arch/arm/boards/advantech-mx6/lowlevel.c
index ea77af8a31..edd5971c35 100644
--- a/arch/arm/boards/advantech-mx6/lowlevel.c
+++ b/arch/arm/boards/advantech-mx6/lowlevel.c
@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: 2018 Christoph Fritz <chf.fritz@googlemail.com>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/ccxmx51/lowlevel.c b/arch/arm/boards/ccxmx51/lowlevel.c
index 1fa55346eb..b0881f9c5b 100644
--- a/arch/arm/boards/ccxmx51/lowlevel.c
+++ b/arch/arm/boards/ccxmx51/lowlevel.c
@@ -3,6 +3,7 @@
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <mach/imx/clock-imx51_53.h>
#include <mach/imx/esdctl.h>
#include <mach/imx/generic.h>
diff --git a/arch/arm/boards/cm-fx6/lowlevel.c b/arch/arm/boards/cm-fx6/lowlevel.c
index 137ae3e107..90e5045e1e 100644
--- a/arch/arm/boards/cm-fx6/lowlevel.c
+++ b/arch/arm/boards/cm-fx6/lowlevel.c
@@ -8,6 +8,7 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <io.h>
#include <mach/imx/imx6-mmdc.h>
#include <mach/imx/imx6-ddr-regs.h>
diff --git a/arch/arm/boards/element14-warp7/lowlevel.c b/arch/arm/boards/element14-warp7/lowlevel.c
index 5581b958c7..c6ddfea5a4 100644
--- a/arch/arm/boards/element14-warp7/lowlevel.c
+++ b/arch/arm/boards/element14-warp7/lowlevel.c
@@ -9,6 +9,7 @@
#include <asm/barebox-arm.h>
#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
+#include <mach/imx/debug_ll.h>
extern char __dtb_imx7s_warp_start[];
diff --git a/arch/arm/boards/eltec-hipercam/lowlevel.c b/arch/arm/boards/eltec-hipercam/lowlevel.c
index 8e1eb1c4d3..154c0e58f5 100644
--- a/arch/arm/boards/eltec-hipercam/lowlevel.c
+++ b/arch/arm/boards/eltec-hipercam/lowlevel.c
@@ -5,6 +5,7 @@
#include <linux/sizes.h>
#include <io.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/sections.h>
#include <asm/mmu.h>
#include <asm/barebox-arm-head.h>
diff --git a/arch/arm/boards/embest-marsboard/lowlevel.c b/arch/arm/boards/embest-marsboard/lowlevel.c
index d1af90ba44..84378c00f2 100644
--- a/arch/arm/boards/embest-marsboard/lowlevel.c
+++ b/arch/arm/boards/embest-marsboard/lowlevel.c
@@ -10,6 +10,7 @@
#include <mach/imx/esdctl.h>
#include <mach/imx/iomux-mx6.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/boards/embest-riotboard/lowlevel.c b/arch/arm/boards/embest-riotboard/lowlevel.c
index b8a7983aa8..9ea92f5091 100644
--- a/arch/arm/boards/embest-riotboard/lowlevel.c
+++ b/arch/arm/boards/embest-riotboard/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <io.h>
diff --git a/arch/arm/boards/freescale-mx51-babbage/lowlevel.c b/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
index 5d41f34fd8..7d219bad78 100644
--- a/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
+++ b/arch/arm/boards/freescale-mx51-babbage/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <mach/imx/clock-imx51_53.h>
#include <mach/imx/iomux-mx51.h>
#include <common.h>
diff --git a/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c b/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
index a6e5e92896..5490dc2d44 100644
--- a/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <mach/imx/generic.h>
diff --git a/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c b/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c
index 3d4e6917af..721743dadb 100644
--- a/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6sx-sabresdb/lowlevel.c
@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: 2014 Sascha Hauer, Pengutronix
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <mach/imx/generic.h>
diff --git a/arch/arm/boards/freescale-mx7-sabresd/lowlevel.c b/arch/arm/boards/freescale-mx7-sabresd/lowlevel.c
index ebaea9daf3..5a7508143e 100644
--- a/arch/arm/boards/freescale-mx7-sabresd/lowlevel.c
+++ b/arch/arm/boards/freescale-mx7-sabresd/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
diff --git a/arch/arm/boards/freescale-vf610-twr/lowlevel.c b/arch/arm/boards/freescale-vf610-twr/lowlevel.c
index b2968b8d95..c7714f29a2 100644
--- a/arch/arm/boards/freescale-vf610-twr/lowlevel.c
+++ b/arch/arm/boards/freescale-vf610-twr/lowlevel.c
@@ -10,6 +10,7 @@
#include <mach/imx/clock-vf610.h>
#include <mach/imx/iomux-vf610.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/boards/grinn-liteboard/lowlevel.c b/arch/arm/boards/grinn-liteboard/lowlevel.c
index 0fa7ae93f8..6851a678bc 100644
--- a/arch/arm/boards/grinn-liteboard/lowlevel.c
+++ b/arch/arm/boards/grinn-liteboard/lowlevel.c
@@ -4,6 +4,7 @@
/* Author: Marcin Niestroj <m.niestroj@grinn-global.com> */
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <io.h>
diff --git a/arch/arm/boards/guf-santaro/lowlevel.c b/arch/arm/boards/guf-santaro/lowlevel.c
index 8badce5da9..72401eb32c 100644
--- a/arch/arm/boards/guf-santaro/lowlevel.c
+++ b/arch/arm/boards/guf-santaro/lowlevel.c
@@ -9,6 +9,7 @@
#include <mach/imx/generic.h>
#include <mach/imx/imx6-regs.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <console.h>
#include <mach/imx/esdctl.h>
diff --git a/arch/arm/boards/guf-vincell/lowlevel.c b/arch/arm/boards/guf-vincell/lowlevel.c
index 2479d17799..e691aeca3e 100644
--- a/arch/arm/boards/guf-vincell/lowlevel.c
+++ b/arch/arm/boards/guf-vincell/lowlevel.c
@@ -2,6 +2,7 @@
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <io.h>
#include <init.h>
#include <mach/imx/imx53-regs.h>
diff --git a/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c b/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c
index b180de5715..31b64ddb0e 100644
--- a/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c
+++ b/arch/arm/boards/innocomm-imx8mm-wb15/lowlevel.c
@@ -2,6 +2,7 @@
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/barebox-arm.h>
#include <pbl/i2c.h>
#include <pbl/pmic.h>
diff --git a/arch/arm/boards/kamstrup-mx7-concentrator/lowlevel.c b/arch/arm/boards/kamstrup-mx7-concentrator/lowlevel.c
index 89b8c89864..e1ba327251 100644
--- a/arch/arm/boards/kamstrup-mx7-concentrator/lowlevel.c
+++ b/arch/arm/boards/kamstrup-mx7-concentrator/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <io.h>
#include <common.h>
#include <linux/sizes.h>
diff --git a/arch/arm/boards/karo-tx53/lowlevel.c b/arch/arm/boards/karo-tx53/lowlevel.c
index b51846b543..914ef69de9 100644
--- a/arch/arm/boards/karo-tx53/lowlevel.c
+++ b/arch/arm/boards/karo-tx53/lowlevel.c
@@ -2,6 +2,7 @@
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/imx/imx5.h>
diff --git a/arch/arm/boards/karo-tx6x/lowlevel.c b/arch/arm/boards/karo-tx6x/lowlevel.c
index 84ba40b86b..082307626b 100644
--- a/arch/arm/boards/karo-tx6x/lowlevel.c
+++ b/arch/arm/boards/karo-tx6x/lowlevel.c
@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: 2014 Steffen Trumtrar, Pengutronix
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/kontron-samx6i/lowlevel.c b/arch/arm/boards/kontron-samx6i/lowlevel.c
index beab190334..59694e72f9 100644
--- a/arch/arm/boards/kontron-samx6i/lowlevel.c
+++ b/arch/arm/boards/kontron-samx6i/lowlevel.c
@@ -10,6 +10,7 @@
*/
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <io.h>
#include <asm/barebox-arm-head.h>
diff --git a/arch/arm/boards/mnt-reform/lowlevel.c b/arch/arm/boards/mnt-reform/lowlevel.c
index c76037c36d..074beba099 100644
--- a/arch/arm/boards/mnt-reform/lowlevel.c
+++ b/arch/arm/boards/mnt-reform/lowlevel.c
@@ -6,6 +6,7 @@
#include <asm/barebox-arm.h>
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <firmware.h>
#include <pbl/i2c.h>
#include <pbl/pmic.h>
diff --git a/arch/arm/boards/novena/lowlevel.c b/arch/arm/boards/novena/lowlevel.c
index 5b358ef0a3..70aa92d5b4 100644
--- a/arch/arm/boards/novena/lowlevel.c
+++ b/arch/arm/boards/novena/lowlevel.c
@@ -6,6 +6,7 @@
#include <ddr_dimms.h>
#include <ddr_spd.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <mach/imx/esdctl.h>
#include <mach/imx/generic.h>
#include <mach/imx/imx6.h>
diff --git a/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c
index ff72763f54..0a12eb9b68 100644
--- a/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx6ull-evk/lowlevel.c
@@ -8,6 +8,7 @@
#include <mach/imx/imx6-regs.h>
#include <io.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <mach/imx/esdctl.h>
#include <asm/cache.h>
#include <asm/sections.h>
diff --git a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
index 038dd9d659..9983f78bab 100644
--- a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
@@ -3,6 +3,7 @@
#include <io.h>
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/mmu.h>
#include <asm/cache.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
index a1fb577224..8e7383c9d2 100644
--- a/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mn-evk/lowlevel.c
@@ -3,6 +3,7 @@
#include <io.h>
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <firmware.h>
#include <asm/mmu.h>
#include <asm/cache.h>
diff --git a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
index 9d17e6d1ab..a60730bcb2 100644
--- a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
@@ -3,6 +3,7 @@
#include <io.h>
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <firmware.h>
#include <image-metadata.h>
#include <asm/mmu.h>
diff --git a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
index 61aaab0287..ecd91d7165 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mq-evk/lowlevel.c
@@ -13,6 +13,7 @@
#include <mach/imx/xload.h>
#include <io.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <asm/mmu.h>
diff --git a/arch/arm/boards/phytec-som-imx6/lowlevel.c b/arch/arm/boards/phytec-som-imx6/lowlevel.c
index a783bcb477..bbd77dd734 100644
--- a/arch/arm/boards/phytec-som-imx6/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx6/lowlevel.c
@@ -6,6 +6,7 @@
* Author: Stefan Christ <s.christ@phytec.de>
*/
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <io.h>
diff --git a/arch/arm/boards/phytec-som-imx8mq/lowlevel.c b/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
index 559afa4e15..ba5f987d22 100644
--- a/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx8mq/lowlevel.c
@@ -15,6 +15,7 @@
#include <mach/imx/xload.h>
#include <io.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <asm/mmu.h>
diff --git a/arch/arm/boards/polyhex-debix/lowlevel.c b/arch/arm/boards/polyhex-debix/lowlevel.c
index bef0bace98..1c8be39559 100644
--- a/arch/arm/boards/polyhex-debix/lowlevel.c
+++ b/arch/arm/boards/polyhex-debix/lowlevel.c
@@ -4,6 +4,7 @@
#include <asm/barebox-arm-head.h>
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <mach/imx/atf.h>
#include <mach/imx/esdctl.h>
#include <mach/imx/generic.h>
diff --git a/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c b/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c
index 40fab934aa..603f8add07 100644
--- a/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c
+++ b/arch/arm/boards/protonic-imx8m/lowlevel-prt8mm.c
@@ -4,6 +4,7 @@
#include <common.h>
#include <image-metadata.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <firmware.h>
#include <mach/imx/atf.h>
#include <mach/imx/esdctl.h>
diff --git a/arch/arm/boards/skov-imx6/lowlevel.c b/arch/arm/boards/skov-imx6/lowlevel.c
index c12a7123f0..434be0384f 100644
--- a/arch/arm/boards/skov-imx6/lowlevel.c
+++ b/arch/arm/boards/skov-imx6/lowlevel.c
@@ -7,6 +7,7 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <io.h>
#include <mach/imx/imx6-mmdc.h>
#include <mach/imx/imx6-ddr-regs.h>
diff --git a/arch/arm/boards/technexion-pico-hobbit/lowlevel.c b/arch/arm/boards/technexion-pico-hobbit/lowlevel.c
index 2e81862993..7cc7c12d84 100644
--- a/arch/arm/boards/technexion-pico-hobbit/lowlevel.c
+++ b/arch/arm/boards/technexion-pico-hobbit/lowlevel.c
@@ -8,6 +8,7 @@
#include <mach/imx/imx6-regs.h>
#include <io.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <mach/imx/esdctl.h>
#include <asm/cache.h>
#include <asm/sections.h>
diff --git a/arch/arm/boards/technexion-wandboard/lowlevel.c b/arch/arm/boards/technexion-wandboard/lowlevel.c
index 448e81a61c..d29e2c9b24 100644
--- a/arch/arm/boards/technexion-wandboard/lowlevel.c
+++ b/arch/arm/boards/technexion-wandboard/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <mach/imx/generic.h>
diff --git a/arch/arm/boards/tqma6ulx/lowlevel.c b/arch/arm/boards/tqma6ulx/lowlevel.c
index 104a998566..29978821b8 100644
--- a/arch/arm/boards/tqma6ulx/lowlevel.c
+++ b/arch/arm/boards/tqma6ulx/lowlevel.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <firmware.h>
#include <mach/imx/generic.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/tqma6x/lowlevel.c b/arch/arm/boards/tqma6x/lowlevel.c
index 8af644d2a1..9283e3f009 100644
--- a/arch/arm/boards/tqma6x/lowlevel.c
+++ b/arch/arm/boards/tqma6x/lowlevel.c
@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: 2013 Sascha Hauer <s.hauer@pengutronix.de>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <io.h>
diff --git a/arch/arm/boards/tqma8mpxl/lowlevel.c b/arch/arm/boards/tqma8mpxl/lowlevel.c
index 9a17cd2514..793bcba3ca 100644
--- a/arch/arm/boards/tqma8mpxl/lowlevel.c
+++ b/arch/arm/boards/tqma8mpxl/lowlevel.c
@@ -16,6 +16,7 @@
#include <mach/imx/imx8mp-regs.h>
#include <mach/imx/iomux-mx8mp.h>
#include <mach/imx/imx8m-ccm-regs.h>
+#include <mach/imx/debug_ll.h>
#include <mfd/pca9450.h>
#include <pbl/i2c.h>
#include <pbl/pmic.h>
diff --git a/arch/arm/boards/udoo-neo/lowlevel.c b/arch/arm/boards/udoo-neo/lowlevel.c
index 269fda04dc..e8712b0c72 100644
--- a/arch/arm/boards/udoo-neo/lowlevel.c
+++ b/arch/arm/boards/udoo-neo/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <mach/imx/generic.h>
diff --git a/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c b/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c
index e8c3dd0c49..cf040069b4 100644
--- a/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c
+++ b/arch/arm/boards/variscite-dt8mcustomboard-imx8mp/lowlevel.c
@@ -3,6 +3,7 @@
#include <io.h>
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <firmware.h>
#include <image-metadata.h>
#include <asm/mmu.h>
diff --git a/arch/arm/boards/variscite-mx6/lowlevel.c b/arch/arm/boards/variscite-mx6/lowlevel.c
index d2dabd091b..d0842b1579 100644
--- a/arch/arm/boards/variscite-mx6/lowlevel.c
+++ b/arch/arm/boards/variscite-mx6/lowlevel.c
@@ -6,6 +6,7 @@
*/
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <linux/sizes.h>
#include <io.h>
diff --git a/arch/arm/boards/webasto-ccbv2/lowlevel.c b/arch/arm/boards/webasto-ccbv2/lowlevel.c
index 7e0bfe1ee0..7a198bd801 100644
--- a/arch/arm/boards/webasto-ccbv2/lowlevel.c
+++ b/arch/arm/boards/webasto-ccbv2/lowlevel.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <firmware.h>
#include <mach/imx/generic.h>
#include <asm/barebox-arm.h>
diff --git a/arch/arm/boards/zii-imx51-rdu1/lowlevel.c b/arch/arm/boards/zii-imx51-rdu1/lowlevel.c
index 38588d43f9..2418fe69ae 100644
--- a/arch/arm/boards/zii-imx51-rdu1/lowlevel.c
+++ b/arch/arm/boards/zii-imx51-rdu1/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <mach/imx/clock-imx51_53.h>
#include <mach/imx/iomux-mx51.h>
#include <common.h>
diff --git a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
index 3ab2da17f0..5c94b120d3 100644
--- a/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
+++ b/arch/arm/boards/zii-imx6q-rdu2/lowlevel.c
@@ -4,6 +4,7 @@
/* Author: Andrey Smirnov <andrew.smirnov@gmail.com> */
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <common.h>
#include <mach/imx/esdctl.h>
#include <mach/imx/generic.h>
diff --git a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
index 8e755955d5..1655a1e55b 100644
--- a/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
+++ b/arch/arm/boards/zii-imx8mq-dev/lowlevel.c
@@ -17,6 +17,7 @@
#include <mach/imx/xload.h>
#include <io.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
#include <asm/cache.h>
#include <asm/sections.h>
#include <asm/mmu.h>
diff --git a/arch/arm/boards/zii-vf610-dev/lowlevel.c b/arch/arm/boards/zii-vf610-dev/lowlevel.c
index 8fe779c9e5..e45e31f7d8 100644
--- a/arch/arm/boards/zii-vf610-dev/lowlevel.c
+++ b/arch/arm/boards/zii-vf610-dev/lowlevel.c
@@ -13,6 +13,7 @@
#include <mach/imx/clock-vf610.h>
#include <mach/imx/iomux-vf610.h>
#include <debug_ll.h>
+#include <mach/imx/debug_ll.h>
static inline void setup_uart(void)
{
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 1844b85c2e..52723d7204 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -3,11 +3,13 @@
#ifndef __ASM_DEBUG_LL_H__
#define __ASM_DEBUG_LL_H__
+#ifdef CONFIG_DEBUG_IMX_UART
+#include <mach/imx/debug_ll.h>
+#endif
+
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
-#elif defined CONFIG_ARCH_IMX
-#include <mach/imx/debug_ll.h>
#elif defined CONFIG_ARCH_ROCKCHIP
#include <mach/rockchip/debug_ll.h>
#elif defined CONFIG_ARCH_ZYNQMP
diff --git a/common/Kconfig b/common/Kconfig
index 96ab687af2..dce83cfafc 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1249,6 +1249,9 @@ config FRAME_POINTER
will be slightly larger and slower, but it can give precise
debugging information when print stack traces.
+config DEBUG_IMX_UART
+ bool
+
choice
prompt "Kernel low-level debugging port"
depends on DEBUG_LL
@@ -1256,6 +1259,7 @@ choice
config DEBUG_IMX1_UART
bool "i.MX1 Debug UART"
depends on ARCH_IMX1
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX1.
@@ -1263,6 +1267,7 @@ config DEBUG_IMX1_UART
config DEBUG_IMX21_UART
bool "i.MX21 Debug UART"
depends on ARCH_IMX21
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX21.
@@ -1270,6 +1275,7 @@ config DEBUG_IMX21_UART
config DEBUG_IMX25_UART
bool "i.MX25 Debug UART"
depends on ARCH_IMX25
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX25.
@@ -1277,6 +1283,7 @@ config DEBUG_IMX25_UART
config DEBUG_IMX27_UART
bool "i.MX27 Debug UART"
depends on ARCH_IMX27
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX27.
@@ -1284,6 +1291,7 @@ config DEBUG_IMX27_UART
config DEBUG_IMX31_UART
bool "i.MX31 Debug UART"
depends on ARCH_IMX31
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX31.
@@ -1291,6 +1299,7 @@ config DEBUG_IMX31_UART
config DEBUG_IMX35_UART
bool "i.MX35 Debug UART"
depends on ARCH_IMX35
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX35.
@@ -1298,6 +1307,7 @@ config DEBUG_IMX35_UART
config DEBUG_IMX50_UART
bool "i.MX50 Debug UART"
depends on ARCH_IMX50
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX50.
@@ -1305,6 +1315,7 @@ config DEBUG_IMX50_UART
config DEBUG_IMX51_UART
bool "i.MX51 Debug UART"
depends on ARCH_IMX51
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX51.
@@ -1312,6 +1323,7 @@ config DEBUG_IMX51_UART
config DEBUG_IMX53_UART
bool "i.MX53 Debug UART"
depends on ARCH_IMX53
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on i.MX53.
@@ -1326,6 +1338,7 @@ config DEBUG_IMX6Q_UART
config DEBUG_IMX7D_UART
bool "i.MX7D Debug UART"
depends on ARCH_IMX7
+ select DEBUG_IMX_UART
help
Say Y here if you want barebox low-level debugging support
on i.MX7D.
@@ -1333,6 +1346,7 @@ config DEBUG_IMX7D_UART
config DEBUG_IMX8M_UART
bool "i.MX8M Debug UART"
depends on ARCH_IMX8M
+ select DEBUG_IMX_UART
help
Say Y here if you want barebox low-level debugging support
on i.MX8M*.
@@ -1340,6 +1354,7 @@ config DEBUG_IMX8M_UART
config DEBUG_VF610_UART
bool "VF610 Debug UART"
depends on ARCH_VF610
+ select DEBUG_IMX_UART
help
Say Y here if you want kernel low-level debugging support
on VF610.
diff --git a/include/mach/imx/debug_ll.h b/include/mach/imx/debug_ll.h
index 33e3e3afe3..d25631d116 100644
--- a/include/mach/imx/debug_ll.h
+++ b/include/mach/imx/debug_ll.h
@@ -23,7 +23,7 @@
#include <serial/imx-uart.h>
#include <serial/lpuart.h>
-#ifdef CONFIG_DEBUG_LL
+#ifdef CONFIG_DEBUG_IMX_UART
#define __IMX_UART_BASE(soc, num) soc##_UART##num##_BASE_ADDR
#define IMX_UART_BASE(soc, num) __IMX_UART_BASE(soc, num)
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 26/50] debug_ll ns16550: Do not define PUTC_LL()
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (24 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 25/50] ARM: i.MX: Only provide PUTC_LL() when activated Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 27/50] debug_ll ns16550: Use CONFIG_BAUDRATE Sascha Hauer
` (23 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
The ns16550 debug_ll helper always defines PUTC_LL() when included.
This is not always desired, so rename it to debug_ll_ns16550_putc()
and let the user define PUTC_LL() when desired.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/debug_ll/ns16550.h | 2 +-
include/mach/bcm283x/debug_ll.h | 10 ++++++++++
include/mach/layerscape/debug_ll.h | 5 +++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/debug_ll/ns16550.h b/include/debug_ll/ns16550.h
index a4ca7332d3..a3ea5fcfcc 100644
--- a/include/debug_ll/ns16550.h
+++ b/include/debug_ll/ns16550.h
@@ -29,7 +29,7 @@
#define NS16550_LCR_BKSE 0x80 /* Bank select enable */
-static inline void PUTC_LL(char ch)
+static inline void debug_ll_ns16550_putc(char ch)
{
while (!(debug_ll_read_reg(NS16550_LSR) & NS16550_LSR_THRE))
;
diff --git a/include/mach/bcm283x/debug_ll.h b/include/mach/bcm283x/debug_ll.h
index 424de8be4e..e89328340a 100644
--- a/include/mach/bcm283x/debug_ll.h
+++ b/include/mach/bcm283x/debug_ll.h
@@ -67,6 +67,11 @@ static inline void debug_ll_init(void)
debug_ll_ns16550_init(divisor);
}
+static inline void PUTC_LL(int c)
+{
+ debug_ll_ns16550_putc(c);
+}
+
#elif defined CONFIG_DEBUG_RPI4_MINI_UART
static inline uint8_t debug_ll_read_reg(int reg)
@@ -86,6 +91,11 @@ static inline void debug_ll_init(void)
/* Configured by ROM */
}
+static inline void PUTC_LL(int c)
+{
+ debug_ll_ns16550_putc(c);
+}
+
#else
static inline void debug_ll_init(void)
diff --git a/include/mach/layerscape/debug_ll.h b/include/mach/layerscape/debug_ll.h
index e731de29b6..0ed12f3f42 100644
--- a/include/mach/layerscape/debug_ll.h
+++ b/include/mach/layerscape/debug_ll.h
@@ -33,4 +33,9 @@ static inline void debug_ll_init(void)
debug_ll_ns16550_init(divisor);
}
+static inline void PUTC_LL(int c)
+{
+ debug_ll_ns16550_putc(c);
+}
+
#endif /* __MACH_LAYERSCAPE_DEBUG_LL_H__ */
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 27/50] debug_ll ns16550: Use CONFIG_BAUDRATE
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (25 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 26/50] debug_ll ns16550: Do not define PUTC_LL() Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 28/50] ARM: Rockchip: Use ns16550 debug_ll helper Sascha Hauer
` (22 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
the ns16550 debug_ll helper hardcodes a baudrate of 115200 baud.
The desired baudrate is specified in CONFIG_BAUDRATE, so use that
instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
include/debug_ll/ns16550.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/debug_ll/ns16550.h b/include/debug_ll/ns16550.h
index a3ea5fcfcc..373e1df32a 100644
--- a/include/debug_ll/ns16550.h
+++ b/include/debug_ll/ns16550.h
@@ -39,7 +39,7 @@ static inline void debug_ll_ns16550_putc(char ch)
static inline uint16_t debug_ll_ns16550_calc_divisor(unsigned long clk)
{
- return clk / (115200 * 16);
+ return clk / (CONFIG_BAUDRATE * 16);
}
static inline void debug_ll_ns16550_init(uint16_t divisor)
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 28/50] ARM: Rockchip: Use ns16550 debug_ll helper
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (26 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 27/50] debug_ll ns16550: Use CONFIG_BAUDRATE Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 29/50] ARM: Rockchip: Only provide PUTC_LL() when activated Sascha Hauer
` (21 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
The Rockchip UART is ns16550 compatible, so use the existing helper
functions to provide debug_ll functionality. While at it rename
INIT_LL() to be Rockchip specific.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/phytec-som-rk3288/lowlevel.c | 2 +-
include/mach/rockchip/debug_ll.h | 74 +++++++-------------
2 files changed, 27 insertions(+), 49 deletions(-)
diff --git a/arch/arm/boards/phytec-som-rk3288/lowlevel.c b/arch/arm/boards/phytec-som-rk3288/lowlevel.c
index dc29113c39..8fc8f700f9 100644
--- a/arch/arm/boards/phytec-som-rk3288/lowlevel.c
+++ b/arch/arm/boards/phytec-som-rk3288/lowlevel.c
@@ -26,7 +26,7 @@ ENTRY_FUNCTION(start_rk3288_phycore_som, r0, r1, r2)
GPIO7C6_MASK << GPIO7C6_SHIFT,
GPIO7C7_UART2DBG_SOUT << GPIO7C7_SHIFT |
GPIO7C6_UART2DBG_SIN << GPIO7C6_SHIFT);
- INIT_LL();
+ rockchip_debug_ll_init();
}
fdt = __dtb_rk3288_phycore_som_start + get_runtime_offset();
diff --git a/include/mach/rockchip/debug_ll.h b/include/mach/rockchip/debug_ll.h
index c859c3f199..a4b203794f 100644
--- a/include/mach/rockchip/debug_ll.h
+++ b/include/mach/rockchip/debug_ll.h
@@ -14,84 +14,62 @@
#ifdef CONFIG_DEBUG_ROCKCHIP_RK3188_UART
-#define UART_CLOCK 100000000
+#define RK_DEBUG_UART_CLOCK 100000000
#define RK_DEBUG_SOC RK3188
-#define serial_out(a, v) writeb(v, a)
-#define serial_in(a) readb(a)
#elif defined CONFIG_DEBUG_ROCKCHIP_RK3288_UART
-#define UART_CLOCK 24000000
+#define RK_DEBUG_UART_CLOCK 24000000
#define RK_DEBUG_SOC RK3288
-#define serial_out(a, v) writel(v, a)
-#define serial_in(a) readl(a)
#elif defined CONFIG_DEBUG_ROCKCHIP_RK3568_UART
-#define UART_CLOCK 24000000
+#define RK_DEBUG_UART_CLOCK 24000000
#define RK_DEBUG_SOC RK3568
-#define serial_out(a, v) writel(v, a)
-#define serial_in(a) readl(a)
#elif defined CONFIG_DEBUG_ROCKCHIP_RK3399_UART
-#define UART_CLOCK 24000000
+#define RK_DEBUG_UART_CLOCK 24000000
#define RK_DEBUG_SOC RK3399
-#define serial_out(a, v) writel(v, a)
-#define serial_in(a) readl(a)
#endif
#define __RK_UART_BASE(soc, num) soc##_UART##num##_BASE
#define RK_UART_BASE(soc, num) __RK_UART_BASE(soc, num)
-#define LSR_THRE 0x20 /* Xmit holding register empty */
-#define LCR_BKSE 0x80 /* Bank select enable */
-#define LSR (5 << 2)
-#define THR (0 << 2)
-#define DLL (0 << 2)
-#define IER (1 << 2)
-#define DLM (1 << 2)
-#define FCR (2 << 2)
-#define LCR (3 << 2)
-#define MCR (4 << 2)
-#define MDR (8 << 2)
-
-static inline void INIT_LL(void)
+static inline uint8_t debug_ll_read_reg(int reg)
{
void __iomem *base = IOMEM(RK_UART_BASE(RK_DEBUG_SOC,
CONFIG_DEBUG_ROCKCHIP_UART_PORT));
- unsigned int divisor = DIV_ROUND_CLOSEST(UART_CLOCK,
- 16 * CONFIG_BAUDRATE);
-
- serial_out(base + LCR, 0x00);
- serial_out(base + IER, 0x00);
- serial_out(base + MDR, 0x07);
- serial_out(base + LCR, LCR_BKSE);
- serial_out(base + DLL, divisor & 0xff);
- serial_out(base + DLM, divisor >> 8);
- serial_out(base + LCR, 0x03);
- serial_out(base + MCR, 0x03);
- serial_out(base + FCR, 0x07);
- serial_out(base + MDR, 0x00);
+
+ return readb(base + (reg << 2));
}
-static inline void PUTC_LL(char c)
+static inline void debug_ll_write_reg(int reg, uint8_t val)
{
void __iomem *base = IOMEM(RK_UART_BASE(RK_DEBUG_SOC,
CONFIG_DEBUG_ROCKCHIP_UART_PORT));
- /* Wait until there is space in the FIFO */
- while ((serial_in(base + LSR) & LSR_THRE) == 0)
- ;
- /* Send the character */
- serial_out(base + THR, c);
- /* Wait to make sure it hits the line, in case we die too soon. */
- while ((serial_in(base + LSR) & LSR_THRE) == 0)
- ;
+ writeb(val, base + (reg << 2));
+}
+
+#include <debug_ll/ns16550.h>
+
+static inline void rockchip_debug_ll_init(void)
+{
+ unsigned int divisor;
+
+ divisor = debug_ll_ns16550_calc_divisor(RK_DEBUG_UART_CLOCK * 2);
+ debug_ll_ns16550_init(divisor);
}
+
+static inline void PUTC_LL(int c)
+{
+ debug_ll_ns16550_putc(c);
+}
+
#else
-static inline void INIT_LL(void)
+static inline void rockchip_debug_ll_init(void)
{
}
#endif
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 29/50] ARM: Rockchip: Only provide PUTC_LL() when activated
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (27 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 28/50] ARM: Rockchip: Use ns16550 debug_ll helper Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 30/50] ARM: omap: Use ns16550 debug_ll helper Sascha Hauer
` (20 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the Rockchip specific debug_ll.h only
provides PUTC_LL() when specified.
The Rockchip specific debug_ll.h also provides other functions needed
by board code regardless if the Rockchip debug_ll port is enabled or
not, so include it explicitly where needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/phytec-som-rk3288/lowlevel.c | 1 +
arch/arm/include/asm/debug_ll.h | 6 ++++--
common/Kconfig | 7 +++++++
include/mach/rockchip/debug_ll.h | 2 +-
4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boards/phytec-som-rk3288/lowlevel.c b/arch/arm/boards/phytec-som-rk3288/lowlevel.c
index 8fc8f700f9..12044b6039 100644
--- a/arch/arm/boards/phytec-som-rk3288/lowlevel.c
+++ b/arch/arm/boards/phytec-som-rk3288/lowlevel.c
@@ -11,6 +11,7 @@
#include <mach/rockchip/grf_rk3288.h>
#include <mach/rockchip/hardware.h>
#include <debug_ll.h>
+#include <mach/rockchip/debug_ll.h>
extern char __dtb_rk3288_phycore_som_start[];
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 52723d7204..52e0b9223f 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -7,11 +7,13 @@
#include <mach/imx/debug_ll.h>
#endif
+#ifdef CONFIG_DEBUG_ROCKCHIP_UART
+#include <mach/rockchip/debug_ll.h>
+#endif
+
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
-#elif defined CONFIG_ARCH_ROCKCHIP
-#include <mach/rockchip/debug_ll.h>
#elif defined CONFIG_ARCH_ZYNQMP
#include <mach/zynqmp/debug_ll.h>
#elif defined CONFIG_ARCH_MVEBU
diff --git a/common/Kconfig b/common/Kconfig
index dce83cfafc..25f78cca46 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1252,6 +1252,9 @@ config FRAME_POINTER
config DEBUG_IMX_UART
bool
+config DEBUG_ROCKCHIP_UART
+ bool
+
choice
prompt "Kernel low-level debugging port"
depends on DEBUG_LL
@@ -1383,6 +1386,7 @@ config DEBUG_AM33XX_UART
config DEBUG_ROCKCHIP_RK3188_UART
bool "RK3188 Debug UART"
depends on ARCH_RK3188
+ select DEBUG_ROCKCHIP_UART
help
Say Y here if you want kernel low-level debugging support
on RK3188.
@@ -1390,6 +1394,7 @@ config DEBUG_ROCKCHIP_RK3188_UART
config DEBUG_ROCKCHIP_RK3288_UART
bool "RK3288 Debug UART"
depends on ARCH_RK3288
+ select DEBUG_ROCKCHIP_UART
help
Say Y here if you want kernel low-level debugging support
on RK3288.
@@ -1397,6 +1402,7 @@ config DEBUG_ROCKCHIP_RK3288_UART
config DEBUG_ROCKCHIP_RK3568_UART
bool "RK3568 Debug UART"
depends on ARCH_RK3568
+ select DEBUG_ROCKCHIP_UART
help
Say Y here if you want kernel low-level debugging support
on RK3568.
@@ -1404,6 +1410,7 @@ config DEBUG_ROCKCHIP_RK3568_UART
config DEBUG_ROCKCHIP_RK3399_UART
bool "RK3399 Debug UART"
depends on ARCH_RK3399
+ select DEBUG_ROCKCHIP_UART
help
Say Y here if you want kernel low-level debugging support
on RK3399.
diff --git a/include/mach/rockchip/debug_ll.h b/include/mach/rockchip/debug_ll.h
index a4b203794f..b1cf16a2dc 100644
--- a/include/mach/rockchip/debug_ll.h
+++ b/include/mach/rockchip/debug_ll.h
@@ -10,7 +10,7 @@
#include <mach/rockchip/rk3568-regs.h>
#include <mach/rockchip/rk3399-regs.h>
-#ifdef CONFIG_DEBUG_LL
+#ifdef CONFIG_DEBUG_ROCKCHIP_UART
#ifdef CONFIG_DEBUG_ROCKCHIP_RK3188_UART
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 30/50] ARM: omap: Use ns16550 debug_ll helper
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (28 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 29/50] ARM: Rockchip: Only provide PUTC_LL() when activated Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 31/50] ARM: omap: Only provide PUTC_LL() when activated Sascha Hauer
` (19 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
The omap UART is ns16550 compatible, so use the existing ns16550
debug_ll helper to provide debug_ll functionality.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/afi-gf/lowlevel.c | 2 +-
arch/arm/boards/beagle/lowlevel.c | 2 +-
arch/arm/boards/beaglebone/lowlevel.c | 2 +-
arch/arm/boards/myirtech-x335x/lowlevel.c | 2 +-
arch/arm/boards/phytec-som-am335x/lowlevel.c | 2 +-
arch/arm/boards/vscom-baltos/lowlevel.c | 2 +-
arch/arm/boards/wago-pfc-am35xx/lowlevel.c | 2 +-
include/mach/omap/debug_ll.h | 63 ++++++++++----------
8 files changed, 37 insertions(+), 40 deletions(-)
diff --git a/arch/arm/boards/afi-gf/lowlevel.c b/arch/arm/boards/afi-gf/lowlevel.c
index 1b08d14205..d1c8e98434 100644
--- a/arch/arm/boards/afi-gf/lowlevel.c
+++ b/arch/arm/boards/afi-gf/lowlevel.c
@@ -226,7 +226,7 @@ static noinline int gf_sram_init(void)
am33xx_uart_soft_reset((void *)AM33XX_UART2_BASE);
am33xx_enable_uart2_pin_mux();
- omap_uart_lowlevel_init((void *)AM33XX_UART2_BASE);
+ omap_debug_ll_init();
putc_ll('>');
barebox_arm_entry(0x80000000, SZ_256M, fdt);
diff --git a/arch/arm/boards/beagle/lowlevel.c b/arch/arm/boards/beagle/lowlevel.c
index ff822e5c24..bd944c4f67 100644
--- a/arch/arm/boards/beagle/lowlevel.c
+++ b/arch/arm/boards/beagle/lowlevel.c
@@ -196,7 +196,7 @@ static noinline int beagle_board_init(void)
mux_config();
- omap_uart_lowlevel_init((void *)OMAP3_UART3_BASE);
+ omap_debug_ll_init();
/* Dont reconfigure SDRAM while running in SDRAM! */
if (!in_sdram)
diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c
index 6978723fbb..b1ba66434b 100644
--- a/arch/arm/boards/beaglebone/lowlevel.c
+++ b/arch/arm/boards/beaglebone/lowlevel.c
@@ -132,7 +132,7 @@ static noinline int beaglebone_sram_init(void)
am33xx_uart_soft_reset((void *)AM33XX_UART0_BASE);
am33xx_enable_uart0_pin_mux();
- omap_uart_lowlevel_init((void *)AM33XX_UART0_BASE);
+ omap_debug_ll_init();
putc_ll('>');
barebox_arm_entry(0x80000000, sdram_size, fdt);
diff --git a/arch/arm/boards/myirtech-x335x/lowlevel.c b/arch/arm/boards/myirtech-x335x/lowlevel.c
index 66d2dc1a53..eb42182098 100644
--- a/arch/arm/boards/myirtech-x335x/lowlevel.c
+++ b/arch/arm/boards/myirtech-x335x/lowlevel.c
@@ -91,7 +91,7 @@ ENTRY_FUNCTION(start_am33xx_myirtech_sram, bootinfo, r1, r2)
if (IS_ENABLED(CONFIG_DEBUG_LL)) {
am33xx_uart_soft_reset(IOMEM(AM33XX_UART0_BASE));
am33xx_enable_uart0_pin_mux();
- omap_uart_lowlevel_init(IOMEM(AM33XX_UART0_BASE));
+ omap_debug_ll_init();
putc_ll('>');
}
diff --git a/arch/arm/boards/phytec-som-am335x/lowlevel.c b/arch/arm/boards/phytec-som-am335x/lowlevel.c
index 445ec18d5a..2e2bdc9169 100644
--- a/arch/arm/boards/phytec-som-am335x/lowlevel.c
+++ b/arch/arm/boards/phytec-som-am335x/lowlevel.c
@@ -163,7 +163,7 @@ static noinline void physom_board_init(void *fdt, int sdram, int module_family)
am33xx_uart_soft_reset((void *)AM33XX_UART0_BASE);
am33xx_enable_uart0_pin_mux();
- omap_uart_lowlevel_init((void *)AM33XX_UART0_BASE);
+ omap_debug_ll_init();
putc_ll('>');
am335x_barebox_entry(fdt);
diff --git a/arch/arm/boards/vscom-baltos/lowlevel.c b/arch/arm/boards/vscom-baltos/lowlevel.c
index f1dcc731a0..80046a3b05 100644
--- a/arch/arm/boards/vscom-baltos/lowlevel.c
+++ b/arch/arm/boards/vscom-baltos/lowlevel.c
@@ -97,7 +97,7 @@ static noinline void baltos_sram_init(void)
am33xx_uart_soft_reset((void *)AM33XX_UART0_BASE);
am33xx_enable_uart0_pin_mux();
- omap_uart_lowlevel_init((void *)AM33XX_UART0_BASE);
+ omap_debug_ll_init();
putc_ll('>');
am335x_barebox_entry(fdt);
diff --git a/arch/arm/boards/wago-pfc-am35xx/lowlevel.c b/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
index 04e036c233..cff6bfbfeb 100644
--- a/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
+++ b/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
@@ -184,7 +184,7 @@ static noinline void pfc200_board_init(void)
if (IS_ENABLED(CONFIG_DEBUG_LL)) {
am33xx_uart_soft_reset(IOMEM(OMAP3_UART3_BASE));
- omap_uart_lowlevel_init(IOMEM(OMAP3_UART3_BASE));
+ omap_debug_ll_init();
putc_ll('>');
}
diff --git a/include/mach/omap/debug_ll.h b/include/mach/omap/debug_ll.h
index 2e723dcb82..b696c3cb37 100644
--- a/include/mach/omap/debug_ll.h
+++ b/include/mach/omap/debug_ll.h
@@ -22,32 +22,6 @@
#include <mach/omap/omap4-silicon.h>
#include <mach/omap/am33xx-silicon.h>
-#define LSR_THRE 0x20 /* Xmit holding register empty */
-#define LCR_BKSE 0x80 /* Bank select enable */
-#define LSR (5 << 2)
-#define THR (0 << 2)
-#define DLL (0 << 2)
-#define IER (1 << 2)
-#define DLM (1 << 2)
-#define FCR (2 << 2)
-#define LCR (3 << 2)
-#define MCR (4 << 2)
-#define MDR (8 << 2)
-
-static inline void omap_uart_lowlevel_init(void __iomem *base)
-{
- writeb(0x00, base + LCR);
- writeb(0x00, base + IER);
- writeb(0x07, base + MDR);
- writeb(LCR_BKSE, base + LCR);
- writeb(26, base + DLL); /* 115200 */
- writeb(0, base + DLM);
- writeb(0x03, base + LCR);
- writeb(0x03, base + MCR);
- writeb(0x07, base + FCR);
- writeb(0x00, base + MDR);
-}
-
#ifdef CONFIG_DEBUG_LL
#ifdef CONFIG_DEBUG_OMAP3_UART
@@ -63,17 +37,40 @@ static inline void omap_uart_lowlevel_init(void __iomem *base)
#define __OMAP_UART_BASE(soc, num) soc##_UART##num##_BASE
#define OMAP_UART_BASE(soc, num) __OMAP_UART_BASE(soc, num)
-static inline void PUTC_LL(char c)
+static inline uint8_t debug_ll_read_reg(int reg)
{
void __iomem *base = (void *)OMAP_UART_BASE(OMAP_DEBUG_SOC,
CONFIG_DEBUG_OMAP_UART_PORT);
- /* Wait until there is space in the FIFO */
- while ((readb(base + LSR) & LSR_THRE) == 0);
- /* Send the character */
- writeb(c, base + THR);
- /* Wait to make sure it hits the line, in case we die too soon. */
- while ((readb(base + LSR) & LSR_THRE) == 0);
+ return readb(base + (reg << 2));
+}
+
+static inline void debug_ll_write_reg(int reg, uint8_t val)
+{
+ void __iomem *base = (void *)OMAP_UART_BASE(OMAP_DEBUG_SOC,
+ CONFIG_DEBUG_OMAP_UART_PORT);
+
+ writeb(val, base + (reg << 2));
+}
+
+#include <debug_ll/ns16550.h>
+
+static inline void omap_debug_ll_init(void)
+{
+ unsigned int divisor;
+
+ divisor = debug_ll_ns16550_calc_divisor(48000000);
+ debug_ll_ns16550_init(divisor);
+}
+
+static inline void PUTC_LL(int c)
+{
+ debug_ll_ns16550_putc(c);
+}
+
+#else
+static inline void omap_debug_ll_init(void)
+{
}
#endif
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 31/50] ARM: omap: Only provide PUTC_LL() when activated
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (29 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 30/50] ARM: omap: Use ns16550 debug_ll helper Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 32/50] ARM: omap: usbboot: Enable USB communication when needed Sascha Hauer
` (18 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the omap specific debug_ll.h only
provides PUTC_LL() when specified.
The omap specific debug_ll.h also provides other functions needed
by board code regardless if the omap debug_ll port is enabled or
not, so include it explicitly where needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/afi-gf/lowlevel.c | 1 +
arch/arm/boards/beagle/lowlevel.c | 1 +
arch/arm/boards/beaglebone/lowlevel.c | 1 +
arch/arm/boards/myirtech-x335x/lowlevel.c | 1 +
arch/arm/boards/phytec-som-am335x/lowlevel.c | 1 +
arch/arm/boards/vscom-baltos/lowlevel.c | 1 +
arch/arm/boards/wago-pfc-am35xx/lowlevel.c | 1 +
arch/arm/include/asm/debug_ll.h | 6 ++++--
common/Kconfig | 6 ++++++
include/mach/omap/debug_ll.h | 2 +-
10 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boards/afi-gf/lowlevel.c b/arch/arm/boards/afi-gf/lowlevel.c
index d1c8e98434..5c38198a36 100644
--- a/arch/arm/boards/afi-gf/lowlevel.c
+++ b/arch/arm/boards/afi-gf/lowlevel.c
@@ -17,6 +17,7 @@
#include <mach/omap/syslib.h>
#include <mach/omap/am33xx-mux.h>
#include <debug_ll.h>
+#include <mach/omap/debug_ll.h>
/* AM335X EMIF Register values */
#define VTP_CTRL_READY (0x1 << 5)
diff --git a/arch/arm/boards/beagle/lowlevel.c b/arch/arm/boards/beagle/lowlevel.c
index bd944c4f67..e53086cef0 100644
--- a/arch/arm/boards/beagle/lowlevel.c
+++ b/arch/arm/boards/beagle/lowlevel.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <init.h>
+#include <mach/omap/debug_ll.h>
#include <debug_ll.h>
#include <io.h>
#include <linux/sizes.h>
diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c
index b1ba66434b..5dc49dfaaf 100644
--- a/arch/arm/boards/beaglebone/lowlevel.c
+++ b/arch/arm/boards/beaglebone/lowlevel.c
@@ -5,6 +5,7 @@
#include <io.h>
#include <linux/string.h>
#include <debug_ll.h>
+#include <mach/omap/debug_ll.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/omap/am33xx-silicon.h>
diff --git a/arch/arm/boards/myirtech-x335x/lowlevel.c b/arch/arm/boards/myirtech-x335x/lowlevel.c
index eb42182098..0ac2370e57 100644
--- a/arch/arm/boards/myirtech-x335x/lowlevel.c
+++ b/arch/arm/boards/myirtech-x335x/lowlevel.c
@@ -6,6 +6,7 @@
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <debug_ll.h>
+#include <mach/omap/debug_ll.h>
#include <init.h>
#include <linux/sizes.h>
#include <mach/omap/am33xx-clock.h>
diff --git a/arch/arm/boards/phytec-som-am335x/lowlevel.c b/arch/arm/boards/phytec-som-am335x/lowlevel.c
index 2e2bdc9169..267f30b638 100644
--- a/arch/arm/boards/phytec-som-am335x/lowlevel.c
+++ b/arch/arm/boards/phytec-som-am335x/lowlevel.c
@@ -16,6 +16,7 @@
#include <mach/omap/am33xx-mux.h>
#include <mach/omap/am33xx-generic.h>
#include <debug_ll.h>
+#include <mach/omap/debug_ll.h>
#include "ram-timings.h"
diff --git a/arch/arm/boards/vscom-baltos/lowlevel.c b/arch/arm/boards/vscom-baltos/lowlevel.c
index 80046a3b05..aee0cde651 100644
--- a/arch/arm/boards/vscom-baltos/lowlevel.c
+++ b/arch/arm/boards/vscom-baltos/lowlevel.c
@@ -6,6 +6,7 @@
#include <io.h>
#include <linux/string.h>
#include <debug_ll.h>
+#include <mach/omap/debug_ll.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/omap/am33xx-silicon.h>
diff --git a/arch/arm/boards/wago-pfc-am35xx/lowlevel.c b/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
index cff6bfbfeb..5429065c2d 100644
--- a/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
+++ b/arch/arm/boards/wago-pfc-am35xx/lowlevel.c
@@ -10,6 +10,7 @@
#include <io.h>
#include <linux/string.h>
#include <debug_ll.h>
+#include <mach/omap/debug_ll.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
#include <mach/omap/generic.h>
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 52e0b9223f..7c1152c6d9 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -11,6 +11,10 @@
#include <mach/rockchip/debug_ll.h>
#endif
+#ifdef CONFIG_DEBUG_OMAP_UART
+#include <mach/omap/debug_ll.h>
+#endif
+
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
@@ -40,8 +44,6 @@
#include <mach/socfpga/debug_ll.h>
#elif defined CONFIG_ARCH_PXA
#include <mach/pxa/debug_ll.h>
-#elif defined CONFIG_ARCH_OMAP
-#include <mach/omap/debug_ll.h>
#elif defined CONFIG_ARCH_NOMADIK
#include <mach/nomadik/debug_ll.h>
#elif defined CONFIG_ARCH_MXS
diff --git a/common/Kconfig b/common/Kconfig
index 25f78cca46..eeb33f3042 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1255,6 +1255,9 @@ config DEBUG_IMX_UART
config DEBUG_ROCKCHIP_UART
bool
+config DEBUG_OMAP_UART
+ bool
+
choice
prompt "Kernel low-level debugging port"
depends on DEBUG_LL
@@ -1365,6 +1368,7 @@ config DEBUG_VF610_UART
config DEBUG_OMAP3_UART
bool "OMAP3 Debug UART"
depends on ARCH_OMAP3
+ select DEBUG_OMAP_UART
help
Say Y here if you want kernel low-level debugging support
on OMAP3.
@@ -1372,6 +1376,7 @@ config DEBUG_OMAP3_UART
config DEBUG_OMAP4_UART
bool "OMAP4 Debug UART"
depends on ARCH_OMAP4
+ select DEBUG_OMAP_UART
help
Say Y here if you want kernel low-level debugging support
on OMAP4.
@@ -1379,6 +1384,7 @@ config DEBUG_OMAP4_UART
config DEBUG_AM33XX_UART
bool "AM33XX Debug UART"
depends on ARCH_AM33XX
+ select DEBUG_OMAP_UART
help
Say Y here if you want kernel low-level debugging support
on AM33XX.
diff --git a/include/mach/omap/debug_ll.h b/include/mach/omap/debug_ll.h
index b696c3cb37..a6cd9a77c4 100644
--- a/include/mach/omap/debug_ll.h
+++ b/include/mach/omap/debug_ll.h
@@ -22,7 +22,7 @@
#include <mach/omap/omap4-silicon.h>
#include <mach/omap/am33xx-silicon.h>
-#ifdef CONFIG_DEBUG_LL
+#ifdef CONFIG_DEBUG_OMAP_UART
#ifdef CONFIG_DEBUG_OMAP3_UART
#define OMAP_DEBUG_SOC OMAP3
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 32/50] ARM: omap: usbboot: Enable USB communication when needed
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (30 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 31/50] ARM: omap: Only provide PUTC_LL() when activated Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 33/50] ARM: omap: Make multi-arch safe Sascha Hauer
` (17 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Instead of activating USB communication unconditionally in an initcall,
let the users activate it once they need it. This gets us rid of an
initcall that is not protected against running on foreign SoCs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/archosg9/board.c | 12 ++++++++----
arch/arm/mach-omap/omap4_rom_usb.c | 4 +++-
drivers/serial/serial_omap4_usbboot.c | 6 ++++++
fs/omap4_usbbootfs.c | 3 ++-
include/mach/omap/omap4_rom_usb.h | 13 +++++++++++++
5 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boards/archosg9/board.c b/arch/arm/boards/archosg9/board.c
index 8aa35262d3..547d21d6ca 100644
--- a/arch/arm/boards/archosg9/board.c
+++ b/arch/arm/boards/archosg9/board.c
@@ -33,13 +33,17 @@
static int archosg9_console_init(void)
{
+ int ret;
+
barebox_set_model("Archos G9");
barebox_set_hostname("g9");
- if (IS_ENABLED(CONFIG_DRIVER_SERIAL_OMAP4_USBBOOT) &&
- omap4_usbboot_ready()) {
- add_generic_device("serial_omap4_usbboot", DEVICE_ID_DYNAMIC
- , NULL, 0, 0, 0, NULL);
+ if (IS_ENABLED(CONFIG_DRIVER_SERIAL_OMAP4_USBBOOT)) {
+ ret = omap4_usbboot_open();
+ if (!ret) {
+ add_generic_device("serial_omap4_usbboot", DEVICE_ID_DYNAMIC
+ , NULL, 0, 0, 0, NULL);
+ }
}
if (IS_ENABLED(CONFIG_DRIVER_SERIAL_NS16550)) {
omap44xx_add_uart1();
diff --git a/arch/arm/mach-omap/omap4_rom_usb.c b/arch/arm/mach-omap/omap4_rom_usb.c
index a3e447128f..01c5565a68 100644
--- a/arch/arm/mach-omap/omap4_rom_usb.c
+++ b/arch/arm/mach-omap/omap4_rom_usb.c
@@ -46,6 +46,9 @@ int omap4_usbboot_open(void)
int n;
u32 base;
+ if (omap4_usbboot_ready())
+ return 0;
+
if (omap4_revision() >= OMAP4460_ES1_0)
base = PUBLIC_API_BASE_4460;
else
@@ -82,7 +85,6 @@ int omap4_usbboot_open(void)
omap4_usbboot_puts("USB communications initialized\n");
return 0;
}
-core_initcall(omap4_usbboot_open);
int omap4_usbboot_ready(void){
return omap4_usbboot_data.ready;
diff --git a/drivers/serial/serial_omap4_usbboot.c b/drivers/serial/serial_omap4_usbboot.c
index 463d217f97..709398966f 100644
--- a/drivers/serial/serial_omap4_usbboot.c
+++ b/drivers/serial/serial_omap4_usbboot.c
@@ -49,6 +49,12 @@ static int serial_omap4_usbboot_getc(struct console_device *cdev)
static int serial_omap4_usbboot_probe(struct device *dev)
{
struct serial_omap4_usbboot_priv *priv;
+ int ret;
+
+ ret = omap4_usbboot_open();
+ if (ret)
+ return ret;
+
priv = xzalloc(sizeof(*priv));
priv->cdev.dev = dev;
diff --git a/fs/omap4_usbbootfs.c b/fs/omap4_usbbootfs.c
index 9b0755d539..30392d1192 100644
--- a/fs/omap4_usbbootfs.c
+++ b/fs/omap4_usbbootfs.c
@@ -143,8 +143,9 @@ static int omap4_usbbootfs_stat(struct device *dev, const char *filename,
static int omap4_usbbootfs_probe(struct device *dev)
{
- return 0;
+ return omap4_usbboot_open();
}
+
static void omap4_usbbootfs_remove(struct device *dev)
{
}
diff --git a/include/mach/omap/omap4_rom_usb.h b/include/mach/omap/omap4_rom_usb.h
index bf8bd159ad..66295eb11e 100644
--- a/include/mach/omap/omap4_rom_usb.h
+++ b/include/mach/omap/omap4_rom_usb.h
@@ -125,8 +125,21 @@ struct omap4_usbboot {
int ready;
};
+#ifdef CONFIG_OMAP4_USBBOOT
int omap4_usbboot_open(void);
int omap4_usbboot_ready(void);
+#else
+static inline int omap4_usbboot_open(void)
+{
+ return -ENODEV;
+}
+
+static inline int omap4_usbboot_ready(void)
+{
+ return 0;
+}
+#endif
+
void omap4_usbboot_close(void);
void omap4_usbboot_queue_read(void *data, unsigned len);
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 33/50] ARM: omap: Make multi-arch safe
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (31 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 32/50] ARM: omap: usbboot: Enable USB communication when needed Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 34/50] ARM: Rockchip: Make safe for multi-arch Sascha Hauer
` (16 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Make sure the initcalls do not execute on foreign SoCs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-omap/omap_generic.c | 8 +++++++-
arch/arm/mach-omap/xload.c | 3 +++
include/mach/omap/generic.h | 6 ++++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.c
index 59c1ce7666..36f2e80af2 100644
--- a/arch/arm/mach-omap/omap_generic.c
+++ b/arch/arm/mach-omap/omap_generic.c
@@ -113,6 +113,9 @@ static struct image_handler omap_barebox_handler = {
static int omap_bootm_barebox(void)
{
+ if (!cpu_is_omap())
+ return 0;
+
return register_image_handler(&omap_barebox_handler);
}
device_initcall(omap_bootm_barebox);
@@ -141,6 +144,9 @@ static int omap_env_init(void)
struct cdev *cdev;
const char *rootpath;
+ if (!cpu_is_omap())
+ return 0;
+
if (bootsource_get() != BOOTSOURCE_MMC)
return 0;
@@ -203,7 +209,7 @@ static int omap_init(void)
if (root) {
__omap_cpu_type = omap_soc_from_dt();
if (!__omap_cpu_type)
- hang();
+ return 0;
}
if (cpu_is_omap3())
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index e61e2ce652..e632b53788 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -355,6 +355,9 @@ int omap_set_barebox_part(struct omap_barebox_part *part)
static int omap_set_xload(void)
{
+ if (!cpu_is_omap())
+ return 0;
+
barebox_main = omap_xload;
return 0;
diff --git a/include/mach/omap/generic.h b/include/mach/omap/generic.h
index 8b2b7a4f0c..cb54b88211 100644
--- a/include/mach/omap/generic.h
+++ b/include/mach/omap/generic.h
@@ -54,6 +54,12 @@ extern unsigned int __omap_cpu_type;
# define cpu_is_am33xx() (0)
#endif
+#ifdef omap_cpu_type
+#define cpu_is_omap() (omap_cpu_type > 0)
+#else
+#define cpu_is_omap() (0)
+#endif
+
struct omap_barebox_part {
unsigned int nand_offset;
unsigned int nand_size;
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 34/50] ARM: Rockchip: Make safe for multi-arch
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (32 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 33/50] ARM: omap: Make multi-arch safe Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 35/50] pm_domains: Enable explicitly when we have power-domain providers Sascha Hauer
` (15 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Make sure Rockchip initcalls are only executed when running on
a Rockchip SoC.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-rockchip/bootm.c | 4 ++++
arch/arm/mach-rockchip/rockchip.c | 29 +++++++++++++++++++++++------
include/mach/rockchip/rockchip.h | 2 ++
3 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-rockchip/bootm.c b/arch/arm/mach-rockchip/bootm.c
index 036a3696ad..4317fdefd6 100644
--- a/arch/arm/mach-rockchip/bootm.c
+++ b/arch/arm/mach-rockchip/bootm.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <init.h>
#include <memory.h>
+#include <mach/rockchip/rockchip.h>
struct newidb_entry {
uint32_t sector;
@@ -113,6 +114,9 @@ static struct image_handler image_handler_rkns_barebox_image = {
static int rockchip_register_barebox_image_handler(void)
{
+ if (rockchip_soc() < 0)
+ return 0;
+
return register_image_handler(&image_handler_rkns_barebox_image);
}
late_initcall(rockchip_register_barebox_image_handler);
diff --git a/arch/arm/mach-rockchip/rockchip.c b/arch/arm/mach-rockchip/rockchip.c
index 0a89ab1841..e75238481c 100644
--- a/arch/arm/mach-rockchip/rockchip.c
+++ b/arch/arm/mach-rockchip/rockchip.c
@@ -3,18 +3,35 @@
#include <init.h>
#include <mach/rockchip/rockchip.h>
+static int __rockchip_soc = -1;
+
+int rockchip_soc(void)
+{
+ return __rockchip_soc;
+}
+
static int rockchip_init(void)
{
- if (of_machine_is_compatible("rockchip,rk3188"))
+ if (of_machine_is_compatible("rockchip,rk3188")) {
+ __rockchip_soc = 3188;
return rk3188_init();
- if (of_machine_is_compatible("rockchip,rk3288"))
+ }
+
+ if (of_machine_is_compatible("rockchip,rk3288")) {
+ __rockchip_soc = 3288;
return rk3288_init();
- if (of_machine_is_compatible("rockchip,rk3566"))
+ }
+
+ if (of_machine_is_compatible("rockchip,rk3566")) {
+ __rockchip_soc = 3566;
return rk3568_init();
- if (of_machine_is_compatible("rockchip,rk3568"))
+ }
+
+ if (of_machine_is_compatible("rockchip,rk3568")) {
+ __rockchip_soc = 3568;
return rk3568_init();
+ }
- pr_err("Unknown rockchip SoC\n");
- return -ENODEV;
+ return 0;
}
postcore_initcall(rockchip_init);
diff --git a/include/mach/rockchip/rockchip.h b/include/mach/rockchip/rockchip.h
index 16a691ee8c..485526ef53 100644
--- a/include/mach/rockchip/rockchip.h
+++ b/include/mach/rockchip/rockchip.h
@@ -37,4 +37,6 @@ static inline int rk3568_init(void)
void rk3568_lowlevel_init(void);
+int rockchip_soc(void);
+
#endif /* __MACH_ROCKCHIP_H */
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 35/50] pm_domains: Enable explicitly when we have power-domain providers
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (33 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 34/50] ARM: Rockchip: Make safe for multi-arch Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 36/50] ARM: add multi-arch support Sascha Hauer
` (14 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Many SoCs provide power-domains in their device trees. In barebox
we most of the time do not have drivers for the power-domains. This
is no problem for most of the time as the necessary power domains
are either default on or enabled during early SoC init.
With multi-arch support it can happen that we compile in SoCs for
which we do not have power-domain drivers and other SoCs where we
need a power-domain driver. The example I stumbled upon is the
i.MX7 on the one hand which has a driver and OMAP on the other hand
which has power-domains described in the device tree for which
we do not have (and do not currently need) a driver.
To be able to handle both situations let's enable pm_domain support
explicitly on SoCs we know we have a driver for.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/imx7.c | 3 +++
arch/arm/mach-imx/imx8m.c | 3 +++
drivers/base/power.c | 10 ++++++++++
include/pm_domain.h | 6 ++++++
4 files changed, 22 insertions(+)
diff --git a/arch/arm/mach-imx/imx7.c b/arch/arm/mach-imx/imx7.c
index 31d49c35e7..fbbed423c0 100644
--- a/arch/arm/mach-imx/imx7.c
+++ b/arch/arm/mach-imx/imx7.c
@@ -3,6 +3,7 @@
#include <init.h>
#include <common.h>
#include <io.h>
+#include <pm_domain.h>
#include <linux/sizes.h>
#include <asm/psci.h>
#include <mach/imx/imx7.h>
@@ -161,5 +162,7 @@ int imx7_init(void)
imx_set_silicon_revision(cputypestr, imx7_cpu_revision());
imx_set_reset_reason(src + IMX7_SRC_SRSR, imx7_reset_reasons);
+ genpd_activate();
+
return 0;
}
diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
index 37ef17bc8e..32f1896b89 100644
--- a/arch/arm/mach-imx/imx8m.c
+++ b/arch/arm/mach-imx/imx8m.c
@@ -3,6 +3,7 @@
#include <init.h>
#include <common.h>
#include <io.h>
+#include <pm_domain.h>
#include <asm/syscounter.h>
#include <asm/system.h>
#include <mach/imx/generic.h>
@@ -54,6 +55,8 @@ static int imx8m_init(const char *cputypestr)
void __iomem *src = IOMEM(MX8M_SRC_BASE_ADDR);
struct arm_smccc_res res;
+ genpd_activate();
+
/*
* Reset reasons seem to be identical to that of i.MX7
*/
diff --git a/drivers/base/power.c b/drivers/base/power.c
index 8e999c3e14..2db24329dd 100644
--- a/drivers/base/power.c
+++ b/drivers/base/power.c
@@ -237,6 +237,13 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device_node *np,
return ret ?: 1;
}
+static bool have_genpd_providers;
+
+void genpd_activate(void)
+{
+ have_genpd_providers = true;
+}
+
/**
* genpd_dev_pm_attach - Attach a device to its PM domain using DT.
* @dev: Device to attach.
@@ -255,6 +262,9 @@ int genpd_dev_pm_attach(struct device *dev)
if (!dev->of_node)
return 0;
+ if (!have_genpd_providers)
+ return 0;
+
/*
* Devices with multiple PM domains must be attached separately, as we
* can only attach one PM domain per device.
diff --git a/include/pm_domain.h b/include/pm_domain.h
index fac7f99227..d297053531 100644
--- a/include/pm_domain.h
+++ b/include/pm_domain.h
@@ -23,6 +23,8 @@ typedef struct generic_pm_domain *(*genpd_xlate_t)(struct of_phandle_args *args,
#ifdef CONFIG_PM_GENERIC_DOMAINS
+void genpd_activate(void);
+
int genpd_dev_pm_attach(struct device *dev);
/**
@@ -58,6 +60,10 @@ void pm_genpd_print(void);
#else
+static inline void genpd_activate(void)
+{
+}
+
static inline int pm_genpd_init(struct generic_pm_domain *genpd,
void *gov, bool is_off)
{
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 36/50] ARM: add multi-arch support
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (34 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 35/50] pm_domains: Enable explicitly when we have power-domain providers Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 37/50] ARM: omap: Add support for multi-arch Sascha Hauer
` (13 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
This allows to build barebox for multiple arch/arm/mach-* for
architectures that allow it.
To get there we convert machine-y to a list. Architectures that
want to support multi-arch must make sure that all boards support
multi PBL support (i.e. select HAVE_PBL_MULTI_IMAGES). Also they
must make sure that all initcalls can gracefully be executed on
other SoCs. Two architectures that fulfil these requirements are
added right from the start: i.MX and Rockchip.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Kconfig | 53 ++++++++++---------
arch/arm/Makefile | 48 ++++++++---------
arch/arm/configs/animeo_ip_defconfig | 1 +
arch/arm/configs/at91_multi_defconfig | 1 +
arch/arm/configs/at91rm9200ek_defconfig | 3 +-
arch/arm/configs/at91sam9260ek_defconfig | 1 +
.../configs/at91sam9261ek_bootstrap_defconfig | 1 +
arch/arm/configs/at91sam9261ek_defconfig | 1 +
.../at91sam9261ek_first_stage_defconfig | 1 +
arch/arm/configs/at91sam9g10ek_defconfig | 1 +
arch/arm/configs/at91sam9g20ek_defconfig | 1 +
arch/arm/configs/at91sam9m10g45ek_defconfig | 1 +
arch/arm/configs/at91sam9m10ihd_defconfig | 1 +
arch/arm/configs/at91sam9n12ek_defconfig | 1 +
arch/arm/configs/dss11_defconfig | 1 +
arch/arm/configs/haba_knx_lite_defconfig | 1 +
arch/arm/configs/pm9261_defconfig | 1 +
arch/arm/configs/pm9263_defconfig | 1 +
arch/arm/configs/pm9g45_defconfig | 1 +
arch/arm/configs/qil_a9260_defconfig | 1 +
arch/arm/configs/qil_a9g20_defconfig | 1 +
arch/arm/configs/sama5d3xek_defconfig | 1 +
arch/arm/configs/sama5d4_xplained_defconfig | 1 +
arch/arm/configs/sama5d4ek_defconfig | 1 +
arch/arm/configs/telit_evk_pro3_defconfig | 1 +
arch/arm/configs/tny_a9260_defconfig | 1 +
.../arm/configs/tny_a9263_bootstrap_defconfig | 1 +
arch/arm/configs/tny_a9263_defconfig | 1 +
arch/arm/configs/tny_a9g20_defconfig | 1 +
arch/arm/configs/usb_a9260_defconfig | 1 +
.../arm/configs/usb_a9263_bootstrap_defconfig | 1 +
arch/arm/configs/usb_a9263_defconfig | 1 +
arch/arm/configs/usb_a9g20_defconfig | 1 +
33 files changed, 85 insertions(+), 49 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f6dab17474..44055456ce 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -35,6 +35,9 @@ config ARCH_STM32
choice
prompt "ARM system type"
+config ARCH_MULTIARCH
+ bool "Allow multiple archs to be selected"
+
config ARCH_AT91
bool "Atmel AT91"
select GPIOLIB
@@ -94,18 +97,6 @@ config ARCH_EP93XX
select CPU_ARM920T
select GENERIC_GPIO
-config ARCH_IMX
- bool "Freescale iMX-based"
- select GPIOLIB
- select COMMON_CLK
- select CLKDEV_LOOKUP
- select WATCHDOG_IMX_RESET_SOURCE
- select HAS_DEBUG_LL
- select HAVE_PBL_MULTI_IMAGES
- select RELOCATABLE
- select CPU_SUPPORTS_32BIT_KERNEL
- select CPU_SUPPORTS_64BIT_KERNEL
-
config ARCH_LAYERSCAPE
bool "NXP Layerscape based"
select GPIOLIB
@@ -158,18 +149,6 @@ config ARCH_PXA
bool "Intel/Marvell PXA based"
select GENERIC_GPIO
-config ARCH_ROCKCHIP
- bool "Rockchip RX3xxx"
- select COMMON_CLK
- select CLKDEV_LOOKUP
- select COMMON_CLK_OF_PROVIDER
- select GPIOLIB
- select PINCTRL
- select PINCTRL_ROCKCHIP
- select OFTREE
- select HAVE_PBL_MULTI_IMAGES
- select HAS_DEBUG_LL
-
config ARCH_SOCFPGA
bool "Altera SOCFPGA"
select HAS_DEBUG_LL
@@ -279,6 +258,32 @@ config ARCH_ARM64_VIRT
endchoice
+config ARCH_IMX
+ bool "Freescale iMX-based"
+ depends on ARCH_MULTIARCH
+ select GPIOLIB
+ select COMMON_CLK
+ select CLKDEV_LOOKUP
+ select WATCHDOG_IMX_RESET_SOURCE
+ select HAS_DEBUG_LL
+ select HAVE_PBL_MULTI_IMAGES
+ select RELOCATABLE
+ select CPU_SUPPORTS_32BIT_KERNEL
+ select CPU_SUPPORTS_64BIT_KERNEL
+
+config ARCH_ROCKCHIP
+ bool "Rockchip RX3xxx"
+ depends on ARCH_MULTIARCH
+ select COMMON_CLK
+ select CLKDEV_LOOKUP
+ select COMMON_CLK_OF_PROVIDER
+ select GPIOLIB
+ select PINCTRL
+ select PINCTRL_ROCKCHIP
+ select OFTREE
+ select HAVE_PBL_MULTI_IMAGES
+ select HAS_DEBUG_LL
+
source "arch/arm/cpu/Kconfig"
source "arch/arm/mach-at91/Kconfig"
source "arch/arm/mach-bcm283x/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index da65dae548..9bd7db6ba9 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -85,29 +85,29 @@ endif
# Machine directory name. This list is sorted alphanumerically
# by CONFIG_* macro name.
-machine-$(CONFIG_ARCH_AT91) := at91
-machine-$(CONFIG_ARCH_BCM283X) := bcm283x
-machine-$(CONFIG_ARCH_CLPS711X) := clps711x
-machine-$(CONFIG_ARCH_DAVINCI) := davinci
-machine-$(CONFIG_ARCH_DIGIC) := digic
-machine-$(CONFIG_ARCH_EP93XX) := ep93xx
-machine-$(CONFIG_ARCH_IMX) := imx
-machine-$(CONFIG_ARCH_LAYERSCAPE) := layerscape
-machine-$(CONFIG_ARCH_MXS) := mxs
-machine-$(CONFIG_ARCH_MVEBU) := mvebu
-machine-$(CONFIG_ARCH_NOMADIK) := nomadik
-machine-$(CONFIG_ARCH_OMAP) := omap
-machine-$(CONFIG_ARCH_PXA) := pxa
-machine-$(CONFIG_ARCH_ROCKCHIP) := rockchip
-machine-$(CONFIG_ARCH_SAMSUNG) := samsung
-machine-$(CONFIG_ARCH_SOCFPGA) := socfpga
-machine-$(CONFIG_ARCH_STM32MP) := stm32mp
-machine-$(CONFIG_ARCH_VERSATILE) := versatile
-machine-$(CONFIG_ARCH_VEXPRESS) := vexpress
-machine-$(CONFIG_ARCH_TEGRA) := tegra
-machine-$(CONFIG_ARCH_UEMD) := uemd
-machine-$(CONFIG_ARCH_ZYNQ) := zynq
-machine-$(CONFIG_ARCH_ZYNQMP) := zynqmp
+machine-$(CONFIG_ARCH_AT91) += at91
+machine-$(CONFIG_ARCH_BCM283X) += bcm283x
+machine-$(CONFIG_ARCH_CLPS711X) += clps711x
+machine-$(CONFIG_ARCH_DAVINCI) += davinci
+machine-$(CONFIG_ARCH_DIGIC) += digic
+machine-$(CONFIG_ARCH_EP93XX) += ep93xx
+machine-$(CONFIG_ARCH_IMX) += imx
+machine-$(CONFIG_ARCH_LAYERSCAPE) += layerscape
+machine-$(CONFIG_ARCH_MXS) += mxs
+machine-$(CONFIG_ARCH_MVEBU) += mvebu
+machine-$(CONFIG_ARCH_NOMADIK) += nomadik
+machine-$(CONFIG_ARCH_OMAP) += omap
+machine-$(CONFIG_ARCH_PXA) += pxa
+machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
+machine-$(CONFIG_ARCH_SAMSUNG) += samsung
+machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
+machine-$(CONFIG_ARCH_STM32MP) += stm32mp
+machine-$(CONFIG_ARCH_VERSATILE) += versatile
+machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
+machine-$(CONFIG_ARCH_TEGRA) += tegra
+machine-$(CONFIG_ARCH_UEMD) += uemd
+machine-$(CONFIG_ARCH_ZYNQ) += zynq
+machine-$(CONFIG_ARCH_ZYNQMP) += zynqmp
TEXT_BASE = $(CONFIG_TEXT_BASE)
@@ -184,7 +184,7 @@ maketools:
PHONY += maketools
ifneq ($(machine-y),)
-MACH := arch/arm/mach-$(machine-y)/
+MACH := $(patsubst %,arch/arm/mach-%/,$(machine-y))
else
MACH :=
endif
diff --git a/arch/arm/configs/animeo_ip_defconfig b/arch/arm/configs/animeo_ip_defconfig
index 96f73eba2b..9005d65e22 100644
--- a/arch/arm/configs/animeo_ip_defconfig
+++ b/arch/arm/configs/animeo_ip_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9260=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_AEABI=y
diff --git a/arch/arm/configs/at91_multi_defconfig b/arch/arm/configs/at91_multi_defconfig
index 31427b1451..6cbe013162 100644
--- a/arch/arm/configs/at91_multi_defconfig
+++ b/arch/arm/configs/at91_multi_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_AT91_MULTI_BOARDS=y
CONFIG_MACH_SKOV_ARM9CPU=y
CONFIG_MACH_AT91SAM9263EK=y
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig
index 3e8d263a24..fa6130e8ee 100644
--- a/arch/arm/configs/at91rm9200ek_defconfig
+++ b/arch/arm/configs/at91rm9200ek_defconfig
@@ -1,6 +1,7 @@
-CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
+CONFIG_ARCH_AT91=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_EXPERIMENTAL=y
CONFIG_MALLOC_TLSF=y
CONFIG_PROMPT="9200-EK:"
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig
index 3cc92d8fd1..e39be7953a 100644
--- a/arch/arm/configs/at91sam9260ek_defconfig
+++ b/arch/arm/configs/at91sam9260ek_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9260=y
CONFIG_MACH_AT91SAM9260EK=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
diff --git a/arch/arm/configs/at91sam9261ek_bootstrap_defconfig b/arch/arm/configs/at91sam9261ek_bootstrap_defconfig
index 3de1d78c6f..61ead6282b 100644
--- a/arch/arm/configs/at91sam9261ek_bootstrap_defconfig
+++ b/arch/arm/configs/at91sam9261ek_bootstrap_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9261=y
CONFIG_AT91_BOOTSTRAP=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x27000
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig
index d6f547aae5..430eca553c 100644
--- a/arch/arm/configs/at91sam9261ek_defconfig
+++ b/arch/arm/configs/at91sam9261ek_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9261=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_AEABI=y
diff --git a/arch/arm/configs/at91sam9261ek_first_stage_defconfig b/arch/arm/configs/at91sam9261ek_first_stage_defconfig
index e4c9f1d2c9..b05cff14e1 100644
--- a/arch/arm/configs/at91sam9261ek_first_stage_defconfig
+++ b/arch/arm/configs/at91sam9261ek_first_stage_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9261=y
CONFIG_AT91_LOAD_BAREBOX_SRAM=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x27000
diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig
index 17713cdb82..3db3993419 100644
--- a/arch/arm/configs/at91sam9g10ek_defconfig
+++ b/arch/arm/configs/at91sam9g10ek_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G10=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_AEABI=y
diff --git a/arch/arm/configs/at91sam9g20ek_defconfig b/arch/arm/configs/at91sam9g20ek_defconfig
index 6791be2d09..70f42078d9 100644
--- a/arch/arm/configs/at91sam9g20ek_defconfig
+++ b/arch/arm/configs/at91sam9g20ek_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G20=y
CONFIG_AT91_HAVE_2MMC=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index c38df8fa81..cf473ff488 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G45=y
CONFIG_MACH_AT91SAM9M10G45EK=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
diff --git a/arch/arm/configs/at91sam9m10ihd_defconfig b/arch/arm/configs/at91sam9m10ihd_defconfig
index 490472f889..9507e36223 100644
--- a/arch/arm/configs/at91sam9m10ihd_defconfig
+++ b/arch/arm/configs/at91sam9m10ihd_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G45=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_AEABI=y
diff --git a/arch/arm/configs/at91sam9n12ek_defconfig b/arch/arm/configs/at91sam9n12ek_defconfig
index ce97ad62dc..3b58ac1101 100644
--- a/arch/arm/configs/at91sam9n12ek_defconfig
+++ b/arch/arm/configs/at91sam9n12ek_defconfig
@@ -1,4 +1,5 @@
CONFIG_TEXT_BASE=0x26f00000
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9N12=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_AEABI=y
diff --git a/arch/arm/configs/dss11_defconfig b/arch/arm/configs/dss11_defconfig
index 3da42205d1..e057e7d6a9 100644
--- a/arch/arm/configs/dss11_defconfig
+++ b/arch/arm/configs/dss11_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G20=y
CONFIG_MACH_DSS11=y
CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16=y
diff --git a/arch/arm/configs/haba_knx_lite_defconfig b/arch/arm/configs/haba_knx_lite_defconfig
index 233644f24a..7222fd312e 100644
--- a/arch/arm/configs/haba_knx_lite_defconfig
+++ b/arch/arm/configs/haba_knx_lite_defconfig
@@ -1,4 +1,5 @@
CONFIG_TEXT_BASE=0x27f00000
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G20=y
CONFIG_MACH_HABA_KNX_LITE=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
diff --git a/arch/arm/configs/pm9261_defconfig b/arch/arm/configs/pm9261_defconfig
index 61595ed506..b52d9cc90c 100644
--- a/arch/arm/configs/pm9261_defconfig
+++ b/arch/arm/configs/pm9261_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9261=y
CONFIG_MACH_PM9261=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
diff --git a/arch/arm/configs/pm9263_defconfig b/arch/arm/configs/pm9263_defconfig
index b0eaf9f3e0..e20317a22c 100644
--- a/arch/arm/configs/pm9263_defconfig
+++ b/arch/arm/configs/pm9263_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9263=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_GLOB=y
diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig
index c63a1c070b..90cd27d7f6 100644
--- a/arch/arm/configs/pm9g45_defconfig
+++ b/arch/arm/configs/pm9g45_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G45=y
CONFIG_MACH_PM9G45=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
diff --git a/arch/arm/configs/qil_a9260_defconfig b/arch/arm/configs/qil_a9260_defconfig
index 3f5eedb449..45bedb98b6 100644
--- a/arch/arm/configs/qil_a9260_defconfig
+++ b/arch/arm/configs/qil_a9260_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9260=y
CONFIG_MACH_QIL_A9260=y
CONFIG_CALAO_MB_QIL_A9260=y
diff --git a/arch/arm/configs/qil_a9g20_defconfig b/arch/arm/configs/qil_a9g20_defconfig
index 5162ecab62..b42ba2f468 100644
--- a/arch/arm/configs/qil_a9g20_defconfig
+++ b/arch/arm/configs/qil_a9g20_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G20=y
CONFIG_MACH_QIL_A9G20=y
CONFIG_CALAO_MB_QIL_A9260=y
diff --git a/arch/arm/configs/sama5d3xek_defconfig b/arch/arm/configs/sama5d3xek_defconfig
index 54784cc7ad..5a9f701066 100644
--- a/arch/arm/configs/sama5d3xek_defconfig
+++ b/arch/arm/configs/sama5d3xek_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_TEXT_BASE=0x26f00000
CONFIG_ARCH_SAMA5D3=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x60000
diff --git a/arch/arm/configs/sama5d4_xplained_defconfig b/arch/arm/configs/sama5d4_xplained_defconfig
index 2f232eeac7..4d19a07b34 100644
--- a/arch/arm/configs/sama5d4_xplained_defconfig
+++ b/arch/arm/configs/sama5d4_xplained_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_TEXT_BASE=0x26f00000
CONFIG_ARCH_SAMA5D4=y
CONFIG_MACH_SAMA5D4_XPLAINED=y
diff --git a/arch/arm/configs/sama5d4ek_defconfig b/arch/arm/configs/sama5d4ek_defconfig
index 04f080af0a..02cb12f90e 100644
--- a/arch/arm/configs/sama5d4ek_defconfig
+++ b/arch/arm/configs/sama5d4ek_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_TEXT_BASE=0x26f00000
CONFIG_ARCH_SAMA5D4=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x60000
diff --git a/arch/arm/configs/telit_evk_pro3_defconfig b/arch/arm/configs/telit_evk_pro3_defconfig
index 3bf5968bf5..d9d22150c8 100644
--- a/arch/arm/configs/telit_evk_pro3_defconfig
+++ b/arch/arm/configs/telit_evk_pro3_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9260=y
CONFIG_MACH_GE863=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
diff --git a/arch/arm/configs/tny_a9260_defconfig b/arch/arm/configs/tny_a9260_defconfig
index 0886895306..de846d245a 100644
--- a/arch/arm/configs/tny_a9260_defconfig
+++ b/arch/arm/configs/tny_a9260_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9260=y
CONFIG_MACH_TNY_A9260=y
CONFIG_CALAO_MOB_TNY_MD2=y
diff --git a/arch/arm/configs/tny_a9263_bootstrap_defconfig b/arch/arm/configs/tny_a9263_bootstrap_defconfig
index d7e541a2b1..7977d9ead3 100644
--- a/arch/arm/configs/tny_a9263_bootstrap_defconfig
+++ b/arch/arm/configs/tny_a9263_bootstrap_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9263=y
CONFIG_MACH_TNY_A9263=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x12000
diff --git a/arch/arm/configs/tny_a9263_defconfig b/arch/arm/configs/tny_a9263_defconfig
index e050b6d47c..a9a9159b6f 100644
--- a/arch/arm/configs/tny_a9263_defconfig
+++ b/arch/arm/configs/tny_a9263_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9263=y
CONFIG_MACH_TNY_A9263=y
CONFIG_CALAO_MOB_TNY_MD2=y
diff --git a/arch/arm/configs/tny_a9g20_defconfig b/arch/arm/configs/tny_a9g20_defconfig
index dc828a24d7..7372b2c3ec 100644
--- a/arch/arm/configs/tny_a9g20_defconfig
+++ b/arch/arm/configs/tny_a9g20_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G20=y
CONFIG_MACH_TNY_A9G20=y
CONFIG_CALAO_MOB_TNY_MD2=y
diff --git a/arch/arm/configs/usb_a9260_defconfig b/arch/arm/configs/usb_a9260_defconfig
index d87ebaae8e..1ebb0f9d0e 100644
--- a/arch/arm/configs/usb_a9260_defconfig
+++ b/arch/arm/configs/usb_a9260_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9260=y
CONFIG_MACH_USB_A9260=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
diff --git a/arch/arm/configs/usb_a9263_bootstrap_defconfig b/arch/arm/configs/usb_a9263_bootstrap_defconfig
index c922cc0342..893a0c0f79 100644
--- a/arch/arm/configs/usb_a9263_bootstrap_defconfig
+++ b/arch/arm/configs/usb_a9263_bootstrap_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9263=y
CONFIG_MACH_USB_A9263=y
CONFIG_AT91_BOOTSTRAP=y
diff --git a/arch/arm/configs/usb_a9263_defconfig b/arch/arm/configs/usb_a9263_defconfig
index 89726a4ae1..1ea6f718fb 100644
--- a/arch/arm/configs/usb_a9263_defconfig
+++ b/arch/arm/configs/usb_a9263_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9263=y
CONFIG_MACH_USB_A9263=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig
index 61412d854b..cca8ee6097 100644
--- a/arch/arm/configs/usb_a9g20_defconfig
+++ b/arch/arm/configs/usb_a9g20_defconfig
@@ -1,3 +1,4 @@
+CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9G20=y
CONFIG_MACH_USB_A9G20=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 37/50] ARM: omap: Add support for multi-arch
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (35 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 36/50] ARM: add multi-arch support Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 38/50] ARM: zynqmp: Add multi-arch support Sascha Hauer
` (12 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Kconfig | 18 +++++++++++++++---
arch/arm/configs/am335x_mlo_defconfig | 2 +-
arch/arm/configs/am35xx_pfc200_xload_defconfig | 2 +-
arch/arm/configs/archosg9_defconfig | 2 +-
arch/arm/configs/archosg9_xload_defconfig | 2 +-
.../omap3430_sdp3430_per_uart_defconfig | 2 +-
arch/arm/configs/omap3530_beagle_defconfig | 2 +-
.../configs/omap3530_beagle_per_uart_defconfig | 2 +-
.../configs/omap3530_beagle_xload_defconfig | 2 +-
arch/arm/configs/omap3_evm_defconfig | 2 +-
arch/arm/configs/omap_defconfig | 2 +-
arch/arm/configs/panda_defconfig | 2 +-
arch/arm/configs/panda_xload_defconfig | 2 +-
.../phytec-phycard-omap3-xload_defconfig | 2 +-
.../arm/configs/phytec-phycard-omap3_defconfig | 2 +-
.../phytec-phycard-omap4-xload_defconfig | 2 +-
.../arm/configs/phytec-phycard-omap4_defconfig | 2 +-
...phytec-phycore-omap4460-xload-mmc_defconfig | 2 +-
...hytec-phycore-omap4460-xload-nand_defconfig | 2 +-
.../configs/phytec-phycore-omap4460_defconfig | 2 +-
20 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 44055456ce..7ac24ba1de 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -32,6 +32,11 @@ config ARCH_STM32
Selected by both STM32 MCUs and MPUs to restrict driver
visibility.
+config ARCH_OMAP
+ bool
+ select HAS_DEBUG_LL
+ select GPIOLIB
+
choice
prompt "ARM system type"
@@ -140,10 +145,9 @@ config ARCH_NOMADIK
help
Support for the Nomadik platform by ST-Ericsson
-config ARCH_OMAP
+config ARCH_OMAP_SINGLE
bool "TI OMAP"
- select HAS_DEBUG_LL
- select GPIOLIB
+ select ARCH_OMAP
config ARCH_PXA
bool "Intel/Marvell PXA based"
@@ -271,6 +275,14 @@ config ARCH_IMX
select CPU_SUPPORTS_32BIT_KERNEL
select CPU_SUPPORTS_64BIT_KERNEL
+config ARCH_OMAP_MULTI
+ bool "TI OMAP"
+ depends on ARCH_MULTIARCH
+ select OMAP_MULTI_BOARDS
+ select ARCH_OMAP
+ select HAS_DEBUG_LL
+ select GPIOLIB
+
config ARCH_ROCKCHIP
bool "Rockchip RX3xxx"
depends on ARCH_MULTIARCH
diff --git a/arch/arm/configs/am335x_mlo_defconfig b/arch/arm/configs/am335x_mlo_defconfig
index 57602ba309..f2b722056b 100644
--- a/arch/arm/configs/am335x_mlo_defconfig
+++ b/arch/arm/configs/am335x_mlo_defconfig
@@ -1,4 +1,4 @@
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x1b400
CONFIG_OMAP_BUILD_IFT=y
CONFIG_OMAP_SERIALBOOT=y
diff --git a/arch/arm/configs/am35xx_pfc200_xload_defconfig b/arch/arm/configs/am35xx_pfc200_xload_defconfig
index 710e39ff61..4bc119f75b 100644
--- a/arch/arm/configs/am35xx_pfc200_xload_defconfig
+++ b/arch/arm/configs/am35xx_pfc200_xload_defconfig
@@ -1,4 +1,4 @@
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_OMAP_BUILD_IFT=y
CONFIG_OMAP_MULTI_BOARDS=y
CONFIG_MACH_WAGO_PFC_AM35XX=y
diff --git a/arch/arm/configs/archosg9_defconfig b/arch/arm/configs/archosg9_defconfig
index dd509fca72..288d4bda52 100644
--- a/arch/arm/configs/archosg9_defconfig
+++ b/arch/arm/configs/archosg9_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x8f000000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_OMAP4_USBBOOT=y
CONFIG_MACH_ARCHOSG9=y
CONFIG_THUMB2_BAREBOX=y
diff --git a/arch/arm/configs/archosg9_xload_defconfig b/arch/arm/configs/archosg9_xload_defconfig
index b6a0475d40..f90757d954 100644
--- a/arch/arm/configs/archosg9_xload_defconfig
+++ b/arch/arm/configs/archosg9_xload_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40300000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000
# CONFIG_OMAP_GPMC is not set
CONFIG_OMAP_BUILD_IFT=y
diff --git a/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig b/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
index 646a392b6b..b41176342f 100644
--- a/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
+++ b/arch/arm/configs/omap3430_sdp3430_per_uart_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40200000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_PROMPT="X-load 343x> "
CONFIG_SHELL_SIMPLE=y
diff --git a/arch/arm/configs/omap3530_beagle_defconfig b/arch/arm/configs/omap3530_beagle_defconfig
index e959bdfde3..d1f5669cb3 100644
--- a/arch/arm/configs/omap3530_beagle_defconfig
+++ b/arch/arm/configs/omap3530_beagle_defconfig
@@ -1,4 +1,4 @@
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_OMAP_MULTI_BOARDS=y
CONFIG_MACH_BEAGLE=y
CONFIG_THUMB2_BAREBOX=y
diff --git a/arch/arm/configs/omap3530_beagle_per_uart_defconfig b/arch/arm/configs/omap3530_beagle_per_uart_defconfig
index 2439bd955e..3a38011f3d 100644
--- a/arch/arm/configs/omap3530_beagle_per_uart_defconfig
+++ b/arch/arm/configs/omap3530_beagle_per_uart_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40200000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_PROMPT="X-load Beagle>"
CONFIG_SHELL_SIMPLE=y
# CONFIG_ERRNO_MESSAGES is not set
diff --git a/arch/arm/configs/omap3530_beagle_xload_defconfig b/arch/arm/configs/omap3530_beagle_xload_defconfig
index 0a47479f18..15984e129e 100644
--- a/arch/arm/configs/omap3530_beagle_xload_defconfig
+++ b/arch/arm/configs/omap3530_beagle_xload_defconfig
@@ -1,4 +1,4 @@
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_OMAP_BUILD_IFT=y
CONFIG_OMAP3_USBBOOT=y
CONFIG_OMAP_MULTI_BOARDS=y
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 8c5df029a7..22ac4b66ec 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40200000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_MACH_OMAP3EVM=y
CONFIG_AEABI=y
CONFIG_PROMPT="OMAP3_EVM> "
diff --git a/arch/arm/configs/omap_defconfig b/arch/arm/configs/omap_defconfig
index 433d9bdd7d..13b630a978 100644
--- a/arch/arm/configs/omap_defconfig
+++ b/arch/arm/configs/omap_defconfig
@@ -1,4 +1,4 @@
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
CONFIG_BAREBOX_UPDATE_AM33XX_NAND=y
CONFIG_BAREBOX_UPDATE_AM33XX_EMMC=y
diff --git a/arch/arm/configs/panda_defconfig b/arch/arm/configs/panda_defconfig
index b199e7990b..97118fb837 100644
--- a/arch/arm/configs/panda_defconfig
+++ b/arch/arm/configs/panda_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x8f000000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_MACH_PANDA=y
CONFIG_THUMB2_BAREBOX=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
diff --git a/arch/arm/configs/panda_xload_defconfig b/arch/arm/configs/panda_xload_defconfig
index bc33882c85..9203734dd6 100644
--- a/arch/arm/configs/panda_xload_defconfig
+++ b/arch/arm/configs/panda_xload_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40300000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
# CONFIG_OMAP_GPMC is not set
CONFIG_OMAP_BUILD_IFT=y
CONFIG_MACH_PANDA=y
diff --git a/arch/arm/configs/phytec-phycard-omap3-xload_defconfig b/arch/arm/configs/phytec-phycard-omap3-xload_defconfig
index 26a539f7f7..048f7c0bde 100644
--- a/arch/arm/configs/phytec-phycard-omap3-xload_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3-xload_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40200000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x0000f000
CONFIG_OMAP_BUILD_IFT=y
CONFIG_MACH_PCAAL1=y
diff --git a/arch/arm/configs/phytec-phycard-omap3_defconfig b/arch/arm/configs/phytec-phycard-omap3_defconfig
index a9abf12a13..fbcf5c6390 100644
--- a/arch/arm/configs/phytec-phycard-omap3_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap3_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x85000000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_MACH_PCAAL1=y
CONFIG_AEABI=y
CONFIG_MALLOC_SIZE=0x1000000
diff --git a/arch/arm/configs/phytec-phycard-omap4-xload_defconfig b/arch/arm/configs/phytec-phycard-omap4-xload_defconfig
index a1859140db..1761a15b72 100644
--- a/arch/arm/configs/phytec-phycard-omap4-xload_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap4-xload_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40300000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_OMAP_BUILD_IFT=y
CONFIG_MACH_PCAAXL2=y
CONFIG_THUMB2_BAREBOX=y
diff --git a/arch/arm/configs/phytec-phycard-omap4_defconfig b/arch/arm/configs/phytec-phycard-omap4_defconfig
index a0bb846a6d..ae3cfb751d 100644
--- a/arch/arm/configs/phytec-phycard-omap4_defconfig
+++ b/arch/arm/configs/phytec-phycard-omap4_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x8f000000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_MACH_PCAAXL2=y
CONFIG_AEABI=y
CONFIG_ARM_UNWIND=y
diff --git a/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig b/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig
index 19365a6fcd..8ffdd90789 100644
--- a/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460-xload-mmc_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40300000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000
CONFIG_OMAP_BUILD_IFT=y
CONFIG_MACH_PCM049=y
diff --git a/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig b/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig
index 14cab44b5d..66ee694542 100644
--- a/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460-xload-nand_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x40300000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xC000
CONFIG_OMAP_BUILD_IFT=y
CONFIG_MACH_PCM049=y
diff --git a/arch/arm/configs/phytec-phycore-omap4460_defconfig b/arch/arm/configs/phytec-phycore-omap4460_defconfig
index 7d5369cb23..a2362a0fce 100644
--- a/arch/arm/configs/phytec-phycore-omap4460_defconfig
+++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig
@@ -1,5 +1,5 @@
CONFIG_TEXT_BASE=0x8f000000
-CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP_SINGLE=y
CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x80000
CONFIG_MACH_PCM049=y
CONFIG_AEABI=y
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 38/50] ARM: zynqmp: Add multi-arch support
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (36 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 37/50] ARM: omap: Add support for multi-arch Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 39/50] ARM: i.MX: Add missing include Sascha Hauer
` (11 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Kconfig | 32 ++++++++++++++++----------------
arch/arm/include/asm/debug_ll.h | 6 ++++--
arch/arm/mach-zynqmp/zynqmp.c | 3 +++
common/Kconfig | 7 +++++++
4 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7ac24ba1de..a7b8b0da01 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -231,22 +231,6 @@ config ARCH_ZYNQ
select PBL_IMAGE
select GPIOLIB
-config ARCH_ZYNQMP
- bool "Xilinx ZynqMP-based boards"
- select CPU_V8
- select HAS_DEBUG_LL
- select HAVE_PBL_MULTI_IMAGES
- select ARM_SMCCC
- select COMMON_CLK
- select COMMON_CLK_OF_PROVIDER
- select CLKDEV_LOOKUP
- select GPIOLIB
- select OFDEVICE
- select OFTREE
- select RELOCATABLE
- select CPU_SUPPORTS_64BIT_KERNEL
- select HAS_MACB
-
config ARCH_ARM64_VIRT
bool "ARM64 QEMU Virt board"
select CPU_V8
@@ -296,6 +280,22 @@ config ARCH_ROCKCHIP
select HAVE_PBL_MULTI_IMAGES
select HAS_DEBUG_LL
+config ARCH_ZYNQMP
+ bool "Xilinx ZynqMP-based boards"
+ select CPU_V8
+ select HAS_DEBUG_LL
+ select HAVE_PBL_MULTI_IMAGES
+ select ARM_SMCCC
+ select COMMON_CLK
+ select COMMON_CLK_OF_PROVIDER
+ select CLKDEV_LOOKUP
+ select GPIOLIB
+ select OFDEVICE
+ select OFTREE
+ select RELOCATABLE
+ select CPU_SUPPORTS_64BIT_KERNEL
+ select HAS_MACB
+
source "arch/arm/cpu/Kconfig"
source "arch/arm/mach-at91/Kconfig"
source "arch/arm/mach-bcm283x/Kconfig"
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 7c1152c6d9..8005980f28 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -15,11 +15,13 @@
#include <mach/omap/debug_ll.h>
#endif
+#ifdef CONFIG_DEBUG_ZYNQMP_UART
+#include <mach/zynqmp/debug_ll.h>
+#endif
+
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
-#elif defined CONFIG_ARCH_ZYNQMP
-#include <mach/zynqmp/debug_ll.h>
#elif defined CONFIG_ARCH_MVEBU
#include <mach/mvebu/debug_ll.h>
#elif defined CONFIG_ARCH_DAVINCI
diff --git a/arch/arm/mach-zynqmp/zynqmp.c b/arch/arm/mach-zynqmp/zynqmp.c
index 312325956a..f86bda1693 100644
--- a/arch/arm/mach-zynqmp/zynqmp.c
+++ b/arch/arm/mach-zynqmp/zynqmp.c
@@ -147,6 +147,9 @@ static int zynqmp_init(void)
enum bootsource boot_src;
int boot_instance;
+ if (!of_machine_is_compatible("xlnx,zynqmp"))
+ return 0;
+
zynqmp_get_bootsource(&boot_src, &boot_instance);
bootsource_set_raw(boot_src, boot_instance);
diff --git a/common/Kconfig b/common/Kconfig
index eeb33f3042..c396c3a238 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1470,6 +1470,13 @@ config DEBUG_RPI4_MINI_UART
Say Y here if you want low-level debugging support on
RaspberryPi 4 board mini UART.
+config DEBUG_ZYNQMP_UART
+ bool "Zynqmp Debug UART"
+ depends on ARCH_ZYNQMP
+ help
+ Say Y here if you want kernel low-level debugging support
+ on Zynqmp.
+
config DEBUG_ERIZO
bool "Erizo ns16550 port"
depends on SOC_ERIZO
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 39/50] ARM: i.MX: Add missing include
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (37 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 38/50] ARM: zynqmp: Add multi-arch support Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 40/50] ARM: i.MX: move board selection into menu Sascha Hauer
` (10 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
atf.c needs MX8M_CAAM_BASE_ADDR which is defined in imx8m-regs.h.
Include that file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/atf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-imx/atf.c b/arch/arm/mach-imx/atf.c
index 39bc1e8bac..335cc7713f 100644
--- a/arch/arm/mach-imx/atf.c
+++ b/arch/arm/mach-imx/atf.c
@@ -7,6 +7,7 @@
#include <mach/imx/generic.h>
#include <mach/imx/xload.h>
#include <mach/imx/romapi.h>
+#include <mach/imx/imx8m-regs.h>
#include <soc/fsl/fsl_udc.h>
#include <soc/fsl/caam.h>
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 40/50] ARM: i.MX: move board selection into menu
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (38 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 39/50] ARM: i.MX: Add missing include Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 41/50] ARM: stm32mp: Only provide PUTC_LL() when activated Sascha Hauer
` (9 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Other multi-arch architectures show the boards in a submenu. Do likewise
for consistency.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 90a2c4ece0..ef0e5fc561 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -40,7 +40,7 @@ config MACH_FREESCALE_MX51_PDK_POWER
select DRIVER_SPI_IMX
select MFD_MC13XXX
-comment "Freescale i.MX System-on-Chip"
+menu "i.MX boards"
config ARCH_IMX1
bool
@@ -675,6 +675,8 @@ config MACH_ZII_IMX8MQ_DEV
endif
+endmenu
+
# ----------------------------------------------------------
menu "i.MX specific settings"
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 41/50] ARM: stm32mp: Only provide PUTC_LL() when activated
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (39 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 40/50] ARM: i.MX: move board selection into menu Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 42/50] ARM: stm32mp: Make safe for multi-arch Sascha Hauer
` (8 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
With multi-arch support we must make sure we provide exactly one
PUTC_LL() function as indicated by the "Kernel low-level debugging port"
Kconfig choice. Make sure that the stm32mp specific debug_ll.h only
provides PUTC_LL() when specified.
The stm32mp specific debug_ll.h also provides other functions needed
by board code regardless if the stm32mp debug_ll port is enabled or
not, so include it explicitly where needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/include/asm/debug_ll.h | 6 ++++--
common/Kconfig | 7 +++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 8005980f28..ba67c7e22d 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -19,6 +19,10 @@
#include <mach/zynqmp/debug_ll.h>
#endif
+#ifdef CONFIG_DEBUG_STM32MP_UART
+#include <mach/stm32mp/debug_ll.h>
+#endif
+
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
@@ -28,8 +32,6 @@
#include <mach/davinci/debug_ll.h>
#elif defined CONFIG_ARCH_BCM283X
#include <mach/bcm283x/debug_ll.h>
-#elif defined CONFIG_ARCH_STM32MP
-#include <mach/stm32mp/debug_ll.h>
#elif defined CONFIG_ARCH_ZYNQ
#include <mach/zynq/debug_ll.h>
#elif defined CONFIG_ARCH_VEXPRESS
diff --git a/common/Kconfig b/common/Kconfig
index c396c3a238..a21559bf2c 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1435,6 +1435,13 @@ config DEBUG_SOCFPGA_UART1
Say Y here if you want kernel low-level debugging support
on SOCFPGA(Arria 10) based platforms.
+config DEBUG_STM32MP_UART
+ bool "Use STM32MP UART4 for low-level debug"
+ depends on ARCH_STM32
+ help
+ Say Y here if you want kernel low-level debugging support
+ on STM32MP.
+
config DEBUG_RPI1_UART
bool "RaspberryPi 1 PL011 UART"
depends on ARCH_BCM283X
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 42/50] ARM: stm32mp: Make safe for multi-arch
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (40 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 41/50] ARM: stm32mp: Only provide PUTC_LL() when activated Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 43/50] ARM: stm32mp: Add multi-arch support Sascha Hauer
` (7 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Make sure stm32mp initcalls are only executed when running on
a stm32mp SoC.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-stm32mp/init.c | 20 +++++++++++++++++++-
arch/arm/mach-stm32mp/stm32image.c | 4 ++++
include/mach/stm32mp/stm32.h | 2 ++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-stm32mp/init.c b/arch/arm/mach-stm32mp/init.c
index d46762e0b7..b63c1be5be 100644
--- a/arch/arm/mach-stm32mp/init.c
+++ b/arch/arm/mach-stm32mp/init.c
@@ -297,11 +297,29 @@ static int setup_cpu_type(void)
return 0;
}
+static int __st32mp_soc;
+
+int stm32mp_soc(void)
+{
+ return __st32mp_soc;
+}
+
static int stm32mp_init(void)
{
+ if (of_machine_is_compatible("st,stm32mp135"))
+ __st32mp_soc = 32135;
+ else if (of_machine_is_compatible("st,stm32mp151"))
+ __st32mp_soc = 32151;
+ else if (of_machine_is_compatible("st,stm32mp153"))
+ __st32mp_soc = 32153;
+ else if (of_machine_is_compatible("st,stm32mp157"))
+ __st32mp_soc = 32157;
+ else
+ return 0;
+
setup_cpu_type();
setup_boot_mode();
return 0;
}
-core_initcall(stm32mp_init);
+postcore_initcall(stm32mp_init);
diff --git a/arch/arm/mach-stm32mp/stm32image.c b/arch/arm/mach-stm32mp/stm32image.c
index 7867418e6c..37d7c73120 100644
--- a/arch/arm/mach-stm32mp/stm32image.c
+++ b/arch/arm/mach-stm32mp/stm32image.c
@@ -7,6 +7,7 @@
#include <init.h>
#include <memory.h>
#include <linux/sizes.h>
+#include <mach/stm32mp/stm32.h>
#define BAREBOX_STAGE2_OFFSET 256
@@ -45,6 +46,9 @@ static struct image_handler image_handler_stm32_image_v1_handler = {
static int stm32mp_register_stm32image_image_handler(void)
{
+ if (!stm32mp_soc())
+ return 0;
+
return register_image_handler(&image_handler_stm32_image_v1_handler);
}
late_initcall(stm32mp_register_stm32image_image_handler);
diff --git a/include/mach/stm32mp/stm32.h b/include/mach/stm32mp/stm32.h
index adb898fa26..5ce93e5eb3 100644
--- a/include/mach/stm32mp/stm32.h
+++ b/include/mach/stm32mp/stm32.h
@@ -34,4 +34,6 @@
#define STM32_DDR_BASE 0xC0000000
#define STM32_DDR_SIZE SZ_1G
+int stm32mp_soc(void);
+
#endif /* _MACH_STM32_H_ */
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 43/50] ARM: stm32mp: Add multi-arch support
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (41 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 42/50] ARM: stm32mp: Make safe for multi-arch Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 44/50] ARM: vexpress: Drop unnecessary initcall Sascha Hauer
` (6 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
All preparations are done, move stm32mp architecture over to multi-arch
support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Kconfig | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a7b8b0da01..47f6ace294 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -161,22 +161,6 @@ config ARCH_SOCFPGA
select COMMON_CLK
select CLKDEV_LOOKUP
-config ARCH_STM32MP
- bool "STMicroelectronics STM32MP"
- select ARCH_STM32
- select CPU_V7
- select HAVE_PBL_MULTI_IMAGES
- select CLKDEV_LOOKUP
- select COMMON_CLK
- select COMMON_CLK_OF_PROVIDER
- select HAS_DEBUG_LL
- select HAVE_CLK
- select GPIOLIB
- select ARCH_HAS_RESET_CONTROLLER
- select ARM_AMBA
- select ARM_SMCCC
- select ARM_USE_COMPRESSED_DTB
-
config ARCH_VERSATILE
bool "ARM Versatile boards (ARM926EJ-S)"
select GPIOLIB
@@ -280,6 +264,22 @@ config ARCH_ROCKCHIP
select HAVE_PBL_MULTI_IMAGES
select HAS_DEBUG_LL
+config ARCH_STM32MP
+ bool "STMicroelectronics STM32MP"
+ select ARCH_STM32
+ select CPU_V7
+ select HAVE_PBL_MULTI_IMAGES
+ select CLKDEV_LOOKUP
+ select COMMON_CLK
+ select COMMON_CLK_OF_PROVIDER
+ select HAS_DEBUG_LL
+ select HAVE_CLK
+ select GPIOLIB
+ select ARCH_HAS_RESET_CONTROLLER
+ select ARM_AMBA
+ select ARM_SMCCC
+ select ARM_USE_COMPRESSED_DTB
+
config ARCH_ZYNQMP
bool "Xilinx ZynqMP-based boards"
select CPU_V8
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 44/50] ARM: vexpress: Drop unnecessary initcall
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (42 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 43/50] ARM: stm32mp: Add multi-arch support Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 45/50] ARM: vexpress: Only provide PUTC_LL() when activated Sascha Hauer
` (5 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Call vexpress_restart_register_feature() from vexpress_*init() to
get rid of an unnecessary initcall.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-vexpress/reset.c | 9 ++++-----
arch/arm/mach-vexpress/v2m.c | 5 +++--
include/mach/vexpress/vexpress.h | 6 ++++++
3 files changed, 13 insertions(+), 7 deletions(-)
create mode 100644 include/mach/vexpress/vexpress.h
diff --git a/arch/arm/mach-vexpress/reset.c b/arch/arm/mach-vexpress/reset.c
index f0fa75330e..0d626db7d7 100644
--- a/arch/arm/mach-vexpress/reset.c
+++ b/arch/arm/mach-vexpress/reset.c
@@ -9,7 +9,7 @@
#include <init.h>
#include <restart.h>
#include <linux/amba/sp805.h>
-
+#include <mach/vexpress/vexpress.h>
#include <mach/vexpress/devices.h>
void __iomem *v2m_wdt_base;
@@ -22,10 +22,9 @@ static void __noreturn vexpress_reset_soc(struct restart_handler *rst)
hang();
}
-static int restart_register_feature(void)
+void vexpress_restart_register_feature(void __iomem *base)
{
- restart_handler_register_fn("soc-wdt", vexpress_reset_soc);
+ v2m_wdt_base = base;
- return 0;
+ restart_handler_register_fn("soc-wdt", vexpress_reset_soc);
}
-coredevice_initcall(restart_register_feature);
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 9181d7e2ef..5c4c2478cf 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -8,6 +8,7 @@
#include <io.h>
#include <asm/hardware/sp810.h>
#include <mach/vexpress/devices.h>
+#include <mach/vexpress/vexpress.h>
void __iomem *v2m_sysreg_base;
@@ -26,12 +27,12 @@ static void v2m_sysctl_init(void __iomem *base)
void vexpress_a9_legacy_init(void)
{
- v2m_wdt_base = IOMEM(0x1000f000);
v2m_sysctl_init(IOMEM(0x10001000));
+ vexpress_restart_register_feature(IOMEM(0x1000f000));
}
void vexpress_init(void)
{
- v2m_wdt_base = IOMEM(0x1c0f0000);
v2m_sysctl_init(IOMEM(0x1c020000));
+ vexpress_restart_register_feature(IOMEM(0x1c0f0000));
}
diff --git a/include/mach/vexpress/vexpress.h b/include/mach/vexpress/vexpress.h
new file mode 100644
index 0000000000..768a3ab07a
--- /dev/null
+++ b/include/mach/vexpress/vexpress.h
@@ -0,0 +1,6 @@
+#ifndef __MACH_VEXPRESS_VEXPRESS_H
+#define __MACH_VEXPRESS_VEXPRESS_H
+
+void vexpress_restart_register_feature(void __iomem *base);
+
+#endif /* __MACH_VEXPRESS_VEXPRESS_H */
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 45/50] ARM: vexpress: Only provide PUTC_LL() when activated
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (43 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 44/50] ARM: vexpress: Drop unnecessary initcall Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 46/50] ARM: vexpress: Add multi-arch support Sascha Hauer
` (4 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Add a Kconfig symbol for the vexpress debug_ll UART port
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/include/asm/debug_ll.h | 6 ++++--
common/Kconfig | 7 +++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index ba67c7e22d..81602d93d3 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -23,6 +23,10 @@
#include <mach/stm32mp/debug_ll.h>
#endif
+#ifdef CONFIG_DEBUG_VEXPRESS_UART
+#include <mach/vexpress/debug_ll.h>
+#endif
+
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
@@ -34,8 +38,6 @@
#include <mach/bcm283x/debug_ll.h>
#elif defined CONFIG_ARCH_ZYNQ
#include <mach/zynq/debug_ll.h>
-#elif defined CONFIG_ARCH_VEXPRESS
-#include <mach/vexpress/debug_ll.h>
#elif defined CONFIG_ARCH_VERSATILE
#include <mach/versatile/debug_ll.h>
#elif defined CONFIG_ARCH_LAYERSCAPE
diff --git a/common/Kconfig b/common/Kconfig
index a21559bf2c..9234f1239e 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1357,6 +1357,13 @@ config DEBUG_IMX8M_UART
Say Y here if you want barebox low-level debugging support
on i.MX8M*.
+config DEBUG_VEXPRESS_UART
+ bool "Vexpress Debug UART"
+ depends on ARCH_VEXPRESS
+ help
+ Say Y here if you want barebox low-level debugging support
+ on Vexpress.
+
config DEBUG_VF610_UART
bool "VF610 Debug UART"
depends on ARCH_VF610
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 46/50] ARM: vexpress: Add multi-arch support
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (44 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 45/50] ARM: vexpress: Only provide PUTC_LL() when activated Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 47/50] ARM: bcm283x: Only provide PUTC_LL() when activated Sascha Hauer
` (3 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Nothing left to do, just move the vexpress Kconfig symbols
over to multi-arch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Kconfig | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 47f6ace294..789365e69b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -167,20 +167,6 @@ config ARCH_VERSATILE
select HAVE_CLK
select HAS_DEBUG_LL
-config ARCH_VEXPRESS
- bool "ARM Vexpress & virt boards"
- select HAS_DEBUG_LL
- select CPU_V7
- select ARM_AMBA
- select AMBA_SP804
- select CLKDEV_LOOKUP
- select COMMON_CLK
- select COMMON_CLK_OF_PROVIDER
- select OFTREE
- select OFDEVICE
- select RELOCATABLE
- select HAVE_PBL_MULTI_IMAGES
-
config ARCH_TEGRA
bool "NVIDIA Tegra"
select CPU_V7
@@ -280,6 +266,20 @@ config ARCH_STM32MP
select ARM_SMCCC
select ARM_USE_COMPRESSED_DTB
+config ARCH_VEXPRESS
+ bool "ARM Vexpress & virt boards"
+ select HAS_DEBUG_LL
+ select CPU_V7
+ select ARM_AMBA
+ select AMBA_SP804
+ select CLKDEV_LOOKUP
+ select COMMON_CLK
+ select COMMON_CLK_OF_PROVIDER
+ select OFTREE
+ select OFDEVICE
+ select RELOCATABLE
+ select HAVE_PBL_MULTI_IMAGES
+
config ARCH_ZYNQMP
bool "Xilinx ZynqMP-based boards"
select CPU_V8
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 47/50] ARM: bcm283x: Only provide PUTC_LL() when activated
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (45 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 46/50] ARM: vexpress: Add multi-arch support Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 48/50] ARM: bcm283x: Add multi-arch support Sascha Hauer
` (2 subsequent siblings)
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/raspberry-pi/lowlevel.c | 1 +
arch/arm/include/asm/debug_ll.h | 6 ++++--
common/Kconfig | 7 +++++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c
index 449dfa4575..742f177dec 100644
--- a/arch/arm/boards/raspberry-pi/lowlevel.c
+++ b/arch/arm/boards/raspberry-pi/lowlevel.c
@@ -7,6 +7,7 @@
#include <asm/unaligned.h>
#include <mach/bcm283x/platform.h>
#include <debug_ll.h>
+#include <mach/bcm283x/debug_ll.h>
#include <mach/bcm283x/mbox.h>
#include <of.h>
diff --git a/arch/arm/include/asm/debug_ll.h b/arch/arm/include/asm/debug_ll.h
index 81602d93d3..a1d5161ccf 100644
--- a/arch/arm/include/asm/debug_ll.h
+++ b/arch/arm/include/asm/debug_ll.h
@@ -27,6 +27,10 @@
#include <mach/vexpress/debug_ll.h>
#endif
+#ifdef CONFIG_DEBUG_BCM283X_UART
+#include <mach/bcm283x/debug_ll.h>
+#endif
+
#ifdef CONFIG_DEBUG_QEMU_ARM64_VIRT
#define DEBUG_LL_UART_ADDR 0x9000000
#include <debug_ll/pl011.h>
@@ -34,8 +38,6 @@
#include <mach/mvebu/debug_ll.h>
#elif defined CONFIG_ARCH_DAVINCI
#include <mach/davinci/debug_ll.h>
-#elif defined CONFIG_ARCH_BCM283X
-#include <mach/bcm283x/debug_ll.h>
#elif defined CONFIG_ARCH_ZYNQ
#include <mach/zynq/debug_ll.h>
#elif defined CONFIG_ARCH_VERSATILE
diff --git a/common/Kconfig b/common/Kconfig
index 9234f1239e..57fe5f7886 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1258,6 +1258,9 @@ config DEBUG_ROCKCHIP_UART
config DEBUG_OMAP_UART
bool
+config DEBUG_BCM283X_UART
+ bool
+
choice
prompt "Kernel low-level debugging port"
depends on DEBUG_LL
@@ -1452,6 +1455,7 @@ config DEBUG_STM32MP_UART
config DEBUG_RPI1_UART
bool "RaspberryPi 1 PL011 UART"
depends on ARCH_BCM283X
+ select DEBUG_BCM283X_UART
help
Say Y here if you want low-level debugging support on
RaspberryPi 1 boards.
@@ -1466,6 +1470,7 @@ config DEBUG_AT91_UART
config DEBUG_RPI2_3_UART
bool "RaspberryPi 2/3 PL011 UART"
depends on ARCH_BCM283X
+ select DEBUG_BCM283X_UART
help
Say Y here if you want low-level debugging support on
RaspberryPi 2 and 3 boards.
@@ -1473,6 +1478,7 @@ config DEBUG_RPI2_3_UART
config DEBUG_RPI3_MINI_UART
bool "RaspberryPi 3 mini UART"
depends on ARCH_BCM283X
+ select DEBUG_BCM283X_UART
help
Say Y here if you want low-level debugging support on
RaspberryPi 3 board mini UART.
@@ -1480,6 +1486,7 @@ config DEBUG_RPI3_MINI_UART
config DEBUG_RPI4_MINI_UART
bool "RaspberryPi 4 mini UART"
depends on ARCH_BCM283X
+ select DEBUG_BCM283X_UART
help
Say Y here if you want low-level debugging support on
RaspberryPi 4 board mini UART.
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 48/50] ARM: bcm283x: Add multi-arch support
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (46 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 47/50] ARM: bcm283x: Only provide PUTC_LL() when activated Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 49/50] ARM: Add multi_v7_defconfig Sascha Hauer
2023-03-03 9:21 ` [PATCH 50/50] ARM: Add multi_v8_defconfig Sascha Hauer
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
Enable multi-arch support for bcm0283x
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/Kconfig | 33 +++++++++++------------
arch/arm/boards/raspberry-pi/rpi-common.c | 6 +++++
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 789365e69b..abe649de49 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -52,23 +52,6 @@ config ARCH_AT91
select HAVE_CLK
select COMMON_CLK_AT91 if COMMON_CLK_OF_PROVIDER
-
-config ARCH_BCM283X
- bool "Broadcom BCM283x based boards"
- select GPIOLIB
- select CLKDEV_LOOKUP
- select COMMON_CLK
- select COMMON_CLK_OF_PROVIDER
- select CLOCKSOURCE_BCM283X
- select ARM_AMBA
- select HAS_DEBUG_LL
- select RELOCATABLE
- select OFTREE
- select OFDEVICE
- select HAVE_PBL_MULTI_IMAGES
- select CPU_SUPPORTS_32BIT_KERNEL
- select CPU_SUPPORTS_64BIT_KERNEL
-
config ARCH_CLPS711X
bool "Cirrus Logic EP711x/EP721x/EP731x"
select CLKDEV_LOOKUP
@@ -216,6 +199,22 @@ config ARCH_ARM64_VIRT
endchoice
+config ARCH_BCM283X
+ bool "Broadcom BCM283x based boards"
+ select GPIOLIB
+ select CLKDEV_LOOKUP
+ select COMMON_CLK
+ select COMMON_CLK_OF_PROVIDER
+ select CLOCKSOURCE_BCM283X
+ select ARM_AMBA
+ select HAS_DEBUG_LL
+ select RELOCATABLE
+ select OFTREE
+ select OFDEVICE
+ select HAVE_PBL_MULTI_IMAGES
+ select CPU_SUPPORTS_32BIT_KERNEL
+ select CPU_SUPPORTS_64BIT_KERNEL
+
config ARCH_IMX
bool "Freescale iMX-based"
depends on ARCH_MULTIARCH
diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 367033c02a..3ed4510296 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -161,6 +161,12 @@ static int rpi_mem_init(void)
{
ssize_t size;
+ if (!of_machine_is_compatible("brcm,bcm2837") &&
+ !of_machine_is_compatible("brcm,bcm2835") &&
+ !of_machine_is_compatible("brcm,bcm2711") &&
+ !of_machine_is_compatible("brcm,bcm2836"))
+ return 0;
+
size = rpi_get_arm_mem();
if (size < 0) {
printf("could not query ARM memory size\n");
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 49/50] ARM: Add multi_v7_defconfig
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (47 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 48/50] ARM: bcm283x: Add multi-arch support Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
2023-03-03 9:21 ` [PATCH 50/50] ARM: Add multi_v8_defconfig Sascha Hauer
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
This adds a multi_v7_defconfig that includes support for:
- i.MX
- omap
- Rockchip
- bcm283x
- vexpress
- STM32MP
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/configs/multi_v7_defconfig | 361 ++++++++++++++++++++++++++++
1 file changed, 361 insertions(+)
create mode 100644 arch/arm/configs/multi_v7_defconfig
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
new file mode 100644
index 0000000000..d83e503671
--- /dev/null
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -0,0 +1,361 @@
+CONFIG_ARCH_BCM283X=y
+CONFIG_ARCH_IMX=y
+CONFIG_ARCH_OMAP_MULTI=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_ARCH_STM32MP=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_CACHE_L2X0=y
+CONFIG_MACH_RPI=y
+CONFIG_MACH_RPI2=y
+CONFIG_MACH_RPI3=y
+CONFIG_MACH_RPI_CM3=y
+CONFIG_MACH_RPI4=y
+CONFIG_MACH_KINDLE_MX50=y
+CONFIG_MACH_CCMX51=y
+CONFIG_MACH_EFIKA_MX_SMARTBOOK=y
+CONFIG_MACH_FREESCALE_MX51_PDK=y
+CONFIG_MACH_CCMX53=y
+CONFIG_MACH_FREESCALE_MX53_LOCO=y
+CONFIG_MACH_GUF_VINCELL=y
+CONFIG_MACH_TX53=y
+CONFIG_MACH_TQMA53=y
+CONFIG_MACH_FREESCALE_MX53_VMX53=y
+CONFIG_MACH_ZII_RDU1=y
+CONFIG_MACH_ADVANTECH_ROM_742X=y
+CONFIG_MACH_NITROGEN6=y
+CONFIG_MACH_CM_FX6=y
+CONFIG_MACH_REALQ7=y
+CONFIG_MACH_DFI_FS700_M60=y
+CONFIG_MACH_DIGI_CCIMX6ULSBCPRO=y
+CONFIG_MACH_ELTEC_HIPERCAM=y
+CONFIG_MACH_EMBEDSKY_E9=y
+CONFIG_MACH_EMBEST_MARSBOARD=y
+CONFIG_MACH_EMBEST_RIOTBOARD=y
+CONFIG_MACH_SABRELITE=y
+CONFIG_MACH_SABRESD=y
+CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB=y
+CONFIG_MACH_UDOO=y
+CONFIG_MACH_UDOO_NEO=y
+CONFIG_MACH_GUF_SANTARO=y
+CONFIG_MACH_GW_VENTANA=y
+CONFIG_MACH_GRINN_LITEBOARD=y
+CONFIG_MACH_TX6X=y
+CONFIG_MACH_KONTRON_SAMX6I=y
+CONFIG_MACH_NOVENA=y
+CONFIG_MACH_NXP_IMX6ULL_EVK=y
+CONFIG_MACH_PHYTEC_SOM_IMX6=y
+CONFIG_MACH_PROTONIC_IMX6=y
+CONFIG_MACH_SKOV_IMX6=y
+CONFIG_MACH_SOLIDRUN_MICROSOM=y
+CONFIG_MACH_TECHNEXION_PICO_HOBBIT=y
+CONFIG_MACH_TECHNEXION_WANDBOARD=y
+CONFIG_MACH_TQMA6X=y
+CONFIG_MACH_VARISCITE_MX6=y
+CONFIG_MACH_WEBASTO_CCBV2=y
+CONFIG_MACH_GK802=y
+CONFIG_MACH_ZII_RDU2=y
+CONFIG_MACH_MEERKAT96=y
+CONFIG_MACH_AC_SXB=y
+CONFIG_MACH_WARP7=y
+CONFIG_MACH_FREESCALE_MX7_SABRESD=y
+CONFIG_MACH_PHYTEC_PHYCORE_IMX7=y
+CONFIG_MACH_ZII_IMX7D_DEV=y
+CONFIG_MACH_KAMSTRUP_MX7_CONCENTRATOR=y
+CONFIG_MACH_VF610_TWR=y
+CONFIG_MACH_ZII_VF610_DEV=y
+CONFIG_IMX_IIM_FUSE_BLOW=y
+CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
+CONFIG_BAREBOX_UPDATE_AM33XX_NAND=y
+CONFIG_BAREBOX_UPDATE_AM33XX_EMMC=y
+CONFIG_MACH_AFI_GF=y
+CONFIG_MACH_BEAGLE=y
+CONFIG_MACH_BEAGLEBONE=y
+CONFIG_MACH_MYIRTECH_X335X=y
+CONFIG_MACH_PHYTEC_SOM_AM335X=y
+CONFIG_MACH_VSCOM_BALTOS=y
+CONFIG_MACH_WAGO_PFC_AM35XX=y
+CONFIG_MACH_RADXA_ROCK=y
+CONFIG_MACH_PHYTEC_SOM_RK3288=y
+CONFIG_MACH_STM32MP13XX_DK=y
+CONFIG_MACH_STM32MP15XX_DKX=y
+CONFIG_MACH_LXA_MC1=y
+CONFIG_MACH_SEEED_ODYSSEY=y
+CONFIG_MACH_STM32MP15X_EV1=y
+CONFIG_MACH_PROTONIC_STM32MP1=y
+CONFIG_MACH_PHYTEC_PHYCORE_STM32MP1=y
+CONFIG_MACH_VEXPRESS=y
+CONFIG_MACH_VIRT=y
+CONFIG_AEABI=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_PSCI=y
+CONFIG_MMU=y
+CONFIG_MALLOC_SIZE=0x0
+CONFIG_MALLOC_TLSF=y
+CONFIG_KALLSYMS=y
+CONFIG_PROMPT="barebox> "
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+# CONFIG_TIMESTAMP is not set
+CONFIG_BOOTM_SHOW_TYPE=y
+CONFIG_BOOTM_VERBOSE=y
+CONFIG_BOOTM_INITRD=y
+CONFIG_BOOTM_OFTREE=y
+CONFIG_BOOTM_OFTREE_UIMAGE=y
+CONFIG_BOOTM_AIMAGE=y
+CONFIG_BLSPEC=y
+CONFIG_CONSOLE_ACTIVATE_NONE=y
+CONFIG_CONSOLE_ALLOW_COLOR=y
+CONFIG_PBL_CONSOLE=y
+CONFIG_CONSOLE_RATP=y
+CONFIG_RATP_CMD_I2C=y
+CONFIG_RATP_CMD_GPIO=y
+CONFIG_PARTITION_DISK_EFI=y
+# CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE is not set
+# CONFIG_PARTITION_DISK_EFI_GPT_COMPARE is not set
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE=y
+CONFIG_STATE=y
+CONFIG_BOOTCHOOSER=y
+CONFIG_RESET_SOURCE=y
+CONFIG_MACHINE_ID=y
+CONFIG_FASTBOOT_CMD_OEM=y
+CONFIG_CMD_DMESG=y
+CONFIG_LONGHELP=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_IMD=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_ARM_MMUINFO=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_MMC_EXTCSD=y
+CONFIG_CMD_FCB=y
+# CONFIG_CMD_BOOTU is not set
+CONFIG_CMD_BOOTZ=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_BOOTCHOOSER=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_UBIFORMAT=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_DEFAULTENV=y
+CONFIG_CMD_LOADENV=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_MAGICVAR=y
+CONFIG_CMD_MAGICVAR_HELP=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_FILETYPE=y
+CONFIG_CMD_LN=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_SHA1SUM=y
+CONFIG_CMD_SHA224SUM=y
+CONFIG_CMD_SHA256SUM=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_LET=y
+CONFIG_CMD_MSLEEP=y
+CONFIG_CMD_READF=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_MENUTREE=y
+CONFIG_CMD_SPLASH=y
+CONFIG_CMD_FBTEST=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_CRC=y
+CONFIG_CMD_CRC_CMP=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_MM=y
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DETECT=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_NANDTEST=y
+CONFIG_CMD_POWEROFF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_USBGADGET=y
+CONFIG_CMD_WD=y
+CONFIG_CMD_BAREBOX_UPDATE=y
+CONFIG_CMD_OF_DIFF=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_DISPLAY_TIMINGS=y
+CONFIG_CMD_OF_FIXUP_STATUS=y
+CONFIG_CMD_OF_OVERLAY=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_STATE=y
+CONFIG_NET=y
+CONFIG_NET_NFS=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_FASTBOOT=y
+CONFIG_OF_BAREBOX_DRIVERS=y
+CONFIG_AIODEV=y
+CONFIG_STM32_ADC=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_DRIVER_SERIAL_STM32=y
+CONFIG_DRIVER_SERIAL_NS16550=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_DRIVER_NET_CPSW=y
+CONFIG_DRIVER_NET_DAVINCI_EMAC=y
+CONFIG_DRIVER_NET_DESIGNWARE_STM32=y
+CONFIG_DRIVER_NET_FEC_IMX=y
+CONFIG_DRIVER_NET_SMC91111=y
+CONFIG_MICREL_PHY=y
+CONFIG_REALTEK_PHY=y
+CONFIG_SMSC_PHY=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_MDIO_GPIO=y
+CONFIG_MDIO_BUS_MUX_GPIO=y
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
+CONFIG_NET_USB_SMSC95XX=y
+CONFIG_DRIVER_SPI_OMAP3=y
+CONFIG_DRIVER_SPI_STM32=y
+CONFIG_I2C_GPIO=y
+CONFIG_I2C_OMAP=y
+CONFIG_I2C_STM32=y
+CONFIG_I2C_MUX=y
+CONFIG_MTD=y
+CONFIG_MTD_RAW_DEVICE=y
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_DATAFLASH=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SST25L=y
+CONFIG_DRIVER_CFI=y
+CONFIG_NAND=y
+CONFIG_NAND_ALLOW_ERASE_BAD=y
+CONFIG_NAND_IMX=y
+CONFIG_NAND_MXS=y
+CONFIG_NAND_OMAP_GPMC=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_DISK_AHCI=y
+CONFIG_DISK_AHCI_IMX=y
+CONFIG_DISK_INTF_PLATFORM_IDE=y
+CONFIG_DISK_PATA_IMX=y
+CONFIG_USB_HOST=y
+CONFIG_USB_IMX_CHIPIDEA=y
+CONFIG_USB_DWC2_HOST=y
+CONFIG_USB_DWC2_GADGET=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_ULPI=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DFU=y
+CONFIG_USB_GADGET_SERIAL=y
+CONFIG_USB_GADGET_FASTBOOT=y
+CONFIG_USB_MUSB=y
+CONFIG_USB_MUSB_AM335X=y
+CONFIG_USB_MUSB_HOST=y
+CONFIG_USB_MUSB_GADGET=y
+CONFIG_VIDEO=y
+CONFIG_DRIVER_VIDEO_FB_SSD1307=y
+CONFIG_DRIVER_VIDEO_STM32_LTDC=y
+CONFIG_DRIVER_VIDEO_IMX_IPUV3=y
+CONFIG_DRIVER_VIDEO_IMX_IPUV3_LVDS=y
+CONFIG_DRIVER_VIDEO_IMX_IPUV3_HDMI=y
+CONFIG_DRIVER_VIDEO_IMX_IPUV3_PARALLEL=y
+CONFIG_DRIVER_VIDEO_SIMPLEFB=y
+CONFIG_DRIVER_VIDEO_EDID=y
+CONFIG_DRIVER_VIDEO_BACKLIGHT=y
+CONFIG_DRIVER_VIDEO_BACKLIGHT_PWM=y
+CONFIG_DRIVER_VIDEO_SIMPLE_PANEL=y
+CONFIG_MCI=y
+CONFIG_MCI_STARTUP=y
+CONFIG_MCI_MMC_BOOT_PARTITIONS=y
+CONFIG_MCI_DW=y
+CONFIG_MCI_DW_PIO=y
+CONFIG_MCI_BCM283X=y
+CONFIG_MCI_BCM283X_SDHOST=y
+CONFIG_MCI_IMX_ESDHC=y
+CONFIG_MCI_OMAP_HSMMC=y
+CONFIG_MCI_MMCI=y
+CONFIG_MCI_STM32_SDMMC2=y
+CONFIG_COMMON_CLK_SCMI=y
+CONFIG_MFD_DA9063=y
+CONFIG_MFD_MC34704=y
+CONFIG_MFD_MC9SDZ60=y
+CONFIG_MFD_STMPE=y
+CONFIG_MFD_STPMIC1=y
+CONFIG_MFD_STM32_TIMERS=y
+CONFIG_STATE_DRV=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_PWM=y
+CONFIG_LED_GPIO_OF=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_EEPROM_AT25=y
+CONFIG_EEPROM_AT24=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_INPUT_SPECIALKEYS=y
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_POLLER=y
+CONFIG_WATCHDOG_IMX=y
+CONFIG_WATCHDOG_OMAP=y
+CONFIG_STM32_IWDG_WATCHDOG=y
+CONFIG_STPMIC1_WATCHDOG=y
+CONFIG_PWM=y
+CONFIG_PWM_IMX=y
+CONFIG_PWM_STM32=y
+CONFIG_HWRNG=y
+CONFIG_HWRNG_STM32=y
+CONFIG_HW_RANDOM_VIRTIO=y
+CONFIG_MXS_APBH_DMA=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_RASPBERRYPI_EXP=y
+CONFIG_GPIO_STMPE=y
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_IMX_OCOTP_WRITE=y
+CONFIG_STM32_BSEC=y
+CONFIG_BUS_OMAP_GPMC=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED=y
+CONFIG_REGULATOR_STM32_PWR=y
+CONFIG_REGULATOR_STM32_VREFBUF=y
+CONFIG_REGULATOR_STPMIC1=y
+CONFIG_REGULATOR_ARM_SCMI=y
+CONFIG_REMOTEPROC=y
+CONFIG_STM32_REMOTEPROC=y
+CONFIG_ARM_SCMI_PROTOCOL=y
+CONFIG_GENERIC_PHY=y
+CONFIG_USB_NOP_XCEIV=y
+CONFIG_PHY_STM32_USBPHYC=y
+CONFIG_SYSCON_REBOOT_MODE=y
+CONFIG_POWER_RESET_SYSCON=y
+CONFIG_RESET_STM32=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_FS_CRAMFS=y
+CONFIG_FS_EXT4=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_TFTP_MAX_WINDOW_SIZE=8
+CONFIG_FS_NFS=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
+CONFIG_FS_UBIFS=y
+CONFIG_FS_UBIFS_COMPRESSION_LZO=y
+CONFIG_FS_UBIFS_COMPRESSION_ZLIB=y
+CONFIG_FS_UBIFS_COMPRESSION_ZSTD=y
+CONFIG_FS_BPKFS=y
+CONFIG_FS_UIMAGEFS=y
+CONFIG_FS_PSTORE=y
+CONFIG_FS_PSTORE_CONSOLE=y
+CONFIG_FS_PSTORE_RAMOOPS=y
+CONFIG_FS_SQUASHFS=y
+CONFIG_FS_RATP=y
+CONFIG_PNG=y
+CONFIG_DIGEST_SHA1_ARM=y
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread
* [PATCH 50/50] ARM: Add multi_v8_defconfig
2023-03-03 9:20 [PATCH 00/50] ARM: multi-arch support Sascha Hauer
` (48 preceding siblings ...)
2023-03-03 9:21 ` [PATCH 49/50] ARM: Add multi_v7_defconfig Sascha Hauer
@ 2023-03-03 9:21 ` Sascha Hauer
49 siblings, 0 replies; 51+ messages in thread
From: Sascha Hauer @ 2023-03-03 9:21 UTC (permalink / raw)
To: Barebox List
This adds a multi_v8_defconfig which builds all SoCs currently
supporting multi-arch which are i.MX, Zynqmp and Rockchip. The
features are merged from the correspondig defconfig files.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/configs/multi_v8_defconfig | 205 ++++++++++++++++++++++++++++
1 file changed, 205 insertions(+)
create mode 100644 arch/arm/configs/multi_v8_defconfig
diff --git a/arch/arm/configs/multi_v8_defconfig b/arch/arm/configs/multi_v8_defconfig
new file mode 100644
index 0000000000..f9782a2b2a
--- /dev/null
+++ b/arch/arm/configs/multi_v8_defconfig
@@ -0,0 +1,205 @@
+CONFIG_ARCH_IMX=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_ARCH_ZYNQMP=y
+CONFIG_MACH_INNOCOMM_WB15=y
+CONFIG_MACH_MNT_REFORM=y
+CONFIG_MACH_NXP_IMX8MM_EVK=y
+CONFIG_MACH_NXP_IMX8MN_EVK=y
+CONFIG_MACH_NXP_IMX8MP_EVK=y
+CONFIG_MACH_NXP_IMX8MQ_EVK=y
+CONFIG_MACH_PHYTEC_SOM_IMX8MQ=y
+CONFIG_MACH_POLYHEX_DEBIX=y
+CONFIG_MACH_PROTONIC_IMX8M=y
+CONFIG_MACH_TQ_MBA8MPXL=y
+CONFIG_MACH_VARISCITE_DT8MCUSTOMBOARD_IMX8MP=y
+CONFIG_MACH_ZII_IMX8MQ_DEV=y
+CONFIG_IMX_IIM=y
+CONFIG_MACH_RK3568_EVB=y
+CONFIG_MACH_RK3568_BPI_R2PRO=y
+CONFIG_MACH_PINE64_QUARTZ64=y
+CONFIG_MACH_RADXA_ROCK3=y
+CONFIG_MACH_XILINX_ZCU104=y
+CONFIG_MACH_XILINX_ZCU106=y
+CONFIG_BOARD_ARM_GENERIC_DT=y
+CONFIG_64BIT=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_ARM_PSCI_CLIENT=y
+CONFIG_MMU=y
+CONFIG_MALLOC_SIZE=0x0
+CONFIG_MALLOC_TLSF=y
+CONFIG_KALLSYMS=y
+CONFIG_PROMPT="barebox> "
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+CONFIG_BOOTM_SHOW_TYPE=y
+CONFIG_BOOTM_VERBOSE=y
+CONFIG_BOOTM_INITRD=y
+CONFIG_BOOTM_OFTREE=y
+CONFIG_BOOTM_OFTREE_UIMAGE=y
+CONFIG_BOOTM_AIMAGE=y
+CONFIG_BLSPEC=y
+CONFIG_CONSOLE_ACTIVATE_NONE=y
+CONFIG_CONSOLE_ALLOW_COLOR=y
+CONFIG_PBL_CONSOLE=y
+CONFIG_CONSOLE_RATP=y
+CONFIG_PARTITION_DISK_EFI=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_STATE=y
+CONFIG_BOOTCHOOSER=y
+CONFIG_RESET_SOURCE=y
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_CMD_DMESG=y
+CONFIG_LONGHELP=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_IMD=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_MMC_EXTCSD=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_BOOTCHOOSER=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_DEFAULTENV=y
+CONFIG_CMD_LOADENV=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_MAGICVAR=y
+CONFIG_CMD_MAGICVAR_HELP=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_FILETYPE=y
+CONFIG_CMD_LN=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_SHA1SUM=y
+CONFIG_CMD_SHA224SUM=y
+CONFIG_CMD_SHA256SUM=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_LET=y
+CONFIG_CMD_MSLEEP=y
+CONFIG_CMD_READF=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_MENUTREE=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_CRC=y
+CONFIG_CMD_CRC_CMP=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_MM=y
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DETECT=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_SMC=y
+CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_USBGADGET=y
+CONFIG_CMD_WD=y
+CONFIG_CMD_BAREBOX_UPDATE=y
+CONFIG_CMD_FIRMWARELOAD=y
+CONFIG_CMD_OF_DIFF=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_DISPLAY_TIMINGS=y
+CONFIG_CMD_OF_OVERLAY=y
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_TIME=y
+CONFIG_NET=y
+CONFIG_NET_NFS=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_OF_BAREBOX_DRIVERS=y
+CONFIG_OF_BAREBOX_ENV_IN_FS=y
+CONFIG_OF_OVERLAY_LIVE=y
+CONFIG_SERIAL_DEV_BUS=y
+CONFIG_DRIVER_SERIAL_NS16550=y
+CONFIG_DRIVER_SERIAL_CADENCE=y
+CONFIG_DRIVER_NET_DESIGNWARE_IMX8=y
+CONFIG_DRIVER_NET_DESIGNWARE_ROCKCHIP=y
+CONFIG_DRIVER_NET_FEC_IMX=y
+CONFIG_DRIVER_NET_MACB=y
+CONFIG_DP83867_PHY=y
+CONFIG_MICREL_PHY=y
+CONFIG_REALTEK_PHY=y
+CONFIG_SMSC_PHY=y
+CONFIG_NET_DSA_MV88E6XXX=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_MDIO_GPIO=y
+CONFIG_MDIO_BUS_MUX_GPIO=y
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
+CONFIG_USB_NET_AX88179_178A=y
+CONFIG_NET_USB_SMSC95XX=y
+CONFIG_NET_USB_RTL8152=y
+# CONFIG_SPI is not set
+CONFIG_I2C=y
+CONFIG_I2C_GPIO=y
+CONFIG_I2C_IMX=y
+CONFIG_I2C_RK3X=y
+CONFIG_MTD=y
+CONFIG_USB_HOST=y
+CONFIG_USB_IMX_CHIPIDEA=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_DUAL_ROLE=y
+CONFIG_USB_EHCI=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_SERIAL=y
+CONFIG_USB_GADGET_FASTBOOT=y
+CONFIG_USB_GADGET_MASS_STORAGE=y
+CONFIG_MCI=y
+CONFIG_MCI_STARTUP=y
+CONFIG_MCI_MMC_BOOT_PARTITIONS=y
+CONFIG_MCI_DW=y
+CONFIG_MCI_ROCKCHIP_DWCMSHC=y
+CONFIG_MCI_IMX_ESDHC=y
+CONFIG_MCI_ARASAN=y
+CONFIG_MFD_ACT8846=y
+CONFIG_RAVE_SP_CORE=y
+CONFIG_MFD_RK808=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_GPIO_OF=y
+CONFIG_LED_TRIGGERS=y
+CONFIG_EEPROM_AT24=y
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_POLLER=y
+CONFIG_WATCHDOG_DW=y
+CONFIG_WATCHDOG_IMX=y
+CONFIG_RAVE_SP_WATCHDOG=y
+CONFIG_GPIO_PCA953X=y
+CONFIG_GPIO_ZYNQ=y
+CONFIG_IMX_OCOTP=y
+CONFIG_RAVE_SP_EEPROM=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED=y
+CONFIG_REGULATOR_RK808=y
+CONFIG_RESET_IMX7=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_DS1307=y
+CONFIG_FIRMWARE_ZYNQMP_FPGA=y
+CONFIG_GENERIC_PHY=y
+CONFIG_USB_NOP_XCEIV=y
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y
+CONFIG_ROCKCHIP_IODOMAIN=y
+# CONFIG_VIRTIO_MENU is not set
+CONFIG_FS_CRAMFS=y
+CONFIG_FS_EXT4=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_NFS=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
+CONFIG_FS_BPKFS=y
+CONFIG_FS_UIMAGEFS=y
+CONFIG_FS_RATP=y
+CONFIG_LZO_DECOMPRESS=y
--
2.30.2
^ permalink raw reply [flat|nested] 51+ messages in thread