9
0
Fork 0
Commit Graph

287 Commits

Author SHA1 Message Date
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 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Sascha Hauer 3aa17a1e18 PPC: FSL DDR: Fix compiler warning
Fixes:

arch/ppc/boards/freescale-p1022ds/ddr.c: In function 'fsl_ddr_board_info':
arch/ppc/boards/freescale-p1022ds/ddr.c:39:21: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 10:17:28 +02:00
Holger Schurig c524f74d5b commands: NET_DHCP -> CMD_DHCP
* this compile option actually turns on a command, so name it
  accordingly
* also move the Kconfig definition into commands/Kconfig, thus
  placing getopt into the "Network commands" section
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:49 +02:00
Holger Schurig 5bd055b660 commands: NET_PING -> CMD_PING
* this compile option actually turns on a command, so name it
  accordingly
* also move the Kconfig definition into commands/Kconfig, thus
  placing getopt into the "Network commands" section
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:48 +02:00
Holger Schurig 26a34100e8 commands: HUSH_GETOPT -> CMD_GETOPT
* this compile option actually turns on a command, so name it
  accordingly
* also move the Kconfig definition into commands/Kconfig, thus
  placing getopt into the "Shell scripting commands" section
* while at it, improve Kconfig documention

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 10:03:48 +02:00
Michel Stam 9f556d4b6f x86: ns16550: Rework driver to allow for x86 I/O space
The current implementation fakes a memory-mapped I/O device
at 0x3f8 and 0x2f8, then uses platform read/write functions
to do the actual reading and writing. These platform functions
only exist for the x86 platform; better to move the I/O
routines into the driver and have the driver request I/O ports
using request_ioport_region.

Signed-off-by: Michel Stam <michel@reverze.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-09 19:31:42 +02:00
Sascha Hauer 48f1fa806f ppc: io: Add _IO_BASE define
To make inb/outb and friends work.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-09 08:31:06 +02:00
Renaud Barbier 3e445eb1c7 ppc: P2020RDB: add environment partition support
Add an environment partition and support commands so that the system
configuration can be permanent.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-03 07:53:52 +02:00
Renaud Barbier 18156665c0 ppc: P1022DS: update Kconfig and Makefile
Kconfig and make files are updated to build the Freescale P1022DS
image.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-19 07:43:02 +01:00
Renaud Barbier a6750920ed ppc: mpc85xx: add stashing support
The eTSEC 2.0 devices found on the 85xx family of SoCs support stashing
buffer descriptors in the L2 cache. This updates the device tree fixup
for these devices to ensure that the stashing related properties used
by Linux are initialised correctly.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-19 07:43:02 +01:00
Renaud Barbier e172c508c6 ppc: add Freescale P1022DS board support
Add support for the Freescale P1022DS. Driver support is limited to:
 - I2C
 - Ethernet
 - Serial
 - NOR flash
 - PIXIS FPGA

System clock configuration is read from the FPGA but has only been
tested using a 133MHz system clock and 100MHz DDR clock.

Boot arguments are defined in the environment to boot over NFS with
a console configured at 115200 bauds.

Enabling branch prediction is moved from board support to the platform
support for all boards as it is a CPU feature.

Some the code is from U-Boot version git-be937b5.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-19 07:43:01 +01:00
Renaud Barbier cbeded2bad ppc: mpc8xxx: add DDR3 support
Add DDR3 support into the MPC8xxx DDR driver.

To avoid confusion, the function set_ddr_sdram_mode is renamed
set_ddr2_sdram_mode.

Checking for errors is simplified in the DDR2 DIMM parameters
computation to be consistent with DDR3.

This code is derived from the files found in directory drivers/ddr/fsl
from U-Boot version git-be937b5.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-19 07:42:58 +01:00
Renaud Barbier 64e38721cd common: DDR3 SPD verification support
Add DDR3 SPD verification support for use by the PPC 8xxx DDR driver.

This is based on the equivalent files from U-Boot version git-be937b5.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-18 17:32:31 +01:00
Renaud Barbier df188547a9 ppc: add SoC support for Freescale P1022
CPU, DDR, and LBC definitions are added to support the Freescale P1022.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-18 17:29:06 +01:00
Sascha Hauer 7dd3401d03 Merge branch 'for-next/ppc' 2014-03-07 09:25:56 +01:00
Renaud Barbier 6a9481b28e ppc: P2020RDB and DA923RC configuration
Enable memtest, MMU and iomem support on the P2020RDB and DA923RC.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-03 09:07:20 +01:00
Renaud Barbier 8c2f0bb041 ppc: add support for memtest with cache disabled
Add support to enable caching on a memory region during the memory test.

Tested on P2020RDB and DA923RC.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-03 09:07:20 +01:00
Renaud Barbier 35c49577de MPC85xx: fix memory layout to prevent corruption during memtest
Memory regions on MPC85xx boards are incorrectly defined leading to
corruption when running memory tests. This patch updates the memory
layout of MPC85xx boards so that critical memory regions can be
correctly reserved during the memory test.

Tested on the P2020RDB and DA923RC.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-03 09:07:20 +01:00
Renaud Barbier 3df00bd62d ppc: mpc85xx: fix memory size calculation
Fix the chip select configuration register offset increment and summing
of bank size so that, for chip select index greater than 0, barebox can
determine the total memory size from enabled banks.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-14 21:22:43 +01:00
Renaud Barbier a7dd756dfc DA923RC: increase malloc size
Increase the malloc size so that larger debug Linux image can be loaded.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-04 08:13:40 +01:00
Renaud Barbier ba6ed94b71 DA923RC: add boot script
A boot script is added to load DTB and Linux images for booting.
The init script starts the boot script after a 5s timeout window.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-04 08:13:40 +01:00
Sascha Hauer ada75addee Merge branch 'for-next/ppc' 2014-02-03 09:55:55 +01:00
Sascha Hauer 52c43f5731 Merge branch 'for-next/mtd' 2014-02-03 09:55:55 +01:00
Sascha Hauer ca10989374 Merge branch 'for-next/bootm' 2014-02-03 09:52:34 +01:00
Renaud Barbier 78f3ac7619 DA923RC: enable UBI/UBIFS configuration
The UBI/UBIFS support is enabled and a script is added to attach
the UBI device and mount the UBIFS partition. This allows the loading
of firmware images from the NOR flash.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-30 08:42:54 +01:00
Renaud Barbier b99e853aff ppc: remove bit operation headers file conflict
Removed the ppc bit operation functions and definitions in the ppc
file asm/bitops.h since these are already defined in the asm-generic header
files. Moved ffs64 definition to the mpc85xx header files because
the function requires the inclusion of linux/log2.h which also includes
asm/bitops.h.

The conflict was noted when UBIFS was enabled in barebox.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-30 08:42:53 +01:00
Alexander Shiyan 7c1a6a3c91 ppc 8xxx: Fix logic
Expression (pdimm->data_width >= 32) || (pdimm->data_width <= 40)
always evaluates to true, so probably we need to use "&&" here.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 21:38:10 +01:00
Renaud Barbier d711f9cfd8 cpu-85xx: start.S: clean up imported code
Correct double spaces, indentation and vocabulary in the imported
start-up code.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-16 14:00:31 +01:00
Renaud Barbier b79f78997d ppc: cpu-85xx: import U-Boot start-up code
Import U-Boot start-up code from version git-9407c3fc to include the
latest CPUs errata and make future U-Boot code inclusion easier. The
code import is limited to the currently supported CPUs P2020/MPC8544.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-16 14:00:30 +01:00
Renaud Barbier b2c5a39dfc ppc: mpc85xx: change bss relocation
The linker script and start up code are updated so that the bss
section is located above the barebox binary in memory. This removes
the reliance on a hard-coded value.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-16 14:00:30 +01:00
Renaud Barbier fd0314b47e ppc: mpc85xx: use common linker script
Updates to use a common linker script for all mpc85xx boards,
avoiding duplication.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-16 14:00:30 +01:00
Renaud Barbier 48b5b23286 ppc: cpu-85xx: upgrade MMU support to v2 pages sizes
TLB support for the 85xx CPUs has been upgraded to support the MMUv2
page size definitions. This has been imported from U-Boot version
git-9407c3fc. This allows for future CPUs to make use of the new MMU
support.

Also the definition of MAX_MEM_MAPPED has been changed to avoid type
casting with "min" macro.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-16 14:00:30 +01:00
Sascha Hauer 9bd67f5e61 bootm: introduce bootm_load_os helper
The common bootm code used to load uImage contents to SDRAM
before calling into the handlers if possible. This makes the
handlers complicated since they have to handle many cases. Instead,
introduce a helper to load the os after the handlers have figured
out a good load address.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-10 11:53:18 +01:00
Sascha Hauer 7a653248be Merge branch 'for-next/ppc' 2013-12-06 08:23:27 +01:00
Renaud Barbier 249c48a075 ppc: DA923RC: update board initialisation
Pull the board device reset GPIO pin high as this prevents
PCI bus probing.
The function da923rc_board_init_r is called at the postcore
initcall level so that the udelay function can take advantage
of the core initialisation.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-18 10:50:56 +01:00
Renaud Barbier 0e2308643c ppc: mpc85xx: add fsl,mpic node frequency property
The clock frequency property of the device tree node fsl,mpic is
added as it is needed by the PCI driver to function in newer
Linux version.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-18 10:50:56 +01:00
Alexander Shiyan 7a1e15bff8 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format.
No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 08:52:05 +01:00
Sascha Hauer ded25480d8 Merge branch 'for-next/rpi' 2013-11-07 08:31:47 +01:00
Renaud Barbier 9e1528ce7c ppc: mpc85xx: build directives
Add the Kconfig and Makefile directives to build barebox
for the GEIP DA923RC board.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 11:04:38 +01:00
Renaud Barbier 8f44af62c5 ppc: DA923RC: add board support
Add the GEIP DA923RC board support. This includes core
files as well as defconfig and make files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 11:04:38 +01:00
Renaud Barbier 04180c0464 ppc: mpc85xx: enable DDR driver
The use of the DDR driver as well as early I2C support is
enabled for board initialising their memory through SPD EEPROM
data.

A SOC specific function returning the DDR bus frequency
is added for the DDR driver to translate DDR timings to
register values.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 11:04:37 +01:00
Renaud Barbier eb3ce91e59 ppc: mpc85xx: define Ethernet port count
Because the port count is different between the MPC8544 and
existing CPU support, the Ethernet port count is defined on
a per CPU basis.
Accordingly, the TBI PHY initialisation code is updated.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 11:04:37 +01:00
Renaud Barbier 2e6750444e ppc: mpc85xx: mpc8544 support
Definitions are added to support the mpc8544 sOC.

The function returning the I2C bus frequency is updated
to take into account the mpc8544 specific clock ratio.
A mininal GPIO API is added to enable and set the GPIO
out pins.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 11:04:37 +01:00
Sascha Hauer d7c1612d65 of: Add a context pointer to fixup functions
If drivers want to fixup their specific instance they need some context
to know which instance they have to fixup.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-06 10:24:46 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6a5121f748 console: factorise function to get the first enabled console
rename it to console_get_first_active

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:19:46 +02:00
Renaud Barbier 9d2745425e ppc: bootm: relocate fdt to valid boot memory
For the MPC85xx family of SOCs Linux expects any boot firmware
information to be passed in the first 64MiB of memory. This adds support
to ensure that the device tree is relocated to a valid location if it is
outside that address range.

For the other SOC family currently present in the ppc architecture, the
default is not to relocate as at Linux startup the virtual address
equals the physical address.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-09 17:08:39 +02:00
Sascha Hauer 91a68050e1 Merge branch 'for-next/powerpc' 2013-09-05 13:59:31 +02:00
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