diff options
197 files changed, 1139 insertions, 945 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7b20fab407..171ad03429 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -7,139 +7,225 @@ config SYS_ARCH config ARM64 bool +config HAS_VBAR + bool + +config CPU_ARM720T + bool + +config CPU_ARM920T + bool + +config CPU_ARM926EJS + bool + +config CPU_ARM946ES + bool + +config CPU_ARM1136 + bool + +config CPU_ARM1176 + bool + select HAS_VBAR + +config CPU_V7 + bool + select HAS_VBAR + +config CPU_PXA + bool + +config CPU_SA1100 + bool + +config SYS_CPU + default "arm720t" if CPU_ARM720T + default "arm920t" if CPU_ARM920T + default "arm926ejs" if CPU_ARM926EJS + default "arm946es" if CPU_ARM946ES + default "arm1136" if CPU_ARM1136 + default "arm1176" if CPU_ARM1176 + default "armv7" if CPU_V7 + default "pxa" if CPU_PXA + default "sa1100" if CPU_SA1100 + choice prompt "Target select" config TARGET_INTEGRATORAP_CM720T bool "Support integratorap_cm720t" + select CPU_ARM720T config TARGET_INTEGRATORAP_CM920T bool "Support integratorap_cm920t" + select CPU_ARM920T config TARGET_INTEGRATORCP_CM920T bool "Support integratorcp_cm920t" + select CPU_ARM920T config TARGET_A320EVB bool "Support a320evb" + select CPU_ARM920T config TARGET_AT91RM9200EK bool "Support at91rm9200ek" + select CPU_ARM920T config TARGET_EB_CPUX9K2 bool "Support eb_cpux9k2" + select CPU_ARM920T config TARGET_CPUAT91 bool "Support cpuat91" + select CPU_ARM920T config TARGET_EDB93XX bool "Support edb93xx" + select CPU_ARM920T config TARGET_SCB9328 bool "Support scb9328" + select CPU_ARM920T config TARGET_CM4008 bool "Support cm4008" + select CPU_ARM920T config TARGET_CM41XX bool "Support cm41xx" + select CPU_ARM920T config TARGET_VCMA9 bool "Support VCMA9" + select CPU_ARM920T config TARGET_SMDK2410 bool "Support smdk2410" + select CPU_ARM920T config TARGET_INTEGRATORAP_CM926EJS bool "Support integratorap_cm926ejs" + select CPU_ARM926EJS config TARGET_INTEGRATORCP_CM926EJS bool "Support integratorcp_cm926ejs" + select CPU_ARM926EJS config TARGET_ASPENITE bool "Support aspenite" + select CPU_ARM926EJS config TARGET_GPLUGD bool "Support gplugd" + select CPU_ARM926EJS config TARGET_AFEB9260 bool "Support afeb9260" + select CPU_ARM926EJS config TARGET_AT91SAM9260EK bool "Support at91sam9260ek" + select CPU_ARM926EJS config TARGET_AT91SAM9261EK bool "Support at91sam9261ek" + select CPU_ARM926EJS config TARGET_AT91SAM9263EK bool "Support at91sam9263ek" + select CPU_ARM926EJS config TARGET_AT91SAM9M10G45EK bool "Support at91sam9m10g45ek" + select CPU_ARM926EJS config TARGET_AT91SAM9N12EK bool "Support at91sam9n12ek" + select CPU_ARM926EJS config TARGET_AT91SAM9RLEK bool "Support at91sam9rlek" + select CPU_ARM926EJS config TARGET_AT91SAM9X5EK bool "Support at91sam9x5ek" + select CPU_ARM926EJS config TARGET_SNAPPER9260 bool "Support snapper9260" + select CPU_ARM926EJS config TARGET_VL_MA2SC bool "Support vl_ma2sc" + select CPU_ARM926EJS config TARGET_SBC35_A9G20 bool "Support sbc35_a9g20" + select CPU_ARM926EJS config TARGET_TNY_A9260 bool "Support tny_a9260" + select CPU_ARM926EJS config TARGET_USB_A9263 bool "Support usb_a9263" + select CPU_ARM926EJS config TARGET_ETHERNUT5 bool "Support ethernut5" + select CPU_ARM926EJS config TARGET_TOP9000 bool "Support top9000" + select CPU_ARM926EJS config TARGET_MEESC bool "Support meesc" + select CPU_ARM926EJS config TARGET_OTC570 bool "Support otc570" + select CPU_ARM926EJS config TARGET_CPU9260 bool "Support cpu9260" + select CPU_ARM926EJS config TARGET_PM9261 bool "Support pm9261" + select CPU_ARM926EJS config TARGET_PM9263 bool "Support pm9263" + select CPU_ARM926EJS config TARGET_PM9G45 bool "Support pm9g45" + select CPU_ARM926EJS config TARGET_CORVUS bool "Support corvus" + select CPU_ARM926EJS config TARGET_TAURUS bool "Support taurus" + select CPU_ARM926EJS config TARGET_STAMP9G20 bool "Support stamp9g20" + select CPU_ARM926EJS config ARCH_DAVINCI bool "TI DaVinci" + select CPU_ARM926EJS help Support for TI's DaVinci platform. config KIRKWOOD bool "Marvell Kirkwood" + select CPU_ARM926EJS config TARGET_DB_MV784MP_GP bool "Support db-mv784mp-gp" @@ -149,370 +235,478 @@ config TARGET_MAXBCM config TARGET_DEVKIT3250 bool "Support devkit3250" + select CPU_ARM926EJS config TARGET_JADECPU bool "Support jadecpu" + select CPU_ARM926EJS config TARGET_MX25PDK bool "Support mx25pdk" + select CPU_ARM926EJS config TARGET_TX25 bool "Support tx25" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_ZMX25 bool "Support zmx25" + select CPU_ARM926EJS config TARGET_APF27 bool "Support apf27" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_IMX27LITE bool "Support imx27lite" + select CPU_ARM926EJS config TARGET_MAGNESIUM bool "Support magnesium" + select CPU_ARM926EJS config TARGET_APX4DEVKIT bool "Support apx4devkit" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_XFI3 bool "Support xfi3" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_M28EVK bool "Support m28evk" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_MX23EVK bool "Support mx23evk" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_MX28EVK bool "Support mx28evk" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_MX23_OLINUXINO bool "Support mx23_olinuxino" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_BG0900 bool "Support bg0900" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_SANSA_FUZE_PLUS bool "Support sansa_fuze_plus" + select CPU_ARM926EJS select SUPPORT_SPL config TARGET_SC_SPS_1 bool "Support sc_sps_1" + select CPU_ARM926EJS select SUPPORT_SPL config ARCH_NOMADIK bool "ST-Ericsson Nomadik" + select CPU_ARM926EJS config ORION5X bool "Marvell Orion" + select CPU_ARM926EJS config TARGET_DKB bool "Support dkb" + select CPU_ARM926EJS config TARGET_SPEAR300 bool "Support spear300" + select CPU_ARM926EJS config TARGET_SPEAR310 bool "Support spear310" + select CPU_ARM926EJS config TARGET_SPEAR320 bool "Support spear320" + select CPU_ARM926EJS config TARGET_SPEAR600 bool "Support spear600" + select CPU_ARM926EJS config TARGET_X600 bool "Support x600" + select CPU_ARM926EJS select SUPPORT_SPL config ARCH_VERSATILE bool "ARM Ltd. Versatile family" + select CPU_ARM926EJS config TARGET_INTEGRATORCP_CM1136 bool "Support integratorcp_cm1136" + select CPU_ARM1136 config TARGET_IMX31_PHYCORE bool "Support imx31_phycore" + select CPU_ARM1136 config TARGET_QONG bool "Support qong" + select CPU_ARM1136 config TARGET_MX31ADS bool "Support mx31ads" + select CPU_ARM1136 config TARGET_MX31PDK bool "Support mx31pdk" + select CPU_ARM1136 select SUPPORT_SPL config TARGET_TT01 bool "Support tt01" + select CPU_ARM1136 config TARGET_IMX31_LITEKIT bool "Support imx31_litekit" + select CPU_ARM1136 config TARGET_WOODBURN bool "Support woodburn" + select CPU_ARM1136 config TARGET_WOODBURN_SD bool "Support woodburn_sd" + select CPU_ARM1136 select SUPPORT_SPL config TARGET_FLEA3 bool "Support flea3" + select CPU_ARM1136 config TARGET_MX35PDK bool "Support mx35pdk" + select CPU_ARM1136 config TARGET_RPI_B bool "Support rpi_b" + select CPU_ARM1176 config TARGET_TNETV107X_EVM bool "Support tnetv107x_evm" + select CPU_ARM1176 config TARGET_INTEGRATORAP_CM946ES bool "Support integratorap_cm946es" + select CPU_ARM946ES config TARGET_INTEGRATORCP_CM946ES bool "Support integratorcp_cm946es" + select CPU_ARM946ES config TARGET_VEXPRESS_CA15_TC2 bool "Support vexpress_ca15_tc2" + select CPU_V7 config TARGET_VEXPRESS_CA5X2 bool "Support vexpress_ca5x2" + select CPU_V7 config TARGET_VEXPRESS_CA9X4 bool "Support vexpress_ca9x4" + select CPU_V7 config TARGET_KWB bool "Support kwb" + select CPU_V7 select SUPPORT_SPL config TARGET_TSERIES bool "Support tseries" + select CPU_V7 select SUPPORT_SPL config TARGET_CM_T335 bool "Support cm_t335" + select CPU_V7 select SUPPORT_SPL config TARGET_PEPPER bool "Support pepper" + select CPU_V7 select SUPPORT_SPL config TARGET_AM335X_IGEP0033 bool "Support am335x_igep0033" + select CPU_V7 select SUPPORT_SPL config TARGET_PCM051 bool "Support pcm051" + select CPU_V7 select SUPPORT_SPL config TARGET_DRACO bool "Support draco" + select CPU_V7 select SUPPORT_SPL config TARGET_DXR2 bool "Support dxr2" + select CPU_V7 select SUPPORT_SPL config TARGET_PXM2 bool "Support pxm2" + select CPU_V7 select SUPPORT_SPL config TARGET_RUT bool "Support rut" + select CPU_V7 select SUPPORT_SPL config TARGET_PENGWYN bool "Support pengwyn" + select CPU_V7 select SUPPORT_SPL config TARGET_AM335X_EVM bool "Support am335x_evm" + select CPU_V7 select SUPPORT_SPL config TARGET_AM43XX_EVM bool "Support am43xx_evm" + select CPU_V7 select SUPPORT_SPL config TARGET_TI814X_EVM bool "Support ti814x_evm" + select CPU_V7 select SUPPORT_SPL config TARGET_TI816X_EVM bool "Support ti816x_evm" + select CPU_V7 select SUPPORT_SPL config TARGET_SAMA5D3_XPLAINED bool "Support sama5d3_xplained" + select CPU_V7 select SUPPORT_SPL config TARGET_SAMA5D3XEK bool "Support sama5d3xek" + select CPU_V7 select SUPPORT_SPL config TARGET_BCM28155_AP bool "Support bcm28155_ap" + select CPU_V7 config TARGET_BCM958300K bool "Support bcm958300k" + select CPU_V7 config TARGET_BCM958622HR bool "Support bcm958622hr" + select CPU_V7 config ARCH_EXYNOS bool "Samsung EXYNOS" + select CPU_V7 config ARCH_S5PC1XX bool "Samsung S5PC1XX" + select CPU_V7 config ARCH_HIGHBANK bool "Calxeda Highbank" + select CPU_V7 config ARCH_KEYSTONE bool "TI Keystone" + select CPU_V7 select SUPPORT_SPL config TARGET_M53EVK bool "Support m53evk" + select CPU_V7 select SUPPORT_SPL config TARGET_IMA3_MX53 bool "Support ima3-mx53" + select CPU_V7 config TARGET_MX51EVK bool "Support mx51evk" + select CPU_V7 config TARGET_MX53ARD bool "Support mx53ard" + select CPU_V7 config TARGET_MX53EVK bool "Support mx53evk" + select CPU_V7 config TARGET_MX53LOCO bool "Support mx53loco" + select CPU_V7 config TARGET_MX53SMD bool "Support mx53smd" + select CPU_V7 config TARGET_MX51_EFIKAMX bool "Support mx51_efikamx" + select CPU_V7 config TARGET_VISION2 bool "Support vision2" + select CPU_V7 config TARGET_UDOO bool "Support udoo" + select CPU_V7 config TARGET_WANDBOARD bool "Support wandboard" + select CPU_V7 config TARGET_TITANIUM bool "Support titanium" + select CPU_V7 config TARGET_NITROGEN6X bool "Support nitrogen6x" + select CPU_V7 config TARGET_CGTQMX6EVAL bool "Support cgtqmx6eval" + select CPU_V7 config TARGET_EMBESTMX6BOARDS bool "Support embestmx6boards" + select CPU_V7 config TARGET_ARISTAINETOS bool "Support aristainetos" + select CPU_V7 config TARGET_MX6QARM2 bool "Support mx6qarm2" + select CPU_V7 config TARGET_MX6QSABREAUTO bool "Support mx6qsabreauto" + select CPU_V7 config TARGET_MX6SABRESD bool "Support mx6sabresd" + select CPU_V7 config TARGET_MX6SLEVK bool "Support mx6slevk" + select CPU_V7 config TARGET_MX6SXSABRESD bool "Support mx6sxsabresd" + select CPU_V7 config TARGET_GW_VENTANA bool "Support gw_ventana" + select CPU_V7 select SUPPORT_SPL config TARGET_HUMMINGBOARD bool "Support hummingboard" + select CPU_V7 config TARGET_TQMA6 bool "TQ Systems TQMa6 board" + select CPU_V7 config TARGET_OT1200 bool "Bachmann OT1200" + select CPU_V7 config OMAP34XX bool "OMAP34XX SoC" + select CPU_V7 config OMAP44XX bool "OMAP44XX SoC" + select CPU_V7 select SUPPORT_SPL config OMAP54XX bool "OMAP54XX SoC" + select CPU_V7 select SUPPORT_SPL config RMOBILE bool "Renesas ARM SoCs" + select CPU_V7 config TARGET_CM_FX6 bool "Support cm_fx6" + select CPU_V7 select SUPPORT_SPL config TARGET_SOCFPGA_CYCLONE5 bool "Support socfpga_cyclone5" + select CPU_V7 select SUPPORT_SPL config TARGET_SUN4I bool "Support sun4i" + select CPU_V7 select SUPPORT_SPL config TARGET_SUN5I bool "Support sun5i" + select CPU_V7 select SUPPORT_SPL config TARGET_SUN6I bool "Support sun6i" + select CPU_V7 select SUPPORT_SPL config TARGET_SUN7I bool "Support sun7i" + select CPU_V7 select SUPPORT_SPL config TARGET_SUN8I bool "Support sun8i" + select CPU_V7 select SUPPORT_SPL config TARGET_SNOWBALL bool "Support snowball" + select CPU_V7 config TARGET_U8500_HREF bool "Support u8500_href" + select CPU_V7 config TARGET_VF610TWR bool "Support vf610twr" + select CPU_V7 config ZYNQ bool "Xilinx Zynq Platform" + select CPU_V7 select SUPPORT_SPL config TEGRA @@ -520,6 +714,8 @@ config TEGRA select SUPPORT_SPL select SPL select OF_CONTROL if !SPL_BUILD + select CPU_ARM720T if SPL_BUILD + select CPU_V7 if !SPL_BUILD config TARGET_VEXPRESS_AEMV8A bool "Support vexpress_aemv8a" @@ -535,53 +731,69 @@ config TARGET_LS2085A_SIMU config TARGET_LS1021AQDS bool "Support ls1021aqds_nor" + select CPU_V7 config TARGET_LS1021ATWR bool "Support ls1021atwr_nor" + select CPU_V7 config TARGET_BALLOON3 bool "Support balloon3" + select CPU_PXA config TARGET_H2200 bool "Support h2200" + select CPU_PXA config TARGET_PALMLD bool "Support palmld" + select CPU_PXA config TARGET_PALMTC bool "Support palmtc" + select CPU_PXA config TARGET_PALMTREO680 bool "Support palmtreo680" + select CPU_PXA select SUPPORT_SPL config TARGET_PXA255_IDP bool "Support pxa255_idp" + select CPU_PXA config TARGET_TRIZEPSIV bool "Support trizepsiv" + select CPU_PXA config TARGET_VPAC270 bool "Support vpac270" + select CPU_PXA select SUPPORT_SPL config TARGET_XAENIAX bool "Support xaeniax" + select CPU_PXA config TARGET_ZIPITZ2 bool "Support zipitz2" + select CPU_PXA config TARGET_LP8X4X bool "Support lp8x4x" + select CPU_PXA config TARGET_COLIBRI_PXA270 bool "Support colibri_pxa270" + select CPU_PXA config TARGET_JORNADA bool "Support jornada" + select CPU_SA1100 config ARCH_UNIPHIER bool "Panasonic UniPhier platform" + select CPU_V7 select SUPPORT_SPL endchoice diff --git a/arch/arm/cpu/arm926ejs/davinci/Kconfig b/arch/arm/cpu/arm926ejs/davinci/Kconfig index 1791cefa2f..613f04d8b0 100644 --- a/arch/arm/cpu/arm926ejs/davinci/Kconfig +++ b/arch/arm/cpu/arm926ejs/davinci/Kconfig @@ -57,9 +57,6 @@ config TARGET_CALIMAIN endchoice -config SYS_CPU - default "arm926ejs" - config SYS_SOC default "davinci" diff --git a/arch/arm/cpu/arm926ejs/kirkwood/Kconfig b/arch/arm/cpu/arm926ejs/kirkwood/Kconfig index 91ffedf732..6c037a16c9 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/Kconfig +++ b/arch/arm/cpu/arm926ejs/kirkwood/Kconfig @@ -59,9 +59,6 @@ config TARGET_GOFLEXHOME endchoice -config SYS_CPU - default "arm926ejs" - config SYS_SOC default "kirkwood" diff --git a/arch/arm/cpu/arm926ejs/nomadik/Kconfig b/arch/arm/cpu/arm926ejs/nomadik/Kconfig index eda51fdc37..265f336469 100644 --- a/arch/arm/cpu/arm926ejs/nomadik/Kconfig +++ b/arch/arm/cpu/arm926ejs/nomadik/Kconfig @@ -8,9 +8,6 @@ config NOMADIK_NHK8815 endchoice -config SYS_CPU - default "arm926ejs" - config SYS_SOC default "nomadik" diff --git a/arch/arm/cpu/arm926ejs/orion5x/Kconfig b/arch/arm/cpu/arm926ejs/orion5x/Kconfig index 2d0ab2be17..5a542629c7 100644 --- a/arch/arm/cpu/arm926ejs/orion5x/Kconfig +++ b/arch/arm/cpu/arm926ejs/orion5x/Kconfig @@ -8,9 +8,6 @@ config TARGET_EDMINIV2 endchoice -config SYS_CPU - default "arm926ejs" - config SYS_SOC default "orion5x" diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c b/arch/arm/cpu/arm926ejs/spear/cpu.c index 3757ffb2c2..697e0945d7 100644 --- a/arch/arm/cpu/arm926ejs/spear/cpu.c +++ b/arch/arm/cpu/arm926ejs/spear/cpu.c @@ -38,7 +38,7 @@ int arch_cpu_init(void) #if defined(CONFIG_DW_UDC) periph1_clken |= MISC_USBDENB; #endif -#if defined(CONFIG_DW_I2C) +#if defined(CONFIG_SYS_I2C_DW) periph1_clken |= MISC_I2CENB; #endif #if defined(CONFIG_ST_SMI) diff --git a/arch/arm/cpu/arm926ejs/versatile/Kconfig b/arch/arm/cpu/arm926ejs/versatile/Kconfig index 35c16d876c..d2e76f4afc 100644 --- a/arch/arm/cpu/arm926ejs/versatile/Kconfig +++ b/arch/arm/cpu/arm926ejs/versatile/Kconfig @@ -1,8 +1,5 @@ if ARCH_VERSATILE -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "versatile" diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index b895223523..090be9383f 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -51,9 +51,6 @@ config TARGET_PEACH_PIT endchoice -config SYS_CPU - default "armv7" - config SYS_SOC default "exynos" diff --git a/arch/arm/cpu/armv7/highbank/Kconfig b/arch/arm/cpu/armv7/highbank/Kconfig index 29ff99511c..0e73c04142 100644 --- a/arch/arm/cpu/armv7/highbank/Kconfig +++ b/arch/arm/cpu/armv7/highbank/Kconfig @@ -1,8 +1,5 @@ if ARCH_HIGHBANK -config SYS_CPU - default "armv7" - config SYS_BOARD default "highbank" diff --git a/arch/arm/cpu/armv7/keystone/Kconfig b/arch/arm/cpu/armv7/keystone/Kconfig index 393885f710..134ae87fe1 100644 --- a/arch/arm/cpu/armv7/keystone/Kconfig +++ b/arch/arm/cpu/armv7/keystone/Kconfig @@ -14,9 +14,6 @@ config TARGET_K2L_EVM endchoice -config SYS_CPU - default "armv7" - config SYS_SOC default "keystone" diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig index 53c0d24005..c215404469 100644 --- a/arch/arm/cpu/armv7/omap3/Kconfig +++ b/arch/arm/cpu/armv7/omap3/Kconfig @@ -90,9 +90,6 @@ config TARGET_TWISTER endchoice -config SYS_CPU - default "armv7" - config SYS_SOC default "omap3" diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig index e270895135..eccf897258 100644 --- a/arch/arm/cpu/armv7/omap4/Kconfig +++ b/arch/arm/cpu/armv7/omap4/Kconfig @@ -14,9 +14,6 @@ config TARGET_OMAP4_SDP4430 endchoice -config SYS_CPU - default "armv7" - config SYS_SOC default "omap4" diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig index 2ccf5b919d..129982caca 100644 --- a/arch/arm/cpu/armv7/omap5/Kconfig +++ b/arch/arm/cpu/armv7/omap5/Kconfig @@ -14,9 +14,6 @@ config TARGET_DRA7XX_EVM endchoice -config SYS_CPU - default "armv7" - config SYS_SOC default "omap5" diff --git a/arch/arm/cpu/armv7/rmobile/Kconfig b/arch/arm/cpu/armv7/rmobile/Kconfig index 6c2bb22a85..c46a0cc9b8 100644 --- a/arch/arm/cpu/armv7/rmobile/Kconfig +++ b/arch/arm/cpu/armv7/rmobile/Kconfig @@ -20,9 +20,6 @@ config TARGET_ALT endchoice -config SYS_CPU - default "armv7" - config SYS_SOC default "rmobile" diff --git a/arch/arm/cpu/armv7/s5pc1xx/Kconfig b/arch/arm/cpu/armv7/s5pc1xx/Kconfig index 2fbbc18203..628813423f 100644 --- a/arch/arm/cpu/armv7/s5pc1xx/Kconfig +++ b/arch/arm/cpu/armv7/s5pc1xx/Kconfig @@ -13,9 +13,6 @@ config TARGET_SMDKC100 endchoice -config SYS_CPU - default "armv7" - config SYS_SOC default "s5pc1xx" diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index fedd7c8f7e..fdc05b942f 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -81,12 +81,6 @@ ENTRY(c_runtime_cpu_setup) mcr p15, 0, r0, c7, c10, 4 @ DSB mcr p15, 0, r0, c7, c5, 4 @ ISB #endif -/* - * Move vector table - */ - /* Set vector address in CP15 VBAR register */ - ldr r0, =_start - mcr p15, 0, r0, c12, c0, 0 @Set VBAR bx lr diff --git a/arch/arm/cpu/armv7/uniphier/Kconfig b/arch/arm/cpu/armv7/uniphier/Kconfig index 8906f64c45..f013dc3cad 100644 --- a/arch/arm/cpu/armv7/uniphier/Kconfig +++ b/arch/arm/cpu/armv7/uniphier/Kconfig @@ -1,16 +1,10 @@ menu "Panasonic UniPhier platform" depends on ARCH_UNIPHIER -config SYS_CPU - string - default "armv7" - config SYS_SOC - string default "uniphier" config SYS_CONFIG_NAME - string default "ph1_pro4" if MACH_PH1_PRO4 default "ph1_ld4" if MACH_PH1_LD4 default "ph1_sld8" if MACH_PH1_SLD8 diff --git a/arch/arm/cpu/armv7/zynq/Kconfig b/arch/arm/cpu/armv7/zynq/Kconfig index d6655a972b..f418cd6d99 100644 --- a/arch/arm/cpu/armv7/zynq/Kconfig +++ b/arch/arm/cpu/armv7/zynq/Kconfig @@ -17,9 +17,6 @@ config TARGET_ZYNQ_ZC770 endchoice -config SYS_CPU - default "armv7" - config SYS_BOARD default "zynq" diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index 9019736d2c..4dacfd941f 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -28,6 +28,8 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_USE_IRQ int interrupt_init (void) { + unsigned long cpsr; + /* * setup up stacks if necessary */ @@ -35,6 +37,31 @@ int interrupt_init (void) IRQ_STACK_START_IN = gd->irq_sp + 8; FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ; + + __asm__ __volatile__("mrs %0, cpsr\n" + : "=r" (cpsr) + : + : "memory"); + + __asm__ __volatile__("msr cpsr_c, %0\n" + "mov sp, %1\n" + : + : "r" (IRQ_MODE | I_BIT | F_BIT | (cpsr & ~FIQ_MODE)), + "r" (IRQ_STACK_START) + : "memory"); + + __asm__ __volatile__("msr cpsr_c, %0\n" + "mov sp, %1\n" + : + : "r" (FIQ_MODE | I_BIT | F_BIT | (cpsr & ~IRQ_MODE)), + "r" (FIQ_STACK_START) + : "memory"); + + __asm__ __volatile__("msr cpsr_c, %0" + : + : "r" (cpsr) + : "memory"); + return arch_interrupt_init(); } diff --git a/arch/arm/lib/relocate.S b/arch/arm/lib/relocate.S index 8035251563..b4a258ce5c 100644 --- a/arch/arm/lib/relocate.S +++ b/arch/arm/lib/relocate.S @@ -6,6 +6,8 @@ * SPDX-License-Identifier: GPL-2.0+ */ +#include <asm-offsets.h> +#include <config.h> #include <linux/linkage.h> /* @@ -52,6 +54,34 @@ fixnext: cmp r2, r3 blo fixloop + /* + * Relocate the exception vectors + */ +#ifdef CONFIG_HAS_VBAR + /* + * If the ARM processor has the security extensions, + * use VBAR to relocate the exception vectors. + */ + ldr r0, [r9, #GD_RELOCADDR] /* r0 = gd->relocaddr */ + mcr p15, 0, r0, c12, c0, 0 /* Set VBAR */ +#else + /* + * Copy the relocated exception vectors to the + * correct address + * CP15 c1 V bit gives us the location of the vectors: + * 0x00000000 or 0xFFFF0000. + */ + ldr r0, [r9, #GD_RELOCADDR] /* r0 = gd->relocaddr */ + mrc p15, 0, r2, c1, c0, 0 /* V bit (bit[13]) in CP15 c1 */ + ands r2, r2, #(1 << 13) + ldreq r1, =0x00000000 /* If V=0 */ + ldrne r1, =0xFFFF0000 /* If V=1 */ + ldmia r0!, {r2-r8,r10} + stmia r1!, {r2-r8,r10} + ldmia r0!, {r2-r8,r10} + stmia r1!, {r2-r8,r10} +#endif + relocate_done: #ifdef __XSCALE__ diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S index 0cb87cee7f..49238ed21e 100644 --- a/arch/arm/lib/vectors.S +++ b/arch/arm/lib/vectors.S @@ -33,7 +33,7 @@ ************************************************************************* */ - .section ".vectors", "x" + .section ".vectors", "ax" /* ************************************************************************* diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile index e7bb3e33d5..9d38ef73a7 100644 --- a/arch/x86/cpu/Makefile +++ b/arch/x86/cpu/Makefile @@ -10,4 +10,4 @@ extra-y = start.o obj-$(CONFIG_X86_RESET_VECTOR) += resetvec.o start16.o -obj-y += interrupts.o cpu.o +obj-y += interrupts.o cpu.o call64.o diff --git a/arch/x86/cpu/call64.S b/arch/x86/cpu/call64.S new file mode 100644 index 0000000000..74dd5a89dc --- /dev/null +++ b/arch/x86/cpu/call64.S @@ -0,0 +1,93 @@ +/* + * (C) Copyright 2014 Google, Inc + * Copyright (C) 1991, 1992, 1993 Linus Torvalds + * + * Parts of this copied from Linux arch/x86/boot/compressed/head_64.S + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <asm/global_data.h> +#include <asm/msr-index.h> +#include <asm/processor-flags.h> + +.code32 +.globl cpu_call64 +cpu_call64: + /* + * cpu_call64(ulong pgtable, ulong setup_base, ulong target) + * + * eax - pgtable + * edx - setup_base + * ecx - target + */ + cli + push %ecx /* arg2 = target */ + push %edx /* arg1 = setup_base */ + mov %eax, %ebx + + /* Load new GDT with the 64bit segments using 32bit descriptor */ + leal gdt, %eax + movl %eax, gdt+2 + lgdt gdt + + /* Enable PAE mode */ + movl $(X86_CR4_PAE), %eax + movl %eax, %cr4 + + /* Enable the boot page tables */ + leal (%ebx), %eax + movl %eax, %cr3 + + /* Enable Long mode in EFER (Extended Feature Enable Register) */ + movl $MSR_EFER, %ecx + rdmsr + btsl $_EFER_LME, %eax + wrmsr + + /* After gdt is loaded */ + xorl %eax, %eax + lldt %ax + movl $0x20, %eax + ltr %ax + + /* + * Setup for the jump to 64bit mode + * + * When the jump is performed we will be in long mode but + * in 32bit compatibility mode with EFER.LME = 1, CS.L = 0, CS.D = 1 + * (and in turn EFER.LMA = 1). To jump into 64bit mode we use + * the new gdt/idt that has __KERNEL_CS with CS.L = 1. + * We place all of the values on our mini stack so lret can + * used to perform that far jump. See the gdt below. + */ + pop %esi /* setup_base */ + + pushl $0x10 + leal lret_target, %eax + pushl %eax + + /* Enter paged protected Mode, activating Long Mode */ + movl $(X86_CR0_PG | X86_CR0_PE), %eax + movl %eax, %cr0 + + /* Jump from 32bit compatibility mode into 64bit mode. */ + lret + +code64: +lret_target: + pop %eax /* target */ + mov %eax, %eax /* Clear bits 63:32 */ + jmp *%eax /* Jump to the 64-bit target */ + + .data +gdt: + .word gdt_end - gdt + .long gdt + .word 0 + .quad 0x0000000000000000 /* NULL descriptor */ + .quad 0x00af9a000000ffff /* __KERNEL_CS */ + .quad 0x00cf92000000ffff /* __KERNEL_DS */ + .quad 0x0080890000000000 /* TS descriptor */ + .quad 0x0000000000000000 /* TS continued */ +gdt_end: diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 623e3af61f..2e252532d6 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -18,7 +18,10 @@ #include <common.h> #include <command.h> +#include <errno.h> +#include <malloc.h> #include <asm/control_regs.h> +#include <asm/cpu.h> #include <asm/processor.h> #include <asm/processor-flags.h> #include <asm/interrupt.h> @@ -240,3 +243,144 @@ int icache_status(void) { return 1; } + +void cpu_enable_paging_pae(ulong cr3) +{ + __asm__ __volatile__( + /* Load the page table address */ + "movl %0, %%cr3\n" + /* Enable pae */ + "movl %%cr4, %%eax\n" + "orl $0x00000020, %%eax\n" + "movl %%eax, %%cr4\n" + /* Enable paging */ + "movl %%cr0, %%eax\n" + "orl $0x80000000, %%eax\n" + "movl %%eax, %%cr0\n" + : + : "r" (cr3) + : "eax"); +} + +void cpu_disable_paging_pae(void) +{ + /* Turn off paging */ + __asm__ __volatile__ ( + /* Disable paging */ + "movl %%cr0, %%eax\n" + "andl $0x7fffffff, %%eax\n" + "movl %%eax, %%cr0\n" + /* Disable pae */ + "movl %%cr4, %%eax\n" + "andl $0xffffffdf, %%eax\n" + "movl %%eax, %%cr4\n" + : + : + : "eax"); +} + +static bool has_cpuid(void) +{ + unsigned long flag; + + asm volatile("pushf\n" \ + "pop %%eax\n" + "mov %%eax, %%ecx\n" /* ecx = flags */ + "xor %1, %%eax\n" + "push %%eax\n" + "popf\n" /* flags ^= $2 */ + "pushf\n" + "pop %%eax\n" /* eax = flags */ + "push %%ecx\n" + "popf\n" /* flags = ecx */ + "xor %%ecx, %%eax\n" + "mov %%eax, %0" + : "=r" (flag) + : "i" (1 << 21) + : "eax", "ecx", "memory"); + + return flag != 0; +} + +static bool can_detect_long_mode(void) +{ + unsigned long flag; + + asm volatile("mov $0x80000000, %%eax\n" + "cpuid\n" + "mov %%eax, %0" + : "=r" (flag) + : + : "eax", "ebx", "ecx", "edx", "memory"); + + return flag > 0x80000000UL; +} + +static bool has_long_mode(void) +{ + unsigned long flag; + + asm volatile("mov $0x80000001, %%eax\n" + "cpuid\n" + "mov %%edx, %0" + : "=r" (flag) + : + : "eax", "ebx", "ecx", "edx", "memory"); + + return flag & (1 << 29) ? true : false; +} + +int cpu_has_64bit(void) +{ + return has_cpuid() && can_detect_long_mode() && + has_long_mode(); +} + +int print_cpuinfo(void) +{ + printf("CPU: %s\n", cpu_has_64bit() ? "x86_64" : "x86"); + + return 0; +} + +#define PAGETABLE_SIZE (6 * 4096) + +/** + * build_pagetable() - build a flat 4GiB page table structure for 64-bti mode + * + * @pgtable: Pointer to a 24iKB block of memory + */ +static void build_pagetable(uint32_t *pgtable) +{ + uint i; + + memset(pgtable, '\0', PAGETABLE_SIZE); + + /* Level 4 needs a single entry */ + pgtable[0] = (uint32_t)&pgtable[1024] + 7; + + /* Level 3 has one 64-bit entry for each GiB of memory */ + for (i = 0; i < 4; i++) { + pgtable[1024 + i * 2] = (uint32_t)&pgtable[2048] + + 0x1000 * i + 7; + } + + /* Level 2 has 2048 64-bit entries, each repesenting 2MiB */ + for (i = 0; i < 2048; i++) + pgtable[2048 + i * 2] = 0x183 + (i << 21UL); +} + +int cpu_jump_to_64bit(ulong setup_base, ulong target) +{ + uint32_t *pgtable; + + pgtable = memalign(4096, PAGETABLE_SIZE); + if (!pgtable) + return -ENOMEM; + + build_pagetable(pgtable); + cpu_call64((ulong)pgtable, setup_base, target); + free(pgtable); + + return -EFAULT; +} diff --git a/arch/x86/include/asm/bootm.h b/arch/x86/include/asm/bootm.h index 033ab79516..f6a64ce2c9 100644 --- a/arch/x86/include/asm/bootm.h +++ b/arch/x86/include/asm/bootm.h @@ -9,4 +9,20 @@ void bootm_announce_and_cleanup(void); +/** + * boot_linux_kernel() - boot a linux kernel + * + * This boots a kernel image, either 32-bit or 64-bit. It will also work with + * a self-extracting kernel, if you set @image_64bit to false. + * + * @setup_base: Pointer to the setup.bin information for the kernel + * @load_address: Pointer to the start of the kernel image + * @image_64bit: true if the image is a raw 64-bit kernel, false if it + * is raw 32-bit or any type of self-extracting kernel + * such as a bzImage. + * @return -ve error code. This function does not return if the kernel was + * booted successfully. + */ +int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit); + #endif diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h new file mode 100644 index 0000000000..6c6774af76 --- /dev/null +++ b/arch/x86/include/asm/cpu.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2014 The Chromium OS Authors. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __X86_CPU_H +#define __X86_CPU_H + + /** + * cpu_enable_paging_pae() - Enable PAE-paging + * + * @pdpt: Value to set in cr3 (PDPT or PML4T) + */ +void cpu_enable_paging_pae(ulong cr3); + +/** + * cpu_disable_paging_pae() - Disable paging and PAE + */ +void cpu_disable_paging_pae(void); + +/** + * cpu_has_64bit() - Check if the CPU has 64-bit support + * + * @return 1 if this CPU supports long mode (64-bit), 0 if not + */ +int cpu_has_64bit(void); + +/** + * cpu_call64() - Jump to a 64-bit Linux kernel (internal function) + * + * The kernel is uncompressed and the 64-bit entry point is expected to be + * at @target. + * + * This function is used internally - see cpu_jump_to_64bit() for a more + * useful function. + * + * @pgtable: Address of 24KB area containing the page table + * @setup_base: Pointer to the setup.bin information for the kernel + * @target: Pointer to the start of the kernel image + */ +void cpu_call64(ulong pgtable, ulong setup_base, ulong target); + +/** + * cpu_jump_to_64bit() - Jump to a 64-bit Linux kernel + * + * The kernel is uncompressed and the 64-bit entry point is expected to be + * at @target. + * + * @setup_base: Pointer to the setup.bin information for the kernel + * @target: Pointer to the start of the kernel image + */ +int cpu_jump_to_64bit(ulong setup_base, ulong target); + +#endif diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 0a36e178f5..6027d593ff 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -44,12 +44,16 @@ #define MSR_IA32_PERFCTR0 0x000000c1 #define MSR_IA32_PERFCTR1 0x000000c2 #define MSR_FSB_FREQ 0x000000cd +#define MSR_NHM_PLATFORM_INFO 0x000000ce #define MSR_NHM_SNB_PKG_CST_CFG_CTL 0x000000e2 #define NHM_C3_AUTO_DEMOTE (1UL << 25) #define NHM_C1_AUTO_DEMOTE (1UL << 26) #define ATM_LNC_C6_AUTO_DEMOTE (1UL << 25) +#define SNB_C1_AUTO_UNDEMOTE (1UL << 27) +#define SNB_C3_AUTO_UNDEMOTE (1UL << 28) +#define MSR_PLATFORM_INFO 0x000000ce #define MSR_MTRRcap 0x000000fe #define MSR_IA32_BBL_CR_CTL 0x00000119 #define MSR_IA32_BBL_CR_CTL3 0x0000011e @@ -64,10 +68,20 @@ #define MSR_OFFCORE_RSP_0 0x000001a6 #define MSR_OFFCORE_RSP_1 0x000001a7 +#define MSR_NHM_TURBO_RATIO_LIMIT 0x000001ad +#define MSR_IVT_TURBO_RATIO_LIMIT 0x000001ae + +#define MSR_LBR_SELECT 0x000001c8 +#define MSR_LBR_TOS 0x000001c9 +#define MSR_LBR_NHM_FROM 0x00000680 +#define MSR_LBR_NHM_TO 0x000006c0 +#define MSR_LBR_CORE_FROM 0x00000040 +#define MSR_LBR_CORE_TO 0x00000060 #define MSR_IA32_PEBS_ENABLE 0x000003f1 #define MSR_IA32_DS_AREA 0x00000600 #define MSR_IA32_PERF_CAPABILITIES 0x00000345 +#define MSR_PEBS_LD_LAT_THRESHOLD 0x000003f6 #define MSR_MTRRfix64K_00000 0x00000250 #define MSR_MTRRfix16K_80000 0x00000258 @@ -91,7 +105,8 @@ #define MSR_IA32_LASTINTTOIP 0x000001de /* DEBUGCTLMSR bits (others vary by model): */ -#define DEBUGCTLMSR_LBR (1UL << 0) +#define DEBUGCTLMSR_LBR (1UL << 0) /* last branch recording */ +/* single-step on branches */ #define DEBUGCTLMSR_BTF (1UL << 1) #define DEBUGCTLMSR_TR (1UL << 6) #define DEBUGCTLMSR_BTS (1UL << 7) @@ -100,11 +115,50 @@ #define DEBUGCTLMSR_BTS_OFF_USR (1UL << 10) #define DEBUGCTLMSR_FREEZE_LBRS_ON_PMI (1UL << 11) +#define MSR_IA32_POWER_CTL 0x000001fc + #define MSR_IA32_MC0_CTL 0x00000400 #define MSR_IA32_MC0_STATUS 0x00000401 #define MSR_IA32_MC0_ADDR 0x00000402 #define MSR_IA32_MC0_MISC 0x00000403 +/* C-state Residency Counters */ +#define MSR_PKG_C3_RESIDENCY 0x000003f8 +#define MSR_PKG_C6_RESIDENCY 0x000003f9 +#define MSR_PKG_C7_RESIDENCY 0x000003fa +#define MSR_CORE_C3_RESIDENCY 0x000003fc +#define MSR_CORE_C6_RESIDENCY 0x000003fd +#define MSR_CORE_C7_RESIDENCY 0x000003fe +#define MSR_PKG_C2_RESIDENCY 0x0000060d +#define MSR_PKG_C8_RESIDENCY 0x00000630 +#define MSR_PKG_C9_RESIDENCY 0x00000631 +#define MSR_PKG_C10_RESIDENCY 0x00000632 + +/* Run Time Average Power Limiting (RAPL) Interface */ + +#define MSR_RAPL_POWER_UNIT 0x00000606 + +#define MSR_PKG_POWER_LIMIT 0x00000610 +#define MSR_PKG_ENERGY_STATUS 0x00000611 +#define MSR_PKG_PERF_STATUS 0x00000613 +#define MSR_PKG_POWER_INFO 0x00000614 + +#define MSR_DRAM_POWER_LIMIT 0x00000618 +#define MSR_DRAM_ENERGY_STATUS 0x00000619 +#define MSR_DRAM_PERF_STATUS 0x0000061b +#define MSR_DRAM_POWER_INFO 0x0000061c + +#define MSR_PP0_POWER_LIMIT 0x00000638 +#define MSR_PP0_ENERGY_STATUS 0x00000639 +#define MSR_PP0_POLICY 0x0000063a +#define MSR_PP0_PERF_STATUS 0x0000063b + +#define MSR_PP1_POWER_LIMIT 0x00000640 +#define MSR_PP1_ENERGY_STATUS 0x00000641 +#define MSR_PP1_POLICY 0x00000642 + +#define MSR_CORE_C1_RES 0x00000660 + #define MSR_AMD64_MC0_MASK 0xc0010044 #define MSR_IA32_MCx_CTL(x) (MSR_IA32_MC0_CTL + 4*(x)) @@ -123,18 +177,31 @@ #define MSR_P6_EVNTSEL0 0x00000186 #define MSR_P6_EVNTSEL1 0x00000187 +#define MSR_KNC_PERFCTR0 0x00000020 +#define MSR_KNC_PERFCTR1 0x00000021 +#define MSR_KNC_EVNTSEL0 0x00000028 +#define MSR_KNC_EVNTSEL1 0x00000029 + +/* Alternative perfctr range with full access. */ +#define MSR_IA32_PMC0 0x000004c1 + /* AMD64 MSRs. Not complete. See the architecture manual for a more complete list. */ #define MSR_AMD64_PATCH_LEVEL 0x0000008b +#define MSR_AMD64_TSC_RATIO 0xc0000104 #define MSR_AMD64_NB_CFG 0xc001001f #define MSR_AMD64_PATCH_LOADER 0xc0010020 #define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140 #define MSR_AMD64_OSVW_STATUS 0xc0010141 +#define MSR_AMD64_LS_CFG 0xc0011020 #define MSR_AMD64_DC_CFG 0xc0011022 +#define MSR_AMD64_BU_CFG2 0xc001102a #define MSR_AMD64_IBSFETCHCTL 0xc0011030 #define MSR_AMD64_IBSFETCHLINAD 0xc0011031 #define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032 +#define MSR_AMD64_IBSFETCH_REG_COUNT 3 +#define MSR_AMD64_IBSFETCH_REG_MASK ((1UL<<MSR_AMD64_IBSFETCH_REG_COUNT)-1) #define MSR_AMD64_IBSOPCTL 0xc0011033 #define MSR_AMD64_IBSOPRIP 0xc0011034 #define MSR_AMD64_IBSOPDATA 0xc0011035 @@ -142,12 +209,21 @@ #define MSR_AMD64_IBSOPDATA3 0xc0011037 #define MSR_AMD64_IBSDCLINAD 0xc0011038 #define MSR_AMD64_IBSDCPHYSAD 0xc0011039 +#define MSR_AMD64_IBSOP_REG_COUNT 7 +#define MSR_AMD64_IBSOP_REG_MASK ((1UL<<MSR_AMD64_IBSOP_REG_COUNT)-1) #define MSR_AMD64_IBSCTL 0xc001103a #define MSR_AMD64_IBSBRTARGET 0xc001103b +#define MSR_AMD64_IBS_REG_COUNT_MAX 8 /* includes MSR_AMD64_IBSBRTARGET */ + +/* Fam 16h MSRs */ +#define MSR_F16H_L2I_PERF_CTL 0xc0010230 +#define MSR_F16H_L2I_PERF_CTR 0xc0010231 /* Fam 15h MSRs */ #define MSR_F15H_PERF_CTL 0xc0010200 #define MSR_F15H_PERF_CTR 0xc0010201 +#define MSR_F15H_NB_PERF_CTL 0xc0010240 +#define MSR_F15H_NB_PERF_CTR 0xc0010241 /* Fam 10h MSRs */ #define MSR_FAM10H_MMIO_CONF_BASE 0xc0010058 @@ -226,7 +302,9 @@ #define MSR_IA32_PLATFORM_ID 0x00000017 #define MSR_IA32_EBL_CR_POWERON 0x0000002a #define MSR_EBC_FREQUENCY_ID 0x0000002c +#define MSR_SMI_COUNT 0x00000034 #define MSR_IA32_FEATURE_CONTROL 0x0000003a +#define MSR_IA32_TSC_ADJUST 0x0000003b #define FEATURE_CONTROL_LOCKED (1<<0) #define FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX (1<<1) @@ -237,11 +315,16 @@ #define MSR_IA32_APICBASE_ENABLE (1<<11) #define MSR_IA32_APICBASE_BASE (0xfffff<<12) +#define MSR_IA32_TSCDEADLINE 0x000006e0 + #define MSR_IA32_UCODE_WRITE 0x00000079 #define MSR_IA32_UCODE_REV 0x0000008b #define MSR_IA32_PERF_STATUS 0x00000198 #define MSR_IA32_PERF_CTL 0x00000199 +#define MSR_AMD_PSTATE_DEF_BASE 0xc0010064 +#define MSR_AMD_PERF_STATUS 0xc0010063 +#define MSR_AMD_PERF_CTL 0xc0010062 #define MSR_IA32_MPERF 0x000000e7 #define MSR_IA32_APERF 0x000000e8 @@ -267,6 +350,9 @@ #define MSR_IA32_TEMPERATURE_TARGET 0x000001a2 #define MSR_IA32_ENERGY_PERF_BIAS 0x000001b0 +#define ENERGY_PERF_BIAS_PERFORMANCE 0 +#define ENERGY_PERF_BIAS_NORMAL 6 +#define ENERGY_PERF_BIAS_POWERSAVE 15 #define MSR_IA32_PACKAGE_THERM_STATUS 0x000001b1 @@ -320,6 +406,8 @@ #define MSR_IA32_MISC_ENABLE_TURBO_DISABLE (1ULL << 38) #define MSR_IA32_MISC_ENABLE_IP_PREF_DISABLE (1ULL << 39) +#define MSR_IA32_TSC_DEADLINE 0x000006E0 + /* P4/Xeon+ specific */ #define MSR_IA32_MCG_EAX 0x00000180 #define MSR_IA32_MCG_EBX 0x00000181 @@ -446,7 +534,23 @@ #define MSR_IA32_VMX_VMCS_ENUM 0x0000048a #define MSR_IA32_VMX_PROCBASED_CTLS2 0x0000048b #define MSR_IA32_VMX_EPT_VPID_CAP 0x0000048c - +#define MSR_IA32_VMX_TRUE_PINBASED_CTLS 0x0000048d +#define MSR_IA32_VMX_TRUE_PROCBASED_CTLS 0x0000048e +#define MSR_IA32_VMX_TRUE_EXIT_CTLS 0x0000048f +#define MSR_IA32_VMX_TRUE_ENTRY_CTLS 0x00000490 +#define MSR_IA32_VMX_VMFUNC 0x00000491 + +/* VMX_BASIC bits and bitmasks */ +#define VMX_BASIC_VMCS_SIZE_SHIFT 32 +#define VMX_BASIC_64 0x0001000000000000LLU +#define VMX_BASIC_MEM_TYPE_SHIFT 50 +#define VMX_BASIC_MEM_TYPE_MASK 0x003c000000000000LLU +#define VMX_BASIC_MEM_TYPE_WB 6LLU +#define VMX_BASIC_INOUT 0x0040000000000000LLU + +/* MSR_IA32_VMX_MISC bits */ +#define MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS (1ULL << 29) +#define MSR_IA32_VMX_MISC_PREEMPTION_TIMER_SCALE 0x1F /* AMD-V MSRs */ #define MSR_VM_CR 0xc0010114 diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h index 0f36662688..8e7dd424ca 100644 --- a/arch/x86/include/asm/zimage.h +++ b/arch/x86/include/asm/zimage.h @@ -35,10 +35,8 @@ unsigned install_e820_map(unsigned max_entries, struct e820entry *); struct boot_params *load_zimage(char *image, unsigned long kernel_size, - void **load_address); + ulong *load_addressp); int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, unsigned long initrd_addr, unsigned long initrd_size); -void boot_zimage(void *setup_base, void *load_address); - #endif diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 4c5c7f5aa7..86030cf52a 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -10,10 +10,12 @@ #include <common.h> #include <command.h> +#include <errno.h> #include <fdt_support.h> #include <image.h> #include <u-boot/zlib.h> #include <asm/bootparam.h> +#include <asm/cpu.h> #include <asm/byteorder.h> #include <asm/zimage.h> #ifdef CONFIG_SYS_COREBOOT @@ -109,17 +111,17 @@ static int boot_prep_linux(bootm_headers_t *images) } if (is_zimage) { - void *load_address; + ulong load_address; char *base_ptr; base_ptr = (char *)load_zimage(data, len, &load_address); - images->os.load = (ulong)load_address; + images->os.load = load_address; cmd_line_dest = base_ptr + COMMAND_LINE_OFFSET; images->ep = (ulong)base_ptr; } else if (images->ep) { cmd_line_dest = (void *)images->ep + COMMAND_LINE_OFFSET; } else { - printf("## Kernel loading failed (no setup) ...\n"); + printf("## Kernel loading failed (missing x86 kernel setup) ...\n"); goto error; } @@ -139,16 +141,50 @@ error: return 1; } +int boot_linux_kernel(ulong setup_base, ulong load_address, bool image_64bit) +{ + bootm_announce_and_cleanup(); + +#ifdef CONFIG_SYS_COREBOOT + timestamp_add_now(TS_U_BOOT_START_KERNEL); +#endif + if (image_64bit) { + if (!cpu_has_64bit()) { + puts("Cannot boot 64-bit kernel on 32-bit machine\n"); + return -EFAULT; + } + return cpu_jump_to_64bit(setup_base, load_address); + } else { + /* + * Set %ebx, %ebp, and %edi to 0, %esi to point to the + * boot_params structure, and then jump to the kernel. We + * assume that %cs is 0x10, 4GB flat, and read/execute, and + * the data segments are 0x18, 4GB flat, and read/write. + * U-boot is setting them up that way for itself in + * arch/i386/cpu/cpu.c. + */ + __asm__ __volatile__ ( + "movl $0, %%ebp\n" + "cli\n" + "jmp *%[kernel_entry]\n" + :: [kernel_entry]"a"(load_address), + [boot_params] "S"(setup_base), + "b"(0), "D"(0) + ); + } + + /* We can't get to here */ + return -EFAULT; +} + /* Subcommand: GO */ static int boot_jump_linux(bootm_headers_t *images) { debug("## Transferring control to Linux (at address %08lx, kernel %08lx) ...\n", images->ep, images->os.load); - boot_zimage((struct boot_params *)images->ep, (void *)images->os.load); - /* does not return */ - - return 1; + return boot_linux_kernel(images->ep, images->os.load, + images->os.arch == IH_ARCH_X86_64); } int do_bootm_linux(int flag, int argc, char * const argv[], @@ -161,10 +197,8 @@ int do_bootm_linux(int flag, int argc, char * const argv[], if (flag & BOOTM_STATE_OS_PREP) return boot_prep_linux(images); - if (flag & BOOTM_STATE_OS_GO) { - boot_jump_linux(images); - return 0; - } + if (flag & BOOTM_STATE_OS_GO) + return boot_jump_linux(images); return boot_jump_linux(images); } diff --git a/arch/x86/lib/physmem.c b/arch/x86/lib/physmem.c index b57b2c30fe..c3c709ec07 100644 --- a/arch/x86/lib/physmem.c +++ b/arch/x86/lib/physmem.c @@ -10,6 +10,7 @@ #include <common.h> #include <physmem.h> +#include <asm/cpu.h> #include <linux/compiler.h> DECLARE_GLOBAL_DATA_PTR; @@ -112,41 +113,13 @@ static void x86_phys_enter_paging(void) x86_phys_map_page(page_addr, page_addr, 0); } - /* Turn on paging */ - __asm__ __volatile__( - /* Load the page table address */ - "movl %0, %%cr3\n\t" - /* Enable pae */ - "movl %%cr4, %%eax\n\t" - "orl $0x00000020, %%eax\n\t" - "movl %%eax, %%cr4\n\t" - /* Enable paging */ - "movl %%cr0, %%eax\n\t" - "orl $0x80000000, %%eax\n\t" - "movl %%eax, %%cr0\n\t" - : - : "r" (pdpt) - : "eax" - ); + cpu_enable_paging_pae((ulong)pdpt); } /* Disable paging and PAE mode. */ static void x86_phys_exit_paging(void) { - /* Turn off paging */ - __asm__ __volatile__ ( - /* Disable paging */ - "movl %%cr0, %%eax\n\t" - "andl $0x7fffffff, %%eax\n\t" - "movl %%eax, %%cr0\n\t" - /* Disable pae */ - "movl %%cr4, %%eax\n\t" - "andl $0xffffffdf, %%eax\n\t" - "movl %%eax, %%cr4\n\t" - : - : - : "eax" - ); + cpu_disable_paging_pae(); } /* diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index b1902834e8..566b048c88 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -103,7 +103,7 @@ static int get_boot_protocol(struct setup_header *hdr) } struct boot_params *load_zimage(char *image, unsigned long kernel_size, - void **load_address) + ulong *load_addressp) { struct boot_params *setup_base; int setup_size; @@ -155,9 +155,9 @@ struct boot_params *load_zimage(char *image, unsigned long kernel_size, /* Determine load address */ if (big_image) - *load_address = (void *)BZIMAGE_LOAD_ADDR; + *load_addressp = BZIMAGE_LOAD_ADDR; else - *load_address = (void *)ZIMAGE_LOAD_ADDR; + *load_addressp = ZIMAGE_LOAD_ADDR; printf("Building boot_params at 0x%8.8lx\n", (ulong)setup_base); memset(setup_base, 0, sizeof(*setup_base)); @@ -204,10 +204,10 @@ struct boot_params *load_zimage(char *image, unsigned long kernel_size, return 0; } - printf("Loading %s at address %p (%ld bytes)\n", - big_image ? "bzImage" : "zImage", *load_address, kernel_size); + printf("Loading %s at address %lx (%ld bytes)\n", + big_image ? "bzImage" : "zImage", *load_addressp, kernel_size); - memmove(*load_address, image + setup_size, kernel_size); + memmove((void *)*load_addressp, image + setup_size, kernel_size); return setup_base; } @@ -261,30 +261,6 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, return 0; } -void boot_zimage(void *setup_base, void *load_address) -{ - bootm_announce_and_cleanup(); - -#ifdef CONFIG_SYS_COREBOOT - timestamp_add_now(TS_U_BOOT_START_KERNEL); -#endif - /* - * Set %ebx, %ebp, and %edi to 0, %esi to point to the boot_params - * structure, and then jump to the kernel. We assume that %cs is - * 0x10, 4GB flat, and read/execute, and the data segments are 0x18, - * 4GB flat, and read/write. U-boot is setting them up that way for - * itself in arch/i386/cpu/cpu.c. - */ - __asm__ __volatile__ ( - "movl $0, %%ebp\n" - "cli\n" - "jmp *%[kernel_entry]\n" - :: [kernel_entry]"a"(load_address), - [boot_params] "S"(setup_base), - "b"(0), "D"(0) - ); -} - void setup_pcat_compatibility(void) __attribute__((weak, alias("__setup_pcat_compatibility"))); @@ -296,7 +272,7 @@ int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) { struct boot_params *base_ptr; void *bzImage_addr = NULL; - void *load_address; + ulong load_address; char *s; ulong bzImage_size = 0; ulong initrd_addr = 0; @@ -331,20 +307,17 @@ int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) base_ptr = load_zimage(bzImage_addr, bzImage_size, &load_address); if (!base_ptr) { - printf("## Kernel loading failed ...\n"); + puts("## Kernel loading failed ...\n"); return -1; } if (setup_zimage(base_ptr, (char *)base_ptr + COMMAND_LINE_OFFSET, 0, initrd_addr, initrd_size)) { - printf("Setting up boot parameters failed ...\n"); + puts("Setting up boot parameters failed ...\n"); return -1; } /* we assume that the kernel is in place */ - boot_zimage(base_ptr, load_address); - /* does not return */ - - return -1; + return boot_linux_kernel((ulong)base_ptr, load_address, false); } U_BOOT_CMD( diff --git a/board/BuR/kwb/Kconfig b/board/BuR/kwb/Kconfig index f9107a9a4b..4beefbf771 100644 --- a/board/BuR/kwb/Kconfig +++ b/board/BuR/kwb/Kconfig @@ -1,8 +1,5 @@ if TARGET_KWB -config SYS_CPU - default "armv7" - config SYS_BOARD default "kwb" diff --git a/board/BuR/tseries/Kconfig b/board/BuR/tseries/Kconfig index ee510d3480..ed48300c0a 100644 --- a/board/BuR/tseries/Kconfig +++ b/board/BuR/tseries/Kconfig @@ -1,8 +1,5 @@ if TARGET_TSERIES -config SYS_CPU - default "armv7" - config SYS_BOARD default "tseries" diff --git a/board/BuS/eb_cpux9k2/Kconfig b/board/BuS/eb_cpux9k2/Kconfig index 85d335a0e5..230e64d8fc 100644 --- a/board/BuS/eb_cpux9k2/Kconfig +++ b/board/BuS/eb_cpux9k2/Kconfig @@ -1,8 +1,5 @@ if TARGET_EB_CPUX9K2 -config SYS_CPU - default "arm920t" - config SYS_BOARD default "eb_cpux9k2" diff --git a/board/BuS/vl_ma2sc/Kconfig b/board/BuS/vl_ma2sc/Kconfig index bb6a7e787d..2f43519089 100644 --- a/board/BuS/vl_ma2sc/Kconfig +++ b/board/BuS/vl_ma2sc/Kconfig @@ -1,8 +1,5 @@ if TARGET_VL_MA2SC -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "vl_ma2sc" diff --git a/board/CarMediaLab/flea3/Kconfig b/board/CarMediaLab/flea3/Kconfig index 1448703dc1..7113f2b51f 100644 --- a/board/CarMediaLab/flea3/Kconfig +++ b/board/CarMediaLab/flea3/Kconfig @@ -1,8 +1,5 @@ if TARGET_FLEA3 -config SYS_CPU - default "arm1136" - config SYS_BOARD default "flea3" diff --git a/board/Marvell/aspenite/Kconfig b/board/Marvell/aspenite/Kconfig index ee2ec06f1e..4dd49c4452 100644 --- a/board/Marvell/aspenite/Kconfig +++ b/board/Marvell/aspenite/Kconfig @@ -1,8 +1,5 @@ if TARGET_ASPENITE -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "aspenite" diff --git a/board/Marvell/dkb/Kconfig b/board/Marvell/dkb/Kconfig index 33d5157bc3..f6748941c6 100644 --- a/board/Marvell/dkb/Kconfig +++ b/board/Marvell/dkb/Kconfig @@ -1,8 +1,5 @@ if TARGET_DKB -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "dkb" diff --git a/board/Marvell/gplugd/Kconfig b/board/Marvell/gplugd/Kconfig index 102c18d30d..d944816509 100644 --- a/board/Marvell/gplugd/Kconfig +++ b/board/Marvell/gplugd/Kconfig @@ -1,8 +1,5 @@ if TARGET_GPLUGD -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "gplugd" diff --git a/board/afeb9260/Kconfig b/board/afeb9260/Kconfig index ff191811ba..6a5a93139d 100644 --- a/board/afeb9260/Kconfig +++ b/board/afeb9260/Kconfig @@ -1,8 +1,5 @@ if TARGET_AFEB9260 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "afeb9260" diff --git a/board/altera/socfpga/Kconfig b/board/altera/socfpga/Kconfig index f8595781d9..fc42185a83 100644 --- a/board/altera/socfpga/Kconfig +++ b/board/altera/socfpga/Kconfig @@ -1,8 +1,5 @@ if TARGET_SOCFPGA_CYCLONE5 -config SYS_CPU - default "armv7" - config SYS_BOARD default "socfpga" diff --git a/board/aristainetos/Kconfig b/board/aristainetos/Kconfig index ac35d6de6f..b8e380eb84 100644 --- a/board/aristainetos/Kconfig +++ b/board/aristainetos/Kconfig @@ -1,8 +1,5 @@ if TARGET_ARISTAINETOS -config SYS_CPU - default "armv7" - config SYS_BOARD default "aristainetos" diff --git a/board/armadeus/apf27/Kconfig b/board/armadeus/apf27/Kconfig index 53532bba58..65544a8448 100644 --- a/board/armadeus/apf27/Kconfig +++ b/board/armadeus/apf27/Kconfig @@ -1,8 +1,5 @@ if TARGET_APF27 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "apf27" diff --git a/board/armltd/integrator/Kconfig b/board/armltd/integrator/Kconfig index 49553131b9..6153b5dd7d 100644 --- a/board/armltd/integrator/Kconfig +++ b/board/armltd/integrator/Kconfig @@ -1,8 +1,5 @@ if TARGET_INTEGRATORAP_CM720T -config SYS_CPU - default "arm720t" - config SYS_BOARD default "integrator" @@ -16,9 +13,6 @@ endif if TARGET_INTEGRATORAP_CM920T -config SYS_CPU - default "arm920t" - config SYS_BOARD default "integrator" @@ -32,9 +26,6 @@ endif if TARGET_INTEGRATORCP_CM920T -config SYS_CPU - default "arm920t" - config SYS_BOARD default "integrator" @@ -48,9 +39,6 @@ endif if TARGET_INTEGRATORAP_CM926EJS -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "integrator" @@ -64,9 +52,6 @@ endif if TARGET_INTEGRATORCP_CM926EJS -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "integrator" @@ -80,9 +65,6 @@ endif if TARGET_INTEGRATORCP_CM1136 -config SYS_CPU - default "arm1136" - config SYS_BOARD default "integrator" @@ -96,9 +78,6 @@ endif if TARGET_INTEGRATORAP_CM946ES -config SYS_CPU - default "arm946es" - config SYS_BOARD default "integrator" @@ -112,9 +91,6 @@ endif if TARGET_INTEGRATORCP_CM946ES -config SYS_CPU - default "arm946es" - config SYS_BOARD default "integrator" diff --git a/board/armltd/vexpress/Kconfig b/board/armltd/vexpress/Kconfig index 7fa30c65f9..2e15e0d497 100644 --- a/board/armltd/vexpress/Kconfig +++ b/board/armltd/vexpress/Kconfig @@ -1,8 +1,5 @@ if TARGET_VEXPRESS_CA15_TC2 -config SYS_CPU - default "armv7" - config SYS_BOARD default "vexpress" @@ -16,9 +13,6 @@ endif if TARGET_VEXPRESS_CA5X2 -config SYS_CPU - default "armv7" - config SYS_BOARD default "vexpress" @@ -32,9 +26,6 @@ endif if TARGET_VEXPRESS_CA9X4 -config SYS_CPU - default "armv7" - config SYS_BOARD default "vexpress" diff --git a/board/atmel/at91rm9200ek/Kconfig b/board/atmel/at91rm9200ek/Kconfig index 61db2e2d40..bad4a37da0 100644 --- a/board/atmel/at91rm9200ek/Kconfig +++ b/board/atmel/at91rm9200ek/Kconfig @@ -1,8 +1,5 @@ if TARGET_AT91RM9200EK -config SYS_CPU - default "arm920t" - config SYS_BOARD default "at91rm9200ek" diff --git a/board/atmel/at91sam9260ek/Kconfig b/board/atmel/at91sam9260ek/Kconfig index 24a645bc94..fe00ed5e60 100644 --- a/board/atmel/at91sam9260ek/Kconfig +++ b/board/atmel/at91sam9260ek/Kconfig @@ -1,8 +1,5 @@ if TARGET_AT91SAM9260EK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "at91sam9260ek" diff --git a/board/atmel/at91sam9261ek/Kconfig b/board/atmel/at91sam9261ek/Kconfig index 301bf1a61c..d839c1a632 100644 --- a/board/atmel/at91sam9261ek/Kconfig +++ b/board/atmel/at91sam9261ek/Kconfig @@ -1,8 +1,5 @@ if TARGET_AT91SAM9261EK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "at91sam9261ek" diff --git a/board/atmel/at91sam9263ek/Kconfig b/board/atmel/at91sam9263ek/Kconfig index f8e2b48149..311c504da2 100644 --- a/board/atmel/at91sam9263ek/Kconfig +++ b/board/atmel/at91sam9263ek/Kconfig @@ -1,8 +1,5 @@ if TARGET_AT91SAM9263EK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "at91sam9263ek" diff --git a/board/atmel/at91sam9m10g45ek/Kconfig b/board/atmel/at91sam9m10g45ek/Kconfig index d2e191c141..1bc086a483 100644 --- a/board/atmel/at91sam9m10g45ek/Kconfig +++ b/board/atmel/at91sam9m10g45ek/Kconfig @@ -1,8 +1,5 @@ if TARGET_AT91SAM9M10G45EK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "at91sam9m10g45ek" diff --git a/board/atmel/at91sam9n12ek/Kconfig b/board/atmel/at91sam9n12ek/Kconfig index 845cd36442..cf1d1a3670 100644 --- a/board/atmel/at91sam9n12ek/Kconfig +++ b/board/atmel/at91sam9n12ek/Kconfig @@ -1,8 +1,5 @@ if TARGET_AT91SAM9N12EK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "at91sam9n12ek" diff --git a/board/atmel/at91sam9rlek/Kconfig b/board/atmel/at91sam9rlek/Kconfig index 517f22a8a9..438d300421 100644 --- a/board/atmel/at91sam9rlek/Kconfig +++ b/board/atmel/at91sam9rlek/Kconfig @@ -1,8 +1,5 @@ if TARGET_AT91SAM9RLEK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "at91sam9rlek" diff --git a/board/atmel/at91sam9x5ek/Kconfig b/board/atmel/at91sam9x5ek/Kconfig index d236b1ad66..5c5ec61577 100644 --- a/board/atmel/at91sam9x5ek/Kconfig +++ b/board/atmel/at91sam9x5ek/Kconfig @@ -1,8 +1,5 @@ if TARGET_AT91SAM9X5EK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "at91sam9x5ek" diff --git a/board/atmel/sama5d3_xplained/Kconfig b/board/atmel/sama5d3_xplained/Kconfig index 0ca1ec006a..0ba8a7bf93 100644 --- a/board/atmel/sama5d3_xplained/Kconfig +++ b/board/atmel/sama5d3_xplained/Kconfig @@ -1,8 +1,5 @@ if TARGET_SAMA5D3_XPLAINED -config SYS_CPU - default "armv7" - config SYS_BOARD default "sama5d3_xplained" diff --git a/board/atmel/sama5d3xek/Kconfig b/board/atmel/sama5d3xek/Kconfig index f0dd04a06e..2a9ed23ecf 100644 --- a/board/atmel/sama5d3xek/Kconfig +++ b/board/atmel/sama5d3xek/Kconfig @@ -1,8 +1,5 @@ if TARGET_SAMA5D3XEK -config SYS_CPU - default "armv7" - config SYS_BOARD default "sama5d3xek" diff --git a/board/bachmann/ot1200/Kconfig b/board/bachmann/ot1200/Kconfig index 6cf2573221..7f8a6a1abc 100644 --- a/board/bachmann/ot1200/Kconfig +++ b/board/bachmann/ot1200/Kconfig @@ -1,8 +1,5 @@ if TARGET_OT1200 -config SYS_CPU - default "armv7" - config SYS_BOARD default "ot1200" diff --git a/board/balloon3/Kconfig b/board/balloon3/Kconfig index fb1cf3f0ef..53b7a9a5c7 100644 --- a/board/balloon3/Kconfig +++ b/board/balloon3/Kconfig @@ -1,8 +1,5 @@ if TARGET_BALLOON3 -config SYS_CPU - default "pxa" - config SYS_BOARD default "balloon3" diff --git a/board/barco/titanium/Kconfig b/board/barco/titanium/Kconfig index 56ed7d670b..b6f7c855b5 100644 --- a/board/barco/titanium/Kconfig +++ b/board/barco/titanium/Kconfig @@ -1,8 +1,5 @@ if TARGET_TITANIUM -config SYS_CPU - default "armv7" - config SYS_BOARD default "titanium" diff --git a/board/bluegiga/apx4devkit/Kconfig b/board/bluegiga/apx4devkit/Kconfig index 7d1534a647..f327fa15cf 100644 --- a/board/bluegiga/apx4devkit/Kconfig +++ b/board/bluegiga/apx4devkit/Kconfig @@ -1,8 +1,5 @@ if TARGET_APX4DEVKIT -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "apx4devkit" diff --git a/board/bluewater/snapper9260/Kconfig b/board/bluewater/snapper9260/Kconfig index 1c8f78dee2..c896c46895 100644 --- a/board/bluewater/snapper9260/Kconfig +++ b/board/bluewater/snapper9260/Kconfig @@ -1,8 +1,5 @@ if TARGET_SNAPPER9260 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "snapper9260" diff --git a/board/boundary/nitrogen6x/Kconfig b/board/boundary/nitrogen6x/Kconfig index 298c9fdb8c..03b0f6f278 100644 --- a/board/boundary/nitrogen6x/Kconfig +++ b/board/boundary/nitrogen6x/Kconfig @@ -1,8 +1,5 @@ if TARGET_NITROGEN6X -config SYS_CPU - default "armv7" - config SYS_BOARD default "nitrogen6x" diff --git a/board/broadcom/bcm28155_ap/Kconfig b/board/broadcom/bcm28155_ap/Kconfig index 2e779f0174..f1b4e08941 100644 --- a/board/broadcom/bcm28155_ap/Kconfig +++ b/board/broadcom/bcm28155_ap/Kconfig @@ -1,8 +1,5 @@ if TARGET_BCM28155_AP -config SYS_CPU - default "armv7" - config SYS_BOARD default "bcm28155_ap" diff --git a/board/broadcom/bcm958300k/Kconfig b/board/broadcom/bcm958300k/Kconfig index d627a3885f..92892881af 100644 --- a/board/broadcom/bcm958300k/Kconfig +++ b/board/broadcom/bcm958300k/Kconfig @@ -1,8 +1,5 @@ if TARGET_BCM958300K -config SYS_CPU - default "armv7" - config SYS_BOARD default "bcm_ep" diff --git a/board/broadcom/bcm958622hr/Kconfig b/board/broadcom/bcm958622hr/Kconfig index 9038f5b0a3..861c55909b 100644 --- a/board/broadcom/bcm958622hr/Kconfig +++ b/board/broadcom/bcm958622hr/Kconfig @@ -1,8 +1,5 @@ if TARGET_BCM958622HR -config SYS_CPU - default "armv7" - config SYS_BOARD default "bcm_ep" diff --git a/board/calao/sbc35_a9g20/Kconfig b/board/calao/sbc35_a9g20/Kconfig index b2528dcd26..fb5a1a3f42 100644 --- a/board/calao/sbc35_a9g20/Kconfig +++ b/board/calao/sbc35_a9g20/Kconfig @@ -1,8 +1,5 @@ if TARGET_SBC35_A9G20 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "sbc35_a9g20" diff --git a/board/calao/tny_a9260/Kconfig b/board/calao/tny_a9260/Kconfig index 7fad578d5c..b1de8f8ba8 100644 --- a/board/calao/tny_a9260/Kconfig +++ b/board/calao/tny_a9260/Kconfig @@ -1,8 +1,5 @@ if TARGET_TNY_A9260 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "tny_a9260" diff --git a/board/calao/usb_a9263/Kconfig b/board/calao/usb_a9263/Kconfig index 4209b36136..7a159dc3ba 100644 --- a/board/calao/usb_a9263/Kconfig +++ b/board/calao/usb_a9263/Kconfig @@ -1,8 +1,5 @@ if TARGET_USB_A9263 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "usb_a9263" diff --git a/board/cirrus/edb93xx/Kconfig b/board/cirrus/edb93xx/Kconfig index f063d55708..c5f4897f8a 100644 --- a/board/cirrus/edb93xx/Kconfig +++ b/board/cirrus/edb93xx/Kconfig @@ -1,8 +1,5 @@ if TARGET_EDB93XX -config SYS_CPU - default "arm920t" - config SYS_BOARD default "edb93xx" diff --git a/board/cm4008/Kconfig b/board/cm4008/Kconfig index a7f3b2f812..de87d5bc12 100644 --- a/board/cm4008/Kconfig +++ b/board/cm4008/Kconfig @@ -1,8 +1,5 @@ if TARGET_CM4008 -config SYS_CPU - default "arm920t" - config SYS_BOARD default "cm4008" diff --git a/board/cm41xx/Kconfig b/board/cm41xx/Kconfig index b537e2674c..99e675b12d 100644 --- a/board/cm41xx/Kconfig +++ b/board/cm41xx/Kconfig @@ -1,8 +1,5 @@ if TARGET_CM41XX -config SYS_CPU - default "arm920t" - config SYS_BOARD default "cm41xx" diff --git a/board/compulab/cm_fx6/Kconfig b/board/compulab/cm_fx6/Kconfig index 42a84380f2..508c21f58b 100644 --- a/board/compulab/cm_fx6/Kconfig +++ b/board/compulab/cm_fx6/Kconfig @@ -1,23 +1,15 @@ if TARGET_CM_FX6 -config SYS_CPU - string - default "armv7" - config SYS_BOARD - string default "cm_fx6" config SYS_VENDOR - string default "compulab" config SYS_SOC - string default "mx6" config SYS_CONFIG_NAME - string default "cm_fx6" endif diff --git a/board/compulab/cm_t335/Kconfig b/board/compulab/cm_t335/Kconfig index 61159765ab..683efde764 100644 --- a/board/compulab/cm_t335/Kconfig +++ b/board/compulab/cm_t335/Kconfig @@ -1,8 +1,5 @@ if TARGET_CM_T335 -config SYS_CPU - default "armv7" - config SYS_BOARD default "cm_t335" diff --git a/board/congatec/cgtqmx6eval/Kconfig b/board/congatec/cgtqmx6eval/Kconfig index 0774784f78..0a837bde0e 100644 --- a/board/congatec/cgtqmx6eval/Kconfig +++ b/board/congatec/cgtqmx6eval/Kconfig @@ -1,8 +1,5 @@ if TARGET_CGTQMX6EVAL -config SYS_CPU - default "armv7" - config SYS_BOARD default "cgtqmx6eval" diff --git a/board/creative/xfi3/Kconfig b/board/creative/xfi3/Kconfig index 2255cc98bc..7b681cd81b 100644 --- a/board/creative/xfi3/Kconfig +++ b/board/creative/xfi3/Kconfig @@ -1,8 +1,5 @@ if TARGET_XFI3 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "xfi3" diff --git a/board/davedenx/qong/Kconfig b/board/davedenx/qong/Kconfig index 54cb4502f0..76cf343ded 100644 --- a/board/davedenx/qong/Kconfig +++ b/board/davedenx/qong/Kconfig @@ -1,8 +1,5 @@ if TARGET_QONG -config SYS_CPU - default "arm1136" - config SYS_BOARD default "qong" diff --git a/board/denx/m28evk/Kconfig b/board/denx/m28evk/Kconfig index b1c16c702b..dd4dc4d096 100644 --- a/board/denx/m28evk/Kconfig +++ b/board/denx/m28evk/Kconfig @@ -1,8 +1,5 @@ if TARGET_M28EVK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "m28evk" diff --git a/board/denx/m53evk/Kconfig b/board/denx/m53evk/Kconfig index 5dbb7f8d5f..0696ad7ffb 100644 --- a/board/denx/m53evk/Kconfig +++ b/board/denx/m53evk/Kconfig @@ -1,8 +1,5 @@ if TARGET_M53EVK -config SYS_CPU - default "armv7" - config SYS_BOARD default "m53evk" diff --git a/board/egnite/ethernut5/Kconfig b/board/egnite/ethernut5/Kconfig index 281e43a17f..c42c734f1f 100644 --- a/board/egnite/ethernut5/Kconfig +++ b/board/egnite/ethernut5/Kconfig @@ -1,8 +1,5 @@ if TARGET_ETHERNUT5 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "ethernut5" diff --git a/board/embest/mx6boards/Kconfig b/board/embest/mx6boards/Kconfig index 8e39fce6fe..53a39d31dd 100644 --- a/board/embest/mx6boards/Kconfig +++ b/board/embest/mx6boards/Kconfig @@ -1,8 +1,5 @@ if TARGET_EMBESTMX6BOARDS -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx6boards" diff --git a/board/esd/meesc/Kconfig b/board/esd/meesc/Kconfig index 7d5c3ca980..5041041dd2 100644 --- a/board/esd/meesc/Kconfig +++ b/board/esd/meesc/Kconfig @@ -1,8 +1,5 @@ if TARGET_MEESC -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "meesc" diff --git a/board/esd/otc570/Kconfig b/board/esd/otc570/Kconfig index 7c5ce90a7d..55a2f70f40 100644 --- a/board/esd/otc570/Kconfig +++ b/board/esd/otc570/Kconfig @@ -1,8 +1,5 @@ if TARGET_OTC570 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "otc570" diff --git a/board/esg/ima3-mx53/Kconfig b/board/esg/ima3-mx53/Kconfig index 5593689e72..d73238f9a9 100644 --- a/board/esg/ima3-mx53/Kconfig +++ b/board/esg/ima3-mx53/Kconfig @@ -1,8 +1,5 @@ if TARGET_IMA3_MX53 -config SYS_CPU - default "armv7" - config SYS_BOARD default "ima3-mx53" diff --git a/board/eukrea/cpu9260/Kconfig b/board/eukrea/cpu9260/Kconfig index 53ae917c76..9bd077b1ff 100644 --- a/board/eukrea/cpu9260/Kconfig +++ b/board/eukrea/cpu9260/Kconfig @@ -1,8 +1,5 @@ if TARGET_CPU9260 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "cpu9260" diff --git a/board/eukrea/cpuat91/Kconfig b/board/eukrea/cpuat91/Kconfig index f2b02dc1c2..b69e4c3f82 100644 --- a/board/eukrea/cpuat91/Kconfig +++ b/board/eukrea/cpuat91/Kconfig @@ -1,8 +1,5 @@ if TARGET_CPUAT91 -config SYS_CPU - default "arm920t" - config SYS_BOARD default "cpuat91" diff --git a/board/faraday/a320evb/Kconfig b/board/faraday/a320evb/Kconfig index bfa620708d..02c42cb0a2 100644 --- a/board/faraday/a320evb/Kconfig +++ b/board/faraday/a320evb/Kconfig @@ -1,8 +1,5 @@ if TARGET_A320EVB -config SYS_CPU - default "arm920t" - config SYS_BOARD default "a320evb" diff --git a/board/freescale/ls1021aqds/Kconfig b/board/freescale/ls1021aqds/Kconfig index 3cee468a3d..119b955041 100644 --- a/board/freescale/ls1021aqds/Kconfig +++ b/board/freescale/ls1021aqds/Kconfig @@ -1,8 +1,5 @@ if TARGET_LS1021AQDS -config SYS_CPU - default "armv7" - config SYS_BOARD default "ls1021aqds" diff --git a/board/freescale/ls1021atwr/Kconfig b/board/freescale/ls1021atwr/Kconfig index 312f9388fc..bc50b8d966 100644 --- a/board/freescale/ls1021atwr/Kconfig +++ b/board/freescale/ls1021atwr/Kconfig @@ -1,8 +1,5 @@ if TARGET_LS1021ATWR -config SYS_CPU - default "armv7" - config SYS_BOARD default "ls1021atwr" diff --git a/board/freescale/mx23evk/Kconfig b/board/freescale/mx23evk/Kconfig index 1bbbe2d5f5..51a8f9f773 100644 --- a/board/freescale/mx23evk/Kconfig +++ b/board/freescale/mx23evk/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX23EVK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "mx23evk" diff --git a/board/freescale/mx25pdk/Kconfig b/board/freescale/mx25pdk/Kconfig index a693239701..af06b4c827 100644 --- a/board/freescale/mx25pdk/Kconfig +++ b/board/freescale/mx25pdk/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX25PDK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "mx25pdk" diff --git a/board/freescale/mx28evk/Kconfig b/board/freescale/mx28evk/Kconfig index cc654bcfa5..39777bd70f 100644 --- a/board/freescale/mx28evk/Kconfig +++ b/board/freescale/mx28evk/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX28EVK -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "mx28evk" diff --git a/board/freescale/mx31ads/Kconfig b/board/freescale/mx31ads/Kconfig index b4ea64b405..eeeb6f490f 100644 --- a/board/freescale/mx31ads/Kconfig +++ b/board/freescale/mx31ads/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX31ADS -config SYS_CPU - default "arm1136" - config SYS_BOARD default "mx31ads" diff --git a/board/freescale/mx31pdk/Kconfig b/board/freescale/mx31pdk/Kconfig index 68c3880638..055545c930 100644 --- a/board/freescale/mx31pdk/Kconfig +++ b/board/freescale/mx31pdk/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX31PDK -config SYS_CPU - default "arm1136" - config SYS_BOARD default "mx31pdk" diff --git a/board/freescale/mx35pdk/Kconfig b/board/freescale/mx35pdk/Kconfig index ca5b40f07d..021d19e551 100644 --- a/board/freescale/mx35pdk/Kconfig +++ b/board/freescale/mx35pdk/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX35PDK -config SYS_CPU - default "arm1136" - config SYS_BOARD default "mx35pdk" diff --git a/board/freescale/mx51evk/Kconfig b/board/freescale/mx51evk/Kconfig index 07861a9706..f9b69cbd66 100644 --- a/board/freescale/mx51evk/Kconfig +++ b/board/freescale/mx51evk/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX51EVK -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx51evk" diff --git a/board/freescale/mx53ard/Kconfig b/board/freescale/mx53ard/Kconfig index 566df85985..41f46a04ac 100644 --- a/board/freescale/mx53ard/Kconfig +++ b/board/freescale/mx53ard/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX53ARD -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx53ard" diff --git a/board/freescale/mx53evk/Kconfig b/board/freescale/mx53evk/Kconfig index d064b104dc..c226c1ca06 100644 --- a/board/freescale/mx53evk/Kconfig +++ b/board/freescale/mx53evk/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX53EVK -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx53evk" diff --git a/board/freescale/mx53loco/Kconfig b/board/freescale/mx53loco/Kconfig index bc44e59bfc..5ca1672bf7 100644 --- a/board/freescale/mx53loco/Kconfig +++ b/board/freescale/mx53loco/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX53LOCO -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx53loco" diff --git a/board/freescale/mx53smd/Kconfig b/board/freescale/mx53smd/Kconfig index 62c37d4e0c..1195d33d06 100644 --- a/board/freescale/mx53smd/Kconfig +++ b/board/freescale/mx53smd/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX53SMD -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx53smd" diff --git a/board/freescale/mx6qarm2/Kconfig b/board/freescale/mx6qarm2/Kconfig index f7f18db9fc..4af33af185 100644 --- a/board/freescale/mx6qarm2/Kconfig +++ b/board/freescale/mx6qarm2/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX6QARM2 -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx6qarm2" diff --git a/board/freescale/mx6qsabreauto/Kconfig b/board/freescale/mx6qsabreauto/Kconfig index d0cf355bc1..cc2a140c52 100644 --- a/board/freescale/mx6qsabreauto/Kconfig +++ b/board/freescale/mx6qsabreauto/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX6QSABREAUTO -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx6qsabreauto" diff --git a/board/freescale/mx6sabresd/Kconfig b/board/freescale/mx6sabresd/Kconfig index 15b65c09f1..fa6ddb2292 100644 --- a/board/freescale/mx6sabresd/Kconfig +++ b/board/freescale/mx6sabresd/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX6SABRESD -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx6sabresd" diff --git a/board/freescale/mx6slevk/Kconfig b/board/freescale/mx6slevk/Kconfig index 558aeab0e3..d32da900a3 100644 --- a/board/freescale/mx6slevk/Kconfig +++ b/board/freescale/mx6slevk/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX6SLEVK -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx6slevk" diff --git a/board/freescale/mx6sxsabresd/Kconfig b/board/freescale/mx6sxsabresd/Kconfig index 2a86b68afc..940983e932 100644 --- a/board/freescale/mx6sxsabresd/Kconfig +++ b/board/freescale/mx6sxsabresd/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX6SXSABRESD -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx6sxsabresd" diff --git a/board/freescale/vf610twr/Kconfig b/board/freescale/vf610twr/Kconfig index 684ef279c3..ef091d6b2b 100644 --- a/board/freescale/vf610twr/Kconfig +++ b/board/freescale/vf610twr/Kconfig @@ -1,8 +1,5 @@ if TARGET_VF610TWR -config SYS_CPU - default "armv7" - config SYS_BOARD default "vf610twr" diff --git a/board/gateworks/gw_ventana/Kconfig b/board/gateworks/gw_ventana/Kconfig index 82909a80a3..c233e90c65 100644 --- a/board/gateworks/gw_ventana/Kconfig +++ b/board/gateworks/gw_ventana/Kconfig @@ -1,8 +1,5 @@ if TARGET_GW_VENTANA -config SYS_CPU - default "armv7" - config SYS_BOARD default "gw_ventana" diff --git a/board/genesi/mx51_efikamx/Kconfig b/board/genesi/mx51_efikamx/Kconfig index 87d15a59d4..355702a4b6 100644 --- a/board/genesi/mx51_efikamx/Kconfig +++ b/board/genesi/mx51_efikamx/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX51_EFIKAMX -config SYS_CPU - default "armv7" - config SYS_BOARD default "mx51_efikamx" diff --git a/board/gumstix/pepper/Kconfig b/board/gumstix/pepper/Kconfig index 0b73955167..6f94612fe2 100644 --- a/board/gumstix/pepper/Kconfig +++ b/board/gumstix/pepper/Kconfig @@ -1,8 +1,5 @@ if TARGET_PEPPER -config SYS_CPU - default "armv7" - config SYS_BOARD default "pepper" diff --git a/board/h2200/Kconfig b/board/h2200/Kconfig index 75956be823..c0e0c1e763 100644 --- a/board/h2200/Kconfig +++ b/board/h2200/Kconfig @@ -1,8 +1,5 @@ if TARGET_H2200 -config SYS_CPU - default "pxa" - config SYS_BOARD default "h2200" diff --git a/board/hale/tt01/Kconfig b/board/hale/tt01/Kconfig index 40e56cb11f..af9828a4bf 100644 --- a/board/hale/tt01/Kconfig +++ b/board/hale/tt01/Kconfig @@ -1,8 +1,5 @@ if TARGET_TT01 -config SYS_CPU - default "arm1136" - config SYS_BOARD default "tt01" diff --git a/board/icpdas/lp8x4x/Kconfig b/board/icpdas/lp8x4x/Kconfig index 4374fb654f..3e87c4016b 100644 --- a/board/icpdas/lp8x4x/Kconfig +++ b/board/icpdas/lp8x4x/Kconfig @@ -1,8 +1,5 @@ if TARGET_LP8X4X -config SYS_CPU - default "pxa" - config SYS_BOARD default "lp8x4x" diff --git a/board/imx31_phycore/Kconfig b/board/imx31_phycore/Kconfig index cf3358dfe0..d3d202556d 100644 --- a/board/imx31_phycore/Kconfig +++ b/board/imx31_phycore/Kconfig @@ -1,8 +1,5 @@ if TARGET_IMX31_PHYCORE -config SYS_CPU - default "arm1136" - config SYS_BOARD default "imx31_phycore" diff --git a/board/isee/igep0033/Kconfig b/board/isee/igep0033/Kconfig index 4f3aaf481b..e989e4b15c 100644 --- a/board/isee/igep0033/Kconfig +++ b/board/isee/igep0033/Kconfig @@ -1,8 +1,5 @@ if TARGET_AM335X_IGEP0033 -config SYS_CPU - default "armv7" - config SYS_BOARD default "igep0033" diff --git a/board/jornada/Kconfig b/board/jornada/Kconfig index 9c11a13651..195bc26f9e 100644 --- a/board/jornada/Kconfig +++ b/board/jornada/Kconfig @@ -1,8 +1,5 @@ if TARGET_JORNADA -config SYS_CPU - default "sa1100" - config SYS_BOARD default "jornada" diff --git a/board/karo/tx25/Kconfig b/board/karo/tx25/Kconfig index 24edcc43bc..42746c1c0f 100644 --- a/board/karo/tx25/Kconfig +++ b/board/karo/tx25/Kconfig @@ -1,8 +1,5 @@ if TARGET_TX25 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "tx25" diff --git a/board/logicpd/imx27lite/Kconfig b/board/logicpd/imx27lite/Kconfig index 842d1baa47..c7de2e3814 100644 --- a/board/logicpd/imx27lite/Kconfig +++ b/board/logicpd/imx27lite/Kconfig @@ -1,8 +1,5 @@ if TARGET_IMX27LITE -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "imx27lite" @@ -19,9 +16,6 @@ endif if TARGET_MAGNESIUM -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "imx27lite" diff --git a/board/logicpd/imx31_litekit/Kconfig b/board/logicpd/imx31_litekit/Kconfig index a87fa81d82..d90f854a18 100644 --- a/board/logicpd/imx31_litekit/Kconfig +++ b/board/logicpd/imx31_litekit/Kconfig @@ -1,8 +1,5 @@ if TARGET_IMX31_LITEKIT -config SYS_CPU - default "arm1136" - config SYS_BOARD default "imx31_litekit" diff --git a/board/mpl/vcma9/Kconfig b/board/mpl/vcma9/Kconfig index 08b0fa0184..a1564521b2 100644 --- a/board/mpl/vcma9/Kconfig +++ b/board/mpl/vcma9/Kconfig @@ -1,8 +1,5 @@ if TARGET_VCMA9 -config SYS_CPU - default "arm920t" - config SYS_BOARD default "vcma9" diff --git a/board/olimex/mx23_olinuxino/Kconfig b/board/olimex/mx23_olinuxino/Kconfig index fb09309285..0b151c9bb8 100644 --- a/board/olimex/mx23_olinuxino/Kconfig +++ b/board/olimex/mx23_olinuxino/Kconfig @@ -1,8 +1,5 @@ if TARGET_MX23_OLINUXINO -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "mx23_olinuxino" diff --git a/board/palmld/Kconfig b/board/palmld/Kconfig index a749c8d2bb..3111295719 100644 --- a/board/palmld/Kconfig +++ b/board/palmld/Kconfig @@ -1,8 +1,5 @@ if TARGET_PALMLD -config SYS_CPU - default "pxa" - config SYS_BOARD default "palmld" diff --git a/board/palmtc/Kconfig b/board/palmtc/Kconfig index 5207490e88..3eb7198837 100644 --- a/board/palmtc/Kconfig +++ b/board/palmtc/Kconfig @@ -1,8 +1,5 @@ if TARGET_PALMTC -config SYS_CPU - default "pxa" - config SYS_BOARD default "palmtc" diff --git a/board/palmtreo680/Kconfig b/board/palmtreo680/Kconfig index 1992970aed..b5fdb9a361 100644 --- a/board/palmtreo680/Kconfig +++ b/board/palmtreo680/Kconfig @@ -1,8 +1,5 @@ if TARGET_PALMTREO680 -config SYS_CPU - default "pxa" - config SYS_BOARD default "palmtreo680" diff --git a/board/phytec/pcm051/Kconfig b/board/phytec/pcm051/Kconfig index f4ed7fdbac..2cc0d8872d 100644 --- a/board/phytec/pcm051/Kconfig +++ b/board/phytec/pcm051/Kconfig @@ -1,8 +1,5 @@ if TARGET_PCM051 -config SYS_CPU - default "armv7" - config SYS_BOARD default "pcm051" diff --git a/board/ppcag/bg0900/Kconfig b/board/ppcag/bg0900/Kconfig index 9d301c2926..d7f2368a23 100644 --- a/board/ppcag/bg0900/Kconfig +++ b/board/ppcag/bg0900/Kconfig @@ -1,8 +1,5 @@ if TARGET_BG0900 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "bg0900" diff --git a/board/pxa255_idp/Kconfig b/board/pxa255_idp/Kconfig index e8b1d47fcf..544831199d 100644 --- a/board/pxa255_idp/Kconfig +++ b/board/pxa255_idp/Kconfig @@ -1,8 +1,5 @@ if TARGET_PXA255_IDP -config SYS_CPU - default "pxa" - config SYS_BOARD default "pxa255_idp" diff --git a/board/raspberrypi/rpi_b/Kconfig b/board/raspberrypi/rpi_b/Kconfig index 1a767b2871..501d511f59 100644 --- a/board/raspberrypi/rpi_b/Kconfig +++ b/board/raspberrypi/rpi_b/Kconfig @@ -1,8 +1,5 @@ if TARGET_RPI_B -config SYS_CPU - default "arm1176" - config SYS_BOARD default "rpi_b" diff --git a/board/ronetix/pm9261/Kconfig b/board/ronetix/pm9261/Kconfig index 4a2ca02c67..a4934c582e 100644 --- a/board/ronetix/pm9261/Kconfig +++ b/board/ronetix/pm9261/Kconfig @@ -1,8 +1,5 @@ if TARGET_PM9261 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "pm9261" diff --git a/board/ronetix/pm9263/Kconfig b/board/ronetix/pm9263/Kconfig index 95129190fd..339a6ea169 100644 --- a/board/ronetix/pm9263/Kconfig +++ b/board/ronetix/pm9263/Kconfig @@ -1,8 +1,5 @@ if TARGET_PM9263 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "pm9263" diff --git a/board/ronetix/pm9g45/Kconfig b/board/ronetix/pm9g45/Kconfig index 0c0af962d4..65fc5c4838 100644 --- a/board/ronetix/pm9g45/Kconfig +++ b/board/ronetix/pm9g45/Kconfig @@ -1,8 +1,5 @@ if TARGET_PM9G45 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "pm9g45" diff --git a/board/samsung/goni/Kconfig b/board/samsung/goni/Kconfig index a320c2bcb5..cbbf5a9315 100644 --- a/board/samsung/goni/Kconfig +++ b/board/samsung/goni/Kconfig @@ -1,8 +1,5 @@ if TARGET_S5P_GONI -config SYS_CPU - default "armv7" - config SYS_BOARD default "goni" diff --git a/board/samsung/smdk2410/Kconfig b/board/samsung/smdk2410/Kconfig index 94f1e3c4cc..e987b6496f 100644 --- a/board/samsung/smdk2410/Kconfig +++ b/board/samsung/smdk2410/Kconfig @@ -1,8 +1,5 @@ if TARGET_SMDK2410 -config SYS_CPU - default "arm920t" - config SYS_BOARD default "smdk2410" diff --git a/board/samsung/smdkc100/Kconfig b/board/samsung/smdkc100/Kconfig index 5e6b0ddcda..d2157b4d05 100644 --- a/board/samsung/smdkc100/Kconfig +++ b/board/samsung/smdkc100/Kconfig @@ -1,8 +1,5 @@ if TARGET_SMDKC100 -config SYS_CPU - default "armv7" - config SYS_BOARD default "smdkc100" diff --git a/board/sandisk/sansa_fuze_plus/Kconfig b/board/sandisk/sansa_fuze_plus/Kconfig index 99e7379cd2..ab4a29255c 100644 --- a/board/sandisk/sansa_fuze_plus/Kconfig +++ b/board/sandisk/sansa_fuze_plus/Kconfig @@ -1,8 +1,5 @@ if TARGET_SANSA_FUZE_PLUS -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "sansa_fuze_plus" diff --git a/board/scb9328/Kconfig b/board/scb9328/Kconfig index 7ff7dbc4a5..68e99ea2e3 100644 --- a/board/scb9328/Kconfig +++ b/board/scb9328/Kconfig @@ -1,8 +1,5 @@ if TARGET_SCB9328 -config SYS_CPU - default "arm920t" - config SYS_BOARD default "scb9328" diff --git a/board/schulercontrol/sc_sps_1/Kconfig b/board/schulercontrol/sc_sps_1/Kconfig index 379e53b556..2461d0cc50 100644 --- a/board/schulercontrol/sc_sps_1/Kconfig +++ b/board/schulercontrol/sc_sps_1/Kconfig @@ -1,8 +1,5 @@ if TARGET_SC_SPS_1 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "sc_sps_1" diff --git a/board/siemens/corvus/Kconfig b/board/siemens/corvus/Kconfig index 80018c51b5..7b505aac36 100644 --- a/board/siemens/corvus/Kconfig +++ b/board/siemens/corvus/Kconfig @@ -1,8 +1,5 @@ if TARGET_CORVUS -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "corvus" diff --git a/board/siemens/draco/Kconfig b/board/siemens/draco/Kconfig index b930a76fa9..d138ecea9d 100644 --- a/board/siemens/draco/Kconfig +++ b/board/siemens/draco/Kconfig @@ -1,8 +1,5 @@ if TARGET_DRACO -config SYS_CPU - default "armv7" - config SYS_BOARD default "draco" @@ -19,9 +16,6 @@ endif if TARGET_DXR2 -config SYS_CPU - default "armv7" - config SYS_BOARD default "draco" diff --git a/board/siemens/pxm2/Kconfig b/board/siemens/pxm2/Kconfig index f76ec69bba..62604ecb39 100644 --- a/board/siemens/pxm2/Kconfig +++ b/board/siemens/pxm2/Kconfig @@ -1,8 +1,5 @@ if TARGET_PXM2 -config SYS_CPU - default "armv7" - config SYS_BOARD default "pxm2" diff --git a/board/siemens/rut/Kconfig b/board/siemens/rut/Kconfig index b7e49dac26..3371077662 100644 --- a/board/siemens/rut/Kconfig +++ b/board/siemens/rut/Kconfig @@ -1,8 +1,5 @@ if TARGET_RUT -config SYS_CPU - default "armv7" - config SYS_BOARD default "rut" diff --git a/board/siemens/taurus/Kconfig b/board/siemens/taurus/Kconfig index 1fedbd36bc..c07d244bc3 100644 --- a/board/siemens/taurus/Kconfig +++ b/board/siemens/taurus/Kconfig @@ -1,8 +1,5 @@ if TARGET_TAURUS -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "taurus" diff --git a/board/silica/pengwyn/Kconfig b/board/silica/pengwyn/Kconfig index 90bfb69e5e..f2e1098f62 100644 --- a/board/silica/pengwyn/Kconfig +++ b/board/silica/pengwyn/Kconfig @@ -1,8 +1,5 @@ if TARGET_PENGWYN -config SYS_CPU - default "armv7" - config SYS_BOARD default "pengwyn" diff --git a/board/solidrun/hummingboard/Kconfig b/board/solidrun/hummingboard/Kconfig index a4eb62fcef..36b79045bc 100644 --- a/board/solidrun/hummingboard/Kconfig +++ b/board/solidrun/hummingboard/Kconfig @@ -1,8 +1,5 @@ if TARGET_HUMMINGBOARD -config SYS_CPU - default "armv7" - config SYS_BOARD default "hummingboard" diff --git a/board/spear/spear300/Kconfig b/board/spear/spear300/Kconfig index 5b702ced69..27360f32e4 100644 --- a/board/spear/spear300/Kconfig +++ b/board/spear/spear300/Kconfig @@ -1,8 +1,5 @@ if TARGET_SPEAR300 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "spear300" diff --git a/board/spear/spear310/Kconfig b/board/spear/spear310/Kconfig index b8f5154733..0c95fa35a0 100644 --- a/board/spear/spear310/Kconfig +++ b/board/spear/spear310/Kconfig @@ -1,8 +1,5 @@ if TARGET_SPEAR310 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "spear310" diff --git a/board/spear/spear320/Kconfig b/board/spear/spear320/Kconfig index 150d64ff98..df176230f4 100644 --- a/board/spear/spear320/Kconfig +++ b/board/spear/spear320/Kconfig @@ -1,8 +1,5 @@ if TARGET_SPEAR320 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "spear320" diff --git a/board/spear/spear600/Kconfig b/board/spear/spear600/Kconfig index f03e19ebd3..d562e64f07 100644 --- a/board/spear/spear600/Kconfig +++ b/board/spear/spear600/Kconfig @@ -1,8 +1,5 @@ if TARGET_SPEAR600 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "spear600" diff --git a/board/spear/x600/Kconfig b/board/spear/x600/Kconfig index 620be5f56e..6a1c5c7b40 100644 --- a/board/spear/x600/Kconfig +++ b/board/spear/x600/Kconfig @@ -1,8 +1,5 @@ if TARGET_X600 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "x600" diff --git a/board/st-ericsson/snowball/Kconfig b/board/st-ericsson/snowball/Kconfig index 7eb99697d5..0b3a0cca6c 100644 --- a/board/st-ericsson/snowball/Kconfig +++ b/board/st-ericsson/snowball/Kconfig @@ -1,8 +1,5 @@ if TARGET_SNOWBALL -config SYS_CPU - default "armv7" - config SYS_BOARD default "snowball" diff --git a/board/st-ericsson/u8500/Kconfig b/board/st-ericsson/u8500/Kconfig index ca25876269..909f30db4b 100644 --- a/board/st-ericsson/u8500/Kconfig +++ b/board/st-ericsson/u8500/Kconfig @@ -1,8 +1,5 @@ if TARGET_U8500_HREF -config SYS_CPU - default "armv7" - config SYS_BOARD default "u8500" diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 31a15037d0..28df187840 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -8,9 +8,6 @@ config SYS_CONFIG_NAME default "sun7i" if TARGET_SUN7I default "sun8i" if TARGET_SUN8I -config SYS_CPU - default "armv7" - config SYS_BOARD default "sunxi" diff --git a/board/syteco/jadecpu/Kconfig b/board/syteco/jadecpu/Kconfig index 3965e90ad9..6e9392e21f 100644 --- a/board/syteco/jadecpu/Kconfig +++ b/board/syteco/jadecpu/Kconfig @@ -1,8 +1,5 @@ if TARGET_JADECPU -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "jadecpu" diff --git a/board/syteco/zmx25/Kconfig b/board/syteco/zmx25/Kconfig index 260774dced..59a415d65f 100644 --- a/board/syteco/zmx25/Kconfig +++ b/board/syteco/zmx25/Kconfig @@ -1,8 +1,5 @@ if TARGET_ZMX25 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "zmx25" diff --git a/board/taskit/stamp9g20/Kconfig b/board/taskit/stamp9g20/Kconfig index 67be227b72..3139f9af86 100644 --- a/board/taskit/stamp9g20/Kconfig +++ b/board/taskit/stamp9g20/Kconfig @@ -1,8 +1,5 @@ if TARGET_STAMP9G20 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "stamp9g20" diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig index d8958ef0b8..b9f6bd7122 100644 --- a/board/ti/am335x/Kconfig +++ b/board/ti/am335x/Kconfig @@ -1,8 +1,5 @@ if TARGET_AM335X_EVM -config SYS_CPU - default "armv7" - config SYS_BOARD default "am335x" diff --git a/board/ti/am43xx/Kconfig b/board/ti/am43xx/Kconfig index 47b96bd7ed..8d1c16883d 100644 --- a/board/ti/am43xx/Kconfig +++ b/board/ti/am43xx/Kconfig @@ -1,8 +1,5 @@ if TARGET_AM43XX_EVM -config SYS_CPU - default "armv7" - config SYS_BOARD default "am43xx" diff --git a/board/ti/ti814x/Kconfig b/board/ti/ti814x/Kconfig index 9bd3d73427..2960099a8e 100644 --- a/board/ti/ti814x/Kconfig +++ b/board/ti/ti814x/Kconfig @@ -1,8 +1,5 @@ if TARGET_TI814X_EVM -config SYS_CPU - default "armv7" - config SYS_BOARD default "ti814x" diff --git a/board/ti/ti816x/Kconfig b/board/ti/ti816x/Kconfig index c0bdb9eac3..95973b47f1 100644 --- a/board/ti/ti816x/Kconfig +++ b/board/ti/ti816x/Kconfig @@ -1,8 +1,5 @@ if TARGET_TI816X_EVM -config SYS_CPU - default "armv7" - config SYS_BOARD default "ti816x" diff --git a/board/ti/tnetv107xevm/Kconfig b/board/ti/tnetv107xevm/Kconfig index aa80d0f41a..637f20e847 100644 --- a/board/ti/tnetv107xevm/Kconfig +++ b/board/ti/tnetv107xevm/Kconfig @@ -1,8 +1,5 @@ if TARGET_TNETV107X_EVM -config SYS_CPU - default "arm1176" - config SYS_BOARD default "tnetv107xevm" diff --git a/board/timll/devkit3250/Kconfig b/board/timll/devkit3250/Kconfig index 087356d4ba..e3bd4569d6 100644 --- a/board/timll/devkit3250/Kconfig +++ b/board/timll/devkit3250/Kconfig @@ -1,8 +1,5 @@ if TARGET_DEVKIT3250 -config SYS_CPU - default "arm926ejs" - config SYS_BOARD default "devkit3250" diff --git a/board/toradex/colibri_pxa270/Kconfig b/board/toradex/colibri_pxa270/Kconfig index e4b1a5e508..949407a042 100644 --- a/board/toradex/colibri_pxa270/Kconfig +++ b/board/toradex/colibri_pxa270/Kconfig @@ -1,8 +1,5 @@ if TARGET_COLIBRI_PXA270 -config SYS_CPU - default "pxa" - config SYS_BOARD default "colibri_pxa270" diff --git a/board/tqc/tqma6/Kconfig b/board/tqc/tqma6/Kconfig index b70cbf09df..f8b3d1fd40 100644 --- a/board/tqc/tqma6/Kconfig +++ b/board/tqc/tqma6/Kconfig @@ -1,8 +1,5 @@ if TARGET_TQMA6 -config SYS_CPU - default "armv7" - config SYS_BOARD default "tqma6" diff --git a/board/trizepsiv/Kconfig b/board/trizepsiv/Kconfig index 9844c692a1..56b255709a 100644 --- a/board/trizepsiv/Kconfig +++ b/board/trizepsiv/Kconfig @@ -1,8 +1,5 @@ if TARGET_TRIZEPSIV -config SYS_CPU - default "pxa" - config SYS_BOARD default "trizepsiv" diff --git a/board/ttcontrol/vision2/Kconfig b/board/ttcontrol/vision2/Kconfig index 4e2271bdad..cacd2c5dfe 100644 --- a/board/ttcontrol/vision2/Kconfig +++ b/board/ttcontrol/vision2/Kconfig @@ -1,8 +1,5 @@ if TARGET_VISION2 -config SYS_CPU - default "armv7" - config SYS_BOARD default "vision2" diff --git a/board/udoo/Kconfig b/board/udoo/Kconfig index a98d0d6a4c..970f39f0f7 100644 --- a/board/udoo/Kconfig +++ b/board/udoo/Kconfig @@ -1,8 +1,5 @@ if TARGET_UDOO -config SYS_CPU - default "armv7" - config SYS_BOARD default "udoo" diff --git a/board/vpac270/Kconfig b/board/vpac270/Kconfig index a046f01f6d..1701b35d12 100644 --- a/board/vpac270/Kconfig +++ b/board/vpac270/Kconfig @@ -1,8 +1,5 @@ if TARGET_VPAC270 -config SYS_CPU - default "pxa" - config SYS_BOARD default "vpac270" diff --git a/board/wandboard/Kconfig b/board/wandboard/Kconfig index c8627693f2..3928566715 100644 --- a/board/wandboard/Kconfig +++ b/board/wandboard/Kconfig @@ -1,8 +1,5 @@ if TARGET_WANDBOARD -config SYS_CPU - default "armv7" - config SYS_BOARD default "wandboard" diff --git a/board/woodburn/Kconfig b/board/woodburn/Kconfig index 67023199b6..4699526cfd 100644 --- a/board/woodburn/Kconfig +++ b/board/woodburn/Kconfig @@ -1,8 +1,5 @@ if TARGET_WOODBURN -config SYS_CPU - default "arm1136" - config SYS_BOARD default "woodburn" @@ -16,9 +13,6 @@ endif if TARGET_WOODBURN_SD -config SYS_CPU - default "arm1136" - config SYS_BOARD default "woodburn" diff --git a/board/xaeniax/Kconfig b/board/xaeniax/Kconfig index 288f24b227..519e21fb9a 100644 --- a/board/xaeniax/Kconfig +++ b/board/xaeniax/Kconfig @@ -1,8 +1,5 @@ if TARGET_XAENIAX -config SYS_CPU - default "pxa" - config SYS_BOARD default "xaeniax" diff --git a/board/zipitz2/Kconfig b/board/zipitz2/Kconfig index 5f7fe1b23d..c6635040a3 100644 --- a/board/zipitz2/Kconfig +++ b/board/zipitz2/Kconfig @@ -1,8 +1,5 @@ if TARGET_ZIPITZ2 -config SYS_CPU - default "pxa" - config SYS_BOARD default "zipitz2" diff --git a/common/bootm.c b/common/bootm.c index 81e32617c3..6b3ea8c61b 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -167,7 +167,8 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int argc, } /* If we have a valid setup.bin, we will use that for entry (x86) */ - if (images.os.arch == IH_ARCH_I386) { + if (images.os.arch == IH_ARCH_I386 || + images.os.arch == IH_ARCH_X86_64) { ulong len; ret = boot_get_setup(&images, IH_ARCH_I386, &images.ep, &len); diff --git a/common/image-fit.c b/common/image-fit.c index a272ea2e83..4ffc5aaa51 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1114,7 +1114,8 @@ int fit_image_check_arch(const void *fit, int noffset, uint8_t arch) if (fit_image_get_arch(fit, noffset, &image_arch)) return 0; - return (arch == image_arch); + return (arch == image_arch) || + (arch == IH_ARCH_I386 && image_arch == IH_ARCH_X86_64); } /** diff --git a/common/image.c b/common/image.c index eb92e6323c..b75a5ce29a 100644 --- a/common/image.c +++ b/common/image.c @@ -85,6 +85,7 @@ static const table_entry_t uimage_arch[] = { { IH_ARCH_SANDBOX, "sandbox", "Sandbox", }, { IH_ARCH_ARM64, "arm64", "AArch64", }, { IH_ARCH_ARC, "arc", "ARC", }, + { IH_ARCH_X86_64, "x86_64", "AMD x86_64", }, { -1, "", "", }, }; diff --git a/common/lcd.c b/common/lcd.c index 689d30eb25..787d80e3cb 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -33,7 +33,6 @@ #if defined(CONFIG_CPU_PXA25X) || defined(CONFIG_CPU_PXA27X) || \ defined(CONFIG_CPU_MONAHANS) -#define CONFIG_CPU_PXA #include <asm/byteorder.h> #endif diff --git a/doc/SPI/README.altera_spi b/doc/SPI/README.altera_spi new file mode 100644 index 0000000000..b07449f80d --- /dev/null +++ b/doc/SPI/README.altera_spi @@ -0,0 +1,6 @@ +SoCFPGA EPCS/EPCQx1 mini howto: +- Instantiate EPCS/EPCQx1 Serial flash controller in QSys and rebuild +- The controller base address is the "Base" in QSys + 0x400 +- Set MSEL[4:0]=10010 (AS Standard) +- Load the bitstream into FPGA, enable bridges +- Only then will the driver work diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 416ea4f2c8..d067897244 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -6,21 +6,21 @@ # obj-$(CONFIG_BFIN_TWI_I2C) += bfin-twi_i2c.o -obj-$(CONFIG_DW_I2C) += designware_i2c.o obj-$(CONFIG_I2C_MV) += mv_i2c.o -obj-$(CONFIG_I2C_MXS) += mxs_i2c.o obj-$(CONFIG_PCA9564_I2C) += pca9564_i2c.o obj-$(CONFIG_TSI108_I2C) += tsi108_i2c.o obj-$(CONFIG_U8500_I2C) += u8500_i2c.o obj-$(CONFIG_SH_SH7734_I2C) += sh_sh7734_i2c.o obj-$(CONFIG_SYS_I2C) += i2c_core.o obj-$(CONFIG_SYS_I2C_DAVINCI) += davinci_i2c.o +obj-$(CONFIG_SYS_I2C_DW) += designware_i2c.o obj-$(CONFIG_SYS_I2C_FSL) += fsl_i2c.o obj-$(CONFIG_SYS_I2C_FTI2C010) += fti2c010.o obj-$(CONFIG_SYS_I2C_IHS) += ihs_i2c.o obj-$(CONFIG_SYS_I2C_KONA) += kona_i2c.o obj-$(CONFIG_SYS_I2C_MVTWSI) += mvtwsi.o obj-$(CONFIG_SYS_I2C_MXC) += mxc_i2c.o +obj-$(CONFIG_SYS_I2C_MXS) += mxs_i2c.o obj-$(CONFIG_SYS_I2C_OMAP24XX) += omap24xx_i2c.o obj-$(CONFIG_SYS_I2C_OMAP34XX) += omap24xx_i2c.o obj-$(CONFIG_SYS_I2C_PPC4XX) += ppc4xx_i2c.o diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index e085a7095e..e768cdedb0 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -6,17 +6,33 @@ */ #include <common.h> +#include <i2c.h> #include <asm/io.h> #include "designware_i2c.h" -#include <i2c.h> -#ifdef CONFIG_I2C_MULTI_BUS -static unsigned int bus_initialized[CONFIG_SYS_I2C_BUS_MAX]; -static unsigned int current_bus = 0; +static struct i2c_regs *i2c_get_base(struct i2c_adapter *adap) +{ + switch (adap->hwadapnr) { +#if CONFIG_SYS_I2C_BUS_MAX >= 4 + case 3: + return (struct i2c_regs *)CONFIG_SYS_I2C_BASE3; +#endif +#if CONFIG_SYS_I2C_BUS_MAX >= 3 + case 2: + return (struct i2c_regs *)CONFIG_SYS_I2C_BASE2; +#endif +#if CONFIG_SYS_I2C_BUS_MAX >= 2 + case 1: + return (struct i2c_regs *)CONFIG_SYS_I2C_BASE1; #endif + case 0: + return (struct i2c_regs *)CONFIG_SYS_I2C_BASE; + default: + printf("Wrong I2C-adapter number %d\n", adap->hwadapnr); + } -static struct i2c_regs *i2c_regs_p = - (struct i2c_regs *)CONFIG_SYS_I2C_BASE; + return NULL; +} /* * set_speed - Set the i2c speed mode (standard, high, fast) @@ -24,51 +40,52 @@ static struct i2c_regs *i2c_regs_p = * * Set the i2c speed mode (standard, high, fast) */ -static void set_speed(int i2c_spd) +static void set_speed(struct i2c_adapter *adap, int i2c_spd) { + struct i2c_regs *i2c_base = i2c_get_base(adap); unsigned int cntl; unsigned int hcnt, lcnt; unsigned int enbl; /* to set speed cltr must be disabled */ - enbl = readl(&i2c_regs_p->ic_enable); + enbl = readl(&i2c_base->ic_enable); enbl &= ~IC_ENABLE_0B; - writel(enbl, &i2c_regs_p->ic_enable); + writel(enbl, &i2c_base->ic_enable); - cntl = (readl(&i2c_regs_p->ic_con) & (~IC_CON_SPD_MSK)); + cntl = (readl(&i2c_base->ic_con) & (~IC_CON_SPD_MSK)); switch (i2c_spd) { case IC_SPEED_MODE_MAX: cntl |= IC_CON_SPD_HS; hcnt = (IC_CLK * MIN_HS_SCL_HIGHTIME) / NANO_TO_MICRO; - writel(hcnt, &i2c_regs_p->ic_hs_scl_hcnt); + writel(hcnt, &i2c_base->ic_hs_scl_hcnt); lcnt = (IC_CLK * MIN_HS_SCL_LOWTIME) / NANO_TO_MICRO; - writel(lcnt, &i2c_regs_p->ic_hs_scl_lcnt); + writel(lcnt, &i2c_base->ic_hs_scl_lcnt); break; case IC_SPEED_MODE_STANDARD: cntl |= IC_CON_SPD_SS; hcnt = (IC_CLK * MIN_SS_SCL_HIGHTIME) / NANO_TO_MICRO; - writel(hcnt, &i2c_regs_p->ic_ss_scl_hcnt); + writel(hcnt, &i2c_base->ic_ss_scl_hcnt); lcnt = (IC_CLK * MIN_SS_SCL_LOWTIME) / NANO_TO_MICRO; - writel(lcnt, &i2c_regs_p->ic_ss_scl_lcnt); + writel(lcnt, &i2c_base->ic_ss_scl_lcnt); break; case IC_SPEED_MODE_FAST: default: cntl |= IC_CON_SPD_FS; hcnt = (IC_CLK * MIN_FS_SCL_HIGHTIME) / NANO_TO_MICRO; - writel(hcnt, &i2c_regs_p->ic_fs_scl_hcnt); + writel(hcnt, &i2c_base->ic_fs_scl_hcnt); lcnt = (IC_CLK * MIN_FS_SCL_LOWTIME) / NANO_TO_MICRO; - writel(lcnt, &i2c_regs_p->ic_fs_scl_lcnt); + writel(lcnt, &i2c_base->ic_fs_scl_lcnt); break; } - writel(cntl, &i2c_regs_p->ic_con); + writel(cntl, &i2c_base->ic_con); /* Enable back i2c now speed set */ enbl |= IC_ENABLE_0B; - writel(enbl, &i2c_regs_p->ic_enable); + writel(enbl, &i2c_base->ic_enable); } /* @@ -77,7 +94,8 @@ static void set_speed(int i2c_spd) * * Set the i2c speed. */ -int i2c_set_bus_speed(unsigned int speed) +static unsigned int dw_i2c_set_bus_speed(struct i2c_adapter *adap, + unsigned int speed) { int i2c_spd; @@ -88,28 +106,8 @@ int i2c_set_bus_speed(unsigned int speed) else i2c_spd = IC_SPEED_MODE_STANDARD; - set_speed(i2c_spd); - - return i2c_spd; -} - -/* - * i2c_get_bus_speed - Gets the i2c speed - * - * Gets the i2c speed. - */ -unsigned int i2c_get_bus_speed(void) -{ - u32 cntl; - - cntl = (readl(&i2c_regs_p->ic_con) & IC_CON_SPD_MSK); - - if (cntl == IC_CON_SPD_HS) - return I2C_MAX_SPEED; - else if (cntl == IC_CON_SPD_FS) - return I2C_FAST_SPEED; - else if (cntl == IC_CON_SPD_SS) - return I2C_STANDARD_SPEED; + set_speed(adap, i2c_spd); + adap->speed = speed; return 0; } @@ -117,34 +115,32 @@ unsigned int i2c_get_bus_speed(void) /* * i2c_init - Init function * @speed: required i2c speed - * @slaveadd: slave address for the device + * @slaveaddr: slave address for the device * * Initialization function. */ -void i2c_init(int speed, int slaveadd) +static void dw_i2c_init(struct i2c_adapter *adap, int speed, + int slaveaddr) { + struct i2c_regs *i2c_base = i2c_get_base(adap); unsigned int enbl; /* Disable i2c */ - enbl = readl(&i2c_regs_p->ic_enable); + enbl = readl(&i2c_base->ic_enable); enbl &= ~IC_ENABLE_0B; - writel(enbl, &i2c_regs_p->ic_enable); + writel(enbl, &i2c_base->ic_enable); - writel((IC_CON_SD | IC_CON_SPD_FS | IC_CON_MM), &i2c_regs_p->ic_con); - writel(IC_RX_TL, &i2c_regs_p->ic_rx_tl); - writel(IC_TX_TL, &i2c_regs_p->ic_tx_tl); - i2c_set_bus_speed(speed); - writel(IC_STOP_DET, &i2c_regs_p->ic_intr_mask); - writel(slaveadd, &i2c_regs_p->ic_sar); + writel((IC_CON_SD | IC_CON_SPD_FS | IC_CON_MM), &i2c_base->ic_con); + writel(IC_RX_TL, &i2c_base->ic_rx_tl); + writel(IC_TX_TL, &i2c_base->ic_tx_tl); + dw_i2c_set_bus_speed(adap, speed); + writel(IC_STOP_DET, &i2c_base->ic_intr_mask); + writel(slaveaddr, &i2c_base->ic_sar); /* Enable i2c */ - enbl = readl(&i2c_regs_p->ic_enable); + enbl = readl(&i2c_base->ic_enable); enbl |= IC_ENABLE_0B; - writel(enbl, &i2c_regs_p->ic_enable); - -#ifdef CONFIG_I2C_MULTI_BUS - bus_initialized[current_bus] = 1; -#endif + writel(enbl, &i2c_base->ic_enable); } /* @@ -153,21 +149,22 @@ void i2c_init(int speed, int slaveadd) * * Sets the target slave address. */ -static void i2c_setaddress(unsigned int i2c_addr) +static void i2c_setaddress(struct i2c_adapter *adap, unsigned int i2c_addr) { + struct i2c_regs *i2c_base = i2c_get_base(adap); unsigned int enbl; /* Disable i2c */ - enbl = readl(&i2c_regs_p->ic_enable); + enbl = readl(&i2c_base->ic_enable); enbl &= ~IC_ENABLE_0B; - writel(enbl, &i2c_regs_p->ic_enable); + writel(enbl, &i2c_base->ic_enable); - writel(i2c_addr, &i2c_regs_p->ic_tar); + writel(i2c_addr, &i2c_base->ic_tar); /* Enable i2c */ - enbl = readl(&i2c_regs_p->ic_enable); + enbl = readl(&i2c_base->ic_enable); enbl |= IC_ENABLE_0B; - writel(enbl, &i2c_regs_p->ic_enable); + writel(enbl, &i2c_base->ic_enable); } /* @@ -175,10 +172,12 @@ static void i2c_setaddress(unsigned int i2c_addr) * * Flushes the i2c RX FIFO */ -static void i2c_flush_rxfifo(void) +static void i2c_flush_rxfifo(struct i2c_adapter *adap) { - while (readl(&i2c_regs_p->ic_status) & IC_STATUS_RFNE) - readl(&i2c_regs_p->ic_cmd_data); + struct i2c_regs *i2c_base = i2c_get_base(adap); + + while (readl(&i2c_base->ic_status) & IC_STATUS_RFNE) + readl(&i2c_base->ic_cmd_data); } /* @@ -186,12 +185,13 @@ static void i2c_flush_rxfifo(void) * * Waits for bus busy */ -static int i2c_wait_for_bb(void) +static int i2c_wait_for_bb(struct i2c_adapter *adap) { + struct i2c_regs *i2c_base = i2c_get_base(adap); unsigned long start_time_bb = get_timer(0); - while ((readl(&i2c_regs_p->ic_status) & IC_STATUS_MA) || - !(readl(&i2c_regs_p->ic_status) & IC_STATUS_TFE)) { + while ((readl(&i2c_base->ic_status) & IC_STATUS_MA) || + !(readl(&i2c_base->ic_status) & IC_STATUS_TFE)) { /* Evaluate timeout */ if (get_timer(start_time_bb) > (unsigned long)(I2C_BYTE_TO_BB)) @@ -201,40 +201,44 @@ static int i2c_wait_for_bb(void) return 0; } -static int i2c_xfer_init(uchar chip, uint addr, int alen) +static int i2c_xfer_init(struct i2c_adapter *adap, uchar chip, uint addr, + int alen) { - if (i2c_wait_for_bb()) + struct i2c_regs *i2c_base = i2c_get_base(adap); + + if (i2c_wait_for_bb(adap)) return 1; - i2c_setaddress(chip); + i2c_setaddress(adap, chip); while (alen) { alen--; /* high byte address going out first */ writel((addr >> (alen * 8)) & 0xff, - &i2c_regs_p->ic_cmd_data); + &i2c_base->ic_cmd_data); } return 0; } -static int i2c_xfer_finish(void) +static int i2c_xfer_finish(struct i2c_adapter *adap) { + struct i2c_regs *i2c_base = i2c_get_base(adap); ulong start_stop_det = get_timer(0); while (1) { - if ((readl(&i2c_regs_p->ic_raw_intr_stat) & IC_STOP_DET)) { - readl(&i2c_regs_p->ic_clr_stop_det); + if ((readl(&i2c_base->ic_raw_intr_stat) & IC_STOP_DET)) { + readl(&i2c_base->ic_clr_stop_det); break; } else if (get_timer(start_stop_det) > I2C_STOPDET_TO) { break; } } - if (i2c_wait_for_bb()) { + if (i2c_wait_for_bb(adap)) { printf("Timed out waiting for bus\n"); return 1; } - i2c_flush_rxfifo(); + i2c_flush_rxfifo(adap); return 0; } @@ -249,8 +253,10 @@ static int i2c_xfer_finish(void) * * Read from i2c memory. */ -int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len) +static int dw_i2c_read(struct i2c_adapter *adap, u8 dev, uint addr, + int alen, u8 *buffer, int len) { + struct i2c_regs *i2c_base = i2c_get_base(adap); unsigned long start_time_rx; #ifdef CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW @@ -265,25 +271,25 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len) * still be one byte because the extra address bits are * hidden in the chip address. */ - chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW); + dev |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW); addr &= ~(CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW << (alen * 8)); - debug("%s: fix addr_overflow: chip %02x addr %02x\n", __func__, chip, + debug("%s: fix addr_overflow: dev %02x addr %02x\n", __func__, dev, addr); #endif - if (i2c_xfer_init(chip, addr, alen)) + if (i2c_xfer_init(adap, dev, addr, alen)) return 1; start_time_rx = get_timer(0); while (len) { if (len == 1) - writel(IC_CMD | IC_STOP, &i2c_regs_p->ic_cmd_data); + writel(IC_CMD | IC_STOP, &i2c_base->ic_cmd_data); else - writel(IC_CMD, &i2c_regs_p->ic_cmd_data); + writel(IC_CMD, &i2c_base->ic_cmd_data); - if (readl(&i2c_regs_p->ic_status) & IC_STATUS_RFNE) { - *buffer++ = (uchar)readl(&i2c_regs_p->ic_cmd_data); + if (readl(&i2c_base->ic_status) & IC_STATUS_RFNE) { + *buffer++ = (uchar)readl(&i2c_base->ic_cmd_data); len--; start_time_rx = get_timer(0); @@ -292,7 +298,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len) } } - return i2c_xfer_finish(); + return i2c_xfer_finish(adap); } /* @@ -305,8 +311,10 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len) * * Write to i2c memory. */ -int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) +static int dw_i2c_write(struct i2c_adapter *adap, u8 dev, uint addr, + int alen, u8 *buffer, int len) { + struct i2c_regs *i2c_base = i2c_get_base(adap); int nb = len; unsigned long start_time_tx; @@ -322,23 +330,25 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) * still be one byte because the extra address bits are * hidden in the chip address. */ - chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW); + dev |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW); addr &= ~(CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW << (alen * 8)); - debug("%s: fix addr_overflow: chip %02x addr %02x\n", __func__, chip, + debug("%s: fix addr_overflow: dev %02x addr %02x\n", __func__, dev, addr); #endif - if (i2c_xfer_init(chip, addr, alen)) + if (i2c_xfer_init(adap, dev, addr, alen)) return 1; start_time_tx = get_timer(0); while (len) { - if (readl(&i2c_regs_p->ic_status) & IC_STATUS_TFNF) { - if (--len == 0) - writel(*buffer | IC_STOP, &i2c_regs_p->ic_cmd_data); - else - writel(*buffer, &i2c_regs_p->ic_cmd_data); + if (readl(&i2c_base->ic_status) & IC_STATUS_TFNF) { + if (--len == 0) { + writel(*buffer | IC_STOP, + &i2c_base->ic_cmd_data); + } else { + writel(*buffer, &i2c_base->ic_cmd_data); + } buffer++; start_time_tx = get_timer(0); @@ -348,13 +358,13 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) } } - return i2c_xfer_finish(); + return i2c_xfer_finish(adap); } /* * i2c_probe - Probe the i2c chip */ -int i2c_probe(uchar chip) +static int dw_i2c_probe(struct i2c_adapter *adap, u8 dev) { u32 tmp; int ret; @@ -362,80 +372,31 @@ int i2c_probe(uchar chip) /* * Try to read the first location of the chip. */ - ret = i2c_read(chip, 0, 1, (uchar *)&tmp, 1); + ret = dw_i2c_read(adap, dev, 0, 1, (uchar *)&tmp, 1); if (ret) - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); + dw_i2c_init(adap, adap->speed, adap->slaveaddr); return ret; } -#ifdef CONFIG_I2C_MULTI_BUS -int i2c_set_bus_num(unsigned int bus) -{ - switch (bus) { - case 0: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE; - break; -#ifdef CONFIG_SYS_I2C_BASE1 - case 1: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE1; - break; -#endif -#ifdef CONFIG_SYS_I2C_BASE2 - case 2: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE2; - break; -#endif -#ifdef CONFIG_SYS_I2C_BASE3 - case 3: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE3; - break; -#endif -#ifdef CONFIG_SYS_I2C_BASE4 - case 4: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE4; - break; -#endif -#ifdef CONFIG_SYS_I2C_BASE5 - case 5: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE5; - break; -#endif -#ifdef CONFIG_SYS_I2C_BASE6 - case 6: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE6; - break; -#endif -#ifdef CONFIG_SYS_I2C_BASE7 - case 7: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE7; - break; -#endif -#ifdef CONFIG_SYS_I2C_BASE8 - case 8: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE8; - break; -#endif -#ifdef CONFIG_SYS_I2C_BASE9 - case 9: - i2c_regs_p = (void *)CONFIG_SYS_I2C_BASE9; - break; -#endif - default: - printf("Bad bus: %d\n", bus); - return -1; - } - - current_bus = bus; +U_BOOT_I2C_ADAP_COMPLETE(dw_0, dw_i2c_init, dw_i2c_probe, dw_i2c_read, + dw_i2c_write, dw_i2c_set_bus_speed, + CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE, 0) - if (!bus_initialized[current_bus]) - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#if CONFIG_SYS_I2C_BUS_MAX >= 2 +U_BOOT_I2C_ADAP_COMPLETE(dw_1, dw_i2c_init, dw_i2c_probe, dw_i2c_read, + dw_i2c_write, dw_i2c_set_bus_speed, + CONFIG_SYS_I2C_SPEED1, CONFIG_SYS_I2C_SLAVE1, 1) +#endif - return 0; -} +#if CONFIG_SYS_I2C_BUS_MAX >= 3 +U_BOOT_I2C_ADAP_COMPLETE(dw_2, dw_i2c_init, dw_i2c_probe, dw_i2c_read, + dw_i2c_write, dw_i2c_set_bus_speed, + CONFIG_SYS_I2C_SPEED2, CONFIG_SYS_I2C_SLAVE2, 2) +#endif -unsigned int i2c_get_bus_num(void) -{ - return current_bus; -} +#if CONFIG_SYS_I2C_BUS_MAX >= 4 +U_BOOT_I2C_ADAP_COMPLETE(dw_3, dw_i2c_init, dw_i2c_probe, dw_i2c_read, + dw_i2c_write, dw_i2c_set_bus_speed, + CONFIG_SYS_I2C_SPEED3, CONFIG_SYS_I2C_SLAVE3, 3) #endif diff --git a/drivers/i2c/mxs_i2c.c b/drivers/i2c/mxs_i2c.c index de3b19402b..87e05c7125 100644 --- a/drivers/i2c/mxs_i2c.c +++ b/drivers/i2c/mxs_i2c.c @@ -24,11 +24,74 @@ #define MXS_I2C_MAX_TIMEOUT 1000000 -static void mxs_i2c_reset(void) +static struct mxs_i2c_regs *mxs_i2c_get_base(struct i2c_adapter *adap) { - struct mxs_i2c_regs *i2c_regs = (struct mxs_i2c_regs *)MXS_I2C0_BASE; + if (adap->hwadapnr == 0) + return (struct mxs_i2c_regs *)MXS_I2C0_BASE; + else + return (struct mxs_i2c_regs *)MXS_I2C1_BASE; +} + +static unsigned int mxs_i2c_get_bus_speed(struct i2c_adapter *adap) +{ + struct mxs_i2c_regs *i2c_regs = mxs_i2c_get_base(adap); + uint32_t clk = mxc_get_clock(MXC_XTAL_CLK); + uint32_t timing0; + + timing0 = readl(&i2c_regs->hw_i2c_timing0); + /* + * This is a reverse version of the algorithm presented in + * i2c_set_bus_speed(). Please refer there for details. + */ + return clk / ((((timing0 >> 16) - 3) * 2) + 38); +} + +static uint mxs_i2c_set_bus_speed(struct i2c_adapter *adap, uint speed) +{ + struct mxs_i2c_regs *i2c_regs = mxs_i2c_get_base(adap); + /* + * The timing derivation algorithm. There is no documentation for this + * algorithm available, it was derived by using the scope and fiddling + * with constants until the result observed on the scope was good enough + * for 20kHz, 50kHz, 100kHz, 200kHz, 300kHz and 400kHz. It should be + * possible to assume the algorithm works for other frequencies as well. + * + * Note it was necessary to cap the frequency on both ends as it's not + * possible to configure completely arbitrary frequency for the I2C bus + * clock. + */ + uint32_t clk = mxc_get_clock(MXC_XTAL_CLK); + uint32_t base = ((clk / speed) - 38) / 2; + uint16_t high_count = base + 3; + uint16_t low_count = base - 3; + uint16_t rcv_count = (high_count * 3) / 4; + uint16_t xmit_count = low_count / 4; + + if (speed > 540000) { + printf("MXS I2C: Speed too high (%d Hz)\n", speed); + return -EINVAL; + } + + if (speed < 12000) { + printf("MXS I2C: Speed too low (%d Hz)\n", speed); + return -EINVAL; + } + + writel((high_count << 16) | rcv_count, &i2c_regs->hw_i2c_timing0); + writel((low_count << 16) | xmit_count, &i2c_regs->hw_i2c_timing1); + + writel((0x0030 << I2C_TIMING2_BUS_FREE_OFFSET) | + (0x0030 << I2C_TIMING2_LEADIN_COUNT_OFFSET), + &i2c_regs->hw_i2c_timing2); + + return 0; +} + +static void mxs_i2c_reset(struct i2c_adapter *adap) +{ + struct mxs_i2c_regs *i2c_regs = mxs_i2c_get_base(adap); int ret; - int speed = i2c_get_bus_speed(); + int speed = mxs_i2c_get_bus_speed(adap); ret = mxs_reset_block(&i2c_regs->hw_i2c_ctrl0_reg); if (ret) { @@ -43,12 +106,12 @@ static void mxs_i2c_reset(void) writel(I2C_QUEUECTRL_PIO_QUEUE_MODE, &i2c_regs->hw_i2c_queuectrl_set); - i2c_set_bus_speed(speed); + mxs_i2c_set_bus_speed(adap, speed); } -static void mxs_i2c_setup_read(uint8_t chip, int len) +static void mxs_i2c_setup_read(struct i2c_adapter *adap, uint8_t chip, int len) { - struct mxs_i2c_regs *i2c_regs = (struct mxs_i2c_regs *)MXS_I2C0_BASE; + struct mxs_i2c_regs *i2c_regs = mxs_i2c_get_base(adap); writel(I2C_QUEUECMD_RETAIN_CLOCK | I2C_QUEUECMD_PRE_SEND_START | I2C_QUEUECMD_MASTER_MODE | I2C_QUEUECMD_DIRECTION | @@ -64,10 +127,10 @@ static void mxs_i2c_setup_read(uint8_t chip, int len) writel(I2C_QUEUECTRL_QUEUE_RUN, &i2c_regs->hw_i2c_queuectrl_set); } -static int mxs_i2c_write(uchar chip, uint addr, int alen, - uchar *buf, int blen, int stop) +static int mxs_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr, + int alen, uchar *buf, int blen, int stop) { - struct mxs_i2c_regs *i2c_regs = (struct mxs_i2c_regs *)MXS_I2C0_BASE; + struct mxs_i2c_regs *i2c_regs = mxs_i2c_get_base(adap); uint32_t data, tmp; int i, remain, off; int timeout = MXS_I2C_MAX_TIMEOUT; @@ -122,9 +185,9 @@ static int mxs_i2c_write(uchar chip, uint addr, int alen, return 0; } -static int mxs_i2c_wait_for_ack(void) +static int mxs_i2c_wait_for_ack(struct i2c_adapter *adap) { - struct mxs_i2c_regs *i2c_regs = (struct mxs_i2c_regs *)MXS_I2C0_BASE; + struct mxs_i2c_regs *i2c_regs = mxs_i2c_get_base(adap); uint32_t tmp; int timeout = MXS_I2C_MAX_TIMEOUT; @@ -156,32 +219,34 @@ static int mxs_i2c_wait_for_ack(void) return 0; err: - mxs_i2c_reset(); + mxs_i2c_reset(adap); return 1; } -int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len) +static int mxs_i2c_if_read(struct i2c_adapter *adap, uint8_t chip, + uint addr, int alen, uint8_t *buffer, + int len) { - struct mxs_i2c_regs *i2c_regs = (struct mxs_i2c_regs *)MXS_I2C0_BASE; + struct mxs_i2c_regs *i2c_regs = mxs_i2c_get_base(adap); uint32_t tmp = 0; int timeout = MXS_I2C_MAX_TIMEOUT; int ret; int i; - ret = mxs_i2c_write(chip, addr, alen, NULL, 0, 0); + ret = mxs_i2c_write(adap, chip, addr, alen, NULL, 0, 0); if (ret) { debug("MXS I2C: Failed writing address\n"); return ret; } - ret = mxs_i2c_wait_for_ack(); + ret = mxs_i2c_wait_for_ack(adap); if (ret) { debug("MXS I2C: Failed writing address\n"); return ret; } - mxs_i2c_setup_read(chip, len); - ret = mxs_i2c_wait_for_ack(); + mxs_i2c_setup_read(adap, chip, len); + ret = mxs_i2c_wait_for_ack(adap); if (ret) { debug("MXS I2C: Failed reading address\n"); return ret; @@ -209,91 +274,47 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len) return 0; } -int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) +static int mxs_i2c_if_write(struct i2c_adapter *adap, uint8_t chip, + uint addr, int alen, uint8_t *buffer, + int len) { int ret; - ret = mxs_i2c_write(chip, addr, alen, buffer, len, 1); + ret = mxs_i2c_write(adap, chip, addr, alen, buffer, len, 1); if (ret) { debug("MXS I2C: Failed writing address\n"); return ret; } - ret = mxs_i2c_wait_for_ack(); + ret = mxs_i2c_wait_for_ack(adap); if (ret) debug("MXS I2C: Failed writing address\n"); return ret; } -int i2c_probe(uchar chip) +static int mxs_i2c_probe(struct i2c_adapter *adap, uint8_t chip) { int ret; - ret = mxs_i2c_write(chip, 0, 1, NULL, 0, 1); + ret = mxs_i2c_write(adap, chip, 0, 1, NULL, 0, 1); if (!ret) - ret = mxs_i2c_wait_for_ack(); - mxs_i2c_reset(); + ret = mxs_i2c_wait_for_ack(adap); + mxs_i2c_reset(adap); return ret; } -int i2c_set_bus_speed(unsigned int speed) +static void mxs_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr) { - struct mxs_i2c_regs *i2c_regs = (struct mxs_i2c_regs *)MXS_I2C0_BASE; - /* - * The timing derivation algorithm. There is no documentation for this - * algorithm available, it was derived by using the scope and fiddling - * with constants until the result observed on the scope was good enough - * for 20kHz, 50kHz, 100kHz, 200kHz, 300kHz and 400kHz. It should be - * possible to assume the algorithm works for other frequencies as well. - * - * Note it was necessary to cap the frequency on both ends as it's not - * possible to configure completely arbitrary frequency for the I2C bus - * clock. - */ - uint32_t clk = mxc_get_clock(MXC_XTAL_CLK); - uint32_t base = ((clk / speed) - 38) / 2; - uint16_t high_count = base + 3; - uint16_t low_count = base - 3; - uint16_t rcv_count = (high_count * 3) / 4; - uint16_t xmit_count = low_count / 4; - - if (speed > 540000) { - printf("MXS I2C: Speed too high (%d Hz)\n", speed); - return -EINVAL; - } - - if (speed < 12000) { - printf("MXS I2C: Speed too low (%d Hz)\n", speed); - return -EINVAL; - } - - writel((high_count << 16) | rcv_count, &i2c_regs->hw_i2c_timing0); - writel((low_count << 16) | xmit_count, &i2c_regs->hw_i2c_timing1); - - writel((0x0030 << I2C_TIMING2_BUS_FREE_OFFSET) | - (0x0030 << I2C_TIMING2_LEADIN_COUNT_OFFSET), - &i2c_regs->hw_i2c_timing2); - - return 0; -} - -unsigned int i2c_get_bus_speed(void) -{ - struct mxs_i2c_regs *i2c_regs = (struct mxs_i2c_regs *)MXS_I2C0_BASE; - uint32_t clk = mxc_get_clock(MXC_XTAL_CLK); - uint32_t timing0; - - timing0 = readl(&i2c_regs->hw_i2c_timing0); - /* - * This is a reverse version of the algorithm presented in - * i2c_set_bus_speed(). Please refer there for details. - */ - return clk / ((((timing0 >> 16) - 3) * 2) + 38); -} - -void i2c_init(int speed, int slaveadd) -{ - mxs_i2c_reset(); - i2c_set_bus_speed(speed); + mxs_i2c_reset(adap); + mxs_i2c_set_bus_speed(adap, speed); return; } + +U_BOOT_I2C_ADAP_COMPLETE(mxs0, mxs_i2c_init, mxs_i2c_probe, + mxs_i2c_if_read, mxs_i2c_if_write, + mxs_i2c_set_bus_speed, + CONFIG_SYS_I2C_SPEED, 0, 0) +U_BOOT_I2C_ADAP_COMPLETE(mxs1, mxs_i2c_init, mxs_i2c_probe, + mxs_i2c_if_read, mxs_i2c_if_write, + mxs_i2c_set_bus_speed, + CONFIG_SYS_I2C_SPEED, 0, 1) diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c index 5accbb5c22..a4d03d97cf 100644 --- a/drivers/spi/altera_spi.c +++ b/drivers/spi/altera_spi.c @@ -12,58 +12,62 @@ #include <malloc.h> #include <spi.h> -#define ALTERA_SPI_RXDATA 0 -#define ALTERA_SPI_TXDATA 4 -#define ALTERA_SPI_STATUS 8 -#define ALTERA_SPI_CONTROL 12 -#define ALTERA_SPI_SLAVE_SEL 20 - -#define ALTERA_SPI_STATUS_ROE_MSK (0x8) -#define ALTERA_SPI_STATUS_TOE_MSK (0x10) -#define ALTERA_SPI_STATUS_TMT_MSK (0x20) -#define ALTERA_SPI_STATUS_TRDY_MSK (0x40) -#define ALTERA_SPI_STATUS_RRDY_MSK (0x80) -#define ALTERA_SPI_STATUS_E_MSK (0x100) - -#define ALTERA_SPI_CONTROL_IROE_MSK (0x8) -#define ALTERA_SPI_CONTROL_ITOE_MSK (0x10) -#define ALTERA_SPI_CONTROL_ITRDY_MSK (0x40) -#define ALTERA_SPI_CONTROL_IRRDY_MSK (0x80) -#define ALTERA_SPI_CONTROL_IE_MSK (0x100) -#define ALTERA_SPI_CONTROL_SSO_MSK (0x400) +#ifndef CONFIG_ALTERA_SPI_IDLE_VAL +#define CONFIG_ALTERA_SPI_IDLE_VAL 0xff +#endif #ifndef CONFIG_SYS_ALTERA_SPI_LIST #define CONFIG_SYS_ALTERA_SPI_LIST { CONFIG_SYS_SPI_BASE } #endif +struct altera_spi_regs { + u32 rxdata; + u32 txdata; + u32 status; + u32 control; + u32 _reserved; + u32 slave_sel; +}; + +#define ALTERA_SPI_STATUS_ROE_MSK (1 << 3) +#define ALTERA_SPI_STATUS_TOE_MSK (1 << 4) +#define ALTERA_SPI_STATUS_TMT_MSK (1 << 5) +#define ALTERA_SPI_STATUS_TRDY_MSK (1 << 6) +#define ALTERA_SPI_STATUS_RRDY_MSK (1 << 7) +#define ALTERA_SPI_STATUS_E_MSK (1 << 8) + +#define ALTERA_SPI_CONTROL_IROE_MSK (1 << 3) +#define ALTERA_SPI_CONTROL_ITOE_MSK (1 << 4) +#define ALTERA_SPI_CONTROL_ITRDY_MSK (1 << 6) +#define ALTERA_SPI_CONTROL_IRRDY_MSK (1 << 7) +#define ALTERA_SPI_CONTROL_IE_MSK (1 << 8) +#define ALTERA_SPI_CONTROL_SSO_MSK (1 << 10) + static ulong altera_spi_base_list[] = CONFIG_SYS_ALTERA_SPI_LIST; struct altera_spi_slave { - struct spi_slave slave; - ulong base; + struct spi_slave slave; + struct altera_spi_regs *regs; }; #define to_altera_spi_slave(s) container_of(s, struct altera_spi_slave, slave) -__attribute__((weak)) -int spi_cs_is_valid(unsigned int bus, unsigned int cs) +__weak int spi_cs_is_valid(unsigned int bus, unsigned int cs) { return bus < ARRAY_SIZE(altera_spi_base_list) && cs < 32; } -__attribute__((weak)) -void spi_cs_activate(struct spi_slave *slave) +__weak void spi_cs_activate(struct spi_slave *slave) { struct altera_spi_slave *altspi = to_altera_spi_slave(slave); - writel(1 << slave->cs, altspi->base + ALTERA_SPI_SLAVE_SEL); - writel(ALTERA_SPI_CONTROL_SSO_MSK, altspi->base + ALTERA_SPI_CONTROL); + writel(1 << slave->cs, &altspi->regs->slave_sel); + writel(ALTERA_SPI_CONTROL_SSO_MSK, &altspi->regs->control); } -__attribute__((weak)) -void spi_cs_deactivate(struct spi_slave *slave) +__weak void spi_cs_deactivate(struct spi_slave *slave) { struct altera_spi_slave *altspi = to_altera_spi_slave(slave); - writel(0, altspi->base + ALTERA_SPI_CONTROL); - writel(0, altspi->base + ALTERA_SPI_SLAVE_SEL); + writel(0, &altspi->regs->control); + writel(0, &altspi->regs->slave_sel); } void spi_init(void) @@ -87,9 +91,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, if (!altspi) return NULL; - altspi->base = altera_spi_base_list[bus]; - debug("%s: bus:%i cs:%i base:%lx\n", __func__, - bus, cs, altspi->base); + altspi->regs = (struct altera_spi_regs *)altera_spi_base_list[bus]; + debug("%s: bus:%i cs:%i base:%p\n", __func__, bus, cs, altspi->regs); return &altspi->slave; } @@ -105,8 +108,8 @@ int spi_claim_bus(struct spi_slave *slave) struct altera_spi_slave *altspi = to_altera_spi_slave(slave); debug("%s: bus:%i cs:%i\n", __func__, slave->bus, slave->cs); - writel(0, altspi->base + ALTERA_SPI_CONTROL); - writel(0, altspi->base + ALTERA_SPI_SLAVE_SEL); + writel(0, &altspi->regs->control); + writel(0, &altspi->regs->slave_sel); return 0; } @@ -115,24 +118,22 @@ void spi_release_bus(struct spi_slave *slave) struct altera_spi_slave *altspi = to_altera_spi_slave(slave); debug("%s: bus:%i cs:%i\n", __func__, slave->bus, slave->cs); - writel(0, altspi->base + ALTERA_SPI_SLAVE_SEL); + writel(0, &altspi->regs->slave_sel); } -#ifndef CONFIG_ALTERA_SPI_IDLE_VAL -# define CONFIG_ALTERA_SPI_IDLE_VAL 0xff -#endif - int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { struct altera_spi_slave *altspi = to_altera_spi_slave(slave); /* assume spi core configured to do 8 bit transfers */ - uint bytes = bitlen / 8; - const uchar *txp = dout; - uchar *rxp = din; + unsigned int bytes = bitlen / 8; + const unsigned char *txp = dout; + unsigned char *rxp = din; + uint32_t reg, data, start; debug("%s: bus:%i cs:%i bitlen:%i bytes:%i flags:%lx\n", __func__, - slave->bus, slave->cs, bitlen, bytes, flags); + slave->bus, slave->cs, bitlen, bytes, flags); + if (bitlen == 0) goto done; @@ -142,25 +143,40 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, } /* empty read buffer */ - if (readl(altspi->base + ALTERA_SPI_STATUS) & - ALTERA_SPI_STATUS_RRDY_MSK) - readl(altspi->base + ALTERA_SPI_RXDATA); + if (readl(&altspi->regs->status) & ALTERA_SPI_STATUS_RRDY_MSK) + readl(&altspi->regs->rxdata); + if (flags & SPI_XFER_BEGIN) spi_cs_activate(slave); while (bytes--) { - uchar d = txp ? *txp++ : CONFIG_ALTERA_SPI_IDLE_VAL; - debug("%s: tx:%x ", __func__, d); - writel(d, altspi->base + ALTERA_SPI_TXDATA); - while (!(readl(altspi->base + ALTERA_SPI_STATUS) & - ALTERA_SPI_STATUS_RRDY_MSK)) - ; - d = readl(altspi->base + ALTERA_SPI_RXDATA); + if (txp) + data = *txp++; + else + data = CONFIG_ALTERA_SPI_IDLE_VAL; + + debug("%s: tx:%x ", __func__, data); + writel(data, &altspi->regs->txdata); + + start = get_timer(0); + while (1) { + reg = readl(&altspi->regs->status); + if (reg & ALTERA_SPI_STATUS_RRDY_MSK) + break; + if (get_timer(start) > (CONFIG_SYS_HZ / 1000)) { + printf("%s: Transmission timed out!\n", __func__); + goto done; + } + } + + data = readl(&altspi->regs->rxdata); if (rxp) - *rxp++ = d; - debug("rx:%x\n", d); + *rxp++ = data & 0xff; + + debug("rx:%x\n", data); } - done: + +done: if (flags & SPI_XFER_END) spi_cs_deactivate(slave); diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index be102692d4..23f2ba6223 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -49,6 +49,8 @@ struct mxc_spi_slave { #endif int gpio; int ss_pol; + unsigned int max_hz; + unsigned int mode; }; static inline struct mxc_spi_slave *to_mxc_spi_slave(struct spi_slave *slave) @@ -83,12 +85,13 @@ u32 get_cspi_div(u32 div) } #ifdef MXC_CSPI -static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned int cs, - unsigned int max_hz, unsigned int mode) +static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned int cs) { unsigned int ctrl_reg; u32 clk_src; u32 div; + unsigned int max_hz = mxcs->max_hz; + unsigned int mode = mxcs->mode; clk_src = mxc_get_clock(MXC_CSPI_CLK); @@ -120,19 +123,15 @@ static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned int cs, #endif #ifdef MXC_ECSPI -static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned int cs, - unsigned int max_hz, unsigned int mode) +static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned int cs) { u32 clk_src = mxc_get_clock(MXC_CSPI_CLK); s32 reg_ctrl, reg_config; u32 ss_pol = 0, sclkpol = 0, sclkpha = 0, sclkctl = 0; u32 pre_div = 0, post_div = 0; struct cspi_regs *regs = (struct cspi_regs *)mxcs->base; - - if (max_hz == 0) { - printf("Error: desired clock is 0\n"); - return -1; - } + unsigned int max_hz = mxcs->max_hz; + unsigned int mode = mxcs->mode; /* * Reset SPI and set all CSs to master mode, if toggling @@ -169,9 +168,6 @@ static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned int cs, reg_ctrl = (reg_ctrl & ~MXC_CSPICTRL_POSTDIV(0x0F)) | MXC_CSPICTRL_POSTDIV(post_div); - /* We need to disable SPI before changing registers */ - reg_ctrl &= ~MXC_CSPICTRL_EN; - if (mode & SPI_CS_HIGH) ss_pol = 1; @@ -412,6 +408,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, if (bus >= ARRAY_SIZE(spi_bases)) return NULL; + if (max_hz == 0) { + printf("Error: desired clock is 0\n"); + return NULL; + } + mxcs = spi_alloc_slave(struct mxc_spi_slave, bus, cs); if (!mxcs) { puts("mxc_spi: SPI Slave not allocated !\n"); @@ -427,13 +428,9 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, } mxcs->base = spi_bases[bus]; + mxcs->max_hz = max_hz; + mxcs->mode = mode; - ret = spi_cfg_mxc(mxcs, cs, max_hz, mode); - if (ret) { - printf("mxc_spi: cannot setup SPI controller\n"); - free(mxcs); - return NULL; - } return &mxcs->slave; } @@ -446,12 +443,17 @@ void spi_free_slave(struct spi_slave *slave) int spi_claim_bus(struct spi_slave *slave) { + int ret; struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave); struct cspi_regs *regs = (struct cspi_regs *)mxcs->base; reg_write(®s->rxdata, 1); udelay(1); - reg_write(®s->ctrl, mxcs->ctrl_reg); + ret = spi_cfg_mxc(mxcs, slave->cs); + if (ret) { + printf("mxc_spi: cannot setup SPI controller\n"); + return ret; + } reg_write(®s->period, MXC_CSPIPERIOD_32KHZ); reg_write(®s->intr, 0); diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index 69c0336cae..cdccbef1f6 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2003-2005 + * (C) Copyright 2003-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * (C) Copyright 2004-2006 @@ -19,6 +19,8 @@ #define CONFIG_MPC5200 1 /* This is an MPC5200 CPU */ #define CONFIG_TQM5200 1 /* ... on TQM5200 module */ #undef CONFIG_TQM5200_REV100 /* define for revision 100 modules */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO /* * Valid values for CONFIG_SYS_TEXT_BASE are: diff --git a/include/configs/TQM823L.h b/include/configs/TQM823L.h index cc2204586e..0d5a2b96f1 100644 --- a/include/configs/TQM823L.h +++ b/include/configs/TQM823L.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC823 1 /* This is a MPC823 CPU */ #define CONFIG_TQM823L 1 /* ...on a TQM8xxL module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM823M.h b/include/configs/TQM823M.h index 4fd070f27d..e765a03cfb 100644 --- a/include/configs/TQM823M.h +++ b/include/configs/TQM823M.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC823 1 /* This is a MPC823 CPU */ #define CONFIG_TQM823M 1 /* ...on a TQM8xxM module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM850L.h b/include/configs/TQM850L.h index ca3750d407..bbdc3f81fc 100644 --- a/include/configs/TQM850L.h +++ b/include/configs/TQM850L.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC850 1 /* This is a MPC850 CPU */ #define CONFIG_TQM850L 1 /* ...on a TQM8xxL module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM850M.h b/include/configs/TQM850M.h index 659c9ad1c3..5fc87f2138 100644 --- a/include/configs/TQM850M.h +++ b/include/configs/TQM850M.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC850 1 /* This is a MPC850 CPU */ #define CONFIG_TQM850M 1 /* ...on a TQM8xxM module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM855L.h b/include/configs/TQM855L.h index 906d79b0c8..589d168eba 100644 --- a/include/configs/TQM855L.h +++ b/include/configs/TQM855L.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC855 1 /* This is a MPC855 CPU */ #define CONFIG_TQM855L 1 /* ...on a TQM8xxL module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM855M.h b/include/configs/TQM855M.h index 44d456e165..60acb564e8 100644 --- a/include/configs/TQM855M.h +++ b/include/configs/TQM855M.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC855 1 /* This is a MPC855 CPU */ #define CONFIG_TQM855M 1 /* ...on a TQM8xxM module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM860L.h b/include/configs/TQM860L.h index 855b0cddc4..ebc5571632 100644 --- a/include/configs/TQM860L.h +++ b/include/configs/TQM860L.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC860 1 /* This is a MPC860 CPU */ #define CONFIG_TQM860L 1 /* ...on a TQM8xxL module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM860M.h b/include/configs/TQM860M.h index 8109379ae9..f4ce07f20e 100644 --- a/include/configs/TQM860M.h +++ b/include/configs/TQM860M.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC860 1 /* This is a MPC860 CPU */ #define CONFIG_TQM860M 1 /* ...on a TQM8xxM module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM862L.h b/include/configs/TQM862L.h index da4af93d25..97db519d53 100644 --- a/include/configs/TQM862L.h +++ b/include/configs/TQM862L.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -20,6 +20,8 @@ #define CONFIG_MPC860 1 #define CONFIG_MPC860T 1 #define CONFIG_MPC862 1 +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_TQM862L 1 /* ...on a TQM8xxL module */ diff --git a/include/configs/TQM862M.h b/include/configs/TQM862M.h index ec3a57b961..25d60a74ef 100644 --- a/include/configs/TQM862M.h +++ b/include/configs/TQM862M.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -20,6 +20,8 @@ #define CONFIG_MPC860 1 #define CONFIG_MPC860T 1 #define CONFIG_MPC862 1 +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_TQM862M 1 /* ...on a TQM8xxM module */ diff --git a/include/configs/TQM866M.h b/include/configs/TQM866M.h index cb8b84d3a1..928b879609 100644 --- a/include/configs/TQM866M.h +++ b/include/configs/TQM866M.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2008 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * SPDX-License-Identifier: GPL-2.0+ @@ -19,6 +19,8 @@ #define CONFIG_MPC866 1 /* This is a MPC866 CPU */ #define CONFIG_TQM866M 1 /* ...on a TQM8xxM module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/TQM885D.h b/include/configs/TQM885D.h index d1e6c5b2bb..598020c867 100644 --- a/include/configs/TQM885D.h +++ b/include/configs/TQM885D.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2005 + * (C) Copyright 2000-2014 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * (C) Copyright 2006 @@ -22,6 +22,8 @@ #define CONFIG_MPC885 1 /* This is a MPC885 CPU */ #define CONFIG_TQM885D 1 /* ...on a TQM88D module */ +#define CONFIG_SYS_GENERIC_BOARD +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_SYS_TEXT_BASE 0x40000000 diff --git a/include/configs/axs101.h b/include/configs/axs101.h index 1bf8390722..6e8c56c1dd 100644 --- a/include/configs/axs101.h +++ b/include/configs/axs101.h @@ -83,12 +83,15 @@ /* * I2C configuration */ -#define CONFIG_HARD_I2C -#define CONFIG_DW_I2C -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_DW #define CONFIG_I2C_ENV_EEPROM_BUS 2 #define CONFIG_SYS_I2C_SPEED 100000 +#define CONFIG_SYS_I2C_SPEED1 100000 +#define CONFIG_SYS_I2C_SPEED2 100000 #define CONFIG_SYS_I2C_SLAVE 0 +#define CONFIG_SYS_I2C_SLAVE1 0 +#define CONFIG_SYS_I2C_SLAVE2 0 #define CONFIG_SYS_I2C_BASE 0xE001D000 #define CONFIG_SYS_I2C_BASE1 0xE001E000 #define CONFIG_SYS_I2C_BASE2 0xE001F000 diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h index 4b90dc205d..fef267f70b 100644 --- a/include/configs/coreboot.h +++ b/include/configs/coreboot.h @@ -26,6 +26,7 @@ #define CONFIG_PHYSMEM #define CONFIG_SYS_EARLY_PCI_INIT #define CONFIG_DISPLAY_BOARDINFO_LATE +#define CONFIG_DISPLAY_CPUINFO #define CONFIG_DM #define CONFIG_CMD_DM @@ -48,6 +49,7 @@ #define CONFIG_FIT #undef CONFIG_ZLIB #undef CONFIG_GZIP +#define CONFIG_SYS_BOOTM_LEN (16 << 20) /*----------------------------------------------------------------------- * Watchdog Configuration @@ -221,7 +223,7 @@ #define CONFIG_SYS_MEMTEST_START 0x00100000 #define CONFIG_SYS_MEMTEST_END 0x01000000 -#define CONFIG_SYS_LOAD_ADDR 0x02000000 +#define CONFIG_SYS_LOAD_ADDR 0x20000000 /*----------------------------------------------------------------------- * SDRAM Configuration diff --git a/include/configs/mxs.h b/include/configs/mxs.h index eb96fc17f3..dea8227aeb 100644 --- a/include/configs/mxs.h +++ b/include/configs/mxs.h @@ -148,7 +148,8 @@ /* I2C */ #ifdef CONFIG_CMD_I2C -#define CONFIG_I2C_MXS +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_MXS #define CONFIG_HARD_I2C #ifndef CONFIG_SYS_I2C_SPEED #define CONFIG_SYS_I2C_SPEED 400000 diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h index c0eba3721d..a11f4ed2e1 100644 --- a/include/configs/spear-common.h +++ b/include/configs/spear-common.h @@ -37,8 +37,8 @@ #define CONFIG_EXTRA_ENV_USBTTY "usbtty=cdc_acm\0" /* I2C driver configuration */ -#define CONFIG_HARD_I2C -#define CONFIG_DW_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_DW #if defined(CONFIG_SPEAR600) #define CONFIG_SYS_I2C_BASE 0xD0200000 #elif defined(CONFIG_SPEAR300) diff --git a/include/configs/x600.h b/include/configs/x600.h index 6214dc480a..04187c0a31 100644 --- a/include/configs/x600.h +++ b/include/configs/x600.h @@ -83,8 +83,8 @@ #define CONFIG_SPEAR_GPIO /* I2C config options */ -#define CONFIG_HARD_I2C -#define CONFIG_DW_I2C +#define CONFIG_SYS_I2C +#define CONFIG_SYS_I2C_DW #define CONFIG_SYS_I2C_BASE 0xD0200000 #define CONFIG_SYS_I2C_SPEED 400000 #define CONFIG_SYS_I2C_SLAVE 0x02 diff --git a/include/image.h b/include/image.h index a13a30289f..07e9aed16d 100644 --- a/include/image.h +++ b/include/image.h @@ -173,6 +173,7 @@ struct lmb; #define IH_ARCH_OPENRISC 21 /* OpenRISC 1000 */ #define IH_ARCH_ARM64 22 /* ARM64 */ #define IH_ARCH_ARC 23 /* Synopsys DesignWare ARC */ +#define IH_ARCH_X86_64 24 /* AMD x86_64, Intel and Via */ /* * Image Types |