common: Reduce size of common.h
Subsystems (25)
cover common: Reduce size of common.h
This file was traditionally a dumping ground for common declarations. It should really only contain things that nearly every file needs, such as the configuration.
Perhaps the worst part is that there is arch-specific code in this file. There are plenty of arch-specific places where this should go instead.
This series makes a start at cleaning up by removing almost all the arch-specific code from this header file.
Simon Glass (38):
common: Drop inclusion of pci.h
common: Drop pci_pre_init() and is_pci_host()
common: Move pci_target_init() to PPC header
common: Drop pci_master_init()
common: Move pcie_setup_hoses() to PPC header
common: Move get_OPB_freq() and get_PCI_freq() to PPC header
api: Add a header for api_init()
gpio: samsung: Drop s3c2440_gpio driver
samsung: Drop s3c24x0 arch-specific code
samsung: mmc: Drop s3c_sdi driver
samsung: usb: Drop ohci-s3c24xx driver
samsung: nand: Drop s3c2410_nand driver
samsung: Drop more references fo s3c24x0
arc: Make u-boot-arc.h a private header
sandbox: Make u-boot-sandbox.h a private header
x86: Make u-boot-x86.h a private header
arm: Make u-boot-arm.h a private header
mips: Make u-boot-mips.h a private header
nds32: Make u-boot-nds32.h a private header
arc: Don't include asm/u-boot.h in common
mips: Don't include asm/u-boot.h in common
sandbox: Don't include asm/u-boot.h in common
x86: Don't include asm/u-boot.h in common
nds32: Remove include files from common.h
arm: Add explicit include of <asm/mach-types.h>
arm: Add declarations to avoid needing to include headers
arm: Include asm/setup.h explictly
arm: Remove include files from common.h
common: Drop cpu_init_f() declarations
common: Drop determine_sysper() and determine_pci_clock_per()
common: Move PPC4xx_SYS_INFO() et al to arch-specific header
common: powerpc: Move arch-specific headers
common: freescale: Move arch-specific declarations
common: freescale: Move arch-specific imx code to arch-imx
common: ep93xx: Move arch-specific declarations out of common
common: arm: davinci: Move header file out of common
common: arm: freescale: layerscape: Move header files out of common.h
common: microblaze: Drop arch-specific declarations
arch/arc/include/asm/u-boot.h | 1 + arch/arm/cpu/arm920t/Makefile | 1 - arch/arm/cpu/arm920t/ep93xx/speed.c | 2 +- arch/arm/cpu/arm920t/s3c24x0/Makefile | 10 - arch/arm/cpu/arm920t/s3c24x0/cpu_info.c | 38 - arch/arm/cpu/arm920t/s3c24x0/speed.c | 102 -- arch/arm/cpu/arm920t/s3c24x0/timer.c | 160 -- arch/arm/cpu/arm920t/start.S | 37 - arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + arch/arm/include/asm/arch-fsl-layerscape/clock.h | 2 + arch/arm/include/asm/arch-fsl-layerscape/cpu.h | 1 + arch/arm/include/asm/arch-fsl-layerscape/soc.h | 11 + arch/arm/include/asm/arch-imx/cpu.h | 7 + arch/arm/include/asm/arch-ls102xa/clock.h | 2 + arch/arm/include/asm/arch-ls102xa/soc.h | 0 arch/arm/include/asm/arch-s3c24x0/gpio.h | 155 -- arch/arm/include/asm/arch-s3c24x0/iomux.h | 184 --- arch/arm/include/asm/arch-s3c24x0/memory.h | 159 -- arch/arm/include/asm/arch-s3c24x0/s3c2400.h | 136 -- arch/arm/include/asm/arch-s3c24x0/s3c2410.h | 147 -- arch/arm/include/asm/arch-s3c24x0/s3c2440.h | 145 -- arch/arm/include/asm/arch-s3c24x0/s3c24x0.h | 708 --------- arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h | 16 - arch/arm/include/asm/bootm.h | 1 + arch/arm/include/asm/omap_common.h | 2 + arch/arm/include/asm/u-boot-arm.h | 6 + arch/arm/include/asm/u-boot.h | 1 + arch/arm/lib/bootm.c | 1 + arch/arm/lib/spl.c | 3 + arch/arm/mach-davinci/include/mach/davinci_misc.h | 2 + arch/arm/mach-davinci/include/mach/hardware.h | 5 +- arch/arm/mach-omap2/utils.c | 1 + arch/mips/include/asm/u-boot.h | 1 + arch/nds32/include/asm/u-boot.h | 2 + arch/nds32/lib/bootm.c | 1 + arch/powerpc/cpu/ppc4xx/4xx_pci.c | 1 + arch/powerpc/cpu/ppc4xx/miiphy.c | 1 + arch/powerpc/cpu/ppc4xx/reginfo.c | 1 + arch/powerpc/include/asm/4xx_pci.h | 2 + arch/powerpc/include/asm/ppc.h | 164 ++ arch/powerpc/include/asm/ppc4xx.h | 7 + arch/powerpc/include/asm/u-boot.h | 1 + arch/sandbox/include/asm/u-boot.h | 1 + arch/x86/include/asm/u-boot-x86.h | 4 +- arch/x86/include/asm/u-boot.h | 1 + board/AndesTech/adp-ag101p/adp-ag101p.c | 1 + board/Barix/ipam390/ipam390.c | 1 + board/LaCie/edminiv2/edminiv2.c | 1 + board/LaCie/net2big_v2/net2big_v2.c | 1 + board/LaCie/netspace_v2/netspace_v2.c | 1 + board/Marvell/aspenite/aspenite.c | 1 + board/Marvell/gplugd/gplugd.c | 1 + board/Marvell/guruplug/guruplug.c | 1 + board/Marvell/openrd/openrd.c | 1 + board/Marvell/sheevaplug/sheevaplug.c | 1 + board/Seagate/dockstar/dockstar.c | 1 + board/Seagate/goflexhome/goflexhome.c | 1 + board/Seagate/nas220/nas220.c | 1 + board/Synology/ds109/ds109.c | 1 + board/amazon/kc1/kc1.c | 1 + board/armltd/integrator/integrator.c | 1 + board/armltd/vexpress/vexpress_common.c | 1 + board/atmel/at91rm9200ek/at91rm9200ek.c | 1 + board/atmel/at91sam9261ek/at91sam9261ek.c | 1 + board/atmel/at91sam9263ek/at91sam9263ek.c | 1 + board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 1 + board/atmel/at91sam9rlek/at91sam9rlek.c | 1 + board/atmel/at91sam9x5ek/at91sam9x5ek.c | 1 + board/bluegiga/apx4devkit/apx4devkit.c | 1 + board/bluewater/gurnard/gurnard.c | 1 + board/bluewater/snapper9260/snapper9260.c | 1 + board/cirrus/edb93xx/edb93xx.c | 1 + board/compulab/common/common.c | 1 + board/compulab/common/eeprom.c | 1 + board/davinci/da8xxevm/da850evm.c | 1 + board/davinci/da8xxevm/omapl138_lcdk.c | 1 + board/davinci/ea20/ea20.c | 1 + board/esd/meesc/meesc.c | 2 + board/freescale/ls1021aqds/ddr.c | 1 + board/freescale/ls1043aqds/ddr.c | 1 + board/freescale/ls1043ardb/ddr.c | 1 + board/freescale/ls1046aqds/ddr.c | 1 + board/freescale/ls1046ardb/ddr.c | 1 + board/freescale/ls2080a/ddr.c | 1 + board/freescale/ls2080aqds/ddr.c | 1 + board/freescale/ls2080ardb/ddr.c | 1 + board/freescale/mx35pdk/mx35pdk.c | 1 + board/gateworks/gw_ventana/gw_ventana.c | 1 + board/gumstix/duovero/duovero.c | 1 + board/h2200/h2200.c | 1 + board/imx31_phycore/imx31_phycore.c | 1 + board/lego/ev3/legoev3.c | 2 + board/mini-box/picosam9g45/picosam9g45.c | 1 + board/nvidia/seaboard/seaboard.c | 1 + board/overo/common.c | 1 + board/ronetix/pm9261/pm9261.c | 1 + board/ronetix/pm9263/pm9263.c | 1 + board/ronetix/pm9g45/pm9g45.c | 1 + board/samsung/goni/goni.c | 1 + board/samsung/smdkc100/smdkc100.c | 1 + board/samsung/universal_c210/universal.c | 1 + board/siemens/common/board.c | 1 + board/spear/spear300/spear300.c | 1 + board/spear/spear310/spear310.c | 1 + board/spear/spear320/spear320.c | 1 + board/spear/spear600/spear600.c | 1 + board/spear/x600/x600.c | 1 + board/sunxi/board.c | 1 + board/ti/omap5_uevm/evm.c | 1 + board/ti/panda/panda.c | 1 + board/toradex/colibri_pxa270/colibri_pxa270.c | 1 + board/toradex/common/tdx-cfg-block.c | 1 + board/toradex/common/tdx-common.c | 1 + board/zipitz2/zipitz2.c | 1 + common/board_f.c | 3 + common/board_r.c | 1 + drivers/ddr/fsl/arm_ddr_gen3.c | 1 + drivers/ddr/fsl/ctrl_regs.c | 4 + drivers/ddr/fsl/fsl_ddr_gen4.c | 4 + drivers/ddr/fsl/options.c | 4 + drivers/ddr/fsl/util.c | 4 + drivers/gpio/Makefile | 1 - drivers/gpio/s3c2440_gpio.c | 88 -- drivers/i2c/s3c24x0_i2c.c | 4 - drivers/mmc/Makefile | 1 - drivers/mmc/s3c_sdi.c | 323 ---- drivers/mtd/nand/Makefile | 1 - drivers/mtd/nand/s3c2410_nand.c | 175 --- drivers/net/fsl-mc/dpio/qbman_portal.c | 1 + drivers/pci/pcie_layerscape.c | 4 + drivers/pci/pcie_layerscape_fixup.c | 3 + drivers/usb/common/fsl-errata.c | 4 + drivers/usb/gadget/gadget_chips.h | 8 - drivers/usb/host/Makefile | 1 - drivers/usb/host/ehci-mx6.c | 1 + drivers/usb/host/ohci-hcd.c | 1 - drivers/usb/host/ohci-s3c24xx.c | 1688 --------------------- drivers/usb/host/ohci-s3c24xx.h | 409 ----- drivers/video/sm501.c | 1 + include/api.h | 13 + include/common.h | 246 --- include/configs/calimain.h | 2 + include/configs/da850evm.h | 3 + include/configs/ea20.h | 2 + include/configs/ipam390.h | 2 + include/configs/legoev3.h | 2 + include/configs/ls1012a_common.h | 2 + include/configs/ls1043a_common.h | 2 + include/configs/ls1046a_common.h | 2 + include/configs/ls2080a_common.h | 2 + include/configs/omapl138_lcdk.h | 3 + include/fsl_ifc.h | 3 + scripts/config_whitelist.txt | 9 - 153 files changed, 377 insertions(+), 4956 deletions(-) delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/Makefile delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/cpu_info.c delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/speed.c delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/timer.c create mode 100644 arch/arm/include/asm/arch-ls102xa/soc.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/gpio.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/iomux.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/memory.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2400.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2410.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2440.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h create mode 100644 arch/powerpc/include/asm/ppc.h delete mode 100644 drivers/gpio/s3c2440_gpio.c delete mode 100644 drivers/mmc/s3c_sdi.c delete mode 100644 drivers/mtd/nand/s3c2410_nand.c delete mode 100644 drivers/usb/host/ohci-s3c24xx.c delete mode 100644 drivers/usb/host/ohci-s3c24xx.h create mode 100644 include/api.h
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 1/38 common: Drop inclusion of pci.h
This should not be in common.h - remove it and update the only file that needs it.
---
drivers/video/sm501.c | 1 + include/common.h | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/video/sm501.c +1 -0
@@ -16,6 +16,7 @@#include <common.h> #include <asm/io.h> +#include <pci.h> #include <video_fb.h> #include <sm501.h>
include/common.h +0 -3
@@ -30,9 +30,6 @@ typedef volatile unsigned char vu_char;#include <asm/ptrace.h> #include <stdarg.h> #include <linux/kernel.h> -#if defined(CONFIG_PCI ) && defined(CONFIG_4xx) -#include <pci.h> -#endif #if defined(CONFIG_8xx)#include <asm/8xx_immap.h> #if defined(CONFIG_MPC859) || defined(CONFIG_MPC859T) || \
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 1/38 common: Drop inclusion of pci.h
Quoted 4 lines · Simon Glass
This should not be in
common.h- remove it and update the only file that needs it.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/3669a3b4/attachment.sig>
PATCH 2/38 common: Drop pci_pre_init() and is_pci_host()
In reply to Simon GlassThese should not be in common.h. They are used in some legacy PowerPC code. Just drop them.
---
include/common.h | 5 ----- 1 file changed, 5 deletions(-)
include/common.h +0 -5
@@ -456,11 +456,6 @@ int get_env_id (void);void pci_init (void );void pci_init_board (void ); -#if defined(CONFIG_PCI ) && defined(CONFIG_4xx) -int pci_pre_init (struct pci_controller *); -int is_pci_host (struct pci_controller *); -#endif -#if defined(CONFIG_PCI ) && (defined(CONFIG_440 ) || defined(CONFIG_405EX ))# if defined(CONFIG_SYS_PCI_TARGET_INIT )void pci_target_init (struct pci_controller *);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 2/38 common: Drop pci_pre_init() and is_pci_host()
Quoted 4 lines · Simon Glass
These should not be in
common.h. They are used in some legacy PowerPC code. Just drop them.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/8ce31d5b/attachment.sig>
PATCH 3/38 common: Move pci_target_init() to PPC header
In reply to Simon GlassOnly one boards needs this definition. Move it to an arch-specific header.
---
arch/powerpc/include/asm/4xx_pci.h | 1 + include/common.h | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-)
arch/powerpc/include/asm/4xx_pci.h +1 -0
@@ -56,5 +56,6 @@ int pci_arbiter_enabled(void);int __pci_pre_init (struct pci_controller *hose);void __pci_target_init (struct pci_controller *hose);void __pci_master_init (struct pci_controller *hose); +void pci_target_init (struct pci_controller *);#endif
include/common.h +0 -3
@@ -457,9 +457,6 @@ void pci_init (void);void pci_init_board (void );#if defined(CONFIG_PCI ) && (defined(CONFIG_440 ) || defined(CONFIG_405EX )) -# if defined(CONFIG_SYS_PCI_TARGET_INIT ) -void pci_target_init (struct pci_controller *); -# endif # if defined(CONFIG_SYS_PCI_MASTER_INIT )void pci_master_init (struct pci_controller *);# endif
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 3/38 common: Move pci_target_init() to PPC header
Quoted 3 lines · Simon Glass
Only one boards needs this definition. Move it to an arch-specific header.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/78258a22/attachment.sig>
PATCH 4/38 common: Drop pci_master_init()
In reply to Simon GlassThis should not be in common.h. Drop it.
---
include/common.h | 3 --- 1 file changed, 3 deletions(-)
include/common.h +0 -3
@@ -457,9 +457,6 @@ void pci_init (void);void pci_init_board (void );#if defined(CONFIG_PCI ) && (defined(CONFIG_440 ) || defined(CONFIG_405EX )) -# if defined(CONFIG_SYS_PCI_MASTER_INIT ) -void pci_master_init (struct pci_controller *); -# endif #if defined(CONFIG_440SPE ) || \ defined(CONFIG_460EX ) || defined(CONFIG_460GT ) || \ defined(CONFIG_405EX )
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 4/38 common: Drop pci_master_init()
Quoted 3 lines · Simon Glass
This should not be in
common.h. Drop it.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/a18ef3ea/attachment.sig>
PATCH 5/38 common: Move pcie_setup_hoses() to PPC header
In reply to Simon GlassOnly one board needs this definition. Move it to an arch-specific header.
---
arch/powerpc/include/asm/4xx_pci.h | 1 + include/common.h | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-)
arch/powerpc/include/asm/4xx_pci.h +1 -0
@@ -57,5 +57,6 @@ int __pci_pre_init(struct pci_controller *hose);void __pci_target_init (struct pci_controller *hose);void __pci_master_init (struct pci_controller *hose);void pci_target_init (struct pci_controller *); +void pcie_setup_hoses (int busno);#endif
include/common.h +0 -8
@@ -456,14 +456,6 @@ int get_env_id (void);void pci_init (void );void pci_init_board (void ); -#if defined(CONFIG_PCI ) && (defined(CONFIG_440 ) || defined(CONFIG_405EX )) -#if defined(CONFIG_440SPE ) || \ - defined(CONFIG_460EX ) || defined(CONFIG_460GT ) || \ - defined(CONFIG_405EX ) -void pcie_setup_hoses (int busno); -#endif -#endif -int misc_init_f (void );int misc_init_r (void );
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 5/38 common: Move pcie_setup_hoses() to PPC header
Quoted 3 lines · Simon Glass
Only one board needs this definition. Move it to an arch-specific header.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/ac1f6ff7/attachment.sig>
PATCH 6/38 common: Move get_OPB_freq() and get_PCI_freq() to PPC header
In reply to Simon GlassThese should not be in common.h. Move the to an arch-specific header.
---
arch/powerpc/include/asm/ppc4xx.h | 3 +++ include/common.h | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-)
arch/powerpc/include/asm/ppc4xx.h +3 -0
@@ -289,6 +289,9 @@ static inline void set_mcsr(u32 val)int ppc4xx_pci_sync_clock_config (u32 async); +unsigned long get_OPB_freq (void ); +unsigned long get_PCI_freq (void ); +#endif /* __ASSEMBLY__ */ /* for multi-cpu support */
include/common.h +0 -4
@@ -649,10 +649,6 @@ int get_clocks (void);#if defined(CONFIG_MPC5xxx)int prt_mpc5xxx_clks (void );#endif -#ifdef CONFIG_4xx -ulong get_OPB_freq (void ); -ulong get_PCI_freq (void ); -#endif #if defined(CONFIG_S3C24X0 ) || \ defined(CONFIG_LH7A40X ) || \ defined(CONFIG_EP93XX )
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 6/38 common: Move get_OPB_freq() and get_PCI_freq() to PPC header
Quoted 3 lines · Simon Glass
These should not be in
common.h. Move the to an arch-specific header.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/3cd035b3/attachment.sig>
PATCH 7/38 api: Add a header for api_init()
In reply to Simon GlassPut this in its own header instead of using common.h.
---
common/board_r.c | 1 + include/api.h | 13 +++++++++++++ include/common.h | 3 --- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 include/api.h
common/board_r.c +1 -0
@@ -11,6 +11,7 @@*/ #include <common.h> +#include <api.h> /* TODO: can we just include all these headers whether needed or not? */ #if defined(CONFIG_CMD_BEDBUG )#include <bedbug/type.h>
include/api.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* Copyright (c) 2017 Google, Inc +* Written by Simon Glass <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __API_H +#define __API_H + +void api_init (void ); + +#endif
include/common.h +0 -3
@@ -465,9 +465,6 @@ void jumptable_init(void);/* common/kallsysm.c */ const char *symbol_lookup (unsigned long addr,unsigned long *caddr); -/* api/api.c */ -void api_init (void ); -/* common/memsize.c */ long get_ram_size (long *,long );phys_size_t get_effective_memsize (void );
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 7/38 api: Add a header for api_init()
Quoted 3 lines · Simon Glass
Put this in its own header instead of using
common.h.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/18a0ebc7/attachment.sig>
PATCH 8/38 gpio: samsung: Drop s3c2440_gpio driver
In reply to Simon GlassThis is no longer used in U-Boot. Drop it.
---
drivers/gpio/Makefile | 1 - drivers/gpio/s3c2440_gpio.c | 88 --------------------------------------------- 2 files changed, 89 deletions(-) delete mode 100644 drivers/gpio/s3c2440_gpio.c
drivers/gpio/Makefile +0 -1
@@ -42,7 +42,6 @@ obj-$(CONFIG_SH_GPIO_PFC) += sh_pfc.o obj-$(CONFIG_OMAP_GPIO) += omap_gpio.o obj-$(CONFIG_DB8500_GPIO) += db8500_gpio.o obj-$(CONFIG_BCM2835_GPIO) += bcm2835_gpio.o -obj-$(CONFIG_S3C2440_GPIO) += s3c2440_gpio.o obj-$(CONFIG_XILINX_GPIO) += xilinx_gpio.o obj-$(CONFIG_ADI_GPIO2) += adi_gpio2.o obj-$(CONFIG_TCA642X) += tca642x.o
drivers/gpio/s3c2440_gpio.c deleted +0 -88
88 lines not on this page · raw message
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 8/38 gpio: samsung: Drop s3c2440_gpio driver
Quoted 3 lines · Simon Glass
This is no longer used in U-Boot. Drop it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/eaea193b/attachment.sig>
PATCH 9/38 samsung: Drop s3c24x0 arch-specific code
In reply to Simon GlassThis is not used anymore. Drop it.
---
arch/arm/cpu/arm920t/Makefile | 1 - arch/arm/cpu/arm920t/s3c24x0/Makefile | 10 - arch/arm/cpu/arm920t/s3c24x0/cpu_info.c | 38 -- arch/arm/cpu/arm920t/s3c24x0/speed.c | 102 ---- arch/arm/cpu/arm920t/s3c24x0/timer.c | 160 ------ arch/arm/include/asm/arch-s3c24x0/gpio.h | 155 ------ arch/arm/include/asm/arch-s3c24x0/iomux.h | 184 ------ arch/arm/include/asm/arch-s3c24x0/memory.h | 159 ------ arch/arm/include/asm/arch-s3c24x0/s3c2400.h | 136 ----- arch/arm/include/asm/arch-s3c24x0/s3c2410.h | 147 ----- arch/arm/include/asm/arch-s3c24x0/s3c2440.h | 145 ----- arch/arm/include/asm/arch-s3c24x0/s3c24x0.h | 708 ------------------------ arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h | 16 - 13 files changed, 1961 deletions(-) delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/Makefile delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/cpu_info.c delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/speed.c delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/timer.c delete mode 100644 arch/arm/include/asm/arch-s3c24x0/gpio.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/iomux.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/memory.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2400.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2410.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2440.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
arch/arm/cpu/arm920t/Makefile +0 -1
@@ -11,7 +11,6 @@ obj-y += cpu.o obj-$(CONFIG_EP93XX) += ep93xx/ obj-$(CONFIG_IMX) += imx/ -obj-$(CONFIG_S3C24X0) += s3c24x0/ # some files can only build in ARM mode
arch/arm/cpu/arm920t/s3c24x0/Makefile deleted +0 -10
@@ -1,10 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o -obj-y += speed.o -obj-y += timer.o
arch/arm/cpu/arm920t/s3c24x0/cpu_info.c deleted +0 -38
@@ -1,38 +0,0 @@ -/* -* (C) Copyright 2010 -* David Mueller <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <asm/io.h> -#include <asm/arch/s3c24x0_cpu.h> - -typedef ulong (*getfreq )(void ); - -static const getfreq freq_f[] = { - get_FCLK, - get_HCLK, - get_PCLK, -}; - -static const char freq_c[] = {'F' ,'H' ,'P' }; - -int print_cpuinfo (void ) -{ -int i; -char buf[32 ]; -/* the S3C2400 seems to be lacking a CHIP ID register */ -#ifndef CONFIG_S3C2400 -ulong cpuid; -struct s3c24x0_gpio *const gpio =s3c24x0_get_base_gpio (); - - cpuid =readl (&gpio->gstatus1); -printf ("CPUID: %8lX\n" , cpuid); -#endif -for (i =0 ; i <ARRAY_SIZE (freq_f); i++) -printf ("%cCLK: %8s MHz\n" , freq_c[i],strmhz (buf, freq_f[i]())); - -return 0 ; -}
arch/arm/cpu/arm920t/s3c24x0/speed.c deleted +0 -102
102 lines not on this page · raw message
arch/arm/cpu/arm920t/s3c24x0/timer.c deleted +0 -160
160 lines not on this page · raw message
arch/arm/include/asm/arch-s3c24x0/gpio.h deleted +0 -155
155 lines not on this page · raw message
arch/arm/include/asm/arch-s3c24x0/iomux.h deleted +0 -184
184 lines not on this page · raw message
arch/arm/include/asm/arch-s3c24x0/memory.h deleted +0 -159
159 lines not on this page · raw message
arch/arm/include/asm/arch-s3c24x0/s3c2400.h deleted +0 -136
136 lines not on this page · raw message
arch/arm/include/asm/arch-s3c24x0/s3c2410.h deleted +0 -147
147 lines not on this page · raw message
arch/arm/include/asm/arch-s3c24x0/s3c2440.h deleted +0 -145
145 lines not on this page · raw message
arch/arm/include/asm/arch-s3c24x0/s3c24x0.h deleted +0 -708
708 lines not on this page · raw message
arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h deleted +0 -16
@@ -1,16 +0,0 @@ -/* -* (C) Copyright 2009 -* Kevin Morfitt, Fearnside Systems Ltd, <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#ifdef CONFIG_S3C2400 -#include <asm/arch/s3c2400.h> -#elif definedCONFIG_S3C2410 -#include <asm/arch/s3c2410.h> -#elif definedCONFIG_S3C2440 -#include <asm/arch/s3c2440.h> -#else -#error Please define the s3c24x0 cpu type -#endif
Signature · 1 line
2.13.0.303.g4ebf302169-goog
A message that is not in the archive (sent off-list or not yet received): CALrBrZ2SqS55_hV39B_sijFKEt4E0kb__y34RO9+7+wW9G5wsg@mail.gmail.com
PATCH 9/38 samsung: Drop s3c24x0 arch-specific code
2017. 5. 18. 00:04에 "Simon Glass" <[email protected]>님이 작성:
This is not used anymore. Drop it.
---
arch/arm/cpu/arm920t/Makefile | 1 - arch/arm/cpu/arm920t/s3c24x0/Makefile | 10 - arch/arm/cpu/arm920t/s3c24x0/cpu_info.c | 38 -- arch/arm/cpu/arm920t/s3c24x0/speed.c | 102 ---- arch/arm/cpu/arm920t/s3c24x0/timer.c | 160 ------ arch/arm/include/asm/arch-s3c24x0/gpio.h | 155 ------ arch/arm/include/asm/arch-s3c24x0/iomux.h | 184 ------ arch/arm/include/asm/arch-s3c24x0/memory.h | 159 ------ arch/arm/include/asm/arch-s3c24x0/s3c2400.h | 136 ----- arch/arm/include/asm/arch-s3c24x0/s3c2410.h | 147 ----- arch/arm/include/asm/arch-s3c24x0/s3c2440.h | 145 ----- arch/arm/include/asm/arch-s3c24x0/s3c24x0.h | 708 ------------------------ arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h | 16 - 13 files changed, 1961 deletions(-) delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/Makefile delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/cpu_info.c delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/speed.c delete mode 100644 arch/arm/cpu/arm920t/s3c24x0/timer.c delete mode 100644 arch/arm/include/asm/arch-s3c24x0/gpio.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/iomux.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/memory.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2400.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2410.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2440.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0.h delete mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
arch/arm/cpu/arm920t/Makefile +0 -1
@@ -11,7 +11,6 @@ obj-y += cpu.o obj-$(CONFIG_EP93XX) += ep93xx/ obj-$(CONFIG_IMX) += imx/ -obj-$(CONFIG_S3C24X0) += s3c24x0/ # some files can only build in ARM mode
arch/arm/cpu/arm920t/ renamed from arch/arm/cpu/arm920t/s3c24x0/Makefile +0 -0
s3c24x0/Makefile
deleted file mode 100644
index e78f8a017c..0000000000
arch/arm/cpu/arm920t/s3c24x0/Makefile deleted +0 -10
@@ -1,10 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o -obj-y += speed.o -obj-y += timer.o
arch/arm/cpu/arm920t/ renamed from arch/arm/cpu/arm920t/s3c24x0/cpu_info.c +0 -0
s3c24x0/cpu_info.c
deleted file mode 100644
index fede51a160..0000000000
arch/arm/cpu/arm920t/s3c24x0/cpu_info.c deleted +0 -35
@@ -1,38 +0,0 @@ -/* -* (C) Copyright 2010 -* David Mueller <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <asm/io.h> -#include <asm/arch/s3c24x0_cpu.h> - -typedef ulong (*getfreq )(void ); - -static const getfreq freq_f[] = { - get_FCLK, - get_HCLK, - get_PCLK, -}; - -static const char freq_c[] = {'F' ,'H' ,'P' }; - -int print_cpuinfo (void ) -{ -int i; -char buf[32 ]; -/* the S3C2400 seems to be lacking a CHIP ID register */ -#ifndef CONFIG_S3C2400 -ulong cpuid; -struct s3c24x0_gpio *const gpio =s3c24x0_get_base_gpio (); - - cpuid =readl (&gpio->gstatus1); -printf ("CPUID: %8lX\n" , cpuid); -#endif -for (i =0 ; i <ARRAY_SIZE (freq_f); i++) - printf("%cCLK: %8s MHz\n", freq_c[i], strmhz(buf,
freq_f[i]()));
-
- return 0;
-}
arch/arm/cpu/arm920t/ renamed from arch/arm/cpu/arm920t/s3c24x0/speed.c +0 -0
s3c24x0/speed.c
deleted file mode 100644
index 3701c5d9a3..0000000000
arch/arm/cpu/arm920t/s3c24x0/speed.c deleted +0 -25
@@ -1,102 +0,0 @@ -/* -* (C) Copyright 2001-2004 -* Wolfgang Denk, DENX Software Engineering, wd at denx.de. -* -* (C) Copyright 2002 -* David Mueller, ELSOFT AG, [email protected] -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -/* This code should work for both the S3C2400 and the S3C2410 -* as they seem to have the same PLL and clock machinery inside. -* The different address mapping is handled by the s3c24xx.h files below. -*/ - -#include <common.h> -#ifdef CONFIG_S3C24X0 - -#include <asm/io.h> -#include <asm/arch/s3c24x0_cpu.h> - -#define MPLL 0 -#define UPLL 1 - -/* -------------------------------------------------------------------------
*/
-/* NOTE: This describes the proper use of this file.
- *
- * CONFIG_SYS_CLK_FREQ should be defined as the input frequency of the PLL.
- *
- * get_FCLK(), get_HCLK(), get_PCLK() and get_UCLK() return the clock of
- * the specified bus in HZ.
- */
-/* ------------------------------------------------------------------------- */
-
-static ulong get_PLLCLK(int pllreg)
-{
- struct s3c24x0_clock_power *clk_power =s3c24x0_get_base_clock_power();
- ulong r, m, p, s;
-
- if (pllreg == MPLL)
- r = readl(&clk_power->mpllcon);
- else if (pllreg == UPLL)
- r = readl(&clk_power->upllcon);
- else
- hang();
-
- m = ((r & 0xFF000) >> 12) + 8; - p = ((r & 0x003F0) >> 4) + 2; - s = r & 0x3;
-
-#if defined(CONFIG_S3C2440)
- if (pllreg == MPLL)
- return 2 * m * (CONFIG_SYS_CLK_FREQ / (p << s));
-#endif
- return (CONFIG_SYS_CLK_FREQ * m) / (p << s);
-
-}
-
-/* return FCLK frequency */
-ulong get_FCLK(void)
-{
- return get_PLLCLK(MPLL);
-}
-
-/* return HCLK frequency */
-ulong get_HCLK(void)
-{
- struct s3c24x0_clock_power *clk_power =s3c24x0_get_base_clock_power();
-#ifdef CONFIG_S3C2440
- switch (readl(&clk_power->clkdivn) & 0x6) {
- default:
- case 0:- return get_FCLK();
- case 2:
- return get_FCLK() / 2;
- case 4:
- return (readl(&clk_power->camdivn) & (1 << 9)) ?
- get_FCLK() / 8 : get_FCLK() / 4;
- case 6:
- return (readl(&clk_power->camdivn) & (1 << 8)) ?
- get_FCLK() / 6 : get_FCLK() / 3;
- }
-#else
- return (readl(&clk_power->clkdivn) & 2) ? get_FCLK() / 2 :get_FCLK();
-#endif
-}
-
-/* return PCLK frequency */
-ulong get_PCLK(void)
-{
- struct s3c24x0_clock_power *clk_power =s3c24x0_get_base_clock_power();
-
- return (readl(&clk_power->clkdivn) & 1) ? get_HCLK() / 2 :get_HCLK();
-}
-
-/* return UCLK frequency */
-ulong get_UCLK(void)
-{
- return get_PLLCLK(UPLL);
-}
-
-#endif /* CONFIG_S3C24X0 */
arch/arm/cpu/arm920t/ renamed from arch/arm/cpu/arm920t/s3c24x0/timer.c +0 -0
s3c24x0/timer.c
deleted file mode 100644
index ba1e616b82..0000000000
arch/arm/cpu/arm920t/s3c24x0/timer.c deleted +0 -160
160 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-s3c24x0/gpio.h
deleted file mode 100644
index a749b6491a..0000000000
arch/arm/include/asm/arch-s3c24x0/gpio.h deleted +0 -155
155 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-s3c24x0/iomux.h
deleted file mode 100644
index 981164434d..0000000000
arch/arm/include/asm/arch-s3c24x0/iomux.h deleted +0 -184
184 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-s3c24x0/memory.h
deleted file mode 100644
index d6a787b663..0000000000
arch/arm/include/asm/arch-s3c24x0/memory.h deleted +0 -92
92 lines not on this page · raw message
the
- * SA1100, it's much more convenient to use Linux's NUMA support to implement
- * our memory map representation. Assuming all memory nodes have equal access
- * characteristics, we then have generic discontiguous memory support.
- *
- * Of course, all this isn't mandatory for SA1100 implementations with only
- * one used memory bank. For those, simply undefine CONFIG_DISCONTIGMEM.
- *
- * The nodes are matched with the physical memory bank addresses which are
- * incidentally the same as virtual addresses.
- *
- * node 0: 0xc0000000 - 0xc7ffffff - * node 1: 0xc8000000 - 0xcfffffff - * node 2: 0xd0000000 - 0xd7ffffff - * node 3: 0xd8000000 - 0xdfffffff
- */
-
-#define NR_NODES 4
-
-/*
- * Given a kernel address, find the home node of the underlying memory.
- */
-#define KVADDR_TO_NID(addr) \
- (((unsigned long)(addr) - 0xc0000000) >> 27)
-
-/*
- * Given a physical address, convert it to a node id.
- */
-#define PHYS_TO_NID(addr) KVADDR_TO_NID(__phys_to_virt(addr)) -
-/*
- * Given a kaddr, ADDR_TO_MAPBASE finds the owning node of the memory
- * and returns the mem_map of that node.
- */
-#define ADDR_TO_MAPBASE(kaddr) \
- NODE_MEM_MAP(KVADDR_TO_NID((unsigned long)(kaddr)))
-
-/*
- * Given a kaddr, LOCAL_MEM_MAP finds the owning node of the memory
- * and returns the index corresponding to the appropriate page in the
- * node's mem_map.
- */
-#define LOCAL_MAP_NR(kvaddr) \
- (((unsigned long)(kvaddr) & 0x07ffffff) >> PAGE_SHIFT)
-
-/*
- * Given a kaddr, virt_to_page returns a pointer to the corresponding
- * mem_map entry.
- */
-#define virt_to_page(kaddr) \
- (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr))
-
-/*
- * VALID_PAGE returns a non-zero value if given page pointer is valid.
- * This assumes all node's mem_maps are stored within the node they refer to.
- */
-#define VALID_PAGE(page) \
-({ unsigned int node = KVADDR_TO_NID(page); \
- ( (node < NR_NODES) && \
- ((unsigned)((page) - NODE_MEM_MAP(node)) <
NODE_DATA(node)->node_size) ); \
-})
-
-#else
-
-#define PHYS_TO_NID(addr) (0)
-
-#endif
-#endif /* __ASM_ARCH_MEMORY_H */
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-s3c24x0/s3c2400.h
deleted file mode 100644
index 2389118e7a..0000000000
arch/arm/include/asm/arch-s3c24x0/s3c2400.h deleted +0 -70
70 lines not on this page · raw message
void)
-{
- return (struct s3c24x0_clock_power *)S3C24X0_CLOCK_POWER_BASE;
-}
-
-static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) -{
- return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
-}
-
-static inline struct s3c24x0_uart
- *s3c24x0_get_base_uart(enum s3c24x0_uarts_nr n)
-{
- return (struct s3c24x0_uart *)(S3C24X0_UART_BASE + (n * 0x4000));
-}
-
-static inline struct s3c24x0_timers *s3c24x0_get_base_timers(void) -{
- return (struct s3c24x0_timers *)S3C24X0_TIMER_BASE;
-}
-
-static inline struct s3c24x0_usb_device *s3c24x0_get_base_usb_device(void) -{
- return (struct s3c24x0_usb_device *)S3C24X0_USB_DEVICE_BASE;
-}
-
-static inline struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void) -{
- return (struct s3c24x0_watchdog *)S3C24X0_WATCHDOG_BASE;
-}
-
-static inline struct s3c24x0_i2c *s3c24x0_get_base_i2c(void) -{
- return (struct s3c24x0_i2c *)S3C24X0_I2C_BASE;
-}
-
-static inline struct s3c24x0_i2s *s3c24x0_get_base_i2s(void) -{
- return (struct s3c24x0_i2s *)S3C24X0_I2S_BASE;
-}
-
-static inline struct s3c24x0_gpio *s3c24x0_get_base_gpio(void) -{
- return (struct s3c24x0_gpio *)S3C24X0_GPIO_BASE;
-}
-
-static inline struct s3c24x0_rtc *s3c24x0_get_base_rtc(void) -{
- return (struct s3c24x0_rtc *)S3C24X0_RTC_BASE;
-}
-
-static inline struct s3c2400_adc *s3c2400_get_base_adc(void) -{
- return (struct s3c2400_adc *)S3C24X0_ADC_BASE;
-}
-
-static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void) -{
- return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
-}
-
-static inline struct s3c2400_mmc *s3c2400_get_base_mmc(void) -{
- return (struct s3c2400_mmc *)S3C2400_MMC_BASE;
-}
-
-#endif /*__S3C2400_H__*/
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-s3c24x0/s3c2410.h
deleted file mode 100644
index 8773ce30d1..0000000000
arch/arm/include/asm/arch-s3c24x0/s3c2410.h deleted +0 -76
76 lines not on this page · raw message
void)
-{
- return (struct s3c24x0_clock_power *)S3C24X0_CLOCK_POWER_BASE;
-}
-
-static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) -{
- return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
-}
-
-static inline struct s3c24x0_nand *s3c24x0_get_base_nand(void) -{
- return (struct s3c24x0_nand *)S3C2410_NAND_BASE;
-}
-
-static inline struct s3c24x0_uart
- *s3c24x0_get_base_uart(enum s3c24x0_uarts_nr n)
-{
- return (struct s3c24x0_uart *)(S3C24X0_UART_BASE + (n * 0x4000));
-}
-
-static inline struct s3c24x0_timers *s3c24x0_get_base_timers(void) -{
- return (struct s3c24x0_timers *)S3C24X0_TIMER_BASE;
-}
-
-static inline struct s3c24x0_usb_device *s3c24x0_get_base_usb_device(void) -{
- return (struct s3c24x0_usb_device *)S3C24X0_USB_DEVICE_BASE;
-}
-
-static inline struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void) -{
- return (struct s3c24x0_watchdog *)S3C24X0_WATCHDOG_BASE;
-}
-
-static inline struct s3c24x0_i2c *s3c24x0_get_base_i2c(void) -{
- return (struct s3c24x0_i2c *)S3C24X0_I2C_BASE;
-}
-
-static inline struct s3c24x0_i2s *s3c24x0_get_base_i2s(void) -{
- return (struct s3c24x0_i2s *)S3C24X0_I2S_BASE;
-}
-
-static inline struct s3c24x0_gpio *s3c24x0_get_base_gpio(void) -{
- return (struct s3c24x0_gpio *)S3C24X0_GPIO_BASE;
-}
-
-static inline struct s3c24x0_rtc *s3c24x0_get_base_rtc(void) -{
- return (struct s3c24x0_rtc *)S3C24X0_RTC_BASE;
-}
-
-static inline struct s3c2410_adc *s3c2410_get_base_adc(void) -{
- return (struct s3c2410_adc *)S3C2410_ADC_BASE;
-}
-
-static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void) -{
- return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
-}
-
-static inline struct s3c24x0_sdi *s3c24x0_get_base_sdi(void) -{
- return (struct s3c24x0_sdi *)S3C2410_SDI_BASE;
-}
-
-#endif /*__S3C2410_H__*/
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-s3c24x0/s3c2440.h
deleted file mode 100644
index 7a525f2818..0000000000
arch/arm/include/asm/arch-s3c24x0/s3c2440.h deleted +0 -74
74 lines not on this page · raw message
void)
-{
- return (struct s3c24x0_clock_power *)S3C24X0_CLOCK_POWER_BASE;
-}
-
-static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void) -{
- return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
-}
-
-static inline struct s3c24x0_nand *s3c24x0_get_base_nand(void) -{
- return (struct s3c24x0_nand *)S3C2440_NAND_BASE;
-}
-
-static inline struct s3c24x0_uart
- *s3c24x0_get_base_uart(enum s3c24x0_uarts_nr n)
-{
- return (struct s3c24x0_uart *)(S3C24X0_UART_BASE + (n * 0x4000));
-}
-
-static inline struct s3c24x0_timers *s3c24x0_get_base_timers(void) -{
- return (struct s3c24x0_timers *)S3C24X0_TIMER_BASE;
-}
-
-static inline struct s3c24x0_usb_device *s3c24x0_get_base_usb_device(void) -{
- return (struct s3c24x0_usb_device *)S3C24X0_USB_DEVICE_BASE;
-}
-
-static inline struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void) -{
- return (struct s3c24x0_watchdog *)S3C24X0_WATCHDOG_BASE;
-}
-
-static inline struct s3c24x0_i2c *s3c24x0_get_base_i2c(void) -{
- return (struct s3c24x0_i2c *)S3C24X0_I2C_BASE;
-}
-
-static inline struct s3c24x0_i2s *s3c24x0_get_base_i2s(void) -{
- return (struct s3c24x0_i2s *)S3C24X0_I2S_BASE;
-}
-
-static inline struct s3c24x0_gpio *s3c24x0_get_base_gpio(void) -{
- return (struct s3c24x0_gpio *)S3C24X0_GPIO_BASE;
-}
-
-static inline struct s3c24x0_rtc *s3c24x0_get_base_rtc(void) -{
- return (struct s3c24x0_rtc *)S3C24X0_RTC_BASE;
-}
-
-static inline struct s3c2440_adc *s3c2440_get_base_adc(void) -{
- return (struct s3c2440_adc *)S3C2440_ADC_BASE;
-}
-
-static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void) -{
- return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
-}
-
-static inline struct s3c24x0_sdi *s3c24x0_get_base_sdi(void) -{
- return (struct s3c24x0_sdi *)S3C2440_SDI_BASE;
-}
-
-#endif /*__S3C2440_H__*/
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
deleted file mode 100644
index 2dae9fc3d7..0000000000
arch/arm/include/asm/arch-s3c24x0/s3c24x0.h deleted +0 -708
708 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
deleted file mode 100644
index 393cc9d9fd..0000000000
arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h deleted +0 -3
@@ -1,16 +0,0 @@ -/* -* (C) Copyright 2009 -* Kevin Morfitt, Fearnside Systems Ltd, <kevin.morfitt@fearnside-
systems.co.uk>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifdef CONFIG_S3C2400
- #include <asm/arch/s3c2400.h>
-#elif defined CONFIG_S3C2410
- #include <asm/arch/s3c2410.h>
-#elif defined CONFIG_S3C2440
- #include <asm/arch/s3c2440.h>
-#else
- #error Please define the s3c24x0 cpu type
-#endif
--
2.13.0.303.g4ebf302169-goog
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Thanks,
Minkyu Kang
PATCH 9/38 samsung: Drop s3c24x0 arch-specific code
In reply to Simon GlassQuoted 3 lines · Simon Glass
This is not used anymore. Drop it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/ac80c130/attachment.sig>
PATCH 10/38 samsung: mmc: Drop s3c_sdi driver
In reply to Simon GlassThis is no-longer used in U-Boot. Drop it.
---
drivers/mmc/Makefile | 1 - drivers/mmc/s3c_sdi.c | 323 ------------------------------------------- scripts/config_whitelist.txt | 1 - 3 files changed, 325 deletions(-) delete mode 100644 drivers/mmc/s3c_sdi.c
drivers/mmc/Makefile +0 -1
@@ -40,7 +40,6 @@ obj-$(CONFIG_MMC_MXS) += mxsmmc.o obj-$(CONFIG_MMC_PCI) += pci_mmc.o obj-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o obj-$(CONFIG_SUPPORT_EMMC_RPMB) += rpmb.o -obj-$(CONFIG_S3C_SDI) += s3c_sdi.o obj-$(CONFIG_MMC_SANDBOX) += sandbox_mmc.o obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o obj-$(CONFIG_SH_SDHI) += sh_sdhi.o
drivers/mmc/s3c_sdi.c deleted +0 -323
323 lines not on this page · raw message
scripts/config_whitelist.txt +0 -1
@@ -2365,7 +2365,6 @@ CONFIG_S3C2400 CONFIG_S3C2410 CONFIG_S3C2410_NAND_BBT CONFIG_S3C2410_NAND_HWECC -CONFIG_S3C2440 CONFIG_S3C24X0 CONFIG_S3C24XX_TACLS CONFIG_S3C24XX_TWRPH0
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 10/38 samsung: mmc: Drop s3c_sdi driver
2017. 5. 18. 00:18에 "Simon Glass" <[email protected]>님이 작성:
This is no-longer used in U-Boot. Drop it.
---
drivers/mmc/Makefile | 1 - drivers/mmc/s3c_sdi.c | 323 ------------------------------ ------------- scripts/config_whitelist.txt | 1 - 3 files changed, 325 deletions(-) delete mode 100644 drivers/mmc/s3c_sdi.c
drivers/mmc/Makefile +0 -1
@@ -40,7 +40,6 @@ obj-$(CONFIG_MMC_MXS) += mxsmmc.o obj-$(CONFIG_MMC_PCI) += pci_mmc.o obj-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o obj-$(CONFIG_SUPPORT_EMMC_RPMB) += rpmb.o -obj-$(CONFIG_S3C_SDI) += s3c_sdi.o obj-$(CONFIG_MMC_SANDBOX) += sandbox_mmc.o obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o obj-$(CONFIG_SH_SDHI) += sh_sdhi.o
drivers/mmc/s3c_sdi.c deleted +0 -61
61 lines not on this page · raw message
*data)
-{
- struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi(); - uint32_t sdiccon, sdicsta, sdidcon, sdidsta, sdidat, sdifsta; - uint32_t sdicsta_wait_bit = S3C2410_SDICMDSTAT_CMDSENT; - unsigned int timeout = 100000; - int ret = 0, xfer_len, data_offset = 0; - const uint32_t sdidsta_err_mask = S3C2410_SDIDSTA_FIFOFAIL |
- S3C2410_SDIDSTA_CRCFAIL | S3C2410_SDIDSTA_RXCRCFAIL |
- S3C2410_SDIDSTA_DATATIMEOUT;
-
-
- writel(0xffffffff, &sdi_regs->sdicsta); - writel(0xffffffff, &sdi_regs->sdidsta); - writel(0xffffffff, &sdi_regs->sdifsta);
-
- /* Set up data transfer (if applicable). */
- if (data) {
- writel(data->blocksize, &sdi_regs->sdibsize);
-
- sdidcon = data->blocks & S3C2410_SDIDCON_BLKNUM;
- sdidcon |= S3C2410_SDIDCON_BLOCKMODE;
-#if defined(CONFIG_S3C2440)
- sdidcon |= S3C2440_SDIDCON_DS_WORD |S3C2440_SDIDCON_DATSTART;
-#endif
- if (wide_bus)
- sdidcon |= S3C2410_SDIDCON_WIDEBUS;
-
- if (data->flags & MMC_DATA_READ) {
- sdidcon |= S3C2410_SDIDCON_RXAFTERCMD;
- sdidcon |= S3C2410_SDIDCON_XFER_RXSTART;
- } else {
- sdidcon |= S3C2410_SDIDCON_TXAFTERRESP;
- sdidcon |= S3C2410_SDIDCON_XFER_TXSTART;- }
-
- writel(sdidcon, &sdi_regs->sdidcon);
- }
-
- /* Write CMD arg. */
- writel(cmd->cmdarg, &sdi_regs->sdicarg);
-
- /* Write CMD index. */ - sdiccon = cmd->cmdidx & S3C2410_SDICMDCON_INDEX; - sdiccon |= S3C2410_SDICMDCON_SENDERHOST; - sdiccon |= S3C2410_SDICMDCON_CMDSTART;
-
- /* Command with short response. */
- if (cmd->resp_type & MMC_RSP_PRESENT) {
- sdiccon |= S3C2410_SDICMDCON_WAITRSP;
- sdicsta_wait_bit = S3C2410_SDICMDSTAT_RSPFIN;
- }
-
- /* Command with long response. */
- if (cmd->resp_type & MMC_RSP_136)
- sdiccon |= S3C2410_SDICMDCON_LONGRSP;
-
- /* Start the command. */
- writel(sdiccon, &sdi_regs->sdiccon);
-
- /* Wait for the command to complete or for response. */
- for (timeout = 100000; timeout; timeout--) {
- sdicsta = readl(&sdi_regs->sdicsta);
- if (sdicsta & sdicsta_wait_bit)
- break;
-
- if (sdicsta & S3C2410_SDICMDSTAT_CMDTIMEOUT)
- timeout = 1;
- }
-
- /* Clean the status bits. */
- setbits_le32(&sdi_regs->sdicsta, 0xf << 9);
-
- if (!timeout) {
- puts("S3C SDI: Command timed out!\n");
- ret = -ETIMEDOUT;
- goto error;- }
-
- /* Read out the response. */
- if (cmd->resp_type & MMC_RSP_136) {
- cmd->response[0] = readl(&sdi_regs->sdirsp0); - cmd->response[1] = readl(&sdi_regs->sdirsp1); - cmd->response[2] = readl(&sdi_regs->sdirsp2); - cmd->response[3] = readl(&sdi_regs->sdirsp3);
- } else {
- cmd->response[0] = readl(&sdi_regs->sdirsp0);
- }
-
- /* If there are no data, we're done. */
- if (!data)
- return 0;
-
- xfer_len = data->blocksize * data->blocks;
-
- while (xfer_len > 0) {
- sdidsta = readl(&sdi_regs->sdidsta);
- sdifsta = readl(&sdi_regs->sdifsta);
-
- if (sdidsta & sdidsta_err_mask) {
- printf("S3C SDI: Data error (sdta=0x%08x)\n",
sdidsta);
- ret = -EIO;
- goto error;
- }
-
- if (data->flags & MMC_DATA_READ) {
- if ((sdifsta & S3C2410_SDIFSTA_COUNTMASK) < 4)
- continue;
- sdidat = readl(&sdi_regs->sdidat);
- put_unaligned_le32(sdidat, data->dest +data_offset);
- } else { /* Write */
- /* TX FIFO half full. */
- if (!(sdifsta & S3C2410_SDIFSTA_TFHALF))
- continue;
-
- /* TX FIFO is below 32b full, write. */
- sdidat = get_unaligned_le32(data->src +data_offset);
- writel(sdidat, &sdi_regs->sdidat);
- } - data_offset += 4; - xfer_len -= 4;
- }
-
- /* Wait for the command to complete or for response. */
- for (timeout = 100000; timeout; timeout--) {
- sdidsta = readl(&sdi_regs->sdidsta);
- if (sdidsta & S3C2410_SDIDSTA_XFERFINISH)
- break;
-
- if (sdidsta & S3C2410_SDIDSTA_DATATIMEOUT)
- timeout = 1;
- }
-
- /* Clear status bits. */
- writel(0x6f8, &sdi_regs->sdidsta);
-
- if (!timeout) {
- puts("S3C SDI: Command timed out!\n");
- ret = -ETIMEDOUT;
- goto error;- }
-
- writel(0, &sdi_regs->sdidcon);
-
- return 0;
-error:
- return ret;
-}
-
-static int s3cmmc_set_ios(struct mmc *mmc)
-{
- struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
- uint32_t divider = 0;
-
- wide_bus = (mmc->bus_width == 4);
-
- if (!mmc->clock)
- return 0;
-
- divider = DIV_ROUND_UP(get_PCLK(), mmc->clock);
- if (divider)
- divider--;
-
- writel(divider, &sdi_regs->sdipre);
- mdelay(125);
-
- return 0;
-}
-
-static int s3cmmc_init(struct mmc *mmc)
-{
- struct s3c24x0_clock_power *clk_power =s3c24x0_get_base_clock_power();
- struct s3c24x0_sdi *sdi_regs = s3c24x0_get_base_sdi();
-
- /* Start the clock. */
- setbits_le32(&clk_power->clkcon, 1 << 9);
-
-#if defined(CONFIG_S3C2440)
- writel(S3C2440_SDICON_SDRESET, &sdi_regs->sdicon); - mdelay(10); - writel(0x7fffff, &sdi_regs->sdidtimer);
-#else
- writel(0xffff, &sdi_regs->sdidtimer);
-#endif
- writel(MMC_MAX_BLOCK_LEN, &sdi_regs->sdibsize);
- writel(0x0, &sdi_regs->sdiimsk);
-
- writel(S3C2410_SDICON_FIFORESET | S3C2410_SDICON_CLOCKTYPE,
- &sdi_regs->sdicon);
-
- mdelay(125);
-
- return 0;
-}
-
-struct s3cmmc_priv {
- struct mmc_config cfg; - int (*getcd)(struct mmc *); - int (*getwp)(struct mmc *);
-};
-
-static int s3cmmc_getcd(struct mmc *mmc)
-{
- struct s3cmmc_priv *priv = mmc->priv;
- if (priv->getcd)
- return priv->getcd(mmc);
- else
- return 0;
-}
-
-static int s3cmmc_getwp(struct mmc *mmc)
-{
- struct s3cmmc_priv *priv = mmc->priv;
- if (priv->getwp)
- return priv->getwp(mmc);
- else
- return 0;
-}
-
-static const struct mmc_ops s3cmmc_ops = {
- .send_cmd = s3cmmc_send_cmd, - .set_ios = s3cmmc_set_ios, - .init = s3cmmc_init, - .getcd = s3cmmc_getcd, - .getwp = s3cmmc_getwp,
-};
-
-int s3cmmc_initialize(bd_t *bis, int (*getcd)(struct mmc *),
- int (*getwp)(struct mmc *))
-{
- struct s3cmmc_priv *priv; - struct mmc *mmc; - struct mmc_config *cfg;
-
- priv = calloc(1, sizeof(*priv));
- if (!priv)
- return -ENOMEM;
- cfg = &priv->cfg;
-
- cfg->name = "S3C MMC"; - cfg->ops = &s3cmmc_ops; - cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34; - cfg->host_caps = MMC_MODE_4BIT | MMC_MODE_HS; - cfg->f_min = 400000; - cfg->f_max = get_PCLK() / 2; - cfg->b_max = 0x80; - -#if defined(CONFIG_S3C2410) - /* - * S3C2410 has some bug that prevents reliable - * operation at higher speed - */
- cfg->f_max /= 2;
-#endif
-
- mmc = mmc_create(cfg, priv);
- if (!mmc) {
- free(priv);
- return -ENOMEM;
- }
-
- return 0;
-}
scripts/config_whitelist.txt +0 -1
@@ -2365,7 +2365,6 @@ CONFIG_S3C2400 CONFIG_S3C2410 CONFIG_S3C2410_NAND_BBT CONFIG_S3C2410_NAND_HWECC -CONFIG_S3C2440 CONFIG_S3C24X0 CONFIG_S3C24XX_TACLS CONFIG_S3C24XX_TWRPH0
--
2.13.0.303.g4ebf302169-goog
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Thanks,
Minkyu Kang
PATCH 10/38 samsung: mmc: Drop s3c_sdi driver
In reply to Simon GlassQuoted 3 lines · Simon Glass
This is no-longer used in U-Boot. Drop it.
Signed-off-by Simon Glass <[email protected]>
Quoted 362 lines
---
drivers/mmc/Makefile | 1 - drivers/mmc/s3c_sdi.c | 323 ------------------------------------------- scripts/config_whitelist.txt | 1 - 3 files changed, 325 deletions(-) delete mode 100644 drivers/mmc/s3c_sdi.cdrivers/mmc/Makefile +0
-1@@ -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.odrivers/mmc/s3c_sdi.c deleted +0
-323@@ -1,323 +0,0 @@ -/* -* S3C24xx SD/MMC driver -* -* Based on OpenMoko S3C24xx driver by Harald Welte <[email protected]> -* -* Copyright (C) 2014 Marek Vasut <[email protected]> -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <malloc.h> -#include <mmc.h> -#include <errno.h> -#include <asm/arch/s3c24x0_cpu.h> -#include <asm/io.h> -#include <asm/unaligned.h> - -#define S3C2440_SDICON_SDRESET (1 << 8) -#define S3C2410_SDICON_FIFORESET (1 << 1) -#define S3C2410_SDICON_CLOCKTYPE (1 << 0) - -#define S3C2410_SDICMDCON_LONGRSP (1 << 10) -#define S3C2410_SDICMDCON_WAITRSP (1 << 9) -#define S3C2410_SDICMDCON_CMDSTART (1 << 8) -#define S3C2410_SDICMDCON_SENDERHOST (1 << 6) -#define S3C2410_SDICMDCON_INDEX 0x3f - -#define S3C2410_SDICMDSTAT_CRCFAIL (1 << 12) -#define S3C2410_SDICMDSTAT_CMDSENT (1 << 11) -#define S3C2410_SDICMDSTAT_CMDTIMEOUT (1 << 10) -#define S3C2410_SDICMDSTAT_RSPFIN (1 << 9) - -#define S3C2440_SDIDCON_DS_WORD (2 << 22) -#define S3C2410_SDIDCON_TXAFTERRESP (1 << 20) -#define S3C2410_SDIDCON_RXAFTERCMD (1 << 19) -#define S3C2410_SDIDCON_BLOCKMODE (1 << 17) -#define S3C2410_SDIDCON_WIDEBUS (1 << 16) -#define S3C2440_SDIDCON_DATSTART (1 << 14) -#define S3C2410_SDIDCON_XFER_RXSTART (2 << 12) -#define S3C2410_SDIDCON_XFER_TXSTART (3 << 12) -#define S3C2410_SDIDCON_BLKNUM 0x7ff - -#define S3C2410_SDIDSTA_FIFOFAIL (1 << 8) -#define S3C2410_SDIDSTA_CRCFAIL (1 << 7) -#define S3C2410_SDIDSTA_RXCRCFAIL (1 << 6) -#define S3C2410_SDIDSTA_DATATIMEOUT (1 << 5) -#define S3C2410_SDIDSTA_XFERFINISH (1 << 4) - -#define S3C2410_SDIFSTA_TFHALF (1 << 11) -#define S3C2410_SDIFSTA_COUNTMASK 0x7f - -/* -* WARNING: We only support one SD IP block. -* NOTE: It's not likely there will ever exist an S3C24xx with two, -* at least not in this universe all right. -*/ -static int wide_bus; - -static int -s3cmmc_send_cmd (struct mmc *mmc,struct mmc_cmd *cmd,struct mmc_data *data) -{ -struct s3c24x0_sdi *sdi_regs =s3c24x0_get_base_sdi (); -uint32_t sdiccon, sdicsta, sdidcon, sdidsta, sdidat, sdifsta; -uint32_t sdicsta_wait_bit =S3C2410_SDICMDSTAT_CMDSENT ; -unsigned int timeout =100000 ; -int ret =0 , xfer_len, data_offset =0 ; -const uint32_t sdidsta_err_mask =S3C2410_SDIDSTA_FIFOFAIL | -S3C2410_SDIDSTA_CRCFAIL |S3C2410_SDIDSTA_RXCRCFAIL | -S3C2410_SDIDSTA_DATATIMEOUT ; - - -writel (0xffffffff , &sdi_regs->sdicsta); -writel (0xffffffff , &sdi_regs->sdidsta); -writel (0xffffffff , &sdi_regs->sdifsta); - -/* Set up data transfer (if applicable). */ -if (data) { -writel (data->blocksize, &sdi_regs->sdibsize); - - sdidcon = data->blocks &S3C2410_SDIDCON_BLKNUM ; - sdidcon |=S3C2410_SDIDCON_BLOCKMODE ; -#if defined(CONFIG_S3C2440 ) - sdidcon |=S3C2440_SDIDCON_DS_WORD |S3C2440_SDIDCON_DATSTART ; -#endif -if (wide_bus) - sdidcon |=S3C2410_SDIDCON_WIDEBUS ; - -if (data->flags &MMC_DATA_READ ) { - sdidcon |=S3C2410_SDIDCON_RXAFTERCMD ; - sdidcon |=S3C2410_SDIDCON_XFER_RXSTART ; - }else { - sdidcon |=S3C2410_SDIDCON_TXAFTERRESP ; - sdidcon |=S3C2410_SDIDCON_XFER_TXSTART ; - } - -writel (sdidcon, &sdi_regs->sdidcon); - } - -/* Write CMD arg. */ -writel (cmd->cmdarg, &sdi_regs->sdicarg); - -/* Write CMD index. */ - sdiccon = cmd->cmdidx &S3C2410_SDICMDCON_INDEX ; - sdiccon |=S3C2410_SDICMDCON_SENDERHOST ; - sdiccon |=S3C2410_SDICMDCON_CMDSTART ; - -/* Command with short response. */ -if (cmd->resp_type &MMC_RSP_PRESENT ) { - sdiccon |=S3C2410_SDICMDCON_WAITRSP ; - sdicsta_wait_bit =S3C2410_SDICMDSTAT_RSPFIN ; - } - -/* Command with long response. */ -if (cmd->resp_type &MMC_RSP_136 ) - sdiccon |=S3C2410_SDICMDCON_LONGRSP ; - -/* Start the command. */ -writel (sdiccon, &sdi_regs->sdiccon); - -/* Wait for the command to complete or for response. */ -for (timeout =100000 ; timeout; timeout--) { - sdicsta =readl (&sdi_regs->sdicsta); -if (sdicsta & sdicsta_wait_bit) -break ; - -if (sdicsta &S3C2410_SDICMDSTAT_CMDTIMEOUT ) - timeout =1 ; - } - -/* Clean the status bits. */ -setbits_le32 (&sdi_regs->sdicsta,0xf <<9 ); - -if (!timeout) { -puts ("S3C SDI: Command timed out!\n" ); - ret = -ETIMEDOUT ; - goto error; - } - -/* Read out the response. */ -if (cmd->resp_type &MMC_RSP_136 ) { - cmd->response[0 ] =readl (&sdi_regs->sdirsp0); - cmd->response[1 ] =readl (&sdi_regs->sdirsp1); - cmd->response[2 ] =readl (&sdi_regs->sdirsp2); - cmd->response[3 ] =readl (&sdi_regs->sdirsp3); - }else { - cmd->response[0 ] =readl (&sdi_regs->sdirsp0); - } - -/* If there are no data, we're done. */ -if (!data) -return 0 ; - - xfer_len = data->blocksize * data->blocks; - -while (xfer_len >0 ) { - sdidsta =readl (&sdi_regs->sdidsta); - sdifsta =readl (&sdi_regs->sdifsta); - -if (sdidsta & sdidsta_err_mask) { -printf ("S3C SDI: Data error (sdta=0x%08x)\n" , sdidsta); - ret = -EIO ; - goto error; - } - -if (data->flags &MMC_DATA_READ ) { -if ((sdifsta &S3C2410_SDIFSTA_COUNTMASK ) <4 ) -continue ; - sdidat =readl (&sdi_regs->sdidat); -put_unaligned_le32 (sdidat, data->dest + data_offset); - }else {/* Write */ -/* TX FIFO half full. */ -if (!(sdifsta &S3C2410_SDIFSTA_TFHALF )) -continue ; - -/* TX FIFO is below 32b full, write. */ - sdidat =get_unaligned_le32 (data->src + data_offset); -writel (sdidat, &sdi_regs->sdidat); - } - data_offset +=4 ; - xfer_len -=4 ; - } - -/* Wait for the command to complete or for response. */ -for (timeout =100000 ; timeout; timeout--) { - sdidsta =readl (&sdi_regs->sdidsta); -if (sdidsta &S3C2410_SDIDSTA_XFERFINISH ) -break ; - -if (sdidsta &S3C2410_SDIDSTA_DATATIMEOUT ) - timeout =1 ; - } - -/* Clear status bits. */ -writel (0x6f8 , &sdi_regs->sdidsta); - -if (!timeout) { -puts ("S3C SDI: Command timed out!\n" ); - ret = -ETIMEDOUT ; - goto error; - } - -writel (0 , &sdi_regs->sdidcon); - -return 0 ; -error: -return ret; -} - -static int s3cmmc_set_ios (struct mmc *mmc) -{ -struct s3c24x0_sdi *sdi_regs =s3c24x0_get_base_sdi (); -uint32_t divider =0 ; - - wide_bus = (mmc->bus_width ==4 ); - -if (!mmc->clock) -return 0 ; - - divider =DIV_ROUND_UP (get_PCLK (), mmc->clock); -if (divider) - divider--; - -writel (divider, &sdi_regs->sdipre); -mdelay (125 ); - -return 0 ; -} - -static int s3cmmc_init (struct mmc *mmc) -{ -struct s3c24x0_clock_power *clk_power =s3c24x0_get_base_clock_power (); -struct s3c24x0_sdi *sdi_regs =s3c24x0_get_base_sdi (); - -/* Start the clock. */ -setbits_le32 (&clk_power->clkcon,1 <<9 ); - -#if defined(CONFIG_S3C2440 ) -writel (S3C2440_SDICON_SDRESET , &sdi_regs->sdicon); -mdelay (10 ); -writel (0x7fffff , &sdi_regs->sdidtimer); -#else -writel (0xffff , &sdi_regs->sdidtimer); -#endif -writel (MMC_MAX_BLOCK_LEN , &sdi_regs->sdibsize); -writel (0x0 , &sdi_regs->sdiimsk); - -writel (S3C2410_SDICON_FIFORESET |S3C2410_SDICON_CLOCKTYPE , - &sdi_regs->sdicon); - -mdelay (125 ); - -return 0 ; -} - -struct s3cmmc_priv { -struct mmc_config cfg; -int (*getcd)(struct mmc *); -int (*getwp)(struct mmc *); -}; - -static int s3cmmc_getcd (struct mmc *mmc) -{ -struct s3cmmc_priv *priv = mmc->priv; -if (priv->getcd) -return priv->getcd (mmc); -else -return 0 ; -} - -static int s3cmmc_getwp (struct mmc *mmc) -{ -struct s3cmmc_priv *priv = mmc->priv; -if (priv->getwp) -return priv->getwp (mmc); -else -return 0 ; -} - -static const struct mmc_ops s3cmmc_ops = { - .send_cmd = s3cmmc_send_cmd, - .set_ios = s3cmmc_set_ios, - .init = s3cmmc_init, - .getcd = s3cmmc_getcd, - .getwp = s3cmmc_getwp, -}; - -int s3cmmc_initialize (bd_t *bis,int (*getcd)(struct mmc *), -int (*getwp)(struct mmc *)) -{ -struct s3cmmc_priv *priv; -struct mmc *mmc; -struct mmc_config *cfg; - - priv =calloc (1 ,sizeof (*priv)); -if (!priv) -return -ENOMEM ; - cfg = &priv->cfg; - - cfg->name ="S3C MMC" ; - cfg->ops = &s3cmmc_ops; - cfg->voltages =MMC_VDD_32_33 |MMC_VDD_33_34 ; - cfg->host_caps =MMC_MODE_4BIT |MMC_MODE_HS ; - cfg->f_min =400000 ; - cfg->f_max =get_PCLK () /2 ; - cfg->b_max =0x80 ; - -#if defined(CONFIG_S3C2410 ) -/* -* S3C2410 has some bug that prevents reliable -* operation at higher speed -*/ - cfg->f_max /=2 ; -#endif - - mmc =mmc_create (cfg, priv); -if (!mmc) { -free (priv); -return -ENOMEM ; - } - -return 0 ; -}scripts/config_whitelist.txt +0
-1@@ -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
PATCH 10/38 samsung: mmc: Drop s3c_sdi driver
In reply to Simon GlassQuoted 4 lines · Simon Glass
This is no-longer used in U-Boot. Drop it.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Jaehoon Chung <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/ee925617/attachment.sig>
PATCH 11/38 samsung: usb: Drop ohci-s3c24xx driver
In reply to Simon GlassThis is not used anymore. Drop it.
---
drivers/usb/host/Makefile | 1 - drivers/usb/host/ohci-s3c24xx.c | 1688 --------------------------------------- drivers/usb/host/ohci-s3c24xx.h | 409 ---------- include/common.h | 3 +- 4 files changed, 1 insertion(+), 2100 deletions(-) delete mode 100644 drivers/usb/host/ohci-s3c24xx.c delete mode 100644 drivers/usb/host/ohci-s3c24xx.h
drivers/usb/host/Makefile +0 -1
@@ -17,7 +17,6 @@ obj-$(CONFIG_USB_OHCI_DA8XX) += ohci-da8xx.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o obj-$(CONFIG_USB_SL811HS) += sl811-hcd.o -obj-$(CONFIG_USB_OHCI_S3C24XX) += ohci-s3c24xx.o obj-$(CONFIG_USB_OHCI_EP93XX) += ohci-ep93xx.o obj-$(CONFIG_USB_OHCI_SUNXI) += ohci-sunxi.o obj-$(CONFIG_USB_OHCI_LPC32XX) += ohci-lpc32xx.o
drivers/usb/host/ohci-s3c24xx.c deleted +0 -1688
1,688 lines not on this page · raw message
drivers/usb/host/ohci-s3c24xx.h deleted +0 -409
409 lines not on this page · raw message
include/common.h +1 -2
@@ -646,8 +646,7 @@ int get_clocks (void);#if defined(CONFIG_MPC5xxx)int prt_mpc5xxx_clks (void );#endif -#if defined(CONFIG_S3C24X0 ) || \ - defined(CONFIG_LH7A40X ) || \ +#if defined(CONFIG_LH7A40X ) || \ defined(CONFIG_EP93XX )ulong get_FCLK (void );ulong get_HCLK (void );
Signature · 1 line
2.13.0.303.g4ebf302169-goog
A message that is not in the archive (sent off-list or not yet received): CALrBrZ3_833sZmpswnL-dSx_yRXUkVJAU06ZhWR1WBAGC1C66A@mail.gmail.com
PATCH 11/38 samsung: usb: Drop ohci-s3c24xx driver
2017. 5. 18. 00:12에 "Simon Glass" <[email protected]>님이 작성:
This is not used anymore. Drop it.
---
drivers/usb/host/Makefile | 1 - drivers/usb/host/ohci-s3c24xx.c | 1688 ------------------------------ --------- drivers/usb/host/ohci-s3c24xx.h | 409 ---------- include/common.h | 3 +- 4 files changed, 1 insertion(+), 2100 deletions(-) delete mode 100644 drivers/usb/host/ohci-s3c24xx.c delete mode 100644 drivers/usb/host/ohci-s3c24xx.h
drivers/usb/host/Makefile +0 -1
@@ -17,7 +17,6 @@ obj-$(CONFIG_USB_OHCI_DA8XX) += ohci-da8xx.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o obj-$(CONFIG_USB_SL811HS) += sl811-hcd.o -obj-$(CONFIG_USB_OHCI_S3C24XX) += ohci-s3c24xx.o obj-$(CONFIG_USB_OHCI_EP93XX) += ohci-ep93xx.o obj-$(CONFIG_USB_OHCI_SUNXI) += ohci-sunxi.o obj-$(CONFIG_USB_OHCI_LPC32XX) += ohci-lpc32xx.o
drivers/usb/host/ohci- renamed from drivers/usb/host/ohci-s3c24xx.c +0 -0
s3c24xx.c
deleted file mode 100644
index 28b9ab5176..0000000000
drivers/usb/host/ohci-s3c24xx.c deleted +0 -146
146 lines not on this page · raw message
*buffer,
- int transfer_len, struct devrequest *setup, char *str,
- int small)
-{
- struct urb_priv *purb = &urb_priv;
-
- dbg("%s URB:[%4x] dev:%2d,ep:%2d-%c,type:%s,len:%d/%d stat:%#lx",
- str, - sohci_get_current_frame_number(dev), - usb_pipedevice(pipe), - usb_pipeendpoint(pipe), - usb_pipeout(pipe) ? 'O' : 'I', - usb_pipetype(pipe) < 2 ?
- (usb_pipeint(pipe) ? "INTR" : "ISOC") :
- (usb_pipecontrol(pipe) ? "CTRL" : "BULK"),
- purb->actual_length, transfer_len, dev->status);
-#ifdef OHCI_VERBOSE_DEBUG
- if (!small) {
- int i, len;
-
- if (usb_pipecontrol(pipe)) {
- printf(__FILE__ ": cmd(8):");
- for (i = 0; i < 8; i++)
- printf(" %02x", ((__u8 *) setup)[i]);
- printf("\n");
- }
- if (transfer_len > 0 && buffer) {
- printf(__FILE__ ": data(%d/%d):",
- purb->actual_length, transfer_len);
- len = usb_pipeout(pipe) ?
- transfer_len : purb->actual_length;
- for (i = 0; i < 16 && i < len; i++)
- printf(" %02x", ((__u8 *) buffer)[i]);
- printf("%s\n", i < len ? "..." : "");
- }
- }
-#endif
-}
-
-/* just for debugging; prints non-empty branches of the
- int ed tree inclusive iso eds*/
-void ep_print_int_eds(struct ohci *ohci, char *str) -{
- int i, j;
- __u32 *ed_p;
- for (i = 0; i < 32; i++) {
- j = 5;
- ed_p = &(ohci->hcca->int_table[i]);
- if (*ed_p == 0)
- continue;
- printf(__FILE__ ": %s branch int %2d(%2x):", str, i, i);
- while (*ed_p != 0 && j--) {
- struct ed *ed = (struct ed *) m32_swap(ed_p);
- printf(" ed: %4x;", ed->hwINFO);
- ed_p = &ed->hwNextED;- }
- printf("\n");
- }
-}
-
-static void ohci_dump_intr_mask(char *label, __u32 mask) -{
- dbg("%s: 0x%08x%s%s%s%s%s%s%s%s%s",
- label, - mask, - (mask & OHCI_INTR_MIE) ? " MIE" : "", - (mask & OHCI_INTR_OC) ? " OC" : "", - (mask & OHCI_INTR_RHSC) ? " RHSC" : "", - (mask & OHCI_INTR_FNO) ? " FNO" : "", - (mask & OHCI_INTR_UE) ? " UE" : "", - (mask & OHCI_INTR_RD) ? " RD" : "", - (mask & OHCI_INTR_SF) ? " SF" : "", - (mask & OHCI_INTR_WDH) ? " WDH" : "", - (mask & OHCI_INTR_SO) ? " SO" : "");
-}
-
-static void maybe_print_eds(char *label, __u32 value) -{
- struct ed *edp = (struct ed *) value;
-
- if (value) {
- dbg("%s %08x", label, value);
- dbg("%08x", edp->hwINFO);
- dbg("%08x", edp->hwTailP);
- dbg("%08x", edp->hwHeadP);
- dbg("%08x", edp->hwNextED);- }
-}
-
-static char *hcfs2string(int state)
-{
- switch (state) {
- case OHCI_USB_RESET:
- return "reset";
- case OHCI_USB_RESUME:
- return "resume";
- case OHCI_USB_OPER:
- return "operational";
- case OHCI_USB_SUSPEND:
- return "suspend";
- }
- return "?";
-}
-
-/* dump control and status registers */ -static void ohci_dump_status(struct ohci *controller) -{
- struct ohci_regs *regs = controller->regs;
- __u32 temp;
-
- temp = readl(®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) */
drivers/usb/host/ohci- renamed from drivers/usb/host/ohci-s3c24xx.h +0 -0
s3c24xx.h
deleted file mode 100644
index f272d78859..0000000000
drivers/usb/host/ohci-s3c24xx.h deleted +0 -184
184 lines not on this page · raw message
*/
-#define OHCI_CTRL_IR (1 << 8) /* interrupt routing */ -#define OHCI_CTRL_RWC (1 << 9) /* remote wakeup connected */ -#define OHCI_CTRL_RWE (1 << 10) /* remote wakeup enable */ - -/* pre-shifted values for HCFS */ -# define OHCI_USB_RESET (0 << 6) -# define OHCI_USB_RESUME (1 << 6) -# define OHCI_USB_OPER (2 << 6) -# define OHCI_USB_SUSPEND (3 << 6)
-
-/*
- * HcCommandStatus (cmdstatus) register masks
- */
-#define OHCI_HCR (1 << 0) /* host controller reset */ -#define OHCI_CLF (1 << 1) /* control list filled */ -#define OHCI_BLF (1 << 2) /* bulk list filled */ -#define OHCI_OCR (1 << 3) /* ownership change request */ -#define OHCI_SOC (3 << 16) /* scheduling overrun count */
-
-/*
- * masks used with interrupt registers:
- * HcInterruptStatus (intrstatus)
- * HcInterruptEnable (intrenable)
- * HcInterruptDisable (intrdisable)
- */
-#define OHCI_INTR_SO (1 << 0) /* scheduling overrun */
-#define OHCI_INTR_WDH (1 << 1) /* writeback of done_head */
-#define OHCI_INTR_SF (1 << 2) /* start frame */
-#define OHCI_INTR_RD (1 << 3) /* resume detect */
-#define OHCI_INTR_UE (1 << 4) /* unrecoverable error */
-#define OHCI_INTR_FNO (1 << 5) /* frame number overflow */
-#define OHCI_INTR_RHSC (1 << 6) /* root hub status change */
-#define OHCI_INTR_OC (1 << 30) /* ownership change */
-#define OHCI_INTR_MIE (1 << 31) /* master interrupt enable */
-
-/* Virtual Root HUB */
-struct virt_root_hub {
- int devnum; /* Address of Root Hub endpoint */
- void *dev; /* was urb */
- void *int_addr;
- int send;
- int interval;-};
-
-/* USB HUB CONSTANTS (not OHCI-specific; see hub.h) */ -
-/* destination of request */
-#define RH_INTERFACE 0x01 -#define RH_ENDPOINT 0x02 -#define RH_OTHER 0x03
-
-#define RH_CLASS 0x20
-#define RH_VENDOR 0x40
-
-/* Requests: bRequest << 8 | bmRequestType */
-#define RH_GET_STATUS 0x0080 -#define RH_CLEAR_FEATURE 0x0100 -#define RH_SET_FEATURE 0x0300 -#define RH_SET_ADDRESS 0x0500 -#define RH_GET_DESCRIPTOR 0x0680 -#define RH_SET_DESCRIPTOR 0x0700 -#define RH_GET_CONFIGURATION 0x0880 -#define RH_SET_CONFIGURATION 0x0900 -#define RH_GET_STATE 0x0280 -#define RH_GET_INTERFACE 0x0A80 -#define RH_SET_INTERFACE 0x0B00 -#define RH_SYNC_FRAME 0x0C80
-/* Our Vendor Specific Request */
-#define RH_SET_EP 0x2000
-
-
-/* Hub port features */
-#define RH_PORT_CONNECTION 0x00
-#define RH_PORT_ENABLE 0x01
-#define RH_PORT_SUSPEND 0x02
-#define RH_PORT_OVER_CURRENT 0x03 -#define RH_PORT_RESET 0x04 -#define RH_PORT_POWER 0x08 -#define RH_PORT_LOW_SPEED 0x09 - -#define RH_C_PORT_CONNECTION 0x10 -#define RH_C_PORT_ENABLE 0x11 -#define RH_C_PORT_SUSPEND 0x12
-#define RH_C_PORT_OVER_CURRENT 0x13
-#define RH_C_PORT_RESET 0x14
-
-/* Hub features */
-#define RH_C_HUB_LOCAL_POWER 0x00
-#define RH_C_HUB_OVER_CURRENT 0x01
-
-#define RH_DEVICE_REMOTE_WAKEUP 0x00
-#define RH_ENDPOINT_STALL 0x01
-
-#define RH_ACK 0x01
-#define RH_REQ_ERR -1
-#define RH_NACK 0x00
-
-
-/* OHCI ROOT HUB REGISTER MASKS */
-
-/* roothub.portstatus [i] bits */
-#define RH_PS_CCS 0x00000001 /* current connect status */ -#define RH_PS_PES 0x00000002 /* port enable status */ -#define RH_PS_PSS 0x00000004 /* port suspend status */ -#define RH_PS_POCI 0x00000008 /* port over current indicator */ -#define RH_PS_PRS 0x00000010 /* port reset status */ -#define RH_PS_PPS 0x00000100 /* port power status */ -#define RH_PS_LSDA 0x00000200 /* low speed device attached */ -#define RH_PS_CSC 0x00010000 /* connect status change */ -#define RH_PS_PESC 0x00020000 /* port enable status change */ -#define RH_PS_PSSC 0x00040000 /* port suspend status change */ -#define RH_PS_OCIC 0x00080000 /* over current indicator change
*/
-#define RH_PS_PRSC 0x00100000 /* port reset status change */
-
-/* roothub.status bits */
-#define RH_HS_LPS 0x00000001 /* local power status */ -#define RH_HS_OCI 0x00000002 /* over current indicator */ -#define RH_HS_DRWE 0x00008000 /* device remote wakeup enable */ -#define RH_HS_LPSC 0x00010000 /* local power status change */ -#define RH_HS_OCIC 0x00020000 /* over current indicator change
*/
-#define RH_HS_CRWE 0x80000000 /* clear remote wakeup enable */
-
-/* roothub.b masks */
-#define RH_B_DR 0x0000ffff /* device removable
flags */
-#define RH_B_PPCM 0xffff0000 /* port power control mask */
-
-/* roothub.a masks */
-#define RH_A_NDP (0xff << 0) /* number of
downstream ports */
-#define RH_A_PSM (1 << 8) /* power switching
mode */
-#define RH_A_NPS (1 << 9) /* no power switching
*/
-#define RH_A_DT (1 << 10) /* device type (mbz) */ -#define RH_A_OCPM (1 << 11) /* over current
protection mode */
-#define RH_A_NOCP (1 << 12) /* no over current
protection */
-#define RH_A_POTPGT (0xff << 24) /* power on to power
good time */
-
-/* urb */
-#define N_URB_TD 48
-struct urb_priv {
- struct ed *ed;
- __u16 length; /* number of tds associated with this
request */
- __u16 td_cnt; /* number of tds already serviced */ - int state; - unsigned long pipe; - int actual_length; - struct td *td[N_URB_TD]; /* list pointer to all
corresponding TDs
- associated with this request */
-};
-#define URB_DEL 1
-
-/*
- * This is the full ohci controller description
- *
- * Note how the "proper" USB information is just
- * a subset of what the full implementation needs. (Linus)
- */
-
-
-struct ohci {
- struct ohci_hcca *hcca; /* hcca */
- /*dma_addr_t hcca_dma; */
-
- int irq; - int disabled; /* e.g. got a UE, we're hung */ - int sleeping; - unsigned long flags; /* for HC bugs */
-
- struct ohci_regs *regs; /* OHCI controller's memory */
-
- struct ed *ed_rm_list[2]; /* lists of all endpoints to be removed
*/
- struct ed *ed_bulktail; /* last endpoint of bulk list */ - struct ed *ed_controltail; /* last endpoint of control list */ - int intrstatus; - __u32 hc_control; /* copy of the hc control reg */ - struct usb_device *dev[32]; - struct virt_root_hub rh;
-
- const char *slot_name;
-};
-
-#define NUM_EDS 8 /* num of preallocated endpoint descriptors
*/
-
-struct ohci_device {
- struct ed ed[NUM_EDS];
- int ed_cnt;
-};
-
-/* hcd */
-/* endpoint */
-static int ep_link(struct ohci *ohci, struct ed *ed); -static int ep_unlink(struct ohci *ohci, struct ed *ed); -static struct ed *ep_add_ed(struct usb_device *usb_dev, unsigned long pipe);
- -/*--------------------------------------------------------- ----------------*/
-
-/* we need more TDs than EDs */
-#define NUM_TD 64
-
-/* +1 so we can align the storage */
-struct td gtd[NUM_TD + 1];
-
-/* pointers to aligned storage */
-struct td *ptd;
-
-/* TDs ... */
-static inline struct td *td_alloc(struct usb_device *usb_dev) -{
- int i;
- struct td *td;
-
- td = NULL;
- for (i = 0; i < NUM_TD; i++) {
- if (ptd[i].usb_dev == NULL) {
- td = &ptd[i]; - td->usb_dev = usb_dev; - break;
- }
- }
-
- return td;
-}
-
-static inline void ed_free(struct ed *ed)
-{
- ed->usb_dev = NULL;
-}
include/common.h +1 -2
@@ -646,8 +646,7 @@ int get_clocks (void);#if defined(CONFIG_MPC5xxx)int prt_mpc5xxx_clks (void );#endif -#if defined(CONFIG_S3C24X0 ) || \ - defined(CONFIG_LH7A40X ) || \ +#if defined(CONFIG_LH7A40X ) || \ defined(CONFIG_EP93XX )ulong get_FCLK (void );ulong get_HCLK (void );
--
2.13.0.303.g4ebf302169-goog
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Thanks,
Minkyu Kang
PATCH 11/38 samsung: usb: Drop ohci-s3c24xx driver
In reply to Simon GlassQuoted 3 lines · Simon Glass
This is not used anymore. Drop it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/44086e48/attachment.sig>
PATCH 11/38 samsung: usb: Drop ohci-s3c24xx driver
Quoted 8 lines · Tom Rini
Quoted 3 lines · Simon Glass
This is not used anymore. Drop it.
Signed-off-by Simon Glass <[email protected]>Applied to u-boot/master, thanks!
This should have gone through u-boot-usb/master , but clearly , you again violated our agreement to not bypass the structure and apply USB patches directly. Please see my email off-list for I am reaching my limit.
Signature · 2 lines
Best regards, Marek Vasut
PATCH 12/38 samsung: nand: Drop s3c2410_nand driver
In reply to Simon GlassThis is not used anymore. Drop it.
---
drivers/mtd/nand/Makefile | 1 - drivers/mtd/nand/s3c2410_nand.c | 175 ---------------------------------------- 2 files changed, 176 deletions(-) delete mode 100644 drivers/mtd/nand/s3c2410_nand.c
drivers/mtd/nand/Makefile +0 -1
@@ -59,7 +59,6 @@ obj-$(CONFIG_NAND_MXC) += mxc_nand.o obj-$(CONFIG_NAND_MXS) += mxs_nand.o obj-$(CONFIG_NAND_NDFC) += ndfc.o obj-$(CONFIG_NAND_PXA3XX) += pxa3xx_nand.o -obj-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o obj-$(CONFIG_NAND_SPEAR) += spr_nand.o obj-$(CONFIG_TEGRA_NAND) += tegra_nand.o obj-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
drivers/mtd/nand/s3c2410_nand.c deleted +0 -175
175 lines not on this page · raw message
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 12/38 samsung: nand: Drop s3c2410_nand driver
2017. 5. 17. 23:53에 "Simon Glass" <[email protected]>님이 작성:
This is not used anymore. Drop it.
---
drivers/mtd/nand/Makefile | 1 - drivers/mtd/nand/s3c2410_nand.c | 175 ------------------------------ ---------- 2 files changed, 176 deletions(-) delete mode 100644 drivers/mtd/nand/s3c2410_nand.c
drivers/mtd/nand/Makefile +0 -1
@@ -59,7 +59,6 @@ obj-$(CONFIG_NAND_MXC) += mxc_nand.o obj-$(CONFIG_NAND_MXS) += mxs_nand.o obj-$(CONFIG_NAND_NDFC) += ndfc.o obj-$(CONFIG_NAND_PXA3XX) += pxa3xx_nand.o -obj-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o obj-$(CONFIG_NAND_SPEAR) += spr_nand.o obj-$(CONFIG_TEGRA_NAND) += tegra_nand.o obj-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
drivers/mtd/nand/s3c2410_nan renamed from drivers/mtd/nand/s3c2410_nand.c +0 -0
d.c
deleted file mode 100644
index dd742a6351..0000000000
drivers/mtd/nand/s3c2410_nand.c deleted +0 -41
41 lines not on this page · raw message
ctrl)
-{
- struct nand_chip *chip = mtd_to_nand(mtd);
- struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
-
- debug("hwcontrol(): 0x%02x 0x%02x\n", cmd, ctrl);
-
- if (ctrl & NAND_CTRL_CHANGE) {
- ulong IO_ADDR_W = (ulong)nand;
-
- if (!(ctrl & NAND_CLE))
- IO_ADDR_W |= S3C2410_ADDR_NCLE;
- if (!(ctrl & NAND_ALE))
- IO_ADDR_W |= S3C2410_ADDR_NALE;
-
- chip->IO_ADDR_W = (void *)IO_ADDR_W;
-
- if (ctrl & NAND_NCE)
- writel(readl(&nand->nfconf) & ~S3C2410_NFCONF_nFCE,
- &nand->nfconf);
- else
- writel(readl(&nand->nfconf) | S3C2410_NFCONF_nFCE,
- &nand->nfconf);
- }
-
- if (cmd != NAND_CMD_NONE)
- writeb(cmd, chip->IO_ADDR_W);
-}
-
-static int s3c24x0_dev_ready(struct mtd_info *mtd) -{
- struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
- debug("dev_ready\n");
- return readl(&nand->nfstat) & 0x01;-}
-
-#ifdef CONFIG_S3C2410_NAND_HWECC
-void s3c24x0_nand_enable_hwecc(struct mtd_info *mtd, int mode) -{
- struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
- debug("s3c24x0_nand_enable_hwecc(%p, %d)\n", mtd, mode);
- writel(readl(&nand->nfconf) | S3C2410_NFCONF_INITECC,&nand->nfconf);
-}
-
-static int s3c24x0_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
- u_char *ecc_code)
-{
- struct s3c24x0_nand *nand = s3c24x0_get_base_nand();
- ecc_code[0] = readb(&nand->nfecc);
- ecc_code[1] = readb(&nand->nfecc + 1);
- ecc_code[2] = readb(&nand->nfecc + 2);
- debug("s3c24x0_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",- mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
-
- return 0;
-}
-
-static int s3c24x0_nand_correct_data(struct mtd_info *mtd, u_char *dat,
- u_char *read_ecc, u_char *calc_ecc)
-{
- if (read_ecc[0] == calc_ecc[0] &&
- read_ecc[1] == calc_ecc[1] &&
- read_ecc[2] == calc_ecc[2])
- return 0;
-
- printf("s3c24x0_nand_correct_data: not implemented\n");
- return -EBADMSG;
-}
-#endif
-
-int board_nand_init(struct nand_chip *nand)
-{
- u_int32_t cfg; - u_int8_t tacls, twrph0, twrph1; - struct s3c24x0_clock_power *clk_power =
s3c24x0_get_base_clock_power();
- struct s3c24x0_nand *nand_reg = s3c24x0_get_base_nand();
-
- debug("board_nand_init()\n");
-
- writel(readl(&clk_power->clkcon) | (1 << 4), &clk_power->clkcon);
-
- /* initialize hardware */
-#if defined(CONFIG_S3C24XX_CUSTOM_NAND_TIMING)
- tacls = CONFIG_S3C24XX_TACLS; - twrph0 = CONFIG_S3C24XX_TWRPH0; - twrph1 = CONFIG_S3C24XX_TWRPH1; -#else - tacls = 4; - twrph0 = 8; - twrph1 = 8; -#endif - - cfg = S3C2410_NFCONF_EN; - cfg |= S3C2410_NFCONF_TACLS(tacls - 1); - cfg |= S3C2410_NFCONF_TWRPH0(twrph0 - 1); - cfg |= S3C2410_NFCONF_TWRPH1(twrph1 - 1); - writel(cfg, &nand_reg->nfconf); - - /* initialize nand_chip data structure */ - nand->IO_ADDR_R = (void *)&nand_reg->nfdata; - nand->IO_ADDR_W = (void *)&nand_reg->nfdata;
-
- nand->select_chip = NULL;
-
- /* read_buf and write_buf are default */
- /* read_byte and write_byte are default */
-#ifdef CONFIG_NAND_SPL
- nand->read_buf = nand_read_buf;
-#endif
-
- /* hwcontrol always must be implemented */
- nand->cmd_ctrl = s3c24x0_hwcontrol;
-
- nand->dev_ready = s3c24x0_dev_ready;
-
-#ifdef CONFIG_S3C2410_NAND_HWECC
- nand->ecc.hwctl = s3c24x0_nand_enable_hwecc; - nand->ecc.calculate = s3c24x0_nand_calculate_ecc; - nand->ecc.correct = s3c24x0_nand_correct_data; - nand->ecc.mode = NAND_ECC_HW; - nand->ecc.size = CONFIG_SYS_NAND_ECCSIZE; - nand->ecc.bytes = CONFIG_SYS_NAND_ECCBYTES; - nand->ecc.strength = 1;
-#else
- nand->ecc.mode = NAND_ECC_SOFT;
-#endif
-
-#ifdef CONFIG_S3C2410_NAND_BBT
- nand->bbt_options |= NAND_BBT_USE_FLASH;
-#endif
-
- debug("end of nand_init\n");
-
- return 0;
-}
--
2.13.0.303.g4ebf302169-goog
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Thanks,
Minkyu Kang
PATCH 12/38 samsung: nand: Drop s3c2410_nand driver
In reply to Simon GlassQuoted 3 lines · Simon Glass
This is not used anymore. Drop it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/a1fa8063/attachment.sig>
PATCH 12/38 samsung: nand: Drop s3c2410_nand driver
In reply to Simon GlassQuoted 3 lines · Simon Glass
This is not used anymore. Drop it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/50176e84/attachment.sig>
PATCH 13/38 samsung: Drop more references fo s3c24x0
In reply to Simon GlassThis is dead code now. Drop it.
---
arch/arm/cpu/arm920t/start.S | 37 ------------------------------------- drivers/i2c/s3c24x0_i2c.c | 4 ---- drivers/usb/gadget/gadget_chips.h | 8 -------- drivers/usb/host/ohci-hcd.c | 1 - scripts/config_whitelist.txt | 8 -------- 5 files changed, 58 deletions(-)
arch/arm/cpu/arm920t/start.S +0 -37
@@ -50,43 +50,6 @@ copyex: bne copyex #endif -#ifdef CONFIG_S3C24X0 - /* turn off the watchdog */ - -# if defined(CONFIG_S3C2400) -# define pWTCON 0x15300000 -# define INTMSK 0x14400008 /* Interrupt-Controller base addresses */ -# define CLKDIVN 0x14800014 /* clock divisor register */ -#else -# define pWTCON 0x53000000 -# define INTMSK 0x4A000008 /* Interrupt-Controller base addresses */ -# define INTSUBMSK 0x4A00001C -# define CLKDIVN 0x4C000014 /* clock divisor register */ -# endif - - ldr r0, =pWTCON - mov r1, #0x0 - str r1, [r0] - - /* - * mask all IRQs by setting all bits in the INTMR - default - */ - mov r1, #0xffffffff - ldr r0, =INTMSK - str r1, [r0] -# if defined(CONFIG_S3C2410) - ldr r1, =0x3ff - ldr r0, =INTSUBMSK - str r1, [r0] -# endif - - /* FCLK:HCLK:PCLK = 1:2:4 */ - /* default FCLK is 120 MHz ! */ - ldr r0, =CLKDIVN - mov r1, #3 - str r1, [r0] -#endif /* CONFIG_S3C24X0 */ - /* * we do sys-critical inits only at reboot, * not when booting from ram!
drivers/i2c/s3c24x0_i2c.c +0 -4
@@ -5,10 +5,6 @@* SPDX-License-Identifier: GPL-2.0+ */ -/* This code should work for both the S3C2400 and the S3C2410 -* as they seem to have the same I2C controller inside. -* The different address mapping is handled by the s3c24xx.h files below. -*/ #include <common.h> #include <errno.h> #include <dm.h>
drivers/usb/gadget/gadget_chips.h +0 -8
@@ -91,12 +91,6 @@#define gadget_is_atmel_usba (g) 0#endif -#ifdef CONFIG_USB_GADGET_S3C2410 -#define gadget_is_s3c2410 (g) (!strcmp("s3c2410_udc", (g)->name)) -#else -#define gadget_is_s3c2410 (g) 0 -#endif -#ifdef CONFIG_USB_GADGET_AT91 #define gadget_is_at91 (g) (!strcmp("at91_udc", (g)->name))#else
@@ -207,8 +201,6 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)return 0x09 ; else if (gadget_is_pxa27x(gadget)) return 0x10; - else if (gadget_is_s3c2410(gadget)) - return 0x11; else if (gadget_is_at91(gadget)) return 0x12; else if (gadget_is_imx(gadget))
drivers/usb/host/ohci-hcd.c +0 -1
@@ -51,7 +51,6 @@#endif #if defined(CONFIG_CPU_ARM920T) || \ - defined(CONFIG_S3C24X0) || \ defined(CONFIG_440EP) || \ defined(CONFIG_PCI_OHCI) || \ defined(CONFIG_MPC5200) || \
scripts/config_whitelist.txt +0 -8
@@ -2361,14 +2361,7 @@ CONFIG_RUN_FROM_DDR1 CONFIG_RUN_FROM_IRAM_ONLY CONFIG_RX_DESCR_NUM CONFIG_S32V234 -CONFIG_S3C2400 -CONFIG_S3C2410 -CONFIG_S3C2410_NAND_BBT -CONFIG_S3C2410_NAND_HWECC CONFIG_S3C24X0 -CONFIG_S3C24XX_TACLS -CONFIG_S3C24XX_TWRPH0 -CONFIG_S3C24XX_TWRPH1 CONFIG_S3D2_CLK_FREQ CONFIG_S5P CONFIG_S5PC100
@@ -6326,7 +6319,6 @@ CONFIG_USB_GADGET_NET2280 CONFIG_USB_GADGET_OMAP CONFIG_USB_GADGET_PXA27X CONFIG_USB_GADGET_PXA2XX -CONFIG_USB_GADGET_S3C2410 CONFIG_USB_GADGET_SA1100 CONFIG_USB_GADGET_SUPERH CONFIG_USB_GADGET_SX2
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 13/38 samsung: Drop more references fo s3c24x0
2017. 5. 17. 23:54에 "Simon Glass" <[email protected]>님이 작성:
This is dead code now. Drop it.
---
arch/arm/cpu/arm920t/start.S | 37 ------------------------------ ------- drivers/i2c/s3c24x0_i2c.c | 4 ---- drivers/usb/gadget/gadget_chips.h | 8 -------- drivers/usb/host/ohci-hcd.c | 1 - scripts/config_whitelist.txt | 8 -------- 5 files changed, 58 deletions(-)
arch/arm/cpu/arm920t/start.S +0 -6
@@ -50,43 +50,6 @@ copyex: bne copyex #endif -#ifdef CONFIG_S3C24X0 - /* turn off the watchdog */ - -# if defined(CONFIG_S3C2400) -# define pWTCON 0x15300000 -# define INTMSK 0x14400008 /* Interrupt-Controller base
addresses */
-# define CLKDIVN 0x14800014 /* clock divisor register */
-#else
-# define pWTCON 0x53000000 -# define INTMSK 0x4A000008 /* Interrupt-Controller base addresses */ -# define INTSUBMSK 0x4A00001C -# define CLKDIVN 0x4C000014 /* clock divisor register */ -# endif - - ldr r0, =pWTCON - mov r1, #0x0 - str r1, [r0]
-
- /*
- * mask all IRQs by setting all bits in the INTMR - default
- */
- mov r1, #0xffffffff - ldr r0, =INTMSK - str r1, [r0] -# if defined(CONFIG_S3C2410) - ldr r1, =0x3ff - ldr r0, =INTSUBMSK - str r1, [r0] -# endif - - /* FCLK:HCLK:PCLK = 1:2:4 */ - /* default FCLK is 120 MHz ! */ - ldr r0, =CLKDIVN - mov r1, #3 - str r1, [r0]
-#endif /* CONFIG_S3C24X0 */
-
/*
* we do sys-critical inits only at reboot,
* not when booting from ram!
drivers/i2c/s3c24x0_i2c.c +0 -4
@@ -5,10 +5,6 @@* SPDX-License-Identifier: GPL-2.0+ */ -/* This code should work for both the S3C2400 and the S3C2410 -* as they seem to have the same I2C controller inside. -* The different address mapping is handled by the s3c24xx.h files below. -*/ #include <common.h> #include <errno.h> #include <dm.h>
drivers/usb/gadget/gadget_ renamed from drivers/usb/gadget/gadget_chips.h +0 -0
chips.h
index 973cd971ad..0e3ba94730 100644
drivers/usb/gadget/gadget_chips.h +0 -6
@@ -91,12 +91,6 @@#define gadget_is_atmel_usba (g) 0#endif -#ifdef CONFIG_USB_GADGET_S3C2410 -#define gadget_is_s3c2410 (g) (!strcmp("s3c2410_udc", (g)->name)) -#else -#define gadget_is_s3c2410 (g) 0 -#endif -#ifdef CONFIG_USB_GADGET_AT91 #define gadget_is_at91 (g) (!strcmp("at91_udc", (g)->name))#else
@@ -207,8 +201,6 @@ static inline int usb_gadget_controller_number(struct
usb_gadget *gadget)
return 0x09;
else if (gadget_is_pxa27x(gadget))
return 0x10;- else if (gadget_is_s3c2410(gadget))
- return 0x11;
else if (gadget_is_at91(gadget))
return 0x12;
else if (gadget_is_imx(gadget))
drivers/usb/host/ohci-hcd.c +0 -1
@@ -51,7 +51,6 @@#endif #if defined(CONFIG_CPU_ARM920T) || \ - defined(CONFIG_S3C24X0) || \ defined(CONFIG_440EP) || \ defined(CONFIG_PCI_OHCI) || \ defined(CONFIG_MPC5200) || \
scripts/config_whitelist.txt +0 -8
@@ -2361,14 +2361,7 @@ CONFIG_RUN_FROM_DDR1 CONFIG_RUN_FROM_IRAM_ONLY CONFIG_RX_DESCR_NUM CONFIG_S32V234 -CONFIG_S3C2400 -CONFIG_S3C2410 -CONFIG_S3C2410_NAND_BBT -CONFIG_S3C2410_NAND_HWECC CONFIG_S3C24X0 -CONFIG_S3C24XX_TACLS -CONFIG_S3C24XX_TWRPH0 -CONFIG_S3C24XX_TWRPH1 CONFIG_S3D2_CLK_FREQ CONFIG_S5P CONFIG_S5PC100
@@ -6326,7 +6319,6 @@ CONFIG_USB_GADGET_NET2280 CONFIG_USB_GADGET_OMAP CONFIG_USB_GADGET_PXA27X CONFIG_USB_GADGET_PXA2XX -CONFIG_USB_GADGET_S3C2410 CONFIG_USB_GADGET_SA1100 CONFIG_USB_GADGET_SUPERH CONFIG_USB_GADGET_SX2
--
2.13.0.303.g4ebf302169-goog
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Thanks,
Minkyu Kang
PATCH 13/38 samsung: Drop more references fo s3c24x0
In reply to Simon GlassQuoted 3 lines · Simon Glass
This is dead code now. Drop it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/32a10900/attachment.sig>
PATCH 14/38 arc: Make u-boot-arc.h a private header
In reply to Simon GlassRather than including this arch-specific header file in common.h, include it from within arc's u-boot.h header.
---
arch/arc/include/asm/u-boot.h | 1 + include/common.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arc/include/asm/u-boot.h +1 -0
@@ -8,6 +8,7 @@#define __ASM_ARC_U_BOOT_H__#include <asm-generic/u-boot.h> +#include <asm/u-boot-arc.h> /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_ARC
include/common.h +1 -1
@@ -445,7 +445,7 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/u-boot-mips.h> #endif /* CONFIG_MIPS */ #ifdef CONFIG_ARC -# include <asm/u-boot-arc.h> +# include <asm/u-boot.h> #endif /* CONFIG_ARC */ #ifdef CONFIG_AUTO_COMPLETE
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 14/38 arc: Make u-boot-arc.h a private header
Quoted 4 lines · Simon Glass
Rather than including this arch-specific header file in
common.h, include it from within arc'su-boot.hheader.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/75c6f969/attachment.sig>
PATCH 15/38 sandbox: Make u-boot-sandbox.h a private header
In reply to Simon GlassRather than including this arch-specific header file in common.h, include it from within sandbox's u-boot.h header.
Also drop the comment about something to be fixed.
---
arch/sandbox/include/asm/u-boot.h | 1 + include/common.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/sandbox/include/asm/u-boot.h +1 -0
@@ -22,6 +22,7 @@/* Use the generic board which requires a unified bd_info */ #include <asm-generic/u-boot.h> +#include <asm/u-boot-sandbox.h> /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_SANDBOX
include/common.h +1 -1
@@ -434,7 +434,7 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/u-boot-x86.h> #endif /* CONFIG_X86 */ #ifdef CONFIG_SANDBOX -# include <asm/u-boot-sandbox.h> /* TODO(sjg) what needs to be fixed? */ +# include <asm/u-boot.h> #endif #ifdef CONFIG_NDS32 # include <asm/mach-types.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 15/38 sandbox: Make u-boot-sandbox.h a private header
Quoted 6 lines · Simon Glass
Rather than including this arch-specific header file in
common.h, include it from within sandbox'su-boot.hheader.Also drop the comment about something to be fixed.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/3c991bf3/attachment-0001.sig>
PATCH 16/38 x86: Make u-boot-x86.h a private header
In reply to Simon GlassRather than including this arch-specific header file in common.h, include it from within x86's u-boot.h header.
Also drop the comment about something to be fixed. It is not clear what needs fixing.
---
arch/x86/include/asm/u-boot.h | 1 + include/common.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/include/asm/u-boot.h +1 -0
@@ -22,6 +22,7 @@/* Use the generic board which requires a unified bd_info */ #include <asm-generic/u-boot.h> +#include <asm/u-boot-x86.h> /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_I386
include/common.h +2 -2
@@ -430,8 +430,8 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/setup.h> # include <asm/u-boot-arm.h> /* ARM version to be fixed! */ #endif /* CONFIG_ARM */ -#ifdef CONFIG_X86 /* x86 version to be fixed! */ -# include <asm/u-boot-x86.h> +#ifdef CONFIG_X86 +# include <asm/u-boot.h> #endif /* CONFIG_X86 */ #ifdef CONFIG_SANDBOX # include <asm/u-boot.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 16/38 x86: Make u-boot-x86.h a private header
Quoted 7 lines · Simon Glass
Rather than including this arch-specific header file in
common.h, include it from within x86'su-boot.hheader.Also drop the comment about something to be fixed. It is not clear what needs fixing.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/431c63d5/attachment.sig>
PATCH 17/38 arm: Make u-boot-arm.h a private header
In reply to Simon GlassRather than including this arch-specific header file in common.h, include it from within arm's u-boot.h header.
Also drop the comment about something to be fixed. It has been there forever and it is not clear what it means.
---
arch/arm/include/asm/u-boot-arm.h | 4 ++++ arch/arm/include/asm/u-boot.h | 1 + include/common.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-)
arch/arm/include/asm/u-boot-arm.h +4 -0
@@ -13,6 +13,8 @@#ifndef _U_BOOT_ARM_H_#define _U_BOOT_ARM_H_ 1 +#ifndef __ASSEMBLY__ +/* for the following variables, see start.S */ extern ulong IRQ_STACK_START ;/* top of IRQ stack */ extern ulong FIQ_STACK_START ;/* top of FIQ stack */
@@ -59,4 +61,6 @@ void do_fiq(struct pt_regs *pt_regs);void do_irq (struct pt_regs *pt_regswq);#endif +#endif /* __ASSEMBLY__ */ +#endif /* _U_BOOT_ARM_H_ */
arch/arm/include/asm/u-boot.h +1 -0
@@ -22,6 +22,7 @@/* Use the generic board which requires a unified bd_info */ #include <asm-generic/u-boot.h> +#include <asm/u-boot-arm.h> /* For image.h:image_check_target_arch() */ #ifndef CONFIG_ARM64
include/common.h +1 -1
@@ -428,7 +428,7 @@ static inline int setenv_addr(const char *varname, const void *addr)#ifdef CONFIG_ARM # include <asm/mach-types.h> # include <asm/setup.h> -# include <asm/u-boot-arm.h> /* ARM version to be fixed! */ +# include <asm/u-boot.h> #endif /* CONFIG_ARM */ #ifdef CONFIG_X86 # include <asm/u-boot.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 17/38 arm: Make u-boot-arm.h a private header
Quoted 7 lines · Simon Glass
Rather than including this arch-specific header file in
common.h, include it from within arm'su-boot.hheader.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 <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/f8d417e8/attachment.sig>
PATCH 18/38 mips: Make u-boot-mips.h a private header
In reply to Simon GlassRather than including this arch-specific header file in common.h, include it from within mips's u-boot.h header.
---
arch/mips/include/asm/u-boot.h | 1 + include/common.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/mips/include/asm/u-boot.h +1 -0
@@ -17,6 +17,7 @@/* Use the generic board which requires a unified bd_info */ #include <asm-generic/u-boot.h> +#include <asm/u-boot-mips.h> /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_MIPS
include/common.h +1 -1
@@ -442,7 +442,7 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/u-boot-nds32.h> #endif /* CONFIG_NDS32 */ #ifdef CONFIG_MIPS -# include <asm/u-boot-mips.h> +# include <asm/u-boot.h> #endif /* CONFIG_MIPS */ #ifdef CONFIG_ARC # include <asm/u-boot.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 18/38 mips: Make u-boot-mips.h a private header
Am 17.05.2017 um 16:22 schrieb Simon Glass:
Quoted 4 lines
Rather than including this arch-specific header file in
common.h, include it from within mips'su-boot.hheader.Signed-off-by Simon Glass <[email protected]>
Quoted 23 lines
---
arch/mips/include/asm/u-boot.h | 1 + include/common.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)arch/mips/include/asm/u-boot.h +1
-0@@ -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_MIPSinclude/common.h +0
-0
include/common.h static inline int setenv_addr(const char *varname, const void *addr) · line 446
Quoted 6 lines
include/common.h +1
-1@@ -442,7 +442,7 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/u-boot-nds32.h> #endif /* CONFIG_NDS32 */ #ifdef CONFIG_MIPS -# include <asm/u-boot-mips.h> +# include <asm/u-boot.h> #endif /* CONFIG_MIPS */
you could also remove the #ifdef CONFIG_MIPS in this patch and drop patch 21/38
Quoted 3 lines
include/common.h +0
-0#ifdef CONFIG_ARC # include <asm/u-boot.h>
Signature · 9 lines
- Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/6d996fe4/attachment.sig>
PATCH 18/38 mips: Make u-boot-mips.h a private header
Hi Daniel,
Quoted 26 lines · Daniel Schwierzeck
Am 17.05.2017 um 16:22 schrieb Simon Glass:
Quoted 4 lines
Rather than including this arch-specific header file in
common.h, include it from within mips'su-boot.hheader.Signed-off-by Simon Glass <[email protected]>Reviewed-by Daniel Schwierzeck <[email protected]>Quoted 16 lines
---
arch/mips/include/asm/u-boot.h | 1 + include/common.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)arch/mips/include/asm/u-boot.h +1
-0@@ -17,6 +17,7 @@/* Use the generic board which requires a unified bd_info */ #include <asm-generic/u-boot.h> +#include <asm/u-boot-mips.h>
Quoted 16 lines
include/common.h static inline int setenv_addr(const char *varname, const void *addr) · line 446
Quoted 13 lines
arch/mips/include/asm/u-boot.h +0
-0/* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_MIPSinclude/common.h +1
-1@@ -442,7 +442,7 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/u-boot-nds32.h> #endif /* CONFIG_NDS32 */ #ifdef CONFIG_MIPS -# include <asm/u-boot-mips.h> +# include <asm/u-boot.h> #endif /* CONFIG_MIPS */ you could also remove the #ifdef
CONFIG_MIPSin this patch and drop patch 21/38
Yes, true, I am trying to avoid making a change and removing code at the same time.
Quoted 8 lines
include/common.h static inline int setenv_addr(const char *varname, const void *addr) · line 448
Quoted 4 lines
include/common.h +0
-0#ifdef CONFIG_ARC # include <asm/u-boot.h> --
- Daniel
Regards,
Simon
PATCH 18/38 mips: Make u-boot-mips.h a private header
In reply to Simon GlassQuoted 5 lines · Simon Glass
Rather than including this arch-specific header file in
common.h, include it from within mips'su-boot.hheader.Signed-off-by Simon Glass <[email protected]>Reviewed-by Daniel Schwierzeck <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/f6013e74/attachment.sig>
PATCH 19/38 nds32: Make u-boot-nds32.h a private header
In reply to Simon GlassRather than including this arch-specific header file in common.h, include it from within nds32's u-boot.h header.
---
arch/nds32/include/asm/u-boot.h | 2 ++ include/common.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
arch/nds32/include/asm/u-boot.h +2 -0
@@ -20,6 +20,8 @@ #ifndef _U_BOOT_H_ #define _U_BOOT_H_ 1 +#include <asm/u-boot-nds32.h> + #include <environment.h> typedef struct bd_info {
include/common.h +1 -1
@@ -439,7 +439,7 @@ static inline int setenv_addr(const char *varname, const void *addr)#ifdef CONFIG_NDS32 # include <asm/mach-types.h> # include <asm/setup.h> -# include <asm/u-boot-nds32.h> +# include <asm/u-boot.h> #endif /* CONFIG_NDS32 */ #ifdef CONFIG_MIPS # include <asm/u-boot.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 19/38 nds32: Make u-boot-nds32.h a private header
Quoted 4 lines · Simon Glass
Rather than including this arch-specific header file in
common.h, include it from within nds32'su-boot.hheader.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/dae0ed09/attachment.sig>
PATCH 20/38 arc: Don't include asm/u-boot.h in common
In reply to Simon GlassThis is not actually needed anywhere, so drop it.
---
include/common.h | 3 --- 1 file changed, 3 deletions(-)
include/common.h +0 -3
@@ -444,9 +444,6 @@ static inline int setenv_addr(const char *varname, const void *addr)#ifdef CONFIG_MIPS # include <asm/u-boot.h> #endif /* CONFIG_MIPS */ -#ifdef CONFIG_ARC -# include <asm/u-boot.h> -#endif /* CONFIG_ARC */ #ifdef CONFIG_AUTO_COMPLETE int env_complete (char *var,int maxv,char *cmdv[],int maxsz,char *buf);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 20/38 arc: Don't include asm/u-boot.h in common
Quoted 3 lines · Simon Glass
This is not actually needed anywhere, so drop it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/857545f4/attachment.sig>
PATCH 21/38 mips: Don't include asm/u-boot.h in common
In reply to Simon GlassThis is not actually needed anywhere, so drop it.
---
include/common.h | 3 --- 1 file changed, 3 deletions(-)
include/common.h +0 -3
@@ -441,9 +441,6 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/setup.h> # include <asm/u-boot.h> #endif /* CONFIG_NDS32 */ -#ifdef CONFIG_MIPS -# include <asm/u-boot.h> -#endif /* CONFIG_MIPS */ #ifdef CONFIG_AUTO_COMPLETE int env_complete (char *var,int maxv,char *cmdv[],int maxsz,char *buf);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 21/38 mips: Don't include asm/u-boot.h in common
Am 17.05.2017 um 16:22 schrieb Simon Glass:
Quoted 3 lines
This is not actually needed anywhere, so drop it.
Signed-off-by Simon Glass <[email protected]>
Quoted 20 lines
---
include/common.h | 3 --- 1 file changed, 3 deletions(-)include/common.h +0
-3@@ -441,9 +441,6 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/setup.h> # include <asm/u-boot.h> #endif /* CONFIG_NDS32 */ -#ifdef CONFIG_MIPS -# include <asm/u-boot.h> -#endif /* CONFIG_MIPS */ #ifdef CONFIG_AUTO_COMPLETE int env_complete (char *var,int maxv,char *cmdv[],int maxsz,char *buf);
Signature · 9 lines
- Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/54e6452a/attachment.sig>
PATCH 21/38 mips: Don't include asm/u-boot.h in common
In reply to Simon GlassQuoted 4 lines · Simon Glass
This is not actually needed anywhere, so drop it.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Daniel Schwierzeck <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/440e4f1b/attachment.sig>
PATCH 22/38 sandbox: Don't include asm/u-boot.h in common
In reply to Simon GlassThis is not actually needed anywhere, so drop it.
---
include/common.h | 3 --- 1 file changed, 3 deletions(-)
include/common.h +0 -3
@@ -433,9 +433,6 @@ static inline int setenv_addr(const char *varname, const void *addr)#ifdef CONFIG_X86 # include <asm/u-boot.h> #endif /* CONFIG_X86 */ -#ifdef CONFIG_SANDBOX -# include <asm/u-boot.h> -#endif #ifdef CONFIG_NDS32 # include <asm/mach-types.h> # include <asm/setup.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 22/38 sandbox: Don't include asm/u-boot.h in common
Quoted 3 lines · Simon Glass
This is not actually needed anywhere, so drop it.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/f19c8aee/attachment.sig>
PATCH 23/38 x86: Don't include asm/u-boot.h in common
In reply to Simon GlassWith a small fixup to u-boot-x86.h, this is not actually needed anywhere, so drop it.
---
arch/x86/include/asm/u-boot-x86.h | 4 +++- include/common.h | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-)
arch/x86/include/asm/u-boot-x86.h +3 -1
@@ -8,13 +8,15 @@#ifndef _U_BOOT_I386_H_#define _U_BOOT_I386_H_ 1 +struct global_data ; +extern char gdt_rom[];/* cpu/.../cpu.c */ int arch_cpu_init (void );int x86_cpu_init_f (void );int cpu_init_f (void ); -void setup_gdt (gd_t *id,u64 *gdt_addr); +void setup_gdt (struct global_data *id,u64 *gdt_addr);/* * Setup FSP execution environment GDT to use the one we used in * arch/x86/cpu/start16.S and reload the segment registers.
include/common.h +0 -3
@@ -430,9 +430,6 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/setup.h> # include <asm/u-boot.h> #endif /* CONFIG_ARM */ -#ifdef CONFIG_X86 -# include <asm/u-boot.h> -#endif /* CONFIG_X86 */ #ifdef CONFIG_NDS32 # include <asm/mach-types.h> # include <asm/setup.h>
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 23/38 x86: Don't include asm/u-boot.h in common
Quoted 4 lines · Simon Glass
With a small fixup to
u-boot-x86.h, this is not actually needed anywhere, so drop it.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/b970f573/attachment.sig>
PATCH 24/38 nds32: Remove include files from common.h
In reply to Simon GlassWith a few tweaks we can avoid including these files, which are only needed by two C files.
---
arch/nds32/lib/bootm.c | 1 + board/AndesTech/adp-ag101p/adp-ag101p.c | 1 + include/common.h | 5 ----- 3 files changed, 2 insertions(+), 5 deletions(-)
arch/nds32/lib/bootm.c +1 -0
@@ -11,6 +11,7 @@#include <image.h> #include <u-boot/zlib.h> #include <asm/byteorder.h> +#include <asm/setup.h> DECLARE_GLOBAL_DATA_PTR ;
board/AndesTech/adp-ag101p/adp-ag101p.c +1 -0
@@ -9,6 +9,7 @@#include <common.h> #include <netdev.h> #include <asm/io.h> +#include <asm/mach-types.h> #include <faraday/ftsdc010.h> #include <faraday/ftsmc020.h>
include/common.h +0 -5
@@ -430,11 +430,6 @@ static inline int setenv_addr(const char *varname, const void *addr)# include <asm/setup.h> # include <asm/u-boot.h> #endif /* CONFIG_ARM */ -#ifdef CONFIG_NDS32 -# include <asm/mach-types.h> -# include <asm/setup.h> -# include <asm/u-boot.h> -#endif /* CONFIG_NDS32 */ #ifdef CONFIG_AUTO_COMPLETE int env_complete (char *var,int maxv,char *cmdv[],int maxsz,char *buf);
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 24/38 nds32: Remove include files from common.h
Quoted 4 lines · Simon Glass
With a few tweaks we can avoid including these files, which are only needed by two C files.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/2df79b3a/attachment.sig>
PATCH 25/38 arm: Add explicit include of <asm/mach-types.h>
In reply to Simon GlassRather than relying on common.h to provide this include, which is going away at some point, include it explicitly in each file.
---
arch/arm/lib/spl.c | 3 +++ board/Barix/ipam390/ipam390.c | 1 + board/LaCie/edminiv2/edminiv2.c | 1 + board/LaCie/net2big_v2/net2big_v2.c | 1 + board/LaCie/netspace_v2/netspace_v2.c | 1 + board/Marvell/aspenite/aspenite.c | 1 + board/Marvell/gplugd/gplugd.c | 1 + board/Marvell/guruplug/guruplug.c | 1 + board/Marvell/openrd/openrd.c | 1 + board/Marvell/sheevaplug/sheevaplug.c | 1 + board/Seagate/dockstar/dockstar.c | 1 + board/Seagate/goflexhome/goflexhome.c | 1 + board/Seagate/nas220/nas220.c | 1 + board/amazon/kc1/kc1.c | 1 + board/armltd/integrator/integrator.c | 1 + board/armltd/vexpress/vexpress_common.c | 1 + board/atmel/at91rm9200ek/at91rm9200ek.c | 1 + board/atmel/at91sam9261ek/at91sam9261ek.c | 1 + board/atmel/at91sam9263ek/at91sam9263ek.c | 1 + board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 1 + board/atmel/at91sam9rlek/at91sam9rlek.c | 1 + board/atmel/at91sam9x5ek/at91sam9x5ek.c | 1 + board/bluewater/gurnard/gurnard.c | 1 + board/bluewater/snapper9260/snapper9260.c | 1 + board/cirrus/edb93xx/edb93xx.c | 1 + board/davinci/da8xxevm/da850evm.c | 1 + board/davinci/da8xxevm/omapl138_lcdk.c | 1 + board/davinci/ea20/ea20.c | 1 + board/esd/meesc/meesc.c | 1 + board/freescale/mx35pdk/mx35pdk.c | 1 + board/gumstix/duovero/duovero.c | 1 + board/h2200/h2200.c | 1 + board/imx31_phycore/imx31_phycore.c | 1 + board/lego/ev3/legoev3.c | 1 + board/mini-box/picosam9g45/picosam9g45.c | 1 + board/nvidia/seaboard/seaboard.c | 1 + board/overo/common.c | 1 + board/ronetix/pm9261/pm9261.c | 1 + board/ronetix/pm9263/pm9263.c | 1 + board/ronetix/pm9g45/pm9g45.c | 1 + board/samsung/goni/goni.c | 1 + board/samsung/smdkc100/smdkc100.c | 1 + board/samsung/universal_c210/universal.c | 1 + board/siemens/common/board.c | 1 + board/spear/spear300/spear300.c | 1 + board/spear/spear310/spear310.c | 1 + board/spear/spear320/spear320.c | 1 + board/spear/spear600/spear600.c | 1 + board/spear/x600/x600.c | 1 + board/ti/omap5_uevm/evm.c | 1 + board/ti/panda/panda.c | 1 + board/toradex/colibri_pxa270/colibri_pxa270.c | 1 + board/toradex/common/tdx-cfg-block.c | 1 + board/zipitz2/zipitz2.c | 1 + drivers/usb/host/ehci-mx6.c | 1 + 55 files changed, 57 insertions(+)
arch/arm/lib/spl.c +3 -0
@@ -12,6 +12,9 @@#include <spl.h> #include <image.h> #include <linux/compiler.h> +#ifdef CONFIG_MACH_TYPE +#include <asm/mach-types.h> +#endif #ifndef CONFIG_SPL_DM /* Pointer to as well as the global data structure for SPL */
board/Barix/ipam390/ipam390.c +1 -0
@@ -29,6 +29,7 @@#include <asm/gpio.h> #include <hwconfig.h> #include <bootstage.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/LaCie/edminiv2/edminiv2.c +1 -0
@@ -14,6 +14,7 @@#include "../common/common.h" #include <spl.h> #include <ns16550.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/LaCie/net2big_v2/net2big_v2.c +1 -0
@@ -12,6 +12,7 @@#include <common.h> #include <command.h> #include <i2c.h> +#include <asm/mach-types.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h>
board/LaCie/netspace_v2/netspace_v2.c +1 -0
@@ -11,6 +11,7 @@#include <common.h> #include <command.h> +#include <asm/mach-types.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h>
board/Marvell/aspenite/aspenite.c +1 -0
@@ -9,6 +9,7 @@#include <common.h> #include <mvmfp.h> +#include <asm/mach-types.h> #include <asm/arch/cpu.h> #include <asm/arch/mfp.h> #include <asm/arch/armada100.h>
board/Marvell/gplugd/gplugd.c +1 -0
@@ -19,6 +19,7 @@#include <asm/arch/armada100.h> #include <asm/gpio.h> #include <miiphy.h> +#include <asm/mach-types.h> #ifdef CONFIG_ARMADA100_FEC #include <net.h>
board/Marvell/guruplug/guruplug.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <miiphy.h> +#include <asm/mach-types.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h>
board/Marvell/openrd/openrd.c +1 -0
@@ -13,6 +13,7 @@#include <common.h> #include <miiphy.h> +#include <asm/mach-types.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h>
board/Marvell/sheevaplug/sheevaplug.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <miiphy.h> +#include <asm/mach-types.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h>
board/Seagate/dockstar/dockstar.c +1 -0
@@ -15,6 +15,7 @@#include <asm/arch/mpp.h> #include <asm/arch/cpu.h> #include <asm/io.h> +#include <asm/mach-types.h> #include "dockstar.h" DECLARE_GLOBAL_DATA_PTR ;
board/Seagate/goflexhome/goflexhome.c +1 -0
@@ -14,6 +14,7 @@#include <common.h> #include <miiphy.h> +#include <asm/mach-types.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h> #include <asm/arch/cpu.h>
board/Seagate/nas220/nas220.c +1 -0
@@ -11,6 +11,7 @@#include <common.h> #include <miiphy.h> +#include <asm/mach-types.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h> #include <asm/arch/cpu.h>
board/amazon/kc1/kc1.c +1 -0
@@ -17,6 +17,7 @@#include <asm/emif.h> #include <twl6030.h> #include "kc1.h" +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/armltd/integrator/integrator.c +1 -0
@@ -24,6 +24,7 @@#include <dm/platform_data/serial_pl01x.h> #include "arm-ebi.h" #include "integrator-sc.h" +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/armltd/vexpress/vexpress_common.c +1 -0
@@ -21,6 +21,7 @@#include <errno.h> #include <netdev.h> #include <asm/io.h> +#include <asm/mach-types.h> #include <asm/arch/systimer.h> #include <asm/arch/sysctrl.h> #include <asm/arch/wdt.h>
board/atmel/at91rm9200ek/at91rm9200ek.c +1 -0
@@ -12,6 +12,7 @@#include <common.h> #include <netdev.h> +#include <asm/mach-types.h> #include <asm/arch/hardware.h> #include <asm/arch/at91_pio.h> #include <asm/arch/at91_common.h>
board/atmel/at91sam9261ek/at91sam9261ek.c +1 -0
@@ -21,6 +21,7 @@#include <net.h> #include <netdev.h> #endif +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/atmel/at91sam9263ek/at91sam9263ek.c +1 -0
@@ -20,6 +20,7 @@#include <asm/arch/hardware.h> #include <lcd.h> #include <atmel_lcdc.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +1 -0
@@ -18,6 +18,7 @@#include <lcd.h> #include <linux/mtd/nand.h> #include <atmel_lcdc.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/atmel/at91sam9rlek/at91sam9rlek.c +1 -0
@@ -9,6 +9,7 @@#include <common.h> #include <debug_uart.h> #include <asm/io.h> +#include <asm/mach-types.h> #include <asm/arch/at91sam9rl.h> #include <asm/arch/at91sam9rl_matrix.h> #include <asm/arch/at91sam9_smc.h>
board/atmel/at91sam9x5ek/at91sam9x5ek.c +1 -0
@@ -19,6 +19,7 @@#include <nand.h> #include <version.h> #endif +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/bluewater/gurnard/gurnard.c +1 -0
@@ -21,6 +21,7 @@#include <spi.h> #include <asm/gpio.h> #include <asm/io.h> +#include <asm/mach-types.h> #include <asm/arch/at91sam9g45_matrix.h> #include <asm/arch/at91sam9_smc.h> #include <asm/arch/at91_common.h>
board/bluewater/snapper9260/snapper9260.c +1 -0
@@ -12,6 +12,7 @@#include <dm.h> #include <asm/io.h> #include <asm/gpio.h> +#include <asm/mach-types.h> #include <asm/arch/at91sam9260_matrix.h> #include <asm/arch/at91sam9_smc.h> #include <asm/arch/at91_common.h>
board/cirrus/edb93xx/edb93xx.c +1 -0
@@ -18,6 +18,7 @@#include <common.h> #include <netdev.h> #include <asm/io.h> +#include <asm/mach-types.h> #include <asm/arch/ep93xx.h> DECLARE_GLOBAL_DATA_PTR ;
board/davinci/da8xxevm/da850evm.c +1 -0
@@ -23,6 +23,7 @@#include <asm/arch/davinci_misc.h> #include <linux/errno.h> #include <hwconfig.h> +#include <asm/mach-types.h> #ifdef CONFIG_MMC_DAVINCI #include <mmc.h>
board/davinci/da8xxevm/omapl138_lcdk.c +1 -0
@@ -19,6 +19,7 @@#include <asm/ti-common/davinci_nand.h> #include <asm/io.h> #include <linux/errno.h> +#include <asm/mach-types.h> #include <asm/arch/davinci_misc.h> #ifdef CONFIG_MMC_DAVINCI #include <mmc.h>
board/davinci/ea20/ea20.c +1 -0
@@ -18,6 +18,7 @@#include <i2c.h> #include <net.h> #include <netdev.h> +#include <asm/mach-types.h> #include <asm/arch/hardware.h> #include <asm/ti-common/davinci_nand.h> #include <asm/arch/emac_defs.h>
board/esd/meesc/meesc.c +1 -0
@@ -13,6 +13,7 @@#include <common.h> #include <asm/io.h> #include <asm/gpio.h> +#include <asm/mach-types.h> #include <asm/arch/at91sam9_smc.h> #include <asm/arch/at91_common.h> #include <asm/arch/at91_pmc.h>
board/freescale/mx35pdk/mx35pdk.c +1 -0
@@ -24,6 +24,7 @@#include <asm/gpio.h> #include <asm/arch/sys_proto.h> #include <netdev.h> +#include <asm/mach-types.h> #ifndef CONFIG_BOARD_LATE_INIT #error "CONFIG_BOARD_LATE_INIT must be set for this board"
board/gumstix/duovero/duovero.c +1 -0
@@ -14,6 +14,7 @@#include <asm/arch/clock.h> #include <asm/arch/gpio.h> #include <asm/gpio.h> +#include <asm/mach-types.h> #include "duovero_mux_data.h"
board/h2200/h2200.c +1 -0
@@ -11,6 +11,7 @@#include <asm/arch/pxa-regs.h> #include <asm/io.h> #include <usb.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/imx31_phycore/imx31_phycore.c +1 -0
@@ -11,6 +11,7 @@#include <netdev.h> #include <asm/arch/clock.h> #include <asm/arch/imx-regs.h> +#include <asm/mach-types.h> #include <asm/arch/sys_proto.h> DECLARE_GLOBAL_DATA_PTR ;
board/lego/ev3/legoev3.c +1 -0
@@ -25,6 +25,7 @@#include <asm/arch/davinci_misc.h> #include <linux/errno.h> #include <hwconfig.h> +#include <asm/mach-types.h> #ifdef CONFIG_MMC_DAVINCI #include <mmc.h>
board/mini-box/picosam9g45/picosam9g45.c +1 -0
@@ -27,6 +27,7 @@#include <net.h> #endif #include <netdev.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/nvidia/seaboard/seaboard.c +1 -0
@@ -7,6 +7,7 @@#include <common.h> #include <asm/io.h> +#include <asm/mach-types.h> #include <asm/arch/tegra.h> #include <asm/arch-tegra/board.h> #include <asm/arch/clock.h>
board/overo/common.c +1 -0
@@ -18,6 +18,7 @@#include <asm/arch/mux.h> #include <asm/arch/sys_proto.h> #include <asm/gpio.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/ronetix/pm9261/pm9261.c +1 -0
@@ -26,6 +26,7 @@#include <net.h> #endif #include <netdev.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/ronetix/pm9263/pm9263.c +1 -0
@@ -25,6 +25,7 @@#include <net.h> #endif #include <netdev.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/ronetix/pm9g45/pm9g45.c +1 -0
@@ -25,6 +25,7 @@#include <net.h> #endif #include <netdev.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/samsung/goni/goni.c +1 -0
@@ -17,6 +17,7 @@#include <samsung/misc.h> #include <usb.h> #include <usb_mass_storage.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/samsung/smdkc100/smdkc100.c +1 -0
@@ -11,6 +11,7 @@#include <asm/io.h> #include <asm/arch/sromc.h> #include <netdev.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/samsung/universal_c210/universal.c +1 -0
@@ -23,6 +23,7 @@#include <libtizen.h> #include <samsung/misc.h> #include <usb_mass_storage.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/siemens/common/board.c +1 -0
@@ -28,6 +28,7 @@#include <miiphy.h> #include <cpsw.h> #include <watchdog.h> +#include <asm/mach-types.h> #include "../common/factoryset.h" DECLARE_GLOBAL_DATA_PTR ;
board/spear/spear300/spear300.c +1 -0
@@ -11,6 +11,7 @@#include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> +#include <asm/mach-types.h> #include <asm/arch/hardware.h> #include <asm/arch/spr_defs.h> #include <asm/arch/spr_misc.h>
board/spear/spear310/spear310.c +1 -0
@@ -12,6 +12,7 @@#include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> +#include <asm/mach-types.h> #include <asm/arch/hardware.h> #include <asm/arch/spr_defs.h> #include <asm/arch/spr_misc.h>
board/spear/spear320/spear320.c +1 -0
@@ -12,6 +12,7 @@#include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> +#include <asm/mach-types.h> #include <asm/arch/hardware.h> #include <asm/arch/spr_defs.h> #include <asm/arch/spr_misc.h>
board/spear/spear600/spear600.c +1 -0
@@ -11,6 +11,7 @@#include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> +#include <asm/mach-types.h> #include <asm/arch/hardware.h> #include <asm/arch/spr_defs.h> #include <asm/arch/spr_misc.h>
board/spear/x600/x600.c +1 -0
@@ -14,6 +14,7 @@#include <phy.h> #include <rtc.h> #include <asm/io.h> +#include <asm/mach-types.h> #include <asm/arch/hardware.h> #include <asm/arch/spr_defs.h> #include <asm/arch/spr_misc.h>
board/ti/omap5_uevm/evm.c +1 -0
@@ -24,6 +24,7 @@#include <sata.h> #include <usb.h> #include <asm/gpio.h> +#include <asm/mach-types.h> #include <asm/arch/clock.h> #include <asm/arch/ehci.h> #include <asm/ehci-omap.h>
board/ti/panda/panda.c +1 -0
@@ -6,6 +6,7 @@* SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> +#include <asm/mach-types.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> #include <asm/arch/clock.h>
board/toradex/colibri_pxa270/colibri_pxa270.c +1 -0
@@ -18,6 +18,7 @@#include <netdev.h> #include <serial.h> #include <usb.h> +#include <asm/mach-types.h> #include "../common/tdx-common.h" DECLARE_GLOBAL_DATA_PTR ;
board/toradex/common/tdx-cfg-block.c +1 -0
@@ -23,6 +23,7 @@#include <malloc.h> #include <mmc.h> #include <nand.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
board/zipitz2/zipitz2.c +1 -0
@@ -16,6 +16,7 @@#include <spi.h> #include <asm/io.h> #include <usb.h> +#include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR ;
drivers/usb/host/ehci-mx6.c +1 -0
@@ -17,6 +17,7 @@#include <asm/imx-common/iomux-v3.h> #include <asm/imx-common/sys_proto.h> #include <dm.h> +#include <asm/mach-types.h> #include <power/regulator.h> #include "ehci.h"
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 25/38 arm: Add explicit include of <asm/mach-types.h>
Quoted 4 lines · Simon Glass
Rather than relying on
common.hto provide this include, which is going away at some point, include it explicitly in each file.Signed-off-by Simon Glass <[email protected]>
[snip]
arch/arm/lib/spl.c line 17
Quoted 11 lines
arch/arm/lib/spl.c +3
-0@@ -12,6 +12,9 @@#include <spl.h> #include <image.h> #include <linux/compiler.h> +#ifdef CONFIG_MACH_TYPE +#include <asm/mach-types.h> +#endif
We don't need to #ifdef this part here, we can safely always include this header.
You can repost just a v2 of this one with:
Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/66274701/attachment.sig>
PATCH 26/38 arm: Add declarations to avoid needing to include headers
In reply to Simon GlassAt present common.h includes various ARM-specific headers. In preparation for dropping this, add a few explicit declarations.
---
arch/arm/include/asm/bootm.h | 1 + arch/arm/include/asm/u-boot-arm.h | 2 ++ arch/arm/lib/bootm.c | 1 + 3 files changed, 4 insertions(+)
arch/arm/include/asm/bootm.h +1 -0
@@ -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 1void get_board_serial (struct tag_serialnr *serialnr);
arch/arm/include/asm/u-boot-arm.h +2 -0
@@ -47,6 +47,8 @@ ulong get_timer_masked (void);void udelay_masked (unsigned long usec);/* calls to c from vectors.S */ +struct pt_regs ; +void bad_mode (void );void do_undefined_instruction (struct pt_regs *pt_regs);void do_software_interrupt (struct pt_regs *pt_regs);
arch/arm/lib/bootm.c +1 -0
@@ -31,6 +31,7 @@#ifdef CONFIG_ARMV7_NONSEC #include <asm/armv7.h> #endif +#include <asm/setup.h> DECLARE_GLOBAL_DATA_PTR ;
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 26/38 arm: Add declarations to avoid needing to include headers
Quoted 4 lines · Simon Glass
At present
common.hincludes various ARM-specific headers. In preparation for dropping this, add a few explicit declarations.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/3be0b13b/attachment.sig>
PATCH 27/38 arm: Include asm/setup.h explictly
In reply to Simon GlassInclude this header where needed so we do not need to rely on common.h.
---
arch/arm/include/asm/omap_common.h | 2 ++ arch/arm/mach-omap2/utils.c | 1 + board/Synology/ds109/ds109.c | 1 + board/bluegiga/apx4devkit/apx4devkit.c | 1 + board/compulab/common/common.c | 1 + board/compulab/common/eeprom.c | 1 + board/esd/meesc/meesc.c | 1 + board/gateworks/gw_ventana/gw_ventana.c | 1 + board/lego/ev3/legoev3.c | 1 + board/sunxi/board.c | 1 + board/toradex/common/tdx-common.c | 1 + 11 files changed, 12 insertions(+)
arch/arm/include/asm/omap_common.h +2 -0
@@ -638,6 +638,8 @@ void abb_setup(u32 fuse, u32 ldovbb, u32 setup, u32 control, u32 txdone, u32 txdone_mask, u32 opp);s8 abb_setup_ldovbb (u32 fuse,u32 ldovbb); +struct tag_serialnr ; +void omap_die_id_serial (void );void omap_die_id_get_board_serial (struct tag_serialnr *serialnr);void omap_die_id_usbethaddr (void );
arch/arm/mach-omap2/utils.c +1 -0
@@ -5,6 +5,7 @@* SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> +#include <asm/setup.h> #include <asm/arch/sys_proto.h> static void do_cancel_out (u32 *num,u32 *den,u32 factor) {
board/Synology/ds109/ds109.c +1 -0
@@ -8,6 +8,7 @@#include <common.h> #include <miiphy.h> +#include <asm/setup.h> #include <asm/arch/cpu.h> #include <asm/arch/soc.h> #include <asm/arch/mpp.h>
board/bluegiga/apx4devkit/apx4devkit.c +1 -0
@@ -17,6 +17,7 @@#include <common.h> #include <asm/gpio.h> #include <asm/io.h> +#include <asm/setup.h> #include <asm/arch/imx-regs.h> #include <asm/arch/iomux-mx28.h> #include <asm/arch/clock.h>
board/compulab/common/common.c +1 -0
@@ -9,6 +9,7 @@#include <common.h> #include <asm/bootm.h> #include <asm/gpio.h> +#include <asm/setup.h> #include "common.h" #include "eeprom.h"
board/compulab/common/eeprom.c +1 -0
@@ -11,6 +11,7 @@#include <i2c.h> #include <eeprom_layout.h> #include <eeprom_field.h> +#include <asm/setup.h> #include <linux/kernel.h> #include "eeprom.h"
board/esd/meesc/meesc.c +1 -0
@@ -14,6 +14,7 @@#include <asm/io.h> #include <asm/gpio.h> #include <asm/mach-types.h> +#include <asm/setup.h> #include <asm/arch/at91sam9_smc.h> #include <asm/arch/at91_common.h> #include <asm/arch/at91_pmc.h>
board/gateworks/gw_ventana/gw_ventana.c +1 -0
@@ -19,6 +19,7 @@#include <asm/imx-common/spi.h> #include <asm/imx-common/video.h> #include <asm/io.h> +#include <asm/setup.h> #include <dm.h> #include <dm/platform_data/serial_mxc.h> #include <hwconfig.h>
board/lego/ev3/legoev3.c +1 -0
@@ -26,6 +26,7 @@#include <linux/errno.h> #include <hwconfig.h> #include <asm/mach-types.h> +#include <asm/setup.h> #ifdef CONFIG_MMC_DAVINCI #include <mmc.h>
board/sunxi/board.c +1 -0
@@ -33,6 +33,7 @@#include <nand.h> #include <net.h> #include <sy8106a.h> +#include <asm/setup.h> #if definedCONFIG_VIDEO_LCD_PANEL_I2C && !(definedCONFIG_SPL_BUILD )/* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */
board/toradex/common/tdx-common.c +1 -0
@@ -9,6 +9,7 @@#include <libfdt.h> #include "tdx-cfg-block.h" +#include <asm/setup.h> #include "tdx-common.h" #ifdef CONFIG_TDX_CFG_BLOCK
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 27/38 arm: Include asm/setup.h explictly
Quoted 3 lines · Simon Glass
Include this header where needed so we do not need to rely on
common.h.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/d19849f6/attachment.sig>
PATCH 28/38 arm: Remove include files from common.h
In reply to Simon GlassWith a small tweak we can avoid including these files for all boards.
---
common/board_f.c | 3 +++ include/common.h | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-)
common/board_f.c +3 -0
@@ -31,6 +31,9 @@#include <trace.h> #include <video.h> #include <watchdog.h> +#ifdef CONFIG_MACH_TYPE +#include <asm/mach-types.h> +#endif #if defined(CONFIG_MP ) && defined(CONFIG_PPC )#include <asm/mp.h> #endif
include/common.h +0 -6
@@ -425,12 +425,6 @@ static inline int setenv_addr(const char *varname, const void *addr)return setenv_hex (varname, (ulong )addr); } -#ifdef CONFIG_ARM -# include <asm/mach-types.h> -# include <asm/setup.h> -# include <asm/u-boot.h> -#endif /* CONFIG_ARM */ -#ifdef CONFIG_AUTO_COMPLETE int env_complete (char *var,int maxv,char *cmdv[],int maxsz,char *buf);#endif
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 28/38 arm: Remove include files from common.h
Quoted 3 lines · Simon Glass
With a small tweak we can avoid including these files for all boards.
Signed-off-by Simon Glass <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/42c59b69/attachment.sig>
PATCH 28/38 arm: Remove include files from common.h
In reply to Simon GlassQuoted 4 lines · Simon Glass
With a small tweak we can avoid including these files for all boards.
Signed-off-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/bf086e93/attachment.sig>
PATCH 29/38 common: Drop cpu_init_f() declarations
In reply to Simon GlassThese arch-specific functions are not needed here.
---
include/common.h | 11 ----------- 1 file changed, 11 deletions(-)
include/common.h +0 -11
@@ -674,17 +674,6 @@ int ppc440spe_revB(void);void get_sys_info (sys_info_t * );#endif -/* $(CPU)/cpu_init.c */ -#if defined(CONFIG_8xx) || defined(CONFIG_MPC8260 ) -void cpu_init_f (volatile immap_t *immr); -#endif -#if defined(CONFIG_4xx) || defined(CONFIG_MCF52x2) || defined(CONFIG_MPC86xx) -void cpu_init_f (void ); -#endif -#ifdef CONFIG_MPC85xx -ulong cpu_init_f (void ); -#endif -int cpu_init_r (void );/* $(CPU)/interrupts.c */
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 29/38 common: Drop cpu_init_f() declarations
Quoted 3 lines · Simon Glass
These arch-specific functions are not needed here.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/294fbd19/attachment.sig>
PATCH 30/38 common: Drop determine_sysper() and determine_pci_clock_per()
In reply to Simon GlassThese arch-specific declarations should not be in common.h. Drop them.
---
include/common.h | 6 ------ 1 file changed, 6 deletions(-)
include/common.h +0 -6
@@ -663,12 +663,6 @@ ulong get_ddr_freq(ulong);#endif #if defined(CONFIG_4xx) -# if defined(CONFIG_440 ) -# if defined(CONFIG_440SPE ) -unsigned long determine_sysper (void ); -unsigned long determine_pci_clock_per (void ); -# endif -# endif typedef PPC4xx_SYS_INFO sys_info_t ;int ppc440spe_revB (void );void get_sys_info (sys_info_t * );
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 30/38 common: Drop determine_sysper() and determine_pci_clock_per()
Quoted 3 lines · Simon Glass
These arch-specific declarations should not be in
common.h. Drop them.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/e5677007/attachment.sig>
PATCH 31/38 common: Move PPC4xx_SYS_INFO() et al to arch-specific header
In reply to Simon GlassThese definitions should not be in common.h. Move them to an arch-specific header file.
---
arch/powerpc/include/asm/ppc4xx.h | 4 ++++ include/common.h | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-)
arch/powerpc/include/asm/ppc4xx.h +4 -0
@@ -292,6 +292,10 @@ int ppc4xx_pci_sync_clock_config(u32 async);unsigned long get_OPB_freq (void );unsigned long get_PCI_freq (void ); +typedef PPC4xx_SYS_INFO sys_info_t ; +int ppc440spe_revB (void ); +void get_sys_info (sys_info_t *); +#endif /* __ASSEMBLY__ */ /* for multi-cpu support */
include/common.h +0 -6
@@ -662,12 +662,6 @@ static inline ulong get_ddr_freq(ulong dummy)ulong get_ddr_freq (ulong );#endif -#if defined(CONFIG_4xx) -typedef PPC4xx_SYS_INFO sys_info_t ; -int ppc440spe_revB (void ); -void get_sys_info (sys_info_t * ); -#endif -int cpu_init_r (void );/* $(CPU)/interrupts.c */
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 31/38 common: Move PPC4xx_SYS_INFO() et al to arch-specific header
Quoted 4 lines · Simon Glass
These definitions should not be in
common.h. Move them to an arch-specific header file.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/4a44f746/attachment.sig>
PATCH 32/38 common: powerpc: Move arch-specific headers
In reply to Simon GlassSet up a new asm/ppc.h header file to hold this arch-specific stuff. It should not be in common.h. It probably should be refactored to use asm/arch instead, but that is a job for the maintainer.
---
arch/powerpc/cpu/ppc4xx/4xx_pci.c | 1 + arch/powerpc/cpu/ppc4xx/miiphy.c | 1 + arch/powerpc/cpu/ppc4xx/reginfo.c | 1 + arch/powerpc/include/asm/ppc.h | 67 +++++++++++++++++++++++++++++++++++++++ arch/powerpc/include/asm/u-boot.h | 1 + include/common.h | 44 +------------------------ 6 files changed, 72 insertions(+), 43 deletions(-) create mode 100644 arch/powerpc/include/asm/ppc.h
arch/powerpc/cpu/ppc4xx/4xx_pci.c +1 -0
@@ -56,6 +56,7 @@#include <asm/processor.h> #include <asm/io.h> #include <pci.h> +#include <asm/ppc4xx.h> #ifdef CONFIG_PCI
arch/powerpc/cpu/ppc4xx/miiphy.c +1 -0
@@ -22,6 +22,7 @@#include <asm/io.h> #include <ppc_asm.tmpl> #include <commproc.h> +#include <asm/ppc4xx.h> #include <asm/ppc4xx-emac.h> #include <asm/ppc4xx-mal.h> #include <miiphy.h>
arch/powerpc/cpu/ppc4xx/reginfo.c +1 -0
@@ -14,6 +14,7 @@#include <command.h> #include <asm/processor.h> #include <asm/io.h> +#include <asm/ppc4xx.h> #include <asm/ppc4xx-uic.h> #include <asm/ppc4xx-emac.h>
arch/powerpc/include/asm/ppc.h new file +67 -0
67 lines not on this page · raw message
arch/powerpc/include/asm/u-boot.h +1 -0
@@ -16,6 +16,7 @@/* Use the generic board which requires a unified bd_info */ #include <asm-generic/u-boot.h> +#include <asm/ppc.h> /* For image.h:image_check_target_arch() */ #define IH_ARCH_DEFAULT IH_ARCH_PPC
include/common.h +1 -43
50 lines not on this page · raw message
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 32/38 common: powerpc: Move arch-specific headers
Quoted 5 lines · Simon Glass
Set up a new
asm/ppc.hheader file to hold this arch-specific stuff. It should not be incommon.h. It probably should be refactored to use asm/arch instead, but that is a job for the maintainer.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/d45c194a/attachment.sig>
PATCH 33/38 common: freescale: Move arch-specific declarations
In reply to Simon GlassThe declarations should not be in common.h. Move them to the arch-specific headers.
---
arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 1 + arch/arm/include/asm/arch-fsl-layerscape/clock.h | 2 + arch/arm/include/asm/arch-fsl-layerscape/cpu.h | 1 + arch/arm/include/asm/arch-ls102xa/clock.h | 1 + arch/powerpc/include/asm/ppc.h | 97 ++++++++++++++++++++++++ board/freescale/ls1021aqds/ddr.c | 1 + board/freescale/ls1043aqds/ddr.c | 1 + board/freescale/ls1043ardb/ddr.c | 1 + board/freescale/ls1046aqds/ddr.c | 1 + board/freescale/ls1046ardb/ddr.c | 1 + board/freescale/ls2080a/ddr.c | 1 + board/freescale/ls2080aqds/ddr.c | 1 + board/freescale/ls2080ardb/ddr.c | 1 + drivers/ddr/fsl/arm_ddr_gen3.c | 1 + drivers/ddr/fsl/ctrl_regs.c | 3 + drivers/ddr/fsl/fsl_ddr_gen4.c | 3 + drivers/ddr/fsl/options.c | 3 + drivers/ddr/fsl/util.c | 3 + drivers/net/fsl-mc/dpio/qbman_portal.c | 1 + drivers/pci/pcie_layerscape.c | 4 + drivers/pci/pcie_layerscape_fixup.c | 3 + drivers/usb/common/fsl-errata.c | 3 + include/common.h | 96 +---------------------- 23 files changed, 135 insertions(+), 95 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/cpu.c +1 -0
@@ -26,6 +26,7 @@#ifdef CONFIG_SYS_FSL_DDR #include <fsl_ddr.h> #endif +#include <asm/arch/clock.h> DECLARE_GLOBAL_DATA_PTR ;
arch/arm/include/asm/arch-fsl-layerscape/clock.h +2 -0
@@ -20,5 +20,7 @@ enum mxc_clock { };unsigned int mxc_get_clock (enum mxc_clock clk); +ulong get_ddr_freq (ulong ); +uint get_svr (void );#endif /* __ASM_ARCH_FSL_LAYERSCAPE_CLOCK_H_ */
arch/arm/include/asm/arch-fsl-layerscape/cpu.h +1 -0
@@ -350,4 +350,5 @@ static struct mm_region final_map[] = {int fsl_qoriq_core_to_cluster (unsigned int core);u32 cpu_mask (void ); +#endif /* _FSL_LAYERSCAPE_CPU_H */
arch/arm/include/asm/arch-ls102xa/clock.h +1 -0
@@ -19,5 +19,6 @@ enum mxc_clock { };unsigned int mxc_get_clock (enum mxc_clock clk); +uint get_svr (void );#endif /* __ASM_ARCH_LS102XA_CLOCK_H_ */
arch/powerpc/include/asm/ppc.h +97 -0
103 lines not on this page · raw message
board/freescale/ls1021aqds/ddr.c +1 -0
@@ -8,6 +8,7 @@#include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/io.h> +#include <asm/arch/clock.h> #include "ddr.h" DECLARE_GLOBAL_DATA_PTR ;
board/freescale/ls1043aqds/ddr.c +1 -0
@@ -10,6 +10,7 @@#ifdef CONFIG_FSL_DEEP_SLEEP #include <fsl_sleep.h> #endif +#include <asm/arch/clock.h> #include "ddr.h" DECLARE_GLOBAL_DATA_PTR ;
board/freescale/ls1043ardb/ddr.c +1 -0
@@ -11,6 +11,7 @@#ifdef CONFIG_FSL_DEEP_SLEEP #include <fsl_sleep.h> #endif +#include <asm/arch/clock.h> DECLARE_GLOBAL_DATA_PTR ;
board/freescale/ls1046aqds/ddr.c +1 -0
@@ -10,6 +10,7 @@#ifdef CONFIG_FSL_DEEP_SLEEP #include <fsl_sleep.h> #endif +#include <asm/arch/clock.h> #include "ddr.h" DECLARE_GLOBAL_DATA_PTR ;
board/freescale/ls1046ardb/ddr.c +1 -0
@@ -11,6 +11,7 @@#ifdef CONFIG_FSL_DEEP_SLEEP #include <fsl_sleep.h> #endif +#include <asm/arch/clock.h> DECLARE_GLOBAL_DATA_PTR ;
board/freescale/ls2080a/ddr.c +1 -0
@@ -8,6 +8,7 @@#include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/arch/soc.h> +#include <asm/arch/clock.h> #include "ddr.h" DECLARE_GLOBAL_DATA_PTR ;
board/freescale/ls2080aqds/ddr.c +1 -0
@@ -8,6 +8,7 @@#include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/arch/soc.h> +#include <asm/arch/clock.h> #include "ddr.h" DECLARE_GLOBAL_DATA_PTR ;
board/freescale/ls2080ardb/ddr.c +1 -0
@@ -8,6 +8,7 @@#include <fsl_ddr_sdram.h> #include <fsl_ddr_dimm_params.h> #include <asm/arch/soc.h> +#include <asm/arch/clock.h> #include "ddr.h" DECLARE_GLOBAL_DATA_PTR ;
drivers/ddr/fsl/arm_ddr_gen3.c +1 -0
@@ -12,6 +12,7 @@#include <asm/processor.h> #include <fsl_immap.h> #include <fsl_ddr.h> +#include <asm/arch/clock.h> #if (CONFIG_CHIP_SELECTS_PER_CTRL >4 )#error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
drivers/ddr/fsl/ctrl_regs.c +3 -0
@@ -16,6 +16,9 @@#include <fsl_ddr.h> #include <fsl_immap.h> #include <asm/io.h> +#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#include <asm/arch/clock.h> +#endif /* * Determine Rtt value.
drivers/ddr/fsl/fsl_ddr_gen4.c +3 -0
@@ -11,6 +11,9 @@#include <fsl_immap.h> #include <fsl_ddr.h> #include <fsl_errata.h> +#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#include <asm/arch/clock.h> +#endif #if defined(CONFIG_SYS_FSL_ERRATUM_A008511 ) | \ defined(CONFIG_SYS_FSL_ERRATUM_A009803 )
drivers/ddr/fsl/options.c +3 -0
@@ -9,6 +9,9 @@#include <fsl_ddr_sdram.h> #include <fsl_ddr.h> +#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#include <asm/arch/clock.h> +#endif /* * Use our own stack based buffer before relocation to allow accessing longer
drivers/ddr/fsl/util.c +3 -0
@@ -13,6 +13,9 @@#include <fsl_ddr.h> #include <fsl_immap.h> #include <asm/io.h> +#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#include <asm/arch/clock.h> +#endif /* To avoid 64-bit full-divides, we factor this here */ #define ULL_2E12 2000000000000ULL
drivers/net/fsl-mc/dpio/qbman_portal.c +1 -0
@@ -4,6 +4,7 @@* SPDX-License-Identifier: GPL-2.0+ */ +#include <asm/arch/clock.h> #include "qbman_portal.h" /* QBMan portal management command codes */
drivers/pci/pcie_layerscape.c +4 -0
@@ -12,6 +12,10 @@#include <errno.h> #include <malloc.h> #include <dm.h> +#if defined(CONFIG_FSL_LSCH2 ) || defined(CONFIG_FSL_LSCH3 ) || \ + defined(CONFIG_ARM ) +#include <asm/arch/clock.h> +#endif #include "pcie_layerscape.h" DECLARE_GLOBAL_DATA_PTR ;
drivers/pci/pcie_layerscape_fixup.c +3 -0
@@ -13,6 +13,9 @@#ifdef CONFIG_OF_BOARD_SETUP #include <libfdt.h> #include <fdt_support.h> +#ifdef CONFIG_ARM +#include <asm/arch/clock.h> +#endif #include "pcie_layerscape.h" #if defined(CONFIG_FSL_LSCH3 ) || defined(CONFIG_FSL_LSCH2 )
drivers/usb/common/fsl-errata.c +3 -0
@@ -9,6 +9,9 @@#include <common.h> #include <fsl_errata.h> #include <fsl_usb.h> +#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#include <asm/arch/clock.h> +#endif /* USB Erratum Checking code */ #if defined(CONFIG_PPC ) || defined(CONFIG_ARM )
include/common.h +1 -95
137 lines not on this page · raw message
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 33/38 common: freescale: Move arch-specific declarations
Quoted 4 lines · Simon Glass
The declarations should not be in
common.h. Move them to the arch-specific headers.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/7e129d6f/attachment.sig>
PATCH 34/38 common: freescale: Move arch-specific imx code to arch-imx
In reply to Simon GlassThese declarations should not be in common.h. Move them to an arch-specific header.
---
arch/arm/include/asm/arch-imx/cpu.h | 7 +++++++ include/common.h | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-)
arch/arm/include/asm/arch-imx/cpu.h +7 -0
@@ -50,3 +50,10 @@#define CS0_32M_CS1_32M_CS2_32M_CS3_32M 3u32 get_imx_reset_cause (void ); +ulong get_systemPLLCLK (void ); +ulong get_FCLK (void ); +ulong get_HCLK (void ); +ulong get_BCLK (void ); +ulong get_PERCLK1 (void ); +ulong get_PERCLK2 (void ); +ulong get_PERCLK3 (void );
include/common.h +0 -9
@@ -522,15 +522,6 @@ ulong get_UCLK (void);#if defined(CONFIG_LH7A40X )ulong get_PLLCLK (void );#endif -#if defined(CONFIG_IMX ) -ulong get_systemPLLCLK (void ); -ulong get_FCLK (void ); -ulong get_HCLK (void ); -ulong get_BCLK (void ); -ulong get_PERCLK1 (void ); -ulong get_PERCLK2 (void ); -ulong get_PERCLK3 (void ); -#endif ulong get_bus_freq (ulong );int get_serial_clock (void );
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 34/38 common: freescale: Move arch-specific imx code to arch-imx
Quoted 4 lines · Simon Glass
These declarations should not be in
common.h. Move them to an arch-specific header.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/4f6b7abd/attachment.sig>
PATCH 35/38 common: ep93xx: Move arch-specific declarations out of common
In reply to Simon GlassThese declarations should not be in common. Remove those that are not needed and move the others to an arch-specific location.
---
arch/arm/cpu/arm920t/ep93xx/speed.c | 2 +- include/common.h | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-)
arch/arm/cpu/arm920t/ep93xx/speed.c +1 -1
@@ -39,7 +39,7 @@ static ulong get_PLLCLK(uint32_t *pllreg) }/* return FCLK frequency */ -ulong get_FCLK () +ulong get_FCLK (void ) {const uint8_t fclk_divisors[] = {1 ,2 ,4 ,8 ,16 ,1 ,1 ,1 };struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE ;
include/common.h +0 -10
@@ -512,16 +512,6 @@ int serial_stub_tstc(struct stdio_dev *sdev);/* $(CPU)/speed.c */ int get_clocks (void ); -#if defined(CONFIG_LH7A40X ) || \ - defined(CONFIG_EP93XX ) -ulong get_FCLK (void ); -ulong get_HCLK (void ); -ulong get_PCLK (void ); -ulong get_UCLK (void ); -#endif -#if defined(CONFIG_LH7A40X ) -ulong get_PLLCLK (void ); -#endif ulong get_bus_freq (ulong );int get_serial_clock (void );
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 35/38 common: ep93xx: Move arch-specific declarations out of common
Quoted 4 lines · Simon Glass
These declarations should not be in common. Remove those that are not needed and move the others to an arch-specific location.
Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/5d0ca1ca/attachment.sig>
PATCH 36/38 common: arm: davinci: Move header file out of common
In reply to Simon GlassWe should not have an arch-specific header file in common.h. Instead, use the asm/hardware.h header to provide the required declarations, and drop the common.h changes.
---
arch/arm/mach-davinci/include/mach/davinci_misc.h | 2 ++ arch/arm/mach-davinci/include/mach/hardware.h | 5 ++++- include/common.h | 3 --- include/configs/calimain.h | 2 ++ include/configs/da850evm.h | 3 +++ include/configs/ea20.h | 2 ++ include/configs/ipam390.h | 2 ++ include/configs/legoev3.h | 2 ++ include/configs/omapl138_lcdk.h | 3 +++ 9 files changed, 20 insertions(+), 4 deletions(-)
arch/arm/mach-davinci/include/mach/davinci_misc.h +2 -0
@@ -7,6 +7,8 @@#ifndef __MISC_H#define __MISC_H +#include <asm/arch/hardware.h> +/* pin muxer definitions */ #define PIN_MUX_NUM_FIELDS 8/* Per register */ #define PIN_MUX_FIELD_SIZE 4/* n in bits */
arch/arm/mach-davinci/include/mach/hardware.h +4 -1
@@ -14,14 +14,15 @@#ifndef __ASM_ARCH_HARDWARE_H#define __ASM_ARCH_HARDWARE_H -#include <config.h> #include <linux/sizes.h> #define REG (addr) (*(volatile unsigned int *)(addr))#define REG_P (addr) ((volatile unsigned int *)(addr)) +#ifndef __ASSEMBLY__typedef volatile unsigned int dv_reg ;typedef volatile unsigned int *dv_reg_p ; +#endif /* * Base register addresses
@@ -285,6 +286,7 @@ typedef volatile unsigned int * dv_reg_p;#endif /* CONFIG_SOC_DA8XX */ +#ifndef __ASSEMBLY__void lpsc_on (unsigned int id);void lpsc_syncreset (unsigned int id);void lpsc_disable (unsigned int id);
@@ -625,5 +627,6 @@ static inline enum davinci_clk_ids get_async3_src(void)#define FLAG_FLGOFF 0x00000010#endif +#endif /* !__ASSEMBLY__ */ #endif /* __ASM_ARCH_HARDWARE_H */
include/common.h +0 -3
@@ -31,9 +31,6 @@ typedef volatile unsigned char vu_char;#include <stdarg.h> #include <linux/kernel.h> -#ifdef CONFIG_SOC_DA8XX -#include <asm/arch/hardware.h> -#endif #ifdef CONFIG_FSL_LSCH3 #include <asm/arch/immap_lsch3.h> #endif
include/configs/calimain.h +2 -0
@@ -318,4 +318,6 @@int calimain_get_osc_freq (void );#endif +#include <asm/arch/hardware.h> +#endif /* __CONFIG_H */
include/configs/da850evm.h +3 -0
@@ -334,4 +334,7 @@ #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \GENERATED_GBL_DATA_SIZE )#endif /* CONFIG_DIRECT_NOR_BOOT */ + +#include <asm/arch/hardware.h> +#endif /* __CONFIG_H */
include/configs/ea20.h +2 -0
@@ -273,4 +273,6 @@"ubootupd_nand=echo run load_magic,run load_nand,run upd;\0" \ "bootcmd=run net_testrfs\0" +#include <asm/arch/hardware.h> +#endif /* __CONFIG_H */
include/configs/ipam390.h +2 -0
@@ -304,4 +304,6 @@#define CONFIG_IPAM390_GPIO_LED_RED ((16 * 7) + 11)#define CONFIG_IPAM390_GPIO_LED_GREEN ((16 * 7) + 12) +#include <asm/arch/hardware.h> +#endif /* __CONFIG_H */
include/configs/legoev3.h +2 -0
@@ -215,4 +215,6 @@#define CONFIG_SYS_INIT_SP_ADDR 0x80010000 +#include <asm/arch/hardware.h> +#endif /* __CONFIG_H */
include/configs/omapl138_lcdk.h +3 -0
@@ -345,4 +345,7 @@#define CONFIG_SYS_SDRAM_BASE 0xc0000000 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \GENERATED_GBL_DATA_SIZE ) + +#include <asm/arch/hardware.h> +#endif /* __CONFIG_H */
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 36/38 common: arm: davinci: Move header file out of common
Quoted 5 lines · Simon Glass
We should not have an arch-specific header file in
common.h. Instead, use theasm/hardware.hheader to provide the required declarations, and drop thecommon.hchanges.Signed-off-by Simon Glass <[email protected]>
I'm not a super fan of adding #include to config.h files, but I'll see if they can be dropped when testing the series.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170517/db04e7b5/attachment.sig>
PATCH 36/38 common: arm: davinci: Move header file out of common
Hi Tom,
Quoted 6 lines · Tom Rini
Quoted 4 lines · Simon Glass
We should not have an arch-specific header file in
common.h. Instead, use theasm/hardware.hheader to provide the required declarations, and drop thecommon.hchanges.
Quoted 6 lines
Quoted 1 line
Signed-off-by Simon Glass <[email protected]>I'm not a super fan of adding #include to
config.hfiles, but I'll see if they can be dropped when testing the series.Reviewed-by Tom Rini <[email protected]>
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
PATCH 36/38 common: arm: davinci: Move header file out of common
Quoted 14 lines · Simon Glass
Hi Tom,
Quoted 11 lines · Tom Rini
Quoted 5 lines · Simon Glass
We should not have an arch-specific header file in
common.h. Instead, use theasm/hardware.hheader to provide the required declarations, and drop thecommon.hchanges.Signed-off-by Simon Glass <[email protected]>I'm not a super fan of adding #include to
config.hfiles, but I'll see if they can be dropped when testing the series.
Quoted 6 lines
Quoted 1 line
Reviewed-by Tom Rini <[email protected]>Me neither. The problem is things like
CONFIG_SYS_LOAD_ADDRincommon/image.cwhich rely on things in asm/hardware. I suppose you could include it fromasm/u-boot.h, but I'm not sure if that is better or not.
No, I need to bite the bullet and go back and re-try migration of CONFIG_SYS_TEXT_BASE (fully), CONFIG_SYS_LOAD_ADDR, etc.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170518/fed81b0e/attachment.sig>
PATCH 36/38 common: arm: davinci: Move header file out of common
In reply to Simon GlassQuoted 6 lines · Simon Glass
We should not have an arch-specific header file in
common.h. Instead, use theasm/hardware.hheader to provide the required declarations, and drop thecommon.hchanges.Signed-off-by Simon Glass <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/1a5ebde6/attachment.sig>
PATCH 37/38 common: arm: freescale: layerscape: Move header files out of common.h
In reply to Simon GlassWe should not have an arch-specific header file in common.h. Adjust the board files a little so it is not needed, and drop it.
---
arch/arm/include/asm/arch-fsl-layerscape/soc.h | 11 +++++++++++ arch/arm/include/asm/arch-ls102xa/clock.h | 1 + arch/arm/include/asm/arch-ls102xa/soc.h | 0 drivers/ddr/fsl/ctrl_regs.c | 3 ++- drivers/ddr/fsl/fsl_ddr_gen4.c | 3 ++- drivers/ddr/fsl/options.c | 3 ++- drivers/ddr/fsl/util.c | 3 ++- drivers/usb/common/fsl-errata.c | 3 ++- include/common.h | 7 ------- include/configs/ls1012a_common.h | 2 ++ include/configs/ls1043a_common.h | 2 ++ include/configs/ls1046a_common.h | 2 ++ include/configs/ls2080a_common.h | 2 ++ include/fsl_ifc.h | 3 +++ 14 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 arch/arm/include/asm/arch-ls102xa/soc.h
arch/arm/include/asm/arch-fsl-layerscape/soc.h +11 -0
@@ -7,6 +7,16 @@#ifndef _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_#define _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_ +#ifndef __ASSEMBLY__ +#include <linux/types.h> +#ifdef CONFIG_FSL_LSCH2 +#include <asm/arch/immap_lsch2.h> +#endif +#ifdef CONFIG_FSL_LSCH3 +#include <asm/arch/immap_lsch3.h> +#endif +#endif +#ifdef CONFIG_SYS_FSL_CCSR_GUR_LE #define gur_in32 (a) in_le32(a)#define gur_out32 (a, v) out_le32(a, v)
@@ -117,4 +127,5 @@ void erratum_a010315(void);bool soc_has_dp_ddr (void );bool soc_has_aiop (void );#endif +#endif /* _ASM_ARMV8_FSL_LAYERSCAPE_SOC_H_ */
arch/arm/include/asm/arch-ls102xa/clock.h +1 -0
@@ -19,6 +19,7 @@ enum mxc_clock { };unsigned int mxc_get_clock (enum mxc_clock clk); +ulong get_ddr_freq (ulong );uint get_svr (void );#endif /* __ASM_ARCH_LS102XA_CLOCK_H_ */
arch/arm/include/asm/arch-ls102xa/soc.h new file +0 -0
drivers/ddr/fsl/ctrl_regs.c +2 -1
@@ -16,7 +16,8 @@#include <fsl_ddr.h> #include <fsl_immap.h> #include <asm/io.h> -#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#if defined(CONFIG_FSL_LSCH2 ) || defined(CONFIG_FSL_LSCH3 ) || \ + defined(CONFIG_ARM )#include <asm/arch/clock.h> #endif
drivers/ddr/fsl/fsl_ddr_gen4.c +2 -1
@@ -11,7 +11,8 @@#include <fsl_immap.h> #include <fsl_ddr.h> #include <fsl_errata.h> -#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#if defined(CONFIG_FSL_LSCH2 ) || defined(CONFIG_FSL_LSCH3 ) || \ + defined(CONFIG_ARM )#include <asm/arch/clock.h> #endif
drivers/ddr/fsl/options.c +2 -1
@@ -9,7 +9,8 @@#include <fsl_ddr_sdram.h> #include <fsl_ddr.h> -#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#if defined(CONFIG_FSL_LSCH2 ) || defined(CONFIG_FSL_LSCH3 ) || \ + defined(CONFIG_ARM )#include <asm/arch/clock.h> #endif
drivers/ddr/fsl/util.c +2 -1
@@ -13,7 +13,8 @@#include <fsl_ddr.h> #include <fsl_immap.h> #include <asm/io.h> -#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#if defined(CONFIG_FSL_LSCH2 ) || defined(CONFIG_FSL_LSCH3 ) || \ + defined(CONFIG_ARM )#include <asm/arch/clock.h> #endif
drivers/usb/common/fsl-errata.c +2 -1
@@ -9,7 +9,8 @@#include <common.h> #include <fsl_errata.h> #include <fsl_usb.h> -#if defined(CONFIG_FSL_LSCH2 ) || defined(FSL_LSCH3 ) +#if defined(CONFIG_FSL_LSCH2 ) || defined(CONFIG_FSL_LSCH3 ) || \ + defined(CONFIG_ARM )#include <asm/arch/clock.h> #endif
include/common.h +0 -7
@@ -31,13 +31,6 @@ typedef volatile unsigned char vu_char;#include <stdarg.h> #include <linux/kernel.h> -#ifdef CONFIG_FSL_LSCH3 -#include <asm/arch/immap_lsch3.h> -#endif -#ifdef CONFIG_FSL_LSCH2 -#include <asm/arch/immap_lsch2.h> -#endif -#include <part.h> #include <flash.h> #include <image.h>
include/configs/ls1012a_common.h +2 -0
@@ -123,4 +123,6 @@#define CONFIG_PANIC_HANG #define CONFIG_SYS_BOOTM_LEN (64 << 20)/* Increase max gunzip size */ +#include <asm/arch/soc.h> +#endif /* __LS1012A_COMMON_H */
include/configs/ls1043a_common.h +2 -0
@@ -307,4 +307,6 @@#define CONFIG_SHA_HW_ACCEL #endif +#include <asm/arch/soc.h> +#endif /* __LS1043A_COMMON_H */
include/configs/ls1046a_common.h +2 -0
@@ -236,4 +236,6 @@#define CONFIG_SHA_HW_ACCEL #endif +#include <asm/arch/soc.h> +#endif /* __LS1046A_COMMON_H */
include/configs/ls2080a_common.h +2 -0
@@ -236,4 +236,6 @@ unsigned long long get_qixis_addr(void);#define CONFIG_SHA_HW_ACCEL #endif +#include <asm/arch/soc.h> +#endif /* __LS2_COMMON_H */
include/fsl_ifc.h +3 -0
@@ -11,6 +11,9 @@#ifdef CONFIG_FSL_IFC #include <config.h> #include <common.h> +#ifdef CONFIG_ARM +#include <asm/arch/soc.h> +#endif #define FSL_IFC_V1_1_0 0x01010000#define FSL_IFC_V2_0_0 0x02000000
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 37/38 common: arm: freescale: layerscape: Move header files out of common.h
Quoted 4 lines · Simon Glass
We should not have an arch-specific header file in
common.h. Adjust the board files a little so it is not needed, and drop it.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/5a6a6633/attachment.sig>
PATCH 38/38 common: microblaze: Drop arch-specific declarations
In reply to Simon GlassThese are not needed and should not be in common.h. Drop them.
---
include/common.h | 5 ----- 1 file changed, 5 deletions(-)
include/common.h +0 -5
@@ -438,11 +438,6 @@ void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn));ulong get_endaddr (void );void trap_init (ulong ); -#if defined (CONFIG_MICROBLAZE ) -unsigned short in16 (unsigned int ); -void out16 (unsigned int ,unsigned short value); -#endif -/* $(CPU)/cpu.c */ static inline int cpumask_next (int cpu,unsigned int mask) {
Signature · 1 line
2.13.0.303.g4ebf302169-goog
PATCH 38/38 common: microblaze: Drop arch-specific declarations
Quoted 3 lines · Simon Glass
These are not needed and should not be in
common.h. Drop them.Signed-off-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/13a27651/attachment.sig>