>From 7ef2d63456ed79eb7aeb3cc8d53be55c58d1c247 Mon Sep 17 00:00:00 2001
From: Tadas Slotkus <devtadas@gmail.com>
Date: Fri, 19 Aug 2011 17:39:05 +0300
Subject: [carFl mem 38/65] Globalisation pass 1: fixes chipdrivers.h

This commit adjusts headers according to previous patches.

Signed-off-by: Tadas Slotkus <devtadas@gmail.com>
---
 chipdrivers.h |  172 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 86 insertions(+), 86 deletions(-)

diff --git a/chipdrivers.h b/chipdrivers.h
index 92ddbea..75ba468 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -26,122 +26,122 @@
 #define __CHIPDRIVERS_H__ 1
 
 /* spi.c, should probably be in spi_chip.c */
-int probe_spi_rdid(struct flashchip *flash);
-int probe_spi_rdid4(struct flashchip *flash);
-int probe_spi_rems(struct flashchip *flash);
-int probe_spi_res1(struct flashchip *flash);
-int probe_spi_res2(struct flashchip *flash);
-int spi_write_enable(void);
-int spi_write_disable(void);
-int spi_block_erase_20(struct flashchip *flash, unsigned int addr, unsigned int blocklen);
-int spi_block_erase_52(struct flashchip *flash, unsigned int addr, unsigned int blocklen);
-int spi_block_erase_d7(struct flashchip *flash, unsigned int addr, unsigned int blocklen);
-int spi_block_erase_d8(struct flashchip *flash, unsigned int addr, unsigned int blocklen);
-int spi_block_erase_60(struct flashchip *flash, unsigned int addr, unsigned int blocklen);
-int spi_block_erase_c7(struct flashchip *flash, unsigned int addr, unsigned int blocklen);
-int spi_chip_write_1(struct flashchip *flash, uint8_t *buf, int start, int len);
-int spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int start, int len);
-int spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len);
-uint8_t spi_read_status_register(void);
-int spi_write_status_register(struct flashchip *flash, int status);
+int probe_spi_rdid(globals *g, struct flashchip *flash);
+int probe_spi_rdid4(globals *g, struct flashchip *flash);
+int probe_spi_rems(globals *g, struct flashchip *flash);
+int probe_spi_res1(globals *g, struct flashchip *flash);
+int probe_spi_res2(globals *g, struct flashchip *flash);
+int spi_write_enable(globals *g);
+int spi_write_disable(globals *g);
+int spi_block_erase_20(globals *g, struct flashchip *flash, unsigned int addr, unsigned int blocklen);
+int spi_block_erase_52(globals *g, struct flashchip *flash, unsigned int addr, unsigned int blocklen);
+int spi_block_erase_d7(globals *g, struct flashchip *flash, unsigned int addr, unsigned int blocklen);
+int spi_block_erase_d8(globals *g, struct flashchip *flash, unsigned int addr, unsigned int blocklen);
+int spi_block_erase_60(globals *g, struct flashchip *flash, unsigned int addr, unsigned int blocklen);
+int spi_block_erase_c7(globals *g, struct flashchip *flash, unsigned int addr, unsigned int blocklen);
+int spi_chip_write_1(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
+int spi_chip_write_256(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
+int spi_chip_read(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
+uint8_t spi_read_status_register(globals *g);
+int spi_write_status_register(globals *g, struct flashchip *flash, int status);
 void spi_prettyprint_status_register_bit(uint8_t status, int bit);
 void spi_prettyprint_status_register_bp3210(uint8_t status, int bp);
 void spi_prettyprint_status_register_welwip(uint8_t status);
-int spi_prettyprint_status_register(struct flashchip *flash);
-int spi_disable_blockprotect(struct flashchip *flash);
-int spi_byte_program(int addr, uint8_t databyte);
-int spi_nbyte_program(int addr, uint8_t *bytes, int len);
-int spi_nbyte_read(int addr, uint8_t *bytes, int len);
-int spi_read_chunked(struct flashchip *flash, uint8_t *buf, int start, int len, int chunksize);
-int spi_write_chunked(struct flashchip *flash, uint8_t *buf, int start, int len, int chunksize);
-int spi_aai_write(struct flashchip *flash, uint8_t *buf, int start, int len);
+int spi_prettyprint_status_register(globals *g, struct flashchip *flash);
+int spi_disable_blockprotect(globals *g, struct flashchip *flash);
+int spi_byte_program(globals *g, int addr, uint8_t databyte);
+int spi_nbyte_program(globals *g, int addr, uint8_t *bytes, int len);
+int spi_nbyte_read(globals *g, int addr, uint8_t *bytes, int len);
+int spi_read_chunked(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len, int chunksize);
+int spi_write_chunked(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len, int chunksize);
+int spi_aai_write(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
 
 /* a25.c */
-int spi_prettyprint_status_register_amic_a25l05p(struct flashchip *flash);
-int spi_prettyprint_status_register_amic_a25l40p(struct flashchip *flash);
-int spi_prettyprint_status_register_amic_a25l032(struct flashchip *flash);
-int spi_prettyprint_status_register_amic_a25lq032(struct flashchip *flash);
+int spi_prettyprint_status_register_amic_a25l05p(globals *g, struct flashchip *flash);
+int spi_prettyprint_status_register_amic_a25l40p(globals *g, struct flashchip *flash);
+int spi_prettyprint_status_register_amic_a25l032(globals *g, struct flashchip *flash);
+int spi_prettyprint_status_register_amic_a25lq032(globals *g, struct flashchip *flash);
 
 /* at25.c */
-int spi_prettyprint_status_register_at25df(struct flashchip *flash);
-int spi_prettyprint_status_register_at25df_sec(struct flashchip *flash);
-int spi_prettyprint_status_register_at25f(struct flashchip *flash);
-int spi_prettyprint_status_register_at25fs010(struct flashchip *flash);
-int spi_prettyprint_status_register_at25fs040(struct flashchip *flash);
-int spi_prettyprint_status_register_atmel_at26df081a(struct flashchip *flash);
-int spi_disable_blockprotect_at25df(struct flashchip *flash);
-int spi_disable_blockprotect_at25df_sec(struct flashchip *flash);
-int spi_disable_blockprotect_at25f(struct flashchip *flash);
-int spi_disable_blockprotect_at25fs010(struct flashchip *flash);
-int spi_disable_blockprotect_at25fs040(struct flashchip *flash);
+int spi_prettyprint_status_register_at25df(globals *g, struct flashchip *flash);
+int spi_prettyprint_status_register_at25df_sec(globals *g, struct flashchip *flash);
+int spi_prettyprint_status_register_at25f(globals *g, struct flashchip *flash);
+int spi_prettyprint_status_register_at25fs010(globals *g, struct flashchip *flash);
+int spi_prettyprint_status_register_at25fs040(globals *g, struct flashchip *flash);
+int spi_prettyprint_status_register_atmel_at26df081a(globals *g, struct flashchip *flash);
+int spi_disable_blockprotect_at25df(globals *g, struct flashchip *flash);
+int spi_disable_blockprotect_at25df_sec(globals *g, struct flashchip *flash);
+int spi_disable_blockprotect_at25f(globals *g, struct flashchip *flash);
+int spi_disable_blockprotect_at25fs010(globals *g, struct flashchip *flash);
+int spi_disable_blockprotect_at25fs040(globals *g, struct flashchip *flash);
 
 /* 82802ab.c */
-uint8_t wait_82802ab(struct flashchip *flash);
-int probe_82802ab(struct flashchip *flash);
-int erase_block_82802ab(struct flashchip *flash, unsigned int page, unsigned int pagesize);
-int write_82802ab(struct flashchip *flash, uint8_t *buf, int start, int len);
+uint8_t wait_82802ab(globals *g, struct flashchip *flash);
+int probe_82802ab(globals *g, struct flashchip *flash);
+int erase_block_82802ab(globals *g, struct flashchip *flash, unsigned int page, unsigned int pagesize);
+int write_82802ab(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
 void print_status_82802ab(uint8_t status);
-int unlock_82802ab(struct flashchip *flash);
-int unlock_28f004s5(struct flashchip *flash);
+int unlock_82802ab(globals *g, struct flashchip *flash);
+int unlock_28f004s5(globals *g, struct flashchip *flash);
 
 /* jedec.c */
 uint8_t oddparity(uint8_t val);
-void toggle_ready_jedec(chipaddr dst);
-void data_polling_jedec(chipaddr dst, uint8_t data);
-int write_byte_program_jedec(chipaddr bios, uint8_t *src,
+void toggle_ready_jedec(globals *g, chipaddr dst);
+void data_polling_jedec(globals *g, chipaddr dst, uint8_t data);
+int write_byte_program_jedec(globals *g, chipaddr bios, uint8_t *src,
 			     chipaddr dst);
-int probe_jedec(struct flashchip *flash);
-int write_jedec(struct flashchip *flash, uint8_t *buf, int start, int len);
-int write_jedec_1(struct flashchip *flash, uint8_t *buf, int start, int len);
-int erase_sector_jedec(struct flashchip *flash, unsigned int page, unsigned int pagesize);
-int erase_block_jedec(struct flashchip *flash, unsigned int page, unsigned int blocksize);
-int erase_chip_block_jedec(struct flashchip *flash, unsigned int page, unsigned int blocksize);
+int probe_jedec(globals *g, struct flashchip *flash);
+int write_jedec(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
+int write_jedec_1(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
+int erase_sector_jedec(globals *g, struct flashchip *flash, unsigned int page, unsigned int pagesize);
+int erase_block_jedec(globals *g, struct flashchip *flash, unsigned int page, unsigned int blocksize);
+int erase_chip_block_jedec(globals *g, struct flashchip *flash, unsigned int page, unsigned int blocksize);
 
 /* m29f400bt.c */
-int probe_m29f400bt(struct flashchip *flash);
-int block_erase_m29f400bt(struct flashchip *flash, unsigned int start, unsigned int len);
-int block_erase_chip_m29f400bt(struct flashchip *flash, unsigned int start, unsigned int len);
-int write_m29f400bt(struct flashchip *flash, uint8_t *buf, int start, int len);
+int probe_m29f400bt(globals *g, struct flashchip *flash);
+int block_erase_m29f400bt(globals *g, struct flashchip *flash, unsigned int start, unsigned int len);
+int block_erase_chip_m29f400bt(globals *g, struct flashchip *flash, unsigned int start, unsigned int len);
+int write_m29f400bt(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
 void protect_m29f400bt(chipaddr bios);
 
 /* pm49fl00x.c */
-int unlock_49fl00x(struct flashchip *flash);
-int lock_49fl00x(struct flashchip *flash);
+int unlock_49fl00x(globals *g, struct flashchip *flash);
+int lock_49fl00x(globals *g, struct flashchip *flash);
 
 /* sst28sf040.c */
-int erase_chip_28sf040(struct flashchip *flash, unsigned int addr, unsigned int blocklen);
-int erase_sector_28sf040(struct flashchip *flash, unsigned int address, unsigned int sector_size);
-int write_28sf040(struct flashchip *flash, uint8_t *buf, int start, int len);
-int unprotect_28sf040(struct flashchip *flash);
-int protect_28sf040(struct flashchip *flash);
+int erase_chip_28sf040(globals *g, struct flashchip *flash, unsigned int addr, unsigned int blocklen);
+int erase_sector_28sf040(globals *g, struct flashchip *flash, unsigned int address, unsigned int sector_size);
+int write_28sf040(globals *g, struct flashchip *flash, uint8_t *buf, int start, int len);
+int unprotect_28sf040(globals *g, struct flashchip *flash);
+int protect_28sf040(globals *g, struct flashchip *flash);
 
 /* sst49lfxxxc.c */
-int erase_sector_49lfxxxc(struct flashchip *flash, unsigned int address, unsigned int sector_size);
-int unlock_49lfxxxc(struct flashchip *flash);
+int erase_sector_49lfxxxc(globals *g, struct flashchip *flash, unsigned int address, unsigned int sector_size);
+int unlock_49lfxxxc(globals *g, struct flashchip *flash);
 
 /* sst_fwhub.c */
-int printlock_sst_fwhub(struct flashchip *flash);
-int unlock_sst_fwhub(struct flashchip *flash);
+int printlock_sst_fwhub(globals *g, struct flashchip *flash);
+int unlock_sst_fwhub(globals *g, struct flashchip *flash);
 
 /* w39.c */
-int printlock_w39l040(struct flashchip * flash);
-int printlock_w39v040a(struct flashchip *flash);
-int printlock_w39v040b(struct flashchip *flash);
-int printlock_w39v040c(struct flashchip *flash);
-int printlock_w39v040fa(struct flashchip *flash);
-int printlock_w39v040fb(struct flashchip *flash);
-int printlock_w39v040fc(struct flashchip *flash);
-int printlock_w39v080a(struct flashchip *flash);
-int printlock_w39v080fa(struct flashchip *flash);
-int printlock_w39v080fa_dual(struct flashchip *flash);
-int unlock_w39v040fb(struct flashchip *flash);
-int unlock_w39v080fa(struct flashchip *flash);
+int printlock_w39l040(globals *g, struct flashchip * flash);
+int printlock_w39v040a(globals *g, struct flashchip *flash);
+int printlock_w39v040b(globals *g, struct flashchip *flash);
+int printlock_w39v040c(globals *g, struct flashchip *flash);
+int printlock_w39v040fa(globals *g, struct flashchip *flash);
+int printlock_w39v040fb(globals *g, struct flashchip *flash);
+int printlock_w39v040fc(globals *g, struct flashchip *flash);
+int printlock_w39v080a(globals *g, struct flashchip *flash);
+int printlock_w39v080fa(globals *g, struct flashchip *flash);
+int printlock_w39v080fa_dual(globals *g, struct flashchip *flash);
+int unlock_w39v040fb(globals *g, struct flashchip *flash);
+int unlock_w39v080fa(globals *g, struct flashchip *flash);
 
 /* w29ee011.c */
-int probe_w29ee011(struct flashchip *flash);
+int probe_w29ee011(globals *g, struct flashchip *flash);
 
 /* stm50flw0x0x.c */
-int erase_sector_stm50flw0x0x(struct flashchip *flash, unsigned int block, unsigned int blocksize);
-int unlock_stm50flw0x0x(struct flashchip *flash);
+int erase_sector_stm50flw0x0x(globals *g, struct flashchip *flash, unsigned int block, unsigned int blocksize);
+int unlock_stm50flw0x0x(globals *g, struct flashchip *flash);
 
 #endif /* !__CHIPDRIVERS_H__ */
-- 
1.7.6

