9
0
Fork 0
Commit Graph

7741 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD 520cd660cd w1: introduce helper to generate mac address from 1-wire id
use the first 3 byte of the id of a 1-wire
or 6 if no OUI provided device to provide an Ethernet address

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 20:20:28 +01:00
Jean-Christophe PLAGNIOL-VILLARD e14a55a4c0 arm: at91: add gpio_is_valid support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 20:20:28 +01:00
Jean-Christophe PLAGNIOL-VILLARD 48f7fd5bd1 at91sam9x5ek: enable MMU
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 20:20:28 +01:00
Sascha Hauer 18f044436e Merge branch 'for-next/i2c' into for-next/at91 2012-11-15 20:20:19 +01:00
Sascha Hauer e5e8996f5b Merge branch 'for-next/input' into for-next/at91 2012-11-15 20:20:15 +01:00
Sascha Hauer bc01035f22 Merge branch 'for-next/w1' into for-next/at91 2012-11-15 20:20:12 +01:00
Jean-Christophe PLAGNIOL-VILLARD 7f8547648c eeprom: add at24 support
This driver to get read/write support to most I2C EEPROMs,
after you configure the driver to know about each EEPROM on
your target board.  Use these generic chip names, instead of
vendor-specific ones like at24c64 or 24lc02:

   24c00, 24c01, 24c02, spd (readonly 24c02), 24c04, 24c08,
   24c16, 24c32, 24c64, 24c128, 24c256, 24c512, 24c1024

Unless you like data loss puzzles, always be sure that any chip
you configure as a 24c32 (32 kbit) or larger is NOT really a
24c16 (16 kbit) or smaller, and vice versa. Marking the chip
as read-only won't help recover from this. Also, if your chip
has any software write-protect mechanism you may want to review the
code to make sure this driver won't turn it on by accident.

Based on linux 3.6

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 20:18:50 +01:00
Sascha Hauer eaa821788d Merge commit 'a8a9542' into HEAD 2012-11-15 20:18:46 +01:00
Jean-Christophe PLAGNIOL-VILLARD c06fca0f84 mci-core: fix debug Capacity cast
so we print the correct size

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 14:40:50 +01:00
Jean-Christophe PLAGNIOL-VILLARD d65d9df83c mx53-loco: fix phy reset
the phy reset neet to be done before the fec driver is registered
as we accesst the phy at the fec probe time

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 12:31:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD b27a52c9d6 add roundup and rounddown support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:54 +01:00
Jean-Christophe PLAGNIOL-VILLARD 85ca16d028 import log2 support from linux
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:54 +01:00
Jean-Christophe PLAGNIOL-VILLARD bcf272af8b i2c: add id_table support
this will be use by at24 driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:54 +01:00
Jean-Christophe PLAGNIOL-VILLARD 47e176461f i2c: introduce i2c_new_dummy
This returns an I2C client bound to the "dummy" driver, intended for use
with devices that consume multiple addresses.  Examples of such chips
include various EEPROMS (like 24c04 and 24c08 models).

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 106742b900 i2c: algo-bit add missing acknak
This is need for sequential read/write.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 37e4bec9f7 versatilepb: add i2c support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD fcbb4c7472 i2c: add versatile support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 32a9da73c2 i2c: add i2c-gpio support
Based on linux 3.7-rc2

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 334e8f3b62 i2c: add i2c algo bit support
This is needed for i2c-gpio support

Based on linux 3.7-rc2

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0e9a078d20 i2c: adapter: register it's own device
so we can show the this of i2c busses
set the bus device as parent of all devices.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-15 08:34:53 +01:00
Sascha Hauer 9b8fa53626 replace barebox* in .gitignore with individual files
This effectively reverts:

| commit f9df22b002
| Author: Alexander Shiyan <shc_work@mail.ru>
| Date:   Mon Oct 8 10:35:04 2012 +0400
|
|    Add more generated files to .gitignore

barebox* is not limited to the toplevel directory, so this ignores
all files starting with 'barebox' from which we have several we do
not wish to ignore. Add barebox-flash-image to the ignore list which
seemed to be the motivation for the original patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alexander Shiyan <shc_work@mail.ru>
2012-11-14 09:19:09 +01:00
Fabio Porcedda 875ed10fbd ARM pbl: add generated file zbarebox.map to .gitignore
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-14 09:14:30 +01:00
Sascha Hauer 06bc2e706c defenv-2 menu: when booting failed wait for key press
When booting fails we will be immediately be back into the menu,
so the error message can't be seen. Also, boot in verbose mode
since in interactive mode the last bit of performance is not that
necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-12 08:47:19 +01:00
Jean-Christophe PLAGNIOL-VILLARD a768b1f24e input: add qt1070 touch keyboard support
use irq pin as the pin is asserted untill we clear it
This will allow to do not poll on i2c which slow down barebox

If no irq_pin is provided fall back on i2c polling

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-03 23:16:32 +01:00
Sascha Hauer d74bef2b04 mount: add compatibility to old mount command
the mount command used to have the syntax 'mount <dev> <type> <mountpoint>'.
This was changed to the more Linux like behaviour which specifies the
type with the -t <type> option. If a newer barebox is run on a device
with an older environment the mount command no longer works. This patch
adds compatibility to the old behaviour.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-02 21:26:29 +01:00
Uwe Kleine-König 56371f4e84 iomux-imx35: add missing comma in pad definition
The same issue was fixed in the Linux kernel in commit

	66ddfc6 (mx35: add a missing comma in a pad definition)

for 2.6.33-rc7.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:32:12 +01:00
Sascha Hauer 907e3ff3e6 command: return 1 on unknown command
hush now prints the error value if a command returns a value < 0,
so do not return -1 (EPERM) when we encounter an unknown command.
Instead, return 1 so that hush is quiet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:31:07 +01:00
Jean-Christophe PLAGNIOL-VILLARD d357612bc1 at91sam9xek: fix mtd partition
barebox size is 384KiB
and for the official atmel release we need to rootfs at 8M

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:28:49 +01:00
Sascha Hauer b8d7c3a95c bootm: Do not cross 1MiB sections for the devicetree
ARM Linux only maps a single 1MiB section for the devicetree. This has
a 1Mib alignment, so we are not allowed to cross such a boundary. Align
the devicetree to the next power of two so that this never happens.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:27:21 +01:00
Sascha Hauer da7d19b9d8 bootm: Add a define for the additional devicetree size
The fixed devicetree may need more space than the original one.
We used to use 0x8000 here. Add a define for it to have the
space defined at a single place.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 16:27:17 +01:00
Sascha Hauer c83623d010 net usb asix: Add missing line breaks in dev_* messages
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-01 08:43:05 +01:00
Sascha Hauer 33068a216a Merge branch 'pu/net-fixes' 2012-10-31 21:52:03 +01:00
Sascha Hauer 51e9c42c74 net fec: call fec_init at probe time
fec_init() initializes some bits important for phy access, so do
this before the mdiobus is registered. This fixes mdiobus support
on i.MX28 boards in RMII mode.

Reported-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-31 21:51:36 +01:00
Sascha Hauer 2d1ceaff2f uimage: Fix deleting of temporary file
the uImage support may generate a temporary file which ought to be deleted
after usage. Due to the wrong filename this never happened. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 18:39:38 +01:00
Sascha Hauer 8796301447 net eth: make edev->init optional
edev->init is called at eth_register time unconditionally and is supposed
to initialize the ethernet hardware. Since it's called unconditionally
this could be done by the driver without having an additional hook.
Some drivers need their initialization done earlier since they also register
a mdiobus which does hardware accesses on registration time.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 17:17:52 +01:00
Sascha Hauer 3a17af33c0 net fec: connect phy at probe time
Several i.MX boards (all i.MX6 boards) need to do some adjustments
to phy registers. If barebox itself does not use network, networking
won't work in the kernel if the kernel does not have the fixups. Connect
the phy at probe time so that these tweaks are done during probe so that
the kernel works without phy register tweaks. Also this has the effect
that the phy device is present and introspectable without doing fake
network transfers beforehand.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 17:17:35 +01:00
Sascha Hauer e2fce6b92c of: Check for NULL pointer in of_find_property
The console layer calls of_device_is_stdout_path for a new console. When
we are booting without devicetree then of_chosen is NULL which makes barebox
crash. Check for a NULL pointer in of_find_property to prevent this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 14:42:54 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5099f5e15c 1-wire: add ds2433 support
Based on linux implementation.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-29 22:31:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD 68a961ac5c 1-wire: add ds2431 support
Based on linux implementation.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-29 22:31:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6cb9aa9202 1-wire: add gpio bus
Based on linux implementation.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-29 22:31:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6b21594df0 add 1-wire support
export for each device via param
the familly id (fid)
the id
the full reg_num

so for simple 64bit memory rom(ds2401/ds2411/ds1990*) no need driver.

Based on linux implementation, cleaned and re-implement the master/slave
support to use the device/driver model correctly.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-29 22:31:18 +01:00
Jean-Christophe PLAGNIOL-VILLARD cf1670486b clock: introduce non interruptible timeout
is_timeout call poller_call if the timeout is >= 100us

but on 1-wire bus we need to wait 500us and not more than 930us
for the bus reset. So if the poller_call is caller we can not guarantee it.

So for this introduce is_non_interruptible_timeout than we only wait.

Use it for ndelay too.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-29 22:31:18 +01:00
Sascha Hauer 72703410fe misc JTAG: include fixes
common.h should come first, other include files implicitely depend
on it. Also, remove unused fs.h and remove commented line.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 09:08:51 +02:00
Sascha Hauer 0fd1611291 ARM omap spi image: print error to stderr
Since the utility outputs the image on stdout we have to print the
error messages to stderr in order to see them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:16 +02:00
Sascha Hauer 3bd35b8993 ARM omap spi image: relax size constrains
The omap spi utility requires the image size to be a multiple of four
bytes. This seems unnecessary, we can just pad with a few bytes to
get the required alignment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:11 +02:00
Sascha Hauer 5b620bce2e pbl: provide hang() function for the pbl
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:07 +02:00
Sascha Hauer 5b0fc19196 of gpio: Build gpio helper only when gpiolib is selected
Otherwise the functions needed by the helper won't be available.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:01 +02:00
Sascha Hauer 0b15ebf165 mtd nand i.MX: fix compilation for unsupported SoC
Add a default case when all if(nfc_is_*) else if()
return false to prevent a compiler warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:56 +02:00
Sascha Hauer f2513cb8b1 mtd mxs nand: select NAND_BBT
The driver won't compile without it, so select it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:48 +02:00
Sascha Hauer 7cbd1011a0 misc JTAG: Let Jtag driver depend on GENERIC_GPIO
It uses the gpio functions, so let it depend on GENERIC_GPIO.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:42 +02:00