9
0
Fork 0
Commit Graph

289 Commits

Author SHA1 Message Date
Renaud Barbier 99fbfdfc1b ppc: add and update device tree fixup functions
This adds support for populating derived properties of the mpc85xx SOC
which are not typically included in the dtb directly.

This update is based on U-Boot code from common/fdt_support.c
and arch/powerpc/cpu/mpc85xx/fdt.c - version git-2b26201.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-05 10:28:04 +02:00
Sascha Hauer 068bed22a6 Set model and hostname at boardlevel
With multiboard support the compiletime generated BOARDINFO string
gets more and more meaningless. This removes it from Kconfig and
replaces it with a variable that can be set at boardlevel.

Also many boards have a standard setting for the hostname in the
environment. This patch also moves the standard to C code by calling
barebox_set_hostname().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:40:55 +02:00
Renaud Barbier 89cdacb0cb P2020RDB: map boot flash.
The chip select 0 (boot flash) registers are updated by the board
specific code as it is not done by the cpu early initialisation
any more.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-05 12:09:22 +02:00
Renaud Barbier 2fbd8f1ade mpc85xx: remove local bus initialisation
The early initialisation of chip select 0 (boot flash) is removed
from cpu initialisation. This removes the dependency on board
base address definition.

Consequently, cpu_init_f is not called in the start-up code but
added to the init call list as cpu_init_r. Also the file
arch/ppc/mach-mpc85xx/fsl_lbc.c is deleted.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-05 12:09:22 +02:00
Renaud Barbier b04e3c7b9d ppc ddr-8xxx: misplaced parenthesis
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 08:40:53 +02:00
Sascha Hauer 8afe2cb4d4 Merge branch 'for-next-manual/oftree-linux-sync' 2013-07-02 07:08:46 +02:00
Renaud Barbier 5c179dd08d ppc 85xx: early I2C support
Early I2C support is introduced to read SPD data from memory
modules prior to the loading of the I2C driver.

This code is based on the equivalent file fsl_i2c.c in directory
drivers/i2c from U-Boot version git-a71d45d.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-27 08:38:37 +02:00
Renaud Barbier ae2ecf974f ppc 8xxx: core DDR driver functions
These files are the driver interface to handle the memory
initialisation from reading the SPD data to writing the memory
controller registers.

This code is based on the equivalent files main.c in directory
arch/powerpc/cpu/mpc8xxx/ddr and ddr-gen2.c in directory
arch/powerpc/cpu/mpc85xx. Both are from U-Boot version git-a71d45d.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-27 08:38:04 +02:00
Renaud Barbier 4b65ac7e69 ppx 8xxx: DDR registers value calculation
The functions in this file calculate and store the value for each
register of the memory controller.

This code is based on the equivalent file in directory
arch/powerpc/cpu/mpc8xxx/ddr from U-Boot version git-a71d45d.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-27 08:38:04 +02:00
Renaud Barbier 017da99b77 ppc 8xxx: DDR utility and memory options
This commit adds functions to calculate clock cycles, configure the
LAW registers and populate board memory options.

This code is based on the equivalent files in directory
arch/powerpc/cpu/mpc8xxx/ddr from U-Boot version git-a71d45d.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-27 08:38:04 +02:00
Renaud Barbier 8567f00489 ppc 8xxx: DIMM parameters calculation
This code calculates the DIMM characteritics i.e DIMM
organization parameters and timings for DDR2 memory based on
SPD data.

It also provides a function to find out the lowest common DIMM
parameters to be used for all DIMMs.

This code is based on the equivalent files in directory
arch/powerpc/cpu/mpc8xxx/ddr from U-Boot version git-a71d45d.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-27 08:38:04 +02:00
Renaud Barbier c6594ae1a3 ppc 8xxx: DDR headers
Structures are defined to record the common DIMM parameters
and memory options on a per DIMM basis.

This code is based on the equivalent files in directory
arch/powerpc/cpu/mpc8xxx/ddr from U-Boot version git-a71d45d.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-27 08:38:04 +02:00
Renaud Barbier d8341ecadc ppc asm: DDR headers
Definitions and structures have been added to record DIMM parameters
and configure memory options.

The code is based on the equivalent files in the directory
arch/powerpc/include/asm from U-boot version git-a71d45d.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-27 08:38:04 +02:00
Renaud Barbier 9bd04c9adb P2020RDB: update build configuration
Update the P2020RDB build configuration to enable useful development
commands.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 22:16:56 +02:00
Renaud Barbier eb99c09f7c ppc: gianfar MDIO buses
This commit creates MDIO bus devices to separate the MDIO bus
abstraction from the Ethernet device initialisation.

It also updates the configuration of the P2020RDB ports.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 22:16:55 +02:00
Sebastian Hesselbarth 0b79c3bb64 OF: base: sync of_find_node_by_path with linux OF API
Barebox of_find_node_by_path requires a node to be passed as start node
to start searching. Linux OF API does not pass this node and no current
user of it in barebox is passing anything else than the root node.
Therefore, we rename current function to of_find_node_by_path_from and
introduce a Linux OF API compatible of_find_node_by_path that always
passes the current root_node. Also, all current users of that function
are updated to reflect the API change.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 21:20:50 +02:00
Sascha Hauer c179e7c46b ppc: remove strcasecmp/strncasecmp prototypes
ppc does not implement these, so remove the prototypes and use
the ones from include/linux/string.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-20 17:17:28 +02:00
Sascha Hauer 07bdbf9c6d Merge branch 'for-next/ppc' 2013-06-02 16:28:34 +02:00
Renaud Barbier e0594d51a3 ppc: update I/O accessors
The I/O accessors in_bexx, out_bexx, in_lexx and out_lexx are updated
to the latest Linux version.

The patch is tested on a MPC8544 based board and solved I/O access
issues on I2C devices.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:52:17 +02:00
Renaud Barbier b73be000f3 ppc io.h: fix indentation
To prepare for an update of the I/O functions to the latest Linux
version, the indentation is fixed.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:52:17 +02:00
Antony Pavlov 679628b64f ppc: boards: add barebox.lds to .gitignore
Without this patch after compiling barebox
for a PowerPC board we have 'git status'
output looking like this:

  # Untracked files:
  #   (use "git add <file>..." to include in what will be committed)
  #
  #       arch/ppc/boards/pcm030/barebox.lds

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-13 09:36:29 +02:00
Sascha Hauer c4da77611c Merge branch 'for-next/oftree' 2013-04-04 14:20:32 +02:00
Sascha Hauer e9e5919dd3 net: fec: use standard phy type defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-09 20:09:23 +01:00
Sascha Hauer 6d6edfcf53 bootm: Pass unflattened devicetree to handlers
This makes it possible to modify the tree in the handlers.
This is necessary because the initrd addresses are only
known inside the handlers, but not to the generic bootm
code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:29 +01:00
Sascha Hauer 9d8e08353c of: fixup unflattened devicetree
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:29 +01:00
Sascha Hauer 2749fbac48 nor flash: integrate into mtd
CFI Flash is currently handled outside the mtd layer which makes it
a special case. Integrate it into mtd so that we get rid of this
special status.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 23:37:53 +01:00
Sascha Hauer da5fe0ba47 Merge branch 'for-next/misc' 2013-02-04 15:49:00 +01:00
Sascha Hauer a01e54d201 treewide: fix format specifiers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-27 14:24:10 +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
Alexander Shiyan f6984b8b88 Remove bad Kconfig reference to HAS_CFI
Barebox not contain symbol HAS_CFI, so remove all references to it.

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
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 edf068e9cf Merge branch 'for-next/tftp' 2012-10-03 21:17:39 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +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 26eab97b41 net fec_mpc5200: Use same platform_data as i.MX fec driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-23 20:35:20 +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
Renaud Barbier 4271879e3b fsl TSEC: register map boundary
The end boundary of each registers set may overlap with the start
of the next register set. Subtract 1 to the end boundary.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-11 10:06:09 +02:00
Sascha Hauer 6662e16dbb Merge branch 'for-next/ppc'
Conflicts:
	arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
	arch/ppc/configs/p2020rdb_defconfig
	arch/ppc/mach-mpc85xx/include/mach/immap_85xx.h
2012-09-05 12:59:54 +02:00
Sascha Hauer 038307cb5e Merge branch 'for-next/i2c' 2012-09-05 12:59:29 +02:00
Sascha Hauer 40126ad7f8 Merge branch 'for-next/fs' 2012-09-05 12:59:29 +02:00
Renaud Barbier 075209e8f3 ppc: p2020rdb i2c support
Support for both i2c busses on the p2020rdb board is added and the
configuration file is updated to add the I2C driver and commands.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Renaud Barbier f8e0d68214 i2c: adapt the i2c-imx driver to mpc85xx machines
A function to calculate the frequency divider and digital filter sampling rate
for the 85xx processors is added to the i2c-imx driver. Hence, this driver is
usable on IMX and 85xx machines.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 11:16:48 +02:00
Renaud Barbier 0f9ca850a5 ppc: add unaligned support
This file is copied from Linux 2.6.39. It is added so that the P2020RDB
can still build.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 08:55:29 +02:00
Renaud Barbier 086d09c913 mpc85xx: header update
In order to use the IMX i2c driver on the mpc85xx SOC, the file mach/clocks.h
is renamed mach/clock.h. Files using this header are updated accordingly.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-04 08:29:09 +02:00
Renaud Barbier 705d7fa2b4 ppc/asm/fsl_i2c.h is removed
The i2c-imx driver is able to support the I2C bus on the 85xx machines
with minor modifications. It already defines register offsets. Therefore,
this header file is no longer needed.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:34:25 +02:00
Renaud Barbier f17e6c568b mpc85xx: i2c frequency
A function that returns the system bus frequency used to compute the i2c bus
frequency is added for future use.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-03 09:34:25 +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
Renaud Barbier fa345fa012 ppc: P2020RDB Ethernet configuration
Minimal support of the Ethernet interface on the P2020RDB board. Only
the eTSEC3 interface is supported.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Renaud Barbier ad7e9562fc fsl: Freescale TSEC specific initialization.
The fsl_eth_init function maps the TSEC registers (MAC, TBI and
external PHY access registers). It also passes the PHY address and
TBI registers initialization values.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Renaud Barbier caf788ae5a net: GIANFAR driver
This update adds the GIANFAR driver along with the configuration
and build files.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Renaud Barbier fdf4a8c672 ppc: GIANFAR base address definition
In view of the introduction of the GIANFAR Ethernet driver,
the mdio and gianfar base address are defined.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-10 21:15:36 +02:00
Sascha Hauer 93d4ea2ac8 Merge branch 'for-next/mips-clocksource' 2012-07-02 11:04:38 +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
Antony Pavlov e172909335 clocksource: move the NSEC_PER_SEC constant to common header
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-29 10:19:58 +02:00
Sascha Hauer edefeca62d ppc 85xx: Fix whitespaces
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-24 11:18:32 +02:00
Renaud Barbier fdf4816908 Minimal P2020RDB platform support and configuration file
This is limited board support for the Freescale P2020RDB in single CPU
mode. The DDR is configured for a memory bus running at 667Mhz.
The system boots from NOR flash and provides the console at 115200
bauds, no other drivers are included.

Finally, the PPC Kconfig and make file make the building of
the P2020RDB platform firmware possible.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:39 +02:00
Renaud Barbier 99dc5d2c9a 85xx core support build files
Kconfig and Makefile allow to include the 85xx cpu support in the
compilation process.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:39 +02:00
Renaud Barbier 1b1c049175 Set _text_base to the firmware relocation address
_text_base assignment has been removed earlier from lib/board.c
for the mpc5xxx.
For the 85xx, _text_base is set to where the firmware relocates
in memory as passed by the function input variable.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:39 +02:00
Renaud Barbier 61cce55e64 MPC85xx start-up support code
This patch adds initialization functions used by the e500v2 start-up code
and board specific code (L2 cache initialization).
Other functions help identify the CPU or return the programmed memory size.
Finally, the Makefile and Kconfig file are added.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:39 +02:00
Renaud Barbier 75b3324e07 85xx clocking support
This patch contains functions that returns information on
the CPU and buses frequency (LBC, DDR, system).
It also includes the clock source driver.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:39 +02:00
Renaud Barbier afd44efd70 85xx: LAW and LBC initialization
This patch includes functions to initialize LAW registers and
the chip select 0 of the CPU.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:38 +02:00
Renaud Barbier 89b030a0e7 e500v2 traps and TLB support code
This patch defines functions to set interrupt vector registers and
functions to handle hardware exceptions.
It also defines support functions to set and search TLBs.
Finally, the Makefile is added.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:38 +02:00
Renaud Barbier ac28dd8620 Initial e500v2 start up code
This is the first part of the start-up code. The source code origin is
U-boot and is slightly modified to have e500v2 CPU support in 32-bit
mode only.
It includes the power-up entry point, CPU initialization code and
exports definition for D-cache flush and I-cache invalidate.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:38 +02:00
Renaud Barbier 16e2a4295d Initial Freescale 85xx Headers.
These header files are added to provide a minimal support to the
Freescale 85xx cpu to boot on a P2020RDB platform.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-17 20:33:38 +02:00
Alexander Shiyan 714c20c568 Removed duplicate definition for DEVFS_PARTITION_xxx
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 21:58:19 +02:00
Renaud Barbier 6cd96bded7 ppc reloc.S: use a common trap relocation function
The trap relocation function trap_reloc can be used across several PPC
platforms and is added to the ppc library. Accordingly, the definition
of trap_reloc is removed from mach-mpc5xxx/start.S

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-11 09:06:44 +02:00
Renaud Barbier f755d703c4 ppc io.h: update following MMIO primitives fix
Following the MMIO primitives fix, the definitions of __raw_* function
is sourced from Linux and added.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-11 09:06:44 +02:00
Renaud Barbier bd20ba6798 Preparation stage to support multiple PPC architectures
arch/ppc/Kconfig is reworked to make the configuration environment
architecture neutral. All MPC5200 configuration is moved to the
MPC5200 architecture specific configuration file. These modifications
are reflected in the PCM030 board support.

arch/ppc/Makefile compilation directives are updated in preparation
for the introduction of future cpus/machines.

lib/time.c is moved to the architecture specific directory and the
building instructions updated in the Make files. The file is
cleaned up of unused code.

The definition of L1_CACHE_... is updated and CACHELINE_SIZE is
defined in ppc/include/asm/cache.h for future use by the mpc85xx.
The file mach-mpc5xxx/pci_mpc5200.c and mach-mpc5xxx/start.S are
updated accordingly.

The declaration of search_exception_table is moved in
include/asm/common.h because it is used across architectures.
mach-mpc5xxx/traps.c is also updated to reflect this change.

The definition of exception in asm/ppc_asm.tmpl is updated for future
use by the mpc85xx. The file starts.S in mach-mpc5xxx is updated
accordingly.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:16:30 +02:00
Sascha Hauer 84aec66a83 ppc mmu.h: update for future mpc85xx support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:16:04 +02:00
Sascha Hauer 9527058c81 ppc processor.h: Update for future mpc85xx support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:12:57 +02:00
Sascha Hauer 608a9633e4 ppc: add clr/setbits operations
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:09:49 +02:00
Sascha Hauer 272704fcf3 ppc: Add fls, fls64, __ilog2_u64 and ffs64 bitops
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:09:22 +02:00
Sascha Hauer 86b9eb2105 Merge branch 'work/dns' into next 2012-04-16 11:34:41 +02:00
Sascha Hauer abe4560c8a Use DEVICE_ID_DYNAMIC where applicable
We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids,
Use it where applicable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-16 09:43:02 +02:00
Sascha Hauer 81568b32c3 ppc: remove unused bd_t
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-13 23:38:22 +02:00
Sascha Hauer a9c5b19b70 ppc: remove unused init_board_data function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-13 23:36:50 +02:00
Sascha Hauer 146a7fe4a2 Merge branch 'work/uimage' into next
Conflicts:
	arch/ppc/lib/ppclinux.c
	commands/bootm.c
	include/boot.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-17 16:33:57 +01:00
Sascha Hauer 84fd8a956c Merge branch 'pu/ppc-oftree' into next 2011-12-15 20:12:32 +01:00
Sascha Hauer 14aac3f197 remove old ft_build support
This is unused now as its only user (ppc) is switched to
libfdt based oftree support"

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 20:11:48 +01:00
Sascha Hauer 609c4a988c ppc: switch to libfdt based oftree implementation
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 20:11:47 +01:00
Sascha Hauer 07fc87d530 ppc pcm030: Move memory registration to mem_initcall
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 20:11:35 +01:00
Sascha Hauer 8f69f2ebf2 pcm030: update defconfig
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 20:11:28 +01:00
Sascha Hauer bed937b1b3 ppc pcm030: Fix device resource sizes
The device resources are much smaller, the resource mechanism
revealed this because of overlapping devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 20:11:24 +01:00
Sascha Hauer fc72640247 remove unused watchdog header
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 11:46:50 +01:00
Sascha Hauer d4e5c6b8a0 bootm: use new uimage code
This switches the bootm code to the new uimage code. Also
bootm can now handle other types of images than uImages.
Currently the only architecture making use of this is
arm which allows to boot zImages, raw images and barebox
images.
I intended to make a more bisectable series from this but
I failed becuase there are many dependencies and no matter
how I tried the patches grew bigger and and bigger. So I
decided to put this all in a single patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 11:07:11 +01:00
Sascha Hauer a746f4685a remove old ft_build support
This is unused now as its only user (ppc) is switched to
libfdt based oftree support"

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-14 13:40:17 +01:00
Sascha Hauer a46098b1d1 ppc: switch to libfdt based oftree implementation
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-14 13:40:17 +01:00
Sascha Hauer 58a0dde1f7 ppc pcm030: Move memory registration to mem_initcall
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-14 13:40:17 +01:00
Sascha Hauer 7b9d903a20 pcm030: update defconfig
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-14 13:40:16 +01:00
Sascha Hauer 3505465f64 ppc pcm030: Fix device resource sizes
The device resources are much smaller, the resource mechanism
revealed this because of overlapping devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-14 13:40:16 +01:00
Sascha Hauer 0ee6847f7b Merge branch 'next' 2011-12-07 12:03:13 +01:00
Sascha Hauer 3fd9020731 ppc mpc5200: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-07 11:43:30 +01:00
Sascha Hauer 70f7691d41 fix malloc space sizes
end is start + size - 1, not start + size.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-03 10:09:29 +01:00
Sascha Hauer 351058fa51 bootm: push relocate_image up to the generic command
All handlers used to just relocate the image without any checks, so
we are doomed if we write outside of SDRAM or will overwrite ourselves.
Move the relocation up to the generic part where we have a chance
of catching these issues.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:59:56 +01:00
Sascha Hauer 7631e76c0b Merge branch 'work/magicvars' into next 2011-11-29 20:52:03 +01:00
Sascha Hauer 020a30be0d add magicvar command
The magicvar command gives an overview about all environment variables
with a special meaning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 20:51:31 +01:00
Sascha Hauer 38884dabbe remove irq support fragments
We never had interrupt support in barebox and we have no plans to
add interrupt support. Even if we do I doubt the current fragments
of irq support are helpful, so remove them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-28 11:41:33 +01:00
Sascha Hauer 6b8503baab Merge branch 'master' into next 2011-10-23 13:38:39 +02:00
Loïc Minier 4e26fba680 Only pass -P to cpp when generating ld scripts
When building sandbox with ccache, one would hit warnings such as:
    warning: 'struct mmsghdr' declared inside parameter list
on random files; a way to reproduce this issue is to build a simple
file doing just:
    #include <sys/socket.h>

    int main(void) {
        return 0;
    }

    gcc -Wall -P -c -o foo foo.c

But actually the -P flag is only useful when generating non-C files,
such as linker scripts in the case of barebox.  Removing the -P flag
from all the gcc invocations, except when generating .lds files makes
the warning go away.  It turns out that this is what
linux/scripts/Makefile.build also does nowadays.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-18 09:18:41 +02:00