9
0
Fork 0
Commit Graph

243 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD ab5b2c35e1 crypto: prepare to allow multiple digest driver
This will allow to have hw driver or asm optimised driver.

Use a priority level to determine which one to use at runtime.
The generic one will be 0.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-27 07:49:45 +01:00
Sascha Hauer 4680b375b9 Merge branch 'for-next/streaming-dma'
Conflicts:
	drivers/mci/dw_mmc.c
2015-03-09 08:32:21 +01:00
Lucas Stach 6c583d0e32 MIPS: change dma_alloc/free_coherent to common prototypes
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-06 07:51:47 +01:00
Antony Pavlov fd0877696d MIPS: add gxemul-malta_defconfig
GXemul supports MIPS Malta but with some limitations.
The most notable problems:

  * PCI-enabled barebox just hangs under GXemul;
  * by default gxemul uses 5Kc processor,
    so we have to force MIPS32R1 processor usage.

To fix these problems the special gxemul-malta_defconfig
is introduced and the board's documentation is updated.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-16 06:30:57 +01:00
Antony Pavlov 57ab60d383 MIPS: qemu-malta: debug_ll: fix serial port speed
qemu-malta.dts uses clock-frequency = <1843200>,
but debug_ll.h for Malta uses another value.

This patch fixes this inconsistency.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-16 06:30:57 +01:00
Antony Pavlov c107eb8465 MIPS: qemu-malta_defconfig: set BAUDRATE=38400
MIPS Malta's YAMON PROM monitor uses serial port speed=38400
(see Malta(tm) User's Manual for details).

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-16 06:30:57 +01:00
Sascha Hauer ff6383c8e4 Merge branch 'for-next/misc' 2015-01-09 17:38:26 +01:00
Masahiro Yamada d8753571b2 sizes.h: move include/sizes.h to include/linux/sizes.h
This file originates in Linux.  Linux has it under include/linux/
directory since commit dccd2304cc90.
Let's move it to the same place as well in barebox.

This commit was generated by the following commands:

  find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:'
  git mv include/sizes.h include/linux/

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-08 14:00:26 +01:00
Masahiro Yamada d6d28acee0 kbuild: move asm-offsets.h rule to ./Kbuild
Currently, MIPS is the only architecture that needs
include/generated/asm-offsets.h, but we have got ./Kbuild file now.

It is a good reason to move asm-offsets.h rule from arch/mips/Makefile
to ./Kbuild and add dummy asm-offsets.c for the other architectures.
asm-offsets.h would be useful for all the architectures.

This commit does not implement include/generated/bounds.h,
but if necessary, it is easy to implement it.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-08 13:55:38 +01:00
Sascha Hauer 8c3b230807 command: passwd: depend on CMD_LOGIN rather than selecting it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-27 14:33:57 +01:00
Alexander Shiyan 9a4cb25a39 treewide: Reuse init_clock() return value for clocksource drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-10 08:42:19 +01:00
Sascha Hauer 7b4cc54579 Merge branch 'for-next/tegra' 2014-11-05 15:47:39 +01:00
Antony Pavlov 4764384549 mips: qemu-malta: add little-endian mode support
We can't just enable SYS_SUPPORTS_LITTLE_ENDIAN for successful
little-endian qemu-malta barebox build. Some byte swapping-related
macros are missed, e.g.:

    arch/mips/mach-malta/pci.c: In function 'pcibios_init':
    arch/mips/mach-malta/pci.c:218:28: error: 'GT_PCI0_CMD_MBYTESWAP_BIT'
    undeclared (first use in this function)
    GT_WRITE(GT_PCI0_CMD_OFS, GT_PCI0_CMD_MBYTESWAP_BIT |
                              ^

This patch adds necessary macros definition.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-10 08:37:31 +02:00
Lucas Stach 22eb395f68 MIPS: malta: fix pci IO resource assignment
Does the same thing as the Linux kernel now.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 08:39:00 +02:00
Sascha Hauer fa93e4fb60 Merge branch 'for-next/resource-err-ptr' 2014-10-02 08:54:42 +02:00
Sascha Hauer ed6e965824 resource: Let dev_request_mem_region return an error pointer
For all users fix or add the error check.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-16 08:32:10 +02:00
Antony Pavlov 24775a6d10 MIPS: ritmix-rzx50_defconfig: update DEBUG_LL; enable IMD
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-15 07:22:25 +02:00
Antony Pavlov 9813069405 MIPS: xburst: Kconfig: add comment
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-15 07:22:25 +02:00
Antony Pavlov 7f443afba4 MIPS: add img-ci20_defconfig
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-11 07:59:45 +02:00
Antony Pavlov 8d9d50f2a6 MIPS: add MIPS Creator CI20 board support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-11 07:59:45 +02:00
Antony Pavlov 11a6204bab MIPS: dts: add jz4780.dtsi
Based on file from https://github.com/MIPS/CI20_linux/tree/ci20-v3.16

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-11 07:59:45 +02:00
Antony Pavlov b872653413 MIPS: xburst: debug_ll: rework common code, add JZ4780 support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-11 07:59:45 +02:00
Antony Pavlov c36205f4ba MIPS: add (another) Ingenic vendor ID
The latest Ingenic CPUs (e.g. JZ4780) use new vendor ID.

Based on commit from https://github.com/MIPS/CI20_linux/tree/ci20-v3.16

  commit 00b672aa52f299f1d67ab18274c3f5e5d5a15767
  Author: Paul Burton <paul.burton@imgtec.com>
  Date:   Mon Jul 8 12:14:28 2013 +0100

      MIPS: add (another) Ingenic vendor ID

      Ingenic have switched to a new vendor ID for the Xburst core used in
      their current SoCs such as the jz4780. Add this vendor ID and handle it
      in addition to their former vendor ID.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-11 07:59:45 +02:00
Antony Pavlov 29158c114b MIPS: xburst: add JZ4780 SoC support
Old Ingenic SoCs (JZ4755, JZ4740) use MIPS32r1 ISA CPU cores
than latest ones (JZ4770, JZ4780) use MIPS32r2.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-11 07:59:45 +02:00
Antony Pavlov 0d7a213345 MIPS: dts: use physical addresses (as Linux does)
With IOMEM() adapted for MIPS we can use physical addresses
in device tree reg property.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-11 07:59:45 +02:00
Sascha Hauer 9cce00617b Merge branch 'for-next/rtc'
Conflicts:
	arch/mips/dts/jz4755.dtsi
	commands/Makefile
2014-08-07 13:13:45 +02:00
Sascha Hauer 38c3b2455e Merge branch 'for-next/misc'
Conflicts:
	lib/Makefile
2014-08-07 13:13:31 +02:00
Sascha Hauer 5b7b7ee5d9 Merge branch 'for-next/metadata'
Conflicts:
	arch/arm/dts/Makefile
	common/Makefile
	lib/Makefile
2014-08-07 06:15:16 +02:00
Antony Pavlov 07f93f5452 MIPS: qemu-malta_defconfig: enable metadata in barebox image (IMD)
Usage:

  $ qemu-system-mips -nodefaults -nographic -M malta -m 256 \
        -serial stdio -monitor null \
        -bios ./barebox-flash-image

  ...

  barebox:/ imd /dev/nor0
  release: 2014.07.0-00401-gd863821
  build: #148 Sat Aug 2 09:22:16 MSK 2014

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:53 +02:00
Antony Pavlov 019a33dad4 MIPS: add support for metadata in barebox images
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:52 +02:00
Sascha Hauer fb60ba388b make: build device trees with obj-dtb-y and pbl-dtb-y
To build an object file from a device tree currently we currently
have to add them to the Makefile twice, once to dtb-y and once to
obj-y. This patch introduces obj-dtb-y and pbl-dtb-y to directly
compile a device tree object file for inclusion in the barebox binary
or the pbl respectively.
The now unneeded dtb-y targets are removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:52 +02:00
Sascha Hauer 3cfa4bc00c move file helper functions to separate file
We have our file helper functions in several places. Move them
all to lib/libfile.c.
With this we no longer have file helpers in fs/fs.c which contains
the core fs functions and no functions in lib/libbb.c which are
not from busybox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:51 +02:00
Antony Pavlov 642f8fbed8 MIPS: ritmix-rzx50_defconfig: enable RTC support
Also enable CONFIG_LONGHELP.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-02 06:45:43 +02:00
Antony Pavlov 07f06779f8 MIPS: dts: jz4755.dtsi: add jz4740-rtc
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-02 06:45:43 +02:00
Antony Pavlov b549a26fc3 watchdog: add minimal jz4740 driver
Also move reset_cpu() for jz4755 SoC from platform code
into the new driver code.

At the moment mach-xburst lacks clk support so jz4740 watchdog
driver looks like a template. We can improve jz4740 watchdog
driver later after adding clk support.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 07:35:51 +02:00
Antony Pavlov 45efb46dbb MIPS: ritmix-rzx50_defconfig: enable LED-related stuff
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 08:03:01 +02:00
Antony Pavlov e928554412 MIPS: dts: rzx50.dts: add LCD backlight
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 08:03:01 +02:00
Sascha Hauer 227a20fe31 consistently use the same bitops.h file
We have many variants of the same bitops.h file. Consistently
use the same file for all architectures which completely use
the generic bitops versions.

Some architectures had static inline versions of functions
identically to the generic versions, these are removed and
the generic versions are used directly now.

Also several architectures depend on the generic find_*_bit
functions but didn't have the GENERIC_FIND_NEXT_BIT Kconfig
option selected. This is added where needed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-17 07:43:58 +02:00
Sascha Hauer 45d593bc5e Merge branch 'for-next/mips' 2014-07-04 17:26:05 +02:00
Antony Pavlov 988ecf4269 MIPS: qemu-malta_defconfig: enable PCI & network stuff
qemu usage:

  # ifconfig br0:1 172.20.0.1
  # qemu-system-mips -nodefaults -nographic -M malta -m 256 \
    -serial stdio -monitor null \
    -bios ./barebox-flash-image \
    -net nic,vlan=0,model=rtl8139 \
    -net tap,vlan=0,script=net_br0.sh

  ...

  barebox:/ eth0.ipaddr=172.20.0.2
  barebox:/ eth0.serverip=172.20.0.1
  barebox:/ ping 172.20.0.1
  phy0: Link is up - 100/Full
  host 172.20.0.1 is alive
  barebox:/

Sample net_br0.sh (for connecting to br0 interface, so you can
connect barebox to your real network):

  #!/bin/sh

  brctl addif br0 $1
  ifconfig $1 up

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:36:16 +02:00
Antony Pavlov 657f7eac3f MIPS: add PCI support for GT64120-based Malta board
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:36:16 +02:00
Antony Pavlov eb062ecbdf MIPS: add dma_alloc_coherent()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:35:47 +02:00
Antony Pavlov ba9b3bc6b9 MIPS: ritmix-rzx50_defconfig: enable gpio stuff
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-27 21:40:07 +02:00
Antony Pavlov 187e4c4eb8 MIPS: dts: jz4755.dtsi: add gpio
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-27 21:40:07 +02:00
Antony Pavlov 62d8a2a0ea MIPS: XBurst: use gpiolib
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-27 21:40:07 +02:00
Sascha Hauer 98360be0fe Documentation: remove doxygen documentation
The doxygen documentation is long outdated. Remove it. It will
be replaced with sphinx based documentation later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-26 10:09:52 +02:00
Antony Pavlov 204e863d48 MIPS: mach-ath79: drop extra 'select HAVE_CLK'
We already have 'select COMMON_CLK' so 'select HAVE_CLK'
is redundant.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-25 09:10:09 +02:00
Antony Pavlov 79027ee88e MIPS: qemu-malta_defconfig: enable gpio & i2c stuff
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-25 08:34:52 +02:00
Antony Pavlov 51cc423920 MIPS: dts: qemu-malta.dts: use i2c-gpio for accessing CBUS FPGA I2C bus
Also we can enable m24c02 eeprom chip in dts-file e.g.

    &i2c0 {
            status = "okay";

            eeprom: m24c02@50 {
                    compatible = "spd";
                    reg = <0x50>;
            };
    };

Alas! qemu mips malta spd m24c02 eeprom chip emulation is not perfect:
the block read operation does not work properly.

Here is an example.

If we read eeprom content byte-by-byte then there is no problem:

    barebox:/ for i in 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f ;
    > do i2c_read -b 0 -a 0x50 -r $i -c 1 ; done
    0x01
    0x75
    0x54
    0x00
    0x82
    0x08
    0x00
    0x01

Compare this output with content of qemu.git/hw/mips/mips_malta.c:

    static eeprom24c0x_t spd_eeprom = {
        .contents = {
            ...
            /* 00000008: */ 0x01,0x75,0x54,0x00,0x82,0x08,0x00,0x01,

But if we read several bytes at once the we have data corruption:

    barebox:/ i2c_read -b 0 -a 0x50 -r 0x8 -c 8
    0x01 0xff 0xff 0xff 0xff 0xff 0xff 0xff

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-25 08:34:52 +02:00
Antony Pavlov f21744fba3 MIPS: dts: qemu-malta.dts: enable CBUS FPGA I2C gpio driver
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-24 09:07:06 +02:00