]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of http://git.denx.de/u-boot-samsung
authorMinkyu Kang <mk7.kang@samsung.com>
Tue, 7 Oct 2014 10:13:52 +0000 (19:13 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Tue, 7 Oct 2014 10:13:52 +0000 (19:13 +0900)
823 files changed:
Kbuild
Licenses/README
Licenses/isc.txt [new file with mode: 0644]
Makefile
arch/Kconfig
arch/arc/Kconfig
arch/arm/Kconfig
arch/arm/cpu/arm926ejs/davinci/Kconfig
arch/arm/cpu/arm926ejs/kirkwood/Kconfig
arch/arm/cpu/arm926ejs/nomadik/Kconfig
arch/arm/cpu/arm926ejs/orion5x/Kconfig
arch/arm/cpu/arm926ejs/versatile/Kconfig
arch/arm/cpu/armv7/exynos/Kconfig
arch/arm/cpu/armv7/highbank/Kconfig
arch/arm/cpu/armv7/keystone/Kconfig
arch/arm/cpu/armv7/ls102xa/Makefile [new file with mode: 0644]
arch/arm/cpu/armv7/ls102xa/clock.c [new file with mode: 0644]
arch/arm/cpu/armv7/ls102xa/cpu.c [new file with mode: 0644]
arch/arm/cpu/armv7/ls102xa/fdt.c [new file with mode: 0644]
arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.c [new file with mode: 0644]
arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.h [new file with mode: 0644]
arch/arm/cpu/armv7/ls102xa/ls102xa_serdes.c [new file with mode: 0644]
arch/arm/cpu/armv7/ls102xa/timer.c [new file with mode: 0644]
arch/arm/cpu/armv7/omap3/Kconfig
arch/arm/cpu/armv7/omap4/Kconfig
arch/arm/cpu/armv7/omap5/Kconfig
arch/arm/cpu/armv7/rmobile/Kconfig
arch/arm/cpu/armv7/tegra-common/Kconfig
arch/arm/cpu/armv7/tegra114/Kconfig
arch/arm/cpu/armv7/tegra124/Kconfig
arch/arm/cpu/armv7/tegra20/Kconfig
arch/arm/cpu/armv7/tegra30/Kconfig
arch/arm/cpu/armv7/zynq/Kconfig
arch/arm/dts/tegra114-dalmore.dts
arch/arm/dts/tegra114.dtsi
arch/arm/dts/tegra124-jetson-tk1.dts
arch/arm/dts/tegra124-venice2.dts
arch/arm/dts/tegra124.dtsi
arch/arm/dts/tegra20-colibri_t20_iris.dts
arch/arm/dts/tegra20-harmony.dts
arch/arm/dts/tegra20-medcom-wide.dts
arch/arm/dts/tegra20-paz00.dts
arch/arm/dts/tegra20-plutux.dts
arch/arm/dts/tegra20-seaboard.dts
arch/arm/dts/tegra20-tec.dts
arch/arm/dts/tegra20-trimslice.dts
arch/arm/dts/tegra20-ventana.dts
arch/arm/dts/tegra20-whistler.dts
arch/arm/dts/tegra20.dtsi
arch/arm/dts/tegra30-beaver.dts
arch/arm/dts/tegra30-cardhu.dts
arch/arm/dts/tegra30-tamonten.dtsi
arch/arm/dts/tegra30.dtsi
arch/arm/include/asm/arch-ls102xa/clock.h [new file with mode: 0644]
arch/arm/include/asm/arch-ls102xa/config.h [new file with mode: 0644]
arch/arm/include/asm/arch-ls102xa/fsl_serdes.h [new file with mode: 0644]
arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h [new file with mode: 0644]
arch/arm/include/asm/arch-ls102xa/imx-regs.h [new file with mode: 0644]
arch/arm/include/asm/arch-tegra/gpio.h
arch/arm/include/asm/config.h
arch/arm/include/asm/global_data.h
arch/arm/include/asm/io.h
arch/arm/lib/eabi_compat.c
arch/arm/lib/spl.c
arch/arm/lib/vectors.S
arch/avr32/Kconfig
arch/blackfin/Kconfig
arch/m68k/Kconfig
arch/microblaze/Kconfig
arch/microblaze/include/asm/posix_types.h
arch/mips/Kconfig
arch/nds32/Kconfig
arch/nios2/Kconfig
arch/openrisc/Kconfig
arch/powerpc/Kconfig
arch/powerpc/cpu/74xx_7xx/Kconfig
arch/powerpc/cpu/mpc512x/Kconfig
arch/powerpc/cpu/mpc5xx/Kconfig
arch/powerpc/cpu/mpc5xxx/Kconfig
arch/powerpc/cpu/mpc824x/Kconfig
arch/powerpc/cpu/mpc8260/Kconfig
arch/powerpc/cpu/mpc83xx/Kconfig
arch/powerpc/cpu/mpc85xx/Kconfig
arch/powerpc/cpu/mpc86xx/Kconfig
arch/powerpc/cpu/mpc8xx/Kconfig
arch/powerpc/cpu/ppc4xx/Kconfig
arch/powerpc/include/asm/fsl_enet.h [deleted file]
arch/sandbox/Kconfig
arch/sandbox/dts/sandbox.dts
arch/sh/Kconfig
arch/sparc/Kconfig
arch/x86/Kconfig
board/8dtech/eco5pk/Kconfig
board/AndesTech/adp-ag101/Kconfig
board/AndesTech/adp-ag101p/Kconfig
board/AndesTech/adp-ag102/Kconfig
board/Barix/ipam390/Kconfig
board/BuR/kwb/Kconfig
board/BuR/tseries/Kconfig
board/BuS/eb_cpu5282/Kconfig
board/BuS/eb_cpux9k2/Kconfig
board/BuS/vl_ma2sc/Kconfig
board/CarMediaLab/flea3/Kconfig
board/LEOX/elpt860/Kconfig
board/LaCie/edminiv2/Kconfig
board/LaCie/net2big_v2/Kconfig
board/LaCie/netspace_v2/Kconfig
board/LaCie/wireless_space/Kconfig
board/Marvell/aspenite/Kconfig
board/Marvell/db64360/Kconfig
board/Marvell/db64460/Kconfig
board/Marvell/dkb/Kconfig
board/Marvell/dreamplug/Kconfig
board/Marvell/gplugd/Kconfig
board/Marvell/guruplug/Kconfig
board/Marvell/mv88f6281gtw_ge/Kconfig
board/Marvell/openrd/Kconfig
board/Marvell/rd6281a/Kconfig
board/Marvell/sheevaplug/Kconfig
board/RRvision/Kconfig
board/Seagate/dockstar/Kconfig
board/Seagate/goflexhome/Kconfig
board/a3000/Kconfig
board/a3m071/Kconfig
board/a4m072/Kconfig
board/abilis/tb100/Kconfig
board/afeb9260/Kconfig
board/ait/cam_enc_4xx/Kconfig
board/alphaproject/ap_sh4a_4a/Kconfig
board/altera/nios2-generic/Kconfig
board/altera/socfpga/Kconfig
board/amcc/acadia/Kconfig
board/amcc/bamboo/Kconfig
board/amcc/bluestone/Kconfig
board/amcc/bubinga/Kconfig
board/amcc/canyonlands/Kconfig
board/amcc/ebony/Kconfig
board/amcc/katmai/Kconfig
board/amcc/kilauea/Kconfig
board/amcc/luan/Kconfig
board/amcc/makalu/Kconfig
board/amcc/ocotea/Kconfig
board/amcc/redwood/Kconfig
board/amcc/sequoia/Kconfig
board/amcc/taihu/Kconfig
board/amcc/taishan/Kconfig
board/amcc/walnut/Kconfig
board/amcc/yosemite/Kconfig
board/amcc/yucca/Kconfig
board/aristainetos/Kconfig
board/armadeus/apf27/Kconfig
board/armltd/integrator/Kconfig
board/armltd/vexpress/Kconfig
board/armltd/vexpress64/Kconfig
board/astro/mcf5373l/Kconfig
board/atc/Kconfig
board/atmark-techno/armadillo-800eva/Kconfig
board/atmel/at91rm9200ek/Kconfig
board/atmel/at91sam9260ek/Kconfig
board/atmel/at91sam9261ek/Kconfig
board/atmel/at91sam9263ek/Kconfig
board/atmel/at91sam9m10g45ek/Kconfig
board/atmel/at91sam9n12ek/Kconfig
board/atmel/at91sam9rlek/Kconfig
board/atmel/at91sam9x5ek/Kconfig
board/atmel/atngw100/Kconfig
board/atmel/atngw100mkii/Kconfig
board/atmel/atstk1000/Kconfig
board/atmel/sama5d3_xplained/Kconfig
board/atmel/sama5d3xek/Kconfig
board/avionic-design/medcom-wide/Kconfig
board/avionic-design/plutux/Kconfig
board/avionic-design/tec-ng/Kconfig
board/avionic-design/tec/Kconfig
board/avnet/fx12mm/Kconfig
board/avnet/v5fx30teval/Kconfig
board/balloon3/Kconfig
board/barco/titanium/Kconfig
board/bc3450/Kconfig
board/bct-brettl2/Kconfig
board/bf506f-ezkit/Kconfig
board/bf518f-ezbrd/Kconfig
board/bf525-ucr2/Kconfig
board/bf526-ezbrd/Kconfig
board/bf527-ad7160-eval/Kconfig
board/bf527-ezkit/Kconfig
board/bf527-sdp/Kconfig
board/bf533-ezkit/Kconfig
board/bf533-stamp/Kconfig
board/bf537-minotaur/Kconfig
board/bf537-pnav/Kconfig
board/bf537-srv1/Kconfig
board/bf537-stamp/Kconfig
board/bf538f-ezkit/Kconfig
board/bf548-ezkit/Kconfig
board/bf561-acvilon/Kconfig
board/bf561-ezkit/Kconfig
board/bf609-ezkit/Kconfig
board/blackstamp/Kconfig
board/blackvme/Kconfig
board/bluegiga/apx4devkit/Kconfig
board/bluewater/snapper9260/Kconfig
board/boundary/nitrogen6x/Kconfig
board/br4/Kconfig
board/broadcom/bcm28155_ap/Kconfig
board/broadcom/bcm958300k/Kconfig
board/broadcom/bcm958622hr/Kconfig
board/buffalo/lsxl/Kconfig
board/calao/sbc35_a9g20/Kconfig
board/calao/tny_a9260/Kconfig
board/calao/usb_a9263/Kconfig
board/canmb/Kconfig
board/chromebook-x86/coreboot/Kconfig
board/cirrus/edb93xx/Kconfig
board/cloudengines/pogo_e02/Kconfig
board/cm-bf527/Kconfig
board/cm-bf533/Kconfig
board/cm-bf537e/Kconfig
board/cm-bf537u/Kconfig
board/cm-bf548/Kconfig
board/cm-bf561/Kconfig
board/cm4008/Kconfig
board/cm41xx/Kconfig
board/cm5200/Kconfig
board/cmi/Kconfig
board/cobra5272/Kconfig
board/cogent/Kconfig
board/comelit/dig297/Kconfig
board/compal/paz00/Kconfig
board/compulab/cm_t335/Kconfig
board/compulab/cm_t35/Kconfig
board/compulab/cm_t54/Kconfig
board/compulab/trimslice/Kconfig
board/congatec/cgtqmx6eval/Kconfig
board/corscience/tricorder/Kconfig
board/cpc45/Kconfig
board/cpu86/Kconfig
board/cpu87/Kconfig
board/cray/L1/Kconfig
board/creative/xfi3/Kconfig
board/csb272/Kconfig
board/csb472/Kconfig
board/cu824/Kconfig
board/d-link/dns325/Kconfig
board/dave/PPChameleonEVB/Kconfig
board/davedenx/aria/Kconfig
board/davedenx/qong/Kconfig
board/davinci/da8xxevm/Kconfig
board/davinci/dm355evm/Kconfig
board/davinci/dm355leopard/Kconfig
board/davinci/dm365evm/Kconfig
board/davinci/dm6467evm/Kconfig
board/davinci/dvevm/Kconfig
board/davinci/ea20/Kconfig
board/davinci/schmoogie/Kconfig
board/davinci/sffsdr/Kconfig
board/davinci/sonata/Kconfig
board/dbau1x00/Kconfig
board/denx/m28evk/Kconfig
board/denx/m53evk/Kconfig
board/dnp5370/Kconfig
board/eXalion/Kconfig
board/earthlcd/favr-32-ezkit/Kconfig
board/egnite/ethernut5/Kconfig
board/eltec/elppc/Kconfig
board/eltec/mhpc/Kconfig
board/embest/mx6boards/Kconfig
board/emk/top5200/Kconfig
board/emk/top860/Kconfig
board/emk/top9000/Kconfig
board/enbw/enbw_cmc/Kconfig
board/ep8260/Kconfig
board/ep82xxm/Kconfig
board/esd/apc405/Kconfig
board/esd/ar405/Kconfig
board/esd/ash405/Kconfig
board/esd/cms700/Kconfig
board/esd/cpci2dp/Kconfig
board/esd/cpci405/Kconfig
board/esd/cpci5200/Kconfig
board/esd/cpci750/Kconfig
board/esd/cpciiser4/Kconfig
board/esd/dp405/Kconfig
board/esd/du405/Kconfig
board/esd/du440/Kconfig
board/esd/hh405/Kconfig
board/esd/hub405/Kconfig
board/esd/mecp5123/Kconfig
board/esd/mecp5200/Kconfig
board/esd/meesc/Kconfig
board/esd/ocrtc/Kconfig
board/esd/otc570/Kconfig
board/esd/pci405/Kconfig
board/esd/pf5200/Kconfig
board/esd/plu405/Kconfig
board/esd/pmc405/Kconfig
board/esd/pmc405de/Kconfig
board/esd/pmc440/Kconfig
board/esd/tasreg/Kconfig
board/esd/vme8349/Kconfig
board/esd/voh405/Kconfig
board/esd/vom405/Kconfig
board/esd/wuh405/Kconfig
board/esg/ima3-mx53/Kconfig
board/espt/Kconfig
board/esteem192e/Kconfig
board/eukrea/cpu9260/Kconfig
board/eukrea/cpuat91/Kconfig
board/evb64260/Kconfig
board/exmeritus/hww1u1a/Kconfig
board/faraday/a320evb/Kconfig
board/freescale/b4860qds/Kconfig
board/freescale/bsc9131rdb/Kconfig
board/freescale/bsc9132qds/Kconfig
board/freescale/c29xpcie/Kconfig
board/freescale/common/Makefile
board/freescale/common/dcu_sii9022a.c [new file with mode: 0644]
board/freescale/common/dcu_sii9022a.h [new file with mode: 0644]
board/freescale/corenet_ds/Kconfig
board/freescale/ls1021aqds/Kconfig [new file with mode: 0644]
board/freescale/ls1021aqds/MAINTAINERS [new file with mode: 0644]
board/freescale/ls1021aqds/Makefile [new file with mode: 0644]
board/freescale/ls1021aqds/README [new file with mode: 0644]
board/freescale/ls1021aqds/ddr.c [new file with mode: 0644]
board/freescale/ls1021aqds/ddr.h [new file with mode: 0644]
board/freescale/ls1021aqds/eth.c [new file with mode: 0644]
board/freescale/ls1021aqds/ls1021aqds.c [new file with mode: 0644]
board/freescale/ls1021aqds/ls1021aqds_qixis.h [new file with mode: 0644]
board/freescale/ls1021atwr/Kconfig [new file with mode: 0644]
board/freescale/ls1021atwr/MAINTAINERS [new file with mode: 0644]
board/freescale/ls1021atwr/Makefile [new file with mode: 0644]
board/freescale/ls1021atwr/README [new file with mode: 0644]
board/freescale/ls1021atwr/dcu.c [new file with mode: 0644]
board/freescale/ls1021atwr/ls1021atwr.c [new file with mode: 0644]
board/freescale/ls2085a/Kconfig
board/freescale/m5208evbe/Kconfig
board/freescale/m52277evb/Kconfig
board/freescale/m5235evb/Kconfig
board/freescale/m5249evb/Kconfig
board/freescale/m5253demo/Kconfig
board/freescale/m5253evbe/Kconfig
board/freescale/m5272c3/Kconfig
board/freescale/m5275evb/Kconfig
board/freescale/m5282evb/Kconfig
board/freescale/m53017evb/Kconfig
board/freescale/m5329evb/Kconfig
board/freescale/m5373evb/Kconfig
board/freescale/m54418twr/Kconfig
board/freescale/m54451evb/Kconfig
board/freescale/m54455evb/Kconfig
board/freescale/m547xevb/Kconfig
board/freescale/m548xevb/Kconfig
board/freescale/mpc5121ads/Kconfig
board/freescale/mpc7448hpc2/Kconfig
board/freescale/mpc8266ads/Kconfig
board/freescale/mpc8308rdb/Kconfig
board/freescale/mpc8313erdb/Kconfig
board/freescale/mpc8315erdb/Kconfig
board/freescale/mpc8323erdb/Kconfig
board/freescale/mpc832xemds/Kconfig
board/freescale/mpc8349emds/Kconfig
board/freescale/mpc8349itx/Kconfig
board/freescale/mpc8360emds/Kconfig
board/freescale/mpc8360emds/mpc8360emds.c
board/freescale/mpc8360erdk/Kconfig
board/freescale/mpc837xemds/Kconfig
board/freescale/mpc837xemds/mpc837xemds.c
board/freescale/mpc837xerdb/Kconfig
board/freescale/mpc8536ds/Kconfig
board/freescale/mpc8540ads/Kconfig
board/freescale/mpc8541cds/Kconfig
board/freescale/mpc8544ds/Kconfig
board/freescale/mpc8548cds/Kconfig
board/freescale/mpc8555cds/Kconfig
board/freescale/mpc8560ads/Kconfig
board/freescale/mpc8568mds/Kconfig
board/freescale/mpc8569mds/Kconfig
board/freescale/mpc8572ds/Kconfig
board/freescale/mpc8610hpcd/Kconfig
board/freescale/mpc8641hpcn/Kconfig
board/freescale/mx23evk/Kconfig
board/freescale/mx25pdk/Kconfig
board/freescale/mx28evk/Kconfig
board/freescale/mx31ads/Kconfig
board/freescale/mx31pdk/Kconfig
board/freescale/mx35pdk/Kconfig
board/freescale/mx51evk/Kconfig
board/freescale/mx53ard/Kconfig
board/freescale/mx53evk/Kconfig
board/freescale/mx53loco/Kconfig
board/freescale/mx53smd/Kconfig
board/freescale/mx6qarm2/Kconfig
board/freescale/mx6qsabreauto/Kconfig
board/freescale/mx6sabresd/Kconfig
board/freescale/mx6slevk/Kconfig
board/freescale/mx6sxsabresd/Kconfig
board/freescale/p1010rdb/Kconfig
board/freescale/p1022ds/Kconfig
board/freescale/p1023rdb/Kconfig
board/freescale/p1_p2_rdb/Kconfig
board/freescale/p1_p2_rdb_pc/Kconfig
board/freescale/p1_twr/Kconfig
board/freescale/p2020come/Kconfig
board/freescale/p2020ds/Kconfig
board/freescale/p2041rdb/Kconfig
board/freescale/qemu-ppce500/Kconfig
board/freescale/t1040qds/Kconfig
board/freescale/t104xrdb/Kconfig
board/freescale/t208xqds/Kconfig
board/freescale/t208xrdb/Kconfig
board/freescale/t4qds/Kconfig
board/freescale/t4rdb/Kconfig
board/freescale/vf610twr/Kconfig
board/funkwerk/vovpn-gw/Kconfig
board/g2000/Kconfig
board/gaisler/gr_cpci_ax2000/Kconfig
board/gaisler/gr_ep2s60/Kconfig
board/gaisler/gr_xc3s_1500/Kconfig
board/gaisler/grsim/Kconfig
board/gaisler/grsim_leon2/Kconfig
board/galaxy5200/Kconfig
board/gateworks/gw_ventana/Kconfig
board/gdsys/405ep/Kconfig
board/gdsys/405ex/Kconfig
board/gdsys/dlvision/Kconfig
board/gdsys/gdppc440etx/Kconfig
board/gdsys/intip/Kconfig
board/gdsys/p1022/Kconfig
board/genesi/mx51_efikamx/Kconfig
board/gumstix/duovero/Kconfig
board/gumstix/pepper/Kconfig
board/gw8260/Kconfig
board/h2200/Kconfig
board/hale/tt01/Kconfig
board/hermes/Kconfig
board/htkw/mcx/Kconfig
board/hymod/Kconfig
board/ibf-dsp561/Kconfig
board/icecube/Kconfig
board/icpdas/lp8x4x/Kconfig
board/icu862/Kconfig
board/ids/ids8247/Kconfig
board/ids/ids8313/Kconfig
board/ifm/ac14xx/Kconfig
board/ifm/o2dnt2/Kconfig
board/imgtec/malta/Kconfig
board/imx31_phycore/Kconfig
board/in-circuit/grasshopper/Kconfig
board/inka4x0/Kconfig
board/intercontrol/digsy_mtc/Kconfig
board/iomega/iconnect/Kconfig
board/ip04/Kconfig
board/ip860/Kconfig
board/ipek01/Kconfig
board/iphase4539/Kconfig
board/isee/igep0033/Kconfig
board/isee/igep00x0/Kconfig
board/ivm/Kconfig
board/jornada/Kconfig
board/jse/Kconfig
board/jupiter/Kconfig
board/karo/tk71/Kconfig
board/karo/tx25/Kconfig
board/keymile/km82xx/Kconfig
board/keymile/km83xx/Kconfig
board/keymile/km_arm/Kconfig
board/keymile/kmp204x/Kconfig
board/kmc/kzm9g/Kconfig
board/korat/Kconfig
board/kup/kup4k/Kconfig
board/kup/kup4x/Kconfig
board/logicpd/am3517evm/Kconfig
board/logicpd/imx27lite/Kconfig
board/logicpd/imx31_litekit/Kconfig
board/logicpd/omap3som/Kconfig
board/logicpd/zoom1/Kconfig
board/lwmon/Kconfig
board/lwmon5/Kconfig
board/manroland/hmi1001/Kconfig
board/manroland/mucmc52/Kconfig
board/manroland/uc100/Kconfig
board/manroland/uc101/Kconfig
board/matrix_vision/mergerbox/Kconfig
board/matrix_vision/mvbc_p/Kconfig
board/matrix_vision/mvblm7/Kconfig
board/matrix_vision/mvblx/Kconfig
board/matrix_vision/mvsmr/Kconfig
board/mcc200/Kconfig
board/micronas/vct/Kconfig
board/mimc/mimc200/Kconfig
board/miromico/hammerhead/Kconfig
board/mosaixtech/icon/Kconfig
board/motionpro/Kconfig
board/mpc8308_p1m/Kconfig
board/mpl/mip405/Kconfig
board/mpl/pati/Kconfig
board/mpl/pip405/Kconfig
board/mpl/vcma9/Kconfig
board/mpr2/Kconfig
board/ms7720se/Kconfig
board/ms7722se/Kconfig
board/ms7750se/Kconfig
board/muas3001/Kconfig
board/munices/Kconfig
board/musenki/Kconfig
board/mvblue/Kconfig
board/netvia/Kconfig
board/nokia/rx51/Kconfig
board/nvidia/beaver/Kconfig
board/nvidia/cardhu/Kconfig
board/nvidia/dalmore/Kconfig
board/nvidia/harmony/Kconfig
board/nvidia/jetson-tk1/Kconfig
board/nvidia/seaboard/Kconfig
board/nvidia/seaboard/seaboard.c
board/nvidia/venice2/Kconfig
board/nvidia/ventana/Kconfig
board/nvidia/whistler/Kconfig
board/olimex/mx23_olinuxino/Kconfig
board/omicron/calimain/Kconfig
board/openrisc/openrisc-generic/Kconfig
board/overo/Kconfig
board/palmld/Kconfig
board/palmtc/Kconfig
board/palmtreo680/Kconfig
board/pandora/Kconfig
board/pb1x00/Kconfig
board/pcs440ep/Kconfig
board/pdm360ng/Kconfig
board/phytec/pcm030/Kconfig
board/phytec/pcm051/Kconfig
board/pm520/Kconfig
board/pm826/Kconfig
board/pm828/Kconfig
board/ppcag/bg0900/Kconfig
board/ppmc7xx/Kconfig
board/ppmc8260/Kconfig
board/pr1/Kconfig
board/prodrive/alpr/Kconfig
board/prodrive/p3mx/Kconfig
board/prodrive/p3p440/Kconfig
board/pxa255_idp/Kconfig
board/qemu-mips/Kconfig
board/r360mpi/Kconfig
board/raidsonic/ib62x0/Kconfig
board/raspberrypi/rpi_b/Kconfig
board/renesas/MigoR/Kconfig
board/renesas/alt/Kconfig
board/renesas/ap325rxa/Kconfig
board/renesas/ecovec/Kconfig
board/renesas/koelsch/Kconfig
board/renesas/lager/Kconfig
board/renesas/r0p7734/Kconfig
board/renesas/r2dplus/Kconfig
board/renesas/r7780mp/Kconfig
board/renesas/rsk7203/Kconfig
board/renesas/rsk7264/Kconfig
board/renesas/rsk7269/Kconfig
board/renesas/sh7752evb/Kconfig
board/renesas/sh7753evb/Kconfig
board/renesas/sh7757lcr/Kconfig
board/renesas/sh7763rdp/Kconfig
board/renesas/sh7785lcr/Kconfig
board/ronetix/pm9261/Kconfig
board/ronetix/pm9263/Kconfig
board/ronetix/pm9g45/Kconfig
board/sacsng/Kconfig
board/samsung/arndale/Kconfig
board/samsung/goni/Kconfig
board/samsung/odroid/Kconfig
board/samsung/origen/Kconfig
board/samsung/smdk2410/Kconfig
board/samsung/smdk5250/Kconfig
board/samsung/smdk5420/Kconfig
board/samsung/smdkc100/Kconfig
board/samsung/smdkv310/Kconfig
board/samsung/trats/Kconfig
board/samsung/trats2/Kconfig
board/samsung/universal_c210/Kconfig
board/sandburst/karef/Kconfig
board/sandburst/metrobox/Kconfig
board/sandisk/sansa_fuze_plus/Kconfig
board/sandpoint/Kconfig
board/sbc405/Kconfig
board/sbc8349/Kconfig
board/sbc8548/Kconfig
board/sbc8641d/Kconfig
board/sc3/Kconfig
board/scb9328/Kconfig
board/schulercontrol/sc_sps_1/Kconfig
board/shmin/Kconfig
board/siemens/corvus/Kconfig
board/siemens/draco/Kconfig
board/siemens/pxm2/Kconfig
board/siemens/rut/Kconfig
board/siemens/taurus/Kconfig
board/silica/pengwyn/Kconfig
board/socrates/Kconfig
board/solidrun/hummingboard/Kconfig
board/spd8xx/Kconfig
board/spear/spear300/Kconfig
board/spear/spear310/Kconfig
board/spear/spear320/Kconfig
board/spear/spear600/Kconfig
board/spear/x600/Kconfig
board/st-ericsson/snowball/Kconfig
board/st-ericsson/u8500/Kconfig
board/st/nhk8815/Kconfig
board/stx/stxgp3/Kconfig
board/stx/stxssa/Kconfig
board/sunxi/Kconfig
board/synopsys/Kconfig
board/synopsys/axs101/Kconfig
board/syteco/jadecpu/Kconfig
board/syteco/zmx25/Kconfig
board/t3corp/Kconfig
board/taskit/stamp9g20/Kconfig
board/tcm-bf518/Kconfig
board/tcm-bf537/Kconfig
board/technexion/tao3530/Kconfig
board/technexion/twister/Kconfig
board/teejet/mt_ventoux/Kconfig
board/ti/am335x/Kconfig
board/ti/am3517crane/Kconfig
board/ti/am43xx/Kconfig
board/ti/beagle/Kconfig
board/ti/dra7xx/Kconfig
board/ti/evm/Kconfig
board/ti/ks2_evm/Kconfig
board/ti/omap5_uevm/Kconfig
board/ti/panda/Kconfig
board/ti/sdp3430/Kconfig
board/ti/sdp4430/Kconfig
board/ti/ti814x/Kconfig
board/ti/ti816x/Kconfig
board/ti/tnetv107xevm/Kconfig
board/timll/devkit3250/Kconfig
board/timll/devkit8000/Kconfig
board/toradex/colibri_pxa270/Kconfig
board/toradex/colibri_t20_iris/Kconfig
board/toradex/colibri_t30/Kconfig
board/total5200/Kconfig
board/tqc/tqm5200/Kconfig
board/tqc/tqm8260/Kconfig
board/tqc/tqm8272/Kconfig
board/tqc/tqm834x/Kconfig
board/tqc/tqm8xx/Kconfig
board/tqc/tqma6/Kconfig
board/trizepsiv/Kconfig
board/ttcontrol/vision2/Kconfig
board/udoo/Kconfig
board/utx8245/Kconfig
board/v38b/Kconfig
board/ve8313/Kconfig
board/vpac270/Kconfig
board/w7o/Kconfig
board/wandboard/Kconfig
board/woodburn/Kconfig
board/xaeniax/Kconfig
board/xes/xpedite1000/Kconfig
board/xes/xpedite517x/Kconfig
board/xes/xpedite520x/Kconfig
board/xes/xpedite537x/Kconfig
board/xes/xpedite550x/Kconfig
board/xilinx/microblaze-generic/Kconfig
board/xilinx/ml507/Kconfig
board/xilinx/ppc405-generic/Kconfig
board/xilinx/ppc440-generic/Kconfig
board/zeus/Kconfig
board/zipitz2/Kconfig
common/aboot.c [new file with mode: 0644]
common/board_f.c
common/board_r.c
common/bouncebuf.c
common/cmd_mem.c
common/cmd_mtdparts.c
common/kgdb.c
common/spl/spl.c
common/stdio.c
configs/ls1021aqds_nor_defconfig [new file with mode: 0644]
configs/ls1021atwr_nor_defconfig [new file with mode: 0644]
doc/README.clang [new file with mode: 0644]
doc/README.fsl-esdhc [new file with mode: 0644]
doc/README.scrapyard
doc/device-tree-bindings/serial/ns16550.txt [new file with mode: 0644]
doc/device-tree-bindings/serial/sandbox-serial.txt [new file with mode: 0644]
drivers/core/lists.c
drivers/core/root.c
drivers/ddr/fsl/arm_ddr_gen3.c
drivers/ddr/fsl/ctrl_regs.c
drivers/ddr/fsl/interactive.c
drivers/gpio/tegra_gpio.c
drivers/i2c/mxc_i2c.c
drivers/mmc/fsl_esdhc.c
drivers/mtd/mtdconcat.c
drivers/mtd/mtdcore.c
drivers/mtd/mtdpart.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nand/nand_ids.c
drivers/mtd/ubi/attach.c
drivers/mtd/ubi/build.c
drivers/mtd/ubi/crc32.c
drivers/mtd/ubi/debug.c
drivers/mtd/ubi/debug.h
drivers/mtd/ubi/eba.c
drivers/mtd/ubi/fastmap.c
drivers/mtd/ubi/io.c
drivers/mtd/ubi/kapi.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/upd.c
drivers/mtd/ubi/vmt.c
drivers/mtd/ubi/vtbl.c
drivers/mtd/ubi/wl.c
drivers/net/ethoc.c
drivers/net/fm/dtsec.c
drivers/net/fm/fm.h
drivers/net/fm/init.c
drivers/net/fm/memac.c
drivers/net/fm/tgec.c
drivers/net/fsl_mdio.c
drivers/net/rtl8169.c
drivers/net/tsec.c
drivers/qe/uec.h
drivers/serial/Makefile
drivers/serial/ns16550.c
drivers/serial/sandbox.c
drivers/serial/serial-uclass.c [new file with mode: 0644]
drivers/serial/serial.c
drivers/serial/serial_lpuart.c
drivers/serial/serial_ns16550.c
drivers/serial/serial_tegra.c [new file with mode: 0644]
drivers/usb/musb-new/am35x.c
drivers/usb/musb-new/musb_core.c
drivers/usb/musb-new/musb_dsps.c
drivers/usb/musb-new/musb_gadget.c
drivers/usb/musb-new/musb_gadget_ep0.c
drivers/usb/musb-new/musb_host.c
drivers/usb/musb-new/musb_uboot.c
drivers/usb/musb-new/omap2430.c
drivers/video/Makefile
drivers/video/fsl_dcu_fb.c [new file with mode: 0644]
drivers/watchdog/Makefile
examples/standalone/stubs.c
fs/ubifs/budget.c
fs/ubifs/debug.c
fs/ubifs/debug.h
fs/ubifs/io.c
fs/ubifs/log.c
fs/ubifs/lprops.c
fs/ubifs/lpt.c
fs/ubifs/lpt_commit.c
fs/ubifs/master.c
fs/ubifs/misc.h
fs/ubifs/recovery.c
fs/ubifs/replay.c
fs/ubifs/sb.c
fs/ubifs/scan.c
fs/ubifs/super.c
fs/ubifs/tnc.c
fs/ubifs/tnc_misc.c
fs/ubifs/ubifs.c
fs/ubifs/ubifs.h
include/aboot.h [new file with mode: 0644]
include/configs/ls1021aqds.h [new file with mode: 0644]
include/configs/ls1021atwr.h [new file with mode: 0644]
include/configs/sandbox.h
include/configs/tegra-common.h
include/dm/lists.h
include/dm/uclass-id.h
include/dt-bindings/clock/tegra114-car.h [new file with mode: 0644]
include/dt-bindings/clock/tegra124-car.h [new file with mode: 0644]
include/dt-bindings/clock/tegra20-car.h [new file with mode: 0644]
include/dt-bindings/clock/tegra30-car.h [new file with mode: 0644]
include/fdtdec.h
include/fm_eth.h
include/fsl_dcu_fb.h [new file with mode: 0644]
include/fsl_ddr_sdram.h
include/fsl_esdhc.h
include/fsl_mdio.h
include/linux/compiler-clang.h [new file with mode: 0644]
include/linux/compiler-gcc.h
include/linux/compiler-gcc3.h
include/linux/compiler-gcc4.h
include/linux/compiler-intel.h [new file with mode: 0644]
include/linux/compiler.h
include/linux/kbuild.h
include/linux/mtd/flashchip.h
include/linux/mtd/mtd.h
include/linux/mtd/nand.h
include/linux/mtd/ubi.h
include/linux/rbtree.h
include/mtd/mtd-abi.h
include/ns16550.h
include/serial.h
include/sparse_defs.h [new file with mode: 0644]
include/stdio_dev.h
include/systemace.h
include/tsec.h
lib/fdtdec.c
lib/list_sort.c
lib/rbtree.c
scripts/Kbuild.include
scripts/multiconfig.sh
tools/buildman/README
tools/buildman/board.py
tools/buildman/bsettings.py
tools/buildman/builder.py
tools/buildman/builderthread.py
tools/buildman/buildman.py
tools/buildman/cmdline.py [new file with mode: 0644]
tools/buildman/control.py
tools/buildman/func_test.py [new file with mode: 0644]
tools/buildman/kconfiglib.py [new file with mode: 0644]
tools/buildman/test.py
tools/buildman/toolchain.py
tools/genboardscfg.py
tools/patman/command.py
tools/patman/gitutil.py
tools/patman/patchstream.py
tools/patman/patman.py
tools/patman/terminal.py
tools/patman/test.py

diff --git a/Kbuild b/Kbuild
index 6e1698c5bf63aba67cf8bb6a02dfd23432f94c57..ef97787bf45945ee22803325a641d13b9c4468d9 100644 (file)
--- a/Kbuild
+++ b/Kbuild
@@ -53,7 +53,8 @@ targets += arch/$(ARCH)/lib/asm-offsets.s
 
 # Default sed regexp - multiline due to syntax constraints
 define sed-y
-       "/^->/{s:->#\(.*\):/* \1 */:; \
+       "s:[[:space:]]*\.ascii[[:space:]]*\"\(.*\)\":\1:; \
+       /^->/{s:->#\(.*\):/* \1 */:; \
        s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
        s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
        s:->::; p;}"
index c6ff2774fc9458e5ae804204d14a193378438545..fe6dadcc7d8642a2f9a1925975d66275c93427e5 100644 (file)
@@ -66,3 +66,4 @@ BSD 2-Clause License                          BSD-2-Clause    Y               bsd-2-clause.txt        http://spdx.org/license
 BSD 3-clause "New" or "Revised" License                BSD-3-Clause    Y               bsd-3-clause.txt        http://spdx.org/licenses/BSD-3-Clause#licenseText
 IBM PIBS (PowerPC Initialization and           IBM-pibs                        ibm-pibs.txt
        Boot Software) license
+ISC License                                    ISC             Y               isc.txt                 https://spdx.org/licenses/ISC
diff --git a/Licenses/isc.txt b/Licenses/isc.txt
new file mode 100644 (file)
index 0000000..4b7c2ba
--- /dev/null
@@ -0,0 +1,17 @@
+ISC License:
+Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995-2003 by Internet Software Consortium
+
+Permission to use, copy, modify, and/or distribute this software
+for any purpose with or without fee is hereby granted,
+provided that the above copyright notice and this permission notice
+appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE
+FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
index fdda3ec0535bea0f5069d98f3b03a695d2661af4..1fccd0b7e209f50f6c82c3324490cd7261469dad 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -197,8 +197,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
          else if [ -x /bin/bash ]; then echo /bin/bash; \
          else echo sh; fi ; fi)
 
-HOSTCC       = gcc
-HOSTCXX      = g++
+HOSTCC       = cc
+HOSTCXX      = c++
 HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTCXXFLAGS = -O2
 
@@ -341,7 +341,7 @@ CHECK               = sparse
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
                  -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF)
 
-KBUILD_CPPFLAGS := -D__KERNEL__
+KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
 
 KBUILD_CFLAGS   := -Wall -Wstrict-prototypes \
                   -Wno-format-security \
@@ -458,7 +458,7 @@ KBUILD_DEFCONFIG := sandbox_defconfig
 export KBUILD_DEFCONFIG KBUILD_KCONFIG
 
 config: scripts_basic outputmakefile FORCE
-       (Q)$(MAKE) $(build)=scripts/kconfig $@
+       +$(Q)$(CONFIG_SHELL) $(srctree)/scripts/multiconfig.sh $@
 
 %config: scripts_basic outputmakefile FORCE
        +$(Q)$(CONFIG_SHELL) $(srctree)/scripts/multiconfig.sh $@
index 8620a4f94b0a8f57564f4869a7e350c4d4335e2e..c9ccb7db1799cc21613aa979766574c5d348d948 100644 (file)
@@ -49,6 +49,62 @@ config X86
 
 endchoice
 
+config SYS_ARCH
+       string
+       help
+         This option should contain the architecture name to build the
+         appropriate arch/<CONFIG_SYS_ARCH> directory.
+         All the architectures should specify this option correctly.
+
+config SYS_CPU
+       string
+       help
+         This option should contain the CPU name to build the correct
+         arch/<CONFIG_SYS_ARCH>/cpu/<CONFIG_SYS_CPU> directory.
+
+         This is optional.  For those targets without the CPU directory,
+         leave this option empty.
+
+config SYS_SOC
+       string
+       help
+         This option should contain the SoC name to build the directory
+         arch/<CONFIG_SYS_ARCH>/cpu/<CONFIG_SYS_CPU>/<CONFIG_SYS_SOC>.
+
+         This is optional.  For those targets without the SoC directory,
+         leave this option empty.
+
+config SYS_VENDOR
+       string
+       help
+         This option should contain the vendor name of the target board.
+         If it is set and
+         board/<CONFIG_SYS_VENDOR>/common/Makefile exists, the vendor common
+         directory is compiled.
+         If CONFIG_SYS_BOARD is also set, the sources under
+         board/<CONFIG_SYS_VENDOR>/<CONFIG_SYS_BOARD> directory are compiled.
+
+         This is optional.  For those targets without the vendor directory,
+         leave this option empty.
+
+config SYS_BOARD
+       string
+       help
+         This option should contain the name of the target board.
+         If it is set, either board/<CONFIG_SYS_VENDOR>/<CONFIG_SYS_BOARD>
+         or board/<CONFIG_SYS_BOARD> directory is compiled depending on
+         whether CONFIG_SYS_VENDOR is set or not.
+
+         This is optional.  For those targets without the board directory,
+         leave this option empty.
+
+config SYS_CONFIG_NAME
+       string
+       help
+         This option should contain the base name of board header file.
+         The header file include/configs/<CONFIG_SYS_CONFIG_NAME>.h
+         should be included from include/config.h.
+
 source "arch/arc/Kconfig"
 source "arch/arm/Kconfig"
 source "arch/avr32/Kconfig"
index 51d5aff08e68667c00a42bb244e4857eef6b32e0..d3ef58be043c20d43f4807c8aa74e8f1ff8d48dc 100644 (file)
@@ -2,7 +2,6 @@ menu "ARC architecture"
        depends on ARC
 
 config SYS_ARCH
-       string
        default "arc"
 
 choice
index 22f0f09af6e96cd7df49c10812d1363c4da7faee..c8537bbe88047f7fefc5ca6700fb72bfdefbff13 100644 (file)
@@ -2,7 +2,6 @@ menu "ARM architecture"
        depends on ARM
 
 config SYS_ARCH
-       string
        default "arm"
 
 choice
@@ -470,6 +469,12 @@ config TARGET_LS2085A_EMU
 config TARGET_LS2085A_SIMU
        bool "Support ls2085a_simu"
 
+config TARGET_LS1021AQDS
+       bool "Support ls1021aqds_nor"
+
+config TARGET_LS1021ATWR
+       bool "Support ls1021atwr_nor"
+
 config TARGET_BALLOON3
        bool "Support balloon3"
 
@@ -594,6 +599,8 @@ source "board/eukrea/cpu9260/Kconfig"
 source "board/eukrea/cpuat91/Kconfig"
 source "board/faraday/a320evb/Kconfig"
 source "board/freescale/ls2085a/Kconfig"
+source "board/freescale/ls1021aqds/Kconfig"
+source "board/freescale/ls1021atwr/Kconfig"
 source "board/freescale/mx23evk/Kconfig"
 source "board/freescale/mx25pdk/Kconfig"
 source "board/freescale/mx28evk/Kconfig"
index be1b0f9126cfaa8911224dfcda33499f66323670..4c18ab631ef8142b2aebc6e3bbbe4b847193c448 100644 (file)
@@ -54,11 +54,9 @@ config TARGET_CALIMAIN
 endchoice
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_SOC
-       string
        default "davinci"
 
 source "board/enbw/enbw_cmc/Kconfig"
index 58867f3cf170e9701c629fc60253b77a4d7ddccd..91ffedf732b06df284c0ef25a90f2c3b7b083f07 100644 (file)
@@ -60,11 +60,9 @@ config TARGET_GOFLEXHOME
 endchoice
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_SOC
-       string
        default "kirkwood"
 
 source "board/Marvell/openrd/Kconfig"
index 7177800a6172e277faa2c7cf8837f77a042c7957..eda51fdc37827d2a547f6bcfdd94c7717a44e345 100644 (file)
@@ -9,11 +9,9 @@ config NOMADIK_NHK8815
 endchoice
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_SOC
-       string
        default "nomadik"
 
 source "board/st/nhk8815/Kconfig"
index aa4009903794f171f62fd6a7e33692d95a4bdbe3..2d0ab2be173d2a01b01e4fe015538884811b7c09 100644 (file)
@@ -9,11 +9,9 @@ config TARGET_EDMINIV2
 endchoice
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_SOC
-       string
        default "orion5x"
 
 source "board/LaCie/edminiv2/Kconfig"
index fc29c9800fd0b0c16214eebe902c943651291cfa..35c16d876ce43cb16f8e23f0fc41bec6feffaeb2 100644 (file)
@@ -1,23 +1,18 @@
 if ARCH_VERSATILE
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "versatile"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_SOC
-       string
        default "versatile"
 
 config SYS_CONFIG_NAME
-       string
        default "versatile"
 
 endif
index b6a558b235ea6baefba6d7c3a913c0f49b5821e2..d132f035146fc52f6e92512e8707e47de2be772b 100644 (file)
@@ -39,11 +39,9 @@ config TARGET_PEACH_PIT
 endchoice
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_SOC
-       string
        default "exynos"
 
 source "board/samsung/smdkv310/Kconfig"
index 9527928f6a80192cfd4d7c1856f7598c8471ddf2..29ff99511cd3210748bb0b36879173308fca7a7d 100644 (file)
@@ -1,19 +1,15 @@
 if ARCH_HIGHBANK
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "highbank"
 
 config SYS_SOC
-       string
        default "highbank"
 
 config SYS_CONFIG_NAME
-       string
        default "highbank"
 
 endif
index 24d0cbe82007172d08af30e8209276354bd25ab7..8249b5e27036f7380ef19252792e59553f4f1b1f 100644 (file)
@@ -12,11 +12,9 @@ config TARGET_K2E_EVM
 endchoice
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_SOC
-       string
        default "keystone"
 
 source "board/ti/ks2_evm/Kconfig"
diff --git a/arch/arm/cpu/armv7/ls102xa/Makefile b/arch/arm/cpu/armv7/ls102xa/Makefile
new file mode 100644 (file)
index 0000000..d82ce8d
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# Copyright 2014 Freescale Semiconductor, Inc.
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y  += cpu.o
+obj-y  += clock.o
+obj-y  += timer.o
+
+obj-$(CONFIG_OF_LIBFDT) += fdt.o
+obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
diff --git a/arch/arm/cpu/armv7/ls102xa/clock.c b/arch/arm/cpu/armv7/ls102xa/clock.c
new file mode 100644 (file)
index 0000000..8f80c61
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/immap_ls102xa.h>
+#include <asm/arch/clock.h>
+#include <fsl_ifc.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifndef CONFIG_SYS_FSL_NUM_CC_PLLS
+#define CONFIG_SYS_FSL_NUM_CC_PLLS      2
+#endif
+
+void get_sys_info(struct sys_info *sys_info)
+{
+       struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+#ifdef CONFIG_FSL_IFC
+       struct fsl_ifc *ifc_regs = (void *)CONFIG_SYS_IFC_ADDR;
+       u32 ccr;
+#endif
+       struct ccsr_clk *clk = (void *)(CONFIG_SYS_FSL_LS1_CLK_ADDR);
+       unsigned int cpu;
+       const u8 core_cplx_pll[6] = {
+               [0] = 0,        /* CC1 PPL / 1 */
+               [1] = 0,        /* CC1 PPL / 2 */
+               [4] = 1,        /* CC2 PPL / 1 */
+               [5] = 1,        /* CC2 PPL / 2 */
+       };
+
+       const u8 core_cplx_pll_div[6] = {
+               [0] = 1,        /* CC1 PPL / 1 */
+               [1] = 2,        /* CC1 PPL / 2 */
+               [4] = 1,        /* CC2 PPL / 1 */
+               [5] = 2,        /* CC2 PPL / 2 */
+       };
+
+       uint i;
+       uint freq_c_pll[CONFIG_SYS_FSL_NUM_CC_PLLS];
+       uint ratio[CONFIG_SYS_FSL_NUM_CC_PLLS];
+       unsigned long sysclk = CONFIG_SYS_CLK_FREQ;
+
+       sys_info->freq_systembus = sysclk;
+#ifdef CONFIG_DDR_CLK_FREQ
+       sys_info->freq_ddrbus = CONFIG_DDR_CLK_FREQ;
+#else
+       sys_info->freq_ddrbus = sysclk;
+#endif
+
+       sys_info->freq_systembus *= (in_be32(&gur->rcwsr[0]) >>
+               RCWSR0_SYS_PLL_RAT_SHIFT) & RCWSR0_SYS_PLL_RAT_MASK;
+       sys_info->freq_ddrbus *= (in_be32(&gur->rcwsr[0]) >>
+               RCWSR0_MEM_PLL_RAT_SHIFT) & RCWSR0_MEM_PLL_RAT_MASK;
+
+       for (i = 0; i < CONFIG_SYS_FSL_NUM_CC_PLLS; i++) {
+               ratio[i] = (in_be32(&clk->pllcgsr[i].pllcngsr) >> 1) & 0x3f;
+               if (ratio[i] > 4)
+                       freq_c_pll[i] = sysclk * ratio[i];
+               else
+                       freq_c_pll[i] = sys_info->freq_systembus * ratio[i];
+       }
+
+       for (cpu = 0; cpu < CONFIG_MAX_CPUS; cpu++) {
+               u32 c_pll_sel = (in_be32(&clk->clkcsr[cpu].clkcncsr) >> 27)
+                               & 0xf;
+               u32 cplx_pll = core_cplx_pll[c_pll_sel];
+
+               sys_info->freq_processor[cpu] =
+                       freq_c_pll[cplx_pll] / core_cplx_pll_div[c_pll_sel];
+       }
+
+#if defined(CONFIG_FSL_IFC)
+       ccr = in_be32(&ifc_regs->ifc_ccr);
+       ccr = ((ccr & IFC_CCR_CLK_DIV_MASK) >> IFC_CCR_CLK_DIV_SHIFT) + 1;
+
+       sys_info->freq_localbus = sys_info->freq_systembus / ccr;
+#endif
+}
+
+int get_clocks(void)
+{
+       struct sys_info sys_info;
+
+       get_sys_info(&sys_info);
+       gd->cpu_clk = sys_info.freq_processor[0];
+       gd->bus_clk = sys_info.freq_systembus;
+       gd->mem_clk = sys_info.freq_ddrbus * 2;
+
+#if defined(CONFIG_FSL_ESDHC)
+       gd->arch.sdhc_clk = gd->bus_clk;
+#endif
+
+       return 0;
+}
+
+ulong get_bus_freq(ulong dummy)
+{
+       return gd->bus_clk;
+}
+
+ulong get_ddr_freq(ulong dummy)
+{
+       return gd->mem_clk;
+}
+
+int get_serial_clock(void)
+{
+       return gd->bus_clk / 2;
+}
+
+unsigned int mxc_get_clock(enum mxc_clock clk)
+{
+       switch (clk) {
+       case MXC_I2C_CLK:
+               return get_bus_freq(0) / 2;
+       case MXC_ESDHC_CLK:
+               return get_bus_freq(0);
+       case MXC_DSPI_CLK:
+               return get_bus_freq(0) / 2;
+       case MXC_UART_CLK:
+               return get_bus_freq(0) / 2;
+       default:
+               printf("Unsupported clock\n");
+       }
+       return 0;
+}
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
new file mode 100644 (file)
index 0000000..b7dde45
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/arch/clock.h>
+#include <asm/io.h>
+#include <asm/arch/immap_ls102xa.h>
+#include <tsec.h>
+#include <netdev.h>
+#include <fsl_esdhc.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#if defined(CONFIG_DISPLAY_CPUINFO)
+int print_cpuinfo(void)
+{
+       char buf1[32], buf2[32];
+       struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+       unsigned int svr, major, minor, ver, i;
+
+       svr = in_be32(&gur->svr);
+       major = SVR_MAJ(svr);
+       minor = SVR_MIN(svr);
+
+       puts("CPU:   Freescale LayerScape ");
+
+       ver = SVR_SOC_VER(svr);
+       switch (ver) {
+       case SOC_VER_SLS1020:
+               puts("SLS1020");
+               break;
+       case SOC_VER_LS1020:
+               puts("LS1020");
+               break;
+       case SOC_VER_LS1021:
+               puts("LS1021");
+               break;
+       case SOC_VER_LS1022:
+               puts("LS1022");
+               break;
+       default:
+               puts("Unknown");
+               break;
+       }
+
+       if (IS_E_PROCESSOR(svr) && (ver != SOC_VER_SLS1020))
+               puts("E");
+
+       printf(", Version: %d.%d, (0x%08x)\n", major, minor, svr);
+
+       puts("Clock Configuration:");
+
+       printf("\n       CPU0(ARMV7):%-4s MHz, ", strmhz(buf1, gd->cpu_clk));
+       printf("\n       Bus:%-4s MHz, ", strmhz(buf1, gd->bus_clk));
+       printf("DDR:%-4s MHz (%s MT/s data rate), ",
+              strmhz(buf1, gd->mem_clk/2), strmhz(buf2, gd->mem_clk));
+       puts("\n");
+
+       /* Display the RCW, so that no one gets confused as to what RCW
+        * we're actually using for this boot.
+        */
+       puts("Reset Configuration Word (RCW):");
+       for (i = 0; i < ARRAY_SIZE(gur->rcwsr); i++) {
+               u32 rcw = in_be32(&gur->rcwsr[i]);
+
+               if ((i % 4) == 0)
+                       printf("\n       %08x:", i * 4);
+               printf(" %08x", rcw);
+       }
+       puts("\n");
+
+       return 0;
+}
+#endif
+
+void enable_caches(void)
+{
+#ifndef CONFIG_SYS_ICACHE_OFF
+       icache_enable();
+#endif
+#ifndef CONFIG_SYS_DCACHE_OFF
+       dcache_enable();
+#endif
+}
+
+#ifdef CONFIG_FSL_ESDHC
+int cpu_mmc_init(bd_t *bis)
+{
+       return fsl_esdhc_mmc_init(bis);
+}
+#endif
+
+int cpu_eth_init(bd_t *bis)
+{
+#ifdef CONFIG_TSEC_ENET
+       tsec_standard_init(bis);
+#endif
+
+       return 0;
+}
diff --git a/arch/arm/cpu/armv7/ls102xa/fdt.c b/arch/arm/cpu/armv7/ls102xa/fdt.c
new file mode 100644 (file)
index 0000000..4ce3808
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <libfdt.h>
+#include <fdt_support.h>
+#include <asm/io.h>
+#include <asm/processor.h>
+#include <asm/arch/clock.h>
+#include <linux/ctype.h>
+#ifdef CONFIG_FSL_ESDHC
+#include <fsl_esdhc.h>
+#endif
+#include <tsec.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void ft_fixup_enet_phy_connect_type(void *fdt)
+{
+       struct eth_device *dev;
+       struct tsec_private *priv;
+       const char *enet_path, *phy_path;
+       char enet[16];
+       char phy[16];
+       int phy_node;
+       int i = 0;
+       int enet_id = 0;
+       uint32_t ph;
+
+       while ((dev = eth_get_dev_by_index(i++)) != NULL) {
+               if (strstr(dev->name, "eTSEC1"))
+                       enet_id = 0;
+               else if (strstr(dev->name, "eTSEC2"))
+                       enet_id = 1;
+               else if (strstr(dev->name, "eTSEC3"))
+                       enet_id = 2;
+               else
+                       continue;
+
+               priv = dev->priv;
+               if (priv->flags & TSEC_SGMII)
+                       continue;
+
+               sprintf(enet, "ethernet%d", enet_id);
+               enet_path = fdt_get_alias(fdt, enet);
+               if (!enet_path)
+                       continue;
+
+               sprintf(phy, "enet%d_rgmii_phy", enet_id);
+               phy_path = fdt_get_alias(fdt, phy);
+               if (!phy_path)
+                       continue;
+
+               phy_node = fdt_path_offset(fdt, phy_path);
+               if (phy_node < 0)
+                       continue;
+
+               ph = fdt_create_phandle(fdt, phy_node);
+               if (ph)
+                       do_fixup_by_path_u32(fdt, enet_path,
+                                            "phy-handle", ph, 1);
+
+               do_fixup_by_path(fdt, enet_path, "phy-connection-type",
+                                phy_string_for_interface(
+                                PHY_INTERFACE_MODE_RGMII_ID),
+                                sizeof(phy_string_for_interface(
+                                PHY_INTERFACE_MODE_RGMII_ID)),
+                                1);
+       }
+}
+
+void ft_cpu_setup(void *blob, bd_t *bd)
+{
+       int off;
+       int val;
+       const char *sysclk_path;
+
+       unsigned long busclk = get_bus_freq(0);
+
+       fdt_fixup_ethernet(blob);
+
+       off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4);
+       while (off != -FDT_ERR_NOTFOUND) {
+               val = gd->cpu_clk;
+               fdt_setprop(blob, off, "clock-frequency", &val, 4);
+               off = fdt_node_offset_by_prop_value(blob, off,
+                                                   "device_type", "cpu", 4);
+       }
+
+       do_fixup_by_prop_u32(blob, "device_type", "soc",
+                            4, "bus-frequency", busclk / 2, 1);
+
+       ft_fixup_enet_phy_connect_type(blob);
+
+#ifdef CONFIG_SYS_NS16550
+       do_fixup_by_compat_u32(blob, "fsl,16550-FIFO64",
+                              "clock-frequency", CONFIG_SYS_NS16550_CLK, 1);
+#endif
+
+       sysclk_path = fdt_get_alias(blob, "sysclk");
+       if (sysclk_path)
+               do_fixup_by_path_u32(blob, sysclk_path, "clock-frequency",
+                                    CONFIG_SYS_CLK_FREQ, 1);
+       do_fixup_by_compat_u32(blob, "fsl,qoriq-sysclk-2.0",
+                              "clock-frequency", CONFIG_SYS_CLK_FREQ, 1);
+
+#if defined(CONFIG_FSL_ESDHC)
+       fdt_fixup_esdhc(blob, bd);
+#endif
+
+       /*
+        * platform bus clock = system bus clock/2
+        * Here busclk = system bus clock
+        * We are using the platform bus clock as 1588 Timer reference
+        * clock source select
+        */
+       do_fixup_by_compat_u32(blob, "fsl, gianfar-ptp-timer",
+                              "timer-frequency", busclk / 2, 1);
+
+       /*
+        * clock-freq should change to clock-frequency and
+        * flexcan-v1.0 should change to p1010-flexcan respectively
+        * in the future.
+        */
+       do_fixup_by_compat_u32(blob, "fsl, flexcan-v1.0",
+                              "clock_freq", busclk / 2, 1);
+
+       do_fixup_by_compat_u32(blob, "fsl, flexcan-v1.0",
+                              "clock-frequency", busclk / 2, 1);
+
+       do_fixup_by_compat_u32(blob, "fsl, ls1021a-flexcan",
+                              "clock-frequency", busclk / 2, 1);
+}
diff --git a/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.c b/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.c
new file mode 100644 (file)
index 0000000..9b78acb
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/arch/fsl_serdes.h>
+#include <asm/arch/immap_ls102xa.h>
+#include <asm/errno.h>
+#include <asm/io.h>
+#include "fsl_ls1_serdes.h"
+
+#ifdef CONFIG_SYS_FSL_SRDS_1
+static u64 serdes1_prtcl_map;
+#endif
+#ifdef CONFIG_SYS_FSL_SRDS_2
+static u64 serdes2_prtcl_map;
+#endif
+
+int is_serdes_configured(enum srds_prtcl device)
+{
+       u64 ret = 0;
+
+#ifdef CONFIG_SYS_FSL_SRDS_1
+       ret |= (1ULL << device) & serdes1_prtcl_map;
+#endif
+#ifdef CONFIG_SYS_FSL_SRDS_2
+       ret |= (1ULL << device) & serdes2_prtcl_map;
+#endif
+
+       return !!ret;
+}
+
+int serdes_get_first_lane(u32 sd, enum srds_prtcl device)
+{
+       struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+       u32 cfg = in_be32(&gur->rcwsr[4]);
+       int i;
+
+       switch (sd) {
+#ifdef CONFIG_SYS_FSL_SRDS_1
+       case FSL_SRDS_1:
+               cfg &= RCWSR4_SRDS1_PRTCL_MASK;
+               cfg >>= RCWSR4_SRDS1_PRTCL_SHIFT;
+               break;
+#endif
+#ifdef CONFIG_SYS_FSL_SRDS_2
+       case FSL_SRDS_2:
+               cfg &= RCWSR4_SRDS2_PRTCL_MASK;
+               cfg >>= RCWSR4_SRDS2_PRTCL_SHIFT;
+               break;
+#endif
+       default:
+               printf("invalid SerDes%d\n", sd);
+               break;
+       }
+       /* Is serdes enabled at all? */
+       if (unlikely(cfg == 0))
+               return -ENODEV;
+
+       for (i = 0; i < SRDS_MAX_LANES; i++) {
+               if (serdes_get_prtcl(sd, cfg, i) == device)
+                       return i;
+       }
+
+       return -ENODEV;
+}
+
+u64 serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, u32 sd_prctl_shift)
+{
+       struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+       u64 serdes_prtcl_map = 0;
+       u32 cfg;
+       int lane;
+
+       cfg = in_be32(&gur->rcwsr[4]) & sd_prctl_mask;
+       cfg >>= sd_prctl_shift;
+       printf("Using SERDES%d Protocol: %d (0x%x)\n", sd + 1, cfg, cfg);
+
+       if (!is_serdes_prtcl_valid(sd, cfg))
+               printf("SERDES%d[PRTCL] = 0x%x is not valid\n", sd + 1, cfg);
+
+       for (lane = 0; lane < SRDS_MAX_LANES; lane++) {
+               enum srds_prtcl lane_prtcl = serdes_get_prtcl(sd, cfg, lane);
+
+               serdes_prtcl_map |= (1ULL << lane_prtcl);
+       }
+
+       return serdes_prtcl_map;
+}
+
+void fsl_serdes_init(void)
+{
+#ifdef CONFIG_SYS_FSL_SRDS_1
+       serdes1_prtcl_map = serdes_init(FSL_SRDS_1,
+                                       CONFIG_SYS_FSL_SERDES_ADDR,
+                                       RCWSR4_SRDS1_PRTCL_MASK,
+                                       RCWSR4_SRDS1_PRTCL_SHIFT);
+#endif
+#ifdef CONFIG_SYS_FSL_SRDS_2
+       serdes2_prtcl_map = serdes_init(FSL_SRDS_2,
+                                       CONFIG_SYS_FSL_SERDES_ADDR +
+                                       FSL_SRDS_2 * 0x1000,
+                                       RCWSR4_SRDS2_PRTCL_MASK,
+                                       RCWSR4_SRDS2_PRTCL_SHIFT);
+#endif
+}
+
+const char *serdes_clock_to_string(u32 clock)
+{
+       switch (clock) {
+       case SRDS_PLLCR0_RFCK_SEL_100:
+               return "100";
+       case SRDS_PLLCR0_RFCK_SEL_125:
+               return "125";
+       default:
+               return "100";
+       }
+}
diff --git a/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.h b/arch/arm/cpu/armv7/ls102xa/fsl_ls1_serdes.h
new file mode 100644 (file)
index 0000000..834aa53
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __FSL_LS1_SERDES_H
+#define __FSL_LS1_SERDES_H
+
+int is_serdes_prtcl_valid(int serdes, u32 prtcl);
+int serdes_lane_enabled(int lane);
+#endif /* __FSL_LS1_SERDES_H */
diff --git a/arch/arm/cpu/armv7/ls102xa/ls102xa_serdes.c b/arch/arm/cpu/armv7/ls102xa/ls102xa_serdes.c
new file mode 100644 (file)
index 0000000..cc53910
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/arch/fsl_serdes.h>
+#include <asm/arch/immap_ls102xa.h>
+
+static u8 serdes_cfg_tbl[][SRDS_MAX_LANES] = {
+       [0x00] = {PCIE1, PCIE1, PCIE1, PCIE1},
+       [0x10] = {PCIE1, SATA1, PCIE2, PCIE2},
+       [0x20] = {PCIE1, SGMII_TSEC1, PCIE2, SGMII_TSEC2},
+       [0x30] = {PCIE1, SATA1, SGMII_TSEC1, SGMII_TSEC2},
+       [0x40] = {PCIE1, PCIE1, SATA1, SGMII_TSEC2},
+       [0x50] = {PCIE1, PCIE1, PCIE2, SGMII_TSEC2},
+       [0x60] = {PCIE1, PCIE1, SGMII_TSEC1, SGMII_TSEC2},
+       [0x70] = {PCIE1, SATA1, PCIE2, SGMII_TSEC2},
+       [0x80] = {PCIE2, PCIE2, PCIE2, PCIE2},
+};
+
+enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane)
+{
+       return serdes_cfg_tbl[cfg][lane];
+}
+
+int is_serdes_prtcl_valid(int serdes, u32 prtcl)
+{
+       int i;
+
+       if (prtcl >= ARRAY_SIZE(serdes_cfg_tbl))
+               return 0;
+
+       for (i = 0; i < SRDS_MAX_LANES; i++) {
+               if (serdes_cfg_tbl[prtcl][i] != NONE)
+                       return 1;
+       }
+
+       return 0;
+}
diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c
new file mode 100644 (file)
index 0000000..11b17b2
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <div64.h>
+#include <asm/arch/immap_ls102xa.h>
+#include <asm/arch/clock.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * This function is intended for SHORT delays only.
+ * It will overflow at around 10 seconds @ 400MHz,
+ * or 20 seconds @ 200MHz.
+ */
+unsigned long usec2ticks(unsigned long usec)
+{
+       ulong ticks;
+
+       if (usec < 1000)
+               ticks = ((usec * (get_tbclk()/1000)) + 500) / 1000;
+       else
+               ticks = ((usec / 10) * (get_tbclk() / 100000));
+
+       return ticks;
+}
+
+static inline unsigned long long tick_to_time(unsigned long long tick)
+{
+       unsigned long freq;
+
+       asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (freq));
+
+       tick *= CONFIG_SYS_HZ;
+       do_div(tick, freq);
+
+       return tick;
+}
+
+static inline unsigned long long us_to_tick(unsigned long long usec)
+{
+       unsigned long freq;
+
+       asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (freq));
+
+       usec = usec * freq  + 999999;
+       do_div(usec, 1000000);
+
+       return usec;
+}
+
+int timer_init(void)
+{
+       struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR;
+       unsigned long ctrl, val, freq;
+
+       /* Enable System Counter */
+       writel(SYS_COUNTER_CTRL_ENABLE, &sctr->cntcr);
+
+       freq = GENERIC_TIMER_CLK;
+       asm("mcr p15, 0, %0, c14, c0, 0" : : "r" (freq));
+
+       /* Set PL1 Physical Timer Ctrl */
+       ctrl = ARCH_TIMER_CTRL_ENABLE;
+       asm("mcr p15, 0, %0, c14, c2, 1" : : "r" (ctrl));
+
+       /* Set PL1 Physical Comp Value */
+       val = TIMER_COMP_VAL;
+       asm("mcrr p15, 2, %Q0, %R0, c14" : : "r" (val));
+
+       gd->arch.tbl = 0;
+       gd->arch.tbu = 0;
+
+       return 0;
+}
+
+unsigned long long get_ticks(void)
+{
+       unsigned long long now;
+
+       asm("mrrc p15, 0, %Q0, %R0, c14" : "=r" (now));
+
+       gd->arch.tbl = (unsigned long)(now & 0xffffffff);
+       gd->arch.tbu = (unsigned long)(now >> 32);
+
+       return now;
+}
+
+unsigned long get_timer_masked(void)
+{
+       return tick_to_time(get_ticks());
+}
+
+unsigned long get_timer(ulong base)
+{
+       return get_timer_masked() - base;
+}
+
+/* delay x useconds and preserve advance timstamp value */
+void __udelay(unsigned long usec)
+{
+       unsigned long long start;
+       unsigned long tmo;
+
+       start = get_ticks();                    /* get current timestamp */
+       tmo = us_to_tick(usec);                 /* convert usecs to ticks */
+
+       while ((get_ticks() - start) < tmo)
+               ;                               /* loop till time has passed */
+}
+
+/*
+ * This function is derived from PowerPC code (timebase clock frequency).
+ * On ARM it returns the number of timer ticks per second.
+ */
+unsigned long get_tbclk(void)
+{
+       unsigned long freq;
+
+       asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (freq));
+
+       return freq;
+}
index 6578f0cf5a535578795e852a1f60549088334f50..6fae1e5f36e5a3ea416e68275c5cd51f2f19fe20 100644 (file)
@@ -75,11 +75,9 @@ config TARGET_TWISTER
 endchoice
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_SOC
-       string
        default "omap3"
 
 source "board/logicpd/am3517evm/Kconfig"
index 20d2c1141a9dda0bbe67f02991e22c01735bc796..e270895135794eff4141db63bb907fdcd0a294d1 100644 (file)
@@ -15,11 +15,9 @@ config TARGET_OMAP4_SDP4430
 endchoice
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_SOC
-       string
        default "omap4"
 
 source "board/gumstix/duovero/Kconfig"
index be803939bc0c86e1387335fa565af501b937617e..2ccf5b919da1b15f5e4c0d3d70fe25a7c8ab7c16 100644 (file)
@@ -15,11 +15,9 @@ config TARGET_DRA7XX_EVM
 endchoice
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_SOC
-       string
        default "omap5"
 
 source "board/compulab/cm_t54/Kconfig"
index 55c620a7c41f8b5db0d9706a059c1f6ed6c16882..6c2bb22a853083151c41a55cad5dc376a2f6de21 100644 (file)
@@ -21,11 +21,9 @@ config TARGET_ALT
 endchoice
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_SOC
-       string
        default "rmobile"
 
 source "board/atmark-techno/armadillo-800eva/Kconfig"
index 8e2153bb83f64a09e33bac02039fa5a9a54d0f2a..bcae2d60334c9f6999073ce96dc1c74b35a1cb6a 100644 (file)
@@ -18,7 +18,6 @@ config TEGRA124
 endchoice
 
 config SYS_CPU
-       string
        default "arm720t" if SPL_BUILD
        default "armv7" if !SPL_BUILD
 
index 33a22da53512292955878c4298040055728f9eb8..31012bc7702930c82fcaf4a00845e809a7dc9b6e 100644 (file)
@@ -9,7 +9,6 @@ config TARGET_DALMORE
 endchoice
 
 config SYS_SOC
-       string
        default "tegra114"
 
 source "board/nvidia/dalmore/Kconfig"
index 753f511eda2aed6443af2e02611aae6d2cd0f351..6a1c83a27ba65631e3fa01a1fb4b9b06bf667294 100644 (file)
@@ -12,7 +12,6 @@ config TARGET_VENICE2
 endchoice
 
 config SYS_SOC
-       string
        default "tegra124"
 
 source "board/nvidia/jetson-tk1/Kconfig"
index e2e08900b9a9cb032d64c3e7ecfc833f8ba2b883..a354e2ad1f62c302247c75c43c08cc9c74410227 100644 (file)
@@ -36,7 +36,6 @@ config TARGET_COLIBRI_T20_IRIS
 endchoice
 
 config SYS_SOC
-       string
        default "tegra20"
 
 source "board/nvidia/harmony/Kconfig"
index 694e1cd974fce123fb5756ffb12fb35d327fc9ed..54aec4ed509ecae278a83c69d397272b21ce03e7 100644 (file)
@@ -18,7 +18,6 @@ config TARGET_TEC_NG
 endchoice
 
 config SYS_SOC
-       string
        default "tegra30"
 
 source "board/nvidia/beaver/Kconfig"
index 6b88f1841b74c3d80541dbe175760a560eb2987b..d6655a972bb1190cc6d6afc71ee7ecb3502f3b46 100644 (file)
@@ -18,23 +18,18 @@ config TARGET_ZYNQ_ZC770
 endchoice
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "zynq"
 
 config SYS_VENDOR
-       string
        default "xilinx"
 
 config SYS_SOC
-       string
        default "zynq"
 
 config SYS_CONFIG_NAME
-       string
        default "zynq_zed" if TARGET_ZYNQ_ZED
        default "zynq_microzed" if TARGET_ZYNQ_MICROZED
        default "zynq_zc70x" if TARGET_ZYNQ_ZC70X
index 435c01e9f66a940bc10063c5fc8bfd2179c988f0..81ad212e71291906f6d3b16ea020cc41e68ee727 100644 (file)
@@ -6,6 +6,10 @@
        model = "NVIDIA Dalmore";
        compatible = "nvidia,dalmore", "nvidia,tegra114";
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                i2c0 = "/i2c@7000d000";
                i2c1 = "/i2c@7000c000";
index 59434e0a8f76dd540f506a235da06b2b24c55206..88bdc4904508a51db694303d7c4a7ddcae0c383c 100644 (file)
@@ -1,3 +1,4 @@
+#include <dt-bindings/clock/tegra114-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
                status = "disabled";
        };
 
+       uarta: serial@70006000 {
+               compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
+               reg = <0x70006000 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA114_CLK_UARTA>;
+               resets = <&tegra_car 6>;
+               reset-names = "serial";
+               dmas = <&apbdma 8>, <&apbdma 8>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartb: serial@70006040 {
+               compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
+               reg = <0x70006040 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA114_CLK_UARTB>;
+               resets = <&tegra_car 7>;
+               reset-names = "serial";
+               dmas = <&apbdma 9>, <&apbdma 9>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartc: serial@70006200 {
+               compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
+               reg = <0x70006200 0x100>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA114_CLK_UARTC>;
+               resets = <&tegra_car 55>;
+               reset-names = "serial";
+               dmas = <&apbdma 10>, <&apbdma 10>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartd: serial@70006300 {
+               compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
+               reg = <0x70006300 0x100>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA114_CLK_UARTD>;
+               resets = <&tegra_car 65>;
+               reset-names = "serial";
+               dmas = <&apbdma 19>, <&apbdma 19>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
        spi@7000d400 {
                compatible = "nvidia,tegra114-spi";
                reg = <0x7000d400 0x200>;
index 464287e03ecffb4d9ceb94c0189c4e1de4a8b98f..ffad1160cd92015bba208aec89d5848b7fa07e8a 100644 (file)
@@ -6,6 +6,10 @@
        model = "NVIDIA Jetson TK1";
        compatible = "nvidia,jetson-tk1", "nvidia,tegra124";
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                i2c0 = "/i2c@7000d000";
                i2c1 = "/i2c@7000c000";
index f003413bd790ce65e0bcfbc85b008c7f9656cd71..f7ccfc5ddd4bf29a6b6f1c86354b55c67513721e 100644 (file)
@@ -6,6 +6,10 @@
        model = "NVIDIA Venice2";
        compatible = "nvidia,venice2", "nvidia,tegra124";
 
+       chosen {
+               stdout-path = &uarta;
+       };
+
        aliases {
                i2c0 = "/i2c@7000d000";
                i2c1 = "/i2c@7000c000";
index 4561c5f839438c4bdf4e181e38fbde57ff9e780f..3288f28daeb069fb9584451aec5449e1fdf6cf5b 100644 (file)
@@ -1,3 +1,4 @@
+#include <dt-bindings/clock/tegra124-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
                status = "disabled";
        };
 
+       uarta: serial@70006000 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006000 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA124_CLK_UARTA>;
+               resets = <&tegra_car 6>;
+               reset-names = "serial";
+               dmas = <&apbdma 8>, <&apbdma 8>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartb: serial@70006040 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006040 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA124_CLK_UARTB>;
+               resets = <&tegra_car 7>;
+               reset-names = "serial";
+               dmas = <&apbdma 9>, <&apbdma 9>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartc: serial@70006200 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006200 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA124_CLK_UARTC>;
+               resets = <&tegra_car 55>;
+               reset-names = "serial";
+               dmas = <&apbdma 10>, <&apbdma 10>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartd: serial@70006300 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006300 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA124_CLK_UARTD>;
+               resets = <&tegra_car 65>;
+               reset-names = "serial";
+               dmas = <&apbdma 19>, <&apbdma 19>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uarte: serial@70006400 {
+               compatible = "nvidia,tegra124-uart", "nvidia,tegra20-uart";
+               reg = <0x70006400 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA124_CLK_UARTE>;
+               resets = <&tegra_car 66>;
+               reset-names = "serial";
+               dmas = <&apbdma 20>, <&apbdma 20>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
        spi@7000d400 {
                compatible = "nvidia,tegra124-spi", "nvidia,tegra114-spi";
                reg = <0x7000d400 0x200>;
index c0e54af8868ecf7e754d9cf7da80abab797445a1..7cf08f4101f3ae072cda3abc37e55e44a500e101 100644 (file)
@@ -6,6 +6,10 @@
        model = "Toradex Colibri T20";
        compatible = "toradex,t20", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uarta;
+       };
+
        aliases {
                usb0 = "/usb@c5008000";
                usb1 = "/usb@c5000000";
index b115f87821dba4172f097988c4345e195b32f270..982a14c61c498ff26409b99abb9a61c07586d332 100644 (file)
@@ -6,6 +6,10 @@
        model = "NVIDIA Tegra20 Harmony evaluation board";
        compatible = "nvidia,harmony", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                usb0 = "/usb@c5008000";
                usb1 = "/usb@c5004000";
index a9a07f9bcd774f44c0ed7cba0574a9cf8a9cce3d..be2ed42dbd74e67233f145a48f483977a36b7e92 100644 (file)
@@ -6,6 +6,10 @@
        model = "Avionic Design Medcom-Wide";
        compatible = "ad,medcom-wide", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                usb0 = "/usb@c5008000";
                sdhci0 = "/sdhci@c8000600";
index 780203cfb3aad19a4f16e2ab03d840a7f94d1eff..9d735b5e6bf6541b3dbfb0974cc3ee668d129d02 100644 (file)
@@ -6,6 +6,10 @@
        model = "Toshiba AC100 / Dynabook AZ";
        compatible = "compal,paz00", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uarta;
+       };
+
        aliases {
                usb0 = "/usb@c5008000";
                sdhci0 = "/sdhci@c8000600";
index 20016f29bb3945da7f1490b635f8f095bc4c16e0..e5562a9ca5279f19525ab51627a05d442813d975 100644 (file)
@@ -6,6 +6,10 @@
        model = "Avionic Design Plutux";
        compatible = "ad,plutux", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                usb0 = "/usb@c5008000";
                sdhci0 = "/sdhci@c8000600";
index c0e2e1e5fdb4d04c65c8f04e276f225c3dd4fb86..43b9911c896a0aed9dbc6bca8f0e3532b8093cf5 100644 (file)
                bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8 root=/dev/mmcblk1p3 rw rootwait";
        };
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                /* This defines the order of our ports */
                usb0 = "/usb@c5008000";
index 4c1b08d768430b83752a55da8b43717b867f9296..e99bd447c1b72bc71bb36a1bc06abec3a0ff93eb 100644 (file)
@@ -6,6 +6,10 @@
        model = "Avionic Design Tamonten Evaluation Carrier";
        compatible = "ad,tec", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                usb0 = "/usb@c5008000";
                sdhci0 = "/sdhci@c8000600";
index ee31476c1eb8f602fe781b6591c4d7f4abf63a84..cee5cfe0d2dbb8c6024fffba353e22eec57fc2ef 100644 (file)
@@ -6,6 +6,10 @@
        model = "Compulab TrimSlice board";
        compatible = "compulab,trimslice", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uarta;
+       };
+
        aliases {
                usb0 = "/usb@c5008000";
                usb1 = "/usb@c5000000";
index 1a526bab641f61166889e2be102ec971510b7c17..68122039180a378c7b20f9f31dbe77ab37a0ed82 100644 (file)
@@ -6,6 +6,10 @@
        model = "NVIDIA Tegra20 Ventana evaluation board";
        compatible = "nvidia,ventana", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                usb0 = "/usb@c5008000";
                sdhci0 = "/sdhci@c8000600";
index eb92264f9d6aff6cea59a22b32bfbf672e5ba690..4fd2496dbc57f07e5c42771814c0ac5df04a34aa 100644 (file)
@@ -6,6 +6,10 @@
        model = "NVIDIA Tegra20 Whistler evaluation board";
        compatible = "nvidia,whistler", "nvidia,tegra20";
 
+       chosen {
+               stdout-path = &uarta;
+       };
+
        aliases {
                i2c0 = "/i2c@7000d000";
                usb0 = "/usb@c5008000";
index a524f6eed4107b669ecc935b247f6b2393bd2629..5f927f7e0d4e165babc6b0972140f196a025c60b 100644 (file)
@@ -1,3 +1,4 @@
+#include <dt-bindings/clock/tegra20-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
                dma-channel = < 1 >;
        };
 
-       serial@70006000 {
+       uarta: serial@70006000 {
                compatible = "nvidia,tegra20-uart";
                reg = <0x70006000 0x40>;
                reg-shift = <2>;
-               interrupts = < 68 >;
+               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA20_CLK_UARTA>;
+               resets = <&tegra_car 6>;
+               reset-names = "serial";
+               dmas = <&apbdma 8>, <&apbdma 8>;
+               dma-names = "rx", "tx";
+               status = "disabled";
        };
 
-       serial@70006040 {
+       uartb: serial@70006040 {
                compatible = "nvidia,tegra20-uart";
                reg = <0x70006040 0x40>;
                reg-shift = <2>;
-               interrupts = < 69 >;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA20_CLK_UARTB>;
+               resets = <&tegra_car 7>;
+               reset-names = "serial";
+               dmas = <&apbdma 9>, <&apbdma 9>;
+               dma-names = "rx", "tx";
+               status = "disabled";
        };
 
-       serial@70006200 {
+       uartc: serial@70006200 {
                compatible = "nvidia,tegra20-uart";
                reg = <0x70006200 0x100>;
                reg-shift = <2>;
-               interrupts = < 78 >;
+               interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA20_CLK_UARTC>;
+               resets = <&tegra_car 55>;
+               reset-names = "serial";
+               dmas = <&apbdma 10>, <&apbdma 10>;
+               dma-names = "rx", "tx";
+               status = "disabled";
        };
 
-       serial@70006300 {
+       uartd: serial@70006300 {
                compatible = "nvidia,tegra20-uart";
                reg = <0x70006300 0x100>;
                reg-shift = <2>;
-               interrupts = < 122 >;
+               interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA20_CLK_UARTD>;
+               resets = <&tegra_car 65>;
+               reset-names = "serial";
+               dmas = <&apbdma 19>, <&apbdma 19>;
+               dma-names = "rx", "tx";
+               status = "disabled";
        };
 
-       serial@70006400 {
+       uarte: serial@70006400 {
                compatible = "nvidia,tegra20-uart";
                reg = <0x70006400 0x100>;
                reg-shift = <2>;
-               interrupts = < 123 >;
+               interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA20_CLK_UARTE>;
+               resets = <&tegra_car 66>;
+               reset-names = "serial";
+               dmas = <&apbdma 20>, <&apbdma 20>;
+               dma-names = "rx", "tx";
+               status = "disabled";
        };
 
        nand: nand-controller@70008000 {
index 85e62e9db32e13984cdf0b63c3624e989803ea0e..ad140def95f4d630e11519554f16d71fbfb10f25 100644 (file)
@@ -6,6 +6,10 @@
        model = "NVIDIA Beaver";
        compatible = "nvidia,beaver", "nvidia,tegra30";
 
+       chosen {
+               stdout-path = &uarta;
+       };
+
        aliases {
                i2c0 = "/i2c@7000d000";
                i2c1 = "/i2c@7000c000";
index ea2cf76ff3a8869c9588a8ff40ceeb489f2d49ee..b4fbe71aa534c01d60b541b790bd25b921fc7211 100644 (file)
@@ -6,6 +6,10 @@
        model = "NVIDIA Cardhu";
        compatible = "nvidia,cardhu", "nvidia,tegra30";
 
+       chosen {
+               stdout-path = &uarta;
+       };
+
        aliases {
                i2c0 = "/i2c@7000d000";
                i2c1 = "/i2c@7000c000";
index 50d5762311e16ad1374849754ad292c51ece64fc..c73afef34ada174178a4aeaeb19b40ef11544842 100644 (file)
@@ -8,6 +8,10 @@
                reg = <0x80000000 0x40000000>;
        };
 
+       chosen {
+               stdout-path = &uartd;
+       };
+
        aliases {
                i2c0 = "/i2c@7000c000";
                i2c1 = "/i2c@7000c700";
index 7be3791fc9a679536a1d63b1aac3fbb81c03eb31..fb92a0fef96e0e5c4cfdf5c6f22de68af93ef33c 100644 (file)
@@ -1,3 +1,4 @@
+#include <dt-bindings/clock/tegra30-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
                status = "disabled";
        };
 
+       uarta: serial@70006000 {
+               compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+               reg = <0x70006000 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA30_CLK_UARTA>;
+               resets = <&tegra_car 6>;
+               reset-names = "serial";
+               dmas = <&apbdma 8>, <&apbdma 8>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartb: serial@70006040 {
+               compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+               reg = <0x70006040 0x40>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA30_CLK_UARTB>;
+               resets = <&tegra_car 7>;
+               reset-names = "serial";
+               dmas = <&apbdma 9>, <&apbdma 9>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartc: serial@70006200 {
+               compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+               reg = <0x70006200 0x100>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA30_CLK_UARTC>;
+               resets = <&tegra_car 55>;
+               reset-names = "serial";
+               dmas = <&apbdma 10>, <&apbdma 10>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uartd: serial@70006300 {
+               compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+               reg = <0x70006300 0x100>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA30_CLK_UARTD>;
+               resets = <&tegra_car 65>;
+               reset-names = "serial";
+               dmas = <&apbdma 19>, <&apbdma 19>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
+       uarte: serial@70006400 {
+               compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart";
+               reg = <0x70006400 0x100>;
+               reg-shift = <2>;
+               interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA30_CLK_UARTE>;
+               resets = <&tegra_car 66>;
+               reset-names = "serial";
+               dmas = <&apbdma 20>, <&apbdma 20>;
+               dma-names = "rx", "tx";
+               status = "disabled";
+       };
+
        spi@7000d400 {
                compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
                reg = <0x7000d400 0x200>;
diff --git a/arch/arm/include/asm/arch-ls102xa/clock.h b/arch/arm/include/asm/arch-ls102xa/clock.h
new file mode 100644 (file)
index 0000000..fd36bb0
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ *
+ */
+
+#ifndef __ASM_ARCH_LS102XA_CLOCK_H_
+#define __ASM_ARCH_LS102XA_CLOCK_H_
+
+#include <common.h>
+
+enum mxc_clock {
+       MXC_ARM_CLK = 0,
+       MXC_UART_CLK,
+       MXC_ESDHC_CLK,
+       MXC_I2C_CLK,
+       MXC_DSPI_CLK,
+};
+
+unsigned int mxc_get_clock(enum mxc_clock clk);
+
+#endif /* __ASM_ARCH_LS102XA_CLOCK_H_ */
diff --git a/arch/arm/include/asm/arch-ls102xa/config.h b/arch/arm/include/asm/arch-ls102xa/config.h
new file mode 100644 (file)
index 0000000..ed78c33
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2014, Freescale Semiconductor
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef _ASM_ARMV7_LS102XA_CONFIG_
+#define _ASM_ARMV7_LS102XA_CONFIG_
+
+#define CONFIG_SYS_CACHELINE_SIZE              64
+
+#define OCRAM_BASE_ADDR                                0x10000000
+#define OCRAM_SIZE                             0x00020000
+
+#define CONFIG_SYS_IMMR                                0x01000000
+
+#define CONFIG_SYS_FSL_DDR_ADDR                        (CONFIG_SYS_IMMR + 0x00080000)
+#define CONFIG_SYS_CCI400_ADDR                 (CONFIG_SYS_IMMR + 0x00180000)
+#define CONFIG_SYS_IFC_ADDR                    (CONFIG_SYS_IMMR + 0x00530000)
+#define CONFIG_SYS_FSL_ESDHC_ADDR              (CONFIG_SYS_IMMR + 0x00560000)
+#define CONFIG_SYS_FSL_SCFG_ADDR               (CONFIG_SYS_IMMR + 0x00570000)
+#define CONFIG_SYS_FSL_SERDES_ADDR             (CONFIG_SYS_IMMR + 0x00ea0000)
+#define CONFIG_SYS_FSL_GUTS_ADDR               (CONFIG_SYS_IMMR + 0x00ee0000)
+#define CONFIG_SYS_FSL_LS1_CLK_ADDR            (CONFIG_SYS_IMMR + 0x00ee1000)
+#define CONFIG_SYS_NS16550_COM1                        (CONFIG_SYS_IMMR + 0x011c0500)
+#define CONFIG_SYS_NS16550_COM2                        (CONFIG_SYS_IMMR + 0x011d0500)
+#define CONFIG_SYS_DCU_ADDR                    (CONFIG_SYS_IMMR + 0x01ce0000)
+
+#define CONFIG_SYS_TSEC1_OFFSET                        0x01d10000
+#define CONFIG_SYS_TSEC2_OFFSET                        0x01d50000
+#define CONFIG_SYS_TSEC3_OFFSET                        0x01d90000
+#define CONFIG_SYS_MDIO1_OFFSET                        0x01d24000
+
+#define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET)
+#define MDIO_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_MDIO1_OFFSET)
+
+#define SCTR_BASE_ADDR                         (CONFIG_SYS_IMMR + 0x01b00000)
+
+#define I2C1_BASE_ADDR                         (CONFIG_SYS_IMMR + 0x01180000)
+#define I2C2_BASE_ADDR                         (CONFIG_SYS_IMMR + 0x01190000)
+#define I2C3_BASE_ADDR                         (CONFIG_SYS_IMMR + 0x011a0000)
+
+#define WDOG1_BASE_ADDR                                (CONFIG_SYS_IMMR + 0x01ad0000)
+
+#define QSPI0_BASE_ADDR                                (CONFIG_SYS_IMMR + 0x00550000)
+#define DSPI1_BASE_ADDR                                (CONFIG_SYS_IMMR + 0x01100000)
+
+#define LPUART_BASE                            (CONFIG_SYS_IMMR + 0x01950000)
+
+#ifdef CONFIG_DDR_SPD
+#define CONFIG_SYS_FSL_DDR_BE
+#define CONFIG_VERY_BIG_RAM
+#define CONFIG_SYS_FSL_DDRC_ARM_GEN3
+#define CONFIG_SYS_FSL_DDR
+#define CONFIG_SYS_LS1_DDR_BLOCK1_SIZE         ((phys_size_t)2 << 30)
+#define CONFIG_MAX_MEM_MAPPED                  CONFIG_SYS_LS1_DDR_BLOCK1_SIZE
+#endif
+
+#define CONFIG_SYS_FSL_IFC_BE
+#define CONFIG_SYS_FSL_ESDHC_BE
+#define CONFIG_SYS_FSL_WDOG_BE
+#define CONFIG_SYS_FSL_DSPI_BE
+#define CONFIG_SYS_FSL_QSPI_BE
+#define CONFIG_SYS_FSL_DCU_BE
+
+#define DCU_LAYER_MAX_NUM                      16
+
+#define CONFIG_SYS_FSL_SRDS_1
+
+#ifdef CONFIG_LS102XA
+#define CONFIG_MAX_CPUS                                2
+#define CONFIG_SYS_FSL_IFC_BANK_COUNT          8
+#define CONFIG_NUM_DDR_CONTROLLERS             1
+#else
+#error SoC not defined
+#endif
+
+#endif /* _ASM_ARMV7_LS102XA_CONFIG_ */
diff --git a/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h b/arch/arm/include/asm/arch-ls102xa/fsl_serdes.h
new file mode 100644 (file)
index 0000000..3a92f5a
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __FSL_SERDES_H
+#define __FSL_SERDES_H
+
+#include <config.h>
+
+enum srds_prtcl {
+       NONE = 0,
+       PCIE1,
+       PCIE2,
+       SATA1,
+       SGMII_TSEC1,
+       SGMII_TSEC2,
+};
+
+enum srds {
+       FSL_SRDS_1  = 0,
+       FSL_SRDS_2  = 1,
+};
+
+int is_serdes_configured(enum srds_prtcl device);
+void fsl_serdes_init(void);
+const char *serdes_clock_to_string(u32 clock);
+
+int serdes_get_first_lane(u32 sd, enum srds_prtcl device);
+enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane);
+
+#endif /* __FSL_SERDES_H */
diff --git a/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h b/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
new file mode 100644 (file)
index 0000000..7995fe2
--- /dev/null
@@ -0,0 +1,493 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __ASM_ARCH_LS102XA_IMMAP_H_
+#define __ASM_ARCH_LS102XA_IMMAP_H_
+
+#define SVR_MAJ(svr)           (((svr) >>  4) & 0xf)
+#define SVR_MIN(svr)           (((svr) >>  0) & 0xf)
+#define SVR_SOC_VER(svr)       (((svr) >> 8) & 0x7ff)
+#define IS_E_PROCESSOR(svr)    (svr & 0x80000)
+
+#define SOC_VER_SLS1020                0x00
+#define SOC_VER_LS1020         0x10
+#define SOC_VER_LS1021         0x11
+#define SOC_VER_LS1022         0x12
+
+#define RCWSR0_SYS_PLL_RAT_SHIFT       25
+#define RCWSR0_SYS_PLL_RAT_MASK                0x1f
+#define RCWSR0_MEM_PLL_RAT_SHIFT       16
+#define RCWSR0_MEM_PLL_RAT_MASK                0x3f
+
+#define RCWSR4_SRDS1_PRTCL_SHIFT       24
+#define RCWSR4_SRDS1_PRTCL_MASK                0xff000000
+
+#define TIMER_COMP_VAL                 0xffffffff
+#define ARCH_TIMER_CTRL_ENABLE         (1 << 0)
+#define SYS_COUNTER_CTRL_ENABLE                (1 << 24)
+
+struct sys_info {
+       unsigned long freq_processor[CONFIG_MAX_CPUS];
+       unsigned long freq_systembus;
+       unsigned long freq_ddrbus;
+       unsigned long freq_localbus;
+};
+
+/* Device Configuration and Pin Control */
+struct ccsr_gur {
+       u32     porsr1;         /* POR status 1 */
+       u32     porsr2;         /* POR status 2 */
+       u8      res_008[0x20-0x8];
+       u32     gpporcr1;       /* General-purpose POR configuration */
+       u32     gpporcr2;
+       u32     dcfg_fusesr;    /* Fuse status register */
+       u8      res_02c[0x70-0x2c];
+       u32     devdisr;        /* Device disable control */
+       u32     devdisr2;       /* Device disable control 2 */
+       u32     devdisr3;       /* Device disable control 3 */
+       u32     devdisr4;       /* Device disable control 4 */
+       u32     devdisr5;       /* Device disable control 5 */
+       u8      res_084[0x94-0x84];
+       u32     coredisru;      /* uppper portion for support of 64 cores */
+       u32     coredisrl;      /* lower portion for support of 64 cores */
+       u8      res_09c[0xa4-0x9c];
+       u32     svr;            /* System version */
+       u8      res_0a8[0xb0-0xa8];
+       u32     rstcr;          /* Reset control */
+       u32     rstrqpblsr;     /* Reset request preboot loader status */
+       u8      res_0b8[0xc0-0xb8];
+       u32     rstrqmr1;       /* Reset request mask */
+       u8      res_0c4[0xc8-0xc4];
+       u32     rstrqsr1;       /* Reset request status */
+       u8      res_0cc[0xd4-0xcc];
+       u32     rstrqwdtmrl;    /* Reset request WDT mask */
+       u8      res_0d8[0xdc-0xd8];
+       u32     rstrqwdtsrl;    /* Reset request WDT status */
+       u8      res_0e0[0xe4-0xe0];
+       u32     brrl;           /* Boot release */
+       u8      res_0e8[0x100-0xe8];
+       u32     rcwsr[16];      /* Reset control word status */
+       u8      res_140[0x200-0x140];
+       u32     scratchrw[4];  /* Scratch Read/Write */
+       u8      res_210[0x300-0x210];
+       u32     scratchw1r[4];  /* Scratch Read (Write once) */
+       u8      res_310[0x400-0x310];
+       u32     crstsr;
+       u8      res_404[0x550-0x404];
+       u32     sataliodnr;
+       u8      res_554[0x604-0x554];
+       u32     pamubypenr;
+       u32     dmacr1;
+       u8      res_60c[0x740-0x60c];   /* add more registers when needed */
+       u32     tp_ityp[64];    /* Topology Initiator Type Register */
+       struct {
+               u32     upper;
+               u32     lower;
+       } tp_cluster[1];        /* Core Cluster n Topology Register */
+       u8      res_848[0xe60-0x848];
+       u32     ddrclkdr;
+       u8      res_e60[0xe68-0xe64];
+       u32     ifcclkdr;
+       u8      res_e68[0xe80-0xe6c];
+       u32     sdhcpcr;
+};
+
+#define SCFG_SCFGREVCR_REV             0xffffffff
+#define SCFG_SCFGREVCR_NOREV           0
+#define SCFG_ETSECDMAMCR_LE_BD_FR      0xf8001a0f
+#define SCFG_ETSECCMCR_GE2_CLK125      0x04000000
+#define SCFG_PIXCLKCR_PXCKEN           0x80000000
+
+/* Supplemental Configuration Unit */
+struct ccsr_scfg {
+       u32 dpslpcr;
+       u32 resv0[2];
+       u32 etsecclkdpslpcr;
+       u32 resv1[5];
+       u32 fuseovrdcr;
+       u32 pixclkcr;
+       u32 resv2[5];
+       u32 spimsicr;
+       u32 resv3[6];
+       u32 pex1pmwrcr;
+       u32 pex1pmrdsr;
+       u32 resv4[3];
+       u32 usb3prm1cr;
+       u32 usb4prm2cr;
+       u32 pex1rdmsgpldlsbsr;
+       u32 pex1rdmsgpldmsbsr;
+       u32 pex2rdmsgpldlsbsr;
+       u32 pex2rdmsgpldmsbsr;
+       u32 pex1rdmmsgrqsr;
+       u32 pex2rdmmsgrqsr;
+       u32 spimsiclrcr;
+       u32 pex1mscportsr;
+       u32 pex2mscportsr;
+       u32 pex2pmwrcr;
+       u32 resv5[24];
+       u32 mac1_streamid;
+       u32 mac2_streamid;
+       u32 mac3_streamid;
+       u32 pex1_streamid;
+       u32 pex2_streamid;
+       u32 dma_streamid;
+       u32 sata_streamid;
+       u32 usb3_streamid;
+       u32 qe_streamid;
+       u32 sdhc_streamid;
+       u32 adma_streamid;
+       u32 letechsftrstcr;
+       u32 core0_sft_rst;
+       u32 core1_sft_rst;
+       u32 resv6[1];
+       u32 usb_hi_addr;
+       u32 etsecclkadjcr;
+       u32 sai_clk;
+       u32 resv7[1];
+       u32 dcu_streamid;
+       u32 usb2_streamid;
+       u32 ftm_reset;
+       u32 altcbar;
+       u32 qspi_cfg;
+       u32 pmcintecr;
+       u32 pmcintlecr;
+       u32 pmcintsr;
+       u32 qos1;
+       u32 qos2;
+       u32 qos3;
+       u32 cci_cfg;
+       u32 resv8[1];
+       u32 etsecdmamcr;
+       u32 usb3prm3cr;
+       u32 resv9[1];
+       u32 debug_streamid;
+       u32 resv10[5];
+       u32 snpcnfgcr;
+       u32 resv11[1];
+       u32 intpcr;
+       u32 resv12[20];
+       u32 scfgrevcr;
+       u32 coresrencr;
+       u32 pex2pmrdsr;
+       u32 ddrc1cr;
+       u32 ddrc2cr;
+       u32 ddrc3cr;
+       u32 ddrc4cr;
+       u32 ddrgcr;
+       u32 resv13[120];
+       u32 qeioclkcr;
+       u32 etsecmcr;
+       u32 sdhciovserlcr;
+       u32 resv14[61];
+       u32 sparecr;
+};
+
+/* Clocking */
+struct ccsr_clk {
+       struct {
+               u32 clkcncsr;   /* core cluster n clock control status */
+               u8  res_004[0x1c];
+       } clkcsr[2];
+       u8      res_040[0x7c0]; /* 0x100 */
+       struct {
+               u32 pllcngsr;
+               u8 res_804[0x1c];
+       } pllcgsr[2];
+       u8      res_840[0x1c0];
+       u32     clkpcsr;        /* 0xa00 Platform clock domain control/status */
+       u8      res_a04[0x1fc];
+       u32     pllpgsr;        /* 0xc00 Platform PLL General Status */
+       u8      res_c04[0x1c];
+       u32     plldgsr;        /* 0xc20 DDR PLL General Status */
+       u8      res_c24[0x3dc];
+};
+
+/* System Counter */
+struct sctr_regs {
+       u32 cntcr;
+       u32 cntsr;
+       u32 cntcv1;
+       u32 cntcv2;
+       u32 resv1[4];
+       u32 cntfid0;
+       u32 cntfid1;
+       u32 resv2[1002];
+       u32 counterid[12];
+};
+
+#define MAX_SERDES                     1
+#define SRDS_MAX_LANES                 4
+#define SRDS_MAX_BANK                  2
+
+#define SRDS_RSTCTL_RST                        0x80000000
+#define SRDS_RSTCTL_RSTDONE            0x40000000
+#define SRDS_RSTCTL_RSTERR             0x20000000
+#define SRDS_RSTCTL_SWRST              0x10000000
+#define SRDS_RSTCTL_SDEN               0x00000020
+#define SRDS_RSTCTL_SDRST_B            0x00000040
+#define SRDS_RSTCTL_PLLRST_B           0x00000080
+#define SRDS_PLLCR0_POFF               0x80000000
+#define SRDS_PLLCR0_RFCK_SEL_MASK      0x70000000
+#define SRDS_PLLCR0_RFCK_SEL_100       0x00000000
+#define SRDS_PLLCR0_RFCK_SEL_125       0x10000000
+#define SRDS_PLLCR0_RFCK_SEL_156_25    0x20000000
+#define SRDS_PLLCR0_RFCK_SEL_150       0x30000000
+#define SRDS_PLLCR0_RFCK_SEL_161_13    0x40000000
+#define SRDS_PLLCR0_RFCK_SEL_122_88    0x50000000
+#define SRDS_PLLCR0_PLL_LCK            0x00800000
+#define SRDS_PLLCR0_FRATE_SEL_MASK     0x000f0000
+#define SRDS_PLLCR0_FRATE_SEL_5                0x00000000
+#define SRDS_PLLCR0_FRATE_SEL_3_75     0x00050000
+#define SRDS_PLLCR0_FRATE_SEL_5_15     0x00060000
+#define SRDS_PLLCR0_FRATE_SEL_4                0x00070000
+#define SRDS_PLLCR0_FRATE_SEL_3_12     0x00090000
+#define SRDS_PLLCR0_FRATE_SEL_3                0x000a0000
+#define SRDS_PLLCR1_PLL_BWSEL          0x08000000
+
+struct ccsr_serdes {
+       struct {
+               u32     rstctl; /* Reset Control Register */
+
+               u32     pllcr0; /* PLL Control Register 0 */
+
+               u32     pllcr1; /* PLL Control Register 1 */
+               u32     res_0c; /* 0x00c */
+               u32     pllcr3;
+               u32     pllcr4;
+               u8      res_18[0x20-0x18];
+       } bank[2];
+       u8      res_40[0x90-0x40];
+       u32     srdstcalcr;     /* 0x90 TX Calibration Control */
+       u8      res_94[0xa0-0x94];
+       u32     srdsrcalcr;     /* 0xa0 RX Calibration Control */
+       u8      res_a4[0xb0-0xa4];
+       u32     srdsgr0;        /* 0xb0 General Register 0 */
+       u8      res_b4[0xe0-0xb4];
+       u32     srdspccr0;      /* 0xe0 Protocol Converter Config 0 */
+       u32     srdspccr1;      /* 0xe4 Protocol Converter Config 1 */
+       u32     srdspccr2;      /* 0xe8 Protocol Converter Config 2 */
+       u32     srdspccr3;      /* 0xec Protocol Converter Config 3 */
+       u32     srdspccr4;      /* 0xf0 Protocol Converter Config 4 */
+       u8      res_f4[0x100-0xf4];
+       struct {
+               u32     lnpssr; /* 0x100, 0x120, ..., 0x1e0 */
+               u8      res_104[0x120-0x104];
+       } srdslnpssr[4];
+       u8      res_180[0x300-0x180];
+       u32     srdspexeqcr;
+       u32     srdspexeqpcr[11];
+       u8      res_330[0x400-0x330];
+       u32     srdspexapcr;
+       u8      res_404[0x440-0x404];
+       u32     srdspexbpcr;
+       u8      res_444[0x800-0x444];
+       struct {
+               u32     gcr0;   /* 0x800 General Control Register 0 */
+               u32     gcr1;   /* 0x804 General Control Register 1 */
+               u32     gcr2;   /* 0x808 General Control Register 2 */
+               u32     sscr0;
+               u32     recr0;  /* 0x810 Receive Equalization Control */
+               u32     recr1;
+               u32     tecr0;  /* 0x818 Transmit Equalization Control */
+               u32     sscr1;
+               u32     ttlcr0; /* 0x820 Transition Tracking Loop Ctrl 0 */
+               u8      res_824[0x83c-0x824];
+               u32     tcsr3;
+       } lane[4];      /* Lane A, B, C, D, E, F, G, H */
+       u8      res_a00[0x1000-0xa00];  /* from 0xa00 to 0xfff */
+};
+
+#define DDR_SDRAM_CFG                  0x470c0008
+#define DDR_CS0_BNDS                   0x008000bf
+#define DDR_CS0_CONFIG                 0x80014302
+#define DDR_TIMING_CFG_0               0x50550004
+#define DDR_TIMING_CFG_1               0xbcb38c56
+#define DDR_TIMING_CFG_2               0x0040d120
+#define DDR_TIMING_CFG_3               0x010e1000
+#define DDR_TIMING_CFG_4               0x00000001
+#define DDR_TIMING_CFG_5               0x03401400
+#define DDR_SDRAM_CFG_2                        0x00401010
+#define DDR_SDRAM_MODE                 0x00061c60
+#define DDR_SDRAM_MODE_2               0x00180000
+#define DDR_SDRAM_INTERVAL             0x18600618
+#define DDR_DDR_WRLVL_CNTL             0x8655f605
+#define DDR_DDR_WRLVL_CNTL_2           0x05060607
+#define DDR_DDR_WRLVL_CNTL_3           0x05050505
+#define DDR_DDR_CDR1                   0x80040000
+#define DDR_DDR_CDR2                   0x00000001
+#define DDR_SDRAM_CLK_CNTL             0x02000000
+#define DDR_DDR_ZQ_CNTL                        0x89080600
+#define DDR_CS0_CONFIG_2               0
+#define DDR_SDRAM_CFG_MEM_EN           0x80000000
+
+/* DDR memory controller registers */
+struct ccsr_ddr {
+       u32 cs0_bnds;                   /* Chip Select 0 Memory Bounds */
+       u32 resv1[1];
+       u32 cs1_bnds;                   /* Chip Select 1 Memory Bounds */
+       u32 resv2[1];
+       u32 cs2_bnds;                   /* Chip Select 2 Memory Bounds */
+       u32 resv3[1];
+       u32 cs3_bnds;                   /* Chip Select 3 Memory Bounds */
+       u32 resv4[25];
+       u32 cs0_config;                 /* Chip Select Configuration */
+       u32 cs1_config;                 /* Chip Select Configuration */
+       u32 cs2_config;                 /* Chip Select Configuration */
+       u32 cs3_config;                 /* Chip Select Configuration */
+       u32 resv5[12];
+       u32 cs0_config_2;               /* Chip Select Configuration 2 */
+       u32 cs1_config_2;               /* Chip Select Configuration 2 */
+       u32 cs2_config_2;               /* Chip Select Configuration 2 */
+       u32 cs3_config_2;               /* Chip Select Configuration 2 */
+       u32 resv6[12];
+       u32 timing_cfg_3;               /* SDRAM Timing Configuration 3 */
+       u32 timing_cfg_0;               /* SDRAM Timing Configuration 0 */
+       u32 timing_cfg_1;               /* SDRAM Timing Configuration 1 */
+       u32 timing_cfg_2;               /* SDRAM Timing Configuration 2 */
+       u32 sdram_cfg;                  /* SDRAM Control Configuration */
+       u32 sdram_cfg_2;                /* SDRAM Control Configuration 2 */
+       u32 sdram_mode;                 /* SDRAM Mode Configuration */
+       u32 sdram_mode_2;               /* SDRAM Mode Configuration 2 */
+       u32 sdram_md_cntl;              /* SDRAM Mode Control */
+       u32 sdram_interval;             /* SDRAM Interval Configuration */
+       u32 sdram_data_init;            /* SDRAM Data initialization */
+       u32 resv7[1];
+       u32 sdram_clk_cntl;             /* SDRAM Clock Control */
+       u32 resv8[5];
+       u32 init_addr;                  /* training init addr */
+       u32 init_ext_addr;              /* training init extended addr */
+       u32 resv9[4];
+       u32 timing_cfg_4;               /* SDRAM Timing Configuration 4 */
+       u32 timing_cfg_5;               /* SDRAM Timing Configuration 5 */
+       u32 timing_cfg_6;               /* SDRAM Timing Configuration 6 */
+       u32 timing_cfg_7;               /* SDRAM Timing Configuration 7 */
+       u32 ddr_zq_cntl;                /* ZQ calibration control*/
+       u32 ddr_wrlvl_cntl;             /* write leveling control*/
+       u32 resv10[1];
+       u32 ddr_sr_cntr;                /* self refresvh counter */
+       u32 ddr_sdram_rcw_1;            /* Control Words 1 */
+       u32 ddr_sdram_rcw_2;            /* Control Words 2 */
+       u32 resv11[2];
+       u32 ddr_wrlvl_cntl_2;           /* write leveling control 2 */
+       u32 ddr_wrlvl_cntl_3;           /* write leveling control 3 */
+       u32 resv12[2];
+       u32 ddr_sdram_rcw_3;            /* Control Words 3 */
+       u32 ddr_sdram_rcw_4;            /* Control Words 4 */
+       u32 ddr_sdram_rcw_5;            /* Control Words 5 */
+       u32 ddr_sdram_rcw_6;            /* Control Words 6 */
+       u32 resv13[20];
+       u32 sdram_mode_3;               /* SDRAM Mode Configuration 3 */
+       u32 sdram_mode_4;               /* SDRAM Mode Configuration 4 */
+       u32 sdram_mode_5;               /* SDRAM Mode Configuration 5 */
+       u32 sdram_mode_6;               /* SDRAM Mode Configuration 6 */
+       u32 sdram_mode_7;               /* SDRAM Mode Configuration 7 */
+       u32 sdram_mode_8;               /* SDRAM Mode Configuration 8 */
+       u32 sdram_mode_9;               /* SDRAM Mode Configuration 9 */
+       u32 sdram_mode_10;              /* SDRAM Mode Configuration 10 */
+       u32 sdram_mode_11;              /* SDRAM Mode Configuration 11 */
+       u32 sdram_mode_12;              /* SDRAM Mode Configuration 12 */
+       u32 sdram_mode_13;              /* SDRAM Mode Configuration 13 */
+       u32 sdram_mode_14;              /* SDRAM Mode Configuration 14 */
+       u32 sdram_mode_15;              /* SDRAM Mode Configuration 15 */
+       u32 sdram_mode_16;              /* SDRAM Mode Configuration 16 */
+       u32 resv14[4];
+       u32 timing_cfg_8;               /* SDRAM Timing Configuration 8 */
+       u32 timing_cfg_9;               /* SDRAM Timing Configuration 9 */
+       u32 resv15[2];
+       u32 sdram_cfg_3;                /* SDRAM Control Configuration 3 */
+       u32 resv16[15];
+       u32 deskew_cntl;                /* SDRAM Deskew Control */
+       u32 resv17[545];
+       u32 ddr_dsr1;                   /* Debug Status 1 */
+       u32 ddr_dsr2;                   /* Debug Status 2 */
+       u32 ddr_cdr1;                   /* Control Driver 1 */
+       u32 ddr_cdr2;                   /* Control Driver 2 */
+       u32 resv18[50];
+       u32 ip_rev1;                    /* IP Block Revision 1 */
+       u32 ip_rev2;                    /* IP Block Revision 2 */
+       u32 eor;                        /* Enhanced Optimization Register */
+       u32 resv19[63];
+       u32 mtcr;                       /* Memory Test Control Register */
+       u32 resv20[7];
+       u32 mtp1;                       /* Memory Test Pattern 1 */
+       u32 mtp2;                       /* Memory Test Pattern 2 */
+       u32 mtp3;                       /* Memory Test Pattern 3 */
+       u32 mtp4;                       /* Memory Test Pattern 4 */
+       u32 mtp5;                       /* Memory Test Pattern 5 */
+       u32 mtp6;                       /* Memory Test Pattern 6 */
+       u32 mtp7;                       /* Memory Test Pattern 7 */
+       u32 mtp8;                       /* Memory Test Pattern 8 */
+       u32 mtp9;                       /* Memory Test Pattern 9 */
+       u32 mtp10;                      /* Memory Test Pattern 10 */
+       u32 resv21[6];
+       u32 ddr_mt_st_ext_addr;         /* Memory Test Start Extended Address */
+       u32 ddr_mt_st_addr;             /* Memory Test Start Address */
+       u32 ddr_mt_end_ext_addr;        /* Memory Test End Extended Address */
+       u32 ddr_mt_end_addr;            /* Memory Test End Address */
+       u32 resv22[36];
+       u32 data_err_inject_hi;         /* Data Path Err Injection Mask High */
+       u32 data_err_inject_lo;         /* Data Path Err Injection Mask Low */
+       u32 ecc_err_inject;             /* Data Path Err Injection Mask ECC */
+       u32 resv23[5];
+       u32 capture_data_hi;            /* Data Path Read Capture High */
+       u32 capture_data_lo;            /* Data Path Read Capture Low */
+       u32 capture_ecc;                /* Data Path Read Capture ECC */
+       u32 resv24[5];
+       u32 err_detect;                 /* Error Detect */
+       u32 err_disable;                /* Error Disable */
+       u32 err_int_en;
+       u32 capture_attributes;         /* Error Attrs Capture */
+       u32 capture_address;            /* Error Addr Capture */
+       u32 capture_ext_address;        /* Error Extended Addr Capture */
+       u32 err_sbe;                    /* Single-Bit ECC Error Management */
+       u32 resv25[105];
+};
+
+#define CCI400_CTRLORD_TERM_BARRIER    0x00000008
+#define CCI400_CTRLORD_EN_BARRIER      0
+
+/* CCI-400 registers */
+struct ccsr_cci400 {
+       u32 ctrl_ord;                   /* Control Override */
+       u32 spec_ctrl;                  /* Speculation Control */
+       u32 secure_access;              /* Secure Access */
+       u32 status;                     /* Status */
+       u32 impr_err;                   /* Imprecise Error */
+       u8 res_14[0x100 - 0x14];
+       u32 pmcr;                       /* Performance Monitor Control */
+       u8 res_104[0xfd0 - 0x104];
+       u32 pid[8];                     /* Peripheral ID */
+       u32 cid[4];                     /* Component ID */
+       struct {
+               u32 snoop_ctrl;         /* Snoop Control */
+               u32 sha_ord;            /* Shareable Override */
+               u8 res_1008[0x1100 - 0x1008];
+               u32 rc_qos_ord;         /* read channel QoS Value Override */
+               u32 wc_qos_ord;         /* read channel QoS Value Override */
+               u8 res_1108[0x110c - 0x1108];
+               u32 qos_ctrl;           /* QoS Control */
+               u32 max_ot;             /* Max OT */
+               u8 res_1114[0x1130 - 0x1114];
+               u32 target_lat;         /* Target Latency */
+               u32 latency_regu;       /* Latency Regulation */
+               u32 qos_range;          /* QoS Range */
+               u8 res_113c[0x2000 - 0x113c];
+       } slave[5];                     /* Slave Interface */
+       u8 res_6000[0x9004 - 0x6000];
+       u32 cycle_counter;              /* Cycle counter */
+       u32 count_ctrl;                 /* Count Control */
+       u32 overflow_status;            /* Overflow Flag Status */
+       u8 res_9010[0xa000 - 0x9010];
+       struct {
+               u32 event_select;       /* Event Select */
+               u32 event_count;        /* Event Count */
+               u32 counter_ctrl;       /* Counter Control */
+               u32 overflow_status;    /* Overflow Flag Status */
+               u8 res_a010[0xb000 - 0xa010];
+       } pcounter[4];                  /* Performance Counter */
+       u8 res_e004[0x10000 - 0xe004];
+};
+#endif /* __ASM_ARCH_LS102XA_IMMAP_H_ */
diff --git a/arch/arm/include/asm/arch-ls102xa/imx-regs.h b/arch/arm/include/asm/arch-ls102xa/imx-regs.h
new file mode 100644 (file)
index 0000000..f9cd75b
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ *
+ */
+
+#ifndef __ASM_ARCH_IMX_REGS_H__
+#define __ASM_ARCH_IMX_REGS_H__
+
+#define I2C_QUIRK_REG  /* enable 8-bit driver */
+
+#ifdef CONFIG_LPUART_32B_REG
+struct lpuart_fsl {
+       u32 baud;
+       u32 stat;
+       u32 ctrl;
+       u32 data;
+       u32 match;
+       u32 modir;
+       u32 fifo;
+       u32 water;
+};
+#else
+struct lpuart_fsl {
+       u8 ubdh;
+       u8 ubdl;
+       u8 uc1;
+       u8 uc2;
+       u8 us1;
+       u8 us2;
+       u8 uc3;
+       u8 ud;
+       u8 uma1;
+       u8 uma2;
+       u8 uc4;
+       u8 uc5;
+       u8 ued;
+       u8 umodem;
+       u8 uir;
+       u8 reserved;
+       u8 upfifo;
+       u8 ucfifo;
+       u8 usfifo;
+       u8 utwfifo;
+       u8 utcfifo;
+       u8 urwfifo;
+       u8 urcfifo;
+       u8 rsvd[28];
+};
+#endif
+
+#endif /* __ASM_ARCH_IMX_REGS_H__ */
index 44cd455699e797f1f446bb4acdc5ea0b8b9fb52e..7334e0ccd5096dbe05090f2f33d3468101d8a8d3 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef _TEGRA_GPIO_H_
 #define _TEGRA_GPIO_H_
 
+#define TEGRA_GPIOS_PER_PORT   8
+#define TEGRA_PORTS_PER_BANK   4
 #define MAX_NUM_GPIOS           (TEGRA_GPIO_PORTS * TEGRA_GPIO_BANKS * 8)
 #define GPIO_NAME_SIZE         20      /* gpio_request max label len */
 
@@ -25,9 +27,14 @@ struct tegra_gpio_config {
        u32 init:2;
 };
 
-/*
- * Tegra-specific GPIO API
+/**
+ * tegra_spl_gpio_direction_output() - set the output value of a GPIO
+ *
+ * This function is only used from SPL on seaboard, which needs to enable a
+ * GPIO to get the UART running. It could be done in U-Boot rather than SPL,
+ * but for now, this gets it working
  */
+int tegra_spl_gpio_direction_output(int gpio, int value);
 
 /**
  * Configure a list of GPIOs
@@ -37,8 +44,4 @@ struct tegra_gpio_config {
  */
 void gpio_config_table(const struct tegra_gpio_config *config, int len);
 
-void gpio_info(void);
-
-#define gpio_status()  gpio_info()
-
 #endif /* TEGRA_GPIO_H_ */
index 5f2a5f4ea9f0905cffb340d75eb9e01aa25d8162..be80434dee4d0dc9824f6f74e198a51be40f938b 100644 (file)
@@ -23,4 +23,8 @@
 #include <asm/arch-fsl-lsch3/config.h>
 #endif
 
+#ifdef CONFIG_LS102XA
+#include <asm/arch/config.h>
+#endif
+
 #endif
index 63e4ad5a6744bd777b0d66ec390fca22c97e3fcf..c69d0646f58099caf2e9f664bcaf0ce4cc30fe7e 100644 (file)
@@ -44,10 +44,35 @@ struct arch_global_data {
 
 #include <asm-generic/global_data.h>
 
+#ifdef __clang__
+
+#define DECLARE_GLOBAL_DATA_PTR
+#define gd     get_gd()
+
+static inline gd_t *get_gd(void)
+{
+       gd_t *gd_ptr;
+
+#ifdef CONFIG_ARM64
+       /*
+        * Make will already error that reserving x18 is not supported at the
+        * time of writing, clang: error: unknown argument: '-ffixed-x18'
+        */
+       __asm__ volatile("mov %0, x18\n" : "=r" (gd_ptr));
+#else
+       __asm__ volatile("mov %0, r9\n" : "=r" (gd_ptr));
+#endif
+
+       return gd_ptr;
+}
+
+#else
+
 #ifdef CONFIG_ARM64
 #define DECLARE_GLOBAL_DATA_PTR                register volatile gd_t *gd asm ("x18")
 #else
 #define DECLARE_GLOBAL_DATA_PTR                register volatile gd_t *gd asm ("r9")
 #endif
+#endif
 
 #endif /* __ASM_GBL_DATA_H */
index 88ecddbc41e2923321b07fd299a66c676e0ea326..bfbe0a0988b47b2eafc636ca238f35087d7a5e5f 100644 (file)
@@ -376,7 +376,12 @@ out:
        return retval;
 }
 
-#elif !defined(readb)
+#else
+#define memset_io(a, b, c)             memset((void *)(a), (b), (c))
+#define memcpy_fromio(a, b, c)         memcpy((a), (void *)(b), (c))
+#define memcpy_toio(a, b, c)           memcpy((void *)(a), (b), (c))
+
+#if !defined(readb)
 
 #define readb(addr)                    (__readwrite_bug("readb"),0)
 #define readw(addr)                    (__readwrite_bug("readw"),0)
@@ -389,6 +394,7 @@ out:
 
 #define check_signature(io,sig,len)    (0)
 
+#endif
 #endif /* __mem_pci */
 
 /*
index 10d19333fc1306bb87daac5c867a7f84e2927ee7..a2cb06e49ae0248c2287a4a5538dccfad6e54674 100644 (file)
@@ -20,8 +20,19 @@ int raise (int signum)
 /* Dummy function to avoid linker complaints */
 void __aeabi_unwind_cpp_pr0(void)
 {
-};
+}
 
 void __aeabi_unwind_cpp_pr1(void)
 {
-};
+}
+
+/* Copy memory like memcpy, but no return value required.  */
+void __aeabi_memcpy(void *dest, const void *src, size_t n)
+{
+       (void) memcpy(dest, src, n);
+}
+
+void __aeabi_memset(void *dest, size_t n, int c)
+{
+       (void) memset(dest, c, n);
+}
index dfcc596815432b4357114f6aef01b11a66596e04..75ab546923f298f4238b784684e120a146002d75 100644 (file)
@@ -28,9 +28,6 @@ void __weak board_init_f(ulong dummy)
        /* Clear the BSS. */
        memset(__bss_start, 0, __bss_end - __bss_start);
 
-       /* Set global data pointer. */
-       gd = &gdata;
-
        board_init_r(NULL, 0);
 }
 
index 493f3373f3cd7ed61ff0df45fba8e77ed71e7a54..0cb87cee7f611ddb250b0ced65c5c816db0cc930 100644 (file)
  *************************************************************************
  */
 
+_start:
+
 #ifdef CONFIG_SYS_DV_NOR_BOOT_CFG
        .word   CONFIG_SYS_DV_NOR_BOOT_CFG
 #endif
 
-_start:
-       ldr     pc, _reset
+       b       reset
        ldr     pc, _undefined_instruction
        ldr     pc, _software_interrupt
        ldr     pc, _prefetch_abort
@@ -77,7 +78,6 @@ _start:
        .globl  _irq
        .globl  _fiq
 
-_reset:                        .word reset
 _undefined_instruction:        .word undefined_instruction
 _software_interrupt:   .word software_interrupt
 _prefetch_abort:       .word prefetch_abort
index 46337aea5520d77cee1cbd3f9d99c6c912ac56ee..66de2ad7ef1d0f6510ff4b1b5931f66e26db78e5 100644 (file)
@@ -2,7 +2,6 @@ menu "AVR32 architecture"
        depends on AVR32
 
 config SYS_ARCH
-       string
        default "avr32"
 
 choice
index bb8a13305907fcaaa631eb1ccd45723e8c412288..31913fe29f4ecad9cc12d84f91618696f061b082 100644 (file)
@@ -2,7 +2,6 @@ menu "Blackfin architecture"
        depends on BLACKFIN
 
 config SYS_ARCH
-       string
        default "blackfin"
 
 choice
index 6cda7db69989a958e4071a7341436a10af736ff2..5374b4d6ebd6deece80c51c9356f51b3ecb4133e 100644 (file)
@@ -2,7 +2,6 @@ menu "M68000 architecture"
        depends on M68K
 
 config SYS_ARCH
-       string
        default "m68k"
 
 choice
index ddaa45fb66891c9b89886afe03798e46b9b3d103..33bfd9f2f4f3616e1e14aea7047aa60663759c2a 100644 (file)
@@ -2,7 +2,6 @@ menu "MicroBlaze architecture"
        depends on MICROBLAZE
 
 config SYS_ARCH
-       string
        default "microblaze"
 
 choice
index 38dc5aa85db5104a38323987b0fc56bb818ada8d..ccc6235c8d9faf10e8b5c4a10c4d70ed7d331975 100644 (file)
@@ -27,7 +27,11 @@ typedef int          __kernel_pid_t;
 typedef unsigned short __kernel_ipc_pid_t;
 typedef unsigned int   __kernel_uid_t;
 typedef unsigned int   __kernel_gid_t;
+#ifdef __GNUC__
+typedef __SIZE_TYPE__  __kernel_size_t;
+#else
 typedef unsigned int   __kernel_size_t;
+#endif
 typedef int            __kernel_ssize_t;
 typedef int            __kernel_ptrdiff_t;
 typedef long           __kernel_time_t;
index 5bf0df4ff1d9609e25f918f75aaa1ffed2cdb73b..7686b779bf7b20dd8bb2df58365314105d5f2b47 100644 (file)
@@ -2,7 +2,6 @@ menu "MIPS architecture"
        depends on MIPS
 
 config SYS_ARCH
-       string
        default "mips"
 
 choice
index 743a8fe73678f7ce93b0b2962ec49cdc419c530d..81b0a0158f75eafaca07f828354d0a33ea86d344 100644 (file)
@@ -2,7 +2,6 @@ menu "NDS32 architecture"
        depends on NDS32
 
 config SYS_ARCH
-       string
        default "nds32"
 
 choice
index 0cba45bdbebb1e3a135618f31231e36d40e803e8..b3be7b56c3417721b85706d1be696b372a1a9e82 100644 (file)
@@ -2,7 +2,6 @@ menu "Nios II architecture"
        depends on NIOS2
 
 config SYS_ARCH
-       string
        default "nios2"
 
 choice
index cc54a2eec13e79f31c0fce36c7b08c9f0bcac37c..4d62b4c977497e9636ab731e7ac108353ed4423b 100644 (file)
@@ -2,7 +2,6 @@ menu "OpenRISC architecture"
        depends on OPENRISC
 
 config SYS_ARCH
-       string
        default "openrisc"
 
 choice
index 3325af3e5cb1a00fe5b6bd17d5a006e9e9b71f69..6f96c7cc52aa564c5bd8ec89e6feb41dae2b50e1 100644 (file)
@@ -2,7 +2,6 @@ menu "PowerPC architecture"
        depends on PPC
 
 config SYS_ARCH
-       string
        default "powerpc"
 
 choice
index 6ce464da767c2bdb9023337d73b7851ae38975bc..3378c91645afc4d45acce1160a8aa32aa8f09b8a 100644 (file)
@@ -2,7 +2,6 @@ menu "74xx_7xx CPU"
        depends on 74xx_7xx
 
 config SYS_CPU
-       string
        default "74xx_7xx"
 
 choice
index bfc4eae98055c3b6c84a61df7d39db55ffc246ee..a0f0ede6f3d9a63945567523a2ba5162b96d2582 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc512x CPU"
        depends on MPC512X
 
 config SYS_CPU
-       string
        default "mpc512x"
 
 choice
index 79579d768319583c73549e1432dadae5a57a8e42..aad4a7cdd86c799d51d8bb9fd19b22b8ede8e6e5 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc5xx CPU"
        depends on 5xx
 
 config SYS_CPU
-       string
        default "mpc5xx"
 
 choice
index b2f0bad544fc929b5a0865745a47e622db3cac0e..cca58e5bbb25432a61da66ac866560dd1aa31d7e 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc5xxx CPU"
        depends on MPC5xxx
 
 config SYS_CPU
-       string
        default "mpc5xxx"
 
 choice
index 309833f8c8ce9a2d94871cb375ede53fa7e8ec6b..4f984230a40bb07ca6733274a5267af822bc104a 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc824x CPU"
        depends on MPC824X
 
 config SYS_CPU
-       string
        default "mpc824x"
 
 choice
index 1a8707de3b09d2ec6c79775366821785b6d5aaa7..41e4e5f1eccd28297771464b113241b940c7b792 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc8260 CPU"
        depends on MPC8260
 
 config SYS_CPU
-       string
        default "mpc8260"
 
 choice
index 5fd33934b387ebf53a0b5a7c3cf889c7da5dca6d..6de92650884dcc229c51cfb9def394a73fb3c811 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc83xx CPU"
        depends on MPC83xx
 
 config SYS_CPU
-       string
        default "mpc83xx"
 
 choice
index 0f703804da4585546d10230f250378db0be650dd..8c1c01c3424acc1a9466cc611aa7707dd87828d7 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc85xx CPU"
        depends on MPC85xx
 
 config SYS_CPU
-       string
        default "mpc85xx"
 
 choice
index f0ff4419d19b9c10e0947ce380dc2f729a2db2fd..14e8b1aa66a3b25ff8fcdde22c8fa67e03754435 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc86xx CPU"
        depends on MPC86xx
 
 config SYS_CPU
-       string
        default "mpc86xx"
 
 choice
index 2c39244fa7648b85467a904ec9a9a997ccf69bba..f1dca90eba98663f83476ef33a76ed9db507bc27 100644 (file)
@@ -2,7 +2,6 @@ menu "mpc8xx CPU"
        depends on 8xx
 
 config SYS_CPU
-       string
        default "mpc8xx"
 
 choice
index 2d15dd1210568ff9cf384a30b5cf91bb36619eea..41b525c16d17e2863fc1db8b52a34ca4aed69152 100644 (file)
@@ -2,7 +2,6 @@ menu "ppc4xx CPU"
        depends on 4xx
 
 config SYS_CPU
-       string
        default "ppc4xx"
 
 choice
diff --git a/arch/powerpc/include/asm/fsl_enet.h b/arch/powerpc/include/asm/fsl_enet.h
deleted file mode 100644 (file)
index 96146b6..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2010 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#ifndef __ASM_PPC_FSL_ENET_H
-#define __ASM_PPC_FSL_ENET_H
-
-#include <phy.h>
-
-struct tsec_mii_mng {
-       u32 miimcfg;            /* MII management configuration reg */
-       u32 miimcom;            /* MII management command reg */
-       u32 miimadd;            /* MII management address reg */
-       u32 miimcon;            /* MII management control reg */
-       u32 miimstat;           /* MII management status reg  */
-       u32 miimind;            /* MII management indication reg */
-       u32 ifstat;             /* Interface Status Register */
-} __attribute__ ((packed));
-
-int fdt_fixup_phy_connection(void *blob, int offset, phy_interface_t phyc);
-
-#endif /* __ASM_PPC_FSL_ENET_H */
index c3935506947ef5b37c400228fbabdf73a2252471..3057325b4761c84314dc22206ff5ba0056a2eaae 100644 (file)
@@ -2,15 +2,12 @@ menu "Sandbox architecture"
        depends on SANDBOX
 
 config SYS_ARCH
-       string
        default "sandbox"
 
 config SYS_BOARD
-       string
        default "sandbox"
 
 config SYS_CONFIG_NAME
-       string
        default "sandbox"
 
 endmenu
index efffacba1d37b86f88fab96c19fb0bfcd535c024..797478a2c7f661294bb462d56d71048459652cd7 100644 (file)
@@ -1,6 +1,16 @@
 /dts-v1/;
 
 / {
+       chosen {
+               stdout-path = "/serial";
+       };
+
+       /* Needs to be available prior to relocation */
+       uart0: serial {
+               compatible = "sandbox,serial";
+               sandbox,text-colour = "cyan";
+       };
+
        triangle {
                compatible = "demo-shape";
                colour = "cyan";
index e6ded16b203497ba80706b4f145a8c1f5c0fd08f..4bf9afc384f6bc80a250b2eac12401b512082f71 100644 (file)
@@ -2,7 +2,6 @@ menu "SuperH architecture"
        depends on SH
 
 config SYS_ARCH
-       string
        default "sh"
 
 choice
index fc9291037c65101bb0243543cac164a80733af1b..733334f93186fc116010cc421ebd1fc47457f122 100644 (file)
@@ -2,7 +2,6 @@ menu "SPARC architecture"
        depends on SPARC
 
 config SYS_ARCH
-       string
        default "sparc"
 
 choice
index 8fc619a3c099c12b4937c6cff452238d51638372..ff9935acc4fcbe9522ce3b7bd282baf13880fa88 100644 (file)
@@ -2,7 +2,6 @@ menu "x86 architecture"
        depends on X86
 
 config SYS_ARCH
-       string
        default "x86"
 
 choice
index 0af1b30318daae616a1bb1fcf1d12b425e21ac1e..55535669fae96c0d9dbd16258e44d870ba2a84eb 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ECO5PK
 
 config SYS_BOARD
-       string
        default "eco5pk"
 
 config SYS_VENDOR
-       string
        default "8dtech"
 
 config SYS_CONFIG_NAME
-       string
        default "eco5pk"
 
 endif
index 356754344dd066c487276b5dfe8ccb56a4d232b3..8f0197a638e3de938d65abfe6aa9f0a4d7682a0d 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_ADP_AG101
 
 config SYS_CPU
-       string
        default "n1213"
 
 config SYS_BOARD
-       string
        default "adp-ag101"
 
 config SYS_VENDOR
-       string
        default "AndesTech"
 
 config SYS_SOC
-       string
        default "ag101"
 
 config SYS_CONFIG_NAME
-       string
        default "adp-ag101"
 
 endif
index ee551a67dab12a1260b5d4077cbde9eee8c7cd2b..5e8aa22c448adc7865eef0c9472658c5f3952b86 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_ADP_AG101P
 
 config SYS_CPU
-       string
        default "n1213"
 
 config SYS_BOARD
-       string
        default "adp-ag101p"
 
 config SYS_VENDOR
-       string
        default "AndesTech"
 
 config SYS_SOC
-       string
        default "ag101"
 
 config SYS_CONFIG_NAME
-       string
        default "adp-ag101p"
 
 endif
index 34566bd0715a1c5c485d50885b8972a27055980a..fc17be3989f8a07db2958a5810b1ead19d16911c 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_ADP_AG102
 
 config SYS_CPU
-       string
        default "n1213"
 
 config SYS_BOARD
-       string
        default "adp-ag102"
 
 config SYS_VENDOR
-       string
        default "AndesTech"
 
 config SYS_SOC
-       string
        default "ag102"
 
 config SYS_CONFIG_NAME
-       string
        default "adp-ag102"
 
 endif
index 588ee73791a0b6d1eb5ffcf0b5604b82ef4d7744..b85d4da44b06de2cdc6a1d170e98793cf5fda513 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_IPAM390
 
 config SYS_BOARD
-       string
        default "ipam390"
 
 config SYS_VENDOR
-       string
        default "Barix"
 
 config SYS_CONFIG_NAME
-       string
        default "ipam390"
 
 endif
index 5676c4fe5be21f32bdad0ee1bd7ba0b645e8fef3..f9107a9a4b0b25aa0e2eeb475532222202a1c12b 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_KWB
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "kwb"
 
 config SYS_VENDOR
-       string
        default "BuR"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "kwb"
 
 endif
index f4520231807a387b0d73c225f9d94ce55b881a3b..ee510d3480b24e094c7ad7a742c2c5f60a884261 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TSERIES
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "tseries"
 
 config SYS_VENDOR
-       string
        default "BuR"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "tseries"
 
 endif
index f53f29518779ff9580b1410bf1d83b0904b91bc4..237dc1b5c0deeedc2a29e350a35356f44c46f58a 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_EB_CPU5282
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "eb_cpu5282"
 
 config SYS_VENDOR
-       string
        default "BuS"
 
 config SYS_CONFIG_NAME
-       string
        default "eb_cpu5282"
 
 endif
index 3a36cf33448fdb94bb07a5e7326d79ae684254ed..85d335a0e5b517a4e3f44c686ed77583fb7c02ed 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_EB_CPUX9K2
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "eb_cpux9k2"
 
 config SYS_VENDOR
-       string
        default "BuS"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "eb_cpux9k2"
 
 endif
index d4a6e5202e9ac25fe7f1235b6f35f8f73fb5c601..bb6a7e787d4e4a54d0a2aacd6bdfc29611125a25 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_VL_MA2SC
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "vl_ma2sc"
 
 config SYS_VENDOR
-       string
        default "BuS"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "vl_ma2sc"
 
 endif
index cbc004a44d019f5bcb3c62bb2fc3c4e89ff0b947..1448703dc10fad98153db8315d1093094dc73231 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_FLEA3
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "flea3"
 
 config SYS_VENDOR
-       string
        default "CarMediaLab"
 
 config SYS_SOC
-       string
        default "mx35"
 
 config SYS_CONFIG_NAME
-       string
        default "flea3"
 
 endif
index 2cfa5bcbcb8beae14ae552a67e9caae362d1b1a9..ed74956b835aaa8bc104dec28d1b81a29f9f04fc 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ELPT860
 
 config SYS_BOARD
-       string
        default "elpt860"
 
 config SYS_VENDOR
-       string
        default "LEOX"
 
 config SYS_CONFIG_NAME
-       string
        default "ELPT860"
 
 endif
index 9675a9efb5c828e5e5614957d9330093a6404138..ac3fe3fbcb3e0c04cd6b99483f2fb986b340a2fe 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_EDMINIV2
 
 config SYS_BOARD
-       string
        default "edminiv2"
 
 config SYS_VENDOR
-       string
        default "LaCie"
 
 config SYS_CONFIG_NAME
-       string
        default "edminiv2"
 
 endif
index e8eb9ad5bc455662c751f75785f4d98df37b9500..ba460dba45ec7a94ce82eeec1a1594bd7e10a8e8 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_NET2BIG_V2
 
 config SYS_BOARD
-       string
        default "net2big_v2"
 
 config SYS_VENDOR
-       string
        default "LaCie"
 
 config SYS_CONFIG_NAME
-       string
        default "lacie_kw"
 
 endif
index 6242a42389ac12ecdf2f079840dbbb06110a65cb..930b822dfbe71ea29b16de9620a52a6de99a6893 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_NETSPACE_V2
 
 config SYS_BOARD
-       string
        default "netspace_v2"
 
 config SYS_VENDOR
-       string
        default "LaCie"
 
 config SYS_CONFIG_NAME
-       string
        default "lacie_kw"
 
 endif
index ea6850f47723ef032a6fb615f8a9f103686e5299..75a2fc5a7561eee8f6c5e894b66103cb287b0e22 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_WIRELESS_SPACE
 
 config SYS_BOARD
-       string
        default "wireless_space"
 
 config SYS_VENDOR
-       string
        default "LaCie"
 
 config SYS_CONFIG_NAME
-       string
        default "wireless_space"
 
 endif
index 7edcd8102df0f6aa3925c530046a87921a562a9a..ee2ec06f1eb71d2db1f16d807e6b9f3dabfa3612 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_ASPENITE
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "aspenite"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_SOC
-       string
        default "armada100"
 
 config SYS_CONFIG_NAME
-       string
        default "aspenite"
 
 endif
index c08fd05b9e54aa83d7a8aa0cf79ea734db19354b..c5118f8c88109cc5f2d7ee7a1ae0d0e5935b9f82 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DB64360
 
 config SYS_BOARD
-       string
        default "db64360"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_CONFIG_NAME
-       string
        default "DB64360"
 
 endif
index 3cd2eb433e0bd6a33b730ad4b44bf1e368d9fcc6..f53e3a9c8575596f08a7ee519931ab6b489414c6 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DB64460
 
 config SYS_BOARD
-       string
        default "db64460"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_CONFIG_NAME
-       string
        default "DB64460"
 
 endif
index 7ce761b94ddb516afc600f85f81d4f0da5e6f704..33d5157bc3c703d17f7543c64494a65fa874512f 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_DKB
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "dkb"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_SOC
-       string
        default "pantheon"
 
 config SYS_CONFIG_NAME
-       string
        default "dkb"
 
 endif
index afaddf4a81fb558e6f43ee7efd1de7d6ba9cff49..f65ff73713e07f63ef94c747f4ec26281136253d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DREAMPLUG
 
 config SYS_BOARD
-       string
        default "dreamplug"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_CONFIG_NAME
-       string
        default "dreamplug"
 
 endif
index 94cdd4887aea849dcdb1cba04150815b4e05d456..102c18d30d474e6faa153a5e1a1056aa873a3fc6 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_GPLUGD
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "gplugd"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_SOC
-       string
        default "armada100"
 
 config SYS_CONFIG_NAME
-       string
        default "gplugd"
 
 endif
index 0b10e9f7742fca356cbb7576ffc5190c208f9f4a..529e6e3b4ba32acd740519029bdf14e87599ab01 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_GURUPLUG
 
 config SYS_BOARD
-       string
        default "guruplug"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_CONFIG_NAME
-       string
        default "guruplug"
 
 endif
index 49654fe7696e38eb5be375b77e095c37b5e91f07..00d7d1c5ee4aa90eab3c50cdae8f7dc7ae85aa0d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MV88F6281GTW_GE
 
 config SYS_BOARD
-       string
        default "mv88f6281gtw_ge"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_CONFIG_NAME
-       string
        default "mv88f6281gtw_ge"
 
 endif
index 7032ba57ce4f24ebc3d49dbdf85f88a8a20849cc..124b66da0f134c2af976772a2ba3bbec97ab170c 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OPENRD
 
 config SYS_BOARD
-       string
        default "openrd"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_CONFIG_NAME
-       string
        default "openrd"
 
 endif
index e8702a7d194776eb8942fbf4f7d6ea456eb20ff7..025ee26dc6be8f5eba840e10779be924f1ae46d9 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_RD6281A
 
 config SYS_BOARD
-       string
        default "rd6281a"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_CONFIG_NAME
-       string
        default "rd6281a"
 
 endif
index 1c24d24221cd4091f85be19cfe23dc502ae60536..e5f92847299482ab8c8391f8dc106123c94791ba 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_SHEEVAPLUG
 
 config SYS_BOARD
-       string
        default "sheevaplug"
 
 config SYS_VENDOR
-       string
        default "Marvell"
 
 config SYS_CONFIG_NAME
-       string
        default "sheevaplug"
 
 endif
index ac6bebcdf180d407f1b3a706a5eb0be594eae44a..7c8a6f634cf6bc94b560cc1d22ff15d890b82c36 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_RRVISION
 
 config SYS_BOARD
-       string
        default "RRvision"
 
 config SYS_CONFIG_NAME
-       string
        default "RRvision"
 
 endif
index 13ea620ea6d9c21201cde4ccc594f58c9c9f6996..b50cd3b7f6d52f8b17496e165eec7a3e484c274f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DOCKSTAR
 
 config SYS_BOARD
-       string
        default "dockstar"
 
 config SYS_VENDOR
-       string
        default "Seagate"
 
 config SYS_CONFIG_NAME
-       string
        default "dockstar"
 
 endif
index 2fb14ef86f9f6b8e45109ae44850eb547ee6909b..0cbeaf7ca721cac750166dbb77ab6a7ba1a6f2c5 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_GOFLEXHOME
 
 config SYS_BOARD
-       string
        default "goflexhome"
 
 config SYS_VENDOR
-       string
        default "Seagate"
 
 config SYS_CONFIG_NAME
-       string
        default "goflexhome"
 
 endif
index 9ce64fdb7e9944f813b159e680f940c87ae39a3c..21a9e487e49c21edaf9ba15632effc0aa6a57318 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_A3000
 
 config SYS_BOARD
-       string
        default "a3000"
 
 config SYS_CONFIG_NAME
-       string
        default "A3000"
 
 endif
index ab32d5ca1c751273f98770a3f4ec5403d55178fb..444c450d8abe50dbdf9817851556d853770944a8 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_A3M071
 
 config SYS_BOARD
-       string
        default "a3m071"
 
 config SYS_CONFIG_NAME
-       string
        default "a3m071"
 
 endif
index cc3194756c4020e57d3b9ca6ab66ba01009595fe..ba5447fb9a5a2ab988a79ae79bb38b06a313a254 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_A4M072
 
 config SYS_BOARD
-       string
        default "a4m072"
 
 config SYS_CONFIG_NAME
-       string
        default "a4m072"
 
 endif
index eccf92817c541dbaed674339c4057b4f17decebf..904a92c7a0f4da74e18b47ae981c3114c8ca1cfa 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_TB100
 
 config SYS_CPU
-       string
        default "arc700"
 
 config SYS_BOARD
-       string
        default "tb100"
 
 config SYS_VENDOR
-       string
        default "abilis"
 
 config SYS_CONFIG_NAME
-       string
        default "tb100"
 
 endif
index 008d943425943d5589cfc8ba5286a2947bc589cf..ff191811ba068702ece02751cb1f65b56dcb7045 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_AFEB9260
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "afeb9260"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "afeb9260"
 
 endif
index 2b886929b5a9e7910ccf6125dac0ee65fd0444b0..64e18f4e233325adb247812967c0e96bdda4150f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CAM_ENC_4XX
 
 config SYS_BOARD
-       string
        default "cam_enc_4xx"
 
 config SYS_VENDOR
-       string
        default "ait"
 
 config SYS_CONFIG_NAME
-       string
        default "cam_enc_4xx"
 
 endif
index 78931643a49984bbf57cf756676942faf8df2ea1..2352e6680692c279ba50f4b621e94ec93ca4b59f 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_AP_SH4A_4A
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "ap_sh4a_4a"
 
 config SYS_VENDOR
-       string
        default "alphaproject"
 
 config SYS_CONFIG_NAME
-       string
        default "ap_sh4a_4a"
 
 endif
index 12096380b8aa435e3794ecda862ebbb5274fcfba..cd3d0980a7a1dafee69cc317f5da0b197e297797 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_NIOS2_GENERIC
 
 config SYS_BOARD
-       string
        default "nios2-generic"
 
 config SYS_VENDOR
-       string
        default "altera"
 
 config SYS_CONFIG_NAME
-       string
        default "nios2-generic"
 
 endif
index d0d90128bc9c52abe7665abfff87bc8ed9678bbc..f8595781d9bd151e2463a76f85050704f8064aa8 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SOCFPGA_CYCLONE5
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "socfpga"
 
 config SYS_VENDOR
-       string
        default "altera"
 
 config SYS_SOC
-       string
        default "socfpga"
 
 config SYS_CONFIG_NAME
-       string
        default "socfpga_cyclone5"
 
 endif
index 096f02e5eec1cfa5772e9faf9d3296261b051313..033deaf7d6df0512ed6ff57aa859a1e2e39f1baa 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ACADIA
 
 config SYS_BOARD
-       string
        default "acadia"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "acadia"
 
 endif
index a002cfa42872a5a46476a9ded533b49d75307fdb..c0bd40aee77f7b4689425eb224541f84fe0d77cb 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_BAMBOO
 
 config SYS_BOARD
-       string
        default "bamboo"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "bamboo"
 
 endif
index 2f5999d1948f3af71ff29828511963b99277fa36..255e01377748d3cc0d1a9eb46a771f2d2cfb5fdb 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_BLUESTONE
 
 config SYS_BOARD
-       string
        default "bluestone"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "bluestone"
 
 endif
index 29f769b009fe69c0f59eb1eeaccfce826c725160..540d9b623598aa213f581dbbbf93487cdd57ca07 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_BUBINGA
 
 config SYS_BOARD
-       string
        default "bubinga"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "bubinga"
 
 endif
index 545056a15cab9be82a88db1fb98dd05b2a34d50f..530a6efd60bc49316f727e4fb05c36c84c5efa40 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CANYONLANDS
 
 config SYS_BOARD
-       string
        default "canyonlands"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "canyonlands"
 
 endif
index cc1448f133147dca9f1979149b5cf7b4e3d6660d..62394b68fa9eaa153da091d2cfcc9d09c7be2dda 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_EBONY
 
 config SYS_BOARD
-       string
        default "ebony"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "ebony"
 
 endif
index 2a8d783a5363a74a337840c63a1836ff6fb933e7..fc606cff1cc15ea06f1ef78051e4a16a15367e7d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KATMAI
 
 config SYS_BOARD
-       string
        default "katmai"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "katmai"
 
 endif
index 3564cc3c891edc0778b668d95fe78a48df89ec32..3f2f4348274c9dc62d4269ed058e9dda14c34120 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KILAUEA
 
 config SYS_BOARD
-       string
        default "kilauea"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "kilauea"
 
 endif
index 7f199809b5fe52263049f91e76dd04c9471dd2ad..3df90af484d634cc4977a230976ec9ef2a322093 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_LUAN
 
 config SYS_BOARD
-       string
        default "luan"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "luan"
 
 endif
index 7f95bdcbe1a679328708cc20226883d488025d3d..31ce5f10c679fc5b0f3f0b00b92574938bed28be 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MAKALU
 
 config SYS_BOARD
-       string
        default "makalu"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "makalu"
 
 endif
index 5eaf8125579ff0f843b6c8c00cc07cb83bee91aa..18c1a15ef4261fad804e67cceb299fd650965e98 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OCOTEA
 
 config SYS_BOARD
-       string
        default "ocotea"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "ocotea"
 
 endif
index 001d40088dc52f7b0ca1fcfeae80a24affe77cc5..d7105909985b400f55ff538cef6d62fa7f7bbe38 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_REDWOOD
 
 config SYS_BOARD
-       string
        default "redwood"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "redwood"
 
 endif
index ddcaced7ae617b6b0179a58a41502c7b6deea6b9..67ee3ca2eb630df957f7c42d0abef8986f809315 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_SEQUOIA
 
 config SYS_BOARD
-       string
        default "sequoia"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "sequoia"
 
 endif
index 8411a82861c9ac99ff5beb008797709dea5ecfd0..fc5cb1de7e796c09951d445555864ab241465b16 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TAIHU
 
 config SYS_BOARD
-       string
        default "taihu"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "taihu"
 
 endif
index 0022063dc7dcdafbbcec9828adbe09dbc86e0646..abd07f570d5cf97cd11ce44724d617cce9dbdb19 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TAISHAN
 
 config SYS_BOARD
-       string
        default "taishan"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "taishan"
 
 endif
index f98cec5bc985c93be0ec1915595b2fa75530aa41..94e3dc9e78b863cfbe3915896f9bf8dc48ab03d3 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_WALNUT
 
 config SYS_BOARD
-       string
        default "walnut"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "walnut"
 
 endif
index 8aa62c01299d4f2ef128669b8cb58d7d3bb07fc1..dfa10687c2c1c033f4e0887fe58a8af72fdc2d7a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_YOSEMITE
 
 config SYS_BOARD
-       string
        default "yosemite"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "yosemite"
 
 endif
index 945333f157d58cda43feed2417cdbcbd9308089b..61d95891e4310940c3f43216bbdce7909ee38858 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_YUCCA
 
 config SYS_BOARD
-       string
        default "yucca"
 
 config SYS_VENDOR
-       string
        default "amcc"
 
 config SYS_CONFIG_NAME
-       string
        default "yucca"
 
 endif
index 58078eacf550313af205a425bccd5e49bb472fbd..ac35d6de6feb4c0c5d2e751e727ef294728286f8 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_ARISTAINETOS
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "aristainetos"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "aristainetos"
 
 endif
index f2d33c63789f4ae3081be6e52dc7131ac34aadc6..53532bba58ffd47790bd217b7a0cff3078c2a023 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_APF27
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "apf27"
 
 config SYS_VENDOR
-       string
        default "armadeus"
 
 config SYS_SOC
-       string
        default "mx27"
 
 config SYS_CONFIG_NAME
-       string
        default "apf27"
 
 endif
index c1ac6b18722207c409fc5836d293ecab26975ddb..49553131b9d53fc18cd1345e8f066e36e3ef8a7b 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_INTEGRATORAP_CM720T
 
 config SYS_CPU
-       string
        default "arm720t"
 
 config SYS_BOARD
-       string
        default "integrator"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "integratorap"
 
 endif
@@ -21,19 +17,15 @@ endif
 if TARGET_INTEGRATORAP_CM920T
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "integrator"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "integratorap"
 
 endif
@@ -41,19 +33,15 @@ endif
 if TARGET_INTEGRATORCP_CM920T
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "integrator"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "integratorcp"
 
 endif
@@ -61,19 +49,15 @@ endif
 if TARGET_INTEGRATORAP_CM926EJS
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "integrator"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "integratorap"
 
 endif
@@ -81,19 +65,15 @@ endif
 if TARGET_INTEGRATORCP_CM926EJS
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "integrator"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "integratorcp"
 
 endif
@@ -101,19 +81,15 @@ endif
 if TARGET_INTEGRATORCP_CM1136
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "integrator"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "integratorcp"
 
 endif
@@ -121,19 +97,15 @@ endif
 if TARGET_INTEGRATORAP_CM946ES
 
 config SYS_CPU
-       string
        default "arm946es"
 
 config SYS_BOARD
-       string
        default "integrator"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "integratorap"
 
 endif
@@ -141,19 +113,15 @@ endif
 if TARGET_INTEGRATORCP_CM946ES
 
 config SYS_CPU
-       string
        default "arm946es"
 
 config SYS_BOARD
-       string
        default "integrator"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "integratorcp"
 
 endif
index e49e87133abdf9a9b0acedacad185bef1eb7f819..7fa30c65f9eee5e70e93467931ab08b014b28323 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_VEXPRESS_CA15_TC2
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "vexpress"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "vexpress_ca15_tc2"
 
 endif
@@ -21,19 +17,15 @@ endif
 if TARGET_VEXPRESS_CA5X2
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "vexpress"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "vexpress_ca5x2"
 
 endif
@@ -41,19 +33,15 @@ endif
 if TARGET_VEXPRESS_CA9X4
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "vexpress"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "vexpress_ca9x4"
 
 endif
index 91eb8d2997bf2ebde776f30f2d89a8cedcb81b53..94944095c3f87cfc5177073688ce1a5e9eabcb1d 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_VEXPRESS_AEMV8A
 
 config SYS_CPU
-       string
        default "armv8"
 
 config SYS_BOARD
-       string
        default "vexpress64"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "vexpress_aemv8a"
 
 endif
@@ -21,19 +17,15 @@ endif
 if TARGET_VEXPRESS_AEMV8A_SEMI
 
 config SYS_CPU
-       string
        default "armv8"
 
 config SYS_BOARD
-       string
        default "vexpress64"
 
 config SYS_VENDOR
-       string
        default "armltd"
 
 config SYS_CONFIG_NAME
-       string
        default "vexpress_aemv8a"
 
 endif
index 6e947dce0a49ddc5c89da1db44a9d42ca912b025..a7c04cef83dcae6ba1249276245eceaf38c8f60c 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_ASTRO_MCF5373L
 
 config SYS_CPU
-       string
        default "mcf532x"
 
 config SYS_BOARD
-       string
        default "mcf5373l"
 
 config SYS_VENDOR
-       string
        default "astro"
 
 config SYS_CONFIG_NAME
-       string
        default "astro_mcf5373l"
 
 endif
index 826753f04317e3f0050a2967cf26d5d0d2d028d8..9b336caafda8e5b077e1ae99894859eccdb50d75 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_ATC
 
 config SYS_BOARD
-       string
        default "atc"
 
 config SYS_CONFIG_NAME
-       string
        default "atc"
 
 endif
index 3365c7b61fabe5d33569be22aa132d3a01368bab..cd37dd4861dd8f9e47888923f784df5f080614df 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ARMADILLO_800EVA
 
 config SYS_BOARD
-       string
        default "armadillo-800eva"
 
 config SYS_VENDOR
-       string
        default "atmark-techno"
 
 config SYS_CONFIG_NAME
-       string
        default "armadillo-800eva"
 
 endif
index d7ee4f49fdbafcc45e42e76c4e08554bb330f9b2..61db2e2d4053e0be16f7f28c4719098d705417bc 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AT91RM9200EK
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "at91rm9200ek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "at91rm9200ek"
 
 endif
index 14af5bcd407f493ec0d5c6dbfbf727b696adc030..24a645bc94de88c8a44f5dc4287704c231a2a37a 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AT91SAM9260EK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "at91sam9260ek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "at91sam9260ek"
 
 endif
index 63dcdd8da0825995223026c34b0544b726001444..301bf1a61c6fe1cdc9dcd691a1889f5d83720211 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AT91SAM9261EK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "at91sam9261ek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "at91sam9261ek"
 
 endif
index fa0a58acb5b020159f66686d36c1a87b917afc5e..f8e2b4814950c7b0e79d4aaee50a92b28c13281c 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AT91SAM9263EK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "at91sam9263ek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "at91sam9263ek"
 
 endif
index 8567f95753ba68b6dfa5ba972f8d6b9bef6e8916..d2e191c141b333c4ff84d28682fee08c9aa6c253 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AT91SAM9M10G45EK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "at91sam9m10g45ek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "at91sam9m10g45ek"
 
 endif
index 4fc714b1b28c09afa8e5bb473fba0f45a6457b9a..845cd36442dd50d6021c8923ac4476c550e5224a 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AT91SAM9N12EK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "at91sam9n12ek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "at91sam9n12ek"
 
 endif
index 178f80dc041512bf265b5c86b9f76e1937a125f5..517f22a8a960f03644959aa9ed23a1f4a94702cc 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AT91SAM9RLEK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "at91sam9rlek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "at91sam9rlek"
 
 endif
index 0a0b132138c63a3b9264ef33d6acd8e3301b469c..d236b1ad66dc153e314e4bbbe27d7d7b84174e71 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AT91SAM9X5EK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "at91sam9x5ek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "at91sam9x5ek"
 
 endif
index a966b31830df477673296d1afab3f305351d5db8..28037b67b4b01bf21fdbfd645122738a0cf30660 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_ATNGW100
 
 config SYS_BOARD
-       string
        default "atngw100"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "atngw100"
 
 endif
index dcea07ec02fa0585d2ede9bad15bb6ac424b1581..ca042690805dbfddd30d4c26763ee7765bf409f1 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_ATNGW100MKII
 
 config SYS_BOARD
-       string
        default "atngw100mkii"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "atngw100mkii"
 
 endif
index 1a24409c6e847175c503a80911aea906e1ec9493..6d4151453fb4ef03aa1fe71f9aab6a5042a1fc83 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_ATSTK1002
 
 config SYS_BOARD
-       string
        default "atstk1000"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "atstk1002"
 
 endif
@@ -21,19 +17,15 @@ endif
 if TARGET_ATSTK1003
 
 config SYS_BOARD
-       string
        default "atstk1000"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "atstk1003"
 
 endif
@@ -41,19 +33,15 @@ endif
 if TARGET_ATSTK1004
 
 config SYS_BOARD
-       string
        default "atstk1000"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "atstk1004"
 
 endif
@@ -61,19 +49,15 @@ endif
 if TARGET_ATSTK1006
 
 config SYS_BOARD
-       string
        default "atstk1000"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "atstk1006"
 
 endif
index 603b2411bae7e913a399405eb5db8ad8cdbcdbbc..0ca1ec006abd1792a8895d57003d092692fd75d1 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SAMA5D3_XPLAINED
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "sama5d3_xplained"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "sama5d3_xplained"
 
 endif
index 5b4eb6f25dc90eba430852a036634a786bf7b8d8..f0dd04a06edf366878d00fd6af300756efe96433 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SAMA5D3XEK
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "sama5d3xek"
 
 config SYS_VENDOR
-       string
        default "atmel"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "sama5d3xek"
 
 endif
index 16001e4b07c94b73ab0511fadbba6a5b5fd9ea79..267647cb41faf99de765a1416ece14bc41c492f2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MEDCOM_WIDE
 
 config SYS_BOARD
-       string
        default "medcom-wide"
 
 config SYS_VENDOR
-       string
        default "avionic-design"
 
 config SYS_CONFIG_NAME
-       string
        default "medcom-wide"
 
 endif
index c9a90247a2a511bf03eada3643414a26f4ba12d9..09a3ac940daa3f257459906dcc92bdd0341b4b36 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PLUTUX
 
 config SYS_BOARD
-       string
        default "plutux"
 
 config SYS_VENDOR
-       string
        default "avionic-design"
 
 config SYS_CONFIG_NAME
-       string
        default "plutux"
 
 endif
index e6b69e84306704e709ddf03d13453ec91e563d51..36a0cec1be1fb6b5916a59221bea0e8ae39f5a03 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TEC_NG
 
 config SYS_BOARD
-       string
        default "tec-ng"
 
 config SYS_VENDOR
-       string
        default "avionic-design"
 
 config SYS_CONFIG_NAME
-       string
        default "tec-ng"
 
 endif
index fbf7f469762a8632c6b5e0e07204230eecfd2222..bc9751b1086aec1653518bda86a259de729ef45d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TEC
 
 config SYS_BOARD
-       string
        default "tec"
 
 config SYS_VENDOR
-       string
        default "avionic-design"
 
 config SYS_CONFIG_NAME
-       string
        default "tec"
 
 endif
index 7b1687ee43b0eb13eb91ebda5d19a605b284d71a..0b67ebde93b827bd2294c4aaf8362994277f3a90 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_FX12MM
 
 config SYS_BOARD
-       string
        default "fx12mm"
 
 config SYS_VENDOR
-       string
        default "avnet"
 
 config SYS_CONFIG_NAME
-       string
        default "fx12mm"
 
 endif
index 8ae22e93a04df701055be256c02dd835ff557ebf..079387b707a7cc633c11a94deb5431eddf767ccc 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_V5FX30TEVAL
 
 config SYS_BOARD
-       string
        default "v5fx30teval"
 
 config SYS_VENDOR
-       string
        default "avnet"
 
 config SYS_CONFIG_NAME
-       string
        default "v5fx30teval"
 
 endif
index aee21933d5d5be4e0ec4ac077b4596e39b924dc8..fb1cf3f0ef9c23faf1b658876869693d857b4bc3 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_BALLOON3
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "balloon3"
 
 config SYS_CONFIG_NAME
-       string
        default "balloon3"
 
 endif
index a2ddd87f844202fd1ab72c2dafe4d5e798864837..56ed7d670bb65c33e2bec563b5996818fff65bf7 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TITANIUM
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "titanium"
 
 config SYS_VENDOR
-       string
        default "barco"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "titanium"
 
 endif
index ba058db08963dc869b38d437be21363f84aa3b24..a0fc19f63c1dfb654871d8fb5b8b934b4f9e63ab 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BC3450
 
 config SYS_BOARD
-       string
        default "bc3450"
 
 config SYS_CONFIG_NAME
-       string
        default "BC3450"
 
 endif
index c3e3837c36aef3b43ff42adb845e2417d41f0b5d..9c5407e7b20f98594e9e13649738e655100d273c 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BCT_BRETTL2
 
 config SYS_BOARD
-       string
        default "bct-brettl2"
 
 config SYS_CONFIG_NAME
-       string
        default "bct-brettl2"
 
 endif
index 749ad2bf76ead61b380ace4ea2f34fd6a9c6329f..e6fc12ccb2f0ad88e26c23b7780d34f1cb9c1dfe 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF506F_EZKIT
 
 config SYS_BOARD
-       string
        default "bf506f-ezkit"
 
 config SYS_CONFIG_NAME
-       string
        default "bf506f-ezkit"
 
 endif
index 5656d1c28889f3b8350149b7581dfae6eabfc84b..a0e80a8bde88a74eb8d479a5af95206f5ebc1d04 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF518F_EZBRD
 
 config SYS_BOARD
-       string
        default "bf518f-ezbrd"
 
 config SYS_CONFIG_NAME
-       string
        default "bf518f-ezbrd"
 
 endif
index 5967d0459722091eca8c2701c6d7c5458f9882c1..cd52daaacddd965b8abcdea68da37193ad19f304 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF525_UCR2
 
 config SYS_BOARD
-       string
        default "bf525-ucr2"
 
 config SYS_CONFIG_NAME
-       string
        default "bf525-ucr2"
 
 endif
index 6793c0e319ea72866a2b4dce7628632e66df4716..e138ea554572c9032f1fa73a16bb07025eb442a4 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF526_EZBRD
 
 config SYS_BOARD
-       string
        default "bf526-ezbrd"
 
 config SYS_CONFIG_NAME
-       string
        default "bf526-ezbrd"
 
 endif
index 6febd7f94aa61d150cf5d7aac16ef0053ea1b9be..fe56241212c6567b6e60127cdbc97d4cd3c21ebb 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF527_AD7160_EVAL
 
 config SYS_BOARD
-       string
        default "bf527-ad7160-eval"
 
 config SYS_CONFIG_NAME
-       string
        default "bf527-ad7160-eval"
 
 endif
index 459d9710dc0354ae511e94ceb9659ebc4223c0d8..df49d7a60d278748f2a37fa791d1c665134fa453 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF527_EZKIT
 
 config SYS_BOARD
-       string
        default "bf527-ezkit"
 
 config SYS_CONFIG_NAME
-       string
        default "bf527-ezkit"
 
 endif
index 8d54fb87323791665579ca724eb625b20f44188d..928bd776b9e7000bc462f3140deb81144e9f5485 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF527_SDP
 
 config SYS_BOARD
-       string
        default "bf527-sdp"
 
 config SYS_CONFIG_NAME
-       string
        default "bf527-sdp"
 
 endif
index c0317c2eb564dbc965096897bd0b327363be869f..555ab298f24dff3261ca483a3bdd88b575cbe80a 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF533_EZKIT
 
 config SYS_BOARD
-       string
        default "bf533-ezkit"
 
 config SYS_CONFIG_NAME
-       string
        default "bf533-ezkit"
 
 endif
index 3f01c2b9446aa2116582dafd34696ecadbfbcfa5..0cffde3b47b6428e06fa2f077d0ce40755992dfa 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF533_STAMP
 
 config SYS_BOARD
-       string
        default "bf533-stamp"
 
 config SYS_CONFIG_NAME
-       string
        default "bf533-stamp"
 
 endif
index 6704f2d4812f56abd7405abaf10de17833a843d9..204f609e090525c86127e23e176547469d9801ea 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF537_MINOTAUR
 
 config SYS_BOARD
-       string
        default "bf537-minotaur"
 
 config SYS_CONFIG_NAME
-       string
        default "bf537-minotaur"
 
 endif
index 125a9fa344a3146da541278a294bd8aa75c93653..acb1f89233006a446989593b85b0da0be460cb8e 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF537_PNAV
 
 config SYS_BOARD
-       string
        default "bf537-pnav"
 
 config SYS_CONFIG_NAME
-       string
        default "bf537-pnav"
 
 endif
index 658a6e558854329b4ea0e0499e87f9bea425b704..2ddcd69482c3c98c047d322ef7b607e6eedd5f7c 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF537_SRV1
 
 config SYS_BOARD
-       string
        default "bf537-srv1"
 
 config SYS_CONFIG_NAME
-       string
        default "bf537-srv1"
 
 endif
index 9330a4c68f2f437cd095f2aad0db9a4cd689092d..4f86128e9cc7e849150c4e308154ef9e0879f22c 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF537_STAMP
 
 config SYS_BOARD
-       string
        default "bf537-stamp"
 
 config SYS_CONFIG_NAME
-       string
        default "bf537-stamp"
 
 endif
index 5b9c8d9e2cbf789da01ca59060d35a38bcf3be3b..e40fcdb2a258fbcb0b57b845477aad4572909312 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF538F_EZKIT
 
 config SYS_BOARD
-       string
        default "bf538f-ezkit"
 
 config SYS_CONFIG_NAME
-       string
        default "bf538f-ezkit"
 
 endif
index 8d799aae45cd786a7725b1414ce6402e8d6e7ff4..550227fa308331e3453a564b8900303d3a70ecc4 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF548_EZKIT
 
 config SYS_BOARD
-       string
        default "bf548-ezkit"
 
 config SYS_CONFIG_NAME
-       string
        default "bf548-ezkit"
 
 endif
index 6c1789c22edd5ce0325aefd267ed372ff17a8353..ba1580d87be7486626dfc716176049b5d7de9d27 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF561_ACVILON
 
 config SYS_BOARD
-       string
        default "bf561-acvilon"
 
 config SYS_CONFIG_NAME
-       string
        default "bf561-acvilon"
 
 endif
index d1cb81f5678b0bdf02a33ea0ad91c1f61a087e93..495a5c51eb9c9cb62a90af67dea12b8a9566b21e 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF561_EZKIT
 
 config SYS_BOARD
-       string
        default "bf561-ezkit"
 
 config SYS_CONFIG_NAME
-       string
        default "bf561-ezkit"
 
 endif
index ad959d702283d994bd05ca18f078285ea1317236..7992e1ec8681c9d5f246ae182322b76acf55fa4e 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BF609_EZKIT
 
 config SYS_BOARD
-       string
        default "bf609-ezkit"
 
 config SYS_CONFIG_NAME
-       string
        default "bf609-ezkit"
 
 endif
index 0046b9372e77555c6dd6ee10ba9437041b0fa0e1..7ce086a78fa494b96a7aa976c6955c13272b6233 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BLACKSTAMP
 
 config SYS_BOARD
-       string
        default "blackstamp"
 
 config SYS_CONFIG_NAME
-       string
        default "blackstamp"
 
 endif
index 72aaa29ead3360ff635edf14e02e4f9a98d46531..5e73f84effba71e91b5812c9e1e3fadaec6811c6 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BLACKVME
 
 config SYS_BOARD
-       string
        default "blackvme"
 
 config SYS_CONFIG_NAME
-       string
        default "blackvme"
 
 endif
index acccec911a4aaf13f0739256316df846d9432d4f..7d1534a647c36fe6c51ac2fbf138460a39c2627b 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_APX4DEVKIT
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "apx4devkit"
 
 config SYS_VENDOR
-       string
        default "bluegiga"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "apx4devkit"
 
 endif
index 81eb911eda640bf50c4668e9972ea1054e04aaa8..1c8f78dee2c9522b2bfc80d13c31ed6ec44da0c7 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SNAPPER9260
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "snapper9260"
 
 config SYS_VENDOR
-       string
        default "bluewater"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "snapper9260"
 
 endif
index 190809c239a322c64c839cff2b5d3c754e123f3c..298c9fdb8cf0b3f9a16669a758748092736dafac 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_NITROGEN6X
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "nitrogen6x"
 
 config SYS_VENDOR
-       string
        default "boundary"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "nitrogen6x"
 
 endif
index 03d9783739dd5dfea0979912e4f04677f562cd1b..a10a06053af5c1ea0ae1b8fee4a58bcba0ae701e 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_BR4
 
 config SYS_BOARD
-       string
        default "br4"
 
 config SYS_CONFIG_NAME
-       string
        default "br4"
 
 endif
index 20c83d362291df73adcfb02bcc64e13ac2d68935..2e779f0174be7c6b28a6cc584cb9f03da7151e6e 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_BCM28155_AP
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "bcm28155_ap"
 
 config SYS_VENDOR
-       string
        default "broadcom"
 
 config SYS_SOC
-       string
        default "bcm281xx"
 
 config SYS_CONFIG_NAME
-       string
        default "bcm28155_ap"
 
 endif
index 165cee71def6ea7f34d8c37323483350f8bd2079..d627a3885f013f8c0cc9a062136f6439043aff4d 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_BCM958300K
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "bcm_ep"
 
 config SYS_VENDOR
-       string
        default "broadcom"
 
 config SYS_SOC
-       string
        default "bcmcygnus"
 
 config SYS_CONFIG_NAME
-       string
        default "bcm_ep_board"
 
 endif
index 6d0959221a9f75db31c72c33e771994ba481bdb4..9038f5b0a39868478b4f02a2441e0c41fa7c9823 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_BCM958622HR
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "bcm_ep"
 
 config SYS_VENDOR
-       string
        default "broadcom"
 
 config SYS_SOC
-       string
        default "bcmnsp"
 
 config SYS_CONFIG_NAME
-       string
        default "bcm_ep_board"
 
 endif
index 50a620e821fec702741fcec671bb30b43487d58a..ef7889637806bc0d79fb38e3d1db6d7a98824ead 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_LSXL
 
 config SYS_BOARD
-       string
        default "lsxl"
 
 config SYS_VENDOR
-       string
        default "buffalo"
 
 config SYS_CONFIG_NAME
-       string
        default "lsxl"
 
 endif
index 192d22826c1bce5fc62e00f1a112b1da034d2877..b2528dcd260b1023256967bf5864afba48c5fba9 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SBC35_A9G20
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "sbc35_a9g20"
 
 config SYS_VENDOR
-       string
        default "calao"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "sbc35_a9g20"
 
 endif
index 3d33d5c409ae4015ec5e6323352405d5cd1b2686..7fad578d5c66dd4e3b4ea371d241fa2436b53509 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TNY_A9260
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "tny_a9260"
 
 config SYS_VENDOR
-       string
        default "calao"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "tny_a9260"
 
 endif
index 8141c7d692352fb809128f146ce48771bfb7adb8..4209b361364d48feef77f75857781899ec480aa0 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_USB_A9263
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "usb_a9263"
 
 config SYS_VENDOR
-       string
        default "calao"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "usb_a9263"
 
 endif
index 042cc354a952ad65abb34dad409883901a740956..b5cf2057f4aec51722c35efa0ca09dc53048daeb 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CANMB
 
 config SYS_BOARD
-       string
        default "canmb"
 
 config SYS_CONFIG_NAME
-       string
        default "canmb"
 
 endif
index 64cd347f31160b0e305b166a5c412ac977fe5461..83385c7207d6d059e1000c7074c81f5315a81fe0 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_COREBOOT
 
 config SYS_BOARD
-       string
        default "coreboot"
 
 config SYS_VENDOR
-       string
        default "chromebook-x86"
 
 config SYS_SOC
-       string
        default "coreboot"
 
 config SYS_CONFIG_NAME
-       string
        default "coreboot"
 
 endif
index 0a9bdb2da78628491496e7e820c87c0ed2881360..f063d557083034a67eacbb5903a9e667edffdb4d 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_EDB93XX
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "edb93xx"
 
 config SYS_VENDOR
-       string
        default "cirrus"
 
 config SYS_SOC
-       string
        default "ep93xx"
 
 config SYS_CONFIG_NAME
-       string
        default "edb93xx"
 
 endif
index fe36314f487152f8d11195984b670504aae3c4e4..eaa68d93751ab3fd9f0b80eae7dbf4bfd21f10ec 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_POGO_E02
 
 config SYS_BOARD
-       string
        default "pogo_e02"
 
 config SYS_VENDOR
-       string
        default "cloudengines"
 
 config SYS_CONFIG_NAME
-       string
        default "pogo_e02"
 
 endif
index d43d30620e7f59f9906638f9e6432144902977f2..8d141791243277b7e50907336ea36b252ee9c88b 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CM_BF527
 
 config SYS_BOARD
-       string
        default "cm-bf527"
 
 config SYS_CONFIG_NAME
-       string
        default "cm-bf527"
 
 endif
index af5bbb2fc290e82238d90cef076000bcb28a942d..cedd7529d5eae8369f7b94187ed2737cd941690b 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CM_BF533
 
 config SYS_BOARD
-       string
        default "cm-bf533"
 
 config SYS_CONFIG_NAME
-       string
        default "cm-bf533"
 
 endif
index 83c160d3477b069dabd1285d7335fb545d8c7b60..af2e548cb9f489be1caca6db4aaa06871501f590 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CM_BF537E
 
 config SYS_BOARD
-       string
        default "cm-bf537e"
 
 config SYS_CONFIG_NAME
-       string
        default "cm-bf537e"
 
 endif
index de384b7000e00b95be5f2dd07354eda93a2f99ce..baf9e8cf611ed32c3935d7ebd3caac45105b51f4 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CM_BF537U
 
 config SYS_BOARD
-       string
        default "cm-bf537u"
 
 config SYS_CONFIG_NAME
-       string
        default "cm-bf537u"
 
 endif
index 29b027d425ad09f3bab21bbd2a6ca82444599d89..b96cb5f153c6f24a275885e62b15c31da9c1eea1 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CM_BF548
 
 config SYS_BOARD
-       string
        default "cm-bf548"
 
 config SYS_CONFIG_NAME
-       string
        default "cm-bf548"
 
 endif
index 94d110c551af54a8aef29b96511d809c17ebc0c4..8b302a5c8f77a918730913fc0fb1e2bc6d7ded8f 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CM_BF561
 
 config SYS_BOARD
-       string
        default "cm-bf561"
 
 config SYS_CONFIG_NAME
-       string
        default "cm-bf561"
 
 endif
index 397794d260e2a654d4a0bb003d133902ce48d4bb..a7f3b2f81209aa592c17e412da6d204095df1b9c 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_CM4008
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "cm4008"
 
 config SYS_SOC
-       string
        default "ks8695"
 
 config SYS_CONFIG_NAME
-       string
        default "cm4008"
 
 endif
index ae2831ecd7c071cfd9d0c1b0cce1665e3e3373fb..b537e2674c8271a157c8e3f03f8fa48defede5c7 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_CM41XX
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "cm41xx"
 
 config SYS_SOC
-       string
        default "ks8695"
 
 config SYS_CONFIG_NAME
-       string
        default "cm41xx"
 
 endif
index b4c8f22f7131da69710856b669f180adb9f20b32..ccea5c96e4ee2d1ddbc9312646262416b8c3b918 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CM5200
 
 config SYS_BOARD
-       string
        default "cm5200"
 
 config SYS_CONFIG_NAME
-       string
        default "cm5200"
 
 endif
index 8040e59bc605722e2976670958c5aab15db93149..6efe6b1cb7f88c64b658a66da923e3f365f609cb 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CMI_MPC5XX
 
 config SYS_BOARD
-       string
        default "cmi"
 
 config SYS_CONFIG_NAME
-       string
        default "cmi_mpc5xx"
 
 endif
index 6e55d435f62fdfc0020339df54067e3dcf8be783..ba04622c21e66af0d60c961d1e84fe663ed8687d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_COBRA5272
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "cobra5272"
 
 config SYS_CONFIG_NAME
-       string
        default "cobra5272"
 
 endif
index 113034dc6b0ac9f6a4c17e574662204bc48b08f4..7f34a1497206efdf6c7a944ffb1c38b15da8b3c2 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_COGENT_MPC8260
 
 config SYS_BOARD
-       string
        default "cogent"
 
 config SYS_CONFIG_NAME
-       string
        default "cogent_mpc8260"
 
 endif
@@ -13,11 +11,9 @@ endif
 if TARGET_COGENT_MPC8XX
 
 config SYS_BOARD
-       string
        default "cogent"
 
 config SYS_CONFIG_NAME
-       string
        default "cogent_mpc8xx"
 
 endif
index 4c5ea09b968fa236124032d244e47a48c4d555bd..6dccaff5b0ce890300ae42d9137c49a5c0ab19df 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DIG297
 
 config SYS_BOARD
-       string
        default "dig297"
 
 config SYS_VENDOR
-       string
        default "comelit"
 
 config SYS_CONFIG_NAME
-       string
        default "dig297"
 
 endif
index 690d7a77826c7003100c6ba0dae8547430a54bb5..30ba11d360a7be8118a890bd56844b75c2ee9597 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PAZ00
 
 config SYS_BOARD
-       string
        default "paz00"
 
 config SYS_VENDOR
-       string
        default "compal"
 
 config SYS_CONFIG_NAME
-       string
        default "paz00"
 
 endif
index 4a1adf3c349941ceb17c0fe177e96e0bbc185941..61159765ab1bf76ddea8b19330d844aafd6b4955 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_CM_T335
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "cm_t335"
 
 config SYS_VENDOR
-       string
        default "compulab"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "cm_t335"
 
 endif
index 06de69261d5994d8c4428b2a340533654aea7a9c..d87741f146dfc1a11d5baa414c08d0dc3306748d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CM_T35
 
 config SYS_BOARD
-       string
        default "cm_t35"
 
 config SYS_VENDOR
-       string
        default "compulab"
 
 config SYS_CONFIG_NAME
-       string
        default "cm_t35"
 
 endif
index 0edab5c76a14e9b51981f51c8e69ca794d90a165..52d38804df194e280dda02aa178be3b57701a339 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CM_T54
 
 config SYS_BOARD
-       string
        default "cm_t54"
 
 config SYS_VENDOR
-       string
        default "compulab"
 
 config SYS_CONFIG_NAME
-       string
        default "cm_t54"
 
 endif
index 6ae030c737d36ff9b1585f6b149699513aab7c5f..35769140347a869a92987881907340eb606a0c2d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TRIMSLICE
 
 config SYS_BOARD
-       string
        default "trimslice"
 
 config SYS_VENDOR
-       string
        default "compulab"
 
 config SYS_CONFIG_NAME
-       string
        default "trimslice"
 
 endif
index 155fa2cae5869b3797825b55f70139d41e7ebd83..0774784f788fe0aea22b89278b4567d201bc217e 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_CGTQMX6EVAL
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "cgtqmx6eval"
 
 config SYS_VENDOR
-       string
        default "congatec"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "cgtqmx6eval"
 
 endif
index 5147fd76b86985694b1536576d6518c532d176b4..345ac83d48a8c27209fe6fca15db45c7320ccae2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TRICORDER
 
 config SYS_BOARD
-       string
        default "tricorder"
 
 config SYS_VENDOR
-       string
        default "corscience"
 
 config SYS_CONFIG_NAME
-       string
        default "tricorder"
 
 endif
index fd1a5367c0563e3dee55e9f64e3202ffe62f4883..c564caff09708a43d38abf9948b034d4d3d042a6 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CPC45
 
 config SYS_BOARD
-       string
        default "cpc45"
 
 config SYS_CONFIG_NAME
-       string
        default "CPC45"
 
 endif
index 27f1e4e25dd881fb1de2e0cf97023b8facd7301b..ac3ae9886e9fdae5a58f2ccd20c40207c96028d9 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CPU86
 
 config SYS_BOARD
-       string
        default "cpu86"
 
 config SYS_CONFIG_NAME
-       string
        default "CPU86"
 
 endif
index b45225dd0993e03552d7894f5670b446276ee2fb..a4f2768cdb188e01b3e51afa8ce6d119e0435d39 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CPU87
 
 config SYS_BOARD
-       string
        default "cpu87"
 
 config SYS_CONFIG_NAME
-       string
        default "CPU87"
 
 endif
index fa9a7022c130b94427b40ba1dd97783089d78d99..35a290af618f2e0da6ea03bee99ac7d646ce20a4 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CRAYL1
 
 config SYS_BOARD
-       string
        default "L1"
 
 config SYS_VENDOR
-       string
        default "cray"
 
 config SYS_CONFIG_NAME
-       string
        default "CRAYL1"
 
 endif
index 9baf515cad7a0dd712a38a7c4cceba52743a0e04..2255cc98bccba4e5836b78fcd4c0c20b452538c5 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_XFI3
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "xfi3"
 
 config SYS_VENDOR
-       string
        default "creative"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "xfi3"
 
 endif
index 90f94a3f139173c4fe04aabaae3715c75ec6af78..eed04f043129a2a4339002cbfd01607e6d60f7bb 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CSB272
 
 config SYS_BOARD
-       string
        default "csb272"
 
 config SYS_CONFIG_NAME
-       string
        default "csb272"
 
 endif
index 05230a01f9c330676fb30ba9613a90e65af883f2..53b1e7ad9adaa6829483465e55f24a54a4da96e6 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CSB472
 
 config SYS_BOARD
-       string
        default "csb472"
 
 config SYS_CONFIG_NAME
-       string
        default "csb472"
 
 endif
index d8666887918b026ba7262d145850a08a14e2889c..7927b0563776d6470501856b64c9104a9344d2c6 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_CU824
 
 config SYS_BOARD
-       string
        default "cu824"
 
 config SYS_CONFIG_NAME
-       string
        default "CU824"
 
 endif
index 763f93c2ce0d0b600a682dd7119a0bd410c8ceb5..f6341ada607f5e3938c5d6b33ebb29f0f533f43c 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DNS325
 
 config SYS_BOARD
-       string
        default "dns325"
 
 config SYS_VENDOR
-       string
        default "d-link"
 
 config SYS_CONFIG_NAME
-       string
        default "dns325"
 
 endif
index 3e956542391b50812e25b9bd0510e29e28369160..bfe001164909c178eababe1e70be72b508d02443 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CATCENTER
 
 config SYS_BOARD
-       string
        default "PPChameleonEVB"
 
 config SYS_VENDOR
-       string
        default "dave"
 
 config SYS_CONFIG_NAME
-       string
        default "CATcenter"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_PPCHAMELEONEVB
 
 config SYS_BOARD
-       string
        default "PPChameleonEVB"
 
 config SYS_VENDOR
-       string
        default "dave"
 
 config SYS_CONFIG_NAME
-       string
        default "PPChameleonEVB"
 
 endif
index f5d2aef36558259eb5ce79a347050ffdbb8bd370..54a86b9e13782988e66c76df22deee9e42473f4b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ARIA
 
 config SYS_BOARD
-       string
        default "aria"
 
 config SYS_VENDOR
-       string
        default "davedenx"
 
 config SYS_CONFIG_NAME
-       string
        default "aria"
 
 endif
index 51b9428edc53ef639fae071bedcc9617781ef16b..54cb4502f05f336f9698d4db0b3b8ff49fb1149e 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_QONG
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "qong"
 
 config SYS_VENDOR
-       string
        default "davedenx"
 
 config SYS_SOC
-       string
        default "mx31"
 
 config SYS_CONFIG_NAME
-       string
        default "qong"
 
 endif
index b1237030aaf562ce67ab0c3a4f489805fad7e147..1a841ce6e07e8f390ec4807df97dc3e904a45d67 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DA830EVM
 
 config SYS_BOARD
-       string
        default "da8xxevm"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "da830evm"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_DA850EVM
 
 config SYS_BOARD
-       string
        default "da8xxevm"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "da850evm"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_HAWKBOARD
 
 config SYS_BOARD
-       string
        default "da8xxevm"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "hawkboard"
 
 endif
index 7490bc0f2dfc0643df5b72014eddd3d098db2013..ec2c27623de8356a7fdfc9b13d0a3ddbb2da0be1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DAVINCI_DM355EVM
 
 config SYS_BOARD
-       string
        default "dm355evm"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "davinci_dm355evm"
 
 endif
index 73a53ffb9d6a0088668baa03d294ff253aa24096..ab4230a637adb31101ef6691c711489446b65cba 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DAVINCI_DM355LEOPARD
 
 config SYS_BOARD
-       string
        default "dm355leopard"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "davinci_dm355leopard"
 
 endif
index 266c6eea2718a211adc5d3742088897dc195eff7..724c7b6204c2d2e12d2963732b086d20d9be7f15 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DAVINCI_DM365EVM
 
 config SYS_BOARD
-       string
        default "dm365evm"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "davinci_dm365evm"
 
 endif
index 1c4d0f0b686c644063827de407df1bf2522f7c7b..56d2ab487d6ee9d464974679d1224075432910bd 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DAVINCI_DM6467EVM
 
 config SYS_BOARD
-       string
        default "dm6467evm"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "davinci_dm6467evm"
 
 endif
index e020f8d55d2c18ab00ec39126f67c4a7740ab003..3f0ef822157135932edd426c5f9e5a9968c0f944 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DAVINCI_DVEVM
 
 config SYS_BOARD
-       string
        default "dvevm"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "davinci_dvevm"
 
 endif
index 93950fd2ff1a21a9c9b61db87128ae768ed53e8e..ae5b16e1421f960818f4992029e18c8284b15391 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_EA20
 
 config SYS_BOARD
-       string
        default "ea20"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "ea20"
 
 endif
index 7aa459deb5d4ab5fb07bf2e222b7cdd15f79898b..35810755f960cd6528779ea374613fe7233c6f63 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DAVINCI_SCHMOOGIE
 
 config SYS_BOARD
-       string
        default "schmoogie"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "davinci_schmoogie"
 
 endif
index 95461fc043d69dda71e402489606849ad614a668..dc48f3118c1224fff800dc27233f14e8b8001706 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DAVINCI_SFFSDR
 
 config SYS_BOARD
-       string
        default "sffsdr"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "davinci_sffsdr"
 
 endif
index a21fb8ed803c889ac110f18ef14079985f348bfc..4440d95bc27450399f13f05ff01f7660d623da66 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DAVINCI_SONATA
 
 config SYS_BOARD
-       string
        default "sonata"
 
 config SYS_VENDOR
-       string
        default "davinci"
 
 config SYS_CONFIG_NAME
-       string
        default "davinci_sonata"
 
 endif
index 5fca62deb2845383f04cbf4018378645916aff37..1a8946d06ca9dfcda34215a383ad1deacc3f591b 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_DBAU1X00
 
 config SYS_CPU
-       string
        default "mips32"
 
 config SYS_BOARD
-       string
        default "dbau1x00"
 
 config SYS_SOC
-       string
        default "au1x00"
 
 config SYS_CONFIG_NAME
-       string
        default "dbau1x00"
 
 endif
index 05f79ad83130c9f343d0b1369ee7d26c362e2d2b..b1c16c702b6debf09930d10f40b1b3b5d4ec2055 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_M28EVK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "m28evk"
 
 config SYS_VENDOR
-       string
        default "denx"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "m28evk"
 
 endif
index 5e3298c1da4d27927a16b3f834a450e624c87685..5dbb7f8d5f62e23b696fc79d564b53d800e6c86f 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_M53EVK
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "m53evk"
 
 config SYS_VENDOR
-       string
        default "denx"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "m53evk"
 
 endif
index f03a1e729e10379da9c9b5d4a7370cf85cb23367..797081d5f2760e2535c57d0e520fc1da1a34f396 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_DNP5370
 
 config SYS_BOARD
-       string
        default "dnp5370"
 
 config SYS_CONFIG_NAME
-       string
        default "dnp5370"
 
 endif
index 42ba092a2cf5bafc6621f78f6a38b39a937be43d..a22f58a459548559f2697ebe7f09dadc13f851b8 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_EXALION
 
 config SYS_BOARD
-       string
        default "eXalion"
 
 config SYS_CONFIG_NAME
-       string
        default "eXalion"
 
 endif
index c0cd1b710b64faba77428b00c08c79c608bc7894..50e29ec2414d617702171392cda9daca52e92c2a 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_FAVR_32_EZKIT
 
 config SYS_BOARD
-       string
        default "favr-32-ezkit"
 
 config SYS_VENDOR
-       string
        default "earthlcd"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "favr-32-ezkit"
 
 endif
index cd2e53ce6a8fe8146bd9bf2d8c77d8666e5d06f1..281e43a17f174aa265d160d90806ac54538dc62a 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_ETHERNUT5
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "ethernut5"
 
 config SYS_VENDOR
-       string
        default "egnite"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "ethernut5"
 
 endif
index 55564dc960ae222005bd7c2c8a48501e0458d1d9..d4003e53407b9668c2026a3e9eccb76af39f3ab6 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ELPPC
 
 config SYS_BOARD
-       string
        default "elppc"
 
 config SYS_VENDOR
-       string
        default "eltec"
 
 config SYS_CONFIG_NAME
-       string
        default "ELPPC"
 
 endif
index 69c8358a537ea4e7ee6baf267c202bc58e597c72..5a4c8844f040ff2d51830eafe5c8a65b4087d547 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MHPC
 
 config SYS_BOARD
-       string
        default "mhpc"
 
 config SYS_VENDOR
-       string
        default "eltec"
 
 config SYS_CONFIG_NAME
-       string
        default "MHPC"
 
 endif
index b0c823e322e4b2911f22b63d5ba7d64f2280d1ca..8e39fce6fec55ba4ae41aeb5b35cd7cfad9474d0 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_EMBESTMX6BOARDS
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx6boards"
 
 config SYS_VENDOR
-       string
        default "embest"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "embestmx6boards"
 
 endif
index 1d4e3265c7258c8636bf054da81763206302402c..bba1fd4d9bcfedce1c67cabc6961b063199b8588 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TOP5200
 
 config SYS_BOARD
-       string
        default "top5200"
 
 config SYS_VENDOR
-       string
        default "emk"
 
 config SYS_CONFIG_NAME
-       string
        default "TOP5200"
 
 endif
index 4da934e0819b10cd52d04155cfd6f2498f7279ea..7b5afdadfc3631bd9e9161abc0dd39165ce04eca 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TOP860
 
 config SYS_BOARD
-       string
        default "top860"
 
 config SYS_VENDOR
-       string
        default "emk"
 
 config SYS_CONFIG_NAME
-       string
        default "TOP860"
 
 endif
index 421f7b2464d5893d07ca5435bef495b19b697cb0..2dbe0603b774aeb64a3dbb9703655967083c043a 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TOP9000
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "top9000"
 
 config SYS_VENDOR
-       string
        default "emk"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "top9000"
 
 endif
index 183334b292201fd6cc7d91e9a4e0d0a5ce7f25ad..796736d8653b9523ec47e2f8018208307e22b6bc 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ENBW_CMC
 
 config SYS_BOARD
-       string
        default "enbw_cmc"
 
 config SYS_VENDOR
-       string
        default "enbw"
 
 config SYS_CONFIG_NAME
-       string
        default "enbw_cmc"
 
 endif
index 15ca9623d6d239b68923a377d2c3a3222c95ca38..5d876f487240441b4e08597765a99a2b90bcc939 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_EP8260
 
 config SYS_BOARD
-       string
        default "ep8260"
 
 config SYS_CONFIG_NAME
-       string
        default "ep8260"
 
 endif
index b4121a6b0960d034b01c836e0ca2ac34768aa52c..d84209127138cb3808c0149a9e0d26c50fef06b8 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_EP82XXM
 
 config SYS_BOARD
-       string
        default "ep82xxm"
 
 config SYS_CONFIG_NAME
-       string
        default "ep82xxm"
 
 endif
index 83cd8bd9bb115906e18e070086cf246047af7f35..6b03460aa5cca9cb74e6f4b0aecc8f565eaf23d6 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_APC405
 
 config SYS_BOARD
-       string
        default "apc405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "APC405"
 
 endif
index e35fc5e7437092e80c14b617f672995e64e67ba3..4ad9d519222e385334d47d9c077a013d830a2d85 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_AR405
 
 config SYS_BOARD
-       string
        default "ar405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "AR405"
 
 endif
index e9558a44c52c0a265925502de27452a5bd0938eb..02c7c142490e9aa17fb2bb8218171ca8e13089b8 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ASH405
 
 config SYS_BOARD
-       string
        default "ash405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "ASH405"
 
 endif
index 398d22a69f3454eef216a2df6aa63e74db84a959..da11bc0e968b353906c59c63ace10c8ca8d53f96 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CMS700
 
 config SYS_BOARD
-       string
        default "cms700"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "CMS700"
 
 endif
index c99404c903f6fcc5a276dc45e5fc7f11672346a7..646e8ffa1c08200175728fb45d4fcdf0b3df4f40 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CPCI2DP
 
 config SYS_BOARD
-       string
        default "cpci2dp"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "CPCI2DP"
 
 endif
index 0b9f9f4bed5f0b6664e3fa511be62d612330246c..bc569070ce68e0fd59dcf8a40920aee029c32981 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CPCI405
 
 config SYS_BOARD
-       string
        default "cpci405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "CPCI405"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_CPCI4052
 
 config SYS_BOARD
-       string
        default "cpci405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "CPCI4052"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_CPCI405AB
 
 config SYS_BOARD
-       string
        default "cpci405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "CPCI405AB"
 
 endif
@@ -49,15 +40,12 @@ endif
 if TARGET_CPCI405DT
 
 config SYS_BOARD
-       string
        default "cpci405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "CPCI405DT"
 
 endif
index 29fa9e60cd6fe9a2215cb76e17e3dff3e6ce4ea9..ddd9418d3dbe05e1e24784bd69fb499c875d3461 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CPCI5200
 
 config SYS_BOARD
-       string
        default "cpci5200"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "cpci5200"
 
 endif
index 99f8c2dc1448dfeaceabd6e5c686b98f7413ea5b..32d4ee60b701cd089c2533bf062f5be6ed92ae82 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CPCI750
 
 config SYS_BOARD
-       string
        default "cpci750"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "CPCI750"
 
 endif
index 1357a51943ebea25bf25b65258bdada72f5bcb33..4079b2f719fe665a1951f44520f6f095cfe4030b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CPCIISER4
 
 config SYS_BOARD
-       string
        default "cpciiser4"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "CPCIISER4"
 
 endif
index 0fd70145714011418fbe2abd41029a0856c11049..c0163aef0f51d07522f0438bd047324268688016 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DP405
 
 config SYS_BOARD
-       string
        default "dp405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "DP405"
 
 endif
index f2857f695f2a166bf5688049ea55a5b299d6cc5b..2913fb972188be8b2280c0b383484ef9b2c284e2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DU405
 
 config SYS_BOARD
-       string
        default "du405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "DU405"
 
 endif
index f80e1819bafd498612f3b3547631883e12e839e1..b4b3e6bc43d01f15e9321ad84dac5d6920fcad44 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DU440
 
 config SYS_BOARD
-       string
        default "du440"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "DU440"
 
 endif
index 0dc4b062da6fb930939b4a7ad8f42f26f177d393..8a8623a8b0c5ad8ec23272424606c9e1937b4c14 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_HH405
 
 config SYS_BOARD
-       string
        default "hh405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "HH405"
 
 endif
index e355dd2f87a8f71cd77b9b543362381db7df9622..2b9556a195e7c9d2c93decae7b0db254dc29ab1a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_HUB405
 
 config SYS_BOARD
-       string
        default "hub405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "HUB405"
 
 endif
index 74237e34cb74b1a1c7282c7aeda2455725eba836..3f2a411196015cf24c15373a1266fcfd6dfa23a5 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MECP5123
 
 config SYS_BOARD
-       string
        default "mecp5123"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "mecp5123"
 
 endif
index dfcaefdbf63a916a3140f558590678fefe0de1ce..cfd53077510ed170343fb3d6ef4f49f53e56193e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MECP5200
 
 config SYS_BOARD
-       string
        default "mecp5200"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "mecp5200"
 
 endif
index 86a28353d1a51da5380dcc8def016a982fab580a..7d5c3ca980052eb4cc22ee708a027e30067ea1e8 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MEESC
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "meesc"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "meesc"
 
 endif
index 83fa495947a085e8d47519a94699c729d839ef32..44b402d8ef1164a027a3a4c187fb590b9b2d7be1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OCRTC
 
 config SYS_BOARD
-       string
        default "ocrtc"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "OCRTC"
 
 endif
index ec6e4d9823a524ee7db2d27da8944cdc76eeb486..7c5ce90a7df168c7c9168933e5bb34aac3085f4c 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_OTC570
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "otc570"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "otc570"
 
 endif
index a1a39716599b42893678ba167fd353e3bb990dd3..0a6524d073ca19534f8011d6138b85ac0b20f020 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PCI405
 
 config SYS_BOARD
-       string
        default "pci405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "PCI405"
 
 endif
index 82f30afe091be5f4321db44d3e6e0c7263b46dcf..c596e7a66c9eff5f5763333ee73393e4a6ec08e3 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PF5200
 
 config SYS_BOARD
-       string
        default "pf5200"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "pf5200"
 
 endif
index b9783d776d18beee0fa29731d5dd665688ead4ca..b3082cb0229d9dd7e779159c0e7658ed2dad15f9 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PLU405
 
 config SYS_BOARD
-       string
        default "plu405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "PLU405"
 
 endif
index e3c3c820413f282fcec51446a1a60ba96adb7c6b..3738c68c9c1323ad23a02d16ae48239e365d49d4 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PMC405
 
 config SYS_BOARD
-       string
        default "pmc405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "PMC405"
 
 endif
index f06b26b1f2d45c4b0a7ec8ffe317888c93582fd7..4b05787a499e618fae0455c7198090dd6714348b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PMC405DE
 
 config SYS_BOARD
-       string
        default "pmc405de"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "PMC405DE"
 
 endif
index 28db4ab18776dd5167e83793f8fb13a824961e51..df8bd65ab7425a372554cba5f3f3336c78d58a7e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PMC440
 
 config SYS_BOARD
-       string
        default "pmc440"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "PMC440"
 
 endif
index 8fb80dc2650c95cb4d305e94eafbdfe08e87f869..85417d48416daf501af3324e09328aa477fc4763 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_TASREG
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "tasreg"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "TASREG"
 
 endif
index 4fd507c332fc438123fa9f8effdd75137bfb0a71..b8d9432dcc92e31373daea716684834c3f0a96ad 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_VME8349
 
 config SYS_BOARD
-       string
        default "vme8349"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "vme8349"
 
 endif
index ef3d073c37f7bd86386a3d2186a3d6ae21236c03..d9fe9d2e87a268461742d8b60994dbca7fb18ea5 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_VOH405
 
 config SYS_BOARD
-       string
        default "voh405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "VOH405"
 
 endif
index 90ba34a04d3d9cf294578eddf54914e165fcbac8..ecdf8c9feaf29ddef32a06f0ba92e5445610027e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_VOM405
 
 config SYS_BOARD
-       string
        default "vom405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "VOM405"
 
 endif
index 214af9f8acf8352a987637763639b99e15f96e9f..8a7df4db4e63ce84c3bb1996b27391b82d668de6 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_WUH405
 
 config SYS_BOARD
-       string
        default "wuh405"
 
 config SYS_VENDOR
-       string
        default "esd"
 
 config SYS_CONFIG_NAME
-       string
        default "WUH405"
 
 endif
index fc27625d527a72ab5e80a0c0bc9c8896b67ca52f..5593689e724b6468aa1aa485fa5c6f33f3bc1e90 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_IMA3_MX53
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "ima3-mx53"
 
 config SYS_VENDOR
-       string
        default "esg"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "ima3-mx53"
 
 endif
index 7527e34ae63431d7e21f7a75e78a455b1c998a6d..6c7cd241550046d09b8ce1b99f19ad33a7247fe6 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ESPT
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "espt"
 
 config SYS_CONFIG_NAME
-       string
        default "espt"
 
 endif
index 848fef8b220c53619df21f3e574a8fee7a6cab17..f895bc4f244c59ca67a3646e199a052b01f5fb6b 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_ESTEEM192E
 
 config SYS_BOARD
-       string
        default "esteem192e"
 
 config SYS_CONFIG_NAME
-       string
        default "ESTEEM192E"
 
 endif
index d86044ed46dd452967612826cf6d2905ec7d3353..53ae917c767d5fc3c47b5a333b2a55e0e0cbaf94 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_CPU9260
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "cpu9260"
 
 config SYS_VENDOR
-       string
        default "eukrea"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "cpu9260"
 
 endif
index ced3748b1ba01534694e0769c592597dccccba20..f2b02dc1c2276cdcb9b830d9c5f2b8cd0e34ca55 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_CPUAT91
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "cpuat91"
 
 config SYS_VENDOR
-       string
        default "eukrea"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "cpuat91"
 
 endif
index f7f86c9e877d042fd44afb0fa9e0a5a6a73e3906..933e6d6ae6504ae64763d5e8d826633292ca0097 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_P3G4
 
 config SYS_BOARD
-       string
        default "evb64260"
 
 config SYS_CONFIG_NAME
-       string
        default "P3G4"
 
 endif
@@ -13,11 +11,9 @@ endif
 if TARGET_ZUMA
 
 config SYS_BOARD
-       string
        default "evb64260"
 
 config SYS_CONFIG_NAME
-       string
        default "ZUMA"
 
 endif
index 126ce2fe955eef55f2153249035e68ce1c5b1035..7a76b4358e98f64878ae68588a405a26f2302111 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_HWW1U1A
 
 config SYS_BOARD
-       string
        default "hww1u1a"
 
 config SYS_VENDOR
-       string
        default "exmeritus"
 
 config SYS_CONFIG_NAME
-       string
        default "HWW1U1A"
 
 endif
index 353c8734e50cbf53e72f136c10dcdb5bb042a4ac..bfa620708d4ebac723344553475620c89e07fe4e 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_A320EVB
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "a320evb"
 
 config SYS_VENDOR
-       string
        default "faraday"
 
 config SYS_SOC
-       string
        default "a320"
 
 config SYS_CONFIG_NAME
-       string
        default "a320evb"
 
 endif
index c5321d64dca66f8a2d387c78e363f2e9fc20264a..c7aab7521b302296e2f7bdceb392c11c93d81d17 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_B4860QDS
 
 config SYS_BOARD
-       string
        default "b4860qds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "B4860QDS"
 
 endif
index 6099d4d063bfc67ae8e569b46543051aa1c46f5a..dd9f765d7d85d9733b1d583588a6f6e07f79124f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_BSC9131RDB
 
 config SYS_BOARD
-       string
        default "bsc9131rdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "BSC9131RDB"
 
 endif
index 955069b15a287e878e229a65085df6ea5c252538..db3a1f1d47ecc71091984746a9f6c5e047a976de 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_BSC9132QDS
 
 config SYS_BOARD
-       string
        default "bsc9132qds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "BSC9132QDS"
 
 endif
index be9c2378394c19de8ca275b2f49adc2e10465519..17369b8ca7eb1463ace6b4da03909090e2da7465 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_C29XPCIE
 
 config SYS_BOARD
-       string
        default "c29xpcie"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "C29XPCIE"
 
 endif
index 50d77317dfb87020509701cdfc143d9182fdd10b..32b5a3b70ce665781481b9505404605ccac73d1a 100644 (file)
@@ -36,6 +36,8 @@ endif
 
 obj-$(CONFIG_FSL_DIU_CH7301)   += diu_ch7301.o
 
+obj-$(CONFIG_FSL_DCU_SII9022A)    += dcu_sii9022a.o
+
 obj-$(CONFIG_MPC8541CDS)       += cds_pci_ft.o
 obj-$(CONFIG_MPC8548CDS)       += cds_pci_ft.o
 obj-$(CONFIG_MPC8555CDS)       += cds_pci_ft.o
diff --git a/board/freescale/common/dcu_sii9022a.c b/board/freescale/common/dcu_sii9022a.c
new file mode 100644 (file)
index 0000000..2da627e
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <asm/io.h>
+#include <common.h>
+#include <fsl_dcu_fb.h>
+#include <i2c.h>
+#include <linux/fb.h>
+
+#define PIXEL_CLK_LSB_REG              0x00
+#define PIXEL_CLK_MSB_REG              0x01
+#define VERT_FREQ_LSB_REG              0x02
+#define VERT_FREQ_MSB_REG              0x03
+#define TOTAL_PIXELS_LSB_REG           0x04
+#define TOTAL_PIXELS_MSB_REG           0x05
+#define TOTAL_LINES_LSB_REG            0x06
+#define TOTAL_LINES_MSB_REG            0x07
+#define TPI_INBUS_FMT_REG              0x08
+#define TPI_INPUT_FMT_REG              0x09
+#define TPI_OUTPUT_FMT_REG             0x0A
+#define TPI_SYS_CTRL_REG               0x1A
+#define TPI_PWR_STAT_REG               0x1E
+#define TPI_AUDIO_HANDING_REG          0x25
+#define TPI_AUDIO_INTF_REG             0x26
+#define TPI_AUDIO_FREQ_REG             0x27
+#define TPI_SET_PAGE_REG               0xBC
+#define TPI_SET_OFFSET_REG             0xBD
+#define TPI_RW_ACCESS_REG              0xBE
+#define TPI_TRANS_MODE_REG             0xC7
+
+#define TPI_INBUS_CLOCK_RATIO_1                (1 << 6)
+#define TPI_INBUS_FULL_PIXEL_WIDE      (1 << 5)
+#define TPI_INBUS_RISING_EDGE          (1 << 4)
+#define TPI_INPUT_CLR_DEPTH_8BIT       (0 << 6)
+#define TPI_INPUT_VRANGE_EXPAN_AUTO    (0 << 2)
+#define TPI_INPUT_CLR_RGB              (0 << 0)
+#define TPI_OUTPUT_CLR_DEPTH_8BIT      (0 << 6)
+#define TPI_OUTPUT_VRANGE_COMPRE_AUTO  (0 << 2)
+#define TPI_OUTPUT_CLR_HDMI_RGB                (0 << 0)
+#define TPI_SYS_TMDS_OUTPUT            (0 << 4)
+#define TPI_SYS_AV_NORAML              (0 << 3)
+#define TPI_SYS_AV_MUTE                        (1 << 3)
+#define TPI_SYS_DVI_MODE               (0 << 0)
+#define TPI_SYS_HDMI_MODE              (1 << 0)
+#define TPI_PWR_STAT_MASK              (3 << 0)
+#define TPI_PWR_STAT_D0                        (0 << 0)
+#define TPI_AUDIO_PASS_BASIC           (0 << 0)
+#define TPI_AUDIO_INTF_I2S             (2 << 6)
+#define TPI_AUDIO_INTF_NORMAL          (0 << 4)
+#define TPI_AUDIO_TYPE_PCM             (1 << 0)
+#define TPI_AUDIO_SAMP_SIZE_16BIT      (1 << 6)
+#define TPI_AUDIO_SAMP_FREQ_44K                (2 << 3)
+#define TPI_SET_PAGE_SII9022A          0x01
+#define TPI_SET_OFFSET_SII9022A                0x82
+#define TPI_RW_EN_SRC_TERMIN           (1 << 0)
+#define TPI_TRANS_MODE_ENABLE          (0 << 7)
+
+/* Programming of Silicon SIi9022a HDMI Transmitter */
+int dcu_set_dvi_encoder(struct fb_videomode *videomode)
+{
+       u8 temp;
+       u16 temp1, temp2;
+       u32 temp3;
+
+       i2c_set_bus_num(CONFIG_SYS_I2C_DVI_BUS_NUM);
+
+       /* Enable TPI transmitter mode */
+       temp = TPI_TRANS_MODE_ENABLE;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_TRANS_MODE_REG, 1, &temp, 1);
+
+       /* Enter into D0 state, full operation */
+       i2c_read(CONFIG_SYS_I2C_DVI_ADDR, TPI_PWR_STAT_REG, 1, &temp, 1);
+       temp &= ~TPI_PWR_STAT_MASK;
+       temp |= TPI_PWR_STAT_D0;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_PWR_STAT_REG, 1, &temp, 1);
+
+       /* Enable source termination */
+       temp = TPI_SET_PAGE_SII9022A;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_SET_PAGE_REG, 1, &temp, 1);
+       temp = TPI_SET_OFFSET_SII9022A;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_SET_OFFSET_REG, 1, &temp, 1);
+
+       i2c_read(CONFIG_SYS_I2C_DVI_ADDR, TPI_RW_ACCESS_REG, 1, &temp, 1);
+       temp |= TPI_RW_EN_SRC_TERMIN;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_RW_ACCESS_REG, 1, &temp, 1);
+
+       /* Set TPI system control */
+       temp = TPI_SYS_TMDS_OUTPUT | TPI_SYS_AV_NORAML | TPI_SYS_DVI_MODE;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_SYS_CTRL_REG, 1, &temp, 1);
+
+       /* Set pixel clock */
+       temp1 = PICOS2KHZ(videomode->pixclock) / 10;
+       temp = (u8)(temp1 & 0xFF);
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, PIXEL_CLK_LSB_REG, 1, &temp, 1);
+       temp = (u8)(temp1 >> 8);
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, PIXEL_CLK_MSB_REG, 1, &temp, 1);
+
+       /* Set total pixels per line */
+       temp1 = videomode->hsync_len + videomode->left_margin +
+               videomode->xres + videomode->right_margin;
+       temp = (u8)(temp1 & 0xFF);
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TOTAL_PIXELS_LSB_REG, 1, &temp, 1);
+       temp = (u8)(temp1 >> 8);
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TOTAL_PIXELS_MSB_REG, 1, &temp, 1);
+
+       /* Set total lines */
+       temp2 = videomode->vsync_len + videomode->upper_margin +
+               videomode->yres + videomode->lower_margin;
+       temp = (u8)(temp2 & 0xFF);
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TOTAL_LINES_LSB_REG, 1, &temp, 1);
+       temp = (u8)(temp2 >> 8);
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TOTAL_LINES_MSB_REG, 1, &temp, 1);
+
+       /* Set vertical frequency in Hz */
+       temp3 = temp1 * temp2;
+       temp3 = (PICOS2KHZ(videomode->pixclock) * 1000) / temp3;
+       temp1 = (u16)temp3 * 100;
+       temp = (u8)(temp1 & 0xFF);
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, VERT_FREQ_LSB_REG, 1, &temp, 1);
+       temp = (u8)(temp1 >> 8);
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, VERT_FREQ_MSB_REG, 1, &temp, 1);
+
+       /* Set TPI input bus and pixel repetition data */
+       temp = TPI_INBUS_CLOCK_RATIO_1 | TPI_INBUS_FULL_PIXEL_WIDE |
+               TPI_INBUS_RISING_EDGE;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_INBUS_FMT_REG, 1, &temp, 1);
+
+       /* Set TPI AVI Input format data */
+       temp = TPI_INPUT_CLR_DEPTH_8BIT | TPI_INPUT_VRANGE_EXPAN_AUTO |
+               TPI_INPUT_CLR_RGB;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_INPUT_FMT_REG, 1, &temp, 1);
+
+       /* Set TPI AVI Output format data */
+       temp = TPI_OUTPUT_CLR_DEPTH_8BIT | TPI_OUTPUT_VRANGE_COMPRE_AUTO |
+               TPI_OUTPUT_CLR_HDMI_RGB;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_OUTPUT_FMT_REG, 1, &temp, 1);
+
+       /* Set TPI audio configuration write data */
+       temp = TPI_AUDIO_PASS_BASIC;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_AUDIO_HANDING_REG, 1, &temp, 1);
+
+       temp = TPI_AUDIO_INTF_I2S | TPI_AUDIO_INTF_NORMAL |
+               TPI_AUDIO_TYPE_PCM;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_AUDIO_INTF_REG, 1, &temp, 1);
+
+       temp = TPI_AUDIO_SAMP_SIZE_16BIT | TPI_AUDIO_SAMP_FREQ_44K;
+       i2c_write(CONFIG_SYS_I2C_DVI_ADDR, TPI_AUDIO_FREQ_REG, 1, &temp, 1);
+
+       return 0;
+}
diff --git a/board/freescale/common/dcu_sii9022a.h b/board/freescale/common/dcu_sii9022a.h
new file mode 100644 (file)
index 0000000..de76733
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#ifndef __DCU_HDMI_SII9022A__
+#define __DCU_HDMI_SII9022A__
+
+/* Programming of Silicon SII9022A connector HDMI Transmitter*/
+int dcu_set_dvi_encoder(struct fb_videomode *videomode);
+
+#endif
index 8c3bd9c1528c5fccd58a6438d1504cf1701ed53e..433f539d997a6fa191930594d4dfb699f38db11f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P3041DS
 
 config SYS_BOARD
-       string
        default "corenet_ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P3041DS"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_P4080DS
 
 config SYS_BOARD
-       string
        default "corenet_ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P4080DS"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_P5020DS
 
 config SYS_BOARD
-       string
        default "corenet_ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P5020DS"
 
 endif
@@ -49,15 +40,12 @@ endif
 if TARGET_P5040DS
 
 config SYS_BOARD
-       string
        default "corenet_ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P5040DS"
 
 endif
diff --git a/board/freescale/ls1021aqds/Kconfig b/board/freescale/ls1021aqds/Kconfig
new file mode 100644 (file)
index 0000000..3cee468
--- /dev/null
@@ -0,0 +1,18 @@
+if TARGET_LS1021AQDS
+
+config SYS_CPU
+       default "armv7"
+
+config SYS_BOARD
+       default "ls1021aqds"
+
+config SYS_VENDOR
+       default "freescale"
+
+config SYS_SOC
+       default "ls102xa"
+
+config SYS_CONFIG_NAME
+       default "ls1021aqds"
+
+endif
diff --git a/board/freescale/ls1021aqds/MAINTAINERS b/board/freescale/ls1021aqds/MAINTAINERS
new file mode 100644 (file)
index 0000000..021d82b
--- /dev/null
@@ -0,0 +1,6 @@
+LS1021AQDS BOARD
+M:     Alison Wang <alison.wang@freescale.com>
+S:     Maintained
+F:     board/freescale/ls1021aqds/
+F:     include/configs/ls1021aqds.h
+F:     configs/ls1021aqds_nor_defconfig
diff --git a/board/freescale/ls1021aqds/Makefile b/board/freescale/ls1021aqds/Makefile
new file mode 100644 (file)
index 0000000..3b6903c
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# Copyright 2014 Freescale Semiconductor, Inc.
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += ls1021aqds.o
+obj-y += ddr.o
+obj-y += eth.o
diff --git a/board/freescale/ls1021aqds/README b/board/freescale/ls1021aqds/README
new file mode 100644 (file)
index 0000000..c561776
--- /dev/null
@@ -0,0 +1,112 @@
+Overview
+--------
+The LS1021AQDS is a Freescale reference board that hosts the LS1021A SoC.
+
+LS1021A SoC Overview
+------------------
+The QorIQ LS1 family, which includes the LS1021A communications processor,
+is built on Layerscape architecture, the industry's first software-aware,
+core-agnostic networking architecture to offer unprecedented efficiency
+and scale.
+
+A member of the value-performance tier, the QorIQ LS1021A processor provides
+extensive integration and power efficiency for fanless, small form factor
+enterprise networking applications. Incorporating dual ARM Cortex-A7 cores
+running up to 1.0 GHz, the LS1021A processor delivers pre-silicon CoreMark
+performance of over 6,000, as well as virtualization support, advanced
+security features and the broadest array of high-speed interconnects and
+optimized peripheral features ever offered in a sub-3 W processor.
+
+The QorIQ LS1021A processor features an integrated LCD controller,
+CAN controller for implementing industrial protocols, DDR3L/4 running
+up to 1600 MHz, integrated security engine and QUICC Engine, and ECC
+protection on both L1 and L2 caches. The LS1021A processor is pin- and
+software-compatible with the QorIQ LS1020A and LS1022A processors.
+
+The LS1021A SoC includes the following function and features:
+
+ - ARM Cortex-A7 MPCore compliant with ARMv7-A architecture
+ - Dual high-preformance ARM Cortex-A7 cores, each core includes:
+   - 32 Kbyte L1 Instruction Cache and Data Cache for each core (ECC protection)
+   - 512 Kbyte shared coherent L2 Cache (with ECC protection)
+   - NEON Co-processor (per core)
+   - 40-bit physical addressing
+   - Vector floating-point support
+ - ARM Core-Link CCI-400 Cache Coherent Interconnect
+ - One DDR3L/DDR4 SDRAM memory controller with x8/x16/x32-bit configuration
+   supporting speeds up to 1600Mtps
+   - ECC and interleaving support
+ - VeTSEC Ethernet complex
+   - Up to 3x virtualized 10/100/1000 Ethernet controllers
+   - MII, RMII, RGMII, and SGMII support
+   - QoS, lossless flow control, and IEEE 1588 support
+ - 4-lane 6GHz SerDes
+ - High speed interconnect (4 SerDes lanes with are muxed for these protocol)
+   - Two PCI Express Gen2 controllers running at up to 5 GHz
+   - One Serial ATA 3.0 supporting 6 GT/s operation
+   - Two SGMII interfaces supporting 1000 Mbps
+ - Additional peripheral interfaces
+   - One high-speed USB 3.0 controller with integrated PHY and one high-speed
+     USB 2.00 controller with ULPI
+   - Integrated flash controller (IFC) with 16-bit interface
+   - Quad SPI NOR Flash
+   - One enhanced Secure digital host controller
+   - Display controller unit (DCU) 24-bit RGB (12-bit DDR pin interface)
+   - Ten UARTs comprised of two 16550 compliant DUARTs, and six low power
+     UARTs
+   - Three I2C controllers
+   - Eight FlexTimers four supporting PWM and four FlexCAN ports
+   - Four GPIO controllers supporting up to 109 general purpose I/O signals
+ - Integrated advanced audio block:
+   - Four synchronous audio interfaces (SAI)
+   - Sony/Philips Digital Interconnect Format (SPDIF)
+   - Asynchronous Sample Rate Converter (ASRC)
+ - Hardware based crypto offload engine
+   - IPSec forwarding at up to 1Gbps
+   - QorIQ Trust Architecture, Secure Boot, and ARM TrustZone supported
+   - Public key hardware accelerator
+   - True Random Number Generator (NIST Certified)
+   - Advanced Encryption Standard Accelerators (AESA)
+   - Data Encryption Standard Accelerators
+ - QUICC Engine ULite block
+   - Two universal communication controllers (TDM and HDLC) supporting 64
+   multichannels, each running at 64 Kbps
+   - Support for 256 channels of HDLC
+ - QorIQ TrustArchitecture with Secure Boot, as well as ARM TrustZone supported
+
+LS1021AQDS board Overview
+-------------------------
+ - DDR Controller
+     - Supports rates of up to 1600 MHz data-rate
+     - Supports one DDR3LP UDIMM, of single-, dual- types.
+ - IFC/Local Bus
+     - NAND flash: 512M 8-bit NAND flash
+     - NOR: 128MB 16-bit NOR Flash
+ - Ethernet
+     - Three on-board RGMII 10/100/1G ethernet ports.
+ - FPGA
+ - Clocks
+     - System and DDR clock (SYSCLK, DDRCLK)
+     - SERDES clocks
+ - Power Supplies
+ - SDHC
+     - SDHC/SDXC connector
+ - Other IO
+    - Two Serial ports
+    - Three I2C ports
+
+Memory map
+-----------
+The addresses in brackets are physical addresses.
+
+Start Address  End Address     Description                     Size
+0x00_0000_0000 0x00_000F_FFFF  Secure Boot ROM                 1MB
+0x00_0100_0000 0x00_0FFF_FFFF  CCSRBAR                         240MB
+0x00_1000_0000 0x00_1000_FFFF  OCRAM0                          64KB
+0x00_1001_0000 0x00_1001_FFFF  OCRAM1                          64KB
+0x00_2000_0000 0x00_20FF_FFFF  DCSR                            16MB
+0x00_4000_0000 0x00_5FFF_FFFF  QSPI                            512MB
+0x00_6000_0000 0x00_67FF_FFFF  IFC - NOR Flash                 128MB
+0x00_7E80_0000 0x00_7E80_FFFF  IFC - NAND Flash                64KB
+0x00_7FB0_0000 0x00_7FB0_0FFF  IFC - FPGA                      4KB
+0x00_8000_0000 0x00_FFFF_FFFF  DRAM1                           2GB
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
new file mode 100644 (file)
index 0000000..679c654
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
+#include "ddr.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void fsl_ddr_board_options(memctl_options_t *popts,
+                          dimm_params_t *pdimm,
+                          unsigned int ctrl_num)
+{
+       const struct board_specific_parameters *pbsp, *pbsp_highest = NULL;
+       ulong ddr_freq;
+
+       if (ctrl_num > 3) {
+               printf("Not supported controller number %d\n", ctrl_num);
+               return;
+       }
+       if (!pdimm->n_ranks)
+               return;
+
+       pbsp = udimms[0];
+
+       /* Get clk_adjust, wrlvl_start, wrlvl_ctl, according to the board ddr
+        * freqency and n_banks specified in board_specific_parameters table.
+        */
+       ddr_freq = get_ddr_freq(0) / 1000000;
+       while (pbsp->datarate_mhz_high) {
+               if (pbsp->n_ranks == pdimm->n_ranks) {
+                       if (ddr_freq <= pbsp->datarate_mhz_high) {
+                               popts->clk_adjust = pbsp->clk_adjust;
+                               popts->wrlvl_start = pbsp->wrlvl_start;
+                               popts->wrlvl_ctl_2 = pbsp->wrlvl_ctl_2;
+                               popts->wrlvl_ctl_3 = pbsp->wrlvl_ctl_3;
+                               popts->cpo_override = pbsp->cpo_override;
+                               popts->write_data_delay =
+                                       pbsp->write_data_delay;
+                               goto found;
+                       }
+                       pbsp_highest = pbsp;
+               }
+               pbsp++;
+       }
+
+       if (pbsp_highest) {
+               printf("Error: board specific timing not found for %lu MT/s\n",
+                      ddr_freq);
+               printf("Trying to use the highest speed (%u) parameters\n",
+                      pbsp_highest->datarate_mhz_high);
+               popts->clk_adjust = pbsp_highest->clk_adjust;
+               popts->wrlvl_start = pbsp_highest->wrlvl_start;
+               popts->wrlvl_ctl_2 = pbsp->wrlvl_ctl_2;
+               popts->wrlvl_ctl_3 = pbsp->wrlvl_ctl_3;
+       } else {
+               panic("DIMM is not supported by this board");
+       }
+found:
+       debug("Found timing match: n_ranks %d, data rate %d, rank_gb %d\n",
+             pbsp->n_ranks, pbsp->datarate_mhz_high, pbsp->rank_gb);
+
+       /* force DDR bus width to 32 bits */
+       popts->data_bus_width = 1;
+       popts->otf_burst_chop_en = 0;
+       popts->burst_length = DDR_BL8;
+
+       /*
+        * Factors to consider for half-strength driver enable:
+        *      - number of DIMMs installed
+        */
+       popts->half_strength_driver_enable = 1;
+       /*
+        * Write leveling override
+        */
+       popts->wrlvl_override = 1;
+       popts->wrlvl_sample = 0xf;
+       popts->cswl_override = DDR_CSWL_CS0;
+
+       /*
+        * Rtt and Rtt_WR override
+        */
+       popts->rtt_override = 0;
+
+       /* Enable ZQ calibration */
+       popts->zq_en = 1;
+
+       /* DHC_EN =1, ODT = 75 Ohm */
+       popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
+       popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+}
+
+#ifdef CONFIG_SYS_DDR_RAW_TIMING
+dimm_params_t ddr_raw_timing = {
+       .n_ranks = 1,
+       .rank_density = 1073741824u,
+       .capacity = 1073741824u,
+       .primary_sdram_width = 32,
+       .ec_sdram_width = 0,
+       .registered_dimm = 0,
+       .mirrored_dimm = 0,
+       .n_row_addr = 15,
+       .n_col_addr = 10,
+       .n_banks_per_sdram_device = 8,
+       .edc_config = 0,
+       .burst_lengths_bitmask = 0x0c,
+
+       .tckmin_x_ps = 1071,
+       .caslat_x = 0xfe << 4,  /* 5,6,7,8 */
+       .taa_ps = 13125,
+       .twr_ps = 15000,
+       .trcd_ps = 13125,
+       .trrd_ps = 7500,
+       .trp_ps = 13125,
+       .tras_ps = 37500,
+       .trc_ps = 50625,
+       .trfc_ps = 160000,
+       .twtr_ps = 7500,
+       .trtp_ps = 7500,
+       .refresh_rate_ps = 7800000,
+       .tfaw_ps = 37500,
+};
+
+int fsl_ddr_get_dimm_params(dimm_params_t *pdimm,
+                           unsigned int controller_number,
+                           unsigned int dimm_number)
+{
+       static const char dimm_model[] = "Fixed DDR on board";
+
+       if (((controller_number == 0) && (dimm_number == 0)) ||
+           ((controller_number == 1) && (dimm_number == 0))) {
+               memcpy(pdimm, &ddr_raw_timing, sizeof(dimm_params_t));
+               memset(pdimm->mpart, 0, sizeof(pdimm->mpart));
+               memcpy(pdimm->mpart, dimm_model, sizeof(dimm_model) - 1);
+       }
+
+       return 0;
+}
+#endif
+
+phys_size_t initdram(int board_type)
+{
+       phys_size_t dram_size;
+
+       puts("Initializing DDR....using SPD\n");
+       dram_size = fsl_ddr_sdram();
+
+       return dram_size;
+}
+
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+       gd->bd->bi_dram[0].size = gd->ram_size;
+}
diff --git a/board/freescale/ls1021aqds/ddr.h b/board/freescale/ls1021aqds/ddr.h
new file mode 100644 (file)
index 0000000..16d87cb
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DDR_H__
+#define __DDR_H__
+struct board_specific_parameters {
+       u32 n_ranks;
+       u32 datarate_mhz_high;
+       u32 rank_gb;
+       u32 clk_adjust;
+       u32 wrlvl_start;
+       u32 wrlvl_ctl_2;
+       u32 wrlvl_ctl_3;
+       u32 cpo_override;
+       u32 write_data_delay;
+       u32 force_2t;
+};
+
+/*
+ * These tables contain all valid speeds we want to override with board
+ * specific parameters. datarate_mhz_high values need to be in ascending order
+ * for each n_ranks group.
+ */
+static const struct board_specific_parameters udimm0[] = {
+       /*
+        * memory controller 0
+        *   num|  hi| rank|  clk| wrlvl |   wrlvl   |  wrlvl | cpo  |wrdata|2T
+        * ranks| mhz| GB  |adjst| start |   ctl2    |  ctl3  |      |delay |
+        */
+       {1,  833,  1, 6,     8, 0x06060607, 0x08080807,   0x1f,    2,  0},
+       {1,  1350, 1, 6,     8, 0x0708080A, 0x0A0B0C09,   0x1f,    2,  0},
+       {1,  833,  2, 6,     8, 0x06060607, 0x08080807,   0x1f,    2,  0},
+       {1,  1350, 2, 6,     8, 0x0708080A, 0x0A0B0C09,   0x1f,    2,  0},
+       {2,  833,  4, 6,     8, 0x06060607, 0x08080807,   0x1f,    2,  0},
+       {2,  1350, 4, 6,     8, 0x0708080A, 0x0A0B0C09,   0x1f,    2,  0},
+       {2,  1350, 0, 6,     8, 0x0708080A, 0x0A0B0C09,   0x1f,    2,  0},
+       {2,  1666, 4, 4,   0xa, 0x0B08090C, 0x0B0E0D0A,   0x1f,    2,  0},
+       {2,  1666, 0, 4,   0xa, 0x0B08090C, 0x0B0E0D0A,   0x1f,    2,  0},
+       {}
+};
+
+static const struct board_specific_parameters *udimms[] = {
+       udimm0,
+};
+
+#endif
diff --git a/board/freescale/ls1021aqds/eth.c b/board/freescale/ls1021aqds/eth.c
new file mode 100644 (file)
index 0000000..be351be
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ *
+ * This file handles the board muxing between the RGMII/SGMII PHYs on
+ * Freescale LS1021AQDS board. The RGMII PHYs are the three on-board 1Gb
+ * ports. The SGMII PHYs are provided by the standard Freescale four-port
+ * SGMII riser card.
+ *
+ * Muxing is handled via the PIXIS BRDCFG4 register. The EMI1 bits control
+ * muxing among the RGMII PHYs and the SGMII PHYs. The value for RGMII depends
+ * on which port is used. The value for SGMII depends on which slot the riser
+ * is inserted in.
+ */
+
+#include <common.h>
+#include <netdev.h>
+#include <asm/arch/fsl_serdes.h>
+#include <fsl_mdio.h>
+#include <tsec.h>
+#include <malloc.h>
+
+#include "../common/sgmii_riser.h"
+#include "../common/qixis.h"
+
+#define EMI1_MASK       0x1f
+#define EMI1_RGMII0     1
+#define EMI1_RGMII1     2
+#define EMI1_RGMII2     3
+#define EMI1_SGMII1     0x1c
+#define EMI1_SGMII2     0x1d
+
+struct ls1021a_mdio {
+       struct mii_dev *realbus;
+};
+
+static void ls1021a_mux_mdio(int addr)
+{
+       u8 brdcfg4;
+
+       brdcfg4 = QIXIS_READ(brdcfg[4]);
+       brdcfg4 &= EMI1_MASK;
+
+       switch (addr) {
+       case EMI1_RGMII0:
+               brdcfg4 |= 0;
+               break;
+       case EMI1_RGMII1:
+               brdcfg4 |= 0x20;
+               break;
+       case EMI1_RGMII2:
+               brdcfg4 |= 0x40;
+               break;
+       case EMI1_SGMII1:
+               brdcfg4 |= 0x60;
+               break;
+       case EMI1_SGMII2:
+               brdcfg4 |= 0x80;
+               break;
+       default:
+               brdcfg4 |= 0xa0;
+               break;
+       }
+
+       QIXIS_WRITE(brdcfg[4], brdcfg4);
+}
+
+static int ls1021a_mdio_read(struct mii_dev *bus, int addr, int devad,
+                            int regnum)
+{
+       struct ls1021a_mdio *priv = bus->priv;
+
+       ls1021a_mux_mdio(addr);
+
+       return priv->realbus->read(priv->realbus, addr, devad, regnum);
+}
+
+static int ls1021a_mdio_write(struct mii_dev *bus, int addr, int devad,
+                             int regnum, u16 value)
+{
+       struct ls1021a_mdio *priv = bus->priv;
+
+       ls1021a_mux_mdio(addr);
+
+       return priv->realbus->write(priv->realbus, addr, devad, regnum, value);
+}
+
+static int ls1021a_mdio_reset(struct mii_dev *bus)
+{
+       struct ls1021a_mdio *priv = bus->priv;
+
+       return priv->realbus->reset(priv->realbus);
+}
+
+static int ls1021a_mdio_init(char *realbusname, char *fakebusname)
+{
+       struct ls1021a_mdio *lsmdio;
+       struct mii_dev *bus = mdio_alloc();
+
+       if (!bus) {
+               printf("Failed to allocate LS102xA MDIO bus\n");
+               return -1;
+       }
+
+       lsmdio = malloc(sizeof(*lsmdio));
+       if (!lsmdio) {
+               printf("Failed to allocate LS102xA private data\n");
+               free(bus);
+               return -1;
+       }
+
+       bus->read = ls1021a_mdio_read;
+       bus->write = ls1021a_mdio_write;
+       bus->reset = ls1021a_mdio_reset;
+       sprintf(bus->name, fakebusname);
+
+       lsmdio->realbus = miiphy_get_dev_by_name(realbusname);
+
+       if (!lsmdio->realbus) {
+               printf("No bus with name %s\n", realbusname);
+               free(bus);
+               free(lsmdio);
+               return -1;
+       }
+
+       bus->priv = lsmdio;
+
+       return mdio_register(bus);
+}
+
+int board_eth_init(bd_t *bis)
+{
+       struct fsl_pq_mdio_info mdio_info;
+       struct tsec_info_struct tsec_info[3];
+       int num = 0;
+
+#ifdef CONFIG_TSEC1
+       SET_STD_TSEC_INFO(tsec_info[num], 1);
+       if (is_serdes_configured(SGMII_TSEC1)) {
+               puts("eTSEC1 is in sgmii mode\n");
+               tsec_info[num].flags |= TSEC_SGMII;
+               tsec_info[num].mii_devname = "LS1021A_SGMII_MDIO";
+       } else {
+               tsec_info[num].mii_devname = "LS1021A_RGMII_MDIO";
+       }
+       num++;
+#endif
+#ifdef CONFIG_TSEC2
+       SET_STD_TSEC_INFO(tsec_info[num], 2);
+       if (is_serdes_configured(SGMII_TSEC2)) {
+               puts("eTSEC2 is in sgmii mode\n");
+               tsec_info[num].flags |= TSEC_SGMII;
+               tsec_info[num].mii_devname = "LS1021A_SGMII_MDIO";
+       } else {
+               tsec_info[num].mii_devname = "LS1021A_RGMII_MDIO";
+       }
+       num++;
+#endif
+#ifdef CONFIG_TSEC3
+       SET_STD_TSEC_INFO(tsec_info[num], 3);
+       tsec_info[num].mii_devname = "LS1021A_RGMII_MDIO";
+       num++;
+#endif
+       if (!num) {
+               printf("No TSECs initialized\n");
+               return 0;
+       }
+
+#ifdef CONFIG_FSL_SGMII_RISER
+       fsl_sgmii_riser_init(tsec_info, num);
+#endif
+
+       mdio_info.regs = (struct tsec_mii_mng *)CONFIG_SYS_MDIO_BASE_ADDR;
+       mdio_info.name = DEFAULT_MII_NAME;
+
+       fsl_pq_mdio_init(bis, &mdio_info);
+
+       /* Register the virtual MDIO front-ends */
+       ls1021a_mdio_init(DEFAULT_MII_NAME, "LS1021A_RGMII_MDIO");
+       ls1021a_mdio_init(DEFAULT_MII_NAME, "LS1021A_SGMII_MDIO");
+
+       tsec_eth_init(bis, tsec_info, num);
+
+       return pci_eth_init(bis);
+}
diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c
new file mode 100644 (file)
index 0000000..12e83f7
--- /dev/null
@@ -0,0 +1,255 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <i2c.h>
+#include <asm/io.h>
+#include <asm/arch/immap_ls102xa.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/fsl_serdes.h>
+#include <mmc.h>
+#include <fsl_esdhc.h>
+#include <fsl_ifc.h>
+
+#include "../common/qixis.h"
+#include "ls1021aqds_qixis.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+enum {
+       MUX_TYPE_SD_PCI4,
+       MUX_TYPE_SD_PC_SA_SG_SG,
+       MUX_TYPE_SD_PC_SA_PC_SG,
+       MUX_TYPE_SD_PC_SG_SG,
+};
+
+int checkboard(void)
+{
+       char buf[64];
+       u8 sw;
+
+       puts("Board: LS1021AQDS\n");
+
+       sw = QIXIS_READ(brdcfg[0]);
+       sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT;
+
+       if (sw < 0x8)
+               printf("vBank: %d\n", sw);
+       else if (sw == 0x8)
+               puts("PromJet\n");
+       else if (sw == 0x9)
+               puts("NAND\n");
+       else if (sw == 0x15)
+               printf("IFCCard\n");
+       else
+               printf("invalid setting of SW%u\n", QIXIS_LBMAP_SWITCH);
+
+       printf("Sys ID:0x%02x, Sys Ver: 0x%02x\n",
+              QIXIS_READ(id), QIXIS_READ(arch));
+
+       printf("FPGA:  v%d (%s), build %d\n",
+              (int)QIXIS_READ(scver), qixis_read_tag(buf),
+              (int)qixis_read_minor());
+
+       return 0;
+}
+
+unsigned long get_board_sys_clk(void)
+{
+       u8 sysclk_conf = QIXIS_READ(brdcfg[1]);
+
+       switch (sysclk_conf & 0x0f) {
+       case QIXIS_SYSCLK_64:
+               return 64000000;
+       case QIXIS_SYSCLK_83:
+               return 83333333;
+       case QIXIS_SYSCLK_100:
+               return 100000000;
+       case QIXIS_SYSCLK_125:
+               return 125000000;
+       case QIXIS_SYSCLK_133:
+               return 133333333;
+       case QIXIS_SYSCLK_150:
+               return 150000000;
+       case QIXIS_SYSCLK_160:
+               return 160000000;
+       case QIXIS_SYSCLK_166:
+               return 166666666;
+       }
+       return 66666666;
+}
+
+unsigned long get_board_ddr_clk(void)
+{
+       u8 ddrclk_conf = QIXIS_READ(brdcfg[1]);
+
+       switch ((ddrclk_conf & 0x30) >> 4) {
+       case QIXIS_DDRCLK_100:
+               return 100000000;
+       case QIXIS_DDRCLK_125:
+               return 125000000;
+       case QIXIS_DDRCLK_133:
+               return 133333333;
+       }
+       return 66666666;
+}
+
+int dram_init(void)
+{
+       gd->ram_size = initdram(0);
+
+       return 0;
+}
+
+#ifdef CONFIG_FSL_ESDHC
+struct fsl_esdhc_cfg esdhc_cfg[1] = {
+       {CONFIG_SYS_FSL_ESDHC_ADDR},
+};
+
+int board_mmc_init(bd_t *bis)
+{
+       esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+
+       return fsl_esdhc_initialize(bis, &esdhc_cfg[0]);
+}
+#endif
+
+int select_i2c_ch_pca9547(u8 ch)
+{
+       int ret;
+
+       ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
+       if (ret) {
+               puts("PCA: failed to select proper channel\n");
+               return ret;
+       }
+
+       return 0;
+}
+
+int board_early_init_f(void)
+{
+       struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR;
+       struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
+
+#ifdef CONFIG_TSEC_ENET
+       out_be32(&scfg->scfgrevcr, SCFG_SCFGREVCR_REV);
+       out_be32(&scfg->etsecdmamcr, SCFG_ETSECDMAMCR_LE_BD_FR);
+       out_be32(&scfg->scfgrevcr, SCFG_SCFGREVCR_NOREV);
+#endif
+
+#ifdef CONFIG_FSL_IFC
+       init_early_memctl_regs();
+#endif
+
+       /* Workaround for the issue that DDR could not respond to
+        * barrier transaction which is generated by executing DSB/ISB
+        * instruction. Set CCI-400 control override register to
+        * terminate the barrier transaction. After DDR is initialized,
+        * allow barrier transaction to DDR again */
+       out_le32(&cci->ctrl_ord, CCI400_CTRLORD_TERM_BARRIER);
+
+       return 0;
+}
+
+int config_board_mux(int ctrl_type)
+{
+       u8 reg12;
+
+       reg12 = QIXIS_READ(brdcfg[12]);
+
+       switch (ctrl_type) {
+       case MUX_TYPE_SD_PCI4:
+               reg12 = 0x38;
+               break;
+       case MUX_TYPE_SD_PC_SA_SG_SG:
+               reg12 = 0x01;
+               break;
+       case MUX_TYPE_SD_PC_SA_PC_SG:
+               reg12 = 0x01;
+               break;
+       case MUX_TYPE_SD_PC_SG_SG:
+               reg12 = 0x21;
+               break;
+       default:
+               printf("Wrong mux interface type\n");
+               return -1;
+       }
+
+       QIXIS_WRITE(brdcfg[12], reg12);
+
+       return 0;
+}
+
+int config_serdes_mux(void)
+{
+       struct ccsr_gur *gur = (struct ccsr_gur *)CONFIG_SYS_FSL_GUTS_ADDR;
+       u32 cfg;
+
+       cfg = in_be32(&gur->rcwsr[4]) & RCWSR4_SRDS1_PRTCL_MASK;
+       cfg >>= RCWSR4_SRDS1_PRTCL_SHIFT;
+
+       switch (cfg) {
+       case 0x0:
+               config_board_mux(MUX_TYPE_SD_PCI4);
+               break;
+       case 0x30:
+               config_board_mux(MUX_TYPE_SD_PC_SA_SG_SG);
+               break;
+       case 0x60:
+               config_board_mux(MUX_TYPE_SD_PC_SG_SG);
+               break;
+       case 0x70:
+               config_board_mux(MUX_TYPE_SD_PC_SA_PC_SG);
+               break;
+       default:
+               printf("SRDS1 prtcl:0x%x\n", cfg);
+               break;
+       }
+
+       return 0;
+}
+
+int board_init(void)
+{
+       struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
+
+       /* Set CCI-400 control override register to
+        * enable barrier transaction */
+       out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER);
+
+       select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
+
+#ifndef CONFIG_SYS_FSL_NO_SERDES
+       fsl_serdes_init();
+       config_serdes_mux();
+#endif
+       return 0;
+}
+
+void ft_board_setup(void *blob, bd_t *bd)
+{
+       ft_cpu_setup(blob, bd);
+}
+
+u8 flash_read8(void *addr)
+{
+       return __raw_readb(addr + 1);
+}
+
+void flash_write16(u16 val, void *addr)
+{
+       u16 shftval = (((val >> 8) & 0xff) | ((val << 8) & 0xff00));
+
+       __raw_writew(shftval, addr);
+}
+
+u16 flash_read16(void *addr)
+{
+       u16 val = __raw_readw(addr);
+
+       return (((val) >> 8) & 0x00ff) | (((val) << 8) & 0xff00);
+}
diff --git a/board/freescale/ls1021aqds/ls1021aqds_qixis.h b/board/freescale/ls1021aqds/ls1021aqds_qixis.h
new file mode 100644 (file)
index 0000000..09b3be2
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __LS1021AQDS_QIXIS_H__
+#define __LS1021AQDS_QIXIS_H__
+
+/* Definitions of QIXIS Registers for LS1021AQDS */
+
+/* BRDCFG4[4:7]] select EC1 and EC2 as a pair */
+#define BRDCFG4_EMISEL_MASK            0xe0
+#define BRDCFG4_EMISEL_SHIFT           5
+
+/* SYSCLK */
+#define QIXIS_SYSCLK_66                        0x0
+#define QIXIS_SYSCLK_83                        0x1
+#define QIXIS_SYSCLK_100               0x2
+#define QIXIS_SYSCLK_125               0x3
+#define QIXIS_SYSCLK_133               0x4
+#define QIXIS_SYSCLK_150               0x5
+#define QIXIS_SYSCLK_160               0x6
+#define QIXIS_SYSCLK_166               0x7
+#define QIXIS_SYSCLK_64                        0x8
+
+/* DDRCLK */
+#define QIXIS_DDRCLK_66                        0x0
+#define QIXIS_DDRCLK_100               0x1
+#define QIXIS_DDRCLK_125               0x2
+#define QIXIS_DDRCLK_133               0x3
+
+#define QIXIS_SRDS1CLK_100             0x0
+
+#endif
diff --git a/board/freescale/ls1021atwr/Kconfig b/board/freescale/ls1021atwr/Kconfig
new file mode 100644 (file)
index 0000000..312f938
--- /dev/null
@@ -0,0 +1,18 @@
+if TARGET_LS1021ATWR
+
+config SYS_CPU
+       default "armv7"
+
+config SYS_BOARD
+       default "ls1021atwr"
+
+config SYS_VENDOR
+       default "freescale"
+
+config SYS_SOC
+       default "ls102xa"
+
+config SYS_CONFIG_NAME
+       default "ls1021atwr"
+
+endif
diff --git a/board/freescale/ls1021atwr/MAINTAINERS b/board/freescale/ls1021atwr/MAINTAINERS
new file mode 100644 (file)
index 0000000..4e5bc15
--- /dev/null
@@ -0,0 +1,6 @@
+LS1021ATWR BOARD
+M:     Alison Wang <alison.wang@freescale.com>
+S:     Maintained
+F:     board/freescale/ls1021atwr/
+F:     include/configs/ls1021atwr.h
+F:     configs/ls1021atwr_nor_defconfig
diff --git a/board/freescale/ls1021atwr/Makefile b/board/freescale/ls1021atwr/Makefile
new file mode 100644 (file)
index 0000000..01296c0
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# Copyright 2014 Freescale Semiconductor, Inc.
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+obj-y += ls1021atwr.o
+obj-$(CONFIG_FSL_DCU_FB) += dcu.o
diff --git a/board/freescale/ls1021atwr/README b/board/freescale/ls1021atwr/README
new file mode 100644 (file)
index 0000000..d2821cb
--- /dev/null
@@ -0,0 +1,109 @@
+Overview
+--------
+The LS1021ATWR is a Freescale reference board that hosts the LS1021A SoC.
+
+LS1021A SoC Overview
+------------------
+The QorIQ LS1 family, which includes the LS1021A communications processor,
+is built on Layerscape architecture, the industry's first software-aware,
+core-agnostic networking architecture to offer unprecedented efficiency
+and scale.
+
+A member of the value-performance tier, the QorIQ LS1021A processor provides
+extensive integration and power efficiency for fanless, small form factor
+enterprise networking applications. Incorporating dual ARM Cortex-A7 cores
+running up to 1.0 GHz, the LS1021A processor delivers pre-silicon CoreMark
+performance of over 6,000, as well as virtualization support, advanced
+security features and the broadest array of high-speed interconnects and
+optimized peripheral features ever offered in a sub-3 W processor.
+
+The QorIQ LS1021A processor features an integrated LCD controller,
+CAN controller for implementing industrial protocols, DDR3L/4 running
+up to 1600 MHz, integrated security engine and QUICC Engine, and ECC
+protection on both L1 and L2 caches. The LS1021A processor is pin- and
+software-compatible with the QorIQ LS1020A and LS1022A processors.
+
+The LS1021A SoC includes the following function and features:
+
+ - ARM Cortex-A7 MPCore compliant with ARMv7-A architecture
+ - Dual high-preformance ARM Cortex-A7 cores, each core includes:
+   - 32 Kbyte L1 Instruction Cache and Data Cache for each core (ECC protection)
+   - 512 Kbyte shared coherent L2 Cache (with ECC protection)
+   - NEON Co-processor (per core)
+   - 40-bit physical addressing
+   - Vector floating-point support
+ - ARM Core-Link CCI-400 Cache Coherent Interconnect
+ - One DDR3L/DDR4 SDRAM memory controller with x8/x16/x32-bit configuration
+   supporting speeds up to 1600Mtps
+   - ECC and interleaving support
+ - VeTSEC Ethernet complex
+   - Up to 3x virtualized 10/100/1000 Ethernet controllers
+   - MII, RMII, RGMII, and SGMII support
+   - QoS, lossless flow control, and IEEE 1588 support
+ - 4-lane 6GHz SerDes
+ - High speed interconnect (4 SerDes lanes with are muxed for these protocol)
+   - Two PCI Express Gen2 controllers running at up to 5 GHz
+   - One Serial ATA 3.0 supporting 6 GT/s operation
+   - Two SGMII interfaces supporting 1000 Mbps
+ - Additional peripheral interfaces
+   - One high-speed USB 3.0 controller with integrated PHY and one high-speed
+     USB 2.00 controller with ULPI
+   - Integrated flash controller (IFC) with 16-bit interface
+   - Quad SPI NOR Flash
+   - One enhanced Secure digital host controller
+   - Display controller unit (DCU) 24-bit RGB (12-bit DDR pin interface)
+   - Ten UARTs comprised of two 16550 compliant DUARTs, and six low power
+     UARTs
+   - Three I2C controllers
+   - Eight FlexTimers four supporting PWM and four FlexCAN ports
+   - Four GPIO controllers supporting up to 109 general purpose I/O signals
+ - Integrated advanced audio block:
+   - Four synchronous audio interfaces (SAI)
+   - Sony/Philips Digital Interconnect Format (SPDIF)
+   - Asynchronous Sample Rate Converter (ASRC)
+ - Hardware based crypto offload engine
+   - IPSec forwarding at up to 1Gbps
+   - QorIQ Trust Architecture, Secure Boot, and ARM TrustZone supported
+   - Public key hardware accelerator
+   - True Random Number Generator (NIST Certified)
+   - Advanced Encryption Standard Accelerators (AESA)
+   - Data Encryption Standard Accelerators
+ - QUICC Engine ULite block
+   - Two universal communication controllers (TDM and HDLC) supporting 64
+   multichannels, each running at 64 Kbps
+   - Support for 256 channels of HDLC
+ - QorIQ TrustArchitecture with Secure Boot, as well as ARM TrustZone supported
+
+LS1021ATWR board Overview
+-------------------------
+ - DDR Controller
+     - Supports rates of up to 1600 MHz data-rate
+     - Supports one DDR3LP SDRAM.
+ - IFC/Local Bus
+     - NOR: 128MB 16-bit NOR Flash
+ - Ethernet
+     - Three on-board RGMII 10/100/1G ethernet ports.
+ - CPLD
+ - Clocks
+     - System and DDR clock (SYSCLK, DDRCLK)
+     - SERDES clocks
+ - Power Supplies
+ - SDHC
+     - SDHC/SDXC connector
+ - Other IO
+    - One Serial port
+    - Three I2C ports
+
+Memory map
+-----------
+The addresses in brackets are physical addresses.
+
+Start Address  End Address     Description                     Size
+0x00_0000_0000 0x00_000F_FFFF  Secure Boot ROM                 1MB
+0x00_0100_0000 0x00_0FFF_FFFF  CCSRBAR                         240MB
+0x00_1000_0000 0x00_1000_FFFF  OCRAM0                          64KB
+0x00_1001_0000 0x00_1001_FFFF  OCRAM1                          64KB
+0x00_2000_0000 0x00_20FF_FFFF  DCSR                            16MB
+0x00_4000_0000 0x00_5FFF_FFFF  QSPI                            512MB
+0x00_6000_0000 0x00_67FF_FFFF  IFC - NOR Flash                 128MB
+0x00_8000_0000 0x00_FFFF_FFFF  DRAM1                           2GB
diff --git a/board/freescale/ls1021atwr/dcu.c b/board/freescale/ls1021atwr/dcu.c
new file mode 100644 (file)
index 0000000..8fe4ccb
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * FSL DCU Framebuffer driver
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <fsl_dcu_fb.h>
+#include "div64.h"
+#include "../common/dcu_sii9022a.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+unsigned int dcu_set_pixel_clock(unsigned int pixclock)
+{
+       unsigned long long div;
+
+       div = (unsigned long long)(gd->bus_clk / 1000);
+       div *= (unsigned long long)pixclock;
+       do_div(div, 1000000000);
+
+       return div;
+}
+
+int platform_dcu_init(unsigned int xres, unsigned int yres,
+                     const char *port,
+                     struct fb_videomode *dcu_fb_videomode)
+{
+       const char *name;
+       unsigned int pixel_format;
+
+       if (strncmp(port, "twr_lcd", 4) == 0) {
+               name = "TWR_LCD_RGB card";
+       } else {
+               name = "HDMI";
+               dcu_set_dvi_encoder(dcu_fb_videomode);
+       }
+
+       printf("DCU: Switching to %s monitor @ %ux%u\n", name, xres, yres);
+
+       pixel_format = 32;
+       fsl_dcu_init(xres, yres, pixel_format);
+
+       return 0;
+}
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
new file mode 100644 (file)
index 0000000..b522ff2
--- /dev/null
@@ -0,0 +1,488 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <i2c.h>
+#include <asm/io.h>
+#include <asm/arch/immap_ls102xa.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/fsl_serdes.h>
+#include <mmc.h>
+#include <fsl_esdhc.h>
+#include <fsl_ifc.h>
+#include <netdev.h>
+#include <fsl_mdio.h>
+#include <tsec.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define VERSION_MASK           0x00FF
+#define BANK_MASK              0x0001
+#define CONFIG_RESET           0x1
+#define INIT_RESET             0x1
+
+#define CPLD_SET_MUX_SERDES    0x20
+#define CPLD_SET_BOOT_BANK     0x40
+
+#define BOOT_FROM_UPPER_BANK   0x0
+#define BOOT_FROM_LOWER_BANK   0x1
+
+#define LANEB_SATA             (0x01)
+#define LANEB_SGMII1           (0x02)
+#define LANEC_SGMII1           (0x04)
+#define LANEC_PCIEX1           (0x08)
+#define LANED_PCIEX2           (0x10)
+#define LANED_SGMII2           (0x20)
+
+#define MASK_LANE_B            0x1
+#define MASK_LANE_C            0x2
+#define MASK_LANE_D            0x4
+#define MASK_SGMII             0x8
+
+#define KEEP_STATUS            0x0
+#define NEED_RESET             0x1
+
+struct cpld_data {
+       u8 cpld_ver;            /* cpld revision */
+       u8 cpld_ver_sub;        /* cpld sub revision */
+       u8 pcba_ver;            /* pcb revision number */
+       u8 system_rst;          /* reset system by cpld */
+       u8 soft_mux_on;         /* CPLD override physical switches Enable */
+       u8 cfg_rcw_src1;        /* Reset config word 1 */
+       u8 cfg_rcw_src2;        /* Reset config word 2 */
+       u8 vbank;               /* Flash bank selection Control */
+       u8 gpio;                /* GPIO for TWR-ELEV */
+       u8 i2c3_ifc_mux;
+       u8 mux_spi2;
+       u8 can3_usb2_mux;       /* CAN3 and USB2 Selection */
+       u8 qe_lcd_mux;          /* QE and LCD Selection */
+       u8 serdes_mux;          /* Multiplexed pins for SerDes Lanes */
+       u8 global_rst;          /* reset with init CPLD reg to default */
+       u8 rev1;                /* Reserved */
+       u8 rev2;                /* Reserved */
+};
+
+static void convert_serdes_mux(int type, int need_reset);
+
+void cpld_show(void)
+{
+       struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
+
+       printf("CPLD:  V%x.%x\nPCBA:  V%x.0\nVBank: %d\n",
+              in_8(&cpld_data->cpld_ver) & VERSION_MASK,
+              in_8(&cpld_data->cpld_ver_sub) & VERSION_MASK,
+              in_8(&cpld_data->pcba_ver) & VERSION_MASK,
+              in_8(&cpld_data->vbank) & BANK_MASK);
+
+#ifdef CONFIG_DEBUG
+       printf("soft_mux_on =%x\n",
+              in_8(&cpld_data->soft_mux_on));
+       printf("cfg_rcw_src1 =%x\n",
+              in_8(&cpld_data->cfg_rcw_src1));
+       printf("cfg_rcw_src2 =%x\n",
+              in_8(&cpld_data->cfg_rcw_src2));
+       printf("vbank =%x\n",
+              in_8(&cpld_data->vbank));
+       printf("gpio =%x\n",
+              in_8(&cpld_data->gpio));
+       printf("i2c3_ifc_mux =%x\n",
+              in_8(&cpld_data->i2c3_ifc_mux));
+       printf("mux_spi2 =%x\n",
+              in_8(&cpld_data->mux_spi2));
+       printf("can3_usb2_mux =%x\n",
+              in_8(&cpld_data->can3_usb2_mux));
+       printf("qe_lcd_mux =%x\n",
+              in_8(&cpld_data->qe_lcd_mux));
+       printf("serdes_mux =%x\n",
+              in_8(&cpld_data->serdes_mux));
+#endif
+}
+
+int checkboard(void)
+{
+       puts("Board: LS1021ATWR\n");
+       cpld_show();
+
+       return 0;
+}
+
+void ddrmc_init(void)
+{
+       struct ccsr_ddr *ddr = (struct ccsr_ddr *)CONFIG_SYS_FSL_DDR_ADDR;
+
+       out_be32(&ddr->sdram_cfg, DDR_SDRAM_CFG);
+
+       out_be32(&ddr->cs0_bnds, DDR_CS0_BNDS);
+       out_be32(&ddr->cs0_config, DDR_CS0_CONFIG);
+
+       out_be32(&ddr->timing_cfg_0, DDR_TIMING_CFG_0);
+       out_be32(&ddr->timing_cfg_1, DDR_TIMING_CFG_1);
+       out_be32(&ddr->timing_cfg_2, DDR_TIMING_CFG_2);
+       out_be32(&ddr->timing_cfg_3, DDR_TIMING_CFG_3);
+       out_be32(&ddr->timing_cfg_4, DDR_TIMING_CFG_4);
+       out_be32(&ddr->timing_cfg_5, DDR_TIMING_CFG_5);
+
+       out_be32(&ddr->sdram_cfg_2,  DDR_SDRAM_CFG_2);
+
+       out_be32(&ddr->sdram_mode, DDR_SDRAM_MODE);
+       out_be32(&ddr->sdram_mode_2, DDR_SDRAM_MODE_2);
+
+       out_be32(&ddr->sdram_interval, DDR_SDRAM_INTERVAL);
+
+       out_be32(&ddr->ddr_wrlvl_cntl, DDR_DDR_WRLVL_CNTL);
+
+       out_be32(&ddr->ddr_wrlvl_cntl_2, DDR_DDR_WRLVL_CNTL_2);
+       out_be32(&ddr->ddr_wrlvl_cntl_3, DDR_DDR_WRLVL_CNTL_3);
+
+       out_be32(&ddr->ddr_cdr1, DDR_DDR_CDR1);
+       out_be32(&ddr->ddr_cdr2, DDR_DDR_CDR2);
+
+       out_be32(&ddr->sdram_clk_cntl, DDR_SDRAM_CLK_CNTL);
+       out_be32(&ddr->ddr_zq_cntl, DDR_DDR_ZQ_CNTL);
+
+       out_be32(&ddr->cs0_config_2, DDR_CS0_CONFIG_2);
+       udelay(1);
+       out_be32(&ddr->sdram_cfg, DDR_SDRAM_CFG | DDR_SDRAM_CFG_MEM_EN);
+}
+
+int dram_init(void)
+{
+#if (!defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD))
+       ddrmc_init();
+#endif
+
+       gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+       return 0;
+}
+
+#ifdef CONFIG_FSL_ESDHC
+struct fsl_esdhc_cfg esdhc_cfg[1] = {
+       {CONFIG_SYS_FSL_ESDHC_ADDR},
+};
+
+int board_mmc_init(bd_t *bis)
+{
+       esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK);
+
+       return fsl_esdhc_initialize(bis, &esdhc_cfg[0]);
+}
+#endif
+
+#ifdef CONFIG_TSEC_ENET
+int board_eth_init(bd_t *bis)
+{
+       struct fsl_pq_mdio_info mdio_info;
+       struct tsec_info_struct tsec_info[4];
+       int num = 0;
+
+#ifdef CONFIG_TSEC1
+       SET_STD_TSEC_INFO(tsec_info[num], 1);
+       if (is_serdes_configured(SGMII_TSEC1)) {
+               puts("eTSEC1 is in sgmii mode.\n");
+               tsec_info[num].flags |= TSEC_SGMII;
+       }
+       num++;
+#endif
+#ifdef CONFIG_TSEC2
+       SET_STD_TSEC_INFO(tsec_info[num], 2);
+       if (is_serdes_configured(SGMII_TSEC2)) {
+               puts("eTSEC2 is in sgmii mode.\n");
+               tsec_info[num].flags |= TSEC_SGMII;
+       }
+       num++;
+#endif
+#ifdef CONFIG_TSEC3
+       SET_STD_TSEC_INFO(tsec_info[num], 3);
+       num++;
+#endif
+       if (!num) {
+               printf("No TSECs initialized\n");
+               return 0;
+       }
+
+       mdio_info.regs = (struct tsec_mii_mng *)CONFIG_SYS_MDIO_BASE_ADDR;
+       mdio_info.name = DEFAULT_MII_NAME;
+       fsl_pq_mdio_init(bis, &mdio_info);
+
+       tsec_eth_init(bis, tsec_info, num);
+
+       return pci_eth_init(bis);
+}
+#endif
+
+int config_serdes_mux(void)
+{
+       struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+       u32 protocol = in_be32(&gur->rcwsr[4]) & RCWSR4_SRDS1_PRTCL_MASK;
+
+       protocol >>= RCWSR4_SRDS1_PRTCL_SHIFT;
+       switch (protocol) {
+       case 0x10:
+               convert_serdes_mux(LANEB_SATA, KEEP_STATUS);
+               convert_serdes_mux(LANED_PCIEX2 |
+                               LANEC_PCIEX1, KEEP_STATUS);
+               break;
+       case 0x20:
+               convert_serdes_mux(LANEB_SGMII1, KEEP_STATUS);
+               convert_serdes_mux(LANEC_PCIEX1, KEEP_STATUS);
+               convert_serdes_mux(LANED_SGMII2, KEEP_STATUS);
+               break;
+       case 0x30:
+               convert_serdes_mux(LANEB_SATA, KEEP_STATUS);
+               convert_serdes_mux(LANEC_SGMII1, KEEP_STATUS);
+               convert_serdes_mux(LANED_SGMII2, KEEP_STATUS);
+               break;
+       case 0x70:
+               convert_serdes_mux(LANEB_SATA, KEEP_STATUS);
+               convert_serdes_mux(LANEC_PCIEX1, KEEP_STATUS);
+               convert_serdes_mux(LANED_SGMII2, KEEP_STATUS);
+               break;
+       }
+
+       return 0;
+}
+
+int board_early_init_f(void)
+{
+       struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR;
+
+#ifdef CONFIG_TSEC_ENET
+       out_be32(&scfg->scfgrevcr, SCFG_SCFGREVCR_REV);
+       out_be32(&scfg->etsecdmamcr, SCFG_ETSECDMAMCR_LE_BD_FR);
+       out_be32(&scfg->etsecmcr, SCFG_ETSECCMCR_GE2_CLK125);
+       udelay(10);
+       out_be32(&scfg->scfgrevcr, SCFG_SCFGREVCR_NOREV);
+#endif
+
+#ifdef CONFIG_FSL_IFC
+       init_early_memctl_regs();
+#endif
+
+#ifdef CONFIG_FSL_DCU_FB
+       out_be32(&scfg->scfgrevcr, SCFG_SCFGREVCR_REV);
+       out_be32(&scfg->pixclkcr, SCFG_PIXCLKCR_PXCKEN);
+       out_be32(&scfg->scfgrevcr, SCFG_SCFGREVCR_NOREV);
+#endif
+
+       return 0;
+}
+
+int board_init(void)
+{
+#ifndef CONFIG_SYS_FSL_NO_SERDES
+       fsl_serdes_init();
+       config_serdes_mux();
+#endif
+
+       return 0;
+}
+
+void ft_board_setup(void *blob, bd_t *bd)
+{
+       ft_cpu_setup(blob, bd);
+}
+
+u8 flash_read8(void *addr)
+{
+       return __raw_readb(addr + 1);
+}
+
+void flash_write16(u16 val, void *addr)
+{
+       u16 shftval = (((val >> 8) & 0xff) | ((val << 8) & 0xff00));
+
+       __raw_writew(shftval, addr);
+}
+
+u16 flash_read16(void *addr)
+{
+       u16 val = __raw_readw(addr);
+
+       return (((val) >> 8) & 0x00ff) | (((val) << 8) & 0xff00);
+}
+
+static void convert_flash_bank(char bank)
+{
+       struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
+
+       printf("Now switch to boot from flash bank %d.\n", bank);
+       cpld_data->soft_mux_on = CPLD_SET_BOOT_BANK;
+       cpld_data->vbank = bank;
+
+       printf("Reset board to enable configuration.\n");
+       cpld_data->system_rst = CONFIG_RESET;
+}
+
+static int flash_bank_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
+                         char * const argv[])
+{
+       if (argc != 2)
+               return CMD_RET_USAGE;
+       if (strcmp(argv[1], "0") == 0)
+               convert_flash_bank(BOOT_FROM_UPPER_BANK);
+       else if (strcmp(argv[1], "1") == 0)
+               convert_flash_bank(BOOT_FROM_LOWER_BANK);
+       else
+               return CMD_RET_USAGE;
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       boot_bank, 2, 0, flash_bank_cmd,
+       "Flash bank Selection Control",
+       "bank[0-upper bank/1-lower bank] (e.g. boot_bank 0)"
+);
+
+static int cpld_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
+                         char * const argv[])
+{
+       struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
+
+       if (argc > 2)
+               return CMD_RET_USAGE;
+       if ((argc == 1) || (strcmp(argv[1], "conf") == 0))
+               cpld_data->system_rst = CONFIG_RESET;
+       else if (strcmp(argv[1], "init") == 0)
+               cpld_data->global_rst = INIT_RESET;
+       else
+               return CMD_RET_USAGE;
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       cpld_reset, 2, 0, cpld_reset_cmd,
+       "Reset via CPLD",
+       "conf\n"
+       "       -reset with current CPLD configuration\n"
+       "init\n"
+       "       -reset and initial CPLD configuration with default value"
+
+);
+
+static void convert_serdes_mux(int type, int need_reset)
+{
+       char current_serdes;
+       struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
+
+       current_serdes = cpld_data->serdes_mux;
+
+       switch (type) {
+       case LANEB_SATA:
+               current_serdes &= ~MASK_LANE_B;
+               break;
+       case LANEB_SGMII1:
+               current_serdes |= (MASK_LANE_B | MASK_SGMII | MASK_LANE_C);
+               break;
+       case LANEC_SGMII1:
+               current_serdes &= ~(MASK_LANE_B | MASK_SGMII | MASK_LANE_C);
+               break;
+       case LANED_SGMII2:
+               current_serdes |= MASK_LANE_D;
+               break;
+       case LANEC_PCIEX1:
+               current_serdes |= MASK_LANE_C;
+               break;
+       case (LANED_PCIEX2 | LANEC_PCIEX1):
+               current_serdes |= MASK_LANE_C;
+               current_serdes &= ~MASK_LANE_D;
+               break;
+       default:
+               printf("CPLD serdes MUX: unsupported MUX type 0x%x\n", type);
+               return;
+       }
+
+       cpld_data->soft_mux_on |= CPLD_SET_MUX_SERDES;
+       cpld_data->serdes_mux = current_serdes;
+
+       if (need_reset == 1) {
+               printf("Reset board to enable configuration\n");
+               cpld_data->system_rst = CONFIG_RESET;
+       }
+}
+
+void print_serdes_mux(void)
+{
+       char current_serdes;
+       struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
+
+       current_serdes = cpld_data->serdes_mux;
+
+       printf("Serdes Lane B: ");
+       if ((current_serdes & MASK_LANE_B) == 0)
+               printf("SATA,\n");
+       else
+               printf("SGMII 1,\n");
+
+       printf("Serdes Lane C: ");
+       if ((current_serdes & MASK_LANE_C) == 0)
+               printf("SGMII 1,\n");
+       else
+               printf("PCIe,\n");
+
+       printf("Serdes Lane D: ");
+       if ((current_serdes & MASK_LANE_D) == 0)
+               printf("PCIe,\n");
+       else
+               printf("SGMII 2,\n");
+
+       printf("SGMII 1 is on lane ");
+       if ((current_serdes & MASK_SGMII) == 0)
+               printf("C.\n");
+       else
+               printf("B.\n");
+}
+
+static int serdes_mux_cmd(cmd_tbl_t *cmdtp, int flag, int argc,
+                         char * const argv[])
+{
+       if (argc != 2)
+               return CMD_RET_USAGE;
+       if (strcmp(argv[1], "sata") == 0) {
+               printf("Set serdes lane B to SATA.\n");
+               convert_serdes_mux(LANEB_SATA, NEED_RESET);
+       } else if (strcmp(argv[1], "sgmii1b") == 0) {
+               printf("Set serdes lane B to SGMII 1.\n");
+               convert_serdes_mux(LANEB_SGMII1, NEED_RESET);
+       } else if (strcmp(argv[1], "sgmii1c") == 0) {
+               printf("Set serdes lane C to SGMII 1.\n");
+               convert_serdes_mux(LANEC_SGMII1, NEED_RESET);
+       } else if (strcmp(argv[1], "sgmii2") == 0) {
+               printf("Set serdes lane D to SGMII 2.\n");
+               convert_serdes_mux(LANED_SGMII2, NEED_RESET);
+       } else if (strcmp(argv[1], "pciex1") == 0) {
+               printf("Set serdes lane C to PCIe X1.\n");
+               convert_serdes_mux(LANEC_PCIEX1, NEED_RESET);
+       } else if (strcmp(argv[1], "pciex2") == 0) {
+               printf("Set serdes lane C & lane D to PCIe X2.\n");
+               convert_serdes_mux((LANED_PCIEX2 | LANEC_PCIEX1), NEED_RESET);
+       } else if (strcmp(argv[1], "show") == 0) {
+               print_serdes_mux();
+       } else {
+               return CMD_RET_USAGE;
+       }
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       lane_bank, 2, 0, serdes_mux_cmd,
+       "Multiplexed function setting for SerDes Lanes",
+       "sata\n"
+       "       -change lane B to sata\n"
+       "lane_bank sgmii1b\n"
+       "       -change lane B to SGMII1\n"
+       "lane_bank sgmii1c\n"
+       "       -change lane C to SGMII1\n"
+       "lane_bank sgmii2\n"
+       "       -change lane D to SGMII2\n"
+       "lane_bank pciex1\n"
+       "       -change lane C to PCIeX1\n"
+       "lane_bank pciex2\n"
+       "       -change lane C & lane D to PCIeX2\n"
+       "\nWARNING: If you aren't familiar with the setting of serdes, don't try to change anything!\n"
+);
index 5655e186c409c5819dddcf371afb7bb2182b17e3..798b491dcc415ee80062e87907deaf995cd6e035 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_LS2085A_EMU
 
 config SYS_CPU
-       string
        default "armv8"
 
 config SYS_BOARD
-       string
        default "ls2085a"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "fsl-lsch3"
 
 config SYS_CONFIG_NAME
-       string
        default "ls2085a_emu"
 
 endif
@@ -25,23 +20,18 @@ endif
 if TARGET_LS2085A_SIMU
 
 config SYS_CPU
-       string
        default "armv8"
 
 config SYS_BOARD
-       string
        default "ls2085a"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "fsl-lsch3"
 
 config SYS_CONFIG_NAME
-       string
        default "ls2085a_simu"
 
 endif
index 9b1fa428651fc4c144a937a3a538964b20d6f8b4..9b416afbdc74ac81796ac10ba361e67c3920d48d 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5208EVBE
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "m5208evbe"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5208EVBE"
 
 endif
index 54a86e4f4a07716d75080d4c77779ad825268747..c4278926a4bac40c5585b974356c2fa271b9ca8d 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M52277EVB
 
 config SYS_CPU
-       string
        default "mcf5227x"
 
 config SYS_BOARD
-       string
        default "m52277evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M52277EVB"
 
 endif
index f996ca2bd1442c7ceec51da005fdbb1763aa60b2..fc8341999aa0129c7d10ef1e8252c86d725bcabb 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5235EVB
 
 config SYS_CPU
-       string
        default "mcf523x"
 
 config SYS_BOARD
-       string
        default "m5235evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5235EVB"
 
 endif
index 87643e4457c031a8aa242f592e59a0bbc23eb446..0f624776b5525cdd187033cc4743a05dd82151d8 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5249EVB
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "m5249evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5249EVB"
 
 endif
index 76197a74a516eea424cde181c4fef909ad19d5c8..303d29bc23a2fe7955cb0b4f061060cfade2f11c 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5253DEMO
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "m5253demo"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5253DEMO"
 
 endif
index bdc6c27e9dddd70c47c3585ee773d6bc9783d0d3..d97b87c4caec2d6a256866eefc7367cbd0a8aa10 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5253EVBE
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "m5253evbe"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5253EVBE"
 
 endif
index b69c37af2a10c1f7b0c11b5cb2f9c3cb11990234..aee0b239b3b1850baee32f52b7c5200e4ff91770 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5272C3
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "m5272c3"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5272C3"
 
 endif
index 85514b777553566e385a8b65e5f85c163e0feab2..5a6de9c1c9e4585fe5ac090e1001803da57bcbbd 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5275EVB
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "m5275evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5275EVB"
 
 endif
index 33e98a7c524bb717b276b307c6bee3254fc88231..2ffdd528f63493f8bc6d4f983b7910815820afbf 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5282EVB
 
 config SYS_CPU
-       string
        default "mcf52x2"
 
 config SYS_BOARD
-       string
        default "m5282evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5282EVB"
 
 endif
index 99ffd7db6482906b77e0eab2a3ab3b2a0286a228..8ab89e52b2e9aeb61eeed777fb83bc12004ceabc 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M53017EVB
 
 config SYS_CPU
-       string
        default "mcf532x"
 
 config SYS_BOARD
-       string
        default "m53017evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M53017EVB"
 
 endif
index c9a621ad486920a116a2894e0bc61bfbd5855a2b..930fbba246d323e2e3d8ff06339fe85f76202a5c 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5329EVB
 
 config SYS_CPU
-       string
        default "mcf532x"
 
 config SYS_BOARD
-       string
        default "m5329evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5329EVB"
 
 endif
index 583a4b5c77d5630e17b5cb0d219d005931c5d4f6..67d049d79eb5a39b378a0fdae2b8a151befbf712 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5373EVB
 
 config SYS_CPU
-       string
        default "mcf532x"
 
 config SYS_BOARD
-       string
        default "m5373evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5373EVB"
 
 endif
index 7d73b945f2a4fb647a5273447b0e3c7308f91a3c..4199a3f549a5681749a8bf99f7d244d0fa642745 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M54418TWR
 
 config SYS_CPU
-       string
        default "mcf5445x"
 
 config SYS_BOARD
-       string
        default "m54418twr"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M54418TWR"
 
 endif
index 814db72d987796e6d7378cd391cc5789ec550184..f460e51c9bac57fda2fb1e6a3765597626ada8d5 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M54451EVB
 
 config SYS_CPU
-       string
        default "mcf5445x"
 
 config SYS_BOARD
-       string
        default "m54451evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M54451EVB"
 
 endif
index acdd13f096c704f78890a8eb23b0fa507896a35a..096bce83121aaba70304f7a3e801b52bf53ca8ef 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M54455EVB
 
 config SYS_CPU
-       string
        default "mcf5445x"
 
 config SYS_BOARD
-       string
        default "m54455evb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M54455EVB"
 
 endif
index d21072e2efab709c62c940092ce7ca25d23d04f7..8cfe20ab8dd4a0679e979df750255eca03eb338f 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5475EVB
 
 config SYS_CPU
-       string
        default "mcf547x_8x"
 
 config SYS_BOARD
-       string
        default "m547xevb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5475EVB"
 
 endif
index 2afe11c41a88580ebd644a6abe92caeac064e2da..da924e3ce98fe159e98472348f1a0bbf55f08ce3 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_M5485EVB
 
 config SYS_CPU
-       string
        default "mcf547x_8x"
 
 config SYS_BOARD
-       string
        default "m548xevb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "M5485EVB"
 
 endif
index 9989ccbbc57ad3203b7cb0ca920a52475e062535..f125f9e596249196aae1ef8575d4bcebbfe29e0a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC5121ADS
 
 config SYS_BOARD
-       string
        default "mpc5121ads"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "mpc5121ads"
 
 endif
index 0ea712ccf18a2bd9fc7d533d3d7a828c63268554..3e7f6e8d2edb72d142017564ebce2a486ef6a8dc 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC7448HPC2
 
 config SYS_BOARD
-       string
        default "mpc7448hpc2"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "mpc7448hpc2"
 
 endif
index 7c5a64643439573df6668623a5cfa44c8c685460..78963b9c32675f5f62f891f02c74588dc5b7fad0 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8266ADS
 
 config SYS_BOARD
-       string
        default "mpc8266ads"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8266ADS"
 
 endif
index b47765a0a2ea240f89ea4410a1b80f765318b85d..48d25e5a26ed25eabd1beb6f0aa47ed04a6eee7d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8308RDB
 
 config SYS_BOARD
-       string
        default "mpc8308rdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8308RDB"
 
 endif
index 078f437c5af6e7dead652f8725101d23a4f71132..145608feab2eb72fcd42b33dbf31783084d1d02e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8313ERDB
 
 config SYS_BOARD
-       string
        default "mpc8313erdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8313ERDB"
 
 endif
index 46833ca0dfe572b52059c5e56bb3929c965ededf..f76b0d1d6dbc67b4eab5eea1ceba28aae740abd8 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8315ERDB
 
 config SYS_BOARD
-       string
        default "mpc8315erdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8315ERDB"
 
 endif
index a1c0a610a4d6bd10664cce18828b69ce1e0a6f9b..acf812219662eed2333aa876494fb580de6bda9b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8323ERDB
 
 config SYS_BOARD
-       string
        default "mpc8323erdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8323ERDB"
 
 endif
index 83af2c2782f3509f5a94d9135dd30bad640ea10d..e4cfa15a6f231fc480c703fa2bfcd768e38411b7 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC832XEMDS
 
 config SYS_BOARD
-       string
        default "mpc832xemds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC832XEMDS"
 
 endif
index 8f549dc73a7589a6797dfad47fb61f18410e1b78..51f0b34f3984a4cd5f5ba857d7c8d5ce05d75f98 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8349EMDS
 
 config SYS_BOARD
-       string
        default "mpc8349emds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8349EMDS"
 
 endif
index af3fedd97b8aa3d27d3cdaf9e541fb6d3b6eab3f..ce3fffda7d824be18f00ba1ef902fb2a0bfef8b2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8349ITX
 
 config SYS_BOARD
-       string
        default "mpc8349itx"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8349ITX"
 
 endif
index d6e776636261e62b761a4bbf1cac87ebcc0fc242..3f4f95cac2871f26f9f213929bb5ad23ec31958f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8360EMDS
 
 config SYS_BOARD
-       string
        default "mpc8360emds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8360EMDS"
 
 endif
index ac96163aa47e2577be512f4a18361044684bcd4f..5ff9dff5870791aa085426f3f1ebc18c88d22bf0 100644 (file)
 #include <i2c.h>
 #include <miiphy.h>
 #include <phy.h>
+#include <fsl_mdio.h>
 #if defined(CONFIG_PCI)
 #include <pci.h>
 #endif
 #include <spd_sdram.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
-#include <asm/fsl_enet.h>
 #include <asm/mmu.h>
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
index bfb3b1f44ddaa36aee4763f0bcdd6528663d87c0..5c9be7c9c1b315b8ba92df1cda5fca75afc9e2e4 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8360ERDK
 
 config SYS_BOARD
-       string
        default "mpc8360erdk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8360ERDK"
 
 endif
index b0357cb5fbb1c3d942e80645e061f6d8e8100d46..20d29db0991632137a6925c530218583c6ee5515 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC837XEMDS
 
 config SYS_BOARD
-       string
        default "mpc837xemds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC837XEMDS"
 
 endif
index 0a3c9720d6cd4785741225f24a37d66f773bcdc8..c749e5553a785c115a4571752048ca645bb22057 100644 (file)
@@ -10,7 +10,6 @@
 #include <i2c.h>
 #include <asm/io.h>
 #include <asm/fsl_mpc83xx_serdes.h>
-#include <asm/fsl_enet.h>
 #include <spd_sdram.h>
 #include <tsec.h>
 #include <libfdt.h>
index f8e33e6d27fd21c43a2b440cb9682e4e1873677f..03415f9fc941cd3864fb7d093b15227306a1bd3a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC837XERDB
 
 config SYS_BOARD
-       string
        default "mpc837xerdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC837XERDB"
 
 endif
index c7c818cde0bfa84f71b1eb4ea4a3374b88a7fb8d..1a6a9d4598e3aa7852de1a2d101bd31077ce2d76 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8536DS
 
 config SYS_BOARD
-       string
        default "mpc8536ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8536DS"
 
 endif
index 2cf252c44c2619956993663c22e28c7e18bc33f7..35a8545547676eb2f685c4ff6baf6ce4a4b252da 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8540ADS
 
 config SYS_BOARD
-       string
        default "mpc8540ads"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8540ADS"
 
 endif
index 2beefc2dc154be1e2d3678b49da86a1adeecb670..034eab25443da8b050c93e68231a63a2a4fb8586 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8541CDS
 
 config SYS_BOARD
-       string
        default "mpc8541cds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8541CDS"
 
 endif
index d55b6802b88f78ec4fc74b139c06829be5ff6411..c3e25b89a028e7074cdd7fe3ca45a8204520ec32 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8544DS
 
 config SYS_BOARD
-       string
        default "mpc8544ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8544DS"
 
 endif
index 69d717ef921d23c3c1735d9487c7a37e1f1952d2..09f3b0b7663d672e952bda4f9520ee3c19b2bca9 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8548CDS
 
 config SYS_BOARD
-       string
        default "mpc8548cds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8548CDS"
 
 endif
index 585830884b7663ffeb333fea84748ed358d11883..04bd572212a0622960a4dffa4e303e2569e899ee 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8555CDS
 
 config SYS_BOARD
-       string
        default "mpc8555cds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8555CDS"
 
 endif
index 55cdb62137d7b2a6b98dd391f8492e294e7b1df3..828c068e9ee6bb746a36e444a0ce9a093b6ecaf9 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8560ADS
 
 config SYS_BOARD
-       string
        default "mpc8560ads"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8560ADS"
 
 endif
index b02946b151ebb35090224beaf54e562b389a6869..4e178c503968733da2791cfb1802ed4b8181ef36 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8568MDS
 
 config SYS_BOARD
-       string
        default "mpc8568mds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8568MDS"
 
 endif
index f13a07eb03916ec3be951c3a306d4d4c9b625186..48718575ff43852223e911f20c23b4c3e999cfdc 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8569MDS
 
 config SYS_BOARD
-       string
        default "mpc8569mds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8569MDS"
 
 endif
index 3794f036a292a95a9e33841157b4e3bebb123df3..38132cf3feba85e9b6e0d10a47b051d34dd701c0 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8572DS
 
 config SYS_BOARD
-       string
        default "mpc8572ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8572DS"
 
 endif
index 463a433aefaeb57d79ca24ffabc69c375025fa18..8f713beaa842e44c1c45dbbf33db97eb4b00fca8 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8610HPCD
 
 config SYS_BOARD
-       string
        default "mpc8610hpcd"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8610HPCD"
 
 endif
index 9fc42411495a8473388c92d4602e3b0802cfcd2e..ae45d63337487b85d4e0fe2105846e190d2e13f2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPC8641HPCN
 
 config SYS_BOARD
-       string
        default "mpc8641hpcn"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "MPC8641HPCN"
 
 endif
index ee7911ca3518a05e11fc8929f8864faea570851d..1bbbe2d5f51232df71d8145b264e02af1624b802 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX23EVK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "mx23evk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "mx23evk"
 
 endif
index 67cb5ecb144dfe90f0bb49e7a3319554e7b570bc..a693239701b9662a534647513ce53a2688e41ac6 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX25PDK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "mx25pdk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx25"
 
 config SYS_CONFIG_NAME
-       string
        default "mx25pdk"
 
 endif
index 2fe6f327ca1a6c6969e2badbb8839e38ad84b72e..cc654bcfa5aeab74901820235ba371e50a1445e6 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX28EVK
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "mx28evk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "mx28evk"
 
 endif
index 96116dd2544f3b808373def90cef8d7c58a547de..b4ea64b4051b3f3f7867dbf8612fd403d97faee0 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX31ADS
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "mx31ads"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx31"
 
 config SYS_CONFIG_NAME
-       string
        default "mx31ads"
 
 endif
index 6ac6a59e6d1f8a8f1024c00e8ebbec31e31182a4..68c3880638c5ecd0bcca8c25c9064b0305977cbc 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX31PDK
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "mx31pdk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx31"
 
 config SYS_CONFIG_NAME
-       string
        default "mx31pdk"
 
 endif
index 5555b0ba378b03f4ef8aaf35d6b9b49e7d2b6fda..ca5b40f07d14a98389acb6dfaf27122c9234dc34 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX35PDK
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "mx35pdk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx35"
 
 config SYS_CONFIG_NAME
-       string
        default "mx35pdk"
 
 endif
index a6dbbdd2ae10dcfba6f3b0fb519de9f7308b522e..07861a97063f1ffd700652d2d0f3afec3b580bf3 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX51EVK
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx51evk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "mx51evk"
 
 endif
index eaaa1b2a0c5d204e91eb0f17b98095d1d7be515d..566df8598569109c4a58b072bad8ae9608d9b67e 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX53ARD
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx53ard"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "mx53ard"
 
 endif
index dda1ada32b98037a37776c31ed85f1ac9d3d8797..d064b104dc16e8bb55417f9a0bfeb4ca036e2987 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX53EVK
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx53evk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "mx53evk"
 
 endif
index 8b285d28a8fdd8b6e7704cc048c3f2bb2a34a5ce..bc44e59bfcc3ded0ee1ccf183791f922c89fca5f 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX53LOCO
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx53loco"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "mx53loco"
 
 endif
index 1f7e42f9f3ff27b3277c6ac5729815134bb1d346..62c37d4e0ce62963000c179ee64998a6d53372e0 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX53SMD
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx53smd"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "mx53smd"
 
 endif
index 2c42e9aeab60fa792d3f3d02859b57a41b47e1b8..f7f18db9fca815b9c5ce8f22c2ca7b664e3dde57 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX6QARM2
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx6qarm2"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "mx6qarm2"
 
 endif
index 21fb4fc4bb0c0315041dce8faf0c0e3805449482..d0cf355bc117a3a9c3e02277c68e89c332b89457 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX6QSABREAUTO
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx6qsabreauto"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "mx6qsabreauto"
 
 endif
index 65d67368a0c3a000dbb584d0e1e0f4d7d340bdd0..15b65c09f16e22d4e95d5e8110a7daa03cd0ace4 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX6SABRESD
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx6sabresd"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "mx6sabresd"
 
 endif
index 23c31545e0dc4bd3d9f0c6e82ee69e512f27cdd7..558aeab0e3d4e6c617528007c85d5184405d4613 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX6SLEVK
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx6slevk"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "mx6slevk"
 
 endif
index ee8f4a63ef9c6595e672a5adbbd5e42180fca669..2a86b68afc825f49eaf84cd934514b9c46e970f6 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX6SXSABRESD
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx6sxsabresd"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "mx6sxsabresd"
 
 endif
index 2abe1c09b24c15315dc3fd097a768bafe8ec7622..b0a7a8d9df1a273e7789e692d9892f03e8eef20f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P1010RDB
 
 config SYS_BOARD
-       string
        default "p1010rdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P1010RDB"
 
 endif
index 39e37bdda8fbd2f090742f9f3347f4ef414dbdfe..f1792de8e39e54361c6649062c9ff7b7a7077490 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P1022DS
 
 config SYS_BOARD
-       string
        default "p1022ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P1022DS"
 
 endif
index 95d329562a0b376c2a0a6bfa7ec1349f3f997c25..1e4cd10c6c7443804937492a3c68ed411c9583f1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P1023RDB
 
 config SYS_BOARD
-       string
        default "p1023rdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P1023RDB"
 
 endif
index 6d718b94f879d21330edd7fb065bb5d7bdc9ad9b..d7ad35d4030d7b70243c1281b45074bcf27a8ee0 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P1_P2_RDB
 
 config SYS_BOARD
-       string
        default "p1_p2_rdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P1_P2_RDB"
 
 endif
index 01b89fa04826943644524c20fdd8dcdee6311944..d3352d2856f7b9bf7ed5ad2eac86b63cbee0329e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P1_P2_RDB_PC
 
 config SYS_BOARD
-       string
        default "p1_p2_rdb_pc"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "p1_p2_rdb_pc"
 
 endif
index 5fb47053c3b7f870a6c0aaf630d343818315d791..8f9a8d44150ba3a26131a759956ee93e931b17c1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P1_TWR
 
 config SYS_BOARD
-       string
        default "p1_twr"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "p1_twr"
 
 endif
index d4d7e13d59f0a12e66c7e44c02a285efdc733338..8ce5cf130086e818eb4e5eaa43ddb3dba699d956 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P2020COME
 
 config SYS_BOARD
-       string
        default "p2020come"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P2020COME"
 
 endif
index 29031d0d99efc3e8fba71e086def3847853f4315..e527ec9722ce7470b947d9e261028c0da689be2e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P2020DS
 
 config SYS_BOARD
-       string
        default "p2020ds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P2020DS"
 
 endif
index b086b1b922bf9549a0dc949241dffe4998a94b86..78e11214a5b815d15f7e294129cdf000cf879f1b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P2041RDB
 
 config SYS_BOARD
-       string
        default "p2041rdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "P2041RDB"
 
 endif
index 314f6a1576b6f1a74f19b39eb95298ba9864a056..236cd17f99ea37c0fbdfdf15dd811e0629cc256f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_QEMU_PPCE500
 
 config SYS_BOARD
-       string
        default "qemu-ppce500"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "qemu-ppce500"
 
 endif
index c1c96f03a1fce687fcd6e2ba22b9a153b43b5290..1bb168401199841cb9c6fb0e1fb65655eba42ac7 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_T1040QDS
 
 config SYS_BOARD
-       string
        default "t1040qds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "T1040QDS"
 
 endif
index d0fd3de0c4cd8de2a863442ba6cc0f792e37014f..f28728d33d8456a86860449fe9af69b668fda868 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_T104XRDB
 
 config SYS_BOARD
-       string
        default "t104xrdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "T104xRDB"
 
 endif
index 3d0c6ab88b791b5bc4167081678664c0e1b0cf6a..4e329dddf30d42b89b639f1e2c5a1c2aaac5fbf3 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_T208XQDS
 
 config SYS_BOARD
-       string
        default "t208xqds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "T208xQDS"
 
 endif
index f8d2c3cf1d1d8223a30c3ad70eff938d8c6ff26a..845af3dd2fee9f1dc3412ec37bc11f159ed652c3 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_T208XRDB
 
 config SYS_BOARD
-       string
        default "t208xrdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "T208xRDB"
 
 endif
index f4b0ba232237af46b32b1e012e06bb0caaff8db1..ab34b9ef4c9e520b58196253647109415a51e688 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_T4240EMU
 
 config SYS_BOARD
-       string
        default "t4qds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "T4240EMU"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_T4240QDS
 
 config SYS_BOARD
-       string
        default "t4qds"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "T4240QDS"
 
 endif
index 07e3c0df0e790e43a0b37cd300be3d6922b66475..d93e4532ac4a4db8bb6619c140dce231d4f81453 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_T4240RDB
 
 config SYS_BOARD
-       string
        default "t4rdb"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_CONFIG_NAME
-       string
        default "T4240RDB"
 
 endif
index 56bc52ad5c7cacdfcc9860b2f2986230c87ab36d..684ef279c3b3a22ab1077609ee83003749c68273 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_VF610TWR
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "vf610twr"
 
 config SYS_VENDOR
-       string
        default "freescale"
 
 config SYS_SOC
-       string
        default "vf610"
 
 config SYS_CONFIG_NAME
-       string
        default "vf610twr"
 
 endif
index dc3deca530d268be4fa0c42db5213e577efea1b4..6b6c328f6729703334fba120bf7859fbb7195442 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_VOVPN_GW
 
 config SYS_BOARD
-       string
        default "vovpn-gw"
 
 config SYS_VENDOR
-       string
        default "funkwerk"
 
 config SYS_CONFIG_NAME
-       string
        default "VoVPN-GW"
 
 endif
index eae48867468d9afcdf81a153a32388f1301be9c4..031fae991d727ea0a4c03a45c44c6be02d917d80 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_G2000
 
 config SYS_BOARD
-       string
        default "g2000"
 
 config SYS_CONFIG_NAME
-       string
        default "G2000"
 
 endif
index d5a2eb4a17f26f96a987ca4357503ce3106cc25c..8da050404cfa58ea528bc2e811525d9d6c7fdabb 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_GR_CPCI_AX2000
 
 config SYS_CPU
-       string
        default "leon3"
 
 config SYS_BOARD
-       string
        default "gr_cpci_ax2000"
 
 config SYS_VENDOR
-       string
        default "gaisler"
 
 config SYS_CONFIG_NAME
-       string
        default "gr_cpci_ax2000"
 
 endif
index e742ea87068ed031aefafcab31941006eda842d5..00b2097cf436fce073f303e122a93256bd2d62da 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_GR_EP2S60
 
 config SYS_CPU
-       string
        default "leon3"
 
 config SYS_BOARD
-       string
        default "gr_ep2s60"
 
 config SYS_VENDOR
-       string
        default "gaisler"
 
 config SYS_CONFIG_NAME
-       string
        default "gr_ep2s60"
 
 endif
index 6d9f107e4e005967778690afc0240cd6dfa54a77..765e028b51eb04bfd35f8470517196b6166281d4 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_GR_XC3S_1500
 
 config SYS_CPU
-       string
        default "leon3"
 
 config SYS_BOARD
-       string
        default "gr_xc3s_1500"
 
 config SYS_VENDOR
-       string
        default "gaisler"
 
 config SYS_CONFIG_NAME
-       string
        default "gr_xc3s_1500"
 
 endif
index 10f51e1cf8071e8447cb0ce4de9d15924502791e..751fa03be4dd704372125ce5be0b41350ca66f86 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_GRSIM
 
 config SYS_CPU
-       string
        default "leon3"
 
 config SYS_BOARD
-       string
        default "grsim"
 
 config SYS_VENDOR
-       string
        default "gaisler"
 
 config SYS_CONFIG_NAME
-       string
        default "grsim"
 
 endif
index 8dd2d27abd25b5ff08ad9b605f31aba9b22bbc06..0907f3af891ce527a5db41ec732d44789073f4f9 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_GRSIM_LEON2
 
 config SYS_CPU
-       string
        default "leon2"
 
 config SYS_BOARD
-       string
        default "grsim_leon2"
 
 config SYS_VENDOR
-       string
        default "gaisler"
 
 config SYS_CONFIG_NAME
-       string
        default "grsim_leon2"
 
 endif
index 04f079cf2b0ebaf843d6208c3c88ab05b15e68fb..31035811e938aea9b1709ee15f1b99aa8f399956 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_GALAXY5200
 
 config SYS_BOARD
-       string
        default "galaxy5200"
 
 config SYS_CONFIG_NAME
-       string
        default "galaxy5200"
 
 endif
index a9ff70a7617e3fe46501b975fd9ed0b9eb5e8719..82909a80a316e59bd9b7cb55dec047a86dfd2cb3 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_GW_VENTANA
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "gw_ventana"
 
 config SYS_VENDOR
-       string
        default "gateworks"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "gw_ventana"
 
 endif
index 8a5d3f51ae73fe0cb4732a7a61324a195b5b2950..20cb80fc2e2587906a530de4e019c76372d408e1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DLVISION_10G
 
 config SYS_BOARD
-       string
        default "405ep"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "dlvision-10g"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_IO
 
 config SYS_BOARD
-       string
        default "405ep"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "io"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_IOCON
 
 config SYS_BOARD
-       string
        default "405ep"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "iocon"
 
 endif
@@ -49,15 +40,12 @@ endif
 if TARGET_NEO
 
 config SYS_BOARD
-       string
        default "405ep"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "neo"
 
 endif
index b4fb9753fdd4c5f6c14a104f7f0aefab71f1a4b7..52a8d89011db66b9dc5a263d57f1a7c89efc7885 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_IO64
 
 config SYS_BOARD
-       string
        default "405ex"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "io64"
 
 endif
index af8334e96cc81a6887ad5d09477a2b10e5827789..8db4fbeee5fc4abac0abb58e9252ea93d7b6f49f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DLVISION
 
 config SYS_BOARD
-       string
        default "dlvision"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "dlvision"
 
 endif
index 5a05c1c7fee61bd2a4c8f8f0ebbbc11a05562178..1f21c89175bc4efd3dcbf7a0de293d12f6a7ee96 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_GDPPC440ETX
 
 config SYS_BOARD
-       string
        default "gdppc440etx"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "gdppc440etx"
 
 endif
index 7be439c6f2f70414c93af2732b0a0719198fa60a..479bb1231c13691e86986b8a721a9b0297308678 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_INTIP
 
 config SYS_BOARD
-       string
        default "intip"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "intip"
 
 endif
index 277ed7d19389e94c21221083d81064ed1dedf44e..8514d086b97a59a18f62348e018e01ac05b446a4 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CONTROLCENTERD
 
 config SYS_BOARD
-       string
        default "p1022"
 
 config SYS_VENDOR
-       string
        default "gdsys"
 
 config SYS_CONFIG_NAME
-       string
        default "controlcenterd"
 
 endif
index adfddebff15d6a7a7d9a2e6578da796761fc8ff9..87d15a59d49fdf4528967494fe2c8396aeba36b4 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX51_EFIKAMX
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "mx51_efikamx"
 
 config SYS_VENDOR
-       string
        default "genesi"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "mx51_efikamx"
 
 endif
index f662798fbf49e0ce913cc6f3b7c00b879d4c022a..2f8558aaf3ec5ed62a2bdf45d1087803937fff0b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DUOVERO
 
 config SYS_BOARD
-       string
        default "duovero"
 
 config SYS_VENDOR
-       string
        default "gumstix"
 
 config SYS_CONFIG_NAME
-       string
        default "duovero"
 
 endif
index 290b428b68d3a8eea37739fabacb856969502e97..0b739551671cf10cba3a8e065e4f9d92a2b1c976 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_PEPPER
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "pepper"
 
 config SYS_VENDOR
-       string
        default "gumstix"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "pepper"
 
 endif
index ce8d1b0feef41eec5c0dd693d240d2b91d3a0dfc..1d6aa807645be8ce8753dfdc56b2d83c939074cd 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_GW8260
 
 config SYS_BOARD
-       string
        default "gw8260"
 
 config SYS_CONFIG_NAME
-       string
        default "gw8260"
 
 endif
index f36b4d9de0712e6a08785a0e54c44af8b596f771..75956be823d7460e3fced3e0cded395d360430f1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_H2200
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "h2200"
 
 config SYS_CONFIG_NAME
-       string
        default "h2200"
 
 endif
index 549c18b1b7a694698c265befc36cfc91a167780c..40e56cb11f5227d921e2eb74b4a3efca1d4f7431 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TT01
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "tt01"
 
 config SYS_VENDOR
-       string
        default "hale"
 
 config SYS_SOC
-       string
        default "mx31"
 
 config SYS_CONFIG_NAME
-       string
        default "tt01"
 
 endif
index 9d8065029d902ef0f470a78f27cb0594b7ec0df7..deb37fdfd4d779b236860f088eb012ef7c66b477 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_HERMES
 
 config SYS_BOARD
-       string
        default "hermes"
 
 config SYS_CONFIG_NAME
-       string
        default "hermes"
 
 endif
index 343ff4d0f080e5a93cea8d4c6de70cb03c622848..25ba548dab677e7d7f63259df6cb6018d27d429a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MCX
 
 config SYS_BOARD
-       string
        default "mcx"
 
 config SYS_VENDOR
-       string
        default "htkw"
 
 config SYS_CONFIG_NAME
-       string
        default "mcx"
 
 endif
index 106a83760438f0fa7f7dd46dda08636644419ec2..fa162ebc96b63c53496eaf534140c206e763ea1b 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_HYMOD
 
 config SYS_BOARD
-       string
        default "hymod"
 
 config SYS_CONFIG_NAME
-       string
        default "hymod"
 
 endif
index 5183afff98278850a5e83c37f8d8139c9beca44c..acf5d7c6f94a078455601baea90d1bf73ffdd208 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_IBF_DSP561
 
 config SYS_BOARD
-       string
        default "ibf-dsp561"
 
 config SYS_CONFIG_NAME
-       string
        default "ibf-dsp561"
 
 endif
index d409cd7c67698f810c211ac1a760beeeccbb8319..e5b2153911474d353782c333add32ed1b7e5410e 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_ICECUBE
 
 config SYS_BOARD
-       string
        default "icecube"
 
 config SYS_CONFIG_NAME
-       string
        default "IceCube"
 
 endif
index 6d58984ad7f4d62261284d76909c237e08d2444e..4374fb654f091972e3edab635c02162f52187e8b 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_LP8X4X
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "lp8x4x"
 
 config SYS_VENDOR
-       string
        default "icpdas"
 
 config SYS_CONFIG_NAME
-       string
        default "lp8x4x"
 
 endif
index d2a7a0adaeff0e215b3251fa4f3d45ea0b7cd473..da11d7b450072c898382f7bf1e68f9af0904d189 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_ICU862
 
 config SYS_BOARD
-       string
        default "icu862"
 
 config SYS_CONFIG_NAME
-       string
        default "ICU862"
 
 endif
index a80af9e8aaf6e0e1af83d8c44a8680c542005582..bbab727d782dd29d00c4eddeb17037ef6e91321f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_IDS8247
 
 config SYS_BOARD
-       string
        default "ids8247"
 
 config SYS_VENDOR
-       string
        default "ids"
 
 config SYS_CONFIG_NAME
-       string
        default "IDS8247"
 
 endif
index b38877b0ce7a469ce0c49dcfe4718d9fac29591d..d165b4be7a12a45b85fe612c4f233aaf15d3e17b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_IDS8313
 
 config SYS_BOARD
-       string
        default "ids8313"
 
 config SYS_VENDOR
-       string
        default "ids"
 
 config SYS_CONFIG_NAME
-       string
        default "ids8313"
 
 endif
index 0772d57b757d833e36306ab75687721b9c911a70..97e80d5ddd01e2063411ad8158d716ff82bf35e8 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_AC14XX
 
 config SYS_BOARD
-       string
        default "ac14xx"
 
 config SYS_VENDOR
-       string
        default "ifm"
 
 config SYS_CONFIG_NAME
-       string
        default "ac14xx"
 
 endif
index 53e9c0f849ee42471006f4d8969fbc0bc06cb755..e9d32ddc5422a1d538c4445f3d35ad43efc8fdc9 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_O2D
 
 config SYS_BOARD
-       string
        default "o2dnt2"
 
 config SYS_VENDOR
-       string
        default "ifm"
 
 config SYS_CONFIG_NAME
-       string
        default "o2d"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_O2D300
 
 config SYS_BOARD
-       string
        default "o2dnt2"
 
 config SYS_VENDOR
-       string
        default "ifm"
 
 config SYS_CONFIG_NAME
-       string
        default "o2d300"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_O2DNT2
 
 config SYS_BOARD
-       string
        default "o2dnt2"
 
 config SYS_VENDOR
-       string
        default "ifm"
 
 config SYS_CONFIG_NAME
-       string
        default "o2dnt2"
 
 endif
@@ -49,15 +40,12 @@ endif
 if TARGET_O2I
 
 config SYS_BOARD
-       string
        default "o2dnt2"
 
 config SYS_VENDOR
-       string
        default "ifm"
 
 config SYS_CONFIG_NAME
-       string
        default "o2i"
 
 endif
@@ -65,15 +53,12 @@ endif
 if TARGET_O2MNT
 
 config SYS_BOARD
-       string
        default "o2dnt2"
 
 config SYS_VENDOR
-       string
        default "ifm"
 
 config SYS_CONFIG_NAME
-       string
        default "o2mnt"
 
 endif
@@ -81,15 +66,12 @@ endif
 if TARGET_O3DNT
 
 config SYS_BOARD
-       string
        default "o2dnt2"
 
 config SYS_VENDOR
-       string
        default "ifm"
 
 config SYS_CONFIG_NAME
-       string
        default "o3dnt"
 
 endif
index 8e5cab1a44639fc9ff6313f858393665f5b39d50..401962c4bddf734e9d79d25e4276ab5d0ce98ad2 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_MALTA
 
 config SYS_CPU
-       string
        default "mips32"
 
 config SYS_BOARD
-       string
        default "malta"
 
 config SYS_VENDOR
-       string
        default "imgtec"
 
 config SYS_CONFIG_NAME
-       string
        default "malta"
 
 endif
index c74f4a60cd448e77b62899a5ec75f89d8af20f48..cf3358dfe0ab7091b93f80df79d93a1e94998e1e 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_IMX31_PHYCORE
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "imx31_phycore"
 
 config SYS_SOC
-       string
        default "mx31"
 
 config SYS_CONFIG_NAME
-       string
        default "imx31_phycore"
 
 endif
index da3bcc3a8392c801fc51f3af8c69d0d38f3e1eec..30e3855ae0090bfebf81111985fae892d1afdaef 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_GRASSHOPPER
 
 config SYS_BOARD
-       string
        default "grasshopper"
 
 config SYS_VENDOR
-       string
        default "in-circuit"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "grasshopper"
 
 endif
index 44bca351ffa70912d0c7eadaff5bee0a86d715c9..94a41f01a53caf5eed09c662d5fadc33267f8c11 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_INKA4X0
 
 config SYS_BOARD
-       string
        default "inka4x0"
 
 config SYS_CONFIG_NAME
-       string
        default "inka4x0"
 
 endif
index 0b14bc0e5806c3de74d73bb61bfbb2142b3c06b4..1cf2275d81e68aa3360b66e5f17cfe7a6c89840d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DIGSY_MTC
 
 config SYS_BOARD
-       string
        default "digsy_mtc"
 
 config SYS_VENDOR
-       string
        default "intercontrol"
 
 config SYS_CONFIG_NAME
-       string
        default "digsy_mtc"
 
 endif
index f75c06b7a31c8eab770e38a51cdcec422844bb12..e56b0294163153f70e8fb6c2cb29baa37552cd9b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ICONNECT
 
 config SYS_BOARD
-       string
        default "iconnect"
 
 config SYS_VENDOR
-       string
        default "iomega"
 
 config SYS_CONFIG_NAME
-       string
        default "iconnect"
 
 endif
index 95abe63d80155fe45d522b2d08ecb0fc2960188e..670bf899225885a62a2a6b40d185689d5ffb43ab 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_IP04
 
 config SYS_BOARD
-       string
        default "ip04"
 
 config SYS_CONFIG_NAME
-       string
        default "ip04"
 
 endif
index df1ce8def9149a113e1a14e70b28658ab3ee13dc..955c9dbaa1517d19d71d889dd985cbd5dc758f12 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_IP860
 
 config SYS_BOARD
-       string
        default "ip860"
 
 config SYS_CONFIG_NAME
-       string
        default "IP860"
 
 endif
index a2a1f8635489c1162af062086ad12f86a54e61c3..34e094d79dc93145d891284b00681bce2bd2c723 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_IPEK01
 
 config SYS_BOARD
-       string
        default "ipek01"
 
 config SYS_CONFIG_NAME
-       string
        default "ipek01"
 
 endif
index 1ce42f34d6048720f6924949a86a0778340bcf2d..74594d2b1c029723b3106ffc1ce854b560456a44 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_IPHASE4539
 
 config SYS_BOARD
-       string
        default "iphase4539"
 
 config SYS_CONFIG_NAME
-       string
        default "IPHASE4539"
 
 endif
index cdb67ed175ffb3d063af501227b5504e52900194..4f3aaf481b09fcfe202561b4fc934afbc61703ce 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AM335X_IGEP0033
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "igep0033"
 
 config SYS_VENDOR
-       string
        default "isee"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "am335x_igep0033"
 
 endif
index c9352fdc8899e18f1b6908bffded3cf8af53e135..aa46882b051da2b90374e37f06cb6cafe69b9796 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP3_IGEP00X0
 
 config SYS_BOARD
-       string
        default "igep00x0"
 
 config SYS_VENDOR
-       string
        default "isee"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_igep00x0"
 
 endif
index ab3da79fbf6720e703075c6be62dda1b5a8449ae..6ff302556db4745585dfed668bdef0c6c9095ebd 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_IVML24
 
 config SYS_BOARD
-       string
        default "ivm"
 
 config SYS_CONFIG_NAME
-       string
        default "IVML24"
 
 endif
@@ -13,11 +11,9 @@ endif
 if TARGET_IVMS8
 
 config SYS_BOARD
-       string
        default "ivm"
 
 config SYS_CONFIG_NAME
-       string
        default "IVMS8"
 
 endif
index 345d3b60133c4c177bf8a35a3b44687567607faa..9c11a1365141159551d4d8d3bf24be900ba6477d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_JORNADA
 
 config SYS_CPU
-       string
        default "sa1100"
 
 config SYS_BOARD
-       string
        default "jornada"
 
 config SYS_CONFIG_NAME
-       string
        default "jornada"
 
 endif
index bb265f20798ae10cd06b3d6f09c14a78cf274183..48905fa76f1fc36c9994ee619e393754fbde2b3b 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_JSE
 
 config SYS_BOARD
-       string
        default "jse"
 
 config SYS_CONFIG_NAME
-       string
        default "JSE"
 
 endif
index 36e43b79747a04cd32ef1c2814a4f63558e09baa..d71acbbc4db1ae418dae72fc4b80dbfd3cd77d68 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_JUPITER
 
 config SYS_BOARD
-       string
        default "jupiter"
 
 config SYS_CONFIG_NAME
-       string
        default "jupiter"
 
 endif
index 24071f67e2b865e79ebf236c9d8130c8688f8828..7b3d54866713e13ab960f6446dda3abb1ee6837a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TK71
 
 config SYS_BOARD
-       string
        default "tk71"
 
 config SYS_VENDOR
-       string
        default "karo"
 
 config SYS_CONFIG_NAME
-       string
        default "tk71"
 
 endif
index 095b1a52a72a4958faa7dd44afba7ec8f3c7f676..24edcc43bcd09d68ef0b9bad22b57d280c13f784 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TX25
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "tx25"
 
 config SYS_VENDOR
-       string
        default "karo"
 
 config SYS_SOC
-       string
        default "mx25"
 
 config SYS_CONFIG_NAME
-       string
        default "tx25"
 
 endif
index c29032a50a376365633cd51f358933f987c27471..c9a093ce02298490188b32834919a1826a577d70 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KM82XX
 
 config SYS_BOARD
-       string
        default "km82xx"
 
 config SYS_VENDOR
-       string
        default "keymile"
 
 config SYS_CONFIG_NAME
-       string
        default "km82xx"
 
 endif
index 934c45d1fc728da69d09a201e179bd08febe54e3..d6c594c96ac9e99f27f02957bb3d25199e0776b5 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KM8360
 
 config SYS_BOARD
-       string
        default "km83xx"
 
 config SYS_VENDOR
-       string
        default "keymile"
 
 config SYS_CONFIG_NAME
-       string
        default "km8360"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_SUVD3
 
 config SYS_BOARD
-       string
        default "km83xx"
 
 config SYS_VENDOR
-       string
        default "keymile"
 
 config SYS_CONFIG_NAME
-       string
        default "suvd3"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_TUXX1
 
 config SYS_BOARD
-       string
        default "km83xx"
 
 config SYS_VENDOR
-       string
        default "keymile"
 
 config SYS_CONFIG_NAME
-       string
        default "tuxx1"
 
 endif
index 3e9cddb54b2f90b7b5ffe7539cb3d72d84ab7a14..34767808471d61f34dad5a50b4bfb25166378cc8 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KM_KIRKWOOD
 
 config SYS_BOARD
-       string
        default "km_arm"
 
 config SYS_VENDOR
-       string
        default "keymile"
 
 config SYS_CONFIG_NAME
-       string
        default "km_kirkwood"
 
 endif
index 0236f69f9efb34d085990b8f5a4582de04038cea..7b45a13cfb0223cfad3836c326481935ecf1e43e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KMP204X
 
 config SYS_BOARD
-       string
        default "kmp204x"
 
 config SYS_VENDOR
-       string
        default "keymile"
 
 config SYS_CONFIG_NAME
-       string
        default "kmp204x"
 
 endif
index ab4812f0007aa02f798969feb8728000bdd0b7ad..f163efd9892b5ed46e96eedf350609e612094140 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KZM9G
 
 config SYS_BOARD
-       string
        default "kzm9g"
 
 config SYS_VENDOR
-       string
        default "kmc"
 
 config SYS_CONFIG_NAME
-       string
        default "kzm9g"
 
 endif
index c23061c00ea859a505a0984b09086739f68786c8..f434dea7f3b193c26ba5cf1a7ce78a91dbfad80b 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_KORAT
 
 config SYS_BOARD
-       string
        default "korat"
 
 config SYS_CONFIG_NAME
-       string
        default "korat"
 
 endif
index bac89aa55e5c3a280342e47ab3fee84db121749c..903c3419b7d09b4ac4b8e0e483d3919250d68d4a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KUP4K
 
 config SYS_BOARD
-       string
        default "kup4k"
 
 config SYS_VENDOR
-       string
        default "kup"
 
 config SYS_CONFIG_NAME
-       string
        default "KUP4K"
 
 endif
index e04b919e660cf034bf0e05ffe361b1ce4605b1f1..eeb5d8305acb312f209f74975aadde2ef1e59a34 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KUP4X
 
 config SYS_BOARD
-       string
        default "kup4x"
 
 config SYS_VENDOR
-       string
        default "kup"
 
 config SYS_CONFIG_NAME
-       string
        default "KUP4X"
 
 endif
index 1012d3ddc5a0bd143acba1f19a436f1b08f1e31a..901f6094bb28579c4004bd94177bfbe99154f84a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_AM3517_EVM
 
 config SYS_BOARD
-       string
        default "am3517evm"
 
 config SYS_VENDOR
-       string
        default "logicpd"
 
 config SYS_CONFIG_NAME
-       string
        default "am3517_evm"
 
 endif
index f1072672170dfd0bdc4cd86791baacd70405aedf..842d1baa474b00c02fd7d91919cb06e1926b8f77 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_IMX27LITE
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "imx27lite"
 
 config SYS_VENDOR
-       string
        default "logicpd"
 
 config SYS_SOC
-       string
        default "mx27"
 
 config SYS_CONFIG_NAME
-       string
        default "imx27lite"
 
 endif
@@ -25,23 +20,18 @@ endif
 if TARGET_MAGNESIUM
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "imx27lite"
 
 config SYS_VENDOR
-       string
        default "logicpd"
 
 config SYS_SOC
-       string
        default "mx27"
 
 config SYS_CONFIG_NAME
-       string
        default "magnesium"
 
 endif
index ae3343bb39d823c312ea4b97afc67ed761c6b4a4..a87fa81d82f621d2d69c0e6018ecc5216128807b 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_IMX31_LITEKIT
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "imx31_litekit"
 
 config SYS_VENDOR
-       string
        default "logicpd"
 
 config SYS_SOC
-       string
        default "mx31"
 
 config SYS_CONFIG_NAME
-       string
        default "imx31_litekit"
 
 endif
index adeaf4d033ba24ac27aaa0f350f01369fb3a46d1..03d272a8062913e468d21fe5950f6b27aa088a4c 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP3_LOGIC
 
 config SYS_BOARD
-       string
        default "omap3som"
 
 config SYS_VENDOR
-       string
        default "logicpd"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_logic"
 
 endif
index e9a56230ced5b6afc6073f431721e2c2feb46754..d76cb663f720694db1a187ed33539df62d46cf4f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP3_ZOOM1
 
 config SYS_BOARD
-       string
        default "zoom1"
 
 config SYS_VENDOR
-       string
        default "logicpd"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_zoom1"
 
 endif
index a0c7587ef31d181b8708197cd4c1fe9482510360..e98c7947676dc93852ad57c41a5e20c22f49d5de 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_LWMON
 
 config SYS_BOARD
-       string
        default "lwmon"
 
 config SYS_CONFIG_NAME
-       string
        default "lwmon"
 
 endif
index 79cf08e97f90f5e82096158828a8839d335831f1..90566d825bc8dc60e589a1bab1a9426fd217c4e7 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_LWMON5
 
 config SYS_BOARD
-       string
        default "lwmon5"
 
 config SYS_CONFIG_NAME
-       string
        default "lwmon5"
 
 endif
index 2f576dde929ca26e8fe79b61b11cc36822242fd4..996a87f101e790080386d3a5e065fa6f0cc15b0d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_HMI1001
 
 config SYS_BOARD
-       string
        default "hmi1001"
 
 config SYS_VENDOR
-       string
        default "manroland"
 
 config SYS_CONFIG_NAME
-       string
        default "hmi1001"
 
 endif
index 4be0722b2eea8e6039791719085c30bfab9406e5..a033610cbfbefb00569efcb59ff6af4ebed38ea5 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MUCMC52
 
 config SYS_BOARD
-       string
        default "mucmc52"
 
 config SYS_VENDOR
-       string
        default "manroland"
 
 config SYS_CONFIG_NAME
-       string
        default "mucmc52"
 
 endif
index a41a780435d7516f2d81b99ee44a3293f16705ef..08f681b0a96075e6ed0b9c17664fc7399179aa86 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_UC100
 
 config SYS_BOARD
-       string
        default "uc100"
 
 config SYS_VENDOR
-       string
        default "manroland"
 
 config SYS_CONFIG_NAME
-       string
        default "uc100"
 
 endif
index 07cfcc63a7237afaf1762d271c9eb13daadde1e2..c285b22f1b981ad585899129e0a1c465f8398f9a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_UC101
 
 config SYS_BOARD
-       string
        default "uc101"
 
 config SYS_VENDOR
-       string
        default "manroland"
 
 config SYS_CONFIG_NAME
-       string
        default "uc101"
 
 endif
index 5b292dca4f0c0532a0e7574109c84124546795fc..3857535a25e5b2489f6420626dc62e0d089a947e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MERGERBOX
 
 config SYS_BOARD
-       string
        default "mergerbox"
 
 config SYS_VENDOR
-       string
        default "matrix_vision"
 
 config SYS_CONFIG_NAME
-       string
        default "MERGERBOX"
 
 endif
index ab1fe65014a21f01bbbf98730dd20f5d6326ede5..4a68493fa38e9ebd0452e9d4443683b646f6d7e3 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MVBC_P
 
 config SYS_BOARD
-       string
        default "mvbc_p"
 
 config SYS_VENDOR
-       string
        default "matrix_vision"
 
 config SYS_CONFIG_NAME
-       string
        default "MVBC_P"
 
 endif
index c5998b36b3d11bb2b68ef1f8647356d6526f888e..ea7a6f82c0b77b40866d347727178696b46e0818 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MVBLM7
 
 config SYS_BOARD
-       string
        default "mvblm7"
 
 config SYS_VENDOR
-       string
        default "matrix_vision"
 
 config SYS_CONFIG_NAME
-       string
        default "MVBLM7"
 
 endif
index 69f05661cbdc5595502448db0857ff6d8401d40e..adbc20a934ef174f826d72e3865392b6424b72c2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP3_MVBLX
 
 config SYS_BOARD
-       string
        default "mvblx"
 
 config SYS_VENDOR
-       string
        default "matrix_vision"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_mvblx"
 
 endif
index 1627a3602654d71fecbaf32922e45613a3c766f6..d725c5ac49bce84c8e97ec8ef001d7de379bf89b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MVSMR
 
 config SYS_BOARD
-       string
        default "mvsmr"
 
 config SYS_VENDOR
-       string
        default "matrix_vision"
 
 config SYS_CONFIG_NAME
-       string
        default "MVSMR"
 
 endif
index c4e8cf168c7a039dd0ddb2e85b37158cd0328e66..3b27eeb1de6e7dc06290de6ebdfa4b183e888f7d 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_MCC200
 
 config SYS_BOARD
-       string
        default "mcc200"
 
 config SYS_CONFIG_NAME
-       string
        default "mcc200"
 
 endif
index 76c5f7cc9efc6c511727836267b79bea633b3fc9..75046fe7ab8305a5a30dbcc276e15f9362a634cd 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_VCT
 
 config SYS_CPU
-       string
        default "mips32"
 
 config SYS_BOARD
-       string
        default "vct"
 
 config SYS_VENDOR
-       string
        default "micronas"
 
 config SYS_CONFIG_NAME
-       string
        default "vct"
 
 endif
index 146c3b79a80c84e6b52e33ad6c917f3277691295..18736d7f96f9443e12b83f91aba3da5f520582d9 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_MIMC200
 
 config SYS_BOARD
-       string
        default "mimc200"
 
 config SYS_VENDOR
-       string
        default "mimc"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "mimc200"
 
 endif
index 9795e55b1dad51b830146809cddc42752e1d17dd..1f09ef782e29e98f2807b87297caf3dcb851001c 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_HAMMERHEAD
 
 config SYS_BOARD
-       string
        default "hammerhead"
 
 config SYS_VENDOR
-       string
        default "miromico"
 
 config SYS_SOC
-       string
        default "at32ap700x"
 
 config SYS_CONFIG_NAME
-       string
        default "hammerhead"
 
 endif
index c439b1468c9f40d9db5c48a1b221671d02c19258..3145a061c6fc1e1de5990a226cfadbb81897808f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ICON
 
 config SYS_BOARD
-       string
        default "icon"
 
 config SYS_VENDOR
-       string
        default "mosaixtech"
 
 config SYS_CONFIG_NAME
-       string
        default "icon"
 
 endif
index c8ee0438e7e321f3ea32064a8b8d7a0874155e30..f624f6c95f473120e3fc40b96323ff2d75e7c48a 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_MOTIONPRO
 
 config SYS_BOARD
-       string
        default "motionpro"
 
 config SYS_CONFIG_NAME
-       string
        default "motionpro"
 
 endif
index 6e84bdf3d0c984a7a659706226cb75a3fc233d44..b7e39dafbc6275155f7c1ea5f434e1f704b46809 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_MPC8308_P1M
 
 config SYS_BOARD
-       string
        default "mpc8308_p1m"
 
 config SYS_CONFIG_NAME
-       string
        default "mpc8308_p1m"
 
 endif
index 6705260d3ce5274984214af74b1e6c0b6ef5434d..48ba91a529eb641993c301de31a74547766811f5 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MIP405
 
 config SYS_BOARD
-       string
        default "mip405"
 
 config SYS_VENDOR
-       string
        default "mpl"
 
 config SYS_CONFIG_NAME
-       string
        default "MIP405"
 
 endif
index b902cbd273fb03556eed7c3a1551e20f06ae6e51..b141da3984960c61ad38bc11c111566c41a26275 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PATI
 
 config SYS_BOARD
-       string
        default "pati"
 
 config SYS_VENDOR
-       string
        default "mpl"
 
 config SYS_CONFIG_NAME
-       string
        default "PATI"
 
 endif
index 1e1295b0ceadb9bc5f0e57458998cb7cb533020c..f485367410b16baedb1d64c864b32c1e09595488 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PIP405
 
 config SYS_BOARD
-       string
        default "pip405"
 
 config SYS_VENDOR
-       string
        default "mpl"
 
 config SYS_CONFIG_NAME
-       string
        default "PIP405"
 
 endif
index 91246be71bb60e9cac7fbf26d1d698a99338892e..08b0fa018478788c7c9d58cdf8496fcedf79734d 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_VCMA9
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "vcma9"
 
 config SYS_VENDOR
-       string
        default "mpl"
 
 config SYS_SOC
-       string
        default "s3c24x0"
 
 config SYS_CONFIG_NAME
-       string
        default "VCMA9"
 
 endif
index 93bec5991fafae0a14b2b89cd3897af92aecdd0c..79a60c2f2d965b5d70270b18850943197df2ec1a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MPR2
 
 config SYS_CPU
-       string
        default "sh3"
 
 config SYS_BOARD
-       string
        default "mpr2"
 
 config SYS_CONFIG_NAME
-       string
        default "mpr2"
 
 endif
index 8873062a4de78b5fb7a6652a02b91d330f3dd20d..d935affdd9dd0e73e715c7ab1bf9e764525e00ba 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MS7720SE
 
 config SYS_CPU
-       string
        default "sh3"
 
 config SYS_BOARD
-       string
        default "ms7720se"
 
 config SYS_CONFIG_NAME
-       string
        default "ms7720se"
 
 endif
index c5b5b4f3c4ff7ea9ec1f84eaaab00ff284c286ba..17073e81e911f9dcabf9b2e9a09790e26986df43 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MS7722SE
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "ms7722se"
 
 config SYS_CONFIG_NAME
-       string
        default "ms7722se"
 
 endif
index 0c9d88fd9b2326925ebcaa2cd5ab760e55915119..07aa0247b7ed0f4d758b505f21e75866ba413624 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MS7750SE
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "ms7750se"
 
 config SYS_CONFIG_NAME
-       string
        default "ms7750se"
 
 endif
index 982d32f0839a3ebbc6c318c0d9b2155ea9d58eb5..94a00b3d01c461ff8bc0a4f77d3681dd52f4cf8f 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_MUAS3001
 
 config SYS_BOARD
-       string
        default "muas3001"
 
 config SYS_CONFIG_NAME
-       string
        default "muas3001"
 
 endif
index d242d568eba2895049ec3564bcd7e5f357b27c8a..019aaae3e923508df7392780e7df13bdc949e77a 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_MUNICES
 
 config SYS_BOARD
-       string
        default "munices"
 
 config SYS_CONFIG_NAME
-       string
        default "munices"
 
 endif
index ea33d16298c36e63e5b0ee9e269f962934628dd9..26b680f299c6b5faa48c29e72d26d04b9d877a6f 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_MUSENKI
 
 config SYS_BOARD
-       string
        default "musenki"
 
 config SYS_CONFIG_NAME
-       string
        default "MUSENKI"
 
 endif
index a70bcbe099329f7d621d91efc14f9bc3be321eb4..cee206b8c48740bd71256f5717f4ac6d2153bb44 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_MVBLUE
 
 config SYS_BOARD
-       string
        default "mvblue"
 
 config SYS_CONFIG_NAME
-       string
        default "MVBLUE"
 
 endif
index d177b705baf06cab9d6f77562884d0ae165b6354..3e740e5dfadf234df81a2f231352445695d85022 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_NETVIA
 
 config SYS_BOARD
-       string
        default "netvia"
 
 config SYS_CONFIG_NAME
-       string
        default "NETVIA"
 
 endif
index faa90d253390089e7332893097f085a9563c0d1f..ec6a571a2263c6a86ddfe47ac3d96b4b8a4050b2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_NOKIA_RX51
 
 config SYS_BOARD
-       string
        default "rx51"
 
 config SYS_VENDOR
-       string
        default "nokia"
 
 config SYS_CONFIG_NAME
-       string
        default "nokia_rx51"
 
 endif
index e487b66f13234a13d980b1895ec0bb39ea7834b7..23f7c945f57f1c9f9f04292de5a3a08e55121720 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_BEAVER
 
 config SYS_BOARD
-       string
        default "beaver"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "beaver"
 
 endif
index 150815f7a603e43f211782340ad1a9aa01bfe0b0..63ace66aa7862576869993f8598d48ab218ba381 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CARDHU
 
 config SYS_BOARD
-       string
        default "cardhu"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "cardhu"
 
 endif
index 9eed19c35306c8f01315a5c9910a201d7efc725a..96eaa01cf87058ecb9b45dd525116b2ede848a58 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DALMORE
 
 config SYS_BOARD
-       string
        default "dalmore"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "dalmore"
 
 endif
index 7d75f2d271230825e11b914df71e42d62c187d83..328c94677da12c762f2aa92cbaab551a8bc0a5fc 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_HARMONY
 
 config SYS_BOARD
-       string
        default "harmony"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "harmony"
 
 endif
index 02b46b7a867d936bc1bbaa8114fa74de1c466cd9..d90a74ea382fb4101e72eebecd01965aee49ab61 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_JETSON_TK1
 
 config SYS_BOARD
-       string
        default "jetson-tk1"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "jetson-tk1"
 
 endif
index 786370226e0fd8ce39117421320a167fc36ae9d1..0924bde480f68ee7356676814eef9ff8ff09d839 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_SEABOARD
 
 config SYS_BOARD
-       string
        default "seaboard"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "seaboard"
 
 endif
index ce2db40f9ebf2351af0975f1036242377327a752..6a243f0aea98cb42b5fd969b16ecd9a361f2aa54 100644 (file)
@@ -22,7 +22,7 @@ void gpio_early_init_uart(void)
 #ifndef CONFIG_SPL_BUILD
        gpio_request(GPIO_PI3, NULL);
 #endif
-       gpio_direction_output(GPIO_PI3, 0);
+       tegra_spl_gpio_direction_output(GPIO_PI3, 0);
 }
 #endif
 
index 993da79d6e5b31481c5f68316b0ee7793d0d9f10..6905f0014ea7caa00fa29c08b66f8e735ffbb765 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_VENICE2
 
 config SYS_BOARD
-       string
        default "venice2"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "venice2"
 
 endif
index 95840a8f061460bacfa393cd69e354401e7f7626..c1ad7b76712cac3e5758d513b89416cecd61891b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_VENTANA
 
 config SYS_BOARD
-       string
        default "ventana"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "ventana"
 
 endif
index 113e2ef70e4d65ecf4d187ce740ea800d36c97bc..5febc07777fc3892a927b7d782ec8c16bcbcaec2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_WHISTLER
 
 config SYS_BOARD
-       string
        default "whistler"
 
 config SYS_VENDOR
-       string
        default "nvidia"
 
 config SYS_CONFIG_NAME
-       string
        default "whistler"
 
 endif
index 07b328487dacea51f9223809976035f896a5a10c..fb09309285225ecbac1fc055cf5e7b12de07b8d1 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_MX23_OLINUXINO
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "mx23_olinuxino"
 
 config SYS_VENDOR
-       string
        default "olimex"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "mx23_olinuxino"
 
 endif
index 46e95d89dc1f9bb1d8156a23557bd54d1cf1c7be..1ec48e6b551e5c8b04e5f649a832eccd9bd49b21 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_CALIMAIN
 
 config SYS_BOARD
-       string
        default "calimain"
 
 config SYS_VENDOR
-       string
        default "omicron"
 
 config SYS_CONFIG_NAME
-       string
        default "calimain"
 
 endif
index 71a8246c0786feab09cf474ed0309a3937bb1627..cd2a94f025e7178675d95a36e24aa8e597271bc5 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OPENRISC_GENERIC
 
 config SYS_BOARD
-       string
        default "openrisc-generic"
 
 config SYS_VENDOR
-       string
        default "openrisc"
 
 config SYS_CONFIG_NAME
-       string
        default "openrisc-generic"
 
 endif
index d1ea236a8ab590201e6da1800a454dcaefc39b27..74572a62be6763c6c9e287f753e088d52c2f32cd 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_OMAP3_OVERO
 
 config SYS_BOARD
-       string
        default "overo"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_overo"
 
 endif
index bed99b6e8d04615466626e8a7f900adb7929699c..a749c8d2bbc1f2e35253e650ff386f89aa2084c8 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PALMLD
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "palmld"
 
 config SYS_CONFIG_NAME
-       string
        default "palmld"
 
 endif
index 86fb63b5d17950730cc556c24a59b8dad5ef01e1..5207490e88b918786049ae1a1320acc977832b53 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PALMTC
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "palmtc"
 
 config SYS_CONFIG_NAME
-       string
        default "palmtc"
 
 endif
index 4df6c6368a27820a4af32df7218579a2790b2101..1992970aedcf2c3897b96e8d6364594cd731717e 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PALMTREO680
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "palmtreo680"
 
 config SYS_CONFIG_NAME
-       string
        default "palmtreo680"
 
 endif
index 6f410050d24a950b0597d6438f02b5a1b8ae2222..0b33818008260b996fbbc23296619625d52fcf0d 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_OMAP3_PANDORA
 
 config SYS_BOARD
-       string
        default "pandora"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_pandora"
 
 endif
index 0ad3f2364e5d067b39effa19e92c534262a710a5..ef2844a49743e4125b94c1d82f0790361080bee6 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_PB1X00
 
 config SYS_CPU
-       string
        default "mips32"
 
 config SYS_BOARD
-       string
        default "pb1x00"
 
 config SYS_SOC
-       string
        default "au1x00"
 
 config SYS_CONFIG_NAME
-       string
        default "pb1x00"
 
 endif
index 7e69fd34b775edddc7c31389c92999de0e095c9e..5b280f6e77cbbbd8ef709916a081a6545ef45fb7 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_PCS440EP
 
 config SYS_BOARD
-       string
        default "pcs440ep"
 
 config SYS_CONFIG_NAME
-       string
        default "pcs440ep"
 
 endif
index e7a89851199692cdf0ed9ef98db307701341dd43..33173a0a2a3b0df92a28c34cfa12cf6a48c9f482 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_PDM360NG
 
 config SYS_BOARD
-       string
        default "pdm360ng"
 
 config SYS_CONFIG_NAME
-       string
        default "pdm360ng"
 
 endif
index 6eea7e8ea51a002b725c382ab74a15e7e0b908f9..3a3eab8576834d77db01ead4f13fe7d37a3dda0b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PCM030
 
 config SYS_BOARD
-       string
        default "pcm030"
 
 config SYS_VENDOR
-       string
        default "phytec"
 
 config SYS_CONFIG_NAME
-       string
        default "pcm030"
 
 endif
index e7104455ac1685e695fce1657d0c59f710f72d70..f4ed7fdbac4bd846d0e02d4ec3ce280b8c66f619 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_PCM051
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "pcm051"
 
 config SYS_VENDOR
-       string
        default "phytec"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "pcm051"
 
 endif
index d32f857e91b6061ca63341c8ac76c30c1178e76b..3f0a258a2b6db546c2f92ef2c821c1452b55a59c 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_PM520
 
 config SYS_BOARD
-       string
        default "pm520"
 
 config SYS_CONFIG_NAME
-       string
        default "PM520"
 
 endif
index f1de16a68921486cedc8a410ae5f97e929479b46..dd11b7a89c3b4e232421f2e3e00993801277a988 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_PM826
 
 config SYS_BOARD
-       string
        default "pm826"
 
 config SYS_CONFIG_NAME
-       string
        default "PM826"
 
 endif
index 20f6b34f6794fe9863b7f714c742c5586ef28573..e7970a30bb6162ea39f4cdbf44167d22b935484c 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_PM828
 
 config SYS_BOARD
-       string
        default "pm828"
 
 config SYS_CONFIG_NAME
-       string
        default "PM828"
 
 endif
index e4fb601d14d69fe45beb8e29467586e440a76ff5..9d301c2926f56e895f0aef61d6b1bb1159da71cf 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_BG0900
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "bg0900"
 
 config SYS_VENDOR
-       string
        default "ppcag"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "bg0900"
 
 endif
index a28ab98837301607910ae6641b2b636e5c8b33a0..f101940b0b335540ef3a31c93e02fc61ff0ca9ae 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_PPMC7XX
 
 config SYS_BOARD
-       string
        default "ppmc7xx"
 
 config SYS_CONFIG_NAME
-       string
        default "ppmc7xx"
 
 endif
index e2e8793c94c029edebc85a2ee4568cf2fd6e67ec..1a6dcd30a80a47d500dde2c610d4ad2e574c2424 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_PPMC8260
 
 config SYS_BOARD
-       string
        default "ppmc8260"
 
 config SYS_CONFIG_NAME
-       string
        default "ppmc8260"
 
 endif
index 2d80cd4d60126dea8ca80d3f89bfb113424e9caa..fb04648716f83be2d0e23304248000a692d87688 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_PR1
 
 config SYS_BOARD
-       string
        default "pr1"
 
 config SYS_CONFIG_NAME
-       string
        default "pr1"
 
 endif
index 6e99fc7a689c05a20098155c948f1d33e1bdf334..543b4557eefc7f36d5c45d40cc3703f701a636f7 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ALPR
 
 config SYS_BOARD
-       string
        default "alpr"
 
 config SYS_VENDOR
-       string
        default "prodrive"
 
 config SYS_CONFIG_NAME
-       string
        default "alpr"
 
 endif
index 89dcba055643cb788ecf064872c259f892c17c48..28fb8bb3a0788171d3ded3d8e6c6be1bd3b1d144 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P3MX
 
 config SYS_BOARD
-       string
        default "p3mx"
 
 config SYS_VENDOR
-       string
        default "prodrive"
 
 config SYS_CONFIG_NAME
-       string
        default "p3mx"
 
 endif
index a0eabe1c8d39774ad2070944ea6dbf921c3554b0..cf53aac57bec1642059cae4a8f596f7feb57ad6a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_P3P440
 
 config SYS_BOARD
-       string
        default "p3p440"
 
 config SYS_VENDOR
-       string
        default "prodrive"
 
 config SYS_CONFIG_NAME
-       string
        default "p3p440"
 
 endif
index e231f2806ff1df94c189213c0ee87efda76a4874..e8b1d47fcf1b2144c4f17552dcde0b0986ba1c0a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PXA255_IDP
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "pxa255_idp"
 
 config SYS_CONFIG_NAME
-       string
        default "pxa255_idp"
 
 endif
index 0ca816d07d96b621777899c8228ee08970fb31d9..e4d9663c2de62108fe95f9162d64043b8aae1a8b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_QEMU_MIPS
 
 config SYS_CPU
-       string
        default "mips32"
 
 config SYS_BOARD
-       string
        default "qemu-mips"
 
 config SYS_CONFIG_NAME
-       string
        default "qemu-mips"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_QEMU_MIPS64
 
 config SYS_CPU
-       string
        default "mips64"
 
 config SYS_BOARD
-       string
        default "qemu-mips"
 
 config SYS_CONFIG_NAME
-       string
        default "qemu-mips64"
 
 endif
index ea4614fbbfc4c920bb8bf36a3e9859d68b31b743..fe8484faa9938703811a1684752650f7246bf943 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_R360MPI
 
 config SYS_BOARD
-       string
        default "r360mpi"
 
 config SYS_CONFIG_NAME
-       string
        default "R360MPI"
 
 endif
index c0c3a93b0219b972286f5e6e0f14d916d6306b29..129aac8b6d469cebc1e8071311cccc16a31c65ee 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_IB62X0
 
 config SYS_BOARD
-       string
        default "ib62x0"
 
 config SYS_VENDOR
-       string
        default "raidsonic"
 
 config SYS_CONFIG_NAME
-       string
        default "ib62x0"
 
 endif
index 6e99c916afe3a6b128ddf3cd474fbedee7eee165..1a767b287109e266cef4204697de7abcb01cfd05 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_RPI_B
 
 config SYS_CPU
-       string
        default "arm1176"
 
 config SYS_BOARD
-       string
        default "rpi_b"
 
 config SYS_VENDOR
-       string
        default "raspberrypi"
 
 config SYS_SOC
-       string
        default "bcm2835"
 
 config SYS_CONFIG_NAME
-       string
        default "rpi_b"
 
 endif
index d72a4537b6aff41fd18074235f83743334c37a57..10dffeda9f65c279a0ee05443b48c58096d0e91e 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_MIGOR
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "MigoR"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "MigoR"
 
 endif
index dc01a38adbee03b342484d7e8bb12c0c66c30fc6..957962de20e03d15360db04c633221fbf80e7891 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ALT
 
 config SYS_BOARD
-       string
        default "alt"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "alt"
 
 endif
index ac1e9ef76e6b530debfb56c42b35ffc8efe47f28..45bd6003bd91124ab933ab2a2c627f2f32f5b3bb 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_AP325RXA
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "ap325rxa"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "ap325rxa"
 
 endif
index d62389e33a048a8e60ae25715fa8b5012e431d65..a24fe911e0897b0ba94f1d8c46a3a06c50b480f1 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_ECOVEC
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "ecovec"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "ecovec"
 
 endif
index e7c6437adad6fba61e85636b548a412182fc9ad7..6475f02b66c83d863d5c109fe95466517851306d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KOELSCH
 
 config SYS_BOARD
-       string
        default "koelsch"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "koelsch"
 
 endif
index 07dc98c70576cf6ace95843d2191a9a1851476f3..e990c2019cc237e404b9652c0c29edccc8e63e27 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_LAGER
 
 config SYS_BOARD
-       string
        default "lager"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "lager"
 
 endif
index 2eb1de2f076ca50aee3fcff94305b4a65da5eab9..bda785dc97c97fd2a45634511d98caaa1823cd3b 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_R0P7734
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "r0p7734"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "r0p7734"
 
 endif
index d674d77276d8ca50d49305d7bf120bfc32ab73fe..c55c109f6b02dbcff367456fee4d59b6194028c6 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_R2DPLUS
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "r2dplus"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "r2dplus"
 
 endif
index a862f5947ff019681858eff7bda562d7c592c3ab..2d3cbeca5b89f7b594c3752ff141e80ce7172820 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_R7780MP
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "r7780mp"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "r7780mp"
 
 endif
index 61e9913f36db43b2242e9675b217790399a9b175..5eb2923fb9aaf23adc0677ea666740ec6bd5a04a 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_RSK7203
 
 config SYS_CPU
-       string
        default "sh2"
 
 config SYS_BOARD
-       string
        default "rsk7203"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "rsk7203"
 
 endif
index a32d3ca78832fed4d4717b1a69c366e3b906336a..af71295a259a71d3767ab6f4dfcea0b055681583 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_RSK7264
 
 config SYS_CPU
-       string
        default "sh2"
 
 config SYS_BOARD
-       string
        default "rsk7264"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "rsk7264"
 
 endif
index c126fcbadd516045ee36ab477a15329a47ba73ac..cc0092c2fbbc31e0af7b08e273d5fdbfe15d371d 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_RSK7269
 
 config SYS_CPU
-       string
        default "sh2"
 
 config SYS_BOARD
-       string
        default "rsk7269"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "rsk7269"
 
 endif
index 12e52b48cac7f7f0fba04e89f5dfae203b60eee3..7c6aae94bf40a4fc290935bf1e4a45f60d8202b2 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_SH7752EVB
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "sh7752evb"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "sh7752evb"
 
 endif
index a1f4cd03ef1c166bb60f022ec0b166434721410f..8abdea0b13a59c74bfc77308d89577fe9c9754ff 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_SH7753EVB
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "sh7753evb"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "sh7753evb"
 
 endif
index a0e3265fcbe994874180151f277cf1e28283a268..97d966feb2af253fcc49fcf253042def518ae3b5 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_SH7757LCR
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "sh7757lcr"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "sh7757lcr"
 
 endif
index fbc11af7cc1b649e2779ffd1f11f6bc80ecc85ad..d5129881387fbe542a60117c15f84b6218b3599e 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_SH7763RDP
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "sh7763rdp"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "sh7763rdp"
 
 endif
index 8939f7d73f11a124684a3a0b200f901e2c197980..15787e645e4a2375f23e7aaa02cb25ad286b3898 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_SH7785LCR
 
 config SYS_CPU
-       string
        default "sh4"
 
 config SYS_BOARD
-       string
        default "sh7785lcr"
 
 config SYS_VENDOR
-       string
        default "renesas"
 
 config SYS_CONFIG_NAME
-       string
        default "sh7785lcr"
 
 endif
index 1cb914976158c3a445105c9a1633fb7a0e4c9ec8..4a2ca02c6710c65b1ae273a1ac919b4b823bb259 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_PM9261
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "pm9261"
 
 config SYS_VENDOR
-       string
        default "ronetix"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "pm9261"
 
 endif
index 292ccd69054bb1c8d7a484a87cbc186c31ed94fc..95129190fd67e2ec9eb2a8e93883c5b103b63ff3 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_PM9263
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "pm9263"
 
 config SYS_VENDOR
-       string
        default "ronetix"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "pm9263"
 
 endif
index e60e9aaef952dd5dbd3af9084cabb4fe736cacd6..0c0af962d4e87348fda4a5f70f84bf80516b8073 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_PM9G45
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "pm9g45"
 
 config SYS_VENDOR
-       string
        default "ronetix"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "pm9g45"
 
 endif
index f716a911f0e312515ec895d955b74b6d0b343618..1646425101375ed707e934bd2e67cce734527f32 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SACSNG
 
 config SYS_BOARD
-       string
        default "sacsng"
 
 config SYS_CONFIG_NAME
-       string
        default "sacsng"
 
 endif
index 5fdbacbbac0b1d6f3797769bf86c6892dfa742c0..b620974ba0fe12c25609df96a3492fa3eb18d588 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ARNDALE
 
 config SYS_BOARD
-       string
        default "arndale"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "arndale"
 
 endif
index 0be535e49aec8aa06a13ee6032eb294c10e56814..a320c2bcb5f5262895eff0d15409a3a91b2ae4d1 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_S5P_GONI
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "goni"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_SOC
-       string
        default "s5pc1xx"
 
 config SYS_CONFIG_NAME
-       string
        default "s5p_goni"
 
 endif
index 8dcfb4808dd8102d173eff68bb1bb3b8707a80c5..8b52a0d589440e6badc9941401a72bb70f170d49 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ODROID
 
 config SYS_BOARD
-       string
        default "odroid"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "odroid"
 
 endif
index 3eda350e2d0889d195c76bc18fbdf38ee818603d..63e3efe21cb480d7c2a2ff19fa85f81ae7c6a738 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ORIGEN
 
 config SYS_BOARD
-       string
        default "origen"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "origen"
 
 endif
index e921c0986c9fdd997e7cf1ce3d0f61351531f66e..94f1e3c4ccfbb865188f86b809ba44840e3290ce 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SMDK2410
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "smdk2410"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_SOC
-       string
        default "s3c24x0"
 
 config SYS_CONFIG_NAME
-       string
        default "smdk2410"
 
 endif
index e7036f5965c90d9ecb70232b82a9eac28d1b344c..698ee9125c92716fd32a52c4fceabc62b0f758b9 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_SMDK5250
 
 config SYS_BOARD
-       string
        default "smdk5250"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "smdk5250"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_SNOW
 
 config SYS_BOARD
-       string
        default "smdk5250"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "snow"
 
 endif
index fb9beddb1c6cac35eca3b52e0f61886e03d87c09..d3a5b7f7d7f2fb8286429f9b7663157fb969ef9f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_PEACH_PIT
 
 config SYS_BOARD
-       string
        default "smdk5420"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "peach-pit"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_SMDK5420
 
 config SYS_BOARD
-       string
        default "smdk5420"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "smdk5420"
 
 endif
index 9c2b4da71c5d34529b40d99f66ec57dcfc95edda..5e6b0ddcdaa331dbff7003d3e619771a1ced6a31 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SMDKC100
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "smdkc100"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_SOC
-       string
        default "s5pc1xx"
 
 config SYS_CONFIG_NAME
-       string
        default "smdkc100"
 
 endif
index 785fae29b8b55dc53b69675bf9e293d3868ff234..a6fd657697ebadbe0e710906e452cc7d76fa56a4 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_SMDKV310
 
 config SYS_BOARD
-       string
        default "smdkv310"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "smdkv310"
 
 endif
index 8bfb12d5cdab054d302e7507de031f66260fc0a9..7e8377bb943a23ab4aaabfa7e5b8bdf3561868d1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TRATS
 
 config SYS_BOARD
-       string
        default "trats"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "trats"
 
 endif
index f359c03e2938e109bff155f43698ded785a648d3..5670e14fae797effae3ce7baf6deb59c0a5838f1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TRATS2
 
 config SYS_BOARD
-       string
        default "trats2"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "trats2"
 
 endif
index 72b879a26b480c68c963e74d9e0f07ae9f9a833a..e692668115b3ae77637a2d500d3c428d75e14bc7 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_S5PC210_UNIVERSAL
 
 config SYS_BOARD
-       string
        default "universal_c210"
 
 config SYS_VENDOR
-       string
        default "samsung"
 
 config SYS_CONFIG_NAME
-       string
        default "s5pc210_universal"
 
 endif
index d4aaea58af5cde703ea52c0eb67568e7b2e7bbe1..1b04576b9c2e97768fb2d93f6716c1b2e6ac357f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_KAREF
 
 config SYS_BOARD
-       string
        default "karef"
 
 config SYS_VENDOR
-       string
        default "sandburst"
 
 config SYS_CONFIG_NAME
-       string
        default "KAREF"
 
 endif
index be2affc79de3f52e8cb27db2359ef9d969cefa5d..4a771efef48fe9fd4bfffbb98d3ee375dd1758cd 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_METROBOX
 
 config SYS_BOARD
-       string
        default "metrobox"
 
 config SYS_VENDOR
-       string
        default "sandburst"
 
 config SYS_CONFIG_NAME
-       string
        default "METROBOX"
 
 endif
index eddbfd8c9ad04f480820db5d8d86b7212f0b1f40..99e7379cd27911138c345deadf7bf2c96a6e2145 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SANSA_FUZE_PLUS
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "sansa_fuze_plus"
 
 config SYS_VENDOR
-       string
        default "sandisk"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "sansa_fuze_plus"
 
 endif
index 3cc99de21456c03274981e0ec42cbb4a688198e2..c19b63e183b00463826b3c7e6f140683ae41f00e 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SANDPOINT8240
 
 config SYS_BOARD
-       string
        default "sandpoint"
 
 config SYS_CONFIG_NAME
-       string
        default "Sandpoint8240"
 
 endif
@@ -13,11 +11,9 @@ endif
 if TARGET_SANDPOINT8245
 
 config SYS_BOARD
-       string
        default "sandpoint"
 
 config SYS_CONFIG_NAME
-       string
        default "Sandpoint8245"
 
 endif
index 77082bfbcfabd76e862eb53165161cc41f8ccece..4e7e843f468b3a3ad49b993f9343c2b3e4c9ceb4 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SBC405
 
 config SYS_BOARD
-       string
        default "sbc405"
 
 config SYS_CONFIG_NAME
-       string
        default "sbc405"
 
 endif
index 5b851f8bab9ad4cf8850a3ff613ef002fa55e911..129d6b92ec57b09c249474f3f5da3f3ee68e424f 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SBC8349
 
 config SYS_BOARD
-       string
        default "sbc8349"
 
 config SYS_CONFIG_NAME
-       string
        default "sbc8349"
 
 endif
index 5223d3d66746840176e4ff337654f1201de6be66..626cbdf2ab2714b4bd35d39f97ffe50144a85ebd 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SBC8548
 
 config SYS_BOARD
-       string
        default "sbc8548"
 
 config SYS_CONFIG_NAME
-       string
        default "sbc8548"
 
 endif
index 7f77bca1861447a1e299635f78b6f48c0329de45..8dfc90cf8bc954256f04a6f0eaee2199f3209212 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SBC8641D
 
 config SYS_BOARD
-       string
        default "sbc8641d"
 
 config SYS_CONFIG_NAME
-       string
        default "sbc8641d"
 
 endif
index 74694be90760840897998005c09361d86462eebe..88a6d86d8bd2b564da4ae589badd5afc8f2081a3 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SC3
 
 config SYS_BOARD
-       string
        default "sc3"
 
 config SYS_CONFIG_NAME
-       string
        default "sc3"
 
 endif
index 040d055bb6a61d75ff228a5475583332d1edc38b..7ff7dbc4a5ab1d29d3d670fe04df57b1dac939a9 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_SCB9328
 
 config SYS_CPU
-       string
        default "arm920t"
 
 config SYS_BOARD
-       string
        default "scb9328"
 
 config SYS_SOC
-       string
        default "imx"
 
 config SYS_CONFIG_NAME
-       string
        default "scb9328"
 
 endif
index 30071ed74c1ac3d48f581c65d0ecd1b2e2a79381..379e53b55687ebb80d8de37a3e8ce05ca601fe6b 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SC_SPS_1
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "sc_sps_1"
 
 config SYS_VENDOR
-       string
        default "schulercontrol"
 
 config SYS_SOC
-       string
        default "mxs"
 
 config SYS_CONFIG_NAME
-       string
        default "sc_sps_1"
 
 endif
index cb9fb9fa2a4a3b20977328f09734165a7d0f2cc3..a1c383e1b2c4cb6b6d8b9375db2a9894aa23805f 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_SHMIN
 
 config SYS_CPU
-       string
        default "sh3"
 
 config SYS_BOARD
-       string
        default "shmin"
 
 config SYS_CONFIG_NAME
-       string
        default "shmin"
 
 endif
index e24364cab5fd3b44751dba7dedf17e99b19c5530..80018c51b59be3f0c753f7b62165a25e21248b88 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_CORVUS
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "corvus"
 
 config SYS_VENDOR
-       string
        default "siemens"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "corvus"
 
 endif
index c6dac1c0c759e01a5e93562dddf13fa2d53d36ff..b930a76fa9f8b6e8837dc1cb5ef6463ec10d3407 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_DRACO
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "draco"
 
 config SYS_VENDOR
-       string
        default "siemens"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "draco"
 
 endif
@@ -25,23 +20,18 @@ endif
 if TARGET_DXR2
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "draco"
 
 config SYS_VENDOR
-       string
        default "siemens"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "dxr2"
 
 endif
index db695378ceae4ab3e6c8968d2d9e8e839318fbbf..f76ec69bba71ae8af2d02462ec6d5107d866fe67 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_PXM2
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "pxm2"
 
 config SYS_VENDOR
-       string
        default "siemens"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "pxm2"
 
 endif
index c4d9e7ef1b865bc1af4be3a26e757b553c7805d0..b7e49dac26d72aaba32c3da89d2a62fd506b3371 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_RUT
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "rut"
 
 config SYS_VENDOR
-       string
        default "siemens"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "rut"
 
 endif
index 3ef14c612979ceee30e614af4c130602666fe60a..1fedbd36bcc29691aa41541c48a539e5a452cd8c 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TAURUS
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "taurus"
 
 config SYS_VENDOR
-       string
        default "siemens"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "taurus"
 
 endif
index abf86b1bdd7d53e7e2594c2a918bc6d72dc8f106..90bfb69e5ed94819755f7d5c8d68f9826a52f397 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_PENGWYN
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "pengwyn"
 
 config SYS_VENDOR
-       string
        default "silica"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "pengwyn"
 
 endif
index 06abd9d3653a213acad95fc0ecf0d2999d8ccbb1..ca945c278da900bd6c9e25869a551f7295e19116 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SOCRATES
 
 config SYS_BOARD
-       string
        default "socrates"
 
 config SYS_CONFIG_NAME
-       string
        default "socrates"
 
 endif
index a4123476665f06419a35c34bccde04f91142aaae..a4eb62fcef833971010288b3beafed0d6eaee897 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_HUMMINGBOARD
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "hummingboard"
 
 config SYS_VENDOR
-       string
        default "solidrun"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "hummingboard"
 
 endif
index 4845cba28fb69eb79ece2e9ea5d72150b178d733..2430616ec2f39b390f7192a61d5faf1edb5f7ed9 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_SPD823TS
 
 config SYS_BOARD
-       string
        default "spd8xx"
 
 config SYS_CONFIG_NAME
-       string
        default "SPD823TS"
 
 endif
index 7e49e3425366ef6fa4154e0f99bcf979b7a0b4c4..5b702ced69857c61ff97a105aced7e14de7a3609 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SPEAR300
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "spear300"
 
 config SYS_VENDOR
-       string
        default "spear"
 
 config SYS_SOC
-       string
        default "spear"
 
 config SYS_CONFIG_NAME
-       string
        default "spear3xx_evb"
 
 endif
index de7104029a3818d8bc2f41f8516548738e403251..b8f51547337c6c4f28b5fe15074e5407c0d81a64 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SPEAR310
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "spear310"
 
 config SYS_VENDOR
-       string
        default "spear"
 
 config SYS_SOC
-       string
        default "spear"
 
 config SYS_CONFIG_NAME
-       string
        default "spear3xx_evb"
 
 endif
index 4cf6baf08db0b219c407afda120423d0c10d2902..150d64ff98e70e95de15c791562f2fae74582194 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SPEAR320
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "spear320"
 
 config SYS_VENDOR
-       string
        default "spear"
 
 config SYS_SOC
-       string
        default "spear"
 
 config SYS_CONFIG_NAME
-       string
        default "spear3xx_evb"
 
 endif
index d62f9e7bece8e1ec3ac5488965f2f27c3d955554..f03e19ebd3cade52b32203f9d9191c32118a2a6c 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SPEAR600
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "spear600"
 
 config SYS_VENDOR
-       string
        default "spear"
 
 config SYS_SOC
-       string
        default "spear"
 
 config SYS_CONFIG_NAME
-       string
        default "spear6xx_evb"
 
 endif
index a9245591bfc7694dc27cd142cf54fa13915406c3..620be5f56ed8bfc3663ec004eadb279227c4824c 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_X600
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "x600"
 
 config SYS_VENDOR
-       string
        default "spear"
 
 config SYS_SOC
-       string
        default "spear"
 
 config SYS_CONFIG_NAME
-       string
        default "x600"
 
 endif
index b5ead0fcfa238337e69af5b6177d69bb2a49c561..7eb99697d5fc9674102c142136ca5f4508c0974f 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_SNOWBALL
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "snowball"
 
 config SYS_VENDOR
-       string
        default "st-ericsson"
 
 config SYS_SOC
-       string
        default "u8500"
 
 config SYS_CONFIG_NAME
-       string
        default "snowball"
 
 endif
index bbcfdafc54774f0272eb34a603bf20cb8d9b7030..ca2587626977db6bdf4feed35b7fc6eaf542000a 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_U8500_HREF
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "u8500"
 
 config SYS_VENDOR
-       string
        default "st-ericsson"
 
 config SYS_SOC
-       string
        default "u8500"
 
 config SYS_CONFIG_NAME
-       string
        default "u8500_href"
 
 endif
index ba2e7c2e09925c52ff8ea7dd605dcbdcdf14192b..94547dc118dac0a87c94e9ccca041ae6710bd3e5 100644 (file)
@@ -1,15 +1,12 @@
 if NOMADIK_NHK8815
 
 config SYS_BOARD
-       string
        default "nhk8815"
 
 config SYS_VENDOR
-       string
        default "st"
 
 config SYS_CONFIG_NAME
-       string
        default "nhk8815"
 
 endif
index aac2940f78e6fbc52985f4f80e29fb6ae4727933..910b31b24fb8b310428156d762a5ac01e51f45dd 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_STXGP3
 
 config SYS_BOARD
-       string
        default "stxgp3"
 
 config SYS_VENDOR
-       string
        default "stx"
 
 config SYS_CONFIG_NAME
-       string
        default "stxgp3"
 
 endif
index 06dd8bef8b80e707ca8134ded606bbdba4b63412..bd47b04444c29368cb2e95033d60e526f9d3306d 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_STXSSA
 
 config SYS_BOARD
-       string
        default "stxssa"
 
 config SYS_VENDOR
-       string
        default "stx"
 
 config SYS_CONFIG_NAME
-       string
        default "stxssa"
 
 endif
index 7bdf958afeb85841919cbc0f6e1096cdca32e7ea..bcd0a55a1e584410e13689b691f9d2d3614cdf67 100644 (file)
@@ -1,7 +1,6 @@
 if TARGET_SUN4I
 
 config SYS_CONFIG_NAME
-       string
        default "sun4i"
 
 endif
@@ -9,7 +8,6 @@ endif
 if TARGET_SUN5I
 
 config SYS_CONFIG_NAME
-       string
        default "sun5i"
 
 endif
@@ -17,7 +15,6 @@ endif
 if TARGET_SUN7I
 
 config SYS_CONFIG_NAME
-       string
        default "sun7i"
 
 endif
@@ -25,15 +22,12 @@ endif
 if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN7I
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "sunxi"
 
 config SYS_SOC
-       string
        default "sunxi"
 
 config FDTFILE
index 22034c19f1b39f2d47fbe60d6857a8d144bea773..a54d3dfde367cdb154a8d04ec9fb6f770287a833 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ARCANGEL4
 
 config SYS_CPU
-       string
        default "arc700"
 
 config SYS_VENDOR
-       string
        default "synopsys"
 
 config SYS_CONFIG_NAME
-       string
        default "arcangel4"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_ARCANGEL4_BE
 
 config SYS_CPU
-       string
        default "arc700"
 
 config SYS_VENDOR
-       string
        default "synopsys"
 
 config SYS_CONFIG_NAME
-       string
        default "arcangel4-be"
 
 endif
index 535b8ebf48827a81675df4e4a0e0827c0ce1629a..8448265888076bc9cb9b521a1dc5f0e8e6b44ca4 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_AXS101
 
 config SYS_CPU
-       string
        default "arc700"
 
 config SYS_BOARD
-       string
        default "axs101"
 
 config SYS_VENDOR
-       string
        default "synopsys"
 
 config SYS_CONFIG_NAME
-       string
        default "axs101"
 
 endif
index c00204a785142328ef36bf2b261373e65b383988..3965e90ad91d26c7cc24a5414c5d7e49ac58307e 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_JADECPU
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "jadecpu"
 
 config SYS_VENDOR
-       string
        default "syteco"
 
 config SYS_SOC
-       string
        default "mb86r0x"
 
 config SYS_CONFIG_NAME
-       string
        default "jadecpu"
 
 endif
index dbf34e5f05e642becff8193bb05f461ec64ff09c..260774dced153e297b0ae3434d8cfacbad21be22 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_ZMX25
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "zmx25"
 
 config SYS_VENDOR
-       string
        default "syteco"
 
 config SYS_SOC
-       string
        default "mx25"
 
 config SYS_CONFIG_NAME
-       string
        default "zmx25"
 
 endif
index 818293a2e6dcee0350037a1e77ce7001948e51bc..82ed4c95b84cb91fbbf80d4163d21be7d6bcaa14 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_T3CORP
 
 config SYS_BOARD
-       string
        default "t3corp"
 
 config SYS_CONFIG_NAME
-       string
        default "t3corp"
 
 endif
index 3aecad90dfdce69bab5026ea29544d13ddfdbfe9..67be227b7279057f9257b15c4c470c7713216e31 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_STAMP9G20
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "stamp9g20"
 
 config SYS_VENDOR
-       string
        default "taskit"
 
 config SYS_SOC
-       string
        default "at91"
 
 config SYS_CONFIG_NAME
-       string
        default "stamp9g20"
 
 endif
index a24609921beac7ab51cdbd36368c449611442db5..558c2fe495fd349c3174fefcafc789c4b44c88b3 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_TCM_BF518
 
 config SYS_BOARD
-       string
        default "tcm-bf518"
 
 config SYS_CONFIG_NAME
-       string
        default "tcm-bf518"
 
 endif
index a7f1b21a3b3bac63813c730c60d33cf3a84ed173..e0127c641e9195a5b1f576b3503f4750a1f2e2dc 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_TCM_BF537
 
 config SYS_BOARD
-       string
        default "tcm-bf537"
 
 config SYS_CONFIG_NAME
-       string
        default "tcm-bf537"
 
 endif
index 910a9cdaa7b545dcd1bda03d7a78549b22f67e88..27bc91f8ca35808efee27c1ad92efc1186fd8fa4 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TAO3530
 
 config SYS_BOARD
-       string
        default "tao3530"
 
 config SYS_VENDOR
-       string
        default "technexion"
 
 config SYS_CONFIG_NAME
-       string
        default "tao3530"
 
 endif
index e6f811a19dbccacbbcc25802264ec2a573868e5b..4c0ace8eddad6172484a2b318d793595143959c8 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TWISTER
 
 config SYS_BOARD
-       string
        default "twister"
 
 config SYS_VENDOR
-       string
        default "technexion"
 
 config SYS_CONFIG_NAME
-       string
        default "twister"
 
 endif
index a5672049bf872b081175f492a7166dc5ab671bfb..fd7196a6f91b0e879c489ae05deb0ad610efc7fb 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MT_VENTOUX
 
 config SYS_BOARD
-       string
        default "mt_ventoux"
 
 config SYS_VENDOR
-       string
        default "teejet"
 
 config SYS_CONFIG_NAME
-       string
        default "mt_ventoux"
 
 endif
index 80701f5b989e1568cb665425be280f2fdea33ff4..d8958ef0b86ee21c012c5b325eae4f8ca34b7389 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AM335X_EVM
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "am335x"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "am335x_evm"
 
 config CONS_INDEX
index c44dab5b61e343fcf6649917056c0c08b72bbf62..ad025a3228be2f8fd3e5891c36491edd2bc1f265 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_AM3517_CRANE
 
 config SYS_BOARD
-       string
        default "am3517crane"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "am3517_crane"
 
 endif
index 3c61ec1d763edaf3a32e5fe6de1818fa26afb0a9..47b96bd7eddd6883747ae6a073df2384655ecd53 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_AM43XX_EVM
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "am43xx"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "am43xx_evm"
 
 endif
index 10c81c2bee2e94cab92c316edc154c01f2750232..c2eff9e71b0c92e612fcd6f6da7eae08428254e2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP3_BEAGLE
 
 config SYS_BOARD
-       string
        default "beagle"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_beagle"
 
 endif
index 9ee13c53d3300f79f068bd78fee25a12cc6642f7..3bbd86644de8cb4e4c33fd39114f9f2cd2615ff1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DRA7XX_EVM
 
 config SYS_BOARD
-       string
        default "dra7xx"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "dra7xx_evm"
 
 endif
index c54ce3322bdf44fc431f9bad91c4841f67f2b8e0..f02aa31a91e7dc23bf6cd418fa8bbac5d4ad2c19 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP3_EVM
 
 config SYS_BOARD
-       string
        default "evm"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_evm"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_OMAP3_EVM_QUICK_MMC
 
 config SYS_BOARD
-       string
        default "evm"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_evm_quick_mmc"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_OMAP3_EVM_QUICK_NAND
 
 config SYS_BOARD
-       string
        default "evm"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_evm_quick_nand"
 
 endif
index 3108782876569b230b29e2159e5563134a99e846..9c1e103a20fcda9ca9e8c7110e56e90b5c0e5531 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_K2E_EVM
 
 config SYS_BOARD
-       string
        default "ks2_evm"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "k2e_evm"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_K2HK_EVM
 
 config SYS_BOARD
-       string
        default "ks2_evm"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "k2hk_evm"
 
 endif
index 3592e7be037af6eeab54e1c1940e2d8c0ff43635..aa138445444ec81a40feaf1930e281a560c507c7 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP5_UEVM
 
 config SYS_BOARD
-       string
        default "omap5_uevm"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "omap5_uevm"
 
 endif
index b69218b6c3bc0801d85e5744dbfb1b2b486d554f..8f277b612a455f5efda555edf69c0328a5efce67 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP4_PANDA
 
 config SYS_BOARD
-       string
        default "panda"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "omap4_panda"
 
 endif
index fcf732989bb0ab1fdcf1f8b895e443a3e1d49916..7e73d99aba1d6737f72fdd788eb1974df26c909c 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP3_SDP3430
 
 config SYS_BOARD
-       string
        default "sdp3430"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "omap3_sdp3430"
 
 endif
index 9c1d8fe35aac97e8cdb2ced370e0452987fda3e8..5826d8fd0b214646a3ce0bf88a6ff8ffb2b98543 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_OMAP4_SDP4430
 
 config SYS_BOARD
-       string
        default "sdp4430"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_CONFIG_NAME
-       string
        default "omap4_sdp4430"
 
 endif
index 4d4f52cef4e7b521eddb70ed904283d6b39b7727..9bd3d73427b43b94a95e663f7e3c44e54ed4e4de 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TI814X_EVM
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "ti814x"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "ti814x_evm"
 
 endif
index 5821172b34294090ae8904ddf167125cfac6e128..c0bdb9eac3c189317f143a715dcba6d78298a7a8 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TI816X_EVM
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "ti816x"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_SOC
-       string
        default "am33xx"
 
 config SYS_CONFIG_NAME
-       string
        default "ti816x_evm"
 
 endif
index 9cffd7c64694e7b0b463c3bbe6aa92668f964593..aa80d0f41a33ce8b92b67cf2eaf4e7416e8d0d38 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TNETV107X_EVM
 
 config SYS_CPU
-       string
        default "arm1176"
 
 config SYS_BOARD
-       string
        default "tnetv107xevm"
 
 config SYS_VENDOR
-       string
        default "ti"
 
 config SYS_SOC
-       string
        default "tnetv107x"
 
 config SYS_CONFIG_NAME
-       string
        default "tnetv107x_evm"
 
 endif
index 4caee60210ba3b93f9d7ea1647cec719cdc9172b..087356d4bac98baff43000d4e5c634c9cc8ee730 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_DEVKIT3250
 
 config SYS_CPU
-       string
        default "arm926ejs"
 
 config SYS_BOARD
-       string
        default "devkit3250"
 
 config SYS_VENDOR
-       string
        default "timll"
 
 config SYS_SOC
-       string
        default "lpc32xx"
 
 config SYS_CONFIG_NAME
-       string
        default "devkit3250"
 
 endif
index d1603f4741e9f5dbfd3df5d515d713fad742cd3f..3c63ced9a1a9eb71eb0cd0078437dbce0f9b97ac 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_DEVKIT8000
 
 config SYS_BOARD
-       string
        default "devkit8000"
 
 config SYS_VENDOR
-       string
        default "timll"
 
 config SYS_CONFIG_NAME
-       string
        default "devkit8000"
 
 endif
index 9367c8898e84349474645639f31b8c465b29d952..e4b1a5e50815fc364cce0866cd9fd0ef2dc935ed 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_COLIBRI_PXA270
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "colibri_pxa270"
 
 config SYS_VENDOR
-       string
        default "toradex"
 
 config SYS_CONFIG_NAME
-       string
        default "colibri_pxa270"
 
 endif
index cccdd584c8b6c926d2eaf992115eab6220122f28..4bf727809ea53246767062fff78d6260ebad3177 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_COLIBRI_T20_IRIS
 
 config SYS_BOARD
-       string
        default "colibri_t20_iris"
 
 config SYS_VENDOR
-       string
        default "toradex"
 
 config SYS_CONFIG_NAME
-       string
        default "colibri_t20_iris"
 
 endif
index ea6c08a59cc52de0b0541c7527d35d9b566ff613..3e436a2d3fd3dd923fc51c749db537703e367368 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_COLIBRI_T30
 
 config SYS_BOARD
-       string
        default "colibri_t30"
 
 config SYS_VENDOR
-       string
        default "toradex"
 
 config SYS_CONFIG_NAME
-       string
        default "colibri_t30"
 
 endif
index 774eb9889e617cdecb60e40bb26ca82456656331..ffa9516a55d520024bfc3ac14aa242d6351877e2 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_TOTAL5200
 
 config SYS_BOARD
-       string
        default "total5200"
 
 config SYS_CONFIG_NAME
-       string
        default "Total5200"
 
 endif
index c692196550c52388c33ef23716981bfa792a0dbf..0e4cd69a2d421a919677ceca443e26d1a4abefd6 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_AEV
 
 config SYS_BOARD
-       string
        default "tqm5200"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "aev"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_CHARON
 
 config SYS_BOARD
-       string
        default "tqm5200"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "charon"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_TB5200
 
 config SYS_BOARD
-       string
        default "tqm5200"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TB5200"
 
 endif
@@ -49,15 +40,12 @@ endif
 if TARGET_TQM5200
 
 config SYS_BOARD
-       string
        default "tqm5200"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM5200"
 
 endif
index 0cf80ddb80b1f03542483010adc97658f0c45ad7..90a96ebebe5857aae5bc12be6723ee2401c3f9d2 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TQM8260
 
 config SYS_BOARD
-       string
        default "tqm8260"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM8260"
 
 endif
index 9be43d3baee3475f945044cf85a20224991b6de6..7b5cd8bc7c9079256d438d76f4c52e4b7ed9aabf 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TQM8272
 
 config SYS_BOARD
-       string
        default "tqm8272"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM8272"
 
 endif
index cd2e817a4ecde2c4f461be642cb56af6e6462a39..028b8466e8a472a61119bf206cb28d4b00fa823b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TQM834X
 
 config SYS_BOARD
-       string
        default "tqm834x"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM834x"
 
 endif
index 5700d22162942c8667dd6516640ec520662953a6..926a37afc53cdfe58d72ec4dc91ee040c25aecb0 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_FPS850L
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "FPS850L"
 
 endif
@@ -17,15 +14,12 @@ endif
 if TARGET_FPS860L
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "FPS860L"
 
 endif
@@ -33,15 +27,12 @@ endif
 if TARGET_NSCU
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "NSCU"
 
 endif
@@ -49,15 +40,12 @@ endif
 if TARGET_SM850
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "SM850"
 
 endif
@@ -65,15 +53,12 @@ endif
 if TARGET_TK885D
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TK885D"
 
 endif
@@ -81,15 +66,12 @@ endif
 if TARGET_TQM823L
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM823L"
 
 endif
@@ -97,15 +79,12 @@ endif
 if TARGET_TQM823M
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM823M"
 
 endif
@@ -113,15 +92,12 @@ endif
 if TARGET_TQM850L
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM850L"
 
 endif
@@ -129,15 +105,12 @@ endif
 if TARGET_TQM850M
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM850M"
 
 endif
@@ -145,15 +118,12 @@ endif
 if TARGET_TQM855L
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM855L"
 
 endif
@@ -161,15 +131,12 @@ endif
 if TARGET_TQM855M
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM855M"
 
 endif
@@ -177,15 +144,12 @@ endif
 if TARGET_TQM860L
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM860L"
 
 endif
@@ -193,15 +157,12 @@ endif
 if TARGET_TQM860M
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM860M"
 
 endif
@@ -209,15 +170,12 @@ endif
 if TARGET_TQM862L
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM862L"
 
 endif
@@ -225,15 +183,12 @@ endif
 if TARGET_TQM862M
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM862M"
 
 endif
@@ -241,15 +196,12 @@ endif
 if TARGET_TQM866M
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM866M"
 
 endif
@@ -257,15 +209,12 @@ endif
 if TARGET_TQM885D
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "TQM885D"
 
 endif
@@ -273,15 +222,12 @@ endif
 if TARGET_VIRTLAB2
 
 config SYS_BOARD
-       string
        default "tqm8xx"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_CONFIG_NAME
-       string
        default "virtlab2"
 
 endif
index 44b41429248eba0898c43acaeb7fd03e63734630..b70cbf09df4cc08eb6ec7ef8da85d72c5dd9a134 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_TQMA6
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "tqma6"
 
 config SYS_VENDOR
-       string
        default "tqc"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "tqma6"
 
 endif
index ddd2ce3f3e1a68b8709497ebe812dbae13fa191c..9844c692a18d12c1a73e2c65de6eff20922ee46c 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_TRIZEPSIV
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "trizepsiv"
 
 config SYS_CONFIG_NAME
-       string
        default "trizepsiv"
 
 endif
index 3b18bea57a223d82689a7542b90423f36ccf3800..4e2271bdad8dd7b8c9bbe94268ab35912ca1f621 100644 (file)
@@ -1,23 +1,18 @@
 if TARGET_VISION2
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "vision2"
 
 config SYS_VENDOR
-       string
        default "ttcontrol"
 
 config SYS_SOC
-       string
        default "mx5"
 
 config SYS_CONFIG_NAME
-       string
        default "vision2"
 
 endif
index 69dbce0e25bb958736ca559b67d1d1a9945a14a9..a98d0d6a4cfaff2d7bb79531c165460ecf8ad2dc 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_UDOO
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "udoo"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "udoo"
 
 endif
index 3dd264b0caac4c55f49861ee1ed504152bad0ebd..aec0eb96adb82b0271e73128167cec8e8e2be7ab 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_UTX8245
 
 config SYS_BOARD
-       string
        default "utx8245"
 
 config SYS_CONFIG_NAME
-       string
        default "utx8245"
 
 endif
index f473d89e58885b9cfbc8a08724300e35f252d851..653bfc1c3b21a6ff6548a981e08519da6c9d5051 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_V38B
 
 config SYS_BOARD
-       string
        default "v38b"
 
 config SYS_CONFIG_NAME
-       string
        default "v38b"
 
 endif
index ed9efbfbb6e3bdfbf7e4a6d2e9126d8f53393181..a63744b1546e0c7ef29a74bfbaaf4091ad30681c 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_VE8313
 
 config SYS_BOARD
-       string
        default "ve8313"
 
 config SYS_CONFIG_NAME
-       string
        default "ve8313"
 
 endif
index e9170b0b7a19a59558316e5632f0977e15e5e2fb..a046f01f6d40c8b49058d2b5e6ca849f6015d216 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_VPAC270
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "vpac270"
 
 config SYS_CONFIG_NAME
-       string
        default "vpac270"
 
 endif
index c0e879a6b7622e8e4d62c5fdd7f6d094f0189729..fd1b42231887200c086562e7e4a311dead741b84 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_W7OLMC
 
 config SYS_BOARD
-       string
        default "w7o"
 
 config SYS_CONFIG_NAME
-       string
        default "W7OLMC"
 
 endif
@@ -13,11 +11,9 @@ endif
 if TARGET_W7OLMG
 
 config SYS_BOARD
-       string
        default "w7o"
 
 config SYS_CONFIG_NAME
-       string
        default "W7OLMG"
 
 endif
index a323afab2ad2938f021ba50eba0744f80f4c6054..c8627693f2ce4bce51e6c6bc1c10c9b09c5e5a24 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_WANDBOARD
 
 config SYS_CPU
-       string
        default "armv7"
 
 config SYS_BOARD
-       string
        default "wandboard"
 
 config SYS_SOC
-       string
        default "mx6"
 
 config SYS_CONFIG_NAME
-       string
        default "wandboard"
 
 endif
index 1aca934f033ebe8948b1b4eac0eccfa0e9102bfd..67023199b6ccc41fafb5799c8af793376c7a3b21 100644 (file)
@@ -1,19 +1,15 @@
 if TARGET_WOODBURN
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "woodburn"
 
 config SYS_SOC
-       string
        default "mx35"
 
 config SYS_CONFIG_NAME
-       string
        default "woodburn"
 
 endif
@@ -21,19 +17,15 @@ endif
 if TARGET_WOODBURN_SD
 
 config SYS_CPU
-       string
        default "arm1136"
 
 config SYS_BOARD
-       string
        default "woodburn"
 
 config SYS_SOC
-       string
        default "mx35"
 
 config SYS_CONFIG_NAME
-       string
        default "woodburn_sd"
 
 endif
index 9b414359110b43319b8e332f6879310f5ec4dde1..288f24b227b522625156404f79a45a3e514494d3 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_XAENIAX
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "xaeniax"
 
 config SYS_CONFIG_NAME
-       string
        default "xaeniax"
 
 endif
index 115439a249c06d17763fdde97a839c98c0e31151..4d0ab2f66e3cd66dc18c548a6ca487a1c3ac62ef 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_XPEDITE1000
 
 config SYS_BOARD
-       string
        default "xpedite1000"
 
 config SYS_VENDOR
-       string
        default "xes"
 
 config SYS_CONFIG_NAME
-       string
        default "xpedite1000"
 
 endif
index b9387469907587c1e746bad434558fbf3ba49099..91bbd22451b1b224a7c13cac389c9ddf8e3ee945 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_XPEDITE517X
 
 config SYS_BOARD
-       string
        default "xpedite517x"
 
 config SYS_VENDOR
-       string
        default "xes"
 
 config SYS_CONFIG_NAME
-       string
        default "xpedite517x"
 
 endif
index e524ff1c90c706af6c99f8c9aecdef16436eee59..9c0c2461fde8bc347f9e32886aa1e86f518b8b12 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_XPEDITE520X
 
 config SYS_BOARD
-       string
        default "xpedite520x"
 
 config SYS_VENDOR
-       string
        default "xes"
 
 config SYS_CONFIG_NAME
-       string
        default "xpedite520x"
 
 endif
index cab2ab3f6e25722882da0639a292e0ca8ffccdf3..35b3917a6da908be3d3b206067e2a9bdd208e93a 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_XPEDITE537X
 
 config SYS_BOARD
-       string
        default "xpedite537x"
 
 config SYS_VENDOR
-       string
        default "xes"
 
 config SYS_CONFIG_NAME
-       string
        default "xpedite537x"
 
 endif
index fa11719ea03b6dfb06cab12d481b16f1fd8a0290..1b00137a48c2f12beba6435081fed059ff4d7780 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_XPEDITE550X
 
 config SYS_BOARD
-       string
        default "xpedite550x"
 
 config SYS_VENDOR
-       string
        default "xes"
 
 config SYS_CONFIG_NAME
-       string
        default "xpedite550x"
 
 endif
index b9cb33471c625bf00bea23f8399047ad5ea249f7..461d7dce2c2ee5ad0846e89b4032593ff5f1abc3 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_MICROBLAZE_GENERIC
 
 config SYS_BOARD
-       string
        default "microblaze-generic"
 
 config SYS_VENDOR
-       string
        default "xilinx"
 
 config SYS_CONFIG_NAME
-       string
        default "microblaze-generic"
 
 endif
index 6f3483d896c2a4f33ab2ab092c0a70cfe58992a8..d580a7beafef79a2517b44b041517b29c33a603b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ML507
 
 config SYS_BOARD
-       string
        default "ml507"
 
 config SYS_VENDOR
-       string
        default "xilinx"
 
 config SYS_CONFIG_NAME
-       string
        default "ml507"
 
 endif
index 98411c7ff4ae0096512d0e6162371a5f2bb4c8c0..dfbc07b4250aff17d5b3db7db763789db4b08b74 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_XILINX_PPC405_GENERIC
 
 config SYS_BOARD
-       string
        default "ppc405-generic"
 
 config SYS_VENDOR
-       string
        default "xilinx"
 
 config SYS_CONFIG_NAME
-       string
        default "xilinx-ppc405-generic"
 
 endif
index 37abe633e46f17937cc429eb9bb0bb36a67c7797..d40783a28f8493e375f24886639f2b87bd1eed3b 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_XILINX_PPC440_GENERIC
 
 config SYS_BOARD
-       string
        default "ppc440-generic"
 
 config SYS_VENDOR
-       string
        default "xilinx"
 
 config SYS_CONFIG_NAME
-       string
        default "xilinx-ppc440-generic"
 
 endif
index 56786940e318c2fa7fc77f7f99c846288e38ad05..67796508f3e5ce5972fe042e2b66abd884178538 100644 (file)
@@ -1,11 +1,9 @@
 if TARGET_ZEUS
 
 config SYS_BOARD
-       string
        default "zeus"
 
 config SYS_CONFIG_NAME
-       string
        default "zeus"
 
 endif
index 702edbff5fb8b03788b1060867f7c453d53af7cb..5f7fe1b23de5abf19469f11a17c6842d5d200ab1 100644 (file)
@@ -1,15 +1,12 @@
 if TARGET_ZIPITZ2
 
 config SYS_CPU
-       string
        default "pxa"
 
 config SYS_BOARD
-       string
        default "zipitz2"
 
 config SYS_CONFIG_NAME
-       string
        default "zipitz2"
 
 endif
diff --git a/common/aboot.c b/common/aboot.c
new file mode 100644 (file)
index 0000000..d5c464b
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2009, Google Inc.
+ * All rights reserved.
+ *
+ * Copyright (c) 2009-2014, The Linux Foundation. All rights reserved.
+ * Portions Copyright 2014 Broadcom Corporation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of The Linux Foundation nor
+ *       the names of its contributors may be used to endorse or promote
+ *       products derived from this software without specific prior written
+ *       permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * NOTE:
+ *   Although it is very similar, this license text is not identical
+ *   to the "BSD-3-Clause", therefore, DO NOT MODIFY THIS LICENSE TEXT!
+ */
+
+#include <config.h>
+#include <common.h>
+#include <aboot.h>
+#include <malloc.h>
+#include <part.h>
+#include <sparse_format.h>
+
+void write_sparse_image(block_dev_desc_t *dev_desc,
+               disk_partition_t *info, const char *part_name,
+               void *data, unsigned sz)
+{
+       lbaint_t blk;
+       lbaint_t blkcnt;
+       lbaint_t blks;
+       uint32_t bytes_written = 0;
+       unsigned int chunk;
+       unsigned int chunk_data_sz;
+       uint32_t *fill_buf = NULL;
+       uint32_t fill_val;
+       sparse_header_t *sparse_header;
+       chunk_header_t *chunk_header;
+       uint32_t total_blocks = 0;
+       int i;
+
+       /* Read and skip over sparse image header */
+       sparse_header = (sparse_header_t *) data;
+
+       data += sparse_header->file_hdr_sz;
+       if (sparse_header->file_hdr_sz > sizeof(sparse_header_t))
+       {
+               /*
+                * Skip the remaining bytes in a header that is longer than
+                * we expected.
+                */
+               data += (sparse_header->file_hdr_sz - sizeof(sparse_header_t));
+       }
+
+       debug("=== Sparse Image Header ===\n");
+       debug("magic: 0x%x\n", sparse_header->magic);
+       debug("major_version: 0x%x\n", sparse_header->major_version);
+       debug("minor_version: 0x%x\n", sparse_header->minor_version);
+       debug("file_hdr_sz: %d\n", sparse_header->file_hdr_sz);
+       debug("chunk_hdr_sz: %d\n", sparse_header->chunk_hdr_sz);
+       debug("blk_sz: %d\n", sparse_header->blk_sz);
+       debug("total_blks: %d\n", sparse_header->total_blks);
+       debug("total_chunks: %d\n", sparse_header->total_chunks);
+
+       /* verify sparse_header->blk_sz is an exact multiple of info->blksz */
+       if (sparse_header->blk_sz !=
+           (sparse_header->blk_sz & ~(info->blksz - 1))) {
+               printf("%s: Sparse image block size issue [%u]\n",
+                      __func__, sparse_header->blk_sz);
+               fastboot_fail("sparse image block size issue");
+               return;
+       }
+
+       puts("Flashing Sparse Image\n");
+
+       /* Start processing chunks */
+       blk = info->start;
+       for (chunk=0; chunk<sparse_header->total_chunks; chunk++)
+       {
+               /* Read and skip over chunk header */
+               chunk_header = (chunk_header_t *) data;
+               data += sizeof(chunk_header_t);
+
+               if (chunk_header->chunk_type != CHUNK_TYPE_RAW) {
+                       debug("=== Chunk Header ===\n");
+                       debug("chunk_type: 0x%x\n", chunk_header->chunk_type);
+                       debug("chunk_data_sz: 0x%x\n", chunk_header->chunk_sz);
+                       debug("total_size: 0x%x\n", chunk_header->total_sz);
+               }
+
+               if (sparse_header->chunk_hdr_sz > sizeof(chunk_header_t))
+               {
+                       /*
+                        * Skip the remaining bytes in a header that is longer
+                        * than we expected.
+                        */
+                       data += (sparse_header->chunk_hdr_sz -
+                                sizeof(chunk_header_t));
+               }
+
+               chunk_data_sz = sparse_header->blk_sz * chunk_header->chunk_sz;
+               blkcnt = chunk_data_sz / info->blksz;
+               switch (chunk_header->chunk_type)
+               {
+                       case CHUNK_TYPE_RAW:
+                       if (chunk_header->total_sz !=
+                           (sparse_header->chunk_hdr_sz + chunk_data_sz))
+                       {
+                               fastboot_fail(
+                                       "Bogus chunk size for chunk type Raw");
+                               return;
+                       }
+
+                       if (blk + blkcnt > info->start + info->size) {
+                               printf(
+                                   "%s: Request would exceed partition size!\n",
+                                   __func__);
+                               fastboot_fail(
+                                   "Request would exceed partition size!");
+                               return;
+                       }
+
+                       blks = dev_desc->block_write(dev_desc->dev, blk, blkcnt,
+                                                    data);
+                       if (blks != blkcnt) {
+                               printf("%s: Write failed " LBAFU "\n",
+                                      __func__, blks);
+                               fastboot_fail("flash write failure");
+                               return;
+                       }
+                       blk += blkcnt;
+                       bytes_written += blkcnt * info->blksz;
+                       total_blocks += chunk_header->chunk_sz;
+                       data += chunk_data_sz;
+                       break;
+
+                       case CHUNK_TYPE_FILL:
+                       if (chunk_header->total_sz !=
+                           (sparse_header->chunk_hdr_sz + sizeof(uint32_t)))
+                       {
+                               fastboot_fail(
+                                       "Bogus chunk size for chunk type FILL");
+                               return;
+                       }
+
+                       fill_buf = (uint32_t *)
+                                  memalign(ARCH_DMA_MINALIGN,
+                                           ROUNDUP(info->blksz,
+                                                   ARCH_DMA_MINALIGN));
+                       if (!fill_buf)
+                       {
+                               fastboot_fail(
+                                       "Malloc failed for: CHUNK_TYPE_FILL");
+                               return;
+                       }
+
+                       fill_val = *(uint32_t *)data;
+                       data = (char *) data + sizeof(uint32_t);
+
+                       for (i = 0; i < (info->blksz / sizeof(fill_val)); i++)
+                               fill_buf[i] = fill_val;
+
+                       if (blk + blkcnt > info->start + info->size) {
+                               printf(
+                                   "%s: Request would exceed partition size!\n",
+                                   __func__);
+                               fastboot_fail(
+                                   "Request would exceed partition size!");
+                               return;
+                       }
+
+                       for (i = 0; i < blkcnt; i++) {
+                               blks = dev_desc->block_write(dev_desc->dev,
+                                                            blk, 1, fill_buf);
+                               if (blks != 1) {
+                                       printf(
+                                           "%s: Write failed, block # " LBAFU "\n",
+                                           __func__, blkcnt);
+                                       fastboot_fail("flash write failure");
+                                       free(fill_buf);
+                                       return;
+                               }
+                               blk++;
+                       }
+                       bytes_written += blkcnt * info->blksz;
+                       total_blocks += chunk_data_sz / sparse_header->blk_sz;
+
+                       free(fill_buf);
+                       break;
+
+                       case CHUNK_TYPE_DONT_CARE:
+                       total_blocks += chunk_header->chunk_sz;
+                       break;
+
+                       case CHUNK_TYPE_CRC32:
+                       if (chunk_header->total_sz !=
+                           sparse_header->chunk_hdr_sz)
+                       {
+                               fastboot_fail(
+                                       "Bogus chunk size for chunk type Dont Care");
+                               return;
+                       }
+                       total_blocks += chunk_header->chunk_sz;
+                       data += chunk_data_sz;
+                       break;
+
+                       default:
+                       printf("%s: Unknown chunk type: %x\n", __func__,
+                              chunk_header->chunk_type);
+                       fastboot_fail("Unknown chunk type");
+                       return;
+               }
+       }
+
+       debug("Wrote %d blocks, expected to write %d blocks\n",
+             total_blocks, sparse_header->total_blks);
+       printf("........ wrote %u bytes to '%s'\n", bytes_written, part_name);
+
+       if (total_blocks != sparse_header->total_blks)
+               fastboot_fail("sparse image write failure");
+
+       fastboot_okay("");
+       return;
+}
index 4ece2b6c9fe34385b5d3dd9b4452f610cf16e708..ea33eadc16e8844bc380251367a870c637658174 100644 (file)
@@ -831,6 +831,8 @@ static init_fnc_t init_sequence_f[] = {
 #ifdef CONFIG_OF_CONTROL
        fdtdec_check_fdt,
 #endif
+       initf_malloc,
+       initf_dm,
 #if defined(CONFIG_BOARD_EARLY_INIT_F)
        board_early_init_f,
 #endif
@@ -866,8 +868,6 @@ static init_fnc_t init_sequence_f[] = {
        sdram_adjust_866,
        init_timebase,
 #endif
-       initf_malloc,
-       initf_dm,
        init_baud_rate,         /* initialze baudrate settings */
        serial_init,            /* serial communications setup */
        console_init_f,         /* stage 1 init of console */
index f9647e13583f262a0fd78a389405027bc2108adb..231c6d67115e871eb10c5619fc5227e413a1ea53 100644 (file)
@@ -715,6 +715,15 @@ init_fnc_t init_sequence_r[] = {
        /* TODO: could x86/PPC have this also perhaps? */
 #ifdef CONFIG_ARM
        initr_caches,
+#endif
+       initr_reloc_global_data,
+       initr_barrier,
+       initr_malloc,
+       bootstage_relocate,
+#ifdef CONFIG_DM
+       initr_dm,
+#endif
+#ifdef CONFIG_ARM
        board_init,     /* Setup chipselects */
 #endif
        /*
@@ -726,7 +735,7 @@ init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_CLOCKS
        set_cpu_clk_info, /* Setup clock information */
 #endif
-       initr_reloc_global_data,
+       stdio_init_tables,
        initr_serial,
        initr_announce,
        INIT_FUNC_WATCHDOG_RESET
@@ -762,12 +771,6 @@ init_fnc_t init_sequence_r[] = {
 #endif
 #ifdef CONFIG_WINBOND_83C553
        initr_w83c553f,
-#endif
-       initr_barrier,
-       initr_malloc,
-       bootstage_relocate,
-#ifdef CONFIG_DM
-       initr_dm,
 #endif
 #ifdef CONFIG_ARCH_EARLY_INIT_R
        arch_early_init_r,
@@ -818,7 +821,7 @@ init_fnc_t init_sequence_r[] = {
         */
        initr_pci,
 #endif
-       stdio_init,
+       stdio_add_devices,
        initr_jumptable,
 #ifdef CONFIG_API
        initr_api,
@@ -912,7 +915,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
        int i;
 #endif
 
-#ifndef CONFIG_X86
+#if !defined(CONFIG_X86) && !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
        gd = new_gd;
 #endif
 
index 9eece6d758bb6eede91da046a2db5774808c1dec..054d9e0302ccbd9bff1f17874b284c5234763da7 100644 (file)
@@ -23,7 +23,7 @@ static int addr_aligned(struct bounce_buffer *state)
 
        /* Check if length is aligned */
        if (state->len != state->len_aligned) {
-               debug("Unaligned buffer length %d\n", state->len);
+               debug("Unaligned buffer length %zu\n", state->len);
                return 0;
        }
 
index 1febddb916c2fc6603ab890679782700923b88fa..bfca59e351f0f6705b9949b911b1aa2bf2d93af2 100644 (file)
@@ -215,7 +215,7 @@ static int do_mem_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 }
 
 #ifdef CONFIG_MX_CYCLIC
-int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_mdc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        int i;
        ulong count;
@@ -242,7 +242,7 @@ int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        return 0;
 }
 
-int do_mem_mwc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_mwc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        int i;
        ulong count;
@@ -595,7 +595,8 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc,
 }
 
 #ifdef CONFIG_LOOPW
-int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_loopw(cmd_tbl_t *cmdtp, int flag, int argc,
+                       char * const argv[])
 {
        ulong   addr, length, i, bytes;
        int     size;
index 3cb0571df39a4dc0797f93df887dea76768f6484..422c069513843f930ce1eeccf2a9aa2e89b7fcf1 100644 (file)
@@ -862,7 +862,7 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_
        debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n",
                        id->type, MTD_DEV_TYPE(id->type),
                        id->num, id->mtd_id);
-       debug("parsing partitions %.*s\n", (pend ? pend - p : strlen(p)), p);
+       debug("parsing partitions %.*s\n", (int)(pend ? pend - p : strlen(p)), p);
 
 
        /* parse partitions */
@@ -1007,7 +1007,7 @@ static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_
        list_for_each(entry, &mtdids) {
                id = list_entry(entry, struct mtdids, link);
 
-               debug("entry: '%s' (len = %d)\n",
+               debug("entry: '%s' (len = %zu)\n",
                                id->mtd_id, strlen(id->mtd_id));
 
                if (mtd_id_len != strlen(id->mtd_id))
index 8a621ad1fc755aaa4b7313e01c29348ec6f5bcd2..d357463695f3c0cc85dd2b88ce2504a7312dd97a 100644 (file)
@@ -103,7 +103,7 @@ static char remcomOutBuffer[BUFMAX];
 static char remcomRegBuffer[BUFMAX];
 
 static int initialized = 0;
-static int kgdb_active = 0, first_entry = 1;
+static int kgdb_active;
 static struct pt_regs entry_regs;
 static long error_jmp_buf[BUFMAX/2];
 static int longjmp_on_fault = 0;
@@ -348,16 +348,7 @@ handle_exception (struct pt_regs *regs)
 
        kgdb_enter(regs, &kd);
 
-       if (first_entry) {
-               /*
-                * the first time we enter kgdb, we save the processor
-                * state so that we can return to the monitor if the
-                * remote end quits gdb (or at least, tells us to quit
-                * with the 'k' packet)
-                */
-               entry_regs = *regs;
-               first_entry = 0;
-       }
+       entry_regs = *regs;
 
        ptr = remcomOutBuffer;
 
@@ -459,7 +450,6 @@ handle_exception (struct pt_regs *regs)
                case 'k':    /* kill the program, actually return to monitor */
                        kd.extype = KGDBEXIT_KILL;
                        *regs = entry_regs;
-                       first_entry = 1;
                        goto doexit;
 
                case 'C':    /* CSS  continue with signal SS */
index 774fdad2523b7ff0e4f5a48371756053fda0e7a6..b16664f8454012043de15e34f2bdf0ec8ef40311 100644 (file)
@@ -86,7 +86,7 @@ void spl_parse_image_header(const struct image_header *header)
                spl_image.os = image_get_os(header);
                spl_image.name = image_get_name(header);
                debug("spl: payload image: %.*s load addr: 0x%x size: %d\n",
-                       sizeof(spl_image.name), spl_image.name,
+                       (int)sizeof(spl_image.name), spl_image.name,
                        spl_image.load_addr, spl_image.size);
        } else {
                /* Signature not found - assume u-boot.bin */
index 692ca7f1cdf595ddb548673b4131983e41e2a6b1..c878103a4826b6d9f72b669125523a9b613d6bb3 100644 (file)
@@ -215,7 +215,7 @@ int stdio_deregister(const char *devname)
 }
 #endif /* CONFIG_SYS_STDIO_DEREGISTER */
 
-int stdio_init (void)
+int stdio_init_tables(void)
 {
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
        /* already relocated for current ARM implementation */
@@ -232,6 +232,11 @@ int stdio_init (void)
        /* Initialize the list */
        INIT_LIST_HEAD(&(devs.list));
 
+       return 0;
+}
+
+int stdio_add_devices(void)
+{
 #ifdef CONFIG_SYS_I2C
        i2c_init_all();
 #else
@@ -265,5 +270,14 @@ int stdio_init (void)
 #ifdef CONFIG_CBMEM_CONSOLE
        cbmemc_init();
 #endif
-       return (0);
+
+       return 0;
+}
+
+int stdio_init(void)
+{
+       stdio_init_tables();
+       stdio_add_devices();
+
+       return 0;
 }
diff --git a/configs/ls1021aqds_nor_defconfig b/configs/ls1021aqds_nor_defconfig
new file mode 100644 (file)
index 0000000..9e42d61
--- /dev/null
@@ -0,0 +1,2 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021AQDS=y
diff --git a/configs/ls1021atwr_nor_defconfig b/configs/ls1021atwr_nor_defconfig
new file mode 100644 (file)
index 0000000..5f465d3
--- /dev/null
@@ -0,0 +1,2 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021ATWR=y
diff --git a/doc/README.clang b/doc/README.clang
new file mode 100644 (file)
index 0000000..9ad689f
--- /dev/null
@@ -0,0 +1,56 @@
+The biggest problem when trying to compile U-boot with clang is that
+almost all archs rely on storing gd in a global register and clang user
+manual states: "clang does not support global register variables; this
+is unlikely to be implemented soon because it requires additional LLVM
+backend support."
+
+Since version 3.4 the ARM backend can be instructed to leave r9 alone.
+Global registers themselves are not supported so some inline assembly is
+used to get its value. This does lead to larger code then strictly
+necessary, but at least works.
+
+NOTE: target compilation only work for _some_ ARM boards at the moment.
+Also Aarch64 is not supported: Most notably boards which aren't using
+the generic board will fail to compile, but since those are expected
+to be converted this will solve itself. Boards which reassign gd in c
+will also fail to compile, but there is in no strict reason to do so
+in the ARM world, since crt0.S takes care of this. These assignments
+can be avoided by changing the init calls but this is not in mainline yet.
+
+NOTE: without the -mllvm -arm-use-movt=0 flags u-boot will compile
+fine, but llvm might hardcode addresses in movw / movt pairs, which
+cannot be relocated and u-boot will fail at runtime.
+
+Debian (based)
+--------------
+Binary packages can be installed as usual, e.g.:
+sudo apt-get install clang
+
+To compile U-Boot with clang on linux without IAS use e.g.:
+export TRIPLET=arm-linux-gnueabi && export CROSS_COMPILE="$TRIPLET-"
+make HOSTCC=clang CC="clang -target $TRIPLET -mllvm -arm-use-movt=0 -no-integrated-as" rpi_b_defconfig
+make HOSTCC=clang CC="clang -target $TRIPLET -mllvm -arm-use-movt=0 -no-integrated-as" all V=1 -j8
+
+FreeBSD 11 (Current):
+--------------------
+Since llvm 3.4 is currently in the base system, the integrated as is
+incapable of building U-Boot. Therefore gas from devel/arm-eabi-binutils
+is used instead. It needs a symlinks to be picked up correctly though:
+
+ln -s /usr/local/bin/arm-eabi-as /usr/bin/arm-freebsd-eabi-as
+
+# The following commands compile U-Boot using the clang xdev toolchain.
+# NOTE: CROSS_COMPILE and target differ on purpose!
+export CROSS_COMPILE=arm-eabi-
+gmake CC="clang -target arm-freebsd-eabi --sysroot /usr/arm-freebsd -no-integrated-as -mllvm -arm-use-movt=0" rpi_b_defconfig
+gmake CC="clang -target arm-freebsd-eabi --sysroot /usr/arm-freebsd -no-integrated-as -mllvm -arm-use-movt=0" -j8
+
+Given that u-boot will default to gcc, above commands can be
+simplified with a simple wrapper script, listed below.
+
+/usr/local/bin/arm-eabi-gcc
+---
+#!/bin/sh
+
+exec clang -target arm-freebsd-eabi --sysroot /usr/arm-freebsd -no-integrated-as -mllvm -arm-use-movt=0 "$@"
+
diff --git a/doc/README.fsl-esdhc b/doc/README.fsl-esdhc
new file mode 100644 (file)
index 0000000..b70f271
--- /dev/null
@@ -0,0 +1,5 @@
+CONFIG_SYS_FSL_ESDHC_LE means ESDHC IP is in little-endian mode.
+CONFIG_SYS_FSL_ESDHC_BE means ESDHC IP is in big-endian mode.
+
+Accessing ESDHC registers can be determined by ESDHC IP's endian
+mode or processor's endian mode.
index 7ef5a225d9c8c1e32e0dc1a3d8581700dda45747..2f5034f362d3bd013a72e203bb686486c91eed3f 100644 (file)
@@ -12,12 +12,14 @@ The list should be sorted in reverse chronological order.
 
 Board            Arch        CPU            Commit      Removed     Last known maintainer/contact
 =================================================================================================
-flagadm          powerpc     mpc8xx         -           -           Kári Davíðsson <kd@flaga.is>
-gen860t          powerpc     mpc8xx         -           -           Keith Outwater <Keith_Outwater@mvis.com>
-sixnet           powerpc     mpc8xx         -           -           Dave Ellis <DGE@sixnetio.com>
-svm_sc8xx        powerpc     mpc8xx         -           -           John Zhan <zhanz@sinovee.com>
-stxxtc           powerpc     mpc8xx         -           -           Dan Malek <dan@embeddedalley.com>
-omap5912osk      arm         arm926ejs      -           -           Rishi Bhattacharya <rishi@ti.com>
+PK1C20           nios2       -              70fbc461    2014-08-24  Scott McNutt <smcnutt@psyent.com>
+PCI5441          nios2       -              70fbc461    2014-08-24  Scott McNutt <smcnutt@psyent.com>
+flagadm          powerpc     mpc8xx         aec6f8c5    2014-08-22  Kári Davíðsson <kd@flaga.is>
+gen860t          powerpc     mpc8xx         6bde1ec1    2014-08-22  Keith Outwater <Keith_Outwater@mvis.com>
+sixnet           powerpc     mpc8xx         4723ce49    2014-08-22  Dave Ellis <DGE@sixnetio.com>
+svm_sc8xx        powerpc     mpc8xx         d1a4aafd    2014-08-22  John Zhan <zhanz@sinovee.com>
+stxxtc           powerpc     mpc8xx         0ace4d9d    2014-08-22  Dan Malek <dan@embeddedalley.com>
+omap5912osk      arm         arm926ejs      62d636aa    2014-08-22  Rishi Bhattacharya <rishi@ti.com>
 p1023rds         powerpc     mpc85xx        d0bc5140    2014-07-22  Roy Zang <tie-fei.zang@freescale.com>
 spc1920          powerpc     mpc8xx         98ad54be    2014-07-07
 v37              powerpc     mpc8xx         b8c1438a    2014-07-07
diff --git a/doc/device-tree-bindings/serial/ns16550.txt b/doc/device-tree-bindings/serial/ns16550.txt
new file mode 100644 (file)
index 0000000..ef0b9ae
--- /dev/null
@@ -0,0 +1,10 @@
+NS16550 UART
+
+This UART driver supports many chip variants and is used in mamy SoCs.
+
+Required properties:
+- compatible: "ns16550" or "nvidia,tegra20-uart"
+- reg: start address and size of registers
+- reg-shift: shift value indicating register size: 0=byte, 1=16bit,2=32bit etc.
+- clock-frequency: input clock frequency for the UART (used to calculate the
+    baud rate divisor)
diff --git a/doc/device-tree-bindings/serial/sandbox-serial.txt b/doc/device-tree-bindings/serial/sandbox-serial.txt
new file mode 100644 (file)
index 0000000..f429c90
--- /dev/null
@@ -0,0 +1,13 @@
+Sandbox serial
+
+The sandbox serial device is an emulated device which displays its output
+on the host machine's console, and accepts input from its keyboard.
+
+Required properties:
+  compatible: "sandbox,serial"
+
+Optional properties:
+  sandbox,text-colour: If present, this is the colour of the console text.
+        Supported values are:
+        "black", "red", "green", "yellow", "blue", "megenta", "cyan",
+        "white"
index 0f08bfd6ff2c16d74bdd319b70233e4f327242a7..699f94b435f213a0e78e91e4d2e854ae45473e7b 100644 (file)
@@ -118,7 +118,8 @@ static int driver_check_compatible(const void *blob, int offset,
        return -ENOENT;
 }
 
-int lists_bind_fdt(struct udevice *parent, const void *blob, int offset)
+int lists_bind_fdt(struct udevice *parent, const void *blob, int offset,
+                  struct udevice **devp)
 {
        struct driver *driver = ll_entry_start(struct driver, driver);
        const int n_ents = ll_entry_count(struct driver, driver);
@@ -130,6 +131,8 @@ int lists_bind_fdt(struct udevice *parent, const void *blob, int offset)
        int ret = 0;
 
        dm_dbg("bind node %s\n", fdt_get_name(blob, offset, NULL));
+       if (devp)
+               *devp = NULL;
        for (entry = driver; entry != driver + n_ents; entry++) {
                ret = driver_check_compatible(blob, offset, entry->of_match);
                name = fdt_get_name(blob, offset, NULL);
@@ -149,10 +152,11 @@ int lists_bind_fdt(struct udevice *parent, const void *blob, int offset)
                ret = device_bind(parent, entry, name, NULL, offset, &dev);
                if (ret) {
                        dm_warn("Error binding driver '%s'\n", entry->name);
-                       if (!result || ret != -ENOENT)
-                               result = ret;
+                       return ret;
                } else {
                        found = true;
+                       if (devp)
+                               *devp = dev;
                }
                break;
        }
index 393dd98b9db248c2c5d8ef89d280d1568cb3d759..a328a4876f13ad68df6d5fddd8817df622d0195d 100644 (file)
@@ -91,7 +91,7 @@ int dm_scan_fdt_node(struct udevice *parent, const void *blob, int offset,
                if (pre_reloc_only &&
                    !fdt_getprop(blob, offset, "u-boot,dm-pre-reloc", NULL))
                        continue;
-               err = lists_bind_fdt(parent, blob, offset);
+               err = lists_bind_fdt(parent, blob, offset, NULL);
                if (err && !ret)
                        ret = err;
        }
index d4ed9aec2ae7a08b103aa41367887140d759f71c..59f2fd661096964a79c4edcc302084c39a7adf80 100644 (file)
@@ -194,7 +194,7 @@ step2:
         * For example, 2GB on 666MT/s 64-bit bus takes about 402ms
         * Let's wait for 800ms
         */
-       bus_width = 3 - ((ddr->sdram_cfg & SDRAM_CFG_DBW_MASK)
+       bus_width = 3 - ((ddr_in32(&ddr->sdram_cfg) & SDRAM_CFG_DBW_MASK)
                        >> SDRAM_CFG_DBW_SHIFT);
        timeout = ((total_gb_size_per_controller << (6 - bus_width)) * 100 /
                (get_ddr_freq(0) >> 20)) << 1;
index 04e4178b15d7273ae9a6eb43c1b5b5bd4bcd0666..d9cac2296a20afc431dcefa64bba109cd7e6a250 100644 (file)
@@ -693,6 +693,7 @@ static void set_ddr_sdram_cfg(fsl_ddr_cfg_regs_t *ddr,
        unsigned int x32_en = 0;        /* x32 enable */
        unsigned int pchb8 = 0;         /* precharge bit 8 enable */
        unsigned int hse;               /* Global half strength override */
+       unsigned int acc_ecc_en = 0;    /* Accumulated ECC enable */
        unsigned int mem_halt = 0;      /* memory controller halt */
        unsigned int bi = 0;            /* Bypass initialization */
 
@@ -736,6 +737,9 @@ static void set_ddr_sdram_cfg(fsl_ddr_cfg_regs_t *ddr,
        ba_intlv_ctl = popts->ba_intlv_ctl;
        hse = popts->half_strength_driver_enable;
 
+       /* set when ddr bus width < 64 */
+       acc_ecc_en = (dbw != 0 && ecc_en == 1) ? 1 : 0;
+
        ddr->ddr_sdram_cfg = (0
                        | ((mem_en & 0x1) << 31)
                        | ((sren & 0x1) << 30)
@@ -752,6 +756,7 @@ static void set_ddr_sdram_cfg(fsl_ddr_cfg_regs_t *ddr,
                        | ((x32_en & 0x1) << 5)
                        | ((pchb8 & 0x1) << 4)
                        | ((hse & 0x1) << 3)
+                       | ((acc_ecc_en & 0x1) << 2)
                        | ((mem_halt & 0x1) << 1)
                        | ((bi & 0x1) << 0)
                        );
@@ -2271,6 +2276,9 @@ compute_fsl_memctl_config_regs(const memctl_options_t *popts,
        if (ip_rev > 0x40400)
                unq_mrs_en = 1;
 
+       if (ip_rev > 0x40700)
+               ddr->debug[18] = popts->cswl_override;
+
        set_ddr_sdram_cfg_2(ddr, popts, unq_mrs_en);
        set_ddr_sdram_mode(ddr, popts, common_dimm,
                                cas_latency, additive_latency, unq_mrs_en);
index 7fb418744e0a32c55355f18c20fd6dbabd8501dc..6aa16b23ddc95f6df53077fd2c789141dee4eb19 100644 (file)
@@ -511,6 +511,7 @@ static void fsl_ddr_options_edit(fsl_ddr_info_t *pinfo,
                CTRL_OPTIONS(wrlvl_override),
                CTRL_OPTIONS(wrlvl_sample),
                CTRL_OPTIONS(wrlvl_start),
+               CTRL_OPTIONS(cswl_override),
                CTRL_OPTIONS(rcw_override),
                CTRL_OPTIONS(rcw_1),
                CTRL_OPTIONS(rcw_2),
@@ -801,6 +802,7 @@ static void print_memctl_options(const memctl_options_t *popts)
                CTRL_OPTIONS(wrlvl_override),
                CTRL_OPTIONS(wrlvl_sample),
                CTRL_OPTIONS(wrlvl_start),
+               CTRL_OPTIONS_HEX(cswl_override),
                CTRL_OPTIONS(rcw_override),
                CTRL_OPTIONS(rcw_1),
                CTRL_OPTIONS(rcw_2),
index fea9d17f8e628b1a98fdbd2c921396ba78f3d644..1cc4abb8a938b16ccc1322a6adcc903bc064b299 100644 (file)
  */
 
 #include <common.h>
+#include <dm.h>
+#include <malloc.h>
+#include <errno.h>
+#include <fdtdec.h>
 #include <asm/io.h>
 #include <asm/bitops.h>
 #include <asm/arch/tegra.h>
 #include <asm/gpio.h>
+#include <dm/device-internal.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 enum {
        TEGRA_CMD_INFO,
@@ -24,14 +31,18 @@ enum {
        TEGRA_CMD_INPUT,
 };
 
-static struct gpio_names {
-       char name[GPIO_NAME_SIZE];
-} gpio_names[MAX_NUM_GPIOS];
+struct tegra_gpio_platdata {
+       struct gpio_ctlr_bank *bank;
+       const char *port_name;  /* Name of port, e.g. "B" */
+       int base_gpio;          /* Port number for this port (0, 1,.., n-1) */
+};
 
-static char *get_name(int i)
-{
-       return *gpio_names[i].name ? gpio_names[i].name : "UNKNOWN";
-}
+/* Information about each port at run-time */
+struct tegra_port_info {
+       char label[TEGRA_GPIOS_PER_PORT][GPIO_NAME_SIZE];
+       struct gpio_ctlr_bank *bank;
+       int base_gpio;          /* Port number for this port (0, 1,.., n-1) */
+};
 
 /* Return config of pin 'gpio' as GPIO (1) or SFPIO (0) */
 static int get_config(unsigned gpio)
@@ -121,38 +132,72 @@ static void set_level(unsigned gpio, int high)
        writel(u, &bank->gpio_out[GPIO_PORT(gpio)]);
 }
 
+static int check_reserved(struct udevice *dev, unsigned offset,
+                         const char *func)
+{
+       struct tegra_port_info *state = dev_get_priv(dev);
+       struct gpio_dev_priv *uc_priv = dev->uclass_priv;
+
+       if (!*state->label[offset]) {
+               printf("tegra_gpio: %s: error: gpio %s%d not reserved\n",
+                      func, uc_priv->bank_name, offset);
+               return -EBUSY;
+       }
+
+       return 0;
+}
+
+/* set GPIO pin 'gpio' as an output, with polarity 'value' */
+int tegra_spl_gpio_direction_output(int gpio, int value)
+{
+       /* Configure as a GPIO */
+       set_config(gpio, 1);
+
+       /* Configure GPIO output value. */
+       set_level(gpio, value);
+
+       /* Configure GPIO direction as output. */
+       set_direction(gpio, 1);
+
+       return 0;
+}
+
 /*
  * Generic_GPIO primitives.
  */
 
-int gpio_request(unsigned gpio, const char *label)
+static int tegra_gpio_request(struct udevice *dev, unsigned offset,
+                             const char *label)
 {
-       if (gpio >= MAX_NUM_GPIOS)
-               return -1;
+       struct tegra_port_info *state = dev_get_priv(dev);
 
-       if (label != NULL) {
-               strncpy(gpio_names[gpio].name, label, GPIO_NAME_SIZE);
-               gpio_names[gpio].name[GPIO_NAME_SIZE - 1] = '\0';
-       }
+       if (*state->label[offset])
+               return -EBUSY;
+
+       strncpy(state->label[offset], label, GPIO_NAME_SIZE);
+       state->label[offset][GPIO_NAME_SIZE - 1] = '\0';
 
        /* Configure as a GPIO */
-       set_config(gpio, 1);
+       set_config(state->base_gpio + offset, 1);
 
        return 0;
 }
 
-int gpio_free(unsigned gpio)
+static int tegra_gpio_free(struct udevice *dev, unsigned offset)
 {
-       if (gpio >= MAX_NUM_GPIOS)
-               return -1;
+       struct tegra_port_info *state = dev_get_priv(dev);
+       int ret;
+
+       ret = check_reserved(dev, offset, __func__);
+       if (ret)
+               return ret;
+       state->label[offset][0] = '\0';
 
-       gpio_names[gpio].name[0] = '\0';
-       /* Do not configure as input or change pin mux here */
        return 0;
 }
 
 /* read GPIO OUT value of pin 'gpio' */
-static int gpio_get_output_value(unsigned gpio)
+static int tegra_gpio_get_output_value(unsigned gpio)
 {
        struct gpio_ctlr *ctlr = (struct gpio_ctlr *)NV_PA_GPIO_BASE;
        struct gpio_ctlr_bank *bank = &ctlr->gpio_bank[GPIO_BANK(gpio)];
@@ -166,24 +211,34 @@ static int gpio_get_output_value(unsigned gpio)
        return (val >> GPIO_BIT(gpio)) & 1;
 }
 
+
 /* set GPIO pin 'gpio' as an input */
-int gpio_direction_input(unsigned gpio)
+static int tegra_gpio_direction_input(struct udevice *dev, unsigned offset)
 {
-       debug("gpio_direction_input: pin = %d (port %d:bit %d)\n",
-               gpio, GPIO_FULLPORT(gpio), GPIO_BIT(gpio));
+       struct tegra_port_info *state = dev_get_priv(dev);
+       int ret;
+
+       ret = check_reserved(dev, offset, __func__);
+       if (ret)
+               return ret;
 
        /* Configure GPIO direction as input. */
-       set_direction(gpio, 0);
+       set_direction(state->base_gpio + offset, 0);
 
        return 0;
 }
 
 /* set GPIO pin 'gpio' as an output, with polarity 'value' */
-int gpio_direction_output(unsigned gpio, int value)
+static int tegra_gpio_direction_output(struct udevice *dev, unsigned offset,
+                                      int value)
 {
-       debug("gpio_direction_output: pin = %d (port %d:bit %d) = %s\n",
-               gpio, GPIO_FULLPORT(gpio), GPIO_BIT(gpio),
-               value ? "HIGH" : "LOW");
+       struct tegra_port_info *state = dev_get_priv(dev);
+       int gpio = state->base_gpio + offset;
+       int ret;
+
+       ret = check_reserved(dev, offset, __func__);
+       if (ret)
+               return ret;
 
        /* Configure GPIO output value. */
        set_level(gpio, value);
@@ -195,25 +250,38 @@ int gpio_direction_output(unsigned gpio, int value)
 }
 
 /* read GPIO IN value of pin 'gpio' */
-int gpio_get_value(unsigned gpio)
+static int tegra_gpio_get_value(struct udevice *dev, unsigned offset)
 {
-       struct gpio_ctlr *ctlr = (struct gpio_ctlr *)NV_PA_GPIO_BASE;
-       struct gpio_ctlr_bank *bank = &ctlr->gpio_bank[GPIO_BANK(gpio)];
+       struct tegra_port_info *state = dev_get_priv(dev);
+       int gpio = state->base_gpio + offset;
+       int ret;
        int val;
 
-       debug("gpio_get_value: pin = %d (port %d:bit %d)\n",
-               gpio, GPIO_FULLPORT(gpio), GPIO_BIT(gpio));
+       ret = check_reserved(dev, offset, __func__);
+       if (ret)
+               return ret;
+
+       debug("%s: pin = %d (port %d:bit %d)\n", __func__,
+             gpio, GPIO_FULLPORT(gpio), GPIO_BIT(gpio));
 
-       val = readl(&bank->gpio_in[GPIO_PORT(gpio)]);
+       val = readl(&state->bank->gpio_in[GPIO_PORT(gpio)]);
 
        return (val >> GPIO_BIT(gpio)) & 1;
 }
 
 /* write GPIO OUT value to pin 'gpio' */
-int gpio_set_value(unsigned gpio, int value)
+static int tegra_gpio_set_value(struct udevice *dev, unsigned offset, int value)
 {
+       struct tegra_port_info *state = dev_get_priv(dev);
+       int gpio = state->base_gpio + offset;
+       int ret;
+
+       ret = check_reserved(dev, offset, __func__);
+       if (ret)
+               return ret;
+
        debug("gpio_set_value: pin = %d (port %d:bit %d), value = %d\n",
-               gpio, GPIO_FULLPORT(gpio), GPIO_BIT(gpio), value);
+             gpio, GPIO_FULLPORT(gpio), GPIO_BIT(gpio), value);
 
        /* Configure GPIO output value. */
        set_level(gpio, value);
@@ -241,26 +309,175 @@ void gpio_config_table(const struct tegra_gpio_config *config, int len)
        }
 }
 
-/*
- * Display Tegra GPIO information
+static int tegra_gpio_get_function(struct udevice *dev, unsigned offset)
+{
+       struct tegra_port_info *state = dev_get_priv(dev);
+       int gpio = state->base_gpio + offset;
+
+       if (!*state->label[offset])
+               return GPIOF_UNUSED;
+       if (!get_config(gpio))
+               return GPIOF_FUNC;
+       else if (get_direction(gpio))
+               return GPIOF_OUTPUT;
+       else
+               return GPIOF_INPUT;
+}
+
+static int tegra_gpio_get_state(struct udevice *dev, unsigned int offset,
+                               char *buf, int bufsize)
+{
+       struct gpio_dev_priv *uc_priv = dev->uclass_priv;
+       struct tegra_port_info *state = dev_get_priv(dev);
+       int gpio = state->base_gpio + offset;
+       const char *label;
+       int is_output;
+       int is_gpio;
+       int size;
+
+       label = state->label[offset];
+       is_gpio = get_config(gpio); /* GPIO, not SFPIO */
+       size = snprintf(buf, bufsize, "%s%d: ",
+                       uc_priv->bank_name ? uc_priv->bank_name : "", offset);
+       buf += size;
+       bufsize -= size;
+       if (is_gpio) {
+               is_output = get_direction(gpio);
+
+               snprintf(buf, bufsize, "%s: %d [%c]%s%s",
+                        is_output ? "out" : " in",
+                        is_output ?
+                               tegra_gpio_get_output_value(gpio) :
+                               tegra_gpio_get_value(dev, offset),
+                        *label ? 'x' : ' ',
+                        *label ? " " : "",
+                        label);
+       } else {
+               snprintf(buf, bufsize, "sfpio");
+       }
+
+       return 0;
+}
+
+static const struct dm_gpio_ops gpio_tegra_ops = {
+       .request                = tegra_gpio_request,
+       .free                   = tegra_gpio_free,
+       .direction_input        = tegra_gpio_direction_input,
+       .direction_output       = tegra_gpio_direction_output,
+       .get_value              = tegra_gpio_get_value,
+       .set_value              = tegra_gpio_set_value,
+       .get_function           = tegra_gpio_get_function,
+       .get_state              = tegra_gpio_get_state,
+};
+
+/**
+ * Returns the name of a GPIO port
+ *
+ * GPIOs are named A, B, C, ..., Z, AA, BB, CC, ...
+ *
+ * @base_port: Base port number (0, 1..n-1)
+ * @return allocated string containing the name
  */
-void gpio_info(void)
+static char *gpio_port_name(int base_port)
 {
-       unsigned c;
-       int type;
+       char *name, *s;
+
+       name = malloc(3);
+       if (name) {
+               s = name;
+               *s++ = 'A' + (base_port % 26);
+               if (base_port >= 26)
+                       *s++ = *name;
+               *s = '\0';
+       }
 
-       for (c = 0; c < MAX_NUM_GPIOS; c++) {
-               type = get_config(c);           /* GPIO, not SFPIO */
-               if (type) {
-                       printf("GPIO_%d:\t%s is an %s, ", c,
-                               get_name(c),
-                               get_direction(c) ? "OUTPUT" : "INPUT");
-                       if (get_direction(c))
-                               printf("value = %d", gpio_get_output_value(c));
-                       else
-                               printf("value = %d", gpio_get_value(c));
-                       printf("\n");
-               } else
-                       continue;
+       return name;
+}
+
+static const struct udevice_id tegra_gpio_ids[] = {
+       { .compatible = "nvidia,tegra30-gpio" },
+       { .compatible = "nvidia,tegra20-gpio" },
+       { }
+};
+
+static int gpio_tegra_probe(struct udevice *dev)
+{
+       struct gpio_dev_priv *uc_priv = dev->uclass_priv;
+       struct tegra_port_info *priv = dev->priv;
+       struct tegra_gpio_platdata *plat = dev->platdata;
+
+       /* Only child devices have ports */
+       if (!plat)
+               return 0;
+
+       priv->bank = plat->bank;
+       priv->base_gpio = plat->base_gpio;
+
+       uc_priv->gpio_count = TEGRA_GPIOS_PER_PORT;
+       uc_priv->bank_name = plat->port_name;
+
+       return 0;
+}
+
+/**
+ * We have a top-level GPIO device with no actual GPIOs. It has a child
+ * device for each Tegra port.
+ */
+static int gpio_tegra_bind(struct udevice *parent)
+{
+       struct tegra_gpio_platdata *plat = parent->platdata;
+       struct gpio_ctlr *ctlr;
+       int bank_count;
+       int bank;
+       int ret;
+       int len;
+
+       /* If this is a child device, there is nothing to do here */
+       if (plat)
+               return 0;
+
+       /*
+        * This driver does not make use of interrupts, other than to figure
+        * out the number of GPIO banks
+        */
+       if (!fdt_getprop(gd->fdt_blob, parent->of_offset, "interrupts", &len))
+               return -EINVAL;
+       bank_count = len / 3 / sizeof(u32);
+       ctlr = (struct gpio_ctlr *)fdtdec_get_addr(gd->fdt_blob,
+                                                  parent->of_offset, "reg");
+       for (bank = 0; bank < bank_count; bank++) {
+               int port;
+
+               for (port = 0; port < TEGRA_PORTS_PER_BANK; port++) {
+                       struct tegra_gpio_platdata *plat;
+                       struct udevice *dev;
+                       int base_port;
+
+                       plat = calloc(1, sizeof(*plat));
+                       if (!plat)
+                               return -ENOMEM;
+                       plat->bank = &ctlr->gpio_bank[bank];
+                       base_port = bank * TEGRA_PORTS_PER_BANK + port;
+                       plat->base_gpio = TEGRA_GPIOS_PER_PORT * base_port;
+                       plat->port_name = gpio_port_name(base_port);
+
+                       ret = device_bind(parent, parent->driver,
+                                         plat->port_name, plat, -1, &dev);
+                       if (ret)
+                               return ret;
+                       dev->of_offset = parent->of_offset;
+               }
        }
+
+       return 0;
 }
+
+U_BOOT_DRIVER(gpio_tegra) = {
+       .name   = "gpio_tegra",
+       .id     = UCLASS_GPIO,
+       .of_match = tegra_gpio_ids,
+       .bind   = gpio_tegra_bind,
+       .probe = gpio_tegra_probe,
+       .priv_auto_alloc_size = sizeof(struct tegra_port_info),
+       .ops    = &gpio_tegra_ops,
+};
index c14797ce0ed9d5961481d763e195ef0fe4e7cdd7..021b2fe511d26c9e35b617c60a35d8725e1f3d07 100644 (file)
@@ -423,7 +423,7 @@ static void * const i2c_bases[] = {
        (void *)IMX_I2C2_BASE
 #elif defined(CONFIG_MX31) || defined(CONFIG_MX35) || \
        defined(CONFIG_MX51) || defined(CONFIG_MX53) || \
-       defined(CONFIG_MX6)
+       defined(CONFIG_MX6) || defined(CONFIG_LS102XA)
        (void *)I2C1_BASE_ADDR,
        (void *)I2C2_BASE_ADDR,
        (void *)I2C3_BASE_ADDR
@@ -545,7 +545,7 @@ U_BOOT_I2C_ADAP_COMPLETE(mxc1, mxc_i2c_init, mxc_i2c_probe,
                         CONFIG_SYS_MXC_I2C2_SLAVE, 1)
 #if defined(CONFIG_MX31) || defined(CONFIG_MX35) ||\
        defined(CONFIG_MX51) || defined(CONFIG_MX53) ||\
-       defined(CONFIG_MX6)
+       defined(CONFIG_MX6) || defined(CONFIG_LS102XA)
 U_BOOT_I2C_ADAP_COMPLETE(mxc2, mxc_i2c_init, mxc_i2c_probe,
                         mxc_i2c_read, mxc_i2c_write,
                         mxc_i2c_set_bus_speed,
index 55416136ab2a46b15371be43517837b7c46b4aae..97d0389d9d6f8edbd18c8ea0bef6ce88bf362bcb 100644 (file)
@@ -96,7 +96,7 @@ static uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data *data)
        else if (cmd->resp_type & MMC_RSP_PRESENT)
                xfertyp |= XFERTYP_RSPTYP_48;
 
-#if defined(CONFIG_MX53) || defined(CONFIG_PPC_T4240)
+#if defined(CONFIG_MX53) || defined(CONFIG_PPC_T4240) || defined(CONFIG_LS102XA)
        if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
                xfertyp |= XFERTYP_CMDTYP_ABORT;
 #endif
@@ -561,7 +561,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
        memset(&cfg->cfg, 0, sizeof(cfg->cfg));
 
        voltage_caps = 0;
-       caps = regs->hostcapblt;
+       caps = esdhc_read32(&regs->hostcapblt);
 
 #ifdef CONFIG_SYS_FSL_ERRATUM_ESDHC135
        caps = caps & ~(ESDHC_HOSTCAPBLT_SRS |
index 39daeabd9f1e578741fc2a2403ae7d353c8fef05..3e36918f1cd8e5c59782555e27d5f44eec503370 100644 (file)
@@ -10,7 +10,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/kernel.h>
 #include <linux/module.h>
index 6ad03575f64e75d281ff258732ea2ca884172d18..e0b7e3af72f37e3720f89f9d9044dd9248e35c25 100644 (file)
@@ -9,7 +9,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/kernel.h>
index 2f20b92a8825896f9dc3330453beeb6580e95240..cfbaa3d9a0cbbfda3e6dda66dd889a20c95aca31 100644 (file)
@@ -9,7 +9,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/types.h>
index 085b1541cda9c6f721663a01e520bd3e959f5acd..7153e3ca3630a2219d09dfca487cc7dcafa00a55 100644 (file)
@@ -29,7 +29,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
index c8f28c792b2a3e21c919be0a725aca19fe794a28..cf4a82d93a929904560ebaad71c0be5018a04c10 100644 (file)
@@ -59,7 +59,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/slab.h>
 #include <linux/types.h>
index 54f9f138967fa29465559751f91fc2779cb4ff2d..9ed05778d371b1b7780859405e22bbfcbb6d44b4 100644 (file)
@@ -8,7 +8,6 @@
  * published by the Free Software Foundation.
  *
  */
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/mtd/nand.h>
index 9fce02ef267ae11d1e3039bbcd3d386c33e24092..1bdbfa71d910dba3fbef88b1d94cbf2fd1fb9c50 100644 (file)
@@ -70,7 +70,6 @@
  *   o Otherwise this is corruption type 2.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/err.h>
 #include <linux/slab.h>
index ff8bf0cedfcb6faed7591c7fca71abb48206be43..584cf5f22b38f4830ced26e6e011df1bd3115ac5 100644 (file)
@@ -17,7 +17,6 @@
  * later using the "UBI control device".
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/moduleparam.h>
index 0d65bf4b8a562f5cbc4549520cb0deedd40b21e7..9c54ea4db0c74f004840f76e830e746c52ede92c 100644 (file)
@@ -20,7 +20,6 @@
  * Version 2.  See the file COPYING for more details.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc32.h>
 #include <linux/kernel.h>
index af254da4883c375cc9dd39efdb4df43c6454ea46..6dcc4e4844bd33a3bdaccdd3b2a564a89452fcc7 100644 (file)
@@ -8,7 +8,6 @@
 
 #include <ubi_uboot.h>
 #include "ubi.h"
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/debugfs.h>
 #include <linux/uaccess.h>
index 980eb11ed235c50df8e1a6a1b129df22b3ac2435..bfa9dfb42bd411c9c7a651e1eed6be5ecee80b2e 100644 (file)
@@ -13,7 +13,6 @@ void ubi_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len);
 void ubi_dump_ec_hdr(const struct ubi_ec_hdr *ec_hdr);
 void ubi_dump_vid_hdr(const struct ubi_vid_hdr *vid_hdr);
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/random.h>
 #endif
index 3c2a7e69e1841aa587b6fd6a2e7bf2d4f3f7650b..fce0ff8bdf010d9de6d7058cd36c6e42a76501e3 100644 (file)
@@ -29,7 +29,6 @@
  * 64 bits is enough to never overflow.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/slab.h>
 #include <linux/crc32.h>
index 787522fa2ebfb2307c9034cc5a910db0c8949bd2..a2166e431c22fc463280958db829cf1b9baf0f63 100644 (file)
@@ -6,7 +6,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc32.h>
 #else
index 41d7eb763885ae3c527aa4b89c43614c3730e65b..0e2e9335fe5cc16fb25933fa3b2cfe9cdcd313ac 100644 (file)
@@ -73,7 +73,6 @@
  * back and writes the whole sub-page.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc32.h>
 #include <linux/err.h>
index 0183c93b0b040560f43c7275844ccadf67b57e5a..fd2bbd64f13835d67e25ad5275d550b3a1ca8058 100644 (file)
@@ -8,7 +8,6 @@
 
 /* This file mostly implements UBI kernel API functions */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/slab.h>
index 20fd704ecafd077af9249a254bd655ad2e71f612..754b3371d25c18b0f8403d2257a1636729098743 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef __UBI_UBI_H__
 #define __UBI_UBI_H__
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/types.h>
 #include <linux/list.h>
index 220c120515ac508f58eb9e1459cb8aed4d3eeb0e..c52c9ce776ad95fb9647e169ba90d7bccc4ce78b 100644 (file)
@@ -26,7 +26,6 @@
  * transaction with a roll-back capability.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/uaccess.h>
 #else
index d9665a446a3dbc1d5174af3dcbc0c88ba79a9170..f4392f59692ab0403e70935b457cc6bfd128f7c7 100644 (file)
@@ -11,7 +11,6 @@
  * resizing.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/err.h>
 #include <linux/slab.h>
index e6c8f5bbe0e00f54d32b180a95f1a9f28b7633b7..ae8ea38c625ee7b8041b683e0817e12c0d16eba1 100644 (file)
@@ -43,7 +43,6 @@
  * damaged.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc32.h>
 #include <linux/err.h>
index 102309016ac43d7a83de295218c4987b19da6c40..6886f89df25fd4db7d25c48d156d38fde3ee08a9 100644 (file)
@@ -86,7 +86,6 @@
  * room for future re-works of the WL sub-system.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/slab.h>
 #include <linux/crc32.h>
index af06d4fb8226ef1631296db5f164647ab7b46e91..46c82bbb40014a840231409bfbebd04df34d3075 100644 (file)
@@ -189,12 +189,12 @@ struct ethoc_bd {
        u32 addr;
 };
 
-static inline u32 ethoc_read(struct eth_device *dev, loff_t offset)
+static inline u32 ethoc_read(struct eth_device *dev, size_t offset)
 {
        return readl(dev->iobase + offset);
 }
 
-static inline void ethoc_write(struct eth_device *dev, loff_t offset, u32 data)
+static inline void ethoc_write(struct eth_device *dev, size_t offset, u32 data)
 {
        writel(data, dev->iobase + offset);
 }
@@ -202,7 +202,7 @@ static inline void ethoc_write(struct eth_device *dev, loff_t offset, u32 data)
 static inline void ethoc_read_bd(struct eth_device *dev, int index,
                                 struct ethoc_bd *bd)
 {
-       loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
+       size_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
        bd->stat = ethoc_read(dev, offset + 0);
        bd->addr = ethoc_read(dev, offset + 4);
 }
@@ -210,7 +210,7 @@ static inline void ethoc_read_bd(struct eth_device *dev, int index,
 static inline void ethoc_write_bd(struct eth_device *dev, int index,
                                  const struct ethoc_bd *bd)
 {
-       loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
+       size_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
        ethoc_write(dev, offset + 0, bd->stat);
        ethoc_write(dev, offset + 4, bd->addr);
 }
index 78bbd439f1af096a6915b35a5e9da65ae13c6334..8d3dc0e308cefe2ca2d9f9f7f45b1d178fe4077a 100644 (file)
@@ -7,7 +7,6 @@
 #include <common.h>
 #include <asm/types.h>
 #include <asm/io.h>
-#include <asm/fsl_enet.h>
 #include <asm/fsl_dtsec.h>
 #include <fsl_mdio.h>
 #include <phy.h>
index 316e06e17e4db68f49ba33395d78e6e885e94bc5..a9691c635aefe00b4b91fbeb961ce18dc6315da6 100644 (file)
@@ -8,8 +8,8 @@
 #define __FM_H__
 
 #include <common.h>
+#include <phy.h>
 #include <fm_eth.h>
-#include <asm/fsl_enet.h>
 #include <asm/fsl_fman.h>
 
 /* Port ID */
index ff04695c323553dfd9589d15cb5dc70210869054..6cf21c6f652f84c08a3f7d59774e7e52b4ca0e4d 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/fsl_serdes.h>
+#include <fsl_mdio.h>
 
 #include "fm.h"
 
index 592a67f2a58536ef2712b37150a739888e97f587..9499290bba8b453f0172e354f9a8065569163af9 100644 (file)
@@ -12,7 +12,6 @@
 #include <phy.h>
 #include <asm/types.h>
 #include <asm/io.h>
-#include <asm/fsl_enet.h>
 #include <asm/fsl_memac.h>
 
 #include "fm.h"
index f450f800e220bb9a1e7854dec6be79debd38e361..50171230ea8fc99d196888310d3771e9efd06815 100644 (file)
@@ -12,7 +12,6 @@
 #include <phy.h>
 #include <asm/types.h>
 #include <asm/io.h>
-#include <asm/fsl_enet.h>
 #include <asm/fsl_tgec.h>
 
 #include "fm.h"
index 1d88e6504bcfc8c15e86772d853becedf0cc4f9f..d6b181b38604c4dd4133646baf07d641200f7551 100644 (file)
@@ -11,7 +11,6 @@
 #include <fsl_mdio.h>
 #include <asm/io.h>
 #include <asm/errno.h>
-#include <asm/fsl_enet.h>
 
 void tsec_local_mdio_write(struct tsec_mii_mng __iomem *phyregs, int port_addr,
                int dev_addr, int regnum, int value)
@@ -20,7 +19,8 @@ void tsec_local_mdio_write(struct tsec_mii_mng __iomem *phyregs, int port_addr,
 
        out_be32(&phyregs->miimadd, (port_addr << 8) | (regnum & 0x1f));
        out_be32(&phyregs->miimcon, value);
-       asm("sync");
+       /* Memory barrier */
+       mb();
 
        while ((in_be32(&phyregs->miimind) & MIIMIND_BUSY) && timeout--)
                ;
@@ -38,11 +38,13 @@ int tsec_local_mdio_read(struct tsec_mii_mng __iomem *phyregs, int port_addr,
 
        /* Clear the command register, and wait */
        out_be32(&phyregs->miimcom, 0);
-       asm("sync");
+       /* Memory barrier */
+       mb();
 
        /* Initiate a read command, and wait */
        out_be32(&phyregs->miimcom, MIIMCOM_READ_CYCLE);
-       asm("sync");
+       /* Memory barrier */
+       mb();
 
        /* Wait for the the indication that the read is done */
        while ((in_be32(&phyregs->miimind) & (MIIMIND_NOTVALID | MIIMIND_BUSY))
index d040ab171bf53fc36612997bd1bd981f8d88700b..c3ce17516c7407b0f189084bda4cbecb515122ac 100644 (file)
@@ -469,7 +469,6 @@ static int rtl_recv(struct eth_device *dev)
 
                        rtl_inval_buffer(tpc->RxBufferRing[cur_rx], length);
                        memcpy(rxdata, tpc->RxBufferRing[cur_rx], length);
-                       NetReceive(rxdata, length);
 
                        if (cur_rx == NUM_RX_DESC - 1)
                                tpc->RxDescArray[cur_rx].status =
@@ -480,6 +479,8 @@ static int rtl_recv(struct eth_device *dev)
                        tpc->RxDescArray[cur_rx].buf_addr =
                                cpu_to_le32(bus_to_phys(tpc->RxBufferRing[cur_rx]));
                        rtl_flush_rx_desc(&tpc->RxDescArray[cur_rx]);
+
+                       NetReceive(rxdata, length);
                } else {
                        puts("Error Rx");
                }
index e9138f03381da8928a41882128d8680f2a7aaa2f..79d656133adb4d50a7a28dfb529f81121db708ac 100644 (file)
@@ -20,6 +20,7 @@
 #include <fsl_mdio.h>
 #include <asm/errno.h>
 #include <asm/processor.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -270,6 +271,9 @@ void redundant_init(struct eth_device *dev)
        out_be32(&regs->tstat, TSTAT_CLEAR_THALT);
        out_be32(&regs->rstat, RSTAT_CLEAR_RHALT);
        clrbits_be32(&regs->dmactrl, DMACTRL_GRS | DMACTRL_GTS);
+#ifdef CONFIG_LS102XA
+       setbits_be32(&regs->dmactrl, DMACTRL_LE);
+#endif
 
        do {
                uint16_t status;
@@ -366,6 +370,9 @@ static void startup_tsec(struct eth_device *dev)
        out_be32(&regs->tstat, TSTAT_CLEAR_THALT);
        out_be32(&regs->rstat, RSTAT_CLEAR_RHALT);
        clrbits_be32(&regs->dmactrl, DMACTRL_GRS | DMACTRL_GTS);
+#ifdef CONFIG_LS102XA
+       setbits_be32(&regs->dmactrl, DMACTRL_LE);
+#endif
 }
 
 /* This returns the status bits of the device. The return value
index 48a163411cbfdf7ca0cb5514eda26fab5ef16150..6b559f7974ecc2002f6c962b6fda55212c8ac525 100644 (file)
@@ -13,7 +13,6 @@
 #include "qe.h"
 #include "uccf.h"
 #include <phy.h>
-#include <asm/fsl_enet.h>
 
 #define MAX_TX_THREADS                         8
 #define MAX_RX_THREADS                         8
index 571c18fa9323562db21bebf25051700b6cb26a39..853a8c6919722529297650dac6567cbbd894c4c3 100644 (file)
@@ -5,7 +5,12 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
+ifdef CONFIG_DM_SERIAL
+obj-y += serial-uclass.o
+else
 obj-y += serial.o
+obj-$(CONFIG_SYS_NS16550_SERIAL) += serial_ns16550.o
+endif
 
 obj-$(CONFIG_ALTERA_UART) += altera_uart.o
 obj-$(CONFIG_ALTERA_JTAG_UART) += altera_jtag_uart.o
@@ -16,7 +21,6 @@ obj-$(CONFIG_MCFUART) += mcfuart.o
 obj-$(CONFIG_OPENCORES_YANU) += opencores_yanu.o
 obj-$(CONFIG_SYS_NS16550) += ns16550.o
 obj-$(CONFIG_S5P) += serial_s5p.o
-obj-$(CONFIG_SYS_NS16550_SERIAL) += serial_ns16550.o
 obj-$(CONFIG_IMX_SERIAL) += serial_imx.o
 obj-$(CONFIG_KS8695_SERIAL) += serial_ks8695.o
 obj-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
@@ -34,6 +38,7 @@ obj-$(CONFIG_BFIN_SERIAL) += serial_bfin.o
 obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o
 obj-$(CONFIG_MXS_AUART) += mxs_auart.o
 obj-$(CONFIG_ARC_SERIAL) += serial_arc.o
+obj-$(CONFIG_TEGRA_SERIAL) += serial_tegra.o
 
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_USB_TTY) += usbtty.o
index 079f67d3801b0c3297076beb62f7d8c02565323e..63a9ef68444d3af762213467b1b9e9524aaa4473 100644 (file)
@@ -4,18 +4,26 @@
  * modified to use CONFIG_SYS_ISA_MEM and new defines
  */
 
-#include <config.h>
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <fdtdec.h>
 #include <ns16550.h>
+#include <serial.h>
 #include <watchdog.h>
 #include <linux/types.h>
 #include <asm/io.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define UART_LCRVAL UART_LCR_8N1               /* 8 data, 1 stop, no parity */
 #define UART_MCRVAL (UART_MCR_DTR | \
                     UART_MCR_RTS)              /* RTS/DTR */
 #define UART_FCRVAL (UART_FCR_FIFO_EN |        \
                     UART_FCR_RXSR |    \
                     UART_FCR_TXSR)             /* Clear & enable FIFOs */
+
+#ifndef CONFIG_DM_SERIAL
 #ifdef CONFIG_SYS_NS16550_PORT_MAPPED
 #define serial_out(x, y)       outb(x, (ulong)y)
 #define serial_in(y)           inb((ulong)y)
@@ -29,6 +37,7 @@
 #define serial_out(x, y)       writeb(x, y)
 #define serial_in(y)           readb(y)
 #endif
+#endif /* !CONFIG_DM_SERIAL */
 
 #if defined(CONFIG_SOC_KEYSTONE)
 #define UART_REG_VAL_PWREMU_MGMT_UART_DISABLE   0
 #define CONFIG_SYS_NS16550_IER  0x00
 #endif /* CONFIG_SYS_NS16550_IER */
 
+#ifdef CONFIG_DM_SERIAL
+static void ns16550_writeb(NS16550_t port, int offset, int value)
+{
+       struct ns16550_platdata *plat = port->plat;
+       unsigned char *addr;
+
+       offset *= 1 << plat->reg_shift;
+       addr = plat->base + offset;
+       /*
+        * As far as we know it doesn't make sense to support selection of
+        * these options at run-time, so use the existing CONFIG options.
+        */
+#ifdef CONFIG_SYS_NS16550_PORT_MAPPED
+       outb(value, addr);
+#elif defined(CONFIG_SYS_NS16550_MEM32) && !defined(CONFIG_SYS_BIG_ENDIAN)
+       out_le32(addr, value);
+#elif defined(CONFIG_SYS_NS16550_MEM32) && defined(CONFIG_SYS_BIG_ENDIAN)
+       out_be32(addr, value);
+#elif defined(CONFIG_SYS_BIG_ENDIAN)
+       writeb(value, addr + (1 << plat->reg_shift) - 1);
+#else
+       writeb(value, addr);
+#endif
+}
+
+static int ns16550_readb(NS16550_t port, int offset)
+{
+       struct ns16550_platdata *plat = port->plat;
+       unsigned char *addr;
+
+       offset *= 1 << plat->reg_shift;
+       addr = plat->base + offset;
+#ifdef CONFIG_SYS_NS16550_PORT_MAPPED
+       return inb(addr);
+#elif defined(CONFIG_SYS_NS16550_MEM32) && !defined(CONFIG_SYS_BIG_ENDIAN)
+       return in_le32(addr);
+#elif defined(CONFIG_SYS_NS16550_MEM32) && defined(CONFIG_SYS_BIG_ENDIAN)
+       return in_be32(addr);
+#elif defined(CONFIG_SYS_BIG_ENDIAN)
+       return readb(addr + (1 << plat->reg_shift) - 1);
+#else
+       return readb(addr);
+#endif
+}
+
+/* We can clean these up once everything is moved to driver model */
+#define serial_out(value, addr)        \
+       ns16550_writeb(com_port, addr - (unsigned char *)com_port, value)
+#define serial_in(addr) \
+       ns16550_readb(com_port, addr - (unsigned char *)com_port)
+#endif
+
+int ns16550_calc_divisor(NS16550_t port, int clock, int baudrate)
+{
+       const unsigned int mode_x_div = 16;
+
+#ifdef CONFIG_OMAP1510
+       /* If can't cleanly clock 115200 set div to 1 */
+       if ((clock == 12000000) && (baudrate == 115200)) {
+               port->osc_12m_sel = OSC_12M_SEL;  /* enable 6.5 * divisor */
+               return 1;                       /* return 1 for base divisor */
+       }
+       port->osc_12m_sel = 0;                  /* clear if previsouly set */
+#endif
+
+       return DIV_ROUND_CLOSEST(clock, mode_x_div * baudrate);
+}
+
+static void NS16550_setbrg(NS16550_t com_port, int baud_divisor)
+{
+       serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
+       serial_out(baud_divisor & 0xff, &com_port->dll);
+       serial_out((baud_divisor >> 8) & 0xff, &com_port->dlm);
+       serial_out(UART_LCRVAL, &com_port->lcr);
+}
+
 void NS16550_init(NS16550_t com_port, int baud_divisor)
 {
 #if (defined(CONFIG_SPL_BUILD) && defined(CONFIG_OMAP34XX))
@@ -55,10 +140,8 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
         */
        if ((serial_in(&com_port->lsr) & (UART_LSR_TEMT | UART_LSR_THRE))
             == UART_LSR_THRE) {
-               serial_out(UART_LCR_DLAB, &com_port->lcr);
-               serial_out(baud_divisor & 0xff, &com_port->dll);
-               serial_out((baud_divisor >> 8) & 0xff, &com_port->dlm);
-               serial_out(UART_LCRVAL, &com_port->lcr);
+               if (baud_divisor != -1)
+                       NS16550_setbrg(com_port, baud_divisor);
                serial_out(0, &com_port->mdr1);
        }
 #endif
@@ -71,16 +154,11 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
                        defined(CONFIG_TI81XX) || defined(CONFIG_AM43XX)
        serial_out(0x7, &com_port->mdr1);       /* mode select reset TL16C750*/
 #endif
-       serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
-       serial_out(0, &com_port->dll);
-       serial_out(0, &com_port->dlm);
-       serial_out(UART_LCRVAL, &com_port->lcr);
+       NS16550_setbrg(com_port, 0);
        serial_out(UART_MCRVAL, &com_port->mcr);
        serial_out(UART_FCRVAL, &com_port->fcr);
-       serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
-       serial_out(baud_divisor & 0xff, &com_port->dll);
-       serial_out((baud_divisor >> 8) & 0xff, &com_port->dlm);
-       serial_out(UART_LCRVAL, &com_port->lcr);
+       if (baud_divisor != -1)
+               NS16550_setbrg(com_port, baud_divisor);
 #if defined(CONFIG_OMAP) || \
        defined(CONFIG_AM33XX) || defined(CONFIG_SOC_DA8XX) || \
        defined(CONFIG_TI81XX) || defined(CONFIG_AM43XX)
@@ -97,16 +175,10 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
 void NS16550_reinit(NS16550_t com_port, int baud_divisor)
 {
        serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier);
-       serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
-       serial_out(0, &com_port->dll);
-       serial_out(0, &com_port->dlm);
-       serial_out(UART_LCRVAL, &com_port->lcr);
+       NS16550_setbrg(com_port, 0);
        serial_out(UART_MCRVAL, &com_port->mcr);
        serial_out(UART_FCRVAL, &com_port->fcr);
-       serial_out(UART_LCR_BKSE, &com_port->lcr);
-       serial_out(baud_divisor & 0xff, &com_port->dll);
-       serial_out((baud_divisor >> 8) & 0xff, &com_port->dlm);
-       serial_out(UART_LCRVAL, &com_port->lcr);
+       NS16550_setbrg(com_port, baud_divisor);
 }
 #endif /* CONFIG_NS16550_MIN_FUNCTIONS */
 
@@ -145,3 +217,92 @@ int NS16550_tstc(NS16550_t com_port)
 }
 
 #endif /* CONFIG_NS16550_MIN_FUNCTIONS */
+
+#ifdef CONFIG_DM_SERIAL
+static int ns16550_serial_putc(struct udevice *dev, const char ch)
+{
+       struct NS16550 *const com_port = dev_get_priv(dev);
+
+       if (!(serial_in(&com_port->lsr) & UART_LSR_THRE))
+               return -EAGAIN;
+       serial_out(ch, &com_port->thr);
+
+       /*
+        * Call watchdog_reset() upon newline. This is done here in putc
+        * since the environment code uses a single puts() to print the complete
+        * environment upon "printenv". So we can't put this watchdog call
+        * in puts().
+        */
+       if (ch == '\n')
+               WATCHDOG_RESET();
+
+       return 0;
+}
+
+static int ns16550_serial_pending(struct udevice *dev, bool input)
+{
+       struct NS16550 *const com_port = dev_get_priv(dev);
+
+       if (input)
+               return serial_in(&com_port->lsr) & UART_LSR_DR ? 1 : 0;
+       else
+               return serial_in(&com_port->lsr) & UART_LSR_THRE ? 0 : 1;
+}
+
+static int ns16550_serial_getc(struct udevice *dev)
+{
+       struct NS16550 *const com_port = dev_get_priv(dev);
+
+       if (!serial_in(&com_port->lsr) & UART_LSR_DR)
+               return -EAGAIN;
+
+       return serial_in(&com_port->rbr);
+}
+
+static int ns16550_serial_setbrg(struct udevice *dev, int baudrate)
+{
+       struct NS16550 *const com_port = dev_get_priv(dev);
+       struct ns16550_platdata *plat = com_port->plat;
+       int clock_divisor;
+
+       clock_divisor = ns16550_calc_divisor(com_port, plat->clock, baudrate);
+
+       NS16550_setbrg(com_port, clock_divisor);
+
+       return 0;
+}
+
+int ns16550_serial_probe(struct udevice *dev)
+{
+       struct NS16550 *const com_port = dev_get_priv(dev);
+
+       NS16550_init(com_port, -1);
+
+       return 0;
+}
+
+int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
+{
+       struct NS16550 *const com_port = dev_get_priv(dev);
+       struct ns16550_platdata *plat = dev->platdata;
+       fdt_addr_t addr;
+
+       addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg");
+       if (addr == FDT_ADDR_T_NONE)
+               return -EINVAL;
+
+       plat->base = (unsigned char *)addr;
+       plat->reg_shift = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
+                                        "reg-shift", 1);
+       com_port->plat = plat;
+
+       return 0;
+}
+
+const struct dm_serial_ops ns16550_serial_ops = {
+       .putc = ns16550_serial_putc,
+       .pending = ns16550_serial_pending,
+       .getc = ns16550_serial_getc,
+       .setbrg = ns16550_serial_setbrg,
+};
+#endif /* CONFIG_DM_SERIAL */
index 51fd871dff9b3fbfd939ac4cd6d54c88bb01502f..cd2f91e28e8f96b0d651cac208cbbe1c4fb12303 100644 (file)
  */
 
 #include <common.h>
+#include <dm.h>
+#include <fdtdec.h>
 #include <lcd.h>
 #include <os.h>
 #include <serial.h>
 #include <linux/compiler.h>
 #include <asm/state.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  *
  *   serial_buf: A buffer that holds keyboard characters for the
@@ -30,27 +34,69 @@ static char serial_buf[16];
 static unsigned int serial_buf_write;
 static unsigned int serial_buf_read;
 
-static int sandbox_serial_init(void)
+struct sandbox_serial_platdata {
+       int colour;     /* Text colour to use for output, -1 for none */
+};
+
+struct sandbox_serial_priv {
+       bool start_of_line;
+};
+
+/**
+ * output_ansi_colour() - Output an ANSI colour code
+ *
+ * @colour: Colour to output (0-7)
+ */
+static void output_ansi_colour(int colour)
+{
+       char ansi_code[] = "\x1b[1;3Xm";
+
+       ansi_code[5] = '0' + colour;
+       os_write(1, ansi_code, sizeof(ansi_code) - 1);
+}
+
+static void output_ansi_reset(void)
+{
+       os_write(1, "\x1b[0m", 4);
+}
+
+static int sandbox_serial_probe(struct udevice *dev)
 {
        struct sandbox_state *state = state_get_current();
+       struct sandbox_serial_priv *priv = dev_get_priv(dev);
 
        if (state->term_raw != STATE_TERM_COOKED)
                os_tty_raw(0, state->term_raw == STATE_TERM_RAW_WITH_SIGS);
+       priv->start_of_line = 0;
+
        return 0;
 }
 
-static void sandbox_serial_setbrg(void)
+static int sandbox_serial_remove(struct udevice *dev)
 {
+       struct sandbox_serial_platdata *plat = dev->platdata;
+
+       if (plat->colour != -1)
+               output_ansi_reset();
+
+       return 0;
 }
 
-static void sandbox_serial_putc(const char ch)
+static int sandbox_serial_putc(struct udevice *dev, const char ch)
 {
+       struct sandbox_serial_priv *priv = dev_get_priv(dev);
+       struct sandbox_serial_platdata *plat = dev->platdata;
+
+       if (priv->start_of_line && plat->colour != -1) {
+               priv->start_of_line = false;
+               output_ansi_colour(plat->colour);
+       }
+
        os_write(1, &ch, 1);
-}
+       if (ch == '\n')
+               priv->start_of_line = true;
 
-static void sandbox_serial_puts(const char *str)
-{
-       os_write(1, str, strlen(str));
+       return 0;
 }
 
 static unsigned int increment_buffer_index(unsigned int index)
@@ -58,12 +104,15 @@ static unsigned int increment_buffer_index(unsigned int index)
        return (index + 1) % ARRAY_SIZE(serial_buf);
 }
 
-static int sandbox_serial_tstc(void)
+static int sandbox_serial_pending(struct udevice *dev, bool input)
 {
        const unsigned int next_index =
                increment_buffer_index(serial_buf_write);
        ssize_t count;
 
+       if (!input)
+               return 0;
+
        os_usleep(100);
 #ifdef CONFIG_LCD
        lcd_sync();
@@ -74,38 +123,77 @@ static int sandbox_serial_tstc(void)
        count = os_read_no_block(0, &serial_buf[serial_buf_write], 1);
        if (count == 1)
                serial_buf_write = next_index;
+
        return serial_buf_write != serial_buf_read;
 }
 
-static int sandbox_serial_getc(void)
+static int sandbox_serial_getc(struct udevice *dev)
 {
        int result;
 
-       while (!sandbox_serial_tstc())
-               ;       /* buffer empty */
+       if (!sandbox_serial_pending(dev, true))
+               return -EAGAIN; /* buffer empty */
 
        result = serial_buf[serial_buf_read];
        serial_buf_read = increment_buffer_index(serial_buf_read);
        return result;
 }
 
-static struct serial_device sandbox_serial_drv = {
-       .name   = "sandbox_serial",
-       .start  = sandbox_serial_init,
-       .stop   = NULL,
-       .setbrg = sandbox_serial_setbrg,
-       .putc   = sandbox_serial_putc,
-       .puts   = sandbox_serial_puts,
-       .getc   = sandbox_serial_getc,
-       .tstc   = sandbox_serial_tstc,
+static const char * const ansi_colour[] = {
+       "black", "red", "green", "yellow", "blue", "megenta", "cyan",
+       "white",
 };
 
-void sandbox_serial_initialize(void)
+static int sandbox_serial_ofdata_to_platdata(struct udevice *dev)
 {
-       serial_register(&sandbox_serial_drv);
-}
+       struct sandbox_serial_platdata *plat = dev->platdata;
+       const char *colour;
+       int i;
+
+       plat->colour = -1;
+       colour = fdt_getprop(gd->fdt_blob, dev->of_offset,
+                            "sandbox,text-colour", NULL);
+       if (colour) {
+               for (i = 0; i < ARRAY_SIZE(ansi_colour); i++) {
+                       if (!strcmp(colour, ansi_colour[i])) {
+                               plat->colour = i;
+                               break;
+                       }
+               }
+       }
 
-__weak struct serial_device *default_serial_console(void)
-{
-       return &sandbox_serial_drv;
+       return 0;
 }
+
+static const struct dm_serial_ops sandbox_serial_ops = {
+       .putc = sandbox_serial_putc,
+       .pending = sandbox_serial_pending,
+       .getc = sandbox_serial_getc,
+};
+
+static const struct udevice_id sandbox_serial_ids[] = {
+       { .compatible = "sandbox,serial" },
+       { }
+};
+
+U_BOOT_DRIVER(serial_sandbox) = {
+       .name   = "serial_sandbox",
+       .id     = UCLASS_SERIAL,
+       .of_match = sandbox_serial_ids,
+       .ofdata_to_platdata = sandbox_serial_ofdata_to_platdata,
+       .platdata_auto_alloc_size = sizeof(struct sandbox_serial_platdata),
+       .priv_auto_alloc_size = sizeof(struct sandbox_serial_priv),
+       .probe = sandbox_serial_probe,
+       .remove = sandbox_serial_remove,
+       .ops    = &sandbox_serial_ops,
+       .flags = DM_FLAG_PRE_RELOC,
+};
+
+static const struct sandbox_serial_platdata platdata_non_fdt = {
+       .colour = -1,
+};
+
+U_BOOT_DEVICE(serial_sandbox_non_fdt) = {
+       .name = "serial_sandbox",
+       .platdata = &platdata_non_fdt,
+};
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
new file mode 100644 (file)
index 0000000..d04104e
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 2014 The Chromium OS Authors.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <fdtdec.h>
+#include <os.h>
+#include <serial.h>
+#include <stdio_dev.h>
+#include <dm/lists.h>
+#include <dm/device-internal.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* The currently-selected console serial device */
+struct udevice *cur_dev __attribute__ ((section(".data")));
+
+#ifndef CONFIG_SYS_MALLOC_F_LEN
+#error "Serial is required before relocation - define CONFIG_SYS_MALLOC_F_LEN to make this work"
+#endif
+
+static void serial_find_console_or_panic(void)
+{
+       int node;
+
+       /* Check for a chosen console */
+       node = fdtdec_get_chosen_node(gd->fdt_blob, "stdout-path");
+       if (node < 0)
+               node = fdtdec_get_alias_node(gd->fdt_blob, "console");
+       if (!uclass_get_device_by_of_offset(UCLASS_SERIAL, node, &cur_dev))
+               return;
+
+       /*
+        * If the console is not marked to be bound before relocation, bind
+        * it anyway.
+        */
+       if (node > 0 &&
+           !lists_bind_fdt(gd->dm_root, gd->fdt_blob, node, &cur_dev)) {
+               if (!device_probe(cur_dev))
+                       return;
+               cur_dev = NULL;
+       }
+
+       /*
+        * Failing that, get the device with sequence number 0, or in extremis
+        * just the first serial device we can find. But we insist on having
+        * a console (even if it is silent).
+        */
+       if (uclass_get_device_by_seq(UCLASS_SERIAL, 0, &cur_dev) &&
+           (uclass_first_device(UCLASS_SERIAL, &cur_dev) || !cur_dev))
+               panic("No serial driver found");
+}
+
+/* Called prior to relocation */
+int serial_init(void)
+{
+       serial_find_console_or_panic();
+       gd->flags |= GD_FLG_SERIAL_READY;
+
+       return 0;
+}
+
+/* Called after relocation */
+void serial_initialize(void)
+{
+       serial_find_console_or_panic();
+}
+
+void serial_putc(char ch)
+{
+       struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+       int err;
+
+       do {
+               err = ops->putc(cur_dev, ch);
+       } while (err == -EAGAIN);
+       if (ch == '\n')
+               serial_putc('\r');
+}
+
+void serial_setbrg(void)
+{
+       struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+
+       if (ops->setbrg)
+               ops->setbrg(cur_dev, gd->baudrate);
+}
+
+void serial_puts(const char *str)
+{
+       while (*str)
+               serial_putc(*str++);
+}
+
+int serial_tstc(void)
+{
+       struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+
+       if (ops->pending)
+               return ops->pending(cur_dev, true);
+
+       return 1;
+}
+
+int serial_getc(void)
+{
+       struct dm_serial_ops *ops = serial_get_ops(cur_dev);
+       int err;
+
+       do {
+               err = ops->getc(cur_dev);
+       } while (err == -EAGAIN);
+
+       return err >= 0 ? err : 0;
+}
+
+void serial_stdio_init(void)
+{
+}
+
+void serial_stub_putc(struct stdio_dev *sdev, const char ch)
+{
+       struct udevice *dev = sdev->priv;
+       struct dm_serial_ops *ops = serial_get_ops(dev);
+
+       ops->putc(dev, ch);
+}
+
+void serial_stub_puts(struct stdio_dev *sdev, const char *str)
+{
+       while (*str)
+               serial_stub_putc(sdev, *str++);
+}
+
+int serial_stub_getc(struct stdio_dev *sdev)
+{
+       struct udevice *dev = sdev->priv;
+       struct dm_serial_ops *ops = serial_get_ops(dev);
+
+       int err;
+
+       do {
+               err = ops->getc(dev);
+       } while (err == -EAGAIN);
+
+       return err >= 0 ? err : 0;
+}
+
+int serial_stub_tstc(struct stdio_dev *sdev)
+{
+       struct udevice *dev = sdev->priv;
+       struct dm_serial_ops *ops = serial_get_ops(dev);
+
+       if (ops->pending)
+               return ops->pending(dev, true);
+
+       return 1;
+}
+
+static int serial_post_probe(struct udevice *dev)
+{
+       struct stdio_dev sdev;
+       struct dm_serial_ops *ops = serial_get_ops(dev);
+       struct serial_dev_priv *upriv = dev->uclass_priv;
+       int ret;
+
+       /* Set the baud rate */
+       if (ops->setbrg) {
+               ret = ops->setbrg(dev, gd->baudrate);
+               if (ret)
+                       return ret;
+       }
+
+       if (!(gd->flags & GD_FLG_RELOC))
+               return 0;
+
+       memset(&sdev, '\0', sizeof(sdev));
+
+       strncpy(sdev.name, dev->name, sizeof(sdev.name));
+       sdev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_INPUT;
+       sdev.priv = dev;
+       sdev.putc = serial_stub_putc;
+       sdev.puts = serial_stub_puts;
+       sdev.getc = serial_stub_getc;
+       sdev.tstc = serial_stub_tstc;
+       stdio_register_dev(&sdev, &upriv->sdev);
+
+       return 0;
+}
+
+static int serial_pre_remove(struct udevice *dev)
+{
+#ifdef CONFIG_SYS_STDIO_DEREGISTER
+       struct serial_dev_priv *upriv = dev->uclass_priv;
+
+       if (stdio_deregister_dev(upriv->sdev))
+               return -EPERM;
+#endif
+
+       return 0;
+}
+
+UCLASS_DRIVER(serial) = {
+       .id             = UCLASS_SERIAL,
+       .name           = "serial",
+       .post_probe     = serial_post_probe,
+       .pre_remove     = serial_pre_remove,
+       .per_device_auto_alloc_size = sizeof(struct serial_dev_priv),
+};
index d2eb7520d03886748c7d0130a0851c51eca8d997..bbe60af627e4c452eb7a76fb6c7552819439dcff 100644 (file)
@@ -320,6 +320,7 @@ void serial_stdio_init(void)
                dev.puts = serial_stub_puts;
                dev.getc = serial_stub_getc;
                dev.tstc = serial_stub_tstc;
+               dev.priv = s;
 
                stdio_register(&dev);
 
index da5f9a21f46662f250d9d0db7f2c94a53cc84c02..b0c6f6f4ab244ab8f4f70986c7081d1fdf208cae 100644 (file)
 #define UC2_TE          (1 << 3)
 #define UC2_RE          (1 << 2)
 
+#define STAT_LBKDIF    (1 << 31)
+#define STAT_RXEDGIF   (1 << 30)
+#define STAT_TDRE      (1 << 23)
+#define STAT_RDRF      (1 << 21)
+#define STAT_IDLE      (1 << 20)
+#define STAT_OR                (1 << 19)
+#define STAT_NF                (1 << 18)
+#define STAT_FE                (1 << 17)
+#define STAT_PF                (1 << 16)
+#define STAT_MA1F      (1 << 15)
+#define STAT_MA2F      (1 << 14)
+#define STAT_FLAGS     (STAT_LBKDIF | STAT_RXEDGIF | STAT_IDLE | STAT_OR | \
+                       STAT_NF | STAT_FE | STAT_PF | STAT_MA1F | STAT_MA2F)
+
+#define CTRL_TE                (1 << 19)
+#define CTRL_RE                (1 << 18)
+
+#define FIFO_TXFE              0x80
+#define FIFO_RXFE              0x40
+
+#define WATER_TXWATER_OFF      1
+#define WATER_RXWATER_OFF      16
+
 DECLARE_GLOBAL_DATA_PTR;
 
 struct lpuart_fsl *base = (struct lpuart_fsl *)LPUART_BASE;
 
+#ifndef CONFIG_LPUART_32B_REG
 static void lpuart_serial_setbrg(void)
 {
        u32 clk = mxc_get_clock(MXC_UART_CLK);
@@ -107,13 +131,107 @@ static struct serial_device lpuart_serial_drv = {
        .getc = lpuart_serial_getc,
        .tstc = lpuart_serial_tstc,
 };
+#else
+static void lpuart32_serial_setbrg(void)
+{
+       u32 clk = CONFIG_SYS_CLK_FREQ;
+       u32 sbr;
+
+       if (!gd->baudrate)
+               gd->baudrate = CONFIG_BAUDRATE;
+
+       sbr = (clk / (16 * gd->baudrate));
+       /* place adjustment later - n/32 BRFA */
+
+       out_be32(&base->baud, sbr);
+}
+
+static int lpuart32_serial_getc(void)
+{
+       u32 stat;
+
+       while (((stat = in_be32(&base->stat)) & STAT_RDRF) == 0) {
+               out_be32(&base->stat, STAT_FLAGS);
+               WATCHDOG_RESET();
+       }
+
+       return in_be32(&base->data) & 0x3ff;
+}
+
+static void lpuart32_serial_putc(const char c)
+{
+       if (c == '\n')
+               serial_putc('\r');
+
+       while (!(in_be32(&base->stat) & STAT_TDRE))
+               WATCHDOG_RESET();
+
+       out_be32(&base->data, c);
+}
+
+/*
+ * Test whether a character is in the RX buffer
+ */
+static int lpuart32_serial_tstc(void)
+{
+       if ((in_be32(&base->water) >> 24) == 0)
+               return 0;
+
+       return 1;
+}
+
+/*
+ * Initialise the serial port with the given baudrate. The settings
+ * are always 8 data bits, no parity, 1 stop bit, no start bits.
+ */
+static int lpuart32_serial_init(void)
+{
+       u8 ctrl;
+
+       ctrl = in_be32(&base->ctrl);
+       ctrl &= ~CTRL_RE;
+       ctrl &= ~CTRL_TE;
+       out_be32(&base->ctrl, ctrl);
+
+       out_be32(&base->modir, 0);
+       out_be32(&base->fifo, ~(FIFO_TXFE | FIFO_RXFE));
+
+       out_be32(&base->match, 0);
+       /* provide data bits, parity, stop bit, etc */
+
+       serial_setbrg();
+
+       out_be32(&base->ctrl, CTRL_RE | CTRL_TE);
+
+       return 0;
+}
+
+static struct serial_device lpuart32_serial_drv = {
+       .name = "lpuart32_serial",
+       .start = lpuart32_serial_init,
+       .stop = NULL,
+       .setbrg = lpuart32_serial_setbrg,
+       .putc = lpuart32_serial_putc,
+       .puts = default_serial_puts,
+       .getc = lpuart32_serial_getc,
+       .tstc = lpuart32_serial_tstc,
+};
+#endif
 
 void lpuart_serial_initialize(void)
 {
+#ifdef CONFIG_LPUART_32B_REG
+       serial_register(&lpuart32_serial_drv);
+#else
        serial_register(&lpuart_serial_drv);
+#endif
 }
 
 __weak struct serial_device *default_serial_console(void)
 {
+#ifdef CONFIG_LPUART_32B_REG
+       return &lpuart32_serial_drv;
+#else
        return &lpuart_serial_drv;
+#endif
 }
index dafeed742df49e7d56bf2774314ea535c228be22..632da4cf70bb93c15c2a84a93815b6b6078c06c4 100644 (file)
@@ -81,7 +81,8 @@ static NS16550_t serial_ports[6] = {
        static int  eserial##port##_init(void) \
        { \
                int clock_divisor; \
-               clock_divisor = calc_divisor(serial_ports[port-1]); \
+               clock_divisor = ns16550_calc_divisor(serial_ports[port-1], \
+                               CONFIG_SYS_NS16550_CLK, gd->baudrate); \
                NS16550_init(serial_ports[port-1], clock_divisor); \
                return 0 ; \
        } \
@@ -118,14 +119,6 @@ static NS16550_t serial_ports[6] = {
        .puts   = eserial##port##_puts,         \
 }
 
-static int calc_divisor (NS16550_t port)
-{
-       const unsigned int mode_x_div = 16;
-
-       return DIV_ROUND_CLOSEST(CONFIG_SYS_NS16550_CLK,
-                                               mode_x_div * gd->baudrate);
-}
-
 void
 _serial_putc(const char c,const int port)
 {
@@ -167,7 +160,8 @@ _serial_setbrg (const int port)
 {
        int clock_divisor;
 
-       clock_divisor = calc_divisor(PORT);
+       clock_divisor = ns16550_calc_divisor(PORT, CONFIG_SYS_NS16550_CLK,
+                                            gd->baudrate);
        NS16550_reinit(PORT, clock_divisor);
 }
 
diff --git a/drivers/serial/serial_tegra.c b/drivers/serial/serial_tegra.c
new file mode 100644 (file)
index 0000000..7eb70e1
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2014 Google, Inc
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <ns16550.h>
+#include <serial.h>
+
+static const struct udevice_id tegra_serial_ids[] = {
+       { .compatible = "nvidia,tegra20-uart" },
+       { }
+};
+
+static int tegra_serial_ofdata_to_platdata(struct udevice *dev)
+{
+       struct ns16550_platdata *plat = dev_get_platdata(dev);
+       int ret;
+
+       ret = ns16550_serial_ofdata_to_platdata(dev);
+       if (ret)
+               return ret;
+       plat->clock = V_NS16550_CLK;
+
+       return 0;
+}
+U_BOOT_DRIVER(serial_ns16550) = {
+       .name   = "serial_tegra20",
+       .id     = UCLASS_SERIAL,
+       .of_match = tegra_serial_ids,
+       .ofdata_to_platdata = tegra_serial_ofdata_to_platdata,
+       .platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
+       .priv_auto_alloc_size = sizeof(struct NS16550),
+       .probe = ns16550_serial_probe,
+       .ops    = &ns16550_serial_ops,
+};
index 57c9bd393b89b5addb1b5ac98a0136383140d992..857d7eb0cce451c5d6d750cd8265867e114dd37e 100644 (file)
@@ -26,7 +26,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/init.h>
 #include <linux/module.h>
index 36681b6fc87755d7a8a08b8473f01b740a93291a..4edd6d729d1d0d26cb5d5867ebbf3e9783f6c045 100644 (file)
@@ -89,7 +89,6 @@
  * Most of the conditional compilation will (someday) vanish.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/kernel.h>
index 9a03917e87d6ffb169cdb19715123c616ca24547..17ed224488f3c924c2c5873e74bd49c8f880120c 100644 (file)
@@ -29,7 +29,6 @@
  * da8xx.c would be merged to this file after testing.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/init.h>
 #include <linux/io.h>
index d2cb91a898fa07794c1ab144ba5ef1ddd676184e..97acf93d316e2111636411fd17a58f6c4f83fbc3 100644 (file)
@@ -33,7 +33,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/kernel.h>
 #include <linux/list.h>
index 8c3b0a145a4dcb126107cf20e305ecd23fdc74ef..5a715013a2315e945c0b3a2ab354a4fe533f7f46 100644 (file)
@@ -33,7 +33,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/kernel.h>
 #include <linux/list.h>
index 9a2cf59d9248364e9c53ab3f504a2980b4f0b216..bbcee88241ba33f05cafad51d3162bc63bc12021 100644 (file)
@@ -33,7 +33,6 @@
  *
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/kernel.h>
index 0d7b89fcf6e4e0fe0508c4afa0ffa4d329abcfba..2676f09c3844d159c5f15130ccdff6c287339aed 100644 (file)
@@ -4,7 +4,6 @@
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 
-#define __UBOOT__
 #include <usb.h>
 #include "linux-compat.h"
 #include "usb-compat.h"
index b1c4dc7828518252c856e658ddf4c5c92863e1e6..98f4830912be656321f011f9dafdcdf3cfa6e60d 100644 (file)
@@ -24,7 +24,6 @@
  * Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/kernel.h>
index 248aa350b7eb0258731bf0408aa0b3bcae760b04..14a6781edca17c9bd830c6b714a081b133030d80 100644 (file)
@@ -15,6 +15,7 @@ obj-$(CONFIG_EXYNOS_MIPI_DSIM) += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \
                                exynos_mipi_dsi_lowlevel.o
 obj-$(CONFIG_EXYNOS_PWM_BL) += exynos_pwm_bl.o
 obj-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o videomodes.o
+obj-$(CONFIG_FSL_DCU_FB) += fsl_dcu_fb.o videomodes.o
 obj-$(CONFIG_L5F31188) += l5f31188.o
 obj-$(CONFIG_MPC8XX_LCD) += mpc8xx_lcd.o
 obj-$(CONFIG_PXA_LCD) += pxa_lcd.o
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
new file mode 100644 (file)
index 0000000..d4cd382
--- /dev/null
@@ -0,0 +1,365 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * FSL DCU Framebuffer driver
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <asm/io.h>
+#include <common.h>
+#include <fsl_dcu_fb.h>
+#include <linux/fb.h>
+#include <malloc.h>
+#include <video_fb.h>
+#include "videomodes.h"
+
+/* Convert the X,Y resolution pair into a single number */
+#define RESOLUTION(x, y) (((u32)(x) << 16) | (y))
+
+#ifdef CONFIG_SYS_FSL_DCU_LE
+#define        dcu_read32      in_le32
+#define        dcu_write32     out_le32
+#elif defined(CONFIG_SYS_FSL_DCU_BE)
+#define        dcu_read32      in_be32
+#define        dcu_write32     out_be32
+#endif
+
+#define DCU_MODE_BLEND_ITER(x)          ((x) << 20)
+#define DCU_MODE_RASTER_EN             (1 << 14)
+#define DCU_MODE_NORMAL                        1
+#define DCU_MODE_COLORBAR               3
+#define DCU_BGND_R(x)                  ((x) << 16)
+#define DCU_BGND_G(x)                  ((x) << 8)
+#define DCU_BGND_B(x)                  (x)
+#define DCU_DISP_SIZE_DELTA_Y(x)       ((x) << 16)
+#define DCU_DISP_SIZE_DELTA_X(x)       (x)
+#define DCU_HSYN_PARA_BP(x)            ((x) << 22)
+#define DCU_HSYN_PARA_PW(x)            ((x) << 11)
+#define DCU_HSYN_PARA_FP(x)            (x)
+#define DCU_VSYN_PARA_BP(x)            ((x) << 22)
+#define DCU_VSYN_PARA_PW(x)            ((x) << 11)
+#define DCU_VSYN_PARA_FP(x)            (x)
+#define DCU_SYN_POL_INV_PXCK_FALL      (0 << 6)
+#define DCU_SYN_POL_NEG_REMAIN         (0 << 5)
+#define DCU_SYN_POL_INV_VS_LOW         (1 << 1)
+#define DCU_SYN_POL_INV_HS_LOW         (1)
+#define DCU_THRESHOLD_LS_BF_VS(x)      ((x) << 16)
+#define DCU_THRESHOLD_OUT_BUF_HIGH(x)  ((x) << 8)
+#define DCU_THRESHOLD_OUT_BUF_LOW(x)   (x)
+#define DCU_UPDATE_MODE_MODE            (1 << 31)
+#define DCU_UPDATE_MODE_READREG         (1 << 30)
+
+#define DCU_CTRLDESCLN_1_HEIGHT(x)     ((x) << 16)
+#define DCU_CTRLDESCLN_1_WIDTH(x)      (x)
+#define DCU_CTRLDESCLN_2_POSY(x)       ((x) << 16)
+#define DCU_CTRLDESCLN_2_POSX(x)       (x)
+#define DCU_CTRLDESCLN_4_EN            (1 << 31)
+#define DCU_CTRLDESCLN_4_TILE_EN       (1 << 30)
+#define DCU_CTRLDESCLN_4_DATA_SEL_CLUT (1 << 29)
+#define DCU_CTRLDESCLN_4_SAFETY_EN     (1 << 28)
+#define DCU_CTRLDESCLN_4_TRANS(x)      ((x) << 20)
+#define DCU_CTRLDESCLN_4_BPP(x)                ((x) << 16)
+#define DCU_CTRLDESCLN_4_RLE_EN                (1 << 15)
+#define DCU_CTRLDESCLN_4_LUOFFS(x)     ((x) << 4)
+#define DCU_CTRLDESCLN_4_BB_ON         (1 << 2)
+#define DCU_CTRLDESCLN_4_AB(x)         (x)
+#define DCU_CTRLDESCLN_5_CKMAX_R(x)    ((x) << 16)
+#define DCU_CTRLDESCLN_5_CKMAX_G(x)    ((x) << 8)
+#define DCU_CTRLDESCLN_5_CKMAX_B(x)    (x)
+#define DCU_CTRLDESCLN_6_CKMIN_R(x)    ((x) << 16)
+#define DCU_CTRLDESCLN_6_CKMIN_G(x)    ((x) << 8)
+#define DCU_CTRLDESCLN_6_CKMIN_B(x)    (x)
+#define DCU_CTRLDESCLN_7_TILE_VER(x)   ((x) << 16)
+#define DCU_CTRLDESCLN_7_TILE_HOR(x)   (x)
+#define DCU_CTRLDESCLN_8_FG_FCOLOR(x)  (x)
+#define DCU_CTRLDESCLN_9_BG_BCOLOR(x)  (x)
+
+#define BPP_16_RGB565                  4
+#define BPP_24_RGB888                  5
+#define BPP_32_ARGB8888                        6
+
+/*
+ * This setting is used for the TWR_LCD_RGB card
+ */
+static struct fb_videomode fsl_dcu_mode_480_272 = {
+       .name           = "480x272-60",
+       .refresh        = 60,
+       .xres           = 480,
+       .yres           = 272,
+       .pixclock       = 91996,
+       .left_margin    = 2,
+       .right_margin   = 2,
+       .upper_margin   = 1,
+       .lower_margin   = 1,
+       .hsync_len      = 41,
+       .vsync_len      = 2,
+       .sync           = FB_SYNC_COMP_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+       .vmode          = FB_VMODE_NONINTERLACED
+};
+
+/*
+ * This setting is used for Siliconimage SiI9022A HDMI
+ */
+static struct fb_videomode fsl_dcu_mode_640_480 = {
+       .name           = "640x480-60",
+       .refresh        = 60,
+       .xres           = 640,
+       .yres           = 480,
+       .pixclock       = 39722,
+       .left_margin    = 48,
+       .right_margin   = 16,
+       .upper_margin   = 33,
+       .lower_margin   = 10,
+       .hsync_len      = 96,
+       .vsync_len      = 2,
+       .sync           = 0,
+       .vmode          = FB_VMODE_NONINTERLACED,
+};
+
+/*
+ * DCU register map
+ */
+struct dcu_reg {
+       u32 desc_cursor[4];
+       u32 mode;
+       u32 bgnd;
+       u32 disp_size;
+       u32 hsyn_para;
+       u32 vsyn_para;
+       u32 synpol;
+       u32 threshold;
+       u32 int_status;
+       u32 int_mask;
+       u32 colbar[8];
+       u32 div_ratio;
+       u32 sign_calc[2];
+       u32 crc_val;
+       u8 res_064[0x6c-0x64];
+       u32 parr_err_status1;
+       u8 res_070[0x7c-0x70];
+       u32 parr_err_status3;
+       u32 mparr_err_status1;
+       u8 res_084[0x90-0x84];
+       u32 mparr_err_status3;
+       u32 threshold_inp_buf[2];
+       u8 res_09c[0xa0-0x9c];
+       u32 luma_comp;
+       u32 chroma_red;
+       u32 chroma_green;
+       u32 chroma_blue;
+       u32 crc_pos;
+       u32 lyr_intpol_en;
+       u32 lyr_luma_comp;
+       u32 lyr_chrm_red;
+       u32 lyr_chrm_grn;
+       u32 lyr_chrm_blue;
+       u8 res_0c4[0xcc-0xc8];
+       u32 update_mode;
+       u32 underrun;
+       u8 res_0d4[0x100-0xd4];
+       u32 gpr;
+       u32 slr_l[2];
+       u32 slr_disp_size;
+       u32 slr_hvsync_para;
+       u32 slr_pol;
+       u32 slr_l_transp[2];
+       u8 res_120[0x200-0x120];
+       u32 ctrldescl[DCU_LAYER_MAX_NUM][16];
+};
+
+static struct fb_info info;
+
+static void reset_total_layers(void)
+{
+       struct dcu_reg *regs = (struct dcu_reg *)CONFIG_SYS_DCU_ADDR;
+       int i;
+
+       for (i = 0; i < DCU_LAYER_MAX_NUM; i++) {
+               dcu_write32(&regs->ctrldescl[i][0], 0);
+               dcu_write32(&regs->ctrldescl[i][1], 0);
+               dcu_write32(&regs->ctrldescl[i][2], 0);
+               dcu_write32(&regs->ctrldescl[i][3], 0);
+               dcu_write32(&regs->ctrldescl[i][4], 0);
+               dcu_write32(&regs->ctrldescl[i][5], 0);
+               dcu_write32(&regs->ctrldescl[i][6], 0);
+               dcu_write32(&regs->ctrldescl[i][7], 0);
+               dcu_write32(&regs->ctrldescl[i][8], 0);
+               dcu_write32(&regs->ctrldescl[i][9], 0);
+               dcu_write32(&regs->ctrldescl[i][10], 0);
+       }
+
+       dcu_write32(&regs->update_mode, DCU_UPDATE_MODE_READREG);
+}
+
+static int layer_ctrldesc_init(int index, u32 pixel_format)
+{
+       struct dcu_reg *regs = (struct dcu_reg *)CONFIG_SYS_DCU_ADDR;
+       unsigned int bpp = BPP_24_RGB888;
+
+       dcu_write32(&regs->ctrldescl[index][0],
+                   DCU_CTRLDESCLN_1_HEIGHT(info.var.yres) |
+                   DCU_CTRLDESCLN_1_WIDTH(info.var.xres));
+
+       dcu_write32(&regs->ctrldescl[index][1],
+                   DCU_CTRLDESCLN_2_POSY(0) |
+                   DCU_CTRLDESCLN_2_POSX(0));
+
+       dcu_write32(&regs->ctrldescl[index][2], (unsigned int)info.screen_base);
+
+       switch (pixel_format) {
+       case 16:
+               bpp = BPP_16_RGB565;
+               break;
+       case 24:
+               bpp = BPP_24_RGB888;
+               break;
+       case 32:
+               bpp = BPP_32_ARGB8888;
+               break;
+       default:
+               printf("unsupported color depth: %u\n", pixel_format);
+       }
+
+       dcu_write32(&regs->ctrldescl[index][3],
+                   DCU_CTRLDESCLN_4_EN |
+                   DCU_CTRLDESCLN_4_TRANS(0xff) |
+                   DCU_CTRLDESCLN_4_BPP(bpp) |
+                   DCU_CTRLDESCLN_4_AB(0));
+
+       dcu_write32(&regs->ctrldescl[index][4],
+                   DCU_CTRLDESCLN_5_CKMAX_R(0xff) |
+                   DCU_CTRLDESCLN_5_CKMAX_G(0xff) |
+                   DCU_CTRLDESCLN_5_CKMAX_B(0xff));
+       dcu_write32(&regs->ctrldescl[index][5],
+                   DCU_CTRLDESCLN_6_CKMIN_R(0) |
+                   DCU_CTRLDESCLN_6_CKMIN_G(0) |
+                   DCU_CTRLDESCLN_6_CKMIN_B(0));
+
+       dcu_write32(&regs->ctrldescl[index][6],
+                   DCU_CTRLDESCLN_7_TILE_VER(0) |
+                   DCU_CTRLDESCLN_7_TILE_HOR(0));
+
+       dcu_write32(&regs->ctrldescl[index][7], DCU_CTRLDESCLN_8_FG_FCOLOR(0));
+       dcu_write32(&regs->ctrldescl[index][8], DCU_CTRLDESCLN_9_BG_BCOLOR(0));
+
+       dcu_write32(&regs->update_mode, DCU_UPDATE_MODE_READREG);
+
+       return 0;
+}
+
+int fsl_dcu_init(unsigned int xres, unsigned int yres,
+                unsigned int pixel_format)
+{
+       struct dcu_reg *regs = (struct dcu_reg *)CONFIG_SYS_DCU_ADDR;
+       unsigned int div, mode;
+
+       /* Memory allocation for framebuffer */
+       info.screen_size =
+               info.var.xres * info.var.yres * (info.var.bits_per_pixel / 8);
+       info.screen_base = (char *)memalign(ARCH_DMA_MINALIGN,
+                       roundup(info.screen_size, ARCH_DMA_MINALIGN));
+       memset(info.screen_base, 0, info.screen_size);
+
+       reset_total_layers();
+       div = dcu_set_pixel_clock(info.var.pixclock);
+       dcu_write32(&regs->div_ratio, (div - 1));
+
+       dcu_write32(&regs->disp_size,
+                   DCU_DISP_SIZE_DELTA_Y(info.var.yres) |
+                   DCU_DISP_SIZE_DELTA_X(info.var.xres / 16));
+
+       dcu_write32(&regs->hsyn_para,
+                   DCU_HSYN_PARA_BP(info.var.left_margin) |
+                   DCU_HSYN_PARA_PW(info.var.hsync_len) |
+                   DCU_HSYN_PARA_FP(info.var.right_margin));
+
+       dcu_write32(&regs->vsyn_para,
+                   DCU_VSYN_PARA_BP(info.var.upper_margin) |
+                   DCU_VSYN_PARA_PW(info.var.vsync_len) |
+                   DCU_VSYN_PARA_FP(info.var.lower_margin));
+
+       dcu_write32(&regs->synpol,
+                   DCU_SYN_POL_INV_PXCK_FALL |
+                   DCU_SYN_POL_NEG_REMAIN |
+                   DCU_SYN_POL_INV_VS_LOW |
+                   DCU_SYN_POL_INV_HS_LOW);
+
+       dcu_write32(&regs->bgnd,
+                   DCU_BGND_R(0) | DCU_BGND_G(0) | DCU_BGND_B(0));
+
+       dcu_write32(&regs->mode,
+                   DCU_MODE_BLEND_ITER(DCU_LAYER_MAX_NUM) |
+                   DCU_MODE_RASTER_EN);
+
+       dcu_write32(&regs->threshold,
+                   DCU_THRESHOLD_LS_BF_VS(0x3) |
+                   DCU_THRESHOLD_OUT_BUF_HIGH(0x78) |
+                   DCU_THRESHOLD_OUT_BUF_LOW(0));
+
+       mode = dcu_read32(&regs->mode);
+       dcu_write32(&regs->mode, mode | DCU_MODE_NORMAL);
+
+       layer_ctrldesc_init(0, pixel_format);
+
+       return 0;
+}
+
+void *video_hw_init(void)
+{
+       static GraphicDevice ctfb;
+       const char *options;
+       unsigned int depth = 0, freq = 0;
+       struct fb_videomode *fsl_dcu_mode_db = &fsl_dcu_mode_480_272;
+
+       if (!video_get_video_mode(&ctfb.winSizeX, &ctfb.winSizeY, &depth, &freq,
+                                 &options))
+               return NULL;
+
+       /* Find the monitor port, which is a required option */
+       if (!options)
+               return NULL;
+       if (strncmp(options, "monitor=", 8) != 0)
+               return NULL;
+
+       switch (RESOLUTION(ctfb.winSizeX, ctfb.winSizeY)) {
+       case RESOLUTION(480, 272):
+               fsl_dcu_mode_db = &fsl_dcu_mode_480_272;
+               break;
+       case RESOLUTION(640, 480):
+               fsl_dcu_mode_db = &fsl_dcu_mode_640_480;
+               break;
+       default:
+               printf("unsupported resolution %ux%u\n",
+                      ctfb.winSizeX, ctfb.winSizeY);
+       }
+
+       info.var.xres = fsl_dcu_mode_db->xres;
+       info.var.yres = fsl_dcu_mode_db->yres;
+       info.var.bits_per_pixel = 32;
+       info.var.pixclock = fsl_dcu_mode_db->pixclock;
+       info.var.left_margin = fsl_dcu_mode_db->left_margin;
+       info.var.right_margin = fsl_dcu_mode_db->right_margin;
+       info.var.upper_margin = fsl_dcu_mode_db->upper_margin;
+       info.var.lower_margin = fsl_dcu_mode_db->lower_margin;
+       info.var.hsync_len = fsl_dcu_mode_db->hsync_len;
+       info.var.vsync_len = fsl_dcu_mode_db->vsync_len;
+       info.var.sync = fsl_dcu_mode_db->sync;
+       info.var.vmode = fsl_dcu_mode_db->vmode;
+       info.fix.line_length = info.var.xres * info.var.bits_per_pixel / 8;
+
+       if (platform_dcu_init(ctfb.winSizeX, ctfb.winSizeY,
+                             options + 8, fsl_dcu_mode_db) < 0)
+               return NULL;
+
+       ctfb.frameAdrs = (unsigned int)info.screen_base;
+       ctfb.plnSizeX = ctfb.winSizeX;
+       ctfb.plnSizeY = ctfb.winSizeY;
+
+       ctfb.gdfBytesPP = 4;
+       ctfb.gdfIndex = GDF_32BIT_X888RGB;
+
+       ctfb.memSize = info.screen_size;
+
+       return &ctfb;
+}
index 0276a10564c1fe63ec0c854803af9d3eafbc9bc2..1dc0f5aa101e4fabf9710563ce37cb21d1f9faf9 100644 (file)
@@ -7,7 +7,7 @@
 
 obj-$(CONFIG_AT91SAM9_WATCHDOG) += at91sam9_wdt.o
 obj-$(CONFIG_FTWDT010_WATCHDOG) += ftwdt010_wdt.o
-ifneq (,$(filter $(SOC), mx31 mx35 mx5 mx6 vf610))
+ifneq (,$(filter $(SOC), mx31 mx35 mx5 mx6 vf610 ls102xa))
 obj-y += imx_watchdog.o
 endif
 obj-$(CONFIG_TNETV107X_WATCHDOG) += tnetv107x_wdt.o
index c5c025dab33060ec870cf49733eb8420ce4456d6..0bf690e73d157fffa65d423060227aced9865fe3 100644 (file)
@@ -1,9 +1,6 @@
 #include <common.h>
 #include <exports.h>
-
-#ifndef GCC_VERSION
-#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
-#endif /* GCC_VERSION */
+#include <linux/compiler.h>
 
 #if defined(CONFIG_X86)
 /*
@@ -237,7 +234,7 @@ gd_t *global_data;
  * implementation. On the other hand, asm() statements with
  * arguments can be used only inside the functions (gcc limitation)
  */
-#if GCC_VERSION < 3004
+#if GCC_VERSION < 30400
 static
 #endif /* GCC_VERSION */
 void __attribute__((unused)) dummy(void)
index 9ed40177cb993ccb4d137c9bef58eb81f8a497e9..c626cbf48430101261b3fafa9c1651f263f59a9b 100644 (file)
@@ -20,7 +20,6 @@
  */
 
 #include "ubifs.h"
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/writeback.h>
 #else
index 2f50a554bbe8dd5591410697c36be789a40cdf7c..6e6f018b2f5ed4e52d947305e6fe378549bc78b0 100644 (file)
@@ -16,7 +16,6 @@
  * various local functions of those subsystems.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/module.h>
 #include <linux/debugfs.h>
index 6d325af8bcc296305815536f748aed790e697df4..807ce1b7338033dded1ffc68c45eb0d7e53957a2 100644 (file)
@@ -12,7 +12,6 @@
 #ifndef __UBIFS_DEBUG_H__
 #define __UBIFS_DEBUG_H__
 
-#define __UBOOT__
 /* Checking helper functions */
 typedef int (*dbg_leaf_callback)(struct ubifs_info *c,
                                 struct ubifs_zbranch *zbr, void *priv);
index f87341e1087a4b5c7ab0682ea36d4af89e20b9d7..bdccdc45e1116d67e634e1363577c8bb445357e6 100644 (file)
@@ -59,7 +59,6 @@
  * they are read from the flash media.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc32.h>
 #include <linux/slab.h>
index ced04240c54efa1a443ff3bc7c3192eddbbc2d04..0355fe2b048f73db36001255a5797263f4272244 100644 (file)
@@ -16,7 +16,6 @@
  * journal.
  */
 
-#define __UBOOT__
 #ifdef __UBOOT__
 #include <linux/err.h>
 #endif
index fc6686bb08b14f52a7fef241d7811764552a6897..a1a814f7797fef2fcb9c7f3977e674e2d17b64cd 100644 (file)
@@ -17,7 +17,6 @@
  * an empty LEB for the journal, or a very dirty LEB for garbage collection.
  */
 
-#define __UBOOT__
 #ifdef __UBOOT__
 #include <linux/err.h>
 #endif
index c49d3b0687f5e11d395c476a089e1621e95b33a5..8489e90e4a353fdcb174015a6a506c7ebf6b7218 100644 (file)
@@ -33,7 +33,6 @@
  */
 
 #include "ubifs.h"
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc16.h>
 #include <linux/math64.h>
index cad422e06623a48254b42c51af64f764a8aeff94..c818d4ca5af83be100f963c4c45478632b719802 100644 (file)
@@ -14,7 +14,6 @@
  * subsystem.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc16.h>
 #include <linux/slab.h>
index 00ca855e818cad8f7c51017f7fa32e907972e885..761e0704e4a6c26882cb34f616e13bd77d598201 100644 (file)
@@ -11,7 +11,6 @@
 
 /* This file implements reading and writing the master node */
 
-#define __UBOOT__
 #include "ubifs.h"
 #ifdef __UBOOT__
 #include <linux/compat.h>
index 4316d3c8ae2b1ecf8ceeef53c2c9200098001452..7cad2bed1b232a767b15df87895913c37351661a 100644 (file)
@@ -16,7 +16,6 @@
 #ifndef __UBIFS_MISC_H__
 #define __UBIFS_MISC_H__
 
-#define __UBOOT__
 /**
  * ubifs_zn_dirty - check if znode is dirty.
  * @znode: znode to check
index f54a440cd51d8a66fecb2ba3232eb570e3bd3efe..763770738b7c9eb7b91c001ca9b6349691f4481b 100644 (file)
@@ -36,7 +36,6 @@
  * refuses to mount.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc32.h>
 #include <linux/slab.h>
index 6393b15b1852d95300181248e114736030b9b2ac..7268b37a49c8b0a13a3e223fab6aa2a3624e0a86 100644 (file)
@@ -21,7 +21,6 @@
  * larger is the journal, the more memory its index may consume.
  */
 
-#define __UBOOT__
 #ifdef __UBOOT__
 #include <linux/compat.h>
 #include <linux/err.h>
index fc0194aa267023866ebef30eecffb74a422bb14e..4983bf62897f116b1691fdcd4bcb2a6bd33db83d 100644 (file)
@@ -16,7 +16,6 @@
  */
 
 #include "ubifs.h"
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/slab.h>
 #include <linux/random.h>
index 5523d4e6608f39d16e98641eb584128fc67a6e09..6fc464bb4850dce5852895cadc9e98b18489067c 100644 (file)
@@ -16,7 +16,6 @@
  * debugging functions.
  */
 
-#define __UBOOT__
 #ifdef __UBOOT__
 #include <linux/err.h>
 #endif
index dd9b668ee763f9b1d17cb8520b75af99f6bc3610..01d449a7afa4f95185e777f06db9e4f47c01d0a4 100644 (file)
@@ -15,7 +15,6 @@
  * corresponding subsystems, but most of it is here.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/init.h>
 #include <linux/slab.h>
index eda50705574d9c063bb14d77d427e1ff33631973..95cae548bf2cf4a2ef2ee7cdfa693f8221a59bec 100644 (file)
@@ -19,7 +19,6 @@
  * the mutex locked.
  */
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/crc32.h>
 #include <linux/slab.h>
index 81bdad920344b3c23563ef2814bf187fbfab9971..f808e0bc2fd14476a6d1d6445ccf1261372b595d 100644 (file)
@@ -16,7 +16,6 @@
  * putting it all in one file would make that file too big and unreadable.
  */
 
-#define __UBOOT__
 #ifdef __UBOOT__
 #include <linux/err.h>
 #endif
index b91a6fd26f261118516ba6c49938c9ac2419ed49..49e6f469ca6c47d3b515dc2ad7308008c045ab39 100644 (file)
@@ -26,7 +26,6 @@
 #include "ubifs.h"
 #include <u-boot/zlib.h>
 
-#define __UBOOT__
 #include <linux/err.h>
 #include <linux/lzo.h>
 
index acc6a404dde477a0b161aa88ad3c89a74ca7db73..0ce2475e0b8e9a9c95650837d20fef9adbc5415b 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef __UBIFS_H__
 #define __UBIFS_H__
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <asm/div64.h>
 #include <linux/statfs.h>
diff --git a/include/aboot.h b/include/aboot.h
new file mode 100644 (file)
index 0000000..30e4d36
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2014 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <part.h>
+#include <sparse_format.h>
+
+#define ROUNDUP(x, y)  (((x) + ((y) - 1)) & ~((y) - 1))
+
+void fastboot_fail(const char *s);
+void fastboot_okay(const char *s);
+
+static inline int is_sparse_image(void *buf)
+{
+       sparse_header_t *s_header = (sparse_header_t *)buf;
+
+       if ((le32_to_cpu(s_header->magic) == SPARSE_HEADER_MAGIC) &&
+           (le16_to_cpu(s_header->major_version) == 1))
+               return 1;
+
+       return 0;
+}
+
+void write_sparse_image(block_dev_desc_t *dev_desc,
+               disk_partition_t *info, const char *part_name,
+               void *data, unsigned sz);
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
new file mode 100644 (file)
index 0000000..657e3b6
--- /dev/null
@@ -0,0 +1,389 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <config_cmd_default.h>
+
+#define CONFIG_LS102XA
+
+#define CONFIG_SYS_GENERIC_BOARD
+
+#define CONFIG_DISPLAY_CPUINFO
+#define CONFIG_DISPLAY_BOARDINFO
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_BOARD_EARLY_INIT_F
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 16 * 1024 * 1024)
+
+#define CONFIG_SYS_INIT_RAM_ADDR       OCRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE       OCRAM_SIZE
+
+/*
+ * Generic Timer Definitions
+ */
+#define GENERIC_TIMER_CLK              12500000
+
+#ifndef __ASSEMBLY__
+unsigned long get_board_sys_clk(void);
+unsigned long get_board_ddr_clk(void);
+#endif
+
+#define CONFIG_SYS_CLK_FREQ            get_board_sys_clk()
+#define CONFIG_DDR_CLK_FREQ            get_board_ddr_clk()
+
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE           0x67f80000
+#endif
+
+#define CONFIG_NR_DRAM_BANKS           1
+
+#define CONFIG_DDR_SPD
+#define SPD_EEPROM_ADDRESS             0x51
+#define CONFIG_SYS_SPD_BUS_NUM         0
+#define CONFIG_SYS_DDR_RAW_TIMING
+
+#define CONFIG_FSL_DDR_INTERACTIVE     /* Interactive debugging */
+#define CONFIG_SYS_FSL_DDR3            /* Use DDR3 memory */
+#define CONFIG_DIMM_SLOTS_PER_CTLR     1
+#define CONFIG_CHIP_SELECTS_PER_CTRL   4
+
+#define CONFIG_SYS_DDR_SDRAM_BASE      0x80000000UL
+#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
+
+#define CONFIG_DDR_ECC
+#ifdef CONFIG_DDR_ECC
+#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
+#define CONFIG_MEM_INIT_VALUE           0xdeadbeef
+#endif
+
+#define CONFIG_SYS_HAS_SERDES
+
+/*
+ * IFC Definitions
+ */
+#define CONFIG_FSL_IFC
+#define CONFIG_SYS_FLASH_BASE          0x60000000
+#define CONFIG_SYS_FLASH_BASE_PHYS     CONFIG_SYS_FLASH_BASE
+
+#define CONFIG_SYS_NOR0_CSPR_EXT       (0x0)
+#define CONFIG_SYS_NOR0_CSPR   (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
+                               CSPR_PORT_SIZE_16 | \
+                               CSPR_MSEL_NOR | \
+                               CSPR_V)
+#define CONFIG_SYS_NOR1_CSPR_EXT       (0x0)
+#define CONFIG_SYS_NOR1_CSPR   (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS \
+                               + 0x8000000) | \
+                               CSPR_PORT_SIZE_16 | \
+                               CSPR_MSEL_NOR | \
+                               CSPR_V)
+#define CONFIG_SYS_NOR_AMASK           IFC_AMASK(128 * 1024 * 1024)
+
+#define CONFIG_SYS_NOR_CSOR            (CSOR_NOR_ADM_SHIFT(4) | \
+                                       CSOR_NOR_TRHZ_80)
+#define CONFIG_SYS_NOR_FTIM0           (FTIM0_NOR_TACSE(0x4) | \
+                                       FTIM0_NOR_TEADC(0x5) | \
+                                       FTIM0_NOR_TEAHC(0x5))
+#define CONFIG_SYS_NOR_FTIM1           (FTIM1_NOR_TACO(0x35) | \
+                                       FTIM1_NOR_TRAD_NOR(0x1a) | \
+                                       FTIM1_NOR_TSEQRAD_NOR(0x13))
+#define CONFIG_SYS_NOR_FTIM2           (FTIM2_NOR_TCS(0x4) | \
+                                       FTIM2_NOR_TCH(0x4) | \
+                                       FTIM2_NOR_TWPH(0xe) | \
+                                       FTIM2_NOR_TWP(0x1c))
+#define CONFIG_SYS_NOR_FTIM3           0
+
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_QUIET_TEST
+#define CONFIG_FLASH_SHOW_PROGRESS     45
+#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     2       /* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024    /* sectors per device */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    60000   /* Flash Erase Timeout (ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms) */
+
+#define CONFIG_SYS_FLASH_EMPTY_INFO
+#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE_PHYS, \
+                                       CONFIG_SYS_FLASH_BASE_PHYS + 0x8000000}
+
+/*
+ * NAND Flash Definitions
+ */
+#define CONFIG_NAND_FSL_IFC
+
+#define CONFIG_SYS_NAND_BASE           0x7e800000
+#define CONFIG_SYS_NAND_BASE_PHYS      CONFIG_SYS_NAND_BASE
+
+#define CONFIG_SYS_NAND_CSPR_EXT       (0x0)
+
+#define CONFIG_SYS_NAND_CSPR   (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
+                               | CSPR_PORT_SIZE_8      \
+                               | CSPR_MSEL_NAND        \
+                               | CSPR_V)
+#define CONFIG_SYS_NAND_AMASK  IFC_AMASK(64*1024)
+#define CONFIG_SYS_NAND_CSOR   (CSOR_NAND_ECC_ENC_EN   /* ECC on encode */ \
+                               | CSOR_NAND_ECC_DEC_EN  /* ECC on decode */ \
+                               | CSOR_NAND_ECC_MODE_4  /* 4-bit ECC */ \
+                               | CSOR_NAND_RAL_3       /* RAL = 3 Bytes */ \
+                               | CSOR_NAND_PGS_2K      /* Page Size = 2K */ \
+                               | CSOR_NAND_SPRZ_64     /* Spare size = 64 */ \
+                               | CSOR_NAND_PB(64))     /* 64 Pages Per Block */
+
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+
+#define CONFIG_SYS_NAND_FTIM0          (FTIM0_NAND_TCCST(0x7) | \
+                                       FTIM0_NAND_TWP(0x18)   | \
+                                       FTIM0_NAND_TWCHT(0x7) | \
+                                       FTIM0_NAND_TWH(0xa))
+#define CONFIG_SYS_NAND_FTIM1          (FTIM1_NAND_TADLE(0x32) | \
+                                       FTIM1_NAND_TWBE(0x39)  | \
+                                       FTIM1_NAND_TRR(0xe)   | \
+                                       FTIM1_NAND_TRP(0x18))
+#define CONFIG_SYS_NAND_FTIM2          (FTIM2_NAND_TRAD(0xf) | \
+                                       FTIM2_NAND_TREH(0xa) | \
+                                       FTIM2_NAND_TWHRE(0x1e))
+#define CONFIG_SYS_NAND_FTIM3           0x0
+
+#define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
+#define CONFIG_SYS_MAX_NAND_DEVICE     1
+#define CONFIG_MTD_NAND_VERIFY_WRITE
+#define CONFIG_CMD_NAND
+
+#define CONFIG_SYS_NAND_BLOCK_SIZE     (128 * 1024)
+
+/*
+ * QIXIS Definitions
+ */
+#define CONFIG_FSL_QIXIS
+
+#ifdef CONFIG_FSL_QIXIS
+#define QIXIS_BASE                     0x7fb00000
+#define QIXIS_BASE_PHYS                        QIXIS_BASE
+#define CONFIG_SYS_I2C_FPGA_ADDR       0x66
+#define QIXIS_LBMAP_SWITCH             6
+#define QIXIS_LBMAP_MASK               0x0f
+#define QIXIS_LBMAP_SHIFT              0
+#define QIXIS_LBMAP_DFLTBANK           0x00
+#define QIXIS_LBMAP_ALTBANK            0x04
+#define QIXIS_RST_CTL_RESET            0x44
+#define QIXIS_RCFG_CTL_RECONFIG_IDLE   0x20
+#define QIXIS_RCFG_CTL_RECONFIG_START  0x21
+#define QIXIS_RCFG_CTL_WATCHDOG_ENBLE  0x08
+
+#define CONFIG_SYS_FPGA_CSPR_EXT       (0x0)
+#define CONFIG_SYS_FPGA_CSPR           (CSPR_PHYS_ADDR(QIXIS_BASE_PHYS) | \
+                                       CSPR_PORT_SIZE_8 | \
+                                       CSPR_MSEL_GPCM | \
+                                       CSPR_V)
+#define CONFIG_SYS_FPGA_AMASK          IFC_AMASK(64 * 1024)
+#define CONFIG_SYS_FPGA_CSOR           (CSOR_NOR_ADM_SHIFT(4) | \
+                                       CSOR_NOR_NOR_MODE_AVD_NOR | \
+                                       CSOR_NOR_TRHZ_80)
+
+/*
+ * QIXIS Timing parameters for IFC GPCM
+ */
+#define CONFIG_SYS_FPGA_FTIM0          (FTIM0_GPCM_TACSE(0xe) | \
+                                       FTIM0_GPCM_TEADC(0xe) | \
+                                       FTIM0_GPCM_TEAHC(0xe))
+#define CONFIG_SYS_FPGA_FTIM1          (FTIM1_GPCM_TACO(0xe) | \
+                                       FTIM1_GPCM_TRAD(0x1f))
+#define CONFIG_SYS_FPGA_FTIM2          (FTIM2_GPCM_TCS(0xe) | \
+                                       FTIM2_GPCM_TCH(0xe) | \
+                                       FTIM2_GPCM_TWP(0xf0))
+#define CONFIG_SYS_FPGA_FTIM3          0x0
+#endif
+
+#define CONFIG_SYS_CSPR0_EXT           CONFIG_SYS_NOR0_CSPR_EXT
+#define CONFIG_SYS_CSPR0               CONFIG_SYS_NOR0_CSPR
+#define CONFIG_SYS_AMASK0              CONFIG_SYS_NOR_AMASK
+#define CONFIG_SYS_CSOR0               CONFIG_SYS_NOR_CSOR
+#define CONFIG_SYS_CS0_FTIM0           CONFIG_SYS_NOR_FTIM0
+#define CONFIG_SYS_CS0_FTIM1           CONFIG_SYS_NOR_FTIM1
+#define CONFIG_SYS_CS0_FTIM2           CONFIG_SYS_NOR_FTIM2
+#define CONFIG_SYS_CS0_FTIM3           CONFIG_SYS_NOR_FTIM3
+#define CONFIG_SYS_CSPR1_EXT           CONFIG_SYS_NOR1_CSPR_EXT
+#define CONFIG_SYS_CSPR1               CONFIG_SYS_NOR1_CSPR
+#define CONFIG_SYS_AMASK1              CONFIG_SYS_NOR_AMASK
+#define CONFIG_SYS_CSOR1               CONFIG_SYS_NOR_CSOR
+#define CONFIG_SYS_CS1_FTIM0           CONFIG_SYS_NOR_FTIM0
+#define CONFIG_SYS_CS1_FTIM1           CONFIG_SYS_NOR_FTIM1
+#define CONFIG_SYS_CS1_FTIM2           CONFIG_SYS_NOR_FTIM2
+#define CONFIG_SYS_CS1_FTIM3           CONFIG_SYS_NOR_FTIM3
+#define CONFIG_SYS_CSPR2_EXT           CONFIG_SYS_NAND_CSPR_EXT
+#define CONFIG_SYS_CSPR2               CONFIG_SYS_NAND_CSPR
+#define CONFIG_SYS_AMASK2              CONFIG_SYS_NAND_AMASK
+#define CONFIG_SYS_CSOR2               CONFIG_SYS_NAND_CSOR
+#define CONFIG_SYS_CS2_FTIM0           CONFIG_SYS_NAND_FTIM0
+#define CONFIG_SYS_CS2_FTIM1           CONFIG_SYS_NAND_FTIM1
+#define CONFIG_SYS_CS2_FTIM2           CONFIG_SYS_NAND_FTIM2
+#define CONFIG_SYS_CS2_FTIM3           CONFIG_SYS_NAND_FTIM3
+#define CONFIG_SYS_CSPR3_EXT           CONFIG_SYS_FPGA_CSPR_EXT
+#define CONFIG_SYS_CSPR3               CONFIG_SYS_FPGA_CSPR
+#define CONFIG_SYS_AMASK3              CONFIG_SYS_FPGA_AMASK
+#define CONFIG_SYS_CSOR3               CONFIG_SYS_FPGA_CSOR
+#define CONFIG_SYS_CS3_FTIM0           CONFIG_SYS_FPGA_FTIM0
+#define CONFIG_SYS_CS3_FTIM1           CONFIG_SYS_FPGA_FTIM1
+#define CONFIG_SYS_CS3_FTIM2           CONFIG_SYS_FPGA_FTIM2
+#define CONFIG_SYS_CS3_FTIM3           CONFIG_SYS_FPGA_FTIM3
+
+/*
+ * Serial Port
+ */
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         get_serial_clock()
+
+#define CONFIG_BAUDRATE                        115200
+
+/*
+ * I2C
+ */
+#define CONFIG_CMD_I2C
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_MXC
+
+/*
+ * I2C bus multiplexer
+ */
+#define I2C_MUX_PCA_ADDR_PRI           0x77
+#define I2C_MUX_CH_DEFAULT             0x8
+
+/*
+ * MMC
+ */
+#define CONFIG_MMC
+#define CONFIG_CMD_MMC
+#define CONFIG_FSL_ESDHC
+#define CONFIG_GENERIC_MMC
+
+/*
+ * eTSEC
+ */
+#define CONFIG_TSEC_ENET
+
+#ifdef CONFIG_TSEC_ENET
+#define CONFIG_MII
+#define CONFIG_MII_DEFAULT_TSEC                3
+#define CONFIG_TSEC1                   1
+#define CONFIG_TSEC1_NAME              "eTSEC1"
+#define CONFIG_TSEC2                   1
+#define CONFIG_TSEC2_NAME              "eTSEC2"
+#define CONFIG_TSEC3                   1
+#define CONFIG_TSEC3_NAME              "eTSEC3"
+
+#define TSEC1_PHY_ADDR                 1
+#define TSEC2_PHY_ADDR                 2
+#define TSEC3_PHY_ADDR                 3
+
+#define TSEC1_FLAGS                    (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC2_FLAGS                    (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC3_FLAGS                    (TSEC_GIGABIT | TSEC_REDUCED)
+
+#define TSEC1_PHYIDX                   0
+#define TSEC2_PHYIDX                   0
+#define TSEC3_PHYIDX                   0
+
+#define CONFIG_ETHPRIME                        "eTSEC1"
+
+#define CONFIG_PHY_GIGE
+#define CONFIG_PHYLIB
+#define CONFIG_PHY_REALTEK
+
+#define CONFIG_HAS_ETH0
+#define CONFIG_HAS_ETH1
+#define CONFIG_HAS_ETH2
+
+#define CONFIG_FSL_SGMII_RISER         1
+#define SGMII_RISER_PHY_OFFSET         0x1b
+
+#ifdef CONFIG_FSL_SGMII_RISER
+#define CONFIG_SYS_TBIPA_VALUE         8
+#endif
+
+#endif
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NET
+
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_CMD_IMLS
+
+#define CONFIG_HWCONFIG
+#define HWCONFIG_BUFFER_SIZE           128
+
+#define CONFIG_BOOTDELAY               3
+
+#define CONFIG_EXTRA_ENV_SETTINGS      \
+       "bootargs=root=/dev/ram0 rw console=ttyS0,115200\0" \
+       "fdt_high=0xcfffffff\0"         \
+       "initrd_high=0xcfffffff\0"      \
+       "hwconfig=fsl_ddr:ctlr_intlv=null,bank_intlv=null\0"
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP            /* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER         /* use "hush" command parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
+#define CONFIG_SYS_PROMPT              "=> "
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_CBSIZE              256     /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE              \
+               (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS             16      /* max number of command args */
+#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
+
+#define CONFIG_CMD_ENV_EXISTS
+#define CONFIG_CMD_GREPENV
+#define CONFIG_CMD_MEMINFO
+#define CONFIG_CMD_MEMTEST
+#define CONFIG_SYS_MEMTEST_START       0x80000000
+#define CONFIG_SYS_MEMTEST_END         0x9fffffff
+
+#define CONFIG_SYS_LOAD_ADDR           0x82000000
+#define CONFIG_SYS_HZ                  1000
+
+/*
+ * Stack sizes
+ * The stack sizes are set up in start.S using the settings below
+ */
+#define CONFIG_STACKSIZE               (30 * 1024)
+
+#define CONFIG_SYS_INIT_SP_OFFSET \
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR \
+       (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
+
+#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE    /* start of monitor */
+
+/*
+ * Environment
+ */
+#define CONFIG_ENV_OVERWRITE
+
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE                        0x2000
+#define CONFIG_ENV_SECT_SIZE           0x20000 /* 128K (one sector) */
+
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_BOARD_SETUP
+#define CONFIG_CMD_BOOTZ
+
+#endif
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
new file mode 100644 (file)
index 0000000..45b2272
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <config_cmd_default.h>
+
+#define CONFIG_LS102XA
+
+#define CONFIG_SYS_GENERIC_BOARD
+
+#define CONFIG_DISPLAY_CPUINFO
+#define CONFIG_DISPLAY_BOARDINFO
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_BOARD_EARLY_INIT_F
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 16 * 1024 * 1024)
+
+#define CONFIG_SYS_INIT_RAM_ADDR       OCRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE       OCRAM_SIZE
+
+/*
+ * Generic Timer Definitions
+ */
+#define GENERIC_TIMER_CLK              12500000
+
+#define CONFIG_SYS_CLK_FREQ            100000000
+#define CONFIG_DDR_CLK_FREQ            100000000
+
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE           0x67f80000
+#endif
+
+#define CONFIG_NR_DRAM_BANKS           1
+#define PHYS_SDRAM                     0x80000000
+#define PHYS_SDRAM_SIZE                        (1u * 1024 * 1024 * 1024)
+
+#define CONFIG_SYS_DDR_SDRAM_BASE      0x80000000UL
+#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
+
+#define CONFIG_SYS_HAS_SERDES
+
+/*
+ * IFC Definitions
+ */
+#define CONFIG_FSL_IFC
+#define CONFIG_SYS_FLASH_BASE          0x60000000
+#define CONFIG_SYS_FLASH_BASE_PHYS     CONFIG_SYS_FLASH_BASE
+
+#define CONFIG_SYS_NOR0_CSPR_EXT       (0x0)
+#define CONFIG_SYS_NOR0_CSPR   (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE_PHYS) | \
+                               CSPR_PORT_SIZE_16 | \
+                               CSPR_MSEL_NOR | \
+                               CSPR_V)
+#define CONFIG_SYS_NOR_AMASK           IFC_AMASK(128 * 1024 * 1024)
+
+/* NOR Flash Timing Params */
+#define CONFIG_SYS_NOR_CSOR            (CSOR_NOR_ADM_SHIFT(4) | \
+                                       CSOR_NOR_TRHZ_80)
+#define CONFIG_SYS_NOR_FTIM0           (FTIM0_NOR_TACSE(0x4) | \
+                                       FTIM0_NOR_TEADC(0x5) | \
+                                       FTIM0_NOR_TAVDS(0x0) | \
+                                       FTIM0_NOR_TEAHC(0x5))
+#define CONFIG_SYS_NOR_FTIM1           (FTIM1_NOR_TACO(0x35) | \
+                                       FTIM1_NOR_TRAD_NOR(0x1A) | \
+                                       FTIM1_NOR_TSEQRAD_NOR(0x13))
+#define CONFIG_SYS_NOR_FTIM2           (FTIM2_NOR_TCS(0x4) | \
+                                       FTIM2_NOR_TCH(0x4) | \
+                                       FTIM2_NOR_TWP(0x1c) | \
+                                       FTIM2_NOR_TWPH(0x0e))
+#define CONFIG_SYS_NOR_FTIM3           0
+
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_QUIET_TEST
+#define CONFIG_FLASH_SHOW_PROGRESS     45      /* count down from 45/5: 9..1 */
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024    /* sectors per device */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    60000   /* Flash Erase Timeout (ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms) */
+
+#define CONFIG_SYS_FLASH_EMPTY_INFO
+#define CONFIG_SYS_FLASH_BANKS_LIST    { CONFIG_SYS_FLASH_BASE_PHYS }
+
+#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
+
+/* CPLD */
+
+#define CONFIG_SYS_CPLD_BASE   0x7fb00000
+#define CPLD_BASE_PHYS         CONFIG_SYS_CPLD_BASE
+
+#define CONFIG_SYS_FPGA_CSPR_EXT        (0x0)
+#define CONFIG_SYS_FPGA_CSPR           (CSPR_PHYS_ADDR(CPLD_BASE_PHYS) | \
+                                       CSPR_PORT_SIZE_8 | \
+                                       CSPR_MSEL_GPCM | \
+                                       CSPR_V)
+#define CONFIG_SYS_FPGA_AMASK          IFC_AMASK(64 * 1024)
+#define CONFIG_SYS_FPGA_CSOR           (CSOR_NOR_ADM_SHIFT(4) | \
+                                       CSOR_NOR_NOR_MODE_AVD_NOR | \
+                                       CSOR_NOR_TRHZ_80)
+
+/* CPLD Timing parameters for IFC GPCM */
+#define CONFIG_SYS_FPGA_FTIM0          (FTIM0_GPCM_TACSE(0xf) | \
+                                       FTIM0_GPCM_TEADC(0xf) | \
+                                       FTIM0_GPCM_TEAHC(0xf))
+#define CONFIG_SYS_FPGA_FTIM1          (FTIM1_GPCM_TACO(0xff) | \
+                                       FTIM1_GPCM_TRAD(0x3f))
+#define CONFIG_SYS_FPGA_FTIM2          (FTIM2_GPCM_TCS(0xf) | \
+                                       FTIM2_GPCM_TCH(0xf) | \
+                                       FTIM2_GPCM_TWP(0xff))
+#define CONFIG_SYS_FPGA_FTIM3           0x0
+#define CONFIG_SYS_CSPR0_EXT           CONFIG_SYS_NOR0_CSPR_EXT
+#define CONFIG_SYS_CSPR0               CONFIG_SYS_NOR0_CSPR
+#define CONFIG_SYS_AMASK0              CONFIG_SYS_NOR_AMASK
+#define CONFIG_SYS_CSOR0               CONFIG_SYS_NOR_CSOR
+#define CONFIG_SYS_CS0_FTIM0           CONFIG_SYS_NOR_FTIM0
+#define CONFIG_SYS_CS0_FTIM1           CONFIG_SYS_NOR_FTIM1
+#define CONFIG_SYS_CS0_FTIM2           CONFIG_SYS_NOR_FTIM2
+#define CONFIG_SYS_CS0_FTIM3           CONFIG_SYS_NOR_FTIM3
+#define CONFIG_SYS_CSPR1_EXT           CONFIG_SYS_FPGA_CSPR_EXT
+#define CONFIG_SYS_CSPR1               CONFIG_SYS_FPGA_CSPR
+#define CONFIG_SYS_AMASK1              CONFIG_SYS_FPGA_AMASK
+#define CONFIG_SYS_CSOR1               CONFIG_SYS_FPGA_CSOR
+#define CONFIG_SYS_CS1_FTIM0           CONFIG_SYS_FPGA_FTIM0
+#define CONFIG_SYS_CS1_FTIM1           CONFIG_SYS_FPGA_FTIM1
+#define CONFIG_SYS_CS1_FTIM2           CONFIG_SYS_FPGA_FTIM2
+#define CONFIG_SYS_CS1_FTIM3           CONFIG_SYS_FPGA_FTIM3
+
+/*
+ * Serial Port
+ */
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         get_serial_clock()
+
+#define CONFIG_BAUDRATE                        115200
+
+/*
+ * I2C
+ */
+#define CONFIG_CMD_I2C
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_MXC
+
+/*
+ * MMC
+ */
+#define CONFIG_MMC
+#define CONFIG_CMD_MMC
+#define CONFIG_FSL_ESDHC
+#define CONFIG_GENERIC_MMC
+
+/*
+ * Video
+ */
+#define CONFIG_FSL_DCU_FB
+
+#ifdef CONFIG_FSL_DCU_FB
+#define CONFIG_VIDEO
+#define CONFIG_CMD_BMP
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_VIDEO_BMP_LOGO
+
+#define CONFIG_FSL_DCU_SII9022A
+#define CONFIG_SYS_I2C_DVI_BUS_NUM     1
+#define CONFIG_SYS_I2C_DVI_ADDR                0x39
+#endif
+
+/*
+ * eTSEC
+ */
+#define CONFIG_TSEC_ENET
+
+#ifdef CONFIG_TSEC_ENET
+#define CONFIG_MII
+#define CONFIG_MII_DEFAULT_TSEC                1
+#define CONFIG_TSEC1                   1
+#define CONFIG_TSEC1_NAME              "eTSEC1"
+#define CONFIG_TSEC2                   1
+#define CONFIG_TSEC2_NAME              "eTSEC2"
+#define CONFIG_TSEC3                   1
+#define CONFIG_TSEC3_NAME              "eTSEC3"
+
+#define TSEC1_PHY_ADDR                 2
+#define TSEC2_PHY_ADDR                 0
+#define TSEC3_PHY_ADDR                 1
+
+#define TSEC1_FLAGS                    (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC2_FLAGS                    (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC3_FLAGS                    (TSEC_GIGABIT | TSEC_REDUCED)
+
+#define TSEC1_PHYIDX                   0
+#define TSEC2_PHYIDX                   0
+#define TSEC3_PHYIDX                   0
+
+#define CONFIG_ETHPRIME                        "eTSEC1"
+
+#define CONFIG_PHY_GIGE
+#define CONFIG_PHYLIB
+#define CONFIG_PHY_ATHEROS
+
+#define CONFIG_HAS_ETH0
+#define CONFIG_HAS_ETH1
+#define CONFIG_HAS_ETH2
+#endif
+
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NET
+
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_CMD_IMLS
+
+#define CONFIG_HWCONFIG
+#define HWCONFIG_BUFFER_SIZE           128
+
+#define CONFIG_BOOTDELAY               3
+
+#define CONFIG_EXTRA_ENV_SETTINGS      \
+       "bootargs=root=/dev/ram0 rw console=ttyS0,115200\0" \
+       "initrd_high=0xcfffffff\0"      \
+       "fdt_high=0xcfffffff\0"
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP            /* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER         /* use "hush" command parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
+#define CONFIG_SYS_PROMPT              "=> "
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_CBSIZE              256     /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE              \
+               (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS             16      /* max number of command args */
+#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
+
+#define CONFIG_CMD_ENV_EXISTS
+#define CONFIG_CMD_GREPENV
+#define CONFIG_CMD_MEMINFO
+#define CONFIG_CMD_MEMTEST
+#define CONFIG_SYS_MEMTEST_START       0x80000000
+#define CONFIG_SYS_MEMTEST_END         0x9fffffff
+
+#define CONFIG_SYS_LOAD_ADDR           0x82000000
+#define CONFIG_SYS_HZ                  1000
+
+/*
+ * Stack sizes
+ * The stack sizes are set up in start.S using the settings below
+ */
+#define CONFIG_STACKSIZE               (30 * 1024)
+
+#define CONFIG_SYS_INIT_SP_OFFSET \
+       (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR \
+       (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
+
+#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE    /* start of monitor */
+
+/*
+ * Environment
+ */
+#define CONFIG_ENV_OVERWRITE
+
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE                        0x20000
+#define CONFIG_ENV_SECT_SIZE           0x20000 /* 128K (one sector) */
+
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_BOARD_SETUP
+#define CONFIG_CMD_BOOTZ
+
+#endif
index bf2d25c87127db793f62e8f5e3699c243140c09b..f5fa4b3ddc30870fd0e348c3dd2caf705530e15e 100644 (file)
@@ -31,6 +31,9 @@
 #define CONFIG_DM_DEMO_SHAPE
 #define CONFIG_DM_GPIO
 #define CONFIG_DM_TEST
+#define CONFIG_DM_SERIAL
+
+#define CONFIG_SYS_STDIO_DEREGISTER
 
 /* Number of bits in a C 'long' on this architecture */
 #define CONFIG_SANDBOX_BITS_PER_LONG   64
index d27fcebd7c4654f4d4e9a9987e6f694adaf62268..834b3d5686c159b019b5c4661bfa943e0dc45957 100644 (file)
 
 #define CONFIG_DM
 #define CONFIG_CMD_DM
+#define CONFIG_DM_GPIO
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_DM_SERIAL
+#endif
 
 #define CONFIG_SYS_TIMER_RATE          1000000
 #define CONFIG_SYS_TIMER_COUNTER       NV_PA_TMRUS_BASE
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN          (4 << 20)       /* 4MB  */
+#define CONFIG_SYS_MALLOC_F_LEN        (1 << 10)
 
 /*
  * NS16550 Configuration
  */
-#define CONFIG_SYS_NS16550
+#ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
 #define CONFIG_SYS_NS16550_CLK         V_NS16550_CLK
+#else
+#define CONFIG_TEGRA_SERIAL
+#endif
+#define CONFIG_SYS_NS16550
 
 /*
  * Common HW configuration.
index 87a3af59c2e33b355fb4980debe11ecc854f6a1b..23568952467e6d5b685d84e2664561f5ca9ea942 100644 (file)
@@ -53,7 +53,11 @@ int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only);
  * @parent: parent driver (root)
  * @blob: device tree blob
  * @offset: offset of this device tree node
+ * @devp: if non-NULL, returns a pointer to the bound device
+ * @return 0 if device was bound, -EINVAL if the device tree is invalid,
+ * other -ve value on error
  */
-int lists_bind_fdt(struct udevice *parent, const void *blob, int offset);
+int lists_bind_fdt(struct udevice *parent, const void *blob, int offset,
+                  struct udevice **devp);
 
 #endif
index dd95fca428dc54d54c1d706431f7ef6e512c78e1..7f0e37b7b789cd64b48a124a0726dc4efbbe2fe4 100644 (file)
@@ -21,6 +21,7 @@ enum uclass_id {
 
        /* U-Boot uclasses start here */
        UCLASS_GPIO,            /* Bank of general-purpose I/O pins */
+       UCLASS_SERIAL,          /* Serial UART */
 
        UCLASS_COUNT,
        UCLASS_INVALID = -1,
diff --git a/include/dt-bindings/clock/tegra114-car.h b/include/dt-bindings/clock/tegra114-car.h
new file mode 100644 (file)
index 0000000..6d0d8d8
--- /dev/null
@@ -0,0 +1,342 @@
+/*
+ * This header provides constants for binding nvidia,tegra114-car.
+ *
+ * The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
+ * registers. These IDs often match those in the CAR's RST_DEVICES registers,
+ * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
+ * this case, those clocks are assigned IDs above 160 in order to highlight
+ * this issue. Implementations that interpret these clock IDs as bit values
+ * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
+ * explicitly handle these special cases.
+ *
+ * The balance of the clocks controlled by the CAR are assigned IDs of 160 and
+ * above.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_TEGRA114_CAR_H
+#define _DT_BINDINGS_CLOCK_TEGRA114_CAR_H
+
+/* 0 */
+/* 1 */
+/* 2 */
+/* 3 */
+#define TEGRA114_CLK_RTC 4
+#define TEGRA114_CLK_TIMER 5
+#define TEGRA114_CLK_UARTA 6
+/* 7 (register bit affects uartb and vfir) */
+/* 8 */
+#define TEGRA114_CLK_SDMMC2 9
+/* 10 (register bit affects spdif_in and spdif_out) */
+#define TEGRA114_CLK_I2S1 11
+#define TEGRA114_CLK_I2C1 12
+#define TEGRA114_CLK_NDFLASH 13
+#define TEGRA114_CLK_SDMMC1 14
+#define TEGRA114_CLK_SDMMC4 15
+/* 16 */
+#define TEGRA114_CLK_PWM 17
+#define TEGRA114_CLK_I2S2 18
+#define TEGRA114_CLK_EPP 19
+/* 20 (register bit affects vi and vi_sensor) */
+#define TEGRA114_CLK_GR2D 21
+#define TEGRA114_CLK_USBD 22
+#define TEGRA114_CLK_ISP 23
+#define TEGRA114_CLK_GR3D 24
+/* 25 */
+#define TEGRA114_CLK_DISP2 26
+#define TEGRA114_CLK_DISP1 27
+#define TEGRA114_CLK_HOST1X 28
+#define TEGRA114_CLK_VCP 29
+#define TEGRA114_CLK_I2S0 30
+/* 31 */
+
+/* 32 */
+/* 33 */
+#define TEGRA114_CLK_APBDMA 34
+/* 35 */
+#define TEGRA114_CLK_KBC 36
+/* 37 */
+/* 38 */
+/* 39 (register bit affects fuse and fuse_burn) */
+#define TEGRA114_CLK_KFUSE 40
+#define TEGRA114_CLK_SBC1 41
+#define TEGRA114_CLK_NOR 42
+/* 43 */
+#define TEGRA114_CLK_SBC2 44
+/* 45 */
+#define TEGRA114_CLK_SBC3 46
+#define TEGRA114_CLK_I2C5 47
+#define TEGRA114_CLK_DSIA 48
+/* 49 */
+#define TEGRA114_CLK_MIPI 50
+#define TEGRA114_CLK_HDMI 51
+#define TEGRA114_CLK_CSI 52
+/* 53 */
+#define TEGRA114_CLK_I2C2 54
+#define TEGRA114_CLK_UARTC 55
+#define TEGRA114_CLK_MIPI_CAL 56
+#define TEGRA114_CLK_EMC 57
+#define TEGRA114_CLK_USB2 58
+#define TEGRA114_CLK_USB3 59
+/* 60 */
+#define TEGRA114_CLK_VDE 61
+#define TEGRA114_CLK_BSEA 62
+#define TEGRA114_CLK_BSEV 63
+
+/* 64 */
+#define TEGRA114_CLK_UARTD 65
+/* 66 */
+#define TEGRA114_CLK_I2C3 67
+#define TEGRA114_CLK_SBC4 68
+#define TEGRA114_CLK_SDMMC3 69
+/* 70 */
+#define TEGRA114_CLK_OWR 71
+/* 72 */
+#define TEGRA114_CLK_CSITE 73
+/* 74 */
+/* 75 */
+#define TEGRA114_CLK_LA 76
+#define TEGRA114_CLK_TRACE 77
+#define TEGRA114_CLK_SOC_THERM 78
+#define TEGRA114_CLK_DTV 79
+#define TEGRA114_CLK_NDSPEED 80
+#define TEGRA114_CLK_I2CSLOW 81
+#define TEGRA114_CLK_DSIB 82
+#define TEGRA114_CLK_TSEC 83
+/* 84 */
+/* 85 */
+/* 86 */
+/* 87 */
+/* 88 */
+#define TEGRA114_CLK_XUSB_HOST 89
+/* 90 */
+#define TEGRA114_CLK_MSENC 91
+#define TEGRA114_CLK_CSUS 92
+/* 93 */
+/* 94 */
+/* 95 (bit affects xusb_dev and xusb_dev_src) */
+
+/* 96 */
+/* 97 */
+/* 98 */
+#define TEGRA114_CLK_MSELECT 99
+#define TEGRA114_CLK_TSENSOR 100
+#define TEGRA114_CLK_I2S3 101
+#define TEGRA114_CLK_I2S4 102
+#define TEGRA114_CLK_I2C4 103
+#define TEGRA114_CLK_SBC5 104
+#define TEGRA114_CLK_SBC6 105
+#define TEGRA114_CLK_D_AUDIO 106
+#define TEGRA114_CLK_APBIF 107
+#define TEGRA114_CLK_DAM0 108
+#define TEGRA114_CLK_DAM1 109
+#define TEGRA114_CLK_DAM2 110
+#define TEGRA114_CLK_HDA2CODEC_2X 111
+/* 112 */
+#define TEGRA114_CLK_AUDIO0_2X 113
+#define TEGRA114_CLK_AUDIO1_2X 114
+#define TEGRA114_CLK_AUDIO2_2X 115
+#define TEGRA114_CLK_AUDIO3_2X 116
+#define TEGRA114_CLK_AUDIO4_2X 117
+#define TEGRA114_CLK_SPDIF_2X 118
+#define TEGRA114_CLK_ACTMON 119
+#define TEGRA114_CLK_EXTERN1 120
+#define TEGRA114_CLK_EXTERN2 121
+#define TEGRA114_CLK_EXTERN3 122
+/* 123 */
+/* 124 */
+#define TEGRA114_CLK_HDA 125
+/* 126 */
+#define TEGRA114_CLK_SE 127
+
+#define TEGRA114_CLK_HDA2HDMI 128
+/* 129 */
+/* 130 */
+/* 131 */
+/* 132 */
+/* 133 */
+/* 134 */
+/* 135 */
+/* 136 */
+/* 137 */
+/* 138 */
+/* 139 */
+/* 140 */
+/* 141 */
+/* 142 */
+/* 143 (bit affects xusb_falcon_src, xusb_fs_src, */
+/*      xusb_host_src and xusb_ss_src) */
+#define TEGRA114_CLK_CILAB 144
+#define TEGRA114_CLK_CILCD 145
+#define TEGRA114_CLK_CILE 146
+#define TEGRA114_CLK_DSIALP 147
+#define TEGRA114_CLK_DSIBLP 148
+/* 149 */
+#define TEGRA114_CLK_DDS 150
+/* 151 */
+#define TEGRA114_CLK_DP2 152
+#define TEGRA114_CLK_AMX 153
+#define TEGRA114_CLK_ADX 154
+/* 155 (bit affects dfll_ref and dfll_soc) */
+#define TEGRA114_CLK_XUSB_SS 156
+/* 157 */
+/* 158 */
+/* 159 */
+
+/* 160 */
+/* 161 */
+/* 162 */
+/* 163 */
+/* 164 */
+/* 165 */
+/* 166 */
+/* 167 */
+/* 168 */
+/* 169 */
+/* 170 */
+/* 171 */
+/* 172 */
+/* 173 */
+/* 174 */
+/* 175 */
+/* 176 */
+/* 177 */
+/* 178 */
+/* 179 */
+/* 180 */
+/* 181 */
+/* 182 */
+/* 183 */
+/* 184 */
+/* 185 */
+/* 186 */
+/* 187 */
+/* 188 */
+/* 189 */
+/* 190 */
+/* 191 */
+
+#define TEGRA114_CLK_UARTB 192
+#define TEGRA114_CLK_VFIR 193
+#define TEGRA114_CLK_SPDIF_IN 194
+#define TEGRA114_CLK_SPDIF_OUT 195
+#define TEGRA114_CLK_VI 196
+#define TEGRA114_CLK_VI_SENSOR 197
+#define TEGRA114_CLK_FUSE 198
+#define TEGRA114_CLK_FUSE_BURN 199
+#define TEGRA114_CLK_CLK_32K 200
+#define TEGRA114_CLK_CLK_M 201
+#define TEGRA114_CLK_CLK_M_DIV2 202
+#define TEGRA114_CLK_CLK_M_DIV4 203
+#define TEGRA114_CLK_PLL_REF 204
+#define TEGRA114_CLK_PLL_C 205
+#define TEGRA114_CLK_PLL_C_OUT1 206
+#define TEGRA114_CLK_PLL_C2 207
+#define TEGRA114_CLK_PLL_C3 208
+#define TEGRA114_CLK_PLL_M 209
+#define TEGRA114_CLK_PLL_M_OUT1 210
+#define TEGRA114_CLK_PLL_P 211
+#define TEGRA114_CLK_PLL_P_OUT1 212
+#define TEGRA114_CLK_PLL_P_OUT2 213
+#define TEGRA114_CLK_PLL_P_OUT3 214
+#define TEGRA114_CLK_PLL_P_OUT4 215
+#define TEGRA114_CLK_PLL_A 216
+#define TEGRA114_CLK_PLL_A_OUT0 217
+#define TEGRA114_CLK_PLL_D 218
+#define TEGRA114_CLK_PLL_D_OUT0 219
+#define TEGRA114_CLK_PLL_D2 220
+#define TEGRA114_CLK_PLL_D2_OUT0 221
+#define TEGRA114_CLK_PLL_U 222
+#define TEGRA114_CLK_PLL_U_480M 223
+
+#define TEGRA114_CLK_PLL_U_60M 224
+#define TEGRA114_CLK_PLL_U_48M 225
+#define TEGRA114_CLK_PLL_U_12M 226
+#define TEGRA114_CLK_PLL_X 227
+#define TEGRA114_CLK_PLL_X_OUT0 228
+#define TEGRA114_CLK_PLL_RE_VCO 229
+#define TEGRA114_CLK_PLL_RE_OUT 230
+#define TEGRA114_CLK_PLL_E_OUT0 231
+#define TEGRA114_CLK_SPDIF_IN_SYNC 232
+#define TEGRA114_CLK_I2S0_SYNC 233
+#define TEGRA114_CLK_I2S1_SYNC 234
+#define TEGRA114_CLK_I2S2_SYNC 235
+#define TEGRA114_CLK_I2S3_SYNC 236
+#define TEGRA114_CLK_I2S4_SYNC 237
+#define TEGRA114_CLK_VIMCLK_SYNC 238
+#define TEGRA114_CLK_AUDIO0 239
+#define TEGRA114_CLK_AUDIO1 240
+#define TEGRA114_CLK_AUDIO2 241
+#define TEGRA114_CLK_AUDIO3 242
+#define TEGRA114_CLK_AUDIO4 243
+#define TEGRA114_CLK_SPDIF 244
+#define TEGRA114_CLK_CLK_OUT_1 245
+#define TEGRA114_CLK_CLK_OUT_2 246
+#define TEGRA114_CLK_CLK_OUT_3 247
+#define TEGRA114_CLK_BLINK 248
+/* 249 */
+/* 250 */
+/* 251 */
+#define TEGRA114_CLK_XUSB_HOST_SRC 252
+#define TEGRA114_CLK_XUSB_FALCON_SRC 253
+#define TEGRA114_CLK_XUSB_FS_SRC 254
+#define TEGRA114_CLK_XUSB_SS_SRC 255
+
+#define TEGRA114_CLK_XUSB_DEV_SRC 256
+#define TEGRA114_CLK_XUSB_DEV 257
+#define TEGRA114_CLK_XUSB_HS_SRC 258
+#define TEGRA114_CLK_SCLK 259
+#define TEGRA114_CLK_HCLK 260
+#define TEGRA114_CLK_PCLK 261
+#define TEGRA114_CLK_CCLK_G 262
+#define TEGRA114_CLK_CCLK_LP 263
+#define TEGRA114_CLK_DFLL_REF 264
+#define TEGRA114_CLK_DFLL_SOC 265
+/* 266 */
+/* 267 */
+/* 268 */
+/* 269 */
+/* 270 */
+/* 271 */
+/* 272 */
+/* 273 */
+/* 274 */
+/* 275 */
+/* 276 */
+/* 277 */
+/* 278 */
+/* 279 */
+/* 280 */
+/* 281 */
+/* 282 */
+/* 283 */
+/* 284 */
+/* 285 */
+/* 286 */
+/* 287 */
+
+/* 288 */
+/* 289 */
+/* 290 */
+/* 291 */
+/* 292 */
+/* 293 */
+/* 294 */
+/* 295 */
+/* 296 */
+/* 297 */
+/* 298 */
+/* 299 */
+#define TEGRA114_CLK_AUDIO0_MUX 300
+#define TEGRA114_CLK_AUDIO1_MUX 301
+#define TEGRA114_CLK_AUDIO2_MUX 302
+#define TEGRA114_CLK_AUDIO3_MUX 303
+#define TEGRA114_CLK_AUDIO4_MUX 304
+#define TEGRA114_CLK_SPDIF_MUX 305
+#define TEGRA114_CLK_CLK_OUT_1_MUX 306
+#define TEGRA114_CLK_CLK_OUT_2_MUX 307
+#define TEGRA114_CLK_CLK_OUT_3_MUX 308
+#define TEGRA114_CLK_DSIA_MUX 309
+#define TEGRA114_CLK_DSIB_MUX 310
+#define TEGRA114_CLK_CLK_MAX 311
+
+#endif /* _DT_BINDINGS_CLOCK_TEGRA114_CAR_H */
diff --git a/include/dt-bindings/clock/tegra124-car.h b/include/dt-bindings/clock/tegra124-car.h
new file mode 100644 (file)
index 0000000..fd8d62a
--- /dev/null
@@ -0,0 +1,342 @@
+/*
+ * This header provides constants for binding nvidia,tegra124-car.
+ *
+ * The first 192 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
+ * registers. These IDs often match those in the CAR's RST_DEVICES registers,
+ * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
+ * this case, those clocks are assigned IDs above 185 in order to highlight
+ * this issue. Implementations that interpret these clock IDs as bit values
+ * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
+ * explicitly handle these special cases.
+ *
+ * The balance of the clocks controlled by the CAR are assigned IDs of 185 and
+ * above.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_TEGRA124_CAR_H
+#define _DT_BINDINGS_CLOCK_TEGRA124_CAR_H
+
+/* 0 */
+/* 1 */
+/* 2 */
+#define TEGRA124_CLK_ISPB 3
+#define TEGRA124_CLK_RTC 4
+#define TEGRA124_CLK_TIMER 5
+#define TEGRA124_CLK_UARTA 6
+/* 7 (register bit affects uartb and vfir) */
+/* 8 */
+#define TEGRA124_CLK_SDMMC2 9
+/* 10 (register bit affects spdif_in and spdif_out) */
+#define TEGRA124_CLK_I2S1 11
+#define TEGRA124_CLK_I2C1 12
+#define TEGRA124_CLK_NDFLASH 13
+#define TEGRA124_CLK_SDMMC1 14
+#define TEGRA124_CLK_SDMMC4 15
+/* 16 */
+#define TEGRA124_CLK_PWM 17
+#define TEGRA124_CLK_I2S2 18
+/* 20 (register bit affects vi and vi_sensor) */
+/* 21 */
+#define TEGRA124_CLK_USBD 22
+#define TEGRA124_CLK_ISP 23
+/* 26 */
+/* 25 */
+#define TEGRA124_CLK_DISP2 26
+#define TEGRA124_CLK_DISP1 27
+#define TEGRA124_CLK_HOST1X 28
+#define TEGRA124_CLK_VCP 29
+#define TEGRA124_CLK_I2S0 30
+/* 31 */
+
+/* 32 */
+/* 33 */
+#define TEGRA124_CLK_APBDMA 34
+/* 35 */
+#define TEGRA124_CLK_KBC 36
+/* 37 */
+/* 38 */
+/* 39 (register bit affects fuse and fuse_burn) */
+#define TEGRA124_CLK_KFUSE 40
+#define TEGRA124_CLK_SBC1 41
+#define TEGRA124_CLK_NOR 42
+/* 43 */
+#define TEGRA124_CLK_SBC2 44
+/* 45 */
+#define TEGRA124_CLK_SBC3 46
+#define TEGRA124_CLK_I2C5 47
+#define TEGRA124_CLK_DSIA 48
+/* 49 */
+#define TEGRA124_CLK_MIPI 50
+#define TEGRA124_CLK_HDMI 51
+#define TEGRA124_CLK_CSI 52
+/* 53 */
+#define TEGRA124_CLK_I2C2 54
+#define TEGRA124_CLK_UARTC 55
+#define TEGRA124_CLK_MIPI_CAL 56
+#define TEGRA124_CLK_EMC 57
+#define TEGRA124_CLK_USB2 58
+#define TEGRA124_CLK_USB3 59
+/* 60 */
+#define TEGRA124_CLK_VDE 61
+#define TEGRA124_CLK_BSEA 62
+#define TEGRA124_CLK_BSEV 63
+
+/* 64 */
+#define TEGRA124_CLK_UARTD 65
+#define TEGRA124_CLK_UARTE 66
+#define TEGRA124_CLK_I2C3 67
+#define TEGRA124_CLK_SBC4 68
+#define TEGRA124_CLK_SDMMC3 69
+#define TEGRA124_CLK_PCIE 70
+#define TEGRA124_CLK_OWR 71
+#define TEGRA124_CLK_AFI 72
+#define TEGRA124_CLK_CSITE 73
+/* 74 */
+/* 75 */
+#define TEGRA124_CLK_LA 76
+#define TEGRA124_CLK_TRACE 77
+#define TEGRA124_CLK_SOC_THERM 78
+#define TEGRA124_CLK_DTV 79
+#define TEGRA124_CLK_NDSPEED 80
+#define TEGRA124_CLK_I2CSLOW 81
+#define TEGRA124_CLK_DSIB 82
+#define TEGRA124_CLK_TSEC 83
+/* 84 */
+/* 85 */
+/* 86 */
+/* 87 */
+/* 88 */
+#define TEGRA124_CLK_XUSB_HOST 89
+/* 90 */
+#define TEGRA124_CLK_MSENC 91
+#define TEGRA124_CLK_CSUS 92
+/* 93 */
+/* 94 */
+/* 95 (bit affects xusb_dev and xusb_dev_src) */
+
+/* 96 */
+/* 97 */
+/* 98 */
+#define TEGRA124_CLK_MSELECT 99
+#define TEGRA124_CLK_TSENSOR 100
+#define TEGRA124_CLK_I2S3 101
+#define TEGRA124_CLK_I2S4 102
+#define TEGRA124_CLK_I2C4 103
+#define TEGRA124_CLK_SBC5 104
+#define TEGRA124_CLK_SBC6 105
+#define TEGRA124_CLK_D_AUDIO 106
+#define TEGRA124_CLK_APBIF 107
+#define TEGRA124_CLK_DAM0 108
+#define TEGRA124_CLK_DAM1 109
+#define TEGRA124_CLK_DAM2 110
+#define TEGRA124_CLK_HDA2CODEC_2X 111
+/* 112 */
+#define TEGRA124_CLK_AUDIO0_2X 113
+#define TEGRA124_CLK_AUDIO1_2X 114
+#define TEGRA124_CLK_AUDIO2_2X 115
+#define TEGRA124_CLK_AUDIO3_2X 116
+#define TEGRA124_CLK_AUDIO4_2X 117
+#define TEGRA124_CLK_SPDIF_2X 118
+#define TEGRA124_CLK_ACTMON 119
+#define TEGRA124_CLK_EXTERN1 120
+#define TEGRA124_CLK_EXTERN2 121
+#define TEGRA124_CLK_EXTERN3 122
+#define TEGRA124_CLK_SATA_OOB 123
+#define TEGRA124_CLK_SATA 124
+#define TEGRA124_CLK_HDA 125
+/* 126 */
+#define TEGRA124_CLK_SE 127
+
+#define TEGRA124_CLK_HDA2HDMI 128
+#define TEGRA124_CLK_SATA_COLD 129
+/* 130 */
+/* 131 */
+/* 132 */
+/* 133 */
+/* 134 */
+/* 135 */
+/* 136 */
+/* 137 */
+/* 138 */
+/* 139 */
+/* 140 */
+/* 141 */
+/* 142 */
+/* 143 (bit affects xusb_falcon_src, xusb_fs_src, */
+/*      xusb_host_src and xusb_ss_src) */
+#define TEGRA124_CLK_CILAB 144
+#define TEGRA124_CLK_CILCD 145
+#define TEGRA124_CLK_CILE 146
+#define TEGRA124_CLK_DSIALP 147
+#define TEGRA124_CLK_DSIBLP 148
+#define TEGRA124_CLK_ENTROPY 149
+#define TEGRA124_CLK_DDS 150
+/* 151 */
+#define TEGRA124_CLK_DP2 152
+#define TEGRA124_CLK_AMX 153
+#define TEGRA124_CLK_ADX 154
+/* 155 (bit affects dfll_ref and dfll_soc) */
+#define TEGRA124_CLK_XUSB_SS 156
+/* 157 */
+/* 158 */
+/* 159 */
+
+/* 160 */
+/* 161 */
+/* 162 */
+/* 163 */
+/* 164 */
+/* 165 */
+#define TEGRA124_CLK_I2C6 166
+/* 167 */
+/* 168 */
+/* 169 */
+/* 170 */
+#define TEGRA124_CLK_VIM2_CLK 171
+/* 172 */
+/* 173 */
+/* 174 */
+/* 175 */
+#define TEGRA124_CLK_HDMI_AUDIO 176
+#define TEGRA124_CLK_CLK72MHZ 177
+#define TEGRA124_CLK_VIC03 178
+/* 179 */
+#define TEGRA124_CLK_ADX1 180
+#define TEGRA124_CLK_DPAUX 181
+#define TEGRA124_CLK_SOR0 182
+/* 183 */
+#define TEGRA124_CLK_GPU 184
+#define TEGRA124_CLK_AMX1 185
+#define TEGRA124_CLK_AFC0 186
+#define TEGRA124_CLK_AFC1 187
+#define TEGRA124_CLK_AFC2 188
+#define TEGRA124_CLK_AFC3 189
+#define TEGRA124_CLK_AFC4 190
+#define TEGRA124_CLK_AFC5 191
+#define TEGRA124_CLK_UARTB 192
+#define TEGRA124_CLK_VFIR 193
+#define TEGRA124_CLK_SPDIF_IN 194
+#define TEGRA124_CLK_SPDIF_OUT 195
+#define TEGRA124_CLK_VI 196
+#define TEGRA124_CLK_VI_SENSOR 197
+#define TEGRA124_CLK_FUSE 198
+#define TEGRA124_CLK_FUSE_BURN 199
+#define TEGRA124_CLK_CLK_32K 200
+#define TEGRA124_CLK_CLK_M 201
+#define TEGRA124_CLK_CLK_M_DIV2 202
+#define TEGRA124_CLK_CLK_M_DIV4 203
+#define TEGRA124_CLK_PLL_REF 204
+#define TEGRA124_CLK_PLL_C 205
+#define TEGRA124_CLK_PLL_C_OUT1 206
+#define TEGRA124_CLK_PLL_C2 207
+#define TEGRA124_CLK_PLL_C3 208
+#define TEGRA124_CLK_PLL_M 209
+#define TEGRA124_CLK_PLL_M_OUT1 210
+#define TEGRA124_CLK_PLL_P 211
+#define TEGRA124_CLK_PLL_P_OUT1 212
+#define TEGRA124_CLK_PLL_P_OUT2 213
+#define TEGRA124_CLK_PLL_P_OUT3 214
+#define TEGRA124_CLK_PLL_P_OUT4 215
+#define TEGRA124_CLK_PLL_A 216
+#define TEGRA124_CLK_PLL_A_OUT0 217
+#define TEGRA124_CLK_PLL_D 218
+#define TEGRA124_CLK_PLL_D_OUT0 219
+#define TEGRA124_CLK_PLL_D2 220
+#define TEGRA124_CLK_PLL_D2_OUT0 221
+#define TEGRA124_CLK_PLL_U 222
+#define TEGRA124_CLK_PLL_U_480M 223
+
+#define TEGRA124_CLK_PLL_U_60M 224
+#define TEGRA124_CLK_PLL_U_48M 225
+#define TEGRA124_CLK_PLL_U_12M 226
+#define TEGRA124_CLK_PLL_X 227
+#define TEGRA124_CLK_PLL_X_OUT0 228
+#define TEGRA124_CLK_PLL_RE_VCO 229
+#define TEGRA124_CLK_PLL_RE_OUT 230
+#define TEGRA124_CLK_PLL_E 231
+#define TEGRA124_CLK_SPDIF_IN_SYNC 232
+#define TEGRA124_CLK_I2S0_SYNC 233
+#define TEGRA124_CLK_I2S1_SYNC 234
+#define TEGRA124_CLK_I2S2_SYNC 235
+#define TEGRA124_CLK_I2S3_SYNC 236
+#define TEGRA124_CLK_I2S4_SYNC 237
+#define TEGRA124_CLK_VIMCLK_SYNC 238
+#define TEGRA124_CLK_AUDIO0 239
+#define TEGRA124_CLK_AUDIO1 240
+#define TEGRA124_CLK_AUDIO2 241
+#define TEGRA124_CLK_AUDIO3 242
+#define TEGRA124_CLK_AUDIO4 243
+#define TEGRA124_CLK_SPDIF 244
+#define TEGRA124_CLK_CLK_OUT_1 245
+#define TEGRA124_CLK_CLK_OUT_2 246
+#define TEGRA124_CLK_CLK_OUT_3 247
+#define TEGRA124_CLK_BLINK 248
+/* 249 */
+/* 250 */
+/* 251 */
+#define TEGRA124_CLK_XUSB_HOST_SRC 252
+#define TEGRA124_CLK_XUSB_FALCON_SRC 253
+#define TEGRA124_CLK_XUSB_FS_SRC 254
+#define TEGRA124_CLK_XUSB_SS_SRC 255
+
+#define TEGRA124_CLK_XUSB_DEV_SRC 256
+#define TEGRA124_CLK_XUSB_DEV 257
+#define TEGRA124_CLK_XUSB_HS_SRC 258
+#define TEGRA124_CLK_SCLK 259
+#define TEGRA124_CLK_HCLK 260
+#define TEGRA124_CLK_PCLK 261
+#define TEGRA124_CLK_CCLK_G 262
+#define TEGRA124_CLK_CCLK_LP 263
+#define TEGRA124_CLK_DFLL_REF 264
+#define TEGRA124_CLK_DFLL_SOC 265
+#define TEGRA124_CLK_VI_SENSOR2 266
+#define TEGRA124_CLK_PLL_P_OUT5 267
+#define TEGRA124_CLK_CML0 268
+#define TEGRA124_CLK_CML1 269
+#define TEGRA124_CLK_PLL_C4 270
+#define TEGRA124_CLK_PLL_DP 271
+#define TEGRA124_CLK_PLL_E_MUX 272
+/* 273 */
+/* 274 */
+/* 275 */
+/* 276 */
+/* 277 */
+/* 278 */
+/* 279 */
+/* 280 */
+/* 281 */
+/* 282 */
+/* 283 */
+/* 284 */
+/* 285 */
+/* 286 */
+/* 287 */
+
+/* 288 */
+/* 289 */
+/* 290 */
+/* 291 */
+/* 292 */
+/* 293 */
+/* 294 */
+/* 295 */
+/* 296 */
+/* 297 */
+/* 298 */
+/* 299 */
+#define TEGRA124_CLK_AUDIO0_MUX 300
+#define TEGRA124_CLK_AUDIO1_MUX 301
+#define TEGRA124_CLK_AUDIO2_MUX 302
+#define TEGRA124_CLK_AUDIO3_MUX 303
+#define TEGRA124_CLK_AUDIO4_MUX 304
+#define TEGRA124_CLK_SPDIF_MUX 305
+#define TEGRA124_CLK_CLK_OUT_1_MUX 306
+#define TEGRA124_CLK_CLK_OUT_2_MUX 307
+#define TEGRA124_CLK_CLK_OUT_3_MUX 308
+#define TEGRA124_CLK_DSIA_MUX 309
+#define TEGRA124_CLK_DSIB_MUX 310
+#define TEGRA124_CLK_SOR0_LVDS 311
+#define TEGRA124_CLK_PLL_M_UD 311
+#define TEGRA124_CLK_CLK_MAX 312
+
+#endif /* _DT_BINDINGS_CLOCK_TEGRA124_CAR_H */
diff --git a/include/dt-bindings/clock/tegra20-car.h b/include/dt-bindings/clock/tegra20-car.h
new file mode 100644 (file)
index 0000000..9406207
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ * This header provides constants for binding nvidia,tegra20-car.
+ *
+ * The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
+ * registers. These IDs often match those in the CAR's RST_DEVICES registers,
+ * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
+ * this case, those clocks are assigned IDs above 95 in order to highlight
+ * this issue. Implementations that interpret these clock IDs as bit values
+ * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
+ * explicitly handle these special cases.
+ *
+ * The balance of the clocks controlled by the CAR are assigned IDs of 96 and
+ * above.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_TEGRA20_CAR_H
+#define _DT_BINDINGS_CLOCK_TEGRA20_CAR_H
+
+#define TEGRA20_CLK_CPU 0
+/* 1 */
+/* 2 */
+#define TEGRA20_CLK_AC97 3
+#define TEGRA20_CLK_RTC 4
+#define TEGRA20_CLK_TIMER 5
+#define TEGRA20_CLK_UARTA 6
+/* 7 (register bit affects uart2 and vfir) */
+#define TEGRA20_CLK_GPIO 8
+#define TEGRA20_CLK_SDMMC2 9
+/* 10 (register bit affects spdif_in and spdif_out) */
+#define TEGRA20_CLK_I2S1 11
+#define TEGRA20_CLK_I2C1 12
+#define TEGRA20_CLK_NDFLASH 13
+#define TEGRA20_CLK_SDMMC1 14
+#define TEGRA20_CLK_SDMMC4 15
+#define TEGRA20_CLK_TWC 16
+#define TEGRA20_CLK_PWM 17
+#define TEGRA20_CLK_I2S2 18
+#define TEGRA20_CLK_EPP 19
+/* 20 (register bit affects vi and vi_sensor) */
+#define TEGRA20_CLK_GR2D 21
+#define TEGRA20_CLK_USBD 22
+#define TEGRA20_CLK_ISP 23
+#define TEGRA20_CLK_GR3D 24
+#define TEGRA20_CLK_IDE 25
+#define TEGRA20_CLK_DISP2 26
+#define TEGRA20_CLK_DISP1 27
+#define TEGRA20_CLK_HOST1X 28
+#define TEGRA20_CLK_VCP 29
+/* 30 */
+#define TEGRA20_CLK_CACHE2 31
+
+#define TEGRA20_CLK_MEM 32
+#define TEGRA20_CLK_AHBDMA 33
+#define TEGRA20_CLK_APBDMA 34
+/* 35 */
+#define TEGRA20_CLK_KBC 36
+#define TEGRA20_CLK_STAT_MON 37
+#define TEGRA20_CLK_PMC 38
+#define TEGRA20_CLK_FUSE 39
+#define TEGRA20_CLK_KFUSE 40
+#define TEGRA20_CLK_SBC1 41
+#define TEGRA20_CLK_NOR 42
+#define TEGRA20_CLK_SPI 43
+#define TEGRA20_CLK_SBC2 44
+#define TEGRA20_CLK_XIO 45
+#define TEGRA20_CLK_SBC3 46
+#define TEGRA20_CLK_DVC 47
+#define TEGRA20_CLK_DSI 48
+/* 49 (register bit affects tvo and cve) */
+#define TEGRA20_CLK_MIPI 50
+#define TEGRA20_CLK_HDMI 51
+#define TEGRA20_CLK_CSI 52
+#define TEGRA20_CLK_TVDAC 53
+#define TEGRA20_CLK_I2C2 54
+#define TEGRA20_CLK_UARTC 55
+/* 56 */
+#define TEGRA20_CLK_EMC 57
+#define TEGRA20_CLK_USB2 58
+#define TEGRA20_CLK_USB3 59
+#define TEGRA20_CLK_MPE 60
+#define TEGRA20_CLK_VDE 61
+#define TEGRA20_CLK_BSEA 62
+#define TEGRA20_CLK_BSEV 63
+
+#define TEGRA20_CLK_SPEEDO 64
+#define TEGRA20_CLK_UARTD 65
+#define TEGRA20_CLK_UARTE 66
+#define TEGRA20_CLK_I2C3 67
+#define TEGRA20_CLK_SBC4 68
+#define TEGRA20_CLK_SDMMC3 69
+#define TEGRA20_CLK_PEX 70
+#define TEGRA20_CLK_OWR 71
+#define TEGRA20_CLK_AFI 72
+#define TEGRA20_CLK_CSITE 73
+/* 74 */
+#define TEGRA20_CLK_AVPUCQ 75
+#define TEGRA20_CLK_LA 76
+/* 77 */
+/* 78 */
+/* 79 */
+/* 80 */
+/* 81 */
+/* 82 */
+/* 83 */
+#define TEGRA20_CLK_IRAMA 84
+#define TEGRA20_CLK_IRAMB 85
+#define TEGRA20_CLK_IRAMC 86
+#define TEGRA20_CLK_IRAMD 87
+#define TEGRA20_CLK_CRAM2 88
+#define TEGRA20_CLK_AUDIO_2X 89 /* a/k/a audio_2x_sync_clk */
+#define TEGRA20_CLK_CLK_D 90
+/* 91 */
+#define TEGRA20_CLK_CSUS 92
+#define TEGRA20_CLK_CDEV2 93
+#define TEGRA20_CLK_CDEV1 94
+/* 95 */
+
+#define TEGRA20_CLK_UARTB 96
+#define TEGRA20_CLK_VFIR 97
+#define TEGRA20_CLK_SPDIF_IN 98
+#define TEGRA20_CLK_SPDIF_OUT 99
+#define TEGRA20_CLK_VI 100
+#define TEGRA20_CLK_VI_SENSOR 101
+#define TEGRA20_CLK_TVO 102
+#define TEGRA20_CLK_CVE 103
+#define TEGRA20_CLK_OSC 104
+#define TEGRA20_CLK_CLK_32K 105 /* a/k/a clk_s */
+#define TEGRA20_CLK_CLK_M 106
+#define TEGRA20_CLK_SCLK 107
+#define TEGRA20_CLK_CCLK 108
+#define TEGRA20_CLK_HCLK 109
+#define TEGRA20_CLK_PCLK 110
+#define TEGRA20_CLK_BLINK 111
+#define TEGRA20_CLK_PLL_A 112
+#define TEGRA20_CLK_PLL_A_OUT0 113
+#define TEGRA20_CLK_PLL_C 114
+#define TEGRA20_CLK_PLL_C_OUT1 115
+#define TEGRA20_CLK_PLL_D 116
+#define TEGRA20_CLK_PLL_D_OUT0 117
+#define TEGRA20_CLK_PLL_E 118
+#define TEGRA20_CLK_PLL_M 119
+#define TEGRA20_CLK_PLL_M_OUT1 120
+#define TEGRA20_CLK_PLL_P 121
+#define TEGRA20_CLK_PLL_P_OUT1 122
+#define TEGRA20_CLK_PLL_P_OUT2 123
+#define TEGRA20_CLK_PLL_P_OUT3 124
+#define TEGRA20_CLK_PLL_P_OUT4 125
+#define TEGRA20_CLK_PLL_S 126
+#define TEGRA20_CLK_PLL_U 127
+
+#define TEGRA20_CLK_PLL_X 128
+#define TEGRA20_CLK_COP 129 /* a/k/a avp */
+#define TEGRA20_CLK_AUDIO 130 /* a/k/a audio_sync_clk */
+#define TEGRA20_CLK_PLL_REF 131
+#define TEGRA20_CLK_TWD 132
+#define TEGRA20_CLK_CLK_MAX 133
+
+#endif /* _DT_BINDINGS_CLOCK_TEGRA20_CAR_H */
diff --git a/include/dt-bindings/clock/tegra30-car.h b/include/dt-bindings/clock/tegra30-car.h
new file mode 100644 (file)
index 0000000..889e49b
--- /dev/null
@@ -0,0 +1,273 @@
+/*
+ * This header provides constants for binding nvidia,tegra30-car.
+ *
+ * The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
+ * registers. These IDs often match those in the CAR's RST_DEVICES registers,
+ * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
+ * this case, those clocks are assigned IDs above 160 in order to highlight
+ * this issue. Implementations that interpret these clock IDs as bit values
+ * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
+ * explicitly handle these special cases.
+ *
+ * The balance of the clocks controlled by the CAR are assigned IDs of 160 and
+ * above.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_TEGRA30_CAR_H
+#define _DT_BINDINGS_CLOCK_TEGRA30_CAR_H
+
+#define TEGRA30_CLK_CPU 0
+/* 1 */
+/* 2 */
+/* 3 */
+#define TEGRA30_CLK_RTC 4
+#define TEGRA30_CLK_TIMER 5
+#define TEGRA30_CLK_UARTA 6
+/* 7 (register bit affects uartb and vfir) */
+#define TEGRA30_CLK_GPIO 8
+#define TEGRA30_CLK_SDMMC2 9
+/* 10 (register bit affects spdif_in and spdif_out) */
+#define TEGRA30_CLK_I2S1 11
+#define TEGRA30_CLK_I2C1 12
+#define TEGRA30_CLK_NDFLASH 13
+#define TEGRA30_CLK_SDMMC1 14
+#define TEGRA30_CLK_SDMMC4 15
+/* 16 */
+#define TEGRA30_CLK_PWM 17
+#define TEGRA30_CLK_I2S2 18
+#define TEGRA30_CLK_EPP 19
+/* 20 (register bit affects vi and vi_sensor) */
+#define TEGRA30_CLK_GR2D 21
+#define TEGRA30_CLK_USBD 22
+#define TEGRA30_CLK_ISP 23
+#define TEGRA30_CLK_GR3D 24
+/* 25 */
+#define TEGRA30_CLK_DISP2 26
+#define TEGRA30_CLK_DISP1 27
+#define TEGRA30_CLK_HOST1X 28
+#define TEGRA30_CLK_VCP 29
+#define TEGRA30_CLK_I2S0 30
+#define TEGRA30_CLK_COP_CACHE 31
+
+#define TEGRA30_CLK_MC 32
+#define TEGRA30_CLK_AHBDMA 33
+#define TEGRA30_CLK_APBDMA 34
+/* 35 */
+#define TEGRA30_CLK_KBC 36
+#define TEGRA30_CLK_STATMON 37
+#define TEGRA30_CLK_PMC 38
+/* 39 (register bit affects fuse and fuse_burn) */
+#define TEGRA30_CLK_KFUSE 40
+#define TEGRA30_CLK_SBC1 41
+#define TEGRA30_CLK_NOR 42
+/* 43 */
+#define TEGRA30_CLK_SBC2 44
+/* 45 */
+#define TEGRA30_CLK_SBC3 46
+#define TEGRA30_CLK_I2C5 47
+#define TEGRA30_CLK_DSIA 48
+/* 49 (register bit affects cve and tvo) */
+#define TEGRA30_CLK_MIPI 50
+#define TEGRA30_CLK_HDMI 51
+#define TEGRA30_CLK_CSI 52
+#define TEGRA30_CLK_TVDAC 53
+#define TEGRA30_CLK_I2C2 54
+#define TEGRA30_CLK_UARTC 55
+/* 56 */
+#define TEGRA30_CLK_EMC 57
+#define TEGRA30_CLK_USB2 58
+#define TEGRA30_CLK_USB3 59
+#define TEGRA30_CLK_MPE 60
+#define TEGRA30_CLK_VDE 61
+#define TEGRA30_CLK_BSEA 62
+#define TEGRA30_CLK_BSEV 63
+
+#define TEGRA30_CLK_SPEEDO 64
+#define TEGRA30_CLK_UARTD 65
+#define TEGRA30_CLK_UARTE 66
+#define TEGRA30_CLK_I2C3 67
+#define TEGRA30_CLK_SBC4 68
+#define TEGRA30_CLK_SDMMC3 69
+#define TEGRA30_CLK_PCIE 70
+#define TEGRA30_CLK_OWR 71
+#define TEGRA30_CLK_AFI 72
+#define TEGRA30_CLK_CSITE 73
+/* 74 */
+#define TEGRA30_CLK_AVPUCQ 75
+#define TEGRA30_CLK_LA 76
+/* 77 */
+/* 78 */
+#define TEGRA30_CLK_DTV 79
+#define TEGRA30_CLK_NDSPEED 80
+#define TEGRA30_CLK_I2CSLOW 81
+#define TEGRA30_CLK_DSIB 82
+/* 83 */
+#define TEGRA30_CLK_IRAMA 84
+#define TEGRA30_CLK_IRAMB 85
+#define TEGRA30_CLK_IRAMC 86
+#define TEGRA30_CLK_IRAMD 87
+#define TEGRA30_CLK_CRAM2 88
+/* 89 */
+#define TEGRA30_CLK_AUDIO_2X 90 /* a/k/a audio_2x_sync_clk */
+/* 91 */
+#define TEGRA30_CLK_CSUS 92
+#define TEGRA30_CLK_CDEV2 93
+#define TEGRA30_CLK_CDEV1 94
+/* 95 */
+
+#define TEGRA30_CLK_CPU_G 96
+#define TEGRA30_CLK_CPU_LP 97
+#define TEGRA30_CLK_GR3D2 98
+#define TEGRA30_CLK_MSELECT 99
+#define TEGRA30_CLK_TSENSOR 100
+#define TEGRA30_CLK_I2S3 101
+#define TEGRA30_CLK_I2S4 102
+#define TEGRA30_CLK_I2C4 103
+#define TEGRA30_CLK_SBC5 104
+#define TEGRA30_CLK_SBC6 105
+#define TEGRA30_CLK_D_AUDIO 106
+#define TEGRA30_CLK_APBIF 107
+#define TEGRA30_CLK_DAM0 108
+#define TEGRA30_CLK_DAM1 109
+#define TEGRA30_CLK_DAM2 110
+#define TEGRA30_CLK_HDA2CODEC_2X 111
+#define TEGRA30_CLK_ATOMICS 112
+#define TEGRA30_CLK_AUDIO0_2X 113
+#define TEGRA30_CLK_AUDIO1_2X 114
+#define TEGRA30_CLK_AUDIO2_2X 115
+#define TEGRA30_CLK_AUDIO3_2X 116
+#define TEGRA30_CLK_AUDIO4_2X 117
+#define TEGRA30_CLK_SPDIF_2X 118
+#define TEGRA30_CLK_ACTMON 119
+#define TEGRA30_CLK_EXTERN1 120
+#define TEGRA30_CLK_EXTERN2 121
+#define TEGRA30_CLK_EXTERN3 122
+#define TEGRA30_CLK_SATA_OOB 123
+#define TEGRA30_CLK_SATA 124
+#define TEGRA30_CLK_HDA 125
+/* 126 */
+#define TEGRA30_CLK_SE 127
+
+#define TEGRA30_CLK_HDA2HDMI 128
+#define TEGRA30_CLK_SATA_COLD 129
+/* 130 */
+/* 131 */
+/* 132 */
+/* 133 */
+/* 134 */
+/* 135 */
+/* 136 */
+/* 137 */
+/* 138 */
+/* 139 */
+/* 140 */
+/* 141 */
+/* 142 */
+/* 143 */
+/* 144 */
+/* 145 */
+/* 146 */
+/* 147 */
+/* 148 */
+/* 149 */
+/* 150 */
+/* 151 */
+/* 152 */
+/* 153 */
+/* 154 */
+/* 155 */
+/* 156 */
+/* 157 */
+/* 158 */
+/* 159 */
+
+#define TEGRA30_CLK_UARTB 160
+#define TEGRA30_CLK_VFIR 161
+#define TEGRA30_CLK_SPDIF_IN 162
+#define TEGRA30_CLK_SPDIF_OUT 163
+#define TEGRA30_CLK_VI 164
+#define TEGRA30_CLK_VI_SENSOR 165
+#define TEGRA30_CLK_FUSE 166
+#define TEGRA30_CLK_FUSE_BURN 167
+#define TEGRA30_CLK_CVE 168
+#define TEGRA30_CLK_TVO 169
+#define TEGRA30_CLK_CLK_32K 170
+#define TEGRA30_CLK_CLK_M 171
+#define TEGRA30_CLK_CLK_M_DIV2 172
+#define TEGRA30_CLK_CLK_M_DIV4 173
+#define TEGRA30_CLK_PLL_REF 174
+#define TEGRA30_CLK_PLL_C 175
+#define TEGRA30_CLK_PLL_C_OUT1 176
+#define TEGRA30_CLK_PLL_M 177
+#define TEGRA30_CLK_PLL_M_OUT1 178
+#define TEGRA30_CLK_PLL_P 179
+#define TEGRA30_CLK_PLL_P_OUT1 180
+#define TEGRA30_CLK_PLL_P_OUT2 181
+#define TEGRA30_CLK_PLL_P_OUT3 182
+#define TEGRA30_CLK_PLL_P_OUT4 183
+#define TEGRA30_CLK_PLL_A 184
+#define TEGRA30_CLK_PLL_A_OUT0 185
+#define TEGRA30_CLK_PLL_D 186
+#define TEGRA30_CLK_PLL_D_OUT0 187
+#define TEGRA30_CLK_PLL_D2 188
+#define TEGRA30_CLK_PLL_D2_OUT0 189
+#define TEGRA30_CLK_PLL_U 190
+#define TEGRA30_CLK_PLL_X 191
+
+#define TEGRA30_CLK_PLL_X_OUT0 192
+#define TEGRA30_CLK_PLL_E 193
+#define TEGRA30_CLK_SPDIF_IN_SYNC 194
+#define TEGRA30_CLK_I2S0_SYNC 195
+#define TEGRA30_CLK_I2S1_SYNC 196
+#define TEGRA30_CLK_I2S2_SYNC 197
+#define TEGRA30_CLK_I2S3_SYNC 198
+#define TEGRA30_CLK_I2S4_SYNC 199
+#define TEGRA30_CLK_VIMCLK_SYNC 200
+#define TEGRA30_CLK_AUDIO0 201
+#define TEGRA30_CLK_AUDIO1 202
+#define TEGRA30_CLK_AUDIO2 203
+#define TEGRA30_CLK_AUDIO3 204
+#define TEGRA30_CLK_AUDIO4 205
+#define TEGRA30_CLK_SPDIF 206
+#define TEGRA30_CLK_CLK_OUT_1 207 /* (extern1) */
+#define TEGRA30_CLK_CLK_OUT_2 208 /* (extern2) */
+#define TEGRA30_CLK_CLK_OUT_3 209 /* (extern3) */
+#define TEGRA30_CLK_SCLK 210
+#define TEGRA30_CLK_BLINK 211
+#define TEGRA30_CLK_CCLK_G 212
+#define TEGRA30_CLK_CCLK_LP 213
+#define TEGRA30_CLK_TWD 214
+#define TEGRA30_CLK_CML0 215
+#define TEGRA30_CLK_CML1 216
+#define TEGRA30_CLK_HCLK 217
+#define TEGRA30_CLK_PCLK 218
+/* 219 */
+/* 220 */
+/* 221 */
+/* 222 */
+/* 223 */
+
+/* 288 */
+/* 289 */
+/* 290 */
+/* 291 */
+/* 292 */
+/* 293 */
+/* 294 */
+/* 295 */
+/* 296 */
+/* 297 */
+/* 298 */
+/* 299 */
+#define TEGRA30_CLK_CLK_OUT_1_MUX 300
+#define TEGRA30_CLK_CLK_OUT_2_MUX 301
+#define TEGRA30_CLK_CLK_OUT_3_MUX 302
+#define TEGRA30_CLK_AUDIO0_MUX 303
+#define TEGRA30_CLK_AUDIO1_MUX 304
+#define TEGRA30_CLK_AUDIO2_MUX 305
+#define TEGRA30_CLK_AUDIO3_MUX 306
+#define TEGRA30_CLK_AUDIO4_MUX 307
+#define TEGRA30_CLK_SPDIF_MUX 308
+#define TEGRA30_CLK_CLK_MAX 309
+
+#endif /* _DT_BINDINGS_CLOCK_TEGRA30_CAR_H */
index 5f88938c83b246d6eb86e7b250678b00674fd6bf..2590d3071fd0353eb7e96f667e74bb089c3a476a 100644 (file)
@@ -376,6 +376,18 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int node,
  */
 int fdtdec_get_alias_node(const void *blob, const char *name);
 
+/**
+ * Get the offset of the given chosen node
+ *
+ * This looks up a property in /chosen containing the path to another node,
+ * then finds the offset of that node.
+ *
+ * @param blob         Device tree blob (if NULL, then error is returned)
+ * @param name         Property name, e.g. "stdout-path"
+ * @return Node offset referred to by that chosen node, or -ve FDT_ERR_...
+ */
+int fdtdec_get_chosen_node(const void *blob, const char *name);
+
 /*
  * Get the name for a compatible ID
  *
index 98edfcf4add8f8b4c12d87a17f8ff123b8d8399d..e46a684129d66b0f9bca49ede31db5f5088d48bf 100644 (file)
@@ -8,8 +8,8 @@
 #define __FM_ETH_H__
 
 #include <common.h>
+#include <phy.h>
 #include <asm/types.h>
-#include <asm/fsl_enet.h>
 
 enum fm_port {
        FM1_DTSEC1,
diff --git a/include/fsl_dcu_fb.h b/include/fsl_dcu_fb.h
new file mode 100644 (file)
index 0000000..4263298
--- /dev/null
@@ -0,0 +1,16 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * FSL DCU Framebuffer driver
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+#include <linux/fb.h>
+
+int fsl_dcu_init(unsigned int xres, unsigned int yres,
+                unsigned int pixel_format);
+
+/* Prototypes for external board-specific functions */
+int platform_dcu_init(unsigned int xres, unsigned int yres,
+                     const char *port, struct fb_videomode *dcu_fb_videomode);
+unsigned int dcu_set_pixel_clock(unsigned int pixclock);
index e8a2db91cb7e115275ae13c70a498de4ee518239..987119b014ee513166fd4ba6cbaf47d405f2ef85 100644 (file)
@@ -281,6 +281,7 @@ typedef struct memctl_options_partial_s {
 #define DDR_DATA_BUS_WIDTH_64 0
 #define DDR_DATA_BUS_WIDTH_32 1
 #define DDR_DATA_BUS_WIDTH_16 2
+#define DDR_CSWL_CS0   0x04000001
 /*
  * Generalized parameters for memory controller configuration,
  * might be a little specific to the FSL memory controller
@@ -340,6 +341,7 @@ typedef struct memctl_options_s {
        unsigned int cpo_override;
        unsigned int write_data_delay;          /* DQS adjust */
 
+       unsigned int cswl_override;
        unsigned int wrlvl_override;
        unsigned int wrlvl_sample;              /* Write leveling */
        unsigned int wrlvl_start;
index 9814964937d83295c6e74c5936e75cc61b64d418..c1b6648591e410e23d13a8b88aa27cdb8233efdb 100644 (file)
@@ -162,7 +162,19 @@ struct fsl_esdhc_cfg {
 };
 
 /* Select the correct accessors depending on endianess */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if defined CONFIG_SYS_FSL_ESDHC_LE
+#define esdhc_read32           in_le32
+#define esdhc_write32          out_le32
+#define esdhc_clrsetbits32     clrsetbits_le32
+#define esdhc_clrbits32                clrbits_le32
+#define esdhc_setbits32                setbits_le32
+#elif defined(CONFIG_SYS_FSL_ESDHC_BE)
+#define esdhc_read32            in_be32
+#define esdhc_write32           out_be32
+#define esdhc_clrsetbits32      clrsetbits_be32
+#define esdhc_clrbits32         clrbits_be32
+#define esdhc_setbits32         setbits_be32
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
 #define esdhc_read32           in_le32
 #define esdhc_write32          out_le32
 #define esdhc_clrsetbits32     clrsetbits_le32
index b58713d896f445e435ecd329e63953e2642f4ef4..2137282df3fd97978ec6cda00530dd4487720b55 100644 (file)
 
 #include <net.h>
 #include <miiphy.h>
-#include <asm/fsl_enet.h>
+
+struct tsec_mii_mng {
+       u32 miimcfg;            /* MII management configuration reg */
+       u32 miimcom;            /* MII management command reg */
+       u32 miimadd;            /* MII management address reg */
+       u32 miimcon;            /* MII management control reg */
+       u32 miimstat;           /* MII management status reg  */
+       u32 miimind;            /* MII management indication reg */
+       u32 ifstat;             /* Interface Status Register */
+};
+
+int fdt_fixup_phy_connection(void *blob, int offset, phy_interface_t phyc);
 
 /* PHY register offsets */
 #define PHY_EXT_PAGE_ACCESS    0x1f
diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
new file mode 100644 (file)
index 0000000..d1e49d5
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-clang.h> directly, include <linux/compiler.h> instead."
+#endif
+
+/* Some compiler specific definitions are overwritten here
+ * for Clang compiler
+ */
+
+#ifdef uninitialized_var
+#undef uninitialized_var
+#define uninitialized_var(x) x = *(&(x))
+#endif
index 9896e547b94ec0120863700dc3dde914c93c5bb5..02ae99e8e6d38a49ba59e76ecb722fce64376a51 100644 (file)
@@ -5,6 +5,9 @@
 /*
  * Common definitions for all gcc versions go here.
  */
+#define GCC_VERSION (__GNUC__ * 10000 \
+                  + __GNUC_MINOR__ * 100 \
+                  + __GNUC_PATCHLEVEL__)
 
 
 /* Optimization barrier */
     __asm__ ("" : "=r"(__ptr) : "0"(ptr));             \
     (typeof(ptr)) (__ptr + (off)); })
 
+/* Make the optimizer believe the variable can be manipulated arbitrarily. */
+#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var))
+
+#ifdef __CHECKER__
+#define __must_be_array(arr) 0
+#else
 /* &a[0] degrades to a pointer: a different type from an array */
-#define __must_be_array(a) \
-  BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
+#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
+#endif
 
 /*
  * Force always-inline if the user requests it so via the .config,
  */
 #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
     !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
-# define inline                inline          __attribute__((always_inline))
-# define __inline__    __inline__      __attribute__((always_inline))
-# define __inline      __inline        __attribute__((always_inline))
+# define inline                inline          __attribute__((always_inline)) notrace
+# define __inline__    __inline__      __attribute__((always_inline)) notrace
+# define __inline      __inline        __attribute__((always_inline)) notrace
+#else
+/* A lot of inline functions can cause havoc with function tracing */
+# define inline                inline          notrace
+# define __inline__    __inline__      notrace
+# define __inline      __inline        notrace
 #endif
 
 #define __deprecated                   __attribute__((deprecated))
-#ifndef __packed
-# define __packed                      __attribute__((packed))
-#endif
+#define __packed                       __attribute__((packed))
 #define __weak                         __attribute__((weak))
 
 /*
  * naked functions because then mcount is called without stack and frame pointer
  * being set up and there is no chance to restore the lr register to the value
  * before mcount was called.
+ *
+ * The asm() bodies of naked functions often depend on standard calling conventions,
+ * therefore they must be noinline and noclone.  GCC 4.[56] currently fail to enforce
+ * this, so we must do so ourselves.  See GCC PR44290.
  */
-#define __naked                                __attribute__((naked)) notrace
+#define __naked                                __attribute__((naked)) noinline __noclone notrace
 
 #define __noreturn                     __attribute__((noreturn))
 
  * would be.
  * [...]
  */
-#ifndef __pure
-# define __pure                                __attribute__((pure))
-#endif
-#ifndef __aligned
-# define __aligned(x)                  __attribute__((aligned(x)))
-#endif
-#define __printf(a,b)                  __attribute__((format(printf,a,b)))
+#define __pure                         __attribute__((pure))
+#define __aligned(x)                   __attribute__((aligned(x)))
+#define __printf(a, b)                 __attribute__((format(printf, a, b)))
+#define __scanf(a, b)                  __attribute__((format(scanf, a, b)))
 #define  noinline                      __attribute__((noinline))
 #define __attribute_const__            __attribute__((__const__))
 #define __maybe_unused                 __attribute__((unused))
 #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
 #define gcc_header(x) _gcc_header(x)
 #include gcc_header(__GNUC__)
+
+#if !defined(__noclone)
+#define __noclone      /* not needed */
+#endif
+
+/*
+ * A trick to suppress uninitialized variable warning without generating any
+ * code
+ */
+#define uninitialized_var(x) x = x
+
+#define __always_inline                inline __attribute__((always_inline))
index 2befe6513ce4ab31613d26b22b398bbce627598f..7d89febe4d7938aa88d6e0283e795425d0468f69 100644 (file)
@@ -2,20 +2,22 @@
 #error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead."
 #endif
 
-#if __GNUC_MINOR__ >= 3
+#if GCC_VERSION < 30200
+# error Sorry, your compiler is too old - please upgrade it.
+#endif
+
+#if GCC_VERSION >= 30300
 # define __used                        __attribute__((__used__))
 #else
 # define __used                        __attribute__((__unused__))
 #endif
 
-#if __GNUC_MINOR__ >= 4
+#if GCC_VERSION >= 30400
 #define __must_check           __attribute__((warn_unused_result))
 #endif
 
-/*
- * A trick to suppress uninitialized variable warning without generating any
- * code
- */
-#define uninitialized_var(x) x = x
-
-#define __always_inline                inline __attribute__((always_inline))
+#ifdef CONFIG_GCOV_KERNEL
+# if GCC_VERSION < 30400
+#   error "GCOV profiling support for gcc versions below 3.4 not included"
+# endif /* __GNUC_MINOR__ */
+#endif /* CONFIG_GCOV_KERNEL */
index 27d11ca7b08f398b68a372104748384248d0b1db..2507fd2a1eb4f9d4971b9de5344e8f250570c012 100644 (file)
@@ -4,7 +4,7 @@
 
 /* GCC 4.1.[01] miscompiles __weak */
 #ifdef __KERNEL__
-# if __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ <= 1
+# if GCC_VERSION >= 40100 &&  GCC_VERSION <= 40101
 #  error Your version of gcc miscompiles the __weak directive
 # endif
 #endif
 #define __used                 __attribute__((__used__))
 #define __must_check           __attribute__((warn_unused_result))
 #define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
-#ifndef __always_inline
-# define __always_inline               inline __attribute__((always_inline))
-#endif
 
-/*
- * A trick to suppress uninitialized variable warning without generating any
- * code
- */
-#define uninitialized_var(x) x = x
+#if GCC_VERSION >= 40100 && GCC_VERSION < 40600
+# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
+#endif
 
-#if __GNUC_MINOR__ >= 3
+#if GCC_VERSION >= 40300
 /* Mark functions as cold. gcc will assume any path leading to a call
    to them will be unlikely.  This means a lot of manual unlikely()s
    are unnecessary now for any paths leading to the usual suspects
    the kernel context */
 #define __cold                 __attribute__((__cold__))
 
+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
 
-#if __GNUC_MINOR__ >= 5
+#ifndef __CHECKER__
+# define __compiletime_warning(message) __attribute__((warning(message)))
+# define __compiletime_error(message) __attribute__((error(message)))
+#endif /* __CHECKER__ */
+#endif /* GCC_VERSION >= 40300 */
+
+#if GCC_VERSION >= 40500
 /*
  * Mark a position in code as unreachable.  This can be used to
  * suppress control flow warnings after asm blocks that transfer
  * unreleased.  Really, we need to have autoconf for the kernel.
  */
 #define unreachable() __builtin_unreachable()
-#endif
 
+/* Mark a function definition as prohibited from being cloned. */
+#define __noclone      __attribute__((__noclone__))
+
+#endif /* GCC_VERSION >= 40500 */
+
+#if GCC_VERSION >= 40600
+/*
+ * Tell the optimizer that something else uses this function or variable.
+ */
+#define __visible __attribute__((externally_visible))
 #endif
 
-#if __GNUC_MINOR__ > 0
-#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
+/*
+ * GCC 'asm goto' miscompiles certain code sequences:
+ *
+ *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
+ *
+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
+ * Fixed in GCC 4.8.2 and later versions.
+ *
+ * (asm goto is automatically volatile - the naming reflects this.)
+ */
+#define asm_volatile_goto(x...)        do { asm goto(x); asm (""); } while (0)
+
+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
+#if GCC_VERSION >= 40400
+#define __HAVE_BUILTIN_BSWAP32__
+#define __HAVE_BUILTIN_BSWAP64__
 #endif
-#if __GNUC_MINOR__ >= 4
-#define __compiletime_warning(message) __attribute__((warning(message)))
-#define __compiletime_error(message) __attribute__((error(message)))
+#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600)
+#define __HAVE_BUILTIN_BSWAP16__
 #endif
+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h
new file mode 100644 (file)
index 0000000..ba147a1
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef __LINUX_COMPILER_H
+#error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
+#endif
+
+#ifdef __ECC
+
+/* Some compiler specific definitions are overwritten here
+ * for Intel ECC compiler
+ */
+
+#include <asm/intrinsics.h>
+
+/* Intel ECC compiler doesn't support gcc specific asm stmts.
+ * It uses intrinsics to do the equivalent things.
+ */
+#undef RELOC_HIDE
+#undef OPTIMIZER_HIDE_VAR
+
+#define RELOC_HIDE(ptr, off)                                   \
+  ({ unsigned long __ptr;                                      \
+     __ptr = (unsigned long) (ptr);                            \
+    (typeof(ptr)) (__ptr + (off)); })
+
+/* This should act as an optimization barrier on var.
+ * Given that this compiler does not have inline assembly, a compiler barrier
+ * is the best we can do.
+ */
+#define OPTIMIZER_HIDE_VAR(var) barrier()
+
+/* Intel ECC compiler doesn't support __builtin_types_compatible_p() */
+#define __must_be_array(a) 0
+
+#endif
+
+#ifndef __HAVE_BUILTIN_BSWAP16__
+/* icc has this, but it's called _bswap16 */
+#define __HAVE_BUILTIN_BSWAP16__
+#define __builtin_bswap16 _bswap16
+#endif
+
index 5be3dab4a69547bf6bb378a45d73e553166c5b12..d5ad7b1118fc10748377d9a90d2e960e0f7b611a 100644 (file)
@@ -5,16 +5,23 @@
 
 #ifdef __CHECKER__
 # define __user                __attribute__((noderef, address_space(1)))
-# define __kernel      /* default address space */
+# define __kernel      __attribute__((address_space(0)))
 # define __safe                __attribute__((safe))
 # define __force       __attribute__((force))
 # define __nocast      __attribute__((nocast))
 # define __iomem       __attribute__((noderef, address_space(2)))
+# define __must_hold(x)        __attribute__((context(x,1,1)))
 # define __acquires(x) __attribute__((context(x,0,1)))
 # define __releases(x) __attribute__((context(x,1,0)))
 # define __acquire(x)  __context__(x,1)
 # define __release(x)  __context__(x,-1)
 # define __cond_lock(x,c)      ((c) ? ({ __acquire(x); 1; }) : 0)
+# define __percpu      __attribute__((noderef, address_space(3)))
+#ifdef CONFIG_SPARSE_RCU_POINTER
+# define __rcu         __attribute__((noderef, address_space(4)))
+#else
+# define __rcu
+#endif
 extern void __chk_user_ptr(const volatile void __user *);
 extern void __chk_io_ptr(const volatile void __iomem *);
 #else
@@ -27,13 +34,20 @@ extern void __chk_io_ptr(const volatile void __iomem *);
 # define __chk_user_ptr(x) (void)0
 # define __chk_io_ptr(x) (void)0
 # define __builtin_warning(x, y...) (1)
+# define __must_hold(x)
 # define __acquires(x)
 # define __releases(x)
 # define __acquire(x) (void)0
 # define __release(x) (void)0
 # define __cond_lock(x,c) (c)
+# define __percpu
+# define __rcu
 #endif
 
+/* Indirect macros required for expanded argument pasting, eg. __LINE__. */
+#define ___PASTE(a,b) a##b
+#define __PASTE(a,b) ___PASTE(a,b)
+
 #ifdef __KERNEL__
 
 #ifdef __GNUC__
@@ -49,6 +63,13 @@ extern void __chk_io_ptr(const volatile void __iomem *);
 # include <linux/compiler-intel.h>
 #endif
 
+/* Clang compiler defines __GNUC__. So we will overwrite implementations
+ * coming from above header files here
+ */
+#ifdef __clang__
+#include <linux/compiler-clang.h>
+#endif
+
 /*
  * Generic compiler-dependent macros required for kernel
  * build go below this comment. Actual compiler/compiler version
@@ -156,6 +177,15 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
     (typeof(ptr)) (__ptr + (off)); })
 #endif
 
+#ifndef OPTIMIZER_HIDE_VAR
+#define OPTIMIZER_HIDE_VAR(var) barrier()
+#endif
+
+/* Not-quite-unique ID. */
+#ifndef __UNIQUE_ID
+# define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
+#endif
+
 #endif /* __KERNEL__ */
 
 #endif /* __ASSEMBLY__ */
@@ -228,7 +258,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
 
 /*
  * Rather then using noinline to prevent stack consumption, use
- * noinline_for_stack instead.  For documentaiton reasons.
+ * noinline_for_stack instead.  For documentation reasons.
  */
 #define noinline_for_stack noinline
 
@@ -270,11 +300,20 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
 # define __section(S) __attribute__ ((__section__(#S)))
 #endif
 
+#ifndef __visible
+#define __visible
+#endif
+
 /* Are two types/vars the same type (ignoring qualifiers)? */
 #ifndef __same_type
 # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
 #endif
 
+/* Is this type a native word size -- useful for atomic operations */
+#ifndef __native_word
+# define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
+#endif
+
 /* Compile time object size, -1 for unknown */
 #ifndef __compiletime_object_size
 # define __compiletime_object_size(obj) -1
@@ -284,8 +323,49 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
 #endif
 #ifndef __compiletime_error
 # define __compiletime_error(message)
+/*
+ * Sparse complains of variable sized arrays due to the temporary variable in
+ * __compiletime_assert. Unfortunately we can't just expand it out to make
+ * sparse see a constant array size without breaking compiletime_assert on old
+ * versions of GCC (e.g. 4.2.4), so hide the array from sparse altogether.
+ */
+# ifndef __CHECKER__
+#  define __compiletime_error_fallback(condition) \
+       do { ((void)sizeof(char[1 - 2 * condition])); } while (0)
+# endif
+#endif
+#ifndef __compiletime_error_fallback
+# define __compiletime_error_fallback(condition) do { } while (0)
 #endif
 
+#define __compiletime_assert(condition, msg, prefix, suffix)           \
+       do {                                                            \
+               bool __cond = !(condition);                             \
+               extern void prefix ## suffix(void) __compiletime_error(msg); \
+               if (__cond)                                             \
+                       prefix ## suffix();                             \
+               __compiletime_error_fallback(__cond);                   \
+       } while (0)
+
+#define _compiletime_assert(condition, msg, prefix, suffix) \
+       __compiletime_assert(condition, msg, prefix, suffix)
+
+/**
+ * compiletime_assert - break build and emit msg if condition is false
+ * @condition: a compile-time constant condition to check
+ * @msg:       a message to emit if condition is false
+ *
+ * In tradition of POSIX assert, this macro will break the build if the
+ * supplied condition is *false*, emitting the supplied error message if the
+ * compiler has support to do so.
+ */
+#define compiletime_assert(condition, msg) \
+       _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
+
+#define compiletime_assert_atomic_type(t)                              \
+       compiletime_assert(__native_word(t),                            \
+               "Need native word sized stores/loads for atomicity.")
+
 /*
  * Prevent the compiler from merging or refetching accesses.  The compiler
  * is also forbidden from reordering successive instances of ACCESS_ONCE(),
@@ -300,4 +380,12 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
  */
 #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
 
+/* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */
+#ifdef CONFIG_KPROBES
+# define __kprobes     __attribute__((__section__(".kprobes.text")))
+# define nokprobe_inline       __always_inline
+#else
+# define __kprobes
+# define nokprobe_inline       inline
+#endif
 #endif /* __LINUX_COMPILER_H */
index ab7805a3b44330931a4be453f85cc86597590753..8a9f645e429712c25e83e2c8989bed4dda24eada 100644 (file)
@@ -7,14 +7,14 @@
 #define __LINUX_KBUILD_H
 
 #define DEFINE(sym, val) \
-       asm volatile("\n->" #sym " %0 " #val : : "i" (val))
+       asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
 
-#define BLANK() asm volatile("\n->" : : )
+#define BLANK() asm volatile("\n.ascii \"->\"" : : )
 
 #define OFFSET(sym, str, mem) \
        DEFINE(sym, offsetof(struct str, mem))
 
 #define COMMENT(x) \
-       asm volatile("\n->#" x)
+       asm volatile("\n.ascii \"->#" x "\"")
 
 #endif
index 7028ee1e77abbcbb4c22a4f35dc285a4cc80bc83..e5c7d1cf0d3754ecae8b4761dec9daf73c2c8d84 100644 (file)
@@ -9,7 +9,6 @@
 #ifndef __MTD_FLASHCHIP_H__
 #define __MTD_FLASHCHIP_H__
 
-#define __UBOOT__
 #ifndef __UBOOT__
 /* For spinlocks. sched.h includes spinlock.h from whichever directory it
  * happens to be in - so we don't have to care whether we're on 2.2, which
index 1526d075c7889f04e6117d230f2982d15b7cdc5a..86664132759ec33aca7c0176c300ce6c819a3e28 100644 (file)
@@ -8,7 +8,6 @@
 #ifndef __MTD_MTD_H__
 #define __MTD_MTD_H__
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/types.h>
 #include <linux/uio.h>
index 67d2651481be3357cf0937526fada71f5f8c66d4..8438490fe42029e48c8c9f1c0e23858c4d75cebd 100644 (file)
@@ -16,7 +16,6 @@
 #ifndef __LINUX_MTD_NAND_H
 #define __LINUX_MTD_NAND_H
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/wait.h>
 #include <linux/spinlock.h>
index d9e58aedf6398487b705eed3ea653b80dd4b1b43..05d0ab54c0190eef14f8ae16ef70f757bfe208f9 100644 (file)
@@ -10,7 +10,6 @@
 #define __LINUX_UBI_H__
 
 #include <linux/types.h>
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/ioctl.h>
 #include <mtd/ubi-user.h>
index b5994e3799d9671763a4f90acc330c1964ae80a0..2cc16a3e7de49e674de3ac2c01f789b025fa9fd1 100644 (file)
@@ -17,7 +17,6 @@
 #ifndef        _LINUX_RBTREE_H
 #define        _LINUX_RBTREE_H
 
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/kernel.h>
 #endif
index b9f4bcb154bf5d073ce80286eb5b315cdf191760..0ef582aeec240aff3c32c64dd33360a74cccdeaf 100644 (file)
@@ -8,7 +8,6 @@
 #ifndef __MTD_ABI_H__
 #define __MTD_ABI_H__
 
-#define __UBOOT__
 #ifdef __UBOOT__
 #include <linux/compat.h>
 #endif
index d1f3a906c095d8f0269f8ce376f92804e0c5943c..5784cfd97b859407c9b32fc3c4246e0674c742fd 100644 (file)
 
 #include <linux/types.h>
 
+#ifdef CONFIG_DM_SERIAL
+/*
+ * For driver model we always use one byte per register, and sort out the
+ * differences in the driver
+ */
+#define CONFIG_SYS_NS16550_REG_SIZE (-1)
+#endif
+
 #if !defined(CONFIG_SYS_NS16550_REG_SIZE) || (CONFIG_SYS_NS16550_REG_SIZE == 0)
 #error "Please define NS16550 registers size."
 #elif defined(CONFIG_SYS_NS16550_MEM32)
        unsigned char postpad_##x[-CONFIG_SYS_NS16550_REG_SIZE - 1];
 #endif
 
+/**
+ * struct ns16550_platdata - information about a NS16550 port
+ *
+ * @base:              Base register address
+ * @reg_shift:         Shift size of registers (0=byte, 1=16bit, 2=32bit...)
+ * @clock:             UART base clock speed in Hz
+ */
+struct ns16550_platdata {
+       unsigned char *base;
+       int reg_shift;
+       int clock;
+};
+
+struct udevice;
+
 struct NS16550 {
        UART_REG(rbr);          /* 0 */
        UART_REG(ier);          /* 1 */
@@ -65,6 +88,9 @@ struct NS16550 {
        UART_REG(scr);          /* 10*/
        UART_REG(ssr);          /* 11*/
 #endif
+#ifdef CONFIG_DM_SERIAL
+       struct ns16550_platdata *plat;
+#endif
 };
 
 #define thr rbr
@@ -170,3 +196,43 @@ void NS16550_putc(NS16550_t com_port, char c);
 char NS16550_getc(NS16550_t com_port);
 int NS16550_tstc(NS16550_t com_port);
 void NS16550_reinit(NS16550_t com_port, int baud_divisor);
+
+/**
+ * ns16550_calc_divisor() - calculate the divisor given clock and baud rate
+ *
+ * Given the UART input clock and required baudrate, calculate the divisor
+ * that should be used.
+ *
+ * @port:      UART port
+ * @clock:     UART input clock speed in Hz
+ * @baudrate:  Required baud rate
+ * @return baud rate divisor that should be used
+ */
+int ns16550_calc_divisor(NS16550_t port, int clock, int baudrate);
+
+/**
+ * ns16550_serial_ofdata_to_platdata() - convert DT to platform data
+ *
+ * Decode a device tree node for an ns16550 device. This includes the
+ * register base address and register shift properties. The caller must set
+ * up the clock frequency.
+ *
+ * @dev:       dev to decode platform data for
+ * @return:    0 if OK, -EINVAL on error
+ */
+int ns16550_serial_ofdata_to_platdata(struct udevice *dev);
+
+/**
+ * ns16550_serial_probe() - probe a serial port
+ *
+ * This sets up the serial port ready for use, except for the baud rate
+ * @return 0, or -ve on error
+ */
+int ns16550_serial_probe(struct udevice *dev);
+
+/**
+ * struct ns16550_serial_ops - ns16550 serial operations
+ *
+ * These should be used by the client driver for the driver's 'ops' member
+ */
+extern const struct dm_serial_ops ns16550_serial_ops;
index d232d470a337e842ed9f88173b9a810f3fc818ba..8f574e4ef896617caa997f0f99823287f476e40a 100644 (file)
@@ -72,4 +72,96 @@ extern int write_port(struct stdio_dev *port, char *buf);
 extern int read_port(struct stdio_dev *port, char *buf, int size);
 #endif
 
+struct udevice;
+
+/**
+ * struct struct dm_serial_ops - Driver model serial operations
+ *
+ * The uclass interface is implemented by all serial devices which use
+ * driver model.
+ */
+struct dm_serial_ops {
+       /**
+        * setbrg() - Set up the baud rate generator
+        *
+        * Adjust baud rate divisors to set up a new baud rate for this
+        * device. Not all devices will support all rates. If the rate
+        * cannot be supported, the driver is free to select the nearest
+        * available rate. or return -EINVAL if this is not possible.
+        *
+        * @dev: Device pointer
+        * @baudrate: New baud rate to use
+        * @return 0 if OK, -ve on error
+        */
+       int (*setbrg)(struct udevice *dev, int baudrate);
+       /**
+        * getc() - Read a character and return it
+        *
+        * If no character is available, this should return -EAGAIN without
+        * waiting.
+        *
+        * @dev: Device pointer
+        * @return character (0..255), -ve on error
+        */
+       int (*getc)(struct udevice *dev);
+       /**
+        * putc() - Write a character
+        *
+        * @dev: Device pointer
+        * @ch: character to write
+        * @return 0 if OK, -ve on error
+        */
+       int (*putc)(struct udevice *dev, const char ch);
+       /**
+        * pending() - Check if input/output characters are waiting
+        *
+        * This can be used to return an indication of the number of waiting
+        * characters if the driver knows this (e.g. by looking at the FIFO
+        * level). It is acceptable to return 1 if an indeterminant number
+        * of characters is waiting.
+        *
+        * This method is optional.
+        *
+        * @dev: Device pointer
+        * @input: true to check input characters, false for output
+        * @return number of waiting characters, 0 for none, -ve on error
+        */
+       int (*pending)(struct udevice *dev, bool input);
+       /**
+        * clear() - Clear the serial FIFOs/holding registers
+        *
+        * This method is optional.
+        *
+        * This quickly clears any input/output characters from the UART.
+        * If this is not possible, but characters still exist, then it
+        * is acceptable to return -EAGAIN (try again) or -EINVAL (not
+        * supported).
+        *
+        * @dev: Device pointer
+        * @return 0 if OK, -ve on error
+        */
+       int (*clear)(struct udevice *dev);
+#if CONFIG_POST & CONFIG_SYS_POST_UART
+       /**
+        * loop() - Control serial device loopback mode
+        *
+        * @dev: Device pointer
+        * @on: 1 to turn loopback on, 0 to turn if off
+        */
+       int (*loop)(struct udevice *dev, int on);
+#endif
+};
+
+/**
+ * struct serial_dev_priv - information about a device used by the uclass
+ *
+ * @sdev: stdio device attached to this uart
+ */
+struct serial_dev_priv {
+       struct stdio_dev *sdev;
+};
+
+/* Access the serial operations for a device */
+#define serial_get_ops(dev)    ((struct dm_serial_ops *)(dev)->driver->ops)
+
 #endif
diff --git a/include/sparse_defs.h b/include/sparse_defs.h
new file mode 100644 (file)
index 0000000..d0612c9
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Copyright 2014 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/types.h>
index a7d0825c7e52fe86c5d6c9d94d7283b6d427b755..268de8ea70058b7500bc4b75e07d5371aba653fb 100644 (file)
@@ -78,7 +78,29 @@ extern char *stdio_names[MAX_FILES];
  */
 int    stdio_register (struct stdio_dev * dev);
 int stdio_register_dev(struct stdio_dev *dev, struct stdio_dev **devp);
-int    stdio_init (void);
+
+/**
+ * stdio_init_tables() - set up stdio tables ready for devices
+ *
+ * This does not add any devices, but just prepares stdio for use.
+ */
+int stdio_init_tables(void);
+
+/**
+ * stdio_add_devices() - Add stdio devices to the table
+ *
+ * This makes calls to all the various subsystems that use stdio, to make
+ * them register with stdio.
+ */
+int stdio_add_devices(void);
+
+/**
+ * stdio_init() - Sets up stdio ready for use
+ *
+ * This calls stdio_init_tables() and stdio_add_devices()
+ */
+int stdio_init(void);
+
 void   stdio_print_current_devices(void);
 #ifdef CONFIG_SYS_STDIO_DEREGISTER
 int    stdio_deregister(const char *devname);
index 73affc42bedbb5a487bf15c4f95d2c49baca39f0..3f342d565c5671582d5b32d410c8849bf2410885 100644 (file)
@@ -6,7 +6,6 @@
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
-#ident "$Id:$"
 
 #ifdef CONFIG_SYSTEMACE
 
index 1046426c5c1b89a8be2141089948c0c811e247bb..58cdc19df3af3bc0558a5fc4687972de553b6788 100644 (file)
 #include <net.h>
 #include <config.h>
 #include <phy.h>
-#include <asm/fsl_enet.h>
 
+#ifdef CONFIG_LS102XA
+#define TSEC_SIZE              0x40000
+#define TSEC_MDIO_OFFSET       0x40000
+#else
 #define TSEC_SIZE              0x01000
 #define TSEC_MDIO_OFFSET       0x01000
+#endif
 
 #define CONFIG_SYS_MDIO_BASE_ADDR (MDIO_BASE_ADDR + 0x520)
 
 
 #define MINFLR_INIT_SETTINGS   0x00000040
 
+#ifdef CONFIG_LS102XA
+#define DMACTRL_INIT_SETTINGS  0x00000003
+#else
 #define DMACTRL_INIT_SETTINGS  0x000000c3
+#endif
 #define DMACTRL_GRS            0x00000010
 #define DMACTRL_GTS            0x00000008
+#define DMACTRL_LE             0x00008000
 
 #define TSTAT_CLEAR_THALT      0x80000000
 #define RSTAT_CLEAR_RHALT      0x00800000
index c2f36452539f0401f586fe459a294fb10dbc854a..06d4542029623cb7d84f764c57fb805bc84f5cd6 100644 (file)
@@ -382,6 +382,21 @@ int fdtdec_get_alias_node(const void *blob, const char *name)
        return fdt_path_offset(blob, prop);
 }
 
+int fdtdec_get_chosen_node(const void *blob, const char *name)
+{
+       const char *prop;
+       int chosen_node;
+       int len;
+
+       if (!blob)
+               return -FDT_ERR_NOTFOUND;
+       chosen_node = fdt_path_offset(blob, "/chosen");
+       prop = fdt_getprop(blob, chosen_node, name, &len);
+       if (!prop)
+               return -FDT_ERR_NOTFOUND;
+       return fdt_path_offset(blob, prop);
+}
+
 int fdtdec_check_fdt(void)
 {
        /*
index 81de0a17de8d37452e94576ebb6eb99597f62681..e841da53ee698a508fc419a8486a0144d88bf8b6 100644 (file)
@@ -1,4 +1,3 @@
-#define __UBOOT__
 #ifndef __UBOOT__
 #include <linux/kernel.h>
 #include <linux/module.h>
index 9e52f70d173f137f32bc5d30a731c71b7adaffd8..5de3bf40263b819edaa7ca3913271e9971f5765d 100644 (file)
@@ -9,7 +9,6 @@
   linux/lib/rbtree.c
 */
 
-#define __UBOOT__
 #include <linux/rbtree_augmented.h>
 #ifndef __UBOOT__
 #include <linux/export.h>
index c664e39be6a6a193ca9b6448c6c01e28b18099b8..4c333599c1fe19e1775d6f5a51d88b7e87c65262 100644 (file)
@@ -113,12 +113,12 @@ as-instr = $(call try-run,\
 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
 
 cc-option = $(call try-run,\
-       $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
+       $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
 
 # cc-option-yn
 # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
 cc-option-yn = $(call try-run,\
-       $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
+       $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
 
 # cc-option-align
 # Prefix align with either -falign or -malign
index 4190798a9762effc774cb7195de6eebc9bd1a274..a5790428c852422a3d330e4d7089afa818737c92 100644 (file)
@@ -170,7 +170,7 @@ do_savedefconfig () {
        # backslashes as an escape character
        while read -r line
        do
-               output_lines="$output_lines $line"
+               output_lines="$output_lines%$line"
        done < defconfig
 
        for img in $subimages
@@ -185,42 +185,64 @@ do_savedefconfig () {
                        tmp=
                        match=
 
+                       # "# CONFIG_FOO is not set" should not be divided.
+                       # Use "%" as a separator, instead of a whitespace.
+                       # "%" is unlikely to appear in defconfig context.
+                       save_IFS=$IFS
+                       IFS=%
                        # coalesce common lines together
                        for i in $output_lines
                        do
                                case "$i" in
-                               "[+A-Z]*:$line")
-                                       tmp="$tmp $unmatched"
+                               [+A-Z]*:$line)
+                                       tmp="$tmp%$unmatched"
                                        i=$(echo "$i" | \
-                                           sed -e "s/^\([^:]\)*/\1$symbol/")
-                                       tmp="$tmp $i"
+                                           sed -e "s/^\([^:]*\)/\1$symbol/")
+                                       tmp="$tmp%$i"
                                        match=1
                                        ;;
-                               "$line")
-                                       tmp="$tmp $unmatched"
-                                       tmp="$tmp +$symbol:$i"
+                               $line)
+                                       tmp="$tmp%$unmatched"
+                                       tmp="$tmp%+$symbol:$i"
                                        match=1
                                        ;;
                                *)
-                                       tmp="$tmp $i"
+                                       tmp="$tmp%$i"
                                        ;;
                                esac
                        done
 
+                       # Restore the default separator for the outer for loop.
+                       IFS=$save_IFS
+
                        if [ "$match" ]; then
                                output_lines="$tmp"
                                unmatched=
                        else
-                               unmatched="$unmatched $symbol:$line"
+                               unmatched="$unmatched%$symbol:$line"
                        fi
                done < defconfig
        done
 
        rm -f defconfig
+       touch defconfig
+
+       save_IFS=$IFS
+       IFS=%
+
        for line in $output_lines
        do
-               echo $line >> defconfig
+               case "$line" in
+               "")
+                       # do not output blank lines
+                       ;;
+               *)
+                       echo $line >> defconfig
+                       ;;
+               esac
        done
+
+       IFS=$save_IFS
 }
 
 # Usage:
index d4e840480a0922964e1fa90b0069bff984362ef0..8ba19ec1030d8bf82a10ef1b8534ddb9c849955d 100644 (file)
@@ -114,6 +114,13 @@ the '&' operator to limit the selection:
 * 'freescale & arm sandbox'  All Freescale boards with ARM architecture,
                              plus sandbox
 
+You can also use -x to specifically exclude some boards. For example:
+
+ buildmand arm -x nvidia,freescale,.*ball$
+
+means to build all arm boards except nvidia, freescale and anything ending
+with 'ball'.
+
 It is convenient to use the -n option to see whaat will be built based on
 the subset given.
 
@@ -435,7 +442,11 @@ is fixed, but there is a new one at line 126. This is probably only because
 we added some code and moved the broken line father down the file.
 
 If many boards have the same error, then -e will display the error only
-once. This makes the output as concise as possible.
+once. This makes the output as concise as possible. To see which boards have
+each error, use -l.
+
+Buildman tries to distinguish warnings from errors, and shows warning lines
+separately with a 'w' prefix.
 
 The full build output in this case is available in:
 
@@ -670,7 +681,9 @@ snapper9g45=${at91-boards} BUILD_TAG=443
 This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260
 and 'make ENABLE_AT91_TEST=1 BUILD_TAG=443' for snapper9g45. A special
 variable ${target} is available to access the target name (snapper9260 and
-snapper9g20 in this case). Variables are resolved recursively.
+snapper9g20 in this case). Variables are resolved recursively. Note that
+variables can only contain the characters A-Z, a-z, 0-9, hyphen (-) and
+underscore (_).
 
 It is expected that any variables added are dealt with in U-Boot's
 config.mk file and documented in the README.
@@ -690,6 +703,12 @@ Other options
 
 Buildman has various other command line options. Try --help to see them.
 
+When doing builds, Buildman's return code will reflect the overall result:
+
+    0 (success)     No errors or warnings found
+    128             Errors found
+    129             Warnings found
+
 
 How to change from MAKEALL
 ==========================
@@ -730,10 +749,10 @@ followed by (afterwards, or perhaps concurrently in another terminal):
 to see the results of the build. Rather than showing you all the output,
 buildman just shows a summary, with red indicating that a commit introduced
 an error and green indicating that a commit fixed an error. Use the -e
-flag to see the full errors.
+flag to see the full errors and -l to see which boards caused which errors.
 
 If you really want to see build results as they happen, use -v when doing a
-build (and -e if you want to see errors as well).
+build (-e will be enabled automatically).
 
 You don't need to stick around on that branch while buildman is running. It
 checks out its own copy of the source code, so you can change branches,
index a3332876240ea673e02c51db3d0bcab0e181e387..5d536d5f20049fc40dd78880632ac10257bcd4c8 100644 (file)
@@ -239,13 +239,14 @@ class Boards:
             terms.append(term)
         return terms
 
-    def SelectBoards(self, args):
+    def SelectBoards(self, args, exclude=[]):
         """Mark boards selected based on args
 
         Args:
-            List of strings specifying boards to include, either named, or
-            by their target, architecture, cpu, vendor or soc. If empty, all
-            boards are selected.
+            args: List of strings specifying boards to include, either named,
+                  or by their target, architecture, cpu, vendor or soc. If
+                  empty, all boards are selected.
+            exclude: List of boards to exclude, regardless of 'args'
 
         Returns:
             Dictionary which holds the number of boards which were selected
@@ -258,17 +259,33 @@ class Boards:
         for term in terms:
             result[str(term)] = 0
 
+        exclude_list = []
+        for expr in exclude:
+            exclude_list.append(Expr(expr))
+
         for board in self._boards:
+            matching_term = None
+            build_it = False
             if terms:
                 match = False
                 for term in terms:
                     if term.Matches(board.props):
-                        board.build_it = True
-                        result[str(term)] += 1
-                        result['all'] += 1
+                        matching_term = str(term)
+                        build_it = True
                         break
             else:
+                build_it = True
+
+            # Check that it is not specifically excluded
+            for expr in exclude_list:
+                if expr.Matches(board.props):
+                    build_it = False
+                    break
+
+            if build_it:
                 board.build_it = True
+                if matching_term:
+                    result[matching_term] += 1
                 result['all'] += 1
 
         return result
index 916479866c4e12605df134d7944afde1633128dc..fdd875b0736f9ec918c443b50778c84aef33cdfa 100644 (file)
@@ -5,6 +5,7 @@
 
 import ConfigParser
 import os
+import StringIO
 
 
 def Setup(fname=''):
@@ -17,11 +18,15 @@ def Setup(fname=''):
     global config_fname
 
     settings = ConfigParser.SafeConfigParser()
-    config_fname = fname
-    if config_fname == '':
-        config_fname = '%s/.buildman' % os.getenv('HOME')
-    if config_fname:
-        settings.read(config_fname)
+    if fname is not None:
+        config_fname = fname
+        if config_fname == '':
+            config_fname = '%s/.buildman' % os.getenv('HOME')
+        if config_fname:
+            settings.read(config_fname)
+
+def AddFile(data):
+    settings.readfp(StringIO.StringIO(data))
 
 def GetItems(section):
     """Get the items from a section of the config.
index a555bd81fc4826dffe410b0fc87996437f4abbd8..8155c1681eab8191ded875154a2f21c9af83d394 100644 (file)
@@ -20,6 +20,7 @@ import builderthread
 import command
 import gitutil
 import terminal
+from terminal import Print
 import toolchain
 
 
@@ -140,6 +141,7 @@ class Builder:
     Private members:
         _base_board_dict: Last-summarised Dict of boards
         _base_err_lines: Last-summarised list of errors
+        _base_warn_lines: Last-summarised list of warnings
         _build_period_us: Time taken for a single build (float object).
         _complete_delay: Expected delay until completion (timedelta)
         _next_delay_update: Next time we plan to display a progress update
@@ -214,6 +216,11 @@ class Builder:
 
         self.col = terminal.Color()
 
+        self._re_function = re.compile('(.*): In function.*')
+        self._re_files = re.compile('In file included from.*')
+        self._re_warning = re.compile('(.*):(\d*):(\d*): warning: .*')
+        self._re_note = re.compile('(.*):(\d*):(\d*): note: this is the location of the previous.*')
+
         self.queue = Queue.Queue()
         self.out_queue = Queue.Queue()
         for i in range(self.num_threads):
@@ -237,18 +244,21 @@ class Builder:
             del t
 
     def SetDisplayOptions(self, show_errors=False, show_sizes=False,
-                          show_detail=False, show_bloat=False):
+                          show_detail=False, show_bloat=False,
+                          list_error_boards=False):
         """Setup display options for the builder.
 
         show_errors: True to show summarised error/warning info
         show_sizes: Show size deltas
         show_detail: Show detail for each board
         show_bloat: Show detail for each function
+        list_error_boards: Show the boards which caused each error/warning
         """
         self._show_errors = show_errors
         self._show_sizes = show_sizes
         self._show_detail = show_detail
         self._show_bloat = show_bloat
+        self._list_error_boards = list_error_boards
 
     def _AddTimestamp(self):
         """Add a new timestamp to the list and record the build period.
@@ -290,8 +300,8 @@ class Builder:
             length: Length of new line, in characters
         """
         if length < self.last_line_len:
-            print ' ' * (self.last_line_len - length),
-            print '\r',
+            Print(' ' * (self.last_line_len - length), newline=False)
+            Print('\r', newline=False)
         self.last_line_len = length
         sys.stdout.flush()
 
@@ -342,7 +352,7 @@ class Builder:
             if result.already_done:
                 self.already_done += 1
             if self._verbose:
-                print '\r',
+                Print('\r', newline=False)
                 self.ClearLine(0)
                 boards_selected = {target : result.brd}
                 self.ResetResultSummary(boards_selected)
@@ -370,7 +380,7 @@ class Builder:
                     self.commit_count)
 
         name += target
-        print line + name,
+        Print(line + name, newline=False)
         length = 14 + len(name)
         self.ClearLine(length)
 
@@ -486,7 +496,7 @@ class Builder:
             try:
                 size, type, name = line[:-1].split()
             except:
-                print "Invalid line in file '%s': '%s'" % (fname, line[:-1])
+                Print("Invalid line in file '%s': '%s'" % (fname, line[:-1]))
                 continue
             if type in 'tTdDbB':
                 # function names begin with '.' on 64-bit powerpc
@@ -569,19 +579,57 @@ class Builder:
             Tuple:
                 Dict containing boards which passed building this commit.
                     keyed by board.target
-                List containing a summary of error/warning lines
+                List containing a summary of error lines
+                Dict keyed by error line, containing a list of the Board
+                    objects with that error
+                List containing a summary of warning lines
+                Dict keyed by error line, containing a list of the Board
+                    objects with that warning
         """
+        def AddLine(lines_summary, lines_boards, line, board):
+            line = line.rstrip()
+            if line in lines_boards:
+                lines_boards[line].append(board)
+            else:
+                lines_boards[line] = [board]
+                lines_summary.append(line)
+
         board_dict = {}
         err_lines_summary = []
+        err_lines_boards = {}
+        warn_lines_summary = []
+        warn_lines_boards = {}
 
         for board in boards_selected.itervalues():
             outcome = self.GetBuildOutcome(commit_upto, board.target,
                                            read_func_sizes)
             board_dict[board.target] = outcome
-            for err in outcome.err_lines:
-                if err and not err.rstrip() in err_lines_summary:
-                    err_lines_summary.append(err.rstrip())
-        return board_dict, err_lines_summary
+            last_func = None
+            last_was_warning = False
+            for line in outcome.err_lines:
+                if line:
+                    if (self._re_function.match(line) or
+                            self._re_files.match(line)):
+                        last_func = line
+                    else:
+                        is_warning = self._re_warning.match(line)
+                        is_note = self._re_note.match(line)
+                        if is_warning or (last_was_warning and is_note):
+                            if last_func:
+                                AddLine(warn_lines_summary, warn_lines_boards,
+                                        last_func, board)
+                            AddLine(warn_lines_summary, warn_lines_boards,
+                                    line, board)
+                        else:
+                            if last_func:
+                                AddLine(err_lines_summary, err_lines_boards,
+                                        last_func, board)
+                            AddLine(err_lines_summary, err_lines_boards,
+                                    line, board)
+                        last_was_warning = is_warning
+                        last_func = None
+        return (board_dict, err_lines_summary, err_lines_boards,
+                warn_lines_summary, warn_lines_boards)
 
     def AddOutcome(self, board_dict, arch_list, changes, char, color):
         """Add an output to our list of outcomes for each architecture
@@ -636,6 +684,9 @@ class Builder:
         for board in board_selected:
             self._base_board_dict[board] = Builder.Outcome(0, [], [], {})
         self._base_err_lines = []
+        self._base_warn_lines = []
+        self._base_err_line_boards = {}
+        self._base_warn_line_boards = {}
 
     def PrintFuncSizeDetail(self, fname, old, new):
         grow, shrink, add, remove, up, down = 0, 0, 0, 0, 0, 0
@@ -673,16 +724,16 @@ class Builder:
             return
         args = [self.ColourNum(x) for x in args]
         indent = ' ' * 15
-        print ('%s%s: add: %s/%s, grow: %s/%s bytes: %s/%s (%s)' %
-               tuple([indent, self.col.Color(self.col.YELLOW, fname)] + args))
-        print '%s  %-38s %7s %7s %+7s' % (indent, 'function', 'old', 'new',
-                                        'delta')
+        Print('%s%s: add: %s/%s, grow: %s/%s bytes: %s/%s (%s)' %
+              tuple([indent, self.col.Color(self.col.YELLOW, fname)] + args))
+        Print('%s  %-38s %7s %7s %+7s' % (indent, 'function', 'old', 'new',
+                                         'delta'))
         for diff, name in delta:
             if diff:
                 color = self.col.RED if diff > 0 else self.col.GREEN
                 msg = '%s  %-38s %7s %7s %+7d' % (indent, name,
                         old.get(name, '-'), new.get(name,'-'), diff)
-                print self.col.Color(color, msg)
+                Print(msg, colour=color)
 
 
     def PrintSizeDetail(self, target_list, show_bloat):
@@ -707,11 +758,12 @@ class Builder:
                     color = self.col.RED if diff > 0 else self.col.GREEN
                 msg = ' %s %+d' % (name, diff)
                 if not printed_target:
-                    print '%10s  %-15s:' % ('', result['_target']),
+                    Print('%10s  %-15s:' % ('', result['_target']),
+                          newline=False)
                     printed_target = True
-                print self.col.Color(color, msg),
+                Print(msg, colour=color, newline=False)
             if printed_target:
-                print
+                Print()
                 if show_bloat:
                     target = result['_target']
                     outcome = result['_outcome']
@@ -816,18 +868,19 @@ class Builder:
                     color = self.col.RED if avg_diff > 0 else self.col.GREEN
                     msg = ' %s %+1.1f' % (name, avg_diff)
                     if not printed_arch:
-                        print '%10s: (for %d/%d boards)' % (arch, count,
-                                arch_count[arch]),
+                        Print('%10s: (for %d/%d boards)' % (arch, count,
+                              arch_count[arch]), newline=False)
                         printed_arch = True
-                    print self.col.Color(color, msg),
+                    Print(msg, colour=color, newline=False)
 
             if printed_arch:
-                print
+                Print()
                 if show_detail:
                     self.PrintSizeDetail(target_list, show_bloat)
 
 
     def PrintResultSummary(self, board_selected, board_dict, err_lines,
+                           err_line_boards, warn_lines, warn_line_boards,
                            show_sizes, show_detail, show_bloat):
         """Compare results with the base results and display delta.
 
@@ -843,10 +896,48 @@ class Builder:
                 commit, keyed by board.target. The value is an Outcome object.
             err_lines: A list of errors for this commit, or [] if there is
                 none, or we don't want to print errors
+            err_line_boards: Dict keyed by error line, containing a list of
+                the Board objects with that error
+            warn_lines: A list of warnings for this commit, or [] if there is
+                none, or we don't want to print errors
+            warn_line_boards: Dict keyed by warning line, containing a list of
+                the Board objects with that warning
             show_sizes: Show image size deltas
             show_detail: Show detail for each board
             show_bloat: Show detail for each function
         """
+        def _BoardList(line, line_boards):
+            """Helper function to get a line of boards containing a line
+
+            Args:
+                line: Error line to search for
+            Return:
+                String containing a list of boards with that error line, or
+                '' if the user has not requested such a list
+            """
+            if self._list_error_boards:
+                names = []
+                for board in line_boards[line]:
+                    names.append(board.target)
+                names_str = '(%s) ' % ','.join(names)
+            else:
+                names_str = ''
+            return names_str
+
+        def _CalcErrorDelta(base_lines, base_line_boards, lines, line_boards,
+                            char):
+            better_lines = []
+            worse_lines = []
+            for line in lines:
+                if line not in base_lines:
+                    worse_lines.append(char + '+' +
+                            _BoardList(line, line_boards) + line)
+            for line in base_lines:
+                if line not in lines:
+                    better_lines.append(char + '-' +
+                            _BoardList(line, base_line_boards) + line)
+            return better_lines, worse_lines
+
         better = []     # List of boards fixed since last commit
         worse = []      # List of new broken boards since last commit
         new = []        # List of boards that didn't exist last time
@@ -870,17 +961,14 @@ class Builder:
                 new.append(target)
 
         # Get a list of errors that have appeared, and disappeared
-        better_err = []
-        worse_err = []
-        for line in err_lines:
-            if line not in self._base_err_lines:
-                worse_err.append('+' + line)
-        for line in self._base_err_lines:
-            if line not in err_lines:
-                better_err.append('-' + line)
+        better_err, worse_err = _CalcErrorDelta(self._base_err_lines,
+                self._base_err_line_boards, err_lines, err_line_boards, '')
+        better_warn, worse_warn = _CalcErrorDelta(self._base_warn_lines,
+                self._base_warn_line_boards, warn_lines, warn_line_boards, 'w')
 
         # Display results by arch
-        if better or worse or unknown or new or worse_err or better_err:
+        if (better or worse or unknown or new or worse_err or better_err
+                or worse_warn or better_warn):
             arch_list = {}
             self.AddOutcome(board_selected, arch_list, better, '',
                     self.col.GREEN)
@@ -891,13 +979,19 @@ class Builder:
                 self.AddOutcome(board_selected, arch_list, unknown, '?',
                         self.col.MAGENTA)
             for arch, target_list in arch_list.iteritems():
-                print '%10s: %s' % (arch, target_list)
+                Print('%10s: %s' % (arch, target_list))
                 self._error_lines += 1
             if better_err:
-                print self.col.Color(self.col.GREEN, '\n'.join(better_err))
+                Print('\n'.join(better_err), colour=self.col.GREEN)
                 self._error_lines += 1
             if worse_err:
-                print self.col.Color(self.col.RED, '\n'.join(worse_err))
+                Print('\n'.join(worse_err), colour=self.col.RED)
+                self._error_lines += 1
+            if better_warn:
+                Print('\n'.join(better_warn), colour=self.col.CYAN)
+                self._error_lines += 1
+            if worse_warn:
+                Print('\n'.join(worse_warn), colour=self.col.MAGENTA)
                 self._error_lines += 1
 
         if show_sizes:
@@ -907,6 +1001,9 @@ class Builder:
         # Save our updated information for the next call to this function
         self._base_board_dict = board_dict
         self._base_err_lines = err_lines
+        self._base_warn_lines = warn_lines
+        self._base_err_line_boards = err_line_boards
+        self._base_warn_line_boards = warn_line_boards
 
         # Get a list of boards that did not get built, if needed
         not_built = []
@@ -914,18 +1011,21 @@ class Builder:
             if not board in board_dict:
                 not_built.append(board)
         if not_built:
-            print "Boards not built (%d): %s" % (len(not_built),
-                    ', '.join(not_built))
+            Print("Boards not built (%d): %s" % (len(not_built),
+                  ', '.join(not_built)))
 
     def ProduceResultSummary(self, commit_upto, commits, board_selected):
-            board_dict, err_lines = self.GetResultSummary(board_selected,
-                    commit_upto, read_func_sizes=self._show_bloat)
+            (board_dict, err_lines, err_line_boards, warn_lines,
+                    warn_line_boards) = self.GetResultSummary(
+                    board_selected, commit_upto,
+                    read_func_sizes=self._show_bloat)
             if commits:
                 msg = '%02d: %s' % (commit_upto + 1,
                         commits[commit_upto].subject)
-                print self.col.Color(self.col.BLUE, msg)
+                Print(msg, colour=self.col.BLUE)
             self.PrintResultSummary(board_selected, board_dict,
-                    err_lines if self._show_errors else [],
+                    err_lines if self._show_errors else [], err_line_boards,
+                    warn_lines if self._show_errors else [], warn_line_boards,
                     self._show_sizes, self._show_detail, self._show_bloat)
 
     def ShowSummary(self, commits, board_selected):
@@ -946,7 +1046,7 @@ class Builder:
         for commit_upto in range(0, self.commit_count, self._step):
             self.ProduceResultSummary(commit_upto, commits, board_selected)
         if not self._error_lines:
-            print self.col.Color(self.col.GREEN, '(no errors to report)')
+            Print('(no errors to report)', colour=self.col.GREEN)
 
 
     def SetupBuild(self, board_selected, commits):
@@ -991,7 +1091,7 @@ class Builder:
             if os.path.exists(git_dir):
                 gitutil.Fetch(git_dir, thread_dir)
             else:
-                print 'Cloning repo for thread %d' % thread_num
+                Print('Cloning repo for thread %d' % thread_num)
                 gitutil.Clone(src_dir, thread_dir)
 
     def _PrepareWorkingSpace(self, max_threads, setup_git):
@@ -1031,13 +1131,17 @@ class Builder:
                     value is Board object
             keep_outputs: True to save build output files
             verbose: Display build results as they are completed
+        Returns:
+            Tuple containing:
+                - number of boards that failed to build
+                - number of boards that issued warnings
         """
         self.commit_count = len(commits) if commits else 1
         self.commits = commits
         self._verbose = verbose
 
         self.ResetResultSummary(board_selected)
-        builderthread.Mkdir(self.base_dir)
+        builderthread.Mkdir(self.base_dir, parents = True)
         self._PrepareWorkingSpace(min(self.num_threads, len(board_selected)),
                 commits is not None)
         self._PrepareOutputSpace()
@@ -1058,5 +1162,6 @@ class Builder:
 
         # Wait until we have processed all output
         self.out_queue.join()
-        print
+        Print()
         self.ClearLine(0)
+        return (self.fail, self.warned)
index 8214662e368890d05bc1017c15adc9acb430031f..a9cf68a8016c4ea9c066ea9527986d56f0465266 100644 (file)
@@ -12,14 +12,17 @@ import threading
 import command
 import gitutil
 
-def Mkdir(dirname):
+def Mkdir(dirname, parents = False):
     """Make a directory if it doesn't already exist.
 
     Args:
         dirname: Directory to create
     """
     try:
-        os.mkdir(dirname)
+        if parents:
+            os.makedirs(dirname)
+        else:
+            os.mkdir(dirname)
     except OSError as err:
         if err.errno == errno.EEXIST:
             pass
@@ -138,16 +141,17 @@ class BuilderThread(threading.Thread):
         result.already_done = os.path.exists(done_file)
         will_build = (force_build or force_build_failures or
             not result.already_done)
-        if result.already_done and will_build:
+        if result.already_done:
             # Get the return code from that build and use it
             with open(done_file, 'r') as fd:
                 result.return_code = int(fd.readline())
-            err_file = self.builder.GetErrFile(commit_upto, brd.target)
-            if os.path.exists(err_file) and os.stat(err_file).st_size:
-                result.stderr = 'bad'
-            elif not force_build:
-                # The build passed, so no need to build it again
-                will_build = False
+            if will_build:
+                err_file = self.builder.GetErrFile(commit_upto, brd.target)
+                if os.path.exists(err_file) and os.stat(err_file).st_size:
+                    result.stderr = 'bad'
+                elif not force_build:
+                    # The build passed, so no need to build it again
+                    will_build = False
 
         if will_build:
             # We are going to have to build it. First, get a toolchain
@@ -177,6 +181,7 @@ class BuilderThread(threading.Thread):
                 Mkdir(out_dir)
                 args = []
                 cwd = work_dir
+                src_dir = os.path.realpath(work_dir)
                 if not self.builder.in_tree:
                     if commit_upto is None:
                         # In this case we are building in the original source
@@ -189,6 +194,7 @@ class BuilderThread(threading.Thread):
                         work_dir = os.path.realpath(work_dir)
                         args.append('O=%s/build' % work_dir)
                         cwd = None
+                        src_dir = os.getcwd()
                     else:
                         args.append('O=build')
                 args.append('-s')
@@ -209,7 +215,7 @@ class BuilderThread(threading.Thread):
                 if result.return_code == 0:
                     result = self.Make(commit, brd, 'build', cwd, *args,
                             env=env)
-                    result.stdout = config_out + result.stdout
+                result.stderr = result.stderr.replace(src_dir + '/', '')
             else:
                 result.return_code = 1
                 result.stderr = 'No tool chain for %s\n' % brd.arch
index e18859b3d79723288eb43dd70da6d2acdf081d82..d0afeda6c07734a7d7505757a437818a3ed25df7 100755 (executable)
@@ -8,7 +8,6 @@
 """See README for more information"""
 
 import multiprocessing
-from optparse import OptionParser
 import os
 import re
 import sys
@@ -20,9 +19,10 @@ sys.path.append(os.path.join(our_path, '../patman'))
 
 # Our modules
 import board
+import bsettings
 import builder
 import checkpatch
-import command
+import cmdline
 import control
 import doctest
 import gitutil
@@ -31,27 +31,20 @@ import terminal
 import toolchain
 
 def RunTests():
+    import func_test
     import test
     import doctest
 
     result = unittest.TestResult()
-    for module in ['toolchain']:
+    for module in ['toolchain', 'gitutil']:
         suite = doctest.DocTestSuite(module)
         suite.run(result)
 
-    # TODO: Surely we can just 'print' result?
-    print result
-    for test, err in result.errors:
-        print err
-    for test, err in result.failures:
-        print err
-
     sys.argv = [sys.argv[0]]
-    suite = unittest.TestLoader().loadTestsFromTestCase(test.TestBuild)
-    result = unittest.TestResult()
-    suite.run(result)
+    for module in (test.TestBuild, func_test.TestFunctional):
+        suite = unittest.TestLoader().loadTestsFromTestCase(module)
+        suite.run(result)
 
-    # TODO: Surely we can just 'print' result?
     print result
     for test, err in result.errors:
         print err
@@ -59,81 +52,14 @@ def RunTests():
         print err
 
 
-parser = OptionParser()
-parser.add_option('-b', '--branch', type='string',
-       help='Branch name to build')
-parser.add_option('-B', '--bloat', dest='show_bloat',
-       action='store_true', default=False,
-       help='Show changes in function code size for each board')
-parser.add_option('-c', '--count', dest='count', type='int',
-       default=-1, help='Run build on the top n commits')
-parser.add_option('-C', '--force-reconfig', dest='force_reconfig',
-       action='store_true', default=False,
-       help='Reconfigure for every commit (disable incremental build)')
-parser.add_option('-d', '--detail', dest='show_detail',
-       action='store_true', default=False,
-       help='Show detailed information for each board in summary')
-parser.add_option('-e', '--show_errors', action='store_true',
-       default=False, help='Show errors and warnings')
-parser.add_option('-f', '--force-build', dest='force_build',
-       action='store_true', default=False,
-       help='Force build of boards even if already built')
-parser.add_option('-F', '--force-build-failures', dest='force_build_failures',
-       action='store_true', default=False,
-       help='Force build of previously-failed build')
-parser.add_option('-g', '--git', type='string',
-       help='Git repo containing branch to build', default='.')
-parser.add_option('-G', '--config-file', type='string',
-       help='Path to buildman config file', default='')
-parser.add_option('-H', '--full-help', action='store_true', dest='full_help',
-       default=False, help='Display the README file')
-parser.add_option('-i', '--in-tree', dest='in_tree',
-       action='store_true', default=False,
-       help='Build in the source tree instead of a separate directory')
-parser.add_option('-j', '--jobs', dest='jobs', type='int',
-       default=None, help='Number of jobs to run at once (passed to make)')
-parser.add_option('-k', '--keep-outputs', action='store_true',
-       default=False, help='Keep all build output files (e.g. binaries)')
-parser.add_option('--list-tool-chains', action='store_true', default=False,
-       help='List available tool chains')
-parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run',
-       default=False, help="Do a try run (describe actions, but no nothing)")
-parser.add_option('-o', '--output-dir', type='string',
-       dest='output_dir', default='..',
-       help='Directory where all builds happen and buildman has its workspace (default is ../)')
-parser.add_option('-Q', '--quick', action='store_true',
-       default=False, help='Do a rough build, with limited warning resolution')
-parser.add_option('-s', '--summary', action='store_true',
-       default=False, help='Show a build summary')
-parser.add_option('-S', '--show-sizes', action='store_true',
-       default=False, help='Show image size variation in summary')
-parser.add_option('--step', type='int',
-       default=1, help='Only build every n commits (0=just first and last)')
-parser.add_option('-t', '--test', action='store_true', dest='test',
-                  default=False, help='run tests')
-parser.add_option('-T', '--threads', type='int',
-       default=None, help='Number of builder threads to use')
-parser.add_option('-u', '--show_unknown', action='store_true',
-       default=False, help='Show boards with unknown build result')
-parser.add_option('-v', '--verbose', action='store_true',
-       default=False, help='Show build results while the build progresses')
-
-parser.usage += """
-
-Build U-Boot for all commits in a branch. Use -n to do a dry run"""
-
-(options, args) = parser.parse_args()
+options, args = cmdline.ParseArgs()
 
 # Run our meagre tests
 if options.test:
     RunTests()
-elif options.full_help:
-    pager = os.getenv('PAGER')
-    if not pager:
-        pager = 'more'
-    fname = os.path.join(os.path.dirname(sys.argv[0]), 'README')
-    command.Run(pager, fname)
 
 # Build selected commits for selected boards
 else:
-    control.DoBuildman(options, args)
+    bsettings.Setup(options.config_file)
+    ret_code = control.DoBuildman(options, args)
+    sys.exit(ret_code)
diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py
new file mode 100644 (file)
index 0000000..27d3c70
--- /dev/null
@@ -0,0 +1,85 @@
+#
+# Copyright (c) 2014 Google, Inc
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+from optparse import OptionParser
+
+def ParseArgs():
+    """Parse command line arguments from sys.argv[]
+
+    Returns:
+        tuple containing:
+            options: command line options
+            args: command lin arguments
+    """
+    parser = OptionParser()
+    parser.add_option('-b', '--branch', type='string',
+          help='Branch name to build')
+    parser.add_option('-B', '--bloat', dest='show_bloat',
+          action='store_true', default=False,
+          help='Show changes in function code size for each board')
+    parser.add_option('-c', '--count', dest='count', type='int',
+          default=-1, help='Run build on the top n commits')
+    parser.add_option('-C', '--force-reconfig', dest='force_reconfig',
+          action='store_true', default=False,
+          help='Reconfigure for every commit (disable incremental build)')
+    parser.add_option('-d', '--detail', dest='show_detail',
+          action='store_true', default=False,
+          help='Show detailed information for each board in summary')
+    parser.add_option('-e', '--show_errors', action='store_true',
+          default=False, help='Show errors and warnings')
+    parser.add_option('-f', '--force-build', dest='force_build',
+          action='store_true', default=False,
+          help='Force build of boards even if already built')
+    parser.add_option('-F', '--force-build-failures', dest='force_build_failures',
+          action='store_true', default=False,
+          help='Force build of previously-failed build')
+    parser.add_option('-g', '--git', type='string',
+          help='Git repo containing branch to build', default='.')
+    parser.add_option('-G', '--config-file', type='string',
+          help='Path to buildman config file', default='')
+    parser.add_option('-H', '--full-help', action='store_true', dest='full_help',
+          default=False, help='Display the README file')
+    parser.add_option('-i', '--in-tree', dest='in_tree',
+          action='store_true', default=False,
+          help='Build in the source tree instead of a separate directory')
+    parser.add_option('-j', '--jobs', dest='jobs', type='int',
+          default=None, help='Number of jobs to run at once (passed to make)')
+    parser.add_option('-k', '--keep-outputs', action='store_true',
+          default=False, help='Keep all build output files (e.g. binaries)')
+    parser.add_option('-l', '--list-error-boards', action='store_true',
+          default=False, help='Show a list of boards next to each error/warning')
+    parser.add_option('--list-tool-chains', action='store_true', default=False,
+          help='List available tool chains')
+    parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run',
+          default=False, help="Do a dry run (describe actions, but do nothing)")
+    parser.add_option('-o', '--output-dir', type='string',
+          dest='output_dir', default='..',
+          help='Directory where all builds happen and buildman has its workspace (default is ../)')
+    parser.add_option('-Q', '--quick', action='store_true',
+          default=False, help='Do a rough build, with limited warning resolution')
+    parser.add_option('-s', '--summary', action='store_true',
+          default=False, help='Show a build summary')
+    parser.add_option('-S', '--show-sizes', action='store_true',
+          default=False, help='Show image size variation in summary')
+    parser.add_option('--step', type='int',
+          default=1, help='Only build every n commits (0=just first and last)')
+    parser.add_option('-t', '--test', action='store_true', dest='test',
+                      default=False, help='run tests')
+    parser.add_option('-T', '--threads', type='int',
+          default=None, help='Number of builder threads to use')
+    parser.add_option('-u', '--show_unknown', action='store_true',
+          default=False, help='Show boards with unknown build result')
+    parser.add_option('-v', '--verbose', action='store_true',
+          default=False, help='Show build results while the build progresses')
+    parser.add_option('-x', '--exclude', dest='exclude',
+          type='string', action='append',
+          help='Specify a list of boards to exclude, separated by comma')
+
+    parser.usage += """
+
+    Build U-Boot for all commits in a branch. Use -n to do a dry run"""
+
+    return parser.parse_args()
index 68ea961876ebde40f7b61bae85a150b7593ca7e7..e97350f9a02d3ee5e411b670106e42ea53c26029 100644 (file)
@@ -5,6 +5,7 @@
 
 import multiprocessing
 import os
+import shutil
 import sys
 
 import board
@@ -13,6 +14,7 @@ from builder import Builder
 import gitutil
 import patchstream
 import terminal
+from terminal import Print
 import toolchain
 import command
 import subprocess
@@ -77,24 +79,44 @@ def ShowActions(series, why_selected, boards_selected, builder, options):
     print ('Total boards to build for each commit: %d\n' %
             why_selected['all'])
 
-def DoBuildman(options, args):
+def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
+               clean_dir=False):
     """The main control code for buildman
 
     Args:
         options: Command line options object
         args: Command line arguments (list of strings)
+        toolchains: Toolchains to use - this should be a Toolchains()
+                object. If None, then it will be created and scanned
+        make_func: Make function to use for the builder. This is called
+                to execute 'make'. If this is None, the normal function
+                will be used, which calls the 'make' tool with suitable
+                arguments. This setting is useful for tests.
+        board: Boards() object to use, containing a list of available
+                boards. If this is None it will be created and scanned.
     """
+    global builder
+
+    if options.full_help:
+        pager = os.getenv('PAGER')
+        if not pager:
+            pager = 'more'
+        fname = os.path.join(os.path.dirname(sys.argv[0]), 'README')
+        command.Run(pager, fname)
+        return 0
+
     gitutil.Setup()
 
-    bsettings.Setup(options.config_file)
     options.git_dir = os.path.join(options.git, '.git')
 
-    toolchains = toolchain.Toolchains()
-    toolchains.Scan(options.list_tool_chains)
+    if not toolchains:
+        toolchains = toolchain.Toolchains()
+        toolchains.GetSettings()
+        toolchains.Scan(options.list_tool_chains)
     if options.list_tool_chains:
         toolchains.List()
         print
-        return
+        return 0
 
     # Work out how many commits to build. We want to build everything on the
     # branch. We also build the upstream commit as a control so we can see
@@ -119,15 +141,22 @@ def DoBuildman(options, args):
         sys.exit(col.Color(col.RED, str))
 
     # Work out what subset of the boards we are building
-    board_file = os.path.join(options.git, 'boards.cfg')
-    status = subprocess.call([os.path.join(options.git,
-                                           'tools/genboardscfg.py')])
-    if status != 0:
-        sys.exit("Failed to generate boards.cfg")
-
-    boards = board.Boards()
-    boards.ReadBoards(os.path.join(options.git, 'boards.cfg'))
-    why_selected = boards.SelectBoards(args)
+    if not boards:
+        board_file = os.path.join(options.git, 'boards.cfg')
+        status = subprocess.call([os.path.join(options.git,
+                                                'tools/genboardscfg.py')])
+        if status != 0:
+                sys.exit("Failed to generate boards.cfg")
+
+        boards = board.Boards()
+        boards.ReadBoards(os.path.join(options.git, 'boards.cfg'))
+
+    exclude = []
+    if options.exclude:
+        for arg in options.exclude:
+            exclude += arg.split(',')
+
+    why_selected = boards.SelectBoards(args, exclude)
     selected = boards.GetSelected()
     if not len(selected):
         sys.exit(col.Color(col.RED, 'No matching boards found'))
@@ -137,6 +166,10 @@ def DoBuildman(options, args):
     # upstream/master~..branch but that isn't possible if upstream/master is
     # a merge commit (it will list all the commits that form part of the
     # merge)
+    # Conflicting tags are not a problem for buildman, since it does not use
+    # them. For example, Series-version is not useful for buildman. On the
+    # other hand conflicting tags will cause an error. So allow later tags
+    # to overwrite earlier ones by setting allow_overwrite=True
     if options.branch:
         if count == -1:
             range_expr = gitutil.GetRangeInBranch(options.git_dir,
@@ -144,19 +177,14 @@ def DoBuildman(options, args):
             upstream_commit = gitutil.GetUpstream(options.git_dir,
                                                   options.branch)
             series = patchstream.GetMetaDataForList(upstream_commit,
-                options.git_dir, 1)
+                options.git_dir, 1, series=None, allow_overwrite=True)
 
-            # Conflicting tags are not a problem for buildman, since it does
-            # not use them. For example, Series-version is not useful for
-            # buildman. On the other hand conflicting tags will cause an
-            # error. So allow later tags to overwrite earlier ones.
-            series.allow_overwrite = True
             series = patchstream.GetMetaDataForList(range_expr,
-                                              options.git_dir, None, series)
+                    options.git_dir, None, series, allow_overwrite=True)
         else:
             # Honour the count
             series = patchstream.GetMetaDataForList(options.branch,
-                                                    options.git_dir, count)
+                    options.git_dir, count, series=None, allow_overwrite=True)
     else:
         series = None
         options.verbose = True
@@ -180,14 +208,18 @@ def DoBuildman(options, args):
 
     # Create a new builder with the selected options
     if options.branch:
-        dirname = options.branch
+        dirname = options.branch.replace('/', '_')
     else:
         dirname = 'current'
     output_dir = os.path.join(options.output_dir, dirname)
+    if clean_dir and os.path.exists(output_dir):
+        shutil.rmtree(output_dir)
     builder = Builder(toolchains, output_dir, options.git_dir,
             options.threads, options.jobs, gnu_make=gnu_make, checkout=True,
             show_unknown=options.show_unknown, step=options.step)
     builder.force_config_on_failure = not options.quick
+    if make_func:
+        builder.do_make = make_func
 
     # For a dry run, just show our actions as a sanity check
     if options.dry_run:
@@ -203,19 +235,28 @@ def DoBuildman(options, args):
 
         if series:
             commits = series.commits
+            # Number the commits for test purposes
+            for commit in range(len(commits)):
+                commits[commit].sequence = commit
         else:
             commits = None
 
-        print GetActionSummary(options.summary, commits, board_selected,
-                               options)
+        Print(GetActionSummary(options.summary, commits, board_selected,
+                                options))
 
         builder.SetDisplayOptions(options.show_errors, options.show_sizes,
-                                  options.show_detail, options.show_bloat)
+                                  options.show_detail, options.show_bloat,
+                                  options.list_error_boards)
         if options.summary:
             # We can't show function sizes without board details at present
             if options.show_bloat:
                 options.show_detail = True
             builder.ShowSummary(commits, board_selected)
         else:
-            builder.BuildBoards(commits, board_selected,
+            fail, warned = builder.BuildBoards(commits, board_selected,
                                 options.keep_outputs, options.verbose)
+            if fail:
+                return 128
+            elif warned:
+                return 129
+    return 0
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
new file mode 100644 (file)
index 0000000..75eb3a9
--- /dev/null
@@ -0,0 +1,519 @@
+#
+# Copyright (c) 2014 Google, Inc
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+
+import os
+import shutil
+import sys
+import tempfile
+import unittest
+
+import board
+import bsettings
+import cmdline
+import command
+import control
+import gitutil
+import terminal
+import toolchain
+
+settings_data = '''
+# Buildman settings file
+
+[toolchain]
+
+[toolchain-alias]
+
+[make-flags]
+src=/home/sjg/c/src
+chroot=/home/sjg/c/chroot
+vboot=USE_STDINT=1 VBOOT_DEBUG=1 MAKEFLAGS_VBOOT=DEBUG=1 CFLAGS_EXTRA_VBOOT=-DUNROLL_LOOPS VBOOT_SOURCE=${src}/platform/vboot_reference
+chromeos_coreboot=VBOOT=${chroot}/build/link/usr ${vboot}
+chromeos_daisy=VBOOT=${chroot}/build/daisy/usr ${vboot}
+chromeos_peach=VBOOT=${chroot}/build/peach_pit/usr ${vboot}
+'''
+
+boards = [
+    ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 1', 'board0',  ''],
+    ['Active', 'arm', 'armv7', '', 'Tester', 'ARM Board 2', 'board1', ''],
+    ['Active', 'powerpc', 'powerpc', '', 'Tester', 'PowerPC board 1', 'board2', ''],
+    ['Active', 'powerpc', 'mpc5xx', '', 'Tester', 'PowerPC board 2', 'board3', ''],
+    ['Active', 'sandbox', 'sandbox', '', 'Tester', 'Sandbox board', 'board4', ''],
+]
+
+commit_shortlog = """4aca821 patman: Avoid changing the order of tags
+39403bb patman: Use --no-pager' to stop git from forking a pager
+db6e6f2 patman: Remove the -a option
+f2ccf03 patman: Correct unit tests to run correctly
+1d097f9 patman: Fix indentation in terminal.py
+d073747 patman: Support the 'reverse' option for 'git log
+"""
+
+commit_log = ["""commit 7f6b8315d18f683c5181d0c3694818c1b2a20dcd
+Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
+Date:   Fri Aug 22 19:12:41 2014 +0900
+
+    buildman: refactor help message
+
+    "buildman [options]" is displayed by default.
+
+    Append the rest of help messages to parser.usage
+    instead of replacing it.
+
+    Besides, "-b <branch>" is not mandatory since commit fea5858e.
+    Drop it from the usage.
+
+    Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
+""",
+"""commit d0737479be6baf4db5e2cdbee123e96bc5ed0ba8
+Author: Simon Glass <sjg@chromium.org>
+Date:   Thu Aug 14 16:48:25 2014 -0600
+
+    patman: Support the 'reverse' option for 'git log'
+
+    This option is currently not supported, but needs to be, for buildman to
+    operate as expected.
+
+    Series-changes: 7
+    - Add new patch to fix the 'reverse' bug
+
+    Series-version: 8
+
+    Change-Id: I79078f792e8b390b8a1272a8023537821d45feda
+    Reported-by: York Sun <yorksun@freescale.com>
+    Signed-off-by: Simon Glass <sjg@chromium.org>
+
+""",
+"""commit 1d097f9ab487c5019152fd47bda126839f3bf9fc
+Author: Simon Glass <sjg@chromium.org>
+Date:   Sat Aug 9 11:44:32 2014 -0600
+
+    patman: Fix indentation in terminal.py
+
+    This code came from a different project with 2-character indentation. Fix
+    it for U-Boot.
+
+    Series-changes: 6
+    - Add new patch to fix indentation in teminal.py
+
+    Change-Id: I5a74d2ebbb3cc12a665f5c725064009ac96e8a34
+    Signed-off-by: Simon Glass <sjg@chromium.org>
+
+""",
+"""commit f2ccf03869d1e152c836515a3ceb83cdfe04a105
+Author: Simon Glass <sjg@chromium.org>
+Date:   Sat Aug 9 11:08:24 2014 -0600
+
+    patman: Correct unit tests to run correctly
+
+    It seems that doctest behaves differently now, and some of the unit tests
+    do not run. Adjust the tests to work correctly.
+
+     ./tools/patman/patman --test
+    <unittest.result.TestResult run=10 errors=0 failures=0>
+
+    Series-changes: 6
+    - Add new patch to fix patman unit tests
+
+    Change-Id: I3d2ca588f4933e1f9d6b1665a00e4ae58269ff3b
+
+""",
+"""commit db6e6f2f9331c5a37647d6668768d4a40b8b0d1c
+Author: Simon Glass <sjg@chromium.org>
+Date:   Sat Aug 9 12:06:02 2014 -0600
+
+    patman: Remove the -a option
+
+    It seems that this is no longer needed, since checkpatch.pl will catch
+    whitespace problems in patches. Also the option is not widely used, so
+    it seems safe to just remove it.
+
+    Series-changes: 6
+    - Add new patch to remove patman's -a option
+
+    Suggested-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
+    Change-Id: I5821a1c75154e532c46513486ca40b808de7e2cc
+
+""",
+"""commit 39403bb4f838153028a6f21ca30bf100f3791133
+Author: Simon Glass <sjg@chromium.org>
+Date:   Thu Aug 14 21:50:52 2014 -0600
+
+    patman: Use --no-pager' to stop git from forking a pager
+
+""",
+"""commit 4aca821e27e97925c039e69fd37375b09c6f129c
+Author: Simon Glass <sjg@chromium.org>
+Date:   Fri Aug 22 15:57:39 2014 -0600
+
+    patman: Avoid changing the order of tags
+
+    patman collects tags that it sees in the commit and places them nicely
+    sorted at the end of the patch. However, this is not really necessary and
+    in fact is apparently not desirable.
+
+    Series-changes: 9
+    - Add new patch to avoid changing the order of tags
+
+    Series-version: 9
+
+    Suggested-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
+    Change-Id: Ib1518588c1a189ad5c3198aae76f8654aed8d0db
+"""]
+
+TEST_BRANCH = '__testbranch'
+
+class TestFunctional(unittest.TestCase):
+    """Functional test for buildman.
+
+    This aims to test from just below the invocation of buildman (parsing
+    of arguments) to 'make' and 'git' invocation. It is not a true
+    emd-to-end test, as it mocks git, make and the tool chain. But this
+    makes it easier to detect when the builder is doing the wrong thing,
+    since in many cases this test code will fail. For example, only a
+    very limited subset of 'git' arguments is supported - anything
+    unexpected will fail.
+    """
+    def setUp(self):
+        self._base_dir = tempfile.mkdtemp()
+        self._git_dir = os.path.join(self._base_dir, 'src')
+        self._buildman_pathname = sys.argv[0]
+        self._buildman_dir = os.path.dirname(sys.argv[0])
+        command.test_result = self._HandleCommand
+        self.setupToolchains()
+        self._toolchains.Add('arm-gcc', test=False)
+        self._toolchains.Add('powerpc-gcc', test=False)
+        bsettings.Setup(None)
+        bsettings.AddFile(settings_data)
+        self._boards = board.Boards()
+        for brd in boards:
+            self._boards.AddBoard(board.Board(*brd))
+
+        # Directories where the source been cloned
+        self._clone_dirs = []
+        self._commits = len(commit_shortlog.splitlines()) + 1
+        self._total_builds = self._commits * len(boards)
+
+        # Number of calls to make
+        self._make_calls = 0
+
+        # Map of [board, commit] to error messages
+        self._error = {}
+
+        self._test_branch = TEST_BRANCH
+
+        # Avoid sending any output and clear all terminal output
+        terminal.SetPrintTestMode()
+        terminal.GetPrintTestLines()
+
+    def tearDown(self):
+        shutil.rmtree(self._base_dir)
+
+    def setupToolchains(self):
+        self._toolchains = toolchain.Toolchains()
+        self._toolchains.Add('gcc', test=False)
+
+    def _RunBuildman(self, *args):
+        return command.RunPipe([[self._buildman_pathname] + list(args)],
+                capture=True, capture_stderr=True)
+
+    def _RunControl(self, *args, **kwargs):
+        sys.argv = [sys.argv[0]] + list(args)
+        options, args = cmdline.ParseArgs()
+        result = control.DoBuildman(options, args, toolchains=self._toolchains,
+                make_func=self._HandleMake, boards=self._boards,
+                clean_dir=kwargs.get('clean_dir', True))
+        self._builder = control.builder
+        return result
+
+    def testFullHelp(self):
+        command.test_result = None
+        result = self._RunBuildman('-H')
+        help_file = os.path.join(self._buildman_dir, 'README')
+        self.assertEqual(len(result.stdout), os.path.getsize(help_file))
+        self.assertEqual(0, len(result.stderr))
+        self.assertEqual(0, result.return_code)
+
+    def testHelp(self):
+        command.test_result = None
+        result = self._RunBuildman('-h')
+        help_file = os.path.join(self._buildman_dir, 'README')
+        self.assertTrue(len(result.stdout) > 1000)
+        self.assertEqual(0, len(result.stderr))
+        self.assertEqual(0, result.return_code)
+
+    def testGitSetup(self):
+        """Test gitutils.Setup(), from outside the module itself"""
+        command.test_result = command.CommandResult(return_code=1)
+        gitutil.Setup()
+        self.assertEqual(gitutil.use_no_decorate, False)
+
+        command.test_result = command.CommandResult(return_code=0)
+        gitutil.Setup()
+        self.assertEqual(gitutil.use_no_decorate, True)
+
+    def _HandleCommandGitLog(self, args):
+        if '-n0' in args:
+            return command.CommandResult(return_code=0)
+        elif args[-1] == 'upstream/master..%s' % self._test_branch:
+            return command.CommandResult(return_code=0, stdout=commit_shortlog)
+        elif args[:3] == ['--no-color', '--no-decorate', '--reverse']:
+            if args[-1] == self._test_branch:
+                count = int(args[3][2:])
+                return command.CommandResult(return_code=0,
+                                            stdout=''.join(commit_log[:count]))
+
+        # Not handled, so abort
+        print 'git log', args
+        sys.exit(1)
+
+    def _HandleCommandGitConfig(self, args):
+        config = args[0]
+        if config == 'sendemail.aliasesfile':
+            return command.CommandResult(return_code=0)
+        elif config.startswith('branch.badbranch'):
+            return command.CommandResult(return_code=1)
+        elif config == 'branch.%s.remote' % self._test_branch:
+            return command.CommandResult(return_code=0, stdout='upstream\n')
+        elif config == 'branch.%s.merge' % self._test_branch:
+            return command.CommandResult(return_code=0,
+                                         stdout='refs/heads/master\n')
+
+        # Not handled, so abort
+        print 'git config', args
+        sys.exit(1)
+
+    def _HandleCommandGit(self, in_args):
+        """Handle execution of a git command
+
+        This uses a hacked-up parser.
+
+        Args:
+            in_args: Arguments after 'git' from the command line
+        """
+        git_args = []           # Top-level arguments to git itself
+        sub_cmd = None          # Git sub-command selected
+        args = []               # Arguments to the git sub-command
+        for arg in in_args:
+            if sub_cmd:
+                args.append(arg)
+            elif arg[0] == '-':
+                git_args.append(arg)
+            else:
+                if git_args and git_args[-1] in ['--git-dir', '--work-tree']:
+                    git_args.append(arg)
+                else:
+                    sub_cmd = arg
+        if sub_cmd == 'config':
+            return self._HandleCommandGitConfig(args)
+        elif sub_cmd == 'log':
+            return self._HandleCommandGitLog(args)
+        elif sub_cmd == 'clone':
+            return command.CommandResult(return_code=0)
+        elif sub_cmd == 'checkout':
+            return command.CommandResult(return_code=0)
+
+        # Not handled, so abort
+        print 'git', git_args, sub_cmd, args
+        sys.exit(1)
+
+    def _HandleCommandNm(self, args):
+        return command.CommandResult(return_code=0)
+
+    def _HandleCommandObjdump(self, args):
+        return command.CommandResult(return_code=0)
+
+    def _HandleCommandSize(self, args):
+        return command.CommandResult(return_code=0)
+
+    def _HandleCommand(self, **kwargs):
+        """Handle a command execution.
+
+        The command is in kwargs['pipe-list'], as a list of pipes, each a
+        list of commands. The command should be emulated as required for
+        testing purposes.
+
+        Returns:
+            A CommandResult object
+        """
+        pipe_list = kwargs['pipe_list']
+        wc = False
+        if len(pipe_list) != 1:
+            if pipe_list[1] == ['wc', '-l']:
+                wc = True
+            else:
+                print 'invalid pipe', kwargs
+                sys.exit(1)
+        cmd = pipe_list[0][0]
+        args = pipe_list[0][1:]
+        result = None
+        if cmd == 'git':
+            result = self._HandleCommandGit(args)
+        elif cmd == './scripts/show-gnu-make':
+            return command.CommandResult(return_code=0, stdout='make')
+        elif cmd.endswith('nm'):
+            return self._HandleCommandNm(args)
+        elif cmd.endswith('objdump'):
+            return self._HandleCommandObjdump(args)
+        elif cmd.endswith( 'size'):
+            return self._HandleCommandSize(args)
+
+        if not result:
+            # Not handled, so abort
+            print 'unknown command', kwargs
+            sys.exit(1)
+
+        if wc:
+            result.stdout = len(result.stdout.splitlines())
+        return result
+
+    def _HandleMake(self, commit, brd, stage, cwd, *args, **kwargs):
+        """Handle execution of 'make'
+
+        Args:
+            commit: Commit object that is being built
+            brd: Board object that is being built
+            stage: Stage that we are at (mrproper, config, build)
+            cwd: Directory where make should be run
+            args: Arguments to pass to make
+            kwargs: Arguments to pass to command.RunPipe()
+        """
+        self._make_calls += 1
+        if stage == 'mrproper':
+            return command.CommandResult(return_code=0)
+        elif stage == 'config':
+            return command.CommandResult(return_code=0,
+                    combined='Test configuration complete')
+        elif stage == 'build':
+            stderr = ''
+            if type(commit) is not str:
+                stderr = self._error.get((brd.target, commit.sequence))
+            if stderr:
+                return command.CommandResult(return_code=1, stderr=stderr)
+            return command.CommandResult(return_code=0)
+
+        # Not handled, so abort
+        print 'make', stage
+        sys.exit(1)
+
+    # Example function to print output lines
+    def print_lines(self, lines):
+        print len(lines)
+        for line in lines:
+            print line
+        #self.print_lines(terminal.GetPrintTestLines())
+
+    def testNoBoards(self):
+        """Test that buildman aborts when there are no boards"""
+        self._boards = board.Boards()
+        with self.assertRaises(SystemExit):
+            self._RunControl()
+
+    def testCurrentSource(self):
+        """Very simple test to invoke buildman on the current source"""
+        self.setupToolchains();
+        self._RunControl()
+        lines = terminal.GetPrintTestLines()
+        self.assertIn('Building current source for %d boards' % len(boards),
+                      lines[0].text)
+
+    def testBadBranch(self):
+        """Test that we can detect an invalid branch"""
+        with self.assertRaises(ValueError):
+            self._RunControl('-b', 'badbranch')
+
+    def testBadToolchain(self):
+        """Test that missing toolchains are detected"""
+        self.setupToolchains();
+        ret_code = self._RunControl('-b', TEST_BRANCH)
+        lines = terminal.GetPrintTestLines()
+
+        # Buildman always builds the upstream commit as well
+        self.assertIn('Building %d commits for %d boards' %
+                (self._commits, len(boards)), lines[0].text)
+        self.assertEqual(self._builder.count, self._total_builds)
+
+        # Only sandbox should succeed, the others don't have toolchains
+        self.assertEqual(self._builder.fail,
+                         self._total_builds - self._commits)
+        self.assertEqual(ret_code, 128)
+
+        for commit in range(self._commits):
+            for board in self._boards.GetList():
+                if board.arch != 'sandbox':
+                  errfile = self._builder.GetErrFile(commit, board.target)
+                  fd = open(errfile)
+                  self.assertEqual(fd.readlines(),
+                          ['No tool chain for %s\n' % board.arch])
+                  fd.close()
+
+    def testBranch(self):
+        """Test building a branch with all toolchains present"""
+        self._RunControl('-b', TEST_BRANCH)
+        self.assertEqual(self._builder.count, self._total_builds)
+        self.assertEqual(self._builder.fail, 0)
+
+    def testCount(self):
+        """Test building a specific number of commitst"""
+        self._RunControl('-b', TEST_BRANCH, '-c2')
+        self.assertEqual(self._builder.count, 2 * len(boards))
+        self.assertEqual(self._builder.fail, 0)
+        # Each board has a mrproper, config, and then one make per commit
+        self.assertEqual(self._make_calls, len(boards) * (2 + 2))
+
+    def testIncremental(self):
+        """Test building a branch twice - the second time should do nothing"""
+        self._RunControl('-b', TEST_BRANCH)
+
+        # Each board has a mrproper, config, and then one make per commit
+        self.assertEqual(self._make_calls, len(boards) * (self._commits + 2))
+        self._make_calls = 0
+        self._RunControl('-b', TEST_BRANCH, clean_dir=False)
+        self.assertEqual(self._make_calls, 0)
+        self.assertEqual(self._builder.count, self._total_builds)
+        self.assertEqual(self._builder.fail, 0)
+
+    def testForceBuild(self):
+        """The -f flag should force a rebuild"""
+        self._RunControl('-b', TEST_BRANCH)
+        self._make_calls = 0
+        self._RunControl('-b', TEST_BRANCH, '-f', clean_dir=False)
+        # Each board has a mrproper, config, and then one make per commit
+        self.assertEqual(self._make_calls, len(boards) * (self._commits + 2))
+
+    def testForceReconfigure(self):
+        """The -f flag should force a rebuild"""
+        self._RunControl('-b', TEST_BRANCH, '-C')
+        # Each commit has a mrproper, config and make
+        self.assertEqual(self._make_calls, len(boards) * self._commits * 3)
+
+    def testErrors(self):
+        """Test handling of build errors"""
+        self._error['board2', 1] = 'fred\n'
+        self._RunControl('-b', TEST_BRANCH)
+        self.assertEqual(self._builder.count, self._total_builds)
+        self.assertEqual(self._builder.fail, 1)
+
+        # Remove the error. This should have no effect since the commit will
+        # not be rebuilt
+        del self._error['board2', 1]
+        self._make_calls = 0
+        self._RunControl('-b', TEST_BRANCH, clean_dir=False)
+        self.assertEqual(self._builder.count, self._total_builds)
+        self.assertEqual(self._make_calls, 0)
+        self.assertEqual(self._builder.fail, 1)
+
+        # Now use the -F flag to force rebuild of the bad commit
+        self._RunControl('-b', TEST_BRANCH, '-F', clean_dir=False)
+        self.assertEqual(self._builder.count, self._total_builds)
+        self.assertEqual(self._builder.fail, 0)
+        self.assertEqual(self._make_calls, 3)
+
+    def testBranchWithSlash(self):
+        """Test building a branch with a '/' in the name"""
+        self._test_branch = '/__dev/__testbranch'
+        self._RunControl('-b', self._test_branch, clean_dir=False)
+        self.assertEqual(self._builder.count, self._total_builds)
+        self.assertEqual(self._builder.fail, 0)
diff --git a/tools/buildman/kconfiglib.py b/tools/buildman/kconfiglib.py
new file mode 100644 (file)
index 0000000..31fd3c9
--- /dev/null
@@ -0,0 +1,3799 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+# Author: Ulf Magnusson
+#   https://github.com/ulfalizer/Kconfiglib
+
+# This is Kconfiglib, a Python library for scripting, debugging, and extracting
+# information from Kconfig-based configuration systems. To view the
+# documentation, run
+#
+#  $ pydoc kconfiglib
+#
+# or, if you prefer HTML,
+#
+#  $ pydoc -w kconfiglib
+#
+# The examples/ subdirectory contains examples, to be run with e.g.
+#
+#  $ make scriptconfig SCRIPT=Kconfiglib/examples/print_tree.py
+#
+# Look in testsuite.py for the test suite.
+
+"""
+Kconfiglib is a Python library for scripting and extracting information from
+Kconfig-based configuration systems. Features include the following:
+
+ - Symbol values and properties can be looked up and values assigned
+   programmatically.
+ - .config files can be read and written.
+ - Expressions can be evaluated in the context of a Kconfig configuration.
+ - Relations between symbols can be quickly determined, such as finding all
+   symbols that reference a particular symbol.
+ - Highly compatible with the scripts/kconfig/*conf utilities. The test suite
+   automatically compares outputs between Kconfiglib and the C implementation
+   for a large number of cases.
+
+For the Linux kernel, scripts are run using
+
+ $ make scriptconfig SCRIPT=<path to script> [SCRIPT_ARG=<arg>]
+
+Running scripts via the 'scriptconfig' target ensures that required environment
+variables (SRCARCH, ARCH, srctree, KERNELVERSION, etc.) are set up correctly.
+Alternative architectures can be specified like for other 'make *config'
+targets:
+
+ $ make scriptconfig ARCH=mips SCRIPT=<path to script> [SCRIPT_ARG=<arg>]
+
+The script will receive the name of the Kconfig file to load in sys.argv[1].
+(As of Linux 3.7.0-rc8 this is always "Kconfig" from the kernel top-level
+directory.) If an argument is provided with SCRIPT_ARG, it will appear in
+sys.argv[2].
+
+To get an interactive Python prompt with Kconfiglib preloaded and a Config
+object 'c' created, use
+
+ $ make iscriptconfig [ARCH=<architecture>]
+
+Kconfiglib requires Python 2. For (i)scriptconfig the command to run the Python
+interpreter can be passed in the environment variable PYTHONCMD (defaults to
+'python'; PyPy works too and is a bit faster).
+
+Look in the examples/ subdirectory for examples, which can be run with e.g.
+
+ $ make scriptconfig SCRIPT=Kconfiglib/examples/print_tree.py
+
+or
+
+ $ make scriptconfig SCRIPT=Kconfiglib/examples/help_grep.py SCRIPT_ARG="kernel"
+
+Look in testsuite.py for the test suite.
+
+Credits: Written by Ulf "Ulfalizer" Magnusson
+
+Send bug reports, suggestions and other feedback to kconfiglib@gmail.com .
+Don't wrestle with internal APIs. Tell me what you need and I might add it in a
+safe way as a client API instead."""
+
+# If you have Psyco installed (32-bit installations, Python <= 2.6 only),
+# setting this to True (right here, not at runtime) might give a nice speedup.
+# (22% faster for parsing arch/x86/Kconfig and 58% faster for evaluating all
+# symbols in it without a .config on my Core Duo.)
+use_psyco = False
+
+import os
+import re
+import string
+import sys
+
+class Config():
+
+    """Represents a Kconfig configuration, e.g. for i386 or ARM. This is the
+    set of symbols and other items appearing in the configuration together with
+    their values. Creating any number of Config objects -- including for
+    different architectures -- is safe; Kconfiglib has no global state."""
+
+    #
+    # Public interface
+    #
+
+    def __init__(self,
+                 filename = "Kconfig",
+                 base_dir = "$srctree",
+                 print_warnings = True,
+                 print_undef_assign = False):
+        """Creates a new Config object, representing a Kconfig configuration.
+        Raises Kconfig_Syntax_Error on syntax errors.
+
+        filename (default: "Kconfig") -- The base Kconfig file of the
+                 configuration. For the Linux kernel, this should usually be be
+                 "Kconfig" from the top-level directory, as environment
+                 variables will make sure the right Kconfig is included from
+                 there (usually arch/<architecture>/Kconfig). If you are using
+                 kconfiglib via 'make scriptconfig' the filename of the
+                 correct Kconfig will be in sys.argv[1].
+
+        base_dir (default: "$srctree") -- The base directory relative to which
+                'source' statements within Kconfig files will work. For the
+                Linux kernel this should be the top-level directory of the
+                kernel tree. $-references to environment variables will be
+                expanded.
+
+                The environment variable 'srctree' is set by the Linux makefiles
+                to the top-level kernel directory. A default of "." would not
+                work if an alternative build directory is used.
+
+        print_warnings (default: True) -- Set to True if warnings related to
+                       this configuration should be printed to stderr. This can
+                       be changed later with Config.set_print_warnings(). It is
+                       provided as a constructor argument since warnings might
+                       be generated during parsing.
+
+        print_undef_assign (default: False) -- Set to True if informational
+                           messages related to assignments to undefined symbols
+                           should be printed to stderr for this configuration.
+                           Can be changed later with
+                           Config.set_print_undef_assign()."""
+
+        # The set of all symbols, indexed by name (a string)
+        self.syms = {}
+
+        # The set of all defined symbols in the configuration in the order they
+        # appear in the Kconfig files. This excludes the special symbols n, m,
+        # and y as well as symbols that are referenced but never defined.
+        self.kconfig_syms = []
+
+        # The set of all named choices (yes, choices can have names), indexed
+        # by name (a string)
+        self.named_choices = {}
+
+        def register_special_symbol(type, name, value):
+            sym = Symbol()
+            sym.is_special_ = True
+            sym.is_defined_ = True
+            sym.config = self
+            sym.name = name
+            sym.type = type
+            sym.cached_value = value
+            self.syms[name] = sym
+            return sym
+
+        # The special symbols n, m and y, used as shorthand for "n", "m" and
+        # "y"
+        self.n = register_special_symbol(TRISTATE, "n", "n")
+        self.m = register_special_symbol(TRISTATE, "m", "m")
+        self.y = register_special_symbol(TRISTATE, "y", "y")
+
+        # DEFCONFIG_LIST uses this
+        register_special_symbol(STRING, "UNAME_RELEASE", os.uname()[2])
+
+        # The symbol with "option defconfig_list" set, containing a list of
+        # default .config files
+        self.defconfig_sym = None
+
+        # See Symbol.get_(src)arch()
+        self.arch    = os.environ.get("ARCH")
+        self.srcarch = os.environ.get("SRCARCH")
+
+        # See Config.__init__(). We need this for get_defconfig_filename().
+        self.srctree = os.environ.get("srctree")
+        if self.srctree is None:
+            self.srctree = "."
+
+        self.filename = filename
+        self.base_dir = _strip_trailing_slash(os.path.expandvars(base_dir))
+
+        # The 'mainmenu' text
+        self.mainmenu_text = None
+
+        # The filename of the most recently loaded .config file
+        self.config_filename = None
+
+        # The textual header of the most recently loaded .config, uncommented
+        self.config_header = None
+
+        self.print_warnings = print_warnings
+        self.print_undef_assign = print_undef_assign
+
+        # Lists containing all choices, menus and comments in the configuration
+
+        self.choices = []
+        self.menus = []
+        self.comments = []
+
+        # For parsing routines that stop when finding a line belonging to a
+        # different construct, these holds that line and the tokenized version
+        # of that line. The purpose is to avoid having to re-tokenize the line,
+        # which is inefficient and causes problems when recording references to
+        # symbols.
+        self.end_line = None
+        self.end_line_tokens = None
+
+        # See the comment in _parse_expr().
+        self.parse_expr_cur_sym_or_choice = None
+        self.parse_expr_line = None
+        self.parse_expr_filename = None
+        self.parse_expr_linenr = None
+        self.parse_expr_transform_m = None
+
+        # Parse the Kconfig files
+        self.top_block = self._parse_file(filename, None, None, None)
+
+        # Build Symbol.dep for all symbols
+        self._build_dep()
+
+    def load_config(self, filename, replace = True):
+        """Loads symbol values from a file in the familiar .config format.
+           Equivalent to calling Symbol.set_user_value() to set each of the
+           values.
+
+           filename -- The .config file to load. $-references to environment
+                       variables will be expanded. For scripts to work even
+                       when an alternative build directory is used with the
+                       Linux kernel, you need to refer to the top-level kernel
+                       directory with "$srctree".
+
+           replace (default: True) -- True if the configuration should replace
+                   the old configuration; False if it should add to it."""
+
+        def warn_override(filename, linenr, name, old_user_val, new_user_val):
+            self._warn("overriding the value of {0}. "
+                       'Old value: "{1}", new value: "{2}".'
+                        .format(name, old_user_val, new_user_val),
+                       filename,
+                       linenr)
+
+        filename = os.path.expandvars(filename)
+
+        # Put this first so that a missing file doesn't screw up our state
+        line_feeder = _FileFeed(_get_lines(filename), filename)
+
+        self.config_filename = filename
+
+        # Invalidate everything. This is usually faster than finding the
+        # minimal set of symbols that needs to be invalidated, as nearly all
+        # symbols will tend to be affected anyway.
+        if replace:
+            self.unset_user_values()
+        else:
+            self._invalidate_all()
+
+        # Read header
+
+        self.config_header = None
+
+        def is_header_line(line):
+            return line.startswith("#") and \
+                   not unset_re.match(line)
+
+        first_line = line_feeder.get_next()
+
+        if first_line is None:
+            return
+
+        if not is_header_line(first_line):
+            line_feeder.go_back()
+        else:
+            self.config_header = first_line[1:]
+
+            # Read remaining header lines
+            while 1:
+                line = line_feeder.get_next()
+
+                if line is None:
+                    break
+
+                if not is_header_line(line):
+                    line_feeder.go_back()
+                    break
+
+                self.config_header += line[1:]
+
+            # Remove trailing newline
+            if self.config_header.endswith("\n"):
+                self.config_header = self.config_header[:-1]
+
+        # Read assignments
+
+        filename = line_feeder.get_filename()
+
+        while 1:
+            line = line_feeder.get_next()
+            if line is None:
+                return
+
+            linenr = line_feeder.get_linenr()
+
+            line = line.strip()
+
+            set_re_match = set_re.match(line)
+            if set_re_match:
+                name, val = set_re_match.groups()
+                # The unescaping producedure below should be safe since " can
+                # only appear as \" inside the string
+                val = _strip_quotes(val, line, filename, linenr)\
+                      .replace('\\"', '"').replace("\\\\", "\\")
+                if name in self.syms:
+                    sym = self.syms[name]
+
+                    old_user_val = sym.user_val
+                    if old_user_val is not None:
+                        warn_override(filename, linenr, name, old_user_val, val)
+
+                    if sym.is_choice_symbol_:
+                        user_mode = sym.parent.user_mode
+                        if user_mode is not None and user_mode != val:
+                            self._warn("assignment to {0} changes mode of containing "
+                                       'choice from "{1}" to "{2}".'
+                                       .format(name, val, user_mode),
+                                       filename,
+                                       linenr)
+
+                    sym._set_user_value_no_invalidate(val, True)
+
+                else:
+                    self._undef_assign('attempt to assign the value "{0}" to the '
+                                       "undefined symbol {1}."
+                                       .format(val, name),
+                                       filename,
+                                       linenr)
+
+            else:
+                unset_re_match = unset_re.match(line)
+                if unset_re_match:
+                    name = unset_re_match.group(1)
+                    if name in self.syms:
+                        sym = self.syms[name]
+
+                        old_user_val = sym.user_val
+                        if old_user_val is not None:
+                            warn_override(filename, linenr, name, old_user_val, "n")
+
+                        sym._set_user_value_no_invalidate("n", True)
+
+    def write_config(self, filename, header = None):
+        """Writes out symbol values in the familiar .config format.
+
+           filename -- The filename under which to save the configuration.
+
+           header (default: None) -- A textual header that will appear at the
+                  beginning of the file, with each line commented out
+                  automatically. None means no header."""
+
+        # already_written is set when _make_conf() is called on a symbol, so
+        # that symbols defined in multiple locations only get one entry in the
+        # .config. We need to reset it prior to writing out a new .config.
+        for sym in self.syms.itervalues():
+            sym.already_written = False
+
+        with open(filename, "w") as f:
+            # Write header
+            if header is not None:
+                f.write(_comment(header))
+                f.write("\n")
+
+            # Write configuration.
+            # (You'd think passing a list around to all the nodes and appending
+            # to it to avoid copying would be faster, but it's actually a lot
+            # slower with PyPy, and about as fast with Python. Passing the file
+            # around is slower too.)
+            f.write("\n".join(self.top_block._make_conf()))
+            f.write("\n")
+
+    def get_kconfig_filename(self):
+        """Returns the name of the (base) kconfig file this configuration was
+        loaded from."""
+        return self.filename
+
+    def get_arch(self):
+        """Returns the value the environment variable ARCH had at the time the
+        Config instance was created, or None if ARCH was not set. For the
+        kernel, this corresponds to the architecture being built for, with
+        values such as "i386" or "mips"."""
+        return self.arch
+
+    def get_srcarch(self):
+        """Returns the value the environment variable SRCARCH had at the time
+        the Config instance was created, or None if SRCARCH was not set. For
+        the kernel, this corresponds to the arch/ subdirectory containing
+        architecture-specific source code."""
+        return self.srcarch
+
+    def get_srctree(self):
+        """Returns the value the environment variable srctree had at the time
+        the Config instance was created, or None if srctree was not defined.
+        This variable points to the source directory and is used when building
+        in a separate directory."""
+        return self.srctree
+
+    def get_config_filename(self):
+        """Returns the name of the most recently loaded configuration file, or
+        None if no configuration has been loaded."""
+        return self.config_filename
+
+    def get_mainmenu_text(self):
+        """Returns the text of the 'mainmenu' statement (with $-references to
+        symbols replaced by symbol values), or None if the configuration has no
+        'mainmenu' statement."""
+        return None if self.mainmenu_text is None else \
+          self._expand_sym_refs(self.mainmenu_text)
+
+    def get_defconfig_filename(self):
+        """Returns the name of the defconfig file, which is the first existing
+        file in the list given in a symbol having 'option defconfig_list' set.
+        $-references to symbols will be expanded ("$FOO bar" -> "foo bar" if
+        FOO has the value "foo"). Returns None in case of no defconfig file.
+        Setting 'option defconfig_list' on multiple symbols currently results
+        in undefined behavior.
+
+        If the environment variable 'srctree' was set when the Config was
+        created, get_defconfig_filename() will first look relative to that
+        directory before looking in the current directory; see
+        Config.__init__()."""
+
+        if self.defconfig_sym is None:
+            return None
+
+        for (filename, cond_expr) in self.defconfig_sym.def_exprs:
+            if self._eval_expr(cond_expr) == "y":
+                filename = self._expand_sym_refs(filename)
+
+                # We first look in $srctree. os.path.join() won't work here as
+                # an absolute path in filename would override $srctree.
+                srctree_filename = os.path.normpath(self.srctree + "/" + filename)
+                if os.path.exists(srctree_filename):
+                    return srctree_filename
+
+                if os.path.exists(filename):
+                    return filename
+
+        return None
+
+    def get_symbol(self, name):
+        """Returns the symbol with name 'name', or None if no such symbol
+        appears in the configuration. An alternative shorthand is conf[name],
+        where conf is a Config instance, though that will instead raise
+        KeyError if the symbol does not exist."""
+        return self.syms.get(name)
+
+    def get_top_level_items(self):
+        """Returns a list containing the items (symbols, menus, choice
+        statements and comments) at the top level of the configuration -- that
+        is, all items that do not appear within a menu or choice. The items
+        appear in the same order as within the configuration."""
+        return self.top_block.get_items()
+
+    def get_symbols(self, all_symbols = True):
+        """Returns a list of symbols from the configuration. An alternative for
+        iterating over all defined symbols (in the order of definition) is
+
+        for sym in config:
+            ...
+
+        which relies on Config implementing __iter__() and is equivalent to
+
+        for sym in config.get_symbols(False):
+            ...
+
+        all_symbols (default: True) -- If True, all symbols - including special
+                    and undefined symbols - will be included in the result, in
+                    an undefined order. If False, only symbols actually defined
+                    and not merely referred to in the configuration will be
+                    included in the result, and will appear in the order that
+                    they are defined within the Kconfig configuration files."""
+        return self.syms.values() if all_symbols else self.kconfig_syms
+
+    def get_choices(self):
+        """Returns a list containing all choice statements in the
+        configuration, in the order they appear in the Kconfig files."""
+        return self.choices
+
+    def get_menus(self):
+        """Returns a list containing all menus in the configuration, in the
+        order they appear in the Kconfig files."""
+        return self.menus
+
+    def get_comments(self):
+        """Returns a list containing all comments in the configuration, in the
+        order they appear in the Kconfig files."""
+        return self.comments
+
+    def eval(self, s):
+        """Returns the value of the expression 's' -- where 's' is represented
+        as a string -- in the context of the configuration. Raises
+        Kconfig_Syntax_Error if syntax errors are detected in 's'.
+
+        For example, if FOO and BAR are tristate symbols at least one of which
+        has the value "y", then config.eval("y && (FOO || BAR)") => "y"
+
+        This functions always yields a tristate value. To get the value of
+        non-bool, non-tristate symbols, use Symbol.get_value().
+
+        The result of this function is consistent with how evaluation works for
+        conditional expressions in the configuration as well as in the C
+        implementation. "m" and m are rewritten as '"m" && MODULES' and 'm &&
+        MODULES', respectively, and a result of "m" will get promoted to "y" if
+        we're running without modules."""
+        return self._eval_expr(self._parse_expr(self._tokenize(s, True), # Feed
+                                                None, # Current symbol or choice
+                                                s))   # line
+
+    def get_config_header(self):
+        """Returns the (uncommented) textual header of the .config file most
+        recently loaded with load_config(). Returns None if no .config file has
+        been loaded or if the most recently loaded .config file has no header.
+        The header comprises all lines up to but not including the first line
+        that either
+
+        1. Does not start with "#"
+        2. Has the form "# CONFIG_FOO is not set."
+        """
+        return self.config_header
+
+    def get_base_dir(self):
+        """Returns the base directory relative to which 'source' statements
+        will work, passed as an argument to Config.__init__()."""
+        return self.base_dir
+
+    def set_print_warnings(self, print_warnings):
+        """Determines whether warnings related to this configuration (for
+        things like attempting to assign illegal values to symbols with
+        Symbol.set_user_value()) should be printed to stderr.
+
+        print_warnings -- True if warnings should be
+                          printed, otherwise False."""
+        self.print_warnings = print_warnings
+
+    def set_print_undef_assign(self, print_undef_assign):
+        """Determines whether informational messages related to assignments to
+        undefined symbols should be printed to stderr for this configuration.
+
+        print_undef_assign -- If True, such messages will be printed."""
+        self.print_undef_assign = print_undef_assign
+
+    def __getitem__(self, key):
+        """Returns the symbol with name 'name'. Raises KeyError if the symbol
+        does not appear in the configuration."""
+        return self.syms[key]
+
+    def __iter__(self):
+        """Convenience function for iterating over the set of all defined
+        symbols in the configuration, used like
+
+        for sym in conf:
+            ...
+
+        The iteration happens in the order of definition within the Kconfig
+        configuration files. Symbols only referred to but not defined will not
+        be included, nor will the special symbols n, m, and y. If you want to
+        include such symbols as well, see config.get_symbols()."""
+        return iter(self.kconfig_syms)
+
+    def unset_user_values(self):
+        """Resets the values of all symbols, as if Config.load_config() or
+        Symbol.set_user_value() had never been called."""
+        for sym in self.syms.itervalues():
+            sym._unset_user_value_no_recursive_invalidate()
+
+    def __str__(self):
+        """Returns a string containing various information about the Config."""
+        return _sep_lines("Configuration",
+                          "File                                   : " + self.filename,
+                          "Base directory                         : " + self.base_dir,
+                          "Value of $ARCH at creation time        : " +
+                            ("(not set)" if self.arch is None else self.arch),
+                          "Value of $SRCARCH at creation time     : " +
+                            ("(not set)" if self.srcarch is None else self.srcarch),
+                          "Source tree (derived from $srctree;",
+                          "defaults to '.' if $srctree isn't set) : " + self.srctree,
+                          "Most recently loaded .config           : " +
+                            ("(no .config loaded)" if self.config_filename is None else
+                             self.config_filename),
+                          "Print warnings                         : " +
+                            bool_str[self.print_warnings],
+                          "Print assignments to undefined symbols : " +
+                            bool_str[self.print_undef_assign])
+
+
+    #
+    # Private methods
+    #
+
+    def _invalidate_all(self):
+        for sym in self.syms.itervalues():
+            sym._invalidate()
+
+    def _tokenize(self,
+                  s,
+                  for_eval = False,
+                  filename = None,
+                  linenr = None):
+        """Returns a _Feed instance containing tokens derived from the string
+        's'. Registers any new symbols encountered (via _sym_lookup()).
+
+        (I experimented with a pure regular expression implementation, but it
+        came out slower, less readable, and wouldn't have been as flexible.)
+
+        for_eval -- True when parsing an expression for a call to
+                    Config.eval(), in which case we should not treat the first
+                    token specially nor register new symbols."""
+        s = s.lstrip()
+        if s == "" or s[0] == "#":
+            return _Feed([])
+
+        if for_eval:
+            i = 0 # The current index in the string being tokenized
+            previous = None # The previous token seen
+            tokens = []
+        else:
+            # The initial word on a line is parsed specially. Let
+            # command_chars = [A-Za-z0-9_]. Then
+            #  - leading non-command_chars characters on the line are ignored, and
+            #  - the first token consists the following one or more command_chars
+            #    characters.
+            # This is why things like "----help--" are accepted.
+
+            initial_token_match = initial_token_re.match(s)
+            if initial_token_match is None:
+                return _Feed([])
+            # The current index in the string being tokenized
+            i = initial_token_match.end()
+
+            keyword = keywords.get(initial_token_match.group(1))
+            if keyword is None:
+                # We expect a keyword as the first token
+                _tokenization_error(s, len(s), filename, linenr)
+            if keyword == T_HELP:
+                # Avoid junk after "help", e.g. "---", being registered as a
+                # symbol
+                return _Feed([T_HELP])
+            tokens = [keyword]
+            previous = keyword
+
+        # _tokenize() is a hotspot during parsing, and this speeds things up a
+        # bit
+        strlen = len(s)
+        append = tokens.append
+
+        # Main tokenization loop. (Handles tokens past the first one.)
+        while i < strlen:
+            # Test for an identifier/keyword preceded by whitespace first; this
+            # is the most common case.
+            id_keyword_match = id_keyword_re.match(s, i)
+            if id_keyword_match:
+                # We have an identifier or keyword. The above also stripped any
+                # whitespace for us.
+                name = id_keyword_match.group(1)
+                # Jump past it
+                i = id_keyword_match.end()
+
+                # Keyword?
+                keyword = keywords.get(name)
+                if keyword is not None:
+                    append(keyword)
+                # What would ordinarily be considered a name is treated as a
+                # string after certain tokens.
+                elif previous in string_lex:
+                    append(name)
+                else:
+                    # We're dealing with a symbol. _sym_lookup() will take care
+                    # of allocating a new Symbol instance if it's the first
+                    # time we see it.
+                    sym = self._sym_lookup(name, not for_eval)
+
+                    if previous == T_CONFIG or previous == T_MENUCONFIG:
+                        # If the previous token is T_(MENU)CONFIG
+                        # ("(menu)config"), we're tokenizing the first line of
+                        # a symbol definition, and should remember this as a
+                        # location where the symbol is defined.
+                        sym.def_locations.append((filename, linenr))
+                    else:
+                        # Otherwise, it's a reference to the symbol
+                        sym.ref_locations.append((filename, linenr))
+
+                    append(sym)
+
+            else:
+                # This restrips whitespace that could have been stripped in the
+                # regex above, but it's worth it since identifiers/keywords are
+                # more common
+                s = s[i:].lstrip()
+                if s == "":
+                    break
+                strlen = len(s)
+                i = 0
+                c = s[0]
+
+                # String literal (constant symbol)
+                if c == '"' or c == "'":
+                    i += 1
+
+                    if "\\" in s:
+                        # Slow path: This could probably be sped up, but it's a
+                        # very unusual case anyway.
+                        quote = c
+                        value = ""
+                        while 1:
+                            if i >= strlen:
+                                _tokenization_error(s, strlen, filename,
+                                                    linenr)
+                            c = s[i]
+                            if c == quote:
+                                break
+                            if c == "\\":
+                                if i + 1 >= strlen:
+                                    _tokenization_error(s, strlen, filename,
+                                                        linenr)
+                                value += s[i + 1]
+                                i += 2
+                            else:
+                                value += c
+                                i += 1
+                        i += 1
+                        append(value)
+                    else:
+                        # Fast path: If the string contains no backslashes (almost
+                        # always) we can simply look for the matching quote.
+                        end = s.find(c, i)
+                        if end == -1:
+                            _tokenization_error(s, strlen, filename, linenr)
+                        append(s[i:end])
+                        i = end + 1
+
+                elif c == "&":
+                    if i + 1 >= strlen:
+                        # Invalid characters are ignored
+                        continue
+                    if s[i + 1] != "&":
+                        # Invalid characters are ignored
+                        i += 1
+                        continue
+                    append(T_AND)
+                    i += 2
+
+                elif c == "|":
+                    if i + 1 >= strlen:
+                        # Invalid characters are ignored
+                        continue
+                    if s[i + 1] != "|":
+                        # Invalid characters are ignored
+                        i += 1
+                        continue
+                    append(T_OR)
+                    i += 2
+
+                elif c == "!":
+                    if i + 1 >= strlen:
+                        _tokenization_error(s, strlen, filename, linenr)
+                    if s[i + 1] == "=":
+                        append(T_UNEQUAL)
+                        i += 2
+                    else:
+                        append(T_NOT)
+                        i += 1
+
+                elif c == "=":
+                    append(T_EQUAL)
+                    i += 1
+
+                elif c == "(":
+                    append(T_OPEN_PAREN)
+                    i += 1
+
+                elif c == ")":
+                    append(T_CLOSE_PAREN)
+                    i += 1
+
+                elif c == "#":
+                    break
+
+                else:
+                    # Invalid characters are ignored
+                    i += 1
+                    continue
+
+            previous = tokens[-1]
+
+        return _Feed(tokens)
+
+    #
+    # Parsing
+    #
+
+    # Expression grammar:
+    #
+    # <expr> -> <symbol>
+    #           <symbol> '=' <symbol>
+    #           <symbol> '!=' <symbol>
+    #           '(' <expr> ')'
+    #           '!' <expr>
+    #           <expr> '&&' <expr>
+    #           <expr> '||' <expr>
+
+    def _parse_expr(self,
+                    feed,
+                    cur_sym_or_choice,
+                    line,
+                    filename = None,
+                    linenr = None,
+                    transform_m = True):
+        """Parse an expression from the tokens in 'feed' using a simple
+        top-down approach. The result has the form (<operator>, <list
+        containing parsed operands>).
+
+        feed -- _Feed instance containing the tokens for the expression.
+
+        cur_sym_or_choice -- The symbol or choice currently being parsed, or
+                             None if we're not parsing a symbol or choice.
+                             Used for recording references to symbols.
+
+        line -- The line containing the expression being parsed.
+
+        filename (default: None) -- The file containing the expression.
+
+        linenr (default: None) -- The line number containing the expression.
+
+        transform_m (default: False) -- Determines if 'm' should be rewritten to
+                                        'm && MODULES' -- see
+                                        parse_val_and_cond()."""
+
+        # Use instance variables to avoid having to pass these as arguments
+        # through the top-down parser in _parse_expr_2(), which is tedious and
+        # obfuscates the code. A profiler run shows no noticeable performance
+        # difference.
+        self.parse_expr_cur_sym_or_choice = cur_sym_or_choice
+        self.parse_expr_line = line
+        self.parse_expr_filename = filename
+        self.parse_expr_linenr = linenr
+        self.parse_expr_transform_m = transform_m
+
+        return self._parse_expr_2(feed)
+
+    def _parse_expr_2(self, feed):
+        or_terms = [self._parse_or_term(feed)]
+        # Keep parsing additional terms while the lookahead is '||'
+        while feed.check(T_OR):
+            or_terms.append(self._parse_or_term(feed))
+
+        return or_terms[0] if len(or_terms) == 1 else (OR, or_terms)
+
+    def _parse_or_term(self, feed):
+        and_terms = [self._parse_factor(feed)]
+        # Keep parsing additional terms while the lookahead is '&&'
+        while feed.check(T_AND):
+            and_terms.append(self._parse_factor(feed))
+
+        return and_terms[0] if len(and_terms) == 1 else (AND, and_terms)
+
+    def _parse_factor(self, feed):
+        if feed.check(T_OPEN_PAREN):
+            expr_parse = self._parse_expr_2(feed)
+
+            if not feed.check(T_CLOSE_PAREN):
+                _parse_error(self.parse_expr_line,
+                             "missing end parenthesis.",
+                             self.parse_expr_filename,
+                             self.parse_expr_linenr)
+
+            return expr_parse
+
+        if feed.check(T_NOT):
+            return (NOT, self._parse_factor(feed))
+
+        sym_or_string = feed.get_next()
+
+        if not isinstance(sym_or_string, (Symbol, str)):
+            _parse_error(self.parse_expr_line,
+                         "malformed expression.",
+                         self.parse_expr_filename,
+                         self.parse_expr_linenr)
+
+        if self.parse_expr_cur_sym_or_choice is not None and \
+           isinstance(sym_or_string, Symbol):
+            self.parse_expr_cur_sym_or_choice.referenced_syms.add(sym_or_string)
+
+        next_token = feed.peek_next()
+
+        # For conditional expressions ('depends on <expr>', '... if <expr>',
+        # etc.), "m" and m are rewritten to "m" && MODULES.
+        if next_token != T_EQUAL and next_token != T_UNEQUAL:
+            if self.parse_expr_transform_m and (sym_or_string is self.m or
+                                                sym_or_string == "m"):
+                return (AND, ["m", self._sym_lookup("MODULES")])
+            return sym_or_string
+
+        relation = EQUAL if (feed.get_next() == T_EQUAL) else UNEQUAL
+        sym_or_string_2 = feed.get_next()
+
+        if self.parse_expr_cur_sym_or_choice is not None and \
+           isinstance(sym_or_string_2, Symbol):
+            self.parse_expr_cur_sym_or_choice.referenced_syms.add(sym_or_string_2)
+
+        if sym_or_string is self.m:
+            sym_or_string = "m"
+
+        if sym_or_string_2 is self.m:
+            sym_or_string_2 = "m"
+
+        return (relation, sym_or_string, sym_or_string_2)
+
+    def _parse_file(self, filename, parent, deps, visible_if_deps, res = None):
+        """Parse the Kconfig file 'filename'. The result is a _Block with all
+        items from the file. See _parse_block() for the meaning of the
+        parameters."""
+        line_feeder = _FileFeed(_get_lines(filename), filename)
+        return self._parse_block(line_feeder, None, parent, deps, visible_if_deps, res)
+
+    def _parse_block(self, line_feeder, end_marker, parent, deps,
+                     visible_if_deps = None, res = None):
+        """Parses a block, which is the contents of either a file or an if,
+        menu, or choice statement. The result is a _Block with the items from
+        the block.
+
+        end_marker -- The token that ends the block, e.g. T_ENDIF ("endif") for
+                      if's. None for files.
+
+        parent -- The enclosing menu, choice or if, or None if we're at the top
+                  level.
+
+        deps -- Dependencies from enclosing menus, choices and if's.
+
+        visible_if_deps (default: None) -- 'visible if' dependencies from
+                        enclosing menus.
+
+        res (default: None) -- The _Block to add items to. If None, a new
+                               _Block is created to hold the items."""
+
+        block = _Block() if res is None else res
+
+        filename = line_feeder.get_filename()
+
+        while 1:
+
+            # Do we already have a tokenized line that we determined wasn't
+            # part of whatever we were parsing earlier? See comment in
+            # Config.__init__().
+            if self.end_line is not None:
+                assert self.end_line_tokens is not None
+                tokens = self.end_line_tokens
+                tokens.go_to_start()
+
+                line = self.end_line
+                linenr = line_feeder.get_linenr()
+
+                self.end_line = None
+                self.end_line_tokens = None
+
+            else:
+                line = line_feeder.get_next()
+                if line is None:
+                    if end_marker is not None:
+                        raise Kconfig_Syntax_Error, (
+                                "Unexpected end of file {0}."
+                                .format(line_feeder.get_filename()))
+                    return block
+
+                linenr = line_feeder.get_linenr()
+
+                tokens = self._tokenize(line, False, filename, linenr)
+
+            if tokens.is_empty():
+                continue
+
+            t0 = tokens.get_next()
+
+            # Have we reached the end of the block?
+            if t0 == end_marker:
+                return block
+
+            if t0 == T_CONFIG or t0 == T_MENUCONFIG:
+                # The tokenizer will automatically allocate a new Symbol object
+                # for any new names it encounters, so we don't need to worry
+                # about that here.
+                sym = tokens.get_next()
+
+                # Symbols defined in multiple places get the parent of their
+                # first definition. However, for symbols whose parents are choice
+                # statements, the choice statement takes precedence.
+                if not sym.is_defined_ or isinstance(parent, Choice):
+                    sym.parent = parent
+
+                sym.is_defined_ = True
+
+                self.kconfig_syms.append(sym)
+                block.add_item(sym)
+
+                self._parse_properties(line_feeder, sym, deps, visible_if_deps)
+
+            elif t0 == T_MENU:
+                menu = Menu()
+                self.menus.append(menu)
+                menu.config = self
+                menu.parent = parent
+                menu.title = tokens.get_next()
+
+                menu.filename = filename
+                menu.linenr = linenr
+
+                # Parse properties and contents
+                self._parse_properties(line_feeder, menu, deps, visible_if_deps)
+                menu.block = self._parse_block(line_feeder,
+                                               T_ENDMENU,
+                                               menu,
+                                               menu.dep_expr,
+                                               _make_and(visible_if_deps,
+                                                         menu.visible_if_expr))
+
+                block.add_item(menu)
+
+            elif t0 == T_IF:
+                # If statements are treated as syntactic sugar for adding
+                # dependencies to enclosed items and do not have an explicit
+                # object representation.
+
+                dep_expr = self._parse_expr(tokens, None, line, filename, linenr)
+                self._parse_block(line_feeder,
+                                  T_ENDIF,
+                                  parent,
+                                  _make_and(dep_expr, deps),
+                                  visible_if_deps,
+                                  block) # Add items to the same block
+
+            elif t0 == T_CHOICE:
+                # We support named choices
+                already_defined = False
+                name = None
+                if len(tokens) > 1 and isinstance(tokens[1], str):
+                    name = tokens[1]
+                    already_defined = name in self.named_choices
+
+                if already_defined:
+                    choice = self.named_choices[name]
+                else:
+                    choice = Choice()
+                    self.choices.append(choice)
+                    if name is not None:
+                        choice.name = name
+                        self.named_choices[name] = choice
+
+                choice.config = self
+                choice.parent = parent
+
+                choice.def_locations.append((filename, linenr))
+
+                # Parse properties and contents
+                self._parse_properties(line_feeder, choice, deps, visible_if_deps)
+                choice.block = self._parse_block(line_feeder,
+                                                 T_ENDCHOICE,
+                                                 choice,
+                                                 None,
+                                                 visible_if_deps)
+
+                choice._determine_actual_symbols()
+
+                # If no type is set for the choice, its type is that of the first
+                # choice item
+                if choice.type == UNKNOWN:
+                    for item in choice.get_symbols():
+                        if item.type != UNKNOWN:
+                            choice.type = item.type
+                            break
+
+                # Each choice item of UNKNOWN type gets the type of the choice
+                for item in choice.get_symbols():
+                    if item.type == UNKNOWN:
+                        item.type = choice.type
+
+                # For named choices defined in multiple locations, only record
+                # at the first definition
+                if not already_defined:
+                    block.add_item(choice)
+
+            elif t0 == T_COMMENT:
+                comment = Comment()
+                comment.config = self
+                comment.parent = parent
+
+                comment.filename = filename
+                comment.linenr = linenr
+
+                comment.text = tokens.get_next()
+                self._parse_properties(line_feeder, comment, deps, visible_if_deps)
+
+                block.add_item(comment)
+                self.comments.append(comment)
+
+            elif t0 == T_SOURCE:
+                kconfig_file = tokens.get_next()
+                exp_kconfig_file = self._expand_sym_refs(kconfig_file)
+                f = os.path.join(self.base_dir, exp_kconfig_file)
+
+                if not os.path.exists(f):
+                    raise IOError, ('{0}:{1}: sourced file "{2}" (expands to\n'
+                                    '"{3}") not found. Perhaps base_dir\n'
+                                    '(argument to Config.__init__(), currently\n'
+                                    '"{4}") is set to the wrong value.'
+                                    .format(filename,
+                                            linenr,
+                                            kconfig_file,
+                                            exp_kconfig_file,
+                                            self.base_dir))
+
+                # Add items to the same block
+                self._parse_file(f, parent, deps, visible_if_deps, block)
+
+            elif t0 == T_MAINMENU:
+                text = tokens.get_next()
+
+                if self.mainmenu_text is not None:
+                    self._warn("overriding 'mainmenu' text. "
+                               'Old value: "{0}", new value: "{1}".'
+                                .format(self.mainmenu_text, text),
+                               filename,
+                               linenr)
+
+                self.mainmenu_text = text
+
+            else:
+                _parse_error(line, "unrecognized construct.", filename, linenr)
+
+    def _parse_properties(self, line_feeder, stmt, deps, visible_if_deps):
+        """Parsing of properties for symbols, menus, choices, and comments."""
+
+        def parse_val_and_cond(tokens, line, filename, linenr):
+            """Parses '<expr1> if <expr2>' constructs, where the 'if' part is
+            optional. Returns a tuple containing the parsed expressions, with
+            None as the second element if the 'if' part is missing."""
+            val = self._parse_expr(tokens, stmt, line, filename, linenr, False)
+
+            if tokens.check(T_IF):
+                return (val, self._parse_expr(tokens, stmt, line, filename, linenr))
+
+            return (val, None)
+
+        # In case the symbol is defined in multiple locations, we need to
+        # remember what prompts, defaults, and selects are new for this
+        # definition, as "depends on" should only apply to the local
+        # definition.
+        new_prompt = None
+        new_def_exprs = []
+        new_selects = []
+
+        # Dependencies from 'depends on' statements
+        depends_on_expr = None
+
+        while 1:
+            line = line_feeder.get_next()
+            if line is None:
+                break
+
+            filename = line_feeder.get_filename()
+            linenr = line_feeder.get_linenr()
+
+            tokens = self._tokenize(line, False, filename, linenr)
+
+            if tokens.is_empty():
+                continue
+
+            t0 = tokens.get_next()
+
+            if t0 == T_HELP:
+                # Find first non-empty line and get its indentation
+
+                line_feeder.remove_while(str.isspace)
+                line = line_feeder.get_next()
+
+                if line is None:
+                    stmt.help = ""
+                    break
+
+                indent = _indentation(line)
+
+                # If the first non-empty lines has zero indent, there is no
+                # help text
+                if indent == 0:
+                    stmt.help = ""
+                    line_feeder.go_back()
+                    break
+
+                help_lines = [_deindent(line, indent)]
+
+                # The help text goes on till the first non-empty line with less
+                # indent
+                while 1:
+                    line = line_feeder.get_next()
+                    if (line is None) or \
+                       (not line.isspace() and _indentation(line) < indent):
+                        stmt.help = "".join(help_lines)
+                        break
+
+                    help_lines.append(_deindent(line, indent))
+
+                if line is None:
+                    break
+
+                line_feeder.go_back()
+
+            elif t0 == T_PROMPT:
+                # 'prompt' properties override each other within a single
+                # definition of a symbol, but additional prompts can be added
+                # by defining the symbol multiple times; hence 'new_prompt'
+                # instead of 'prompt'.
+                new_prompt = parse_val_and_cond(tokens, line, filename, linenr)
+
+            elif t0 == T_DEFAULT:
+                new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr))
+
+            elif t0 == T_DEPENDS:
+                if not tokens.check(T_ON):
+                    _parse_error(line, 'expected "on" after "depends".', filename, linenr)
+
+                parsed_deps = self._parse_expr(tokens, stmt, line, filename, linenr)
+
+                if isinstance(stmt, (Menu, Comment)):
+                    stmt.dep_expr = _make_and(stmt.dep_expr, parsed_deps)
+                else:
+                    depends_on_expr = _make_and(depends_on_expr, parsed_deps)
+
+            elif t0 == T_VISIBLE:
+                if not tokens.check(T_IF):
+                    _parse_error(line, 'expected "if" after "visible".', filename, linenr)
+                if not isinstance(stmt, Menu):
+                    _parse_error(line,
+                                 "'visible if' is only valid for menus.",
+                                 filename,
+                                 linenr)
+
+                parsed_deps = self._parse_expr(tokens, stmt, line, filename, linenr)
+                stmt.visible_if_expr = _make_and(stmt.visible_if_expr, parsed_deps)
+
+            elif t0 == T_SELECT:
+                target = tokens.get_next()
+
+                stmt.referenced_syms.add(target)
+                stmt.selected_syms.add(target)
+
+                if tokens.check(T_IF):
+                    new_selects.append((target,
+                                        self._parse_expr(tokens, stmt, line, filename, linenr)))
+                else:
+                    new_selects.append((target, None))
+
+            elif t0 in (T_BOOL, T_TRISTATE, T_INT, T_HEX, T_STRING):
+                stmt.type = token_to_type[t0]
+
+                if len(tokens) > 1:
+                    new_prompt = parse_val_and_cond(tokens, line, filename, linenr)
+
+            elif t0 == T_RANGE:
+                lower = tokens.get_next()
+                upper = tokens.get_next()
+                stmt.referenced_syms.add(lower)
+                stmt.referenced_syms.add(upper)
+
+                if tokens.check(T_IF):
+                    stmt.ranges.append((lower, upper,
+                                        self._parse_expr(tokens, stmt, line, filename, linenr)))
+                else:
+                    stmt.ranges.append((lower, upper, None))
+
+            elif t0 == T_DEF_BOOL:
+                stmt.type = BOOL
+
+                if len(tokens) > 1:
+                    new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr))
+
+            elif t0 == T_DEF_TRISTATE:
+                stmt.type = TRISTATE
+
+                if len(tokens) > 1:
+                    new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr))
+
+            elif t0 == T_OPTIONAL:
+                if not isinstance(stmt, Choice):
+                    _parse_error(line,
+                                 '"optional" is only valid for choices.',
+                                 filename,
+                                 linenr)
+                stmt.optional = True
+
+            elif t0 == T_OPTION:
+                if tokens.check(T_ENV) and tokens.check(T_EQUAL):
+                    env_var = tokens.get_next()
+
+                    stmt.is_special_ = True
+                    stmt.is_from_env = True
+
+                    if env_var not in os.environ:
+                        self._warn("""
+The symbol {0} references the non-existent environment variable {1} and will
+get the empty string as its value.
+
+If you're using kconfiglib via 'make (i)scriptconfig' it should have set up the
+environment correctly for you. If you still got this message, that might be an
+error, and you should e-mail kconfiglib@gmail.com.
+."""                               .format(stmt.name, env_var),
+                                   filename,
+                                   linenr)
+
+                        stmt.cached_value = ""
+                    else:
+                        stmt.cached_value = os.environ[env_var]
+
+                elif tokens.check(T_DEFCONFIG_LIST):
+                    self.defconfig_sym = stmt
+
+                elif tokens.check(T_MODULES):
+                    self._warn("the 'modules' option is not supported. "
+                               "Let me know if this is a problem for you; "
+                               "it shouldn't be that hard to implement.",
+                               filename,
+                               linenr)
+
+                else:
+                    _parse_error(line, "unrecognized option.", filename, linenr)
+
+            else:
+                # See comment in Config.__init__()
+                self.end_line = line
+                self.end_line_tokens = tokens
+                break
+
+        # Propagate dependencies from enclosing menus and if's.
+
+        # For menus and comments..
+        if isinstance(stmt, (Menu, Comment)):
+            stmt.orig_deps = stmt.dep_expr
+            stmt.deps_from_containing = deps
+            stmt.dep_expr = _make_and(stmt.dep_expr, deps)
+
+            stmt.all_referenced_syms = \
+              stmt.referenced_syms | _get_expr_syms(deps)
+
+        # For symbols and choices..
+        else:
+
+            # See comment for 'menu_dep'
+            stmt.menu_dep = depends_on_expr
+
+            # Propagate dependencies specified with 'depends on' to any new
+            # default expressions, prompts, and selections. ("New" since a
+            # symbol might be defined in multiple places and the dependencies
+            # should only apply to the local definition.)
+
+            new_def_exprs = [(val_expr, _make_and(cond_expr, depends_on_expr))
+                             for (val_expr, cond_expr) in new_def_exprs]
+
+            new_selects = [(target, _make_and(cond_expr, depends_on_expr))
+                           for (target, cond_expr) in new_selects]
+
+            if new_prompt is not None:
+                prompt, cond_expr = new_prompt
+
+                # 'visible if' dependencies from enclosing menus get propagated
+                # to prompts
+                if visible_if_deps is not None:
+                    cond_expr = _make_and(cond_expr, visible_if_deps)
+
+                new_prompt = (prompt, _make_and(cond_expr, depends_on_expr))
+
+            # We save the original expressions -- before any menu and if
+            # conditions have been propagated -- so these can be retrieved
+            # later.
+
+            stmt.orig_def_exprs.extend(new_def_exprs)
+            if new_prompt is not None:
+                stmt.orig_prompts.append(new_prompt)
+
+            # Only symbols can select
+            if isinstance(stmt, Symbol):
+                stmt.orig_selects.extend(new_selects)
+
+            # Save dependencies from enclosing menus and if's
+            stmt.deps_from_containing = deps
+
+            # The set of symbols referenced directly by the symbol/choice plus
+            # all symbols referenced by enclosing menus and if's.
+            stmt.all_referenced_syms = \
+              stmt.referenced_syms | _get_expr_syms(deps)
+
+            # Propagate dependencies from enclosing menus and if's
+
+            stmt.def_exprs.extend([(val_expr, _make_and(cond_expr, deps))
+                                   for (val_expr, cond_expr) in new_def_exprs])
+
+            for (target, cond) in new_selects:
+                target.rev_dep = _make_or(target.rev_dep,
+                                          _make_and(stmt,
+                                                    _make_and(cond, deps)))
+
+            if new_prompt is not None:
+                prompt, cond_expr = new_prompt
+                stmt.prompts.append((prompt, _make_and(cond_expr, deps)))
+
+    #
+    # Symbol table manipulation
+    #
+
+    def _sym_lookup(self, name, add_sym_if_not_exists = True):
+        """Fetches the symbol 'name' from the symbol table, optionally adding
+        it if it does not exist (this is usually what we want)."""
+        if name in self.syms:
+            return self.syms[name]
+
+        new_sym = Symbol()
+        new_sym.config = self
+        new_sym.name = name
+
+        if add_sym_if_not_exists:
+            self.syms[name] = new_sym
+        else:
+            # This warning is generated while evaluating an expression
+            # containing undefined symbols using Config.eval()
+            self._warn("no symbol {0} in configuration".format(name))
+
+        return new_sym
+
+    #
+    # Evaluation of symbols and expressions
+    #
+
+    def _eval_expr(self, expr):
+        """Evaluates an expression and returns one of the tristate values "n",
+        "m" or "y"."""
+        res = self._eval_expr_2(expr)
+
+        # Promote "m" to "y" if we're running without modules. Internally, "m"
+        # is often rewritten to "m" && MODULES by both the C implementation and
+        # kconfiglib, which takes care of cases where "m" should be false if
+        # we're running without modules.
+        if res == "m" and not self._has_modules():
+            return "y"
+
+        return res
+
+    def _eval_expr_2(self, expr):
+        if expr is None:
+            return "y"
+
+        if isinstance(expr, Symbol):
+            # Non-bool/tristate symbols are always "n" in a tristate sense,
+            # regardless of their value
+            if expr.type != BOOL and expr.type != TRISTATE:
+                return "n"
+            return expr.get_value()
+
+        if isinstance(expr, str):
+            return expr if (expr == "y" or expr == "m") else "n"
+
+        first_expr = expr[0]
+
+        if first_expr == OR:
+            res = "n"
+
+            for subexpr in expr[1]:
+                ev = self._eval_expr_2(subexpr)
+
+                # Return immediately upon discovering a "y" term
+                if ev == "y":
+                    return "y"
+
+                if ev == "m":
+                    res = "m"
+
+            # 'res' is either "n" or "m" here; we already handled the
+            # short-circuiting "y" case in the loop.
+            return res
+
+        if first_expr == AND:
+            res = "y"
+
+            for subexpr in expr[1]:
+                ev = self._eval_expr_2(subexpr)
+
+                # Return immediately upon discovering an "n" term
+                if ev == "n":
+                    return "n"
+
+                if ev == "m":
+                    res = "m"
+
+            # 'res' is either "m" or "y" here; we already handled the
+            # short-circuiting "n" case in the loop.
+            return res
+
+        if first_expr == NOT:
+            ev = self._eval_expr_2(expr[1])
+
+            if ev == "y":
+                return "n"
+
+            return "y" if (ev == "n") else "m"
+
+        if first_expr == EQUAL:
+            return "y" if (self._get_str_value(expr[1]) ==
+                           self._get_str_value(expr[2])) else "n"
+
+        if first_expr == UNEQUAL:
+            return "y" if (self._get_str_value(expr[1]) !=
+                           self._get_str_value(expr[2])) else "n"
+
+        _internal_error("Internal error while evaluating expression: "
+                        "unknown operation {0}.".format(first_expr))
+
+    def _get_str_value(self, obj):
+        if isinstance(obj, str):
+            return obj
+        # obj is a Symbol
+        return obj.get_value()
+
+    def _eval_min(self, e1, e2):
+        e1_eval = self._eval_expr(e1)
+        e2_eval = self._eval_expr(e2)
+
+        return e1_eval if tri_less(e1_eval, e2_eval) else e2_eval
+
+    def _eval_max(self, e1, e2):
+        e1_eval = self._eval_expr(e1)
+        e2_eval = self._eval_expr(e2)
+
+        return e1_eval if tri_greater(e1_eval, e2_eval) else e2_eval
+
+    #
+    # Methods related to the MODULES symbol
+    #
+
+    def _has_modules(self):
+        modules_sym = self.syms.get("MODULES")
+        return (modules_sym is not None) and (modules_sym.get_value() == "y")
+
+    #
+    # Dependency tracking
+    #
+
+    def _build_dep(self):
+        """Populates the Symbol.dep sets, linking the symbol to the symbols
+        that immediately depend on it in the sense that changing the value of
+        the symbol might affect the values of those other symbols. This is used
+        for caching/invalidation purposes. The calculated sets might be larger
+        than necessary as we don't do any complicated analysis of the
+        expressions."""
+        for sym in self.syms.itervalues():
+            sym.dep = set()
+
+        # Adds 'sym' as a directly dependent symbol to all symbols that appear
+        # in the expression 'e'
+        def add_expr_deps(e, sym):
+            for s in _get_expr_syms(e):
+                s.dep.add(sym)
+
+        # The directly dependent symbols of a symbol are:
+        #  - Any symbols whose prompts, default values, rev_dep (select
+        #    condition), or ranges depend on the symbol
+        #  - Any symbols that belong to the same choice statement as the symbol
+        #    (these won't be included in 'dep' as that makes the dependency
+        #    graph unwieldy, but Symbol._get_dependent() will include them)
+        #  - Any symbols in a choice statement that depends on the symbol
+        for sym in self.syms.itervalues():
+            for (_, e) in sym.prompts:
+                add_expr_deps(e, sym)
+
+            for (v, e) in sym.def_exprs:
+                add_expr_deps(v, sym)
+                add_expr_deps(e, sym)
+
+            add_expr_deps(sym.rev_dep, sym)
+
+            for (l, u, e) in sym.ranges:
+                add_expr_deps(l, sym)
+                add_expr_deps(u, sym)
+                add_expr_deps(e, sym)
+
+            if sym.is_choice_symbol_:
+                choice = sym.parent
+
+                for (_, e) in choice.prompts:
+                    add_expr_deps(e, sym)
+
+                for (_, e) in choice.def_exprs:
+                    add_expr_deps(e, sym)
+
+    def _expr_val_str(self, expr, no_value_str = "(none)", get_val_instead_of_eval = False):
+        # Since values are valid expressions, _expr_to_str() will get a nice
+        # string representation for those as well.
+
+        if expr is None:
+            return no_value_str
+
+        if get_val_instead_of_eval:
+            if isinstance(expr, str):
+                return _expr_to_str(expr)
+            val = expr.get_value()
+        else:
+            val = self._eval_expr(expr)
+
+        return "{0} (value: {1})".format(_expr_to_str(expr), _expr_to_str(val))
+
+    def _expand_sym_refs(self, s):
+        """Expands $-references to symbols in 's' to symbol values, or to the
+        empty string for undefined symbols."""
+
+        while 1:
+            sym_ref_re_match = sym_ref_re.search(s)
+            if sym_ref_re_match is None:
+                return s
+
+            sym_name = sym_ref_re_match.group(0)[1:]
+            sym = self.syms.get(sym_name)
+            expansion = "" if sym is None else sym.get_value()
+
+            s = s[:sym_ref_re_match.start()] + \
+                expansion + \
+                s[sym_ref_re_match.end():]
+
+    def _get_sym_or_choice_str(self, sc):
+        """Symbols and choices have many properties in common, so we factor out
+        common __str__() stuff here. "sc" is short for "symbol or choice"."""
+
+        # As we deal a lot with string representations here, use some
+        # convenient shorthand:
+        s = _expr_to_str
+
+        #
+        # Common symbol/choice properties
+        #
+
+        user_value_str = "(no user value)" if sc.user_val is None else s(sc.user_val)
+
+        visibility_str = s(sc.get_visibility())
+
+        # Build prompts string
+        if sc.prompts == []:
+            prompts_str = " (no prompts)"
+        else:
+            prompts_str_rows = []
+
+            for (prompt, cond_expr) in sc.orig_prompts:
+                if cond_expr is None:
+                    prompts_str_rows.append(' "{0}"'.format(prompt))
+                else:
+                    prompts_str_rows.append(' "{0}" if '.format(prompt) +
+                                            self._expr_val_str(cond_expr))
+
+            prompts_str = "\n".join(prompts_str_rows)
+
+        # Build locations string
+        if sc.def_locations == []:
+            locations_str = "(no locations)"
+        else:
+            locations_str = " ".join(["{0}:{1}".format(filename, linenr) for
+                                      (filename, linenr) in sc.def_locations])
+
+        # Build additional-dependencies-from-menus-and-if's string
+        additional_deps_str = " " + self._expr_val_str(sc.deps_from_containing,
+                                                       "(no additional dependencies)")
+
+        #
+        # Symbol-specific stuff
+        #
+
+        if isinstance(sc, Symbol):
+
+            # Build value string
+            value_str = s(sc.get_value())
+
+            # Build ranges string
+            if isinstance(sc, Symbol):
+                if sc.ranges == []:
+                    ranges_str = " (no ranges)"
+                else:
+                    ranges_str_rows = []
+
+                    for (l, u, cond_expr) in sc.ranges:
+                        if cond_expr is None:
+                            ranges_str_rows.append(" [{0}, {1}]".format(s(l), s(u)))
+                        else:
+                            ranges_str_rows.append(" [{0}, {1}] if {2}"
+                                                   .format(s(l), s(u), self._expr_val_str(cond_expr)))
+
+                    ranges_str = "\n".join(ranges_str_rows)
+
+            # Build default values string
+            if sc.def_exprs == []:
+                defaults_str = " (no default values)"
+            else:
+                defaults_str_rows = []
+
+                for (val_expr, cond_expr) in sc.orig_def_exprs:
+                    row_str = " " + self._expr_val_str(val_expr, "(none)", sc.type == STRING)
+                    defaults_str_rows.append(row_str)
+                    defaults_str_rows.append("  Condition: " + self._expr_val_str(cond_expr))
+
+                defaults_str = "\n".join(defaults_str_rows)
+
+            # Build selects string
+            if sc.orig_selects == []:
+                selects_str = " (no selects)"
+            else:
+                selects_str_rows = []
+
+                for (target, cond_expr) in sc.orig_selects:
+                    if cond_expr is None:
+                        selects_str_rows.append(" {0}".format(target.name))
+                    else:
+                        selects_str_rows.append(" {0} if ".format(target.name) +
+                                                self._expr_val_str(cond_expr))
+
+                selects_str = "\n".join(selects_str_rows)
+
+            # Build reverse dependencies string
+            if sc.rev_dep == "n":
+                rev_dep_str = " (no reverse dependencies)"
+            else:
+                rev_dep_str = " " + self._expr_val_str(sc.rev_dep)
+
+            res = _sep_lines("Symbol " + (sc.name if sc.name is not None else "(no name)"),
+                             "Type           : " + typename[sc.type],
+                             "Value          : " + value_str,
+                             "User value     : " + user_value_str,
+                             "Visibility     : " + visibility_str,
+                             "Is choice item : " + bool_str[sc.is_choice_symbol_],
+                             "Is defined     : " + bool_str[sc.is_defined_],
+                             "Is from env.   : " + bool_str[sc.is_from_env],
+                             "Is special     : " + bool_str[sc.is_special_] + "\n")
+
+            if sc.ranges != []:
+                res += _sep_lines("Ranges:",
+                                  ranges_str + "\n")
+
+            res += _sep_lines("Prompts:",
+                              prompts_str,
+                              "Default values:",
+                              defaults_str,
+                              "Selects:",
+                              selects_str,
+                              "Reverse dependencies:",
+                              rev_dep_str,
+                              "Additional dependencies from enclosing menus and if's:",
+                              additional_deps_str,
+                              "Locations: " + locations_str)
+
+            return res
+
+        #
+        # Choice-specific stuff
+        #
+
+        # Build name string (for named choices)
+        if sc.name is None:
+            name_str = "(no name)"
+        else:
+            name_str = sc.name
+
+        # Build selected symbol string
+        sel = sc.get_selection()
+        if sel is None:
+            sel_str = "(no selection)"
+        else:
+            sel_str = sel.name
+
+        # Build mode string
+        mode_str = s(sc.get_mode())
+
+        # Build default values string
+        if sc.def_exprs == []:
+            defaults_str = " (no default values)"
+        else:
+            defaults_str_rows = []
+
+            for (sym, cond_expr) in sc.orig_def_exprs:
+                if cond_expr is None:
+                    defaults_str_rows.append(" {0}".format(sym.name))
+                else:
+                    defaults_str_rows.append(" {0} if ".format(sym.name) +
+                                             self._expr_val_str(cond_expr))
+
+            defaults_str = "\n".join(defaults_str_rows)
+
+        # Build contained symbols string
+        names = [sym.name for sym in sc.get_symbols()]
+
+        if names == []:
+            syms_string = "(empty)"
+        else:
+            syms_string = " ".join(names)
+
+        return _sep_lines("Choice",
+                          "Name (for named choices): " + name_str,
+                          "Type            : " + typename[sc.type],
+                          "Selected symbol : " + sel_str,
+                          "User value      : " + user_value_str,
+                          "Mode            : " + mode_str,
+                          "Visibility      : " + visibility_str,
+                          "Optional        : " + bool_str[sc.optional],
+                          "Prompts:",
+                          prompts_str,
+                          "Defaults:",
+                          defaults_str,
+                          "Choice symbols:",
+                          " " + syms_string,
+                          "Additional dependencies from enclosing menus and if's:",
+                          additional_deps_str,
+                          "Locations: " + locations_str)
+
+    def _expr_depends_on(self, expr, sym):
+        """Reimplementation of expr_depends_symbol() from mconf.c. Used to
+        determine if a submenu should be implicitly created, which influences what
+        items inside choice statements are considered choice items."""
+        if expr is None:
+            return False
+
+        def rec(expr):
+            if isinstance(expr, str):
+                return False
+
+            if isinstance(expr, Symbol):
+                return expr is sym
+
+            e0 = expr[0]
+
+            if e0 == EQUAL or e0 == UNEQUAL:
+                return self._eq_to_sym(expr) is sym
+
+            if e0 == AND:
+                for and_expr in expr[1]:
+                    if rec(and_expr):
+                        return True
+
+            return False
+
+        return rec(expr)
+
+    def _eq_to_sym(self, eq):
+        """_expr_depends_on() helper. For (in)equalities of the form sym = y/m
+        or sym != n, returns sym. For other (in)equalities, returns None."""
+        relation, left, right = eq
+
+        left  = self._transform_n_m_y(left)
+        right = self._transform_n_m_y(right)
+
+        # Make sure the symbol (if any) appears to the left
+        if not isinstance(left, Symbol):
+            left, right = right, left
+
+        if not isinstance(left, Symbol):
+            return None
+
+        if (relation == EQUAL   and (right == "m" or right == "y")) or \
+           (relation == UNEQUAL and right == "n"):
+            return left
+
+        return None
+
+    def _transform_n_m_y(self, item):
+        """_eq_to_sym() helper. Translates the symbols n, m, and y to their
+        string equivalents."""
+        if item is self.n:
+            return "n"
+        if item is self.m:
+            return "m"
+        if item is self.y:
+            return "y"
+        return item
+
+    def _warn(self, msg, filename = None, linenr = None):
+        """For printing warnings to stderr."""
+        if self.print_warnings:
+            self._warn_or_undef_assign(msg, WARNING, filename, linenr)
+
+    def _undef_assign(self, msg, filename = None, linenr = None):
+        """For printing informational messages related to assignments
+        to undefined variables to stderr."""
+        if self.print_undef_assign:
+            self._warn_or_undef_assign(msg, UNDEF_ASSIGN, filename, linenr)
+
+    def _warn_or_undef_assign(self, msg, msg_type, filename, linenr):
+        if filename is not None:
+            sys.stderr.write("{0}:".format(_clean_up_path(filename)))
+        if linenr is not None:
+            sys.stderr.write("{0}:".format(linenr))
+
+        if msg_type == WARNING:
+            sys.stderr.write("warning: ")
+        elif msg_type == UNDEF_ASSIGN:
+            sys.stderr.write("info: ")
+        else:
+            _internal_error('Internal error while printing warning: unknown warning type "{0}".'
+                            .format(msg_type))
+
+        sys.stderr.write(msg + "\n")
+
+def _get_expr_syms(expr):
+    """Returns the set() of symbols appearing in expr."""
+    res = set()
+    if expr is None:
+        return res
+
+    def rec(expr):
+        if isinstance(expr, Symbol):
+            res.add(expr)
+            return
+
+        if isinstance(expr, str):
+            return
+
+        e0 = expr[0]
+
+        if e0 == OR or e0 == AND:
+            for term in expr[1]:
+                rec(term)
+
+        elif e0 == NOT:
+            rec(expr[1])
+
+        elif e0 == EQUAL or e0 == UNEQUAL:
+            _, v1, v2 = expr
+
+            if isinstance(v1, Symbol):
+                res.add(v1)
+
+            if isinstance(v2, Symbol):
+                res.add(v2)
+
+        else:
+            _internal_error("Internal error while fetching symbols from an "
+                            "expression with token stream {0}.".format(expr))
+
+    rec(expr)
+    return res
+
+
+#
+# Construction of expressions
+#
+
+# These functions as well as the _eval_min/max() functions above equate
+# None with "y", which is usually what we want, but needs to be kept in
+# mind.
+
+def _make_or(e1, e2):
+    # Perform trivial simplification and avoid None's (which
+    # correspond to y's)
+    if e1 is None or e2 is None or \
+       e1 == "y" or e2 == "y":
+        return "y"
+
+    if e1 == "n":
+        return e2
+
+    if e2 == "n":
+        return e1
+
+    # Prefer to merge/update argument list if possible instead of creating
+    # a new OR node
+
+    if isinstance(e1, tuple) and e1[0] == OR:
+        if isinstance(e2, tuple) and e2[0] == OR:
+            return (OR, e1[1] + e2[1])
+        return (OR, e1[1] + [e2])
+
+    if isinstance(e2, tuple) and e2[0] == OR:
+        return (OR, e2[1] + [e1])
+
+    return (OR, [e1, e2])
+
+# Note: returns None if e1 == e2 == None
+
+def _make_and(e1, e2):
+    if e1 == "n" or e2 == "n":
+        return "n"
+
+    if e1 is None or e1 == "y":
+        return e2
+
+    if e2 is None or e2 == "y":
+        return e1
+
+    # Prefer to merge/update argument list if possible instead of creating
+    # a new AND node
+
+    if isinstance(e1, tuple) and e1[0] == AND:
+        if isinstance(e2, tuple) and e2[0] == AND:
+            return (AND, e1[1] + e2[1])
+        return (AND, e1[1] + [e2])
+
+    if isinstance(e2, tuple) and e2[0] == AND:
+        return (AND, e2[1] + [e1])
+
+    return (AND, [e1, e2])
+
+#
+# Constants and functions related to types, parsing, evaluation and printing,
+# put globally to unclutter the Config class a bit.
+#
+
+# Tokens
+(T_OR, T_AND, T_NOT,
+ T_OPEN_PAREN, T_CLOSE_PAREN,
+ T_EQUAL, T_UNEQUAL,
+ T_MAINMENU, T_MENU, T_ENDMENU,
+ T_SOURCE, T_CHOICE, T_ENDCHOICE,
+ T_COMMENT, T_CONFIG, T_MENUCONFIG,
+ T_HELP, T_IF, T_ENDIF, T_DEPENDS, T_ON,
+ T_OPTIONAL, T_PROMPT, T_DEFAULT,
+ T_BOOL, T_TRISTATE, T_HEX, T_INT, T_STRING,
+ T_DEF_BOOL, T_DEF_TRISTATE,
+ T_SELECT, T_RANGE, T_OPTION, T_ENV,
+ T_DEFCONFIG_LIST, T_MODULES, T_VISIBLE) = range(0, 38)
+
+# Keyword to token map
+keywords = {
+        "mainmenu"       : T_MAINMENU,
+        "menu"           : T_MENU,
+        "endmenu"        : T_ENDMENU,
+        "endif"          : T_ENDIF,
+        "endchoice"      : T_ENDCHOICE,
+        "source"         : T_SOURCE,
+        "choice"         : T_CHOICE,
+        "config"         : T_CONFIG,
+        "comment"        : T_COMMENT,
+        "menuconfig"     : T_MENUCONFIG,
+        "help"           : T_HELP,
+        "if"             : T_IF,
+        "depends"        : T_DEPENDS,
+        "on"             : T_ON,
+        "optional"       : T_OPTIONAL,
+        "prompt"         : T_PROMPT,
+        "default"        : T_DEFAULT,
+        "bool"           : T_BOOL,
+        "boolean"        : T_BOOL,
+        "tristate"       : T_TRISTATE,
+        "int"            : T_INT,
+        "hex"            : T_HEX,
+        "def_bool"       : T_DEF_BOOL,
+        "def_tristate"   : T_DEF_TRISTATE,
+        "string"         : T_STRING,
+        "select"         : T_SELECT,
+        "range"          : T_RANGE,
+        "option"         : T_OPTION,
+        "env"            : T_ENV,
+        "defconfig_list" : T_DEFCONFIG_LIST,
+        "modules"        : T_MODULES,
+        "visible"        : T_VISIBLE }
+
+# Strings to use for True and False
+bool_str = { False : "false", True : "true" }
+
+# Tokens after which identifier-like lexemes are treated as strings. T_CHOICE
+# is included to avoid symbols being registered for named choices.
+string_lex = frozenset((T_BOOL, T_TRISTATE, T_INT, T_HEX, T_STRING, T_CHOICE,
+                        T_PROMPT, T_MENU, T_COMMENT, T_SOURCE, T_MAINMENU))
+
+# Matches the initial token on a line; see _tokenize().
+initial_token_re = re.compile(r"[^\w]*(\w+)")
+
+# Matches an identifier/keyword optionally preceded by whitespace
+id_keyword_re = re.compile(r"\s*([\w./-]+)")
+
+# Regular expressions for parsing .config files
+set_re   = re.compile(r"CONFIG_(\w+)=(.*)")
+unset_re = re.compile(r"# CONFIG_(\w+) is not set")
+
+# Regular expression for finding $-references to symbols in strings
+sym_ref_re = re.compile(r"\$[A-Za-z_]+")
+
+# Integers representing symbol types
+UNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(0, 6)
+
+# Strings to use for types
+typename = {
+        UNKNOWN  : "unknown",
+        BOOL     : "bool",
+        TRISTATE : "tristate",
+        STRING   : "string",
+        HEX      : "hex",
+        INT      : "int" }
+
+# Token to type mapping
+token_to_type = { T_BOOL     : BOOL,
+                  T_TRISTATE : TRISTATE,
+                  T_STRING   : STRING,
+                  T_INT      : INT,
+                  T_HEX      : HEX }
+
+# Default values for symbols of different types (the value the symbol gets if
+# it is not assigned a user value and none of its 'default' clauses kick in)
+default_value = { BOOL     : "n",
+                  TRISTATE : "n",
+                  STRING   : "",
+                  INT      : "",
+                  HEX      : "" }
+
+# Indicates that no item is selected in a choice statement
+NO_SELECTION = 0
+
+# Integers representing expression types
+OR, AND, NOT, EQUAL, UNEQUAL = range(0, 5)
+
+# Map from tristate values to integers
+tri_to_int = { "n" : 0, "m" : 1, "y" : 2 }
+
+# Printing-related stuff
+
+op_to_str = { AND     : " && ",
+              OR      : " || ",
+              EQUAL   : " = ",
+              UNEQUAL : " != " }
+
+precedence = { OR : 0, AND : 1, NOT : 2 }
+
+# Types of informational messages
+WARNING = 0
+UNDEF_ASSIGN = 1
+
+def _intersperse(lst, op):
+    """_expr_to_str() helper. Gets the string representation of each expression in lst
+    and produces a list where op has been inserted between the elements."""
+    if lst == []:
+        return ""
+
+    res = []
+
+    def handle_sub_expr(expr):
+        no_parens = isinstance(expr, (str, Symbol)) or \
+                    expr[0] in (EQUAL, UNEQUAL) or \
+                    precedence[op] <= precedence[expr[0]]
+        if not no_parens:
+            res.append("(")
+        res.extend(_expr_to_str_rec(expr))
+        if not no_parens:
+            res.append(")")
+
+    op_str = op_to_str[op]
+
+    handle_sub_expr(lst[0])
+    for expr in lst[1:]:
+        res.append(op_str)
+        handle_sub_expr(expr)
+
+    return res
+
+def _expr_to_str(expr):
+    s = "".join(_expr_to_str_rec(expr))
+    return s
+
+def _sym_str_string(sym_or_str):
+    if isinstance(sym_or_str, str):
+        return '"{0}"'.format(sym_or_str)
+    return sym_or_str.name
+
+def _expr_to_str_rec(expr):
+    if expr is None:
+        return [""]
+
+    if isinstance(expr, (Symbol, str)):
+        return [_sym_str_string(expr)]
+
+    e0 = expr[0]
+
+    if e0 == OR or e0 == AND:
+        return _intersperse(expr[1], expr[0])
+
+    if e0 == NOT:
+        need_parens = not isinstance(expr[1], (str, Symbol))
+
+        res = ["!"]
+        if need_parens:
+            res.append("(")
+        res.extend(_expr_to_str_rec(expr[1]))
+        if need_parens:
+            res.append(")")
+        return res
+
+    if e0 == EQUAL or e0 == UNEQUAL:
+        return [_sym_str_string(expr[1]),
+                op_to_str[expr[0]],
+                _sym_str_string(expr[2])]
+
+class _Block:
+
+    """Represents a list of items (symbols, menus, choice statements and
+    comments) appearing at the top-level of a file or witin a menu, choice or
+    if statement."""
+
+    def __init__(self):
+        self.items = []
+
+    def get_items(self):
+        return self.items
+
+    def add_item(self, item):
+        self.items.append(item)
+
+    def _make_conf(self):
+        # Collect the substrings in a list and later use join() instead of +=
+        # to build the final .config contents. With older Python versions, this
+        # yields linear instead of quadratic complexity.
+        strings = []
+        for item in self.items:
+            strings.extend(item._make_conf())
+
+        return strings
+
+    def add_depend_expr(self, expr):
+        for item in self.items:
+            item.add_depend_expr(expr)
+
+class Item():
+
+    """Base class for symbols and other Kconfig constructs. Subclasses are
+    Symbol, Choice, Menu, and Comment."""
+
+    def is_symbol(self):
+        """Returns True if the item is a symbol, otherwise False. Short for
+        isinstance(item, kconfiglib.Symbol)."""
+        return isinstance(self, Symbol)
+
+    def is_choice(self):
+        """Returns True if the item is a choice, otherwise False. Short for
+        isinstance(item, kconfiglib.Choice)."""
+        return isinstance(self, Choice)
+
+    def is_menu(self):
+        """Returns True if the item is a menu, otherwise False. Short for
+        isinstance(item, kconfiglib.Menu)."""
+        return isinstance(self, Menu)
+
+    def is_comment(self):
+        """Returns True if the item is a comment, otherwise False. Short for
+        isinstance(item, kconfiglib.Comment)."""
+        return isinstance(self, Comment)
+
+class _HasVisibility():
+
+    """Base class for elements that have a "visibility" that acts as an upper
+    limit on the values a user can set for them. Subclasses are Symbol and
+    Choice (which supply some of the attributes)."""
+
+    def __init__(self):
+        self.cached_visibility = None
+        self.prompts = []
+
+    def _invalidate(self):
+        self.cached_visibility = None
+
+    def _get_visibility(self):
+        if self.cached_visibility is None:
+            vis = "n"
+            for (prompt, cond_expr) in self.prompts:
+                vis = self.config._eval_max(vis, cond_expr)
+
+            if isinstance(self, Symbol) and self.is_choice_symbol_:
+                vis = self.config._eval_min(vis, self.parent._get_visibility())
+
+            # Promote "m" to "y" if we're dealing with a non-tristate
+            if vis == "m" and self.type != TRISTATE:
+                vis = "y"
+
+            self.cached_visibility = vis
+
+        return self.cached_visibility
+
+class Symbol(Item, _HasVisibility):
+
+    """Represents a configuration symbol - e.g. FOO for
+
+    config FOO
+        ..."""
+
+    #
+    # Public interface
+    #
+
+    def get_value(self):
+        """Calculate and return the value of the symbol. See also
+        Symbol.set_user_value()."""
+
+        if self.cached_value is not None:
+            return self.cached_value
+
+        self.write_to_conf = False
+
+        # As a quirk of Kconfig, undefined symbols get their name as their
+        # value. This is why things like "FOO = bar" work for seeing if FOO has
+        # the value "bar".
+        if self.type == UNKNOWN:
+            self.cached_value = self.name
+            return self.name
+
+        new_val = default_value[self.type]
+
+        vis = self._get_visibility()
+
+        if self.type == BOOL or self.type == TRISTATE:
+            # The visibility and mode (modules-only or single-selection) of
+            # choice items will be taken into account in self._get_visibility()
+
+            if self.is_choice_symbol_:
+                if vis != "n":
+                    choice = self.parent
+                    mode = choice.get_mode()
+
+                    self.write_to_conf = (mode != "n")
+
+                    if mode == "y":
+                        new_val = "y" if (choice.get_selection() is self) else "n"
+                    elif mode == "m":
+                        if self.user_val == "m" or self.user_val == "y":
+                            new_val = "m"
+
+            else:
+                use_defaults = True
+
+                if vis != "n":
+                    # If the symbol is visible and has a user value, use that.
+                    # Otherwise, look at defaults.
+                    self.write_to_conf = True
+
+                    if self.user_val is not None:
+                        new_val = self.config._eval_min(self.user_val, vis)
+                        use_defaults = False
+
+                if use_defaults:
+                    for (val_expr, cond_expr) in self.def_exprs:
+                        cond_eval = self.config._eval_expr(cond_expr)
+
+                        if cond_eval != "n":
+                            self.write_to_conf = True
+                            new_val = self.config._eval_min(val_expr, cond_eval)
+                            break
+
+                # Reverse dependencies take precedence
+                rev_dep_val = self.config._eval_expr(self.rev_dep)
+
+                if rev_dep_val != "n":
+                    self.write_to_conf = True
+                    new_val = self.config._eval_max(new_val, rev_dep_val)
+
+            # Promote "m" to "y" for booleans
+            if new_val == "m" and self.type == BOOL:
+                new_val = "y"
+
+        elif self.type == STRING:
+            use_defaults = True
+
+            if vis != "n":
+                self.write_to_conf = True
+                if self.user_val is not None:
+                    new_val = self.user_val
+                    use_defaults = False
+
+            if use_defaults:
+                for (val_expr, cond_expr) in self.def_exprs:
+                    if self.config._eval_expr(cond_expr) != "n":
+                        self.write_to_conf = True
+                        new_val = self.config._get_str_value(val_expr)
+                        break
+
+        elif self.type == HEX or self.type == INT:
+            has_active_range = False
+            low = None
+            high = None
+            use_defaults = True
+
+            base = 16 if self.type == HEX else 10
+
+            for(l, h, cond_expr) in self.ranges:
+                if self.config._eval_expr(cond_expr) != "n":
+                    has_active_range = True
+
+                    low_str = self.config._get_str_value(l)
+                    high_str = self.config._get_str_value(h)
+
+                    low = int(low_str, base) if \
+                      _is_base_n(low_str, base) else 0
+                    high = int(high_str, base) if \
+                      _is_base_n(high_str, base) else 0
+
+                    break
+
+            if vis != "n":
+                self.write_to_conf = True
+
+                if self.user_val is not None and \
+                   _is_base_n(self.user_val, base) and \
+                   (not has_active_range or
+                    low <= int(self.user_val, base) <= high):
+
+                    # If the user value is OK, it is stored in exactly the same
+                    # form as specified in the assignment (with or without
+                    # "0x", etc).
+
+                    use_defaults = False
+                    new_val = self.user_val
+
+            if use_defaults:
+                for (val_expr, cond_expr) in self.def_exprs:
+                    if self.config._eval_expr(cond_expr) != "n":
+                        self.write_to_conf = True
+
+                        # If the default value is OK, it is stored in exactly
+                        # the same form as specified. Otherwise, it is clamped
+                        # to the range, and the output has "0x" as appropriate
+                        # for the type.
+
+                        new_val = self.config._get_str_value(val_expr)
+
+                        if _is_base_n(new_val, base):
+                            new_val_num = int(new_val, base)
+                            if has_active_range:
+                                clamped_val = None
+
+                                if new_val_num < low:
+                                    clamped_val = low
+                                elif new_val_num > high:
+                                    clamped_val = high
+
+                                if clamped_val is not None:
+                                    new_val = (hex(clamped_val) if \
+                                      self.type == HEX else str(clamped_val))
+
+                            break
+                else: # For the for loop
+                    # If no user value or default kicks in but the hex/int has
+                    # an active range, then the low end of the range is used,
+                    # provided it's > 0, with "0x" prepended as appropriate.
+
+                    if has_active_range and low > 0:
+                        new_val = (hex(low) if self.type == HEX else str(low))
+
+        self.cached_value = new_val
+        return new_val
+
+    def set_user_value(self, v):
+        """Sets the user value of the symbol.
+
+        Equal in effect to assigning the value to the symbol within a .config
+        file. Use get_lower/upper_bound() or get_assignable_values() to find
+        the range of currently assignable values for bool and tristate symbols;
+        setting values outside this range will cause the user value to differ
+        from the result of Symbol.get_value() (be truncated). Values that are
+        invalid for the type (such as a_bool.set_user_value("foo")) are
+        ignored, and a warning is emitted if an attempt is made to assign such
+        a value.
+
+        For any type of symbol, is_modifiable() can be used to check if a user
+        value will currently have any effect on the symbol, as determined by
+        its visibility and range of assignable values. Any value that is valid
+        for the type (bool, tristate, etc.) will end up being reflected in
+        get_user_value() though, and might have an effect later if conditions
+        change. To get rid of the user value, use unset_user_value().
+
+        Any symbols dependent on the symbol are (recursively) invalidated, so
+        things will just work with regards to dependencies.
+
+        v -- The user value to give to the symbol."""
+        self._set_user_value_no_invalidate(v, False)
+
+        # There might be something more efficient you could do here, but play
+        # it safe.
+        if self.name == "MODULES":
+            self.config._invalidate_all()
+            return
+
+        self._invalidate()
+        self._invalidate_dependent()
+
+    def unset_user_value(self):
+        """Resets the user value of the symbol, as if the symbol had never
+        gotten a user value via Config.load_config() or
+        Symbol.set_user_value()."""
+        self._unset_user_value_no_recursive_invalidate()
+        self._invalidate_dependent()
+
+    def get_user_value(self):
+        """Returns the value assigned to the symbol in a .config or via
+        Symbol.set_user_value() (provided the value was valid for the type of the
+        symbol). Returns None in case of no user value."""
+        return self.user_val
+
+    def get_name(self):
+        """Returns the name of the symbol."""
+        return self.name
+
+    def get_prompts(self):
+        """Returns a list of prompts defined for the symbol, in the order they
+        appear in the configuration files. Returns the empty list for symbols
+        with no prompt.
+
+        This list will have a single entry for the vast majority of symbols
+        having prompts, but having multiple prompts for a single symbol is
+        possible through having multiple 'config' entries for it."""
+        return [prompt for prompt, _ in self.orig_prompts]
+
+    def get_upper_bound(self):
+        """For string/hex/int symbols and for bool and tristate symbols that
+        cannot be modified (see is_modifiable()), returns None.
+
+        Otherwise, returns the highest value the symbol can be set to with
+        Symbol.set_user_value() (that will not be truncated): one of "m" or "y",
+        arranged from lowest to highest. This corresponds to the highest value
+        the symbol could be given in e.g. the 'make menuconfig' interface.
+
+        See also the tri_less*() and tri_greater*() functions, which could come
+        in handy."""
+        if self.type != BOOL and self.type != TRISTATE:
+            return None
+        rev_dep = self.config._eval_expr(self.rev_dep)
+        # A bool selected to "m" gets promoted to "y"
+        if self.type == BOOL and rev_dep == "m":
+            rev_dep = "y"
+        vis = self._get_visibility()
+        if (tri_to_int[vis] - tri_to_int[rev_dep]) > 0:
+            return vis
+        return None
+
+    def get_lower_bound(self):
+        """For string/hex/int symbols and for bool and tristate symbols that
+        cannot be modified (see is_modifiable()), returns None.
+
+        Otherwise, returns the lowest value the symbol can be set to with
+        Symbol.set_user_value() (that will not be truncated): one of "n" or "m",
+        arranged from lowest to highest. This corresponds to the lowest value
+        the symbol could be given in e.g. the 'make menuconfig' interface.
+
+        See also the tri_less*() and tri_greater*() functions, which could come
+        in handy."""
+        if self.type != BOOL and self.type != TRISTATE:
+            return None
+        rev_dep = self.config._eval_expr(self.rev_dep)
+        # A bool selected to "m" gets promoted to "y"
+        if self.type == BOOL and rev_dep == "m":
+            rev_dep = "y"
+        if (tri_to_int[self._get_visibility()] - tri_to_int[rev_dep]) > 0:
+            return rev_dep
+        return None
+
+    def get_assignable_values(self):
+        """For string/hex/int symbols and for bool and tristate symbols that
+        cannot be modified (see is_modifiable()), returns the empty list.
+
+        Otherwise, returns a list containing the user values that can be
+        assigned to the symbol (that won't be truncated). Usage example:
+
+        if "m" in sym.get_assignable_values():
+            sym.set_user_value("m")
+
+        This is basically a more convenient interface to
+        get_lower/upper_bound() when wanting to test if a particular tristate
+        value can be assigned."""
+        if self.type != BOOL and self.type != TRISTATE:
+            return []
+        rev_dep = self.config._eval_expr(self.rev_dep)
+        # A bool selected to "m" gets promoted to "y"
+        if self.type == BOOL and rev_dep == "m":
+            rev_dep = "y"
+        res = ["n", "m", "y"][tri_to_int[rev_dep] :
+                              tri_to_int[self._get_visibility()] + 1]
+        return res if len(res) > 1 else []
+
+    def get_type(self):
+        """Returns the type of the symbol: one of UNKNOWN, BOOL, TRISTATE,
+        STRING, HEX, or INT. These are defined at the top level of the module,
+        so you'd do something like
+
+        if sym.get_type() == kconfiglib.STRING:
+            ..."""
+        return self.type
+
+    def get_visibility(self):
+        """Returns the visibility of the symbol: one of "n", "m" or "y". For
+        bool and tristate symbols, this is an upper bound on the value users
+        can set for the symbol. For other types of symbols, a visibility of "n"
+        means the user value will be ignored. A visibility of "n" corresponds
+        to not being visible in the 'make *config' interfaces.
+
+        Example (assuming we're running with modules enabled -- i.e., MODULES
+        set to 'y'):
+
+        # Assume this has been assigned 'n'
+        config N_SYM
+            tristate "N_SYM"
+
+        # Assume this has been assigned 'm'
+        config M_SYM
+            tristate "M_SYM"
+
+        # Has visibility 'n'
+        config A
+            tristate "A"
+            depends on N_SYM
+
+        # Has visibility 'm'
+        config B
+            tristate "B"
+            depends on M_SYM
+
+        # Has visibility 'y'
+        config C
+            tristate "C"
+
+        # Has no prompt, and hence visibility 'n'
+        config D
+            tristate
+
+        Having visibility be tri-valued ensures that e.g. a symbol cannot be
+        set to "y" by the user if it depends on a symbol with value "m", which
+        wouldn't be safe.
+
+        You should probably look at get_lower/upper_bound(),
+        get_assignable_values() and is_modifiable() before using this."""
+        return self._get_visibility()
+
+    def get_parent(self):
+        """Returns the menu or choice statement that contains the symbol, or
+        None if the symbol is at the top level. Note that if statements are
+        treated as syntactic and do not have an explicit class
+        representation."""
+        return self.parent
+
+    def get_referenced_symbols(self, refs_from_enclosing = False):
+        """Returns the set() of all symbols referenced by this symbol. For
+        example, the symbol defined by
+
+        config FOO
+            bool
+            prompt "foo" if A && B
+            default C if D
+            depends on E
+            select F if G
+
+        references the symbols A through G.
+
+        refs_from_enclosing (default: False) -- If True, the symbols
+                            referenced by enclosing menus and if's will be
+                            included in the result."""
+        return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms
+
+    def get_selected_symbols(self):
+        """Returns the set() of all symbols X for which this symbol has a
+        'select X' or 'select X if Y' (regardless of whether Y is satisfied or
+        not). This is a subset of the symbols returned by
+        get_referenced_symbols()."""
+        return self.selected_syms
+
+    def get_help(self):
+        """Returns the help text of the symbol, or None if the symbol has no
+        help text."""
+        return self.help
+
+    def get_config(self):
+        """Returns the Config instance this symbol is from."""
+        return self.config
+
+    def get_def_locations(self):
+        """Returns a list of (filename, linenr) tuples, where filename (string)
+        and linenr (int) represent a location where the symbol is defined. For
+        the vast majority of symbols this list will only contain one element.
+        For the following Kconfig, FOO would get two entries: the lines marked
+        with *.
+
+        config FOO *
+            bool "foo prompt 1"
+
+        config FOO *
+            bool "foo prompt 2"
+        """
+        return self.def_locations
+
+    def get_ref_locations(self):
+        """Returns a list of (filename, linenr) tuples, where filename (string)
+        and linenr (int) represent a location where the symbol is referenced in
+        the configuration. For example, the lines marked by * would be included
+        for FOO below:
+
+        config A
+            bool
+            default BAR || FOO *
+
+        config B
+            tristate
+            depends on FOO *
+            default m if FOO *
+
+        if FOO *
+            config A
+                bool "A"
+        endif
+
+        config FOO (definition not included)
+            bool
+        """
+        return self.ref_locations
+
+    def is_modifiable(self):
+        """Returns True if the value of the symbol could be modified by calling
+        Symbol.set_user_value() and False otherwise.
+
+        For bools and tristates, this corresponds to the symbol being visible
+        in the 'make menuconfig' interface and not already being pinned to a
+        specific value (e.g. because it is selected by another symbol).
+
+        For strings and numbers, this corresponds to just being visible. (See
+        Symbol.get_visibility().)"""
+        if self.is_special_:
+            return False
+        if self.type == BOOL or self.type == TRISTATE:
+            rev_dep = self.config._eval_expr(self.rev_dep)
+            # A bool selected to "m" gets promoted to "y"
+            if self.type == BOOL and rev_dep == "m":
+                rev_dep = "y"
+            return (tri_to_int[self._get_visibility()] -
+                    tri_to_int[rev_dep]) > 0
+        return self._get_visibility() != "n"
+
+    def is_defined(self):
+        """Returns False if the symbol is referred to in the Kconfig but never
+        actually defined, otherwise True."""
+        return self.is_defined_
+
+    def is_special(self):
+        """Returns True if the symbol is one of the special symbols n, m, y, or
+        UNAME_RELEASE, or gets its value from the environment. Otherwise,
+        returns False."""
+        return self.is_special_
+
+    def is_from_environment(self):
+        """Returns True if the symbol gets its value from the environment.
+        Otherwise, returns False."""
+        return self.is_from_env
+
+    def has_ranges(self):
+        """Returns True if the symbol is of type INT or HEX and has ranges that
+        limits what values it can take on, otherwise False."""
+        return self.ranges != []
+
+    def is_choice_symbol(self):
+        """Returns True if the symbol is in a choice statement and is an actual
+        choice symbol (see Choice.get_symbols()); otherwise, returns
+        False."""
+        return self.is_choice_symbol_
+
+    def is_choice_selection(self):
+        """Returns True if the symbol is contained in a choice statement and is
+        the selected item, otherwise False. Equivalent to 'sym.is_choice_symbol()
+        and sym.get_parent().get_selection() is sym'."""
+        return self.is_choice_symbol_ and self.parent.get_selection() is self
+
+    def __str__(self):
+        """Returns a string containing various information about the symbol."""
+        return self.config._get_sym_or_choice_str(self)
+
+    #
+    # Private methods
+    #
+
+    def __init__(self):
+        """Symbol constructor -- not intended to be called directly by
+        kconfiglib clients."""
+
+        # Set default values
+        _HasVisibility.__init__(self)
+
+        self.config = None
+
+        self.parent = None
+        self.name = None
+        self.type = UNKNOWN
+
+        self.def_exprs = []
+        self.ranges = []
+        self.rev_dep = "n"
+
+        # The prompt, default value and select conditions without any
+        # dependencies from menus or if's propagated to them
+
+        self.orig_prompts = []
+        self.orig_def_exprs = []
+        self.orig_selects = []
+
+        # Dependencies inherited from containing menus and if's
+        self.deps_from_containing = None
+
+        self.help = None
+
+        # The set of symbols referenced by this symbol (see
+        # get_referenced_symbols())
+        self.referenced_syms = set()
+
+        # The set of symbols selected by this symbol (see
+        # get_selected_symbols())
+        self.selected_syms = set()
+
+        # Like 'referenced_syms', but includes symbols from
+        # dependencies inherited from enclosing menus and if's
+        self.all_referenced_syms = set()
+
+        # This is set to True for "actual" choice symbols. See
+        # Choice._determine_actual_symbols(). The trailing underscore avoids a
+        # collision with is_choice_symbol().
+        self.is_choice_symbol_ = False
+
+        # This records only dependencies specified with 'depends on'. Needed
+        # when determining actual choice items (hrrrr...). See also
+        # Choice._determine_actual_symbols().
+        self.menu_dep = None
+
+        # See Symbol.get_ref/def_locations().
+        self.def_locations = []
+        self.ref_locations = []
+
+        self.user_val = None
+
+        # Flags
+
+        # Should the symbol get an entry in .config?
+        self.write_to_conf = False
+
+        # Caches the calculated value
+        self.cached_value = None
+
+        # Note: An instance variable 'self.dep' gets set on the Symbol in
+        # Config._build_dep(), linking the symbol to the symbols that
+        # immediately depend on it (in a caching/invalidation sense). The total
+        # set of dependent symbols for the symbol (the transitive closure) is
+        # calculated on an as-needed basis in _get_dependent().
+
+        # Caches the total list of dependent symbols. Calculated in
+        # _get_dependent().
+        self.cached_deps = None
+
+        # Does the symbol have an entry in the Kconfig file? The trailing
+        # underscore avoids a collision with is_defined().
+        self.is_defined_ = False
+
+        # Does the symbol get its value in some special way, e.g. from the
+        # environment or by being one of the special symbols n, m, and y? If
+        # so, the value is stored in self.cached_value, which is never
+        # invalidated. The trailing underscore avoids a collision with
+        # is_special().
+        self.is_special_ = False
+
+        # Does the symbol get its value from the environment?
+        self.is_from_env = False
+
+    def _invalidate(self):
+        if self.is_special_:
+            return
+
+        if self.is_choice_symbol_:
+            self.parent._invalidate()
+
+        _HasVisibility._invalidate(self)
+
+        self.write_to_conf = False
+        self.cached_value = None
+
+    def _invalidate_dependent(self):
+        for sym in self._get_dependent():
+            sym._invalidate()
+
+    def _set_user_value_no_invalidate(self, v, suppress_load_warnings):
+        """Like set_user_value(), but does not invalidate any symbols.
+
+        suppress_load_warnings --
+          some warnings are annoying when loading a .config that can be helpful
+          when manually invoking set_user_value(). This flag is set to True to
+          suppress such warnings.
+
+          Perhaps this could be made optional for load_config() instead."""
+
+        if self.is_special_:
+            if self.is_from_env:
+                self.config._warn('attempt to assign the value "{0}" to the '
+                                  'symbol {1}, which gets its value from the '
+                                  'environment. Assignment ignored.'
+                                  .format(v, self.name))
+            else:
+                self.config._warn('attempt to assign the value "{0}" to the '
+                                  'special symbol {1}. Assignment ignored.'
+                                  .format(v, self.name))
+
+            return
+
+
+        if not self.is_defined_:
+            filename, linenr = self.ref_locations[0]
+
+            self.config._undef_assign('attempt to assign the value "{0}" to {1}, '
+                                      "which is referenced at {2}:{3} but never "
+                                      "defined. Assignment ignored."
+                                      .format(v, self.name, filename, linenr))
+            return
+
+        # Check if the value is valid for our type
+
+        if not (( self.type == BOOL     and (v == "n" or v == "y")    ) or
+                ( self.type == TRISTATE and (v == "n" or v == "m" or
+                                             v == "y")                ) or
+                ( self.type == STRING                                 ) or
+                ( self.type == INT      and _is_base_n(v, 10)         ) or
+                ( self.type == HEX      and _is_base_n(v, 16)         )):
+
+            self.config._warn('the value "{0}" is invalid for {1}, which has type {2}. '
+                              "Assignment ignored."
+                              .format(v, self.name, typename[self.type]))
+            return
+
+        if self.prompts == [] and not suppress_load_warnings:
+            self.config._warn('assigning "{0}" to the symbol {1} which '
+                              'lacks prompts and thus has visibility "n". '
+                              'The assignment will have no effect.'
+                              .format(v, self.name))
+
+        self.user_val = v
+
+        if self.is_choice_symbol_ and (self.type == BOOL or
+                                       self.type == TRISTATE):
+            choice = self.parent
+            if v == "y":
+                choice.user_val = self
+                choice.user_mode = "y"
+            elif v == "m":
+                choice.user_val = None
+                choice.user_mode = "m"
+
+    def _unset_user_value_no_recursive_invalidate(self):
+        self._invalidate()
+        self.user_val = None
+
+        if self.is_choice_symbol_:
+            self.parent._unset_user_value()
+
+    def _make_conf(self):
+        if self.already_written:
+            return []
+
+        self.already_written = True
+
+        # Note: write_to_conf is determined in get_value()
+        val = self.get_value()
+        if not self.write_to_conf:
+            return []
+
+        if self.type == BOOL or self.type == TRISTATE:
+            if val == "m" or val == "y":
+                return ["CONFIG_{0}={1}".format(self.name, val)]
+            return ["# CONFIG_{0} is not set".format(self.name)]
+
+        elif self.type == STRING:
+            # Escape \ and "
+            return ['CONFIG_{0}="{1}"'
+                    .format(self.name,
+                            val.replace("\\", "\\\\").replace('"', '\\"'))]
+
+        elif self.type == INT or self.type == HEX:
+            return ["CONFIG_{0}={1}".format(self.name, val)]
+
+        else:
+            _internal_error('Internal error while creating .config: unknown type "{0}".'
+                            .format(self.type))
+
+    def _get_dependent(self):
+        """Returns the set of symbols that should be invalidated if the value
+        of the symbol changes, because they might be affected by the change.
+        Note that this is an internal API -- it's probably of limited
+        usefulness to clients."""
+        if self.cached_deps is not None:
+            return self.cached_deps
+
+        res = set()
+
+        self._add_dependent_ignore_siblings(res)
+        if self.is_choice_symbol_:
+            for s in self.parent.get_symbols():
+                if s is not self:
+                    res.add(s)
+                    s._add_dependent_ignore_siblings(res)
+
+        self.cached_deps = res
+        return res
+
+    def _add_dependent_ignore_siblings(self, to):
+        """Calculating dependencies gets a bit tricky for choice items as they
+        all depend on each other, potentially leading to infinite recursion.
+        This helper function calculates dependencies ignoring the other symbols
+        in the choice. It also works fine for symbols that are not choice
+        items."""
+        for s in self.dep:
+            to.add(s)
+            to |= s._get_dependent()
+
+    def _has_auto_menu_dep_on(self, on):
+        """See Choice._determine_actual_symbols()."""
+        if not isinstance(self.parent, Choice):
+            _internal_error("Attempt to determine auto menu dependency for symbol ouside of choice.")
+
+        if self.prompts == []:
+            # If we have no prompt, use the menu dependencies instead (what was
+            # specified with 'depends on')
+            return self.menu_dep is not None and \
+                   self.config._expr_depends_on(self.menu_dep, on)
+
+        for (_, cond_expr) in self.prompts:
+            if self.config._expr_depends_on(cond_expr, on):
+                return True
+
+        return False
+
+class Menu(Item):
+
+    """Represents a menu statement."""
+
+    #
+    # Public interface
+    #
+
+    def get_config(self):
+        """Return the Config instance this menu is from."""
+        return self.config
+
+    def get_visibility(self):
+        """Returns the visibility of the menu. This also affects the visibility
+        of subitems. See also Symbol.get_visibility()."""
+        return self.config._eval_expr(self.dep_expr)
+
+    def get_visible_if_visibility(self):
+        """Returns the visibility the menu gets from its 'visible if'
+        condition. "y" if the menu has no 'visible if' condition."""
+        return self.config._eval_expr(self.visible_if_expr)
+
+    def get_items(self, recursive = False):
+        """Returns a list containing the items (symbols, menus, choice
+        statements and comments) in in the menu, in the same order that the
+        items appear within the menu.
+
+        recursive (default: False) -- True if items contained in items within
+                                      the menu should be included
+                                      recursively (preorder)."""
+
+        if not recursive:
+            return self.block.get_items()
+
+        res = []
+        for item in self.block.get_items():
+            res.append(item)
+            if isinstance(item, Menu):
+                res.extend(item.get_items(True))
+            elif isinstance(item, Choice):
+                res.extend(item.get_items())
+        return res
+
+    def get_symbols(self, recursive = False):
+        """Returns a list containing the symbols in the menu, in the same order
+        that they appear within the menu.
+
+        recursive (default: False) -- True if symbols contained in items within
+                                      the menu should be included
+                                      recursively."""
+
+        return [item for item in self.get_items(recursive) if isinstance(item, Symbol)]
+
+    def get_title(self):
+        """Returns the title text of the menu."""
+        return self.title
+
+    def get_parent(self):
+        """Returns the menu or choice statement that contains the menu, or
+        None if the menu is at the top level. Note that if statements are
+        treated as syntactic sugar and do not have an explicit class
+        representation."""
+        return self.parent
+
+    def get_referenced_symbols(self, refs_from_enclosing = False):
+        """See Symbol.get_referenced_symbols()."""
+        return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms
+
+    def get_location(self):
+        """Returns the location of the menu as a (filename, linenr) tuple,
+        where filename is a string and linenr an int."""
+        return (self.filename, self.linenr)
+
+    def __str__(self):
+        """Returns a string containing various information about the menu."""
+        depends_on_str = self.config._expr_val_str(self.orig_deps,
+                                                   "(no dependencies)")
+        visible_if_str = self.config._expr_val_str(self.visible_if_expr,
+                                                   "(no dependencies)")
+
+        additional_deps_str = " " + self.config._expr_val_str(self.deps_from_containing,
+                                                              "(no additional dependencies)")
+
+        return _sep_lines("Menu",
+                          "Title                     : " + self.title,
+                          "'depends on' dependencies : " + depends_on_str,
+                          "'visible if' dependencies : " + visible_if_str,
+                          "Additional dependencies from enclosing menus and if's:",
+                          additional_deps_str,
+                          "Location: {0}:{1}".format(self.filename, self.linenr))
+
+    #
+    # Private methods
+    #
+
+    def __init__(self):
+        """Menu constructor -- not intended to be called directly by
+        kconfiglib clients."""
+
+        self.config = None
+
+        self.parent = None
+        self.title = None
+        self.block = None
+        self.dep_expr = None
+
+        # Dependency expression without dependencies from enclosing menus and
+        # if's propagated
+        self.orig_deps = None
+
+        # Dependencies inherited from containing menus and if's
+        self.deps_from_containing = None
+
+        # The 'visible if' expression
+        self.visible_if_expr = None
+
+        # The set of symbols referenced by this menu (see
+        # get_referenced_symbols())
+        self.referenced_syms = set()
+
+        # Like 'referenced_syms', but includes symbols from
+        # dependencies inherited from enclosing menus and if's
+        self.all_referenced_syms = None
+
+        self.filename = None
+        self.linenr = None
+
+    def _make_conf(self):
+        item_conf = self.block._make_conf()
+
+        if self.config._eval_expr(self.dep_expr) != "n" and \
+           self.config._eval_expr(self.visible_if_expr) != "n":
+            return ["\n#\n# {0}\n#".format(self.title)] + item_conf
+        return item_conf
+
+class Choice(Item, _HasVisibility):
+
+    """Represents a choice statement. A choice can be in one of three modes:
+
+    "n" - The choice is not visible and no symbols can be selected.
+
+    "m" - Any number of symbols can be set to "m". The rest will be "n". This
+          is safe since potentially conflicting options don't actually get
+          compiled into the kernel simultaneously with "m".
+
+    "y" - One symbol will be "y" while the rest are "n".
+
+    Only tristate choices can be in "m" mode, and the visibility of the choice
+    is an upper bound on the mode, so that e.g. a choice that depends on a
+    symbol with value "m" will be in "m" mode.
+
+    The mode changes automatically when a value is assigned to a symbol within
+    the choice.
+
+    See Symbol.get_visibility() too."""
+
+    #
+    # Public interface
+    #
+
+    def get_selection(self):
+        """Returns the symbol selected (either by the user or through
+        defaults), or None if either no symbol is selected or the mode is not
+        "y"."""
+        if self.cached_selection is not None:
+            if self.cached_selection == NO_SELECTION:
+                return None
+            return self.cached_selection
+
+        if self.get_mode() != "y":
+            return self._cache_ret(None)
+
+        # User choice available?
+        if self.user_val is not None and \
+           self.user_val._get_visibility() == "y":
+            return self._cache_ret(self.user_val)
+
+        if self.optional:
+            return self._cache_ret(None)
+
+        return self._cache_ret(self.get_selection_from_defaults())
+
+    def get_selection_from_defaults(self):
+        """Like Choice.get_selection(), but acts as if no symbol has been
+        selected by the user and no 'optional' flag is in effect."""
+
+        if self.actual_symbols == []:
+            return None
+
+        for (symbol, cond_expr) in self.def_exprs:
+            if self.config._eval_expr(cond_expr) != "n":
+                chosen_symbol = symbol
+                break
+        else:
+            chosen_symbol = self.actual_symbols[0]
+
+        # Is the chosen symbol visible?
+        if chosen_symbol._get_visibility() != "n":
+            return chosen_symbol
+        # Otherwise, pick the first visible symbol
+        for sym in self.actual_symbols:
+            if sym._get_visibility() != "n":
+                return sym
+        return None
+
+    def get_user_selection(self):
+        """If the choice is in "y" mode and has a user-selected symbol, returns
+        that symbol. Otherwise, returns None."""
+        return self.user_val
+
+    def get_config(self):
+        """Returns the Config instance this choice is from."""
+        return self.config
+
+    def get_name(self):
+        """For named choices, returns the name. Returns None for unnamed
+        choices. No named choices appear anywhere in the kernel Kconfig files
+        as of Linux 3.7.0-rc8."""
+        return self.name
+
+    def get_prompts(self):
+        """Returns a list of prompts defined for the choice, in the order they
+        appear in the configuration files. Returns the empty list for choices
+        with no prompt.
+
+        This list will have a single entry for the vast majority of choices
+        having prompts, but having multiple prompts for a single choice is
+        possible through having multiple 'choice' entries for it (though I'm
+        not sure if that ever happens in practice)."""
+        return [prompt for prompt, _ in self.orig_prompts]
+
+    def get_help(self):
+        """Returns the help text of the choice, or None if the choice has no
+        help text."""
+        return self.help
+
+    def get_type(self):
+        """Returns the type of the choice. See Symbol.get_type()."""
+        return self.type
+
+    def get_items(self):
+        """Gets all items contained in the choice in the same order as within
+        the configuration ("items" instead of "symbols" since choices and
+        comments might appear within choices. This only happens in one place as
+        of Linux 3.7.0-rc8, in drivers/usb/gadget/Kconfig)."""
+        return self.block.get_items()
+
+    def get_symbols(self):
+        """Returns a list containing the choice's symbols.
+
+        A quirk (perhaps a bug) of Kconfig is that you can put items within a
+        choice that will not be considered members of the choice insofar as
+        selection is concerned. This happens for example if one symbol within a
+        choice 'depends on' the symbol preceding it, or if you put non-symbol
+        items within choices.
+
+        As of Linux 3.7.0-rc8, this seems to be used intentionally in one
+        place: drivers/usb/gadget/Kconfig.
+
+        This function returns the "proper" symbols of the choice in the order
+        they appear in the choice, excluding such items. If you want all items
+        in the choice, use get_items()."""
+        return self.actual_symbols
+
+    def get_parent(self):
+        """Returns the menu or choice statement that contains the choice, or
+        None if the choice is at the top level. Note that if statements are
+        treated as syntactic sugar and do not have an explicit class
+        representation."""
+        return self.parent
+
+    def get_referenced_symbols(self, refs_from_enclosing = False):
+        """See Symbol.get_referenced_symbols()."""
+        return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms
+
+    def get_def_locations(self):
+        """Returns a list of (filename, linenr) tuples, where filename (string)
+        and linenr (int) represent a location where the choice is defined. For
+        the vast majority of choices (all of them as of Linux 3.7.0-rc8) this
+        list will only contain one element, but its possible for named choices
+        to be defined in multiple locations."""
+        return self.def_locations
+
+    def get_visibility(self):
+        """Returns the visibility of the choice statement: one of "n", "m" or
+        "y". This acts as an upper limit on the mode of the choice (though bool
+        choices can only have the mode "y"). See the class documentation for an
+        explanation of modes."""
+        return self._get_visibility()
+
+    def get_mode(self):
+        """Returns the mode of the choice. See the class documentation for
+        an explanation of modes."""
+        minimum_mode = "n" if self.optional else "m"
+        mode = self.user_mode if self.user_mode is not None else minimum_mode
+        mode = self.config._eval_min(mode, self._get_visibility())
+
+        # Promote "m" to "y" for boolean choices
+        if mode == "m" and self.type == BOOL:
+            return "y"
+
+        return mode
+
+    def is_optional(self):
+        """Returns True if the symbol has the optional flag set (and so will default
+        to "n" mode). Otherwise, returns False."""
+        return self.optional
+
+    def __str__(self):
+        """Returns a string containing various information about the choice
+        statement."""
+        return self.config._get_sym_or_choice_str(self)
+
+    #
+    # Private methods
+    #
+
+    def __init__(self):
+        """Choice constructor -- not intended to be called directly by
+        kconfiglib clients."""
+
+        _HasVisibility.__init__(self)
+
+        self.config = None
+
+        self.parent = None
+        self.name = None # Yes, choices can be named
+        self.type = UNKNOWN
+        self.def_exprs = []
+        self.help = None
+        self.optional = False
+        self.block = None
+
+        # The prompts and default values without any dependencies from
+        # enclosing menus or if's propagated
+
+        self.orig_prompts = []
+        self.orig_def_exprs = []
+
+        # Dependencies inherited from containing menus and if's
+        self.deps_from_containing = None
+
+        # We need to filter out symbols that appear within the choice block but
+        # are not considered choice items (see
+        # Choice._determine_actual_symbols()) This list holds the "actual" choice
+        # items.
+        self.actual_symbols = []
+
+        # The set of symbols referenced by this choice (see
+        # get_referenced_symbols())
+        self.referenced_syms = set()
+
+        # Like 'referenced_syms', but includes symbols from
+        # dependencies inherited from enclosing menus and if's
+        self.all_referenced_syms = set()
+
+        # See Choice.get_def_locations()
+        self.def_locations = []
+
+        self.user_val = None
+        self.user_mode = None
+
+        self.cached_selection = None
+
+    def _determine_actual_symbols(self):
+        """If a symbol's visibility depends on the preceding symbol within a
+        choice, it is no longer viewed as a choice item (quite possibly a bug,
+        but some things consciously use it.. ugh. It stems from automatic
+        submenu creation). In addition, it's possible to have choices and
+        comments within choices, and those shouldn't be considered as choice
+        items either. Only drivers/usb/gadget/Kconfig seems to depend on any of
+        this. This method computes the "actual" items in the choice and sets
+        the is_choice_symbol_ flag on them (retrieved via is_choice_symbol()).
+
+        Don't let this scare you: an earlier version simply checked for a
+        sequence of symbols where all symbols after the first appeared in the
+        'depends on' expression of the first, and that worked fine.  The added
+        complexity is to be future-proof in the event that
+        drivers/usb/gadget/Kconfig turns even more sinister. It might very well
+        be overkilling things (especially if that file is refactored ;)."""
+
+        items = self.block.get_items()
+
+        # Items might depend on each other in a tree structure, so we need a
+        # stack to keep track of the current tentative parent
+        stack = []
+
+        for item in items:
+            if not isinstance(item, Symbol):
+                stack = []
+                continue
+
+            while stack != []:
+                if item._has_auto_menu_dep_on(stack[-1]):
+                    # The item should not be viewed as a choice item, so don't
+                    # set item.is_choice_symbol_.
+                    stack.append(item)
+                    break
+                else:
+                    stack.pop()
+            else:
+                item.is_choice_symbol_ = True
+                self.actual_symbols.append(item)
+                stack.append(item)
+
+    def _cache_ret(self, selection):
+        # As None is used to indicate the lack of a cached value we can't use
+        # that to cache the fact that the choice has no selection. Instead, we
+        # use the symbolic constant NO_SELECTION.
+        if selection is None:
+            self.cached_selection = NO_SELECTION
+        else:
+            self.cached_selection = selection
+
+        return selection
+
+    def _invalidate(self):
+        _HasVisibility._invalidate(self)
+        self.cached_selection = None
+
+    def _unset_user_value(self):
+        self._invalidate()
+        self.user_val = None
+        self.user_mode = None
+
+    def _make_conf(self):
+        return self.block._make_conf()
+
+class Comment(Item):
+
+    """Represents a comment statement."""
+
+    #
+    # Public interface
+    #
+
+    def get_config(self):
+        """Returns the Config instance this comment is from."""
+        return self.config
+
+    def get_visibility(self):
+        """Returns the visibility of the comment. See also
+        Symbol.get_visibility()."""
+        return self.config._eval_expr(self.dep_expr)
+
+    def get_text(self):
+        """Returns the text of the comment."""
+        return self.text
+
+    def get_parent(self):
+        """Returns the menu or choice statement that contains the comment, or
+        None if the comment is at the top level. Note that if statements are
+        treated as syntactic sugar and do not have an explicit class
+        representation."""
+        return self.parent
+
+    def get_referenced_symbols(self, refs_from_enclosing = False):
+        """See Symbol.get_referenced_symbols()."""
+        return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms
+
+    def get_location(self):
+        """Returns the location of the comment as a (filename, linenr) tuple,
+        where filename is a string and linenr an int."""
+        return (self.filename, self.linenr)
+
+    def __str__(self):
+        """Returns a string containing various information about the comment."""
+        dep_str = self.config._expr_val_str(self.orig_deps, "(no dependencies)")
+
+        additional_deps_str = " " + self.config._expr_val_str(self.deps_from_containing,
+                                                              "(no additional dependencies)")
+
+        return _sep_lines("Comment",
+                          "Text: "         + str(self.text),
+                          "Dependencies: " + dep_str,
+                          "Additional dependencies from enclosing menus and if's:",
+                          additional_deps_str,
+                          "Location: {0}:{1}".format(self.filename, self.linenr))
+
+    #
+    # Private methods
+    #
+
+    def __init__(self):
+        """Comment constructor -- not intended to be called directly by
+        kconfiglib clients."""
+
+        self.config = None
+
+        self.parent = None
+        self.text = None
+        self.dep_expr = None
+
+        # Dependency expression without dependencies from enclosing menus and
+        # if's propagated
+        self.orig_deps = None
+
+        # Dependencies inherited from containing menus and if's
+        self.deps_from_containing = None
+
+        # The set of symbols referenced by this comment (see
+        # get_referenced_symbols())
+        self.referenced_syms = set()
+
+        # Like 'referenced_syms', but includes symbols from
+        # dependencies inherited from enclosing menus and if's
+        self.all_referenced_syms = None
+
+        self.filename = None
+        self.linenr = None
+
+    def _make_conf(self):
+        if self.config._eval_expr(self.dep_expr) != "n":
+            return ["\n#\n# {0}\n#".format(self.text)]
+        return []
+
+class _Feed:
+
+    """Class for working with sequences in a stream-like fashion; handy for tokens."""
+
+    def __init__(self, items):
+        self.items = items
+        self.length = len(self.items)
+        self.i = 0
+
+    def get_next(self):
+        if self.i >= self.length:
+            return None
+
+        item = self.items[self.i]
+        self.i += 1
+        return item
+
+    def peek_next(self):
+        return None if self.i >= self.length else self.items[self.i]
+
+    def go_to_start(self):
+        self.i = 0
+
+    def __getitem__(self, index):
+        return self.items[index]
+
+    def __len__(self):
+        return len(self.items)
+
+    def is_empty(self):
+        return self.items == []
+
+    def check(self, token):
+        """Check if the next token is 'token'. If so, remove it from the token
+        feed and return True. Otherwise, leave it in and return False."""
+        if self.i >= self.length:
+            return None
+
+        if self.items[self.i] == token:
+            self.i += 1
+            return True
+
+        return False
+
+    def remove_while(self, pred):
+        while self.i < self.length and pred(self.items[self.i]):
+            self.i += 1
+
+    def go_back(self):
+        if self.i <= 0:
+            _internal_error("Attempt to move back in Feed while already at the beginning.")
+        self.i -= 1
+
+class _FileFeed(_Feed):
+
+    """Feed subclass that keeps track of the current filename and line
+    number."""
+
+    def __init__(self, lines, filename):
+        self.filename = _clean_up_path(filename)
+        _Feed.__init__(self, lines)
+
+    def get_filename(self):
+        return self.filename
+
+    def get_linenr(self):
+        return self.i
+
+#
+# Misc. public global utility functions
+#
+
+def tri_less(v1, v2):
+    """Returns True if the tristate v1 is less than the tristate v2, where "n",
+    "m" and "y" are ordered from lowest to highest. Otherwise, returns
+    False."""
+    return tri_to_int[v1] < tri_to_int[v2]
+
+def tri_less_eq(v1, v2):
+    """Returns True if the tristate v1 is less than or equal to the tristate
+    v2, where "n", "m" and "y" are ordered from lowest to highest. Otherwise,
+    returns False."""
+    return tri_to_int[v1] <= tri_to_int[v2]
+
+def tri_greater(v1, v2):
+    """Returns True if the tristate v1 is greater than the tristate v2, where
+    "n", "m" and "y" are ordered from lowest to highest. Otherwise, returns
+    False."""
+    return tri_to_int[v1] > tri_to_int[v2]
+
+def tri_greater_eq(v1, v2):
+    """Returns True if the tristate v1 is greater than or equal to the tristate
+    v2, where "n", "m" and "y" are ordered from lowest to highest. Otherwise,
+    returns False."""
+    return tri_to_int[v1] >= tri_to_int[v2]
+
+#
+# Helper functions, mostly related to text processing
+#
+
+def _strip_quotes(s, line, filename, linenr):
+    """Removes any quotes surrounding 's' if it has them; otherwise returns 's'
+    unmodified."""
+    s = s.strip()
+    if not s:
+        return ""
+    if s[0] == '"' or s[0] == "'":
+        if len(s) < 2 or s[-1] != s[0]:
+            _parse_error(line,
+                         "malformed string literal",
+                         filename,
+                         linenr)
+        return s[1:-1]
+    return s
+
+def _indentation(line):
+    """Returns the indentation of the line, treating tab stops as being spaced
+    8 characters apart."""
+    if line.isspace():
+        _internal_error("Attempt to take indentation of blank line.")
+    indent = 0
+    for c in line:
+        if c == " ":
+            indent += 1
+        elif c == "\t":
+            # Go to the next tab stop
+            indent = (indent + 8) & ~7
+        else:
+            return indent
+
+def _deindent(line, indent):
+    """Deindent 'line' by 'indent' spaces."""
+    line = line.expandtabs()
+    if len(line) <= indent:
+        return line
+    return line[indent:]
+
+def _is_base_n(s, n):
+    try:
+        int(s, n)
+        return True
+    except ValueError:
+        return False
+
+def _sep_lines(*args):
+    """Returns a string comprised of all arguments, with newlines inserted
+    between them."""
+    return "\n".join(args)
+
+def _comment(s):
+    """Returns a new string with "#" inserted before each line in 's'."""
+    if not s:
+        return "#"
+    res = "".join(["#" + line for line in s.splitlines(True)])
+    if s.endswith("\n"):
+        return res + "#"
+    return res
+
+def _get_lines(filename):
+    """Returns a list of lines from 'filename', joining any line ending in \\
+    with the following line."""
+    with open(filename, "r") as f:
+        lines = []
+        accum = ""
+        while 1:
+            line = f.readline()
+
+            if line == "":
+                return lines
+
+            if line.endswith("\\\n"):
+                accum += line[:-2]
+            else:
+                accum += line
+                lines.append(accum)
+                accum = ""
+
+def _strip_trailing_slash(path):
+    """Removes any trailing slash from 'path'."""
+    return path[:-1] if path.endswith("/") else path
+
+def _clean_up_path(path):
+    """Strips any initial "./" and trailing slash from 'path'."""
+    if path.startswith("./"):
+        path = path[2:]
+    return _strip_trailing_slash(path)
+
+#
+# Error handling
+#
+
+class Kconfig_Syntax_Error(Exception):
+    """Exception raised for syntax errors."""
+    pass
+
+class Internal_Error(Exception):
+    """Exception raised for internal errors."""
+    pass
+
+def _tokenization_error(s, index, filename, linenr):
+    if filename is not None:
+        assert linenr is not None
+        sys.stderr.write("{0}:{1}:\n".format(filename, linenr))
+
+    if s.endswith("\n"):
+        s = s[:-1]
+
+    # Calculate the visual offset corresponding to index 'index' in 's'
+    # assuming tabstops are spaced 8 characters apart
+    vis_index = 0
+    for c in s[:index]:
+        if c == "\t":
+            vis_index = (vis_index + 8) & ~7
+        else:
+            vis_index += 1
+
+    # Don't output actual tabs to be independent of how the terminal renders
+    # them
+    s = s.expandtabs()
+
+    raise Kconfig_Syntax_Error, (
+        _sep_lines("Error during tokenization at location indicated by caret.\n",
+                   s,
+                   " " * vis_index + "^\n"))
+
+def _parse_error(s, msg, filename, linenr):
+    error_str = ""
+
+    if filename is not None:
+        assert linenr is not None
+        error_str += "{0}:{1}: ".format(filename, linenr)
+
+    if s.endswith("\n"):
+        s = s[:-1]
+
+    error_str += 'Error while parsing "{0}"'.format(s) + \
+      ("." if msg is None else ": " + msg)
+
+    raise Kconfig_Syntax_Error, error_str
+
+def _internal_error(msg):
+    msg += "\nSorry! You may want to send an email to kconfiglib@gmail.com " \
+           "to tell me about this. Include the message above and the stack " \
+           "trace and describe what you were doing."
+
+    raise Internal_Error, msg
+
+if use_psyco:
+    import psyco
+
+    Config._tokenize  = psyco.proxy(Config._tokenize)
+    Config._eval_expr = psyco.proxy(Config._eval_expr)
+
+    _indentation = psyco.proxy(_indentation)
+    _get_lines   = psyco.proxy(_get_lines)
index a51c9429e91280d11d8e1cf01add3c3f64b6dcea..a2a85ac9ce42873b420db6fda98dadc4a707c534 100644 (file)
@@ -21,20 +21,21 @@ import builder
 import control
 import command
 import commit
+import terminal
 import toolchain
 
 errors = [
     '''main.c: In function 'main_loop':
 main.c:260:6: warning: unused variable 'joe' [-Wunused-variable]
 ''',
-    '''main.c: In function 'main_loop':
+    '''main.c: In function 'main_loop2':
 main.c:295:2: error: 'fred' undeclared (first use in this function)
 main.c:295:2: note: each undeclared identifier is reported only once for each function it appears in
 make[1]: *** [main.o] Error 1
 make: *** [common/libcommon.o] Error 2
 Make failed
 ''',
-    '''main.c: In function 'main_loop':
+    '''main.c: In function 'main_loop3':
 main.c:280:6: warning: unused variable 'mary' [-Wunused-variable]
 ''',
     '''powerpc-linux-ld: warning: dot moved backwards before `.bss'
@@ -45,6 +46,20 @@ powerpc-linux-ld: u-boot: section .reloc lma 0xffffa400 overlaps previous sectio
 powerpc-linux-ld: u-boot: section .data lma 0xffffcd38 overlaps previous sections
 powerpc-linux-ld: u-boot: section .u_boot_cmd lma 0xffffeb40 overlaps previous sections
 powerpc-linux-ld: u-boot: section .bootpg lma 0xfffff198 overlaps previous sections
+''',
+   '''In file included from %(basedir)sarch/sandbox/cpu/cpu.c:9:0:
+%(basedir)sarch/sandbox/include/asm/state.h:44:0: warning: "xxxx" redefined [enabled by default]
+%(basedir)sarch/sandbox/include/asm/state.h:43:0: note: this is the location of the previous definition
+%(basedir)sarch/sandbox/cpu/cpu.c: In function 'do_reset':
+%(basedir)sarch/sandbox/cpu/cpu.c:27:1: error: unknown type name 'blah'
+%(basedir)sarch/sandbox/cpu/cpu.c:28:12: error: expected declaration specifiers or '...' before numeric constant
+make[2]: *** [arch/sandbox/cpu/cpu.o] Error 1
+make[1]: *** [arch/sandbox/cpu] Error 2
+make[1]: *** Waiting for unfinished jobs....
+In file included from %(basedir)scommon/board_f.c:55:0:
+%(basedir)sarch/sandbox/include/asm/state.h:44:0: warning: "xxxx" redefined [enabled by default]
+%(basedir)sarch/sandbox/include/asm/state.h:43:0: note: this is the location of the previous definition
+make: *** [sub-make] Error 2
 '''
 ]
 
@@ -56,7 +71,8 @@ commits = [
     ['9012', 'Third commit, error', 1, errors[0:2]],
     ['3456', 'Fourth commit, warning', 0, [errors[0], errors[2]]],
     ['7890', 'Fifth commit, link errors', 1, [errors[0], errors[3]]],
-    ['abcd', 'Sixth commit, fixes all errors', 0, []]
+    ['abcd', 'Sixth commit, fixes all errors', 0, []],
+    ['ef01', 'Seventh commit, check directory suppression', 1, [errors[4]]],
 ]
 
 boards = [
@@ -103,16 +119,24 @@ class TestBuild(unittest.TestCase):
         self.toolchains.Add('powerpc-linux-gcc', test=False)
         self.toolchains.Add('gcc', test=False)
 
+        # Avoid sending any output
+        terminal.SetPrintTestMode()
+        self._col = terminal.Color()
+
     def Make(self, commit, brd, stage, *args, **kwargs):
+        global base_dir
+
         result = command.CommandResult()
         boardnum = int(brd.target[-1])
         result.return_code = 0
         result.stderr = ''
         result.stdout = ('This is the test output for board %s, commit %s' %
                 (brd.target, commit.hash))
-        if boardnum >= 1 and boardnum >= commit.sequence:
+        if ((boardnum >= 1 and boardnum >= commit.sequence) or
+                boardnum == 4 and commit.sequence == 6):
             result.return_code = commit.return_code
-            result.stderr = ''.join(commit.error_list)
+            result.stderr = (''.join(commit.error_list)
+                % {'basedir' : base_dir + '/.bm-work/00/'})
         if stage == 'build':
             target_dir = None
             for arg in args:
@@ -121,25 +145,129 @@ class TestBuild(unittest.TestCase):
 
             if not os.path.isdir(target_dir):
                 os.mkdir(target_dir)
-            #time.sleep(.2 + boardnum * .2)
 
         result.combined = result.stdout + result.stderr
         return result
 
-    def testBasic(self):
-        """Test basic builder operation"""
-        output_dir = tempfile.mkdtemp()
-        if not os.path.isdir(output_dir):
-            os.mkdir(output_dir)
-        build = builder.Builder(self.toolchains, output_dir, None, 1, 2,
+    def assertSummary(self, text, arch, plus, boards, ok=False):
+        col = self._col
+        expected_colour = col.GREEN if ok else col.RED
+        expect = '%10s: ' % arch
+        # TODO(sjg@chromium.org): If plus is '', we shouldn't need this
+        expect += col.Color(expected_colour, plus)
+        expect += '  '
+        for board in boards:
+            expect += col.Color(expected_colour, ' %s' % board)
+        self.assertEqual(text, expect)
+
+    def testOutput(self):
+        """Test basic builder operation and output
+
+        This does a line-by-line verification of the summary output.
+        """
+        global base_dir
+
+        base_dir = tempfile.mkdtemp()
+        if not os.path.isdir(base_dir):
+            os.mkdir(base_dir)
+        build = builder.Builder(self.toolchains, base_dir, None, 1, 2,
                                 checkout=False, show_unknown=False)
         build.do_make = self.Make
         board_selected = self.boards.GetSelectedDict()
 
         build.BuildBoards(self.commits, board_selected, keep_outputs=False,
                           verbose=False)
+        lines = terminal.GetPrintTestLines()
+        count = 0
+        for line in lines:
+            if line.text.strip():
+                count += 1
+
+        # We should get one starting message, then an update for every commit
+        # built.
+        self.assertEqual(count, len(commits) * len(boards) + 1)
         build.SetDisplayOptions(show_errors=True);
         build.ShowSummary(self.commits, board_selected)
+        #terminal.EchoPrintTestLines()
+        lines = terminal.GetPrintTestLines()
+        self.assertEqual(lines[0].text, '01: %s' % commits[0][1])
+        self.assertEqual(lines[1].text, '02: %s' % commits[1][1])
+
+        # We expect all archs to fail
+        col = terminal.Color()
+        self.assertSummary(lines[2].text, 'sandbox', '+', ['board4'])
+        self.assertSummary(lines[3].text, 'arm', '+', ['board1'])
+        self.assertSummary(lines[4].text, 'powerpc', '+', ['board2', 'board3'])
+
+        # Now we should have the compiler warning
+        self.assertEqual(lines[5].text, 'w+%s' %
+                errors[0].rstrip().replace('\n', '\nw+'))
+        self.assertEqual(lines[5].colour, col.MAGENTA)
+
+        self.assertEqual(lines[6].text, '03: %s' % commits[2][1])
+        self.assertSummary(lines[7].text, 'sandbox', '+', ['board4'])
+        self.assertSummary(lines[8].text, 'arm', '', ['board1'], ok=True)
+        self.assertSummary(lines[9].text, 'powerpc', '+', ['board2', 'board3'])
+
+        # Compiler error
+        self.assertEqual(lines[10].text, '+%s' %
+                errors[1].rstrip().replace('\n', '\n+'))
+
+        self.assertEqual(lines[11].text, '04: %s' % commits[3][1])
+        self.assertSummary(lines[12].text, 'sandbox', '', ['board4'], ok=True)
+        self.assertSummary(lines[13].text, 'powerpc', '', ['board2', 'board3'],
+                ok=True)
+
+        # Compile error fixed
+        self.assertEqual(lines[14].text, '-%s' %
+                errors[1].rstrip().replace('\n', '\n-'))
+        self.assertEqual(lines[14].colour, col.GREEN)
+
+        self.assertEqual(lines[15].text, 'w+%s' %
+                errors[2].rstrip().replace('\n', '\nw+'))
+        self.assertEqual(lines[15].colour, col.MAGENTA)
+
+        self.assertEqual(lines[16].text, '05: %s' % commits[4][1])
+        self.assertSummary(lines[17].text, 'sandbox', '+', ['board4'])
+        self.assertSummary(lines[18].text, 'powerpc', '', ['board3'], ok=True)
+
+        # The second line of errors[3] is a duplicate, so buildman will drop it
+        expect = errors[3].rstrip().split('\n')
+        expect = [expect[0]] + expect[2:]
+        self.assertEqual(lines[19].text, '+%s' %
+                '\n'.join(expect).replace('\n', '\n+'))
+
+        self.assertEqual(lines[20].text, 'w-%s' %
+                errors[2].rstrip().replace('\n', '\nw-'))
+
+        self.assertEqual(lines[21].text, '06: %s' % commits[5][1])
+        self.assertSummary(lines[22].text, 'sandbox', '', ['board4'], ok=True)
+
+        # The second line of errors[3] is a duplicate, so buildman will drop it
+        expect = errors[3].rstrip().split('\n')
+        expect = [expect[0]] + expect[2:]
+        self.assertEqual(lines[23].text, '-%s' %
+                '\n'.join(expect).replace('\n', '\n-'))
+
+        self.assertEqual(lines[24].text, 'w-%s' %
+                errors[0].rstrip().replace('\n', '\nw-'))
+
+        self.assertEqual(lines[25].text, '07: %s' % commits[6][1])
+        self.assertSummary(lines[26].text, 'sandbox', '+', ['board4'])
+
+        # Pick out the correct error lines
+        expect_str = errors[4].rstrip().replace('%(basedir)s', '').split('\n')
+        expect = expect_str[3:8] + [expect_str[-1]]
+        self.assertEqual(lines[27].text, '+%s' %
+                '\n'.join(expect).replace('\n', '\n+'))
+
+        # Now the warnings lines
+        expect = [expect_str[0]] + expect_str[10:12] + [expect_str[9]]
+        self.assertEqual(lines[28].text, 'w+%s' %
+                '\n'.join(expect).replace('\n', '\nw+'))
+
+        self.assertEqual(len(lines), 29)
+        shutil.rmtree(base_dir)
 
     def _testGit(self):
         """Test basic builder operation by building a branch"""
@@ -164,6 +292,7 @@ class TestBuild(unittest.TestCase):
         options.keep_outputs = False
         args = ['tegra20']
         control.DoBuildman(options, args)
+        shutil.rmtree(base_dir)
 
     def testBoardSingle(self):
         """Test single board selection"""
index 1b9771f8e6f42a749a8be0e50e2a327252bdf8e7..27dc31889b8021c64d0af0d9bdf2898253e0b993 100644 (file)
@@ -99,6 +99,9 @@ class Toolchains:
     def __init__(self):
         self.toolchains = {}
         self.paths = []
+        self._make_flags = dict(bsettings.GetItems('make-flags'))
+
+    def GetSettings(self):
         toolchains = bsettings.GetItems('toolchain')
         if not toolchains:
             print ("Warning: No tool chains - please add a [toolchain] section"
@@ -110,7 +113,6 @@ class Toolchains:
                 self.paths += glob.glob(value)
             else:
                 self.paths.append(value)
-        self._make_flags = dict(bsettings.GetItems('make-flags'))
 
     def Add(self, fname, test=True, verbose=False):
         """Add a toolchain to our list
@@ -198,7 +200,7 @@ class Toolchains:
         >>> tcs.ResolveReferences(var_dict, 'this=${oblique}_set${first}nd')
         'this=OBLIQUE_setfi2ndrstnd'
         """
-        re_var = re.compile('(\$\{[a-z0-9A-Z]{1,}\})')
+        re_var = re.compile('(\$\{[-_a-z0-9A-Z]{1,}\})')
 
         while True:
             m = re_var.search(args)
index e6870f5bba9ce4012603b7d4fa3726836c9715c5..654100bf07ed692fe5cbd7f1cee5461a95c8414c 100755 (executable)
@@ -6,34 +6,33 @@
 #
 
 """
-Converter from Kconfig and MAINTAINERS to boards.cfg
+Converter from Kconfig and MAINTAINERS to a board database.
 
-Run 'tools/genboardscfg.py' to create boards.cfg file.
+Run 'tools/genboardscfg.py' to create a board database.
 
 Run 'tools/genboardscfg.py -h' for available options.
 
-This script only works on python 2.6 or later, but not python 3.x.
+Python 2.6 or later, but not Python 3.x is necessary to run this script.
 """
 
 import errno
 import fnmatch
 import glob
+import multiprocessing
 import optparse
 import os
-import re
-import shutil
 import subprocess
 import sys
 import tempfile
 import time
 
-BOARD_FILE = 'boards.cfg'
-CONFIG_DIR = 'configs'
-REFORMAT_CMD = [os.path.join('tools', 'reformat.py'),
-                '-i', '-d', '-', '-s', '8']
-SHOW_GNU_MAKE = 'scripts/show-gnu-make'
-SLEEP_TIME=0.003
+sys.path.append(os.path.join(os.path.dirname(__file__), 'buildman'))
+import kconfiglib
 
+### constant variables ###
+OUTPUT_FILE = 'boards.cfg'
+CONFIG_DIR = 'configs'
+SLEEP_TIME = 0.03
 COMMENT_BLOCK = '''#
 # List of boards
 #   Automatically generated by %s: don't edit
@@ -43,35 +42,14 @@ COMMENT_BLOCK = '''#
 ''' % __file__
 
 ### helper functions ###
-def get_terminal_columns():
-    """Get the width of the terminal.
-
-    Returns:
-      The width of the terminal, or zero if the stdout is not
-      associated with tty.
-    """
+def try_remove(f):
+    """Remove a file ignoring 'No such file or directory' error."""
     try:
-        return shutil.get_terminal_size().columns # Python 3.3~
-    except AttributeError:
-        import fcntl
-        import termios
-        import struct
-        arg = struct.pack('hhhh', 0, 0, 0, 0)
-        try:
-            ret = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, arg)
-        except IOError as exception:
-            # If 'Inappropriate ioctl for device' error occurs,
-            # stdout is probably redirected. Return 0.
-            return 0
-        return struct.unpack('hhhh', ret)[1]
-
-def get_devnull():
-    """Get the file object of '/dev/null' device."""
-    try:
-        devnull = subprocess.DEVNULL # py3k
-    except AttributeError:
-        devnull = open(os.devnull, 'wb')
-    return devnull
+        os.remove(f)
+    except OSError as exception:
+        # Ignore 'No such file or directory' error
+        if exception.errno != errno.ENOENT:
+            raise
 
 def check_top_directory():
     """Exit if we are not at the top of source directory."""
@@ -79,23 +57,15 @@ def check_top_directory():
         if not os.path.exists(f):
             sys.exit('Please run at the top of source directory.')
 
-def get_make_cmd():
-    """Get the command name of GNU Make."""
-    process = subprocess.Popen([SHOW_GNU_MAKE], stdout=subprocess.PIPE)
-    ret = process.communicate()
-    if process.returncode:
-        sys.exit('GNU Make not found')
-    return ret[0].rstrip()
-
-def output_is_new():
-    """Check if the boards.cfg file is up to date.
+def output_is_new(output):
+    """Check if the output file is up to date.
 
     Returns:
-      True if the boards.cfg file exists and is newer than any of
+      True if the given output file exists and is newer than any of
       *_defconfig, MAINTAINERS and Kconfig*.  False otherwise.
     """
     try:
-        ctime = os.path.getctime(BOARD_FILE)
+        ctime = os.path.getctime(output)
     except OSError as exception:
         if exception.errno == errno.ENOENT:
             # return False on 'No such file or directory' error
@@ -121,9 +91,9 @@ def output_is_new():
             if ctime < os.path.getctime(filepath):
                 return False
 
-    # Detect a board that has been removed since the current boards.cfg
+    # Detect a board that has been removed since the current board database
     # was generated
-    with open(BOARD_FILE) as f:
+    with open(output) as f:
         for line in f:
             if line[0] == '#' or line == '\n':
                 continue
@@ -134,6 +104,172 @@ def output_is_new():
     return True
 
 ### classes ###
+class KconfigScanner:
+
+    """Kconfig scanner."""
+
+    ### constant variable only used in this class ###
+    _SYMBOL_TABLE = {
+        'arch' : 'SYS_ARCH',
+        'cpu' : 'SYS_CPU',
+        'soc' : 'SYS_SOC',
+        'vendor' : 'SYS_VENDOR',
+        'board' : 'SYS_BOARD',
+        'config' : 'SYS_CONFIG_NAME',
+        'options' : 'SYS_EXTRA_OPTIONS'
+    }
+
+    def __init__(self):
+        """Scan all the Kconfig files and create a Config object."""
+        # Define environment variables referenced from Kconfig
+        os.environ['srctree'] = os.getcwd()
+        os.environ['UBOOTVERSION'] = 'dummy'
+        os.environ['KCONFIG_OBJDIR'] = ''
+        self._conf = kconfiglib.Config()
+
+    def __del__(self):
+        """Delete a leftover temporary file before exit.
+
+        The scan() method of this class creates a temporay file and deletes
+        it on success.  If scan() method throws an exception on the way,
+        the temporary file might be left over.  In that case, it should be
+        deleted in this destructor.
+        """
+        if hasattr(self, '_tmpfile') and self._tmpfile:
+            try_remove(self._tmpfile)
+
+    def scan(self, defconfig):
+        """Load a defconfig file to obtain board parameters.
+
+        Arguments:
+          defconfig: path to the defconfig file to be processed
+
+        Returns:
+          A dictionary of board parameters.  It has a form of:
+          {
+              'arch': <arch_name>,
+              'cpu': <cpu_name>,
+              'soc': <soc_name>,
+              'vendor': <vendor_name>,
+              'board': <board_name>,
+              'target': <target_name>,
+              'config': <config_header_name>,
+              'options': <extra_options>
+          }
+        """
+        # strip special prefixes and save it in a temporary file
+        fd, self._tmpfile = tempfile.mkstemp()
+        with os.fdopen(fd, 'w') as f:
+            for line in open(defconfig):
+                colon = line.find(':CONFIG_')
+                if colon == -1:
+                    f.write(line)
+                else:
+                    f.write(line[colon + 1:])
+
+        self._conf.load_config(self._tmpfile)
+
+        try_remove(self._tmpfile)
+        self._tmpfile = None
+
+        params = {}
+
+        # Get the value of CONFIG_SYS_ARCH, CONFIG_SYS_CPU, ... etc.
+        # Set '-' if the value is empty.
+        for key, symbol in self._SYMBOL_TABLE.items():
+            value = self._conf.get_symbol(symbol).get_value()
+            if value:
+                params[key] = value
+            else:
+                params[key] = '-'
+
+        defconfig = os.path.basename(defconfig)
+        params['target'], match, rear = defconfig.partition('_defconfig')
+        assert match and not rear, '%s : invalid defconfig' % defconfig
+
+        # fix-up for aarch64
+        if params['arch'] == 'arm' and params['cpu'] == 'armv8':
+            params['arch'] = 'aarch64'
+
+        # fix-up options field. It should have the form:
+        # <config name>[:comma separated config options]
+        if params['options'] != '-':
+            params['options'] = params['config'] + ':' + \
+                                params['options'].replace(r'\"', '"')
+        elif params['config'] != params['target']:
+            params['options'] = params['config']
+
+        return params
+
+def scan_defconfigs_for_multiprocess(queue, defconfigs):
+    """Scan defconfig files and queue their board parameters
+
+    This function is intended to be passed to
+    multiprocessing.Process() constructor.
+
+    Arguments:
+      queue: An instance of multiprocessing.Queue().
+             The resulting board parameters are written into it.
+      defconfigs: A sequence of defconfig files to be scanned.
+    """
+    kconf_scanner = KconfigScanner()
+    for defconfig in defconfigs:
+        queue.put(kconf_scanner.scan(defconfig))
+
+def read_queues(queues, params_list):
+    """Read the queues and append the data to the paramers list"""
+    for q in queues:
+        while not q.empty():
+            params_list.append(q.get())
+
+def scan_defconfigs(jobs=1):
+    """Collect board parameters for all defconfig files.
+
+    This function invokes multiple processes for faster processing.
+
+    Arguments:
+      jobs: The number of jobs to run simultaneously
+    """
+    all_defconfigs = []
+    for (dirpath, dirnames, filenames) in os.walk(CONFIG_DIR):
+        for filename in fnmatch.filter(filenames, '*_defconfig'):
+            if fnmatch.fnmatch(filename, '.*'):
+                continue
+            all_defconfigs.append(os.path.join(dirpath, filename))
+
+    total_boards = len(all_defconfigs)
+    processes = []
+    queues = []
+    for i in range(jobs):
+        defconfigs = all_defconfigs[total_boards * i / jobs :
+                                    total_boards * (i + 1) / jobs]
+        q = multiprocessing.Queue(maxsize=-1)
+        p = multiprocessing.Process(target=scan_defconfigs_for_multiprocess,
+                                    args=(q, defconfigs))
+        p.start()
+        processes.append(p)
+        queues.append(q)
+
+    # The resulting data should be accumulated to this list
+    params_list = []
+
+    # Data in the queues should be retrieved preriodically.
+    # Otherwise, the queues would become full and subprocesses would get stuck.
+    while any([p.is_alive() for p in processes]):
+        read_queues(queues, params_list)
+        # sleep for a while until the queues are filled
+        time.sleep(SLEEP_TIME)
+
+    # Joining subprocesses just in case
+    # (All subprocesses should already have been finished)
+    for p in processes:
+        p.join()
+
+    # retrieve leftover data
+    read_queues(queues, params_list)
+
+    return params_list
+
 class MaintainersDatabase:
 
     """The database of board status and maintainers."""
@@ -145,8 +281,12 @@ class MaintainersDatabase:
     def get_status(self, target):
         """Return the status of the given board.
 
+        The board status is generally either 'Active' or 'Orphan'.
+        Display a warning message and return '-' if status information
+        is not found.
+
         Returns:
-          Either 'Active' or 'Orphan'
+          'Active', 'Orphan' or '-'.
         """
         if not target in self.database:
             print >> sys.stderr, "WARNING: no status info for '%s'" % target
@@ -165,8 +305,9 @@ class MaintainersDatabase:
     def get_maintainers(self, target):
         """Return the maintainers of the given board.
 
-        If the board has two or more maintainers, they are separated
-        with colons.
+        Returns:
+          Maintainers of the board.  If the board has two or more maintainers,
+          they are separated with colons.
         """
         if not target in self.database:
             print >> sys.stderr, "WARNING: no maintainers for '%s'" % target
@@ -175,10 +316,10 @@ class MaintainersDatabase:
         return ':'.join(self.database[target][1])
 
     def parse_file(self, file):
-        """Parse the given MAINTAINERS file.
+        """Parse a MAINTAINERS file.
 
-        This method parses MAINTAINERS and add board status and
-        maintainers information to the database.
+        Parse a MAINTAINERS file and accumulates board status and
+        maintainers information.
 
         Arguments:
           file: MAINTAINERS file to be parsed
@@ -210,414 +351,91 @@ class MaintainersDatabase:
             for target in targets:
                 self.database[target] = (status, maintainers)
 
-class DotConfigParser:
+def insert_maintainers_info(params_list):
+    """Add Status and Maintainers information to the board parameters list.
 
-    """A parser of .config file.
-
-    Each line of the output should have the form of:
-    Status, Arch, CPU, SoC, Vendor, Board, Target, Options, Maintainers
-    Most of them are extracted from .config file.
-    MAINTAINERS files are also consulted for Status and Maintainers fields.
+    Arguments:
+      params_list: A list of the board parameters
     """
+    database = MaintainersDatabase()
+    for (dirpath, dirnames, filenames) in os.walk('.'):
+        if 'MAINTAINERS' in filenames:
+            database.parse_file(os.path.join(dirpath, 'MAINTAINERS'))
 
-    re_arch = re.compile(r'CONFIG_SYS_ARCH="(.*)"')
-    re_cpu = re.compile(r'CONFIG_SYS_CPU="(.*)"')
-    re_soc = re.compile(r'CONFIG_SYS_SOC="(.*)"')
-    re_vendor = re.compile(r'CONFIG_SYS_VENDOR="(.*)"')
-    re_board = re.compile(r'CONFIG_SYS_BOARD="(.*)"')
-    re_config = re.compile(r'CONFIG_SYS_CONFIG_NAME="(.*)"')
-    re_options = re.compile(r'CONFIG_SYS_EXTRA_OPTIONS="(.*)"')
-    re_list = (('arch', re_arch), ('cpu', re_cpu), ('soc', re_soc),
-               ('vendor', re_vendor), ('board', re_board),
-               ('config', re_config), ('options', re_options))
-    must_fields = ('arch', 'config')
-
-    def __init__(self, build_dir, output, maintainers_database):
-        """Create a new .config perser.
+    for i, params in enumerate(params_list):
+        target = params['target']
+        params['status'] = database.get_status(target)
+        params['maintainers'] = database.get_maintainers(target)
+        params_list[i] = params
 
-        Arguments:
-          build_dir: Build directory where .config is located
-          output: File object which the result is written to
-          maintainers_database: An instance of class MaintainersDatabase
-        """
-        self.dotconfig = os.path.join(build_dir, '.config')
-        self.output = output
-        self.database = maintainers_database
+def format_and_output(params_list, output):
+    """Write board parameters into a file.
 
-    def parse(self, defconfig):
-        """Parse .config file and output one-line database for the given board.
-
-        Arguments:
-          defconfig: Board (defconfig) name
-        """
-        fields = {}
-        for line in open(self.dotconfig):
-            if not line.startswith('CONFIG_SYS_'):
-                continue
-            for (key, pattern) in self.re_list:
-                m = pattern.match(line)
-                if m and m.group(1):
-                    fields[key] = m.group(1)
-                    break
-
-        # sanity check of '.config' file
-        for field in self.must_fields:
-            if not field in fields:
-                print >> sys.stderr, (
-                    "WARNING: '%s' is not defined in '%s'. Skip." %
-                    (field, defconfig))
-                return
+    Columnate the board parameters, sort lines alphabetically,
+    and then write them to a file.
 
-        # fix-up for aarch64
-        if fields['arch'] == 'arm' and 'cpu' in fields:
-            if fields['cpu'] == 'armv8':
-                fields['arch'] = 'aarch64'
-
-        target, match, rear = defconfig.partition('_defconfig')
-        assert match and not rear, \
-                                '%s : invalid defconfig file name' % defconfig
-
-        fields['status'] = self.database.get_status(target)
-        fields['maintainers'] = self.database.get_maintainers(target)
-
-        if 'options' in fields:
-            options = fields['config'] + ':' + \
-                      fields['options'].replace(r'\"', '"')
-        elif fields['config'] != target:
-            options = fields['config']
-        else:
-            options = '-'
-
-        self.output.write((' '.join(['%s'] * 9) + '\n')  %
-                          (fields['status'],
-                           fields['arch'],
-                           fields.get('cpu', '-'),
-                           fields.get('soc', '-'),
-                           fields.get('vendor', '-'),
-                           fields.get('board', '-'),
-                           target,
-                           options,
-                           fields['maintainers']))
-
-class Slot:
-
-    """A slot to store a subprocess.
-
-    Each instance of this class handles one subprocess.
-    This class is useful to control multiple processes
-    for faster processing.
+    Arguments:
+      params_list: The list of board parameters
+      output: The path to the output file
     """
+    FIELDS = ('status', 'arch', 'cpu', 'soc', 'vendor', 'board', 'target',
+              'options', 'maintainers')
 
-    def __init__(self, output, maintainers_database, devnull, make_cmd):
-        """Create a new slot.
-
-        Arguments:
-          output: File object which the result is written to
-          maintainers_database: An instance of class MaintainersDatabase
-          devnull: file object of 'dev/null'
-          make_cmd: the command name of Make
-        """
-        self.build_dir = tempfile.mkdtemp()
-        self.devnull = devnull
-        self.ps = subprocess.Popen([make_cmd, 'O=' + self.build_dir,
-                                    'allnoconfig'], stdout=devnull)
-        self.occupied = True
-        self.parser = DotConfigParser(self.build_dir, output,
-                                      maintainers_database)
-        self.env = os.environ.copy()
-        self.env['srctree'] = os.getcwd()
-        self.env['UBOOTVERSION'] = 'dummy'
-        self.env['KCONFIG_OBJDIR'] = ''
-
-    def __del__(self):
-        """Delete the working directory"""
-        if not self.occupied:
-            while self.ps.poll() == None:
-                pass
-        shutil.rmtree(self.build_dir)
-
-    def add(self, defconfig):
-        """Add a new subprocess to the slot.
+    # First, decide the width of each column
+    max_length = dict([ (f, 0) for f in FIELDS])
+    for params in params_list:
+        for f in FIELDS:
+            max_length[f] = max(max_length[f], len(params[f]))
 
-        Fails if the slot is occupied, that is, the current subprocess
-        is still running.
+    output_lines = []
+    for params in params_list:
+        line = ''
+        for f in FIELDS:
+            # insert two spaces between fields like column -t would
+            line += '  ' + params[f].ljust(max_length[f])
+        output_lines.append(line.strip())
 
-        Arguments:
-          defconfig: Board (defconfig) name
-
-        Returns:
-          Return True on success or False on fail
-        """
-        if self.occupied:
-            return False
-
-        with open(os.path.join(self.build_dir, '.tmp_defconfig'), 'w') as f:
-            for line in open(os.path.join(CONFIG_DIR, defconfig)):
-                colon = line.find(':CONFIG_')
-                if colon == -1:
-                    f.write(line)
-                else:
-                    f.write(line[colon + 1:])
-
-        self.ps = subprocess.Popen([os.path.join('scripts', 'kconfig', 'conf'),
-                                    '--defconfig=.tmp_defconfig', 'Kconfig'],
-                                   stdout=self.devnull,
-                                   cwd=self.build_dir,
-                                   env=self.env)
-
-        self.defconfig = defconfig
-        self.occupied = True
-        return True
-
-    def wait(self):
-        """Wait until the current subprocess finishes."""
-        while self.occupied and self.ps.poll() == None:
-            time.sleep(SLEEP_TIME)
-        self.occupied = False
-
-    def poll(self):
-        """Check if the subprocess is running and invoke the .config
-        parser if the subprocess is terminated.
-
-        Returns:
-          Return True if the subprocess is terminated, False otherwise
-        """
-        if not self.occupied:
-            return True
-        if self.ps.poll() == None:
-            return False
-        if self.ps.poll() == 0:
-            self.parser.parse(self.defconfig)
-        else:
-            print >> sys.stderr, ("WARNING: failed to process '%s'. skip." %
-                                  self.defconfig)
-        self.occupied = False
-        return True
-
-class Slots:
-
-    """Controller of the array of subprocess slots."""
-
-    def __init__(self, jobs, output, maintainers_database):
-        """Create a new slots controller.
-
-        Arguments:
-          jobs: A number of slots to instantiate
-          output: File object which the result is written to
-          maintainers_database: An instance of class MaintainersDatabase
-        """
-        self.slots = []
-        devnull = get_devnull()
-        make_cmd = get_make_cmd()
-        for i in range(jobs):
-            self.slots.append(Slot(output, maintainers_database,
-                                   devnull, make_cmd))
-        for slot in self.slots:
-            slot.wait()
-
-    def add(self, defconfig):
-        """Add a new subprocess if a vacant slot is available.
-
-        Arguments:
-          defconfig: Board (defconfig) name
-
-        Returns:
-          Return True on success or False on fail
-        """
-        for slot in self.slots:
-            if slot.add(defconfig):
-                return True
-        return False
-
-    def available(self):
-        """Check if there is a vacant slot.
-
-        Returns:
-          Return True if a vacant slot is found, False if all slots are full
-        """
-        for slot in self.slots:
-            if slot.poll():
-                return True
-        return False
-
-    def empty(self):
-        """Check if all slots are vacant.
-
-        Returns:
-          Return True if all slots are vacant, False if at least one slot
-          is running
-        """
-        ret = True
-        for slot in self.slots:
-            if not slot.poll():
-                ret = False
-        return ret
-
-class Indicator:
-
-    """A class to control the progress indicator."""
-
-    MIN_WIDTH = 15
-    MAX_WIDTH = 70
-
-    def __init__(self, total):
-        """Create an instance.
-
-        Arguments:
-          total: A number of boards
-        """
-        self.total = total
-        self.cur = 0
-        width = get_terminal_columns()
-        width = min(width, self.MAX_WIDTH)
-        width -= self.MIN_WIDTH
-        if width > 0:
-            self.enabled = True
-        else:
-            self.enabled = False
-        self.width = width
-
-    def inc(self):
-        """Increment the counter and show the progress bar."""
-        if not self.enabled:
-            return
-        self.cur += 1
-        arrow_len = self.width * self.cur // self.total
-        msg = '%4d/%d [' % (self.cur, self.total)
-        msg += '=' * arrow_len + '>' + ' ' * (self.width - arrow_len) + ']'
-        sys.stdout.write('\r' + msg)
-        sys.stdout.flush()
-
-class BoardsFileGenerator:
-
-    """Generator of boards.cfg."""
-
-    def __init__(self):
-        """Prepare basic things for generating boards.cfg."""
-        # All the defconfig files to be processed
-        defconfigs = []
-        for (dirpath, dirnames, filenames) in os.walk(CONFIG_DIR):
-            dirpath = dirpath[len(CONFIG_DIR) + 1:]
-            for filename in fnmatch.filter(filenames, '*_defconfig'):
-                if fnmatch.fnmatch(filename, '.*'):
-                    continue
-                defconfigs.append(os.path.join(dirpath, filename))
-        self.defconfigs = defconfigs
-        self.indicator = Indicator(len(defconfigs))
-
-        # Parse all the MAINTAINERS files
-        maintainers_database = MaintainersDatabase()
-        for (dirpath, dirnames, filenames) in os.walk('.'):
-            if 'MAINTAINERS' in filenames:
-                maintainers_database.parse_file(os.path.join(dirpath,
-                                                             'MAINTAINERS'))
-        self.maintainers_database = maintainers_database
-
-    def __del__(self):
-        """Delete the incomplete boards.cfg
-
-        This destructor deletes boards.cfg if the private member 'in_progress'
-        is defined as True.  The 'in_progress' member is set to True at the
-        beginning of the generate() method and set to False at its end.
-        So, in_progress==True means generating boards.cfg was terminated
-        on the way.
-        """
+    # ignore case when sorting
+    output_lines.sort(key=str.lower)
 
-        if hasattr(self, 'in_progress') and self.in_progress:
-            try:
-                os.remove(BOARD_FILE)
-            except OSError as exception:
-                # Ignore 'No such file or directory' error
-                if exception.errno != errno.ENOENT:
-                    raise
-            print 'Removed incomplete %s' % BOARD_FILE
+    with open(output, 'w') as f:
+        f.write(COMMENT_BLOCK + '\n'.join(output_lines) + '\n')
 
-    def generate(self, jobs):
-        """Generate boards.cfg
-
-        This method sets the 'in_progress' member to True at the beginning
-        and sets it to False on success.  The boards.cfg should not be
-        touched before/after this method because 'in_progress' is used
-        to detect the incomplete boards.cfg.
-
-        Arguments:
-          jobs: The number of jobs to run simultaneously
-        """
-
-        self.in_progress = True
-        print 'Generating %s ...  (jobs: %d)' % (BOARD_FILE, jobs)
-
-        # Output lines should be piped into the reformat tool
-        reformat_process = subprocess.Popen(REFORMAT_CMD,
-                                            stdin=subprocess.PIPE,
-                                            stdout=open(BOARD_FILE, 'w'))
-        pipe = reformat_process.stdin
-        pipe.write(COMMENT_BLOCK)
-
-        slots = Slots(jobs, pipe, self.maintainers_database)
-
-        # Main loop to process defconfig files:
-        #  Add a new subprocess into a vacant slot.
-        #  Sleep if there is no available slot.
-        for defconfig in self.defconfigs:
-            while not slots.add(defconfig):
-                while not slots.available():
-                    # No available slot: sleep for a while
-                    time.sleep(SLEEP_TIME)
-            self.indicator.inc()
-
-        # wait until all the subprocesses finish
-        while not slots.empty():
-            time.sleep(SLEEP_TIME)
-        print ''
-
-        # wait until the reformat tool finishes
-        reformat_process.communicate()
-        if reformat_process.returncode != 0:
-            sys.exit('"%s" failed' % REFORMAT_CMD[0])
-
-        self.in_progress = False
-
-def gen_boards_cfg(jobs=1, force=False):
-    """Generate boards.cfg file.
-
-    The incomplete boards.cfg is deleted if an error (including
-    the termination by the keyboard interrupt) occurs on the halfway.
+def gen_boards_cfg(output, jobs=1, force=False):
+    """Generate a board database file.
 
     Arguments:
+      output: The name of the output file
       jobs: The number of jobs to run simultaneously
+      force: Force to generate the output even if it is new
     """
     check_top_directory()
-    if not force and output_is_new():
-        print "%s is up to date. Nothing to do." % BOARD_FILE
+
+    if not force and output_is_new(output):
+        print "%s is up to date. Nothing to do." % output
         sys.exit(0)
 
-    generator = BoardsFileGenerator()
-    generator.generate(jobs)
+    params_list = scan_defconfigs(jobs)
+    insert_maintainers_info(params_list)
+    format_and_output(params_list, output)
 
 def main():
+    try:
+        cpu_count = multiprocessing.cpu_count()
+    except NotImplementedError:
+        cpu_count = 1
+
     parser = optparse.OptionParser()
     # Add options here
-    parser.add_option('-j', '--jobs',
-                      help='the number of jobs to run simultaneously')
     parser.add_option('-f', '--force', action="store_true", default=False,
                       help='regenerate the output even if it is new')
+    parser.add_option('-j', '--jobs', type='int', default=cpu_count,
+                      help='the number of jobs to run simultaneously')
+    parser.add_option('-o', '--output', default=OUTPUT_FILE,
+                      help='output file [default=%s]' % OUTPUT_FILE)
     (options, args) = parser.parse_args()
 
-    if options.jobs:
-        try:
-            jobs = int(options.jobs)
-        except ValueError:
-            sys.exit('Option -j (--jobs) takes a number')
-    else:
-        try:
-            jobs = int(subprocess.Popen(['getconf', '_NPROCESSORS_ONLN'],
-                                     stdout=subprocess.PIPE).communicate()[0])
-        except (OSError, ValueError):
-            print 'info: failed to get the number of CPUs. Set jobs to 1'
-            jobs = 1
-
-    gen_boards_cfg(jobs, force=options.force)
+    gen_boards_cfg(options.output, jobs=options.jobs, force=options.force)
 
 if __name__ == '__main__':
     main()
index 449d3d0e0352861bf4e9ba6556c0cbfc1f9ab3b5..d586f1115866125f5768fe0971cb28474c970685 100644 (file)
@@ -20,9 +20,25 @@ class CommandResult:
     def __init__(self):
         self.stdout = None
         self.stderr = None
+        self.combined = None
         self.return_code = None
         self.exception = None
 
+    def __init__(self, stdout='', stderr='', combined='', return_code=0,
+                 exception=None):
+        self.stdout = stdout
+        self.stderr = stderr
+        self.combined = combined
+        self.return_code = return_code
+        self.exception = exception
+
+
+# This permits interception of RunPipe for test purposes. If it is set to
+# a function, then that function is called with the pipe list being
+# executed. Otherwise, it is assumed to be a CommandResult object, and is
+# returned as the result for every RunPipe() call.
+# When this value is None, commands are executed as normal.
+test_result = None
 
 def RunPipe(pipe_list, infile=None, outfile=None,
             capture=False, capture_stderr=False, oneline=False,
@@ -44,10 +60,16 @@ def RunPipe(pipe_list, infile=None, outfile=None,
     Returns:
         CommandResult object
     """
+    if test_result:
+        if hasattr(test_result, '__call__'):
+            return test_result(pipe_list=pipe_list)
+        return test_result
     result = CommandResult()
     last_pipe = None
     pipeline = list(pipe_list)
     user_pipestr =  '|'.join([' '.join(pipe) for pipe in pipe_list])
+    kwargs['stdout'] = None
+    kwargs['stderr'] = None
     while pipeline:
         cmd = pipeline.pop(0)
         if last_pipe is not None:
index e2b4959d58b377dab1546a470df1fa6b07e89af7..b68df5d72e7ffa525b84b622840eedce13358a4e 100644 (file)
@@ -33,7 +33,7 @@ def LogCmd(commit_range, git_dir=None, oneline=False, reverse=False,
     cmd = ['git']
     if git_dir:
         cmd += ['--git-dir', git_dir]
-    cmd += ['log', '--no-color']
+    cmd += ['--no-pager', 'log', '--no-color']
     if oneline:
         cmd.append('--oneline')
     if use_no_decorate:
@@ -152,7 +152,8 @@ def Checkout(commit_hash, git_dir=None, work_tree=None, force=False):
     if force:
         pipe.append('-f')
     pipe.append(commit_hash)
-    result = command.RunPipe([pipe], capture=True, raise_on_error=False)
+    result = command.RunPipe([pipe], capture=True, raise_on_error=False,
+                             capture_stderr=True)
     if result.return_code != 0:
         raise OSError, 'git checkout (%s): %s' % (pipe, result.stderr)
 
@@ -163,7 +164,8 @@ def Clone(git_dir, output_dir):
         commit_hash: Commit hash to check out
     """
     pipe = ['git', 'clone', git_dir, '.']
-    result = command.RunPipe([pipe], capture=True, cwd=output_dir)
+    result = command.RunPipe([pipe], capture=True, cwd=output_dir,
+                             capture_stderr=True)
     if result.return_code != 0:
         raise OSError, 'git clone: %s' % result.stderr
 
@@ -179,7 +181,7 @@ def Fetch(git_dir=None, work_tree=None):
     if work_tree:
         pipe.extend(['--work-tree', work_tree])
     pipe.append('fetch')
-    result = command.RunPipe([pipe], capture=True)
+    result = command.RunPipe([pipe], capture=True, capture_stderr=True)
     if result.return_code != 0:
         raise OSError, 'git fetch: %s' % result.stderr
 
@@ -215,94 +217,6 @@ def CreatePatches(start, count, series):
     else:
        return None, files
 
-def ApplyPatch(verbose, fname):
-    """Apply a patch with git am to test it
-
-    TODO: Convert these to use command, with stderr option
-
-    Args:
-        fname: filename of patch file to apply
-    """
-    col = terminal.Color()
-    cmd = ['git', 'am', fname]
-    pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE,
-            stderr=subprocess.PIPE)
-    stdout, stderr = pipe.communicate()
-    re_error = re.compile('^error: patch failed: (.+):(\d+)')
-    for line in stderr.splitlines():
-        if verbose:
-            print line
-        match = re_error.match(line)
-        if match:
-            print checkpatch.GetWarningMsg(col, 'warning', match.group(1),
-                                           int(match.group(2)), 'Patch failed')
-    return pipe.returncode == 0, stdout
-
-def ApplyPatches(verbose, args, start_point):
-    """Apply the patches with git am to make sure all is well
-
-    Args:
-        verbose: Print out 'git am' output verbatim
-        args: List of patch files to apply
-        start_point: Number of commits back from HEAD to start applying.
-            Normally this is len(args), but it can be larger if a start
-            offset was given.
-    """
-    error_count = 0
-    col = terminal.Color()
-
-    # Figure out our current position
-    cmd = ['git', 'name-rev', 'HEAD', '--name-only']
-    pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE)
-    stdout, stderr = pipe.communicate()
-    if pipe.returncode:
-        str = 'Could not find current commit name'
-        print col.Color(col.RED, str)
-        print stdout
-        return False
-    old_head = stdout.splitlines()[0]
-    if old_head == 'undefined':
-        str = "Invalid HEAD '%s'" % stdout.strip()
-        print col.Color(col.RED, str)
-        return False
-
-    # Checkout the required start point
-    cmd = ['git', 'checkout', 'HEAD~%d' % start_point]
-    pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE,
-            stderr=subprocess.PIPE)
-    stdout, stderr = pipe.communicate()
-    if pipe.returncode:
-        str = 'Could not move to commit before patch series'
-        print col.Color(col.RED, str)
-        print stdout, stderr
-        return False
-
-    # Apply all the patches
-    for fname in args:
-        ok, stdout = ApplyPatch(verbose, fname)
-        if not ok:
-            print col.Color(col.RED, 'git am returned errors for %s: will '
-                    'skip this patch' % fname)
-            if verbose:
-                print stdout
-            error_count += 1
-            cmd = ['git', 'am', '--skip']
-            pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE)
-            stdout, stderr = pipe.communicate()
-            if pipe.returncode != 0:
-                print col.Color(col.RED, 'Unable to skip patch! Aborting...')
-                print stdout
-                break
-
-    # Return to our previous position
-    cmd = ['git', 'checkout', old_head]
-    pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    stdout, stderr = pipe.communicate()
-    if pipe.returncode:
-        print col.Color(col.RED, 'Could not move back to head commit')
-        print stdout, stderr
-    return error_count == 0
-
 def BuildEmailList(in_list, tag=None, alias=None, raise_on_error=True):
     """Build a list of email addresses based on an input list.
 
@@ -478,13 +392,13 @@ def LookupEmail(lookup_name, alias=None, raise_on_error=True, level=0):
     ...
     OSError: Recursive email alias at 'other'
     >>> LookupEmail('odd', alias, raise_on_error=False)
-    \033[1;31mAlias 'odd' not found\033[0m
+    Alias 'odd' not found
     []
     >>> # In this case the loop part will effectively be ignored.
     >>> LookupEmail('loop', alias, raise_on_error=False)
-    \033[1;31mRecursive email alias at 'other'\033[0m
-    \033[1;31mRecursive email alias at 'john'\033[0m
-    \033[1;31mRecursive email alias at 'mary'\033[0m
+    Recursive email alias at 'other'
+    Recursive email alias at 'john'
+    Recursive email alias at 'mary'
     ['j.bloggs@napier.co.nz', 'm.poppins@cloud.net']
     """
     if not alias:
@@ -569,6 +483,8 @@ def GetDefaultUserEmail():
 def Setup():
     """Set up git utils, by reading the alias files."""
     # Check for a git alias file also
+    global use_no_decorate
+
     alias_fname = GetAliasFile()
     if alias_fname:
         settings.ReadGitAliases(alias_fname)
index 00404681c420ee2140936c7aadea805152db221e..d630157f8f70f640858a28d66e0f00b61d74e82a 100644 (file)
@@ -72,7 +72,6 @@ class PatchStream:
         self.in_change = 0               # Non-zero if we are in a change list
         self.blank_count = 0             # Number of blank lines stored up
         self.state = STATE_MSG_HEADER    # What state are we in?
-        self.tags = []                   # Tags collected, like Tested-by...
         self.signoff = []                # Contents of signoff line
         self.commit = None               # Current commit
 
@@ -113,16 +112,6 @@ class PatchStream:
             self.series.AddCommit(self.commit)
             self.commit = None
 
-    def FormatTags(self, tags):
-        out_list = []
-        for tag in sorted(tags):
-            if tag.startswith('Cc:'):
-                tag_list = tag[4:].split(',')
-                out_list += gitutil.BuildEmailList(tag_list, 'Cc:')
-            else:
-                out_list.append(tag)
-        return out_list
-
     def ProcessLine(self, line):
         """Process a single line of a patch file or commit log
 
@@ -271,11 +260,11 @@ class PatchStream:
             elif tag_match.group(1) == 'Patch-cc':
                 self.commit.AddCc(tag_match.group(2).split(','))
             else:
-                self.tags.append(line);
+                out = [line]
 
         # Suppress duplicate signoffs
         elif signoff_match:
-            if (self.is_log or
+            if (self.is_log or not self.commit or
                 self.commit.CheckDuplicateSignoff(signoff_match.group(1))):
                 out = [line]
 
@@ -311,8 +300,10 @@ class PatchStream:
                 # Output the tags (signeoff first), then change list
                 out = []
                 log = self.series.MakeChangeLog(self.commit)
-                out += self.FormatTags(self.tags)
-                out += [line] + self.commit.notes + [''] + log
+                out += [line]
+                if self.commit:
+                    out += self.commit.notes
+                out += [''] + log
             elif self.found_test:
                 if not re_allowed_after_test.match(line):
                     self.lines_after_test += 1
@@ -364,7 +355,7 @@ class PatchStream:
 
 
 def GetMetaDataForList(commit_range, git_dir=None, count=None,
-                       series = Series()):
+                       series = None, allow_overwrite=False):
     """Reads out patch series metadata from the commits
 
     This does a 'git log' on the relevant commits and pulls out the tags we
@@ -376,9 +367,13 @@ def GetMetaDataForList(commit_range, git_dir=None, count=None,
         count: Number of commits to list, or None for no limit
         series: Series object to add information into. By default a new series
             is started.
+        allow_overwrite: Allow tags to overwrite an existing tag
     Returns:
         A Series object containing information about the commits.
     """
+    if not series:
+        series = Series()
+    series.allow_overwrite = allow_overwrite
     params = gitutil.LogCmd(commit_range,reverse=True, count=count,
                             git_dir=git_dir)
     stdout = command.RunPipe([params], capture=True).stdout
index ca34cb9fd8bac0b54eabb7cecb6fbd56a99147ac..2ab6b351d690fc8d8a12bcfd10a27f8f262144ef 100755 (executable)
@@ -25,9 +25,6 @@ import test
 
 
 parser = OptionParser()
-parser.add_option('-a', '--no-apply', action='store_false',
-                  dest='apply_patches', default=True,
-                  help="Don't test-apply patches with git am")
 parser.add_option('-H', '--full-help', action='store_true', dest='full_help',
        default=False, help='Display the README file')
 parser.add_option('-c', '--count', dest='count', type='int',
@@ -143,23 +140,24 @@ else:
         ok = checkpatch.CheckPatches(options.verbose, args)
     else:
         ok = True
-    if options.apply_patches:
-        if not gitutil.ApplyPatches(options.verbose, args,
-                                    options.count + options.start):
-            ok = False
 
     cc_file = series.MakeCcFile(options.process_tags, cover_fname,
                                 not options.ignore_bad_tags)
 
     # Email the patches out (giving the user time to check / cancel)
     cmd = ''
-    if ok or options.ignore_errors:
+    its_a_go = ok or options.ignore_errors
+    if its_a_go:
         cmd = gitutil.EmailPatches(series, cover_fname, args,
                 options.dry_run, not options.ignore_bad_tags, cc_file,
                 in_reply_to=options.in_reply_to)
+    else:
+        print col.Color(col.RED, "Not sending emails due to errors/warnings")
 
     # For a dry run, just show our actions as a sanity check
     if options.dry_run:
         series.ShowActions(args, cmd, options.process_tags)
+        if not its_a_go:
+            print col.Color(col.RED, "Email would not be sent")
 
     os.remove(cc_file)
index 597d526861ad2db2f37fce5a6e3377c77b4c8ef4..e78a7c14f5bfd87f9d7344d9c3ada90d1df973b5 100644 (file)
@@ -14,67 +14,145 @@ import sys
 # Selection of when we want our output to be colored
 COLOR_IF_TERMINAL, COLOR_ALWAYS, COLOR_NEVER = range(3)
 
-class Color(object):
-  """Conditionally wraps text in ANSI color escape sequences."""
-  BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
-  BOLD = -1
-  BRIGHT_START = '\033[1;%dm'
-  NORMAL_START = '\033[22;%dm'
-  BOLD_START = '\033[1m'
-  RESET = '\033[0m'
+# Initially, we are set up to print to the terminal
+print_test_mode = False
+print_test_list = []
 
-  def __init__(self, colored=COLOR_IF_TERMINAL):
-    """Create a new Color object, optionally disabling color output.
+class PrintLine:
+    """A line of text output
 
-    Args:
-      enabled: True if color output should be enabled. If False then this
-        class will not add color codes at all.
+    Members:
+        text: Text line that was printed
+        newline: True to output a newline after the text
+        colour: Text colour to use
     """
-    self._enabled = (colored == COLOR_ALWAYS or
-        (colored == COLOR_IF_TERMINAL and os.isatty(sys.stdout.fileno())))
+    def __init__(self, text, newline, colour):
+        self.text = text
+        self.newline = newline
+        self.colour = colour
 
-  def Start(self, color, bright=True):
-    """Returns a start color code.
+    def __str__(self):
+        return 'newline=%s, colour=%s, text=%s' % (self.newline, self.colour,
+                self.text)
 
-    Args:
-      color: Color to use, .e.g BLACK, RED, etc.
+def Print(text='', newline=True, colour=None):
+    """Handle a line of output to the terminal.
 
-    Returns:
-      If color is enabled, returns an ANSI sequence to start the given color,
-      otherwise returns empty string
+    In test mode this is recorded in a list. Otherwise it is output to the
+    terminal.
+
+    Args:
+        text: Text to print
+        newline: True to add a new line at the end of the text
+        colour: Colour to use for the text
     """
-    if self._enabled:
-        base = self.BRIGHT_START if bright else self.NORMAL_START
-        return base % (color + 30)
-    return ''
+    if print_test_mode:
+        print_test_list.append(PrintLine(text, newline, colour))
+    else:
+        if colour:
+            col = Color()
+            text = col.Color(colour, text)
+        print text,
+        if newline:
+            print
+
+def SetPrintTestMode():
+    """Go into test mode, where all printing is recorded"""
+    global print_test_mode
+
+    print_test_mode = True
 
-  def Stop(self):
-    """Retruns a stop color code.
+def GetPrintTestLines():
+    """Get a list of all lines output through Print()
 
     Returns:
-      If color is enabled, returns an ANSI color reset sequence, otherwise
-      returns empty string
+        A list of PrintLine objects
     """
-    if self._enabled:
-        return self.RESET
-    return ''
+    global print_test_list
 
-  def Color(self, color, text, bright=True):
-    """Returns text with conditionally added color escape sequences.
+    ret = print_test_list
+    print_test_list = []
+    return ret
 
-    Keyword arguments:
-      color: Text color -- one of the color constants defined in this class.
-      text: The text to color.
+def EchoPrintTestLines():
+    """Print out the text lines collected"""
+    for line in print_test_list:
+        if line.colour:
+            col = Color()
+            print col.Color(line.colour, line.text),
+        else:
+            print line.text,
+        if line.newline:
+            print
 
-    Returns:
-      If self._enabled is False, returns the original text. If it's True,
-      returns text with color escape sequences based on the value of color.
-    """
-    if not self._enabled:
-        return text
-    if color == self.BOLD:
-        start = self.BOLD_START
-    else:
-        base = self.BRIGHT_START if bright else self.NORMAL_START
-        start = base % (color + 30)
-    return start + text + self.RESET
+
+class Color(object):
+    """Conditionally wraps text in ANSI color escape sequences."""
+    BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
+    BOLD = -1
+    BRIGHT_START = '\033[1;%dm'
+    NORMAL_START = '\033[22;%dm'
+    BOLD_START = '\033[1m'
+    RESET = '\033[0m'
+
+    def __init__(self, colored=COLOR_IF_TERMINAL):
+        """Create a new Color object, optionally disabling color output.
+
+        Args:
+          enabled: True if color output should be enabled. If False then this
+            class will not add color codes at all.
+        """
+        try:
+            self._enabled = (colored == COLOR_ALWAYS or
+                    (colored == COLOR_IF_TERMINAL and
+                     os.isatty(sys.stdout.fileno())))
+        except:
+            self._enabled = False
+
+    def Start(self, color, bright=True):
+        """Returns a start color code.
+
+        Args:
+          color: Color to use, .e.g BLACK, RED, etc.
+
+        Returns:
+          If color is enabled, returns an ANSI sequence to start the given
+          color, otherwise returns empty string
+        """
+        if self._enabled:
+            base = self.BRIGHT_START if bright else self.NORMAL_START
+            return base % (color + 30)
+        return ''
+
+    def Stop(self):
+        """Retruns a stop color code.
+
+        Returns:
+          If color is enabled, returns an ANSI color reset sequence,
+          otherwise returns empty string
+        """
+        if self._enabled:
+            return self.RESET
+        return ''
+
+    def Color(self, color, text, bright=True):
+        """Returns text with conditionally added color escape sequences.
+
+        Keyword arguments:
+          color: Text color -- one of the color constants defined in this
+                  class.
+          text: The text to color.
+
+        Returns:
+          If self._enabled is False, returns the original text. If it's True,
+          returns text with color escape sequences based on the value of
+          color.
+        """
+        if not self._enabled:
+            return text
+        if color == self.BOLD:
+            start = self.BOLD_START
+        else:
+            base = self.BRIGHT_START if bright else self.NORMAL_START
+            start = base % (color + 30)
+        return start + text + self.RESET
index 8fcfe530dc5beac1453711e4e239ee2dc0d9491d..e8f7472785fb5704fb5df8da85d3758163f9686c 100644 (file)
@@ -55,6 +55,7 @@ This adds functions to enable/disable clocks and reset to on-chip peripherals.
 
 Signed-off-by: Simon Glass <sjg@chromium.org>
 ---
+
  arch/arm/cpu/armv7/tegra2/Makefile         |    2 +-
  arch/arm/cpu/armv7/tegra2/ap20.c           |   57 ++----
  arch/arm/cpu/armv7/tegra2/clock.c          |  163 +++++++++++++++++
@@ -200,7 +201,7 @@ index 0000000..2234c87
         self.assertEqual(result.errors, 0)
         self.assertEqual(result.warnings, 0)
         self.assertEqual(result.checks, 0)
-        self.assertEqual(result.lines, 67)
+        self.assertEqual(result.lines, 56)
         os.remove(inf)
 
     def testNoSignoff(self):
@@ -211,18 +212,18 @@ index 0000000..2234c87
         self.assertEqual(result.errors, 1)
         self.assertEqual(result.warnings, 0)
         self.assertEqual(result.checks, 0)
-        self.assertEqual(result.lines, 67)
+        self.assertEqual(result.lines, 56)
         os.remove(inf)
 
     def testSpaces(self):
         inf = self.SetupData('spaces')
         result = checkpatch.CheckPatch(inf)
         self.assertEqual(result.ok, False)
-        self.assertEqual(len(result.problems), 1)
+        self.assertEqual(len(result.problems), 2)
         self.assertEqual(result.errors, 0)
-        self.assertEqual(result.warnings, 1)
+        self.assertEqual(result.warnings, 2)
         self.assertEqual(result.checks, 0)
-        self.assertEqual(result.lines, 67)
+        self.assertEqual(result.lines, 56)
         os.remove(inf)
 
     def testIndent(self):
@@ -233,7 +234,7 @@ index 0000000..2234c87
         self.assertEqual(result.errors, 0)
         self.assertEqual(result.warnings, 0)
         self.assertEqual(result.checks, 1)
-        self.assertEqual(result.lines, 67)
+        self.assertEqual(result.lines, 56)
         os.remove(inf)