summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ARM: zedboard: add ethernet devicev2013.03.0/zynq/topic/gemSteffen Trumtrar2013-03-252-1/+23
| | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* ARM: zynq: add gem supportSteffen Trumtrar2013-03-255-1/+23
| | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* net: macb: turn off endian_swp_pkt_enSteffen Trumtrar2013-03-252-0/+3
| | | | | | | | | | The core has a bit for swapping packet data endianism. Reset default from Cadence is off. Xilinx however, that uses this core on the Zynq SoCs, opted for on. Turn it off for all devices. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* macb: fix gem_recv circular buffer handlingJean-Christophe PLAGNIOL-VILLARD2013-03-251-16/+16
| | | | | | | | | | | as we use a full buffer no need to check the SOF and reset the rx_tail fix at the same time the gem detection so we can have the rx_buffer allocated correctly according to the IP Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* macb: rename platform dataJosh Cartwright2013-03-2527-42/+65
| | | | | | | | | | The macb/gem core is used by the Zynq SoC. In preparation of sharing the macb driver between at91 and Zynq, rename the platform data to 'struct macb_platform_data', and move the definition to a common location. Signed-off-by: Josh Cartwright <joshc@eso.teric.us> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* phylib: add support for marvell physSteffen Trumtrar2013-03-193-0/+528
| | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* ARM: zynq: Add support for the Avnet Zedboardv2013.03.0/zynq/for-shaSteffen Trumtrar2013-03-197-0/+423
| | | | | | | | The Avnet ZedBoard is an evalboard with a Zynq-7020 based MPSoC. There is also a Digilent ZedBoard, that is the same but only for academic customers. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* ARM: zynq: add zynq fsbl checksum scriptSteffen Trumtrar2013-03-192-0/+73
| | | | | | | | | | | | The bootrom only reads an image if the correct checksum is present in the header. The calculation is pretty simple: sum over all words from 0x20 to 0x44 Two of this words are the image length. That is why the checksum can not be calculated until barebox_image_size is known. The easiest solution is a program that has to be run after make. Maybe this can be replaced with some linker-fu. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* ARM: zynq: add clk support for zynq7000Steffen Trumtrar2013-03-192-0/+423
| | | | | | | | | | | | This adds support for the clocktree on zynq7000 SoCs. The patch is based on clocks.c from the larger patch ARM: zynq: add suppport for Zynq 7000 SoC by Josh Cartwright. The driver in that patch is converted to a platform_driver and code to enable plls was added. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* ARM: zynq: Add new architecture zynqSteffen Trumtrar2013-03-1512-1/+350
| | | | | | | | Add basic support for the Xilinx Zynq-7000 EPP architecture. The Zynq-7000 is an embedded processing platform that combines a Cortex A9 dualcore MPSoC with an Artix-7 FPGA. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* serial: Add driver for Cadence UARTSteffen Trumtrar2013-03-153-0/+312
| | | | | | Support for Cadence UART core. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
* Release v2013.03.0v2013.03.0Sascha Hauer2013-03-041-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: always write page when oob is givenSascha Hauer2013-03-031-1/+1
| | | | | | | | | | | | | Since recently we check for the page being written for not being empty and do not actually write it when it is. This fails for a freshly created flash bad block table when all blocks are good. In this case the bbt code will try to write an empty page, but with the BBT marker in OOB. This page never gets written, so the BBT code will not find a bad block table during next start up and writes it again. Fix this by checking if we want to write OOB data, if we do, then write the page, even if the data is empty. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'pu/imx-fixes'Sascha Hauer2013-02-272-18/+30
|\
| * ARM i.MX35: Let MAX clk be in run-mode-onSascha Hauer2013-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reset value for the MAX clk gate is 0b10, that is it is turned on in CPU run mode and off in stop mode. Configure it that way during startup. The 0b11 value previously in this field causes some nasty behaviour in the Linux kernel: - The i.MX35 has two bits per clock gate which are decoded as follows: 0b00 -> clock off 0b01 -> clock is on in run mode, off in wait/doze 0b10 -> clock is on in run/wait mode, off in doze 0b11 -> clock is always on The MAX clock is needed by the SoC, yet unused in the Kernel, so the common clock framework will disable it during late init time. It will only disable clocks though which it detects as being on. This detection is made depending on the lower bit of the gate. So with the value of 0b11 the clock framework will detect the clock as turned on, yet unused, hence it will turn it off and the system locks up. With the value of 0b10 instead, the clock framework will detect the clock as being disabled and will not try to turn it off, so the system works. The real bug is in the Linux clock framework. However, the value 0f 0b10 seems to be a sane default value, so restore it. This lets Linux work again and gives time to fix the bug in Linux. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM i.MX: Fix booting from NOR when external nand boot is enabledSascha Hauer2013-02-261-17/+29
| | | | | | | | | | | | | | | | | | | | We cannot jump to SDRAM unconditionally in imx*_barebox_boot_nand_external. When we really boot from NOR flash the binary is not yet copied to SDRAM. Instead, let the return value of imx_barebox_boot_nand_external() indicate whether we really boot from NAND and only jump to SDRAM in this case. Otherwise just continue to the normal SoC specific entry. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | menu: fix remove superfluous newline: change puts() -> printf("%s", )Fabio Porcedda2013-02-261-1/+1
|/ | | | | | | | | | | | Fix previous commit: 638f91b "fix compiler warnings: use puts() instead of printf()". Because puts() function add a newline, use instead printf("%s", ). Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OMAP4 USB BOOT: remove double line endingsVicente Bergas2013-02-251-3/+2
| | | | | | | | From previous patch that replaced printf with puts: puts adds it's own line ending, so do not append it manually Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy: fix force modeJean-Christophe PLAGNIOL-VILLARD2013-02-253-0/+9
| | | | | | | | do not try to read the status in force mode the link is up Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx_spi: fix bus-num setupHubert Feurstein2013-02-211-0/+1
| | | | | Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* defaultenv-2: fix base/init/ps1: don't reload /env/configFabio Porcedda2013-02-211-2/+0
| | | | | | | | | | Remove the load of /env/config because is already done by /bin/init, so it doesn't overwrite any changes done by previous /init/* scripts that are loaded by /bin/init. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: imx_fec: fix RMII support for i.MX6Hubert Feurstein2013-02-211-1/+1
| | | | | Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix compiler warnings: use puts() instead of printf()Fabio Porcedda2013-02-212-2/+2
| | | | | | | | | | | | | | | | Use puts() because printf() isn't necessary, to fix the following compiler warnings: /barebox/common/menu.c: In function ‘menu_show’: /barebox/common/menu.c:277:4: warning: format not a string literal and no format arguments [-Wformat-security] /barebox/scripts/omap4_usbboot.c: In function ‘read_asic_id’: /barebox/scripts/omap4_usbboot.c:101:3: warning: format not a string literal and no format arguments [-Wformat-security] Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Vicente <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ubiformat: open flash image readonlySascha Hauer2013-02-211-1/+1
| | | | | | | ubiformat only needs readonly access to the image to flash, so open it readonly. Opening r/w may fail for example on tftp servers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: nand: do not write empty pagesSascha Hauer2013-02-213-4/+40
| | | | | | | | | | | | | | | | | | | | | | Do not write pages which only contain 0xff. UBI expects pages which seem empty to be writable. This got lost with: | commit 3139c3e9a61e70846be8c4f95bb9cffd4465d88a | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Thu Nov 29 11:16:40 2012 +0100 | | mtd core: call driver write function with complete buffer | | mtd->write is supposed to loop around pages internally, no need | to do this in mtd_write. This fixes a huge write performance drop | with the m25p80 driver when it was converted to a mtd driver recently. | Since mtd->writesize is 1 for this driver mtd_write ended up doing | single byte writes on the flash. Introduce mtd_all_ff as a global function since UBI currently has its own implementation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: at91: use -EINVAL for invalid gpio on atmel_mciFabio Porcedda2013-02-197-1/+11
| | | | | | Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* amba: pl011: set RTS during initializationRob Herring2013-02-181-1/+1
| | | | | | | | | | | | RTS is an output. Either flow control is used and you care about the state or it is not used and you don't care. So setting it to active does no harm in either case. This is inline with what Linux does. Mandatory for Highbank as example Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: automount: Added help string about "-d" optionAlexander Shiyan2013-02-181-0/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: fix memset-related crashes caused by recent GCC (4.7.2) optimizationsIvan Djelic2013-02-151-41/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on assumptions about the implementation of memset and similar functions. The current ARM optimized memset code does not return the value of its first argument, as is usually expected from standard implementations. For instance in the following function: void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter) { memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); waiter->magic = waiter; INIT_LIST_HEAD(&waiter->list); } compiled as: 800554d0 <debug_mutex_lock_common>: 800554d0: e92d4008 push {r3, lr} 800554d4: e1a00001 mov r0, r1 800554d8: e3a02010 mov r2, #16 ; 0x10 800554dc: e3a01011 mov r1, #17 ; 0x11 800554e0: eb04426e bl 80165ea0 <memset> 800554e4: e1a03000 mov r3, r0 800554e8: e583000c str r0, [r3, #12] 800554ec: e5830000 str r0, [r3] 800554f0: e5830004 str r0, [r3, #4] 800554f4: e8bd8008 pop {r3, pc} GCC assumes memset returns the value of pointer 'waiter' in register r0; causing register/memory corruptions. This patch fixes the return value of the assembly version of memset. Could you please review, or suggest better alternatives ? Thanks, -- Ivan (this is a shorter and (hopefully) clearer repost of http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/144916.html) The patch adds a 'mov' instruction and merges an additional load+store into existing load/store instructions. For ease of review, here is a breakdown of the patch into 4 simple steps: Step 1 ====== Perform the following substitutions: ip -> r8, then r0 -> ip, and insert 'mov ip, r0' as the first statement of the function. At this point, we have a memset() implementation returning the proper result, but corrupting r8 on some paths (the ones that were using ip). Step 2 ====== Make sure r8 is saved and restored when (! CALGN(1)+0) == 1: save r8: - str lr, [sp, #-4]! + stmfd sp!, {r8, lr} and restore r8 on both exit paths: - ldmeqfd sp!, {pc} @ Now <64 bytes to go. + ldmeqfd sp!, {r8, pc} @ Now <64 bytes to go. (...) tst r2, #16 stmneia ip!, {r1, r3, r8, lr} - ldr lr, [sp], #4 + ldmfd sp!, {r8, lr} Step 3 ====== Make sure r8 is saved and restored when (! CALGN(1)+0) == 0: save r8: - stmfd sp!, {r4-r7, lr} + stmfd sp!, {r4-r8, lr} and restore r8 on both exit paths: bgt 3b - ldmeqfd sp!, {r4-r7, pc} + ldmeqfd sp!, {r4-r8, pc} (...) tst r2, #16 stmneia ip!, {r4-r7} - ldmfd sp!, {r4-r7, lr} + ldmfd sp!, {r4-r8, lr} Step 4 ====== Rewrite register list "r4-r7, r8" as "r4-r8". Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX28: Add missing return value in non-void functionSascha Hauer2013-02-151-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM at91sam9n12ek_defconfig: Fix reassigning of BAREBOX_MAX_IMAGE_SIZESascha Hauer2013-02-151-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM OMAP phycard-a-l1: Add missing includeSascha Hauer2013-02-151-0/+1
| | | | | | | | | | Fixes: arch/arm/boards/phycard-a-l1/lowlevel.c: In function 'pcaal1_sdrc_init': arch/arm/boards/phycard-a-l1/lowlevel.c:105:2: warning: implicit declaration of function 'get_ram_size' [-Wimplicit-function-declaration] arch/arm/boards/phycard-a-l1/lowlevel.c:113:3: warning: implicit declaration of function 'hang' [-Wimplicit-function-declaration] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX21: Fix device names for gpioSascha Hauer2013-02-151-6/+6
| | | | | | | The i.MX21 has a imx1 gpio type. Change the name accordingly, otherwise the gpio driver does not probe successfully. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX35: Fix device names for gpioSascha Hauer2013-02-151-3/+3
| | | | | | | The i.MX35 has a imx31 gpio type. Change the name accordingly, otherwise the gpio driver does not probe successfully. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix brown paper bag bug introduced with compile time loglevelSascha Hauer2013-02-151-4/+1
| | | | | | | | | | __dev_printf is a define which uses a local variable 'ret'. This means that whenever someone does a dev_*(dev, "ret: %d\n", ret); ret will be 0. Fix this by writing this without a local variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add warning above get_ram_sizeSascha Hauer2013-02-131-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX28: change default watchdog reset methodSteffen Trumtrar2013-02-121-0/+12
| | | | | | | | | | | | The default setting for the imx28 watchdog is to do a power-off reset. If the SoC is only powered via battery, then the watchdog powers the chip down, though. According to the datasheet it should still be possible to execute a proper POR with battery power, but testing showed otherwise. When the watchdog power-off reset is disabled, a software reset is executed instead. This works with and without battery power. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ArchosG9: solve regression in second stage lowlevel initVicente Bergas2013-02-121-2/+5
| | | | | | | | | On ArchosG9 the second stage low-level init was the fallback default. Now that the low-level init is forcibly enabled it has to be skipped when already executed from first stage. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* oftree: fix probe supportJean-Christophe PLAGNIOL-VILLARD2013-02-111-0/+7
| | | | | | | | | | in commit e118761c5f7e8 oftree command: refactor the Kconfig CMD_OFTREE_PROBE was remove Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* phy/micrel: KSZ9021 diasable Asym Pause supportJean-Christophe PLAGNIOL-VILLARD2013-02-111-2/+6
| | | | | | | | | Due to a hw bug do not enable teh Asym_Pause. Otherwise if you ser the bit 11 in 4h you will have to unplug and replug the cable to make the phy work. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* macb: add cadence Gigabit GEM supportJean-Christophe PLAGNIOL-VILLARD2013-02-112-42/+317
| | | | | | | | | | | | based on the kernel code detect it via IP version In the GEM we can use a full packet buffer for receive but the buffer size need to be 64bit size aligned. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* macb: fix tx ring sizeJean-Christophe PLAGNIOL-VILLARD2013-02-111-15/+33
| | | | | | | | | the mininal tx ring size is 2 as if one we wrap on the same descriptor and can cause IP lock on GEM (gigabit version) this is always the case Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net macb: reset the IP at initJean-Christophe PLAGNIOL-VILLARD2013-02-111-0/+23
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net macb: enable Tramsmit and Receive at openJean-Christophe PLAGNIOL-VILLARD2013-02-111-2/+3
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net macb: use the macro as in linux for tx/rx buffer ring sizeJean-Christophe PLAGNIOL-VILLARD2013-02-111-16/+17
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net macb: sync remaining define with linuxJean-Christophe PLAGNIOL-VILLARD2013-02-112-49/+92
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net macb: call macb_init at probe explicitlyJean-Christophe PLAGNIOL-VILLARD2013-02-111-5/+3
| | | | | | | | | as eth_device init is planning for remove and we need the init before register the mdio bus Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sama5de3k: add gmacb supportJean-Christophe PLAGNIOL-VILLARD2013-02-111-0/+31
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mmu: Clear unpredictable bits for translation tableAlexander Shiyan2013-02-111-0/+3
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: rename reset and common_reset to barebox_arm_reset_vector and ↵Jean-Christophe PLAGNIOL-VILLARD2013-02-0870-156/+156
| | | | | | | | | arm_cpu_lowlevel_init reset is confusing with the cpu reset and impossible to grep Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>