9
0
Fork 0
Commit Graph

13599 Commits

Author SHA1 Message Date
Sascha Hauer 00c8cfb3e9 reset: Allow dummy reset lines
Treat NULL as a dummy reset line which is returned by the reset core
when there is no reset line connected to a device (that is, no
reset is described in the device tree). With this consumers can
just use the reset functions without having to check for existence.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-23 09:51:51 +01:00
Jan Remmet b9170a1bde net: eth: Remove ethaddr_param
commit d00db554 introduce ethaddr_param. But it is not initialized, so
devinfo fails to show the mac. Remove it and use edev->ethaddr.

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-20 08:23:07 +01:00
Marek Vasut edc1bfa1fe imx6-mmdc: Fix MAPSR usage
The commit ea1fb2f75d by Eric Nelson
imx6-mmdc: fix automatic power down enable in write level calibration

fixed the incorrect usage of the MAPSR register, but there is one more
place where the MAPSR is misused in the exact same way, so fix that as
well.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 10:34:54 +01:00
Sascha Hauer 63b8d87744 ARM: Fix bug in remap_range
remap_range takes generic MAP_CACHED/MAP_UNCACHED flags which are then
translated into the corresponding ARM specific bits. We call remap_range
internally from dma_alloc_* aswell, but instead of passing the generic
flags we pass the ARM specific bits.
Fix this by creating an internal __remap_range function which takes the
ARM specific bits and use it where appropriate.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-13 08:52:40 +01:00
Sascha Hauer c9a3849ec9 pbl: console: Use console_putc to output the carriage return
console_puts uses console_putc() to output characters, so the carriage
return should be output with the same function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 17:03:37 +01:00
Sascha Hauer d925f1ed32 ARM: calculate compressed dtb len correctly
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-11 15:41:32 +01:00
Uwe Kleine-König d9c2cfd534 usb: mx25: fix bit position of "Host power mask"
The bit MX25_H1_PM_BIT value is handled for port 1 as MX25_OTG_PM_BIT is
for port 0. The latter is called "OPM: OTG power mask" in the i.MX25
reference manual. Its description matches the description of "HPM: Host
power mask" for the host port which is bit 16, not 8.

The Linux kernel (as of 4.3) also has

	#define MX25_H1_PM_BIT                  BIT(16)

.

Fixes: a4076ddf65 ("USB i.MX: Add chipidea driver support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:33:34 +01:00
Andrey Smirnov 8f8f14f9b6 fs: smhfs: Fix return value of truncate()
Returning -ENOSYS as a result of truncate() breaks ability to write to
semihosting host's filesystem, so change the return value to 0. This
shouldn't cause any problems since all of the funcionlaity of
truncate() should is already handled by 'open' (via O_TRUNC) and
'write' (will automatically grow the file size when writing)
automatically

Unfortunately this was missed in original commit that introduced
semihosting

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-09 07:17:57 +01:00
Sascha Hauer b97ac6bd41 Merge branch 'for-next/usb' 2015-11-06 16:10:44 +01:00
Sascha Hauer 6aed170ef1 Merge branch 'for-next/net' 2015-11-06 16:10:44 +01:00
Sascha Hauer b5c7b09c8a Merge branch 'for-next/mvebu' 2015-11-06 16:10:44 +01:00
Sascha Hauer 1d9295b344 Merge branch 'for-next/misc' 2015-11-06 16:10:42 +01:00
Sascha Hauer 736a74ba7a Merge branch 'for-next/mips' 2015-11-06 16:10:37 +01:00
Sascha Hauer 3cdd30342b Merge branch 'for-next/memtest' 2015-11-06 16:10:37 +01:00
Sascha Hauer 5b476ef5e5 Merge branch 'for-next/imx' 2015-11-06 16:10:35 +01:00
Sascha Hauer 812a0fd6b8 Merge branch 'for-next/arm' 2015-11-06 16:10:29 +01:00
Sascha Hauer bc4ea539d4 Release v2015.11.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-06 15:12:43 +01:00
Aleksey Kuleshov 6face0e8ab fb: alloc or free shadowfb whether fb enabled or disabled
Resolution can't be changed anyway once fb_enable() has been called,
since no corresponding fb_disable() call appears in the code.

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-06 07:35:11 +01:00
Aleksey Kuleshov f72056d14e fb: satisfy semantics for shadowfb's alloc/free
Console enable -> alloc shadowfb.
Console disable -> free shadowfb.
Otherwise, if resolution gets changed, shadowfb will not be affected.

Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-06 07:35:11 +01:00
Aleksey Kuleshov 769ddc6133 fbconsole: no need to copy extra line
Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-06 07:35:11 +01:00
Enrico Jorns 867b30a0a0 edit: return error when save_file failed
When writing a file failed (e.g. due to a read-only file system), no
error was reported by the 'edit' tool. To be valid (and to not confuse
the poor user) at least '1' should be returned to indicate an error.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:16:12 +01:00
Enrico Jorns 79f04b235c edit: handle write() call errors in save_file()
save_file() did ignore possible errors of its write() calls.
Now the error code is used as return code for save_file().

write_full() is used instead of write() as it does not perform partial
writes which would require to check for returned size, too.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:15:53 +01:00
Anton Bondarenko 0f0e0b4408 images: Embedsky E9: use image name like the rest of boards
Use name similar to other boards thus remove freescale from image
name since this is not a Freescale board, move SoC type after
company name.

So image name changed from barebox-freescale-imx6q-embedsky-e9.img to
barebox-embedsky-imx6q-e9.img

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:05:07 +01:00
Anton Bondarenko 080a713d31 embedsky-e9: enable barebox_update command for booter update
Simplify booter update with barebox_update command using special
IMX6 MMC BBU handler.

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:05:07 +01:00
Anton Bondarenko 9956226fbb net: phy: wait for link OK after successfull autonegotiation
It may take some time for PHY to indicate link OK status after
autonegotiation completed. This change addresses this case
and prevent network commands fails due to the delay.

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:04:24 +01:00
Trent Piepho a341b4d813 omap socfpga: Switch in flash env loading to use different config
On these systems, the base arch has code to load the in flash
environment from a file located in a FAT filesystem.  This was
controlled by the config option DEFAULT_ENVIRONMENT.  However, that
option turns on compiling the env into the barebox binary itself, as a
backup if the in flash env can't be loaded.

Most other boards have in flash env support unconditionally.  But omap
and socfpga also have xloader configurations, which aren't supposed to
have environment support, either in flash or compiled in.  If the in
flash env code were unconditional, then the xloaders would gain it.

So the code depends on ENV_HANDLING, which is only set on those boards
that are supposed to have an in flash env and not set on all the
boards that aren't supposed to have it.

If someone wanted to create a board that did have a saved env, but
used an alternate to this generic omap/socfpga file in FAT method,
then they'd probably want to create a new config option to control
this code and have it not be enabled for their board.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:03:17 +01:00
Trent Piepho dbd7190295 mci: Print versions with micro levels correctly
The version is stored as BCD, e.g. 0x40 -> ".4" and 0x41 -> ".41".
The latter was getting printed as ".65".  Simplify the logic a bit to
not split the minor into nybbles just to re-assemble it into a byte
again.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 09:01:17 +01:00
Teresa Remmet e6b5597ac6 ARM: am335x_defconfig: Enable SMSC phy driver
The phyCORE-AM335x has a SMSC phy mounted. Enabled the driver for it.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 08:59:43 +01:00
Teresa Remmet b3ff4794e3 dts: phyFLEX-AM335x: Disable second ethernet interface
There are phyFLEX modules with only the first eth phy mounted.
As barebox only supports the first interface anyway, disable
the second interface for now.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 08:59:43 +01:00
Sascha Hauer 664ca39628 hush: Add missing initialize_context() in some places
Before a context can be used it must be initialized. This was forgotten
in several places. Add the missing calls to initialize_context().
This fixes crashes when sourcing empty files

Reported-by: Wjatscheslaw Stoljarski <wjatscheslaw.stoljarski@kiwigrid.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-05 07:56:51 +01:00
Sascha Hauer ed395e4df1 fcntl: Fix O_CREAT clashing with O_RWSIZE_8
O_CREAT and O_RWSIZE_8 are both defined as 0100. Fix this by moving the
O_RWSIZE_* flags to unused bits.

This bug leads to incomplete writes when the destination file is created
and mem_write is involved, for example with the memcpy command:

memcpy -s /some/file -d /dev/ram0 0 0 10

In this case only 8 bytes will be copied and it will be done using 8
byte accesses which may not work properly if the destination is not
sufficiently aligned, i.e.:

memcpy -s /some/file -d /dev/ram0 0 1 8

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-11-04 09:31:02 +01:00
Sascha Hauer 5a5838f5cc memtest: Make cached/uncached test configurable
Add options to explicitly test cached/uncached tests. Without these
options still both cached and uncached is tested if remapping is
supported.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:43 +01:00
Sascha Hauer 8f2549abb7 memtest: By default only test biggest region
Often enough the biggest free region spans most free RAM, so
it doesn't add much value to test the remaining free regions. This
patch changes the default behaviour to only test the biggest free
region and adds the -t option to test all regions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:43 +01:00
Sascha Hauer 4ff9e28abc memtest: move error handling to end of function
Move error handling out of the test code to make the actual test
better visible.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:42 +01:00
Sascha Hauer 8f130c738e memtest: move ctrlc check / progress showing into separate function
To make the actual test a bit better visible in the code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-04 08:03:04 +01:00
Antony Pavlov e856be5361 MIPS: tplink-mr3020_defconfig: enable pbl; make image shorter
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 0649af6f64 MIPS: tplink-mr3020: add pbl low level init
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 36b8e0d37c MIPS: ath79: add pbl_ar9331_ddr1_config macro
See also u-boot_mod/u-boot/cpu/mips/ar7240/hornet_ddr_init.S

See also this openocd commit:

    commit f59d2d9ecfee8899df531b87b7acaa468725f238
    Author: Oleksij Rempel <linux@rempel-privat.de>
    Date:   Fri Jan 30 13:05:31 2015 +0100

        tcl/target|board: add config Atheros ar9331

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 11cea6cf71 MIPS: ath79: add black-swift_defconfig
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 770f98d3bf MIPS: ath79: add black-swift board support
Black Swift is a tiny coin-sized embedded computer based on AR9331 SoC.
See http://www.black-swift.com/ for details.

See also Black Swift kickstarter page:
  https://www.kickstarter.com/projects/1133560316/black-swift-tiny-wireless-computer

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 82bd8277f2 MIPS: ath79: add debug_ll_ar9331_init macro
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 61163945cf MIPS: ath79: add pbl_ar9331_uart_enable macro
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Antony Pavlov 50725503b3 MIPS: ath79: add pbl_ar9331_ddr2_config macro
See also u-boot_mod/u-boot/cpu/mips/ar7240/hornet_ddr_init.S

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Oleksij Rempel 0f8ddb4d53 MIPS: ath79: add pbl_ar9331_pll macro
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Peter Mamonov 23492d36be mips: cpuinfo: report secondary cache configuration
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Peter Mamonov 9c12b4ae1c mips: c-r4k: detect secondary cache
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 08:25:56 +01:00
Sascha Hauer b9f9eef722 memtest: Make comments single line when appropriate
Make the comments single line when they fit into a single line
to make the code a bit shorter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:47 +01:00
Sascha Hauer 680a6a9616 memtest: Make output more compact
Especially when called multiple times the output of the memory test
is quite verbose. Make it more compact by only describing once what
is being done and only use one progress bare instead of three.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:47 +01:00
Sascha Hauer e96b1713ea memtest: split tests in separate functions
The memtest does a bus integrity check and a moving inversions test.
Split the tests into two separate functions so that the can be called
separately.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:47 +01:00
Sascha Hauer b792124a7d rework remap_range
remap_range is for remapping regions with different cache attributes.
It is implemented for ARM and PowerPC only, the other architectures only
provide stubs.
Currently the new cache attributes are passed in an architecture specific
way and the attributes have to be retrieved by calls to
mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags().
Make this simpler by providing architecture independent flags which can
be directly passed to remap_range()
Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function.
The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture
has as default. the arch_can_remap() function returns true if the
architecture can change the cache attributes, false otherwise. This
allows the memtest code to better find out what it has to do.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-11-03 07:27:44 +01:00