We need list_for_each_entry_safe in dev_remove_bb_dev since the
list entries are removed during iteration over the list.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Alexander Aring <alex.aring@gmail.com>
When a mtd device can have bad blocks we want to create a
bb device, so do this automatically. This allows us to
drop bb device creation from the environment.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This refactors the code so that we get a mtd_add_bb which can
be used to create a bb dev on a mtd_info.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The devfs layer just adds an addition indirection between mtd
and the bb devices with no purpose. Drop it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The upstream dts files do not contain the register shift. As
we have Omap specific init code anyway we can just set the register
shift from there instead of relying on the devicetree properties.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
No need to store init() function in the driver private structure
since it called only once during startup.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
From 4ea2bd2e1ca18136d7cfd61643bc8d8187b1495f Mon Sep 17 00:00:00 2001
From: Owen Kirby <osk@exegin.com>
Date: Wed, 16 Apr 2014 17:45:18 -0700
Subject: [PATCH] Fix AT91 UDC driver on boards without vbus.
While porting Barebox to one of our boards, we found that the AT91 UDC driver
will fail to connect to USB hosts, and will spam the console with errors if
the VBUS pin isn't connected.
Signed-off-by: Owen Kirby <osk@exegin.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The error messages would dereference the just checked NULL
ptr. As those messages don't add much value without further
info just remove them.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This most likely doesn't fix any real bugs, but it's the
right thing to do and reduces the noise level with static
checkers.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
of_get_named_gpio_flags used to return 'ret' when no device
is found, but 'ret' is zero here. Return an error instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
'ret' is only initialized when info->fbops->fb_activate_var exists, so
only use it in this case.
Reported-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Direction for CS GPIOs (for some targets) is undefined.
This patch fixes this issue.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Rework the current framework so that I/O mapped I/O resources are
also possible.
Signed-off-by: Michel Stam <michel@reverze.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
ePAPR 1.1 specifies the "stdout-path" property, but barebox currently
only handles the "linux,stdout-path" property. Add parsing for the new
property name.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We have dev_add_param_enum() now, so use it for the mode_name
setting. Also drop the special case for single mode framebuffers,
just add the mode_name parameter for this case aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
And use it inside struct fb_info. This struct has the advantage
that the supported modes can be passed around in a single pointer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This updates the clk-divider to Kernel code, but without power-of-two
divider support which we do not need yet. This also adds table based
divider support to the divider.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>