Blackfin fixes for 2009.05
Subsystems (3)
cover Blackfin fixes for 2009.05
Add some corner case fixes for some Blackfin peripheral drivers, and add some fixes for anomalies and auditing of others. One or two of the audits aren't strictly fixes (just adding /*...*/ comments(, but it makes my life easier to keep them together.
Graf Yang (1):
Blackfin: nand: flush peripheral before polling it
Mike Frysinger (6):
Blackfin: update anomaly sheets
Blackfin: add workaround for anomaly 05000171
Blackfin: add workaround for anomaly 05000242
Blackfin: add comment about anomaly 05000430 avoidance
Blackfin: add check for anomaly 05000362
Blackfin: audit UART for all known anomalies
Todor I Mollov (1):
Blackfin: spi: make cs deassert function deterministic
cpu/blackfin/initcode.c | 17 ++++++- cpu/blackfin/serial.c | 21 ++++++++- cpu/blackfin/serial.h | 2 +- drivers/mtd/nand/bfin_nand.c | 1 + drivers/spi/bfin_spi.c | 16 ++++++- include/asm-blackfin/mach-bf527/anomaly.h | 40 ++++++++++++--- include/asm-blackfin/mach-bf533/anomaly.h | 77 +++++++++++++++++++++++----- include/asm-blackfin/mach-bf537/anomaly.h | 67 +++++++++++++------------ include/asm-blackfin/mach-bf548/anomaly.h | 18 ++++--- include/asm-blackfin/mach-bf561/anomaly.h | 17 +++--- 10 files changed, 203 insertions(+), 73 deletions(-)
PATCH 1/8 Blackfin: spi: make cs deassert function deterministic
From: Todor I Mollov <[email protected]>
Blackfin SPI driver was not driving the SPI chip-select high before putting the chip-select signals into tri-state mode. This is probably something that slipped by unnoticed in most designs. If the signals are put directly into a tri-state mode, then the board is relying on the pull-up resistors to pull up the chip-select before the next transaction. Most of the time this is fine, except when you have two transactions that follow each other very closely, such as the flash erase and read status register commands. In this case I was seeing a 500ns separation between the transactions. In my setup, with a 10kOhm pull-up, it would meet timing spec about half the time and resulted in intermittent errors. (A stronger pull up would fix this, but our design is targeted for low power consumption and a 3.3kOhm @ 3.3v is 3.3mW of needless power consumption.) I modified the spi_cs_deactivate() function in bfin_spi.c to drive the chip-selects high before putting them into tri-state. For me, this resulted in a rise time of 5ns instead of the previous rise time of about 1us, and fully satisfied the timing spec of the chip.
--- drivers/spi/bfin_spi.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-)
drivers/spi/bfin_spi.c +15 -1
@@ -52,6 +52,7 @@ void spi_cs_activate(struct spi_slave *slave) (read_SPI_FLG (bss) & ~((!bss->flg <<8 ) << slave->cs)) | (1 << slave->cs)); +SSYNC ();debug ("%s: SPI_FLG:%x\n" , __func__,read_SPI_FLG (bss)); }
@@ -59,7 +60,20 @@ __attribute__((weak))void spi_cs_deactivate (struct spi_slave *slave) {struct bfin_spi_slave *bss =to_bfin_spi_slave (slave); -write_SPI_FLG (bss,read_SPI_FLG (bss) & ~(1 << slave->cs)); +u16 flg; + +/* make sure we force the cs to deassert rather than let the +* pin float back up. otherwise, exact timings may not be +* met some of the time leading to random behavior (ugh). +*/ + flg =read_SPI_FLG (bss) | ((!bss->flg <<8 ) << slave->cs); +write_SPI_FLG (bss, flg); +SSYNC (); +debug ("%s: SPI_FLG:%x\n" , __func__,read_SPI_FLG (bss)); + + flg &= ~(1 << slave->cs); +write_SPI_FLG (bss, flg); +SSYNC ();debug ("%s: SPI_FLG:%x\n" , __func__,read_SPI_FLG (bss)); }
Signature · 1 line
1.6.2.2
PATCH 1/8 Blackfin: spi: make cs deassert function deterministic
Dear Mike Frysinger,
In message <[email protected]> you wrote:
...
drivers/spi/bfin_spi.c void spi_cs_activate(struct spi_slave *slave) · line 55
Quoted 9 lines
drivers/spi/bfin_spi.c +1
-0@@ -52,6 +52,7 @@ void spi_cs_activate(struct spi_slave *slave) (read_SPI_FLG (bss) & ~((!bss->flg <<8 ) << slave->cs)) | (1 << slave->cs)); +SSYNC ();
Should this sync not be integral part of the write_SPI_FLG() accessor?
drivers/spi/bfin_spi.c __attribute__((weak)) · line 71
Quoted 4 lines
drivers/spi/bfin_spi.c +4
-0+*/ + flg =read_SPI_FLG (bss) | ((!bss->flg <<8 ) << slave->cs); +write_SPI_FLG (bss, flg); +SSYNC ();
Ditto here.
drivers/spi/bfin_spi.c __attribute__((weak)) · line 76
Quoted 5 lines
drivers/spi/bfin_spi.c +5
-0+debug ("%s: SPI_FLG:%x\n" , __func__,read_SPI_FLG (bss)); + + flg &= ~(1 << slave->cs); +write_SPI_FLG (bss, flg); +SSYNC ();
And here.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I'd rather be led to hell than managed to heaven.
PATCH 2/8 Blackfin: nand: flush peripheral before polling it
In reply to Mike FrysingerFrom: Graf Yang <[email protected]>
We need to make sure the data written to the nand flash controller makes it there before we start polling its status register. Otherwise, we may get stale data and return before the controller is actually ready.
--- drivers/mtd/nand/bfin_nand.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mtd/nand/bfin_nand.c +1 -0
@@ -98,6 +98,7 @@ static void bfin_nfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)/* Contents do not matter */ bfin_write_NFC_DATA_RD (0x0000 ); +SSYNC ();while (!(bfin_read_NFC_IRQSTAT () &RD_RDY ))if (ctrlc ())
Signature · 1 line
1.6.2.2
PATCH 2/8 Blackfin: nand: flush peripheral before polling it
Dear Mike Frysinger,
Quoted 17 lines · In message <[email protected]> you wrote:
From: Graf Yang <[email protected]>
We need to make sure the data written to the nand flash controller makes it there before we start polling its status register. Otherwise, we may get stale data and return before the controller is actually ready.
Signed-off-by Graf Yang <[email protected]>Signed-off-by Mike Frysinger <[email protected]>--- drivers/mtd/nand/bfin_nand.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/mtd/nand/bfin_nand.c +0
-0
drivers/mtd/nand/bfin_nand.c static void bfin_nfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) · line 101
Quoted 4 lines
drivers/mtd/nand/bfin_nand.c +1
-0@@ -98,6 +98,7 @@ static void bfin_nfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)/* Contents do not matter */ bfin_write_NFC_DATA_RD (0x0000 ); +SSYNC ();
Should such syncing not be integral part of thebfin_write_NFC_DATA_RD() aceessor?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de God is real, unless declared integer.
PATCH 2/8 Blackfin: nand: flush peripheral before polling it
Quoted 20 lines · On Monday 06 April 2009 04:27:10 Wolfgang Denk wrote:
Quoted 19 lines · In message Mike Frysinger
From: Graf Yang <[email protected]>
We need to make sure the data written to the nand flash controller makes it there before we start polling its status register. Otherwise, we may get stale data and return before the controller is actually ready.
Signed-off-by Graf Yang <[email protected]>Signed-off-by Mike Frysinger <[email protected]>--- drivers/mtd/nand/bfin_nand.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/mtd/nand/bfin_nand.c +0
-0@@ -98,6 +98,7 @@ static void bfin_nfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
Quoted 6 lines
drivers/mtd/nand/bfin_nand.c static void bfin_nfc_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) · line 101
Quoted 3 lines
drivers/mtd/nand/bfin_nand.c +1
-0/* Contents do not matter */ bfin_write_NFC_DATA_RD (0x0000 ); +SSYNC ();Should such syncing not be integral part of the
bfin_write_NFC_DATA_RD()aceessor?
on the Blackfin processor, the ssync instruction is a barrier rather than a hard requirement (well, that isnt 100% true, but those edge cases dont apply to peripherals). since the NFC_DATA_RD MMR could be written in such a way to not need the barrier, we dont place ssync's into the MMR defines. especially because the ssync instruction flushes all buffers in the chip, not just the peripherals, so it can be pretty heavy handed.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090406/83c303bd/attachment-0001.pgp
PATCH 2/8 Blackfin: nand: flush peripheral before polling it
In reply to Mike FrysingerQuoted 9 lines · Mike Frysinger
From: Graf Yang <[email protected]>
We need to make sure the data written to the nand flash controller makes it there before we start polling its status register. Otherwise, we may get stale data and return before the controller is actually ready.
Signed-off-by Graf Yang <[email protected]>Signed-off-by Mike Frysinger <[email protected]>---
-Scott
PATCH 3/8 Blackfin: update anomaly sheets
In reply to Mike Frysinger--- include/asm-blackfin/mach-bf527/anomaly.h | 40 ++++++++++++--- include/asm-blackfin/mach-bf533/anomaly.h | 77 +++++++++++++++++++++++----- include/asm-blackfin/mach-bf537/anomaly.h | 67 +++++++++++++------------ include/asm-blackfin/mach-bf548/anomaly.h | 18 ++++--- include/asm-blackfin/mach-bf561/anomaly.h | 17 +++--- 5 files changed, 150 insertions(+), 69 deletions(-)
include/asm-blackfin/mach-bf527/anomaly.h +32 -8
@@ -6,9 +6,9 @@* Licensed under the GPL-2 or later. */ -/* This file shoule be up to date with: +/* This file should be up to date with: * - Revision B, 08/12/2008; ADSP-BF526 Blackfin Processor Anomaly List -* - Revision E, 08/18/2008; ADSP-BF527 Blackfin Processor Anomaly List +* - Revision F, 03/03/2009; ADSP-BF527 Blackfin Processor Anomaly List */ #ifndef _MACH_ANOMALY_H_
@@ -25,14 +25,16 @@# define ANOMALY_BF527 0#endif -/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ +/* Multi-issue instruction with dsp32shiftimm in slot1 and P-reg store in slot 2 not supported */ #define ANOMALY_05000074 (1)/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ #define ANOMALY_05000119 (1)/* note: brokenness is noted in documentation, not anomaly sheet */ /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ #define ANOMALY_05000122 (1) -/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ +/* False Hardware Error from an Access in the Shadow of a Conditional Branch */ #define ANOMALY_05000245 (1) +/* Incorrect Timer Pulse Width in Single-Shot PWM_OUT Mode with External Clock */ +#define ANOMALY_05000254 (1)/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ #define ANOMALY_05000265 (1)/* False Hardware Errors Caused by Fetches at the Boundary of Reserved Memory */
@@ -41,6 +43,8 @@#define ANOMALY_05000313 (__SILICON_REVISION__ < 2)/* Incorrect Access of OTP_STATUS During otp_write() Function */ #define ANOMALY_05000328 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) +/* Host DMA Boot Modes Are Not Functional */ +#define ANOMALY_05000330 (__SILICON_REVISION__ < 2)/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ #define ANOMALY_05000337 (ANOMALY_BF527 && __SILICON_REVISION__ < 2)/* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */
@@ -75,8 +79,6 @@#define ANOMALY_05000380 (ANOMALY_BF527 && __SILICON_REVISION__ < 2)/* 8-Bit NAND Flash Boot Mode Not Functional */ #define ANOMALY_05000382 (__SILICON_REVISION__ < 2) -/* Host Must Not Read Back During Host DMA Boot */ -#define ANOMALY_05000384 (ANOMALY_BF527 && __SILICON_REVISION__ < 2)/* Boot from OTP Memory Not Functional */ #define ANOMALY_05000385 (ANOMALY_BF527 && __SILICON_REVISION__ < 2)/* bfrom_SysControl() Firmware Routine Not Functional */
@@ -129,7 +131,7 @@#define ANOMALY_05000416 (1)/* SPORT0 Ignores External TSCLK0 on PG14 When TMR6 is an Output */ #define ANOMALY_05000417 (ANOMALY_BF527 && __SILICON_REVISION__ < 2) -/* tSFSPE and tHFSPE Do Not Meet Data Sheet Specifications */ +/* PPI Timing Requirements tSFSPE and tHFSPE Do Not Meet Data Sheet Specifications */ #define ANOMALY_05000418 (__SILICON_REVISION__ < 2)/* USB PLL_STABLE Bit May Not Accurately Reflect the USB PLL's Status */ #define ANOMALY_05000420 (__SILICON_REVISION__ < 2)
@@ -143,25 +145,46 @@#define ANOMALY_05000424 (ANOMALY_BF527 && __SILICON_REVISION__ < 2)/* Multichannel SPORT Channel Misalignment Under Specific Configuration */ #define ANOMALY_05000425 (__SILICON_REVISION__ < 2) -/* Speculative Fetches of Indirect-Pointer Instructions Can Cause Spurious Hardware Errors */ +/* Speculative Fetches of Indirect-Pointer Instructions Can Cause False Hardware Errors */ #define ANOMALY_05000426 (1)/* WB_EDGE Bit in NFC_IRQSTAT Incorrectly Reflects Buffer Status Instead of IRQ Status */ #define ANOMALY_05000429 (__SILICON_REVISION__ < 2)/* Software System Reset Corrupts PLL_LOCKCNT Register */ #define ANOMALY_05000430 (ANOMALY_BF527 && __SILICON_REVISION__ > 1) +/* Incorrect Use of Stack in Lockbox Firmware During Authentication */ +#define ANOMALY_05000431 (1)/* bfrom_SysControl() Does Not Clear SIC_IWR1 Before Executing PLL Programming Sequence */ #define ANOMALY_05000432 (ANOMALY_BF526)/* Certain SIC Registers are not Reset After Soft or Core Double Fault Reset */ #define ANOMALY_05000435 ((ANOMALY_BF526 && __SILICON_REVISION__ < 1) || ANOMALY_BF527) +/* Preboot Cannot be Used to Alter the PLL_DIV Register */ +#define ANOMALY_05000439 (1) +/* bfrom_SysControl() Cannot be Used to Write the PLL_DIV Register */ +#define ANOMALY_05000440 (1) +/* OTP Write Accesses Not Supported */ +#define ANOMALY_05000442 (__SILICON_REVISION__ < 1)/* IFLUSH Instruction at End of Hardware Loop Causes Infinite Stall */ #define ANOMALY_05000443 (1) +/* The WURESET Bit in the SYSCR Register is not Functional */ +#define ANOMALY_05000445 (1) +/* BCODE_QUICKBOOT, BCODE_ALLBOOT, and BCODE_FULLBOOT Settings in SYSCR Register Not Functional */ +#define ANOMALY_05000451 (1) +/* Incorrect Default Hysteresis Setting for RESET, NMI, and BMODE Signals */ +#define ANOMALY_05000452 (1) +/* USB Receive Interrupt Is Not Generated in DMA Mode 1 */ +#define ANOMALY_05000456 (1) +/* Host DMA Port Responds to Certain Bus Activity Without HOST_CE Assertion */ +#define ANOMALY_05000457 (1)/* Anomalies that don't exist on this proc */ #define ANOMALY_05000125 (0)#define ANOMALY_05000158 (0) +#define ANOMALY_05000171 (0)#define ANOMALY_05000183 (0)#define ANOMALY_05000198 (0) +#define ANOMALY_05000227 (0)#define ANOMALY_05000230 (0) +#define ANOMALY_05000242 (0)#define ANOMALY_05000244 (0)#define ANOMALY_05000261 (0)#define ANOMALY_05000263 (0)
@@ -174,6 +197,7 @@#define ANOMALY_05000311 (0)#define ANOMALY_05000312 (0)#define ANOMALY_05000323 (0) +#define ANOMALY_05000362 (1)#define ANOMALY_05000363 (0)#define ANOMALY_05000412 (0)#define ANOMALY_05000447 (0)
include/asm-blackfin/mach-bf533/anomaly.h +63 -14
174 lines not on this page · raw message
include/asm-blackfin/mach-bf537/anomaly.h +35 -32
147 lines not on this page · raw message
include/asm-blackfin/mach-bf548/anomaly.h +11 -7
@@ -6,26 +6,26 @@* Licensed under the GPL-2 or later. */ -/* This file shoule be up to date with: +/* This file should be up to date with: * - Revision H, 01/16/2009; ADSP-BF542/BF544/BF547/BF548/BF549 Blackfin Processor Anomaly List */ #ifndef _MACH_ANOMALY_H_#define _MACH_ANOMALY_H_ -/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ +/* Multi-issue instruction with dsp32shiftimm in slot1 and P-reg store in slot 2 not supported */ #define ANOMALY_05000074 (1)/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ #define ANOMALY_05000119 (1)/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ #define ANOMALY_05000122 (1) -/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ +/* False Hardware Error from an Access in the Shadow of a Conditional Branch */ #define ANOMALY_05000245 (1)/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ #define ANOMALY_05000265 (1)/* Certain Data Cache Writethrough Modes Fail for Vddint <= 0.9V */ #define ANOMALY_05000272 (1) -/* False Hardware Error Exception when ISR context is not restored */ +/* False Hardware Error Exception When ISR Context Is Not Restored */ #define ANOMALY_05000281 (__SILICON_REVISION__ < 1)/* SSYNCs After Writes To CAN/DMA MMR Registers Are Not Always Handled Correctly */ #define ANOMALY_05000304 (__SILICON_REVISION__ < 1)
@@ -59,7 +59,7 @@#define ANOMALY_05000340 (__SILICON_REVISION__ < 1)/* Boot Host Wait (HWAIT) and Boot Host Wait Alternate (HWAITA) Signals Are Swapped */ #define ANOMALY_05000344 (__SILICON_REVISION__ < 1) -/* USB Calibration Value Is Not Intialized */ +/* USB Calibration Value Is Not Initialized */ #define ANOMALY_05000346 (__SILICON_REVISION__ < 1)/* USB Calibration Value to use */ #define ANOMALY_05000346_value 0x5411
@@ -147,11 +147,11 @@#define ANOMALY_05000416 (1)/* Multichannel SPORT Channel Misalignment Under Specific Configuration */ #define ANOMALY_05000425 (1) -/* Speculative Fetches of Indirect-Pointer Instructions Can Cause Spurious Hardware Errors */ +/* Speculative Fetches of Indirect-Pointer Instructions Can Cause False Hardware Errors */ #define ANOMALY_05000426 (1)/* CORE_EPPI_PRIO bit and SYS_EPPI_PRIO bit in the HMDMA1_CONTROL register are not functional */ #define ANOMALY_05000427 (__SILICON_REVISION__ < 2) -/* WB_EDGE Bit in NFC_IRQSTAT Incorrectly Behaves as a Buffer Status Bit Instead of an IRQ Status Bit */ +/* WB_EDGE Bit in NFC_IRQSTAT Incorrectly Reflects Buffer Status Instead of IRQ Status */ #define ANOMALY_05000429 (__SILICON_REVISION__ < 2)/* Software System Reset Corrupts PLL_LOCKCNT Register */ #define ANOMALY_05000430 (__SILICON_REVISION__ >= 2)
@@ -175,9 +175,12 @@/* Anomalies that don't exist on this proc */ #define ANOMALY_05000125 (0)#define ANOMALY_05000158 (0) +#define ANOMALY_05000171 (0)#define ANOMALY_05000183 (0)#define ANOMALY_05000198 (0) +#define ANOMALY_05000227 (0)#define ANOMALY_05000230 (0) +#define ANOMALY_05000242 (0)#define ANOMALY_05000244 (0)#define ANOMALY_05000261 (0)#define ANOMALY_05000263 (0)
@@ -188,6 +191,7 @@#define ANOMALY_05000307 (0)#define ANOMALY_05000311 (0)#define ANOMALY_05000323 (0) +#define ANOMALY_05000362 (1)#define ANOMALY_05000363 (0)#define ANOMALY_05000380 (0)#define ANOMALY_05000412 (0)
include/asm-blackfin/mach-bf561/anomaly.h +9 -8
@@ -6,7 +6,7 @@* Licensed under the GPL-2 or later. */ -/* This file shoule be up to date with: +/* This file should be up to date with: * - Revision Q, 11/07/2008; ADSP-BF561 Blackfin Processor Anomaly List */
@@ -18,11 +18,11 @@# error will not work on BF561 silicon version 0.0, 0.1, 0.2, or 0.4#endif -/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot 2 Not Supported */ +/* Multi-issue instruction with dsp32shiftimm in slot1 and P-reg store in slot 2 not supported */ #define ANOMALY_05000074 (1)/* UART Line Status Register (UART_LSR) Bits Are Not Updated at the Same Time */ #define ANOMALY_05000099 (__SILICON_REVISION__ < 5) -/* Trace Buffers may contain errors in emulation mode and/or exception, NMI, reset handlers */ +/* Trace Buffers may record discontinuities into emulation mode and/or exception, NMI, reset handlers */ #define ANOMALY_05000116 (__SILICON_REVISION__ < 3)/* Testset instructions restricted to 32-bit aligned memory locations */ #define ANOMALY_05000120 (1)
@@ -40,7 +40,7 @@#define ANOMALY_05000136 (__SILICON_REVISION__ < 3)/* Allowing the SPORT RX FIFO to fill will cause an overflow */ #define ANOMALY_05000140 (__SILICON_REVISION__ < 3) -/* Infinite Stall may occur with a particular sequence of consecutive dual dag events */ +/* An Infinite Stall occurs with a particular sequence of consecutive dual dag events */ #define ANOMALY_05000141 (__SILICON_REVISION__ < 3)/* Interrupts may be lost when a programmable input flag is configured to be edge sensitive */ #define ANOMALY_05000142 (__SILICON_REVISION__ < 3)
@@ -80,7 +80,7 @@#define ANOMALY_05000163 (__SILICON_REVISION__ < 3)/* PPI Data Lengths Between 8 and 16 Do Not Zero Out Upper Bits */ #define ANOMALY_05000166 (1) -/* Turning Serial Ports on with External Frame Syncs */ +/* Turning SPORTs on while External Frame Sync Is Active May Corrupt Data */ #define ANOMALY_05000167 (1)/* SDRAM auto-refresh and subsequent Power Ups */ #define ANOMALY_05000168 (__SILICON_REVISION__ < 5)
@@ -164,7 +164,7 @@#define ANOMALY_05000242 (__SILICON_REVISION__ < 5)/* If I-Cache Is On, CSYNC/SSYNC/IDLE Around Change of Control Causes Failures */ #define ANOMALY_05000244 (__SILICON_REVISION__ < 5) -/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ +/* False Hardware Error from an Access in the Shadow of a Conditional Branch */ #define ANOMALY_05000245 (__SILICON_REVISION__ < 5)/* TESTSET operation forces stall on the other core */ #define ANOMALY_05000248 (__SILICON_REVISION__ < 5)
@@ -208,7 +208,7 @@#define ANOMALY_05000275 (__SILICON_REVISION__ > 2)/* Timing Requirements Change for External Frame Sync PPI Modes with Non-Zero PPI_DELAY */ #define ANOMALY_05000276 (__SILICON_REVISION__ < 5) -/* Writes to an I/O data register one SCLK cycle after an edge is detected may clear interrupt */ +/* Writes to an I/O Data Register One SCLK Cycle after an Edge Is Detected May Clear Interrupt */ #define ANOMALY_05000277 (__SILICON_REVISION__ < 3)/* Disabling Peripherals with DMA Running May Cause DMA System Instability */ #define ANOMALY_05000278 (__SILICON_REVISION__ < 5)
@@ -232,7 +232,7 @@#define ANOMALY_05000310 (1)/* Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ #define ANOMALY_05000312 (1) -/* PPI Is Level-Sensitive on First Transfer */ +/* PPI Is Level-Sensitive on First Transfer In Single Frame Sync Modes */ #define ANOMALY_05000313 (1)/* Killed System MMR Write Completes Erroneously On Next System MMR Access */ #define ANOMALY_05000315 (1)
@@ -285,6 +285,7 @@#define ANOMALY_05000353 (1)#define ANOMALY_05000380 (0)#define ANOMALY_05000386 (1) +#define ANOMALY_05000430 (0)#define ANOMALY_05000432 (0)#define ANOMALY_05000435 (0)#define ANOMALY_05000447 (0)
Signature · 1 line
1.6.2.2
PATCH 4/8 Blackfin: add workaround for anomaly 05000171
In reply to Mike FrysingerDESCRIPTION:
The Boot ROM is executed at power up/reset and changes the value of the SICA_IWR registers from their default reset value of 0xFFFF, but does not restore them.
WORKAROUND:
User code should not rely on the default value of these registers. Set the desired values explicitly.
--- cpu/blackfin/initcode.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
cpu/blackfin/initcode.c +4 -0
@@ -356,6 +356,10 @@ void initcode(ADI_BOOT_DATA *bootstruct)#if ANOMALY_05000432 bfin_write_SIC_IWR1 (-1 );#endif +#if ANOMALY_05000171 +bfin_write_SICA_IWR0 (-1 ); +bfin_write_SICA_IWR1 (-1 ); +#endif }else {serial_putc ('G' );
Signature · 1 line
1.6.2.2
PATCH 5/8 Blackfin: add workaround for anomaly 05000242
In reply to Mike FrysingerDESCRIPTION:
If the DF bit is set prior to a hardware reset, the PLL will continue to divide CLKIN by 2 after the hardware reset, but the DF bit itself will be cleared in the PLL_CTL register.
WORKAROUND:
Reprogram the PLL with DF cleared if the desire is to not divide CLKIN by 2 after reset.
--- cpu/blackfin/initcode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
cpu/blackfin/initcode.c +1 -1
@@ -401,7 +401,7 @@ void initcode(ADI_BOOT_DATA *bootstruct)/* Only reprogram when needed to avoid triggering unnecessary * PLL relock sequences. */ -if (bfin_read_PLL_CTL () !=CONFIG_PLL_CTL_VAL ) { +if (ANOMALY_05000242 ||bfin_read_PLL_CTL () !=CONFIG_PLL_CTL_VAL ) {serial_putc ('!' );bfin_write_PLL_CTL (CONFIG_PLL_CTL_VAL ); asm("idle;" );
Signature · 1 line
1.6.2.2
PATCH 6/8 Blackfin: add comment about anomaly 05000430 avoidance
In reply to Mike Frysinger--- cpu/blackfin/initcode.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
cpu/blackfin/initcode.c +2 -0
@@ -335,6 +335,7 @@ void initcode(ADI_BOOT_DATA *bootstruct)if (!ANOMALY_05000386 ) {serial_putc ('F' ); +/* Always programming PLL_LOCKCNT avoids Anomaly 05000430 */ ADI_SYSCTRL_VALUES memory_settings;uint32_t actions =SYSCTRL_WRITE |SYSCTRL_PLLCTL |SYSCTRL_PLLDIV |SYSCTRL_LOCKCNT ;if (CONFIG_HAS_VR ) {
@@ -379,6 +380,7 @@ void initcode(ADI_BOOT_DATA *bootstruct)serial_putc ('H' ); +/* Always programming PLL_LOCKCNT avoids Anomaly 05000430 */ bfin_write_PLL_LOCKCNT (CONFIG_PLL_LOCKCNT_VAL );serial_putc ('I' );
Signature · 1 line
1.6.2.2
PATCH 7/8 Blackfin: add check for anomaly 05000362
In reply to Mike FrysingerDESCRIPTION:
The column address width settings for banks 2 and 3 are misconnected in the SDRAM controller. Accesses to bank 2 will result in an error if the Column Address Width for bank 3 (EB3CAW ) is not set to be the same as that of bank 2.
WORKAROUND:
If using bank 2, make sure that banks 2 and 3 have the same column address width settings in the EBIU_SDBCTL register. This must be the case regardless of whether or not bank 3 is enabled.
--- cpu/blackfin/initcode.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
cpu/blackfin/initcode.c +9 -0
@@ -246,6 +246,15 @@ static inline void serial_putc(char c)#endif #endif +/* Conflicting Column Address Widths Causes SDRAM Errors: +* EB2CAW and EB3CAW must be the same +*/ +#if ANOMALY_05000362 +# if ((CONFIG_EBIU_SDBCTL_VAL &0x30000000 ) >>8 ) != (CONFIG_EBIU_SDBCTL_VAL &0x00300000 ) +# error "Anomaly 05000362: EB2CAW and EB3CAW must be the same" +# endif +#endif +BOOTROM_CALLED_FUNC_ATTR void initcode(ADI_BOOT_DATA *bootstruct) {
Signature · 1 line
1.6.2.2
PATCH 8/8 Blackfin: audit UART for all known anomalies
In reply to Mike FrysingerThere is no code change here, just new comments, but this keeps me from having to do another audit from scratch in the future.
--- cpu/blackfin/serial.c | 21 ++++++++++++++++++++- cpu/blackfin/serial.h | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-)
cpu/blackfin/serial.c +20 -1
@@ -24,6 +24,19 @@* Licensed under the GPL-2 or later. */ +/* Anomaly notes: +* 05000086 - we don't support autobaud +* 05000099 - we only use DR bit, so losing others is not a problem +* 05000100 - we don't use the UART_IIR register +* 05000215 - we poll the uart (no dma/interrupts) +* 05000225 - no workaround possible, but this shouldnt cause errors ... +* 05000230 - we tweak the baud rate calculation slightly +* 05000231 - we always use 1 stop bit +* 05000309 - we always enable the uart before we modify it in anyway +* 05000350 - we always enable the uart regardless of boot mode +* 05000363 - we don't support break signals, so don't generate one +*/ +#include <common.h> #include <watchdog.h> #include <asm/blackfin.h>
@@ -43,7 +56,9 @@ uint16_t cached_rbr[256];size_t cache_count;/* The LSR is read-to-clear on some parts, so we have to make sure status -* bits aren't inadvertently lost when doing various tests. +* bits aren't inadvertently lost when doing various tests. This also +* works around anomaly 05000099 at the same time by keeping a cumulative +* tally of all the status bits. */ static uint16_t uart_lsr_save;static uint16_t uart_lsr_read (void )
@@ -59,6 +74,10 @@ static void uart_lsr_clear(void) *pUART_LSR |= -1; }#else +/* When debugging is disabled, we only care about the DR bit, so if other +* bits get set/cleared, we don't really care since we don't read them +* anyways (and thus anomaly 05000099 is irrelevant). +*/ static inline uint16_t uart_lsr_read (void ) {return *pUART_LSR; }static inline void uart_lsr_clear (void ) { *pUART_LSR =-1 ; }#endif
cpu/blackfin/serial.h +1 -1
@@ -146,7 +146,7 @@ static inline void serial_early_init(void)/* handle portmux crap on different Blackfins */ serial_do_portmux (); -/* Enable UART */ +/* always enable UART -- avoids anomalies 05000309 and 05000350 */ *pUART_GCTL =UCEN ;/* Set LCR to Word Lengh 8-bit word select */
Signature · 1 line
1.6.2.2
cover Blackfin fixes for 2009.05
In reply to Mike FrysingerDear Mike Frysinger,
Quoted 4 lines · In message <[email protected]> you wrote:
Add some corner case fixes for some Blackfin peripheral drivers, and add some fixes for anomalies and auditing of others. One or two of the audits aren't strictly fixes (just adding /*...*/ comments(, but it makes my life easier to keep them together.
<nitpicking>
Note that, according to the updated release schedule, this will be v2009.06 ;-)
</nitpicking>
I guess a pull request will follow soon?
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Mandrell: "You know what I think?"
Doctor: "Ah, ah that's a catch question. With a brain your size you
don't think, right?"
- Dr. Whocover Blackfin fixes for 2009.05
Quoted 10 lines · On Monday 06 April 2009 04:07:18 Wolfgang Denk wrote:
Quoted 4 lines · In message Mike Frysinger
Add some corner case fixes for some Blackfin peripheral drivers, and add some fixes for anomalies and auditing of others. One or two of the audits aren't strictly fixes (just adding /*...*/ comments(, but it makes my life easier to keep them together.
<nitpicking>
Note that, according to the updated release schedule, this will be v2009.06 ;-)
</nitpicking>
err, yeah, i forgot about that
Quoted 1 line
I guess a pull request will follow soon?
for patch series, i like to let them sit for a day or two before asking for a pull request. inevitably, some one points out something i did wrong. -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090406/f5919208/attachment.pgp
cover Blackfin fixes for 2009.05
Dear Mike Frysinger,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 2 lines
I guess a pull request will follow soon?
for patch series, i like to let them sit for a day or two before asking for a pull request. inevitably, some one points out something i did wrong.
Yes, of course. I just wanted to be sure.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Always try to do things in chronological order; it's less confusing that way.