* [U-Boot] [PATCH 00/38] common: Reduce size of common.h
@ 2017-05-17 14:22 Simon Glass
2017-05-17 14:22 ` [U-Boot] [PATCH 01/38] common: Drop inclusion of pci.h Simon Glass
` (37 more replies)
0 siblings, 38 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This file was traditionally a dumping ground for common declarations. It
should really only contain things that nearly every file needs, such as
the configuration.
Perhaps the worst part is that there is arch-specific code in this file.
There are plenty of arch-specific places where this should go instead.
This series makes a start at cleaning up by removing almost all the
arch-specific code from this header file.
Simon Glass (38):
common: Drop inclusion of pci.h
common: Drop pci_pre_init() and is_pci_host()
common: Move pci_target_init() to PPC header
common: Drop pci_master_init()
common: Move pcie_setup_hoses() to PPC header
common: Move get_OPB_freq() and get_PCI_freq() to PPC header
api: Add a header for api_init()
gpio: samsung: Drop s3c2440_gpio driver
samsung: Drop s3c24x0 arch-specific code
samsung: mmc: Drop s3c_sdi driver
samsung: usb: Drop ohci-s3c24xx driver
samsung: nand: Drop s3c2410_nand driver
samsung: Drop more references fo s3c24x0
arc: Make u-boot-arc.h a private header
sandbox: Make u-boot-sandbox.h a private header
x86: Make u-boot-x86.h a private header
arm: Make u-boot-arm.h a private header
mips: Make u-boot-mips.h a private header
nds32: Make u-boot-nds32.h a private header
arc: Don't include asm/u-boot.h in common
mips: Don't include asm/u-boot.h in common
sandbox: Don't include asm/u-boot.h in common
x86: Don't include asm/u-boot.h in common
nds32: Remove include files from common.h
arm: Add explicit include of <asm/mach-types.h>
arm: Add declarations to avoid needing to include headers
arm: Include asm/setup.h explictly
arm: Remove include files from common.h
common: Drop cpu_init_f() declarations
common: Drop determine_sysper() and determine_pci_clock_per()
common: Move PPC4xx_SYS_INFO() et al to arch-specific header
common: powerpc: Move arch-specific headers
common: freescale: Move arch-specific declarations
common: freescale: Move arch-specific imx code to arch-imx
common: ep93xx: Move arch-specific declarations out of common
common: arm: davinci: Move header file out of common
common: arm: freescale: layerscape: Move header files out of common.h
common: microblaze: Drop arch-specific declarations
arch/arc/include/asm/u-boot.h | 1 +
arch/arm/cpu/arm920t/Makefile | 1 -
arch/arm/cpu/arm920t/ep93xx/speed.c | 2 +-
arch/arm/cpu/arm920t/s3c24x0/Makefile | 10 -
arch/arm/cpu/arm920t/s3c24x0/cpu_info.c | 38 -
arch/arm/cpu/arm920t/s3c24x0/speed.c | 102 --
arch/arm/cpu/arm920t/s3c24x0/timer.c | 160 --
arch/arm/cpu/arm920t/start.S | 37 -
arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 +
arch/arm/include/asm/arch-fsl-layerscape/clock.h | 2 +
arch/arm/include/asm/arch-fsl-layerscape/cpu.h | 1 +
arch/arm/include/asm/arch-fsl-layerscape/soc.h | 11 +
arch/arm/include/asm/arch-imx/cpu.h | 7 +
arch/arm/include/asm/arch-ls102xa/clock.h | 2 +
arch/arm/include/asm/arch-ls102xa/soc.h | 0
arch/arm/include/asm/arch-s3c24x0/gpio.h | 155 --
arch/arm/include/asm/arch-s3c24x0/iomux.h | 184 ---
arch/arm/include/asm/arch-s3c24x0/memory.h | 159 --
arch/arm/include/asm/arch-s3c24x0/s3c2400.h | 136 --
arch/arm/include/asm/arch-s3c24x0/s3c2410.h | 147 --
arch/arm/include/asm/arch-s3c24x0/s3c2440.h | 145 --
arch/arm/include/asm/arch-s3c24x0/s3c24x0.h | 708 ---------
arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h | 16 -
arch/arm/include/asm/bootm.h | 1 +
arch/arm/include/asm/omap_common.h | 2 +
arch/arm/include/asm/u-boot-arm.h | 6 +
arch/arm/include/asm/u-boot.h | 1 +
arch/arm/lib/bootm.c | 1 +
arch/arm/lib/spl.c | 3 +
arch/arm/mach-davinci/include/mach/davinci_misc.h | 2 +
arch/arm/mach-davinci/include/mach/hardware.h | 5 +-
arch/arm/mach-omap2/utils.c | 1 +
arch/mips/include/asm/u-boot.h | 1 +
arch/nds32/include/asm/u-boot.h | 2 +
arch/nds32/lib/bootm.c | 1 +
arch/powerpc/cpu/ppc4xx/4xx_pci.c | 1 +
arch/powerpc/cpu/ppc4xx/miiphy.c | 1 +
arch/powerpc/cpu/ppc4xx/reginfo.c | 1 +
arch/powerpc/include/asm/4xx_pci.h | 2 +
arch/powerpc/include/asm/ppc.h | 164 ++
arch/powerpc/include/asm/ppc4xx.h | 7 +
arch/powerpc/include/asm/u-boot.h | 1 +
arch/sandbox/include/asm/u-boot.h | 1 +
arch/x86/include/asm/u-boot-x86.h | 4 +-
arch/x86/include/asm/u-boot.h | 1 +
board/AndesTech/adp-ag101p/adp-ag101p.c | 1 +
board/Barix/ipam390/ipam390.c | 1 +
board/LaCie/edminiv2/edminiv2.c | 1 +
board/LaCie/net2big_v2/net2big_v2.c | 1 +
board/LaCie/netspace_v2/netspace_v2.c | 1 +
board/Marvell/aspenite/aspenite.c | 1 +
board/Marvell/gplugd/gplugd.c | 1 +
board/Marvell/guruplug/guruplug.c | 1 +
board/Marvell/openrd/openrd.c | 1 +
board/Marvell/sheevaplug/sheevaplug.c | 1 +
board/Seagate/dockstar/dockstar.c | 1 +
board/Seagate/goflexhome/goflexhome.c | 1 +
board/Seagate/nas220/nas220.c | 1 +
board/Synology/ds109/ds109.c | 1 +
board/amazon/kc1/kc1.c | 1 +
board/armltd/integrator/integrator.c | 1 +
board/armltd/vexpress/vexpress_common.c | 1 +
board/atmel/at91rm9200ek/at91rm9200ek.c | 1 +
board/atmel/at91sam9261ek/at91sam9261ek.c | 1 +
board/atmel/at91sam9263ek/at91sam9263ek.c | 1 +
board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 1 +
board/atmel/at91sam9rlek/at91sam9rlek.c | 1 +
board/atmel/at91sam9x5ek/at91sam9x5ek.c | 1 +
board/bluegiga/apx4devkit/apx4devkit.c | 1 +
board/bluewater/gurnard/gurnard.c | 1 +
board/bluewater/snapper9260/snapper9260.c | 1 +
board/cirrus/edb93xx/edb93xx.c | 1 +
board/compulab/common/common.c | 1 +
board/compulab/common/eeprom.c | 1 +
board/davinci/da8xxevm/da850evm.c | 1 +
board/davinci/da8xxevm/omapl138_lcdk.c | 1 +
board/davinci/ea20/ea20.c | 1 +
board/esd/meesc/meesc.c | 2 +
board/freescale/ls1021aqds/ddr.c | 1 +
board/freescale/ls1043aqds/ddr.c | 1 +
board/freescale/ls1043ardb/ddr.c | 1 +
board/freescale/ls1046aqds/ddr.c | 1 +
board/freescale/ls1046ardb/ddr.c | 1 +
board/freescale/ls2080a/ddr.c | 1 +
board/freescale/ls2080aqds/ddr.c | 1 +
board/freescale/ls2080ardb/ddr.c | 1 +
board/freescale/mx35pdk/mx35pdk.c | 1 +
board/gateworks/gw_ventana/gw_ventana.c | 1 +
board/gumstix/duovero/duovero.c | 1 +
board/h2200/h2200.c | 1 +
board/imx31_phycore/imx31_phycore.c | 1 +
board/lego/ev3/legoev3.c | 2 +
board/mini-box/picosam9g45/picosam9g45.c | 1 +
board/nvidia/seaboard/seaboard.c | 1 +
board/overo/common.c | 1 +
board/ronetix/pm9261/pm9261.c | 1 +
board/ronetix/pm9263/pm9263.c | 1 +
board/ronetix/pm9g45/pm9g45.c | 1 +
board/samsung/goni/goni.c | 1 +
board/samsung/smdkc100/smdkc100.c | 1 +
board/samsung/universal_c210/universal.c | 1 +
board/siemens/common/board.c | 1 +
board/spear/spear300/spear300.c | 1 +
board/spear/spear310/spear310.c | 1 +
board/spear/spear320/spear320.c | 1 +
board/spear/spear600/spear600.c | 1 +
board/spear/x600/x600.c | 1 +
board/sunxi/board.c | 1 +
board/ti/omap5_uevm/evm.c | 1 +
board/ti/panda/panda.c | 1 +
board/toradex/colibri_pxa270/colibri_pxa270.c | 1 +
board/toradex/common/tdx-cfg-block.c | 1 +
board/toradex/common/tdx-common.c | 1 +
board/zipitz2/zipitz2.c | 1 +
common/board_f.c | 3 +
common/board_r.c | 1 +
drivers/ddr/fsl/arm_ddr_gen3.c | 1 +
drivers/ddr/fsl/ctrl_regs.c | 4 +
drivers/ddr/fsl/fsl_ddr_gen4.c | 4 +
drivers/ddr/fsl/options.c | 4 +
drivers/ddr/fsl/util.c | 4 +
drivers/gpio/Makefile | 1 -
drivers/gpio/s3c2440_gpio.c | 88 --
drivers/i2c/s3c24x0_i2c.c | 4 -
drivers/mmc/Makefile | 1 -
drivers/mmc/s3c_sdi.c | 323 ----
drivers/mtd/nand/Makefile | 1 -
drivers/mtd/nand/s3c2410_nand.c | 175 ---
drivers/net/fsl-mc/dpio/qbman_portal.c | 1 +
drivers/pci/pcie_layerscape.c | 4 +
drivers/pci/pcie_layerscape_fixup.c | 3 +
drivers/usb/common/fsl-errata.c | 4 +
drivers/usb/gadget/gadget_chips.h | 8 -
drivers/usb/host/Makefile | 1 -
drivers/usb/host/ehci-mx6.c | 1 +
drivers/usb/host/ohci-hcd.c | 1 -
drivers/usb/host/ohci-s3c24xx.c | 1688 ---------------------
drivers/usb/host/ohci-s3c24xx.h | 409 -----
drivers/video/sm501.c | 1 +
include/api.h | 13 +
include/common.h | 246 ---
include/configs/calimain.h | 2 +
include/configs/da850evm.h | 3 +
include/configs/ea20.h | 2 +
include/configs/ipam390.h | 2 +
include/configs/legoev3.h | 2 +
include/configs/ls1012a_common.h | 2 +
include/configs/ls1043a_common.h | 2 +
include/configs/ls1046a_common.h | 2 +
include/configs/ls2080a_common.h | 2 +
include/configs/omapl138_lcdk.h | 3 +
include/fsl_ifc.h | 3 +
scripts/config_whitelist.txt | 9 -
153 files changed, 377 insertions(+), 4956 deletions(-)
delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/Makefile
delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/cpu_info.c
delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/speed.c
delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/timer.c
create mode 100644 arch/arm/include/asm/arch-ls102xa/soc.h
delete mode 100644 arch/arm/include/asm/arch-s3c24x0/gpio.h
delete mode 100644 arch/arm/include/asm/arch-s3c24x0/iomux.h
delete mode 100644 arch/arm/include/asm/arch-s3c24x0/memory.h
delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2400.h
delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2410.h
delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2440.h
delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
create mode 100644 arch/powerpc/include/asm/ppc.h
delete mode 100644 drivers/gpio/s3c2440_gpio.c
delete mode 100644 drivers/mmc/s3c_sdi.c
delete mode 100644 drivers/mtd/nand/s3c2410_nand.c
delete mode 100644 drivers/usb/host/ohci-s3c24xx.c
delete mode 100644 drivers/usb/host/ohci-s3c24xx.h
create mode 100644 include/api.h
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 01/38] common: Drop inclusion of pci.h
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot,01/38] " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 02/38] common: Drop pci_pre_init() and is_pci_host() Simon Glass
` (36 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This should not be in common.h - remove it and update the only file that
needs it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/video/sm501.c | 1 +
include/common.h | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/sm501.c b/drivers/video/sm501.c
index cafaae5f31..a468bd96ad 100644
--- a/drivers/video/sm501.c
+++ b/drivers/video/sm501.c
@@ -16,6 +16,7 @@
#include <common.h>
#include <asm/io.h>
+#include <pci.h>
#include <video_fb.h>
#include <sm501.h>
diff --git a/include/common.h b/include/common.h
index 45f190a600..a6347e0167 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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) || \
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 02/38] common: Drop pci_pre_init() and is_pci_host()
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
2017-05-17 14:22 ` [U-Boot] [PATCH 01/38] common: Drop inclusion of pci.h Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 03/38] common: Move pci_target_init() to PPC header Simon Glass
` (35 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
These should not be in common.h. They are used in some legacy PowerPC
code. Just drop them.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/common.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/include/common.h b/include/common.h
index a6347e0167..8d6d1d8d5f 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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 *);
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 03/38] common: Move pci_target_init() to PPC header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
2017-05-17 14:22 ` [U-Boot] [PATCH 01/38] common: Drop inclusion of pci.h Simon Glass
2017-05-17 14:22 ` [U-Boot] [PATCH 02/38] common: Drop pci_pre_init() and is_pci_host() Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 04/38] common: Drop pci_master_init() Simon Glass
` (34 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
Only one boards needs this definition. Move it to an arch-specific header.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/powerpc/include/asm/4xx_pci.h | 1 +
include/common.h | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/include/asm/4xx_pci.h b/arch/powerpc/include/asm/4xx_pci.h
index f686e7cb07..a68c8756b1 100644
--- a/arch/powerpc/include/asm/4xx_pci.h
+++ b/arch/powerpc/include/asm/4xx_pci.h
@@ -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
diff --git a/include/common.h b/include/common.h
index 8d6d1d8d5f..a1f1a9a949 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 04/38] common: Drop pci_master_init()
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (2 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 03/38] common: Move pci_target_init() to PPC header Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot,04/38] " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 05/38] common: Move pcie_setup_hoses() to PPC header Simon Glass
` (33 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This should not be in common.h. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/common.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/common.h b/include/common.h
index a1f1a9a949..7f9b7863b1 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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)
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 05/38] common: Move pcie_setup_hoses() to PPC header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (3 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 04/38] common: Drop pci_master_init() Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 06/38] common: Move get_OPB_freq() and get_PCI_freq() " Simon Glass
` (32 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
Only one board needs this definition. Move it to an arch-specific header.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/powerpc/include/asm/4xx_pci.h | 1 +
include/common.h | 8 --------
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm/4xx_pci.h b/arch/powerpc/include/asm/4xx_pci.h
index a68c8756b1..276a78077d 100644
--- a/arch/powerpc/include/asm/4xx_pci.h
+++ b/arch/powerpc/include/asm/4xx_pci.h
@@ -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
diff --git a/include/common.h b/include/common.h
index 7f9b7863b1..6dd0d2f552 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 06/38] common: Move get_OPB_freq() and get_PCI_freq() to PPC header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (4 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 05/38] common: Move pcie_setup_hoses() to PPC header Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 07/38] api: Add a header for api_init() Simon Glass
` (31 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
These should not be in common.h. Move the to an arch-specific header.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/powerpc/include/asm/ppc4xx.h | 3 +++
include/common.h | 4 ----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include/asm/ppc4xx.h b/arch/powerpc/include/asm/ppc4xx.h
index b8b0ff9f25..30e6559ba4 100644
--- a/arch/powerpc/include/asm/ppc4xx.h
+++ b/arch/powerpc/include/asm/ppc4xx.h
@@ -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 */
diff --git a/include/common.h b/include/common.h
index 6dd0d2f552..8b64407fd1 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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)
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 07/38] api: Add a header for api_init()
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (5 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 06/38] common: Move get_OPB_freq() and get_PCI_freq() " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot,07/38] " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 08/38] gpio: samsung: Drop s3c2440_gpio driver Simon Glass
` (30 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
Put this in its own header instead of using common.h.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/common/board_r.c b/common/board_r.c
index 28f32c3885..df570057b2 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -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>
diff --git a/include/api.h b/include/api.h
new file mode 100644
index 0000000000..85817f3400
--- /dev/null
+++ b/include/api.h
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2017 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __API_H
+#define __API_H
+
+void api_init(void);
+
+#endif
diff --git a/include/common.h b/include/common.h
index 8b64407fd1..fb4e79bb39 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 08/38] gpio: samsung: Drop s3c2440_gpio driver
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (6 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 07/38] api: Add a header for api_init() Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 09/38] samsung: Drop s3c24x0 arch-specific code Simon Glass
` (29 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is no longer used in U-Boot. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/gpio/Makefile | 1 -
drivers/gpio/s3c2440_gpio.c | 88 ---------------------------------------------
2 files changed, 89 deletions(-)
delete mode 100644 drivers/gpio/s3c2440_gpio.c
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 03df558879..8937e99b47 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -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
diff --git a/drivers/gpio/s3c2440_gpio.c b/drivers/gpio/s3c2440_gpio.c
deleted file mode 100644
index d6c7eeb693..0000000000
--- a/drivers/gpio/s3c2440_gpio.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2012
- * Gabriel Huau <contact@huau-gabriel.fr>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-#include <common.h>
-#include <asm/arch/s3c2440.h>
-#include <asm/gpio.h>
-#include <asm/io.h>
-#include <errno.h>
-
-#define GPIO_INPUT 0x0
-#define GPIO_OUTPUT 0x1
-
-#define S3C_GPIO_CON 0x0
-#define S3C_GPIO_DAT 0x4
-
-static uint32_t s3c_gpio_get_bank_addr(unsigned gpio)
-{
- /* There is up to 16 pins per bank, one bank is 0x10 big. */
- uint32_t addr = gpio & ~0xf;
-
- if (addr >= 0x80 && addr != 0xd0) { /* Wrong GPIO bank. */
- printf("Invalid GPIO bank (bank %02x)\n", addr);
- return 0xffffffff;
- }
-
- return addr | S3C24X0_GPIO_BASE;
-}
-
-int gpio_set_value(unsigned gpio, int value)
-{
- uint32_t addr = s3c_gpio_get_bank_addr(gpio);
-
- if (addr == 0xffffffff)
- return -EINVAL;
-
- if (value)
- setbits_le32(addr | S3C_GPIO_DAT, 1 << (gpio & 0xf));
- else
- clrbits_le32(addr | S3C_GPIO_DAT, 1 << (gpio & 0xf));
-
- return 0;
-}
-
-int gpio_get_value(unsigned gpio)
-{
- uint32_t addr = s3c_gpio_get_bank_addr(gpio);
-
- if (addr == 0xffffffff)
- return -EINVAL;
-
- return !!(readl(addr | S3C_GPIO_DAT) & (1 << (gpio & 0xf)));
-}
-
-int gpio_request(unsigned gpio, const char *label)
-{
- return 0;
-}
-
-int gpio_free(unsigned gpio)
-{
- return 0;
-}
-
-static int s3c_gpio_direction(unsigned gpio, uint8_t dir)
-{
- uint32_t addr = s3c_gpio_get_bank_addr(gpio);
- const uint32_t mask = 0x3 << ((gpio & 0xf) << 1);
- const uint32_t dirm = dir << ((gpio & 0xf) << 1);
-
- if (addr == 0xffffffff)
- return -EINVAL;
-
- clrsetbits_le32(addr | S3C_GPIO_CON, mask, dirm);
- return 0;
-}
-
-int gpio_direction_input(unsigned gpio)
-{
- return s3c_gpio_direction(gpio, GPIO_INPUT);
-}
-
-int gpio_direction_output(unsigned gpio, int value)
-{
- return s3c_gpio_direction(gpio, GPIO_OUTPUT);
-}
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 09/38] samsung: Drop s3c24x0 arch-specific code
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (7 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 08/38] gpio: samsung: Drop s3c2440_gpio driver Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
[not found] ` <CALrBrZ2SqS55_hV39B_sijFKEt4E0kb__y34RO9+7+wW9G5wsg@mail.gmail.com>
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver Simon Glass
` (28 subsequent siblings)
37 siblings, 2 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is not used anymore. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/arch/arm/cpu/arm920t/Makefile b/arch/arm/cpu/arm920t/Makefile
index 8faf34b87e..948b764193 100644
--- a/arch/arm/cpu/arm920t/Makefile
+++ b/arch/arm/cpu/arm920t/Makefile
@@ -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
diff --git a/arch/arm/cpu/arm920t/s3c24x0/Makefile b/arch/arm/cpu/arm920t/s3c24x0/Makefile
deleted file mode 100644
index e78f8a017c..0000000000
--- a/arch/arm/cpu/arm920t/s3c24x0/Makefile
+++ /dev/null
@@ -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
diff --git a/arch/arm/cpu/arm920t/s3c24x0/cpu_info.c b/arch/arm/cpu/arm920t/s3c24x0/cpu_info.c
deleted file mode 100644
index fede51a160..0000000000
--- a/arch/arm/cpu/arm920t/s3c24x0/cpu_info.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * (C) Copyright 2010
- * David Mueller <d.mueller@elsoft.ch>
- *
- * 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;
-}
diff --git a/arch/arm/cpu/arm920t/s3c24x0/speed.c b/arch/arm/cpu/arm920t/s3c24x0/speed.c
deleted file mode 100644
index 3701c5d9a3..0000000000
--- a/arch/arm/cpu/arm920t/s3c24x0/speed.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * (C) Copyright 2001-2004
- * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
- *
- * (C) Copyright 2002
- * David Mueller, ELSOFT AG, d.mueller@elsoft.ch
- *
- * 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 */
diff --git a/arch/arm/cpu/arm920t/s3c24x0/timer.c b/arch/arm/cpu/arm920t/s3c24x0/timer.c
deleted file mode 100644
index ba1e616b82..0000000000
--- a/arch/arm/cpu/arm920t/s3c24x0/timer.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Alex Zuepke <azu@sysgo.de>
- *
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-#ifdef CONFIG_S3C24X0
-
-#include <asm/io.h>
-#include <asm/arch/s3c24x0_cpu.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-int timer_init(void)
-{
- struct s3c24x0_timers *timers = s3c24x0_get_base_timers();
- ulong tmr;
-
- /* use PWM Timer 4 because it has no output */
- /* prescaler for Timer 4 is 16 */
- writel(0x0f00, &timers->tcfg0);
- if (gd->arch.tbu == 0) {
- /*
- * for 10 ms clock period @ PCLK with 4 bit divider = 1/2
- * (default) and prescaler = 16. Should be 10390
- * @33.25MHz and 15625 @ 50 MHz
- */
- gd->arch.tbu = get_PCLK() / (2 * 16 * 100);
- gd->arch.timer_rate_hz = get_PCLK() / (2 * 16);
- }
- /* load value for 10 ms timeout */
- writel(gd->arch.tbu, &timers->tcntb4);
- /* auto load, manual update of timer 4 */
- tmr = (readl(&timers->tcon) & ~0x0700000) | 0x0600000;
- writel(tmr, &timers->tcon);
- /* auto load, start timer 4 */
- tmr = (tmr & ~0x0700000) | 0x0500000;
- writel(tmr, &timers->tcon);
- gd->arch.lastinc = 0;
- gd->arch.tbl = 0;
-
- return 0;
-}
-
-/*
- * timer without interrupts
- */
-ulong get_timer(ulong base)
-{
- return get_timer_masked() - base;
-}
-
-void __udelay (unsigned long usec)
-{
- ulong tmo;
- ulong start = get_ticks();
-
- tmo = usec / 1000;
- tmo *= (gd->arch.tbu * 100);
- tmo /= 1000;
-
- while ((ulong) (get_ticks() - start) < tmo)
- /*NOP*/;
-}
-
-ulong get_timer_masked(void)
-{
- ulong tmr = get_ticks();
-
- return tmr / (gd->arch.timer_rate_hz / CONFIG_SYS_HZ);
-}
-
-void udelay_masked(unsigned long usec)
-{
- ulong tmo;
- ulong endtime;
- signed long diff;
-
- if (usec >= 1000) {
- tmo = usec / 1000;
- tmo *= (gd->arch.tbu * 100);
- tmo /= 1000;
- } else {
- tmo = usec * (gd->arch.tbu * 100);
- tmo /= (1000 * 1000);
- }
-
- endtime = get_ticks() + tmo;
-
- do {
- ulong now = get_ticks();
- diff = endtime - now;
- } while (diff >= 0);
-}
-
-/*
- * This function is derived from PowerPC code (read timebase as long long).
- * On ARM it just returns the timer value.
- */
-unsigned long long get_ticks(void)
-{
- struct s3c24x0_timers *timers = s3c24x0_get_base_timers();
- ulong now = readl(&timers->tcnto4) & 0xffff;
-
- if (gd->arch.lastinc >= now) {
- /* normal mode */
- gd->arch.tbl += gd->arch.lastinc - now;
- } else {
- /* we have an overflow ... */
- gd->arch.tbl += gd->arch.lastinc + gd->arch.tbu - now;
- }
- gd->arch.lastinc = now;
-
- return gd->arch.tbl;
-}
-
-/*
- * This function is derived from PowerPC code (timebase clock frequency).
- * On ARM it returns the number of timer ticks per second.
- */
-ulong get_tbclk(void)
-{
- return CONFIG_SYS_HZ;
-}
-
-/*
- * reset the cpu by setting up the watchdog timer and let him time out
- */
-void reset_cpu(ulong ignored)
-{
- struct s3c24x0_watchdog *watchdog;
-
- watchdog = s3c24x0_get_base_watchdog();
-
- /* Disable watchdog */
- writel(0x0000, &watchdog->wtcon);
-
- /* Initialize watchdog timer count register */
- writel(0x0001, &watchdog->wtcnt);
-
- /* Enable watchdog timer; assert reset at timer timeout */
- writel(0x0021, &watchdog->wtcon);
-
- while (1)
- /* loop forever and wait for reset to happen */;
-
- /*NOTREACHED*/
-}
-
-#endif /* CONFIG_S3C24X0 */
diff --git a/arch/arm/include/asm/arch-s3c24x0/gpio.h b/arch/arm/include/asm/arch-s3c24x0/gpio.h
deleted file mode 100644
index a749b6491a..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/gpio.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2012.
- *
- * Gabriel Huau <contact@huau-gabriel.fr>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef _S3C24X0_GPIO_H_
-#define _S3C24X0_GPIO_H_
-
-enum s3c2440_gpio {
- GPA0,
- GPA1,
- GPA2,
- GPA3,
- GPA4,
- GPA5,
- GPA6,
- GPA7,
- GPA8,
- GPA9,
- GPA10,
- GPA11,
- GPA12,
- GPA13,
- GPA14,
- GPA15,
- GPA16,
- GPA17,
- GPA18,
- GPA19,
- GPA20,
- GPA21,
- GPA22,
- GPA23,
- GPA24,
-
- GPB0 = 32,
- GPB1,
- GPB2,
- GPB3,
- GPB4,
- GPB5,
- GPB6,
- GPB7,
- GPB8,
- GPB9,
- GPB10,
-
- GPC0 = 64,
- GPC1,
- GPC2,
- GPC3,
- GPC4,
- GPC5,
- GPC6,
- GPC7,
- GPC8,
- GPC9,
- GPC10,
- GPC11,
- GPC12,
- GPC13,
- GPC14,
- GPC15,
-
- GPD0 = 96,
- GPD1,
- GPD2,
- GPD3,
- GPD4,
- GPD5,
- GPD6,
- GPD7,
- GPD8,
- GPD9,
- GPD10,
- GPD11,
- GPD12,
- GPD13,
- GPD14,
- GPD15,
-
- GPE0 = 128,
- GPE1,
- GPE2,
- GPE3,
- GPE4,
- GPE5,
- GPE6,
- GPE7,
- GPE8,
- GPE9,
- GPE10,
- GPE11,
- GPE12,
- GPE13,
- GPE14,
- GPE15,
-
- GPF0 = 160,
- GPF1,
- GPF2,
- GPF3,
- GPF4,
- GPF5,
- GPF6,
- GPF7,
-
- GPG0 = 192,
- GPG1,
- GPG2,
- GPG3,
- GPG4,
- GPG5,
- GPG6,
- GPG7,
- GPG8,
- GPG9,
- GPG10,
- GPG11,
- GPG12,
- GPG13,
- GPG14,
- GPG15,
-
- GPH0 = 224,
- GPH1,
- GPH2,
- GPH3,
- GPH4,
- GPH5,
- GPH6,
- GPH7,
- GPH8,
- GPH9,
- GPH10,
-
- GPJ0 = 256,
- GPJ1,
- GPJ2,
- GPJ3,
- GPJ4,
- GPJ5,
- GPJ6,
- GPJ7,
- GPJ8,
- GPJ9,
- GPJ10,
- GPJ11,
- GPJ12,
-};
-
-#endif
diff --git a/arch/arm/include/asm/arch-s3c24x0/iomux.h b/arch/arm/include/asm/arch-s3c24x0/iomux.h
deleted file mode 100644
index 981164434d..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/iomux.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 2012
- *
- * Gabriel Huau <contact@huau-gabriel.fr>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef _S3C24X0_IOMUX_H_
-#define _S3C24X0_IOMUX_H_
-
-enum s3c2440_iomux_func {
- /* PORT A */
- IOMUXA_ADDR0 = 1,
- IOMUXA_ADDR16 = (1 << 1),
- IOMUXA_ADDR17 = (1 << 2),
- IOMUXA_ADDR18 = (1 << 3),
- IOMUXA_ADDR19 = (1 << 4),
- IOMUXA_ADDR20 = (1 << 5),
- IOMUXA_ADDR21 = (1 << 6),
- IOMUXA_ADDR22 = (1 << 7),
- IOMUXA_ADDR23 = (1 << 8),
- IOMUXA_ADDR24 = (1 << 9),
- IOMUXA_ADDR25 = (1 << 10),
- IOMUXA_ADDR26 = (1 << 11),
- IOMUXA_nGCS1 = (1 << 12),
- IOMUXA_nGCS2 = (1 << 13),
- IOMUXA_nGCS3 = (1 << 14),
- IOMUXA_nGCS4 = (1 << 15),
- IOMUXA_nGCS5 = (1 << 16),
- IOMUXA_CLE = (1 << 17),
- IOMUXA_ALE = (1 << 18),
- IOMUXA_nFWE = (1 << 19),
- IOMUXA_nFRE = (1 << 20),
- IOMUXA_nRSTOUT = (1 << 21),
- IOMUXA_nFCE = (1 << 22),
-
- /* PORT B */
- IOMUXB_nXDREQ0 = (2 << 20),
- IOMUXB_nXDACK0 = (2 << 18),
- IOMUXB_nXDREQ1 = (2 << 16),
- IOMUXB_nXDACK1 = (2 << 14),
- IOMUXB_nXBREQ = (2 << 12),
- IOMUXB_nXBACK = (2 << 10),
- IOMUXB_TCLK0 = (2 << 8),
- IOMUXB_TOUT3 = (2 << 6),
- IOMUXB_TOUT2 = (2 << 4),
- IOMUXB_TOUT1 = (2 << 2),
- IOMUXB_TOUT0 = 2,
-
- /* PORT C */
- IOMUXC_VS7 = (2 << 30),
- IOMUXC_VS6 = (2 << 28),
- IOMUXC_VS5 = (2 << 26),
- IOMUXC_VS4 = (2 << 24),
- IOMUXC_VS3 = (2 << 22),
- IOMUXC_VS2 = (2 << 20),
- IOMUXC_VS1 = (2 << 18),
- IOMUXC_VS0 = (2 << 16),
- IOMUXC_LCD_LPCREVB = (2 << 14),
- IOMUXC_LCD_LPCREV = (2 << 12),
- IOMUXC_LCD_LPCOE = (2 << 10),
- IOMUXC_VM = (2 << 8),
- IOMUXC_VFRAME = (2 << 6),
- IOMUXC_VLINE = (2 << 4),
- IOMUXC_VCLK = (2 << 2),
- IOMUXC_LEND = 2,
- IOMUXC_I2SSDI = (3 << 8),
-
- /* PORT D */
- IOMUXD_VS23 = (2 << 30),
- IOMUXD_VS22 = (2 << 28),
- IOMUXD_VS21 = (2 << 26),
- IOMUXD_VS20 = (2 << 24),
- IOMUXD_VS19 = (2 << 22),
- IOMUXD_VS18 = (2 << 20),
- IOMUXD_VS17 = (2 << 18),
- IOMUXD_VS16 = (2 << 16),
- IOMUXD_VS15 = (2 << 14),
- IOMUXD_VS14 = (2 << 12),
- IOMUXD_VS13 = (2 << 10),
- IOMUXD_VS12 = (2 << 8),
- IOMUXD_VS11 = (2 << 6),
- IOMUXD_VS10 = (2 << 4),
- IOMUXD_VS9 = (2 << 2),
- IOMUXD_VS8 = 2,
- IOMUXD_nSS0 = (3 << 30),
- IOMUXD_nSS1 = (3 << 28),
- IOMUXD_SPICLK1 = (3 << 20),
- IOMUXD_SPIMOSI1 = (3 << 18),
- IOMUXD_SPIMISO1 = (3 << 16),
-
- /* PORT E */
- IOMUXE_IICSDA = (2 << 30),
- IOMUXE_IICSCL = (2 << 28),
- IOMUXE_SPICLK0 = (2 << 26),
- IOMUXE_SPIMOSI0 = (2 << 24),
- IOMUXE_SPIMISO0 = (2 << 22),
- IOMUXE_SDDAT3 = (2 << 20),
- IOMUXE_SDDAT2 = (2 << 18),
- IOMUXE_SDDAT1 = (2 << 16),
- IOMUXE_SDDAT0 = (2 << 14),
- IOMUXE_SDCMD = (2 << 12),
- IOMUXE_SDCLK = (2 << 10),
- IOMUXE_I2SDO = (2 << 8),
- IOMUXE_I2SDI = (2 << 6),
- IOMUXE_CDCLK = (2 << 4),
- IOMUXE_I2SSCLK = (2 << 2),
- IOMUXE_I2SLRCK = 2,
- IOMUXE_AC_SDATA_OUT = (3 << 8),
- IOMUXE_AC_SDATA_IN = (3 << 6),
- IOMUXE_AC_nRESET = (3 << 4),
- IOMUXE_AC_BIT_CLK = (3 << 2),
- IOMUXE_AC_SYNC = 3,
-
- /* PORT F */
- IOMUXF_EINT7 = (2 << 14),
- IOMUXF_EINT6 = (2 << 12),
- IOMUXF_EINT5 = (2 << 10),
- IOMUXF_EINT4 = (2 << 8),
- IOMUXF_EINT3 = (2 << 6),
- IOMUXF_EINT2 = (2 << 4),
- IOMUXF_EINT1 = (2 << 2),
- IOMUXF_EINT0 = 2,
-
- /* PORT G */
- IOMUXG_EINT23 = (2 << 30),
- IOMUXG_EINT22 = (2 << 28),
- IOMUXG_EINT21 = (2 << 26),
- IOMUXG_EINT20 = (2 << 24),
- IOMUXG_EINT19 = (2 << 22),
- IOMUXG_EINT18 = (2 << 20),
- IOMUXG_EINT17 = (2 << 18),
- IOMUXG_EINT16 = (2 << 16),
- IOMUXG_EINT15 = (2 << 14),
- IOMUXG_EINT14 = (2 << 12),
- IOMUXG_EINT13 = (2 << 10),
- IOMUXG_EINT12 = (2 << 8),
- IOMUXG_EINT11 = (2 << 6),
- IOMUXG_EINT10 = (2 << 4),
- IOMUXG_EINT9 = (2 << 2),
- IOMUXG_EINT8 = 2,
- IOMUXG_TCLK1 = (3 << 22),
- IOMUXG_nCTS1 = (3 << 20),
- IOMUXG_nRTS1 = (3 << 18),
- IOMUXG_SPICLK1 = (3 << 14),
- IOMUXG_SPIMOSI1 = (3 << 12),
- IOMUXG_SPIMISO1 = (3 << 10),
- IOMUXG_LCD_PWRDN = (3 << 8),
- IOMUXG_nSS1 = (3 << 6),
- IOMUXG_nSS0 = (3 << 4),
-
- /* PORT H */
- IOMUXH_CLKOUT1 = (2 << 20),
- IOMUXH_CLKOUT0 = (2 << 18),
- IOMUXH_UEXTCLK = (2 << 16),
- IOMUXH_RXD2 = (2 << 14),
- IOMUXH_TXD2 = (2 << 12),
- IOMUXH_RXD1 = (2 << 10),
- IOMUXH_TXD1 = (2 << 8),
- IOMUXH_RXD0 = (2 << 6),
- IOMUXH_TXD0 = (2 << 4),
- IOMUXH_nRTS0 = (2 << 2),
- IOMUXH_nCTS0 = 2,
- IOMUXH_nCTS1 = (3 << 14),
- IOMUXH_nRTS1 = (3 << 12),
-
- /* PORT J */
- IOMUXJ_CAMRESET = (2 << 24),
- IOMUXJ_CAMCLKOUT = (2 << 22),
- IOMUXJ_CAMHREF = (2 << 20),
- IOMUXJ_CAMVSYNC = (2 << 18),
- IOMUXJ_CAMPCLK = (2 << 16),
- IOMUXJ_CAMDATA7 = (2 << 14),
- IOMUXJ_CAMDATA6 = (2 << 12),
- IOMUXJ_CAMDATA5 = (2 << 10),
- IOMUXJ_CAMDATA4 = (2 << 8),
- IOMUXJ_CAMDATA3 = (2 << 6),
- IOMUXJ_CAMDATA2 = (2 << 4),
- IOMUXJ_CAMDATA1 = (2 << 2),
- IOMUXJ_CAMDATA0 = 2
-};
-
-#endif
diff --git a/arch/arm/include/asm/arch-s3c24x0/memory.h b/arch/arm/include/asm/arch-s3c24x0/memory.h
deleted file mode 100644
index d6a787b663..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/memory.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * linux/include/asm-arm/arch-s3c2400/memory.h by garyj at denx.de
- * based on
- * linux/include/asm-arm/arch-sa1100/memory.h
- *
- * Copyright (c) 1999 Nicolas Pitre <nico@visuaide.com>
- */
-
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-
-/*
- * Task size: 3GB
- */
-#define TASK_SIZE (0xc0000000UL)
-#define TASK_SIZE_26 (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET (0xc0000000UL)
-
-/*
- * Physical DRAM offset is 0x0c000000 on the S3C2400
- */
-#define PHYS_OFFSET (0x0c000000UL)
-
-/* Modified for S3C2400, by chc, 20010509 */
-#define RAM_IN_BANK_0 32*1024*1024
-#define RAM_IN_BANK_1 0
-#define RAM_IN_BANK_2 0
-#define RAM_IN_BANK_3 0
-
-#define MEM_SIZE (RAM_IN_BANK_0+RAM_IN_BANK_1+RAM_IN_BANK_2+RAM_IN_BANK_3)
-
-
-/* translation macros */
-#define __virt_to_phys__is_a_macro
-#define __phys_to_virt__is_a_macro
-
-#if (RAM_IN_BANK_1 + RAM_IN_BANK_2 + RAM_IN_BANK_3 == 0)
-
-#define __virt_to_phys(x) ( (x) - PAGE_OFFSET + 0x0c000000 )
-#define __phys_to_virt(x) ( (x) - 0x0c000000 + PAGE_OFFSET )
-
-#elif (RAM_IN_BANK_0 == RAM_IN_BANK_1) && \
- (RAM_IN_BANK_2 + RAM_IN_BANK_3 == 0)
-
-/* Two identical banks */
-#define __virt_to_phys(x) \
- ( ((x) < PAGE_OFFSET+RAM_IN_BANK_0) ? \
- ((x) - PAGE_OFFSET + _DRAMBnk0) : \
- ((x) - PAGE_OFFSET - RAM_IN_BANK_0 + _DRAMBnk1) )
-#define __phys_to_virt(x) \
- ( ((x)&0x07ffffff) + \
- (((x)&0x08000000) ? PAGE_OFFSET+RAM_IN_BANK_0 : PAGE_OFFSET) )
-#else
-
-/* It's more efficient for all other cases to use the function call */
-#undef __virt_to_phys__is_a_macro
-#undef __phys_to_virt__is_a_macro
-extern unsigned long __virt_to_phys(unsigned long vpage);
-extern unsigned long __phys_to_virt(unsigned long ppage);
-
-#endif
-
-/*
- * Virtual view <-> DMA view memory address translations
- * virt_to_bus: Used to translate the virtual address to an
- * address suitable to be passed to set_dma_addr
- * bus_to_virt: Used to convert an address for DMA operations
- * to an address that the kernel can use.
- *
- * On the SA1100, bus addresses are equivalent to physical addresses.
- */
-#define __virt_to_bus__is_a_macro
-#define __virt_to_bus(x) __virt_to_phys(x)
-#define __bus_to_virt__is_a_macro
-#define __bus_to_virt(x) __phys_to_virt(x)
-
-
-#ifdef CONFIG_DISCONTIGMEM
-#error "CONFIG_DISCONTIGMEM will not work on S3C2400"
-/*
- * Because of the wide memory address space between physical RAM banks on 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 */
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2400.h b/arch/arm/include/asm/arch-s3c24x0/s3c2400.h
deleted file mode 100644
index 2389118e7a..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2400.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Müller ELSOFT AG Switzerland. d.mueller at elsoft.ch
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/************************************************
- * NAME : s3c2400.h
- * Version : 31.3.2003
- *
- * Based on S3C2400X User's manual Rev 1.1
- ************************************************/
-
-#ifndef __S3C2400_H__
-#define __S3C2400_H__
-
-#define S3C24X0_UART_CHANNELS 2
-#define S3C24X0_SPI_CHANNELS 1
-#define PALETTE (0x14A00400) /* SJS */
-
-enum s3c24x0_uarts_nr {
- S3C24X0_UART0,
- S3C24X0_UART1,
-};
-
-/*S3C2400 device base addresses */
-#define S3C24X0_MEMCTL_BASE 0x14000000
-#define S3C24X0_USB_HOST_BASE 0x14200000
-#define S3C24X0_INTERRUPT_BASE 0x14400000
-#define S3C24X0_DMA_BASE 0x14600000
-#define S3C24X0_CLOCK_POWER_BASE 0x14800000
-#define S3C24X0_LCD_BASE 0x14A00000
-#define S3C24X0_UART_BASE 0x15000000
-#define S3C24X0_TIMER_BASE 0x15100000
-#define S3C24X0_USB_DEVICE_BASE 0x15200140
-#define S3C24X0_WATCHDOG_BASE 0x15300000
-#define S3C24X0_I2C_BASE 0x15400000
-#define S3C24X0_I2S_BASE 0x15508000
-#define S3C24X0_GPIO_BASE 0x15600000
-#define S3C24X0_RTC_BASE 0x15700000
-#define S3C24X0_ADC_BASE 0x15800000
-#define S3C24X0_SPI_BASE 0x15900000
-#define S3C2400_MMC_BASE 0x15A00000
-
-/* include common stuff */
-#include <asm/arch/s3c24x0.h>
-
-
-static inline struct s3c24x0_memctl *s3c24x0_get_base_memctl(void)
-{
- return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
-}
-
-static inline struct s3c24x0_usb_host *s3c24x0_get_base_usb_host(void)
-{
- return (struct s3c24x0_usb_host *)S3C24X0_USB_HOST_BASE;
-}
-
-static inline struct s3c24x0_interrupt *s3c24x0_get_base_interrupt(void)
-{
- return (struct s3c24x0_interrupt *)S3C24X0_INTERRUPT_BASE;
-}
-
-static inline struct s3c24x0_dmas *s3c24x0_get_base_dmas(void)
-{
- return (struct s3c24x0_dmas *)S3C24X0_DMA_BASE;
-}
-
-static inline struct s3c24x0_clock_power *s3c24x0_get_base_clock_power(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__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
deleted file mode 100644
index 8773ce30d1..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Müller ELSOFT AG Switzerland. d.mueller at elsoft.ch
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/************************************************
- * NAME : s3c2410.h
- * Version : 31.3.2003
- *
- * Based on S3C2410X User's manual Rev 1.1
- ************************************************/
-
-#ifndef __S3C2410_H__
-#define __S3C2410_H__
-
-#define S3C24X0_UART_CHANNELS 3
-#define S3C24X0_SPI_CHANNELS 2
-
-/* S3C2410 only supports 512 Byte HW ECC */
-#define S3C2410_ECCSIZE 512
-#define S3C2410_ECCBYTES 3
-
-enum s3c24x0_uarts_nr {
- S3C24X0_UART0,
- S3C24X0_UART1,
- S3C24X0_UART2
-};
-
-/* S3C2410 device base addresses */
-#define S3C24X0_MEMCTL_BASE 0x48000000
-#define S3C24X0_USB_HOST_BASE 0x49000000
-#define S3C24X0_INTERRUPT_BASE 0x4A000000
-#define S3C24X0_DMA_BASE 0x4B000000
-#define S3C24X0_CLOCK_POWER_BASE 0x4C000000
-#define S3C24X0_LCD_BASE 0x4D000000
-#define S3C2410_NAND_BASE 0x4E000000
-#define S3C24X0_UART_BASE 0x50000000
-#define S3C24X0_TIMER_BASE 0x51000000
-#define S3C24X0_USB_DEVICE_BASE 0x52000140
-#define S3C24X0_WATCHDOG_BASE 0x53000000
-#define S3C24X0_I2C_BASE 0x54000000
-#define S3C24X0_I2S_BASE 0x55000000
-#define S3C24X0_GPIO_BASE 0x56000000
-#define S3C24X0_RTC_BASE 0x57000000
-#define S3C2410_ADC_BASE 0x58000000
-#define S3C24X0_SPI_BASE 0x59000000
-#define S3C2410_SDI_BASE 0x5A000000
-
-
-/* include common stuff */
-#include <asm/arch/s3c24x0.h>
-
-
-static inline struct s3c24x0_memctl *s3c24x0_get_base_memctl(void)
-{
- return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
-}
-
-static inline struct s3c24x0_usb_host *s3c24x0_get_base_usb_host(void)
-{
- return (struct s3c24x0_usb_host *)S3C24X0_USB_HOST_BASE;
-}
-
-static inline struct s3c24x0_interrupt *s3c24x0_get_base_interrupt(void)
-{
- return (struct s3c24x0_interrupt *)S3C24X0_INTERRUPT_BASE;
-}
-
-static inline struct s3c24x0_dmas *s3c24x0_get_base_dmas(void)
-{
- return (struct s3c24x0_dmas *)S3C24X0_DMA_BASE;
-}
-
-static inline struct s3c24x0_clock_power *s3c24x0_get_base_clock_power(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__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
deleted file mode 100644
index 7a525f2818..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Mueller ELSOFT AG Switzerland. d.mueller at elsoft.ch
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/************************************************
- * NAME : s3c2440.h
- * Version : 31.3.2003
- *
- * Based on S3C2440 User's manual Rev x.x
- ************************************************/
-
-#ifndef __S3C2440_H__
-#define __S3C2440_H__
-
-#define S3C24X0_UART_CHANNELS 3
-#define S3C24X0_SPI_CHANNELS 2
-
-/* S3C2440 only supports 512 Byte HW ECC */
-#define S3C2440_ECCSIZE 512
-#define S3C2440_ECCBYTES 3
-
-enum s3c24x0_uarts_nr {
- S3C24X0_UART0,
- S3C24X0_UART1,
- S3C24X0_UART2
-};
-
-/* S3C2440 device base addresses */
-#define S3C24X0_MEMCTL_BASE 0x48000000
-#define S3C24X0_USB_HOST_BASE 0x49000000
-#define S3C24X0_INTERRUPT_BASE 0x4A000000
-#define S3C24X0_DMA_BASE 0x4B000000
-#define S3C24X0_CLOCK_POWER_BASE 0x4C000000
-#define S3C24X0_LCD_BASE 0x4D000000
-#define S3C2440_NAND_BASE 0x4E000000
-#define S3C24X0_UART_BASE 0x50000000
-#define S3C24X0_TIMER_BASE 0x51000000
-#define S3C24X0_USB_DEVICE_BASE 0x52000140
-#define S3C24X0_WATCHDOG_BASE 0x53000000
-#define S3C24X0_I2C_BASE 0x54000000
-#define S3C24X0_I2S_BASE 0x55000000
-#define S3C24X0_GPIO_BASE 0x56000000
-#define S3C24X0_RTC_BASE 0x57000000
-#define S3C2440_ADC_BASE 0x58000000
-#define S3C24X0_SPI_BASE 0x59000000
-#define S3C2440_SDI_BASE 0x5A000000
-
-/* include common stuff */
-#include <asm/arch/s3c24x0.h>
-
-static inline struct s3c24x0_memctl *s3c24x0_get_base_memctl(void)
-{
- return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
-}
-
-static inline struct s3c24x0_usb_host *s3c24x0_get_base_usb_host(void)
-{
- return (struct s3c24x0_usb_host *)S3C24X0_USB_HOST_BASE;
-}
-
-static inline struct s3c24x0_interrupt *s3c24x0_get_base_interrupt(void)
-{
- return (struct s3c24x0_interrupt *)S3C24X0_INTERRUPT_BASE;
-}
-
-static inline struct s3c24x0_dmas *s3c24x0_get_base_dmas(void)
-{
- return (struct s3c24x0_dmas *)S3C24X0_DMA_BASE;
-}
-
-static inline struct s3c24x0_clock_power *s3c24x0_get_base_clock_power(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__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
deleted file mode 100644
index 2dae9fc3d7..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Müller ELSOFT AG Switzerland. d.mueller at elsoft.ch
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/************************************************
- * NAME : s3c24x0.h
- * Version : 31.3.2003
- *
- * common stuff for SAMSUNG S3C24X0 SoC
- ************************************************/
-
-#ifndef __S3C24X0_H__
-#define __S3C24X0_H__
-
-/* Memory controller (see manual chapter 5) */
-struct s3c24x0_memctl {
- u32 bwscon;
- u32 bankcon[8];
- u32 refresh;
- u32 banksize;
- u32 mrsrb6;
- u32 mrsrb7;
-};
-
-
-/* USB HOST (see manual chapter 12) */
-struct s3c24x0_usb_host {
- u32 HcRevision;
- u32 HcControl;
- u32 HcCommonStatus;
- u32 HcInterruptStatus;
- u32 HcInterruptEnable;
- u32 HcInterruptDisable;
- u32 HcHCCA;
- u32 HcPeriodCuttendED;
- u32 HcControlHeadED;
- u32 HcControlCurrentED;
- u32 HcBulkHeadED;
- u32 HcBuldCurrentED;
- u32 HcDoneHead;
- u32 HcRmInterval;
- u32 HcFmRemaining;
- u32 HcFmNumber;
- u32 HcPeriodicStart;
- u32 HcLSThreshold;
- u32 HcRhDescriptorA;
- u32 HcRhDescriptorB;
- u32 HcRhStatus;
- u32 HcRhPortStatus1;
- u32 HcRhPortStatus2;
-};
-
-
-/* INTERRUPT (see manual chapter 14) */
-struct s3c24x0_interrupt {
- u32 srcpnd;
- u32 intmod;
- u32 intmsk;
- u32 priority;
- u32 intpnd;
- u32 intoffset;
-#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
- u32 subsrcpnd;
- u32 intsubmsk;
-#endif
-};
-
-
-/* DMAS (see manual chapter 8) */
-struct s3c24x0_dma {
- u32 disrc;
-#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
- u32 disrcc;
-#endif
- u32 didst;
-#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
- u32 didstc;
-#endif
- u32 dcon;
- u32 dstat;
- u32 dcsrc;
- u32 dcdst;
- u32 dmasktrig;
-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) \
- || defined(CONFIG_S3C2440)
- u32 res[1];
-#endif
-};
-
-struct s3c24x0_dmas {
- struct s3c24x0_dma dma[4];
-};
-
-
-/* CLOCK & POWER MANAGEMENT (see S3C2400 manual chapter 6) */
-/* (see S3C2410 manual chapter 7) */
-struct s3c24x0_clock_power {
- u32 locktime;
- u32 mpllcon;
- u32 upllcon;
- u32 clkcon;
- u32 clkslow;
- u32 clkdivn;
-#if defined(CONFIG_S3C2440)
- u32 camdivn;
-#endif
-};
-
-
-/* LCD CONTROLLER (see manual chapter 15) */
-struct s3c24x0_lcd {
- u32 lcdcon1;
- u32 lcdcon2;
- u32 lcdcon3;
- u32 lcdcon4;
- u32 lcdcon5;
- u32 lcdsaddr1;
- u32 lcdsaddr2;
- u32 lcdsaddr3;
- u32 redlut;
- u32 greenlut;
- u32 bluelut;
- u32 res[8];
- u32 dithmode;
- u32 tpal;
-#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
- u32 lcdintpnd;
- u32 lcdsrcpnd;
- u32 lcdintmsk;
- u32 lpcsel;
-#endif
-};
-
-
-/* NAND FLASH (see manual chapter 6) */
-struct s3c24x0_nand {
- u32 nfconf;
-#ifndef CONFIG_S3C2410
- u32 nfcont;
-#endif
- u32 nfcmd;
- u32 nfaddr;
- u32 nfdata;
-#ifndef CONFIG_S3C2410
- u32 nfeccd0;
- u32 nfeccd1;
- u32 nfeccd;
-#endif
- u32 nfstat;
-#ifdef CONFIG_S3C2410
- u32 nfecc;
-#else
- u32 nfstat0;
- u32 nfstat1;
- u32 nfmecc0;
- u32 nfmecc1;
- u32 nfsecc;
- u32 nfsblk;
- u32 nfeblk;
-#endif
-};
-
-/* UART (see manual chapter 11) */
-struct s3c24x0_uart {
- u32 ulcon;
- u32 ucon;
- u32 ufcon;
- u32 umcon;
- u32 utrstat;
- u32 uerstat;
- u32 ufstat;
- u32 umstat;
-#ifdef __BIG_ENDIAN
- u8 res1[3];
- u8 utxh;
- u8 res2[3];
- u8 urxh;
-#else /* Little Endian */
- u8 utxh;
- u8 res1[3];
- u8 urxh;
- u8 res2[3];
-#endif
- u32 ubrdiv;
-};
-
-
-/* PWM TIMER (see manual chapter 10) */
-struct s3c24x0_timer {
- u32 tcntb;
- u32 tcmpb;
- u32 tcnto;
-};
-
-struct s3c24x0_timers {
- u32 tcfg0;
- u32 tcfg1;
- u32 tcon;
- struct s3c24x0_timer ch[4];
- u32 tcntb4;
- u32 tcnto4;
-};
-
-
-/* USB DEVICE (see manual chapter 13) */
-struct s3c24x0_usb_dev_fifos {
-#ifdef __BIG_ENDIAN
- u8 res[3];
- u8 ep_fifo_reg;
-#else /* little endian */
- u8 ep_fifo_reg;
- u8 res[3];
-#endif
-};
-
-struct s3c24x0_usb_dev_dmas {
-#ifdef __BIG_ENDIAN
- u8 res1[3];
- u8 ep_dma_con;
- u8 res2[3];
- u8 ep_dma_unit;
- u8 res3[3];
- u8 ep_dma_fifo;
- u8 res4[3];
- u8 ep_dma_ttc_l;
- u8 res5[3];
- u8 ep_dma_ttc_m;
- u8 res6[3];
- u8 ep_dma_ttc_h;
-#else /* little endian */
- u8 ep_dma_con;
- u8 res1[3];
- u8 ep_dma_unit;
- u8 res2[3];
- u8 ep_dma_fifo;
- u8 res3[3];
- u8 ep_dma_ttc_l;
- u8 res4[3];
- u8 ep_dma_ttc_m;
- u8 res5[3];
- u8 ep_dma_ttc_h;
- u8 res6[3];
-#endif
-};
-
-struct s3c24x0_usb_device {
-#ifdef __BIG_ENDIAN
- u8 res1[3];
- u8 func_addr_reg;
- u8 res2[3];
- u8 pwr_reg;
- u8 res3[3];
- u8 ep_int_reg;
- u8 res4[15];
- u8 usb_int_reg;
- u8 res5[3];
- u8 ep_int_en_reg;
- u8 res6[15];
- u8 usb_int_en_reg;
- u8 res7[3];
- u8 frame_num1_reg;
- u8 res8[3];
- u8 frame_num2_reg;
- u8 res9[3];
- u8 index_reg;
- u8 res10[7];
- u8 maxp_reg;
- u8 res11[3];
- u8 ep0_csr_in_csr1_reg;
- u8 res12[3];
- u8 in_csr2_reg;
- u8 res13[7];
- u8 out_csr1_reg;
- u8 res14[3];
- u8 out_csr2_reg;
- u8 res15[3];
- u8 out_fifo_cnt1_reg;
- u8 res16[3];
- u8 out_fifo_cnt2_reg;
-#else /* little endian */
- u8 func_addr_reg;
- u8 res1[3];
- u8 pwr_reg;
- u8 res2[3];
- u8 ep_int_reg;
- u8 res3[15];
- u8 usb_int_reg;
- u8 res4[3];
- u8 ep_int_en_reg;
- u8 res5[15];
- u8 usb_int_en_reg;
- u8 res6[3];
- u8 frame_num1_reg;
- u8 res7[3];
- u8 frame_num2_reg;
- u8 res8[3];
- u8 index_reg;
- u8 res9[7];
- u8 maxp_reg;
- u8 res10[7];
- u8 ep0_csr_in_csr1_reg;
- u8 res11[3];
- u8 in_csr2_reg;
- u8 res12[3];
- u8 out_csr1_reg;
- u8 res13[7];
- u8 out_csr2_reg;
- u8 res14[3];
- u8 out_fifo_cnt1_reg;
- u8 res15[3];
- u8 out_fifo_cnt2_reg;
- u8 res16[3];
-#endif /* __BIG_ENDIAN */
- struct s3c24x0_usb_dev_fifos fifo[5];
- struct s3c24x0_usb_dev_dmas dma[5];
-};
-
-
-/* WATCH DOG TIMER (see manual chapter 18) */
-struct s3c24x0_watchdog {
- u32 wtcon;
- u32 wtdat;
- u32 wtcnt;
-};
-
-/* IIS (see manual chapter 21) */
-struct s3c24x0_i2s {
-#ifdef __BIG_ENDIAN
- u16 res1;
- u16 iiscon;
- u16 res2;
- u16 iismod;
- u16 res3;
- u16 iispsr;
- u16 res4;
- u16 iisfcon;
- u16 res5;
- u16 iisfifo;
-#else /* little endian */
- u16 iiscon;
- u16 res1;
- u16 iismod;
- u16 res2;
- u16 iispsr;
- u16 res3;
- u16 iisfcon;
- u16 res4;
- u16 iisfifo;
- u16 res5;
-#endif
-};
-
-
-/* I/O PORT (see manual chapter 9) */
-struct s3c24x0_gpio {
-#ifdef CONFIG_S3C2400
- u32 pacon;
- u32 padat;
-
- u32 pbcon;
- u32 pbdat;
- u32 pbup;
-
- u32 pccon;
- u32 pcdat;
- u32 pcup;
-
- u32 pdcon;
- u32 pddat;
- u32 pdup;
-
- u32 pecon;
- u32 pedat;
- u32 peup;
-
- u32 pfcon;
- u32 pfdat;
- u32 pfup;
-
- u32 pgcon;
- u32 pgdat;
- u32 pgup;
-
- u32 opencr;
-
- u32 misccr;
- u32 extint;
-#endif
-#ifdef CONFIG_S3C2410
- u32 gpacon;
- u32 gpadat;
- u32 res1[2];
- u32 gpbcon;
- u32 gpbdat;
- u32 gpbup;
- u32 res2;
- u32 gpccon;
- u32 gpcdat;
- u32 gpcup;
- u32 res3;
- u32 gpdcon;
- u32 gpddat;
- u32 gpdup;
- u32 res4;
- u32 gpecon;
- u32 gpedat;
- u32 gpeup;
- u32 res5;
- u32 gpfcon;
- u32 gpfdat;
- u32 gpfup;
- u32 res6;
- u32 gpgcon;
- u32 gpgdat;
- u32 gpgup;
- u32 res7;
- u32 gphcon;
- u32 gphdat;
- u32 gphup;
- u32 res8;
-
- u32 misccr;
- u32 dclkcon;
- u32 extint0;
- u32 extint1;
- u32 extint2;
- u32 eintflt0;
- u32 eintflt1;
- u32 eintflt2;
- u32 eintflt3;
- u32 eintmask;
- u32 eintpend;
- u32 gstatus0;
- u32 gstatus1;
- u32 gstatus2;
- u32 gstatus3;
- u32 gstatus4;
-#endif
-#if defined(CONFIG_S3C2440)
- u32 gpacon;
- u32 gpadat;
- u32 res1[2];
- u32 gpbcon;
- u32 gpbdat;
- u32 gpbup;
- u32 res2;
- u32 gpccon;
- u32 gpcdat;
- u32 gpcup;
- u32 res3;
- u32 gpdcon;
- u32 gpddat;
- u32 gpdup;
- u32 res4;
- u32 gpecon;
- u32 gpedat;
- u32 gpeup;
- u32 res5;
- u32 gpfcon;
- u32 gpfdat;
- u32 gpfup;
- u32 res6;
- u32 gpgcon;
- u32 gpgdat;
- u32 gpgup;
- u32 res7;
- u32 gphcon;
- u32 gphdat;
- u32 gphup;
- u32 res8;
-
- u32 misccr;
- u32 dclkcon;
- u32 extint0;
- u32 extint1;
- u32 extint2;
- u32 eintflt0;
- u32 eintflt1;
- u32 eintflt2;
- u32 eintflt3;
- u32 eintmask;
- u32 eintpend;
- u32 gstatus0;
- u32 gstatus1;
- u32 gstatus2;
- u32 gstatus3;
- u32 gstatus4;
-
- u32 res9;
- u32 dsc0;
- u32 dsc1;
- u32 mslcon;
- u32 gpjcon;
- u32 gpjdat;
- u32 gpjup;
- u32 res10;
-#endif
-};
-
-
-/* RTC (see manual chapter 17) */
-struct s3c24x0_rtc {
-#ifdef __BIG_ENDIAN
- u8 res1[67];
- u8 rtccon;
- u8 res2[3];
- u8 ticnt;
- u8 res3[11];
- u8 rtcalm;
- u8 res4[3];
- u8 almsec;
- u8 res5[3];
- u8 almmin;
- u8 res6[3];
- u8 almhour;
- u8 res7[3];
- u8 almdate;
- u8 res8[3];
- u8 almmon;
- u8 res9[3];
- u8 almyear;
- u8 res10[3];
- u8 rtcrst;
- u8 res11[3];
- u8 bcdsec;
- u8 res12[3];
- u8 bcdmin;
- u8 res13[3];
- u8 bcdhour;
- u8 res14[3];
- u8 bcddate;
- u8 res15[3];
- u8 bcdday;
- u8 res16[3];
- u8 bcdmon;
- u8 res17[3];
- u8 bcdyear;
-#else /* little endian */
- u8 res0[64];
- u8 rtccon;
- u8 res1[3];
- u8 ticnt;
- u8 res2[11];
- u8 rtcalm;
- u8 res3[3];
- u8 almsec;
- u8 res4[3];
- u8 almmin;
- u8 res5[3];
- u8 almhour;
- u8 res6[3];
- u8 almdate;
- u8 res7[3];
- u8 almmon;
- u8 res8[3];
- u8 almyear;
- u8 res9[3];
- u8 rtcrst;
- u8 res10[3];
- u8 bcdsec;
- u8 res11[3];
- u8 bcdmin;
- u8 res12[3];
- u8 bcdhour;
- u8 res13[3];
- u8 bcddate;
- u8 res14[3];
- u8 bcdday;
- u8 res15[3];
- u8 bcdmon;
- u8 res16[3];
- u8 bcdyear;
- u8 res17[3];
-#endif
-};
-
-
-/* ADC (see manual chapter 16) */
-struct s3c2400_adc {
- u32 adccon;
- u32 adcdat;
-};
-
-
-/* ADC (see manual chapter 16) */
-struct s3c2410_adc {
- u32 adccon;
- u32 adctsc;
- u32 adcdly;
- u32 adcdat0;
- u32 adcdat1;
-};
-
-
-/* SPI (see manual chapter 22) */
-struct s3c24x0_spi_channel {
- u8 spcon;
- u8 res1[3];
- u8 spsta;
- u8 res2[3];
- u8 sppin;
- u8 res3[3];
- u8 sppre;
- u8 res4[3];
- u8 sptdat;
- u8 res5[3];
- u8 sprdat;
- u8 res6[3];
- u8 res7[16];
-};
-
-struct s3c24x0_spi {
- struct s3c24x0_spi_channel ch[S3C24X0_SPI_CHANNELS];
-};
-
-
-/* MMC INTERFACE (see S3C2400 manual chapter 19) */
-struct s3c2400_mmc {
-#ifdef __BIG_ENDIAN
- u8 res1[3];
- u8 mmcon;
- u8 res2[3];
- u8 mmcrr;
- u8 res3[3];
- u8 mmfcon;
- u8 res4[3];
- u8 mmsta;
- u16 res5;
- u16 mmfsta;
- u8 res6[3];
- u8 mmpre;
- u16 res7;
- u16 mmlen;
- u8 res8[3];
- u8 mmcr7;
- u32 mmrsp[4];
- u8 res9[3];
- u8 mmcmd0;
- u32 mmcmd1;
- u16 res10;
- u16 mmcr16;
- u8 res11[3];
- u8 mmdat;
-#else
- u8 mmcon;
- u8 res1[3];
- u8 mmcrr;
- u8 res2[3];
- u8 mmfcon;
- u8 res3[3];
- u8 mmsta;
- u8 res4[3];
- u16 mmfsta;
- u16 res5;
- u8 mmpre;
- u8 res6[3];
- u16 mmlen;
- u16 res7;
- u8 mmcr7;
- u8 res8[3];
- u32 mmrsp[4];
- u8 mmcmd0;
- u8 res9[3];
- u32 mmcmd1;
- u16 mmcr16;
- u16 res10;
- u8 mmdat;
- u8 res11[3];
-#endif
-};
-
-
-/* SD INTERFACE (see S3C2410 manual chapter 19) */
-struct s3c24x0_sdi {
- u32 sdicon;
- u32 sdipre;
- u32 sdicarg;
- u32 sdiccon;
- u32 sdicsta;
- u32 sdirsp0;
- u32 sdirsp1;
- u32 sdirsp2;
- u32 sdirsp3;
- u32 sdidtimer;
- u32 sdibsize;
- u32 sdidcon;
- u32 sdidcnt;
- u32 sdidsta;
- u32 sdifsta;
-#ifdef CONFIG_S3C2410
- u32 sdidat;
- u32 sdiimsk;
-#else
- u32 sdiimsk;
- u32 sdidat;
-#endif
-};
-
-#ifdef CONFIG_CMD_MMC
-#include <mmc.h>
-int s3cmmc_initialize(bd_t *bis, int (*getcd)(struct mmc *),
- int (*getwp)(struct mmc *));
-#endif
-
-#endif /*__S3C24X0_H__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h b/arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
deleted file mode 100644
index 393cc9d9fd..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
+++ /dev/null
@@ -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
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (8 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 09/38] samsung: Drop s3c24x0 arch-specific code Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-05-22 2:08 ` Minkyu Kang
` (2 more replies)
2017-05-17 14:22 ` [U-Boot] [PATCH 11/38] samsung: usb: Drop ohci-s3c24xx driver Simon Glass
` (27 subsequent siblings)
37 siblings, 3 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is no-longer used in U-Boot. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index a078649899..2d781c38a6 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -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
diff --git a/drivers/mmc/s3c_sdi.c b/drivers/mmc/s3c_sdi.c
deleted file mode 100644
index faf7b83a14..0000000000
--- a/drivers/mmc/s3c_sdi.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * S3C24xx SD/MMC driver
- *
- * Based on OpenMoko S3C24xx driver by Harald Welte <laforge@openmoko.org>
- *
- * Copyright (C) 2014 Marek Vasut <marex@denx.de>
- *
- * 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,
- * @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;
-}
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index fa9c3fc8cb..dd7b328d8f 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 11/38] samsung: usb: Drop ohci-s3c24xx driver
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (9 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
[not found] ` <CALrBrZ3_833sZmpswnL-dSx_yRXUkVJAU06ZhWR1WBAGC1C66A@mail.gmail.com>
2017-06-06 0:18 ` [U-Boot] [U-Boot,11/38] " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 12/38] samsung: nand: Drop s3c2410_nand driver Simon Glass
` (26 subsequent siblings)
37 siblings, 2 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is not used anymore. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index bf354fe8d5..2baec721fd 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -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
diff --git a/drivers/usb/host/ohci-s3c24xx.c b/drivers/usb/host/ohci-s3c24xx.c
deleted file mode 100644
index 28b9ab5176..0000000000
--- a/drivers/usb/host/ohci-s3c24xx.c
+++ /dev/null
@@ -1,1688 +0,0 @@
-/*
- * URB OHCI HCD (Host Controller Driver) for USB on the S3C2400.
- *
- * (C) Copyright 2003
- * Gary Jennejohn, DENX Software Engineering <garyj@denx.de>
- *
- * Note: Much of this code has been derived from Linux 2.4
- * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
- * (C) Copyright 2000-2002 David Brownell
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-/*
- * IMPORTANT NOTES
- * 1 - this driver is intended for use with USB Mass Storage Devices
- * (BBB) ONLY. There is NO support for Interrupt or Isochronous pipes!
- */
-
-#include <common.h>
-/* #include <pci.h> no PCI on the S3C24X0 */
-
-#if defined(CONFIG_USB_OHCI) && defined(CONFIG_S3C24X0)
-
-#include <asm/arch/s3c24x0_cpu.h>
-#include <asm/io.h>
-#include <malloc.h>
-#include <usb.h>
-#include "ohci-s3c24xx.h"
-
-#define OHCI_USE_NPS /* force NoPowerSwitching mode */
-#undef OHCI_VERBOSE_DEBUG /* not always helpful */
-
-
-/* For initializing controller (mask in an HCFS mode too) */
-#define OHCI_CONTROL_INIT \
- (OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
-
-#undef DEBUG
-#ifdef DEBUG
-#define dbg(format, arg...) printf("DEBUG: " format "\n", ## arg)
-#else
-#define dbg(format, arg...) do {} while(0)
-#endif /* DEBUG */
-#define err(format, arg...) printf("ERROR: " format "\n", ## arg)
-#undef SHOW_INFO
-#ifdef SHOW_INFO
-#define info(format, arg...) printf("INFO: " format "\n", ## arg)
-#else
-#define info(format, arg...) do {} while(0)
-#endif
-
-#define m16_swap(x) swap_16(x)
-#define m32_swap(x) swap_32(x)
-
-/* global struct ohci */
-static struct ohci gohci;
-/* this must be aligned to a 256 byte boundary */
-struct ohci_hcca ghcca[1];
-/* a pointer to the aligned storage */
-struct ohci_hcca *phcca;
-/* this allocates EDs for all possible endpoints */
-struct ohci_device ohci_dev;
-/* urb_priv */
-struct urb_priv urb_priv;
-/* RHSC flag */
-int got_rhsc;
-/* device which was disconnected */
-struct usb_device *devgone;
-/* flag guarding URB transation */
-int urb_finished = 0;
-
-/*-------------------------------------------------------------------------*/
-
-/* AMD-756 (D2 rev) reports corrupt register contents in some cases.
- * The erratum (#4) description is incorrect. AMD's workaround waits
- * till some bits (mostly reserved) are clear; ok for all revs.
- */
-#define OHCI_QUIRK_AMD756 0xabcd
-#define read_roothub(hc, register, mask) ({ \
- u32 temp = readl (&hc->regs->roothub.register); \
- if (hc->flags & OHCI_QUIRK_AMD756) \
- while (temp & mask) \
- temp = readl (&hc->regs->roothub.register); \
- temp; })
-
-static u32 roothub_a(struct ohci *hc)
-{
- return read_roothub(hc, a, 0xfc0fe000);
-}
-static inline u32 roothub_b(struct ohci *hc)
-{
- return readl(&hc->regs->roothub.b);
-}
-static inline u32 roothub_status(struct ohci *hc)
-{
- return readl(&hc->regs->roothub.status);
-}
-static u32 roothub_portstatus(struct ohci *hc, int i)
-{
- return read_roothub(hc, portstatus[i], 0xffe0fce0);
-}
-
-/* forward declaration */
-static int hc_interrupt(void);
-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);
-
-/*-------------------------------------------------------------------------*
- * URB support functions
- *-------------------------------------------------------------------------*/
-
-/* free HCD-private data associated with this URB */
-
-static void urb_free_priv(struct urb_priv *urb)
-{
- int i;
- int last;
- struct td *td;
-
- last = urb->length - 1;
- if (last >= 0) {
- for (i = 0; i <= last; i++) {
- td = urb->td[i];
- if (td) {
- td->usb_dev = NULL;
- urb->td[i] = NULL;
- }
- }
- }
-}
-
-/*-------------------------------------------------------------------------*/
-
-#ifdef DEBUG
-static int sohci_get_current_frame_number(struct usb_device *dev);
-
-/* debug| print the main components of an URB
- * small: 0) header + data packets 1) just header */
-
-static void pkt_print(struct usb_device *dev, unsigned long pipe, void *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(®s->revision) & 0xff;
- if (temp != 0x10)
- dbg("spec %d.%d", (temp >> 4), (temp & 0x0f));
-
- temp = readl(®s->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(®s->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(®s->intrstatus));
- ohci_dump_intr_mask("intrenable", readl(®s->intrenable));
-
- maybe_print_eds("ed_periodcurrent", readl(®s->ed_periodcurrent));
-
- maybe_print_eds("ed_controlhead", readl(®s->ed_controlhead));
- maybe_print_eds("ed_controlcurrent", readl(®s->ed_controlcurrent));
-
- maybe_print_eds("ed_bulkhead", readl(®s->ed_bulkhead));
- maybe_print_eds("ed_bulkcurrent", readl(®s->ed_bulkcurrent));
-
- maybe_print_eds("donehead", readl(®s->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(®s->intrstatus);
- if (ints == ~(u32) 0) {
- ohci->disabled++;
- err("%s device removed!", ohci->slot_name);
- return -1;
- }
- ints &= readl(®s->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, ®s->intrdisable);
- stat = dl_done_list(&gohci, dl_reverse_done_list(&gohci));
- writel(OHCI_INTR_WDH, ®s->intrenable);
- }
-
- if (ints & OHCI_INTR_SO) {
- dbg("USB Schedule overrun\n");
- writel(OHCI_INTR_SO, ®s->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, ®s->intrdisable);
- if (ohci->ed_rm_list[frame] != NULL)
- writel(OHCI_INTR_SF, ®s->intrenable);
- stat = 0xff;
- }
-
- writel(ints, ®s->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) */
diff --git a/drivers/usb/host/ohci-s3c24xx.h b/drivers/usb/host/ohci-s3c24xx.h
deleted file mode 100644
index f272d78859..0000000000
--- a/drivers/usb/host/ohci-s3c24xx.h
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- * URB OHCI HCD (Host Controller Driver) for USB.
- *
- * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
- * (C) Copyright 2000-2001 David Brownell <dbrownell@users.sourceforge.net>
- *
- * usb-ohci.h
- */
-
-
-static int cc_to_error[16] = {
-
-/* mapping of the OHCI CC status to error codes */
- /* No Error */ 0,
- /* CRC Error */ USB_ST_CRC_ERR,
- /* Bit Stuff */ USB_ST_BIT_ERR,
- /* Data Togg */ USB_ST_CRC_ERR,
- /* Stall */ USB_ST_STALLED,
- /* DevNotResp */ -1,
- /* PIDCheck */ USB_ST_BIT_ERR,
- /* UnExpPID */ USB_ST_BIT_ERR,
- /* DataOver */ USB_ST_BUF_ERR,
- /* DataUnder */ USB_ST_BUF_ERR,
- /* reservd */ -1,
- /* reservd */ -1,
- /* BufferOver */ USB_ST_BUF_ERR,
- /* BuffUnder */ USB_ST_BUF_ERR,
- /* Not Access */ -1,
- /* Not Access */ -1
-};
-
-/* ED States */
-#define ED_NEW 0x00
-#define ED_UNLINK 0x01
-#define ED_OPER 0x02
-#define ED_DEL 0x04
-#define ED_URB_DEL 0x08
-
-/* usb_ohci_ed */
-struct ed {
- __u32 hwINFO;
- __u32 hwTailP;
- __u32 hwHeadP;
- __u32 hwNextED;
-
- struct ed *ed_prev;
- __u8 int_period;
- __u8 int_branch;
- __u8 int_load;
- __u8 int_interval;
- __u8 state;
- __u8 type;
- __u16 last_iso;
- struct ed *ed_rm_list;
-
- struct usb_device *usb_dev;
- __u32 unused[3];
-} __attribute__ ((aligned(16)));
-
-/* TD info field */
-#define TD_CC 0xf0000000
-#define TD_CC_GET(td_p) (((td_p) >> 28) & 0x0f)
-#define TD_CC_SET(td_p, cc) \
- {(td_p) = ((td_p) & 0x0fffffff) | (((cc) & 0x0f) << 28)}
-#define TD_EC 0x0C000000
-#define TD_T 0x03000000
-#define TD_T_DATA0 0x02000000
-#define TD_T_DATA1 0x03000000
-#define TD_T_TOGGLE 0x00000000
-#define TD_R 0x00040000
-#define TD_DI 0x00E00000
-#define TD_DI_SET(X) (((X) & 0x07)<< 21)
-#define TD_DP 0x00180000
-#define TD_DP_SETUP 0x00000000
-#define TD_DP_IN 0x00100000
-#define TD_DP_OUT 0x00080000
-
-#define TD_ISO 0x00010000
-#define TD_DEL 0x00020000
-
-/* CC Codes */
-#define TD_CC_NOERROR 0x00
-#define TD_CC_CRC 0x01
-#define TD_CC_BITSTUFFING 0x02
-#define TD_CC_DATATOGGLEM 0x03
-#define TD_CC_STALL 0x04
-#define TD_DEVNOTRESP 0x05
-#define TD_PIDCHECKFAIL 0x06
-#define TD_UNEXPECTEDPID 0x07
-#define TD_DATAOVERRUN 0x08
-#define TD_DATAUNDERRUN 0x09
-#define TD_BUFFEROVERRUN 0x0C
-#define TD_BUFFERUNDERRUN 0x0D
-#define TD_NOTACCESSED 0x0F
-
-
-#define MAXPSW 1
-
-struct td {
- __u32 hwINFO;
- __u32 hwCBP; /* Current Buffer Pointer */
- __u32 hwNextTD; /* Next TD Pointer */
- __u32 hwBE; /* Memory Buffer End Pointer */
-
- __u8 unused;
- __u8 index;
- struct ed *ed;
- struct td *next_dl_td;
- struct usb_device *usb_dev;
- int transfer_len;
- __u32 data;
-
- __u32 unused2[2];
-} __attribute__ ((aligned(32)));
-
-#define OHCI_ED_SKIP (1 << 14)
-
-/*
- * The HCCA (Host Controller Communications Area) is a 256 byte
- * structure defined in the OHCI spec. that the host controller is
- * told the base address of. It must be 256-byte aligned.
- */
-
-#define NUM_INTS 32 /* part of the OHCI standard */
-struct ohci_hcca {
- __u32 int_table[NUM_INTS]; /* Interrupt ED table */
- __u16 frame_no; /* current frame number */
- __u16 pad1; /* set to 0 on each frame_no change */
- __u32 done_head; /* info returned for an interrupt */
- u8 reserved_for_hc[116];
-} __attribute__ ((aligned(256)));
-
-/*
- * Maximum number of root hub ports.
- */
-#define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports */
-
-/*
- * This is the structure of the OHCI controller's memory mapped I/O
- * region. This is Memory Mapped I/O. You must use the readl() and
- * writel() macros defined in asm/io.h to access these!!
- */
-struct ohci_regs {
- /* control and status registers */
- __u32 revision;
- __u32 control;
- __u32 cmdstatus;
- __u32 intrstatus;
- __u32 intrenable;
- __u32 intrdisable;
- /* memory pointers */
- __u32 hcca;
- __u32 ed_periodcurrent;
- __u32 ed_controlhead;
- __u32 ed_controlcurrent;
- __u32 ed_bulkhead;
- __u32 ed_bulkcurrent;
- __u32 donehead;
- /* frame counters */
- __u32 fminterval;
- __u32 fmremaining;
- __u32 fmnumber;
- __u32 periodicstart;
- __u32 lsthresh;
- /* Root hub ports */
- struct ohci_roothub_regs {
- __u32 a;
- __u32 b;
- __u32 status;
- __u32 portstatus[MAX_ROOT_PORTS];
- } roothub;
-} __attribute__ ((aligned(32)));
-
-/* OHCI CONTROL AND STATUS REGISTER MASKS */
-
-/*
- * HcControl (control) register masks
- */
-#define OHCI_CTRL_CBSR (3 << 0) /* control/bulk service ratio */
-#define OHCI_CTRL_PLE (1 << 2) /* periodic list enable */
-#define OHCI_CTRL_IE (1 << 3) /* isochronous enable */
-#define OHCI_CTRL_CLE (1 << 4) /* control list enable */
-#define OHCI_CTRL_BLE (1 << 5) /* bulk list enable */
-#define OHCI_CTRL_HCFS (3 << 6) /* host controller functional state */
-#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;
-}
diff --git a/include/common.h b/include/common.h
index fb4e79bb39..47076869c1 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 12/38] samsung: nand: Drop s3c2410_nand driver
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (10 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 11/38] samsung: usb: Drop ohci-s3c24xx driver Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-05-22 2:05 ` Minkyu Kang
` (2 more replies)
2017-05-17 14:22 ` [U-Boot] [PATCH 13/38] samsung: Drop more references fo s3c24x0 Simon Glass
` (25 subsequent siblings)
37 siblings, 3 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is not used anymore. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 82358f674b..5d5f9f5267 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -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
diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
deleted file mode 100644
index dd742a6351..0000000000
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * (C) Copyright 2006 OpenMoko, Inc.
- * Author: Harald Welte <laforge@openmoko.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-
-#include <nand.h>
-#include <asm/arch/s3c24x0_cpu.h>
-#include <asm/io.h>
-
-#define S3C2410_NFCONF_EN (1<<15)
-#define S3C2410_NFCONF_512BYTE (1<<14)
-#define S3C2410_NFCONF_4STEP (1<<13)
-#define S3C2410_NFCONF_INITECC (1<<12)
-#define S3C2410_NFCONF_nFCE (1<<11)
-#define S3C2410_NFCONF_TACLS(x) ((x)<<8)
-#define S3C2410_NFCONF_TWRPH0(x) ((x)<<4)
-#define S3C2410_NFCONF_TWRPH1(x) ((x)<<0)
-
-#define S3C2410_ADDR_NALE 4
-#define S3C2410_ADDR_NCLE 8
-
-#ifdef CONFIG_NAND_SPL
-
-/* in the early stage of NAND flash booting, printf() is not available */
-#define printf(fmt, args...)
-
-static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
-{
- int i;
- struct nand_chip *this = mtd_to_nand(mtd);
-
- for (i = 0; i < len; i++)
- buf[i] = readb(this->IO_ADDR_R);
-}
-#endif
-
-static void s3c24x0_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int 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
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 13/38] samsung: Drop more references fo s3c24x0
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (11 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 12/38] samsung: nand: Drop s3c2410_nand driver Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-05-22 2:06 ` Minkyu Kang
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 14/38] arc: Make u-boot-arc.h a private header Simon Glass
` (24 subsequent siblings)
37 siblings, 2 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is dead code now. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(-)
diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S
index 3ada6d026f..3880a402d8 100644
--- a/arch/arm/cpu/arm920t/start.S
+++ b/arch/arm/cpu/arm920t/start.S
@@ -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!
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 3c69dbf409..939fbbc819 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -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>
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index 973cd971ad..0e3ba94730 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -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))
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 80cfe11290..b5e0304348 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -51,7 +51,6 @@
#endif
#if defined(CONFIG_CPU_ARM920T) || \
- defined(CONFIG_S3C24X0) || \
defined(CONFIG_440EP) || \
defined(CONFIG_PCI_OHCI) || \
defined(CONFIG_MPC5200) || \
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index dd7b328d8f..10f9fb6371 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 14/38] arc: Make u-boot-arc.h a private header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (12 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 13/38] samsung: Drop more references fo s3c24x0 Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 15/38] sandbox: Make u-boot-sandbox.h " Simon Glass
` (23 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
Rather than including this arch-specific header file in common.h, include
it from within arc's u-boot.h header.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/arc/include/asm/u-boot.h | 1 +
include/common.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arc/include/asm/u-boot.h b/arch/arc/include/asm/u-boot.h
index e354edf95d..045487278e 100644
--- a/arch/arc/include/asm/u-boot.h
+++ b/arch/arc/include/asm/u-boot.h
@@ -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
diff --git a/include/common.h b/include/common.h
index 47076869c1..b07b8fc6da 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 15/38] sandbox: Make u-boot-sandbox.h a private header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (13 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 14/38] arc: Make u-boot-arc.h a private header Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 16/38] x86: Make u-boot-x86.h " Simon Glass
` (22 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/sandbox/include/asm/u-boot.h | 1 +
include/common.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/sandbox/include/asm/u-boot.h b/arch/sandbox/include/asm/u-boot.h
index 8279894eec..ddcd6fb397 100644
--- a/arch/sandbox/include/asm/u-boot.h
+++ b/arch/sandbox/include/asm/u-boot.h
@@ -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
diff --git a/include/common.h b/include/common.h
index b07b8fc6da..ffaed49bde 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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>
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 16/38] x86: Make u-boot-x86.h a private header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (14 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 15/38] sandbox: Make u-boot-sandbox.h " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 17/38] arm: Make u-boot-arm.h " Simon Glass
` (21 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/x86/include/asm/u-boot.h | 1 +
include/common.h | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/u-boot.h b/arch/x86/include/asm/u-boot.h
index 623771a39a..4c4527eb38 100644
--- a/arch/x86/include/asm/u-boot.h
+++ b/arch/x86/include/asm/u-boot.h
@@ -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
diff --git a/include/common.h b/include/common.h
index ffaed49bde..229ca4c397 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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>
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 17/38] arm: Make u-boot-arm.h a private header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (15 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 16/38] x86: Make u-boot-x86.h " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 18/38] mips: Make u-boot-mips.h " Simon Glass
` (20 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(-)
diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h
index b931c22060..3a0d0b8675 100644
--- a/arch/arm/include/asm/u-boot-arm.h
+++ b/arch/arm/include/asm/u-boot-arm.h
@@ -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_ */
diff --git a/arch/arm/include/asm/u-boot.h b/arch/arm/include/asm/u-boot.h
index ca3abd7d0b..ef9196f898 100644
--- a/arch/arm/include/asm/u-boot.h
+++ b/arch/arm/include/asm/u-boot.h
@@ -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
diff --git a/include/common.h b/include/common.h
index 229ca4c397..fe396c5705 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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>
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 18/38] mips: Make u-boot-mips.h a private header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (16 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 17/38] arm: Make u-boot-arm.h " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-05-17 19:27 ` Daniel Schwierzeck
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 19/38] nds32: Make u-boot-nds32.h " Simon Glass
` (19 subsequent siblings)
37 siblings, 2 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
Rather than including this arch-specific header file in common.h, include
it from within mips's u-boot.h header.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/mips/include/asm/u-boot.h | 1 +
include/common.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/u-boot.h b/arch/mips/include/asm/u-boot.h
index af03e8d5be..68985af4b9 100644
--- a/arch/mips/include/asm/u-boot.h
+++ b/arch/mips/include/asm/u-boot.h
@@ -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
diff --git a/include/common.h b/include/common.h
index fe396c5705..f36fed3843 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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>
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 19/38] nds32: Make u-boot-nds32.h a private header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (17 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 18/38] mips: Make u-boot-mips.h " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 20/38] arc: Don't include asm/u-boot.h in common Simon Glass
` (18 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
Rather than including this arch-specific header file in common.h, include
it from within nds32's u-boot.h header.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/nds32/include/asm/u-boot.h | 2 ++
include/common.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/nds32/include/asm/u-boot.h b/arch/nds32/include/asm/u-boot.h
index 2efdeb1243..4378ebf44b 100644
--- a/arch/nds32/include/asm/u-boot.h
+++ b/arch/nds32/include/asm/u-boot.h
@@ -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 {
diff --git a/include/common.h b/include/common.h
index f36fed3843..c1e634045f 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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>
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 20/38] arc: Don't include asm/u-boot.h in common
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (18 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 19/38] nds32: Make u-boot-nds32.h " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 21/38] mips: " Simon Glass
` (17 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is not actually needed anywhere, so drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/common.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/common.h b/include/common.h
index c1e634045f..83ea3c419c 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 21/38] mips: Don't include asm/u-boot.h in common
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (19 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 20/38] arc: Don't include asm/u-boot.h in common Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-05-17 19:28 ` Daniel Schwierzeck
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 22/38] sandbox: " Simon Glass
` (16 subsequent siblings)
37 siblings, 2 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is not actually needed anywhere, so drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/common.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/common.h b/include/common.h
index 83ea3c419c..298cbbc1a6 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 22/38] sandbox: Don't include asm/u-boot.h in common
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (20 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 21/38] mips: " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 23/38] x86: " Simon Glass
` (15 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
This is not actually needed anywhere, so drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/common.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/common.h b/include/common.h
index 298cbbc1a6..e0fbe6b3bf 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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>
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 23/38] x86: Don't include asm/u-boot.h in common
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (21 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 22/38] sandbox: " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 24/38] nds32: Remove include files from common.h Simon Glass
` (14 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
With a small fixup to u-boot-x86.h, this is not actually needed anywhere,
so drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/x86/include/asm/u-boot-x86.h | 4 +++-
include/common.h | 3 ---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index d2d603967e..a0f6a2e12d 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -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.
diff --git a/include/common.h b/include/common.h
index e0fbe6b3bf..02fda57f85 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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>
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 24/38] nds32: Remove include files from common.h
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (22 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 23/38] x86: " Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 25/38] arm: Add explicit include of <asm/mach-types.h> Simon Glass
` (13 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
With a few tweaks we can avoid including these files, which are only
needed by two C files.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(-)
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index 8b0b28fd99..c79b6d4044 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -11,6 +11,7 @@
#include <image.h>
#include <u-boot/zlib.h>
#include <asm/byteorder.h>
+#include <asm/setup.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/AndesTech/adp-ag101p/adp-ag101p.c b/board/AndesTech/adp-ag101p/adp-ag101p.c
index 805a266f63..e9d7def21c 100644
--- a/board/AndesTech/adp-ag101p/adp-ag101p.c
+++ b/board/AndesTech/adp-ag101p/adp-ag101p.c
@@ -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>
diff --git a/include/common.h b/include/common.h
index 02fda57f85..c5cb65beda 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 25/38] arm: Add explicit include of <asm/mach-types.h>
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (23 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 24/38] nds32: Remove include files from common.h Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-05-17 21:24 ` Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 26/38] arm: Add declarations to avoid needing to include headers Simon Glass
` (12 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
Rather than relying on common.h to provide this include, which is going
away at some point, include it explicitly in each file.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(+)
diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
index 8ff2c5065d..3ea494f5e4 100644
--- a/arch/arm/lib/spl.c
+++ b/arch/arm/lib/spl.c
@@ -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 */
diff --git a/board/Barix/ipam390/ipam390.c b/board/Barix/ipam390/ipam390.c
index fd1965d9f5..3a584021ac 100644
--- a/board/Barix/ipam390/ipam390.c
+++ b/board/Barix/ipam390/ipam390.c
@@ -29,6 +29,7 @@
#include <asm/gpio.h>
#include <hwconfig.h>
#include <bootstage.h>
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
index edf6281797..736d65caa1 100644
--- a/board/LaCie/edminiv2/edminiv2.c
+++ b/board/LaCie/edminiv2/edminiv2.c
@@ -14,6 +14,7 @@
#include "../common/common.h"
#include <spl.h>
#include <ns16550.h>
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/LaCie/net2big_v2/net2big_v2.c b/board/LaCie/net2big_v2/net2big_v2.c
index 263bb5426c..2e6e9ef916 100644
--- a/board/LaCie/net2big_v2/net2big_v2.c
+++ b/board/LaCie/net2big_v2/net2big_v2.c
@@ -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>
diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c
index 17e629622f..16d694716f 100644
--- a/board/LaCie/netspace_v2/netspace_v2.c
+++ b/board/LaCie/netspace_v2/netspace_v2.c
@@ -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>
diff --git a/board/Marvell/aspenite/aspenite.c b/board/Marvell/aspenite/aspenite.c
index 24ee6791a6..0ef63b7b7c 100644
--- a/board/Marvell/aspenite/aspenite.c
+++ b/board/Marvell/aspenite/aspenite.c
@@ -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>
diff --git a/board/Marvell/gplugd/gplugd.c b/board/Marvell/gplugd/gplugd.c
index 16040e19d7..05ce98bb61 100644
--- a/board/Marvell/gplugd/gplugd.c
+++ b/board/Marvell/gplugd/gplugd.c
@@ -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>
diff --git a/board/Marvell/guruplug/guruplug.c b/board/Marvell/guruplug/guruplug.c
index b0d5f1e10f..af0c491632 100644
--- a/board/Marvell/guruplug/guruplug.c
+++ b/board/Marvell/guruplug/guruplug.c
@@ -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>
diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
index 17a65600e4..f6cffc8cbb 100644
--- a/board/Marvell/openrd/openrd.c
+++ b/board/Marvell/openrd/openrd.c
@@ -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>
diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c
index 8907fb58ff..c7dfaa276c 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -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>
diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c
index 83ab1bc32d..f444c1628d 100644
--- a/board/Seagate/dockstar/dockstar.c
+++ b/board/Seagate/dockstar/dockstar.c
@@ -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;
diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c
index 1f4fb92494..5d0a4242a8 100644
--- a/board/Seagate/goflexhome/goflexhome.c
+++ b/board/Seagate/goflexhome/goflexhome.c
@@ -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>
diff --git a/board/Seagate/nas220/nas220.c b/board/Seagate/nas220/nas220.c
index c5349b900e..18c2895993 100644
--- a/board/Seagate/nas220/nas220.c
+++ b/board/Seagate/nas220/nas220.c
@@ -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>
diff --git a/board/amazon/kc1/kc1.c b/board/amazon/kc1/kc1.c
index b3fa7896c5..13a9c6a0fe 100644
--- a/board/amazon/kc1/kc1.c
+++ b/board/amazon/kc1/kc1.c
@@ -17,6 +17,7 @@
#include <asm/emif.h>
#include <twl6030.h>
#include "kc1.h"
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c
index cbe706170d..301f83efc9 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -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;
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index 458f1d8148..89ab8f7a59 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -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>
diff --git a/board/atmel/at91rm9200ek/at91rm9200ek.c b/board/atmel/at91rm9200ek/at91rm9200ek.c
index 98d76a6fa7..36f147b44d 100644
--- a/board/atmel/at91rm9200ek/at91rm9200ek.c
+++ b/board/atmel/at91rm9200ek/at91rm9200ek.c
@@ -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>
diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c
index 6398bcbc9e..b4acb742b3 100644
--- a/board/atmel/at91sam9261ek/at91sam9261ek.c
+++ b/board/atmel/at91sam9261ek/at91sam9261ek.c
@@ -21,6 +21,7 @@
#include <net.h>
#include <netdev.h>
#endif
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c
index 3de978311d..b37e9d3c7a 100644
--- a/board/atmel/at91sam9263ek/at91sam9263ek.c
+++ b/board/atmel/at91sam9263ek/at91sam9263ek.c
@@ -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;
diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
index d3bc5c69d4..8e377593ef 100644
--- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
+++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
@@ -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;
diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c
index 0b603ed13a..7966269ff3 100644
--- a/board/atmel/at91sam9rlek/at91sam9rlek.c
+++ b/board/atmel/at91sam9rlek/at91sam9rlek.c
@@ -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>
diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
index 81c2aad1a5..1e4a4a2acf 100644
--- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c
+++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c
@@ -19,6 +19,7 @@
#include <nand.h>
#include <version.h>
#endif
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c
index 08b1401372..e82c691841 100644
--- a/board/bluewater/gurnard/gurnard.c
+++ b/board/bluewater/gurnard/gurnard.c
@@ -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>
diff --git a/board/bluewater/snapper9260/snapper9260.c b/board/bluewater/snapper9260/snapper9260.c
index 2d1a89e102..7e9da4e7b7 100644
--- a/board/bluewater/snapper9260/snapper9260.c
+++ b/board/bluewater/snapper9260/snapper9260.c
@@ -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>
diff --git a/board/cirrus/edb93xx/edb93xx.c b/board/cirrus/edb93xx/edb93xx.c
index 720b490f2b..02e2896fa7 100644
--- a/board/cirrus/edb93xx/edb93xx.c
+++ b/board/cirrus/edb93xx/edb93xx.c
@@ -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;
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index 9e17eb865d..11ea52f240 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -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>
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index d941285977..52bb7363a7 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -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>
diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 6edfa17a91..2a187f1900 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -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>
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index 19b673e6d2..037cf074ea 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -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>
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index 123fb11f42..ea0bd8f30a 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -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"
diff --git a/board/gumstix/duovero/duovero.c b/board/gumstix/duovero/duovero.c
index fefcde87ae..849224efda 100644
--- a/board/gumstix/duovero/duovero.c
+++ b/board/gumstix/duovero/duovero.c
@@ -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"
diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c
index 01f8e67be1..2a2b7979f1 100644
--- a/board/h2200/h2200.c
+++ b/board/h2200/h2200.c
@@ -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;
diff --git a/board/imx31_phycore/imx31_phycore.c b/board/imx31_phycore/imx31_phycore.c
index 3f45e4e4b8..653246615f 100644
--- a/board/imx31_phycore/imx31_phycore.c
+++ b/board/imx31_phycore/imx31_phycore.c
@@ -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;
diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
index 0ad33eaeae..3d6de11798 100644
--- a/board/lego/ev3/legoev3.c
+++ b/board/lego/ev3/legoev3.c
@@ -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>
diff --git a/board/mini-box/picosam9g45/picosam9g45.c b/board/mini-box/picosam9g45/picosam9g45.c
index 5eb2ad77ca..09ec247663 100644
--- a/board/mini-box/picosam9g45/picosam9g45.c
+++ b/board/mini-box/picosam9g45/picosam9g45.c
@@ -27,6 +27,7 @@
#include <net.h>
#endif
#include <netdev.h>
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/nvidia/seaboard/seaboard.c b/board/nvidia/seaboard/seaboard.c
index b56bc529d1..0d5eec9dd8 100644
--- a/board/nvidia/seaboard/seaboard.c
+++ b/board/nvidia/seaboard/seaboard.c
@@ -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>
diff --git a/board/overo/common.c b/board/overo/common.c
index f6f6792d09..5656e2d17f 100644
--- a/board/overo/common.c
+++ b/board/overo/common.c
@@ -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;
diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c
index 79073d8aaa..f60dddac7b 100644
--- a/board/ronetix/pm9261/pm9261.c
+++ b/board/ronetix/pm9261/pm9261.c
@@ -26,6 +26,7 @@
#include <net.h>
#endif
#include <netdev.h>
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/ronetix/pm9263/pm9263.c b/board/ronetix/pm9263/pm9263.c
index accf16f151..1469136295 100644
--- a/board/ronetix/pm9263/pm9263.c
+++ b/board/ronetix/pm9263/pm9263.c
@@ -25,6 +25,7 @@
#include <net.h>
#endif
#include <netdev.h>
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c
index c1225800a9..e2620e3c04 100644
--- a/board/ronetix/pm9g45/pm9g45.c
+++ b/board/ronetix/pm9g45/pm9g45.c
@@ -25,6 +25,7 @@
#include <net.h>
#endif
#include <netdev.h>
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 12593830e9..d0247ac257 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -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;
diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c
index 79e127d99a..5d23844458 100644
--- a/board/samsung/smdkc100/smdkc100.c
+++ b/board/samsung/smdkc100/smdkc100.c
@@ -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;
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index feb8a341be..cc6eaf7ad0 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -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;
diff --git a/board/siemens/common/board.c b/board/siemens/common/board.c
index 9cafcea53a..b967227411 100644
--- a/board/siemens/common/board.c
+++ b/board/siemens/common/board.c
@@ -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;
diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c
index 396b5bdf60..8f8132a31a 100644
--- a/board/spear/spear300/spear300.c
+++ b/board/spear/spear300/spear300.c
@@ -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>
diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c
index 6f39ef1b40..d07dda34e9 100644
--- a/board/spear/spear310/spear310.c
+++ b/board/spear/spear310/spear310.c
@@ -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>
diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c
index 52196afd17..66073f3715 100644
--- a/board/spear/spear320/spear320.c
+++ b/board/spear/spear320/spear320.c
@@ -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>
diff --git a/board/spear/spear600/spear600.c b/board/spear/spear600/spear600.c
index 858a9cae76..2a54b8b323 100644
--- a/board/spear/spear600/spear600.c
+++ b/board/spear/spear600/spear600.c
@@ -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>
diff --git a/board/spear/x600/x600.c b/board/spear/x600/x600.c
index f8e9fddb0f..2c34ea1ad1 100644
--- a/board/spear/x600/x600.c
+++ b/board/spear/x600/x600.c
@@ -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>
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index b6cc417333..4b25cc2d7c 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -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>
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index 72aabb242c..6ffb53c4c6 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -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>
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c
index 8e948545e3..ddcc837bb0 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -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;
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 0014ce80a1..9e2af917fa 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -23,6 +23,7 @@
#include <malloc.h>
#include <mmc.h>
#include <nand.h>
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/zipitz2/zipitz2.c b/board/zipitz2/zipitz2.c
index e81d6ff18d..8a15c30c0b 100644
--- a/board/zipitz2/zipitz2.c
+++ b/board/zipitz2/zipitz2.c
@@ -16,6 +16,7 @@
#include <spi.h>
#include <asm/io.h>
#include <usb.h>
+#include <asm/mach-types.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 55ac162a3c..2f5315b0a6 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -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"
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 26/38] arm: Add declarations to avoid needing to include headers
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (24 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 25/38] arm: Add explicit include of <asm/mach-types.h> Simon Glass
@ 2017-05-17 14:22 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 27/38] arm: Include asm/setup.h explictly Simon Glass
` (11 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:22 UTC (permalink / raw)
To: u-boot
At present common.h includes various ARM-specific headers. In preparation
for dropping this, add a few explicit declarations.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(+)
diff --git a/arch/arm/include/asm/bootm.h b/arch/arm/include/asm/bootm.h
index 436c35a6dc..4c9bb863c0 100644
--- a/arch/arm/include/asm/bootm.h
+++ b/arch/arm/include/asm/bootm.h
@@ -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);
diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h
index 3a0d0b8675..ef4fca68ee 100644
--- a/arch/arm/include/asm/u-boot-arm.h
+++ b/arch/arm/include/asm/u-boot-arm.h
@@ -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);
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 4dbe6a5303..bf49742de4 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -31,6 +31,7 @@
#ifdef CONFIG_ARMV7_NONSEC
#include <asm/armv7.h>
#endif
+#include <asm/setup.h>
DECLARE_GLOBAL_DATA_PTR;
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 27/38] arm: Include asm/setup.h explictly
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (25 preceding siblings ...)
2017-05-17 14:22 ` [U-Boot] [PATCH 26/38] arm: Add declarations to avoid needing to include headers Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot,27/38] " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 28/38] arm: Remove include files from common.h Simon Glass
` (10 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
Include this header where needed so we do not need to rely on common.h.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(+)
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index c1a70b15d0..f98998343e 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -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);
diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c
index 2d03ebfbd3..e0e32123dc 100644
--- a/arch/arm/mach-omap2/utils.c
+++ b/arch/arm/mach-omap2/utils.c
@@ -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)
{
diff --git a/board/Synology/ds109/ds109.c b/board/Synology/ds109/ds109.c
index b46c09d648..0c2f5258e9 100644
--- a/board/Synology/ds109/ds109.c
+++ b/board/Synology/ds109/ds109.c
@@ -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>
diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
index 08e79bd7ac..2215c29c9c 100644
--- a/board/bluegiga/apx4devkit/apx4devkit.c
+++ b/board/bluegiga/apx4devkit/apx4devkit.c
@@ -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>
diff --git a/board/compulab/common/common.c b/board/compulab/common/common.c
index b25d9a20b4..bf2ac7bd7f 100644
--- a/board/compulab/common/common.c
+++ b/board/compulab/common/common.c
@@ -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"
diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
index b5f1aa61cb..bb4c9e9740 100644
--- a/board/compulab/common/eeprom.c
+++ b/board/compulab/common/eeprom.c
@@ -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"
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index 037cf074ea..e4bda7909a 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -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>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index c4c2d23532..d45abe468a 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -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>
diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
index 3d6de11798..26534394ab 100644
--- a/board/lego/ev3/legoev3.c
+++ b/board/lego/ev3/legoev3.c
@@ -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>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 4404edb59e..e222607cd2 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -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() */
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index 2c6fc409c1..0d267877fa 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -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
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 28/38] arm: Remove include files from common.h
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (26 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 27/38] arm: Include asm/setup.h explictly Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-05-17 21:31 ` Tom Rini
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 29/38] common: Drop cpu_init_f() declarations Simon Glass
` (9 subsequent siblings)
37 siblings, 2 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
With a small tweak we can avoid including these files for all boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
common/board_f.c | 3 +++
include/common.h | 6 ------
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/common/board_f.c b/common/board_f.c
index a212f2b539..fe90faf309 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -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
diff --git a/include/common.h b/include/common.h
index c5cb65beda..3004c22b72 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 29/38] common: Drop cpu_init_f() declarations
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (27 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 28/38] arm: Remove include files from common.h Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot,29/38] " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 30/38] common: Drop determine_sysper() and determine_pci_clock_per() Simon Glass
` (8 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
These arch-specific functions are not needed here.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/common.h | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/include/common.h b/include/common.h
index 3004c22b72..7eab4eb73d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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 */
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 30/38] common: Drop determine_sysper() and determine_pci_clock_per()
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (28 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 29/38] common: Drop cpu_init_f() declarations Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 31/38] common: Move PPC4xx_SYS_INFO() et al to arch-specific header Simon Glass
` (7 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
These arch-specific declarations should not be in common.h. Drop them.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/common.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/include/common.h b/include/common.h
index 7eab4eb73d..b45f392373 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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 * );
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 31/38] common: Move PPC4xx_SYS_INFO() et al to arch-specific header
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (29 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 30/38] common: Drop determine_sysper() and determine_pci_clock_per() Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 32/38] common: powerpc: Move arch-specific headers Simon Glass
` (6 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
These definitions should not be in common.h. Move them to an arch-specific
header file.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/powerpc/include/asm/ppc4xx.h | 4 ++++
include/common.h | 6 ------
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/include/asm/ppc4xx.h b/arch/powerpc/include/asm/ppc4xx.h
index 30e6559ba4..45ff5dbacd 100644
--- a/arch/powerpc/include/asm/ppc4xx.h
+++ b/arch/powerpc/include/asm/ppc4xx.h
@@ -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 */
diff --git a/include/common.h b/include/common.h
index b45f392373..3f6b636fae 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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 */
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 32/38] common: powerpc: Move arch-specific headers
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (30 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 31/38] common: Move PPC4xx_SYS_INFO() et al to arch-specific header Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 33/38] common: freescale: Move arch-specific declarations Simon Glass
` (5 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/arch/powerpc/cpu/ppc4xx/4xx_pci.c b/arch/powerpc/cpu/ppc4xx/4xx_pci.c
index bfe48a2ad3..0227a72ae9 100644
--- a/arch/powerpc/cpu/ppc4xx/4xx_pci.c
+++ b/arch/powerpc/cpu/ppc4xx/4xx_pci.c
@@ -56,6 +56,7 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <pci.h>
+#include <asm/ppc4xx.h>
#ifdef CONFIG_PCI
diff --git a/arch/powerpc/cpu/ppc4xx/miiphy.c b/arch/powerpc/cpu/ppc4xx/miiphy.c
index f0fc098059..aef267e0a2 100644
--- a/arch/powerpc/cpu/ppc4xx/miiphy.c
+++ b/arch/powerpc/cpu/ppc4xx/miiphy.c
@@ -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>
diff --git a/arch/powerpc/cpu/ppc4xx/reginfo.c b/arch/powerpc/cpu/ppc4xx/reginfo.c
index a42327eb3d..59de04a2d8 100644
--- a/arch/powerpc/cpu/ppc4xx/reginfo.c
+++ b/arch/powerpc/cpu/ppc4xx/reginfo.c
@@ -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>
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
new file mode 100644
index 0000000000..545c71d2c4
--- /dev/null
+++ b/arch/powerpc/include/asm/ppc.h
@@ -0,0 +1,67 @@
+/*
+ * Ugly header containing required header files. This could be adjusted
+ * so that including asm/arch/hardware includes the correct file.
+ *
+ * (C) Copyright 2000-2009
+ * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __ASM_PPC_H
+#define __ASM_PPC_H
+
+#ifndef __ASSEMBLY__
+
+#if defined(CONFIG_8xx)
+#include <asm/8xx_immap.h>
+#if defined(CONFIG_MPC859) || defined(CONFIG_MPC859T) || \
+ defined(CONFIG_MPC866) || defined(CONFIG_MPC866P)
+# define CONFIG_MPC866_FAMILY 1
+#elif defined(CONFIG_MPC885)
+# define CONFIG_MPC885_FAMILY 1
+#endif
+#if defined(CONFIG_MPC860) || defined(CONFIG_MPC860T) || \
+ defined(CONFIG_MPC866_FAMILY) || defined(CONFIG_MPC885_FAMILY)
+# define CONFIG_MPC86x 1
+#endif
+#elif defined(CONFIG_5xx)
+#include <asm/5xx_immap.h>
+#elif defined(CONFIG_MPC5xxx)
+#include <mpc5xxx.h>
+#elif defined(CONFIG_MPC512X)
+#include <asm/immap_512x.h>
+#elif defined(CONFIG_MPC8260)
+#if defined(CONFIG_MPC8247) || defined(CONFIG_MPC8272)
+#define CONFIG_MPC8272_FAMILY 1
+#endif
+#include <asm/immap_8260.h>
+#endif
+#ifdef CONFIG_MPC86xx
+#include <mpc86xx.h>
+#include <asm/immap_86xx.h>
+#endif
+#ifdef CONFIG_MPC85xx
+#include <mpc85xx.h>
+#include <asm/immap_85xx.h>
+#endif
+#ifdef CONFIG_MPC83xx
+#include <mpc83xx.h>
+#include <asm/immap_83xx.h>
+#endif
+#ifdef CONFIG_4xx
+#include <asm/ppc4xx.h>
+#endif
+#ifdef CONFIG_SOC_DA8XX
+#include <asm/arch/hardware.h>
+#endif
+#ifdef CONFIG_FSL_LSCH3
+#include <asm/arch/immap_lsch3.h>
+#endif
+#ifdef CONFIG_FSL_LSCH2
+#include <asm/arch/immap_lsch2.h>
+#endif
+
+#endif /* !__ASSEMBLY__ */
+
+#endif
diff --git a/arch/powerpc/include/asm/u-boot.h b/arch/powerpc/include/asm/u-boot.h
index 74b620294e..34e44e18c2 100644
--- a/arch/powerpc/include/asm/u-boot.h
+++ b/arch/powerpc/include/asm/u-boot.h
@@ -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
diff --git a/include/common.h b/include/common.h
index 3f6b636fae..ecfd8882af 100644
--- a/include/common.h
+++ b/include/common.h
@@ -30,49 +30,7 @@ typedef volatile unsigned char vu_char;
#include <asm/ptrace.h>
#include <stdarg.h>
#include <linux/kernel.h>
-#if defined(CONFIG_8xx)
-#include <asm/8xx_immap.h>
-#if defined(CONFIG_MPC859) || defined(CONFIG_MPC859T) || \
- defined(CONFIG_MPC866) || \
- defined(CONFIG_MPC866P)
-# define CONFIG_MPC866_FAMILY 1
-#elif defined(CONFIG_MPC885)
-# define CONFIG_MPC885_FAMILY 1
-#endif
-#if defined(CONFIG_MPC860) \
- || defined(CONFIG_MPC860T) \
- || defined(CONFIG_MPC866_FAMILY) \
- || defined(CONFIG_MPC885_FAMILY)
-# define CONFIG_MPC86x 1
-#endif
-#elif defined(CONFIG_5xx)
-#include <asm/5xx_immap.h>
-#elif defined(CONFIG_MPC5xxx)
-#include <mpc5xxx.h>
-#elif defined(CONFIG_MPC512X)
-#include <asm/immap_512x.h>
-#elif defined(CONFIG_MPC8260)
-#if defined(CONFIG_MPC8247) \
- || defined(CONFIG_MPC8272)
-#define CONFIG_MPC8272_FAMILY 1
-#endif
-#include <asm/immap_8260.h>
-#endif
-#ifdef CONFIG_MPC86xx
-#include <mpc86xx.h>
-#include <asm/immap_86xx.h>
-#endif
-#ifdef CONFIG_MPC85xx
-#include <mpc85xx.h>
-#include <asm/immap_85xx.h>
-#endif
-#ifdef CONFIG_MPC83xx
-#include <mpc83xx.h>
-#include <asm/immap_83xx.h>
-#endif
-#ifdef CONFIG_4xx
-#include <asm/ppc4xx.h>
-#endif
+
#ifdef CONFIG_SOC_DA8XX
#include <asm/arch/hardware.h>
#endif
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 33/38] common: freescale: Move arch-specific declarations
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (31 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 32/38] common: powerpc: Move arch-specific headers Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 34/38] common: freescale: Move arch-specific imx code to arch-imx Simon Glass
` (4 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
The declarations should not be in common.h. Move them to the arch-specific
headers.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index bb029608bf..0424859670 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -26,6 +26,7 @@
#ifdef CONFIG_SYS_FSL_DDR
#include <fsl_ddr.h>
#endif
+#include <asm/arch/clock.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/clock.h b/arch/arm/include/asm/arch-fsl-layerscape/clock.h
index 69359135d5..bf32782d17 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/clock.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/clock.h
@@ -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_ */
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/cpu.h b/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
index 95c3e2fc08..df711a23a1 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/cpu.h
@@ -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 */
diff --git a/arch/arm/include/asm/arch-ls102xa/clock.h b/arch/arm/include/asm/arch-ls102xa/clock.h
index fd36bb0a50..c1efb9919e 100644
--- a/arch/arm/include/asm/arch-ls102xa/clock.h
+++ b/arch/arm/include/asm/arch-ls102xa/clock.h
@@ -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_ */
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index 545c71d2c4..4e1c5965e4 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -62,6 +62,103 @@
#include <asm/arch/immap_lsch2.h>
#endif
+/*
+ * enable common handling for all TQM8xxL/M boards:
+ * - CONFIG_TQM8xxM will be defined for all TQM8xxM boards
+ * - CONFIG_TQM8xxL will be defined for all TQM8xxL _and_ TQM8xxM boards
+ * and for the TQM885D board
+ */
+#if defined(CONFIG_TQM823M) || defined(CONFIG_TQM850M) || \
+ defined(CONFIG_TQM855M) || defined(CONFIG_TQM860M) || \
+ defined(CONFIG_TQM862M) || defined(CONFIG_TQM866M)
+# ifndef CONFIG_TQM8xxM
+# define CONFIG_TQM8xxM
+# endif
+#endif
+#if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L) || \
+ defined(CONFIG_TQM855L) || defined(CONFIG_TQM860L) || \
+ defined(CONFIG_TQM862L) || defined(CONFIG_TQM8xxM) || \
+ defined(CONFIG_TQM885D)
+# ifndef CONFIG_TQM8xxL
+# define CONFIG_TQM8xxL
+# endif
+#endif
+
+#if defined(CONFIG_5xx) || defined(CONFIG_8xx)
+uint get_immr(uint);
+#endif
+#if defined(CONFIG_MPC5xxx)
+uint get_svr(void);
+#endif
+uint get_pvr(void);
+uint get_svr(void);
+uint rd_ic_cst(void);
+void wr_ic_cst(uint);
+void wr_ic_adr(uint);
+uint rd_dc_cst(void);
+void wr_dc_cst(uint);
+void wr_dc_adr(uint);
+
+#if defined(CONFIG_4xx) || \
+ defined(CONFIG_MPC5xxx) || \
+ defined(CONFIG_MPC85xx) || \
+ defined(CONFIG_MPC86xx) || \
+ defined(CONFIG_MPC83xx)
+unsigned char in8(unsigned int);
+void out8(unsigned int, unsigned char);
+unsigned short in16(unsigned int);
+unsigned short in16r(unsigned int);
+void out16(unsigned int, unsigned short value);
+void out16r(unsigned int, unsigned short value);
+unsigned long in32(unsigned int);
+unsigned long in32r(unsigned int);
+void out32(unsigned int, unsigned long value);
+void out32r(unsigned int, unsigned long value);
+void ppcDcbf(unsigned long value);
+void ppcDcbi(unsigned long value);
+void ppcSync(void);
+void ppcDcbz(unsigned long value);
+#endif
+#if defined(CONFIG_MPC83xx)
+void ppcDWload(unsigned int *addr, unsigned int *ret);
+void ppcDWstore(unsigned int *addr, unsigned int *value);
+void disable_addr_trans(void);
+void enable_addr_trans(void);
+#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
+void ddr_enable_ecc(unsigned int dram_size);
+#endif
+#endif
+
+#if defined(CONFIG_MPC5xxx)
+int prt_mpc5xxx_clks(void);
+#endif
+
+#if defined(CONFIG_MPC85xx)
+typedef MPC85xx_SYS_INFO sys_info_t;
+void get_sys_info(sys_info_t *);
+void ft_fixup_cpu(void *, u64);
+void ft_fixup_num_cores(void *);
+#endif
+#if defined(CONFIG_MPC86xx)
+ulong get_bus_freq(ulong);
+typedef MPC86xx_SYS_INFO sys_info_t;
+void get_sys_info(sys_info_t *);
+static inline ulong get_ddr_freq(ulong dummy)
+{
+ return get_bus_freq(dummy);
+}
+#else
+ulong get_ddr_freq(ulong);
+#endif
+
#endif /* !__ASSEMBLY__ */
+#ifdef CONFIG_PPC
+/*
+ * Has to be included outside of the #ifndef __ASSEMBLY__ section.
+ * Otherwise might lead to compilation errors in assembler files.
+ */
+#include <asm/cache.h>
+#endif
+
#endif
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
index d16a69fc98..2ee8749f36 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -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;
diff --git a/board/freescale/ls1043aqds/ddr.c b/board/freescale/ls1043aqds/ddr.c
index b22d3784dc..f219a77e98 100644
--- a/board/freescale/ls1043aqds/ddr.c
+++ b/board/freescale/ls1043aqds/ddr.c
@@ -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;
diff --git a/board/freescale/ls1043ardb/ddr.c b/board/freescale/ls1043ardb/ddr.c
index 36d27ecfae..354b864eb9 100644
--- a/board/freescale/ls1043ardb/ddr.c
+++ b/board/freescale/ls1043ardb/ddr.c
@@ -11,6 +11,7 @@
#ifdef CONFIG_FSL_DEEP_SLEEP
#include <fsl_sleep.h>
#endif
+#include <asm/arch/clock.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls1046aqds/ddr.c b/board/freescale/ls1046aqds/ddr.c
index 5fcfa0f701..e1858d6060 100644
--- a/board/freescale/ls1046aqds/ddr.c
+++ b/board/freescale/ls1046aqds/ddr.c
@@ -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;
diff --git a/board/freescale/ls1046ardb/ddr.c b/board/freescale/ls1046ardb/ddr.c
index ae5046cab6..fb4f6abe0b 100644
--- a/board/freescale/ls1046ardb/ddr.c
+++ b/board/freescale/ls1046ardb/ddr.c
@@ -11,6 +11,7 @@
#ifdef CONFIG_FSL_DEEP_SLEEP
#include <fsl_sleep.h>
#endif
+#include <asm/arch/clock.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/ls2080a/ddr.c b/board/freescale/ls2080a/ddr.c
index 9d176d3851..025e5aa8d0 100644
--- a/board/freescale/ls2080a/ddr.c
+++ b/board/freescale/ls2080a/ddr.c
@@ -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;
diff --git a/board/freescale/ls2080aqds/ddr.c b/board/freescale/ls2080aqds/ddr.c
index 22a2676a95..20b8c1fef7 100644
--- a/board/freescale/ls2080aqds/ddr.c
+++ b/board/freescale/ls2080aqds/ddr.c
@@ -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;
diff --git a/board/freescale/ls2080ardb/ddr.c b/board/freescale/ls2080ardb/ddr.c
index 7002dfb236..01f7d82fb6 100644
--- a/board/freescale/ls2080ardb/ddr.c
+++ b/board/freescale/ls2080ardb/ddr.c
@@ -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;
diff --git a/drivers/ddr/fsl/arm_ddr_gen3.c b/drivers/ddr/fsl/arm_ddr_gen3.c
index 5b7ced5949..aaf4dfb1e7 100644
--- a/drivers/ddr/fsl/arm_ddr_gen3.c
+++ b/drivers/ddr/fsl/arm_ddr_gen3.c
@@ -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
diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index 21687dd077..e2d66c33ec 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -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.
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index e0f9e2ca3d..e612e7e749 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -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)
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index b45a8797e4..8897c17e99 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -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
diff --git a/drivers/ddr/fsl/util.c b/drivers/ddr/fsl/util.c
index b58784be65..e59f29215a 100644
--- a/drivers/ddr/fsl/util.c
+++ b/drivers/ddr/fsl/util.c
@@ -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
diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c
index 86dc13d70d..6e31244f20 100644
--- a/drivers/net/fsl-mc/dpio/qbman_portal.c
+++ b/drivers/net/fsl-mc/dpio/qbman_portal.c
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
+#include <asm/arch/clock.h>
#include "qbman_portal.h"
/* QBMan portal management command codes */
diff --git a/drivers/pci/pcie_layerscape.c b/drivers/pci/pcie_layerscape.c
index 1c5a33ac28..b239ece44d 100644
--- a/drivers/pci/pcie_layerscape.c
+++ b/drivers/pci/pcie_layerscape.c
@@ -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;
diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
index d504bbda37..a6d6ceadce 100644
--- a/drivers/pci/pcie_layerscape_fixup.c
+++ b/drivers/pci/pcie_layerscape_fixup.c
@@ -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)
diff --git a/drivers/usb/common/fsl-errata.c b/drivers/usb/common/fsl-errata.c
index 338ac08d8a..1dfa73d68e 100644
--- a/drivers/usb/common/fsl-errata.c
+++ b/drivers/usb/common/fsl-errata.c
@@ -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)
diff --git a/include/common.h b/include/common.h
index ecfd8882af..ba31727a79 100644
--- a/include/common.h
+++ b/include/common.h
@@ -121,28 +121,6 @@ typedef void (interrupt_handler_t)(void *);
#include <asm/u-boot.h> /* boot information for Linux kernel */
#include <asm/global_data.h> /* global data used for startup functions */
-/*
- * enable common handling for all TQM8xxL/M boards:
- * - CONFIG_TQM8xxM will be defined for all TQM8xxM boards
- * - CONFIG_TQM8xxL will be defined for all TQM8xxL _and_ TQM8xxM boards
- * and for the TQM885D board
- */
-#if defined(CONFIG_TQM823M) || defined(CONFIG_TQM850M) || \
- defined(CONFIG_TQM855M) || defined(CONFIG_TQM860M) || \
- defined(CONFIG_TQM862M) || defined(CONFIG_TQM866M)
-# ifndef CONFIG_TQM8xxM
-# define CONFIG_TQM8xxM
-# endif
-#endif
-#if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L) || \
- defined(CONFIG_TQM855L) || defined(CONFIG_TQM860L) || \
- defined(CONFIG_TQM862L) || defined(CONFIG_TQM8xxM) || \
- defined(CONFIG_TQM885D)
-# ifndef CONFIG_TQM8xxL
-# define CONFIG_TQM8xxL
-# endif
-#endif
-
#if defined(CONFIG_ENV_IS_EMBEDDED)
#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN
#elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \
@@ -455,21 +433,6 @@ int testdram(void);
#endif /* CONFIG_SYS_DRAM_TEST */
/* $(CPU)/start.S */
-#if defined(CONFIG_5xx) || \
- defined(CONFIG_8xx)
-uint get_immr (uint);
-#endif
-#if defined(CONFIG_MPC5xxx)
-uint get_svr (void);
-#endif
-uint get_pvr (void);
-uint get_svr (void);
-uint rd_ic_cst (void);
-void wr_ic_cst (uint);
-void wr_ic_adr (uint);
-uint rd_dc_cst (void);
-void wr_dc_cst (uint);
-void wr_dc_adr (uint);
int icache_status (void);
void icache_enable (void);
void icache_disable(void);
@@ -484,41 +447,12 @@ void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));
#endif
ulong get_endaddr (void);
void trap_init (ulong);
-#if defined (CONFIG_4xx) || \
- defined (CONFIG_MPC5xxx) || \
- defined (CONFIG_MPC85xx) || \
- defined (CONFIG_MPC86xx) || \
- defined (CONFIG_MPC83xx)
-unsigned char in8(unsigned int);
-void out8(unsigned int, unsigned char);
-unsigned short in16(unsigned int);
-unsigned short in16r(unsigned int);
-void out16(unsigned int, unsigned short value);
-void out16r(unsigned int, unsigned short value);
-unsigned long in32(unsigned int);
-unsigned long in32r(unsigned int);
-void out32(unsigned int, unsigned long value);
-void out32r(unsigned int, unsigned long value);
-void ppcDcbf(unsigned long value);
-void ppcDcbi(unsigned long value);
-void ppcSync(void);
-void ppcDcbz(unsigned long value);
-#endif
+
#if defined (CONFIG_MICROBLAZE)
unsigned short in16(unsigned int);
void out16(unsigned int, unsigned short value);
#endif
-#if defined (CONFIG_MPC83xx)
-void ppcDWload(unsigned int *addr, unsigned int *ret);
-void ppcDWstore(unsigned int *addr, unsigned int *value);
-void disable_addr_trans(void);
-void enable_addr_trans(void);
-#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
-void ddr_enable_ecc(unsigned int dram_size);
-#endif
-#endif
-
/* $(CPU)/cpu.c */
static inline int cpumask_next(int cpu, unsigned int mask)
{
@@ -578,9 +512,6 @@ int serial_stub_tstc(struct stdio_dev *sdev);
/* $(CPU)/speed.c */
int get_clocks (void);
-#if defined(CONFIG_MPC5xxx)
-int prt_mpc5xxx_clks (void);
-#endif
#if defined(CONFIG_LH7A40X) || \
defined(CONFIG_EP93XX)
ulong get_FCLK (void);
@@ -603,23 +534,6 @@ ulong get_PERCLK3(void);
ulong get_bus_freq (ulong);
int get_serial_clock(void);
-#if defined(CONFIG_MPC85xx)
-typedef MPC85xx_SYS_INFO sys_info_t;
-void get_sys_info ( sys_info_t * );
-void ft_fixup_cpu(void *, u64);
-void ft_fixup_num_cores(void *);
-#endif
-#if defined(CONFIG_MPC86xx)
-typedef MPC86xx_SYS_INFO sys_info_t;
-void get_sys_info ( sys_info_t * );
-static inline ulong get_ddr_freq(ulong dummy)
-{
- return get_bus_freq(dummy);
-}
-#else
-ulong get_ddr_freq(ulong);
-#endif
-
int cpu_init_r (void);
/* $(CPU)/interrupts.c */
@@ -845,14 +759,6 @@ int cpu_release(int nr, int argc, char * const argv[]);
#endif /* __ASSEMBLY__ */
-#ifdef CONFIG_PPC
-/*
- * Has to be included outside of the #ifndef __ASSEMBLY__ section.
- * Otherwise might lead to compilation errors in assembler files.
- */
-#include <asm/cache.h>
-#endif
-
/* Put only stuff here that the assembler can digest */
/* Declare an unsigned long constant digestable both by C and an assembler. */
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 34/38] common: freescale: Move arch-specific imx code to arch-imx
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (32 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 33/38] common: freescale: Move arch-specific declarations Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 35/38] common: ep93xx: Move arch-specific declarations out of common Simon Glass
` (3 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
These declarations should not be in common.h. Move them to an
arch-specific header.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/arm/include/asm/arch-imx/cpu.h | 7 +++++++
include/common.h | 9 ---------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/arch/arm/include/asm/arch-imx/cpu.h b/arch/arm/include/asm/arch-imx/cpu.h
index b0524060b0..ec5b419e47 100644
--- a/arch/arm/include/asm/arch-imx/cpu.h
+++ b/arch/arm/include/asm/arch-imx/cpu.h
@@ -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);
diff --git a/include/common.h b/include/common.h
index ba31727a79..cabb0093bd 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 35/38] common: ep93xx: Move arch-specific declarations out of common
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (33 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 34/38] common: freescale: Move arch-specific imx code to arch-imx Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file " Simon Glass
` (2 subsequent siblings)
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
These declarations should not be in common. Remove those that are not
needed and move the others to an arch-specific location.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/arm/cpu/arm920t/ep93xx/speed.c | 2 +-
include/common.h | 10 ----------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/arch/arm/cpu/arm920t/ep93xx/speed.c b/arch/arm/cpu/arm920t/ep93xx/speed.c
index 9dc60b6ff2..f0ab7d4e3d 100644
--- a/arch/arm/cpu/arm920t/ep93xx/speed.c
+++ b/arch/arm/cpu/arm920t/ep93xx/speed.c
@@ -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;
diff --git a/include/common.h b/include/common.h
index cabb0093bd..19839b67f1 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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);
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file out of common
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (34 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 35/38] common: ep93xx: Move arch-specific declarations out of common Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-05-17 21:33 ` Tom Rini
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 37/38] common: arm: freescale: layerscape: Move header files out of common.h Simon Glass
2017-05-17 14:23 ` [U-Boot] [PATCH 38/38] common: microblaze: Drop arch-specific declarations Simon Glass
37 siblings, 2 replies; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(-)
diff --git a/arch/arm/mach-davinci/include/mach/davinci_misc.h b/arch/arm/mach-davinci/include/mach/davinci_misc.h
index 03be3882f8..79090e0671 100644
--- a/arch/arm/mach-davinci/include/mach/davinci_misc.h
+++ b/arch/arm/mach-davinci/include/mach/davinci_misc.h
@@ -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 */
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h
index c31f38c8a2..e11099cb93 100644
--- a/arch/arm/mach-davinci/include/mach/hardware.h
+++ b/arch/arm/mach-davinci/include/mach/hardware.h
@@ -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 */
diff --git a/include/common.h b/include/common.h
index 19839b67f1..b97b61d65d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
diff --git a/include/configs/calimain.h b/include/configs/calimain.h
index 6e2fd33563..61bae7728e 100644
--- a/include/configs/calimain.h
+++ b/include/configs/calimain.h
@@ -318,4 +318,6 @@
int calimain_get_osc_freq(void);
#endif
+#include <asm/arch/hardware.h>
+
#endif /* __CONFIG_H */
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 9442c05943..139d74882e 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -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 */
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index 3a5b5c7285..f4b3a60dd3 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -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 */
diff --git a/include/configs/ipam390.h b/include/configs/ipam390.h
index 5caf02e8d9..a83b5da599 100644
--- a/include/configs/ipam390.h
+++ b/include/configs/ipam390.h
@@ -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 */
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
index c5e7d629ab..e62af3ff42 100644
--- a/include/configs/legoev3.h
+++ b/include/configs/legoev3.h
@@ -215,4 +215,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x80010000
+#include <asm/arch/hardware.h>
+
#endif /* __CONFIG_H */
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 0cc0042bca..2de7cd5004 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -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 */
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 37/38] common: arm: freescale: layerscape: Move header files out of common.h
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (35 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file " Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 38/38] common: microblaze: Drop arch-specific declarations Simon Glass
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/soc.h b/arch/arm/include/asm/arch-fsl-layerscape/soc.h
index 426fe8ef86..a35cb9eaea 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/soc.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/soc.h
@@ -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_ */
diff --git a/arch/arm/include/asm/arch-ls102xa/clock.h b/arch/arm/include/asm/arch-ls102xa/clock.h
index c1efb9919e..a1d6afec93 100644
--- a/arch/arm/include/asm/arch-ls102xa/clock.h
+++ b/arch/arm/include/asm/arch-ls102xa/clock.h
@@ -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_ */
diff --git a/arch/arm/include/asm/arch-ls102xa/soc.h b/arch/arm/include/asm/arch-ls102xa/soc.h
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index e2d66c33ec..c0ee858a02 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -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
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index e612e7e749..3349fc5c3b 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -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
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index 8897c17e99..20edd2dc28 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -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
diff --git a/drivers/ddr/fsl/util.c b/drivers/ddr/fsl/util.c
index e59f29215a..0a305b36b8 100644
--- a/drivers/ddr/fsl/util.c
+++ b/drivers/ddr/fsl/util.c
@@ -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
diff --git a/drivers/usb/common/fsl-errata.c b/drivers/usb/common/fsl-errata.c
index 1dfa73d68e..4e642ae435 100644
--- a/drivers/usb/common/fsl-errata.c
+++ b/drivers/usb/common/fsl-errata.c
@@ -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
diff --git a/include/common.h b/include/common.h
index b97b61d65d..a413f1ae9b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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>
diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
index 09f890d55c..1d01cd9906 100644
--- a/include/configs/ls1012a_common.h
+++ b/include/configs/ls1012a_common.h
@@ -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 */
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index e26924877d..b5f36c3e57 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -307,4 +307,6 @@
#define CONFIG_SHA_HW_ACCEL
#endif
+#include <asm/arch/soc.h>
+
#endif /* __LS1043A_COMMON_H */
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index 957ffd3634..d1dc823d6a 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -236,4 +236,6 @@
#define CONFIG_SHA_HW_ACCEL
#endif
+#include <asm/arch/soc.h>
+
#endif /* __LS1046A_COMMON_H */
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 427f623e8c..baadc12e36 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -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 */
diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h
index a86f2162aa..29aa687507 100644
--- a/include/fsl_ifc.h
+++ b/include/fsl_ifc.h
@@ -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
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 38/38] common: microblaze: Drop arch-specific declarations
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
` (36 preceding siblings ...)
2017-05-17 14:23 ` [U-Boot] [PATCH 37/38] common: arm: freescale: layerscape: Move header files out of common.h Simon Glass
@ 2017-05-17 14:23 ` Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
37 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-17 14:23 UTC (permalink / raw)
To: u-boot
These are not needed and should not be in common.h. Drop them.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/common.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/include/common.h b/include/common.h
index a413f1ae9b..638c45b954 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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)
{
--
2.13.0.303.g4ebf302169-goog
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 18/38] mips: Make u-boot-mips.h a private header
2017-05-17 14:22 ` [U-Boot] [PATCH 18/38] mips: Make u-boot-mips.h " Simon Glass
@ 2017-05-17 19:27 ` Daniel Schwierzeck
2017-06-01 3:10 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 1 reply; 92+ messages in thread
From: Daniel Schwierzeck @ 2017-05-17 19:27 UTC (permalink / raw)
To: u-boot
Am 17.05.2017 um 16:22 schrieb Simon Glass:
> Rather than including this arch-specific header file in common.h, include
> it from within mips's u-boot.h header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
>
> arch/mips/include/asm/u-boot.h | 1 +
> include/common.h | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/include/asm/u-boot.h b/arch/mips/include/asm/u-boot.h
> index af03e8d5be..68985af4b9 100644
> --- a/arch/mips/include/asm/u-boot.h
> +++ b/arch/mips/include/asm/u-boot.h
> @@ -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
> diff --git a/include/common.h b/include/common.h
> index fe396c5705..f36fed3843 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -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
> #ifdef CONFIG_ARC
> # include <asm/u-boot.h>
>
--
- 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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 21/38] mips: Don't include asm/u-boot.h in common
2017-05-17 14:22 ` [U-Boot] [PATCH 21/38] mips: " Simon Glass
@ 2017-05-17 19:28 ` Daniel Schwierzeck
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Daniel Schwierzeck @ 2017-05-17 19:28 UTC (permalink / raw)
To: u-boot
Am 17.05.2017 um 16:22 schrieb Simon Glass:
> This is not actually needed anywhere, so drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
>
> include/common.h | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/include/common.h b/include/common.h
> index 83ea3c419c..298cbbc1a6 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -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);
>
--
- 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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 25/38] arm: Add explicit include of <asm/mach-types.h>
2017-05-17 14:22 ` [U-Boot] [PATCH 25/38] arm: Add explicit include of <asm/mach-types.h> Simon Glass
@ 2017-05-17 21:24 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-05-17 21:24 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:58AM -0600, Simon Glass wrote:
> Rather than relying on common.h to provide this include, which is going
> away at some point, include it explicitly in each file.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
[snip]
> diff --git a/arch/arm/lib/spl.c b/arch/arm/lib/spl.c
> index 8ff2c5065d..3ea494f5e4 100644
> --- a/arch/arm/lib/spl.c
> +++ b/arch/arm/lib/spl.c
> @@ -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:
Reviewed-by: Tom Rini <trini@konsulko.com>
Thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 28/38] arm: Remove include files from common.h
2017-05-17 14:23 ` [U-Boot] [PATCH 28/38] arm: Remove include files from common.h Simon Glass
@ 2017-05-17 21:31 ` Tom Rini
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-05-17 21:31 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:01AM -0600, Simon Glass wrote:
> With a small tweak we can avoid including these files for all boards.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file out of common
2017-05-17 14:23 ` [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file " Simon Glass
@ 2017-05-17 21:33 ` Tom Rini
2017-05-18 15:55 ` Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 1 reply; 92+ messages in thread
From: Tom Rini @ 2017-05-17 21:33 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:09AM -0600, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
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.
Reviewed-by: Tom Rini <trini@konsulko.com>
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file out of common
2017-05-17 21:33 ` Tom Rini
@ 2017-05-18 15:55 ` Simon Glass
2017-05-18 15:57 ` Tom Rini
0 siblings, 1 reply; 92+ messages in thread
From: Simon Glass @ 2017-05-18 15:55 UTC (permalink / raw)
To: u-boot
Hi Tom,
On 17 May 2017 at 15:33, Tom Rini <trini@konsulko.com> wrote:
> On Wed, May 17, 2017 at 08:23:09AM -0600, Simon Glass wrote:
>
>> 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.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
> 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.
>
> Reviewed-by: Tom Rini <trini@konsulko.com>
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
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file out of common
2017-05-18 15:55 ` Simon Glass
@ 2017-05-18 15:57 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-05-18 15:57 UTC (permalink / raw)
To: u-boot
On Thu, May 18, 2017 at 09:55:41AM -0600, Simon Glass wrote:
> Hi Tom,
>
> On 17 May 2017 at 15:33, Tom Rini <trini@konsulko.com> wrote:
> > On Wed, May 17, 2017 at 08:23:09AM -0600, Simon Glass wrote:
> >
> >> 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.
> >>
> >> Signed-off-by: Simon Glass <sjg@chromium.org>
> >
> > 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.
> >
> > Reviewed-by: Tom Rini <trini@konsulko.com>
>
> 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.
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 12/38] samsung: nand: Drop s3c2410_nand driver
2017-05-17 14:22 ` [U-Boot] [PATCH 12/38] samsung: nand: Drop s3c2410_nand driver Simon Glass
@ 2017-05-22 2:05 ` Minkyu Kang
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-06-06 0:18 ` Tom Rini
2 siblings, 0 replies; 92+ messages in thread
From: Minkyu Kang @ 2017-05-22 2:05 UTC (permalink / raw)
To: u-boot
2017. 5. 17. 23:53에 "Simon Glass" <sjg@chromium.org>님이 작성:
This is not used anymore. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 82358f674b..5d5f9f5267 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -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
diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nan
d.c
deleted file mode 100644
index dd742a6351..0000000000
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * (C) Copyright 2006 OpenMoko, Inc.
- * Author: Harald Welte <laforge@openmoko.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-
-#include <nand.h>
-#include <asm/arch/s3c24x0_cpu.h>
-#include <asm/io.h>
-
-#define S3C2410_NFCONF_EN (1<<15)
-#define S3C2410_NFCONF_512BYTE (1<<14)
-#define S3C2410_NFCONF_4STEP (1<<13)
-#define S3C2410_NFCONF_INITECC (1<<12)
-#define S3C2410_NFCONF_nFCE (1<<11)
-#define S3C2410_NFCONF_TACLS(x) ((x)<<8)
-#define S3C2410_NFCONF_TWRPH0(x) ((x)<<4)
-#define S3C2410_NFCONF_TWRPH1(x) ((x)<<0)
-
-#define S3C2410_ADDR_NALE 4
-#define S3C2410_ADDR_NCLE 8
-
-#ifdef CONFIG_NAND_SPL
-
-/* in the early stage of NAND flash booting, printf() is not available */
-#define printf(fmt, args...)
-
-static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
-{
- int i;
- struct nand_chip *this = mtd_to_nand(mtd);
-
- for (i = 0; i < len; i++)
- buf[i] = readb(this->IO_ADDR_R);
-}
-#endif
-
-static void s3c24x0_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int
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
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Thanks,
Minkyu Kang
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 13/38] samsung: Drop more references fo s3c24x0
2017-05-17 14:22 ` [U-Boot] [PATCH 13/38] samsung: Drop more references fo s3c24x0 Simon Glass
@ 2017-05-22 2:06 ` Minkyu Kang
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Minkyu Kang @ 2017-05-22 2:06 UTC (permalink / raw)
To: u-boot
2017. 5. 17. 23:54에 "Simon Glass" <sjg@chromium.org>님이 작성:
This is dead code now. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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(-)
diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S
index 3ada6d026f..3880a402d8 100644
--- a/arch/arm/cpu/arm920t/start.S
+++ b/arch/arm/cpu/arm920t/start.S
@@ -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!
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 3c69dbf409..939fbbc819 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -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>
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_
chips.h
index 973cd971ad..0e3ba94730 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -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))
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 80cfe11290..b5e0304348 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -51,7 +51,6 @@
#endif
#if defined(CONFIG_CPU_ARM920T) || \
- defined(CONFIG_S3C24X0) || \
defined(CONFIG_440EP) || \
defined(CONFIG_PCI_OHCI) || \
defined(CONFIG_MPC5200) || \
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index dd7b328d8f..10f9fb6371 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Thanks,
Minkyu Kang
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 09/38] samsung: Drop s3c24x0 arch-specific code
[not found] ` <CALrBrZ2SqS55_hV39B_sijFKEt4E0kb__y34RO9+7+wW9G5wsg@mail.gmail.com>
@ 2017-05-22 2:07 ` Minkyu Kang
0 siblings, 0 replies; 92+ messages in thread
From: Minkyu Kang @ 2017-05-22 2:07 UTC (permalink / raw)
To: u-boot
2017. 5. 18. 00:04에 "Simon Glass" <sjg@chromium.org>님이 작성:
This is not used anymore. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/arch/arm/cpu/arm920t/Makefile b/arch/arm/cpu/arm920t/Makefile
index 8faf34b87e..948b764193 100644
--- a/arch/arm/cpu/arm920t/Makefile
+++ b/arch/arm/cpu/arm920t/Makefile
@@ -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
diff --git a/arch/arm/cpu/arm920t/s3c24x0/Makefile b/arch/arm/cpu/arm920t/
s3c24x0/Makefile
deleted file mode 100644
index e78f8a017c..0000000000
--- a/arch/arm/cpu/arm920t/s3c24x0/Makefile
+++ /dev/null
@@ -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
diff --git a/arch/arm/cpu/arm920t/s3c24x0/cpu_info.c b/arch/arm/cpu/arm920t/
s3c24x0/cpu_info.c
deleted file mode 100644
index fede51a160..0000000000
--- a/arch/arm/cpu/arm920t/s3c24x0/cpu_info.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * (C) Copyright 2010
- * David Mueller <d.mueller@elsoft.ch>
- *
- * 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;
-}
diff --git a/arch/arm/cpu/arm920t/s3c24x0/speed.c b/arch/arm/cpu/arm920t/
s3c24x0/speed.c
deleted file mode 100644
index 3701c5d9a3..0000000000
--- a/arch/arm/cpu/arm920t/s3c24x0/speed.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * (C) Copyright 2001-2004
- * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
- *
- * (C) Copyright 2002
- * David Mueller, ELSOFT AG, d.mueller@elsoft.ch
- *
- * 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 */
diff --git a/arch/arm/cpu/arm920t/s3c24x0/timer.c b/arch/arm/cpu/arm920t/
s3c24x0/timer.c
deleted file mode 100644
index ba1e616b82..0000000000
--- a/arch/arm/cpu/arm920t/s3c24x0/timer.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Alex Zuepke <azu@sysgo.de>
- *
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <common.h>
-#ifdef CONFIG_S3C24X0
-
-#include <asm/io.h>
-#include <asm/arch/s3c24x0_cpu.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-int timer_init(void)
-{
- struct s3c24x0_timers *timers = s3c24x0_get_base_timers();
- ulong tmr;
-
- /* use PWM Timer 4 because it has no output */
- /* prescaler for Timer 4 is 16 */
- writel(0x0f00, &timers->tcfg0);
- if (gd->arch.tbu == 0) {
- /*
- * for 10 ms clock period @ PCLK with 4 bit divider = 1/2
- * (default) and prescaler = 16. Should be 10390
- * @33.25MHz and 15625 @ 50 MHz
- */
- gd->arch.tbu = get_PCLK() / (2 * 16 * 100);
- gd->arch.timer_rate_hz = get_PCLK() / (2 * 16);
- }
- /* load value for 10 ms timeout */
- writel(gd->arch.tbu, &timers->tcntb4);
- /* auto load, manual update of timer 4 */
- tmr = (readl(&timers->tcon) & ~0x0700000) | 0x0600000;
- writel(tmr, &timers->tcon);
- /* auto load, start timer 4 */
- tmr = (tmr & ~0x0700000) | 0x0500000;
- writel(tmr, &timers->tcon);
- gd->arch.lastinc = 0;
- gd->arch.tbl = 0;
-
- return 0;
-}
-
-/*
- * timer without interrupts
- */
-ulong get_timer(ulong base)
-{
- return get_timer_masked() - base;
-}
-
-void __udelay (unsigned long usec)
-{
- ulong tmo;
- ulong start = get_ticks();
-
- tmo = usec / 1000;
- tmo *= (gd->arch.tbu * 100);
- tmo /= 1000;
-
- while ((ulong) (get_ticks() - start) < tmo)
- /*NOP*/;
-}
-
-ulong get_timer_masked(void)
-{
- ulong tmr = get_ticks();
-
- return tmr / (gd->arch.timer_rate_hz / CONFIG_SYS_HZ);
-}
-
-void udelay_masked(unsigned long usec)
-{
- ulong tmo;
- ulong endtime;
- signed long diff;
-
- if (usec >= 1000) {
- tmo = usec / 1000;
- tmo *= (gd->arch.tbu * 100);
- tmo /= 1000;
- } else {
- tmo = usec * (gd->arch.tbu * 100);
- tmo /= (1000 * 1000);
- }
-
- endtime = get_ticks() + tmo;
-
- do {
- ulong now = get_ticks();
- diff = endtime - now;
- } while (diff >= 0);
-}
-
-/*
- * This function is derived from PowerPC code (read timebase as long long).
- * On ARM it just returns the timer value.
- */
-unsigned long long get_ticks(void)
-{
- struct s3c24x0_timers *timers = s3c24x0_get_base_timers();
- ulong now = readl(&timers->tcnto4) & 0xffff;
-
- if (gd->arch.lastinc >= now) {
- /* normal mode */
- gd->arch.tbl += gd->arch.lastinc - now;
- } else {
- /* we have an overflow ... */
- gd->arch.tbl += gd->arch.lastinc + gd->arch.tbu - now;
- }
- gd->arch.lastinc = now;
-
- return gd->arch.tbl;
-}
-
-/*
- * This function is derived from PowerPC code (timebase clock frequency).
- * On ARM it returns the number of timer ticks per second.
- */
-ulong get_tbclk(void)
-{
- return CONFIG_SYS_HZ;
-}
-
-/*
- * reset the cpu by setting up the watchdog timer and let him time out
- */
-void reset_cpu(ulong ignored)
-{
- struct s3c24x0_watchdog *watchdog;
-
- watchdog = s3c24x0_get_base_watchdog();
-
- /* Disable watchdog */
- writel(0x0000, &watchdog->wtcon);
-
- /* Initialize watchdog timer count register */
- writel(0x0001, &watchdog->wtcnt);
-
- /* Enable watchdog timer; assert reset at timer timeout */
- writel(0x0021, &watchdog->wtcon);
-
- while (1)
- /* loop forever and wait for reset to happen */;
-
- /*NOTREACHED*/
-}
-
-#endif /* CONFIG_S3C24X0 */
diff --git a/arch/arm/include/asm/arch-s3c24x0/gpio.h
b/arch/arm/include/asm/arch-s3c24x0/gpio.h
deleted file mode 100644
index a749b6491a..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/gpio.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 2012.
- *
- * Gabriel Huau <contact@huau-gabriel.fr>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef _S3C24X0_GPIO_H_
-#define _S3C24X0_GPIO_H_
-
-enum s3c2440_gpio {
- GPA0,
- GPA1,
- GPA2,
- GPA3,
- GPA4,
- GPA5,
- GPA6,
- GPA7,
- GPA8,
- GPA9,
- GPA10,
- GPA11,
- GPA12,
- GPA13,
- GPA14,
- GPA15,
- GPA16,
- GPA17,
- GPA18,
- GPA19,
- GPA20,
- GPA21,
- GPA22,
- GPA23,
- GPA24,
-
- GPB0 = 32,
- GPB1,
- GPB2,
- GPB3,
- GPB4,
- GPB5,
- GPB6,
- GPB7,
- GPB8,
- GPB9,
- GPB10,
-
- GPC0 = 64,
- GPC1,
- GPC2,
- GPC3,
- GPC4,
- GPC5,
- GPC6,
- GPC7,
- GPC8,
- GPC9,
- GPC10,
- GPC11,
- GPC12,
- GPC13,
- GPC14,
- GPC15,
-
- GPD0 = 96,
- GPD1,
- GPD2,
- GPD3,
- GPD4,
- GPD5,
- GPD6,
- GPD7,
- GPD8,
- GPD9,
- GPD10,
- GPD11,
- GPD12,
- GPD13,
- GPD14,
- GPD15,
-
- GPE0 = 128,
- GPE1,
- GPE2,
- GPE3,
- GPE4,
- GPE5,
- GPE6,
- GPE7,
- GPE8,
- GPE9,
- GPE10,
- GPE11,
- GPE12,
- GPE13,
- GPE14,
- GPE15,
-
- GPF0 = 160,
- GPF1,
- GPF2,
- GPF3,
- GPF4,
- GPF5,
- GPF6,
- GPF7,
-
- GPG0 = 192,
- GPG1,
- GPG2,
- GPG3,
- GPG4,
- GPG5,
- GPG6,
- GPG7,
- GPG8,
- GPG9,
- GPG10,
- GPG11,
- GPG12,
- GPG13,
- GPG14,
- GPG15,
-
- GPH0 = 224,
- GPH1,
- GPH2,
- GPH3,
- GPH4,
- GPH5,
- GPH6,
- GPH7,
- GPH8,
- GPH9,
- GPH10,
-
- GPJ0 = 256,
- GPJ1,
- GPJ2,
- GPJ3,
- GPJ4,
- GPJ5,
- GPJ6,
- GPJ7,
- GPJ8,
- GPJ9,
- GPJ10,
- GPJ11,
- GPJ12,
-};
-
-#endif
diff --git a/arch/arm/include/asm/arch-s3c24x0/iomux.h
b/arch/arm/include/asm/arch-s3c24x0/iomux.h
deleted file mode 100644
index 981164434d..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/iomux.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 2012
- *
- * Gabriel Huau <contact@huau-gabriel.fr>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef _S3C24X0_IOMUX_H_
-#define _S3C24X0_IOMUX_H_
-
-enum s3c2440_iomux_func {
- /* PORT A */
- IOMUXA_ADDR0 = 1,
- IOMUXA_ADDR16 = (1 << 1),
- IOMUXA_ADDR17 = (1 << 2),
- IOMUXA_ADDR18 = (1 << 3),
- IOMUXA_ADDR19 = (1 << 4),
- IOMUXA_ADDR20 = (1 << 5),
- IOMUXA_ADDR21 = (1 << 6),
- IOMUXA_ADDR22 = (1 << 7),
- IOMUXA_ADDR23 = (1 << 8),
- IOMUXA_ADDR24 = (1 << 9),
- IOMUXA_ADDR25 = (1 << 10),
- IOMUXA_ADDR26 = (1 << 11),
- IOMUXA_nGCS1 = (1 << 12),
- IOMUXA_nGCS2 = (1 << 13),
- IOMUXA_nGCS3 = (1 << 14),
- IOMUXA_nGCS4 = (1 << 15),
- IOMUXA_nGCS5 = (1 << 16),
- IOMUXA_CLE = (1 << 17),
- IOMUXA_ALE = (1 << 18),
- IOMUXA_nFWE = (1 << 19),
- IOMUXA_nFRE = (1 << 20),
- IOMUXA_nRSTOUT = (1 << 21),
- IOMUXA_nFCE = (1 << 22),
-
- /* PORT B */
- IOMUXB_nXDREQ0 = (2 << 20),
- IOMUXB_nXDACK0 = (2 << 18),
- IOMUXB_nXDREQ1 = (2 << 16),
- IOMUXB_nXDACK1 = (2 << 14),
- IOMUXB_nXBREQ = (2 << 12),
- IOMUXB_nXBACK = (2 << 10),
- IOMUXB_TCLK0 = (2 << 8),
- IOMUXB_TOUT3 = (2 << 6),
- IOMUXB_TOUT2 = (2 << 4),
- IOMUXB_TOUT1 = (2 << 2),
- IOMUXB_TOUT0 = 2,
-
- /* PORT C */
- IOMUXC_VS7 = (2 << 30),
- IOMUXC_VS6 = (2 << 28),
- IOMUXC_VS5 = (2 << 26),
- IOMUXC_VS4 = (2 << 24),
- IOMUXC_VS3 = (2 << 22),
- IOMUXC_VS2 = (2 << 20),
- IOMUXC_VS1 = (2 << 18),
- IOMUXC_VS0 = (2 << 16),
- IOMUXC_LCD_LPCREVB = (2 << 14),
- IOMUXC_LCD_LPCREV = (2 << 12),
- IOMUXC_LCD_LPCOE = (2 << 10),
- IOMUXC_VM = (2 << 8),
- IOMUXC_VFRAME = (2 << 6),
- IOMUXC_VLINE = (2 << 4),
- IOMUXC_VCLK = (2 << 2),
- IOMUXC_LEND = 2,
- IOMUXC_I2SSDI = (3 << 8),
-
- /* PORT D */
- IOMUXD_VS23 = (2 << 30),
- IOMUXD_VS22 = (2 << 28),
- IOMUXD_VS21 = (2 << 26),
- IOMUXD_VS20 = (2 << 24),
- IOMUXD_VS19 = (2 << 22),
- IOMUXD_VS18 = (2 << 20),
- IOMUXD_VS17 = (2 << 18),
- IOMUXD_VS16 = (2 << 16),
- IOMUXD_VS15 = (2 << 14),
- IOMUXD_VS14 = (2 << 12),
- IOMUXD_VS13 = (2 << 10),
- IOMUXD_VS12 = (2 << 8),
- IOMUXD_VS11 = (2 << 6),
- IOMUXD_VS10 = (2 << 4),
- IOMUXD_VS9 = (2 << 2),
- IOMUXD_VS8 = 2,
- IOMUXD_nSS0 = (3 << 30),
- IOMUXD_nSS1 = (3 << 28),
- IOMUXD_SPICLK1 = (3 << 20),
- IOMUXD_SPIMOSI1 = (3 << 18),
- IOMUXD_SPIMISO1 = (3 << 16),
-
- /* PORT E */
- IOMUXE_IICSDA = (2 << 30),
- IOMUXE_IICSCL = (2 << 28),
- IOMUXE_SPICLK0 = (2 << 26),
- IOMUXE_SPIMOSI0 = (2 << 24),
- IOMUXE_SPIMISO0 = (2 << 22),
- IOMUXE_SDDAT3 = (2 << 20),
- IOMUXE_SDDAT2 = (2 << 18),
- IOMUXE_SDDAT1 = (2 << 16),
- IOMUXE_SDDAT0 = (2 << 14),
- IOMUXE_SDCMD = (2 << 12),
- IOMUXE_SDCLK = (2 << 10),
- IOMUXE_I2SDO = (2 << 8),
- IOMUXE_I2SDI = (2 << 6),
- IOMUXE_CDCLK = (2 << 4),
- IOMUXE_I2SSCLK = (2 << 2),
- IOMUXE_I2SLRCK = 2,
- IOMUXE_AC_SDATA_OUT = (3 << 8),
- IOMUXE_AC_SDATA_IN = (3 << 6),
- IOMUXE_AC_nRESET = (3 << 4),
- IOMUXE_AC_BIT_CLK = (3 << 2),
- IOMUXE_AC_SYNC = 3,
-
- /* PORT F */
- IOMUXF_EINT7 = (2 << 14),
- IOMUXF_EINT6 = (2 << 12),
- IOMUXF_EINT5 = (2 << 10),
- IOMUXF_EINT4 = (2 << 8),
- IOMUXF_EINT3 = (2 << 6),
- IOMUXF_EINT2 = (2 << 4),
- IOMUXF_EINT1 = (2 << 2),
- IOMUXF_EINT0 = 2,
-
- /* PORT G */
- IOMUXG_EINT23 = (2 << 30),
- IOMUXG_EINT22 = (2 << 28),
- IOMUXG_EINT21 = (2 << 26),
- IOMUXG_EINT20 = (2 << 24),
- IOMUXG_EINT19 = (2 << 22),
- IOMUXG_EINT18 = (2 << 20),
- IOMUXG_EINT17 = (2 << 18),
- IOMUXG_EINT16 = (2 << 16),
- IOMUXG_EINT15 = (2 << 14),
- IOMUXG_EINT14 = (2 << 12),
- IOMUXG_EINT13 = (2 << 10),
- IOMUXG_EINT12 = (2 << 8),
- IOMUXG_EINT11 = (2 << 6),
- IOMUXG_EINT10 = (2 << 4),
- IOMUXG_EINT9 = (2 << 2),
- IOMUXG_EINT8 = 2,
- IOMUXG_TCLK1 = (3 << 22),
- IOMUXG_nCTS1 = (3 << 20),
- IOMUXG_nRTS1 = (3 << 18),
- IOMUXG_SPICLK1 = (3 << 14),
- IOMUXG_SPIMOSI1 = (3 << 12),
- IOMUXG_SPIMISO1 = (3 << 10),
- IOMUXG_LCD_PWRDN = (3 << 8),
- IOMUXG_nSS1 = (3 << 6),
- IOMUXG_nSS0 = (3 << 4),
-
- /* PORT H */
- IOMUXH_CLKOUT1 = (2 << 20),
- IOMUXH_CLKOUT0 = (2 << 18),
- IOMUXH_UEXTCLK = (2 << 16),
- IOMUXH_RXD2 = (2 << 14),
- IOMUXH_TXD2 = (2 << 12),
- IOMUXH_RXD1 = (2 << 10),
- IOMUXH_TXD1 = (2 << 8),
- IOMUXH_RXD0 = (2 << 6),
- IOMUXH_TXD0 = (2 << 4),
- IOMUXH_nRTS0 = (2 << 2),
- IOMUXH_nCTS0 = 2,
- IOMUXH_nCTS1 = (3 << 14),
- IOMUXH_nRTS1 = (3 << 12),
-
- /* PORT J */
- IOMUXJ_CAMRESET = (2 << 24),
- IOMUXJ_CAMCLKOUT = (2 << 22),
- IOMUXJ_CAMHREF = (2 << 20),
- IOMUXJ_CAMVSYNC = (2 << 18),
- IOMUXJ_CAMPCLK = (2 << 16),
- IOMUXJ_CAMDATA7 = (2 << 14),
- IOMUXJ_CAMDATA6 = (2 << 12),
- IOMUXJ_CAMDATA5 = (2 << 10),
- IOMUXJ_CAMDATA4 = (2 << 8),
- IOMUXJ_CAMDATA3 = (2 << 6),
- IOMUXJ_CAMDATA2 = (2 << 4),
- IOMUXJ_CAMDATA1 = (2 << 2),
- IOMUXJ_CAMDATA0 = 2
-};
-
-#endif
diff --git a/arch/arm/include/asm/arch-s3c24x0/memory.h
b/arch/arm/include/asm/arch-s3c24x0/memory.h
deleted file mode 100644
index d6a787b663..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/memory.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * linux/include/asm-arm/arch-s3c2400/memory.h by garyj at denx.de
- * based on
- * linux/include/asm-arm/arch-sa1100/memory.h
- *
- * Copyright (c) 1999 Nicolas Pitre <nico@visuaide.com>
- */
-
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-
-/*
- * Task size: 3GB
- */
-#define TASK_SIZE (0xc0000000UL)
-#define TASK_SIZE_26 (0x04000000UL)
-
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
-
-/*
- * Page offset: 3GB
- */
-#define PAGE_OFFSET (0xc0000000UL)
-
-/*
- * Physical DRAM offset is 0x0c000000 on the S3C2400
- */
-#define PHYS_OFFSET (0x0c000000UL)
-
-/* Modified for S3C2400, by chc, 20010509 */
-#define RAM_IN_BANK_0 32*1024*1024
-#define RAM_IN_BANK_1 0
-#define RAM_IN_BANK_2 0
-#define RAM_IN_BANK_3 0
-
-#define MEM_SIZE (RAM_IN_BANK_0+RAM_IN_BANK_1+RAM_IN_BANK_2+RAM_IN_BANK_3)
-
-
-/* translation macros */
-#define __virt_to_phys__is_a_macro
-#define __phys_to_virt__is_a_macro
-
-#if (RAM_IN_BANK_1 + RAM_IN_BANK_2 + RAM_IN_BANK_3 == 0)
-
-#define __virt_to_phys(x) ( (x) - PAGE_OFFSET + 0x0c000000 )
-#define __phys_to_virt(x) ( (x) - 0x0c000000 + PAGE_OFFSET )
-
-#elif (RAM_IN_BANK_0 == RAM_IN_BANK_1) && \
- (RAM_IN_BANK_2 + RAM_IN_BANK_3 == 0)
-
-/* Two identical banks */
-#define __virt_to_phys(x) \
- ( ((x) < PAGE_OFFSET+RAM_IN_BANK_0) ? \
- ((x) - PAGE_OFFSET + _DRAMBnk0) : \
- ((x) - PAGE_OFFSET - RAM_IN_BANK_0 + _DRAMBnk1) )
-#define __phys_to_virt(x) \
- ( ((x)&0x07ffffff) + \
- (((x)&0x08000000) ? PAGE_OFFSET+RAM_IN_BANK_0 : PAGE_OFFSET) )
-#else
-
-/* It's more efficient for all other cases to use the function call */
-#undef __virt_to_phys__is_a_macro
-#undef __phys_to_virt__is_a_macro
-extern unsigned long __virt_to_phys(unsigned long vpage);
-extern unsigned long __phys_to_virt(unsigned long ppage);
-
-#endif
-
-/*
- * Virtual view <-> DMA view memory address translations
- * virt_to_bus: Used to translate the virtual address to an
- * address suitable to be passed to set_dma_addr
- * bus_to_virt: Used to convert an address for DMA operations
- * to an address that the kernel can use.
- *
- * On the SA1100, bus addresses are equivalent to physical addresses.
- */
-#define __virt_to_bus__is_a_macro
-#define __virt_to_bus(x) __virt_to_phys(x)
-#define __bus_to_virt__is_a_macro
-#define __bus_to_virt(x) __phys_to_virt(x)
-
-
-#ifdef CONFIG_DISCONTIGMEM
-#error "CONFIG_DISCONTIGMEM will not work on S3C2400"
-/*
- * Because of the wide memory address space between physical RAM banks on
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 */
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2400.h
b/arch/arm/include/asm/arch-s3c24x0/s3c2400.h
deleted file mode 100644
index 2389118e7a..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2400.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Müller ELSOFT AG Switzerland. d.mueller at elsoft.ch
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/************************************************
- * NAME : s3c2400.h
- * Version : 31.3.2003
- *
- * Based on S3C2400X User's manual Rev 1.1
- ************************************************/
-
-#ifndef __S3C2400_H__
-#define __S3C2400_H__
-
-#define S3C24X0_UART_CHANNELS 2
-#define S3C24X0_SPI_CHANNELS 1
-#define PALETTE (0x14A00400) /* SJS */
-
-enum s3c24x0_uarts_nr {
- S3C24X0_UART0,
- S3C24X0_UART1,
-};
-
-/*S3C2400 device base addresses */
-#define S3C24X0_MEMCTL_BASE 0x14000000
-#define S3C24X0_USB_HOST_BASE 0x14200000
-#define S3C24X0_INTERRUPT_BASE 0x14400000
-#define S3C24X0_DMA_BASE 0x14600000
-#define S3C24X0_CLOCK_POWER_BASE 0x14800000
-#define S3C24X0_LCD_BASE 0x14A00000
-#define S3C24X0_UART_BASE 0x15000000
-#define S3C24X0_TIMER_BASE 0x15100000
-#define S3C24X0_USB_DEVICE_BASE 0x15200140
-#define S3C24X0_WATCHDOG_BASE 0x15300000
-#define S3C24X0_I2C_BASE 0x15400000
-#define S3C24X0_I2S_BASE 0x15508000
-#define S3C24X0_GPIO_BASE 0x15600000
-#define S3C24X0_RTC_BASE 0x15700000
-#define S3C24X0_ADC_BASE 0x15800000
-#define S3C24X0_SPI_BASE 0x15900000
-#define S3C2400_MMC_BASE 0x15A00000
-
-/* include common stuff */
-#include <asm/arch/s3c24x0.h>
-
-
-static inline struct s3c24x0_memctl *s3c24x0_get_base_memctl(void)
-{
- return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
-}
-
-static inline struct s3c24x0_usb_host *s3c24x0_get_base_usb_host(void)
-{
- return (struct s3c24x0_usb_host *)S3C24X0_USB_HOST_BASE;
-}
-
-static inline struct s3c24x0_interrupt *s3c24x0_get_base_interrupt(void)
-{
- return (struct s3c24x0_interrupt *)S3C24X0_INTERRUPT_BASE;
-}
-
-static inline struct s3c24x0_dmas *s3c24x0_get_base_dmas(void)
-{
- return (struct s3c24x0_dmas *)S3C24X0_DMA_BASE;
-}
-
-static inline struct s3c24x0_clock_power *s3c24x0_get_base_clock_power(
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__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
deleted file mode 100644
index 8773ce30d1..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Müller ELSOFT AG Switzerland. d.mueller at elsoft.ch
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/************************************************
- * NAME : s3c2410.h
- * Version : 31.3.2003
- *
- * Based on S3C2410X User's manual Rev 1.1
- ************************************************/
-
-#ifndef __S3C2410_H__
-#define __S3C2410_H__
-
-#define S3C24X0_UART_CHANNELS 3
-#define S3C24X0_SPI_CHANNELS 2
-
-/* S3C2410 only supports 512 Byte HW ECC */
-#define S3C2410_ECCSIZE 512
-#define S3C2410_ECCBYTES 3
-
-enum s3c24x0_uarts_nr {
- S3C24X0_UART0,
- S3C24X0_UART1,
- S3C24X0_UART2
-};
-
-/* S3C2410 device base addresses */
-#define S3C24X0_MEMCTL_BASE 0x48000000
-#define S3C24X0_USB_HOST_BASE 0x49000000
-#define S3C24X0_INTERRUPT_BASE 0x4A000000
-#define S3C24X0_DMA_BASE 0x4B000000
-#define S3C24X0_CLOCK_POWER_BASE 0x4C000000
-#define S3C24X0_LCD_BASE 0x4D000000
-#define S3C2410_NAND_BASE 0x4E000000
-#define S3C24X0_UART_BASE 0x50000000
-#define S3C24X0_TIMER_BASE 0x51000000
-#define S3C24X0_USB_DEVICE_BASE 0x52000140
-#define S3C24X0_WATCHDOG_BASE 0x53000000
-#define S3C24X0_I2C_BASE 0x54000000
-#define S3C24X0_I2S_BASE 0x55000000
-#define S3C24X0_GPIO_BASE 0x56000000
-#define S3C24X0_RTC_BASE 0x57000000
-#define S3C2410_ADC_BASE 0x58000000
-#define S3C24X0_SPI_BASE 0x59000000
-#define S3C2410_SDI_BASE 0x5A000000
-
-
-/* include common stuff */
-#include <asm/arch/s3c24x0.h>
-
-
-static inline struct s3c24x0_memctl *s3c24x0_get_base_memctl(void)
-{
- return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
-}
-
-static inline struct s3c24x0_usb_host *s3c24x0_get_base_usb_host(void)
-{
- return (struct s3c24x0_usb_host *)S3C24X0_USB_HOST_BASE;
-}
-
-static inline struct s3c24x0_interrupt *s3c24x0_get_base_interrupt(void)
-{
- return (struct s3c24x0_interrupt *)S3C24X0_INTERRUPT_BASE;
-}
-
-static inline struct s3c24x0_dmas *s3c24x0_get_base_dmas(void)
-{
- return (struct s3c24x0_dmas *)S3C24X0_DMA_BASE;
-}
-
-static inline struct s3c24x0_clock_power *s3c24x0_get_base_clock_power(
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__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
deleted file mode 100644
index 7a525f2818..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Mueller ELSOFT AG Switzerland. d.mueller at elsoft.ch
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/************************************************
- * NAME : s3c2440.h
- * Version : 31.3.2003
- *
- * Based on S3C2440 User's manual Rev x.x
- ************************************************/
-
-#ifndef __S3C2440_H__
-#define __S3C2440_H__
-
-#define S3C24X0_UART_CHANNELS 3
-#define S3C24X0_SPI_CHANNELS 2
-
-/* S3C2440 only supports 512 Byte HW ECC */
-#define S3C2440_ECCSIZE 512
-#define S3C2440_ECCBYTES 3
-
-enum s3c24x0_uarts_nr {
- S3C24X0_UART0,
- S3C24X0_UART1,
- S3C24X0_UART2
-};
-
-/* S3C2440 device base addresses */
-#define S3C24X0_MEMCTL_BASE 0x48000000
-#define S3C24X0_USB_HOST_BASE 0x49000000
-#define S3C24X0_INTERRUPT_BASE 0x4A000000
-#define S3C24X0_DMA_BASE 0x4B000000
-#define S3C24X0_CLOCK_POWER_BASE 0x4C000000
-#define S3C24X0_LCD_BASE 0x4D000000
-#define S3C2440_NAND_BASE 0x4E000000
-#define S3C24X0_UART_BASE 0x50000000
-#define S3C24X0_TIMER_BASE 0x51000000
-#define S3C24X0_USB_DEVICE_BASE 0x52000140
-#define S3C24X0_WATCHDOG_BASE 0x53000000
-#define S3C24X0_I2C_BASE 0x54000000
-#define S3C24X0_I2S_BASE 0x55000000
-#define S3C24X0_GPIO_BASE 0x56000000
-#define S3C24X0_RTC_BASE 0x57000000
-#define S3C2440_ADC_BASE 0x58000000
-#define S3C24X0_SPI_BASE 0x59000000
-#define S3C2440_SDI_BASE 0x5A000000
-
-/* include common stuff */
-#include <asm/arch/s3c24x0.h>
-
-static inline struct s3c24x0_memctl *s3c24x0_get_base_memctl(void)
-{
- return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
-}
-
-static inline struct s3c24x0_usb_host *s3c24x0_get_base_usb_host(void)
-{
- return (struct s3c24x0_usb_host *)S3C24X0_USB_HOST_BASE;
-}
-
-static inline struct s3c24x0_interrupt *s3c24x0_get_base_interrupt(void)
-{
- return (struct s3c24x0_interrupt *)S3C24X0_INTERRUPT_BASE;
-}
-
-static inline struct s3c24x0_dmas *s3c24x0_get_base_dmas(void)
-{
- return (struct s3c24x0_dmas *)S3C24X0_DMA_BASE;
-}
-
-static inline struct s3c24x0_clock_power *s3c24x0_get_base_clock_power(
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__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
deleted file mode 100644
index 2dae9fc3d7..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Müller ELSOFT AG Switzerland. d.mueller at elsoft.ch
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/************************************************
- * NAME : s3c24x0.h
- * Version : 31.3.2003
- *
- * common stuff for SAMSUNG S3C24X0 SoC
- ************************************************/
-
-#ifndef __S3C24X0_H__
-#define __S3C24X0_H__
-
-/* Memory controller (see manual chapter 5) */
-struct s3c24x0_memctl {
- u32 bwscon;
- u32 bankcon[8];
- u32 refresh;
- u32 banksize;
- u32 mrsrb6;
- u32 mrsrb7;
-};
-
-
-/* USB HOST (see manual chapter 12) */
-struct s3c24x0_usb_host {
- u32 HcRevision;
- u32 HcControl;
- u32 HcCommonStatus;
- u32 HcInterruptStatus;
- u32 HcInterruptEnable;
- u32 HcInterruptDisable;
- u32 HcHCCA;
- u32 HcPeriodCuttendED;
- u32 HcControlHeadED;
- u32 HcControlCurrentED;
- u32 HcBulkHeadED;
- u32 HcBuldCurrentED;
- u32 HcDoneHead;
- u32 HcRmInterval;
- u32 HcFmRemaining;
- u32 HcFmNumber;
- u32 HcPeriodicStart;
- u32 HcLSThreshold;
- u32 HcRhDescriptorA;
- u32 HcRhDescriptorB;
- u32 HcRhStatus;
- u32 HcRhPortStatus1;
- u32 HcRhPortStatus2;
-};
-
-
-/* INTERRUPT (see manual chapter 14) */
-struct s3c24x0_interrupt {
- u32 srcpnd;
- u32 intmod;
- u32 intmsk;
- u32 priority;
- u32 intpnd;
- u32 intoffset;
-#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
- u32 subsrcpnd;
- u32 intsubmsk;
-#endif
-};
-
-
-/* DMAS (see manual chapter 8) */
-struct s3c24x0_dma {
- u32 disrc;
-#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
- u32 disrcc;
-#endif
- u32 didst;
-#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
- u32 didstc;
-#endif
- u32 dcon;
- u32 dstat;
- u32 dcsrc;
- u32 dcdst;
- u32 dmasktrig;
-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) \
- || defined(CONFIG_S3C2440)
- u32 res[1];
-#endif
-};
-
-struct s3c24x0_dmas {
- struct s3c24x0_dma dma[4];
-};
-
-
-/* CLOCK & POWER MANAGEMENT (see S3C2400 manual chapter 6) */
-/* (see S3C2410 manual chapter 7) */
-struct s3c24x0_clock_power {
- u32 locktime;
- u32 mpllcon;
- u32 upllcon;
- u32 clkcon;
- u32 clkslow;
- u32 clkdivn;
-#if defined(CONFIG_S3C2440)
- u32 camdivn;
-#endif
-};
-
-
-/* LCD CONTROLLER (see manual chapter 15) */
-struct s3c24x0_lcd {
- u32 lcdcon1;
- u32 lcdcon2;
- u32 lcdcon3;
- u32 lcdcon4;
- u32 lcdcon5;
- u32 lcdsaddr1;
- u32 lcdsaddr2;
- u32 lcdsaddr3;
- u32 redlut;
- u32 greenlut;
- u32 bluelut;
- u32 res[8];
- u32 dithmode;
- u32 tpal;
-#if defined(CONFIG_S3C2410) || defined(CONFIG_S3C2440)
- u32 lcdintpnd;
- u32 lcdsrcpnd;
- u32 lcdintmsk;
- u32 lpcsel;
-#endif
-};
-
-
-/* NAND FLASH (see manual chapter 6) */
-struct s3c24x0_nand {
- u32 nfconf;
-#ifndef CONFIG_S3C2410
- u32 nfcont;
-#endif
- u32 nfcmd;
- u32 nfaddr;
- u32 nfdata;
-#ifndef CONFIG_S3C2410
- u32 nfeccd0;
- u32 nfeccd1;
- u32 nfeccd;
-#endif
- u32 nfstat;
-#ifdef CONFIG_S3C2410
- u32 nfecc;
-#else
- u32 nfstat0;
- u32 nfstat1;
- u32 nfmecc0;
- u32 nfmecc1;
- u32 nfsecc;
- u32 nfsblk;
- u32 nfeblk;
-#endif
-};
-
-/* UART (see manual chapter 11) */
-struct s3c24x0_uart {
- u32 ulcon;
- u32 ucon;
- u32 ufcon;
- u32 umcon;
- u32 utrstat;
- u32 uerstat;
- u32 ufstat;
- u32 umstat;
-#ifdef __BIG_ENDIAN
- u8 res1[3];
- u8 utxh;
- u8 res2[3];
- u8 urxh;
-#else /* Little Endian */
- u8 utxh;
- u8 res1[3];
- u8 urxh;
- u8 res2[3];
-#endif
- u32 ubrdiv;
-};
-
-
-/* PWM TIMER (see manual chapter 10) */
-struct s3c24x0_timer {
- u32 tcntb;
- u32 tcmpb;
- u32 tcnto;
-};
-
-struct s3c24x0_timers {
- u32 tcfg0;
- u32 tcfg1;
- u32 tcon;
- struct s3c24x0_timer ch[4];
- u32 tcntb4;
- u32 tcnto4;
-};
-
-
-/* USB DEVICE (see manual chapter 13) */
-struct s3c24x0_usb_dev_fifos {
-#ifdef __BIG_ENDIAN
- u8 res[3];
- u8 ep_fifo_reg;
-#else /* little endian */
- u8 ep_fifo_reg;
- u8 res[3];
-#endif
-};
-
-struct s3c24x0_usb_dev_dmas {
-#ifdef __BIG_ENDIAN
- u8 res1[3];
- u8 ep_dma_con;
- u8 res2[3];
- u8 ep_dma_unit;
- u8 res3[3];
- u8 ep_dma_fifo;
- u8 res4[3];
- u8 ep_dma_ttc_l;
- u8 res5[3];
- u8 ep_dma_ttc_m;
- u8 res6[3];
- u8 ep_dma_ttc_h;
-#else /* little endian */
- u8 ep_dma_con;
- u8 res1[3];
- u8 ep_dma_unit;
- u8 res2[3];
- u8 ep_dma_fifo;
- u8 res3[3];
- u8 ep_dma_ttc_l;
- u8 res4[3];
- u8 ep_dma_ttc_m;
- u8 res5[3];
- u8 ep_dma_ttc_h;
- u8 res6[3];
-#endif
-};
-
-struct s3c24x0_usb_device {
-#ifdef __BIG_ENDIAN
- u8 res1[3];
- u8 func_addr_reg;
- u8 res2[3];
- u8 pwr_reg;
- u8 res3[3];
- u8 ep_int_reg;
- u8 res4[15];
- u8 usb_int_reg;
- u8 res5[3];
- u8 ep_int_en_reg;
- u8 res6[15];
- u8 usb_int_en_reg;
- u8 res7[3];
- u8 frame_num1_reg;
- u8 res8[3];
- u8 frame_num2_reg;
- u8 res9[3];
- u8 index_reg;
- u8 res10[7];
- u8 maxp_reg;
- u8 res11[3];
- u8 ep0_csr_in_csr1_reg;
- u8 res12[3];
- u8 in_csr2_reg;
- u8 res13[7];
- u8 out_csr1_reg;
- u8 res14[3];
- u8 out_csr2_reg;
- u8 res15[3];
- u8 out_fifo_cnt1_reg;
- u8 res16[3];
- u8 out_fifo_cnt2_reg;
-#else /* little endian */
- u8 func_addr_reg;
- u8 res1[3];
- u8 pwr_reg;
- u8 res2[3];
- u8 ep_int_reg;
- u8 res3[15];
- u8 usb_int_reg;
- u8 res4[3];
- u8 ep_int_en_reg;
- u8 res5[15];
- u8 usb_int_en_reg;
- u8 res6[3];
- u8 frame_num1_reg;
- u8 res7[3];
- u8 frame_num2_reg;
- u8 res8[3];
- u8 index_reg;
- u8 res9[7];
- u8 maxp_reg;
- u8 res10[7];
- u8 ep0_csr_in_csr1_reg;
- u8 res11[3];
- u8 in_csr2_reg;
- u8 res12[3];
- u8 out_csr1_reg;
- u8 res13[7];
- u8 out_csr2_reg;
- u8 res14[3];
- u8 out_fifo_cnt1_reg;
- u8 res15[3];
- u8 out_fifo_cnt2_reg;
- u8 res16[3];
-#endif /* __BIG_ENDIAN */
- struct s3c24x0_usb_dev_fifos fifo[5];
- struct s3c24x0_usb_dev_dmas dma[5];
-};
-
-
-/* WATCH DOG TIMER (see manual chapter 18) */
-struct s3c24x0_watchdog {
- u32 wtcon;
- u32 wtdat;
- u32 wtcnt;
-};
-
-/* IIS (see manual chapter 21) */
-struct s3c24x0_i2s {
-#ifdef __BIG_ENDIAN
- u16 res1;
- u16 iiscon;
- u16 res2;
- u16 iismod;
- u16 res3;
- u16 iispsr;
- u16 res4;
- u16 iisfcon;
- u16 res5;
- u16 iisfifo;
-#else /* little endian */
- u16 iiscon;
- u16 res1;
- u16 iismod;
- u16 res2;
- u16 iispsr;
- u16 res3;
- u16 iisfcon;
- u16 res4;
- u16 iisfifo;
- u16 res5;
-#endif
-};
-
-
-/* I/O PORT (see manual chapter 9) */
-struct s3c24x0_gpio {
-#ifdef CONFIG_S3C2400
- u32 pacon;
- u32 padat;
-
- u32 pbcon;
- u32 pbdat;
- u32 pbup;
-
- u32 pccon;
- u32 pcdat;
- u32 pcup;
-
- u32 pdcon;
- u32 pddat;
- u32 pdup;
-
- u32 pecon;
- u32 pedat;
- u32 peup;
-
- u32 pfcon;
- u32 pfdat;
- u32 pfup;
-
- u32 pgcon;
- u32 pgdat;
- u32 pgup;
-
- u32 opencr;
-
- u32 misccr;
- u32 extint;
-#endif
-#ifdef CONFIG_S3C2410
- u32 gpacon;
- u32 gpadat;
- u32 res1[2];
- u32 gpbcon;
- u32 gpbdat;
- u32 gpbup;
- u32 res2;
- u32 gpccon;
- u32 gpcdat;
- u32 gpcup;
- u32 res3;
- u32 gpdcon;
- u32 gpddat;
- u32 gpdup;
- u32 res4;
- u32 gpecon;
- u32 gpedat;
- u32 gpeup;
- u32 res5;
- u32 gpfcon;
- u32 gpfdat;
- u32 gpfup;
- u32 res6;
- u32 gpgcon;
- u32 gpgdat;
- u32 gpgup;
- u32 res7;
- u32 gphcon;
- u32 gphdat;
- u32 gphup;
- u32 res8;
-
- u32 misccr;
- u32 dclkcon;
- u32 extint0;
- u32 extint1;
- u32 extint2;
- u32 eintflt0;
- u32 eintflt1;
- u32 eintflt2;
- u32 eintflt3;
- u32 eintmask;
- u32 eintpend;
- u32 gstatus0;
- u32 gstatus1;
- u32 gstatus2;
- u32 gstatus3;
- u32 gstatus4;
-#endif
-#if defined(CONFIG_S3C2440)
- u32 gpacon;
- u32 gpadat;
- u32 res1[2];
- u32 gpbcon;
- u32 gpbdat;
- u32 gpbup;
- u32 res2;
- u32 gpccon;
- u32 gpcdat;
- u32 gpcup;
- u32 res3;
- u32 gpdcon;
- u32 gpddat;
- u32 gpdup;
- u32 res4;
- u32 gpecon;
- u32 gpedat;
- u32 gpeup;
- u32 res5;
- u32 gpfcon;
- u32 gpfdat;
- u32 gpfup;
- u32 res6;
- u32 gpgcon;
- u32 gpgdat;
- u32 gpgup;
- u32 res7;
- u32 gphcon;
- u32 gphdat;
- u32 gphup;
- u32 res8;
-
- u32 misccr;
- u32 dclkcon;
- u32 extint0;
- u32 extint1;
- u32 extint2;
- u32 eintflt0;
- u32 eintflt1;
- u32 eintflt2;
- u32 eintflt3;
- u32 eintmask;
- u32 eintpend;
- u32 gstatus0;
- u32 gstatus1;
- u32 gstatus2;
- u32 gstatus3;
- u32 gstatus4;
-
- u32 res9;
- u32 dsc0;
- u32 dsc1;
- u32 mslcon;
- u32 gpjcon;
- u32 gpjdat;
- u32 gpjup;
- u32 res10;
-#endif
-};
-
-
-/* RTC (see manual chapter 17) */
-struct s3c24x0_rtc {
-#ifdef __BIG_ENDIAN
- u8 res1[67];
- u8 rtccon;
- u8 res2[3];
- u8 ticnt;
- u8 res3[11];
- u8 rtcalm;
- u8 res4[3];
- u8 almsec;
- u8 res5[3];
- u8 almmin;
- u8 res6[3];
- u8 almhour;
- u8 res7[3];
- u8 almdate;
- u8 res8[3];
- u8 almmon;
- u8 res9[3];
- u8 almyear;
- u8 res10[3];
- u8 rtcrst;
- u8 res11[3];
- u8 bcdsec;
- u8 res12[3];
- u8 bcdmin;
- u8 res13[3];
- u8 bcdhour;
- u8 res14[3];
- u8 bcddate;
- u8 res15[3];
- u8 bcdday;
- u8 res16[3];
- u8 bcdmon;
- u8 res17[3];
- u8 bcdyear;
-#else /* little endian */
- u8 res0[64];
- u8 rtccon;
- u8 res1[3];
- u8 ticnt;
- u8 res2[11];
- u8 rtcalm;
- u8 res3[3];
- u8 almsec;
- u8 res4[3];
- u8 almmin;
- u8 res5[3];
- u8 almhour;
- u8 res6[3];
- u8 almdate;
- u8 res7[3];
- u8 almmon;
- u8 res8[3];
- u8 almyear;
- u8 res9[3];
- u8 rtcrst;
- u8 res10[3];
- u8 bcdsec;
- u8 res11[3];
- u8 bcdmin;
- u8 res12[3];
- u8 bcdhour;
- u8 res13[3];
- u8 bcddate;
- u8 res14[3];
- u8 bcdday;
- u8 res15[3];
- u8 bcdmon;
- u8 res16[3];
- u8 bcdyear;
- u8 res17[3];
-#endif
-};
-
-
-/* ADC (see manual chapter 16) */
-struct s3c2400_adc {
- u32 adccon;
- u32 adcdat;
-};
-
-
-/* ADC (see manual chapter 16) */
-struct s3c2410_adc {
- u32 adccon;
- u32 adctsc;
- u32 adcdly;
- u32 adcdat0;
- u32 adcdat1;
-};
-
-
-/* SPI (see manual chapter 22) */
-struct s3c24x0_spi_channel {
- u8 spcon;
- u8 res1[3];
- u8 spsta;
- u8 res2[3];
- u8 sppin;
- u8 res3[3];
- u8 sppre;
- u8 res4[3];
- u8 sptdat;
- u8 res5[3];
- u8 sprdat;
- u8 res6[3];
- u8 res7[16];
-};
-
-struct s3c24x0_spi {
- struct s3c24x0_spi_channel ch[S3C24X0_SPI_CHANNELS];
-};
-
-
-/* MMC INTERFACE (see S3C2400 manual chapter 19) */
-struct s3c2400_mmc {
-#ifdef __BIG_ENDIAN
- u8 res1[3];
- u8 mmcon;
- u8 res2[3];
- u8 mmcrr;
- u8 res3[3];
- u8 mmfcon;
- u8 res4[3];
- u8 mmsta;
- u16 res5;
- u16 mmfsta;
- u8 res6[3];
- u8 mmpre;
- u16 res7;
- u16 mmlen;
- u8 res8[3];
- u8 mmcr7;
- u32 mmrsp[4];
- u8 res9[3];
- u8 mmcmd0;
- u32 mmcmd1;
- u16 res10;
- u16 mmcr16;
- u8 res11[3];
- u8 mmdat;
-#else
- u8 mmcon;
- u8 res1[3];
- u8 mmcrr;
- u8 res2[3];
- u8 mmfcon;
- u8 res3[3];
- u8 mmsta;
- u8 res4[3];
- u16 mmfsta;
- u16 res5;
- u8 mmpre;
- u8 res6[3];
- u16 mmlen;
- u16 res7;
- u8 mmcr7;
- u8 res8[3];
- u32 mmrsp[4];
- u8 mmcmd0;
- u8 res9[3];
- u32 mmcmd1;
- u16 mmcr16;
- u16 res10;
- u8 mmdat;
- u8 res11[3];
-#endif
-};
-
-
-/* SD INTERFACE (see S3C2410 manual chapter 19) */
-struct s3c24x0_sdi {
- u32 sdicon;
- u32 sdipre;
- u32 sdicarg;
- u32 sdiccon;
- u32 sdicsta;
- u32 sdirsp0;
- u32 sdirsp1;
- u32 sdirsp2;
- u32 sdirsp3;
- u32 sdidtimer;
- u32 sdibsize;
- u32 sdidcon;
- u32 sdidcnt;
- u32 sdidsta;
- u32 sdifsta;
-#ifdef CONFIG_S3C2410
- u32 sdidat;
- u32 sdiimsk;
-#else
- u32 sdiimsk;
- u32 sdidat;
-#endif
-};
-
-#ifdef CONFIG_CMD_MMC
-#include <mmc.h>
-int s3cmmc_initialize(bd_t *bis, int (*getcd)(struct mmc *),
- int (*getwp)(struct mmc *));
-#endif
-
-#endif /*__S3C24X0_H__*/
diff --git a/arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
b/arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
deleted file mode 100644
index 393cc9d9fd..0000000000
--- a/arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
+++ /dev/null
@@ -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
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Thanks,
Minkyu Kang
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 11/38] samsung: usb: Drop ohci-s3c24xx driver
[not found] ` <CALrBrZ3_833sZmpswnL-dSx_yRXUkVJAU06ZhWR1WBAGC1C66A@mail.gmail.com>
@ 2017-05-22 2:08 ` Minkyu Kang
0 siblings, 0 replies; 92+ messages in thread
From: Minkyu Kang @ 2017-05-22 2:08 UTC (permalink / raw)
To: u-boot
2017. 5. 18. 00:12에 "Simon Glass" <sjg@chromium.org>님이 작성:
This is not used anymore. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index bf354fe8d5..2baec721fd 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -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
diff --git a/drivers/usb/host/ohci-s3c24xx.c b/drivers/usb/host/ohci-
s3c24xx.c
deleted file mode 100644
index 28b9ab5176..0000000000
--- a/drivers/usb/host/ohci-s3c24xx.c
+++ /dev/null
@@ -1,1688 +0,0 @@
-/*
- * URB OHCI HCD (Host Controller Driver) for USB on the S3C2400.
- *
- * (C) Copyright 2003
- * Gary Jennejohn, DENX Software Engineering <garyj@denx.de>
- *
- * Note: Much of this code has been derived from Linux 2.4
- * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
- * (C) Copyright 2000-2002 David Brownell
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-/*
- * IMPORTANT NOTES
- * 1 - this driver is intended for use with USB Mass Storage Devices
- * (BBB) ONLY. There is NO support for Interrupt or Isochronous pipes!
- */
-
-#include <common.h>
-/* #include <pci.h> no PCI on the S3C24X0 */
-
-#if defined(CONFIG_USB_OHCI) && defined(CONFIG_S3C24X0)
-
-#include <asm/arch/s3c24x0_cpu.h>
-#include <asm/io.h>
-#include <malloc.h>
-#include <usb.h>
-#include "ohci-s3c24xx.h"
-
-#define OHCI_USE_NPS /* force NoPowerSwitching mode */
-#undef OHCI_VERBOSE_DEBUG /* not always helpful */
-
-
-/* For initializing controller (mask in an HCFS mode too) */
-#define OHCI_CONTROL_INIT \
- (OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
-
-#undef DEBUG
-#ifdef DEBUG
-#define dbg(format, arg...) printf("DEBUG: " format "\n", ## arg)
-#else
-#define dbg(format, arg...) do {} while(0)
-#endif /* DEBUG */
-#define err(format, arg...) printf("ERROR: " format "\n", ## arg)
-#undef SHOW_INFO
-#ifdef SHOW_INFO
-#define info(format, arg...) printf("INFO: " format "\n", ## arg)
-#else
-#define info(format, arg...) do {} while(0)
-#endif
-
-#define m16_swap(x) swap_16(x)
-#define m32_swap(x) swap_32(x)
-
-/* global struct ohci */
-static struct ohci gohci;
-/* this must be aligned to a 256 byte boundary */
-struct ohci_hcca ghcca[1];
-/* a pointer to the aligned storage */
-struct ohci_hcca *phcca;
-/* this allocates EDs for all possible endpoints */
-struct ohci_device ohci_dev;
-/* urb_priv */
-struct urb_priv urb_priv;
-/* RHSC flag */
-int got_rhsc;
-/* device which was disconnected */
-struct usb_device *devgone;
-/* flag guarding URB transation */
-int urb_finished = 0;
-
-/*---------------------------------------------------------
----------------*/
-
-/* AMD-756 (D2 rev) reports corrupt register contents in some cases.
- * The erratum (#4) description is incorrect. AMD's workaround waits
- * till some bits (mostly reserved) are clear; ok for all revs.
- */
-#define OHCI_QUIRK_AMD756 0xabcd
-#define read_roothub(hc, register, mask) ({ \
- u32 temp = readl (&hc->regs->roothub.register); \
- if (hc->flags & OHCI_QUIRK_AMD756) \
- while (temp & mask) \
- temp = readl (&hc->regs->roothub.register); \
- temp; })
-
-static u32 roothub_a(struct ohci *hc)
-{
- return read_roothub(hc, a, 0xfc0fe000);
-}
-static inline u32 roothub_b(struct ohci *hc)
-{
- return readl(&hc->regs->roothub.b);
-}
-static inline u32 roothub_status(struct ohci *hc)
-{
- return readl(&hc->regs->roothub.status);
-}
-static u32 roothub_portstatus(struct ohci *hc, int i)
-{
- return read_roothub(hc, portstatus[i], 0xffe0fce0);
-}
-
-/* forward declaration */
-static int hc_interrupt(void);
-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);
-
-/*---------------------------------------------------------
----------------*
- * URB support functions
- *-----------------------------------------------------------
--------------*/
-
-/* free HCD-private data associated with this URB */
-
-static void urb_free_priv(struct urb_priv *urb)
-{
- int i;
- int last;
- struct td *td;
-
- last = urb->length - 1;
- if (last >= 0) {
- for (i = 0; i <= last; i++) {
- td = urb->td[i];
- if (td) {
- td->usb_dev = NULL;
- urb->td[i] = NULL;
- }
- }
- }
-}
-
-/*---------------------------------------------------------
----------------*/
-
-#ifdef DEBUG
-static int sohci_get_current_frame_number(struct usb_device *dev);
-
-/* debug| print the main components of an URB
- * small: 0) header + data packets 1) just header */
-
-static void pkt_print(struct usb_device *dev, unsigned long pipe, void
*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(®s->revision) & 0xff;
- if (temp != 0x10)
- dbg("spec %d.%d", (temp >> 4), (temp & 0x0f));
-
- temp = readl(®s->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(®s->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(®s->intrstatus));
- ohci_dump_intr_mask("intrenable", readl(®s->intrenable));
-
- maybe_print_eds("ed_periodcurrent", readl(®s->ed_periodcurrent));
-
- maybe_print_eds("ed_controlhead", readl(®s->ed_controlhead));
- maybe_print_eds("ed_controlcurrent", readl(®s->ed_
controlcurrent));
-
- maybe_print_eds("ed_bulkhead", readl(®s->ed_bulkhead));
- maybe_print_eds("ed_bulkcurrent", readl(®s->ed_bulkcurrent));
-
- maybe_print_eds("donehead", readl(®s->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(®s->intrstatus);
- if (ints == ~(u32) 0) {
- ohci->disabled++;
- err("%s device removed!", ohci->slot_name);
- return -1;
- }
- ints &= readl(®s->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, ®s->intrdisable);
- stat = dl_done_list(&gohci, dl_reverse_done_list(&gohci));
- writel(OHCI_INTR_WDH, ®s->intrenable);
- }
-
- if (ints & OHCI_INTR_SO) {
- dbg("USB Schedule overrun\n");
- writel(OHCI_INTR_SO, ®s->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, ®s->intrdisable);
- if (ohci->ed_rm_list[frame] != NULL)
- writel(OHCI_INTR_SF, ®s->intrenable);
- stat = 0xff;
- }
-
- writel(ints, ®s->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) */
diff --git a/drivers/usb/host/ohci-s3c24xx.h b/drivers/usb/host/ohci-
s3c24xx.h
deleted file mode 100644
index f272d78859..0000000000
--- a/drivers/usb/host/ohci-s3c24xx.h
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- * URB OHCI HCD (Host Controller Driver) for USB.
- *
- * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
- * (C) Copyright 2000-2001 David Brownell <dbrownell@users.sourceforge.net>
- *
- * usb-ohci.h
- */
-
-
-static int cc_to_error[16] = {
-
-/* mapping of the OHCI CC status to error codes */
- /* No Error */ 0,
- /* CRC Error */ USB_ST_CRC_ERR,
- /* Bit Stuff */ USB_ST_BIT_ERR,
- /* Data Togg */ USB_ST_CRC_ERR,
- /* Stall */ USB_ST_STALLED,
- /* DevNotResp */ -1,
- /* PIDCheck */ USB_ST_BIT_ERR,
- /* UnExpPID */ USB_ST_BIT_ERR,
- /* DataOver */ USB_ST_BUF_ERR,
- /* DataUnder */ USB_ST_BUF_ERR,
- /* reservd */ -1,
- /* reservd */ -1,
- /* BufferOver */ USB_ST_BUF_ERR,
- /* BuffUnder */ USB_ST_BUF_ERR,
- /* Not Access */ -1,
- /* Not Access */ -1
-};
-
-/* ED States */
-#define ED_NEW 0x00
-#define ED_UNLINK 0x01
-#define ED_OPER 0x02
-#define ED_DEL 0x04
-#define ED_URB_DEL 0x08
-
-/* usb_ohci_ed */
-struct ed {
- __u32 hwINFO;
- __u32 hwTailP;
- __u32 hwHeadP;
- __u32 hwNextED;
-
- struct ed *ed_prev;
- __u8 int_period;
- __u8 int_branch;
- __u8 int_load;
- __u8 int_interval;
- __u8 state;
- __u8 type;
- __u16 last_iso;
- struct ed *ed_rm_list;
-
- struct usb_device *usb_dev;
- __u32 unused[3];
-} __attribute__ ((aligned(16)));
-
-/* TD info field */
-#define TD_CC 0xf0000000
-#define TD_CC_GET(td_p) (((td_p) >> 28) & 0x0f)
-#define TD_CC_SET(td_p, cc) \
- {(td_p) = ((td_p) & 0x0fffffff) | (((cc) & 0x0f) << 28)}
-#define TD_EC 0x0C000000
-#define TD_T 0x03000000
-#define TD_T_DATA0 0x02000000
-#define TD_T_DATA1 0x03000000
-#define TD_T_TOGGLE 0x00000000
-#define TD_R 0x00040000
-#define TD_DI 0x00E00000
-#define TD_DI_SET(X) (((X) & 0x07)<< 21)
-#define TD_DP 0x00180000
-#define TD_DP_SETUP 0x00000000
-#define TD_DP_IN 0x00100000
-#define TD_DP_OUT 0x00080000
-
-#define TD_ISO 0x00010000
-#define TD_DEL 0x00020000
-
-/* CC Codes */
-#define TD_CC_NOERROR 0x00
-#define TD_CC_CRC 0x01
-#define TD_CC_BITSTUFFING 0x02
-#define TD_CC_DATATOGGLEM 0x03
-#define TD_CC_STALL 0x04
-#define TD_DEVNOTRESP 0x05
-#define TD_PIDCHECKFAIL 0x06
-#define TD_UNEXPECTEDPID 0x07
-#define TD_DATAOVERRUN 0x08
-#define TD_DATAUNDERRUN 0x09
-#define TD_BUFFEROVERRUN 0x0C
-#define TD_BUFFERUNDERRUN 0x0D
-#define TD_NOTACCESSED 0x0F
-
-
-#define MAXPSW 1
-
-struct td {
- __u32 hwINFO;
- __u32 hwCBP; /* Current Buffer Pointer */
- __u32 hwNextTD; /* Next TD Pointer */
- __u32 hwBE; /* Memory Buffer End Pointer */
-
- __u8 unused;
- __u8 index;
- struct ed *ed;
- struct td *next_dl_td;
- struct usb_device *usb_dev;
- int transfer_len;
- __u32 data;
-
- __u32 unused2[2];
-} __attribute__ ((aligned(32)));
-
-#define OHCI_ED_SKIP (1 << 14)
-
-/*
- * The HCCA (Host Controller Communications Area) is a 256 byte
- * structure defined in the OHCI spec. that the host controller is
- * told the base address of. It must be 256-byte aligned.
- */
-
-#define NUM_INTS 32 /* part of the OHCI standard */
-struct ohci_hcca {
- __u32 int_table[NUM_INTS]; /* Interrupt ED table */
- __u16 frame_no; /* current frame number */
- __u16 pad1; /* set to 0 on each frame_no change */
- __u32 done_head; /* info returned for an interrupt */
- u8 reserved_for_hc[116];
-} __attribute__ ((aligned(256)));
-
-/*
- * Maximum number of root hub ports.
- */
-#define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports */
-
-/*
- * This is the structure of the OHCI controller's memory mapped I/O
- * region. This is Memory Mapped I/O. You must use the readl() and
- * writel() macros defined in asm/io.h to access these!!
- */
-struct ohci_regs {
- /* control and status registers */
- __u32 revision;
- __u32 control;
- __u32 cmdstatus;
- __u32 intrstatus;
- __u32 intrenable;
- __u32 intrdisable;
- /* memory pointers */
- __u32 hcca;
- __u32 ed_periodcurrent;
- __u32 ed_controlhead;
- __u32 ed_controlcurrent;
- __u32 ed_bulkhead;
- __u32 ed_bulkcurrent;
- __u32 donehead;
- /* frame counters */
- __u32 fminterval;
- __u32 fmremaining;
- __u32 fmnumber;
- __u32 periodicstart;
- __u32 lsthresh;
- /* Root hub ports */
- struct ohci_roothub_regs {
- __u32 a;
- __u32 b;
- __u32 status;
- __u32 portstatus[MAX_ROOT_PORTS];
- } roothub;
-} __attribute__ ((aligned(32)));
-
-/* OHCI CONTROL AND STATUS REGISTER MASKS */
-
-/*
- * HcControl (control) register masks
- */
-#define OHCI_CTRL_CBSR (3 << 0) /* control/bulk service ratio */
-#define OHCI_CTRL_PLE (1 << 2) /* periodic list enable */
-#define OHCI_CTRL_IE (1 << 3) /* isochronous enable */
-#define OHCI_CTRL_CLE (1 << 4) /* control list enable */
-#define OHCI_CTRL_BLE (1 << 5) /* bulk list enable */
-#define OHCI_CTRL_HCFS (3 << 6) /* host controller functional state
*/
-#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;
-}
diff --git a/include/common.h b/include/common.h
index fb4e79bb39..47076869c1 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Thanks,
Minkyu Kang
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver
2017-05-17 14:22 ` [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver Simon Glass
@ 2017-05-22 2:08 ` Minkyu Kang
2017-05-26 2:20 ` Jaehoon Chung
2017-06-06 0:18 ` [U-Boot] [U-Boot,10/38] " Tom Rini
2 siblings, 0 replies; 92+ messages in thread
From: Minkyu Kang @ 2017-05-22 2:08 UTC (permalink / raw)
To: u-boot
2017. 5. 18. 00:18에 "Simon Glass" <sjg@chromium.org>님이 작성:
This is no-longer used in U-Boot. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index a078649899..2d781c38a6 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -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
diff --git a/drivers/mmc/s3c_sdi.c b/drivers/mmc/s3c_sdi.c
deleted file mode 100644
index faf7b83a14..0000000000
--- a/drivers/mmc/s3c_sdi.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * S3C24xx SD/MMC driver
- *
- * Based on OpenMoko S3C24xx driver by Harald Welte <laforge@openmoko.org>
- *
- * Copyright (C) 2014 Marek Vasut <marex@denx.de>
- *
- * 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,
- * @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;
-}
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index fa9c3fc8cb..dd7b328d8f 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Thanks,
Minkyu Kang
^ permalink raw reply related [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver
2017-05-17 14:22 ` [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver Simon Glass
2017-05-22 2:08 ` Minkyu Kang
@ 2017-05-26 2:20 ` Jaehoon Chung
2017-06-06 0:18 ` [U-Boot] [U-Boot,10/38] " Tom Rini
2 siblings, 0 replies; 92+ messages in thread
From: Jaehoon Chung @ 2017-05-26 2:20 UTC (permalink / raw)
To: u-boot
On 05/17/2017 11:22 PM, Simon Glass wrote:
> This is no-longer used in U-Boot. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>
> 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
>
> diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
> index a078649899..2d781c38a6 100644
> --- a/drivers/mmc/Makefile
> +++ b/drivers/mmc/Makefile
> @@ -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
> diff --git a/drivers/mmc/s3c_sdi.c b/drivers/mmc/s3c_sdi.c
> deleted file mode 100644
> index faf7b83a14..0000000000
> --- a/drivers/mmc/s3c_sdi.c
> +++ /dev/null
> @@ -1,323 +0,0 @@
> -/*
> - * S3C24xx SD/MMC driver
> - *
> - * Based on OpenMoko S3C24xx driver by Harald Welte <laforge@openmoko.org>
> - *
> - * Copyright (C) 2014 Marek Vasut <marex@denx.de>
> - *
> - * 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;
> -}
> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> index fa9c3fc8cb..dd7b328d8f 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -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
>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [PATCH 18/38] mips: Make u-boot-mips.h a private header
2017-05-17 19:27 ` Daniel Schwierzeck
@ 2017-06-01 3:10 ` Simon Glass
0 siblings, 0 replies; 92+ messages in thread
From: Simon Glass @ 2017-06-01 3:10 UTC (permalink / raw)
To: u-boot
Hi Daniel,
On 17 May 2017 at 13:27, Daniel Schwierzeck
<daniel.schwierzeck@gmail.com> wrote:
>
>
> Am 17.05.2017 um 16:22 schrieb Simon Glass:
>> Rather than including this arch-specific header file in common.h, include
>> it from within mips's u-boot.h header.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
>
>> ---
>>
>> arch/mips/include/asm/u-boot.h | 1 +
>> include/common.h | 2 +-
>> 2 files changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/mips/include/asm/u-boot.h b/arch/mips/include/asm/u-boot.h
>> index af03e8d5be..68985af4b9 100644
>> --- a/arch/mips/include/asm/u-boot.h
>> +++ b/arch/mips/include/asm/u-boot.h
>> @@ -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
>> diff --git a/include/common.h b/include/common.h
>> index fe396c5705..f36fed3843 100644
>> --- a/include/common.h
>> +++ b/include/common.h
>> @@ -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.
>
>> #ifdef CONFIG_ARC
>> # include <asm/u-boot.h>
>>
>
> --
> - Daniel
>
Regards,
Simon
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot,01/38] common: Drop inclusion of pci.h
2017-05-17 14:22 ` [U-Boot] [PATCH 01/38] common: Drop inclusion of pci.h Simon Glass
@ 2017-06-06 0:17 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:17 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:34AM -0600, Simon Glass wrote:
> This should not be in common.h - remove it and update the only file that
> needs it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 02/38] common: Drop pci_pre_init() and is_pci_host()
2017-05-17 14:22 ` [U-Boot] [PATCH 02/38] common: Drop pci_pre_init() and is_pci_host() Simon Glass
@ 2017-06-06 0:17 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:17 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:35AM -0600, Simon Glass wrote:
> These should not be in common.h. They are used in some legacy PowerPC
> code. Just drop them.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 03/38] common: Move pci_target_init() to PPC header
2017-05-17 14:22 ` [U-Boot] [PATCH 03/38] common: Move pci_target_init() to PPC header Simon Glass
@ 2017-06-06 0:17 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:17 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:36AM -0600, Simon Glass wrote:
> Only one boards needs this definition. Move it to an arch-specific header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot,04/38] common: Drop pci_master_init()
2017-05-17 14:22 ` [U-Boot] [PATCH 04/38] common: Drop pci_master_init() Simon Glass
@ 2017-06-06 0:17 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:17 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:37AM -0600, Simon Glass wrote:
> This should not be in common.h. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 05/38] common: Move pcie_setup_hoses() to PPC header
2017-05-17 14:22 ` [U-Boot] [PATCH 05/38] common: Move pcie_setup_hoses() to PPC header Simon Glass
@ 2017-06-06 0:17 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:17 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:38AM -0600, Simon Glass wrote:
> Only one board needs this definition. Move it to an arch-specific header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 06/38] common: Move get_OPB_freq() and get_PCI_freq() to PPC header
2017-05-17 14:22 ` [U-Boot] [PATCH 06/38] common: Move get_OPB_freq() and get_PCI_freq() " Simon Glass
@ 2017-06-06 0:17 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:17 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:39AM -0600, Simon Glass wrote:
> These should not be in common.h. Move the to an arch-specific header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot,07/38] api: Add a header for api_init()
2017-05-17 14:22 ` [U-Boot] [PATCH 07/38] api: Add a header for api_init() Simon Glass
@ 2017-06-06 0:17 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:17 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:40AM -0600, Simon Glass wrote:
> Put this in its own header instead of using common.h.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 08/38] gpio: samsung: Drop s3c2440_gpio driver
2017-05-17 14:22 ` [U-Boot] [PATCH 08/38] gpio: samsung: Drop s3c2440_gpio driver Simon Glass
@ 2017-06-06 0:18 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:41AM -0600, Simon Glass wrote:
> This is no longer used in U-Boot. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 09/38] samsung: Drop s3c24x0 arch-specific code
2017-05-17 14:22 ` [U-Boot] [PATCH 09/38] samsung: Drop s3c24x0 arch-specific code Simon Glass
[not found] ` <CALrBrZ2SqS55_hV39B_sijFKEt4E0kb__y34RO9+7+wW9G5wsg@mail.gmail.com>
@ 2017-06-06 0:18 ` Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:42AM -0600, Simon Glass wrote:
> This is not used anymore. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot,10/38] samsung: mmc: Drop s3c_sdi driver
2017-05-17 14:22 ` [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver Simon Glass
2017-05-22 2:08 ` Minkyu Kang
2017-05-26 2:20 ` Jaehoon Chung
@ 2017-06-06 0:18 ` Tom Rini
2 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:43AM -0600, Simon Glass wrote:
> This is no-longer used in U-Boot. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot,11/38] samsung: usb: Drop ohci-s3c24xx driver
2017-05-17 14:22 ` [U-Boot] [PATCH 11/38] samsung: usb: Drop ohci-s3c24xx driver Simon Glass
[not found] ` <CALrBrZ3_833sZmpswnL-dSx_yRXUkVJAU06ZhWR1WBAGC1C66A@mail.gmail.com>
@ 2017-06-06 0:18 ` Tom Rini
2017-06-06 0:44 ` Marek Vasut
1 sibling, 1 reply; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:44AM -0600, Simon Glass wrote:
> This is not used anymore. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 12/38] samsung: nand: Drop s3c2410_nand driver
2017-05-17 14:22 ` [U-Boot] [PATCH 12/38] samsung: nand: Drop s3c2410_nand driver Simon Glass
2017-05-22 2:05 ` Minkyu Kang
@ 2017-06-06 0:18 ` Tom Rini
2017-06-06 0:18 ` Tom Rini
2 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:45AM -0600, Simon Glass wrote:
> This is not used anymore. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 12/38] samsung: nand: Drop s3c2410_nand driver
2017-05-17 14:22 ` [U-Boot] [PATCH 12/38] samsung: nand: Drop s3c2410_nand driver Simon Glass
2017-05-22 2:05 ` Minkyu Kang
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
@ 2017-06-06 0:18 ` Tom Rini
2 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:45AM -0600, Simon Glass wrote:
> This is not used anymore. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 13/38] samsung: Drop more references fo s3c24x0
2017-05-17 14:22 ` [U-Boot] [PATCH 13/38] samsung: Drop more references fo s3c24x0 Simon Glass
2017-05-22 2:06 ` Minkyu Kang
@ 2017-06-06 0:18 ` Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:46AM -0600, Simon Glass wrote:
> This is dead code now. Drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 14/38] arc: Make u-boot-arc.h a private header
2017-05-17 14:22 ` [U-Boot] [PATCH 14/38] arc: Make u-boot-arc.h a private header Simon Glass
@ 2017-06-06 0:18 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:47AM -0600, Simon Glass wrote:
> Rather than including this arch-specific header file in common.h, include
> it from within arc's u-boot.h header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 15/38] sandbox: Make u-boot-sandbox.h a private header
2017-05-17 14:22 ` [U-Boot] [PATCH 15/38] sandbox: Make u-boot-sandbox.h " Simon Glass
@ 2017-06-06 0:18 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:48AM -0600, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 16/38] x86: Make u-boot-x86.h a private header
2017-05-17 14:22 ` [U-Boot] [PATCH 16/38] x86: Make u-boot-x86.h " Simon Glass
@ 2017-06-06 0:18 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:49AM -0600, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 17/38] arm: Make u-boot-arm.h a private header
2017-05-17 14:22 ` [U-Boot] [PATCH 17/38] arm: Make u-boot-arm.h " Simon Glass
@ 2017-06-06 0:18 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:18 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:50AM -0600, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 18/38] mips: Make u-boot-mips.h a private header
2017-05-17 14:22 ` [U-Boot] [PATCH 18/38] mips: Make u-boot-mips.h " Simon Glass
2017-05-17 19:27 ` Daniel Schwierzeck
@ 2017-06-06 0:19 ` Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:51AM -0600, Simon Glass wrote:
> Rather than including this arch-specific header file in common.h, include
> it from within mips's u-boot.h header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 19/38] nds32: Make u-boot-nds32.h a private header
2017-05-17 14:22 ` [U-Boot] [PATCH 19/38] nds32: Make u-boot-nds32.h " Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:52AM -0600, Simon Glass wrote:
> Rather than including this arch-specific header file in common.h, include
> it from within nds32's u-boot.h header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 20/38] arc: Don't include asm/u-boot.h in common
2017-05-17 14:22 ` [U-Boot] [PATCH 20/38] arc: Don't include asm/u-boot.h in common Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:53AM -0600, Simon Glass wrote:
> This is not actually needed anywhere, so drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 21/38] mips: Don't include asm/u-boot.h in common
2017-05-17 14:22 ` [U-Boot] [PATCH 21/38] mips: " Simon Glass
2017-05-17 19:28 ` Daniel Schwierzeck
@ 2017-06-06 0:19 ` Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:54AM -0600, Simon Glass wrote:
> This is not actually needed anywhere, so drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 22/38] sandbox: Don't include asm/u-boot.h in common
2017-05-17 14:22 ` [U-Boot] [PATCH 22/38] sandbox: " Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:55AM -0600, Simon Glass wrote:
> This is not actually needed anywhere, so drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 23/38] x86: Don't include asm/u-boot.h in common
2017-05-17 14:22 ` [U-Boot] [PATCH 23/38] x86: " Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:56AM -0600, Simon Glass wrote:
> With a small fixup to u-boot-x86.h, this is not actually needed anywhere,
> so drop it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 24/38] nds32: Remove include files from common.h
2017-05-17 14:22 ` [U-Boot] [PATCH 24/38] nds32: Remove include files from common.h Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:57AM -0600, Simon Glass wrote:
> With a few tweaks we can avoid including these files, which are only
> needed by two C files.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 26/38] arm: Add declarations to avoid needing to include headers
2017-05-17 14:22 ` [U-Boot] [PATCH 26/38] arm: Add declarations to avoid needing to include headers Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:22:59AM -0600, Simon Glass wrote:
> At present common.h includes various ARM-specific headers. In preparation
> for dropping this, add a few explicit declarations.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot,27/38] arm: Include asm/setup.h explictly
2017-05-17 14:23 ` [U-Boot] [PATCH 27/38] arm: Include asm/setup.h explictly Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:00AM -0600, Simon Glass wrote:
> Include this header where needed so we do not need to rely on common.h.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 28/38] arm: Remove include files from common.h
2017-05-17 14:23 ` [U-Boot] [PATCH 28/38] arm: Remove include files from common.h Simon Glass
2017-05-17 21:31 ` Tom Rini
@ 2017-06-06 0:19 ` Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:01AM -0600, Simon Glass wrote:
> With a small tweak we can avoid including these files for all boards.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot,29/38] common: Drop cpu_init_f() declarations
2017-05-17 14:23 ` [U-Boot] [PATCH 29/38] common: Drop cpu_init_f() declarations Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:02AM -0600, Simon Glass wrote:
> These arch-specific functions are not needed here.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 30/38] common: Drop determine_sysper() and determine_pci_clock_per()
2017-05-17 14:23 ` [U-Boot] [PATCH 30/38] common: Drop determine_sysper() and determine_pci_clock_per() Simon Glass
@ 2017-06-06 0:19 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:19 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:03AM -0600, Simon Glass wrote:
> These arch-specific declarations should not be in common.h. Drop them.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 31/38] common: Move PPC4xx_SYS_INFO() et al to arch-specific header
2017-05-17 14:23 ` [U-Boot] [PATCH 31/38] common: Move PPC4xx_SYS_INFO() et al to arch-specific header Simon Glass
@ 2017-06-06 0:20 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:20 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:04AM -0600, Simon Glass wrote:
> These definitions should not be in common.h. Move them to an arch-specific
> header file.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 32/38] common: powerpc: Move arch-specific headers
2017-05-17 14:23 ` [U-Boot] [PATCH 32/38] common: powerpc: Move arch-specific headers Simon Glass
@ 2017-06-06 0:20 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:20 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:05AM -0600, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 33/38] common: freescale: Move arch-specific declarations
2017-05-17 14:23 ` [U-Boot] [PATCH 33/38] common: freescale: Move arch-specific declarations Simon Glass
@ 2017-06-06 0:20 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:20 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:06AM -0600, Simon Glass wrote:
> The declarations should not be in common.h. Move them to the arch-specific
> headers.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 34/38] common: freescale: Move arch-specific imx code to arch-imx
2017-05-17 14:23 ` [U-Boot] [PATCH 34/38] common: freescale: Move arch-specific imx code to arch-imx Simon Glass
@ 2017-06-06 0:20 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:20 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:07AM -0600, Simon Glass wrote:
> These declarations should not be in common.h. Move them to an
> arch-specific header.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 35/38] common: ep93xx: Move arch-specific declarations out of common
2017-05-17 14:23 ` [U-Boot] [PATCH 35/38] common: ep93xx: Move arch-specific declarations out of common Simon Glass
@ 2017-06-06 0:20 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:20 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:08AM -0600, Simon Glass wrote:
> These declarations should not be in common. Remove those that are not
> needed and move the others to an arch-specific location.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 36/38] common: arm: davinci: Move header file out of common
2017-05-17 14:23 ` [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file " Simon Glass
2017-05-17 21:33 ` Tom Rini
@ 2017-06-06 0:20 ` Tom Rini
1 sibling, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:20 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:09AM -0600, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 37/38] common: arm: freescale: layerscape: Move header files out of common.h
2017-05-17 14:23 ` [U-Boot] [PATCH 37/38] common: arm: freescale: layerscape: Move header files out of common.h Simon Glass
@ 2017-06-06 0:20 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:20 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:10AM -0600, Simon Glass wrote:
> 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.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot, 38/38] common: microblaze: Drop arch-specific declarations
2017-05-17 14:23 ` [U-Boot] [PATCH 38/38] common: microblaze: Drop arch-specific declarations Simon Glass
@ 2017-06-06 0:20 ` Tom Rini
0 siblings, 0 replies; 92+ messages in thread
From: Tom Rini @ 2017-06-06 0:20 UTC (permalink / raw)
To: u-boot
On Wed, May 17, 2017 at 08:23:11AM -0600, Simon Glass wrote:
> These are not needed and should not be in common.h. Drop them.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 92+ messages in thread
* [U-Boot] [U-Boot,11/38] samsung: usb: Drop ohci-s3c24xx driver
2017-06-06 0:18 ` [U-Boot] [U-Boot,11/38] " Tom Rini
@ 2017-06-06 0:44 ` Marek Vasut
0 siblings, 0 replies; 92+ messages in thread
From: Marek Vasut @ 2017-06-06 0:44 UTC (permalink / raw)
To: u-boot
On 06/06/2017 02:18 AM, Tom Rini wrote:
> On Wed, May 17, 2017 at 08:22:44AM -0600, Simon Glass wrote:
>
>> This is not used anymore. Drop it.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
> 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.
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 92+ messages in thread
end of thread, other threads:[~2017-06-06 0:44 UTC | newest]
Thread overview: 92+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 14:22 [U-Boot] [PATCH 00/38] common: Reduce size of common.h Simon Glass
2017-05-17 14:22 ` [U-Boot] [PATCH 01/38] common: Drop inclusion of pci.h Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot,01/38] " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 02/38] common: Drop pci_pre_init() and is_pci_host() Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 03/38] common: Move pci_target_init() to PPC header Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 04/38] common: Drop pci_master_init() Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot,04/38] " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 05/38] common: Move pcie_setup_hoses() to PPC header Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 06/38] common: Move get_OPB_freq() and get_PCI_freq() " Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 07/38] api: Add a header for api_init() Simon Glass
2017-06-06 0:17 ` [U-Boot] [U-Boot,07/38] " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 08/38] gpio: samsung: Drop s3c2440_gpio driver Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 09/38] samsung: Drop s3c24x0 arch-specific code Simon Glass
[not found] ` <CALrBrZ2SqS55_hV39B_sijFKEt4E0kb__y34RO9+7+wW9G5wsg@mail.gmail.com>
2017-05-22 2:07 ` Minkyu Kang
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 10/38] samsung: mmc: Drop s3c_sdi driver Simon Glass
2017-05-22 2:08 ` Minkyu Kang
2017-05-26 2:20 ` Jaehoon Chung
2017-06-06 0:18 ` [U-Boot] [U-Boot,10/38] " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 11/38] samsung: usb: Drop ohci-s3c24xx driver Simon Glass
[not found] ` <CALrBrZ3_833sZmpswnL-dSx_yRXUkVJAU06ZhWR1WBAGC1C66A@mail.gmail.com>
2017-05-22 2:08 ` Minkyu Kang
2017-06-06 0:18 ` [U-Boot] [U-Boot,11/38] " Tom Rini
2017-06-06 0:44 ` Marek Vasut
2017-05-17 14:22 ` [U-Boot] [PATCH 12/38] samsung: nand: Drop s3c2410_nand driver Simon Glass
2017-05-22 2:05 ` Minkyu Kang
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-06-06 0:18 ` Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 13/38] samsung: Drop more references fo s3c24x0 Simon Glass
2017-05-22 2:06 ` Minkyu Kang
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 14/38] arc: Make u-boot-arc.h a private header Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 15/38] sandbox: Make u-boot-sandbox.h " Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 16/38] x86: Make u-boot-x86.h " Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 17/38] arm: Make u-boot-arm.h " Simon Glass
2017-06-06 0:18 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 18/38] mips: Make u-boot-mips.h " Simon Glass
2017-05-17 19:27 ` Daniel Schwierzeck
2017-06-01 3:10 ` Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 19/38] nds32: Make u-boot-nds32.h " Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 20/38] arc: Don't include asm/u-boot.h in common Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 21/38] mips: " Simon Glass
2017-05-17 19:28 ` Daniel Schwierzeck
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 22/38] sandbox: " Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 23/38] x86: " Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 24/38] nds32: Remove include files from common.h Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 25/38] arm: Add explicit include of <asm/mach-types.h> Simon Glass
2017-05-17 21:24 ` Tom Rini
2017-05-17 14:22 ` [U-Boot] [PATCH 26/38] arm: Add declarations to avoid needing to include headers Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 27/38] arm: Include asm/setup.h explictly Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot,27/38] " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 28/38] arm: Remove include files from common.h Simon Glass
2017-05-17 21:31 ` Tom Rini
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 29/38] common: Drop cpu_init_f() declarations Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot,29/38] " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 30/38] common: Drop determine_sysper() and determine_pci_clock_per() Simon Glass
2017-06-06 0:19 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 31/38] common: Move PPC4xx_SYS_INFO() et al to arch-specific header Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 32/38] common: powerpc: Move arch-specific headers Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 33/38] common: freescale: Move arch-specific declarations Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 34/38] common: freescale: Move arch-specific imx code to arch-imx Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 35/38] common: ep93xx: Move arch-specific declarations out of common Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 36/38] common: arm: davinci: Move header file " Simon Glass
2017-05-17 21:33 ` Tom Rini
2017-05-18 15:55 ` Simon Glass
2017-05-18 15:57 ` Tom Rini
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 37/38] common: arm: freescale: layerscape: Move header files out of common.h Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
2017-05-17 14:23 ` [U-Boot] [PATCH 38/38] common: microblaze: Drop arch-specific declarations Simon Glass
2017-06-06 0:20 ` [U-Boot] [U-Boot, " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.