9
0
Fork 0
Commit Graph

9 Commits

Author SHA1 Message Date
Sascha Hauer 713285ca19 mtd: cfi-flash: remove dead code
CFG_FLASH_PROTECTION is never defined, remove the code. Also
remove code inside #if 0.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-22 10:38:31 +02:00
Sascha Hauer 9746f02cae mtd: cfi-flash: Coding style cleanup
- use consistent variable types (drop uchar, ushort and friends)
- remove whitespace between functions and opening brace
- Add some blank lines to rectify code
- drop 'rc' and 'retcode' and use 'ret' consistently
- Do not put variable assignment into if()
- drop unncessary braces

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-22 10:38:31 +02:00
Sascha Hauer 9c48ac000b mtd: cfi-flash: turn some messages into vdbg
Some messages produce a lot of log spam. Turn them into
dev_vdbg to make some more important messages more visible.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-22 09:27:59 +02:00
Sascha Hauer 81d8fa83b4 mtd: cfi-flash: return 0 for success
Use zero as success return code and negative standard error codes
consistently in the driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-22 09:26:52 +02:00
Masahiro Yamada 5731d3ebcc Abolish cpu_read* and cpu_write* accessors
Commit 2e6a88f210 (add cpu native ordered io accessors) introduced
these macros and then commit be57f20cdd (Fix big endian MMIO
primitives) figured out they are equivalent to __raw_{read,write}*.

They turned out unnecessary after all.  Anyway, most source files
use __raw_read* and __raw_write*.

Let's replace a few remaining references and abolish them.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-20 08:05:44 +02:00
Sascha Hauer 736f711917 cfi: Add dev * to flash_info and switch to dev_*
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-27 18:24:59 +02:00
Sascha Hauer 6d7cd20442 cfi: remove unused field from struct flash_info
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-27 18:24:53 +02:00
Oleksij Rempel fbf9d87633 cfi_flash: add shift option for some cfi memory chips
Many cfi chips support 16 and 8 bit modes. Most important
difference is use of so called "Q15/A-1" pin. In 16bit mode this
pin is used for data IO. In 8bit mode, it is an address input
which add one more least significant bit (LSB). In this case
we should shift all adresses by one:
For example 0xaa << 1 = 0x154

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-27 18:23:55 +02:00
Sascha Hauer 2749fbac48 nor flash: integrate into mtd
CFI Flash is currently handled outside the mtd layer which makes it
a special case. Integrate it into mtd so that we get rid of this
special status.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-14 23:37:53 +01:00