Otavio Salvador [Mon, 11 Feb 2013 04:33:51 +0000 (04:33 +0000)]
build: imx: Fix 'u-boot.imx' build without full OBJTREE reference
When calling 'make u-boot.imx' the build were failing as it were
expecting the full path for the file; this regression has been
included by commit 71a988a (imximage.cfg: run files through C
preprocessor).
The direct references for u-boot.imx were replaced by $(obj) as
config.mk handles the proper setting of it making it set to $(OBJTREE)
when required.
The build has been test using:
- ./MAKEALL -s mx5 -s mx6
- make u-boot.imx
- make O=/tmp/build
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Fabio Estevam [Thu, 7 Feb 2013 06:45:23 +0000 (06:45 +0000)]
mx6: Disable Power Down Bit of watchdog
On a mx6qsabresd revision C board with rev1.2 mx6q, the system gets resetted
and it is not able to reach the Linux prompt.
Comparing the watchdog behaviour on a revB versus revC board:
- On a mx6qsabresd revB:
U-Boot > reset
resetting ...
U-Boot 2013.01-10524-g432a3aa-dirty (Feb 07 2013 - 13:34:46)
CPU: Freescale i.MX6Q rev1.1 at 792 MHz
Reset cause: WDOG
...
- On a mx6qsabresd revC:
U-Boot > reset
resetting ...
U-Boot 2013.01-10524-g432a3aa-dirty (Feb 07 2013 - 13:34:46)
CPU: Freescale i.MX6Q rev1.1 at 792 MHz
Reset cause: POR
So due to revC POR/watchdog circuitry whenever a watchdog occurs, it causes a POR.
Clearing the PDE - Power Down Enable bit of WMCR registers fixes the problem and
is also safe for all mx6 boards.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefano Babic <sbabic@denx.de>
Benoît Thébaudeau [Wed, 30 Jan 2013 11:19:18 +0000 (11:19 +0000)]
imx: mx6q DDR3 init: Benefit from available CL = 7
All the users of mx6q_4x_mt41j128.cfg (DDR3-1333H Micron MT41J128M16HA-15E or SK
hynix H5TQ2G63BFR-H9C for i.MX6Q SABRE Lite, and DDR3-1600K Micron
MT41K128M16JT-125:K for i.MX6 SABRE SD) support the optional down binning to
DDR3-1066F (CL = 7, CWL = 6), which is possible at 532 MHz, so use it.
In these conditions:
tRCD(min) = 13.125 ns
tRP(min) = 13.125 ns
tRC(min) = max(tRAS(min, DDR3-1333H), tRAS(min, DDR3-1600K)) + tRP(min)
tRAS(min, DDR3-1333H) = 36 ns
tRAS(min, DDR3-1600K) = 35 ns
MMDC1_MDCFG0.tCL should be set to 7 nCK, encoded as 0x4 in the bit-field
MMDC1_MDCFG0[3:0].
MR0.CL should be set as in MMDC1_MDCFG0.tCL, i.e. to 7 nCK, which is encoded
as 0x6 in MRS.LMR.MR0.{A6:A4, A2} and MMDC1_MDSCR[22:20, 18].
MMDC1_MDCFG1.tCWL should be set to 6 nCK, encoded as 0x4 in the bit-field
MMDC1_MDCFG1[2:0].
MMDC1_MDCFG1.tRCD should be set to 13.125 ns, which is 7 nCK at 532 MHz, encoded
as 0x6 in the bit-field MMDC1_MDCFG1[31:29].
MMDC1_MDCFG1.tRP should be set to 13.125 ns, which is 7 nCK at 532 MHz, encoded
as 0x6 in the bit-field MMDC1_MDCFG1[28:26].
MMDC1_MDCFG1.tRC should be set to 49.125 ns, which is 27 nCK at 532 MHz, encoded
as 0x1A in the bit-field MMDC1_MDCFG1[25:21].
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Benoît Thébaudeau [Wed, 30 Jan 2013 11:19:17 +0000 (11:19 +0000)]
imx: mx6q DDR3 init: Fix MR0.PPD
MR0.PPD should be set as in MMDCx_MDPDC.SLOW_PD, i.e. to fast-exit mode, which
is encoded as 1 in MRS.LMR.MR0.A12 and MMDCx_MDSCR[28].
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Benoît Thébaudeau [Wed, 30 Jan 2013 11:19:16 +0000 (11:19 +0000)]
imx: mx6q DDR3 init: Fix RST_to_CKE
MMDC1_MDOR.RST_to_CKE should be set to 500 µs according to the JEDEC
specification for DDR3. With a cycle of 15.258 µs, this gives 33 cycles encoded
as 0x23 for the bit-field MMDC1_MDOR[5:0].
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Benoît Thébaudeau [Wed, 30 Jan 2013 11:19:15 +0000 (11:19 +0000)]
imx: mx6q DDR3 init: Fix SDE_to_RST
MMDC1_MDOR.SDE_to_RST should be set to 200 µs according to the JEDEC
specification for DDR3. With a cycle of 15.258 µs, this gives 14 cycles encoded
as 0x10 for the bit-field MMDC1_MDOR[13:8].
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Benoît Thébaudeau [Wed, 30 Jan 2013 11:19:14 +0000 (11:19 +0000)]
imx: mx6q DDR3 init: Fix tXPR
MMDC1_MDOR.tXPR should be set as specified for the JEDEC DDR3 timing tXPR.
For all DDR3 speed bins:
tXPR(min) = max(5 nCK, tRFC(min) + 10 ns)
tRFC(2 Gb) = 160 ns
All the users of mx6q_4x_mt41j128.cfg have a 2-Gb density (Micron
MT41J128M16HA-15E or SK hynix H5TQ2G63BFR-H9C for i.MX6Q SABRE Lite, and Micron
MT41K128M16JT-125:K for i.MX6 SABRE SD).
Hence, MMDC1_MDOR.tXPR should be set to max(5 nCK, 170 ns), which is 170 ns
and 91 nCK at 532 MHz, encoded as 0x5A in the bit-field MMDC1_MDOR[23:16].
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Benoît Thébaudeau [Wed, 30 Jan 2013 11:19:13 +0000 (11:19 +0000)]
imx: mx6q DDR3 init: Fix tMRD
MMDC1_MDCFG1.tMRD should be set to max(tMRD, tMOD) for DDR3.
For all DDR3 speed bins:
tMRD(min) = 4 nCK
tMOD(min) = max(12 nCK, 15 ns)
Hence, MMDC1_MDCFG1.tMRD should be set to max(12 nCK, 15 ns), which is 12 nCK
at 532 MHz, encoded as 0xB in the bit-field MMDC1_MDCFG1[8:5].
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>
Otavio Salvador [Wed, 23 Jan 2013 10:30:34 +0000 (10:30 +0000)]
mx23evk: Add initial board support
The following features are supported:
* 128 MB DDR1 SDRAM
* DUART
* SD/MMC Card Socket
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Otavio Salvador [Wed, 23 Jan 2013 10:30:33 +0000 (10:30 +0000)]
mx23_olinuxino: Add default environment
This adds a default environment with support for MMC booting.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Marek Vasut [Tue, 22 Jan 2013 15:01:05 +0000 (15:01 +0000)]
mxs: mmc: mx23_olinuxino: Add MMC support
Add support for the MMC attached to SSP1.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Tue, 22 Jan 2013 15:01:04 +0000 (15:01 +0000)]
mxs: mmc: Fix the MMC driver for MX23
The MX23 has different layout of DMA channels. Fix the MMC
driver to support MX23.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Tue, 22 Jan 2013 15:01:03 +0000 (15:01 +0000)]
mxs: mmc: Allow overriding default card detect implementation
Some MXS based boards do not implement the card-detect signal. Allow
user to specify alternate card-detect implementation.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Tue, 22 Jan 2013 15:01:02 +0000 (15:01 +0000)]
mxs: mmc: Fix MMC reset on iMX23
This does the same reset mask as done in v3.7 Linux kernel code.
The block is properly configured for MMC operation that way.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Tue, 22 Jan 2013 15:01:01 +0000 (15:01 +0000)]
mxs: ssp: Add SSP registers map for MX23
The MX23 SSP register layout differs from MX28 in certain bits,
adjust the register layout accordingly.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Tue, 22 Jan 2013 15:01:00 +0000 (15:01 +0000)]
mxs: dma: Fix APBH DMA driver for MX23
The MX23 has less channels for the APBH DMA, sligtly different register
layout and some bits in those registers are placed differently. Reflect
this in the driver. This patch fixes MMC/DMA issue on MX23.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Troy Kisky [Mon, 22 Oct 2012 16:40:47 +0000 (16:40 +0000)]
mx6qsabrelite: search mii phy address 4-7
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Troy Kisky [Mon, 22 Oct 2012 16:40:46 +0000 (16:40 +0000)]
net: fec_mxc: get phydev before fec_probe
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Troy Kisky [Mon, 22 Oct 2012 16:40:45 +0000 (16:40 +0000)]
net: fec_mxc: only call phy_connect in fec_probe
This allows us to create the phydev before calling
fec_probe in later patch.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Troy Kisky [Mon, 22 Oct 2012 16:40:44 +0000 (16:40 +0000)]
net: fec_mxc: use fec_set_dev_name to set name
This allows us to create the phydev before calling
fec_probe in later patch.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Troy Kisky [Mon, 22 Oct 2012 16:40:43 +0000 (16:40 +0000)]
phy: add phy_find_by_mask/phy_connect_dev
It is useful to be able to try a range of
possible phy addresses to connect.
Also, an ethernet device is not required
to use phy_find_by_mask leading to better
separation of mii vs ethernet, as suggested
by Andy Fleming.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Troy Kisky [Mon, 22 Oct 2012 16:40:42 +0000 (16:40 +0000)]
net: fec_mxc: have fecmxc_initialize call fecmxc_initialize_multi
Having only one call to fec_probe will ease the changing of its
parameters.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Troy Kisky [Mon, 22 Oct 2012 16:40:41 +0000 (16:40 +0000)]
net: fec_mxc: change fec_mii_setspeed parameter
Only the hardware ethernet registers are needed
for this function, so don't pass the more general
structure. I'm trying to separate MII and fec.
This also fixes MX28 fec_mii_setspeed use on secondary ethernet port
This was found by inspection of the code and should be
checked on real hardware.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Troy Kisky [Mon, 22 Oct 2012 16:40:40 +0000 (16:40 +0000)]
net: fec_mxc: delete CONFIG_FEC_MXC_MULTI
It is more logical to test for CONFIG_FEC_MXC_PHYADDR
to determine whether to define the function fecmxc_initialize.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Troy Kisky [Mon, 22 Oct 2012 16:40:39 +0000 (16:40 +0000)]
doc/README.fec_mxc: add documentation
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Fabio Estevam [Tue, 8 Jan 2013 05:21:45 +0000 (05:21 +0000)]
mxs: Use __weak annotation to simplify code
Using the __weak annotation can make the code cleaner.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Fabio Estevam [Wed, 2 Jan 2013 08:48:34 +0000 (08:48 +0000)]
tools: imximage: Let .name field be more generic
Since this structure is not i.MX5x specific, remove the '5x' to make it more
generic.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Mon, 14 Jan 2013 08:59:24 +0000 (08:59 +0000)]
mx6qsabre_common: Let mmc partition be board specific
commit
49ea0ff5 (
49ea0ff5) introduced CONFIG_SYS_MMC_ENV_PART into mx6qsabresd.h
to store the mmc partition, but in order for it to have effect we should place
it into 'mmcpart' variable.
Also add CONFIG_SYS_MMC_ENV_PART into mx6qsabreauto.h.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Knut Wohlrab [Mon, 21 Jan 2013 23:11:21 +0000 (23:11 +0000)]
mx6qsabreauto: enable USB host interface
The USB host interface is routed to plug USB1/J30 on the mother board.
Signed-off-by: Knut Wohlrab <knut.wohlrab@de.bosch.com>
Marek Vasut [Mon, 21 Jan 2013 14:57:03 +0000 (14:57 +0000)]
mxs: Boost the memory power supply
The memory power supply on MX23 didn't pump out enough juice into
the DRAM chip, thus caused occasional memory corruption. Fix this.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Troy Kisky [Fri, 18 Jan 2013 16:14:24 +0000 (16:14 +0000)]
imximage.cfg: run files through C preprocessor
The '#' used as comments in the files cause the preprocessor
trouble, so change to /* */.
The mkimage command which uses this preprocessor output
was moved to arch/arm/imx-common/Makefile
.gitignore was updated to ignore .cfgtmp files.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Otavio Salvador [Sat, 19 Jan 2013 16:02:49 +0000 (16:02 +0000)]
mxs: Add MX23 quirks into the clock code
The MX23 has different handling of the SSP clock and GPMI NAND clock sources,
add necessary quirks into the clock code to properly handle these.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Fabio Estevam [Fri, 18 Jan 2013 23:57:45 +0000 (23:57 +0000)]
woodburn: Set Write Protection GPIO as input
Set Write Protection GPIO as input.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Marek Vasut [Sat, 12 Jan 2013 07:11:11 +0000 (07:11 +0000)]
mxs: Add MX23 olinuxino board support
This patch adds support for MX23-based Olinuxino board.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Fri, 11 Jan 2013 13:29:42 +0000 (13:29 +0000)]
mxs: Linux uses ttyAMA0 as DUART
Replace use of ttyAM0 with ttyAMA0 as default serial console.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:18 +0000 (03:19 +0000)]
mxs: Fix the memory init for MX23
The memory init is slightly different on MX23, thus split the memory
init for mx23 and mx28 into different functions.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Fri, 11 Jan 2013 03:19:17 +0000 (03:19 +0000)]
mxs: Add function to ungate the power block on MX23
The power block on MX23 must first be ungated before it can be operated.
Add function to MXS power init that ungates it.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Fri, 11 Jan 2013 03:19:14 +0000 (03:19 +0000)]
mmc: Limit the number of used SSP ports on MX23
The MX23 can only use two SSP ports.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andy Fleming <afleming@freescale.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:13 +0000 (03:19 +0000)]
mx23: config: Enable mxsboot tool for i.MX23 based boards
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:12 +0000 (03:19 +0000)]
mx23: config: Enable building of u-boot.sb binary
For i.MX23 we need to pass imx23 as elftosb param.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:11 +0000 (03:19 +0000)]
mx23: SPL: Initialize DDR at 133MHz
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:10 +0000 (03:19 +0000)]
mx23: SPL: Add boot mode support
This adds the boot mode support for i.MX23 processors.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:09 +0000 (03:19 +0000)]
mx23: Add boot mode description
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:08 +0000 (03:19 +0000)]
mx23: Add support on print_cpuinfo()
Add information to identify i.MX23 chips and its known revisions.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Fri, 11 Jan 2013 03:19:07 +0000 (03:19 +0000)]
mx23: ssp: Fix ssp-regs.h for MX23
Disable SSP2 and SSP3 ports on MX23.
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Fri, 11 Jan 2013 03:19:06 +0000 (03:19 +0000)]
mx23: Add POWER and CLKCTRL register definitions
Add register definitions for the i.MX23 power control block and
clock control block. These are essential for the basic bootstrap
of the i.MX23. Also, properly include them in imx-regs.h .
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:05 +0000 (03:19 +0000)]
mx23: Add iomux-mx23.h
This has been copied from Linux source at revision
786f02b719f.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:04 +0000 (03:19 +0000)]
mx23: Add register base addresses
This adds the base addresses of i.MX23 and easy the detection of wrong
order in board setup, in case no SoC has been set, an error is raised
during build.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Otavio Salvador [Fri, 11 Jan 2013 03:19:03 +0000 (03:19 +0000)]
mxs: clock: Use 'mxs' prefix for methods
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Fri, 11 Jan 2013 03:19:02 +0000 (03:19 +0000)]
mxs: ssp: Pull out the SSP bus to regs conversion
Create function which converts SSP bus number to SSP register pointer.
This functionality is reimplemented multiple times in the code, thus
make one common implementation. Moreover, make it a switch(), since the
SSP ports are not mapped in such nice linear fashion on MX23, therefore
having it a switch will simplify things there.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andy Fleming <afleming@freescale.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Marek Vasut [Fri, 11 Jan 2013 03:19:01 +0000 (03:19 +0000)]
mxs: mmc: Drop unused members from struct mxsmmc_priv
The clock data are not used by the driver, drop them.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andy Fleming <afleming@freescale.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Tom Rini [Tue, 15 Jan 2013 21:47:42 +0000 (14:47 -0700)]
Prepare v2013.01
Signed-off-by: Tom Rini <trini@ti.com>
Łukasz Dałek [Sat, 12 Jan 2013 11:39:27 +0000 (11:39 +0000)]
pxa: Save lr register in relocate_code function
When u-boot is compiled for PXA25x processor, pxa/start.S is calling
cpu_init_crit by BL instruction. BL is overwriting lr register so
relocate_code is going into infinite loop. This patch preservs lr
register in r12 before calling cpu_init_crit and after function returns
restores it.
Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Tom Rini [Mon, 14 Jan 2013 22:41:38 +0000 (15:41 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Mon, 14 Jan 2013 22:30:31 +0000 (15:30 -0700)]
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
Peter Meerwald [Mon, 19 Nov 2012 23:13:04 +0000 (23:13 +0000)]
twl4030: fix 'could could' in error messages
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Tom Rini [Mon, 14 Jan 2013 20:10:07 +0000 (13:10 -0700)]
watchdog.h: Move hw_watchdog_init prototype to end, guard
In commit abbab70 we added a prototype for hw_watchdog_init, in a
Freescale i.MX watchdog driver. We did not however guard it with an
__ASSEMBLY__ check and broke some platforms. Move this to the end of
the file with other prototypes and guard it.
Signed-off-by: Tom Rini <trini@ti.com>
Wolfgang Denk [Thu, 3 Jan 2013 00:43:59 +0000 (00:43 +0000)]
VIDEO: better document the correct use of CONFIG_FB_ADDR
Signed-off-by: Wolfgang Denk <wd@denx.de>
cc: Anatolij Gustschin <agust@denx.de>
Nikita Kiryanov [Thu, 20 Dec 2012 00:52:34 +0000 (00:52 +0000)]
lcd: restore ability to display 8 bpp BMPs on 16 bpp LCDs
Commit
fb6a9aab7ae78c (LCD: display 32bpp decompressed bitmap image)
broke the check that allowed U-Boot to display 8 bpp BMPs on a 16
bpp LCD screen, effectively turning this feature off.
Restore this feature by changing the check back to the same meaning
it originally had.
To avoid future confusion, the check has also been rephrased to make
its meaning clear.
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Albert ARIBAUD [Mon, 14 Jan 2013 16:00:02 +0000 (17:00 +0100)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Mon, 14 Jan 2013 14:21:00 +0000 (15:21 +0100)]
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Ajay Kumar [Sun, 13 Jan 2013 23:32:16 +0000 (23:32 +0000)]
video: exynos_fb: Make a call to draw_logo only when CONFIG_CMD_BMP is selected
Previously, the call to draw_logo() was happening irrespective
of whether we have selected logo or LCD console.
With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected.
This would even fix the following compilation warning:
exynos_fb.c: In function 'draw_logo':
exynos_fb.c:74:8: warning: variable 'addr' set but not used
[-Wunused-but-set-variable]
exynos_fb.c:73:9: warning: variable 'y' set but not used
[-Wunused-but-set-variable]
exynos_fb.c:73:6: warning: variable 'x' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Ajay Kumar [Sun, 13 Jan 2013 23:32:15 +0000 (23:32 +0000)]
video: exynos_dp: Remove unused variable disp_info
Remove unused variable disp_info to fix the following compilation warning:
exynos_dp.c: In function 'exynos_init_dp':
exynos_dp.c:860:23: warning: variable 'disp_info' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Rajeshwari Shinde [Sun, 13 Jan 2013 19:49:36 +0000 (19:49 +0000)]
I2C: S3C24X0: Resolve build error for VCMA9
This patch resolves the following build errors for I2C driver in
VCMA9:
In file included from s3c24x0_i2c.c:40:0:
s3c24x0_i2c.h:38:17: error: field 'id' has incomplete type
s3c24x0_i2c.c:70:39: error: 'CONFIG_MAX_I2C_NUM' undeclared here (not
in a function) s3c24x0_i2c.c:70:31: warning: 'i2c_bus' defined but
not used [-Wunused-variable] s3c24x0_i2c.c:72:12: warning:
'i2c_busses' defined but not used [-Wunused-variable]
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Fabio Estevam [Wed, 9 Jan 2013 04:55:09 +0000 (04:55 +0000)]
mx51evk: Add DVI output support
Add DVI output support and make it the default video output.
Currently the CLAA WVGA panel is supported, but this panel has to be purchased
separately, so using the DVI output as the default would allow more people to
try the splash screen feature on a mx51evk.
If someone still wants to use the CLAA WVGA, just set the panel variable as:
set panel claa
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Thu, 10 Jan 2013 09:00:53 +0000 (09:00 +0000)]
mx6qsabresd: Fix booting the kernel from SDHC3
Since commit
de7d02aeb (mx6qsabresd: add usdhc2 and usdhc4 support)
SDHC3 device node is no longer 0, which breaks loading a uImage from SDHC3.
Fix it by adapting the default environment to use CONFIG_SYS_MMC_ENV_DEV as the
correct mmc node for loading the kernel from.
While at it, go back to using SDHC3 as the default mmc, since we have Yocto
images that generate an SD card containing U-boot,kernel and rootfs, so it is
more convenient to keep using SDHC3 as it was originally.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Otavio Salvador [Thu, 10 Jan 2013 09:45:09 +0000 (09:45 +0000)]
mx6qsabre{auto, sd}: Add support to dynamically choose between fdt use or not
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Otavio Salvador [Thu, 10 Jan 2013 09:45:08 +0000 (09:45 +0000)]
mx6qsabrelite: Add support to dynamically choose between fdt use or not
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Thu, 10 Jan 2013 09:45:07 +0000 (09:45 +0000)]
mx53loco: Add support to dynamically choose between fdt use or not
The CONFIG_SYS_CBSIZE has been change to 512 to avoid runtime errors as:
,---[ Runtime error ]
| Hit any key to stop autoboot: 0
| MX53LOCO U-Boot > pri netboot
| netboot=echo Booting from net ...; run netargs; if test ...
| prefetch abort
| pc : [<
20747368>] lr : [<
20747365>]
| sp :
af566e20 ip :
00000000 fp :
00000000
| r10:
00000002 r9 :
af6dfc28 r8 :
af566f58
| r7 :
af6dfc10 r6 :
00000001 r5 :
00000002 r4 :
74206669
| r3 :
00000000 r2 :
00000060 r1 :
00000020 r0 :
0000018e
| Flags: nZCv IRQs off FIQs off Mode SVC_32
| Resetting CPU ...
|
| resetting ...
`---
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Thu, 10 Jan 2013 09:45:06 +0000 (09:45 +0000)]
mx28evk: Add support to dynamically choose between fdt use or not
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Thu, 10 Jan 2013 09:45:05 +0000 (09:45 +0000)]
mx28evk: We shouldn't hardcode a rootfs filesystem type
For a generic environment, we shouldn't have a fixed rootfs filesystem
so we drop it from env.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Thu, 10 Jan 2013 09:45:04 +0000 (09:45 +0000)]
mx6qsabrelite: Use tabs to environment setting
This rework the environment to use tabs for environment setting as
done in other boards.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Troy Kisky [Mon, 22 Oct 2012 15:19:01 +0000 (15:19 +0000)]
mx31/mx35/mx51/mx53/mx6: add watchdog
Use a common watchdog driver for all these cpus.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Bo Shen [Thu, 6 Dec 2012 21:37:04 +0000 (21:37 +0000)]
arm: at91sam9x5: add dataflash boot support
Add dataflash boot support on at91sam9x5ek board
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
angelo [Fri, 23 Nov 2012 12:23:39 +0000 (12:23 +0000)]
m68k/lib: fix serial driver relocation
Fix coldfire serial driver bindings no more relocated to ram after last
changes to drivers/serial/serial.c (regression).
Serial initialization in ram has to be called after that gd->reloc_off is
calculated.
Signed-off-by: Angelo Dureghello <sysamfw@gmail.com>
Cc: Jason Jin <jason.jin@freescale.com>
Acked-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
Tested-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
Tom Rini [Fri, 11 Jan 2013 21:38:24 +0000 (14:38 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
Albert ARIBAUD [Fri, 11 Jan 2013 17:17:33 +0000 (18:17 +0100)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Ajay Kumar [Thu, 10 Jan 2013 21:06:11 +0000 (21:06 +0000)]
EXYNOS5: Enable console multiplexing in u-boot
We enable console multiplexing and use both serial and LCD for stdout/stderr.
Initially, u-boot output console is observed via serial port.
If you also have a DP panel connected onto your SMDK5250 board,
you can switch to LCD console by typing "setenv stdout lcd".
You can always switch back to serial using "setenv stdout serial".
You can switch error console(stderr) as well, using similar commands.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Ajay Kumar [Thu, 10 Jan 2013 21:06:10 +0000 (21:06 +0000)]
EXYNOS5: Make all display related code dependent on CONFIG_LCD
u-boot compilation fails for smdk5250 when we deselect CONFIG_LCD
from the main config file.
Following error was observed:
drivers/video/libvideo.o: In function `exynos_lcd_init':
/home/ajay/u-boot-samsung/drivers/video/exynos_fb.c:68: undefined reference to `lcd_set_flush_dcache'
This is because exynos video drivers have dependency on CONFIG_LCD.
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Jaehoon Chung [Thu, 27 Dec 2012 22:30:33 +0000 (22:30 +0000)]
Exynos: clock: add CLK_DIV_FSYS3 at set_mmc_clk
Mobile storage is used the CLK_DIV_FSYS3 value.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Jaehoon Chung [Thu, 27 Dec 2012 22:30:32 +0000 (22:30 +0000)]
Exynos: clock: support get_mmc_clk for exynos
To get exactly clock value for mmc, support the get_mmc_clk() like
set_mmc_clk().
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Javier Martinez Canillas [Mon, 7 Jan 2013 01:35:21 +0000 (01:35 +0000)]
OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT
IGEP board PC16550D (ns16550) UART doesn't set the
Transmitter Empty (TEMT) Bit in SPL. This makes
U-Boot to hang while waiting for TEMT. Add the
CONFIG_SYS_NS16550_BROKEN_TEMT config option to
avoid this issue.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Javier Martinez Canillas [Mon, 7 Jan 2013 01:35:20 +0000 (01:35 +0000)]
serial/ns16550: add an option to avoid hanging on broken platforms
Some platforms (e.g. IGEPv2 board) has a broken ns16550 UART that
does not set the TEMT bit when the transmitter is empty in SPL.
This makes U-Boot to hang while waiting for TEMT to be set.
Add a new option to avoid this:
CONFIG_SYS_NS16550_BROKEN_TEMT
16550 UART set the Transmitter Empty (TEMT) Bit when all output
has finished and the transmitter is totally empty. U-Boot waits
for this bit to be set to initialize the serial console. On some
broken platforms this bit is not set in SPL making U-Boot to
hang while waiting for TEMT. Define this option to avoid it.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Nishanth Menon [Wed, 2 Jan 2013 07:59:24 +0000 (07:59 +0000)]
Makefile: remove MLO.byteswap on clobber
On clobber, do a cleanup even for SPL build else, we'd have
MLO.byteswap remaining for certain platforms like am33xx SPL builds
Signed-off-by: Nishanth Menon <nm@ti.com>
Javier Martinez Canillas [Fri, 28 Dec 2012 02:51:53 +0000 (02:51 +0000)]
OMAP3: igep00x0: add CONFIG_SPL_BOARD_INIT for CONFIG_SPL_NAND_SUPPORT
When booting an IGEPv2 board from NAND with SPL, U-Boot hangs
trying to read the OMAP General Purpose Memory Controller (GPMC).
The reason is that the GPMC initialization function is called
inside spl_board_init() and this function is only executed when
CONFIG_SPL_BOARD_INIT is defined.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Tom Rini [Thu, 10 Jan 2013 21:44:40 +0000 (14:44 -0700)]
Prepare v2013.01-rc3
Signed-off-by: Tom Rini <trini@ti.com>
Daniel Schwierzeck [Mon, 7 Jan 2013 06:54:52 +0000 (06:54 +0000)]
bootm: relocate names of sub-command table for archs with CONFIG_NEEDS_MANUAL_RELOC
To make bootm sub-command feature working on archs with CONFIG_NEEDS_MANUAL_RELOC,
the name pointers in the sub-command table need to be relocated.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Taylor Hutt [Fri, 30 Nov 2012 13:01:23 +0000 (13:01 +0000)]
arm: Tabify code for MMC initialization
The two modified lines were indented with spaces.
They are now indented with tabs.
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 30 Nov 2012 13:01:22 +0000 (13:01 +0000)]
arm: Move bootstage record for board_init_f() to after arch_cpu_init()
The timer may be inited in arch_cpu_init() so it is not safe to make a
bootstage mark before this is called. Arrange the code to fix this.
Note: The question was raised as to why we don't keep all archs in sync.
PowerPC doesn't have specific bootstage markers at present (although it
does use boot progress). I hope that the generic board series will solve
this problem in general, but in the meantime this is a real problem, and
only in ARM.
We now get a correct time for board_init_f:
Timer summary in microseconds:
Mark Elapsed Stage
0 0 reset
100,000 100,000 spl_start
848,530 748,530 board_init_f
907,301 58,771 board_init_r
910,478 3,177 board_init
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Wai-Hong Tam [Fri, 30 Nov 2012 13:01:21 +0000 (13:01 +0000)]
arm: Make interrupts.o and reset.o in libarm also appear in SPL
SPL u-boot may call do_reset() which depends on interrupts.o and reset.o.
So make them also appear in SPL.
Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 30 Nov 2012 13:01:20 +0000 (13:01 +0000)]
Add option to display customised memory information
Some boards want to report more than just memory size. For example, it
might be useful to display the memory type (DDR2, DDR3) or manufacturer.
Add a weak function to support this requirement, accessed through a new
'meminfo' command.
Any example of the DRAM: output is below, just for illustration:
SMDK5250 # meminfo
DRAM: 2 GiB Elpida DDR3 @ 800MHz
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 30 Nov 2012 13:01:19 +0000 (13:01 +0000)]
arm: Add CONFIG_DISPLAY_BOARDINFO_LATE to display board info on LCD
This option displays board info after stdio is running, so that it will
appear on the LCD. If it is displayed earlier, the board info will appear
on the serial console but not on the LCD.
Here follows a blow-by-blow description.
1a. Without CONFIG_DISPLAY_BOARDINFO_LATE, on serial:
U-Boot 2011.12-02550-g037e1c5-dirty (Nov 15 2012 - 14:29:42) for SMDK5250
CPU: S5PC520 @ 1700MHz
Board: Google Snow, rev 0
I2C: ready
DRAM: 2 GiB Elpida DDR3 @ 800MHz
MMC: S5P MSHC0: 0, S5P MSHC1: 1
SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment
In: mkbp-keyb
Out: lcd
Err: lcd
Net: No ethernet found.
Hit any key to stop autoboot: 0
SMDK5250 #
1b. Without CONFIG_DISPLAY_BOARDINFO_LATE, on LCD (note machine info
is missing):
In: mkbp-keyb
Out: lcd
Err: lcd
Net: No ethernet found.
Hit any key to stop autoboot: 0
SMDK5250 #
2a. With CONFIG_DISPLAY_BOARDINFO_LATE, on serial:
U-Boot 2011.12-02550-g037e1c5 (Nov 15 2012 - 14:27:40) for SMDK5250
CPU: S5PC520 @ 1700MHz
I2C: ready
DRAM: 2 GiB Elpida DDR3 @ 800MHz
MMC: S5P MSHC0: 0, S5P MSHC1: 1
SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment
Model: Google Snow
In: mkbp-keyb
Out: lcd
Err: lcd
Net: No ethernet found.
Hit any key to stop autoboot: 0
SMDK5250 #
2b. With CONFIG_DISPLAY_BOARDINFO_LATE, on LCD (note machine info is present):
Model: Google Snow
In: mkbp-keyb
Out: lcd
Err: lcd
Net: No ethernet found.
Hit any key to stop autoboot: 0
SMDK5250 #
Since the LCD is all that a typical user sees, it is useful to display
the model there.
We may be able to rearrange things some other way one day, but at
present this seems like a convenient way of getting the required
behaviour.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 30 Nov 2012 13:01:18 +0000 (13:01 +0000)]
Document the CONFIG_DISPLAY_BOARDINFO option
Add a short note about this in the README.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 30 Nov 2012 13:01:17 +0000 (13:01 +0000)]
arm: Add CONFIG_DELAY_ENVIRONMENT to delay environment loading
This option delays loading of the environment until later, so that only the
default environment will be available to U-Boot.
This can address the security risk of untrusted data being used during boot.
Any time you load untrusted data you expose yourself to a bug in the
code. The attacker gets to choose the data so can sometimes carefully
craft it to exploit a bug. We try to avoid touching user-controlled
data during a verified boot unless strictly necessary. Since the
default environment is good enough in this case (or you would just
change it), this gets around the problem by just not loading the
environment.
When CONFIG_DELAY_ENVIRONMENT is defined, it is convenient to have a
run-time way of enabling loading of the environment. Add this to the
fdt as /config/delay-environment.
Note: This patch depends on http://patchwork.ozlabs.org/patch/194342/
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Simon Glass [Fri, 30 Nov 2012 13:01:16 +0000 (13:01 +0000)]
arm: Move fdt check earlier so that board_early_init_f() can use it
We want to use the fdt inside board_early_init_f(), so check for its
presence earlier in the pre-reloc init sequence.
So far ARM and microblaze are the only only ones that use
CONFIG_OF_CONTROL. Microblaze does not have the same init loop, and in
particular does not have the board_early_init_f() call. So a patch for
microblaze would have no meaning.
Signed-off-by: Simon Glass <sjg@chromium.org>
Gabe Black [Fri, 30 Nov 2012 13:01:15 +0000 (13:01 +0000)]
arm: Keep track of the tlb size as well as its location
It may be necessary to know where the TLB area ends as well as where it
starts. This allows board code to complete a secure memory erase without
destroying the page tables.
Signed-off-by: Gabe Black <gabeblack@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Arun Mankuzhi [Fri, 30 Nov 2012 13:01:14 +0000 (13:01 +0000)]
arm: move flush_dcache_all() to just before disable cache
In Cortex-A15 architecture, when we run cache invalidate
the cache clean operation executes automatically.
So if there are any dirty cache lines before disabling the L2 cache
these will be synchronized with the main memory when
invalidate_dcache_all() runs in the last part of U-boot
The two functions after flush_dcache_all is using the stack. So this
data will be on the cache. After disable when invalidate is called the
data will be flushed from cache to memory. This corrupts the stack in
invalida_dcache_all. So this change is required to avoid the u-boot
hang.
So flush has to be done just before clearing CR_C bit
Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Stefan Roese [Thu, 6 Dec 2012 14:44:12 +0000 (15:44 +0100)]
cfi_flash: Report Advanced Sector Protection (PPB) with flinfo cmd
Report the usage of the Advanced Sector Protection (PPB) to the user
upon 'flinfo' command. E.g:
Bank # 1: CFI conformant flash (16 x 16) Size: 64 MB in 512 Sectors
AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E2301
Advanced Sector Protection (PPB) enabled
Erase timeout: 16384 ms, write timeout: 2 ms
Buffer write timeout: 5 ms, buffer size: 32 bytes
Sector Start Addresses:
FC000000 E
FC020000 E RO
FC040000 E
FC060000 E
FC080000 E
...
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
Tested-by: Holger Brunck <holger.brunck@keymile.com>
Stefan Roese [Thu, 6 Dec 2012 14:44:11 +0000 (15:44 +0100)]
cfi_flash: Enable PPB protection for all AMD cmdset flash chips
Not only Spansion supports the Persistent Protection Bits (PPB) locking.
Other devices like the Micron JS28F512M29EWx also support this type
of locking/unlocking. Detection of support is done in the same way as
done for the Spansion chips - via the 0x49 CFI word.
This patch enables this PPB protection mechanism for all AMD type
(AMD commandset) chips.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
Tested-by: Holger Brunck <holger.brunck@keymile.com>
Stefan Roese [Thu, 6 Dec 2012 14:44:10 +0000 (15:44 +0100)]
cfi_flash: Read PPB sector protection from device for AMD/Spansion chips
Patch
66863b05 [cfi_flash: add support for Spansion flash PPB sector
protection] introduced the PPB (Persistent Protection Bit) locking for
Spansion chips. But right now the sector protection status (locked vs
unlocked) is set to unlocked for all sectors upon bootup. The real
sector protection status is ignored.
This patch now reads the current sector protection status and uses
it for these AMD/Spansion flash chips.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
Tested-by: Holger Brunck <holger.brunck@keymile.com>