9
0
Fork 0
Commit Graph

8308 Commits

Author SHA1 Message Date
Antony Pavlov 263e454f7f commands: reset: add shutdown_barebox() before reset_cpu()
Some of controlled by barebox peripheral devices may be
not affected by CPU reset, so we need call shutdown_barebox()
to stop them.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-30 16:03:51 +01:00
Alexander Aring 56f99ec44a arm-mmu: switch pte flags vars to lower case
Old cache/uncache pte flags were declared as defines.
Since these flags are determine at runtime they are static
variables.

This patch switch the naming style of these variables to
lower case which is typically used for variables.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:51:06 +01:00
Jean-Christophe PLAGNIOL-VILLARD b1da925c8a introduce console none support
this will allow to have no console support

Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and
3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple

As on bootstrap we have often very limited size.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 20:34:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2bdc28c475 console: switch select to choice
so we can add easly the console_none support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 20:34:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD c4d0b665dc w1: add ds28ec20 eeprom support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-21 09:05:34 +01:00
Jean-Christophe PLAGNIOL-VILLARD f19a924f92 defaultenv-2: move ps1 to base/init/ps1
so we can overwrite it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-21 09:04:44 +01:00
Sascha Hauer 12ef4d0df9 tftp: reset timer on progress
When during tftp receive operation a ACK packet can't successfully be sent
the timer was resetted directly after send resulting in a deadlock.

This patch changes the timer reset operation in a way that it is only resetted
when the actually is progress, namely in the TFTP_ACK/TFTP_DATA pathes in the
tftp handler.

Reported-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
2013-01-20 17:00:10 +01:00
Sascha Hauer 525d82f33e bootm: move printing of file locations outside verbose mode
The location of files that are booted is a precious information, so print
it by default and not only in verbose mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
2013-01-18 11:56:53 +01:00
Alexander Aring 43afe67390 barebox-data: add barebox-data sections
Add barebox-data section in arm branch to get complete
barebox regions in sdram regions tree.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 11:56:50 +01:00
Alexander Aring f8fd03225d common: add PAGE_ALIGN_DOWN macro
Add PAGE_ALIGN_DOWN macro, which is like PAGE_ALIGN macro but
returns the lower page boundary of address.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 08:28:25 +01:00
Alexander Aring d32b75f003 arm-mmu: move PAGE_ALIGN macro to common.h
PAGE_ALIGN macro is needed to align addresses to page boundaries.
Move this macro to another PAGE_* defines.

Commands which uses remap_range function needs this macro.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 08:28:24 +01:00
Alexander Aring 47326f80a9 remap_range: make function 'remap_range' global
Change function remap_range in arm architecture to make it
global accessable. For example command 'memtest' can change
pte flags to enable or disable cache.

Add dummy function for others architectures that doesn't
have mmu or pte support.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 08:28:20 +01:00
Jean-Christophe PLAGNIOL-VILLARD b26c1c30eb defaultenv-2: execute init/* before timeout
so we can have splash, usb serial, etc...

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-16 21:32:24 +01:00
Sascha Hauer cbc3e0f6d4 Merge branch 'delivery/at91_fixes' of git://git.jcrosoft.org/barebox 2013-01-15 15:33:08 +01:00
Jean-Christophe PLAGNIOL-VILLARD 97d4ca970a qt1070: init default key code first
So the key code provided by platform_data are not overwrited

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-01-15 00:26:19 +08:00
Jean-Christophe PLAGNIOL-VILLARD 8e92f54ad4 atmel_spi: fix spi cs gpio request loop
it's 0 to num_cs - 1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-01-15 00:26:19 +08:00
Jean-Christophe PLAGNIOL-VILLARD e3adde61c1 at91sam9g45: fix i2c typos
arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_i2c':
arch/arm/mach-at91/at91sam9g45_devices.c:158:42: error: 'pdata_i2c' undeclared (first use in this function)
arch/arm/mach-at91/at91sam9g45_devices.c:158:42: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/mach-at91/at91sam9g45_devices.c:163:8: error: expected ':' or '...' before ';' token
arch/arm/mach-at91/at91sam9g45_devices.c:166:8: error: expected ':' or '...' before ';' token

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-01-15 00:26:19 +08:00
Jean-Christophe PLAGNIOL-VILLARD 8c93adeb0a at91: sam9x5ek: use -EINVAL for invalid gpio on 1-wire
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-01-15 00:26:14 +08:00
Sascha Hauer 958eaf4c9d ARM panda: do not set gpio direction of heartbeat LED
We now have gpio_request. When we call gpio_direction_output before
registering a led_gpio the gpio will be implicitely requested by the
gpio core. gpio_request in the led core will then fail resulting in
an unregistered LED.
Fix this by removing the call to gpio_direction_output. The LED core
will do this anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-14 13:40:52 +01:00
Sascha Hauer 50da59975f led: test for led->set callback before calling it
Registering a LED can fail. If someone calls led_set for such
a LED no set function will be there. Fail gracefully in this
case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-14 13:39:20 +01:00
Alexander Aring 1431f4a7fc arm-mmu: remove semicolon in arm mmu.c
Remove semicolon in PAGE_ALIGN macro.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-14 13:21:39 +01:00
Alexander Aring 4607301951 meminfo: fix display of allocated addresses
Fix display to stdout of allocated addresses.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-14 13:21:39 +01:00
Alexander Aring 3f170cdd58 memory: fix size address calculation
Fix size address calculation.

Global variables from <asm/sections.h> which are defined
in linker script *.lds files for end addresses has already
a +1 calculation.

For example:
stext = 0x100 with a size about 0x50 will result a etext = 0x150.
In this case a correct size calculation is (etext - stext) = 0x50.

In function 'request_sdram_region' the end address will be
calculated with (start + size - 1) which result a correct
end address of 0x149 in this example.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-14 13:21:39 +01:00
Alexander Aring ce50c0b2b1 meminfo: fix missing include
Fix include for linkerscript variables like _etext.
Otherwise build with #define DEBUG will fail.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-14 13:21:39 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6cd8247eb7 w1: gpio: use int for gpio
so we can use negative value for invalid gpio

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-01-13 02:44:30 +08:00
Sascha Hauer 46dae550cd ARM am33xx: the hsmmc is a omap4 type mmc controller
The am33xx hsmmc controller is actually a omap4 type controller which
means that it has a 0x100 offset in the registers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-10 20:41:42 +01:00
Sascha Hauer dbdd533232 fixup! commands: add ubiformat
This adds the missing ubiformat.c file missing from:

commit 5a29d4aea7
Author: Wolfram Sang <w.sang@pengutronix.de>
Date:   Mon Dec 17 16:48:33 2012 +0100

    commands: add ubiformat

    Imported from mtd-utils and stripped down to needed functionality.
    Based on an older version (1.4.5.) since the newer do use MEMWRITE
    interfaces which we don't have in barebox (yet).

    Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-09 18:22:35 +01:00
Sascha Hauer 8b5cfc5219 Merge branch 'for-next/ubi' 2013-01-09 10:29:08 +01:00
Sascha Hauer db31ccf293 Merge branch 'for-next/omap' 2013-01-09 10:29:08 +01:00
Sascha Hauer fca2d79470 Merge branch 'for-next/mxs' 2013-01-09 10:29:08 +01:00
Sascha Hauer b0ab3c220f Merge branch 'for-next/misc' 2013-01-09 10:29:08 +01:00
Sascha Hauer 2497433516 Merge branch 'for-next/mips' 2013-01-09 10:29:08 +01:00
Sascha Hauer 8c46b854f7 Merge branch 'for-next/imx' 2013-01-09 10:29:08 +01:00
Sascha Hauer 21a0fc1ce3 Merge branch 'for-next/gpio-request' 2013-01-09 10:29:07 +01:00
Sascha Hauer 0a73521333 Merge branch 'for-next/at91' 2013-01-09 10:29:07 +01:00
Sascha Hauer eba123ccf2 Release v2013.01.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-09 10:01:34 +01:00
Steffen Trumtrar 2a7b142b76 stringlist: fix cpp macro in header
Both include/string.h and include/stringlist.h define the c preprocessor macro
__STRING_H. This leads to a compile time error, in case both files are
(indirectly) included.

Rename the macro to __STRINGLIST_H in stringlist.h.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-09 09:42:47 +01:00
Sascha Hauer 04cb446c9a ARM omap / mci: Fix register offsets
Only the OMAP4 has a register offset of 0x100 in the register space. Fix
this by using the device id mechanism. This became broken when the device
register convenience functions were introduced.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-08 10:02:13 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4db8ba4be3 at91: add dump mux command
This will allow to dump all pin configuration in a nice table
and if the bank/pin is specified the pin details

barebox@Atmel at91sam9x5-ek:/
Pin     PIOA            PIOB            PIOC            PIOD

0:      [gpio] set      [periph A]      [gpio] set      [periph A]
1:      [periph A]      [periph A]      [gpio] set      [periph A]
2:      [gpio] set      [periph A]      [gpio] set      [periph A]
3:      [gpio] set      [periph A]      [gpio] set      [periph A]
4:      [gpio] set      [periph A]      [gpio] set      [gpio] clear
5:      [gpio] set      [periph A]      [gpio] set      [gpio] set
6:      [gpio] set      [periph A]      [gpio] set      [periph A]
7:      [gpio] set      [periph A]      [gpio] set      [periph A]
8:      [gpio] set      [gpio] set      [gpio] set      [periph A]
9:      [periph A]      [periph A]      [gpio] set      [periph A]
10:     [periph A]      [periph A]      [gpio] set      [periph A]
11:     [periph A]      [gpio] set      [gpio] set      [periph A]
12:     [periph A]      [gpio] set      [gpio] set      [periph A]
13:     [periph A]      [gpio] clear    [gpio] set      [periph A]
14:     [gpio] set      [gpio] clear    [gpio] set      [gpio] set
15:     [periph A]      [gpio] set      [gpio] set      [gpio] set
16:     [periph A]      [gpio] set      [gpio] clear    [periph A]
17:     [periph A]      [gpio] set      [gpio] set      [periph A]
18:     [periph A]      [gpio] set      [gpio] set      [periph A]
19:     [periph A]      [periph A]      [gpio] set      [gpio] set
20:     [periph A]      [periph A]      [gpio] clear    [gpio] set
21:     [gpio] set      [periph A]      [gpio] clear    [gpio] clear
22:     [gpio] set      [periph A]      [gpio] set      [periph A]
23:     [gpio] set      [periph A]      [gpio] set      [periph A]
24:     [gpio] set      [periph A]      [gpio] set      [periph A]
25:     [gpio] set      [periph A]      [gpio] set      [periph A]
26:     [gpio] set      [periph A]      [gpio] set      [periph A]
27:     [gpio] clear    [periph A]      [gpio] set      [periph A]
28:     [gpio] set      [periph A]      [gpio] clear    [periph A]
29:     [gpio] set      [periph A]      [gpio] set      [periph A]
30:     [gpio] set      [periph A]      [gpio] set      [periph A]
31:     [gpio] set      [periph A]      [gpio] set      [periph A]
barebox@Atmel at91sam9x5-ek:/
pioA27 configuration

[gpio] clear
multidrive = disable
pullup = disable
degitch = disable
debounce = disable
pulldown = enable
schmitt trigger = enable

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:56:59 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9ce0055e9c at91: drop AT91_BASE_PIOx for soc specific one for none boot code
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:56:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD a0f94be44e at91: introduce AT91SAM9_SMC and AT91SAM9_TIMER
to select the smc and timer for at91sam9 soc

This will allow to simplify the Makefile

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:56:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5155a0235f at91: wdt: drop AT91_SYS_BASE
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:56:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD 398f4b17da at91: SMC: switch to platform_driver
This will allow to support multiple arch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:56:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD 29597813dc at91: autodetect the soc one time at postcore_initcall
and then register a device

The code is take from linux

drop AT91_BASE_SYS for dbgu

factorise the soc type in the Kconfig but keep the ARCH_ so far
as the device code have the same function accross soc which for now does not
allow us to compile soc together

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:56:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD 49edc4c987 at91: PIT: switch to platform_driver
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:56:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD e7edecb87a at91: at91sam9: provide its own clkdev for pit
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:33:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 64c94fcd76 at91: sync with the kernel address base
add non AT91_SYS_BASE offset base address define

This will prepare for multi arch support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:33:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD a23017d350 at91: introduce Kconfig to select the dbgu for lowlevel debug
so we can drop AT91_BASE_SYS too

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:33:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD f81bcf17b3 at91: pmc: drop AT91_BASE_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:33:24 +01:00
Jean-Christophe PLAGNIOL-VILLARD 75fb25220c at91: factoryse PMC address as it's the same on every soc
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-07 18:33:24 +01:00