9
0
Fork 0
Commit Graph

29 Commits

Author SHA1 Message Date
Sascha Hauer bb662e2474 ARM: i.MX: iim: Add regulator support
The voltage for programming the fuses is external to the SoC and
on some boards this is controllable with a regulator, so add regulator
support to the iim driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:28 +02:00
Sascha Hauer cf32bf77de ARM: i.MX: iim: provide a MAC address convenience variable
Allow to read/write the registered MAC addresses in the iim
module directly via a device parameter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:28 +02:00
Sascha Hauer f321ec1699 ARM: i.MX: iim: make fuse blowing work on i.MX5
The i.MX5 iim has an additional bit in the CCM module which
enables the supply. Add support for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:28 +02:00
Sascha Hauer e315ea6f7d ARM: i.MX: iim: don't make detour over cdev API
imx_iim_read is a iim internal function, so access the
internal functions rather than using the cdev API.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:28 +02:00
Sascha Hauer 310c20d927 ARM: i.MX: iim: move static variables into driver struct
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:28 +02:00
Sascha Hauer c9f2e96c61 ARM: i.MX: iim: use dev_* for messages
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:28 +02:00
Sascha Hauer d3feff68e2 ARM: i.MX: iim: pass private data struct to imx_iim_fuse_sense
To make all struct members available and to reduce the argument
count.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:27 +02:00
Sascha Hauer bb9e3842b2 ARM: i.MX: iim: pass private data struct to imx_iim_fuse_blow
To make all struct members available and to reduce the argument
count.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:27 +02:00
Sascha Hauer eec34f2a08 ARM: i.MX: iim: register iim device
With devicetree devicenames start with numbers. Parameters on these
devices are not accessible since variables can't start with numbers.
Register a logical 'iim' device which makes the permanent_write_enable
and explicit_sense_enable parameters accessible again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:27 +02:00
Sascha Hauer fd56e95b18 ARM: i.MX: iim: Add namespace to functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:27 +02:00
Sascha Hauer c50bdcf71e ARM: i.MX: iim: introduce private data struct
Instead of duplicating data shared between the banks in a bank
specific struct, use a iim struct and a bank struct.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-04 20:57:24 +02:00
Sascha Hauer 579dce92c8 ARM: i.MX: iim: Check result of dev_request_mem_region
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-16 09:13:55 +02:00
Sascha Hauer b67b2671c2 treewide: Add missing includes
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-08 15:42:04 +01:00
Alexander Shiyan 2b4a1993c7 ARM: i.MX5x: Make IIM driver kernel-compatible
Since kernel uses "imx27-iim" compatible string in i.MX5x DTS templates,
do IIM driver compatible.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-29 08:55:01 +01:00
Sascha Hauer 4699fa44a8 ARM: i.MX: iim: Add devicetree probe support
Only adds the dt ids.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 09:19:49 +02:00
Sascha Hauer d79515b91f ARM: i.MX: remove unused .mac_addr_base in iim
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 09:19:27 +02:00
Sascha Hauer 3c9b5c1a61 ARM: i.MX: iim: Use dev_add_param_bool for parameters
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer 3e503822c7 use loff_t for file offsets
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Paul Fertser b47fcc9521 mach-imx: iim: cosmetic changes to the code to make it easier to follow
This brings consistency to the way variables are named and used
according to the Freescale documentation. Also, since user is
supplying row indicies, and not offsets, it's reasonable to amend the
error message accordingly.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-28 13:47:10 +02:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Sascha Hauer a6aefdeaee Merge branches 'pu-ethaddr', 'pu-fec', 'pu-imx-iim', 'pu-resources' and 'pu-resources1' into next 2011-07-29 12:09:58 +02:00
Sascha Hauer 9abfd82817 ARM i.MX IIM: switch to resources
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:06:57 +02:00
Sascha Hauer 4e8a62ac61 ARM i.MX IIM: Make explicit sensing the default
The register based fuse readout is not available on i.MX27/31
SoCs, so make explicit sensing the default.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:06:12 +02:00
Sascha Hauer 6b07e264e6 ARM i.MX: IIM rework
The IIM module uses two drivers, one for the general IIM
module and one for the individual banks.
This patch turns this into a single driver to ease registration
of the resources. This changes the user visible behaviour in
the way that the explicit_sense_enable and permanent_write_enable
device parameters are no longer bank specific but for the
whole device. Also, the IIM module supports a maximum of
8 fuse banks, with these patch all of them are registered, even
if they are not present in a SoC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:06:12 +02:00
Sascha Hauer 2fd4fa2e99 ARM i.MX: rework IIM MAC address setting
Switch to the generic way of setting a MAC address for a
device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:05:26 +02:00
Sascha Hauer fee474a22e ARM i.MX IIM: Add a iim read function
To allow reading the iim from code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-29 12:05:26 +02:00
Baruch Siach 4d3234fd67 imx iim: add mac address support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-17 10:21:25 +02:00
Baruch Siach 5ccbeb3141 imx: driver for the IIM fusebox
This driver provides an interface for programming and sensing the IIM fusebox
which is present on some i.MX chips.

Since the IIM io addresses of the controlling registers and each fuse bank are
are not contiguous the driver implementation uses two drivers, imx_iim, and
imx_iim_bank.  The imx_iim is the "parent" driver for a device holding the
map_base address of the control registers.  The imx_iim_bank driver is for
child devices holding the map_base of each fuse bank.  The platform code then,
instantiate one imx_iim_bank device per fuse bank.

Fuses blow is a dangerous operation. Thus, the fuses blow functionality can be
disabled independently at configuration time. On run time this functionality
must be enabled explicitly by setting the permanent_write_enable parameter.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-17 10:21:17 +02:00