9
0
Fork 0
Commit Graph

95 Commits

Author SHA1 Message Date
Antony Pavlov 68d80258ef MIPS: pbl: add low-level debug asm macros for ns16550
This patch adds macros for ns16550 port initialisation
and single char output. The macros can be used in
MIPS asm pbl code.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-02 11:24:21 +02:00
Antony Pavlov 3c90cbfa64 MIPS: XBurst: use mach-specific debug_ll setup
Ingenic JZ4755 SoC (JZ4750D family) has three UARTs.
So we can give to the user choose which one of them
to use for low level debug (debug_ll) output.

Also this commit adapts the only JZ4755 board
(Ritmix RZX50) for using the new debug_ll port
selection.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-02 11:24:21 +02:00
Oleksij Rempel b993cc4a22 MIPS: ar231x: add netgear-wg102
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:56:33 +02:00
Oleksij Rempel 59fe549733 MIPS: add Atheros ar531x family support
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>
2013-05-31 08:56:33 +02:00
Antony Pavlov df308bd4bf MIPS: asm/mipsregs.h: remove unused stuff
In barebox we have no CONFIG_MIPS_MT_SMTC Kconfig option.
So remove the code under this macro.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:35:25 +02:00
Antony Pavlov 77bcb1fa00 MIPS: rzx50: enable pbl in defconfig
Also enable the iomem and poweroff commands.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-28 08:06:07 +02:00
Antony Pavlov 41448848fc MIPS: XBurst: enable pbl support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-28 08:06:07 +02:00
Antony Pavlov de9afb4d6e MIPS: rzx50: add trivial board_pbl_start
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-28 08:06:07 +02:00
Antony Pavlov e99906d846 MIPS: qemu-malta_defconfig: enable OF support
Also enable iomem.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-13 21:17:10 +02:00
Antony Pavlov 6cdc8f4b02 MIPS: qemu-malta: add device tree support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-13 21:17:10 +02:00
Antony Pavlov 6fe6d9fdc2 MIPS: add initial device tree support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-13 21:17:10 +02:00
Antony Pavlov 8b35646356 MIPS: rzx50: switch to common mach-xburst serial code
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 09:37:20 +02:00
Antony Pavlov 2d4cf6d95d MIPS: xburst: use common serial code
The Ingenic JZ4740, JZ4755 and JZ4770 SoCs use
the same IP core for UART interface. This IP core
is NS16550-compatible, but it needs small workaround.

This commit moves the UART code for Ingenic SoCs
from board level to machine level. So the code
can be reused for different boards or even
different SoCs.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 09:37:20 +02:00
Alexander Shiyan 90c94f4483 Remove unused config.h
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-09 08:42:52 +02:00
Sascha Hauer e91c960a5e mips: initialize malloc pool before start_barebox()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-14 08:41:15 +01:00
Antony Pavlov e43e1498f6 MIPS: pbl: fix none compression support
Here's the error message:

  AS      arch/mips/pbl/piggy.shipped.o
  arch/mips/pbl/piggy.shipped.S: Assembler messages:
  arch/mips/pbl/piggy.shipped.S:1: Error: unrecognized opcode `globl input_data'
  make[1]: *** [arch/mips/pbl/piggy.shipped.o] Error 1
  make: *** [zbarebox.bin] Error 2

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-05 09:43:17 +01:00
Sascha Hauer 56325edd79 Merge branch 'for-next/pbl' 2013-02-04 15:49:07 +01:00
Sascha Hauer da5fe0ba47 Merge branch 'for-next/misc' 2013-02-04 15:49:00 +01:00
Jean-Christophe PLAGNIOL-VILLARD 08147d427f pbl: add none compression support
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 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
Antony Pavlov ba979549d6 MIPS: dlink-dir-320: use mips_add_ram0()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 22:41:27 +01:00
Antony Pavlov 73d54d0dc6 MIPS: rzx50: use mips_add_ram0()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 22:41:27 +01:00
Antony Pavlov 7eb6159f18 MIPS: qemu-malta: use mips_add_ram0()
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 22:41:27 +01:00
Antony Pavlov ee3e2a8392 MIPS: introduce ram0 regions register function
On MIPS there are two segments in CPU address space that
can be used for untranslated memory access: KSEG0 and KSEG1.
KSEG0 is used for cached access and KSEG1 is used for
uncached one.

The instroduced mips_add_ram0() function registers two
address regions for memory access: one in KSEG0 and
the other one in KSEG1.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 22:41:27 +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 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
Antony Pavlov fbf112a3bc MIPS: qemu-malta_defconfig: use pbl
USAGE

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

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-14 08:34:33 +01:00
Antony Pavlov eaa76cc34d MIPS: qemu-malta: add trivial pbl support
Trivial pbl support has no cpu specific setup.
We will add cache setup routines in the future.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-14 08:34:33 +01:00
Antony Pavlov f369f64ed1 MIPS: add pre-bootloader (pbl) image support
This patch is based on ARM pbl support and allows
creating a pre-bootloader binary for compressed image.

For different MIPS SoCs (or even for different boards based
 on the same SoC) the operations carried on in start-pbl.S
can be very different. The additional constraints can be imposed
on the size of the boot code or the special magic labels in
the beginning of the boot code; In some cases it could be
necessary to show CPU is alive as early as possible
(transmit a char via UART or blink a LED).
So the demands for pbl start operation can be very different.

E.g. malta board store boot code at the NOR flash mapped
to the MIPS power-on address (0xbfc00000); it is the most
simple case: we need just copy pbl image from direct-mapped
flash to RAM and jump there.

The XBurst-powered boards store boot code in the beginning
of a NAND flash or in the beginning of SD/MMC card.
In this case we must use simple and short NAND or SD/MMC access
routines to copy pbl image to RAM.

To meet so different demands a simple technique is selected:

* MIPS pbl entry point located in file arch/mips/boot/start-pbl.S.

* MIPS pbl code (see start-pbl.S) assumes that every pbl-enabled
board has a arch/mips/boards/<BOARD>/include/board/board_pbl_start.h
header file. This file must contain definition of
the board_pbl_start macro. This macro is used as start of pbl image;

* the most popular asm routines (stack setup, relocation to link
address, NS16550 initialization (WIP) and so on) are containt
in the arch/mips/include/asm/pbl_macros.h header file.
So board pbl macro can use it if necessary.
It is possible to create similar headers with macros for each
specific SoC; so even if we have many different boards based
on the same SoC the board_pbl_start macro for every board
can be short and clear.

* after board-specific initialization the stack pointer
is initialized and pbl C code is started.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-14 08:34:33 +01:00
Sascha Hauer 8030ab24fa Merge branch 'kconfig' 2012-12-08 12:22:21 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Sascha Hauer 9fe8679d3b debug_ll: Let architectures define PUTC_LL directly
putc already is a regular barebox function. To avoid conflicts and
confusions just let architectures define PUTC_LL directly instead
of going through this addiotional redirection.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-05 19:48:50 +01:00
Antony Pavlov a620f2b259 MIPS: fix out-of-tree build
The commit

  commit d25d94bea6
  Author: Antony Pavlov <antonynpavlov@gmail.com>
  Date:   Fri Jun 1 13:23:20 2012 +0400

      MIPS: make possible board-specific header files

      This patch makes possible to put a board-specific
      header file (e. g. foobar.h) to arch/mips/boards/*/include/board/.

breaks the out-of-tree build for the boards that use it (rzx50).

Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 09:38:26 +01:00
Antony Pavlov e26d312039 MIPS: main_entry.c: fix typo
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:16:50 +01:00
Sascha Hauer 141d32f00f mips: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 22:17:44 +02:00
Sascha Hauer edf068e9cf Merge branch 'for-next/tftp' 2012-10-03 21:17:39 +02:00
Sascha Hauer b51a11be84 defconfig: Switch all defconfig to new tftp command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:23:55 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Sascha Hauer edd582ee63 mips: remove undefined local_irq_save/local_irq_restore
mips currently uses local_irq_save and local_irq_restore
which are not defined. Drop them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Antony Pavlov <antonynpavlov@gmail.com>
2012-09-16 09:47:46 +02:00
Sascha Hauer bed1a6ffab Merge branch 'for-next/pbl' 2012-09-05 12:59:29 +02:00
Sascha Hauer b615445564 Makefile: generate a barebox-flash-image link
Depending on the SoC a barebox.bin, barebox.netx, barebox.s5p, MLO image
is generated. With pbl support there now is an additional
arch/arm/pbl/zbarebox.bin image.

To help the user to determine which image should be flashed to his device,
generate a barebox-flash-image link.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 16:16:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD a231dcdf78 devices: fix missing conversion to DEVICE_ID_DYNAMIC
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-12 14:48:28 +02:00
Antony Pavlov bd6cc52de5 MIPS: add initial exceptions handling
Checking exception handling:

    $ make qemu-malta_defconfig
    $ make

    ...

    $ qemu-system-mips -nodefaults -M malta -m 256 \
       -nographic -serial stdio -bios ./barebox.bin

    ...

    barebox:/ md -l 0x03

    Ooops, address error on load or ifetch!
    EPC = 0xa082783c
    CP0_STATUS = 0x00000006
    CP0_CAUSE = 0x00000410
    CP0_CONFIG = 0x80008482

    ### ERROR ### Please RESET the board ###

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-27 09:54:13 +02:00
Antony Pavlov bdf8405e34 MIPS: remove unused processor-specific constants and macros
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-09 09:23:35 +02:00
Antony Pavlov b35fb39d32 MIPS: malta: register memory bank
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-09 09:23:35 +02:00
Sascha Hauer 4f5862d884 Merge branch 'for-next/poweroff' 2012-07-02 11:04:44 +02:00
Sascha Hauer 93d4ea2ac8 Merge branch 'for-next/mips-clocksource' 2012-07-02 11:04:38 +02:00
Sascha Hauer dd3c898d06 Merge branch 'for-next/dma-cache-align' 2012-07-02 10:59:22 +02:00
Antony Pavlov 41b05dc0da rzx50: add poweroff support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:25 +02:00
Marc Kleine-Budde ed2180d658 blackfin, mips, openrisc, ppc, sandbox, x86: add generic dma_alloc, dma_free inlines
Some drivers call dma_inv_range() on buffers, on arm these buffers must
be cache line aligned. This patch introduces a generic dma_alloc,
dma_free. Archs can implement in their own functions in "asm/dma.h" and add a:

	#define dma_alloc dma_alloc
	#define dma_free dma_free

On all other archs the generic versions, which translate into xmalloc
and free are used.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00