Skip to contentSkip to conversation

common: Reduce size of common.h

PATCH New Simon Glass 6 participants 92 messages May 17, 2017 – Jun 6, 2017 2 messages not in the archive

Subsystems (25)
Network drivers Arm (32-bit) x86 USB +21 more subsystems
lore
Share & tools
lore
#0 lore raw

cover common: Reduce size of common.h

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
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#1 lore raw

PATCH 1/38 common: Drop inclusion of pci.h

This should not be in common.h - remove it and update the only file that needs it.

---

 drivers/video/sm501.c | 1 +
 include/common.h      | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/video/sm501.c +1 -0
index cafaae5f31..a468bd96ad 100644
@@ -16,6 +16,7 @@
 #include <common.h>
 
 #include <asm/io.h>
+#include <pci.h>
 #include <video_fb.h>
 #include <sm501.h>
 
include/common.h +0 -3
index 45f190a600..a6347e0167 100644
@@ -30,9 +30,6 @@ typedef volatile unsigned char	vu_char;
 #include <asm/ptrace.h>
 #include <stdarg.h>
 #include <linux/kernel.h>
-#if defined(CONFIG_PCI) && defined(CONFIG_4xx)
-#include <pci.h>
-#endif
 #if defined(CONFIG_8xx)
 #include <asm/8xx_immap.h>
 #if defined(CONFIG_MPC859)	|| defined(CONFIG_MPC859T)	|| \
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#2 lore raw

PATCH 1/38 common: Drop inclusion of pci.h

Quoted 4 lines · Simon Glass

This should not be in common.h - remove it and update the only file that needs it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/3669a3b4/attachment.sig>
#3 lore raw

PATCH 2/38 common: Drop pci_pre_init() and is_pci_host()

In reply to Simon Glass

These should not be in common.h. They are used in some legacy PowerPC code. Just drop them.

---

 include/common.h | 5 -----
 1 file changed, 5 deletions(-)
include/common.h +0 -5
index a6347e0167..8d6d1d8d5f 100644
@@ -456,11 +456,6 @@ int get_env_id (void);
 void	pci_init      (void);
 void	pci_init_board(void);
 
-#if defined(CONFIG_PCI) && defined(CONFIG_4xx)
-    int	   pci_pre_init	       (struct pci_controller *);
-    int	   is_pci_host	       (struct pci_controller *);
-#endif
-
 #if defined(CONFIG_PCI) && (defined(CONFIG_440) || defined(CONFIG_405EX))
 #   if defined(CONFIG_SYS_PCI_TARGET_INIT)
 	void	pci_target_init	     (struct pci_controller *);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#4 lore raw

PATCH 2/38 common: Drop pci_pre_init() and is_pci_host()

Quoted 4 lines · Simon Glass

These should not be in common.h. They are used in some legacy PowerPC code. Just drop them.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/8ce31d5b/attachment.sig>
#5 lore raw

PATCH 3/38 common: Move pci_target_init() to PPC header

In reply to Simon Glass

Only one boards needs this definition. Move it to an arch-specific header.

---

 arch/powerpc/include/asm/4xx_pci.h | 1 +
 include/common.h                   | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/include/asm/4xx_pci.h +1 -0
index f686e7cb07..a68c8756b1 100644
@@ -56,5 +56,6 @@ int pci_arbiter_enabled(void);
 int __pci_pre_init(struct pci_controller *hose);
 void __pci_target_init(struct pci_controller *hose);
 void __pci_master_init(struct pci_controller *hose);
+void pci_target_init(struct pci_controller *);
 
 #endif
include/common.h +0 -3
index 8d6d1d8d5f..a1f1a9a949 100644
@@ -457,9 +457,6 @@ void	pci_init      (void);
 void	pci_init_board(void);
 
 #if defined(CONFIG_PCI) && (defined(CONFIG_440) || defined(CONFIG_405EX))
-#   if defined(CONFIG_SYS_PCI_TARGET_INIT)
-	void	pci_target_init	     (struct pci_controller *);
-#   endif
 #   if defined(CONFIG_SYS_PCI_MASTER_INIT)
 	void	pci_master_init	     (struct pci_controller *);
 #   endif
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#6 lore raw

PATCH 3/38 common: Move pci_target_init() to PPC header

Quoted 3 lines · Simon Glass

Only one boards needs this definition. Move it to an arch-specific header.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/78258a22/attachment.sig>
#7 lore raw

PATCH 4/38 common: Drop pci_master_init()

In reply to Simon Glass

This should not be in common.h. Drop it.

---

 include/common.h | 3 ---
 1 file changed, 3 deletions(-)
include/common.h +0 -3
index a1f1a9a949..7f9b7863b1 100644
@@ -457,9 +457,6 @@ void	pci_init      (void);
 void	pci_init_board(void);
 
 #if defined(CONFIG_PCI) && (defined(CONFIG_440) || defined(CONFIG_405EX))
-#   if defined(CONFIG_SYS_PCI_MASTER_INIT)
-	void	pci_master_init	     (struct pci_controller *);
-#   endif
 #if defined(CONFIG_440SPE) || \
     defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
     defined(CONFIG_405EX)
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#8 lore raw

PATCH 4/38 common: Drop pci_master_init()

Quoted 3 lines · Simon Glass

This should not be in common.h. Drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/a18ef3ea/attachment.sig>
#9 lore raw

PATCH 5/38 common: Move pcie_setup_hoses() to PPC header

In reply to Simon Glass

Only one board needs this definition. Move it to an arch-specific header.

---

 arch/powerpc/include/asm/4xx_pci.h | 1 +
 include/common.h                   | 8 --------
 2 files changed, 1 insertion(+), 8 deletions(-)
arch/powerpc/include/asm/4xx_pci.h +1 -0
index a68c8756b1..276a78077d 100644
@@ -57,5 +57,6 @@ int __pci_pre_init(struct pci_controller *hose);
 void __pci_target_init(struct pci_controller *hose);
 void __pci_master_init(struct pci_controller *hose);
 void pci_target_init(struct pci_controller *);
+void pcie_setup_hoses(int busno);
 
 #endif
include/common.h +0 -8
index 7f9b7863b1..6dd0d2f552 100644
@@ -456,14 +456,6 @@ int get_env_id (void);
 void	pci_init      (void);
 void	pci_init_board(void);
 
-#if defined(CONFIG_PCI) && (defined(CONFIG_440) || defined(CONFIG_405EX))
-#if defined(CONFIG_440SPE) || \
-    defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
-    defined(CONFIG_405EX)
-   void pcie_setup_hoses(int busno);
-#endif
-#endif
-
 int	misc_init_f   (void);
 int	misc_init_r   (void);
 
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#10 lore raw

PATCH 5/38 common: Move pcie_setup_hoses() to PPC header

Quoted 3 lines · Simon Glass

Only one board needs this definition. Move it to an arch-specific header.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/ac1f6ff7/attachment.sig>
#11 lore raw

PATCH 6/38 common: Move get_OPB_freq() and get_PCI_freq() to PPC header

In reply to Simon Glass

These should not be in common.h. Move the to an arch-specific header.

---

 arch/powerpc/include/asm/ppc4xx.h | 3 +++
 include/common.h                  | 4 ----
 2 files changed, 3 insertions(+), 4 deletions(-)
arch/powerpc/include/asm/ppc4xx.h +3 -0
index b8b0ff9f25..30e6559ba4 100644
@@ -289,6 +289,9 @@ static inline void set_mcsr(u32 val)
 
 int ppc4xx_pci_sync_clock_config(u32 async);
 
+unsigned long get_OPB_freq(void);
+unsigned long get_PCI_freq(void);
+
 #endif	/* __ASSEMBLY__ */
 
 /* for multi-cpu support */
include/common.h +0 -4
index 6dd0d2f552..8b64407fd1 100644
@@ -649,10 +649,6 @@ int	get_clocks (void);
 #if defined(CONFIG_MPC5xxx)
 int	prt_mpc5xxx_clks (void);
 #endif
-#ifdef CONFIG_4xx
-ulong	get_OPB_freq (void);
-ulong	get_PCI_freq (void);
-#endif
 #if defined(CONFIG_S3C24X0) || \
     defined(CONFIG_LH7A40X) || \
     defined(CONFIG_EP93XX)
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#12 lore raw

PATCH 6/38 common: Move get_OPB_freq() and get_PCI_freq() to PPC header

Quoted 3 lines · Simon Glass

These should not be in common.h. Move the to an arch-specific header.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/3cd035b3/attachment.sig>
#13 lore raw

PATCH 7/38 api: Add a header for api_init()

In reply to Simon Glass

Put this in its own header instead of using common.h.

---

 common/board_r.c |  1 +
 include/api.h    | 13 +++++++++++++
 include/common.h |  3 ---
 3 files changed, 14 insertions(+), 3 deletions(-)
 create mode 100644 include/api.h
common/board_r.c +1 -0
index 28f32c3885..df570057b2 100644
@@ -11,6 +11,7 @@
  */
 
 #include <common.h>
+#include <api.h>
 /* TODO: can we just include all these headers whether needed or not? */
 #if defined(CONFIG_CMD_BEDBUG)
 #include <bedbug/type.h>
include/api.h new file +13 -0
new file mode 100644
index 0000000000..85817f3400
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2017 Google, Inc
+ * Written by Simon Glass <[email protected]>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#ifndef __API_H
+#define __API_H
+
+void api_init(void);
+
+#endif
include/common.h +0 -3
index 8b64407fd1..fb4e79bb39 100644
@@ -465,9 +465,6 @@ void	jumptable_init(void);
 /* common/kallsysm.c */
 const char *symbol_lookup(unsigned long addr, unsigned long *caddr);
 
-/* api/api.c */
-void	api_init (void);
-
 /* common/memsize.c */
 long	get_ram_size  (long *, long);
 phys_size_t get_effective_memsize(void);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#14 lore raw

PATCH 7/38 api: Add a header for api_init()

Quoted 3 lines · Simon Glass

Put this in its own header instead of using common.h.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/18a0ebc7/attachment.sig>
#15 lore raw

PATCH 8/38 gpio: samsung: Drop s3c2440_gpio driver

In reply to Simon Glass

This is no longer used in U-Boot. Drop it.

---

 drivers/gpio/Makefile       |  1 -
 drivers/gpio/s3c2440_gpio.c | 88 ---------------------------------------------
 2 files changed, 89 deletions(-)
 delete mode 100644 drivers/gpio/s3c2440_gpio.c
drivers/gpio/Makefile +0 -1
index 03df558879..8937e99b47 100644
@@ -42,7 +42,6 @@ obj-$(CONFIG_SH_GPIO_PFC)	+= sh_pfc.o
 obj-$(CONFIG_OMAP_GPIO)	+= omap_gpio.o
 obj-$(CONFIG_DB8500_GPIO)	+= db8500_gpio.o
 obj-$(CONFIG_BCM2835_GPIO)	+= bcm2835_gpio.o
-obj-$(CONFIG_S3C2440_GPIO)	+= s3c2440_gpio.o
 obj-$(CONFIG_XILINX_GPIO)	+= xilinx_gpio.o
 obj-$(CONFIG_ADI_GPIO2)	+= adi_gpio2.o
 obj-$(CONFIG_TCA642X)		+= tca642x.o
drivers/gpio/s3c2440_gpio.c deleted +0 -88

88 lines not on this page · raw message

Signature · 1 line
2.13.0.303.g4ebf302169-goog
#16 lore raw

PATCH 8/38 gpio: samsung: Drop s3c2440_gpio driver

Quoted 3 lines · Simon Glass

This is no longer used in U-Boot. Drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/eaea193b/attachment.sig>
#17 lore raw

PATCH 9/38 samsung: Drop s3c24x0 arch-specific code

In reply to Simon Glass

This is not used anymore. Drop it.

---

 arch/arm/cpu/arm920t/Makefile                   |   1 -
 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/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 -
 13 files changed, 1961 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
 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
arch/arm/cpu/arm920t/Makefile +0 -1
index 8faf34b87e..948b764193 100644
@@ -11,7 +11,6 @@ obj-y	+= cpu.o
 
 obj-$(CONFIG_EP93XX) += ep93xx/
 obj-$(CONFIG_IMX) += imx/
-obj-$(CONFIG_S3C24X0) += s3c24x0/
 
 # some files can only build in ARM mode
 
arch/arm/cpu/arm920t/s3c24x0/Makefile deleted +0 -10
deleted file mode 100644
index e78f8a017c..0000000000
@@ -1,10 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-#
-# SPDX-License-Identifier:	GPL-2.0+
-#
-
-obj-$(CONFIG_DISPLAY_CPUINFO)	+= cpu_info.o
-obj-y	+= speed.o
-obj-y	+= timer.o
arch/arm/cpu/arm920t/s3c24x0/cpu_info.c deleted +0 -38
deleted file mode 100644
index fede51a160..0000000000
@@ -1,38 +0,0 @@
-/*
- * (C) Copyright 2010
- * David Mueller <[email protected]>
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/io.h>
-#include <asm/arch/s3c24x0_cpu.h>
-
-typedef ulong (*getfreq)(void);
-
-static const getfreq freq_f[] = {
-	get_FCLK,
-	get_HCLK,
-	get_PCLK,
-};
-
-static const char freq_c[] = { 'F', 'H', 'P' };
-
-int print_cpuinfo(void)
-{
-	int i;
-	char buf[32];
-/* the S3C2400 seems to be lacking a CHIP ID register */
-#ifndef CONFIG_S3C2400
-	ulong cpuid;
-	struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
-
-	cpuid = readl(&gpio->gstatus1);
-	printf("CPUID: %8lX\n", cpuid);
-#endif
-	for (i = 0; i < ARRAY_SIZE(freq_f); i++)
-		printf("%cCLK: %8s MHz\n", freq_c[i], strmhz(buf, freq_f[i]()));
-
-	return 0;
-}
arch/arm/cpu/arm920t/s3c24x0/speed.c deleted +0 -102

102 lines not on this page · raw message

arch/arm/cpu/arm920t/s3c24x0/timer.c deleted +0 -160

160 lines not on this page · raw message

arch/arm/include/asm/arch-s3c24x0/gpio.h deleted +0 -155

155 lines not on this page · raw message

arch/arm/include/asm/arch-s3c24x0/iomux.h deleted +0 -184

184 lines not on this page · raw message

arch/arm/include/asm/arch-s3c24x0/memory.h deleted +0 -159

159 lines not on this page · raw message

arch/arm/include/asm/arch-s3c24x0/s3c2400.h deleted +0 -136

136 lines not on this page · raw message

arch/arm/include/asm/arch-s3c24x0/s3c2410.h deleted +0 -147

147 lines not on this page · raw message

arch/arm/include/asm/arch-s3c24x0/s3c2440.h deleted +0 -145

145 lines not on this page · raw message

arch/arm/include/asm/arch-s3c24x0/s3c24x0.h deleted +0 -708

708 lines not on this page · raw message

arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h deleted +0 -16
deleted file mode 100644
index 393cc9d9fd..0000000000
@@ -1,16 +0,0 @@
-/*
- * (C) Copyright 2009
- * Kevin Morfitt, Fearnside Systems Ltd, <[email protected]>
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#ifdef CONFIG_S3C2400
-	#include <asm/arch/s3c2400.h>
-#elif defined CONFIG_S3C2410
-	#include <asm/arch/s3c2410.h>
-#elif defined CONFIG_S3C2440
-	#include <asm/arch/s3c2440.h>
-#else
-	#error Please define the s3c24x0 cpu type
-#endif
Signature · 1 line
2.13.0.303.g4ebf302169-goog

A message that is not in the archive (sent off-list or not yet received): CALrBrZ2SqS55_hV39B_sijFKEt4E0kb__y34RO9+7+wW9G5wsg@mail.gmail.com

#19 lore raw

PATCH 9/38 samsung: Drop s3c24x0 arch-specific code

2017. 5. 18. 00:04에 "Simon Glass" <[email protected]>님이 작성:

This is not used anymore. Drop it.

---

 arch/arm/cpu/arm920t/Makefile                   |   1 -
 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/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 -
 13 files changed, 1961 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
 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
arch/arm/cpu/arm920t/Makefile +0 -1
index 8faf34b87e..948b764193 100644
@@ -11,7 +11,6 @@ obj-y += cpu.o
 
 obj-$(CONFIG_EP93XX) += ep93xx/
 obj-$(CONFIG_IMX) += imx/
-obj-$(CONFIG_S3C24X0) += s3c24x0/
 
 # some files can only build in ARM mode
 
arch/arm/cpu/arm920t/ renamed from arch/arm/cpu/arm920t/s3c24x0/Makefile +0 -0

s3c24x0/Makefile
deleted file mode 100644
index e78f8a017c..0000000000

arch/arm/cpu/arm920t/s3c24x0/Makefile deleted +0 -10
@@ -1,10 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-obj-$(CONFIG_DISPLAY_CPUINFO)  += cpu_info.o
-obj-y  += speed.o
-obj-y  += timer.o
arch/arm/cpu/arm920t/ renamed from arch/arm/cpu/arm920t/s3c24x0/cpu_info.c +0 -0

s3c24x0/cpu_info.c
deleted file mode 100644
index fede51a160..0000000000

arch/arm/cpu/arm920t/s3c24x0/cpu_info.c deleted +0 -35
@@ -1,38 +0,0 @@
-/*
- * (C) Copyright 2010
- * David Mueller <[email protected]>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <asm/io.h>
-#include <asm/arch/s3c24x0_cpu.h>
-
-typedef ulong (*getfreq)(void);
-
-static const getfreq freq_f[] = {
-       get_FCLK,
-       get_HCLK,
-       get_PCLK,
-};
-
-static const char freq_c[] = { 'F', 'H', 'P' };
-
-int print_cpuinfo(void)
-{
-       int i;
-       char buf[32];
-/* the S3C2400 seems to be lacking a CHIP ID register */
-#ifndef CONFIG_S3C2400
-       ulong cpuid;
-       struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio();
-
-       cpuid = readl(&gpio->gstatus1);
-       printf("CPUID: %8lX\n", cpuid);
-#endif
-       for (i = 0; i < ARRAY_SIZE(freq_f); i++)
-               printf("%cCLK: %8s MHz\n", freq_c[i], strmhz(buf,

freq_f[i]()));
-
- return 0;
-}

arch/arm/cpu/arm920t/ renamed from arch/arm/cpu/arm920t/s3c24x0/speed.c +0 -0

s3c24x0/speed.c
deleted file mode 100644
index 3701c5d9a3..0000000000

arch/arm/cpu/arm920t/s3c24x0/speed.c deleted +0 -25
@@ -1,102 +0,0 @@
-/*
- * (C) Copyright 2001-2004
- * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
- *
- * (C) Copyright 2002
- * David Mueller, ELSOFT AG, [email protected]
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/* This code should work for both the S3C2400 and the S3C2410
- * as they seem to have the same PLL and clock machinery inside.
- * The different address mapping is handled by the s3c24xx.h files below.
- */
-
-#include <common.h>
-#ifdef CONFIG_S3C24X0
-
-#include <asm/io.h>
-#include <asm/arch/s3c24x0_cpu.h>
-
-#define MPLL 0
-#define UPLL 1
-
-/* -------------------------------------------------------------------------

*/
-/* NOTE: This describes the proper use of this file.
- *
- * CONFIG_SYS_CLK_FREQ should be defined as the input frequency of the PLL.
- *
- * get_FCLK(), get_HCLK(), get_PCLK() and get_UCLK() return the clock of
- * the specified bus in HZ.
- */
-/* ------------------------------------------------------------------------- */
-
-static ulong get_PLLCLK(int pllreg)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
- ulong r, m, p, s;
-
- if (pllreg == MPLL)
- r = readl(&clk_power->mpllcon);
- else if (pllreg == UPLL)
- r = readl(&clk_power->upllcon);
- else
- hang();
-

-       m = ((r & 0xFF000) >> 12) + 8;
-       p = ((r & 0x003F0) >> 4) + 2;
-       s = r & 0x3;

-
-#if defined(CONFIG_S3C2440)
- if (pllreg == MPLL)
- return 2 * m * (CONFIG_SYS_CLK_FREQ / (p << s));
-#endif
- return (CONFIG_SYS_CLK_FREQ * m) / (p << s);
-
-}
-
-/* return FCLK frequency */
-ulong get_FCLK(void)
-{
- return get_PLLCLK(MPLL);
-}
-
-/* return HCLK frequency */
-ulong get_HCLK(void)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
-#ifdef CONFIG_S3C2440

-       switch (readl(&clk_power->clkdivn) & 0x6) {
-       default:
-       case 0:

- return get_FCLK();
- case 2:
- return get_FCLK() / 2;
- case 4:
- return (readl(&clk_power->camdivn) & (1 << 9)) ?
- get_FCLK() / 8 : get_FCLK() / 4;
- case 6:
- return (readl(&clk_power->camdivn) & (1 << 8)) ?
- get_FCLK() / 6 : get_FCLK() / 3;
- }
-#else
- return (readl(&clk_power->clkdivn) & 2) ? get_FCLK() / 2 :
get_FCLK();
-#endif
-}
-
-/* return PCLK frequency */
-ulong get_PCLK(void)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
-
- return (readl(&clk_power->clkdivn) & 1) ? get_HCLK() / 2 :
get_HCLK();
-}
-
-/* return UCLK frequency */
-ulong get_UCLK(void)
-{
- return get_PLLCLK(UPLL);
-}
-
-#endif /* CONFIG_S3C24X0 */

arch/arm/cpu/arm920t/ renamed from arch/arm/cpu/arm920t/s3c24x0/timer.c +0 -0

s3c24x0/timer.c
deleted file mode 100644
index ba1e616b82..0000000000

arch/arm/cpu/arm920t/s3c24x0/timer.c deleted +0 -160

160 lines not on this page · raw message

(quoted diff) +0 -0

b/arch/arm/include/asm/arch-s3c24x0/gpio.h
deleted file mode 100644
index a749b6491a..0000000000

arch/arm/include/asm/arch-s3c24x0/gpio.h deleted +0 -155

155 lines not on this page · raw message

(quoted diff) +0 -0

b/arch/arm/include/asm/arch-s3c24x0/iomux.h
deleted file mode 100644
index 981164434d..0000000000

arch/arm/include/asm/arch-s3c24x0/iomux.h deleted +0 -184

184 lines not on this page · raw message

(quoted diff) +0 -0

b/arch/arm/include/asm/arch-s3c24x0/memory.h
deleted file mode 100644
index d6a787b663..0000000000

arch/arm/include/asm/arch-s3c24x0/memory.h deleted +0 -92

92 lines not on this page · raw message

the
- * SA1100, it's much more convenient to use Linux's NUMA support to implement
- * our memory map representation. Assuming all memory nodes have equal access
- * characteristics, we then have generic discontiguous memory support.
- *
- * Of course, all this isn't mandatory for SA1100 implementations with only
- * one used memory bank. For those, simply undefine CONFIG_DISCONTIGMEM.
- *
- * The nodes are matched with the physical memory bank addresses which are
- * incidentally the same as virtual addresses.
- *

- *     node 0:  0xc0000000 - 0xc7ffffff
- *     node 1:  0xc8000000 - 0xcfffffff
- *     node 2:  0xd0000000 - 0xd7ffffff
- *     node 3:  0xd8000000 - 0xdfffffff

- */
-
-#define NR_NODES 4
-
-/*
- * Given a kernel address, find the home node of the underlying memory.
- */
-#define KVADDR_TO_NID(addr) \
- (((unsigned long)(addr) - 0xc0000000) >> 27)
-
-/*
- * Given a physical address, convert it to a node id.
- */
-#define PHYS_TO_NID(addr) KVADDR_TO_NID(__phys_to_virt(addr)) -
-/*
- * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory
- * and returns the mem_map of that node.
- */
-#define ADDR_TO_MAPBASE(kaddr) \
- NODE_MEM_MAP(KVADDR_TO_NID((unsigned long)(kaddr)))
-
-/*
- * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory
- * and returns the index corresponding to the appropriate page in the
- * node's mem_map.
- */
-#define LOCAL_MAP_NR(kvaddr) \
- (((unsigned long)(kvaddr) & 0x07ffffff) >> PAGE_SHIFT)
-
-/*
- * Given a kaddr, virt_to_page returns a pointer to the corresponding
- * mem_map entry.
- */
-#define virt_to_page(kaddr) \
- (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr))
-
-/*
- * VALID_PAGE returns a non-zero value if given page pointer is valid.
- * This assumes all node's mem_maps are stored within the node they refer to.
- */
-#define VALID_PAGE(page) \
-({ unsigned int node = KVADDR_TO_NID(page); \
- ( (node < NR_NODES) && \
- ((unsigned)((page) - NODE_MEM_MAP(node)) <
NODE_DATA(node)->node_size) ); \
-})
-
-#else
-
-#define PHYS_TO_NID(addr) (0)
-
-#endif
-#endif /* __ASM_ARCH_MEMORY_H */

(quoted diff) +0 -0

b/arch/arm/include/asm/arch-s3c24x0/s3c2400.h
deleted file mode 100644
index 2389118e7a..0000000000

arch/arm/include/asm/arch-s3c24x0/s3c2400.h deleted +0 -70

70 lines not on this page · raw message

void)
-{
- return (struct s3c24x0_clock_power *)S3C24X0_CLOCK_POWER_BASE;
-}
-
-static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) -{
- return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
-}
-
-static inline struct s3c24x0_uart
- *s3c24x0_get_base_uart(enum s3c24x0_uarts_nr n)
-{
- return (struct s3c24x0_uart *)(S3C24X0_UART_BASE + (n * 0x4000));
-}
-
-static inline struct s3c24x0_timers *s3c24x0_get_base_timers(void) -{
- return (struct s3c24x0_timers *)S3C24X0_TIMER_BASE;
-}
-
-static inline struct s3c24x0_usb_device *s3c24x0_get_base_usb_device(void) -{
- return (struct s3c24x0_usb_device *)S3C24X0_USB_DEVICE_BASE;
-}
-
-static inline struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void) -{
- return (struct s3c24x0_watchdog *)S3C24X0_WATCHDOG_BASE;
-}
-
-static inline struct s3c24x0_i2c *s3c24x0_get_base_i2c(void) -{
- return (struct s3c24x0_i2c *)S3C24X0_I2C_BASE;
-}
-
-static inline struct s3c24x0_i2s *s3c24x0_get_base_i2s(void) -{
- return (struct s3c24x0_i2s *)S3C24X0_I2S_BASE;
-}
-
-static inline struct s3c24x0_gpio *s3c24x0_get_base_gpio(void) -{
- return (struct s3c24x0_gpio *)S3C24X0_GPIO_BASE;
-}
-
-static inline struct s3c24x0_rtc *s3c24x0_get_base_rtc(void) -{
- return (struct s3c24x0_rtc *)S3C24X0_RTC_BASE;
-}
-
-static inline struct s3c2400_adc *s3c2400_get_base_adc(void) -{
- return (struct s3c2400_adc *)S3C24X0_ADC_BASE;
-}
-
-static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void) -{
- return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
-}
-
-static inline struct s3c2400_mmc *s3c2400_get_base_mmc(void) -{
- return (struct s3c2400_mmc *)S3C2400_MMC_BASE;
-}
-
-#endif /*__S3C2400_H__*/

(quoted diff) +0 -0

b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
deleted file mode 100644
index 8773ce30d1..0000000000

arch/arm/include/asm/arch-s3c24x0/s3c2410.h deleted +0 -76

76 lines not on this page · raw message

void)
-{
- return (struct s3c24x0_clock_power *)S3C24X0_CLOCK_POWER_BASE;
-}
-
-static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) -{
- return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
-}
-
-static inline struct s3c24x0_nand *s3c24x0_get_base_nand(void) -{
- return (struct s3c24x0_nand *)S3C2410_NAND_BASE;
-}
-
-static inline struct s3c24x0_uart
- *s3c24x0_get_base_uart(enum s3c24x0_uarts_nr n)
-{
- return (struct s3c24x0_uart *)(S3C24X0_UART_BASE + (n * 0x4000));
-}
-
-static inline struct s3c24x0_timers *s3c24x0_get_base_timers(void) -{
- return (struct s3c24x0_timers *)S3C24X0_TIMER_BASE;
-}
-
-static inline struct s3c24x0_usb_device *s3c24x0_get_base_usb_device(void) -{
- return (struct s3c24x0_usb_device *)S3C24X0_USB_DEVICE_BASE;
-}
-
-static inline struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void) -{
- return (struct s3c24x0_watchdog *)S3C24X0_WATCHDOG_BASE;
-}
-
-static inline struct s3c24x0_i2c *s3c24x0_get_base_i2c(void) -{
- return (struct s3c24x0_i2c *)S3C24X0_I2C_BASE;
-}
-
-static inline struct s3c24x0_i2s *s3c24x0_get_base_i2s(void) -{
- return (struct s3c24x0_i2s *)S3C24X0_I2S_BASE;
-}
-
-static inline struct s3c24x0_gpio *s3c24x0_get_base_gpio(void) -{
- return (struct s3c24x0_gpio *)S3C24X0_GPIO_BASE;
-}
-
-static inline struct s3c24x0_rtc *s3c24x0_get_base_rtc(void) -{
- return (struct s3c24x0_rtc *)S3C24X0_RTC_BASE;
-}
-
-static inline struct s3c2410_adc *s3c2410_get_base_adc(void) -{
- return (struct s3c2410_adc *)S3C2410_ADC_BASE;
-}
-
-static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void) -{
- return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
-}
-
-static inline struct s3c24x0_sdi *s3c24x0_get_base_sdi(void) -{
- return (struct s3c24x0_sdi *)S3C2410_SDI_BASE;
-}
-
-#endif /*__S3C2410_H__*/

(quoted diff) +0 -0

b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
deleted file mode 100644
index 7a525f2818..0000000000

arch/arm/include/asm/arch-s3c24x0/s3c2440.h deleted +0 -74

74 lines not on this page · raw message

void)
-{
- return (struct s3c24x0_clock_power *)S3C24X0_CLOCK_POWER_BASE;
-}
-
-static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) -{
- return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
-}
-
-static inline struct s3c24x0_nand *s3c24x0_get_base_nand(void) -{
- return (struct s3c24x0_nand *)S3C2440_NAND_BASE;
-}
-
-static inline struct s3c24x0_uart
- *s3c24x0_get_base_uart(enum s3c24x0_uarts_nr n)
-{
- return (struct s3c24x0_uart *)(S3C24X0_UART_BASE + (n * 0x4000));
-}
-
-static inline struct s3c24x0_timers *s3c24x0_get_base_timers(void) -{
- return (struct s3c24x0_timers *)S3C24X0_TIMER_BASE;
-}
-
-static inline struct s3c24x0_usb_device *s3c24x0_get_base_usb_device(void) -{
- return (struct s3c24x0_usb_device *)S3C24X0_USB_DEVICE_BASE;
-}
-
-static inline struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void) -{
- return (struct s3c24x0_watchdog *)S3C24X0_WATCHDOG_BASE;
-}
-
-static inline struct s3c24x0_i2c *s3c24x0_get_base_i2c(void) -{
- return (struct s3c24x0_i2c *)S3C24X0_I2C_BASE;
-}
-
-static inline struct s3c24x0_i2s *s3c24x0_get_base_i2s(void) -{
- return (struct s3c24x0_i2s *)S3C24X0_I2S_BASE;
-}
-
-static inline struct s3c24x0_gpio *s3c24x0_get_base_gpio(void) -{
- return (struct s3c24x0_gpio *)S3C24X0_GPIO_BASE;
-}
-
-static inline struct s3c24x0_rtc *s3c24x0_get_base_rtc(void) -{
- return (struct s3c24x0_rtc *)S3C24X0_RTC_BASE;
-}
-
-static inline struct s3c2440_adc *s3c2440_get_base_adc(void) -{
- return (struct s3c2440_adc *)S3C2440_ADC_BASE;
-}
-
-static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void) -{
- return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
-}
-
-static inline struct s3c24x0_sdi *s3c24x0_get_base_sdi(void) -{
- return (struct s3c24x0_sdi *)S3C2440_SDI_BASE;
-}
-
-#endif /*__S3C2440_H__*/

(quoted diff) +0 -0

b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
deleted file mode 100644
index 2dae9fc3d7..0000000000

arch/arm/include/asm/arch-s3c24x0/s3c24x0.h deleted +0 -708

708 lines not on this page · raw message

(quoted diff) +0 -0

b/arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
deleted file mode 100644
index 393cc9d9fd..0000000000

arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h deleted +0 -3
@@ -1,16 +0,0 @@
-/*
- * (C) Copyright 2009
- * Kevin Morfitt, Fearnside Systems Ltd, <kevin.morfitt@fearnside-

systems.co.uk>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifdef CONFIG_S3C2400
- #include <asm/arch/s3c2400.h>
-#elif defined CONFIG_S3C2410
- #include <asm/arch/s3c2410.h>
-#elif defined CONFIG_S3C2440
- #include <asm/arch/s3c2440.h>
-#else
- #error Please define the s3c24x0 cpu type
-#endif
--
2.13.0.303.g4ebf302169-goog

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Thanks,
Minkyu Kang

#20 lore raw

PATCH 9/38 samsung: Drop s3c24x0 arch-specific code

In reply to Simon Glass
Quoted 3 lines · Simon Glass

This is not used anymore. Drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/ac80c130/attachment.sig>
#21 lore raw

PATCH 10/38 samsung: mmc: Drop s3c_sdi driver

In reply to Simon Glass

This is no-longer used in U-Boot. Drop it.

---

 drivers/mmc/Makefile         |   1 -
 drivers/mmc/s3c_sdi.c        | 323 -------------------------------------------
 scripts/config_whitelist.txt |   1 -
 3 files changed, 325 deletions(-)
 delete mode 100644 drivers/mmc/s3c_sdi.c
drivers/mmc/Makefile +0 -1
index a078649899..2d781c38a6 100644
@@ -40,7 +40,6 @@ obj-$(CONFIG_MMC_MXS)			+= mxsmmc.o
 obj-$(CONFIG_MMC_PCI)			+= pci_mmc.o
 obj-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o
 obj-$(CONFIG_SUPPORT_EMMC_RPMB) += rpmb.o
-obj-$(CONFIG_S3C_SDI) += s3c_sdi.o
 obj-$(CONFIG_MMC_SANDBOX)		+= sandbox_mmc.o
 obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o
 obj-$(CONFIG_SH_SDHI) += sh_sdhi.o
drivers/mmc/s3c_sdi.c deleted +0 -323

323 lines not on this page · raw message

scripts/config_whitelist.txt +0 -1
index fa9c3fc8cb..dd7b328d8f 100644
@@ -2365,7 +2365,6 @@ CONFIG_S3C2400
 CONFIG_S3C2410
 CONFIG_S3C2410_NAND_BBT
 CONFIG_S3C2410_NAND_HWECC
-CONFIG_S3C2440
 CONFIG_S3C24X0
 CONFIG_S3C24XX_TACLS
 CONFIG_S3C24XX_TWRPH0
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#22 lore raw

PATCH 10/38 samsung: mmc: Drop s3c_sdi driver

2017. 5. 18. 00:18에 "Simon Glass" <[email protected]>님이 작성:

This is no-longer used in U-Boot. Drop it.

---

 drivers/mmc/Makefile         |   1 -
 drivers/mmc/s3c_sdi.c        | 323 ------------------------------
-------------
 scripts/config_whitelist.txt |   1 -
 3 files changed, 325 deletions(-)
 delete mode 100644 drivers/mmc/s3c_sdi.c
drivers/mmc/Makefile +0 -1
index a078649899..2d781c38a6 100644
@@ -40,7 +40,6 @@ obj-$(CONFIG_MMC_MXS)                 += mxsmmc.o
 obj-$(CONFIG_MMC_PCI)                  += pci_mmc.o
 obj-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o
 obj-$(CONFIG_SUPPORT_EMMC_RPMB) += rpmb.o
-obj-$(CONFIG_S3C_SDI) += s3c_sdi.o
 obj-$(CONFIG_MMC_SANDBOX)              += sandbox_mmc.o
 obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o
 obj-$(CONFIG_SH_SDHI) += sh_sdhi.o
drivers/mmc/s3c_sdi.c deleted +0 -61

61 lines not on this page · raw message

*data)
-{

-       struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
-       uint32_t sdiccon, sdicsta, sdidcon, sdidsta, sdidat, sdifsta;
-       uint32_t sdicsta_wait_bit = S3C2410_SDICMDSTAT_CMDSENT;
-       unsigned int timeout = 100000;
-       int ret = 0, xfer_len, data_offset = 0;
-       const uint32_t sdidsta_err_mask = S3C2410_SDIDSTA_FIFOFAIL |

- S3C2410_SDIDSTA_CRCFAIL | S3C2410_SDIDSTA_RXCRCFAIL |
- S3C2410_SDIDSTA_DATATIMEOUT;
-
-

-       writel(0xffffffff, &sdi_regs->sdicsta);
-       writel(0xffffffff, &sdi_regs->sdidsta);
-       writel(0xffffffff, &sdi_regs->sdifsta);

-
- /* Set up data transfer (if applicable). */
- if (data) {
- writel(data->blocksize, &sdi_regs->sdibsize);
-
- sdidcon = data->blocks & S3C2410_SDIDCON_BLKNUM;
- sdidcon |= S3C2410_SDIDCON_BLOCKMODE;
-#if defined(CONFIG_S3C2440)
- sdidcon |= S3C2440_SDIDCON_DS_WORD |
S3C2440_SDIDCON_DATSTART;
-#endif
- if (wide_bus)
- sdidcon |= S3C2410_SDIDCON_WIDEBUS;
-
- if (data->flags & MMC_DATA_READ) {

-                       sdidcon |= S3C2410_SDIDCON_RXAFTERCMD;
-                       sdidcon |= S3C2410_SDIDCON_XFER_RXSTART;
-               } else {
-                       sdidcon |= S3C2410_SDIDCON_TXAFTERRESP;
-                       sdidcon |= S3C2410_SDIDCON_XFER_TXSTART;

- }
-
- writel(sdidcon, &sdi_regs->sdidcon);
- }
-
- /* Write CMD arg. */
- writel(cmd->cmdarg, &sdi_regs->sdicarg);
-

-       /* Write CMD index. */
-       sdiccon = cmd->cmdidx & S3C2410_SDICMDCON_INDEX;
-       sdiccon |= S3C2410_SDICMDCON_SENDERHOST;
-       sdiccon |= S3C2410_SDICMDCON_CMDSTART;

-
- /* Command with short response. */
- if (cmd->resp_type & MMC_RSP_PRESENT) {
- sdiccon |= S3C2410_SDICMDCON_WAITRSP;
- sdicsta_wait_bit = S3C2410_SDICMDSTAT_RSPFIN;
- }
-
- /* Command with long response. */
- if (cmd->resp_type & MMC_RSP_136)
- sdiccon |= S3C2410_SDICMDCON_LONGRSP;
-
- /* Start the command. */
- writel(sdiccon, &sdi_regs->sdiccon);
-
- /* Wait for the command to complete or for response. */
- for (timeout = 100000; timeout; timeout--) {
- sdicsta = readl(&sdi_regs->sdicsta);
- if (sdicsta & sdicsta_wait_bit)
- break;
-
- if (sdicsta & S3C2410_SDICMDSTAT_CMDTIMEOUT)
- timeout = 1;
- }
-
- /* Clean the status bits. */
- setbits_le32(&sdi_regs->sdicsta, 0xf << 9);
-
- if (!timeout) {

-               puts("S3C SDI: Command timed out!\n");
-               ret = -ETIMEDOUT;
-               goto error;

- }
-
- /* Read out the response. */
- if (cmd->resp_type & MMC_RSP_136) {

-               cmd->response[0] = readl(&sdi_regs->sdirsp0);
-               cmd->response[1] = readl(&sdi_regs->sdirsp1);
-               cmd->response[2] = readl(&sdi_regs->sdirsp2);
-               cmd->response[3] = readl(&sdi_regs->sdirsp3);

- } else {
- cmd->response[0] = readl(&sdi_regs->sdirsp0);
- }
-
- /* If there are no data, we're done. */
- if (!data)
- return 0;
-
- xfer_len = data->blocksize * data->blocks;
-
- while (xfer_len > 0) {
- sdidsta = readl(&sdi_regs->sdidsta);
- sdifsta = readl(&sdi_regs->sdifsta);
-
- if (sdidsta & sdidsta_err_mask) {
- printf("S3C SDI: Data error (sdta=0x%08x)\n",
sdidsta);
- ret = -EIO;
- goto error;
- }
-
- if (data->flags & MMC_DATA_READ) {
- if ((sdifsta & S3C2410_SDIFSTA_COUNTMASK) < 4)
- continue;
- sdidat = readl(&sdi_regs->sdidat);
- put_unaligned_le32(sdidat, data->dest +
data_offset);
- } else { /* Write */
- /* TX FIFO half full. */
- if (!(sdifsta & S3C2410_SDIFSTA_TFHALF))
- continue;
-
- /* TX FIFO is below 32b full, write. */
- sdidat = get_unaligned_le32(data->src +
data_offset);
- writel(sdidat, &sdi_regs->sdidat);

-               }
-               data_offset += 4;
-               xfer_len -= 4;

- }
-
- /* Wait for the command to complete or for response. */
- for (timeout = 100000; timeout; timeout--) {
- sdidsta = readl(&sdi_regs->sdidsta);
- if (sdidsta & S3C2410_SDIDSTA_XFERFINISH)
- break;
-
- if (sdidsta & S3C2410_SDIDSTA_DATATIMEOUT)
- timeout = 1;
- }
-
- /* Clear status bits. */
- writel(0x6f8, &sdi_regs->sdidsta);
-
- if (!timeout) {

-               puts("S3C SDI: Command timed out!\n");
-               ret = -ETIMEDOUT;
-               goto error;

- }
-
- writel(0, &sdi_regs->sdidcon);
-
- return 0;
-error:
- return ret;
-}
-
-static int s3cmmc_set_ios(struct mmc *mmc)
-{
- struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
- uint32_t divider = 0;
-
- wide_bus = (mmc->bus_width == 4);
-
- if (!mmc->clock)
- return 0;
-
- divider = DIV_ROUND_UP(get_PCLK(), mmc->clock);
- if (divider)
- divider--;
-
- writel(divider, &sdi_regs->sdipre);
- mdelay(125);
-
- return 0;
-}
-
-static int s3cmmc_init(struct mmc *mmc)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
- struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
-
- /* Start the clock. */
- setbits_le32(&clk_power->clkcon, 1 << 9);
-
-#if defined(CONFIG_S3C2440)

-       writel(S3C2440_SDICON_SDRESET, &sdi_regs->sdicon);
-       mdelay(10);
-       writel(0x7fffff, &sdi_regs->sdidtimer);

-#else
- writel(0xffff, &sdi_regs->sdidtimer);
-#endif
- writel(MMC_MAX_BLOCK_LEN, &sdi_regs->sdibsize);
- writel(0x0, &sdi_regs->sdiimsk);
-
- writel(S3C2410_SDICON_FIFORESET | S3C2410_SDICON_CLOCKTYPE,
- &sdi_regs->sdicon);
-
- mdelay(125);
-
- return 0;
-}
-
-struct s3cmmc_priv {

-       struct mmc_config       cfg;
-       int (*getcd)(struct mmc *);
-       int (*getwp)(struct mmc *);

-};
-
-static int s3cmmc_getcd(struct mmc *mmc)
-{
- struct s3cmmc_priv *priv = mmc->priv;
- if (priv->getcd)
- return priv->getcd(mmc);
- else
- return 0;
-}
-
-static int s3cmmc_getwp(struct mmc *mmc)
-{
- struct s3cmmc_priv *priv = mmc->priv;
- if (priv->getwp)
- return priv->getwp(mmc);
- else
- return 0;
-}
-
-static const struct mmc_ops s3cmmc_ops = {

-       .send_cmd       = s3cmmc_send_cmd,
-       .set_ios        = s3cmmc_set_ios,
-       .init           = s3cmmc_init,
-       .getcd          = s3cmmc_getcd,
-       .getwp          = s3cmmc_getwp,

-};
-
-int s3cmmc_initialize(bd_t *bis, int (*getcd)(struct mmc *),
- int (*getwp)(struct mmc *))
-{

-       struct s3cmmc_priv      *priv;
-       struct mmc              *mmc;
-       struct mmc_config       *cfg;

-
- priv = calloc(1, sizeof(*priv));
- if (!priv)
- return -ENOMEM;
- cfg = &priv->cfg;
-

-       cfg->name = "S3C MMC";
-       cfg->ops = &s3cmmc_ops;
-       cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
-       cfg->host_caps = MMC_MODE_4BIT | MMC_MODE_HS;
-       cfg->f_min = 400000;
-       cfg->f_max = get_PCLK() / 2;
-       cfg->b_max = 0x80;
-
-#if defined(CONFIG_S3C2410)
-       /*
-        * S3C2410 has some bug that prevents reliable
-        * operation at higher speed
-        */

- cfg->f_max /= 2;
-#endif
-
- mmc = mmc_create(cfg, priv);
- if (!mmc) {
- free(priv);
- return -ENOMEM;
- }
-
- return 0;
-}

scripts/config_whitelist.txt +0 -1
index fa9c3fc8cb..dd7b328d8f 100644
@@ -2365,7 +2365,6 @@ CONFIG_S3C2400
 CONFIG_S3C2410
 CONFIG_S3C2410_NAND_BBT
 CONFIG_S3C2410_NAND_HWECC
-CONFIG_S3C2440
 CONFIG_S3C24X0
 CONFIG_S3C24XX_TACLS
 CONFIG_S3C24XX_TWRPH0

--
2.13.0.303.g4ebf302169-goog

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Thanks,
Minkyu Kang

#23 lore raw

PATCH 10/38 samsung: mmc: Drop s3c_sdi driver

In reply to Simon Glass
Quoted 3 lines · Simon Glass

This is no-longer used in U-Boot. Drop it.

Quoted 362 lines

---

 drivers/mmc/Makefile         |   1 -
 drivers/mmc/s3c_sdi.c        | 323 -------------------------------------------
 scripts/config_whitelist.txt |   1 -
 3 files changed, 325 deletions(-)
 delete mode 100644 drivers/mmc/s3c_sdi.c
drivers/mmc/Makefile +0 -1
index a078649899..2d781c38a6 100644
@@ -40,7 +40,6 @@ obj-$(CONFIG_MMC_MXS)			+= mxsmmc.o
 obj-$(CONFIG_MMC_PCI)			+= pci_mmc.o
 obj-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o
 obj-$(CONFIG_SUPPORT_EMMC_RPMB) += rpmb.o
-obj-$(CONFIG_S3C_SDI) += s3c_sdi.o
 obj-$(CONFIG_MMC_SANDBOX)		+= sandbox_mmc.o
 obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o
 obj-$(CONFIG_SH_SDHI) += sh_sdhi.o
drivers/mmc/s3c_sdi.c deleted +0 -323
deleted file mode 100644
index faf7b83a14..0000000000
@@ -1,323 +0,0 @@
-/*
- * S3C24xx SD/MMC driver
- *
- * Based on OpenMoko S3C24xx driver by Harald Welte <[email protected]>
- *
- * Copyright (C) 2014 Marek Vasut <[email protected]>
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#include <common.h>
-#include <malloc.h>
-#include <mmc.h>
-#include <errno.h>
-#include <asm/arch/s3c24x0_cpu.h>
-#include <asm/io.h>
-#include <asm/unaligned.h>
-
-#define S3C2440_SDICON_SDRESET		(1 << 8)
-#define S3C2410_SDICON_FIFORESET	(1 << 1)
-#define S3C2410_SDICON_CLOCKTYPE	(1 << 0)
-
-#define S3C2410_SDICMDCON_LONGRSP	(1 << 10)
-#define S3C2410_SDICMDCON_WAITRSP	(1 << 9)
-#define S3C2410_SDICMDCON_CMDSTART	(1 << 8)
-#define S3C2410_SDICMDCON_SENDERHOST	(1 << 6)
-#define S3C2410_SDICMDCON_INDEX		0x3f
-
-#define S3C2410_SDICMDSTAT_CRCFAIL	(1 << 12)
-#define S3C2410_SDICMDSTAT_CMDSENT	(1 << 11)
-#define S3C2410_SDICMDSTAT_CMDTIMEOUT	(1 << 10)
-#define S3C2410_SDICMDSTAT_RSPFIN	(1 << 9)
-
-#define S3C2440_SDIDCON_DS_WORD		(2 << 22)
-#define S3C2410_SDIDCON_TXAFTERRESP	(1 << 20)
-#define S3C2410_SDIDCON_RXAFTERCMD	(1 << 19)
-#define S3C2410_SDIDCON_BLOCKMODE	(1 << 17)
-#define S3C2410_SDIDCON_WIDEBUS		(1 << 16)
-#define S3C2440_SDIDCON_DATSTART	(1 << 14)
-#define S3C2410_SDIDCON_XFER_RXSTART	(2 << 12)
-#define S3C2410_SDIDCON_XFER_TXSTART	(3 << 12)
-#define S3C2410_SDIDCON_BLKNUM		0x7ff
-
-#define S3C2410_SDIDSTA_FIFOFAIL	(1 << 8)
-#define S3C2410_SDIDSTA_CRCFAIL		(1 << 7)
-#define S3C2410_SDIDSTA_RXCRCFAIL	(1 << 6)
-#define S3C2410_SDIDSTA_DATATIMEOUT	(1 << 5)
-#define S3C2410_SDIDSTA_XFERFINISH	(1 << 4)
-
-#define S3C2410_SDIFSTA_TFHALF		(1 << 11)
-#define S3C2410_SDIFSTA_COUNTMASK	0x7f
-
-/*
- * WARNING: We only support one SD IP block.
- * NOTE: It's not likely there will ever exist an S3C24xx with two,
- *       at least not in this universe all right.
- */
-static int wide_bus;
-
-static int
-s3cmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
-{
-	struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
-	uint32_t sdiccon, sdicsta, sdidcon, sdidsta, sdidat, sdifsta;
-	uint32_t sdicsta_wait_bit = S3C2410_SDICMDSTAT_CMDSENT;
-	unsigned int timeout = 100000;
-	int ret = 0, xfer_len, data_offset = 0;
-	const uint32_t sdidsta_err_mask = S3C2410_SDIDSTA_FIFOFAIL |
-		S3C2410_SDIDSTA_CRCFAIL | S3C2410_SDIDSTA_RXCRCFAIL |
-		S3C2410_SDIDSTA_DATATIMEOUT;
-
-
-	writel(0xffffffff, &sdi_regs->sdicsta);
-	writel(0xffffffff, &sdi_regs->sdidsta);
-	writel(0xffffffff, &sdi_regs->sdifsta);
-
-	/* Set up data transfer (if applicable). */
-	if (data) {
-		writel(data->blocksize, &sdi_regs->sdibsize);
-
-		sdidcon = data->blocks & S3C2410_SDIDCON_BLKNUM;
-		sdidcon |= S3C2410_SDIDCON_BLOCKMODE;
-#if defined(CONFIG_S3C2440)
-		sdidcon |= S3C2440_SDIDCON_DS_WORD | S3C2440_SDIDCON_DATSTART;
-#endif
-		if (wide_bus)
-			sdidcon |= S3C2410_SDIDCON_WIDEBUS;
-
-		if (data->flags & MMC_DATA_READ) {
-			sdidcon |= S3C2410_SDIDCON_RXAFTERCMD;
-			sdidcon |= S3C2410_SDIDCON_XFER_RXSTART;
-		} else {
-			sdidcon |= S3C2410_SDIDCON_TXAFTERRESP;
-			sdidcon |= S3C2410_SDIDCON_XFER_TXSTART;
-		}
-
-		writel(sdidcon, &sdi_regs->sdidcon);
-	}
-
-	/* Write CMD arg. */
-	writel(cmd->cmdarg, &sdi_regs->sdicarg);
-
-	/* Write CMD index. */
-	sdiccon = cmd->cmdidx & S3C2410_SDICMDCON_INDEX;
-	sdiccon |= S3C2410_SDICMDCON_SENDERHOST;
-	sdiccon |= S3C2410_SDICMDCON_CMDSTART;
-
-	/* Command with short response. */
-	if (cmd->resp_type & MMC_RSP_PRESENT) {
-		sdiccon |= S3C2410_SDICMDCON_WAITRSP;
-		sdicsta_wait_bit = S3C2410_SDICMDSTAT_RSPFIN;
-	}
-
-	/* Command with long response. */
-	if (cmd->resp_type & MMC_RSP_136)
-		sdiccon |= S3C2410_SDICMDCON_LONGRSP;
-
-	/* Start the command. */
-	writel(sdiccon, &sdi_regs->sdiccon);
-
-	/* Wait for the command to complete or for response. */
-	for (timeout = 100000; timeout; timeout--) {
-		sdicsta = readl(&sdi_regs->sdicsta);
-		if (sdicsta & sdicsta_wait_bit)
-			break;
-
-		if (sdicsta & S3C2410_SDICMDSTAT_CMDTIMEOUT)
-			timeout = 1;
-	}
-
-	/* Clean the status bits. */
-	setbits_le32(&sdi_regs->sdicsta, 0xf << 9);
-
-	if (!timeout) {
-		puts("S3C SDI: Command timed out!\n");
-		ret = -ETIMEDOUT;
-		goto error;
-	}
-
-	/* Read out the response. */
-	if (cmd->resp_type & MMC_RSP_136) {
-		cmd->response[0] = readl(&sdi_regs->sdirsp0);
-		cmd->response[1] = readl(&sdi_regs->sdirsp1);
-		cmd->response[2] = readl(&sdi_regs->sdirsp2);
-		cmd->response[3] = readl(&sdi_regs->sdirsp3);
-	} else {
-		cmd->response[0] = readl(&sdi_regs->sdirsp0);
-	}
-
-	/* If there are no data, we're done. */
-	if (!data)
-		return 0;
-
-	xfer_len = data->blocksize * data->blocks;
-
-	while (xfer_len > 0) {
-		sdidsta = readl(&sdi_regs->sdidsta);
-		sdifsta = readl(&sdi_regs->sdifsta);
-
-		if (sdidsta & sdidsta_err_mask) {
-			printf("S3C SDI: Data error (sdta=0x%08x)\n", sdidsta);
-			ret = -EIO;
-			goto error;
-		}
-
-		if (data->flags & MMC_DATA_READ) {
-			if ((sdifsta & S3C2410_SDIFSTA_COUNTMASK) < 4)
-				continue;
-			sdidat = readl(&sdi_regs->sdidat);
-			put_unaligned_le32(sdidat, data->dest + data_offset);
-		} else {	/* Write */
-			/* TX FIFO half full. */
-			if (!(sdifsta & S3C2410_SDIFSTA_TFHALF))
-				continue;
-
-			/* TX FIFO is below 32b full, write. */
-			sdidat = get_unaligned_le32(data->src + data_offset);
-			writel(sdidat, &sdi_regs->sdidat);
-		}
-		data_offset += 4;
-		xfer_len -= 4;
-	}
-
-	/* Wait for the command to complete or for response. */
-	for (timeout = 100000; timeout; timeout--) {
-		sdidsta = readl(&sdi_regs->sdidsta);
-		if (sdidsta & S3C2410_SDIDSTA_XFERFINISH)
-			break;
-
-		if (sdidsta & S3C2410_SDIDSTA_DATATIMEOUT)
-			timeout = 1;
-	}
-
-	/* Clear status bits. */
-	writel(0x6f8, &sdi_regs->sdidsta);
-
-	if (!timeout) {
-		puts("S3C SDI: Command timed out!\n");
-		ret = -ETIMEDOUT;
-		goto error;
-	}
-
-	writel(0, &sdi_regs->sdidcon);
-
-	return 0;
-error:
-	return ret;
-}
-
-static int s3cmmc_set_ios(struct mmc *mmc)
-{
-	struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
-	uint32_t divider = 0;
-
-	wide_bus = (mmc->bus_width == 4);
-
-	if (!mmc->clock)
-		return 0;
-
-	divider = DIV_ROUND_UP(get_PCLK(), mmc->clock);
-	if (divider)
-		divider--;
-
-	writel(divider, &sdi_regs->sdipre);
-	mdelay(125);
-
-	return 0;
-}
-
-static int s3cmmc_init(struct mmc *mmc)
-{
-	struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power();
-	struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
-
-	/* Start the clock. */
-	setbits_le32(&clk_power->clkcon, 1 << 9);
-
-#if defined(CONFIG_S3C2440)
-	writel(S3C2440_SDICON_SDRESET, &sdi_regs->sdicon);
-	mdelay(10);
-	writel(0x7fffff, &sdi_regs->sdidtimer);
-#else
-	writel(0xffff, &sdi_regs->sdidtimer);
-#endif
-	writel(MMC_MAX_BLOCK_LEN, &sdi_regs->sdibsize);
-	writel(0x0, &sdi_regs->sdiimsk);
-
-	writel(S3C2410_SDICON_FIFORESET | S3C2410_SDICON_CLOCKTYPE,
-	       &sdi_regs->sdicon);
-
-	mdelay(125);
-
-	return 0;
-}
-
-struct s3cmmc_priv {
-	struct mmc_config	cfg;
-	int (*getcd)(struct mmc *);
-	int (*getwp)(struct mmc *);
-};
-
-static int s3cmmc_getcd(struct mmc *mmc)
-{
-	struct s3cmmc_priv *priv = mmc->priv;
-	if (priv->getcd)
-		return priv->getcd(mmc);
-	else
-		return 0;
-}
-
-static int s3cmmc_getwp(struct mmc *mmc)
-{
-	struct s3cmmc_priv *priv = mmc->priv;
-	if (priv->getwp)
-		return priv->getwp(mmc);
-	else
-		return 0;
-}
-
-static const struct mmc_ops s3cmmc_ops = {
-	.send_cmd	= s3cmmc_send_cmd,
-	.set_ios	= s3cmmc_set_ios,
-	.init		= s3cmmc_init,
-	.getcd		= s3cmmc_getcd,
-	.getwp		= s3cmmc_getwp,
-};
-
-int s3cmmc_initialize(bd_t *bis, int (*getcd)(struct mmc *),
-		      int (*getwp)(struct mmc *))
-{
-	struct s3cmmc_priv	*priv;
-	struct mmc		*mmc;
-	struct mmc_config	*cfg;
-
-	priv = calloc(1, sizeof(*priv));
-	if (!priv)
-		return -ENOMEM;
-	cfg = &priv->cfg;
-
-	cfg->name = "S3C MMC";
-	cfg->ops = &s3cmmc_ops;
-	cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
-	cfg->host_caps = MMC_MODE_4BIT | MMC_MODE_HS;
-	cfg->f_min = 400000;
-	cfg->f_max = get_PCLK() / 2;
-	cfg->b_max = 0x80;
-
-#if defined(CONFIG_S3C2410)
-	/*
-	 * S3C2410 has some bug that prevents reliable
-	 * operation at higher speed
-	 */
-	cfg->f_max /= 2;
-#endif
-
-	mmc = mmc_create(cfg, priv);
-	if (!mmc) {
-		free(priv);
-		return -ENOMEM;
-	}
-
-	return 0;
-}
scripts/config_whitelist.txt +0 -1
index fa9c3fc8cb..dd7b328d8f 100644
@@ -2365,7 +2365,6 @@ CONFIG_S3C2400
 CONFIG_S3C2410
 CONFIG_S3C2410_NAND_BBT
 CONFIG_S3C2410_NAND_HWECC
-CONFIG_S3C2440
 CONFIG_S3C24X0
 CONFIG_S3C24XX_TACLS
 CONFIG_S3C24XX_TWRPH0
#24 lore raw

PATCH 10/38 samsung: mmc: Drop s3c_sdi driver

In reply to Simon Glass
Quoted 4 lines · Simon Glass

This is no-longer used in U-Boot. Drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/ee925617/attachment.sig>
#25 lore raw

PATCH 11/38 samsung: usb: Drop ohci-s3c24xx driver

In reply to Simon Glass

This is not used anymore. Drop it.

---

 drivers/usb/host/Makefile       |    1 -
 drivers/usb/host/ohci-s3c24xx.c | 1688 ---------------------------------------
 drivers/usb/host/ohci-s3c24xx.h |  409 ----------
 include/common.h                |    3 +-
 4 files changed, 1 insertion(+), 2100 deletions(-)
 delete mode 100644 drivers/usb/host/ohci-s3c24xx.c
 delete mode 100644 drivers/usb/host/ohci-s3c24xx.h
drivers/usb/host/Makefile +0 -1
index bf354fe8d5..2baec721fd 100644
@@ -17,7 +17,6 @@ obj-$(CONFIG_USB_OHCI_DA8XX) += ohci-da8xx.o
 obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
 obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
 obj-$(CONFIG_USB_SL811HS) += sl811-hcd.o
-obj-$(CONFIG_USB_OHCI_S3C24XX) += ohci-s3c24xx.o
 obj-$(CONFIG_USB_OHCI_EP93XX) += ohci-ep93xx.o
 obj-$(CONFIG_USB_OHCI_SUNXI) += ohci-sunxi.o
 obj-$(CONFIG_USB_OHCI_LPC32XX) += ohci-lpc32xx.o
drivers/usb/host/ohci-s3c24xx.c deleted +0 -1688

1,688 lines not on this page · raw message

drivers/usb/host/ohci-s3c24xx.h deleted +0 -409

409 lines not on this page · raw message

include/common.h +1 -2
index fb4e79bb39..47076869c1 100644
@@ -646,8 +646,7 @@ int	get_clocks (void);
 #if defined(CONFIG_MPC5xxx)
 int	prt_mpc5xxx_clks (void);
 #endif
-#if defined(CONFIG_S3C24X0) || \
-    defined(CONFIG_LH7A40X) || \
+#if defined(CONFIG_LH7A40X) || \
     defined(CONFIG_EP93XX)
 ulong	get_FCLK (void);
 ulong	get_HCLK (void);
Signature · 1 line
2.13.0.303.g4ebf302169-goog

A message that is not in the archive (sent off-list or not yet received): CALrBrZ3_833sZmpswnL-dSx_yRXUkVJAU06ZhWR1WBAGC1C66A@mail.gmail.com

#27 lore raw

PATCH 11/38 samsung: usb: Drop ohci-s3c24xx driver

2017. 5. 18. 00:12에 "Simon Glass" <[email protected]>님이 작성:

This is not used anymore. Drop it.

---

 drivers/usb/host/Makefile       |    1 -
 drivers/usb/host/ohci-s3c24xx.c | 1688 ------------------------------
---------
 drivers/usb/host/ohci-s3c24xx.h |  409 ----------
 include/common.h                |    3 +-
 4 files changed, 1 insertion(+), 2100 deletions(-)
 delete mode 100644 drivers/usb/host/ohci-s3c24xx.c
 delete mode 100644 drivers/usb/host/ohci-s3c24xx.h
drivers/usb/host/Makefile +0 -1
index bf354fe8d5..2baec721fd 100644
@@ -17,7 +17,6 @@ obj-$(CONFIG_USB_OHCI_DA8XX) += ohci-da8xx.o
 obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
 obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
 obj-$(CONFIG_USB_SL811HS) += sl811-hcd.o
-obj-$(CONFIG_USB_OHCI_S3C24XX) += ohci-s3c24xx.o
 obj-$(CONFIG_USB_OHCI_EP93XX) += ohci-ep93xx.o
 obj-$(CONFIG_USB_OHCI_SUNXI) += ohci-sunxi.o
 obj-$(CONFIG_USB_OHCI_LPC32XX) += ohci-lpc32xx.o
drivers/usb/host/ohci- renamed from drivers/usb/host/ohci-s3c24xx.c +0 -0

s3c24xx.c
deleted file mode 100644
index 28b9ab5176..0000000000

drivers/usb/host/ohci-s3c24xx.c deleted +0 -146

146 lines not on this page · raw message

*buffer,
- int transfer_len, struct devrequest *setup, char *str,
- int small)
-{
- struct urb_priv *purb = &urb_priv;
-
- dbg("%s URB:[%4x] dev:%2d,ep:%2d-%c,type:%s,len:%d/%d stat:%#lx",

-           str,
-           sohci_get_current_frame_number(dev),
-           usb_pipedevice(pipe),
-           usb_pipeendpoint(pipe),
-           usb_pipeout(pipe) ? 'O' : 'I',
-           usb_pipetype(pipe) < 2 ?

- (usb_pipeint(pipe) ? "INTR" : "ISOC") :
- (usb_pipecontrol(pipe) ? "CTRL" : "BULK"),
- purb->actual_length, transfer_len, dev->status);
-#ifdef OHCI_VERBOSE_DEBUG
- if (!small) {
- int i, len;
-
- if (usb_pipecontrol(pipe)) {
- printf(__FILE__ ": cmd(8):");
- for (i = 0; i < 8; i++)
- printf(" %02x", ((__u8 *) setup)[i]);
- printf("\n");
- }
- if (transfer_len > 0 && buffer) {
- printf(__FILE__ ": data(%d/%d):",
- purb->actual_length, transfer_len);
- len = usb_pipeout(pipe) ?
- transfer_len : purb->actual_length;
- for (i = 0; i < 16 && i < len; i++)
- printf(" %02x", ((__u8 *) buffer)[i]);
- printf("%s\n", i < len ? "..." : "");
- }
- }
-#endif
-}
-
-/* just for debugging; prints non-empty branches of the
- int ed tree inclusive iso eds*/
-void ep_print_int_eds(struct ohci *ohci, char *str) -{

-       int i, j;
-       __u32 *ed_p;
-       for (i = 0; i < 32; i++) {
-               j = 5;
-               ed_p = &(ohci->hcca->int_table[i]);
-               if (*ed_p == 0)
-                       continue;
-               printf(__FILE__ ": %s branch int %2d(%2x):", str, i, i);
-               while (*ed_p != 0 && j--) {
-                       struct ed *ed = (struct ed *) m32_swap(ed_p);
-                       printf(" ed: %4x;", ed->hwINFO);
-                       ed_p = &ed->hwNextED;

- }
- printf("\n");
- }
-}
-
-static void ohci_dump_intr_mask(char *label, __u32 mask) -{
- dbg("%s: 0x%08x%s%s%s%s%s%s%s%s%s",

-           label,
-           mask,
-           (mask & OHCI_INTR_MIE) ? " MIE" : "",
-           (mask & OHCI_INTR_OC) ? " OC" : "",
-           (mask & OHCI_INTR_RHSC) ? " RHSC" : "",
-           (mask & OHCI_INTR_FNO) ? " FNO" : "",
-           (mask & OHCI_INTR_UE) ? " UE" : "",
-           (mask & OHCI_INTR_RD) ? " RD" : "",
-           (mask & OHCI_INTR_SF) ? " SF" : "",
-           (mask & OHCI_INTR_WDH) ? " WDH" : "",
-           (mask & OHCI_INTR_SO) ? " SO" : "");

-}
-
-static void maybe_print_eds(char *label, __u32 value) -{
- struct ed *edp = (struct ed *) value;
-
- if (value) {

-               dbg("%s %08x", label, value);
-               dbg("%08x", edp->hwINFO);
-               dbg("%08x", edp->hwTailP);
-               dbg("%08x", edp->hwHeadP);
-               dbg("%08x", edp->hwNextED);

- }
-}
-
-static char *hcfs2string(int state)
-{
- switch (state) {
- case OHCI_USB_RESET:
- return "reset";
- case OHCI_USB_RESUME:
- return "resume";
- case OHCI_USB_OPER:
- return "operational";
- case OHCI_USB_SUSPEND:
- return "suspend";
- }
- return "?";
-}
-
-/* dump control and status registers */ -static void ohci_dump_status(struct ohci *controller) -{
- struct ohci_regs *regs = controller->regs;
- __u32 temp;
-
- temp = readl(&regs->revision) & 0xff;
- if (temp != 0x10)
- dbg("spec %d.%d", (temp >> 4), (temp & 0x0f));
-
- temp = readl(&regs->control);
- dbg("control: 0x%08x%s%s%s HCFS=%s%s%s%s%s CBSR=%d", temp,

-           (temp & OHCI_CTRL_RWE) ? " RWE" : "",
-           (temp & OHCI_CTRL_RWC) ? " RWC" : "",
-           (temp & OHCI_CTRL_IR) ? " IR" : "",
-           hcfs2string(temp & OHCI_CTRL_HCFS),
-           (temp & OHCI_CTRL_BLE) ? " BLE" : "",
-           (temp & OHCI_CTRL_CLE) ? " CLE" : "",
-           (temp & OHCI_CTRL_IE) ? " IE" : "",
-           (temp & OHCI_CTRL_PLE) ? " PLE" : "", temp & OHCI_CTRL_CBSR);
-
-       temp = readl(&regs->cmdstatus);
-       dbg("cmdstatus: 0x%08x SOC=%d%s%s%s%s", temp,
-           (temp & OHCI_SOC) >> 16,
-           (temp & OHCI_OCR) ? " OCR" : "",
-           (temp & OHCI_BLF) ? " BLF" : "",
-           (temp & OHCI_CLF) ? " CLF" : "", (temp & OHCI_HCR) ? " HCR" :

"");
-
- ohci_dump_intr_mask("intrstatus", readl(&regs->intrstatus));
- ohci_dump_intr_mask("intrenable", readl(&regs->intrenable));
-
- maybe_print_eds("ed_periodcurrent", readl(&regs->ed_periodcurrent));
-
- maybe_print_eds("ed_controlhead", readl(&regs->ed_controlhead));
- maybe_print_eds("ed_controlcurrent", readl(&regs->ed_
controlcurrent));
-
- maybe_print_eds("ed_bulkhead", readl(&regs->ed_bulkhead));
- maybe_print_eds("ed_bulkcurrent", readl(&regs->ed_bulkcurrent));
-
- maybe_print_eds("donehead", readl(&regs->donehead));
-}
-
-static void ohci_dump_roothub(struct ohci *controller, int verbose) -{
- __u32 temp, ndp, i;
-
- temp = roothub_a(controller);
- ndp = (temp & RH_A_NDP);
-
- if (verbose) {
- dbg("roothub.a: %08x POTPGT=%d%s%s%s%s%s NDP=%d", temp,

-                   ((temp & RH_A_POTPGT) >> 24) & 0xff,
-                   (temp & RH_A_NOCP) ? " NOCP" : "",
-                   (temp & RH_A_OCPM) ? " OCPM" : "",
-                   (temp & RH_A_DT) ? " DT" : "",
-                   (temp & RH_A_NPS) ? " NPS" : "",
-                   (temp & RH_A_PSM) ? " PSM" : "", ndp);

- temp = roothub_b(controller);
- dbg("roothub.b: %08x PPCM=%04x DR=%04x",
- temp, (temp & RH_B_PPCM) >> 16, (temp & RH_B_DR)
- );
- temp = roothub_status(controller);
- dbg("roothub.status: %08x%s%s%s%s%s%s",

-                   temp,
-                   (temp & RH_HS_CRWE) ? " CRWE" : "",
-                   (temp & RH_HS_OCIC) ? " OCIC" : "",
-                   (temp & RH_HS_LPSC) ? " LPSC" : "",
-                   (temp & RH_HS_DRWE) ? " DRWE" : "",
-                   (temp & RH_HS_OCI) ? " OCI" : "",
-                   (temp & RH_HS_LPS) ? " LPS" : "");

- }
-
- for (i = 0; i < ndp; i++) {
- temp = roothub_portstatus(controller, i);
- dbg("roothub.portstatus [%d] = 0x%08x%s%s%s%s%s%s%s%s%s%s%s%
s",

-                   i,
-                   temp,
-                   (temp & RH_PS_PRSC) ? " PRSC" : "",
-                   (temp & RH_PS_OCIC) ? " OCIC" : "",
-                   (temp & RH_PS_PSSC) ? " PSSC" : "",
-                   (temp & RH_PS_PESC) ? " PESC" : "",
-                   (temp & RH_PS_CSC) ? " CSC" : "",
-                   (temp & RH_PS_LSDA) ? " LSDA" : "",
-                   (temp & RH_PS_PPS) ? " PPS" : "",
-                   (temp & RH_PS_PRS) ? " PRS" : "",
-                   (temp & RH_PS_POCI) ? " POCI" : "",
-                   (temp & RH_PS_PSS) ? " PSS" : "",
-                   (temp & RH_PS_PES) ? " PES" : "",
-                   (temp & RH_PS_CCS) ? " CCS" : "");

- }
-}
-
-static void ohci_dump(struct ohci *controller, int verbose) -{
- dbg("OHCI controller usb-%s state", controller->slot_name);
-

-       /* dumps some of the state we know about */
-       ohci_dump_status(controller);
-       if (verbose)

- ep_print_int_eds(controller, "hcca");
- dbg("hcca frame #%04x", controller->hcca->frame_no);
- ohci_dump_roothub(controller, 1);
-}
-
-#endif /* DEBUG */
- -/*---------------------------------------------------------
----------------*
- * Interface functions (URB)
- *----------------------------------------------------------- --------------*/
-
-/* get a transfer request */
-
-int sohci_submit_job(struct usb_device *dev, unsigned long pipe, void *buffer,
- int transfer_len, struct devrequest *setup, int
interval)
-{

-       struct ohci *ohci;
-       struct ed *ed;
-       struct urb_priv *purb_priv;
-       int i, size = 0;

-
- ohci = &gohci;
-
- /* when controller's hung, permit only roothub cleanup attempts
- * such as powering down ports */
- if (ohci->disabled) {
- err("sohci_submit_job: EPIPE");
- return -1;
- }
-
- /* if we have an unfinished URB from previous transaction let's
- * fail and scream as quickly as possible so as not to corrupt
- * further communication */
- if (!urb_finished) {
- err("sohci_submit_job: URB NOT FINISHED");
- return -1;
- }
- /* we're about to begin a new transaction here
- so mark the URB unfinished */
- urb_finished = 0;
-

-       /* every endpoint has a ed, locate and fill it */
-       ed = ep_add_ed(dev, pipe);
-       if (!ed) {

- err("sohci_submit_job: ENOMEM");
- return -1;
- }
-
- /* for the private part of the URB we need the number of TDs (size)
*/
- switch (usb_pipetype(pipe)) {
- case PIPE_BULK:

-               /* one TD for every 4096 Byte */
-               size = (transfer_len - 1) / 4096 + 1;
-               break;

- case PIPE_CONTROL:
- /* 1 TD for setup, 1 for ACK and 1 for every 4096 B */
- size = (transfer_len == 0) ? 2 : (transfer_len - 1) / 4096
+ 3;
- break;
- }
-
- if (size >= (N_URB_TD - 1)) {
- err("need %d TDs, only have %d", size, N_URB_TD);
- return -1;

-       }
-       purb_priv = &urb_priv;
-       purb_priv->pipe = pipe;
-
-       /* fill the private part of the URB */
-       purb_priv->length = size;
-       purb_priv->ed = ed;
-       purb_priv->actual_length = 0;
-
-       /* allocate the TDs */
-       /* note that td[0] was allocated in ep_add_ed */
-       for (i = 0; i < size; i++) {
-               purb_priv->td[i] = td_alloc(dev);
-               if (!purb_priv->td[i]) {
-                       purb_priv->length = i;
-                       urb_free_priv(purb_priv);
-                       err("sohci_submit_job: ENOMEM");
-                       return -1;

- }
- }
-
- if (ed->state == ED_NEW || (ed->state & ED_DEL)) {

-               urb_free_priv(purb_priv);
-               err("sohci_submit_job: EINVAL");
-               return -1;

- }
-
- /* link the ed into a chain if is not already */
- if (ed->state != ED_OPER)
- ep_link(ohci, ed);
-
- /* fill the TDs and link it to the ed */
- td_submit_job(dev, pipe, buffer, transfer_len, setup, purb_priv,
- interval);
-
- return 0;
-}
- -/*--------------------------------------------------------- ----------------*/
-
-#ifdef DEBUG
-/* tell us the current USB frame number */
-
-static int sohci_get_current_frame_number(struct usb_device *usb_dev) -{
- struct ohci *ohci = &gohci;
-
- return m16_swap(ohci->hcca->frame_no);
-}
-#endif
- -/*---------------------------------------------------------
----------------*
- * ED handling functions
- *----------------------------------------------------------- --------------*/
-
-/* link an ed into one of the HC chains */
-
-static int ep_link(struct ohci *ohci, struct ed *edi)
-{
- struct ed *ed = edi;
-
- ed->state = ED_OPER;
-
- switch (ed->type) {
- case PIPE_CONTROL:
- ed->hwNextED = 0;
- if (ohci->ed_controltail == NULL) {
- writel((u32)ed, &ohci->regs->ed_controlhead);
- } else {
- ohci->ed_controltail->hwNextED = (__u32)
m32_swap(ed);

-               }
-               ed->ed_prev = ohci->ed_controltail;
-               if (!ohci->ed_controltail && !ohci->ed_rm_list[0] &&
-                   !ohci->ed_rm_list[1] && !ohci->sleeping) {
-                       ohci->hc_control |= OHCI_CTRL_CLE;
-                       writel(ohci->hc_control, &ohci->regs->control);
-               }
-               ohci->ed_controltail = edi;
-               break;

-
- case PIPE_BULK:
- ed->hwNextED = 0;
- if (ohci->ed_bulktail == NULL) {
- writel((u32)ed, &ohci->regs->ed_bulkhead);
- } else {
- ohci->ed_bulktail->hwNextED = (__u32) m32_swap(ed);

-               }
-               ed->ed_prev = ohci->ed_bulktail;
-               if (!ohci->ed_bulktail && !ohci->ed_rm_list[0] &&
-                   !ohci->ed_rm_list[1] && !ohci->sleeping) {
-                       ohci->hc_control |= OHCI_CTRL_BLE;
-                       writel(ohci->hc_control, &ohci->regs->control);
-               }
-               ohci->ed_bulktail = edi;
-               break;

- }
- return 0;
-}
- -/*--------------------------------------------------------- ----------------*/
-
-/* unlink an ed from one of the HC chains.
- * just the link to the ed is unlinked.
- * the link from the ed still points to another operational ed or 0
- * so the HC can eventually finish the processing of the unlinked ed */ -
-static int ep_unlink(struct ohci *ohci, struct ed *ed)
-{
- struct ed *next;
- ed->hwINFO |= m32_swap(OHCI_ED_SKIP);
-
- switch (ed->type) {
- case PIPE_CONTROL:
- if (ed->ed_prev == NULL) {
- if (!ed->hwNextED) {
- ohci->hc_control &= ~OHCI_CTRL_CLE;
- writel(ohci->hc_control,
&ohci->regs->control);
- }
- writel(m32_swap(*((__u32 *) &ed->hwNextED)),
- &ohci->regs->ed_controlhead);
- } else {
- ed->ed_prev->hwNextED = ed->hwNextED;
- }
- if (ohci->ed_controltail == ed) {
- ohci->ed_controltail = ed->ed_prev;
- } else {
- next = (struct ed *)m32_swap(*((__u32
*)&ed->hwNextED));
- next->ed_prev = ed->ed_prev;
- }
- break;
-
- case PIPE_BULK:
- if (ed->ed_prev == NULL) {
- if (!ed->hwNextED) {
- ohci->hc_control &= ~OHCI_CTRL_BLE;
- writel(ohci->hc_control,
&ohci->regs->control);
- }
- writel(m32_swap(*((__u32 *) &ed->hwNextED)),
- &ohci->regs->ed_bulkhead);
- } else {
- ed->ed_prev->hwNextED = ed->hwNextED;
- }
- if (ohci->ed_bulktail == ed) {
- ohci->ed_bulktail = ed->ed_prev;
- } else {
- next = (struct ed *)m32_swap(*((__u32
*)&ed->hwNextED));
- next->ed_prev = ed->ed_prev;
- }
- break;

-       }
-       ed->state = ED_UNLINK;
-       return 0;

-}
-
-/*--------------------------------------------------------- ----------------*/
-
-/* add/reinit an endpoint; this should be done once at the usb_set_configuration
- * command, but the USB stack is a little bit stateless so we do it at every
- * transaction. If the state of the ed is ED_NEW then a dummy td is added and
- * the state is changed to ED_UNLINK. In all other cases the state is left
- * unchanged. The ed info fields are setted anyway even though most of them
- * should not change */
-
-static struct ed *ep_add_ed(struct usb_device *usb_dev, unsigned long pipe) -{

-       struct td *td;
-       struct ed *ed_ret;
-       struct ed *ed;

-
- ed = ed_ret = &ohci_dev.ed[(usb_pipeendpoint(pipe) << 1) |
- (usb_pipecontrol(pipe) ? 0 :
- usb_pipeout(pipe))];
-
- if ((ed->state & ED_DEL) || (ed->state & ED_URB_DEL)) {

-               err("ep_add_ed: pending delete");
-               /* pending delete request */
-               return NULL;
-       }
-
-       if (ed->state == ED_NEW) {
-               ed->hwINFO = m32_swap(OHCI_ED_SKIP);    /* skip ed */
-               /* dummy td; end of td list for ed */
-               td = td_alloc(usb_dev);
-               ed->hwTailP = (__u32) m32_swap(td);
-               ed->hwHeadP = ed->hwTailP;
-               ed->state = ED_UNLINK;
-               ed->type = usb_pipetype(pipe);
-               ohci_dev.ed_cnt++;
-       }
-
-       ed->hwINFO = m32_swap(usb_pipedevice(pipe)
-                             | usb_pipeendpoint(pipe) << 7
-                             | (usb_pipeisoc(pipe) ? 0x8000 : 0)
-                             | (usb_pipecontrol(pipe) ? 0 :

- (usb_pipeout(pipe) ? 0x800 : 0x1000))
- | (usb_dev->speed == USB_SPEED_LOW) << 13 |
- usb_maxpacket(usb_dev, pipe) << 16);
-
- return ed_ret;
-}
-
-/*---------------------------------------------------------
----------------*
- * TD handling functions
- *----------------------------------------------------------- --------------*/
-
-/* enqueue next TD for this URB (OHCI spec 5.2.8.2) */
-
-static void td_fill(struct ohci *ohci, unsigned int info, void *data, int len,
- struct usb_device *dev, int index,
- struct urb_priv *urb_priv)
-{
- struct td *td, *td_pt;
-#ifdef OHCI_FILL_TRACE
- int i;
-#endif
-
- if (index > urb_priv->length) {
- err("index > length");
- return;

-       }
-       /* use this td as the next dummy */
-       td_pt = urb_priv->td[index];
-       td_pt->hwNextTD = 0;

-
- /* fill the old dummy TD */
- td = urb_priv->td[index] =
- (struct td *) (m32_swap(urb_priv->ed->hwTailP) & ~0xf);
-

-       td->ed = urb_priv->ed;
-       td->next_dl_td = NULL;
-       td->index = index;
-       td->data = (__u32) data;

-#ifdef OHCI_FILL_TRACE
- if (usb_pipebulk(urb_priv->pipe) && usb_pipeout(urb_priv->pipe)) {
- for (i = 0; i < len; i++)
- printf("td->data[%d] %#2x ", i,
- ((unsigned char *)td->data)[i]);
- printf("\n");
- }
-#endif
- if (!len)
- data = 0;
-

-       td->hwINFO = (__u32) m32_swap(info);
-       td->hwCBP = (__u32) m32_swap(data);
-       if (data)

- td->hwBE = (__u32) m32_swap(data + len - 1);
- else
- td->hwBE = 0;
- td->hwNextTD = (__u32) m32_swap(td_pt);
-
- /* append to queue */
- td->ed->hwTailP = td->hwNextTD;
-}
- -/*--------------------------------------------------------- ----------------*/
-
-/* prepare all TDs of a transfer */
-
-static void td_submit_job(struct usb_device *dev, unsigned long pipe,

-                         void *buffer, int transfer_len,
-                         struct devrequest *setup, struct urb_priv *urb,
-                         int interval)
-{
-       struct ohci *ohci = &gohci;
-       int data_len = transfer_len;
-       void *data;
-       int cnt = 0;
-       __u32 info = 0;
-       unsigned int toggle = 0;

-
- /* OHCI handles the DATA-toggles itself, we just
- use the USB-toggle bits for resetting */
- if (usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe))) {
- toggle = TD_T_TOGGLE;
- } else {
- toggle = TD_T_DATA0;
- usb_settoggle(dev, usb_pipeendpoint(pipe),
usb_pipeout(pipe),
- 1);

-       }
-       urb->td_cnt = 0;
-       if (data_len)

- data = buffer;
- else
- data = 0;
-
- switch (usb_pipetype(pipe)) {
- case PIPE_BULK:
- info = usb_pipeout(pipe) ? TD_CC | TD_DP_OUT : TD_CC |
TD_DP_IN;
- while (data_len > 4096) {
- td_fill(ohci, info | (cnt ? TD_T_TOGGLE : toggle),
data,
- 4096, dev, cnt, urb);

-                       data += 4096;
-                       data_len -= 4096;
-                       cnt++;
-               }
-               info = usb_pipeout(pipe) ?
-                               TD_CC | TD_DP_OUT :
-                               TD_CC | TD_R | TD_DP_IN;

- td_fill(ohci, info | (cnt ? TD_T_TOGGLE : toggle), data,
- data_len, dev, cnt, urb);
- cnt++;
-
- if (!ohci->sleeping)
- /* start bulk list */
- writel(OHCI_BLF, &ohci->regs->cmdstatus);
- break;
-
- case PIPE_CONTROL:

-               info = TD_CC | TD_DP_SETUP | TD_T_DATA0;
-               td_fill(ohci, info, setup, 8, dev, cnt++, urb);
-               if (data_len > 0) {
-                       info = usb_pipeout(pipe) ?
-                           TD_CC | TD_R | TD_DP_OUT | TD_T_DATA1 :
-                           TD_CC | TD_R | TD_DP_IN | TD_T_DATA1;
-                       /* NOTE:  mishandles transfers >8K, some >4K */

- td_fill(ohci, info, data, data_len, dev, cnt++,
urb);
- }
- info = usb_pipeout(pipe) ?

-                   TD_CC | TD_DP_IN | TD_T_DATA1 :
-                   TD_CC | TD_DP_OUT | TD_T_DATA1;

- td_fill(ohci, info, data, 0, dev, cnt++, urb);
- if (!ohci->sleeping)
- /* start Control list */
- writel(OHCI_CLF, &ohci->regs->cmdstatus);
- break;
- }
- if (urb->length != cnt)
- dbg("TD LENGTH %d != CNT %d", urb->length, cnt);
-}
- -/*---------------------------------------------------------
----------------*
- * Done List handling functions
- *----------------------------------------------------------- --------------*/
-
-
-/* calculate the transfer length and update the urb */ -
-static void dl_transfer_length(struct td *td)
-{
- __u32 tdBE, tdCBP;
- struct urb_priv *lurb_priv = &urb_priv;
-
- tdBE = m32_swap(td->hwBE);
- tdCBP = m32_swap(td->hwCBP);
-
- if (!(usb_pipecontrol(lurb_priv->pipe) &&
- ((td->index == 0) || (td->index == lurb_priv->length - 1)))) {
- if (tdBE != 0) {
- if (td->hwCBP == 0)
- lurb_priv->actual_length += tdBE - td->data
+ 1;
- else
- lurb_priv->actual_length += tdCBP -
td->data;
- }
- }
-}
- -/*--------------------------------------------------------- ----------------*/
-
-/* replies to the request have to be on a FIFO basis so
- * we reverse the reversed done-list */
-
-static struct td *dl_reverse_done_list(struct ohci *ohci) -{

-       __u32 td_list_hc;
-       __u32 tmp;
-       struct td *td_rev = NULL;
-       struct td *td_list = NULL;
-       struct urb_priv *lurb_priv = NULL;

-
- td_list_hc = m32_swap(ohci->hcca->done_head) & 0xfffffff0;
- ohci->hcca->done_head = 0;
-
- while (td_list_hc) {
- td_list = (struct td *) td_list_hc;
-
- if (TD_CC_GET(m32_swap(td_list->hwINFO))) {
- lurb_priv = &urb_priv;
- dbg(" USB-error/status: %x : %p",
- TD_CC_GET(m32_swap(td_list->hwINFO)), td_list);
- if (td_list->ed->hwHeadP & m32_swap(0x1)) {
- if (lurb_priv &&
- ((td_list->index+1) <
lurb_priv->length)) {
- tmp = lurb_priv->length - 1;
- td_list->ed->hwHeadP =
-
(lurb_priv->td[tmp]->hwNextTD &
- m32_swap(0xfffffff0)) |
- (td_list->ed->hwHeadP &
- m32_swap(0x2));
- lurb_priv->td_cnt +=
lurb_priv->length -
- td_list->index
- 1;
- } else
- td_list->ed->hwHeadP &=
- m32_swap(0xfffffff2);
- }
- }
-

-               td_list->next_dl_td = td_rev;
-               td_rev = td_list;
-               td_list_hc = m32_swap(td_list->hwNextTD) & 0xfffffff0;

- }
-
- return td_list;
-}
- -/*--------------------------------------------------------- ----------------*/
-
-/* td done list */
-static int dl_done_list(struct ohci *ohci, struct td *td_list) -{

-       struct td *td_list_next = NULL;
-       struct ed *ed;
-       int cc = 0;
-       int stat = 0;
-       /* urb_t *urb; */
-       struct urb_priv *lurb_priv;
-       __u32 tdINFO, edHeadP, edTailP;

-
- while (td_list) {
- td_list_next = td_list->next_dl_td;
-
- lurb_priv = &urb_priv;
- tdINFO = m32_swap(td_list->hwINFO);
-
- ed = td_list->ed;
-
- dl_transfer_length(td_list);
-

-               /* error code of transfer */
-               cc = TD_CC_GET(tdINFO);
-               if (cc != 0) {

- dbg("ConditionCode %#x", cc);
- stat = cc_to_error[cc];
- }
-
- /* see if this done list makes for all TD's of current URB,
- * and mark the URB finished if so */
- if (++(lurb_priv->td_cnt) == lurb_priv->length) {
- if ((ed->state & (ED_OPER | ED_UNLINK)))
- urb_finished = 1;
- else
- dbg("dl_done_list: strange.., ED state %x, "
- "ed->state\n");
- } else
- dbg("dl_done_list: processing TD %x, len %x\n",
- lurb_priv->td_cnt, lurb_priv->length);
-
- if (ed->state != ED_NEW) {
- edHeadP = m32_swap(ed->hwHeadP) & 0xfffffff0;
- edTailP = m32_swap(ed->hwTailP);
-
- /* unlink eds if they are not busy */
- if ((edHeadP == edTailP) && (ed->state == ED_OPER))
- ep_unlink(ohci, ed);
- }
-
- td_list = td_list_next;
- }
- return stat;
-}
- -/*---------------------------------------------------------
----------------*
- * Virtual Root Hub
- *----------------------------------------------------------- --------------*/
-
-#include <usbroothubdes.h>
-
-/* Hub class-specific descriptor is constructed dynamically */ -
- -/*--------------------------------------------------------- ----------------*/
-
-#define OK(x) len = (x); break
-#ifdef DEBUG
-#define WR_RH_STAT(x) \
-{ \
- info("WR:status %#8x", (x)); \
- writel((x), &gohci.regs->roothub.status); \
-}
-#define WR_RH_PORTSTAT(x) \
-{ \
- info("WR:portstatus[%d] %#8x", wIndex-1, (x)); \
- writel((x), &gohci.regs->roothub.portstatus[wIndex-1]); \
-}
-#else
-#define WR_RH_STAT(x) \
- writel((x), &gohci.regs->roothub.status)
-#define WR_RH_PORTSTAT(x)\
- writel((x), &gohci.regs->roothub.portstatus[wIndex-1])
-#endif
-#define RD_RH_STAT roothub_status(&gohci)
-#define RD_RH_PORTSTAT roothub_portstatus(&gohci, wIndex-1) -
-/* request to virtual root hub */
-
-int rh_check_port_status(struct ohci *controller)
-{
- __u32 temp, ndp, i;
- int res;
-

-       res = -1;
-       temp = roothub_a(controller);
-       ndp = (temp & RH_A_NDP);
-       for (i = 0; i < ndp; i++) {
-               temp = roothub_portstatus(controller, i);
-               /* check for a device disconnect */
-               if (((temp & (RH_PS_PESC | RH_PS_CSC)) ==

- (RH_PS_PESC | RH_PS_CSC)) && ((temp & RH_PS_CCS) ==
0)) {
- res = i;
- break;
- }
- }
- return res;
-}
-
-static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
- void *buffer, int transfer_len,
- struct devrequest *cmd)
-{

-       void *data = buffer;
-       int leni = transfer_len;
-       int len = 0;
-       int stat = 0;
-       union {
-               __u32 word[4];
-               __u16 hword[8];
-               __u8 byte[16];
-       } datab;
-       __u8 *data_buf = datab.byte;
-       __u16 bmRType_bReq;
-       __u16 wValue;
-       __u16 wIndex;
-       __u16 wLength;

-
-#ifdef DEBUG
- urb_priv.actual_length = 0;
- pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)",
- usb_pipein(pipe));
-#else
- mdelay(1);
-#endif
- if (usb_pipeint(pipe)) {
- info("Root-Hub submit IRQ: NOT implemented");
- return 0;
- }
-

-       bmRType_bReq = cmd->requesttype | (cmd->request << 8);
-       wValue = m16_swap(cmd->value);
-       wIndex = m16_swap(cmd->index);
-       wLength = m16_swap(cmd->length);

-
- info("Root-Hub: adr: %2x cmd(%1x): %08x %04x %04x %04x",
- dev->devnum, 8, bmRType_bReq, wValue, wIndex, wLength);
-
- switch (bmRType_bReq) {
- /* Request Destination:

-                  without flags: Device,
-                  RH_INTERFACE: interface,
-                  RH_ENDPOINT: endpoint,
-                  RH_CLASS means HUB here,
-                  RH_OTHER | RH_CLASS  almost ever means HUB_PORT here

- */
-
- case RH_GET_STATUS:
- datab.hword[0] = m16_swap(1);
- OK(2);
- case RH_GET_STATUS | RH_INTERFACE:
- datab.hword[0] = m16_swap(0);
- OK(2);
- case RH_GET_STATUS | RH_ENDPOINT:
- datab.hword[0] = m16_swap(0);
- OK(2);
- case RH_GET_STATUS | RH_CLASS:
- datab.word[0] =
- m32_swap(RD_RH_STAT & ~(RH_HS_CRWE | RH_HS_DRWE));
- OK(4);
- case RH_GET_STATUS | RH_OTHER | RH_CLASS:
- datab.word[0] = m32_swap(RD_RH_PORTSTAT);
- OK(4);
-
- case RH_CLEAR_FEATURE | RH_ENDPOINT:
- switch (wValue) {
- case (RH_ENDPOINT_STALL):
- OK(0);
- }
- break;
-
- case RH_CLEAR_FEATURE | RH_CLASS:
- switch (wValue) {
- case RH_C_HUB_LOCAL_POWER:
- OK(0);
- case (RH_C_HUB_OVER_CURRENT):
- WR_RH_STAT(RH_HS_OCIC);
- OK(0);
- }
- break;
-
- case RH_CLEAR_FEATURE | RH_OTHER | RH_CLASS:
- switch (wValue) {
- case (RH_PORT_ENABLE):
- WR_RH_PORTSTAT(RH_PS_CCS);
- OK(0);
- case (RH_PORT_SUSPEND):
- WR_RH_PORTSTAT(RH_PS_POCI);
- OK(0);
- case (RH_PORT_POWER):
- WR_RH_PORTSTAT(RH_PS_LSDA);
- OK(0);
- case (RH_C_PORT_CONNECTION):
- WR_RH_PORTSTAT(RH_PS_CSC);
- OK(0);
- case (RH_C_PORT_ENABLE):
- WR_RH_PORTSTAT(RH_PS_PESC);
- OK(0);
- case (RH_C_PORT_SUSPEND):
- WR_RH_PORTSTAT(RH_PS_PSSC);
- OK(0);
- case (RH_C_PORT_OVER_CURRENT):
- WR_RH_PORTSTAT(RH_PS_OCIC);
- OK(0);
- case (RH_C_PORT_RESET):
- WR_RH_PORTSTAT(RH_PS_PRSC);
- OK(0);
- }
- break;
-
- case RH_SET_FEATURE | RH_OTHER | RH_CLASS:
- switch (wValue) {
- case (RH_PORT_SUSPEND):
- WR_RH_PORTSTAT(RH_PS_PSS);
- OK(0);
- case (RH_PORT_RESET): /* BUG IN HUP CODE ******** */
- if (RD_RH_PORTSTAT & RH_PS_CCS)
- WR_RH_PORTSTAT(RH_PS_PRS);
- OK(0);
- case (RH_PORT_POWER):
- WR_RH_PORTSTAT(RH_PS_PPS);
- OK(0);
- case (RH_PORT_ENABLE): /* BUG IN HUP CODE ******** */
- if (RD_RH_PORTSTAT & RH_PS_CCS)
- WR_RH_PORTSTAT(RH_PS_PES);
- OK(0);
- }
- break;
-
- case RH_SET_ADDRESS:
- gohci.rh.devnum = wValue;
- OK(0);
-
- case RH_GET_DESCRIPTOR:
- switch ((wValue & 0xff00) >> 8) {
- case (0x01): /* device descriptor */
- len = min_t(unsigned int,
- leni,
- min_t(unsigned int,
- sizeof(root_hub_dev_des),
wLength));
- data_buf = root_hub_dev_des;
- OK(len);
- case (0x02): /* configuration descriptor */
- len = min_t(unsigned int,
- leni,
- min_t(unsigned int,
- sizeof(root_hub_config_des),
- wLength));
- data_buf = root_hub_config_des;
- OK(len);
- case (0x03): /* string descriptors */
- if (wValue == 0x0300) {
- len = min_t(unsigned int,
- leni,
- min_t(unsigned int,
-
sizeof(root_hub_str_index0),
- wLength));
- data_buf = root_hub_str_index0;
- OK(len);
- }
- if (wValue == 0x0301) {
- len = min_t(unsigned int,
- leni,
- min_t(unsigned int,
-
sizeof(root_hub_str_index1),
- wLength));
- data_buf = root_hub_str_index1;
- OK(len);
- }
- default:
- stat = USB_ST_STALLED;
- }
- break;
-
- case RH_GET_DESCRIPTOR | RH_CLASS:
- {
- __u32 temp = roothub_a(&gohci);
-

-                       data_buf[0] = 9;        /* min length; */
-                       data_buf[1] = 0x29;
-                       data_buf[2] = temp & RH_A_NDP;
-                       data_buf[3] = 0;
-                       if (temp & RH_A_PSM)

- /* per-port power switching? */
- data_buf[3] |= 0x1;
- if (temp & RH_A_NOCP)
- /* no overcurrent reporting? */
- data_buf[3] |= 0x10;
- else if (temp & RH_A_OCPM)
- /* per-port overcurrent reporting? */
- data_buf[3] |= 0x8;
-

-                       /* corresponds to data_buf[4-7] */
-                       datab.word[1] = 0;
-                       data_buf[5] = (temp & RH_A_POTPGT) >> 24;
-                       temp = roothub_b(&gohci);
-                       data_buf[7] = temp & RH_B_DR;
-                       if (data_buf[2] < 7) {
-                               data_buf[8] = 0xff;
-                       } else {
-                               data_buf[0] += 2;
-                               data_buf[8] = (temp & RH_B_DR) >> 8;
-                               data_buf[10] = data_buf[9] = 0xff;

- }
-
- len = min_t(unsigned int, leni,
- min_t(unsigned int, data_buf[0],
wLength));
- OK(len);
- }
-
- case RH_GET_CONFIGURATION:
- *(__u8 *) data_buf = 0x01;
- OK(1);
-
- case RH_SET_CONFIGURATION:
- WR_RH_STAT(0x10000);
- OK(0);
-
- default:
- dbg("unsupported root hub command");
- stat = USB_ST_STALLED;
- }
-
-#ifdef DEBUG
- ohci_dump_roothub(&gohci, 1);
-#else
- mdelay(1);
-#endif
-
- len = min_t(int, len, leni);
- if (data != data_buf)
- memcpy(data, data_buf, len);
- dev->act_len = len;
- dev->status = stat;
-
-#ifdef DEBUG
- if (transfer_len)
- urb_priv.actual_length = transfer_len;
- pkt_print(dev, pipe, buffer, transfer_len, cmd, "RET(rh)",
- 0 /*usb_pipein(pipe) */);
-#else
- mdelay(1);
-#endif
-
- return stat;
-}
-
-/*--------------------------------------------------------- ----------------*/
-
-/* common code for handling submit messages - used for all but root hub */ -/* accesses. */
-int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
- int transfer_len, struct devrequest *setup, int
interval)
-{

-       int stat = 0;
-       int maxsize = usb_maxpacket(dev, pipe);
-       int timeout;

-
- /* device pulled? Shortcut the action. */
- if (devgone == dev) {
- dev->status = USB_ST_CRC_ERR;
- return 0;
- }
-#ifdef DEBUG
- urb_priv.actual_length = 0;
- pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB",
- usb_pipein(pipe));
-#else
- mdelay(1);
-#endif
- if (!maxsize) {
- err("submit_common_message: pipesize for pipe %lx is zero",
- pipe);
- return -1;
- }
-
- if (sohci_submit_job(dev, pipe, buffer, transfer_len, setup,
interval) <
- 0) {
- err("sohci_submit_job failed");
- return -1;
- }
-
- mdelay(10);
- /* ohci_dump_status(&gohci); */
-
- /* allow more time for a BULK device to react - some are slow */
-#define BULK_TO 5000 /* timeout in milliseconds */
- if (usb_pipebulk(pipe))
- timeout = BULK_TO;
- else
- timeout = 100;
-
- /* wait for it to complete */
- for (;;) {
- /* check whether the controller is done */
- stat = hc_interrupt();
-
- if (stat < 0) {
- stat = USB_ST_CRC_ERR;
- break;
- }
-
- /* NOTE: since we are not interrupt driven in U-Boot and
always

-                * handle only one URB@a time, we cannot assume the
-                * transaction finished on the first successful return from
-                * hc_interrupt().. unless the flag for current URB is set,
-                * meaning that all TD's to/from device got actually
-                * transferred and processed. If the current URB is not
-                * finished we need to re-iterate this loop so as
-                * hc_interrupt() gets called again as there needs to be

some
- * more TD's to process still */
- if ((stat >= 0) && (stat != 0xff) && (urb_finished)) {
- /* 0xff is returned for an SF-interrupt */
- break;
- }
-
- if (--timeout) {
- mdelay(1);
- if (!urb_finished)
- dbg("\%");
-
- } else {

-                       err("CTL:TIMEOUT ");
-                       dbg("submit_common_msg: TO status %x\n", stat);
-                       stat = USB_ST_CRC_ERR;
-                       urb_finished = 1;
-                       break;

- }
- }
-
-#if 0
- /* we got an Root Hub Status Change interrupt */
- if (got_rhsc) {
-#ifdef DEBUG
- ohci_dump_roothub(&gohci, 1);
-#endif

-               got_rhsc = 0;
-               /* abuse timeout */
-               timeout = rh_check_port_status(&gohci);
-               if (timeout >= 0) {

-#if 0 /* this does nothing useful, but leave it here
- in case that changes */
- /* the called routine adds 1 to the passed value */
- usb_hub_port_connect_change(gohci.rh.dev, timeout -
1);
-#endif
- /*

-                        * XXX
-                        * This is potentially dangerous because it assumes
-                        * that only one device is ever plugged in!
-                        */

- devgone = dev;
- }
- }
-#endif
-
- dev->status = stat;
- dev->act_len = transfer_len;
-
-#ifdef DEBUG
- pkt_print(dev, pipe, buffer, transfer_len, setup, "RET(ctlr)",
- usb_pipein(pipe));
-#else
- mdelay(1);
-#endif
-

-       /* free TDs in urb_priv */
-       urb_free_priv(&urb_priv);
-       return 0;

-}
-
-/* submit routines called from usb.c */
-int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
- int transfer_len)
-{
- info("submit_bulk_msg");
- return submit_common_msg(dev, pipe, buffer, transfer_len, NULL, 0);
-}
-
-int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
- int transfer_len, struct devrequest *setup)
-{
- int maxsize = usb_maxpacket(dev, pipe);
-
- info("submit_control_msg");
-#ifdef DEBUG
- urb_priv.actual_length = 0;
- pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB",
- usb_pipein(pipe));
-#else
- mdelay(1);
-#endif
- if (!maxsize) {
- err("submit_control_message: pipesize for pipe %lx is zero",
- pipe);
- return -1;
- }
- if (((pipe >> 8) & 0x7f) == gohci.rh.devnum) {

-               gohci.rh.dev = dev;
-               /* root hub - redirect */
-               return ohci_submit_rh_msg(dev, pipe, buffer, transfer_len,

- setup);
- }
-
- return submit_common_msg(dev, pipe, buffer, transfer_len, setup, 0);
-}
-
-int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
- int transfer_len, int interval)
-{
- info("submit_int_msg");
- return -1;
-}
- -/*---------------------------------------------------------
----------------*
- * HC functions
- *----------------------------------------------------------- --------------*/
-
-/* reset the HC and BUS */
-
-static int hc_reset(struct ohci *ohci)
-{
- int timeout = 30;
- int smm_timeout = 50; /* 0,5 sec */
-
- if (readl(&ohci->regs->control) & OHCI_CTRL_IR) {

-               /* SMM owns the HC - request ownership */
-               writel(OHCI_OCR, &ohci->regs->cmdstatus);
-               info("USB HC TakeOver from SMM");
-               while (readl(&ohci->regs->control) & OHCI_CTRL_IR) {

- mdelay(10);
- if (--smm_timeout == 0) {
- err("USB HC TakeOver failed!");
- return -1;
- }
- }
- }
-
- /* Disable HC interrupts */
- writel(OHCI_INTR_MIE, &ohci->regs->intrdisable);
-
- dbg("USB HC reset_hc usb-%s: ctrl = 0x%X ;",
- ohci->slot_name, readl(&ohci->regs->control));
-
- /* Reset USB (needed by some controllers) */
- writel(0, &ohci->regs->control);
-

-       /* HC Reset requires max 10 us delay */
-       writel(OHCI_HCR, &ohci->regs->cmdstatus);
-       while ((readl(&ohci->regs->cmdstatus) & OHCI_HCR) != 0) {

- if (--timeout == 0) {
- err("USB HC reset timed out!");
- return -1;
- }
- udelay(1);
- }
- return 0;
-}
- -/*--------------------------------------------------------- ----------------*/
-
-/* Start an OHCI controller, set the BUS operational
- * enable interrupts
- * connect the virtual root hub */
-
-static int hc_start(struct ohci *ohci)
-{
- __u32 mask;
- unsigned int fminterval;
-
- ohci->disabled = 1;
-
- /* Tell the controller where the control and bulk lists are
- * The lists are empty now. */
-
- writel(0, &ohci->regs->ed_controlhead);
- writel(0, &ohci->regs->ed_bulkhead);
-
- /* a reset clears this */
- writel((__u32) ohci->hcca, &ohci->regs->hcca);
-

-       fminterval = 0x2edf;
-       writel((fminterval * 9) / 10, &ohci->regs->periodicstart);
-       fminterval |= ((((fminterval - 210) * 6) / 7) << 16);
-       writel(fminterval, &ohci->regs->fminterval);
-       writel(0x628, &ohci->regs->lsthresh);
-
-       /* start controller operations */
-       ohci->hc_control = OHCI_CONTROL_INIT | OHCI_USB_OPER;
-       ohci->disabled = 0;
-       writel(ohci->hc_control, &ohci->regs->control);
-
-       /* disable all interrupts */
-       mask = (OHCI_INTR_SO | OHCI_INTR_WDH | OHCI_INTR_SF | OHCI_INTR_RD |
-               OHCI_INTR_UE | OHCI_INTR_FNO | OHCI_INTR_RHSC |
-               OHCI_INTR_OC | OHCI_INTR_MIE);
-       writel(mask, &ohci->regs->intrdisable);
-       /* clear all interrupts */
-       mask &= ~OHCI_INTR_MIE;
-       writel(mask, &ohci->regs->intrstatus);
-       /* Choose the interrupts we care about now  - but w/o MIE */
-       mask = OHCI_INTR_RHSC | OHCI_INTR_UE | OHCI_INTR_WDH | OHCI_INTR_SO;
-       writel(mask, &ohci->regs->intrenable);

-
-#ifdef OHCI_USE_NPS
- /* required for AMD-756 and some Mac platforms */
- writel((roothub_a(ohci) | RH_A_NPS) & ~RH_A_PSM,
- &ohci->regs->roothub.a);
- writel(RH_HS_LPSC, &ohci->regs->roothub.status);
-#endif /* OHCI_USE_NPS */
-
- /* POTPGT delay is bits 24-31, in 2 ms units. */
- mdelay((roothub_a(ohci) >> 23) & 0x1fe);
-
- /* connect the virtual root hub */
- ohci->rh.devnum = 0;
-
- return 0;
-}
- -/*--------------------------------------------------------- ----------------*/
-
-/* an interrupt happens */
-
-static int hc_interrupt(void)
-{

-       struct ohci *ohci = &gohci;
-       struct ohci_regs *regs = ohci->regs;
-       int ints;
-       int stat = -1;

-
- if ((ohci->hcca->done_head != 0) &&
- !(m32_swap(ohci->hcca->done_head) & 0x01)) {
-
- ints = OHCI_INTR_WDH;
-
- } else {
- ints = readl(&regs->intrstatus);
- if (ints == ~(u32) 0) {

-                       ohci->disabled++;
-                       err("%s device removed!", ohci->slot_name);
-                       return -1;
-               }
-               ints &= readl(&regs->intrenable);
-               if (ints == 0) {

- dbg("hc_interrupt: returning..\n");
- return 0xff;
- }
- }
-
- /* dbg("Interrupt: %x frame: %x", ints,
- le16_to_cpu(ohci->hcca->frame_no)); */
-
- if (ints & OHCI_INTR_RHSC) {
- got_rhsc = 1;
- stat = 0xff;
- }
-
- if (ints & OHCI_INTR_UE) {
- ohci->disabled++;
- err("OHCI Unrecoverable Error, controller usb-%s disabled",
- ohci->slot_name);
- /* e.g. due to PCI Master/Target Abort */
-
-#ifdef DEBUG
- ohci_dump(ohci, 1);
-#else
- mdelay(1);
-#endif
- /* FIXME: be optimistic, hope that bug won't repeat often.
*/
- /* Make some non-interrupt context restart the controller.
*/

-               /* Count and limit the retries though; either hardware or */
-               /* software errors can go forever... */
-               hc_reset(ohci);
-               return -1;

- }
-
- if (ints & OHCI_INTR_WDH) {
- mdelay(1);
-

-               writel(OHCI_INTR_WDH, &regs->intrdisable);
-               stat = dl_done_list(&gohci, dl_reverse_done_list(&gohci));
-               writel(OHCI_INTR_WDH, &regs->intrenable);
-       }
-
-       if (ints & OHCI_INTR_SO) {
-               dbg("USB Schedule overrun\n");
-               writel(OHCI_INTR_SO, &regs->intrenable);
-               stat = -1;

- }
-
- /* FIXME: this assumes SOF (1/ms) interrupts don't get lost... */
- if (ints & OHCI_INTR_SF) {

-               unsigned int frame = m16_swap(ohci->hcca->frame_no) & 1;
-               mdelay(1);
-               writel(OHCI_INTR_SF, &regs->intrdisable);
-               if (ohci->ed_rm_list[frame] != NULL)

- writel(OHCI_INTR_SF, &regs->intrenable);
- stat = 0xff;
- }
-
- writel(ints, &regs->intrstatus);
- return stat;
-}
- -/*--------------------------------------------------------- ----------------*/
- -/*--------------------------------------------------------- ----------------*/
-
-/* De-allocate all resources.. */
-
-static void hc_release_ohci(struct ohci *ohci)
-{
- dbg("USB HC release ohci usb-%s", ohci->slot_name);
-
- if (!ohci->disabled)
- hc_reset(ohci);
-}
- -/*--------------------------------------------------------- ----------------*/
-
-/*
- * low level initalisation routine, called from usb.c
- */
-static char ohci_inited = 0;
-
-int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
- struct s3c24x0_gpio *gpio = s3c24x0_get_base_gpio();
-
- /*

-        * Set the 48 MHz UPLL clocking. Values are taken from
-        * "PLL value selection guide", 6-23, s3c2400_UM.pdf.
-        */

- clk_power->upllcon = ((40 << 12) + (1 << 4) + 2);
- gpio->misccr |= 0x8; /* 1 = use pads related USB for USB host */
-
- /*
- * Enable USB host clock.
- */
- clk_power->clkcon |= (1 << 4);
-
- memset(&gohci, 0, sizeof(struct ohci));
- memset(&urb_priv, 0, sizeof(struct urb_priv));
-
- /* align the storage */
- if ((__u32) &ghcca[0] & 0xff) {
- err("HCCA not aligned!!");
- return -1;

-       }
-       phcca = &ghcca[0];
-       info("aligned ghcca %p", phcca);
-       memset(&ohci_dev, 0, sizeof(struct ohci_device));
-       if ((__u32) &ohci_dev.ed[0] & 0x7) {
-               err("EDs not aligned!!");
-               return -1;
-       }
-       memset(gtd, 0, sizeof(struct td) * (NUM_TD + 1));
-       if ((__u32) gtd & 0x7) {
-               err("TDs not aligned!!");
-               return -1;
-       }
-       ptd = gtd;
-       gohci.hcca = phcca;
-       memset(phcca, 0, sizeof(struct ohci_hcca));
-
-       gohci.disabled = 1;
-       gohci.sleeping = 0;
-       gohci.irq = -1;
-       gohci.regs = (struct ohci_regs *)S3C24X0_USB_HOST_BASE;

-
- gohci.flags = 0;
- gohci.slot_name = "s3c2400";
-
- if (hc_reset(&gohci) < 0) {

-               hc_release_ohci(&gohci);
-               /* Initialization failed */
-               clk_power->clkcon &= ~(1 << 4);
-               return -1;
-       }
-
-       /* FIXME this is a second HC reset; why?? */
-       gohci.hc_control = OHCI_USB_RESET;
-       writel(gohci.hc_control, &gohci.regs->control);
-       mdelay(10);
-
-       if (hc_start(&gohci) < 0) {
-               err("can't start usb-%s", gohci.slot_name);
-               hc_release_ohci(&gohci);
-               /* Initialization failed */
-               clk_power->clkcon &= ~(1 << 4);
-               return -1;

- }
-#ifdef DEBUG
- ohci_dump(&gohci, 1);
-#else
- mdelay(1);
-#endif
- ohci_inited = 1;
- urb_finished = 1;
-
- return 0;
-}
-
-int usb_lowlevel_stop(int index)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
-

-       /* this gets called really early - before the controller has */
-       /* even been initialized! */
-       if (!ohci_inited)
-               return 0;
-       /* TODO release any interrupts, etc. */
-       /* call hc_release_ohci() here ? */
-       hc_reset(&gohci);
-       /* may not want to do this */
-       clk_power->clkcon &= ~(1 << 4);
-       return 0;

-}
-
-#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_S3C24X0) */ -
-#if defined(CONFIG_USB_OHCI_NEW) && \
- defined(CONFIG_SYS_USB_OHCI_CPU_INIT) && \
- defined(CONFIG_S3C24X0)
-
-int usb_cpu_init(void)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
- struct s3c24x0_gpio *gpio = s3c24x0_get_base_gpio();
-
- /*

-        * Set the 48 MHz UPLL clocking. Values are taken from
-        * "PLL value selection guide", 6-23, s3c2400_UM.pdf.
-        */
-       writel((40 << 12) + (1 << 4) + 2, &clk_power->upllcon);
-       /* 1 = use pads related USB for USB host */
-       writel(readl(&gpio->misccr) | 0x8, &gpio->misccr);

-
- /*
- * Enable USB host clock.
- */
- writel(readl(&clk_power->clkcon) | (1 << 4), &clk_power->clkcon);
-
- return 0;
-}
-
-int usb_cpu_stop(void)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();

-       /* may not want to do this */
-       writel(readl(&clk_power->clkcon) & ~(1 << 4), &clk_power->clkcon);
-       return 0;

-}
-
-int usb_cpu_init_fail(void)
-{
- struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
- writel(readl(&clk_power->clkcon) & ~(1 << 4), &clk_power->clkcon);
- return 0;
-}
-
-#endif /* defined(CONFIG_USB_OHCI_NEW) && \
- defined(CONFIG_SYS_USB_OHCI_CPU_INIT) && \
- defined(CONFIG_S3C24X0) */

drivers/usb/host/ohci- renamed from drivers/usb/host/ohci-s3c24xx.h +0 -0

s3c24xx.h
deleted file mode 100644
index f272d78859..0000000000

drivers/usb/host/ohci-s3c24xx.h deleted +0 -184

184 lines not on this page · raw message

*/

-#define OHCI_CTRL_IR   (1 << 8)        /* interrupt routing */
-#define OHCI_CTRL_RWC  (1 << 9)        /* remote wakeup connected */
-#define OHCI_CTRL_RWE  (1 << 10)       /* remote wakeup enable */
-
-/* pre-shifted values for HCFS */
-#      define OHCI_USB_RESET   (0 << 6)
-#      define OHCI_USB_RESUME  (1 << 6)
-#      define OHCI_USB_OPER    (2 << 6)
-#      define OHCI_USB_SUSPEND (3 << 6)

-
-/*
- * HcCommandStatus (cmdstatus) register masks
- */

-#define OHCI_HCR       (1 << 0)        /* host controller reset */
-#define OHCI_CLF       (1 << 1)        /* control list filled */
-#define OHCI_BLF       (1 << 2)        /* bulk list filled */
-#define OHCI_OCR       (1 << 3)        /* ownership change request */
-#define OHCI_SOC       (3 << 16)       /* scheduling overrun count */

-
-/*
- * masks used with interrupt registers:
- * HcInterruptStatus (intrstatus)
- * HcInterruptEnable (intrenable)
- * HcInterruptDisable (intrdisable)
- */

-#define OHCI_INTR_SO   (1 << 0)        /* scheduling overrun */
-#define OHCI_INTR_WDH  (1 << 1)        /* writeback of done_head */
-#define OHCI_INTR_SF   (1 << 2)        /* start frame */
-#define OHCI_INTR_RD   (1 << 3)        /* resume detect */
-#define OHCI_INTR_UE   (1 << 4)        /* unrecoverable error */
-#define OHCI_INTR_FNO  (1 << 5)        /* frame number overflow */
-#define OHCI_INTR_RHSC (1 << 6)        /* root hub status change */
-#define OHCI_INTR_OC   (1 << 30)       /* ownership change */
-#define OHCI_INTR_MIE  (1 << 31)       /* master interrupt enable */
-
-/* Virtual Root HUB */
-struct virt_root_hub {
-       int devnum;             /* Address of Root Hub endpoint */
-       void *dev;              /* was urb */
-       void *int_addr;
-       int send;
-       int interval;

-};
-
-/* USB HUB CONSTANTS (not OHCI-specific; see hub.h) */ -
-/* destination of request */

-#define RH_INTERFACE           0x01
-#define RH_ENDPOINT            0x02
-#define RH_OTHER               0x03

-
-#define RH_CLASS 0x20
-#define RH_VENDOR 0x40
-
-/* Requests: bRequest << 8 | bmRequestType */

-#define RH_GET_STATUS          0x0080
-#define RH_CLEAR_FEATURE       0x0100
-#define RH_SET_FEATURE         0x0300
-#define RH_SET_ADDRESS         0x0500
-#define RH_GET_DESCRIPTOR      0x0680
-#define RH_SET_DESCRIPTOR      0x0700
-#define RH_GET_CONFIGURATION   0x0880
-#define RH_SET_CONFIGURATION   0x0900
-#define RH_GET_STATE           0x0280
-#define RH_GET_INTERFACE       0x0A80
-#define RH_SET_INTERFACE       0x0B00
-#define RH_SYNC_FRAME          0x0C80

-/* Our Vendor Specific Request */
-#define RH_SET_EP 0x2000
-
-
-/* Hub port features */
-#define RH_PORT_CONNECTION 0x00
-#define RH_PORT_ENABLE 0x01
-#define RH_PORT_SUSPEND 0x02

-#define RH_PORT_OVER_CURRENT   0x03
-#define RH_PORT_RESET          0x04
-#define RH_PORT_POWER          0x08
-#define RH_PORT_LOW_SPEED      0x09
-
-#define RH_C_PORT_CONNECTION   0x10
-#define RH_C_PORT_ENABLE       0x11
-#define RH_C_PORT_SUSPEND      0x12

-#define RH_C_PORT_OVER_CURRENT 0x13
-#define RH_C_PORT_RESET 0x14
-
-/* Hub features */
-#define RH_C_HUB_LOCAL_POWER 0x00
-#define RH_C_HUB_OVER_CURRENT 0x01
-
-#define RH_DEVICE_REMOTE_WAKEUP 0x00
-#define RH_ENDPOINT_STALL 0x01
-
-#define RH_ACK 0x01
-#define RH_REQ_ERR -1
-#define RH_NACK 0x00
-
-
-/* OHCI ROOT HUB REGISTER MASKS */
-
-/* roothub.portstatus [i] bits */

-#define RH_PS_CCS              0x00000001 /* current connect status */
-#define RH_PS_PES              0x00000002 /* port enable status */
-#define RH_PS_PSS              0x00000004 /* port suspend status */
-#define RH_PS_POCI             0x00000008 /* port over current indicator */
-#define RH_PS_PRS              0x00000010 /* port reset status */
-#define RH_PS_PPS              0x00000100 /* port power status */
-#define RH_PS_LSDA             0x00000200 /* low speed device attached */
-#define RH_PS_CSC              0x00010000 /* connect status change */
-#define RH_PS_PESC             0x00020000 /* port enable status change */
-#define RH_PS_PSSC             0x00040000 /* port suspend status change */
-#define RH_PS_OCIC             0x00080000 /* over current indicator change

*/
-#define RH_PS_PRSC 0x00100000 /* port reset status change */
-
-/* roothub.status bits */

-#define RH_HS_LPS              0x00000001 /* local power status */
-#define RH_HS_OCI              0x00000002 /* over current indicator */
-#define RH_HS_DRWE             0x00008000 /* device remote wakeup enable */
-#define RH_HS_LPSC             0x00010000 /* local power status change */
-#define RH_HS_OCIC             0x00020000 /* over current indicator change

*/
-#define RH_HS_CRWE 0x80000000 /* clear remote wakeup enable */
-
-/* roothub.b masks */
-#define RH_B_DR 0x0000ffff /* device removable
flags */
-#define RH_B_PPCM 0xffff0000 /* port power control mask */
-
-/* roothub.a masks */
-#define RH_A_NDP (0xff << 0) /* number of
downstream ports */
-#define RH_A_PSM (1 << 8) /* power switching
mode */
-#define RH_A_NPS (1 << 9) /* no power switching
*/

-#define        RH_A_DT                 (1 << 10)    /* device type (mbz) */
-#define        RH_A_OCPM               (1 << 11)    /* over current

protection mode */
-#define RH_A_NOCP (1 << 12) /* no over current
protection */
-#define RH_A_POTPGT (0xff << 24) /* power on to power
good time */
-
-/* urb */
-#define N_URB_TD 48
-struct urb_priv {
- struct ed *ed;
- __u16 length; /* number of tds associated with this
request */

-       __u16 td_cnt;           /* number of tds already serviced */
-       int state;
-       unsigned long pipe;
-       int actual_length;
-       struct td *td[N_URB_TD];        /* list pointer to all

corresponding TDs
- associated with this request */
-};
-#define URB_DEL 1
-
-/*
- * This is the full ohci controller description
- *
- * Note how the "proper" USB information is just
- * a subset of what the full implementation needs. (Linus)
- */
-
-
-struct ohci {
- struct ohci_hcca *hcca; /* hcca */
- /*dma_addr_t hcca_dma; */
-

-       int irq;
-       int disabled;           /* e.g. got a UE, we're hung */
-       int sleeping;
-       unsigned long flags;    /* for HC bugs */

-
- struct ohci_regs *regs; /* OHCI controller's memory */
-
- struct ed *ed_rm_list[2]; /* lists of all endpoints to be removed
*/

-       struct ed *ed_bulktail;    /* last endpoint of bulk list */
-       struct ed *ed_controltail; /* last endpoint of control list */
-       int intrstatus;
-       __u32 hc_control;       /* copy of the hc control reg */
-       struct usb_device *dev[32];
-       struct virt_root_hub rh;

-
- const char *slot_name;
-};
-
-#define NUM_EDS 8 /* num of preallocated endpoint descriptors
*/
-
-struct ohci_device {
- struct ed ed[NUM_EDS];
- int ed_cnt;
-};
-
-/* hcd */
-/* endpoint */
-static int ep_link(struct ohci *ohci, struct ed *ed); -static int ep_unlink(struct ohci *ohci, struct ed *ed); -static struct ed *ep_add_ed(struct usb_device *usb_dev, unsigned long pipe);
- -/*--------------------------------------------------------- ----------------*/
-
-/* we need more TDs than EDs */
-#define NUM_TD 64
-
-/* +1 so we can align the storage */
-struct td gtd[NUM_TD + 1];
-
-/* pointers to aligned storage */
-struct td *ptd;
-
-/* TDs ... */
-static inline struct td *td_alloc(struct usb_device *usb_dev) -{
- int i;
- struct td *td;
-
- td = NULL;
- for (i = 0; i < NUM_TD; i++) {
- if (ptd[i].usb_dev == NULL) {

-                       td = &ptd[i];
-                       td->usb_dev = usb_dev;
-                       break;

- }
- }
-
- return td;
-}
-
-static inline void ed_free(struct ed *ed)
-{
- ed->usb_dev = NULL;
-}

include/common.h +1 -2
index fb4e79bb39..47076869c1 100644
@@ -646,8 +646,7 @@ int get_clocks (void);
 #if defined(CONFIG_MPC5xxx)
 int    prt_mpc5xxx_clks (void);
 #endif
-#if defined(CONFIG_S3C24X0) || \
-    defined(CONFIG_LH7A40X) || \
+#if defined(CONFIG_LH7A40X) || \
     defined(CONFIG_EP93XX)
 ulong  get_FCLK (void);
 ulong  get_HCLK (void);

--
2.13.0.303.g4ebf302169-goog

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Thanks,
Minkyu Kang

#28 lore raw

PATCH 11/38 samsung: usb: Drop ohci-s3c24xx driver

In reply to Simon Glass
Quoted 3 lines · Simon Glass

This is not used anymore. Drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/44086e48/attachment.sig>
#29 lore raw

PATCH 11/38 samsung: usb: Drop ohci-s3c24xx driver

Quoted 8 lines · Tom Rini
Quoted 3 lines · Simon Glass

This is not used anymore. Drop it.

Applied to u-boot/master, thanks!

This should have gone through u-boot-usb/master , but clearly , you again violated our agreement to not bypass the structure and apply USB patches directly. Please see my email off-list for I am reaching my limit.

Signature · 2 lines
Best regards,
Marek Vasut
#30 lore raw

PATCH 12/38 samsung: nand: Drop s3c2410_nand driver

In reply to Simon Glass

This is not used anymore. Drop it.

---

 drivers/mtd/nand/Makefile       |   1 -
 drivers/mtd/nand/s3c2410_nand.c | 175 ----------------------------------------
 2 files changed, 176 deletions(-)
 delete mode 100644 drivers/mtd/nand/s3c2410_nand.c
drivers/mtd/nand/Makefile +0 -1
index 82358f674b..5d5f9f5267 100644
@@ -59,7 +59,6 @@ obj-$(CONFIG_NAND_MXC) += mxc_nand.o
 obj-$(CONFIG_NAND_MXS) += mxs_nand.o
 obj-$(CONFIG_NAND_NDFC) += ndfc.o
 obj-$(CONFIG_NAND_PXA3XX) += pxa3xx_nand.o
-obj-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o
 obj-$(CONFIG_NAND_SPEAR) += spr_nand.o
 obj-$(CONFIG_TEGRA_NAND) += tegra_nand.o
 obj-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
drivers/mtd/nand/s3c2410_nand.c deleted +0 -175

175 lines not on this page · raw message

Signature · 1 line
2.13.0.303.g4ebf302169-goog
#31 lore raw

PATCH 12/38 samsung: nand: Drop s3c2410_nand driver

2017. 5. 17. 23:53에 "Simon Glass" <[email protected]>님이 작성:

This is not used anymore. Drop it.

---

 drivers/mtd/nand/Makefile       |   1 -
 drivers/mtd/nand/s3c2410_nand.c | 175 ------------------------------
----------
 2 files changed, 176 deletions(-)
 delete mode 100644 drivers/mtd/nand/s3c2410_nand.c
drivers/mtd/nand/Makefile +0 -1
index 82358f674b..5d5f9f5267 100644
@@ -59,7 +59,6 @@ obj-$(CONFIG_NAND_MXC) += mxc_nand.o
 obj-$(CONFIG_NAND_MXS) += mxs_nand.o
 obj-$(CONFIG_NAND_NDFC) += ndfc.o
 obj-$(CONFIG_NAND_PXA3XX) += pxa3xx_nand.o
-obj-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o
 obj-$(CONFIG_NAND_SPEAR) += spr_nand.o
 obj-$(CONFIG_TEGRA_NAND) += tegra_nand.o
 obj-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
drivers/mtd/nand/s3c2410_nan renamed from drivers/mtd/nand/s3c2410_nand.c +0 -0

d.c
deleted file mode 100644
index dd742a6351..0000000000

drivers/mtd/nand/s3c2410_nand.c deleted +0 -41

41 lines not on this page · raw message

ctrl)
-{
- struct nand_chip *chip = mtd_to_nand(mtd);
- struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
-
- debug("hwcontrol(): 0x%02x 0x%02x\n", cmd, ctrl);
-
- if (ctrl & NAND_CTRL_CHANGE) {
- ulong IO_ADDR_W = (ulong)nand;
-
- if (!(ctrl & NAND_CLE))
- IO_ADDR_W |= S3C2410_ADDR_NCLE;
- if (!(ctrl & NAND_ALE))
- IO_ADDR_W |= S3C2410_ADDR_NALE;
-
- chip->IO_ADDR_W = (void *)IO_ADDR_W;
-
- if (ctrl & NAND_NCE)
- writel(readl(&nand->nfconf) & ~S3C2410_NFCONF_nFCE,
- &nand->nfconf);
- else
- writel(readl(&nand->nfconf) | S3C2410_NFCONF_nFCE,
- &nand->nfconf);
- }
-
- if (cmd != NAND_CMD_NONE)
- writeb(cmd, chip->IO_ADDR_W);
-}
-
-static int s3c24x0_dev_ready(struct mtd_info *mtd) -{

-       struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
-       debug("dev_ready\n");
-       return readl(&nand->nfstat) & 0x01;

-}
-
-#ifdef CONFIG_S3C2410_NAND_HWECC
-void s3c24x0_nand_enable_hwecc(struct mtd_info *mtd, int mode) -{

-       struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
-       debug("s3c24x0_nand_enable_hwecc(%p, %d)\n", mtd, mode);
-       writel(readl(&nand->nfconf) | S3C2410_NFCONF_INITECC,

&nand->nfconf);
-}
-
-static int s3c24x0_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
- u_char *ecc_code)
-{

-       struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
-       ecc_code[0] = readb(&nand->nfecc);
-       ecc_code[1] = readb(&nand->nfecc + 1);
-       ecc_code[2] = readb(&nand->nfecc + 2);
-       debug("s3c24x0_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",

- mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
-
- return 0;
-}
-
-static int s3c24x0_nand_correct_data(struct mtd_info *mtd, u_char *dat,
- u_char *read_ecc, u_char *calc_ecc)
-{
- if (read_ecc[0] == calc_ecc[0] &&
- read_ecc[1] == calc_ecc[1] &&
- read_ecc[2] == calc_ecc[2])
- return 0;
-
- printf("s3c24x0_nand_correct_data: not implemented\n");
- return -EBADMSG;
-}
-#endif
-
-int board_nand_init(struct nand_chip *nand)
-{

-       u_int32_t cfg;
-       u_int8_t tacls, twrph0, twrph1;
-       struct s3c24x0_clock_power *clk_power =

s3c24x0_get_base_clock_power();
- struct s3c24x0_nand *nand_reg = s3c24x0_get_base_nand();
-
- debug("board_nand_init()\n");
-
- writel(readl(&clk_power->clkcon) | (1 << 4), &clk_power->clkcon);
-
- /* initialize hardware */
-#if defined(CONFIG_S3C24XX_CUSTOM_NAND_TIMING)

-       tacls  = CONFIG_S3C24XX_TACLS;
-       twrph0 = CONFIG_S3C24XX_TWRPH0;
-       twrph1 =  CONFIG_S3C24XX_TWRPH1;
-#else
-       tacls = 4;
-       twrph0 = 8;
-       twrph1 = 8;
-#endif
-
-       cfg = S3C2410_NFCONF_EN;
-       cfg |= S3C2410_NFCONF_TACLS(tacls - 1);
-       cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1);
-       cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1);
-       writel(cfg, &nand_reg->nfconf);
-
-       /* initialize nand_chip data structure */
-       nand->IO_ADDR_R = (void *)&nand_reg->nfdata;
-       nand->IO_ADDR_W = (void *)&nand_reg->nfdata;

-
- nand->select_chip = NULL;
-
- /* read_buf and write_buf are default */
- /* read_byte and write_byte are default */
-#ifdef CONFIG_NAND_SPL
- nand->read_buf = nand_read_buf;
-#endif
-
- /* hwcontrol always must be implemented */
- nand->cmd_ctrl = s3c24x0_hwcontrol;
-
- nand->dev_ready = s3c24x0_dev_ready;
-
-#ifdef CONFIG_S3C2410_NAND_HWECC

-       nand->ecc.hwctl = s3c24x0_nand_enable_hwecc;
-       nand->ecc.calculate = s3c24x0_nand_calculate_ecc;
-       nand->ecc.correct = s3c24x0_nand_correct_data;
-       nand->ecc.mode = NAND_ECC_HW;
-       nand->ecc.size = CONFIG_SYS_NAND_ECCSIZE;
-       nand->ecc.bytes = CONFIG_SYS_NAND_ECCBYTES;
-       nand->ecc.strength = 1;

-#else
- nand->ecc.mode = NAND_ECC_SOFT;
-#endif
-
-#ifdef CONFIG_S3C2410_NAND_BBT
- nand->bbt_options |= NAND_BBT_USE_FLASH;
-#endif
-
- debug("end of nand_init\n");
-
- return 0;
-}
--
2.13.0.303.g4ebf302169-goog

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Thanks,
Minkyu Kang

#32 lore raw

PATCH 12/38 samsung: nand: Drop s3c2410_nand driver

In reply to Simon Glass
Quoted 3 lines · Simon Glass

This is not used anymore. Drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/a1fa8063/attachment.sig>
#33 lore raw

PATCH 12/38 samsung: nand: Drop s3c2410_nand driver

In reply to Simon Glass
Quoted 3 lines · Simon Glass

This is not used anymore. Drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/50176e84/attachment.sig>
#34 lore raw

PATCH 13/38 samsung: Drop more references fo s3c24x0

In reply to Simon Glass

This is dead code now. Drop it.

---

 arch/arm/cpu/arm920t/start.S      | 37 -------------------------------------
 drivers/i2c/s3c24x0_i2c.c         |  4 ----
 drivers/usb/gadget/gadget_chips.h |  8 --------
 drivers/usb/host/ohci-hcd.c       |  1 -
 scripts/config_whitelist.txt      |  8 --------
 5 files changed, 58 deletions(-)
arch/arm/cpu/arm920t/start.S +0 -37
index 3ada6d026f..3880a402d8 100644
@@ -50,43 +50,6 @@ copyex:
 	bne	copyex
 #endif
 
-#ifdef CONFIG_S3C24X0
-	/* turn off the watchdog */
-
-# if defined(CONFIG_S3C2400)
-#  define pWTCON	0x15300000
-#  define INTMSK	0x14400008	/* Interrupt-Controller base addresses */
-#  define CLKDIVN	0x14800014	/* clock divisor register */
-#else
-#  define pWTCON	0x53000000
-#  define INTMSK	0x4A000008	/* Interrupt-Controller base addresses */
-#  define INTSUBMSK	0x4A00001C
-#  define CLKDIVN	0x4C000014	/* clock divisor register */
-# endif
-
-	ldr	r0, =pWTCON
-	mov	r1, #0x0
-	str	r1, [r0]
-
-	/*
-	 * mask all IRQs by setting all bits in the INTMR - default
-	 */
-	mov	r1, #0xffffffff
-	ldr	r0, =INTMSK
-	str	r1, [r0]
-# if defined(CONFIG_S3C2410)
-	ldr	r1, =0x3ff
-	ldr	r0, =INTSUBMSK
-	str	r1, [r0]
-# endif
-
-	/* FCLK:HCLK:PCLK = 1:2:4 */
-	/* default FCLK is 120 MHz ! */
-	ldr	r0, =CLKDIVN
-	mov	r1, #3
-	str	r1, [r0]
-#endif	/* CONFIG_S3C24X0 */
-
 	/*
 	 * we do sys-critical inits only at reboot,
 	 * not when booting from ram!
drivers/i2c/s3c24x0_i2c.c +0 -4
index 3c69dbf409..939fbbc819 100644
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-/* This code should work for both the S3C2400 and the S3C2410
- * as they seem to have the same I2C controller inside.
- * The different address mapping is handled by the s3c24xx.h files below.
- */
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
drivers/usb/gadget/gadget_chips.h +0 -8
index 973cd971ad..0e3ba94730 100644
@@ -91,12 +91,6 @@
 #define gadget_is_atmel_usba(g)	0
 #endif
 
-#ifdef CONFIG_USB_GADGET_S3C2410
-#define gadget_is_s3c2410(g)    (!strcmp("s3c2410_udc", (g)->name))
-#else
-#define gadget_is_s3c2410(g)    0
-#endif
-
 #ifdef CONFIG_USB_GADGET_AT91
 #define gadget_is_at91(g)	(!strcmp("at91_udc", (g)->name))
 #else
@@ -207,8 +201,6 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
 		return 0x09;
 	else if (gadget_is_pxa27x(gadget))
 		return 0x10;
-	else if (gadget_is_s3c2410(gadget))
-		return 0x11;
 	else if (gadget_is_at91(gadget))
 		return 0x12;
 	else if (gadget_is_imx(gadget))
drivers/usb/host/ohci-hcd.c +0 -1
index 80cfe11290..b5e0304348 100644
@@ -51,7 +51,6 @@
 #endif
 
 #if defined(CONFIG_CPU_ARM920T) || \
-    defined(CONFIG_S3C24X0) || \
     defined(CONFIG_440EP) || \
     defined(CONFIG_PCI_OHCI) || \
     defined(CONFIG_MPC5200) || \
scripts/config_whitelist.txt +0 -8
index dd7b328d8f..10f9fb6371 100644
@@ -2361,14 +2361,7 @@ CONFIG_RUN_FROM_DDR1
 CONFIG_RUN_FROM_IRAM_ONLY
 CONFIG_RX_DESCR_NUM
 CONFIG_S32V234
-CONFIG_S3C2400
-CONFIG_S3C2410
-CONFIG_S3C2410_NAND_BBT
-CONFIG_S3C2410_NAND_HWECC
 CONFIG_S3C24X0
-CONFIG_S3C24XX_TACLS
-CONFIG_S3C24XX_TWRPH0
-CONFIG_S3C24XX_TWRPH1
 CONFIG_S3D2_CLK_FREQ
 CONFIG_S5P
 CONFIG_S5PC100
@@ -6326,7 +6319,6 @@ CONFIG_USB_GADGET_NET2280
 CONFIG_USB_GADGET_OMAP
 CONFIG_USB_GADGET_PXA27X
 CONFIG_USB_GADGET_PXA2XX
-CONFIG_USB_GADGET_S3C2410
 CONFIG_USB_GADGET_SA1100
 CONFIG_USB_GADGET_SUPERH
 CONFIG_USB_GADGET_SX2
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#35 lore raw

PATCH 13/38 samsung: Drop more references fo s3c24x0

2017. 5. 17. 23:54에 "Simon Glass" <[email protected]>님이 작성:

This is dead code now. Drop it.

---

 arch/arm/cpu/arm920t/start.S      | 37 ------------------------------
-------
 drivers/i2c/s3c24x0_i2c.c         |  4 ----
 drivers/usb/gadget/gadget_chips.h |  8 --------
 drivers/usb/host/ohci-hcd.c       |  1 -
 scripts/config_whitelist.txt      |  8 --------
 5 files changed, 58 deletions(-)
arch/arm/cpu/arm920t/start.S +0 -6
index 3ada6d026f..3880a402d8 100644
@@ -50,43 +50,6 @@ copyex:
        bne     copyex
 #endif
 
-#ifdef CONFIG_S3C24X0
-       /* turn off the watchdog */
-
-# if defined(CONFIG_S3C2400)
-#  define pWTCON       0x15300000
-#  define INTMSK       0x14400008      /* Interrupt-Controller base

addresses */
-# define CLKDIVN 0x14800014 /* clock divisor register */
-#else

-#  define pWTCON       0x53000000
-#  define INTMSK       0x4A000008      /* Interrupt-Controller base
addresses */
-#  define INTSUBMSK    0x4A00001C
-#  define CLKDIVN      0x4C000014      /* clock divisor register */
-# endif
-
-       ldr     r0, =pWTCON
-       mov     r1, #0x0
-       str     r1, [r0]

-
- /*
- * mask all IRQs by setting all bits in the INTMR - default
- */

-       mov     r1, #0xffffffff
-       ldr     r0, =INTMSK
-       str     r1, [r0]
-# if defined(CONFIG_S3C2410)
-       ldr     r1, =0x3ff
-       ldr     r0, =INTSUBMSK
-       str     r1, [r0]
-# endif
-
-       /* FCLK:HCLK:PCLK = 1:2:4 */
-       /* default FCLK is 120 MHz ! */
-       ldr     r0, =CLKDIVN
-       mov     r1, #3
-       str     r1, [r0]

-#endif /* CONFIG_S3C24X0 */
-
/*
* we do sys-critical inits only at reboot,
* not when booting from ram!

drivers/i2c/s3c24x0_i2c.c +0 -4
index 3c69dbf409..939fbbc819 100644
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
-/* This code should work for both the S3C2400 and the S3C2410
- * as they seem to have the same I2C controller inside.
- * The different address mapping is handled by the s3c24xx.h files below.
- */
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
drivers/usb/gadget/gadget_ renamed from drivers/usb/gadget/gadget_chips.h +0 -0

chips.h
index 973cd971ad..0e3ba94730 100644

drivers/usb/gadget/gadget_chips.h +0 -6
@@ -91,12 +91,6 @@
 #define gadget_is_atmel_usba(g)        0
 #endif
 
-#ifdef CONFIG_USB_GADGET_S3C2410
-#define gadget_is_s3c2410(g)    (!strcmp("s3c2410_udc", (g)->name))
-#else
-#define gadget_is_s3c2410(g)    0
-#endif
-
 #ifdef CONFIG_USB_GADGET_AT91
 #define gadget_is_at91(g)      (!strcmp("at91_udc", (g)->name))
 #else
@@ -207,8 +201,6 @@ static inline int usb_gadget_controller_number(struct

usb_gadget *gadget)

                return 0x09;
        else if (gadget_is_pxa27x(gadget))
                return 0x10;

- else if (gadget_is_s3c2410(gadget))
- return 0x11;
else if (gadget_is_at91(gadget))
return 0x12;
else if (gadget_is_imx(gadget))

drivers/usb/host/ohci-hcd.c +0 -1
index 80cfe11290..b5e0304348 100644
@@ -51,7 +51,6 @@
 #endif
 
 #if defined(CONFIG_CPU_ARM920T) || \
-    defined(CONFIG_S3C24X0) || \
     defined(CONFIG_440EP) || \
     defined(CONFIG_PCI_OHCI) || \
     defined(CONFIG_MPC5200) || \
scripts/config_whitelist.txt +0 -8
index dd7b328d8f..10f9fb6371 100644
@@ -2361,14 +2361,7 @@ CONFIG_RUN_FROM_DDR1
 CONFIG_RUN_FROM_IRAM_ONLY
 CONFIG_RX_DESCR_NUM
 CONFIG_S32V234
-CONFIG_S3C2400
-CONFIG_S3C2410
-CONFIG_S3C2410_NAND_BBT
-CONFIG_S3C2410_NAND_HWECC
 CONFIG_S3C24X0
-CONFIG_S3C24XX_TACLS
-CONFIG_S3C24XX_TWRPH0
-CONFIG_S3C24XX_TWRPH1
 CONFIG_S3D2_CLK_FREQ
 CONFIG_S5P
 CONFIG_S5PC100
@@ -6326,7 +6319,6 @@ CONFIG_USB_GADGET_NET2280
 CONFIG_USB_GADGET_OMAP
 CONFIG_USB_GADGET_PXA27X
 CONFIG_USB_GADGET_PXA2XX
-CONFIG_USB_GADGET_S3C2410
 CONFIG_USB_GADGET_SA1100
 CONFIG_USB_GADGET_SUPERH
 CONFIG_USB_GADGET_SX2

--
2.13.0.303.g4ebf302169-goog

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Thanks,
Minkyu Kang

#36 lore raw

PATCH 13/38 samsung: Drop more references fo s3c24x0

In reply to Simon Glass
Quoted 3 lines · Simon Glass

This is dead code now. Drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/32a10900/attachment.sig>
#37 lore raw

PATCH 14/38 arc: Make u-boot-arc.h a private header

In reply to Simon Glass

Rather than including this arch-specific header file in common.h, include it from within arc's u-boot.h header.

---

 arch/arc/include/asm/u-boot.h | 1 +
 include/common.h              | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arc/include/asm/u-boot.h +1 -0
index e354edf95d..045487278e 100644
@@ -8,6 +8,7 @@
 #define __ASM_ARC_U_BOOT_H__
 
 #include <asm-generic/u-boot.h>
+#include <asm/u-boot-arc.h>
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_ARC
include/common.h +1 -1
index 47076869c1..b07b8fc6da 100644
@@ -445,7 +445,7 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/u-boot-mips.h>
 #endif /* CONFIG_MIPS */
 #ifdef CONFIG_ARC
-# include <asm/u-boot-arc.h>
+# include <asm/u-boot.h>
 #endif /* CONFIG_ARC */
 
 #ifdef CONFIG_AUTO_COMPLETE
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#38 lore raw

PATCH 14/38 arc: Make u-boot-arc.h a private header

Quoted 4 lines · Simon Glass

Rather than including this arch-specific header file in common.h, include it from within arc's u-boot.h header.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/75c6f969/attachment.sig>
#39 lore raw

PATCH 15/38 sandbox: Make u-boot-sandbox.h a private header

In reply to Simon Glass

Rather than including this arch-specific header file in common.h, include it from within sandbox's u-boot.h header.

Also drop the comment about something to be fixed.

---

 arch/sandbox/include/asm/u-boot.h | 1 +
 include/common.h                  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/sandbox/include/asm/u-boot.h +1 -0
index 8279894eec..ddcd6fb397 100644
@@ -22,6 +22,7 @@
 
 /* Use the generic board which requires a unified bd_info */
 #include <asm-generic/u-boot.h>
+#include <asm/u-boot-sandbox.h>
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_SANDBOX
include/common.h +1 -1
index b07b8fc6da..ffaed49bde 100644
@@ -434,7 +434,7 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/u-boot-x86.h>
 #endif /* CONFIG_X86 */
 #ifdef CONFIG_SANDBOX
-# include <asm/u-boot-sandbox.h>	/* TODO(sjg) what needs to be fixed? */
+# include <asm/u-boot.h>
 #endif
 #ifdef CONFIG_NDS32
 # include <asm/mach-types.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#40 lore raw

PATCH 15/38 sandbox: Make u-boot-sandbox.h a private header

Quoted 6 lines · Simon Glass

Rather than including this arch-specific header file in common.h, include it from within sandbox's u-boot.h header.

Also drop the comment about something to be fixed.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/3c991bf3/attachment-0001.sig>
#41 lore raw

PATCH 16/38 x86: Make u-boot-x86.h a private header

In reply to Simon Glass

Rather than including this arch-specific header file in common.h, include it from within x86's u-boot.h header.

Also drop the comment about something to be fixed. It is not clear what needs fixing.

---

 arch/x86/include/asm/u-boot.h | 1 +
 include/common.h              | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/include/asm/u-boot.h +1 -0
index 623771a39a..4c4527eb38 100644
@@ -22,6 +22,7 @@
 
 /* Use the generic board which requires a unified bd_info */
 #include <asm-generic/u-boot.h>
+#include <asm/u-boot-x86.h>
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_I386
include/common.h +2 -2
index ffaed49bde..229ca4c397 100644
@@ -430,8 +430,8 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/setup.h>
 # include <asm/u-boot-arm.h>	/* ARM version to be fixed! */
 #endif /* CONFIG_ARM */
-#ifdef CONFIG_X86		/* x86 version to be fixed! */
-# include <asm/u-boot-x86.h>
+#ifdef CONFIG_X86
+# include <asm/u-boot.h>
 #endif /* CONFIG_X86 */
 #ifdef CONFIG_SANDBOX
 # include <asm/u-boot.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#42 lore raw

PATCH 16/38 x86: Make u-boot-x86.h a private header

Quoted 7 lines · Simon Glass

Rather than including this arch-specific header file in common.h, include it from within x86's u-boot.h header.

Also drop the comment about something to be fixed. It is not clear what needs fixing.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/431c63d5/attachment.sig>
#43 lore raw

PATCH 17/38 arm: Make u-boot-arm.h a private header

In reply to Simon Glass

Rather than including this arch-specific header file in common.h, include it from within arm's u-boot.h header.

Also drop the comment about something to be fixed. It has been there forever and it is not clear what it means.

---

 arch/arm/include/asm/u-boot-arm.h | 4 ++++
 arch/arm/include/asm/u-boot.h     | 1 +
 include/common.h                  | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)
arch/arm/include/asm/u-boot-arm.h +4 -0
index b931c22060..3a0d0b8675 100644
@@ -13,6 +13,8 @@
 #ifndef _U_BOOT_ARM_H_
 #define _U_BOOT_ARM_H_	1
 
+#ifndef __ASSEMBLY__
+
 /* for the following variables, see start.S */
 extern ulong IRQ_STACK_START;	/* top of IRQ stack */
 extern ulong FIQ_STACK_START;	/* top of FIQ stack */
@@ -59,4 +61,6 @@ void do_fiq(struct pt_regs *pt_regs);
 void do_irq(struct pt_regs *pt_regswq);
 #endif
 
+#endif /* __ASSEMBLY__ */
+
 #endif	/* _U_BOOT_ARM_H_ */
arch/arm/include/asm/u-boot.h +1 -0
index ca3abd7d0b..ef9196f898 100644
@@ -22,6 +22,7 @@
 
 /* Use the generic board which requires a unified bd_info */
 #include <asm-generic/u-boot.h>
+#include <asm/u-boot-arm.h>
 
 /* For image.h:image_check_target_arch() */
 #ifndef CONFIG_ARM64
include/common.h +1 -1
index 229ca4c397..fe396c5705 100644
@@ -428,7 +428,7 @@ static inline int setenv_addr(const char *varname, const void *addr)
 #ifdef CONFIG_ARM
 # include <asm/mach-types.h>
 # include <asm/setup.h>
-# include <asm/u-boot-arm.h>	/* ARM version to be fixed! */
+# include <asm/u-boot.h>
 #endif /* CONFIG_ARM */
 #ifdef CONFIG_X86
 # include <asm/u-boot.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#44 lore raw

PATCH 17/38 arm: Make u-boot-arm.h a private header

Quoted 7 lines · Simon Glass

Rather than including this arch-specific header file in common.h, include it from within arm's u-boot.h header.

Also drop the comment about something to be fixed. It has been there forever and it is not clear what it means.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/f8d417e8/attachment.sig>
#45 lore raw

PATCH 18/38 mips: Make u-boot-mips.h a private header

In reply to Simon Glass

Rather than including this arch-specific header file in common.h, include it from within mips's u-boot.h header.

---

 arch/mips/include/asm/u-boot.h | 1 +
 include/common.h               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/mips/include/asm/u-boot.h +1 -0
index af03e8d5be..68985af4b9 100644
@@ -17,6 +17,7 @@
 
 /* Use the generic board which requires a unified bd_info */
 #include <asm-generic/u-boot.h>
+#include <asm/u-boot-mips.h>
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_MIPS
include/common.h +1 -1
index fe396c5705..f36fed3843 100644
@@ -442,7 +442,7 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/u-boot-nds32.h>
 #endif /* CONFIG_NDS32 */
 #ifdef CONFIG_MIPS
-# include <asm/u-boot-mips.h>
+# include <asm/u-boot.h>
 #endif /* CONFIG_MIPS */
 #ifdef CONFIG_ARC
 # include <asm/u-boot.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#46 lore raw

PATCH 18/38 mips: Make u-boot-mips.h a private header

Am 17.05.2017 um 16:22 schrieb Simon Glass:

Quoted 4 lines

Rather than including this arch-specific header file in common.h, include it from within mips's u-boot.h header.

Quoted 23 lines

---

 arch/mips/include/asm/u-boot.h | 1 +
 include/common.h               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/mips/include/asm/u-boot.h +1 -0
index af03e8d5be..68985af4b9 100644
@@ -17,6 +17,7 @@
 
 /* Use the generic board which requires a unified bd_info */
 #include <asm-generic/u-boot.h>
+#include <asm/u-boot-mips.h>
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_MIPS
include/common.h +0 -0
index fe396c5705..f36fed3843 100644

include/common.h static inline int setenv_addr(const char *varname, const void *addr) · line 446

Quoted 6 lines
include/common.h +1 -1
@@ -442,7 +442,7 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/u-boot-nds32.h>
 #endif /* CONFIG_NDS32 */
 #ifdef CONFIG_MIPS
-# include <asm/u-boot-mips.h>
+# include <asm/u-boot.h>
 #endif /* CONFIG_MIPS */

you could also remove the #ifdef CONFIG_MIPS in this patch and drop patch 21/38

Quoted 3 lines
include/common.h +0 -0
 #ifdef CONFIG_ARC
 # include <asm/u-boot.h>
Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/6d996fe4/attachment.sig>
#47 lore raw

PATCH 18/38 mips: Make u-boot-mips.h a private header

Hi Daniel,

Quoted 26 lines · Daniel Schwierzeck

Am 17.05.2017 um 16:22 schrieb Simon Glass:

Quoted 4 lines

Rather than including this arch-specific header file in common.h, include it from within mips's u-boot.h header.

Quoted 16 lines

---

 arch/mips/include/asm/u-boot.h | 1 +
 include/common.h               | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/mips/include/asm/u-boot.h +1 -0
index af03e8d5be..68985af4b9 100644
@@ -17,6 +17,7 @@
 
 /* Use the generic board which requires a unified bd_info */
 #include <asm-generic/u-boot.h>
+#include <asm/u-boot-mips.h>
 
Quoted 16 lines

include/common.h static inline int setenv_addr(const char *varname, const void *addr) · line 446

Quoted 13 lines
arch/mips/include/asm/u-boot.h +0 -0
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_MIPS
include/common.h +1 -1
index fe396c5705..f36fed3843 100644
@@ -442,7 +442,7 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/u-boot-nds32.h>
 #endif /* CONFIG_NDS32 */
 #ifdef CONFIG_MIPS
-# include <asm/u-boot-mips.h>
+# include <asm/u-boot.h>
 #endif /* CONFIG_MIPS */

you could also remove the #ifdef CONFIG_MIPS in this patch and drop patch 21/38

Yes, true, I am trying to avoid making a change and removing code at the same time.

Quoted 8 lines

include/common.h static inline int setenv_addr(const char *varname, const void *addr) · line 448

Quoted 4 lines
include/common.h +0 -0
 #ifdef CONFIG_ARC
 # include <asm/u-boot.h>

--
- Daniel

Regards,
Simon

#48 lore raw

PATCH 18/38 mips: Make u-boot-mips.h a private header

In reply to Simon Glass
Quoted 5 lines · Simon Glass

Rather than including this arch-specific header file in common.h, include it from within mips's u-boot.h header.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/f6013e74/attachment.sig>
#49 lore raw

PATCH 19/38 nds32: Make u-boot-nds32.h a private header

In reply to Simon Glass

Rather than including this arch-specific header file in common.h, include it from within nds32's u-boot.h header.

---

 arch/nds32/include/asm/u-boot.h | 2 ++
 include/common.h                | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
arch/nds32/include/asm/u-boot.h +2 -0
index 2efdeb1243..4378ebf44b 100644
@@ -20,6 +20,8 @@
 #ifndef _U_BOOT_H_
 #define _U_BOOT_H_	1
 
+#include <asm/u-boot-nds32.h>
+
 #include <environment.h>
 
 typedef struct bd_info {
include/common.h +1 -1
index f36fed3843..c1e634045f 100644
@@ -439,7 +439,7 @@ static inline int setenv_addr(const char *varname, const void *addr)
 #ifdef CONFIG_NDS32
 # include <asm/mach-types.h>
 # include <asm/setup.h>
-# include <asm/u-boot-nds32.h>
+# include <asm/u-boot.h>
 #endif /* CONFIG_NDS32 */
 #ifdef CONFIG_MIPS
 # include <asm/u-boot.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#50 lore raw

PATCH 19/38 nds32: Make u-boot-nds32.h a private header

Quoted 4 lines · Simon Glass

Rather than including this arch-specific header file in common.h, include it from within nds32's u-boot.h header.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/dae0ed09/attachment.sig>
#51 lore raw

PATCH 20/38 arc: Don't include asm/u-boot.h in common

In reply to Simon Glass

This is not actually needed anywhere, so drop it.

---

 include/common.h | 3 ---
 1 file changed, 3 deletions(-)
include/common.h +0 -3
index c1e634045f..83ea3c419c 100644
@@ -444,9 +444,6 @@ static inline int setenv_addr(const char *varname, const void *addr)
 #ifdef CONFIG_MIPS
 # include <asm/u-boot.h>
 #endif /* CONFIG_MIPS */
-#ifdef CONFIG_ARC
-# include <asm/u-boot.h>
-#endif /* CONFIG_ARC */
 
 #ifdef CONFIG_AUTO_COMPLETE
 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#52 lore raw

PATCH 20/38 arc: Don't include asm/u-boot.h in common

Quoted 3 lines · Simon Glass

This is not actually needed anywhere, so drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/857545f4/attachment.sig>
#53 lore raw

PATCH 21/38 mips: Don't include asm/u-boot.h in common

In reply to Simon Glass

This is not actually needed anywhere, so drop it.

---

 include/common.h | 3 ---
 1 file changed, 3 deletions(-)
include/common.h +0 -3
index 83ea3c419c..298cbbc1a6 100644
@@ -441,9 +441,6 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/setup.h>
 # include <asm/u-boot.h>
 #endif /* CONFIG_NDS32 */
-#ifdef CONFIG_MIPS
-# include <asm/u-boot.h>
-#endif /* CONFIG_MIPS */
 
 #ifdef CONFIG_AUTO_COMPLETE
 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#54 lore raw

PATCH 21/38 mips: Don't include asm/u-boot.h in common

Am 17.05.2017 um 16:22 schrieb Simon Glass:

Quoted 3 lines

This is not actually needed anywhere, so drop it.

Quoted 20 lines

---

 include/common.h | 3 ---
 1 file changed, 3 deletions(-)
include/common.h +0 -3
index 83ea3c419c..298cbbc1a6 100644
@@ -441,9 +441,6 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/setup.h>
 # include <asm/u-boot.h>
 #endif /* CONFIG_NDS32 */
-#ifdef CONFIG_MIPS
-# include <asm/u-boot.h>
-#endif /* CONFIG_MIPS */
 
 #ifdef CONFIG_AUTO_COMPLETE
 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/54e6452a/attachment.sig>
#55 lore raw

PATCH 21/38 mips: Don't include asm/u-boot.h in common

In reply to Simon Glass
Quoted 4 lines · Simon Glass

This is not actually needed anywhere, so drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/440e4f1b/attachment.sig>
#56 lore raw

PATCH 22/38 sandbox: Don't include asm/u-boot.h in common

In reply to Simon Glass

This is not actually needed anywhere, so drop it.

---

 include/common.h | 3 ---
 1 file changed, 3 deletions(-)
include/common.h +0 -3
index 298cbbc1a6..e0fbe6b3bf 100644
@@ -433,9 +433,6 @@ static inline int setenv_addr(const char *varname, const void *addr)
 #ifdef CONFIG_X86
 # include <asm/u-boot.h>
 #endif /* CONFIG_X86 */
-#ifdef CONFIG_SANDBOX
-# include <asm/u-boot.h>
-#endif
 #ifdef CONFIG_NDS32
 # include <asm/mach-types.h>
 # include <asm/setup.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#57 lore raw

PATCH 22/38 sandbox: Don't include asm/u-boot.h in common

Quoted 3 lines · Simon Glass

This is not actually needed anywhere, so drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/f19c8aee/attachment.sig>
#58 lore raw

PATCH 23/38 x86: Don't include asm/u-boot.h in common

In reply to Simon Glass

With a small fixup to u-boot-x86.h, this is not actually needed anywhere, so drop it.

---

 arch/x86/include/asm/u-boot-x86.h | 4 +++-
 include/common.h                  | 3 ---
 2 files changed, 3 insertions(+), 4 deletions(-)
arch/x86/include/asm/u-boot-x86.h +3 -1
index d2d603967e..a0f6a2e12d 100644
@@ -8,13 +8,15 @@
 #ifndef _U_BOOT_I386_H_
 #define _U_BOOT_I386_H_	1
 
+struct global_data;
+
 extern char gdt_rom[];
 
 /* cpu/.../cpu.c */
 int arch_cpu_init(void);
 int x86_cpu_init_f(void);
 int cpu_init_f(void);
-void setup_gdt(gd_t *id, u64 *gdt_addr);
+void setup_gdt(struct global_data *id, u64 *gdt_addr);
 /*
  * Setup FSP execution environment GDT to use the one we used in
  * arch/x86/cpu/start16.S and reload the segment registers.
include/common.h +0 -3
index e0fbe6b3bf..02fda57f85 100644
@@ -430,9 +430,6 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/setup.h>
 # include <asm/u-boot.h>
 #endif /* CONFIG_ARM */
-#ifdef CONFIG_X86
-# include <asm/u-boot.h>
-#endif /* CONFIG_X86 */
 #ifdef CONFIG_NDS32
 # include <asm/mach-types.h>
 # include <asm/setup.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#59 lore raw

PATCH 23/38 x86: Don't include asm/u-boot.h in common

Quoted 4 lines · Simon Glass

With a small fixup to u-boot-x86.h, this is not actually needed anywhere, so drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/b970f573/attachment.sig>
#60 lore raw

PATCH 24/38 nds32: Remove include files from common.h

In reply to Simon Glass

With a few tweaks we can avoid including these files, which are only needed by two C files.

---

 arch/nds32/lib/bootm.c                  | 1 +
 board/AndesTech/adp-ag101p/adp-ag101p.c | 1 +
 include/common.h                        | 5 -----
 3 files changed, 2 insertions(+), 5 deletions(-)
arch/nds32/lib/bootm.c +1 -0
index 8b0b28fd99..c79b6d4044 100644
@@ -11,6 +11,7 @@
 #include <image.h>
 #include <u-boot/zlib.h>
 #include <asm/byteorder.h>
+#include <asm/setup.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/AndesTech/adp-ag101p/adp-ag101p.c +1 -0
index 805a266f63..e9d7def21c 100644
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 
 #include <faraday/ftsdc010.h>
 #include <faraday/ftsmc020.h>
include/common.h +0 -5
index 02fda57f85..c5cb65beda 100644
@@ -430,11 +430,6 @@ static inline int setenv_addr(const char *varname, const void *addr)
 # include <asm/setup.h>
 # include <asm/u-boot.h>
 #endif /* CONFIG_ARM */
-#ifdef CONFIG_NDS32
-# include <asm/mach-types.h>
-# include <asm/setup.h>
-# include <asm/u-boot.h>
-#endif /* CONFIG_NDS32 */
 
 #ifdef CONFIG_AUTO_COMPLETE
 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#61 lore raw

PATCH 24/38 nds32: Remove include files from common.h

Quoted 4 lines · Simon Glass

With a few tweaks we can avoid including these files, which are only needed by two C files.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/2df79b3a/attachment.sig>
#62 lore raw

PATCH 25/38 arm: Add explicit include of <asm/mach-types.h>

In reply to Simon Glass

Rather than relying on common.h to provide this include, which is going away at some point, include it explicitly in each file.

---

 arch/arm/lib/spl.c                              | 3 +++
 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/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/bluewater/gurnard/gurnard.c               | 1 +
 board/bluewater/snapper9260/snapper9260.c       | 1 +
 board/cirrus/edb93xx/edb93xx.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                         | 1 +
 board/freescale/mx35pdk/mx35pdk.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                        | 1 +
 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/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/zipitz2/zipitz2.c                         | 1 +
 drivers/usb/host/ehci-mx6.c                     | 1 +
 55 files changed, 57 insertions(+)
arch/arm/lib/spl.c +3 -0
index 8ff2c5065d..3ea494f5e4 100644
@@ -12,6 +12,9 @@
 #include <spl.h>
 #include <image.h>
 #include <linux/compiler.h>
+#ifdef CONFIG_MACH_TYPE
+#include <asm/mach-types.h>
+#endif
 
 #ifndef CONFIG_SPL_DM
 /* Pointer to as well as the global data structure for SPL */
board/Barix/ipam390/ipam390.c +1 -0
index fd1965d9f5..3a584021ac 100644
@@ -29,6 +29,7 @@
 #include <asm/gpio.h>
 #include <hwconfig.h>
 #include <bootstage.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/LaCie/edminiv2/edminiv2.c +1 -0
index edf6281797..736d65caa1 100644
@@ -14,6 +14,7 @@
 #include "../common/common.h"
 #include <spl.h>
 #include <ns16550.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/LaCie/net2big_v2/net2big_v2.c +1 -0
index 263bb5426c..2e6e9ef916 100644
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <command.h>
 #include <i2c.h>
+#include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
board/LaCie/netspace_v2/netspace_v2.c +1 -0
index 17e629622f..16d694716f 100644
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
board/Marvell/aspenite/aspenite.c +1 -0
index 24ee6791a6..0ef63b7b7c 100644
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <mvmfp.h>
+#include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/mfp.h>
 #include <asm/arch/armada100.h>
board/Marvell/gplugd/gplugd.c +1 -0
index 16040e19d7..05ce98bb61 100644
@@ -19,6 +19,7 @@
 #include <asm/arch/armada100.h>
 #include <asm/gpio.h>
 #include <miiphy.h>
+#include <asm/mach-types.h>
 
 #ifdef CONFIG_ARMADA100_FEC
 #include <net.h>
board/Marvell/guruplug/guruplug.c +1 -0
index b0d5f1e10f..af0c491632 100644
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
board/Marvell/openrd/openrd.c +1 -0
index 17a65600e4..f6cffc8cbb 100644
@@ -13,6 +13,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
board/Marvell/sheevaplug/sheevaplug.c +1 -0
index 8907fb58ff..c7dfaa276c 100644
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <asm/mach-types.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
board/Seagate/dockstar/dockstar.c +1 -0
index 83ab1bc32d..f444c1628d 100644
@@ -15,6 +15,7 @@
 #include <asm/arch/mpp.h>
 #include <asm/arch/cpu.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 #include "dockstar.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/Seagate/goflexhome/goflexhome.c +1 -0
index 1f4fb92494..5d0a4242a8 100644
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <asm/mach-types.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include <asm/arch/cpu.h>
board/Seagate/nas220/nas220.c +1 -0
index c5349b900e..18c2895993 100644
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <asm/mach-types.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
 #include <asm/arch/cpu.h>
board/amazon/kc1/kc1.c +1 -0
index b3fa7896c5..13a9c6a0fe 100644
@@ -17,6 +17,7 @@
 #include <asm/emif.h>
 #include <twl6030.h>
 #include "kc1.h"
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/armltd/integrator/integrator.c +1 -0
index cbe706170d..301f83efc9 100644
@@ -24,6 +24,7 @@
 #include <dm/platform_data/serial_pl01x.h>
 #include "arm-ebi.h"
 #include "integrator-sc.h"
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/armltd/vexpress/vexpress_common.c +1 -0
index 458f1d8148..89ab8f7a59 100644
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 #include <asm/arch/systimer.h>
 #include <asm/arch/sysctrl.h>
 #include <asm/arch/wdt.h>
board/atmel/at91rm9200ek/at91rm9200ek.c +1 -0
index 98d76a6fa7..36f147b44d 100644
@@ -12,6 +12,7 @@
 
 #include <common.h>
 #include <netdev.h>
+#include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_pio.h>
 #include <asm/arch/at91_common.h>
board/atmel/at91sam9261ek/at91sam9261ek.c +1 -0
index 6398bcbc9e..b4acb742b3 100644
@@ -21,6 +21,7 @@
 #include <net.h>
 #include <netdev.h>
 #endif
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/atmel/at91sam9263ek/at91sam9263ek.c +1 -0
index 3de978311d..b37e9d3c7a 100644
@@ -20,6 +20,7 @@
 #include <asm/arch/hardware.h>
 #include <lcd.h>
 #include <atmel_lcdc.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +1 -0
index d3bc5c69d4..8e377593ef 100644
@@ -18,6 +18,7 @@
 #include <lcd.h>
 #include <linux/mtd/nand.h>
 #include <atmel_lcdc.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/atmel/at91sam9rlek/at91sam9rlek.c +1 -0
index 0b603ed13a..7966269ff3 100644
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <debug_uart.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 #include <asm/arch/at91sam9rl.h>
 #include <asm/arch/at91sam9rl_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
board/atmel/at91sam9x5ek/at91sam9x5ek.c +1 -0
index 81c2aad1a5..1e4a4a2acf 100644
@@ -19,6 +19,7 @@
 #include <nand.h>
 #include <version.h>
 #endif
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/bluewater/gurnard/gurnard.c +1 -0
index 08b1401372..e82c691841 100644
@@ -21,6 +21,7 @@
 #include <spi.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 #include <asm/arch/at91sam9g45_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
board/bluewater/snapper9260/snapper9260.c +1 -0
index 2d1a89e102..7e9da4e7b7 100644
@@ -12,6 +12,7 @@
 #include <dm.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <asm/mach-types.h>
 #include <asm/arch/at91sam9260_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
board/cirrus/edb93xx/edb93xx.c +1 -0
index 720b490f2b..02e2896fa7 100644
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 #include <asm/arch/ep93xx.h>
 
 DECLARE_GLOBAL_DATA_PTR;
board/davinci/da8xxevm/da850evm.c +1 -0
index 9e17eb865d..11ea52f240 100644
@@ -23,6 +23,7 @@
 #include <asm/arch/davinci_misc.h>
 #include <linux/errno.h>
 #include <hwconfig.h>
+#include <asm/mach-types.h>
 
 #ifdef CONFIG_MMC_DAVINCI
 #include <mmc.h>
board/davinci/da8xxevm/omapl138_lcdk.c +1 -0
index d941285977..52bb7363a7 100644
@@ -19,6 +19,7 @@
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <asm/mach-types.h>
 #include <asm/arch/davinci_misc.h>
 #ifdef CONFIG_MMC_DAVINCI
 #include <mmc.h>
board/davinci/ea20/ea20.c +1 -0
index 6edfa17a91..2a187f1900 100644
@@ -18,6 +18,7 @@
 #include <i2c.h>
 #include <net.h>
 #include <netdev.h>
+#include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
 #include <asm/ti-common/davinci_nand.h>
 #include <asm/arch/emac_defs.h>
board/esd/meesc/meesc.c +1 -0
index 19b673e6d2..037cf074ea 100644
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
+#include <asm/mach-types.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
board/freescale/mx35pdk/mx35pdk.c +1 -0
index 123fb11f42..ea0bd8f30a 100644
@@ -24,6 +24,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/sys_proto.h>
 #include <netdev.h>
+#include <asm/mach-types.h>
 
 #ifndef CONFIG_BOARD_LATE_INIT
 #error "CONFIG_BOARD_LATE_INIT must be set for this board"
board/gumstix/duovero/duovero.c +1 -0
index fefcde87ae..849224efda 100644
@@ -14,6 +14,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/gpio.h>
 #include <asm/gpio.h>
+#include <asm/mach-types.h>
 
 #include "duovero_mux_data.h"
 
board/h2200/h2200.c +1 -0
index 01f8e67be1..2a2b7979f1 100644
@@ -11,6 +11,7 @@
 #include <asm/arch/pxa-regs.h>
 #include <asm/io.h>
 #include <usb.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/imx31_phycore/imx31_phycore.c +1 -0
index 3f45e4e4b8..653246615f 100644
@@ -11,6 +11,7 @@
 #include <netdev.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/mach-types.h>
 #include <asm/arch/sys_proto.h>
 
 DECLARE_GLOBAL_DATA_PTR;
board/lego/ev3/legoev3.c +1 -0
index 0ad33eaeae..3d6de11798 100644
@@ -25,6 +25,7 @@
 #include <asm/arch/davinci_misc.h>
 #include <linux/errno.h>
 #include <hwconfig.h>
+#include <asm/mach-types.h>
 
 #ifdef CONFIG_MMC_DAVINCI
 #include <mmc.h>
board/mini-box/picosam9g45/picosam9g45.c +1 -0
index 5eb2ad77ca..09ec247663 100644
@@ -27,6 +27,7 @@
 #include <net.h>
 #endif
 #include <netdev.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/nvidia/seaboard/seaboard.c +1 -0
index b56bc529d1..0d5eec9dd8 100644
@@ -7,6 +7,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/board.h>
 #include <asm/arch/clock.h>
board/overo/common.c +1 -0
index f6f6792d09..5656e2d17f 100644
@@ -18,6 +18,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/ronetix/pm9261/pm9261.c +1 -0
index 79073d8aaa..f60dddac7b 100644
@@ -26,6 +26,7 @@
 #include <net.h>
 #endif
 #include <netdev.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/ronetix/pm9263/pm9263.c +1 -0
index accf16f151..1469136295 100644
@@ -25,6 +25,7 @@
 #include <net.h>
 #endif
 #include <netdev.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/ronetix/pm9g45/pm9g45.c +1 -0
index c1225800a9..e2620e3c04 100644
@@ -25,6 +25,7 @@
 #include <net.h>
 #endif
 #include <netdev.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/samsung/goni/goni.c +1 -0
index 12593830e9..d0247ac257 100644
@@ -17,6 +17,7 @@
 #include <samsung/misc.h>
 #include <usb.h>
 #include <usb_mass_storage.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/samsung/smdkc100/smdkc100.c +1 -0
index 79e127d99a..5d23844458 100644
@@ -11,6 +11,7 @@
 #include <asm/io.h>
 #include <asm/arch/sromc.h>
 #include <netdev.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/samsung/universal_c210/universal.c +1 -0
index feb8a341be..cc6eaf7ad0 100644
@@ -23,6 +23,7 @@
 #include <libtizen.h>
 #include <samsung/misc.h>
 #include <usb_mass_storage.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/siemens/common/board.c +1 -0
index 9cafcea53a..b967227411 100644
@@ -28,6 +28,7 @@
 #include <miiphy.h>
 #include <cpsw.h>
 #include <watchdog.h>
+#include <asm/mach-types.h>
 #include "../common/factoryset.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/spear/spear300/spear300.c +1 -0
index 396b5bdf60..8f8132a31a 100644
@@ -11,6 +11,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/mtd/fsmc_nand.h>
+#include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_defs.h>
 #include <asm/arch/spr_misc.h>
board/spear/spear310/spear310.c +1 -0
index 6f39ef1b40..d07dda34e9 100644
@@ -12,6 +12,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/mtd/fsmc_nand.h>
+#include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_defs.h>
 #include <asm/arch/spr_misc.h>
board/spear/spear320/spear320.c +1 -0
index 52196afd17..66073f3715 100644
@@ -12,6 +12,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/mtd/fsmc_nand.h>
+#include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_defs.h>
 #include <asm/arch/spr_misc.h>
board/spear/spear600/spear600.c +1 -0
index 858a9cae76..2a54b8b323 100644
@@ -11,6 +11,7 @@
 #include <nand.h>
 #include <asm/io.h>
 #include <linux/mtd/fsmc_nand.h>
+#include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_defs.h>
 #include <asm/arch/spr_misc.h>
board/spear/x600/x600.c +1 -0
index f8e9fddb0f..2c34ea1ad1 100644
@@ -14,6 +14,7 @@
 #include <phy.h>
 #include <rtc.h>
 #include <asm/io.h>
+#include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/spr_defs.h>
 #include <asm/arch/spr_misc.h>
board/ti/omap5_uevm/evm.c +1 -0
index b6cc417333..4b25cc2d7c 100644
@@ -24,6 +24,7 @@
 #include <sata.h>
 #include <usb.h>
 #include <asm/gpio.h>
+#include <asm/mach-types.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/ehci.h>
 #include <asm/ehci-omap.h>
board/ti/panda/panda.c +1 -0
index 72aabb242c..6ffb53c4c6 100644
@@ -6,6 +6,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 #include <common.h>
+#include <asm/mach-types.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/clock.h>
board/toradex/colibri_pxa270/colibri_pxa270.c +1 -0
index 8e948545e3..ddcc837bb0 100644
@@ -18,6 +18,7 @@
 #include <netdev.h>
 #include <serial.h>
 #include <usb.h>
+#include <asm/mach-types.h>
 #include "../common/tdx-common.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/toradex/common/tdx-cfg-block.c +1 -0
index 0014ce80a1..9e2af917fa 100644
@@ -23,6 +23,7 @@
 #include <malloc.h>
 #include <mmc.h>
 #include <nand.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/zipitz2/zipitz2.c +1 -0
index e81d6ff18d..8a15c30c0b 100644
@@ -16,6 +16,7 @@
 #include <spi.h>
 #include <asm/io.h>
 #include <usb.h>
+#include <asm/mach-types.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
drivers/usb/host/ehci-mx6.c +1 -0
index 55ac162a3c..2f5315b0a6 100644
@@ -17,6 +17,7 @@
 #include <asm/imx-common/iomux-v3.h>
 #include <asm/imx-common/sys_proto.h>
 #include <dm.h>
+#include <asm/mach-types.h>
 #include <power/regulator.h>
 
 #include "ehci.h"
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#63 lore raw

PATCH 25/38 arm: Add explicit include of <asm/mach-types.h>

Quoted 4 lines · Simon Glass

Rather than relying on common.h to provide this include, which is going away at some point, include it explicitly in each file.

[snip]

arch/arm/lib/spl.c line 17

Quoted 11 lines
arch/arm/lib/spl.c +3 -0
index 8ff2c5065d..3ea494f5e4 100644
@@ -12,6 +12,9 @@
 #include <spl.h>
 #include <image.h>
 #include <linux/compiler.h>
+#ifdef CONFIG_MACH_TYPE
+#include <asm/mach-types.h>
+#endif

We don't need to #ifdef this part here, we can safely always include this header.

You can repost just a v2 of this one with:

Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/66274701/attachment.sig>
#64 lore raw

PATCH 26/38 arm: Add declarations to avoid needing to include headers

In reply to Simon Glass

At present common.h includes various ARM-specific headers. In preparation for dropping this, add a few explicit declarations.

---

 arch/arm/include/asm/bootm.h      | 1 +
 arch/arm/include/asm/u-boot-arm.h | 2 ++
 arch/arm/lib/bootm.c              | 1 +
 3 files changed, 4 insertions(+)
arch/arm/include/asm/bootm.h +1 -0
index 436c35a6dc..4c9bb863c0 100644
@@ -41,6 +41,7 @@ extern void udc_disconnect(void);
  #define BOOTM_ENABLE_INITRD_TAG	0
 #endif
 
+struct tag_serialnr;
 #ifdef CONFIG_SERIAL_TAG
  #define BOOTM_ENABLE_SERIAL_TAG	1
 void get_board_serial(struct tag_serialnr *serialnr);
arch/arm/include/asm/u-boot-arm.h +2 -0
index 3a0d0b8675..ef4fca68ee 100644
@@ -47,6 +47,8 @@ ulong	get_timer_masked	(void);
 void	udelay_masked		(unsigned long usec);
 
 /* calls to c from vectors.S */
+struct pt_regs;
+
 void bad_mode(void);
 void do_undefined_instruction(struct pt_regs *pt_regs);
 void do_software_interrupt(struct pt_regs *pt_regs);
arch/arm/lib/bootm.c +1 -0
index 4dbe6a5303..bf49742de4 100644
@@ -31,6 +31,7 @@
 #ifdef CONFIG_ARMV7_NONSEC
 #include <asm/armv7.h>
 #endif
+#include <asm/setup.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#65 lore raw

PATCH 26/38 arm: Add declarations to avoid needing to include headers

Quoted 4 lines · Simon Glass

At present common.h includes various ARM-specific headers. In preparation for dropping this, add a few explicit declarations.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/3be0b13b/attachment.sig>
#66 lore raw

PATCH 27/38 arm: Include asm/setup.h explictly

In reply to Simon Glass

Include this header where needed so we do not need to rely on common.h.

---

 arch/arm/include/asm/omap_common.h      | 2 ++
 arch/arm/mach-omap2/utils.c             | 1 +
 board/Synology/ds109/ds109.c            | 1 +
 board/bluegiga/apx4devkit/apx4devkit.c  | 1 +
 board/compulab/common/common.c          | 1 +
 board/compulab/common/eeprom.c          | 1 +
 board/esd/meesc/meesc.c                 | 1 +
 board/gateworks/gw_ventana/gw_ventana.c | 1 +
 board/lego/ev3/legoev3.c                | 1 +
 board/sunxi/board.c                     | 1 +
 board/toradex/common/tdx-common.c       | 1 +
 11 files changed, 12 insertions(+)
arch/arm/include/asm/omap_common.h +2 -0
index c1a70b15d0..f98998343e 100644
@@ -638,6 +638,8 @@ void abb_setup(u32 fuse, u32 ldovbb, u32 setup, u32 control,
 	       u32 txdone, u32 txdone_mask, u32 opp);
 s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb);
 
+struct tag_serialnr;
+
 void omap_die_id_serial(void);
 void omap_die_id_get_board_serial(struct tag_serialnr *serialnr);
 void omap_die_id_usbethaddr(void);
arch/arm/mach-omap2/utils.c +1 -0
index 2d03ebfbd3..e0e32123dc 100644
@@ -5,6 +5,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 #include <common.h>
+#include <asm/setup.h>
 #include <asm/arch/sys_proto.h>
 static void do_cancel_out(u32 *num, u32 *den, u32 factor)
 {
board/Synology/ds109/ds109.c +1 -0
index b46c09d648..0c2f5258e9 100644
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <asm/setup.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 #include <asm/arch/mpp.h>
board/bluegiga/apx4devkit/apx4devkit.c +1 -0
index 08e79bd7ac..2215c29c9c 100644
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <asm/setup.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux-mx28.h>
 #include <asm/arch/clock.h>
board/compulab/common/common.c +1 -0
index b25d9a20b4..bf2ac7bd7f 100644
@@ -9,6 +9,7 @@
 #include <common.h>
 #include <asm/bootm.h>
 #include <asm/gpio.h>
+#include <asm/setup.h>
 
 #include "common.h"
 #include "eeprom.h"
board/compulab/common/eeprom.c +1 -0
index b5f1aa61cb..bb4c9e9740 100644
@@ -11,6 +11,7 @@
 #include <i2c.h>
 #include <eeprom_layout.h>
 #include <eeprom_field.h>
+#include <asm/setup.h>
 #include <linux/kernel.h>
 #include "eeprom.h"
 
board/esd/meesc/meesc.c +1 -0
index 037cf074ea..e4bda7909a 100644
@@ -14,6 +14,7 @@
 #include <asm/io.h>
 #include <asm/gpio.h>
 #include <asm/mach-types.h>
+#include <asm/setup.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
board/gateworks/gw_ventana/gw_ventana.c +1 -0
index c4c2d23532..d45abe468a 100644
@@ -19,6 +19,7 @@
 #include <asm/imx-common/spi.h>
 #include <asm/imx-common/video.h>
 #include <asm/io.h>
+#include <asm/setup.h>
 #include <dm.h>
 #include <dm/platform_data/serial_mxc.h>
 #include <hwconfig.h>
board/lego/ev3/legoev3.c +1 -0
index 3d6de11798..26534394ab 100644
@@ -26,6 +26,7 @@
 #include <linux/errno.h>
 #include <hwconfig.h>
 #include <asm/mach-types.h>
+#include <asm/setup.h>
 
 #ifdef CONFIG_MMC_DAVINCI
 #include <mmc.h>
board/sunxi/board.c +1 -0
index 4404edb59e..e222607cd2 100644
@@ -33,6 +33,7 @@
 #include <nand.h>
 #include <net.h>
 #include <sy8106a.h>
+#include <asm/setup.h>
 
 #if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
 /* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */
board/toradex/common/tdx-common.c +1 -0
index 2c6fc409c1..0d267877fa 100644
@@ -9,6 +9,7 @@
 #include <libfdt.h>
 
 #include "tdx-cfg-block.h"
+#include <asm/setup.h>
 #include "tdx-common.h"
 
 #ifdef CONFIG_TDX_CFG_BLOCK
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#67 lore raw

PATCH 27/38 arm: Include asm/setup.h explictly

Quoted 3 lines · Simon Glass

Include this header where needed so we do not need to rely on common.h.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/d19849f6/attachment.sig>
#68 lore raw

PATCH 28/38 arm: Remove include files from common.h

In reply to Simon Glass

With a small tweak we can avoid including these files for all boards.

---

 common/board_f.c | 3 +++
 include/common.h | 6 ------
 2 files changed, 3 insertions(+), 6 deletions(-)
common/board_f.c +3 -0
index a212f2b539..fe90faf309 100644
@@ -31,6 +31,9 @@
 #include <trace.h>
 #include <video.h>
 #include <watchdog.h>
+#ifdef CONFIG_MACH_TYPE
+#include <asm/mach-types.h>
+#endif
 #if defined(CONFIG_MP) && defined(CONFIG_PPC)
 #include <asm/mp.h>
 #endif
include/common.h +0 -6
index c5cb65beda..3004c22b72 100644
@@ -425,12 +425,6 @@ static inline int setenv_addr(const char *varname, const void *addr)
 	return setenv_hex(varname, (ulong)addr);
 }
 
-#ifdef CONFIG_ARM
-# include <asm/mach-types.h>
-# include <asm/setup.h>
-# include <asm/u-boot.h>
-#endif /* CONFIG_ARM */
-
 #ifdef CONFIG_AUTO_COMPLETE
 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
 #endif
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#69 lore raw

PATCH 28/38 arm: Remove include files from common.h

Quoted 3 lines · Simon Glass

With a small tweak we can avoid including these files for all boards.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/42c59b69/attachment.sig>
#70 lore raw

PATCH 28/38 arm: Remove include files from common.h

In reply to Simon Glass
Quoted 4 lines · Simon Glass

With a small tweak we can avoid including these files for all boards.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/bf086e93/attachment.sig>
#71 lore raw

PATCH 29/38 common: Drop cpu_init_f() declarations

In reply to Simon Glass

These arch-specific functions are not needed here.

---

 include/common.h | 11 -----------
 1 file changed, 11 deletions(-)
include/common.h +0 -11
index 3004c22b72..7eab4eb73d 100644
@@ -674,17 +674,6 @@ int	ppc440spe_revB(void);
 void	get_sys_info  ( sys_info_t * );
 #endif
 
-/* $(CPU)/cpu_init.c */
-#if defined(CONFIG_8xx) || defined(CONFIG_MPC8260)
-void	cpu_init_f    (volatile immap_t *immr);
-#endif
-#if defined(CONFIG_4xx) || defined(CONFIG_MCF52x2) || defined(CONFIG_MPC86xx)
-void	cpu_init_f    (void);
-#endif
-#ifdef CONFIG_MPC85xx
-ulong cpu_init_f(void);
-#endif
-
 int	cpu_init_r    (void);
 
 /* $(CPU)/interrupts.c */
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#72 lore raw

PATCH 29/38 common: Drop cpu_init_f() declarations

Quoted 3 lines · Simon Glass

These arch-specific functions are not needed here.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/294fbd19/attachment.sig>
#73 lore raw

PATCH 30/38 common: Drop determine_sysper() and determine_pci_clock_per()

In reply to Simon Glass

These arch-specific declarations should not be in common.h. Drop them.

---

 include/common.h | 6 ------
 1 file changed, 6 deletions(-)
include/common.h +0 -6
index 7eab4eb73d..b45f392373 100644
@@ -663,12 +663,6 @@ ulong get_ddr_freq(ulong);
 #endif
 
 #if defined(CONFIG_4xx)
-#  if defined(CONFIG_440)
-#	if defined(CONFIG_440SPE)
-	 unsigned long determine_sysper(void);
-	 unsigned long determine_pci_clock_per(void);
-#	endif
-#  endif
 typedef PPC4xx_SYS_INFO sys_info_t;
 int	ppc440spe_revB(void);
 void	get_sys_info  ( sys_info_t * );
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#74 lore raw

PATCH 30/38 common: Drop determine_sysper() and determine_pci_clock_per()

Quoted 3 lines · Simon Glass

These arch-specific declarations should not be in common.h. Drop them.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/e5677007/attachment.sig>
#75 lore raw

PATCH 31/38 common: Move PPC4xx_SYS_INFO() et al to arch-specific header

In reply to Simon Glass

These definitions should not be in common.h. Move them to an arch-specific header file.

---

 arch/powerpc/include/asm/ppc4xx.h | 4 ++++
 include/common.h                  | 6 ------
 2 files changed, 4 insertions(+), 6 deletions(-)
arch/powerpc/include/asm/ppc4xx.h +4 -0
index 30e6559ba4..45ff5dbacd 100644
@@ -292,6 +292,10 @@ int ppc4xx_pci_sync_clock_config(u32 async);
 unsigned long get_OPB_freq(void);
 unsigned long get_PCI_freq(void);
 
+typedef PPC4xx_SYS_INFO sys_info_t;
+int ppc440spe_revB(void);
+void get_sys_info(sys_info_t *);
+
 #endif	/* __ASSEMBLY__ */
 
 /* for multi-cpu support */
include/common.h +0 -6
index b45f392373..3f6b636fae 100644
@@ -662,12 +662,6 @@ static inline ulong get_ddr_freq(ulong dummy)
 ulong get_ddr_freq(ulong);
 #endif
 
-#if defined(CONFIG_4xx)
-typedef PPC4xx_SYS_INFO sys_info_t;
-int	ppc440spe_revB(void);
-void	get_sys_info  ( sys_info_t * );
-#endif
-
 int	cpu_init_r    (void);
 
 /* $(CPU)/interrupts.c */
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#76 lore raw

PATCH 31/38 common: Move PPC4xx_SYS_INFO() et al to arch-specific header

Quoted 4 lines · Simon Glass

These definitions should not be in common.h. Move them to an arch-specific header file.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/4a44f746/attachment.sig>
#77 lore raw

PATCH 32/38 common: powerpc: Move arch-specific headers

In reply to Simon Glass

Set up a new asm/ppc.h header file to hold this arch-specific stuff. It should not be in common.h. It probably should be refactored to use asm/arch instead, but that is a job for the maintainer.

---

 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/ppc.h    | 67 +++++++++++++++++++++++++++++++++++++++
 arch/powerpc/include/asm/u-boot.h |  1 +
 include/common.h                  | 44 +------------------------
 6 files changed, 72 insertions(+), 43 deletions(-)
 create mode 100644 arch/powerpc/include/asm/ppc.h
arch/powerpc/cpu/ppc4xx/4xx_pci.c +1 -0
index bfe48a2ad3..0227a72ae9 100644
@@ -56,6 +56,7 @@
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <pci.h>
+#include <asm/ppc4xx.h>
 
 #ifdef CONFIG_PCI
 
arch/powerpc/cpu/ppc4xx/miiphy.c +1 -0
index f0fc098059..aef267e0a2 100644
@@ -22,6 +22,7 @@
 #include <asm/io.h>
 #include <ppc_asm.tmpl>
 #include <commproc.h>
+#include <asm/ppc4xx.h>
 #include <asm/ppc4xx-emac.h>
 #include <asm/ppc4xx-mal.h>
 #include <miiphy.h>
arch/powerpc/cpu/ppc4xx/reginfo.c +1 -0
index a42327eb3d..59de04a2d8 100644
@@ -14,6 +14,7 @@
 #include <command.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/ppc4xx.h>
 #include <asm/ppc4xx-uic.h>
 #include <asm/ppc4xx-emac.h>
 
arch/powerpc/include/asm/ppc.h new file +67 -0

67 lines not on this page · raw message

arch/powerpc/include/asm/u-boot.h +1 -0
index 74b620294e..34e44e18c2 100644
@@ -16,6 +16,7 @@
 
 /* Use the generic board which requires a unified bd_info */
 #include <asm-generic/u-boot.h>
+#include <asm/ppc.h>
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_PPC
include/common.h +1 -43

50 lines not on this page · raw message

Signature · 1 line
2.13.0.303.g4ebf302169-goog
#78 lore raw

PATCH 32/38 common: powerpc: Move arch-specific headers

Quoted 5 lines · Simon Glass

Set up a new asm/ppc.h header file to hold this arch-specific stuff. It should not be in common.h. It probably should be refactored to use asm/arch instead, but that is a job for the maintainer.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/d45c194a/attachment.sig>
#79 lore raw

PATCH 33/38 common: freescale: Move arch-specific declarations

In reply to Simon Glass

The declarations should not be in common.h. Move them to the arch-specific headers.

---

 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-ls102xa/clock.h        |  1 +
 arch/powerpc/include/asm/ppc.h                   | 97 ++++++++++++++++++++++++
 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 +
 drivers/ddr/fsl/arm_ddr_gen3.c                   |  1 +
 drivers/ddr/fsl/ctrl_regs.c                      |  3 +
 drivers/ddr/fsl/fsl_ddr_gen4.c                   |  3 +
 drivers/ddr/fsl/options.c                        |  3 +
 drivers/ddr/fsl/util.c                           |  3 +
 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                  |  3 +
 include/common.h                                 | 96 +----------------------
 23 files changed, 135 insertions(+), 95 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/cpu.c +1 -0
index bb029608bf..0424859670 100644
@@ -26,6 +26,7 @@
 #ifdef CONFIG_SYS_FSL_DDR
 #include <fsl_ddr.h>
 #endif
+#include <asm/arch/clock.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
arch/arm/include/asm/arch-fsl-layerscape/clock.h +2 -0
index 69359135d5..bf32782d17 100644
@@ -20,5 +20,7 @@ enum mxc_clock {
 };
 
 unsigned int mxc_get_clock(enum mxc_clock clk);
+ulong get_ddr_freq(ulong);
+uint get_svr(void);
 
 #endif /* __ASM_ARCH_FSL_LAYERSCAPE_CLOCK_H_ */
arch/arm/include/asm/arch-fsl-layerscape/cpu.h +1 -0
index 95c3e2fc08..df711a23a1 100644
@@ -350,4 +350,5 @@ static struct mm_region final_map[] = {
 
 int fsl_qoriq_core_to_cluster(unsigned int core);
 u32 cpu_mask(void);
+
 #endif /* _FSL_LAYERSCAPE_CPU_H */
arch/arm/include/asm/arch-ls102xa/clock.h +1 -0
index fd36bb0a50..c1efb9919e 100644
@@ -19,5 +19,6 @@ enum mxc_clock {
 };
 
 unsigned int mxc_get_clock(enum mxc_clock clk);
+uint get_svr(void);
 
 #endif /* __ASM_ARCH_LS102XA_CLOCK_H_ */
arch/powerpc/include/asm/ppc.h +97 -0

103 lines not on this page · raw message

board/freescale/ls1021aqds/ddr.c +1 -0
index d16a69fc98..2ee8749f36 100644
@@ -8,6 +8,7 @@
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
 #include <asm/io.h>
+#include <asm/arch/clock.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/freescale/ls1043aqds/ddr.c +1 -0
index b22d3784dc..f219a77e98 100644
@@ -10,6 +10,7 @@
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
 #endif
+#include <asm/arch/clock.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/freescale/ls1043ardb/ddr.c +1 -0
index 36d27ecfae..354b864eb9 100644
@@ -11,6 +11,7 @@
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
 #endif
+#include <asm/arch/clock.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/freescale/ls1046aqds/ddr.c +1 -0
index 5fcfa0f701..e1858d6060 100644
@@ -10,6 +10,7 @@
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
 #endif
+#include <asm/arch/clock.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/freescale/ls1046ardb/ddr.c +1 -0
index ae5046cab6..fb4f6abe0b 100644
@@ -11,6 +11,7 @@
 #ifdef CONFIG_FSL_DEEP_SLEEP
 #include <fsl_sleep.h>
 #endif
+#include <asm/arch/clock.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
board/freescale/ls2080a/ddr.c +1 -0
index 9d176d3851..025e5aa8d0 100644
@@ -8,6 +8,7 @@
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
 #include <asm/arch/soc.h>
+#include <asm/arch/clock.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/freescale/ls2080aqds/ddr.c +1 -0
index 22a2676a95..20b8c1fef7 100644
@@ -8,6 +8,7 @@
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
 #include <asm/arch/soc.h>
+#include <asm/arch/clock.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
board/freescale/ls2080ardb/ddr.c +1 -0
index 7002dfb236..01f7d82fb6 100644
@@ -8,6 +8,7 @@
 #include <fsl_ddr_sdram.h>
 #include <fsl_ddr_dimm_params.h>
 #include <asm/arch/soc.h>
+#include <asm/arch/clock.h>
 #include "ddr.h"
 
 DECLARE_GLOBAL_DATA_PTR;
drivers/ddr/fsl/arm_ddr_gen3.c +1 -0
index 5b7ced5949..aaf4dfb1e7 100644
@@ -12,6 +12,7 @@
 #include <asm/processor.h>
 #include <fsl_immap.h>
 #include <fsl_ddr.h>
+#include <asm/arch/clock.h>
 
 #if (CONFIG_CHIP_SELECTS_PER_CTRL > 4)
 #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
drivers/ddr/fsl/ctrl_regs.c +3 -0
index 21687dd077..e2d66c33ec 100644
@@ -16,6 +16,9 @@
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
 #include <asm/io.h>
+#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#include <asm/arch/clock.h>
+#endif
 
 /*
  * Determine Rtt value.
drivers/ddr/fsl/fsl_ddr_gen4.c +3 -0
index e0f9e2ca3d..e612e7e749 100644
@@ -11,6 +11,9 @@
 #include <fsl_immap.h>
 #include <fsl_ddr.h>
 #include <fsl_errata.h>
+#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#include <asm/arch/clock.h>
+#endif
 
 #if defined(CONFIG_SYS_FSL_ERRATUM_A008511) | \
 	defined(CONFIG_SYS_FSL_ERRATUM_A009803)
drivers/ddr/fsl/options.c +3 -0
index b45a8797e4..8897c17e99 100644
@@ -9,6 +9,9 @@
 #include <fsl_ddr_sdram.h>
 
 #include <fsl_ddr.h>
+#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#include <asm/arch/clock.h>
+#endif
 
 /*
  * Use our own stack based buffer before relocation to allow accessing longer
drivers/ddr/fsl/util.c +3 -0
index b58784be65..e59f29215a 100644
@@ -13,6 +13,9 @@
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
 #include <asm/io.h>
+#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#include <asm/arch/clock.h>
+#endif
 
 /* To avoid 64-bit full-divides, we factor this here */
 #define ULL_2E12 2000000000000ULL
drivers/net/fsl-mc/dpio/qbman_portal.c +1 -0
index 86dc13d70d..6e31244f20 100644
@@ -4,6 +4,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
+#include <asm/arch/clock.h>
 #include "qbman_portal.h"
 
 /* QBMan portal management command codes */
drivers/pci/pcie_layerscape.c +4 -0
index 1c5a33ac28..b239ece44d 100644
@@ -12,6 +12,10 @@
 #include <errno.h>
 #include <malloc.h>
 #include <dm.h>
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+	defined(CONFIG_ARM)
+#include <asm/arch/clock.h>
+#endif
 #include "pcie_layerscape.h"
 
 DECLARE_GLOBAL_DATA_PTR;
drivers/pci/pcie_layerscape_fixup.c +3 -0
index d504bbda37..a6d6ceadce 100644
@@ -13,6 +13,9 @@
 #ifdef CONFIG_OF_BOARD_SETUP
 #include <libfdt.h>
 #include <fdt_support.h>
+#ifdef CONFIG_ARM
+#include <asm/arch/clock.h>
+#endif
 #include "pcie_layerscape.h"
 
 #if defined(CONFIG_FSL_LSCH3) || defined(CONFIG_FSL_LSCH2)
drivers/usb/common/fsl-errata.c +3 -0
index 338ac08d8a..1dfa73d68e 100644
@@ -9,6 +9,9 @@
 #include <common.h>
 #include <fsl_errata.h>
 #include<fsl_usb.h>
+#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#include <asm/arch/clock.h>
+#endif
 
 /* USB Erratum Checking code */
 #if defined(CONFIG_PPC) || defined(CONFIG_ARM)
include/common.h +1 -95

137 lines not on this page · raw message

Signature · 1 line
2.13.0.303.g4ebf302169-goog
#80 lore raw

PATCH 33/38 common: freescale: Move arch-specific declarations

Quoted 4 lines · Simon Glass

The declarations should not be in common.h. Move them to the arch-specific headers.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/7e129d6f/attachment.sig>
#81 lore raw

PATCH 34/38 common: freescale: Move arch-specific imx code to arch-imx

In reply to Simon Glass

These declarations should not be in common.h. Move them to an arch-specific header.

---

 arch/arm/include/asm/arch-imx/cpu.h | 7 +++++++
 include/common.h                    | 9 ---------
 2 files changed, 7 insertions(+), 9 deletions(-)
arch/arm/include/asm/arch-imx/cpu.h +7 -0
index b0524060b0..ec5b419e47 100644
@@ -50,3 +50,10 @@
 #define CS0_32M_CS1_32M_CS2_32M_CS3_32M		3
 
 u32 get_imx_reset_cause(void);
+ulong get_systemPLLCLK(void);
+ulong get_FCLK(void);
+ulong get_HCLK(void);
+ulong get_BCLK(void);
+ulong get_PERCLK1(void);
+ulong get_PERCLK2(void);
+ulong get_PERCLK3(void);
include/common.h +0 -9
index ba31727a79..cabb0093bd 100644
@@ -522,15 +522,6 @@ ulong	get_UCLK (void);
 #if defined(CONFIG_LH7A40X)
 ulong	get_PLLCLK (void);
 #endif
-#if defined(CONFIG_IMX)
-ulong get_systemPLLCLK(void);
-ulong get_FCLK(void);
-ulong get_HCLK(void);
-ulong get_BCLK(void);
-ulong get_PERCLK1(void);
-ulong get_PERCLK2(void);
-ulong get_PERCLK3(void);
-#endif
 ulong	get_bus_freq  (ulong);
 int get_serial_clock(void);
 
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#82 lore raw

PATCH 34/38 common: freescale: Move arch-specific imx code to arch-imx

Quoted 4 lines · Simon Glass

These declarations should not be in common.h. Move them to an arch-specific header.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/4f6b7abd/attachment.sig>
#83 lore raw

PATCH 35/38 common: ep93xx: Move arch-specific declarations out of common

In reply to Simon Glass

These declarations should not be in common. Remove those that are not needed and move the others to an arch-specific location.

---

 arch/arm/cpu/arm920t/ep93xx/speed.c |  2 +-
 include/common.h                    | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)
arch/arm/cpu/arm920t/ep93xx/speed.c +1 -1
index 9dc60b6ff2..f0ab7d4e3d 100644
@@ -39,7 +39,7 @@ static ulong get_PLLCLK(uint32_t *pllreg)
 }
 
 /* return FCLK frequency */
-ulong get_FCLK()
+ulong get_FCLK(void)
 {
 	const uint8_t fclk_divisors[] = { 1, 2, 4, 8, 16, 1, 1, 1 };
 	struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
include/common.h +0 -10
index cabb0093bd..19839b67f1 100644
@@ -512,16 +512,6 @@ int serial_stub_tstc(struct stdio_dev *sdev);
 
 /* $(CPU)/speed.c */
 int	get_clocks (void);
-#if defined(CONFIG_LH7A40X) || \
-    defined(CONFIG_EP93XX)
-ulong	get_FCLK (void);
-ulong	get_HCLK (void);
-ulong	get_PCLK (void);
-ulong	get_UCLK (void);
-#endif
-#if defined(CONFIG_LH7A40X)
-ulong	get_PLLCLK (void);
-#endif
 ulong	get_bus_freq  (ulong);
 int get_serial_clock(void);
 
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#84 lore raw

PATCH 35/38 common: ep93xx: Move arch-specific declarations out of common

Quoted 4 lines · Simon Glass

These declarations should not be in common. Remove those that are not needed and move the others to an arch-specific location.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/5d0ca1ca/attachment.sig>
#85 lore raw

PATCH 36/38 common: arm: davinci: Move header file out of common

In reply to Simon Glass

We should not have an arch-specific header file in common.h. Instead, use the asm/hardware.h header to provide the required declarations, and drop the common.h changes.

---

 arch/arm/mach-davinci/include/mach/davinci_misc.h | 2 ++
 arch/arm/mach-davinci/include/mach/hardware.h     | 5 ++++-
 include/common.h                                  | 3 ---
 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/omapl138_lcdk.h                   | 3 +++
 9 files changed, 20 insertions(+), 4 deletions(-)
arch/arm/mach-davinci/include/mach/davinci_misc.h +2 -0
index 03be3882f8..79090e0671 100644
@@ -7,6 +7,8 @@
 #ifndef __MISC_H
 #define __MISC_H
 
+#include <asm/arch/hardware.h>
+
 /* pin muxer definitions */
 #define PIN_MUX_NUM_FIELDS	8	/* Per register */
 #define PIN_MUX_FIELD_SIZE	4	/* n in bits */
arch/arm/mach-davinci/include/mach/hardware.h +4 -1
index c31f38c8a2..e11099cb93 100644
@@ -14,14 +14,15 @@
 #ifndef __ASM_ARCH_HARDWARE_H
 #define __ASM_ARCH_HARDWARE_H
 
-#include <config.h>
 #include <linux/sizes.h>
 
 #define	REG(addr)	(*(volatile unsigned int *)(addr))
 #define REG_P(addr)	((volatile unsigned int *)(addr))
 
+#ifndef __ASSEMBLY__
 typedef volatile unsigned int	dv_reg;
 typedef volatile unsigned int *	dv_reg_p;
+#endif
 
 /*
  * Base register addresses
@@ -285,6 +286,7 @@ typedef volatile unsigned int *	dv_reg_p;
 
 #endif /* CONFIG_SOC_DA8XX */
 
+#ifndef __ASSEMBLY__
 void lpsc_on(unsigned int id);
 void lpsc_syncreset(unsigned int id);
 void lpsc_disable(unsigned int id);
@@ -625,5 +627,6 @@ static inline enum davinci_clk_ids get_async3_src(void)
 #define FLAG_FLGOFF		0x00000010
 
 #endif
+#endif /* !__ASSEMBLY__ */
 
 #endif /* __ASM_ARCH_HARDWARE_H */
include/common.h +0 -3
index 19839b67f1..b97b61d65d 100644
@@ -31,9 +31,6 @@ typedef volatile unsigned char	vu_char;
 #include <stdarg.h>
 #include <linux/kernel.h>
 
-#ifdef CONFIG_SOC_DA8XX
-#include <asm/arch/hardware.h>
-#endif
 #ifdef CONFIG_FSL_LSCH3
 #include <asm/arch/immap_lsch3.h>
 #endif
include/configs/calimain.h +2 -0
index 6e2fd33563..61bae7728e 100644
@@ -318,4 +318,6 @@
 int calimain_get_osc_freq(void);
 #endif
 
+#include <asm/arch/hardware.h>
+
 #endif /* __CONFIG_H */
include/configs/da850evm.h +3 -0
index 9442c05943..139d74882e 100644
@@ -334,4 +334,7 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
 					GENERATED_GBL_DATA_SIZE)
 #endif /* CONFIG_DIRECT_NOR_BOOT */
+
+#include <asm/arch/hardware.h>
+
 #endif /* __CONFIG_H */
include/configs/ea20.h +2 -0
index 3a5b5c7285..f4b3a60dd3 100644
@@ -273,4 +273,6 @@
 	"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0"	\
 	"bootcmd=run net_testrfs\0"
 
+#include <asm/arch/hardware.h>
+
 #endif /* __CONFIG_H */
include/configs/ipam390.h +2 -0
index 5caf02e8d9..a83b5da599 100644
@@ -304,4 +304,6 @@
 #define CONFIG_IPAM390_GPIO_LED_RED	((16 * 7) + 11)
 #define CONFIG_IPAM390_GPIO_LED_GREEN	((16 * 7) + 12)
 
+#include <asm/arch/hardware.h>
+
 #endif /* __CONFIG_H */
include/configs/legoev3.h +2 -0
index c5e7d629ab..e62af3ff42 100644
@@ -215,4 +215,6 @@
 
 #define CONFIG_SYS_INIT_SP_ADDR		0x80010000
 
+#include <asm/arch/hardware.h>
+
 #endif /* __CONFIG_H */
include/configs/omapl138_lcdk.h +3 -0
index 0cc0042bca..2de7cd5004 100644
@@ -345,4 +345,7 @@
 #define CONFIG_SYS_SDRAM_BASE		0xc0000000
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
 					GENERATED_GBL_DATA_SIZE)
+
+#include <asm/arch/hardware.h>
+
 #endif /* __CONFIG_H */
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#86 lore raw

PATCH 36/38 common: arm: davinci: Move header file out of common

Quoted 5 lines · Simon Glass

We should not have an arch-specific header file in common.h. Instead, use the asm/hardware.h header to provide the required declarations, and drop the common.h changes.

I'm not a super fan of adding #include to config.h files, but I'll see if they can be dropped when testing the series.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/db04e7b5/attachment.sig>
#87 lore raw

PATCH 36/38 common: arm: davinci: Move header file out of common

Hi Tom,

Quoted 6 lines · Tom Rini
Quoted 4 lines · Simon Glass

We should not have an arch-specific header file in common.h. Instead, use the asm/hardware.h header to provide the required declarations, and drop the common.h changes.

Quoted 6 lines
Quoted 1 line

I'm not a super fan of adding #include to config.h files, but I'll see if they can be dropped when testing the series.

Me neither. The problem is things like CONFIG_SYS_LOAD_ADDR in common/image.c which rely on things in asm/hardware. I suppose you could include it from asm/u-boot.h, but I'm not sure if that is better or not.

Regards,
Simon

#88 lore raw

PATCH 36/38 common: arm: davinci: Move header file out of common

Quoted 14 lines · Simon Glass

Hi Tom,

Quoted 11 lines · Tom Rini
Quoted 5 lines · Simon Glass

We should not have an arch-specific header file in common.h. Instead, use the asm/hardware.h header to provide the required declarations, and drop the common.h changes.

I'm not a super fan of adding #include to config.h files, but I'll see if they can be dropped when testing the series.

Quoted 6 lines
Quoted 1 line

Me neither. The problem is things like CONFIG_SYS_LOAD_ADDR in common/image.c which rely on things in asm/hardware. I suppose you could include it from asm/u-boot.h, but I'm not sure if that is better or not.

No, I need to bite the bullet and go back and re-try migration of CONFIG_SYS_TEXT_BASE (fully), CONFIG_SYS_LOAD_ADDR, etc.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170518/fed81b0e/attachment.sig>
#89 lore raw

PATCH 36/38 common: arm: davinci: Move header file out of common

In reply to Simon Glass
Quoted 6 lines · Simon Glass

We should not have an arch-specific header file in common.h. Instead, use the asm/hardware.h header to provide the required declarations, and drop the common.h changes.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/1a5ebde6/attachment.sig>
#90 lore raw

PATCH 37/38 common: arm: freescale: layerscape: Move header files out of common.h

In reply to Simon Glass

We should not have an arch-specific header file in common.h. Adjust the board files a little so it is not needed, and drop it.

---

 arch/arm/include/asm/arch-fsl-layerscape/soc.h | 11 +++++++++++
 arch/arm/include/asm/arch-ls102xa/clock.h      |  1 +
 arch/arm/include/asm/arch-ls102xa/soc.h        |  0
 drivers/ddr/fsl/ctrl_regs.c                    |  3 ++-
 drivers/ddr/fsl/fsl_ddr_gen4.c                 |  3 ++-
 drivers/ddr/fsl/options.c                      |  3 ++-
 drivers/ddr/fsl/util.c                         |  3 ++-
 drivers/usb/common/fsl-errata.c                |  3 ++-
 include/common.h                               |  7 -------
 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/fsl_ifc.h                              |  3 +++
 14 files changed, 33 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-ls102xa/soc.h
arch/arm/include/asm/arch-fsl-layerscape/soc.h +11 -0
index 426fe8ef86..a35cb9eaea 100644
@@ -7,6 +7,16 @@
 #ifndef _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_
 #define _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_
 
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+#ifdef CONFIG_FSL_LSCH2
+#include <asm/arch/immap_lsch2.h>
+#endif
+#ifdef CONFIG_FSL_LSCH3
+#include <asm/arch/immap_lsch3.h>
+#endif
+#endif
+
 #ifdef CONFIG_SYS_FSL_CCSR_GUR_LE
 #define gur_in32(a)       in_le32(a)
 #define gur_out32(a, v)   out_le32(a, v)
@@ -117,4 +127,5 @@ void erratum_a010315(void);
 bool soc_has_dp_ddr(void);
 bool soc_has_aiop(void);
 #endif
+
 #endif /* _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_ */
arch/arm/include/asm/arch-ls102xa/clock.h +1 -0
index c1efb9919e..a1d6afec93 100644
@@ -19,6 +19,7 @@ enum mxc_clock {
 };
 
 unsigned int mxc_get_clock(enum mxc_clock clk);
+ulong get_ddr_freq(ulong);
 uint get_svr(void);
 
 #endif /* __ASM_ARCH_LS102XA_CLOCK_H_ */
arch/arm/include/asm/arch-ls102xa/soc.h new file +0 -0
new file mode 100644
index 0000000000..e69de29bb2
drivers/ddr/fsl/ctrl_regs.c +2 -1
index e2d66c33ec..c0ee858a02 100644
@@ -16,7 +16,8 @@
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
 #include <asm/io.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+	defined(CONFIG_ARM)
 #include <asm/arch/clock.h>
 #endif
 
drivers/ddr/fsl/fsl_ddr_gen4.c +2 -1
index e612e7e749..3349fc5c3b 100644
@@ -11,7 +11,8 @@
 #include <fsl_immap.h>
 #include <fsl_ddr.h>
 #include <fsl_errata.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+	defined(CONFIG_ARM)
 #include <asm/arch/clock.h>
 #endif
 
drivers/ddr/fsl/options.c +2 -1
index 8897c17e99..20edd2dc28 100644
@@ -9,7 +9,8 @@
 #include <fsl_ddr_sdram.h>
 
 #include <fsl_ddr.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+	defined(CONFIG_ARM)
 #include <asm/arch/clock.h>
 #endif
 
drivers/ddr/fsl/util.c +2 -1
index e59f29215a..0a305b36b8 100644
@@ -13,7 +13,8 @@
 #include <fsl_ddr.h>
 #include <fsl_immap.h>
 #include <asm/io.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+	defined(CONFIG_ARM)
 #include <asm/arch/clock.h>
 #endif
 
drivers/usb/common/fsl-errata.c +2 -1
index 1dfa73d68e..4e642ae435 100644
@@ -9,7 +9,8 @@
 #include <common.h>
 #include <fsl_errata.h>
 #include<fsl_usb.h>
-#if defined(CONFIG_FSL_LSCH2) || defined(FSL_LSCH3)
+#if defined(CONFIG_FSL_LSCH2) || defined(CONFIG_FSL_LSCH3) || \
+	defined(CONFIG_ARM)
 #include <asm/arch/clock.h>
 #endif
 
include/common.h +0 -7
index b97b61d65d..a413f1ae9b 100644
@@ -31,13 +31,6 @@ typedef volatile unsigned char	vu_char;
 #include <stdarg.h>
 #include <linux/kernel.h>
 
-#ifdef CONFIG_FSL_LSCH3
-#include <asm/arch/immap_lsch3.h>
-#endif
-#ifdef CONFIG_FSL_LSCH2
-#include <asm/arch/immap_lsch2.h>
-#endif
-
 #include <part.h>
 #include <flash.h>
 #include <image.h>
include/configs/ls1012a_common.h +2 -0
index 09f890d55c..1d01cd9906 100644
@@ -123,4 +123,6 @@
 #define CONFIG_PANIC_HANG
 #define CONFIG_SYS_BOOTM_LEN   (64 << 20)      /* Increase max gunzip size */
 
+#include <asm/arch/soc.h>
+
 #endif /* __LS1012A_COMMON_H */
include/configs/ls1043a_common.h +2 -0
index e26924877d..b5f36c3e57 100644
@@ -307,4 +307,6 @@
 #define CONFIG_SHA_HW_ACCEL
 #endif
 
+#include <asm/arch/soc.h>
+
 #endif /* __LS1043A_COMMON_H */
include/configs/ls1046a_common.h +2 -0
index 957ffd3634..d1dc823d6a 100644
@@ -236,4 +236,6 @@
 #define CONFIG_SHA_HW_ACCEL
 #endif
 
+#include <asm/arch/soc.h>
+
 #endif /* __LS1046A_COMMON_H */
include/configs/ls2080a_common.h +2 -0
index 427f623e8c..baadc12e36 100644
@@ -236,4 +236,6 @@ unsigned long long get_qixis_addr(void);
 #define CONFIG_SHA_HW_ACCEL
 #endif
 
+#include <asm/arch/soc.h>
+
 #endif /* __LS2_COMMON_H */
include/fsl_ifc.h +3 -0
index a86f2162aa..29aa687507 100644
@@ -11,6 +11,9 @@
 #ifdef CONFIG_FSL_IFC
 #include <config.h>
 #include <common.h>
+#ifdef CONFIG_ARM
+#include <asm/arch/soc.h>
+#endif
 
 #define FSL_IFC_V1_1_0	0x01010000
 #define FSL_IFC_V2_0_0	0x02000000
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#91 lore raw

PATCH 37/38 common: arm: freescale: layerscape: Move header files out of common.h

Quoted 4 lines · Simon Glass

We should not have an arch-specific header file in common.h. Adjust the board files a little so it is not needed, and drop it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/5a6a6633/attachment.sig>
#92 lore raw

PATCH 38/38 common: microblaze: Drop arch-specific declarations

In reply to Simon Glass

These are not needed and should not be in common.h. Drop them.

---

 include/common.h | 5 -----
 1 file changed, 5 deletions(-)
include/common.h +0 -5
index a413f1ae9b..638c45b954 100644
@@ -438,11 +438,6 @@ void	relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
 ulong	get_endaddr   (void);
 void	trap_init     (ulong);
 
-#if defined (CONFIG_MICROBLAZE)
-unsigned short	in16(unsigned int);
-void		out16(unsigned int, unsigned short value);
-#endif
-
 /* $(CPU)/cpu.c */
 static inline int cpumask_next(int cpu, unsigned int mask)
 {
Signature · 1 line
2.13.0.303.g4ebf302169-goog
#93 lore raw

PATCH 38/38 common: microblaze: Drop arch-specific declarations

Quoted 3 lines · Simon Glass

These are not needed and should not be in common.h. Drop them.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/13a27651/attachment.sig>