9
0
Fork 0
Commit Graph

9267 Commits

Author SHA1 Message Date
Alexander Shiyan 6c9bc19df2 ARM: i.MX: Move GPIO driver to drivers/gpio
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 18:56:50 +02:00
Alexander Shiyan 6fadf5c75e GPIO: Rename "drivers/gpio.c" to "drivers/gpiolib.c"
Rename "drivers/gpio.c" to "drivers/gpiolib.c".
Reason is for understand functionality of driver.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 18:56:50 +02:00
Sascha Hauer cd23160af8 of: partitions: create bb device for nand flashes
For nand flashes automatically create a bb device for each partion.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:25:37 +02:00
Sascha Hauer 66cd90abe7 of: partitions: pass struct cdev as argument
pass a struct cdev instead of the cdev name to of_parse_partitions.
This is available to the caller anyway and makes it easier to use
additional stuff from the cdev (like knowing whether it's a mtd
device).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:25:33 +02:00
Sascha Hauer 812dc942d5 of: read resource names from devicetree
Resources can have names and these can also be specified in the
devicetree. Add support for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:23:58 +02:00
Sascha Hauer 6d1788ab34 of: Allow multiple resources in 'reg' property
Some devices need multiple resources in the reg property. This patch
adds support for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:23:50 +02:00
Sascha Hauer 266dea34a5 of: Add of_property_read_string_index()
Directly imported from the Kernel

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:23:35 +02:00
Sascha Hauer 8e9d9bc7e6 of: parse phandles before probing devices
The phandles have to be parsed completely before registering the devices
from the devicetree. Otherwise drivers can't rely on of_find_node_by_phandle
in their probe.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:23:23 +02:00
Alexander Shiyan 43f9a96a74 ubimkvol: Typo fix
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-22 09:15:07 +02:00
Jan Luebbe de5b9f71bf m33xx-clock: remove unused code
This patch includes no functional change. If a configurable DDRPLL_M
is required later, it should be set by the board instead of from here.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-19 07:25:46 +02:00
Jan Luebbe 98839ca886 m33xx-clock: configure PLLs based on oscillator frequency
The *PLL_N values can be calculated from the OSC value. This patch
includes no functional change.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-19 07:25:46 +02:00
Jan Luebbe f838be333e am33xx: add defines for GPIOs
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-19 07:25:46 +02:00
Jan Luebbe 07c62e1060 Makefile: drop duplicate definition of cmd_objcopy
This command is already defined in scripts/Makefile.lib, which is included
from Makefile.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-19 06:19:09 +02:00
Sascha Hauer 4d43f79dd5 defaultenv-2: net: use oftree when existing
For booting with devicetree we had to adjust /env/boot/net manually.
Instead, test if a devicetree exists and if yes, use it. This makes
for a better default.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-18 08:15:53 +02:00
Sascha Hauer 8f98a3a39c defaultenv-2: Fix verbose booting
During option parsing we use the variable BOOT_BOOTMOPTS, all other
scripts use BOOT_BOOTM_OPTS though. Fix this by using the same variable
everywhere.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-18 08:15:44 +02:00
Jan Luebbe a6fda1886a beaglebone: remove stray semicolon
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-18 08:03:46 +02:00
Jan Luebbe d7a913469c omap: move to common bootsource framework
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Folded fix into this patch:

[PATCH] omap4 regression: set correct boot source

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
2013-04-18 08:01:26 +02:00
Alexander Shiyan 7691202bdd Remove unimplemented usb_driver_unregister declaration
We do not have usb_driver_unregister function, so remove this declaration.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-18 08:00:07 +02:00
Sascha Hauer 67c6eeda9e Add memory modify command (mm)
As of now we have no way to manipulate individual bits of registers on the
command line. This introduces a memory modify command which allows this. It
has the syntax:

mm [OPTIONS] <adr> <val> <mask>

With [OPTIONS] being the usual memory command options (-b, -w, -l, -d <file>).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:37:14 +02:00
Sascha Hauer e10c1845b2 memory commands: separate into one file per command
Normally in commands we have one file per command which is named like
the command itself. The memory commands are an exception to this. This
patch changes this by separating the memory commands. This also has the
effect that the memory commands can now be selected individually. Along
the way we add some Kconfig help text for the commmands.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:36:31 +02:00
Sascha Hauer 81c118aa9e memory commands: make rw_buf global
The rw_buf is used by several memory commands. Make it global since
we want to split the memory commands into separate files. Also rename
it to mem_rw_buf.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:36:31 +02:00
Sascha Hauer c065be27a1 memory commands: cleanup initialization
- return -ENOMEM instead of -1
- return the result of platform_driver_register

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:36:31 +02:00
Sascha Hauer 4e3ce28973 Use a common define for RW_BUF_SIZE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:36:31 +02:00
Sascha Hauer 255e5b4c42 memory commands: move memory_display to separate file
memory_display is a function which should generally be available.
Currently it depends on memory command support being compiled in,
so move the function to a separate file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 13:35:17 +02:00
Sascha Hauer d91b7772c4 memory commands: export common functions
The memory commands all use open_and_lseek and mem_parse_options. Export
them to be able to split the memory commands into separate files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-17 12:56:44 +02:00
Jan Luebbe b6404068f1 commands: the crc command is actually called crc32
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-16 15:19:26 +02:00
Jean-Christophe PLAGNIOL-VILLARD cfe1fb0bac at91sam9m10g45ek: add spi dataflash supprt
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-16 14:50:44 +02:00
Lucas Stach fbcb481c60 tegra: add GPIO controller driver
Taken from the Linux kernel, simplified and reworked to match barebox.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:45:52 +02:00
Lucas Stach f23adabf6c tegra: add generic meminit
ODMdata tells us how much RAM is installed, so no need to define this at
the board level.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:45:47 +02:00
Lucas Stach 55d9b65d48 tegra: add generic debug UART support
ODMdata tells us which UART to use for debugging purposes. This is
agreed upon in both the upstream Linux kernel and U-Boot, so do it the
same way in barebox.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:45:29 +02:00
Lucas Stach 789c55b8bd tegra: add common lowlevel startup
All Tegra20 boards have a common startup sequence. Also there is an
agreement on how to find out about the installed amount of RAM and other
information needed by early startup. So as there is really no need to do
any lowlevel stuff per board, we can just do it at the ARCH level.

This also enables the first stage loading of barebox by detecting the
currently running CPU and booting the main CPU cluster if neccesary.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:45:24 +02:00
Lucas Stach e368a84a86 tegra: add T20 power management controller driver
Currently only implements system wide reset functionality.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:45:19 +02:00
Lucas Stach 6be47ca3bd tegra: add T20 timer driver
Replace the ad-hoc clocksource implementation with a proper driver for
the Tegra 20 timer. This driver is able to do the required hardware
initialisation itself.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:45:13 +02:00
Lucas Stach b8e1313f0d tegra: add driver for the clock and reset module
Only a basic set of clocks is supported. This is a temporary solution
and will go away as soon as the port of the Tegra common clock code from
the Linux kernel is ready to go.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:45:07 +02:00
Lucas Stach 48ded69470 tegra: switch to DT only
We will follow the Linux kernel and go devicetree only for Tegra. This
doesn't prevent specific code for certain boards, but always requires a
valid DTB for all boards.

Also regenerate the AC100 defconfig to reflect this change.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:45:02 +02:00
Lucas Stach 3ad53b334e tegra: move default textbase
All available opensource tools and published BCT configurations use
0x10800 as the default textbase on Tegra 20.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:44:57 +02:00
Lucas Stach 9bd3bdf7b9 tegra: introduce Tegra 20 SoC type
Tegra isn't a single architecture, but a collection of more or less
similar chip families. Introduce the same conf define as used in the
Linux kernel to differentiate between those families.

Currently we are only supporting the Tegra20 chip type.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:44:51 +02:00
Lucas Stach 8ea0c6e1f1 tegra: unify spelling in Kconfig with Linux kernel
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:44:45 +02:00
Lucas Stach d8bdd53722 tegra: switch to proper CPU type
Tegras main CPUs are all ARMv7.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-14 10:44:05 +02:00
Eric Bénard 59dbb4fe2c mtdraw: fix oob read and write
actually ops.ooboffs is not defaulted so when its value gets
added to chip->oob_poi in nand_fill_oob or nand_transfer_oob
the respective memcpy is using a wrong address.

With this patch, both md -s /dev/nandraw0 and cp xyz /dev/nandraw0.sb
are working fine on an i.MX28 target (instead of crashing the board).

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-12 19:26:47 +02:00
Alexander Shiyan 6ec32579b6 ARM: i.MX: Update MX51 iomux definitions
The patch updates MX51 iomux definitions from kernel.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-12 19:24:45 +02:00
Alexander Shiyan d8b6bb6e1a ARM: i.MX: Update MX2x iomux definitions
The patch updates MX2x iomux definitions from kernel.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-12 19:24:45 +02:00
Alexander Shiyan 5f82a0cd01 ARM: cpuimx51: Use custom padctrl for fec
The fec padctrl is different from what we have in the kernel iomux
file. To be able to keep the iomux file in sync with the kernel, use
a custom padctrl for the cpuimx51 board.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-12 19:23:13 +02:00
Sascha Hauer 8474cc900f dtc: remove autogenerated modules.order
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 16:35:24 +02:00
Sascha Hauer 2f24a5c33c ARM: MXS: ocotp: Use dev_add_param_bool for parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:36 +02:00
Sascha Hauer a40442cfa4 USB gadget at91: Use dev_add_param_bool for vbus parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:36 +02:00
Sascha Hauer d8ee54fbbf mtd: Nand: Use dev_add_param_bool for erasebad parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:36 +02:00
Sascha Hauer ab855df99f console: Use dev_add_param_int for baudrate parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer 3c9b5c1a61 ARM: i.MX: iim: Use dev_add_param_bool for parameters
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer 3a9f068ccb pwm: Use dev_add_param_int for pwm parameters
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
2013-04-11 11:48:35 +02:00