9
0
Fork 0
Commit Graph

8333 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD f73a37aa78 pbl: factorise decompressor
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-30 22:32:13 +01:00
Jean-Christophe PLAGNIOL-VILLARD 36db2a0f05 pbl: move configs to pbl/Kconfig
so it more easy to add new entry and to maintain

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-30 22:27:19 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8d5faa862c at91rm9200ek: fix mem size
we have only 32MiB of sdram
by luck it was working

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-28 09:44:47 +01:00
Jean-Christophe PLAGNIOL-VILLARD 04a90575e2 at91rm9200: fix default TEXT_BASE to 15MiB
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-28 09:44:31 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1e8c9c5a4a at91sam9x5ek: fix wp_pin and detect_pin pin invalid value
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 21:28:19 +01:00
Jean-Christophe PLAGNIOL-VILLARD d32063d8ab at91sam9n12: fix wp_pin invalid value
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 21:28:19 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4dd9fc8106 at91sam9261: fix max bare_init it's 156KiB
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-26 22:23:41 +01:00
Jean-Christophe PLAGNIOL-VILLARD c559eb612f gpio_keys: fix loop on buttons for request and configuration
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-26 22:23:20 +01:00
Sascha Hauer 2089b1e8bd ARM AT91 pm9263: Fix phy address
The ethernet phy address is wrong so no phy is found. Autodetect it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-26 22:22:50 +01:00
Sascha Hauer 6cf5d4f837 Merge branch 'pu/build-warnings' 2013-01-26 22:22:07 +01:00
Antony Pavlov 773f635186 spi: fix compiler warning
Fixes:
 drivers/spi/spi.c:59: warning: no previous prototype for 'spi_new_device'

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-26 22:21:56 +01:00
Sascha Hauer 1247892b73 pbl string: Fix no previous prototype warnings
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 22:36:30 +01:00
Sascha Hauer 2ae54f8161 ARM: Fix reassigning symbols in defconfigs
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 20:45:32 +01:00
Sascha Hauer 7f955da08f ARM bcm2835: Fix noreturn function does return
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 20:43:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2c93912f34 atmel_mci: gpio: request and configure card detect
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD 50559d2c4c atmel_mci: drop board host caps
as it's handle by detecting the IP version and bus with

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD be42bafdd0 atmel_mci: update the SD/SDIO Card Register at request time
as we need to reset the IP

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD c934d62029 atmel_mci: support the SD highspeed since IP version 0x300
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD bc33582a8a atmel_mci: after a software timeout the IP need to be reset
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD 14b2c8f15b atmel_mci: on version 0x0 we need to reset the IP at each request
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD 40a333b062 atmel_mci: rwproof is only needed up to IP version 0x200
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD 7bd476801a atmel_mci: fix host init
disable interrupt and reset the IP at the probe
set timout at the host init

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0a98283554 atmel_mci: version 0x5xx of the IP have a different clk div
so detect and support it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD b9696a0b3f atmel_mci: detect IP version
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD f674fb3125 atmel_mci: use linux regs define
to simplify sync and share code

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD aaa55b560e atmel_mci: rename all function to start with atmci
to be consistent and have a unique naming convention
be in sync with the kernel too

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1f99b4ca84 atmel_mci: rename atmel_mci_readl/writel to atmci_readl/writel
to be consistent with the kernel
This also reduce the ligne length

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD cb9d84a0e1 atmel_mci: rename atmel_mci_host tp atmel_mci
to be consistent with the kernel

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:52:14 +01:00
Alexander Shiyan d3122cc0e8 of: Fix of_find_node_by_path breakage
This patch fixes breakage of of_find_node_by_path when
node not found in tree. This fault is caused, for example,
when no aliases is present in dtb.

barebox@ConnectCore i.MX51:/ oftree -d /env/mm.dtb
/ {
        model = "Freescale i.MX51 CCMX51";
        compatible = "fsl,imx51-ccmx51", "fsl,imx51";
        chosen {
        };
        cpus {
                cpu@0 {
                        compatible = "arm,cortex-a8";
                };
        };
};
barebox@ConnectCore i.MX51:/ oftree -p /env/mm.dtb
unable to handle NULL pointer dereference at address 0x00000000
pc : [<97f1f3f0>]    lr : [<97f19438>]
sp : 95eff988  ip : 00000001  fp : 97f43080
r10: 00000000  r9 : 97f4304c  r8 : 00000000
r7 : 00000000  r6 : e3510034  r5 : 00000001  r4 : 95f0eb28
r3 : 97f43054  r2 : 00000000  r1 : e1a0000b  r0 : 00000000
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32

no stack data available

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-25 19:25:01 +01:00
Sascha Hauer 50d1b2de8e ARM v7: Fix register corruption in v7_mmu_cache_off
v7_mmu_cache_flush stores registers on the stack and restores
them afterwards. Additionally v7_mmu_cache_flush is called
from v7_mmu_cache_off *after* disabling the MMU. With this
the following can happen:

- v7_mmu_cache_off disables the MMU. From now on no new values
  go to the data cache.
- v7_mmu_cache_off calls v7_mmu_cache_flush which in turn puts
  registers on the stack. Due to the MMU being disabled they
  do not go into the data cache.
- In v7_mmu_cache_flush the memory the stack is pointing to is
  overwritten with the values currently being in the cache.
- v7_mmu_cache_flush restores the registers from the stack with
  values from the cache and not the memory where the values have
  previously been written to.

Fix this by storing the registers on the stack *before* we disable
the MMU and restore them after we have called v7_mmu_cache_flush.
This way v7_mmu_cache_flush still restores corrupt register values
for the case when the MMU has been disabled, but we will restore
correct values afterwards.

This has been first observed when switching to gcc-4.7.2 when compiling
in Thumb2 mode, but could explain earlier problems also. The result
here was that the register holding the kernel address in start_linux()
was corrupted so that the kernel could not be started.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 20:37:56 +01:00
Jean-Christophe PLAGNIOL-VILLARD a25d9190fb ohci: only enable drivers if ohci is enabled
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:36:17 +01:00
Jean-Christophe PLAGNIOL-VILLARD 28981f775c ohci: make it depends on !MMU
the current mmu support is broken

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-23 08:36:17 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3de3b677ee Makefile: move cmd_check_file_size to Makefile.lib
so we can use to check pbl

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 12:51:28 +01:00
Sascha Hauer 6f14250038 ARM Ka-Ro TX25: fix compilation with external NAND boot enabled
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 11:24:51 +01:00
Sascha Hauer 59dd999968 ARM Ka-Ro TX25: fix running in SDRAM test
The end of SDRAM is at 0x9fffffff, not at 0x8fffffff. This fixes starting
barebox when it is located in the second SDRAM bank.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 11:24:21 +01:00
Sascha Hauer 1ce154f0bb ARM i.MX25: Add missing device registration for the iomux
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-18 11:24:10 +01:00
Alexander Aring 65fd4afcf2 mtd-core: fix compiler warning
Got this compile warning if MTD_WRITE support isn't set.

drivers/mtd/core.c: In function 'mtd_ioctl':
drivers/mtd/core.c:117:26: warning: unused variable 'ei' [-Wunused-variable]

Add a #ifdef to declaration of variable 'ei' to solve it.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-17 08:13:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD cef34886b7 graphic_utils/fb_open: fix fbsize
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-16 21:33:14 +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