[U-Boot] [PATCH 00/38] common: Reduce size of common.h

Simon Glass sjg at chromium.org
Wed May 17 14:22:33 UTC 2017


This file was traditionally a dumping ground for common declarations. It
should really only contain things that nearly every file needs, such as
the configuration.

Perhaps the worst part is that there is arch-specific code in this file.
There are plenty of arch-specific places where this should go instead.

This series makes a start at cleaning up by removing almost all the
arch-specific code from this header file.


Simon Glass (38):
  common: Drop inclusion of pci.h
  common: Drop pci_pre_init() and is_pci_host()
  common: Move pci_target_init() to PPC header
  common: Drop pci_master_init()
  common: Move pcie_setup_hoses() to PPC header
  common: Move get_OPB_freq() and get_PCI_freq() to PPC header
  api: Add a header for api_init()
  gpio: samsung: Drop s3c2440_gpio driver
  samsung: Drop s3c24x0 arch-specific code
  samsung: mmc: Drop s3c_sdi driver
  samsung: usb: Drop ohci-s3c24xx driver
  samsung: nand: Drop s3c2410_nand driver
  samsung: Drop more references fo s3c24x0
  arc: Make u-boot-arc.h a private header
  sandbox: Make u-boot-sandbox.h a private header
  x86: Make u-boot-x86.h a private header
  arm: Make u-boot-arm.h a private header
  mips: Make u-boot-mips.h a private header
  nds32: Make u-boot-nds32.h a private header
  arc: Don't include asm/u-boot.h in common
  mips: Don't include asm/u-boot.h in common
  sandbox: Don't include asm/u-boot.h in common
  x86: Don't include asm/u-boot.h in common
  nds32: Remove include files from common.h
  arm: Add explicit include of <asm/mach-types.h>
  arm: Add declarations to avoid needing to include headers
  arm: Include asm/setup.h explictly
  arm: Remove include files from common.h
  common: Drop cpu_init_f() declarations
  common: Drop determine_sysper() and determine_pci_clock_per()
  common: Move PPC4xx_SYS_INFO() et al to arch-specific header
  common: powerpc: Move arch-specific headers
  common: freescale: Move arch-specific declarations
  common: freescale: Move arch-specific imx code to arch-imx
  common: ep93xx: Move arch-specific declarations out of common
  common: arm: davinci: Move header file out of common
  common: arm: freescale: layerscape: Move header files out of common.h
  common: microblaze: Drop arch-specific declarations

 arch/arc/include/asm/u-boot.h                     |    1 +
 arch/arm/cpu/arm920t/Makefile                     |    1 -
 arch/arm/cpu/arm920t/ep93xx/speed.c               |    2 +-
 arch/arm/cpu/arm920t/s3c24x0/Makefile             |   10 -
 arch/arm/cpu/arm920t/s3c24x0/cpu_info.c           |   38 -
 arch/arm/cpu/arm920t/s3c24x0/speed.c              |  102 --
 arch/arm/cpu/arm920t/s3c24x0/timer.c              |  160 --
 arch/arm/cpu/arm920t/start.S                      |   37 -
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c           |    1 +
 arch/arm/include/asm/arch-fsl-layerscape/clock.h  |    2 +
 arch/arm/include/asm/arch-fsl-layerscape/cpu.h    |    1 +
 arch/arm/include/asm/arch-fsl-layerscape/soc.h    |   11 +
 arch/arm/include/asm/arch-imx/cpu.h               |    7 +
 arch/arm/include/asm/arch-ls102xa/clock.h         |    2 +
 arch/arm/include/asm/arch-ls102xa/soc.h           |    0
 arch/arm/include/asm/arch-s3c24x0/gpio.h          |  155 --
 arch/arm/include/asm/arch-s3c24x0/iomux.h         |  184 ---
 arch/arm/include/asm/arch-s3c24x0/memory.h        |  159 --
 arch/arm/include/asm/arch-s3c24x0/s3c2400.h       |  136 --
 arch/arm/include/asm/arch-s3c24x0/s3c2410.h       |  147 --
 arch/arm/include/asm/arch-s3c24x0/s3c2440.h       |  145 --
 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h       |  708 ---------
 arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h   |   16 -
 arch/arm/include/asm/bootm.h                      |    1 +
 arch/arm/include/asm/omap_common.h                |    2 +
 arch/arm/include/asm/u-boot-arm.h                 |    6 +
 arch/arm/include/asm/u-boot.h                     |    1 +
 arch/arm/lib/bootm.c                              |    1 +
 arch/arm/lib/spl.c                                |    3 +
 arch/arm/mach-davinci/include/mach/davinci_misc.h |    2 +
 arch/arm/mach-davinci/include/mach/hardware.h     |    5 +-
 arch/arm/mach-omap2/utils.c                       |    1 +
 arch/mips/include/asm/u-boot.h                    |    1 +
 arch/nds32/include/asm/u-boot.h                   |    2 +
 arch/nds32/lib/bootm.c                            |    1 +
 arch/powerpc/cpu/ppc4xx/4xx_pci.c                 |    1 +
 arch/powerpc/cpu/ppc4xx/miiphy.c                  |    1 +
 arch/powerpc/cpu/ppc4xx/reginfo.c                 |    1 +
 arch/powerpc/include/asm/4xx_pci.h                |    2 +
 arch/powerpc/include/asm/ppc.h                    |  164 ++
 arch/powerpc/include/asm/ppc4xx.h                 |    7 +
 arch/powerpc/include/asm/u-boot.h                 |    1 +
 arch/sandbox/include/asm/u-boot.h                 |    1 +
 arch/x86/include/asm/u-boot-x86.h                 |    4 +-
 arch/x86/include/asm/u-boot.h                     |    1 +
 board/AndesTech/adp-ag101p/adp-ag101p.c           |    1 +
 board/Barix/ipam390/ipam390.c                     |    1 +
 board/LaCie/edminiv2/edminiv2.c                   |    1 +
 board/LaCie/net2big_v2/net2big_v2.c               |    1 +
 board/LaCie/netspace_v2/netspace_v2.c             |    1 +
 board/Marvell/aspenite/aspenite.c                 |    1 +
 board/Marvell/gplugd/gplugd.c                     |    1 +
 board/Marvell/guruplug/guruplug.c                 |    1 +
 board/Marvell/openrd/openrd.c                     |    1 +
 board/Marvell/sheevaplug/sheevaplug.c             |    1 +
 board/Seagate/dockstar/dockstar.c                 |    1 +
 board/Seagate/goflexhome/goflexhome.c             |    1 +
 board/Seagate/nas220/nas220.c                     |    1 +
 board/Synology/ds109/ds109.c                      |    1 +
 board/amazon/kc1/kc1.c                            |    1 +
 board/armltd/integrator/integrator.c              |    1 +
 board/armltd/vexpress/vexpress_common.c           |    1 +
 board/atmel/at91rm9200ek/at91rm9200ek.c           |    1 +
 board/atmel/at91sam9261ek/at91sam9261ek.c         |    1 +
 board/atmel/at91sam9263ek/at91sam9263ek.c         |    1 +
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c   |    1 +
 board/atmel/at91sam9rlek/at91sam9rlek.c           |    1 +
 board/atmel/at91sam9x5ek/at91sam9x5ek.c           |    1 +
 board/bluegiga/apx4devkit/apx4devkit.c            |    1 +
 board/bluewater/gurnard/gurnard.c                 |    1 +
 board/bluewater/snapper9260/snapper9260.c         |    1 +
 board/cirrus/edb93xx/edb93xx.c                    |    1 +
 board/compulab/common/common.c                    |    1 +
 board/compulab/common/eeprom.c                    |    1 +
 board/davinci/da8xxevm/da850evm.c                 |    1 +
 board/davinci/da8xxevm/omapl138_lcdk.c            |    1 +
 board/davinci/ea20/ea20.c                         |    1 +
 board/esd/meesc/meesc.c                           |    2 +
 board/freescale/ls1021aqds/ddr.c                  |    1 +
 board/freescale/ls1043aqds/ddr.c                  |    1 +
 board/freescale/ls1043ardb/ddr.c                  |    1 +
 board/freescale/ls1046aqds/ddr.c                  |    1 +
 board/freescale/ls1046ardb/ddr.c                  |    1 +
 board/freescale/ls2080a/ddr.c                     |    1 +
 board/freescale/ls2080aqds/ddr.c                  |    1 +
 board/freescale/ls2080ardb/ddr.c                  |    1 +
 board/freescale/mx35pdk/mx35pdk.c                 |    1 +
 board/gateworks/gw_ventana/gw_ventana.c           |    1 +
 board/gumstix/duovero/duovero.c                   |    1 +
 board/h2200/h2200.c                               |    1 +
 board/imx31_phycore/imx31_phycore.c               |    1 +
 board/lego/ev3/legoev3.c                          |    2 +
 board/mini-box/picosam9g45/picosam9g45.c          |    1 +
 board/nvidia/seaboard/seaboard.c                  |    1 +
 board/overo/common.c                              |    1 +
 board/ronetix/pm9261/pm9261.c                     |    1 +
 board/ronetix/pm9263/pm9263.c                     |    1 +
 board/ronetix/pm9g45/pm9g45.c                     |    1 +
 board/samsung/goni/goni.c                         |    1 +
 board/samsung/smdkc100/smdkc100.c                 |    1 +
 board/samsung/universal_c210/universal.c          |    1 +
 board/siemens/common/board.c                      |    1 +
 board/spear/spear300/spear300.c                   |    1 +
 board/spear/spear310/spear310.c                   |    1 +
 board/spear/spear320/spear320.c                   |    1 +
 board/spear/spear600/spear600.c                   |    1 +
 board/spear/x600/x600.c                           |    1 +
 board/sunxi/board.c                               |    1 +
 board/ti/omap5_uevm/evm.c                         |    1 +
 board/ti/panda/panda.c                            |    1 +
 board/toradex/colibri_pxa270/colibri_pxa270.c     |    1 +
 board/toradex/common/tdx-cfg-block.c              |    1 +
 board/toradex/common/tdx-common.c                 |    1 +
 board/zipitz2/zipitz2.c                           |    1 +
 common/board_f.c                                  |    3 +
 common/board_r.c                                  |    1 +
 drivers/ddr/fsl/arm_ddr_gen3.c                    |    1 +
 drivers/ddr/fsl/ctrl_regs.c                       |    4 +
 drivers/ddr/fsl/fsl_ddr_gen4.c                    |    4 +
 drivers/ddr/fsl/options.c                         |    4 +
 drivers/ddr/fsl/util.c                            |    4 +
 drivers/gpio/Makefile                             |    1 -
 drivers/gpio/s3c2440_gpio.c                       |   88 --
 drivers/i2c/s3c24x0_i2c.c                         |    4 -
 drivers/mmc/Makefile                              |    1 -
 drivers/mmc/s3c_sdi.c                             |  323 ----
 drivers/mtd/nand/Makefile                         |    1 -
 drivers/mtd/nand/s3c2410_nand.c                   |  175 ---
 drivers/net/fsl-mc/dpio/qbman_portal.c            |    1 +
 drivers/pci/pcie_layerscape.c                     |    4 +
 drivers/pci/pcie_layerscape_fixup.c               |    3 +
 drivers/usb/common/fsl-errata.c                   |    4 +
 drivers/usb/gadget/gadget_chips.h                 |    8 -
 drivers/usb/host/Makefile                         |    1 -
 drivers/usb/host/ehci-mx6.c                       |    1 +
 drivers/usb/host/ohci-hcd.c                       |    1 -
 drivers/usb/host/ohci-s3c24xx.c                   | 1688 ---------------------
 drivers/usb/host/ohci-s3c24xx.h                   |  409 -----
 drivers/video/sm501.c                             |    1 +
 include/api.h                                     |   13 +
 include/common.h                                  |  246 ---
 include/configs/calimain.h                        |    2 +
 include/configs/da850evm.h                        |    3 +
 include/configs/ea20.h                            |    2 +
 include/configs/ipam390.h                         |    2 +
 include/configs/legoev3.h                         |    2 +
 include/configs/ls1012a_common.h                  |    2 +
 include/configs/ls1043a_common.h                  |    2 +
 include/configs/ls1046a_common.h                  |    2 +
 include/configs/ls2080a_common.h                  |    2 +
 include/configs/omapl138_lcdk.h                   |    3 +
 include/fsl_ifc.h                                 |    3 +
 scripts/config_whitelist.txt                      |    9 -
 153 files changed, 377 insertions(+), 4956 deletions(-)
 delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/Makefile
 delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/cpu_info.c
 delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/speed.c
 delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/timer.c
 create mode 100644 arch/arm/include/asm/arch-ls102xa/soc.h
 delete mode 100644 arch/arm/include/asm/arch-s3c24x0/gpio.h
 delete mode 100644 arch/arm/include/asm/arch-s3c24x0/iomux.h
 delete mode 100644 arch/arm/include/asm/arch-s3c24x0/memory.h
 delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2400.h
 delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2410.h
 delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2440.h
 delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
 delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
 create mode 100644 arch/powerpc/include/asm/ppc.h
 delete mode 100644 drivers/gpio/s3c2440_gpio.c
 delete mode 100644 drivers/mmc/s3c_sdi.c
 delete mode 100644 drivers/mtd/nand/s3c2410_nand.c
 delete mode 100644 drivers/usb/host/ohci-s3c24xx.c
 delete mode 100644 drivers/usb/host/ohci-s3c24xx.h
 create mode 100644 include/api.h

-- 
2.13.0.303.g4ebf302169-goog



More information about the U-Boot mailing list