9
0
Fork 0
Commit Graph

12809 Commits

Author SHA1 Message Date
Jan Luebbe 045022f36e sysmobts: add support for the sysmobts v2 2015-05-31 18:38:58 +02:00
Jan Luebbe 3655aaa952 arm: davinci: add dm644x clock and PSC support 2015-05-30 14:50:12 +02:00
Jan Luebbe e90c4f9435 davinci_emac: add support for version 1 2015-05-30 14:50:12 +02:00
Jan Luebbe 1b9e345d6e davinci_nand: add support for the NAND controller
This driver is based on the Linux driver (v4.0).

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2015-05-30 14:50:12 +02:00
Jan Luebbe 562fa20935 watchdog: add davinci watchdog driver
This driver is based on the Linux driver (v4.0).

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2015-05-30 14:42:59 +02:00
Jan Luebbe b7ca4df6e5 partition: do not overwrite an existing DT node pointer
This is necessary to find EEPROM devices using the device tree nodes.

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2015-05-30 14:42:59 +02:00
Jan Luebbe 7026e4fd9d state: add support for uint8 variables
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2015-05-30 14:42:42 +02:00
Jan Luebbe 15f39c7b8c state: add some more error messages
This helps with finding out why the state cannot be loaded correctly.

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2015-05-30 14:41:48 +02:00
Jan Luebbe 3717d28dd4 gpio-davinci: gpio get should return 0 or 1
Returning other values causes problems for client code which wants to
perform calculations with the returned value.

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2015-05-30 14:30:50 +02:00
Uwe Kleine-König c019165a48 bootstate: probe bootstate later
state must be loaded after the nand driver, otherwise it fails because the
backend is missing. For similar reasons bootstate must come after state.
Move them to the late stage until barebox can do deferred probing.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:56:33 +02:00
Marc Kleine-Budde 282dbf48db bootstate: add
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:56:33 +02:00
Sascha Hauer 326f0bcf84 mtd: ubi: create device with persistent names
UBI devices used to show up with a dynamically assigned number
which is bad for scripting. After a 'ubiattach' a script cannot
know the number of the ubi to continue with. Change this to use
the parent mtd name and extend it with ".ubi".

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 13:49:58 +02:00
Sascha Hauer 0611a34459 mtd: ubi: Let ubidetach take mtd as argument
The ubi number is a dynamically assigned number, so once multiple
ubis are attached, scripts cannot know the ubi number they want
to detach anymore. Convert the ubidetach command to take the mtd
device file instead which is the same argument that was previously
passed to ubiattach.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 13:49:58 +02:00
Sascha Hauer 8d5420cddb blspec: automatically append bootargs
When bootloader spec is used to boot devices it is often desirable
to boot the same image from different media. Since the fs images
need to contain the root= parameters to tell Linux where to boot
from the images can't be identical on different media.

This patch changes this by introducing a 'appendroot' option for
bootloader spec. If set to true, barebox will construct a Linux
commandline option for the device the bootloader spec entry is found
on.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 13:49:57 +02:00
Sascha Hauer 3cc27477a9 blspec: honour default/once entries again and move them to a different place
Support for default/once entries was lost earlier. This fixes this
and also looks for default/once entries in the loader directory instead
of the loader parent directory. This keeps the bootloader spec files
together under a common loader directory.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 13:49:57 +02:00
Marc Kleine-Budde 7060b5b88c watchdog: add static inline no-ops if WD is disabled
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: next, commit:91936ddc4485
2015-05-26 13:49:57 +02:00
Marc Kleine-Budde dd64c070eb mtd: of_mtd_fixup(): fix given DT not the default one
We have to start searching for the mtd node starting in the given root node not
the defaukt (= barebox internal) one. This means the internal DT is always
fixed up. This leads to booting not fixed up DT when using external DTs.

This patch fixes the problem.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: v2015.06.0, commit:6da925f87c66cd9132018b4b08a84fa98c382aa7
2015-05-26 13:49:57 +02:00
Marc Kleine-Budde 92259886e0 state: backend_raw: update documentation of struct state_backend_raw members
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:21 +02:00
Marc Kleine-Budde 218748f28c state: backend_raw: add sanity check of data_len during load
The length of the data must fit into the remaining available space until the
next copy of the data.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:21 +02:00
Marc Kleine-Budde ae2ecc473b state: backend_raw: rename backend_raw_write_one() -> backend_raw_save_one()
Use a consistent naming scheme: backend_raw_save_one() is called from
backend_raw_save().

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:21 +02:00
Marc Kleine-Budde b55f764d8f state: backend_raw: factor out state_backend_raw_file_get_size() into separate function
This patch factors out the state_backend_raw_file_get_size() into a separate
function and adds some ifdefs to make this code work under Linux aswell.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:21 +02:00
Marc Kleine-Budde 6e7dda05de state: backend_raw: properly align write and erase size
This patch makes it easier to share the code with linux, on Linux the ease and
write size have to be aligned. Use stride (which is already aligned to erase
block size) during erase, align size_full to writesize and use it while
writing.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:21 +02:00
Marc Kleine-Budde 474266495c state: backend_raw: rename struct state_backend_raw::step -> stride
This patch renames the member "step" of the struct state_backend_raw to
"stride" and tries to clarifies its meaning.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:21 +02:00
Marc Kleine-Budde 27e0984c35 state: backend_raw: remove hard coded limit of two copies
Although there is the define RAW_BACKEND_COPIES, the state_backend_raw_save()
function silently assumes exactly two copies. This patch removes that assumtion
by looping over all copies, but saving the one we're read from at the end.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:21 +02:00
Marc Kleine-Budde d91d753884 state: mtd_get_meminfo: make usage of mtd's meminfo compatible to linux
This patch makes it possible to share the code with linux.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:21 +02:00
Marc Kleine-Budde 01fb5bbed8 state: mtd_get_meminfo: open path readonly instead of readwrite
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:20 +02:00
Marc Kleine-Budde 5474c6195a crypto: digest: mark signature argument as const
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:20 +02:00
Marc Kleine-Budde 5e859256a0 fixup! state: add fixup to copy state from barebox to kernel device tree
During of_state_fixup() we have to write the #address-cells and #size-cells
property of the node we're copying the data to, not the "root" node of the
device tree we're working on.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-26 13:34:20 +02:00
Marc Kleine-Budde 39568d9ca5 state: print name of property of size mismatch is detected
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-17 20:44:07 +02:00
Marc Kleine-Budde d31a4c4687 state: print proper error message, if reg property is not found
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-17 20:44:07 +02:00
Uwe Kleine-König 2ff274ae4f state: return -EPROBE_DEFER if the backend isn't available 2015-05-17 20:44:06 +02:00
Marc Kleine-Budde 491d10698e state: add fixup to copy state from barebox to kernel device tree
This patch registeres a DT fixup, that copies the statate nodes from the active
to the kernel DT. The backend reference will be a phandles.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
[ukl: add call to of_unregister_fixup]
2015-05-17 20:43:40 +02:00
Marc Kleine-Budde 4e26c8c6d9 state: backend: support phandle and of_path references
This patch improves the backend property, it can be either a phandle or a
of_path. During probe() of the state driver the backend property is
dereferenced and the resulting of_path is saved in the state context. In a
later patch it will be used to generate a phandle reference to the backend
during DT fixup.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-17 20:43:40 +02:00
Marc Kleine-Budde 1c3c233a93 state: add functionality to export state description
This patch adds the functionality to export the description of the state, but
not the contents of the variables to a DT node. This will be used in a later
patch to "copy" the state description to the kernel device tree during DT
fixup.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-17 20:43:40 +02:00
Marc Kleine-Budde 02c6da8d85 state: make state_release() non static
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-05-17 20:43:40 +02:00
Marc Kleine-Budde 618d712f91 state: state_new_from_fdt(): remove unused function
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: next, commit:9a6dc0376add
2015-05-17 20:43:40 +02:00
Marc Kleine-Budde f56fea8e5a state: documentation: add anchor so that state can be referenced later
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: next, commit:c58d1c95a2b1
2015-05-17 20:43:39 +02:00
Marc Kleine-Budde 55396feb25 state: state_uint32_create: use %u to print unsigned variable
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: next, commit:2ce086b8beee
2015-05-17 20:43:39 +02:00
Uwe Kleine-König 25d8af0f01 of: add a function to remove an of_fixup
This function is needed when a device that already registered a fixup in
the probe routine fails later to probe completely. Without unregistering
the fixup the function might later be called with invalid data.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:1431771149-27265-1-git-send-email-u.kleine-koenig@pengutronix.de
2015-05-17 20:42:55 +02:00
Marc Kleine-Budde d9ada004ea include: add includes includes to make fdt.h, of.h and state.h self contained
Otherwise compilation may fail with:

include/fdt.h:11:15: error: unknown type name 'uint64_t'
 static inline uint64_t fdt64_to_cpu(uint64_t x)

include/of.h:22:19: error: field 'list' has incomplete type
  struct list_head list;

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: v2015.06.0, commit:9e69a04222ee88c51bd5ca4f802b5fa5ad42b0f8
2015-05-13 11:12:54 +02:00
Sebastian Hesselbarth 532059b525 base: Introduce deferred probing
As expected, we would need deferred probing sooner or later. This is
a first approach to allow devices to return -EPROBE_DEFER and get
sorted into a list of deferred devices that will be re-probed later.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Origin: v2015.06.0, commit:ab3da15bc14cc5297b2da27eb3dcd8d70dac41df
2015-05-13 11:12:14 +02:00
Sascha Hauer 3bc7f48a44 Release v2015.05.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-06 08:51:30 +02:00
Sascha Hauer c05380f61e net: phy: Do not double remove phy device
This fixes: 80264a8 driver: Call bus->remove instead of driver->remove

On mvebu it happens that:

Upon device shutdown, when iterating through the active device list,
the phy0 device is removed before mdio-mvebu. Then, when the mdio bus
device is removed, the phy0 device is removed again, here:

mdio_bus_remove(on mdio-mvebu)
  mvebu_mdio_remove
    mdiobus_unregister
      unregister_device
        mdio_bus_remove(on phy0)

Fix this by setting the mdio busses phy_map[phy->addr] to NULL when
unregistering the phy device, so that mdiobus_unregister no longer
finds a valid phy_device when iterating over the busses device list.

Reported-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
2015-05-05 13:53:15 +02:00
Lucas Stach cbc2492621 PCI: fill in bus primary field
This was erroneously left uninitialzed as nothing was using it.
The i.MX6 PCI driver needs this to be filled properly to decide
if a config space access is allowed for a specific devfn.

This fixes PCI enumeration on the Gateworks GW54xx board.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-01 08:37:19 +02:00
Lucas Stach 2a8bc957a7 PCI: register and active bridge device before proceeding to scan
The bridge device needs to be registered and activated before
the scanning can proceed, as the bridge is the parent for other
devices.

This fixes a NULL ptr derefernce when scanning PCI hierarchies
with bridges behind bridges.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-01 08:37:19 +02:00
Antony Pavlov 92207cde49 net: e1000: add HAS_DMA dependency
The e1000 driver uses the dma coherent functions
and thus can only be build for architectures implementing them.

Here is mips malta build error log:

  drivers/built-in.o: In function `e1000_transmit':
  drivers/net/e1000.c:(.text.e1000_transmit+0x80): undefined reference to
  `dma_sync_single_for_device'
  drivers/built-in.o: In function `e1000_poll':
  drivers/net/e1000.c:(.text.e1000_poll+0x60): undefined reference to
  `dma_sync_single_for_cpu'

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 20:03:48 +02:00
Sascha Hauer 10e6930323 mtd: partition: Fix OF partition fixup
To get the number of address cells and size cells we have to use
the newly created partition node, not the parent device node. The
parent device node returns the address/size cells of the controller
node, not the partition node.

On an am335x machine this fixes the device tree passed to Linux.
The situation there is:
	...
	gpmc@50000000 {
		...
		#address-cells = <0x2>;
		#size-cells = <0x1>;
		ranges = <0x0 0x0 0x8000000 0x10000000>;
		...
		nand@0,0 {
			reg = <0x0 0x0 0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			...
			partition@7 {
				label = "system";
				reg = <0x220000 0x7de0000>;
			};
		};
	};

and without this patch barebox passes three bytes for
partition@7's reg property instead of only two which naturally
confuses Linux and yields to the system partition to start at 0
with a size of 0x220000.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2015-04-28 09:09:46 +02:00
Lucas Stach dbe6023074 ARM: highbank: select OFTREE
The board code uses quite a few OF functions and it doesn't seem
reasonable to run this board without DT support.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-20 13:19:51 +02:00
Sebastian Hesselbarth 11045f866d USB: xHCI: Sync non-coherent DMA buffers
When working with non-coherent transfer buffers, we have to sync
device and cpu for outgoing and incoming buffers. Fix the driver where
non-coherent buffers are used in device context.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-15 14:05:42 +02:00
Sascha Hauer ee0035e5cc Merge branch 'for-next/state' 2015-04-13 12:57:14 +02:00