9
0
Fork 0
Commit Graph

6953 Commits

Author SHA1 Message Date
Alexander Shiyan 714c20c568 Removed duplicate definition for DEVFS_PARTITION_xxx
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 21:58:19 +02:00
Sascha Hauer c48ca0d70c parameter: remove unused struct member
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 14:03:07 +02:00
Sascha Hauer 8cab6a8733 parameter: return empty string for unset parameters
Currently we return NULL for unset parameters. As we can't set them
back to NULL once set this is not very consistent. Return an empty
string instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 14:02:03 +02:00
Alexander Shiyan 0c5554919c PCM038: Initial PCM970 development board support
Some devices need to be moved to the PCM970 source file later, because
in fact these devices are not installed on the main unit PCM038.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:12:43 +02:00
Alexander Shiyan 7372bd7c22 PCM038: Remove unused includes
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:12:43 +02:00
Alexander Shiyan 29db3fb472 PCM038: Call power_init() after initializing SPI.
Power and frequency should be setup before initialize other devices.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:12:43 +02:00
Alexander Shiyan dba202be9e PCM038: Update board description
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:12:43 +02:00
Uwe Kleine-König 3ba37aea2a defaultenv: don't overwrite $user in config
This patch prooved to be useful while working with a colleague on a single
machine. It allows to switch the user without editing /env/config by
just issuing:

	export user=me

. Note, in bash this construct (i.e. an if without body) bails out with:

	Syntax error: "fi" unexpected

but in hush it seems to do the right thing.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:06:08 +02:00
Krzysztof Halasa 254b183339 NOR flash: reduce size of cfiword_t if not using 64-bit bus.
This is done to reduce the binary size a bit.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:03:26 +02:00
Antony Pavlov a42d8ce778 MIPS: malta: use common DEBUG_LL code for NS16550
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:02:33 +02:00
Antony Pavlov 40492a0c13 MIPS: add common header file for DEBUG_LL via NS16550
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:02:33 +02:00
Alexander Shiyan f49387add0 i2c: Added switch for allowing usage 16bit register addresses
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:01:08 +02:00
Uwe Kleine-König 221a541e2d fix typo addreee -> address
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 11:00:58 +02:00
Alexander Shiyan c7c32736bc i2c: Fix barebox crash when 'count' is not set for i2c_read command
Running i2c_read without the 'count' setting causes an error and reboots.

barebox@Phytec phyCORE-i.MX27:/ i2c_read -b 1 -a 0x4a -r 0x00
ERROR: out of memory
no stack data available

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-11 20:12:19 +02:00
Renaud Barbier 6cd96bded7 ppc reloc.S: use a common trap relocation function
The trap relocation function trap_reloc can be used across several PPC
platforms and is added to the ppc library. Accordingly, the definition
of trap_reloc is removed from mach-mpc5xxx/start.S

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-11 09:06:44 +02:00
Renaud Barbier f755d703c4 ppc io.h: update following MMIO primitives fix
Following the MMIO primitives fix, the definitions of __raw_* function
is sourced from Linux and added.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-11 09:06:44 +02:00
Antony Pavlov 87b302f4e2 MIPS: bootm: add "MIPS barebox" handler
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-11 09:05:11 +02:00
Antony Pavlov 2a9d94a81e MIPS: start.S: add "barebox" label at _start + 0x10
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-11 09:04:49 +02:00
Krzysztof Halasa 3ad4b670a9 ARM: put a valid "barebox" signature in the header on big-endian systems.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-10 14:30:28 +02:00
Antony Pavlov 3d0eeb7ef2 README: fix some typos
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-07 09:55:28 +02:00
Krzysztof Halasa be57f20cdd Fix big endian MMIO primitives.
cpu_read*() and cpu_wrire*() are precisely equal to __raw_read*() and
__raw_write*().

Striving for correctness we can replace all those __raw_*() with cpu_*()
as that's exactly what the former ones do.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-07 09:50:29 +02:00
Krzysztof Halasa 14ec1f6d4b ARM: remove unused struct param_struct and related info.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-06 19:19:08 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7e88b6c7f1 complete: fix duplicate env eval list
this can be reproductable by this sequence

barebox:/ <TAB>
.                  ?                  [                  addpart
bootm              cat                cd                 clear
cp                 cpuinfo            crc32              delpart
devinfo            dhcp               echo               edit
erase              ethact             exit               export
false              getopt             go                 help
host               loadb              loadenv            loady
login              ls                 md                 md5sum
memcmp             memcpy             meminfo            memset
menu               mkdir              mount              mtest
mw                 nfs                passwd             ping
printenv           protect            pwd                readline
reset              rm                 rmdir              saveenv
sedit              sh                 sha1sum            sha256sum
sleep              source             test               tftp
time               timeout            true               umount
uncompress         unprotect          version            net.nameserver=
net.domainname=    cs0.baudrate=      cs0.active=        cs1.active=
cs1.ip=            cs1.port=
barebox:/ $<TAB>
$net.nameserver     $net.domainname     $cs0.baudrate
$cs0.active         $cs1.active         $cs1.ip
$cs1.port           $net.nameserver     $net.domainname
$cs0.baudrate       $cs0.active         $cs1.active
$cs1.ip             $cs1.port
barebox:/ $

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-03 20:11:51 +02:00
Sascha Hauer ce38019845 Merge branch 'next'
Conflicts:
	common/hush.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-03 20:10:13 +02:00
Sascha Hauer 71fadbafe2 Release v2012.05.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-03 09:39:33 +02:00
Sascha Hauer 61eb23d44e uimage/file_to_sdram: fix resource allocation
file_to_sdram is used to load an initrd. The resource size is
then used to pass the initrd size to Linux. This means that
the resource size must exactly match the initrd size. Currently
this is not the case since we request the sdram region in chunks
of 8 Kbytes. Fix this by adjusting the resource size when the file
is loaded.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:37:52 +02:00
Sascha Hauer ebde5ae5ac hush: bail out of scripts on syntax error
On a systax error we have to bail out of the shell instead of
setting inp->p to NULL and crash barebox with a NULL pointer
deref. This only happened in scripts.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

This fixes the problem I had (i.e. a boot loop caused by a stray fi in
/env/bin/init).

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-05-02 10:37:33 +02:00
Renaud Barbier bd20ba6798 Preparation stage to support multiple PPC architectures
arch/ppc/Kconfig is reworked to make the configuration environment
architecture neutral. All MPC5200 configuration is moved to the
MPC5200 architecture specific configuration file. These modifications
are reflected in the PCM030 board support.

arch/ppc/Makefile compilation directives are updated in preparation
for the introduction of future cpus/machines.

lib/time.c is moved to the architecture specific directory and the
building instructions updated in the Make files. The file is
cleaned up of unused code.

The definition of L1_CACHE_... is updated and CACHELINE_SIZE is
defined in ppc/include/asm/cache.h for future use by the mpc85xx.
The file mach-mpc5xxx/pci_mpc5200.c and mach-mpc5xxx/start.S are
updated accordingly.

The declaration of search_exception_table is moved in
include/asm/common.h because it is used across architectures.
mach-mpc5xxx/traps.c is also updated to reflect this change.

The definition of exception in asm/ppc_asm.tmpl is updated for future
use by the mpc85xx. The file starts.S in mach-mpc5xxx is updated
accordingly.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:16:30 +02:00
Sascha Hauer 84aec66a83 ppc mmu.h: update for future mpc85xx support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:16:04 +02:00
Sascha Hauer 9527058c81 ppc processor.h: Update for future mpc85xx support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:12:57 +02:00
Sascha Hauer 608a9633e4 ppc: add clr/setbits operations
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:09:49 +02:00
Sascha Hauer 272704fcf3 ppc: Add fls, fls64, __ilog2_u64 and ffs64 bitops
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:09:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD d5d96ca6c3 complete: eth typo fix
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 09:36:26 +02:00
Sascha Hauer deadc3dd7e bootm: fix initrd handling
bootm_initrd tests for data->initrd, but this never becomes true because
the setting of data->initrd is inside a if(bootm_initrd()). Fix this. Also,
do not support the initrd options when initrd is disabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 08:42:41 +02:00
Sascha Hauer e4e3fbd22b improve complete support
The following patch serie improve the complete support
 by adding a complete framework to aalow commands complete support.
 
 The add also car complete support for eval and setting and executable
 file support
 
 This also include an update of the stringlist API to support asprintf
 API
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPnohsAAoJEOrjwV5ZMRf2qeIQAIC7WrIao0mB2pIB+51MqeU+
 sof7GLxUl0MWXFFc3OFEHDcY5grC867mBmB9+uDG1mvcxa/bUpw+jMRMrki5j4Kg
 mjaHQ2UCvDjMHqQi7ISc/WTyJb09mtduFIceP0EftAmG8Mb5n9XOMaKwL9r/UQHB
 ps9MijnI/QeFqbrmBZcuaCp59QsPvipYw8NMJITBu2VvWrpKTIox33qPfNATDuEV
 SzMoLwz+uD7W7dEAM/A1uFdo4K5fLyZruDVGQoQ8CRS+zW3E6rr/EakpN5mhr/66
 dVZYO1xWppBaefIJQ1RD6bvwlFvesuuvQmMtDxsCsp07fyBolEWfFzblrwdkbueY
 NPwWExV5nzbRdAKKSyhU/nHiQ2edOQQZtHDAbnM4zh5e6lK7YLrzVklzT4Dfhzn0
 GRdnjCmiQiaZdmAEHe8wte2nr3Lc01fTsj/EFVA+LYP3a9by1iG2Zn3/ChieVcN4
 R+o/2lMBdhxsTszcmwMOemdqVPlt/0VmEXrKGtjTIZEViuQyyhY8ZtEaf4C0zeln
 Jf60t0ZvkehAJc0Lo4UOygjzvErqcKoHMk7utAjP+bi1KcMgF3Q+HmtCnJJs2FHw
 c40FZj1WcLPStEiS1way7miBakxOy2zPumKi1OXx+140L25C1nvQPYu8ilOZHEyU
 opNlo+wQ8h5sG/054kYL
 =rYfw
 -----END PGP SIGNATURE-----

Merge tag 'complete_update_support' of git://git.jcrosoft.org/barebox into next

improve complete support

The following patch serie improve the complete support
by adding a complete framework to allow commands complete support.

The add also car complete support for eval and setting and executable
file support

This also include an update of the stringlist API to support asprintf
API
2012-05-01 21:41:59 +02:00
Sascha Hauer 8ca42643d4 Mips: malta add cfi flash support
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPnoKmAAoJEOrjwV5ZMRf2XHgP/RJ4UhuI6wGQt00bNIg1mrTP
 AXe3FNNReWbq4zlnOAA1CJujbU4kMhviSg8bP+KTSeM7QAgqbTGf7akXNWGXF4Zi
 9jqIBIlaWADEglMT9gpieOsG1lqpdahWWOhbJHRjCIFzRqr6ZuqpEPR20m9gTofU
 gRaNqxYrKY9b3CHe5/7AeIuMtm36wmdSXOuxNHYT7jPMWetVMx+CPgB71qFcMck+
 IXEl+0Q6u+MfwFCWj7vuQOtNjFJ595taEnOZR3m8Idbh1NOjwrgk+K3M452VV3Th
 LgvYHgORCjppmouZNJvogXGkoqp6B/pcFC9SBZnTbnKC6VdlMk8H3WZoX2NfET55
 sAAXjQEmArX9hcsObAjGb0+3gFsDEqfou+oxp6aI0K1yNLbpBAnry6fQNc9sWqsS
 7znKpQGrgRNjvqY9OyqYDoe6KPMuTn0DY9y1vv9WTemuKPIjXpkScdkWKluhXW/z
 48UEeFesRveSwcWdWKioB3p2QpRXSC1EIuX0HARBaHjMfyWF2GpPtDnLrkFGNemD
 EkEYuoUJXqf2T1f25OMvNvnDKAD7fdKx0i4IoJRNgwumN1upoVVEKg1QYjzpuRS+
 +ForHYeev4K/ylnqgCFV2PCu3Ynyxw586+tSK41JvYRkaJ7pKj0bEjIvrisG1qc1
 pR+jNzspmp8BgSyiyggD
 =caR0
 -----END PGP SIGNATURE-----

Merge tag 'malta-cfi-flash' of git://git.jcrosoft.org/barebox into next

Mips: malta add cfi flash support
2012-05-01 21:41:13 +02:00
Sascha Hauer 61269bd7c6 bootm: fix initrd handling
bootm_initrd tests for data->initrd, but this never becomes true because
the settingof data->initrd is inside a if(bootm_initrd()). Fix this. Also,
do not support the initrd options when initrd is disabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-01 21:40:41 +02:00
Sascha Hauer 4023588064 Merge branch 'pu/assorted' into next 2012-05-01 21:40:07 +02:00
Sascha Hauer 73f76d6b45 Merge branch 'work/hush' into next 2012-05-01 21:39:30 +02:00
Sascha Hauer 55d88805ed Master Fixes
usb driver name (driver_d)
 
 Menu fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPl9TDAAoJEOrjwV5ZMRf24wEP/2fTLxK0JpnxcqurzOV7lySQ
 xZQLU4PoQDilYoZBlsAleyIifeeU1w2fA6mrvAE3aN822225S1pqDLNTEQBo/GRZ
 hbLACOHkpw8VbJ5PmmxXYx6m6+lGMNrAltYPks6C1m/0SdIQGfHk+YjcaucpZGnU
 CwUDS7ZMDRQo+gXNMMjVFpC0DCHVwlBpkedGXxAArrcr1wx3NAyKzapymUQtPplj
 A4NtDpFhoCyVIffZs61qIppLxx8D/9zR+nZUhULAD/3px4mnBt771X0OxY9ngzik
 YmV0VU9C1w1LRlArKIvt+CQQZ84Plks7hekrVIMPIVB15v5unNDTxlQqJvRJw+Oy
 UZGt8z2nDbcMPx1viz6G877/Aa3EmN16O1/1+U20IPVsXbfB6k1wNXJ8t96HSgLD
 WV1KhmxoXfSASQr6INBRCtmnQ9/mfbXRci6i7CfAOh01YoVWG/xlpPl7iagFk/Cl
 xa6R+Ym71bRQnkhVffLseb9/bWuxzm+LH3aom6TMHV9N3PnztuqiM+q0VcbPkIL4
 7ip29YoGV5WoV9Wf2oJKABGWADLxbFXUso++fcdWtmrTX7AVOkWjz+VQvITmDfAM
 iXM1e2Kwgi/uaAZMP3GDxrkvZwtj5UXc0SakGJJyMJ1v4GhWhlI7db05LR4bGfR5
 AyHRr4OvyQid4YFA366I
 =/CNm
 -----END PGP SIGNATURE-----

Merge tag 'j-master-fixes' of git://git.jcrosoft.org/barebox

Master Fixes

usb driver name (driver_d)

Menu fixes
2012-04-30 15:11:08 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9492976bc8 complete: add executable file support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:40 +08:00
Jean-Christophe PLAGNIOL-VILLARD 7e3a16ef14 complete: add delpart complete support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:40 +08:00
Jean-Christophe PLAGNIOL-VILLARD c43a087718 complete: add go and sleep support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:40 +08:00
Jean-Christophe PLAGNIOL-VILLARD b7fc51bd79 complete: add eth interface complete support
use it on ethact

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:40 +08:00
Jean-Christophe PLAGNIOL-VILLARD 8e6f45f54f complete: add empty complete support
for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo,
reset, true, usb, version

for mach-imx and mach-mxs: dump_clocks
for u_serial: mycdev

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:40 +08:00
Jean-Christophe PLAGNIOL-VILLARD 8aa463f785 complete: add help complete support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:39 +08:00
Jean-Christophe PLAGNIOL-VILLARD 1fa17ad5d4 complete: add device name complete support for devinfo
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:34 +08:00
Jean-Christophe PLAGNIOL-VILLARD 9dfb0030ee complete: add generic command complete framework
introduce generic command specific complete callback

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:29:50 +08:00
Jean-Christophe PLAGNIOL-VILLARD c3d60e6df3 complete: add var and device param complete support
with $xx or xx= or if device $xx.yy or xx.yy=

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:22:24 +08:00
Sascha Hauer f152f6a770 stringlist: implement string_list_add_asprintf
Useful for allocating a string list entry on the fly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:22:23 +08:00