| Age | Commit message (Collapse) | Author |
|
When CONFIG_DM_ETH is set, the FEC ethernet controller is reset after
the PHY has been set up and initialzed. This breaks the communication
with the PHY and results in an inoperable ethernet interface.
Do the initialization with CONFIG_DM_ETH in the same order as with
legacy ETH support to fix this.
Signed-off-by: Lothar Waßmann <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
Add support for the debug UART to assist with early debugging.
Enable it for i.CoreM6 as an example.
Signed-off-by: Jagan Teki <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
- Remove space between #define to macro
- Add tab between macro and value
Signed-off-by: Jagan Teki <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Move the common baud generation code into _mxc_serial_setbrg
so-that dm and non-dm can call this func.
Signed-off-by: Jagan Teki <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Move the common initialization code into _mxc_serial_init
so-that dm and non-dm can call this func.
Signed-off-by: Jagan Teki <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Control reg write should be part of setbrg for better
buadrate generation, so move cr1 and cr2 write to
mxc_serial_setbrg
Signed-off-by: Jagan Teki <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Use RFDIV in dm-code instead of numeric value, so-that
it can be common for dm and non-dm.
Signed-off-by: Jagan Teki <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
This patch will add common reg space for non-dm and
dm code and non-dm reg space can be accessed using
mxc_base.
This will
- get rid of __REG volatile assignments
- Make common reg_space by removing unneeded macros
Signed-off-by: Jagan Teki <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
This module can be found on the Turris Omnia board connected
via the I2C interface.
Among some cryptographic functions, the chip has a 512 bit
One Time Programmable memory, 88 byte configuration memory
and 512 byte general purpose memory.
The Turris Omnia stores serial number and device MAC address in
the OTP memory.
This commit adds basic support for reading the EEPROM and also
exposes the chips Random Number Generator.
The driver is based on code by
Josh Datko, Cryptotronix, [email protected]
and also
Tomas Hlavacek, CZ.NIC, [email protected]
Signed-off-by: Tomas Hlavacek <[email protected]>
Signed-off-by: Marek Behun <[email protected]>
create mode 100644 drivers/misc/atsha204a-i2c.c
create mode 100644 include/atsha204a-i2c.h
Signed-off-by: Stefan Roese <[email protected]>
|
|
This I2C mux is found, for example, on the Turris Omnia board.
Signed-off-by: Marek Behun <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
Signed-off-by: Stefan Roese <[email protected]>
|
|
The Orion watchdog can be found on some Marvell Armada chips.
This driver is based on the code by Tomas Hlavacek in the CZ.NIC
turris-omnia-uboot repository, which can be found at
https://gitlab.labs.nic.cz/turris/turris-omnia-uboot, and that
one is based on code by Sylver Bruneau. His code is already in
mainline Linux kernel.
The code uses the new driver model API.
Signed-off-by: Tomas Hlavacek <[email protected]>
Signed-off-by: Marek Behun <[email protected]>
create mode 100644 drivers/watchdog/orion_wdt.c
Signed-off-by: Stefan Roese <[email protected]>
|
|
The DDR3 training code for Marvell A38X currently computes 1t timing
when given board topology map of the Turris Omnia, but Omnia needs 2t.
This patch adds support for enforcing the 2t timing in struct
hws_topology_map, through a new enum hws_timing, which can assume
following values:
HWS_TIM_DEFAULT - default behaviour, compute whether to enable 2t
from the number of CSs
HWS_TIM_1T - enforce 1t
HWS_TIM_2T - enforce 2t
This patch also sets all the board topology maps (db-88f6820-amc,
db-88f6820-gp, controlcenterdc and clearfog) to have timing set to
HWS_TIM_DEFAULT.
Signed-off-by: Marek Behun <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Signed-off-by: Stefan Roese <[email protected]>
|
|
Make make nand_info array static, since all direct users of nand_info array
have been converted to use get_nand_dev_by_index() API.
Signed-off-by: Grygorii Strashko <[email protected]>
|
|
As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly
Signed-off-by: Grygorii Strashko <[email protected]>
|
|
As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.
Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly
Signed-off-by: Grygorii Strashko <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.
Signed-off-by: Grygorii Strashko <[email protected]>
|
|
nand_info is used all over the file so abstract it with
get_nand_dev_by_index() which will help for DM conversion.
Signed-off-by: Mugunthan V N <[email protected]>
Signed-off-by: Grygorii Strashko <[email protected]>
|
|
|
|
|
|
DTB is encoded in big endian. When we retrieve property values,
we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversion.
This is a bit error-prone, but sparse is useful to detect endian
mismatch.
We need to use (fdt32_t *) instead of (u32 *) for a pointer of a
property value. Otherwise sparse warns "cast to restricted __be32".
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Include <dm/util.h> to fix sparse warnings:
symbol 'dm_dump_all' was not declared. Should it be static?
symbol 'dm_dump_uclass' was not declared. Should it be static?
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Reuse ofnode_get_property() to simplify the implementation.
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
This function returns the pointer to the value of a node property.
The current name ofnode_read_prop() is confusing. Follow the naming
of_get_property() from Linux.
The return type (const u32 *) is wrong. DT property values can be
strings as well as integers. This is why of_get_property/fdt_getprop
returns an opaque pointer.
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
The code inside the if-block is the same as of_get_property().
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
This will clarify the code.
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Fix sparse warnings "... was not declared. Should it be static?"
Also, fix redefinition of dm_warn/dm_dbg.
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Add support for a live device tree to the core serial uclass.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
This function is quite long. Move the core code into a separate function
in preparation for adding livetree support.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
Update this driver to support a live device tree.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
Add some debugging to show when the backlight is enabled.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
Update this driver to support a live device tree.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
We should sync the display (e.g. flush cache) when backspace is pressed
to ensure that the character is erased correctly.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
Calculate the time taken to set up the LCD.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
The of_n_addr_cells() and of_n_size_cells() functions are useful for
getting the size of addresses in a node, but in a few places U-Boot needs
to obtain the actual property value for a node without walking up the
stack. Add functions for this and just the existing code to use it.
Add a comment to the existing ofnode functions which do not do the right
thing with a flat tree.
This fixes a problem reading PCI addresses.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
This function allows a device's status to be read. This indicates whether
the device should be enabled or disabled.
Note: In normal operation disabled devices will not be present in the
driver-model tree.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
Add a function which reads resources from a device, such as the device
hardware address. This uses the "reg" property in the device.
Unlike other functions there is little sense in inlining this when
livetree is not being used because it has some logic in it and this would
just bloat the code size.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
This provides a way to find the number of strings in a string list. Add it
and also fix up the comment for ofnode_read_string_index().
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Marcel Ziswiler <[email protected]>
Tested-on: Beaver, Jetson-TK1
|
|
This function should not be used with driver model. Update the code to
reflect this.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Some AHCI drivers use SCSI under the hood. Rather than making the AHCI
driver be in the SCSI uclass it makes sense to have the AHCI device create
a SCSI device as a child. That way we can handle any AHCI-specific
operations rather than trying to pretend tha the device is just SCSI.
To handle this we need to provide a way for AHCI drivers to bind a SCSI
device as its child, and probe it. Add functions for this.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Split out the code that scans a single SCSI bus into a separate function.
This will allow it to be used from driver model.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Change this function to return an error number instead of true/false.
This allows us to return a proper error number.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
The SCSI uclass currently has no operations. It just uses the global SCSI
functions. Fix this by adding operations to the only two drivers that use
the uclass, and replacing the global functions with those defined locally
in the SCSI code.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
With driver model we need to define implementations of exec() and
bus_reset() separately for each SCSI driver. As a first step, create a
local version of each function in the AHCI driver and call each from its
global version.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
The 'mode' parameter is actually a flag to determine whether to display
a list of devices found during the scan. Rename it to reflect this, add a
function comment and adjust callers to use a boolean.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
With driver model these functions need a device pointer. Add one even
when CONFIG_DM_SCSI is not defined. This avoids having ugly conditional
function prototypes, When CONFIG_DM_SCSI is not defined we can just ignore
the pointer.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
With driver model we cannot have static data or assume that there is only
one device of each time. Adjust the code so that 'probe_ent' is not needed
with driver model. Add a new ahci_init_dm() function which can init AHCI
for driver model without re-allocating the uclass data. Move over the only
existing driver to use this new function.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Two AHCI drivers use SCSI with CONFIG_DM_SCSI. The SCSI uclass calls
scsi_low_level_init() which is implemented by ahci.c. If
CONFIG_SCSI_AHCI_PLAT is defined it does one thing and if it is not
it does something else.
We don't need to call through scsi_low_level_init() to get the init
completed. Instead, adjust the two drivers to call into AHCI directly.
Drop the post-probe init in the SCSI uclass. This means that driver model
doesn't need to use scsi_low_level_init(). It is a legacy function and
driver model should use a driver's probe() method instead.
While we are here, add a comment to the top of the file explaining what
ahci.c does.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
This code is duplicated. Create a ahci_start_ports() function to handle
this and call it from both places.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
These are very confusing without some sort of indentation. At some point
we will be able to remove them, but for now, indent them.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|