9
0
Fork 0
Commit Graph

2047 Commits

Author SHA1 Message Date
Wolfram Sang 56f6bfb820 net: arp_request: do not retry endlessly
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-05 08:56:03 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9c29dab5aa net: env: getenv_ip use resolv
Introduce getenv_ip_dns to be able to do not do the resolv when using it in
resolv for the nameserver (Do not loop).

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-03 11:39:29 +08:00
Alexander Shiyan 9d9724e178 Completely migrate option ISP1504 to ULPI
Since we do not have ISP1504-related functions, we migrated to ULPI.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:54 +02:00
Alexander Shiyan a2623f1712 Rename function ulpi_init to ulpi_detect
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:53 +02:00
Alexander Shiyan bafda33463 Move set_vbus_power code to ULPI driver
This is ULPI-specific, not ISP1504.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:53 +02:00
Alexander Shiyan 2079f13611 Add ULPI detection function.
Added ULPI detection function.
Same function from isp1504 driver removed.
Used implementation from Linux kernel.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:53 +02:00
Alexander Shiyan 9c01d10dab Rename definitions for ULPI registers
These registers can be used for any standart ULPI chip,
not only for ISP1504.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 09:32:53 +02:00
Sascha Hauer b5e5b06d8b Add automount support
This patch adds an automount command which makes it possible
to execute a script when a certain directory is first accessed.
It's the commands responsibility to make this directory available
(bringing devices up and mounting it). This results in automount
support which makes sure that from the shell every file can
be accessed without having to care for device bringup. Bringing
up devices may be expensive (USB, dhcp). The automount support
makes it easy for the environment to bringup devices when they
are actually needed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-18 15:03:26 +01:00
Sascha Hauer b55fbf7f5f fs: drop struct mtab_entry
every struct fs_device_d contains a struct mtab_entry, so they
have a 1:1 relationship. Instead of having to use container_of
to get from a struct mtab_entry to a struct fs_device_d we can
better embed the members of struct mtab_entry into struct fs_device_d
directly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-17 18:16:03 +01:00
Jan Weitzel 4088ab5588 NET: Add support for ks8851_mll
Add support for KS8851 16bit MLL chip from Micrel Inc.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-13 13:35:29 +01:00
Sascha Hauer beb36c510b Merge branch 'work/thumb2' into next 2012-03-06 09:39:59 +01:00
Sascha Hauer 104a6a7ccf ARM: Allow to compile in thumb-2 mode
This shrinks the resulting binary size by ~25%. Exceptions
are still handled in arm mode, so we have to explicitely
put .arm directives into the exception code. Thumb-2 mode
has been tested on i.MX51 Babbage board.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-03-06 09:37:59 +01:00
Sascha Hauer 4bab39e7b6 remove unused variable from struct driver_d
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:28:10 +01:00
Sascha Hauer 33d1cc4bf2 commands: remove struct command pointer from commands
This is unused in all commands and thus can be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:28:07 +01:00
Eric Bénard 9559018646 mfd: add mc34708 driver
this driver is a copie of the mc13892 one

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:58:22 +01:00
Sascha Hauer aed0e6ba03 getopt: save and restore context
execute_command is the single point where commands are executed and thus a new
getopt context is needed. currently we call getopt_reset here to reset the
context. This breaks though when a command tries to run a command itself by
calling execute_command or run_command.  In this case we have to store the
context and restore it afterwards. The same is necessary in builtin_getopt.
Currently noone does this so this one shouldn't fix a bug, but merely allows
us to do such things later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 19:53:47 +01:00
Sascha Hauer b482dfd612 driver: remove unused type_data field from struct driver_d
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:30 +01:00
Sascha Hauer 67d938b2ea net: use container_of instead of dev->type_data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:22 +01:00
Sascha Hauer 3a92711511 fs: get fs device using container_of
This reduces the usage of dev->type_data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 14:03:56 +01:00
Sascha Hauer 76c7f90a54 fs: get fs driver using container_of
This reduces the usage of dev->type_data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 14:03:56 +01:00
Sascha Hauer 31078e0839 net: let net_udp_get_payload return void *
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-19 18:51:03 +01:00
Sascha Hauer 2546c5a514 Merge branch 'pu/device-cleanup' into next 2012-02-17 10:27:31 +01:00
Sascha Hauer 9bf08d582a fs: put fs devices on its own bus
By putting the fs devices/drivers on a bus on its own we can hook
into the bus remove function to cleanup the fs device. This way
we can unmount a device by simply unregistering the device which
is useful for for example USB mass storage devices. These can now
unregister the assoiated filesystems by unregistering their child
devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 33b5ead7e6 fs: remove fs devices list
We store the fs devices in a list only because we want to
check if the fs driver needs a backingstore or not. The
driver will bail out anyway if it needs a backingstore and
doesn't find one. So we can remove this check and thus remove
the list of fs devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer fcec314b09 fs: remove unused function fsdev_get_mountpoint
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer ec1d29e61c fs: Store mtab path in allocated string
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 2c2fb6a947 fs: make locally used function get_mtab_entry_by_path static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 8a81eab846 fs: Store mtab entries in list
To make the code a bit easier to read. Also, do not allow
to umount / when something else is mounted.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 6ca081d53d add list_is_singular
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 06f66dc054 Merge branch 'pu/block' into next 2012-02-17 10:25:24 +01:00
Sascha Hauer 4e0f084ea1 Merge branch 'gpio_keys' of git://uboot.jcrosoft.org/barebox into next
Conflicts:
	drivers/Makefile

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:19:25 +01:00
Robert Jarzmik 6fa3e3119f drivers/pwm: add duty_ns and period_ns to core pwm chip
Add variables to control the duty_ns and period_ns of PWM
chips. When these variables are set, a call to either
pwm_enable() or pwm_config() is performed to enforce the
setup values.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:18:30 +01:00
Sascha Hauer f917e6f866 Add pwm core support
This patch adds framework support for PWM (pulse width modulation)
devices.
A new pwm can be registered from a hardware driver using
pwmchip_add(). It can then be requested from a client driver using
pwm_request(). A string is used as a unique identifier for the
pwms. It should usually be initialized by the hardware drivers
using dev_name(dev). The client API is the same as currently
in the Linux Kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:18:27 +01:00
Jean-Christophe PLAGNIOL-VILLARD 1f22d10f15 readkey: add define for Ascii keys
this will simplify the usage of gpio keyboard

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-02-16 18:17:32 +08:00
Jean-Christophe PLAGNIOL-VILLARD ef654d1617 add gpio keyboard support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-02-16 18:17:30 +08:00
Sascha Hauer e3a9e1fd62 block: reimplement caching
The current caching layer only has a single buffer for
writing and reading. The FAT driver often accesses the
fat and then data again, which currently can't be cached.
Reimplement this with a list of cached chunks. The number
of chunks and their sizes are currently hardcoded, but
that could be easily made configurable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-15 08:21:43 +01:00
Sascha Hauer c9c5440e61 list: add list_last_entry function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-15 08:21:34 +01:00
Sascha Hauer b795a7320b mci: Fix 8 bit mmc cards
Currently we test the cards capabilities for being 8bit capable.
This does not work since noone ever sets this bit. Unfortunately
there is no bit to test 8bit capability, so we introduce a patch
from the kernel which puts the mmc card into 8bit mode and tests
whether it can succesfully read the ext_csd in this mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 14:35:20 +01:00
Sascha Hauer 15c9965457 mci: Add a complete list of EXT_CSD_* fields from the kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 14:35:13 +01:00
Sascha Hauer 3eb9672818 Add a timeout polling loop convenience wrapper
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 14:35:06 +01:00
Sascha Hauer f27152ccc6 mci: Use struct mci for internal argument passing
The mci layer currently passes around a struct device_d for
its internal use. Apart from being confusing this drops
typesafety for no good reason. Instead, pass around a struct
mci.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:32 +01:00
Sascha Hauer 0b3c58c820 mci: remove unused device argument from set_ios
This argmuent is unused in all drivers, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:44:27 +01:00
Sascha Hauer 0f9892cce8 mci core: replace discrete ios values with struct ios
As we'll need more arguments to set_ios over time put them
in a struct mci_ios like the kernel does.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 12:40:11 +01:00
Sascha Hauer 58cc0eb274 mci: use card type definitions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 11:53:24 +01:00
Sascha Hauer 68e5f3242d mci: Add complete definitions for the card type
Add the different DDR types and also a definition for the card
type mask.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-09 11:53:18 +01:00
Sascha Hauer 192d6fe9be Merge branch 'pu/debug' into next 2012-01-27 09:31:13 +01:00
Sascha Hauer 79c2f03aee Add dump_stack function
At least ARM allows us to dump the stack, but we currently
have no prototype for this. Add a dump_stack prototype and
provide a static inline function for architectures without
stack dump support. Also, call dump_stack() in panic() to
provide more information in the case of a panic.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-26 14:12:08 +01:00
Sascha Hauer 178c4978b3 kfifo: change kfifo_init to work with a preallocated fifo
kfifo currently only works with dynamically allocated fifos.
Change the currently unused kfifo_init to take a preallocated
fifo. This allows for statically initialized fifos.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-26 13:57:43 +01:00
Sascha Hauer 48529db7d4 console: remove unused function prototypes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-26 12:28:22 +01:00
Wolfram Sang cae7e5b7f9 net: miidev: factor out miidev_get_status()
Currently, we can only print the phy_status. Factor out the routine to
get the status, so we can query it from fec drivers and configure
accordingly. Needed because mx28 needs a special bit set for 10Mbit.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-01-25 18:10:26 +01:00