eeprom: Cleanup and support for multiple i2c busses
Subsystems (2)
cover eeprom: Cleanup and support for multiple i2c busses
This patch series first zaps a couple of ancient boards and ugly code which was in the way of proper cleanup for the eeprom command. Once that is done, the eeprom command undergoes proper cleaning. Finally, there is one patch which adds support for selecting on which bus the I2C EEPROM is. This functionality seems to be in high demand, which is exactly the reason why some boards decided to implement this themselves :-(
This series makes U-Boot also less IoT, since it removes all the nice PHP, CSS and SQL stuff from it ;-)
Marek Vasut (25):
ppc: Zap ICU862 board
ppc: Zap MHPC board
ppc: Zap Hymod board
ppc: Zap HWW1U1A board
ppc: Zap IDS8247 board
ppc: Zap TQM8260 board
ppc: Zap TQM8272 board
arm: Zap tricorder-eeprom
eeprom: Shuffle code around
eeprom: Zap CONFIG_SYS_I2C_MULTI_EEPROMS
eeprom: Zap CONFIG_SYS_EEPROM_X40430
eeprom: Zap eeprom_probe()
eeprom: Zap CONFIG_SPI_X
eeprom: Pull out the I/O code
eeprom: Pull out address computation
eeprom: Make eeprom_write_enable() weak
eeprom: Pull out CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
eeprom: Suck the ifdef into eeprom_init()
eeprom: Pull out CONFIG_SYS_EEPROM_PAGE_WRITE_BITS
eeprom: Pull out transfer length computation
eeprom: Pull out the RW loop
eeprom: Cultivate the ifdef mess
eeprom: Add bus argument to eeprom_init()
eeprom: Add support for selecting i2c bus
eeprom: Clean up checkpatch issues
README | 5 - arch/powerpc/cpu/mpc8260/Kconfig | 16 - arch/powerpc/cpu/mpc8260/ether_fcc.c | 27 +- arch/powerpc/cpu/mpc8260/interrupts.c | 10 +- arch/powerpc/cpu/mpc8260/pci.c | 2 - arch/powerpc/cpu/mpc8260/start.S | 14 - arch/powerpc/cpu/mpc83xx/start.S | 11 - arch/powerpc/cpu/mpc85xx/Kconfig | 4 - arch/powerpc/cpu/mpc8xx/Kconfig | 8 - arch/powerpc/cpu/mpc8xx/cpu_init.c | 2 - arch/powerpc/cpu/mpc8xx/fec.c | 40 +- arch/powerpc/include/asm/u-boot.h | 3 - board/corscience/tricorder/Makefile | 2 +- board/corscience/tricorder/tricorder-eeprom.c | 251 ------- board/corscience/tricorder/tricorder-eeprom.h | 41 -- board/eltec/mhpc/Kconfig | 12 - board/eltec/mhpc/MAINTAINERS | 6 - board/eltec/mhpc/Makefile | 8 - board/eltec/mhpc/flash.c | 414 ----------- board/eltec/mhpc/mhpc.c | 465 ------------- board/eltec/mhpc/u-boot.lds.debug | 121 ---- board/exmeritus/hww1u1a/Kconfig | 12 - board/exmeritus/hww1u1a/MAINTAINERS | 6 - board/exmeritus/hww1u1a/Makefile | 12 - board/exmeritus/hww1u1a/ddr.c | 34 - board/exmeritus/hww1u1a/gpios.h | 56 -- board/exmeritus/hww1u1a/hww1u1a.c | 268 -------- board/exmeritus/hww1u1a/law.c | 18 - board/exmeritus/hww1u1a/tlb.c | 90 --- board/hymod/Kconfig | 9 - board/hymod/MAINTAINERS | 6 - board/hymod/Makefile | 8 - board/hymod/bsp.c | 387 ----------- board/hymod/config.mk | 14 - board/hymod/eeprom.c | 678 ------------------ board/hymod/env.c | 221 ------ board/hymod/fetch.c | 91 --- board/hymod/flash.c | 490 ------------- board/hymod/flash.h | 140 ---- board/hymod/global_env | 145 ---- board/hymod/hymod.c | 521 -------------- board/hymod/hymod.h | 305 --------- board/hymod/input.c | 91 --- board/hymod/u-boot.lds | 132 ---- board/hymod/u-boot.lds.debug | 121 ---- board/icu862/Kconfig | 9 - board/icu862/MAINTAINERS | 7 - board/icu862/Makefile | 8 - board/icu862/flash.c | 575 ---------------- board/icu862/icu862.c | 199 ------ board/icu862/pcmcia.c | 262 ------- board/icu862/u-boot.lds | 82 --- board/icu862/u-boot.lds.debug | 122 ---- board/ids/ids8247/Kconfig | 12 - board/ids/ids8247/MAINTAINERS | 6 - board/ids/ids8247/Makefile | 11 - board/ids/ids8247/ids8247.c | 390 ----------- board/tqc/tqm8260/Kconfig | 12 - board/tqc/tqm8260/MAINTAINERS | 16 - board/tqc/tqm8260/Makefile | 8 - board/tqc/tqm8260/README | 415 ----------- board/tqc/tqm8260/tqm8260.c | 352 ---------- board/tqc/tqm8272/Kconfig | 12 - board/tqc/tqm8272/MAINTAINERS | 6 - board/tqc/tqm8272/Makefile | 8 - board/tqc/tqm8272/nand.c | 264 ------- board/tqc/tqm8272/tqm8272.c | 944 -------------------------- board/tqc/tqm8272/tqm8272.h | 37 - common/cmd_eeprom.c | 501 +++++--------- common/env_eeprom.c | 4 +- configs/HWW1U1A_defconfig | 3 - configs/ICU862_100MHz_defconfig | 4 - configs/ICU862_defconfig | 3 - configs/IDS8247_defconfig | 3 - configs/MHPC_defconfig | 3 - configs/TQM8255_AA_defconfig | 4 - configs/TQM8260_AA_defconfig | 4 - configs/TQM8260_AB_defconfig | 4 - configs/TQM8260_AC_defconfig | 4 - configs/TQM8260_AD_defconfig | 4 - configs/TQM8260_AE_defconfig | 4 - configs/TQM8260_AF_defconfig | 4 - configs/TQM8260_AG_defconfig | 4 - configs/TQM8260_AH_defconfig | 4 - configs/TQM8260_AI_defconfig | 4 - configs/TQM8265_AA_defconfig | 4 - configs/TQM8272_defconfig | 3 - configs/hymod_defconfig | 3 - include/asm-generic/u-boot.h | 3 - include/common.h | 8 +- include/commproc.h | 32 - include/configs/BSC9131RDB.h | 1 - include/configs/BSC9132QDS.h | 1 - include/configs/C29XPCIE.h | 1 - include/configs/CPCI405AB.h | 1 - include/configs/CPCI750.h | 1 - include/configs/DB64360.h | 1 - include/configs/DB64460.h | 1 - include/configs/DU440.h | 1 - include/configs/HWW1U1A.h | 460 ------------- include/configs/ICU862.h | 443 ------------ include/configs/IDS8247.h | 462 ------------- include/configs/MHPC.h | 369 ---------- include/configs/P1010RDB.h | 1 - include/configs/PMC440.h | 1 - include/configs/TQM8260.h | 620 ----------------- include/configs/TQM8272.h | 735 -------------------- include/configs/TQM834x.h | 1 - include/configs/W7OLMC.h | 1 - include/configs/W7OLMG.h | 1 - include/configs/acadia.h | 1 - include/configs/am335x_evm.h | 1 - include/configs/am43xx_evm.h | 1 - include/configs/axs101.h | 1 - include/configs/bamboo.h | 1 - include/configs/canyonlands.h | 1 - include/configs/cpci5200.h | 1 - include/configs/ebony.h | 1 - include/configs/hymod.h | 728 -------------------- include/configs/icon.h | 1 - include/configs/intip.h | 1 - include/configs/katmai.h | 1 - include/configs/km/km-powerpc.h | 1 - include/configs/km/km_arm.h | 1 - include/configs/korat.h | 1 - include/configs/ks2_evm.h | 1 - include/configs/luan.h | 1 - include/configs/m28evk.h | 1 - include/configs/mecp5200.h | 1 - include/configs/motionpro.h | 1 - include/configs/ocotea.h | 1 - include/configs/p1_p2_rdb_pc.h | 1 - include/configs/p1_twr.h | 1 - include/configs/pcm051.h | 1 - include/configs/pengwyn.h | 1 - include/configs/pf5200.h | 1 - include/configs/sequoia.h | 1 - include/configs/t3corp.h | 1 - include/configs/taishan.h | 1 - include/configs/tricorder.h | 1 - include/configs/walnut.h | 1 - include/configs/yosemite.h | 1 - include/pcmcia.h | 2 - include/status_led.h | 19 - tools/bddb/README | 116 ---- tools/bddb/badsubmit.php | 23 - tools/bddb/bddb.css | 207 ------ tools/bddb/brlog.php | 109 --- tools/bddb/browse.php | 147 ---- tools/bddb/config.php | 16 - tools/bddb/create_tables.sql | 90 --- tools/bddb/defs.php | 710 ------------------- tools/bddb/dodelete.php | 65 -- tools/bddb/dodellog.php | 57 -- tools/bddb/doedit.php | 186 ----- tools/bddb/doedlog.php | 76 --- tools/bddb/donew.php | 230 ------- tools/bddb/donewlog.php | 86 --- tools/bddb/edit.php | 131 ---- tools/bddb/edlog.php | 86 --- tools/bddb/execute.php | 33 - tools/bddb/index.php | 38 -- tools/bddb/new.php | 120 ---- tools/bddb/newlog.php | 54 -- 164 files changed, 174 insertions(+), 15976 deletions(-) delete mode 100644 board/corscience/tricorder/tricorder-eeprom.c delete mode 100644 board/corscience/tricorder/tricorder-eeprom.h delete mode 100644 board/eltec/mhpc/Kconfig delete mode 100644 board/eltec/mhpc/MAINTAINERS delete mode 100644 board/eltec/mhpc/Makefile delete mode 100644 board/eltec/mhpc/flash.c delete mode 100644 board/eltec/mhpc/mhpc.c delete mode 100644 board/eltec/mhpc/u-boot.lds.debug delete mode 100644 board/exmeritus/hww1u1a/Kconfig delete mode 100644 board/exmeritus/hww1u1a/MAINTAINERS delete mode 100644 board/exmeritus/hww1u1a/Makefile delete mode 100644 board/exmeritus/hww1u1a/ddr.c delete mode 100644 board/exmeritus/hww1u1a/gpios.h delete mode 100644 board/exmeritus/hww1u1a/hww1u1a.c delete mode 100644 board/exmeritus/hww1u1a/law.c delete mode 100644 board/exmeritus/hww1u1a/tlb.c delete mode 100644 board/hymod/Kconfig delete mode 100644 board/hymod/MAINTAINERS delete mode 100644 board/hymod/Makefile delete mode 100644 board/hymod/bsp.c delete mode 100644 board/hymod/config.mk delete mode 100644 board/hymod/eeprom.c delete mode 100644 board/hymod/env.c delete mode 100644 board/hymod/fetch.c delete mode 100644 board/hymod/flash.c delete mode 100644 board/hymod/flash.h delete mode 100644 board/hymod/global_env delete mode 100644 board/hymod/hymod.c delete mode 100644 board/hymod/hymod.h delete mode 100644 board/hymod/input.c delete mode 100644 board/hymod/u-boot.lds delete mode 100644 board/hymod/u-boot.lds.debug delete mode 100644 board/icu862/Kconfig delete mode 100644 board/icu862/MAINTAINERS delete mode 100644 board/icu862/Makefile delete mode 100644 board/icu862/flash.c delete mode 100644 board/icu862/icu862.c delete mode 100644 board/icu862/pcmcia.c delete mode 100644 board/icu862/u-boot.lds delete mode 100644 board/icu862/u-boot.lds.debug delete mode 100644 board/ids/ids8247/Kconfig delete mode 100644 board/ids/ids8247/MAINTAINERS delete mode 100644 board/ids/ids8247/Makefile delete mode 100644 board/ids/ids8247/ids8247.c delete mode 100644 board/tqc/tqm8260/Kconfig delete mode 100644 board/tqc/tqm8260/MAINTAINERS delete mode 100644 board/tqc/tqm8260/Makefile delete mode 100644 board/tqc/tqm8260/README delete mode 100644 board/tqc/tqm8260/tqm8260.c delete mode 100644 board/tqc/tqm8272/Kconfig delete mode 100644 board/tqc/tqm8272/MAINTAINERS delete mode 100644 board/tqc/tqm8272/Makefile delete mode 100644 board/tqc/tqm8272/nand.c delete mode 100644 board/tqc/tqm8272/tqm8272.c delete mode 100644 board/tqc/tqm8272/tqm8272.h delete mode 100644 configs/HWW1U1A_defconfig delete mode 100644 configs/ICU862_100MHz_defconfig delete mode 100644 configs/ICU862_defconfig delete mode 100644 configs/IDS8247_defconfig delete mode 100644 configs/MHPC_defconfig delete mode 100644 configs/TQM8255_AA_defconfig delete mode 100644 configs/TQM8260_AA_defconfig delete mode 100644 configs/TQM8260_AB_defconfig delete mode 100644 configs/TQM8260_AC_defconfig delete mode 100644 configs/TQM8260_AD_defconfig delete mode 100644 configs/TQM8260_AE_defconfig delete mode 100644 configs/TQM8260_AF_defconfig delete mode 100644 configs/TQM8260_AG_defconfig delete mode 100644 configs/TQM8260_AH_defconfig delete mode 100644 configs/TQM8260_AI_defconfig delete mode 100644 configs/TQM8265_AA_defconfig delete mode 100644 configs/TQM8272_defconfig delete mode 100644 configs/hymod_defconfig delete mode 100644 include/configs/HWW1U1A.h delete mode 100644 include/configs/ICU862.h delete mode 100644 include/configs/IDS8247.h delete mode 100644 include/configs/MHPC.h delete mode 100644 include/configs/TQM8260.h delete mode 100644 include/configs/TQM8272.h delete mode 100644 include/configs/hymod.h delete mode 100644 tools/bddb/README delete mode 100644 tools/bddb/badsubmit.php delete mode 100644 tools/bddb/bddb.css delete mode 100644 tools/bddb/brlog.php delete mode 100644 tools/bddb/browse.php delete mode 100644 tools/bddb/config.php delete mode 100644 tools/bddb/create_tables.sql delete mode 100644 tools/bddb/defs.php delete mode 100644 tools/bddb/dodelete.php delete mode 100644 tools/bddb/dodellog.php delete mode 100644 tools/bddb/doedit.php delete mode 100644 tools/bddb/doedlog.php delete mode 100644 tools/bddb/donew.php delete mode 100644 tools/bddb/donewlog.php delete mode 100644 tools/bddb/edit.php delete mode 100644 tools/bddb/edlog.php delete mode 100644 tools/bddb/execute.php delete mode 100644 tools/bddb/index.php delete mode 100644 tools/bddb/new.php delete mode 100644 tools/bddb/newlog.php
Signature · 1 line
2.1.1
PATCH 1/25 ppc: Zap ICU862 board
This board is the only user of CONFIG_SYS_EEPROM_X40430 , remove it so the EEPROM command code can be cleansed of the related code as well.
--- arch/powerpc/cpu/mpc8xx/Kconfig | 4 - arch/powerpc/cpu/mpc8xx/cpu_init.c | 1 - arch/powerpc/cpu/mpc8xx/fec.c | 40 +-- board/icu862/Kconfig | 9 - board/icu862/MAINTAINERS | 7 - board/icu862/Makefile | 8 - board/icu862/flash.c | 575 ------------------------------------- board/icu862/icu862.c | 199 ------------- board/icu862/pcmcia.c | 262 ----------------- board/icu862/u-boot.lds | 82 ------ board/icu862/u-boot.lds.debug | 122 -------- configs/ICU862_100MHz_defconfig | 4 - configs/ICU862_defconfig | 3 - include/commproc.h | 10 - include/configs/ICU862.h | 443 ---------------------------- include/pcmcia.h | 2 - include/status_led.h | 19 -- 17 files changed, 1 insertion(+), 1789 deletions(-) delete mode 100644 board/icu862/Kconfig delete mode 100644 board/icu862/MAINTAINERS delete mode 100644 board/icu862/Makefile delete mode 100644 board/icu862/flash.c delete mode 100644 board/icu862/icu862.c delete mode 100644 board/icu862/pcmcia.c delete mode 100644 board/icu862/u-boot.lds delete mode 100644 board/icu862/u-boot.lds.debug delete mode 100644 configs/ICU862_100MHz_defconfig delete mode 100644 configs/ICU862_defconfig delete mode 100644 include/configs/ICU862.h
arch/powerpc/cpu/mpc8xx/Kconfig +0 -4
@@ -16,9 +16,6 @@ config TARGET_ESTEEM192E config TARGET_HERMES bool "Support hermes" -config TARGET_ICU862 - bool "Support ICU862" - config TARGET_IP860 bool "Support IP860"
@@ -124,7 +121,6 @@ source "board/eltec/mhpc/Kconfig" source "board/emk/top860/Kconfig" source "board/esteem192e/Kconfig" source "board/hermes/Kconfig" -source "board/icu862/Kconfig" source "board/ip860/Kconfig" source "board/ivm/Kconfig" source "board/kup/kup4k/Kconfig"
arch/powerpc/cpu/mpc8xx/cpu_init.c +0 -1
@@ -126,7 +126,6 @@ void cpu_init_f (volatile immap_t * immr)*/ #if defined(CONFIG_HERMES) || \ - defined(CONFIG_ICU862) || \ defined(CONFIG_IP860) || \ defined(CONFIG_IVML24) || \ defined(CONFIG_IVMS8) || \
arch/powerpc/cpu/mpc8xx/fec.c +1 -39
@@ -205,11 +205,7 @@ static int fec_send(struct eth_device *dev, void *packet, int length) j =0 ;while ((rtx->txbd[txIdx].cbd_sc &BD_ENET_TX_READY ) && (j<TOUT_LOOP )) { -#if defined(CONFIG_ICU862 ) -udelay (10 ); -#else udelay (1 ); -#endif j++; }if (j>=TOUT_LOOP ) {
@@ -424,7 +420,7 @@ static void fec_pin_init(int fecidx)#endif /* !CONFIG_RMII */ -#elif !defined(CONFIG_ICU862) +#else /* * Configure all of port D for MII. */
@@ -437,42 +433,8 @@ static void fec_pin_init(int fecidx) immr->im_ioport.iop_pddir =0x1c58 ;/* Pre rev. D */ else immr->im_ioport.iop_pddir = 0x1fff; /* Rev. D and later */ -#else -/* -* Configure port A for MII. -*/ - -#if defined(CONFIG_ICU862 ) && defined(CONFIG_SYS_DISCOVER_PHY ) - -/* -* On the ICU862 board the MII-MDC pin is routed to PD8 pin -* * of CPU, so for this board we need to configure Utopia and -* * enable PD8 to MII-MDC function -*/ - immr->im_ioport.iop_pdpar |=0x4080 ;#endif -/* -* Has Utopia been configured? -*/ -if (immr->im_ioport.iop_pdpar & (0x8000 >>1 )) { -/* -* YES - Use MUXED mode for UTOPIA bus. -* This frees Port A for use by MII (see 862UM table 41-6). -*/ - immr->im_ioport.utmode &= ~0x80 ; - }else { -/* -* NO - set SPLIT mode for UTOPIA bus. -* -* This doesn't really effect UTOPIA (which isn't -* enabled anyway) but just tells the 862 -* to use port A for MII (see 862UM table 41-6). -*/ - immr->im_ioport.utmode |=0x80 ; - } -#endif /* !defined(CONFIG_ICU862) */ -#endif /* CONFIG_ETHER_ON_FEC1 */ }else if (fecidx ==1 ) {
board/icu862/Kconfig deleted +0 -9
@@ -1,9 +0,0 @@ -if TARGET_ICU862 - -config SYS_BOARD - default "icu862" - -config SYS_CONFIG_NAME - default "ICU862" - -endif
board/icu862/MAINTAINERS deleted +0 -7
@@ -1,7 +0,0 @@ -ICU862 BOARD -M: Wolfgang Denk <[email protected]> -S: Maintained -F: board/icu862/ -F: include/configs/ICU862.h -F: configs/ICU862_defconfig -F: configs/ICU862_100MHz_defconfig
board/icu862/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -# -# (C) Copyright 2001-2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = icu862.o flash.o pcmcia.o
board/icu862/flash.c deleted +0 -575
575 lines not on this page · raw message
board/icu862/icu862.c deleted +0 -199
199 lines not on this page · raw message
board/icu862/pcmcia.c deleted +0 -262
262 lines not on this page · raw message
board/icu862/u-boot.lds deleted +0 -82
82 lines not on this page · raw message
board/icu862/u-boot.lds.debug deleted +0 -122
122 lines not on this page · raw message
configs/ICU862_100MHz_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="100MHz" -CONFIG_PPC=y -CONFIG_8xx=y -CONFIG_TARGET_ICU862=y
configs/ICU862_defconfig deleted +0 -3
@@ -1,3 +0,0 @@ -CONFIG_PPC=y -CONFIG_8xx=y -CONFIG_TARGET_ICU862=y
include/commproc.h +0 -10
@@ -563,16 +563,6 @@ typedef struct scc_enet {#endif /* CONFIG_HERMES */ -/*** ICU862 **********************************************************/ - -#if defined(CONFIG_ICU862 ) - -#ifdef CONFIG_FEC_ENET -#define FEC_ENET /* use FEC for EThernet */ -#endif /* CONFIG_FEC_ETHERNET */ - -#endif /* CONFIG_ICU862 */ -/*** IP860 **********************************************************/ #if defined(CONFIG_IP860 )
include/configs/ICU862.h deleted +0 -443
443 lines not on this page · raw message
include/pcmcia.h +0 -2
@@ -29,8 +29,6 @@# define CONFIG_PCMCIA_SLOT_A #elif defined(CONFIG_LWMON )/* The LWMON use SLOT_B */ # define CONFIG_PCMCIA_SLOT_B -#elif defined(CONFIG_ICU862 )/* The ICU862 use SLOT_B */ -# define CONFIG_PCMCIA_SLOT_B #elif defined(CONFIG_R360MPI )/* The R360MPI use SLOT_B */ # define CONFIG_PCMCIA_SLOT_B #elif defined(CONFIG_ATC )/* The ATC use SLOT_A */
include/status_led.h +0 -19
@@ -114,25 +114,6 @@ void status_led_set (int led, int state);# define STATUS_LED_GREEN 1# define STATUS_LED_BOOT 2/* IDE LED used for boot status */ -/***** ICU862 ********************************************************/ -#elif defined(CONFIG_ICU862 ) - -# define STATUS_LED_PAR im_ioport.iop_papar -# define STATUS_LED_DIR im_ioport.iop_padir -# define STATUS_LED_ODR im_ioport.iop_paodr -# define STATUS_LED_DAT im_ioport.iop_padat - -# define STATUS_LED_BIT 0x4000/* LED 0 is on PA.1 */ -# define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) -# define STATUS_LED_STATE STATUS_LED_BLINKING -# define STATUS_LED_BIT1 0x1000/* LED 1 is on PA.3 */ -# define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ) -# define STATUS_LED_STATE1 STATUS_LED_OFF - -# define STATUS_LED_ACTIVE 1/* LED on for bit == 1 */ - -# define STATUS_LED_BOOT 0/* LED 0 used for boot status */ -/***** Someone else defines these *************************************/ #elif defined(STATUS_LED_PAR )
Signature · 1 line
2.1.1
PATCH 1/25 ppc: Zap ICU862 board
Hi Marek,
Quoted 10 lines · On Mon, 20 Oct 2014 03:48:02 +0200 Marek Vasut <[email protected]> wrote:
This board is the only user of
CONFIG_SYS_EEPROM_X40430, remove it so the EEPROM command code can be cleansed of the related code as well.Signed-off-by Marek Vasut <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Tom Rini <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Heiko Schocher <[email protected]>
Can we do this all day long?
I am happy with 01/25 thru 07/25. :-)
There is only one item I can tell:
I know it is a tedious work, but can you update doc/README.scrapyard, please?
It seems a rule in U-boot when dumping board supports.
Best Regards
Masahiro Yamada
PATCH 1/25 ppc: Zap ICU862 board
Quoted 1 line · Masahiro Yamada
Hi Marek,
Hi!
Quoted 14 lines
On Mon, 20 Oct 2014 03:48:02 +0200
Quoted 10 lines · Marek Vasut
This board is the only user of
CONFIG_SYS_EEPROM_X40430, remove it so the EEPROM command code can be cleansed of the related code as well.Signed-off-by Marek Vasut <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Tom Rini <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Heiko Schocher <[email protected]>
Quoted 2 lines
Can we do this all day long?
I am happy with 01/25 thru 07/25. :-)
With pleasure ;-) Scrubbing old ad-hoc stuff is really enjoyable.
Quoted 4 lines
There is only one item I can tell:
I know it is a tedious work, but can you update doc/README.scrapyard, please?
It seems a rule in U-boot when dumping board supports.
Ah, you're right, we have this thing. One thing I'm not sure about is how is someone supposed to determine the commit in which the board was removed before the commit was created in the upstream repository. This kinda doesn't add up to me.
Best regards,
Marek Vasut
PATCH 1/25 ppc: Zap ICU862 board
Dear Marek,
Quoted 5 lines · In message <[email protected]> you wrote:
Ah, you're right, we have this thing. One thing I'm not sure about is how is someone supposed to determine the commit in which the board was removed before the commit was created in the upstream repository. This kinda doesn't add up to me.
You just insert place holders for the boards you are touching, and fix up older entries that already hit mainline.
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
How many seconds are there in a year? If I tell you there are 3.155 x
10^7, you won't even try to remember it. On the other hand, who could
forget that, to within half a percent, pi seconds is a nanocentury.
-- Tom Duff, Bell LabsPATCH 1/25 ppc: Zap ICU862 board
Quoted 10 lines · Wolfgang Denk
Dear Marek,
Quoted 4 lines · In message <[email protected]> you wrote:
Ah, you're right, we have this thing. One thing I'm not sure about is how is someone supposed to determine the commit in which the board was removed before the commit was created in the upstream repository. This kinda doesn't add up to me.
You just insert place holders for the boards you are touching, and fix up older entries that already hit mainline.
I wonder if we shouldn't get rid of this README.scrapyard. Personally, I don't find much value in it to be honest ; if I am looking for some ancient board, I just do git log -p and search for whatever I need.
That said, I will fix up the patches ... also, I will split the removal from the eeprom changes, so the removal doesn't block the eeprom stuff.
Best regards,
Marek Vasut
PATCH 1/25 ppc: Zap ICU862 board
Hi Marek,
Quoted 9 lines · On Wed, 22 Oct 2014 21:10:28 +0200 Marek Vasut <[email protected]> wrote:
Quoted 8 lines · Wolfgang Denk
Dear Marek,
Quoted 4 lines · In message <[email protected]> you wrote:
Ah, you're right, we have this thing. One thing I'm not sure about is how is someone supposed to determine the commit in which the board was removed before the commit was created in the upstream repository. This kinda doesn't add up to me.
Quoted 6 lines
Quoted 2 lines
You just insert place holders for the boards you are touching, and fix up older entries that already hit mainline.
I wonder if we shouldn't get rid of this README.scrapyard. Personally, I don't find much value in it to be honest ; if I am looking for some ancient board, I just do git log -p and search for whatever I need.
I stick to it if this rule is a decision of u-boot community, but I have also been wondering it. It is true we need some effort to maintain this file.
Maybe you should open a new thread to discuss removal of doc/README.scrapyard.
Best Regards
Masahiro Yamada
PATCH 1/25 ppc: Zap ICU862 board
Quoted 1 line · Masahiro Yamada
Hi Marek,
Hello!
Quoted 19 lines
On Wed, 22 Oct 2014 21:10:28 +0200
Quoted 9 lines · Marek Vasut
Quoted 8 lines · Wolfgang Denk
Dear Marek,
Quoted 4 lines · In message <[email protected]> you wrote:
Ah, you're right, we have this thing. One thing I'm not sure about is how is someone supposed to determine the commit in which the board was removed before the commit was created in the upstream repository. This kinda doesn't add up to me.
Quoted 6 lines
Quoted 2 lines
You just insert place holders for the boards you are touching, and fix up older entries that already hit mainline.
I wonder if we shouldn't get rid of this README.scrapyard. Personally, I don't find much value in it to be honest ; if I am looking for some ancient board, I just do git log -p and search for whatever I need.
Quoted 6 lines
I stick to it if this rule is a decision of u-boot community, but I have also been wondering it. It is true we need some effort to maintain this file.
Maybe you should open a new thread to discuss removal of doc/README.scrapyard.
You're right, done!
Best regards,
Marek Vasut
PATCH 1/25 ppc: Zap ICU862 board
In reply to Marek VasutDear Marek Vasut,
Quoted 10 lines · In message <[email protected]> you wrote:
This board is the only user of
CONFIG_SYS_EEPROM_X40430, remove it so the EEPROM command code can be cleansed of the related code as well.Signed-off-by Marek Vasut <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Tom Rini <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Heiko Schocher <[email protected]>
Assuming you also add an entry to scrapyard:
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 To make this work we'd need a patch, as nobody of us tests this. - L. Poettering in https://bugs.freedesktop.org/show_bug.cgi?id=74589
PATCH 2/25 ppc: Zap MHPC board
In reply to Marek VasutThis board uses eeprom accessors in an incorrect way. The board is old and unsupported, just zap it.
--- arch/powerpc/cpu/mpc8xx/Kconfig | 4 - arch/powerpc/cpu/mpc8xx/cpu_init.c | 1 - board/eltec/mhpc/Kconfig | 12 - board/eltec/mhpc/MAINTAINERS | 6 - board/eltec/mhpc/Makefile | 8 - board/eltec/mhpc/flash.c | 414 --------------------------------- board/eltec/mhpc/mhpc.c | 465 ------------------------------------- board/eltec/mhpc/u-boot.lds.debug | 121 ---------- configs/MHPC_defconfig | 3 - include/commproc.h | 22 -- include/configs/MHPC.h | 369 ----------------------------- 11 files changed, 1425 deletions(-) delete mode 100644 board/eltec/mhpc/Kconfig delete mode 100644 board/eltec/mhpc/MAINTAINERS delete mode 100644 board/eltec/mhpc/Makefile delete mode 100644 board/eltec/mhpc/flash.c delete mode 100644 board/eltec/mhpc/mhpc.c delete mode 100644 board/eltec/mhpc/u-boot.lds.debug delete mode 100644 configs/MHPC_defconfig delete mode 100644 include/configs/MHPC.h
arch/powerpc/cpu/mpc8xx/Kconfig +0 -4
@@ -40,9 +40,6 @@ config TARGET_RRVISION config TARGET_SPD823TS bool "Support SPD823TS" -config TARGET_MHPC - bool "Support MHPC" - config TARGET_TOP860 bool "Support TOP860"
@@ -117,7 +114,6 @@ endchoice source "board/LEOX/elpt860/Kconfig" source "board/RRvision/Kconfig" source "board/cogent/Kconfig" -source "board/eltec/mhpc/Kconfig" source "board/emk/top860/Kconfig" source "board/esteem192e/Kconfig" source "board/hermes/Kconfig"
arch/powerpc/cpu/mpc8xx/cpu_init.c +0 -1
@@ -130,7 +130,6 @@ void cpu_init_f (volatile immap_t * immr)defined (CONFIG_IVML24 ) || \defined (CONFIG_IVMS8 ) || \defined (CONFIG_LWMON ) || \ -defined (CONFIG_MHPC ) || \defined (CONFIG_R360MPI ) || \defined (CONFIG_RMU ) || \defined (CONFIG_SPD823TS )
board/eltec/mhpc/Kconfig deleted +0 -12
@@ -1,12 +0,0 @@ -if TARGET_MHPC - -config SYS_BOARD - default "mhpc" - -config SYS_VENDOR - default "eltec" - -config SYS_CONFIG_NAME - default "MHPC" - -endif
board/eltec/mhpc/MAINTAINERS deleted +0 -6
@@ -1,6 +0,0 @@ -MHPC BOARD -M: Frank Gottschling <[email protected]> -S: Maintained -F: board/eltec/mhpc/ -F: include/configs/MHPC.h -F: configs/MHPC_defconfig
board/eltec/mhpc/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = mhpc.o flash.o
board/eltec/mhpc/flash.c deleted +0 -414
414 lines not on this page · raw message
board/eltec/mhpc/mhpc.c deleted +0 -465
465 lines not on this page · raw message
board/eltec/mhpc/u-boot.lds.debug deleted +0 -121
121 lines not on this page · raw message
configs/MHPC_defconfig deleted +0 -3
@@ -1,3 +0,0 @@ -CONFIG_PPC=y -CONFIG_8xx=y -CONFIG_TARGET_MHPC=y
include/commproc.h +0 -22
@@ -703,28 +703,6 @@ typedef struct scc_enet {#define SICR_ENET_CLKRT ((uint)0x00250000)#endif /* CONFIG_KM8XX */ - -/*** MHPC ********************************************************/ - -#if defined(CONFIG_MHPC ) -/* This ENET stuff is for the MHPC with ethernet on SCC2. -* Note TENA is on Port B. -*/ -#define PROFF_ENET PROFF_SCC2 -#define CPM_CR_ENET CPM_CR_CH_SCC2 -#define SCC_ENET 1 -#define PA_ENET_RXD ((ushort)0x0004)/* PA 13 */ -#define PA_ENET_TXD ((ushort)0x0008)/* PA 12 */ -#define PA_ENET_RCLK ((ushort)0x0200)/* PA 6 */ -#define PA_ENET_TCLK ((ushort)0x0400)/* PA 5 */ -#define PB_ENET_TENA ((uint)0x00002000)/* PB 18 */ -#define PC_ENET_CLSN ((ushort)0x0040)/* PC 9 */ -#define PC_ENET_RENA ((ushort)0x0080)/* PC 8 */ - -#define SICR_ENET_MASK ((uint)0x0000ff00) -#define SICR_ENET_CLKRT ((uint)0x00002e00)/* RCLK-CLK2, TCLK-CLK3 */ -#endif /* CONFIG_MHPC */ -/*** NETVIA *******************************************************/ #if defined(CONFIG_NETVIA )
include/configs/MHPC.h deleted +0 -369
369 lines not on this page · raw message
Signature · 1 line
2.1.1
PATCH 3/25 ppc: Zap Hymod board
In reply to Marek VasutRemove this board as this is the only one last user of eeprom_probe(), which is pretty non-standard stuff.
This patch also removes all the PHP, SQL and CSS stuff from U-Boot, which probably makes U-Boot a bit less IoT ;-)
--- arch/powerpc/cpu/mpc8260/Kconfig | 4 - arch/powerpc/cpu/mpc8260/ether_fcc.c | 27 +- arch/powerpc/cpu/mpc8260/interrupts.c | 10 +- arch/powerpc/cpu/mpc8260/start.S | 14 - arch/powerpc/cpu/mpc83xx/start.S | 11 - arch/powerpc/include/asm/u-boot.h | 3 - board/hymod/Kconfig | 9 - board/hymod/MAINTAINERS | 6 - board/hymod/Makefile | 8 - board/hymod/bsp.c | 387 ------------------ board/hymod/config.mk | 14 - board/hymod/eeprom.c | 678 ------------------------------- board/hymod/env.c | 221 ----------- board/hymod/fetch.c | 91 ----- board/hymod/flash.c | 490 ----------------------- board/hymod/flash.h | 140 ------- board/hymod/global_env | 145 ------- board/hymod/hymod.c | 521 ------------------------ board/hymod/hymod.h | 305 -------------- board/hymod/input.c | 91 ----- board/hymod/u-boot.lds | 132 ------ board/hymod/u-boot.lds.debug | 121 ------ configs/hymod_defconfig | 3 - include/asm-generic/u-boot.h | 3 - include/common.h | 3 - include/configs/hymod.h | 728 ---------------------------------- tools/bddb/README | 116 ------ tools/bddb/badsubmit.php | 23 -- tools/bddb/bddb.css | 207 ---------- tools/bddb/brlog.php | 109 ----- tools/bddb/browse.php | 147 ------- tools/bddb/config.php | 16 - tools/bddb/create_tables.sql | 90 ----- tools/bddb/defs.php | 710 --------------------------------- tools/bddb/dodelete.php | 65 --- tools/bddb/dodellog.php | 57 --- tools/bddb/doedit.php | 186 --------- tools/bddb/doedlog.php | 76 ---- tools/bddb/donew.php | 230 ----------- tools/bddb/donewlog.php | 86 ---- tools/bddb/edit.php | 131 ------ tools/bddb/edlog.php | 86 ---- tools/bddb/execute.php | 33 -- tools/bddb/index.php | 38 -- tools/bddb/new.php | 120 ------ tools/bddb/newlog.php | 54 --- 46 files changed, 2 insertions(+), 6743 deletions(-) delete mode 100644 board/hymod/Kconfig delete mode 100644 board/hymod/MAINTAINERS delete mode 100644 board/hymod/Makefile delete mode 100644 board/hymod/bsp.c delete mode 100644 board/hymod/config.mk delete mode 100644 board/hymod/eeprom.c delete mode 100644 board/hymod/env.c delete mode 100644 board/hymod/fetch.c delete mode 100644 board/hymod/flash.c delete mode 100644 board/hymod/flash.h delete mode 100644 board/hymod/global_env delete mode 100644 board/hymod/hymod.c delete mode 100644 board/hymod/hymod.h delete mode 100644 board/hymod/input.c delete mode 100644 board/hymod/u-boot.lds delete mode 100644 board/hymod/u-boot.lds.debug delete mode 100644 configs/hymod_defconfig delete mode 100644 include/configs/hymod.h delete mode 100644 tools/bddb/README delete mode 100644 tools/bddb/badsubmit.php delete mode 100644 tools/bddb/bddb.css delete mode 100644 tools/bddb/brlog.php delete mode 100644 tools/bddb/browse.php delete mode 100644 tools/bddb/config.php delete mode 100644 tools/bddb/create_tables.sql delete mode 100644 tools/bddb/defs.php delete mode 100644 tools/bddb/dodelete.php delete mode 100644 tools/bddb/dodellog.php delete mode 100644 tools/bddb/doedit.php delete mode 100644 tools/bddb/doedlog.php delete mode 100644 tools/bddb/donew.php delete mode 100644 tools/bddb/donewlog.php delete mode 100644 tools/bddb/edit.php delete mode 100644 tools/bddb/edlog.php delete mode 100644 tools/bddb/execute.php delete mode 100644 tools/bddb/index.php delete mode 100644 tools/bddb/new.php delete mode 100644 tools/bddb/newlog.php
arch/powerpc/cpu/mpc8260/Kconfig +0 -4
@@ -28,9 +28,6 @@ config TARGET_EP82XXM config TARGET_GW8260 bool "Support gw8260" -config TARGET_HYMOD - bool "Support hymod" - config TARGET_IPHASE4539 bool "Support IPHASE4539"
@@ -78,7 +75,6 @@ source "board/ep82xxm/Kconfig" source "board/freescale/mpc8266ads/Kconfig" source "board/funkwerk/vovpn-gw/Kconfig" source "board/gw8260/Kconfig" -source "board/hymod/Kconfig" source "board/ids/ids8247/Kconfig" source "board/iphase4539/Kconfig" source "board/keymile/km82xx/Kconfig"
arch/powerpc/cpu/mpc8260/ether_fcc.c +1 -26
@@ -645,32 +645,7 @@ eth_loopback_test (void)/* 28.9 - (1-2): ioports have been set up already */ -#if defined(CONFIG_HYMOD ) -/* -* Attention: this is board-specific -* 0, FCC1 -* 1, FCC2 -* 2, FCC3 -*/ -# define FCC_START_LOOP 0 -# define FCC_END_LOOP 2 - -/* -* Attention: this is board-specific -* - FCC1 Rx-CLK is CLK10 -* - FCC1 Tx-CLK is CLK11 -* - FCC2 Rx-CLK is CLK13 -* - FCC2 Tx-CLK is CLK14 -* - FCC3 Rx-CLK is CLK15 -* - FCC3 Tx-CLK is CLK16 -*/ - -/* 28.9 - (3): connect FCC's tx and rx clocks */ - immr->im_cpmux.cmx_uar =0 ; - immr->im_cpmux.cmx_fcr =CMXFCR_RF1CS_CLK10 |CMXFCR_TF1CS_CLK11 |\ -CMXFCR_RF2CS_CLK13 |CMXFCR_TF2CS_CLK14 |\ -CMXFCR_RF3CS_CLK15 |CMXFCR_TF3CS_CLK16 ; -#elif defined(CONFIG_SACSng) +#if defined(CONFIG_SACSng)/* * Attention: this is board-specific * 1, FCC2
arch/powerpc/cpu/mpc8260/interrupts.c +1 -9
@@ -142,15 +142,7 @@ int interrupt_init_cpu (unsigned *decrementer_count) immr->im_intctl.ic_sipnrh =0xffffffff ; immr->im_intctl.ic_sipnrl =0xffffffff ; -#ifdef CONFIG_HYMOD -/* -* ensure all external interrupt sources default to trigger on -* high-to-low transition (i.e. edge triggered active low) -*/ - immr->im_intctl.ic_siexr =-1 ; -#endif - -return (0 ); +return 0 ; }/****************************************************************************/
arch/powerpc/cpu/mpc8260/start.S +0 -14
@@ -48,9 +48,6 @@ GOT_ENTRY(__init_end) GOT_ENTRY(__bss_end) GOT_ENTRY(__bss_start) -#if defined(CONFIG_HYMOD) - GOT_ENTRY(environment) -#endif END_GOT /*
@@ -878,18 +875,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) -#if defined(CONFIG_HYMOD) - /* - * For HYMOD - the environment is the very last item in flash. - * The real .bss stops just before environment starts, so only - * clear up to that point. - * - * taken from mods for FADS board - */ - lwz r4,GOT(environment) -#else lwz r4,GOT(__bss_end) -#endif cmplw 0, r3, r4 beq 6f
arch/powerpc/cpu/mpc83xx/start.S +0 -11
@@ -958,18 +958,7 @@ clear_bss: * Now clear BSS segment */ lwz r3,GOT(__bss_start) -#if defined(CONFIG_HYMOD) - /* - * For HYMOD - the environment is the very last item in flash. - * The real .bss stops just before environment starts, so only - * clear up to that point. - * - * taken from mods for FADS board - */ - lwz r4,GOT(environment) -#else lwz r4,GOT(__bss_end) -#endif cmplw 0, r3, r4 beq 6f
arch/powerpc/include/asm/u-boot.h +0 -3
@@ -77,9 +77,6 @@ typedef struct bd_info {unsigned int bi_pci_busfreq;/* PCI Bus speed, in Hz */ unsigned char bi_pci_enetaddr[6 ];/* PCI Ethernet MAC address */ #endif -#if defined(CONFIG_HYMOD ) -hymod_conf_t bi_hymod_conf;/* hymod configuration information */ -#endif #ifdef CONFIG_HAS_ETH1 unsigned char bi_enet1addr[6 ];/* OLD: see README.enetaddr */
board/hymod/Kconfig deleted +0 -9
@@ -1,9 +0,0 @@ -if TARGET_HYMOD - -config SYS_BOARD - default "hymod" - -config SYS_CONFIG_NAME - default "hymod" - -endif
board/hymod/MAINTAINERS deleted +0 -6
@@ -1,6 +0,0 @@ -HYMOD BOARD -M: Murray Jensen <[email protected]> -S: Maintained -F: board/hymod/ -F: include/configs/hymod.h -F: configs/hymod_defconfig
board/hymod/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -# -# (C) Copyright 2000-2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = hymod.o flash.o bsp.o eeprom.o fetch.o input.o env.o
board/hymod/bsp.c deleted +0 -387
387 lines not on this page · raw message
board/hymod/config.mk deleted +0 -14
@@ -1,14 +0,0 @@ -# -# (C) Copyright 2000 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -# -# HYMOD boards -# - -PLATFORM_CPPFLAGS += -I$(srctree) - -OBJCOPYFLAGS = --remove-section=.ppcenv
board/hymod/eeprom.c deleted +0 -678
678 lines not on this page · raw message
board/hymod/env.c deleted +0 -221
221 lines not on this page · raw message
board/hymod/fetch.c deleted +0 -91
91 lines not on this page · raw message
board/hymod/flash.c deleted +0 -490
490 lines not on this page · raw message
board/hymod/flash.h deleted +0 -140
140 lines not on this page · raw message
board/hymod/global_env deleted +0 -145
145 lines not on this page · raw message
board/hymod/hymod.c deleted +0 -521
521 lines not on this page · raw message
board/hymod/hymod.h deleted +0 -305
171 lines not on this page · raw message
board/hymod/input.c deleted +0 -91
91 lines not on this page · raw message
board/hymod/u-boot.lds deleted +0 -132
132 lines not on this page · raw message
board/hymod/u-boot.lds.debug deleted +0 -121
121 lines not on this page · raw message
include/configs/hymod.h deleted +0 -728
728 lines not on this page · raw message
tools/bddb/README deleted +0 -116
116 lines not on this page · raw message
tools/bddb/bddb.css deleted +0 -207
207 lines not on this page · raw message
tools/bddb/brlog.php deleted +0 -109
109 lines not on this page · raw message
tools/bddb/browse.php deleted +0 -147
147 lines not on this page · raw message
tools/bddb/create_tables.sql deleted +0 -90
90 lines not on this page · raw message
tools/bddb/defs.php deleted +0 -710
710 lines not on this page · raw message
tools/bddb/dodelete.php deleted +0 -65
65 lines not on this page · raw message
tools/bddb/dodellog.php deleted +0 -57
57 lines not on this page · raw message
tools/bddb/doedit.php deleted +0 -186
186 lines not on this page · raw message
tools/bddb/doedlog.php deleted +0 -76
76 lines not on this page · raw message
tools/bddb/donew.php deleted +0 -230
230 lines not on this page · raw message
tools/bddb/donewlog.php deleted +0 -86
86 lines not on this page · raw message
tools/bddb/edit.php deleted +0 -131
131 lines not on this page · raw message
tools/bddb/edlog.php deleted +0 -86
86 lines not on this page · raw message
tools/bddb/new.php deleted +0 -120
120 lines not on this page · raw message
tools/bddb/newlog.php deleted +0 -54
54 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.1
Part of the diff is not shown here. View the raw message.
PATCH 4/25 ppc: Zap HWW1U1A board
In reply to Marek VasutThis is the only used of CONFIG_SPI_X macro, just zap this.
--- arch/powerpc/cpu/mpc85xx/Kconfig | 4 - board/exmeritus/hww1u1a/Kconfig | 12 - board/exmeritus/hww1u1a/MAINTAINERS | 6 - board/exmeritus/hww1u1a/Makefile | 12 - board/exmeritus/hww1u1a/ddr.c | 34 --- board/exmeritus/hww1u1a/gpios.h | 56 ----- board/exmeritus/hww1u1a/hww1u1a.c | 268 --------------------- board/exmeritus/hww1u1a/law.c | 18 -- board/exmeritus/hww1u1a/tlb.c | 90 ------- configs/HWW1U1A_defconfig | 3 - include/configs/HWW1U1A.h | 460 ------------------------------------ 11 files changed, 963 deletions(-) delete mode 100644 board/exmeritus/hww1u1a/Kconfig delete mode 100644 board/exmeritus/hww1u1a/MAINTAINERS delete mode 100644 board/exmeritus/hww1u1a/Makefile delete mode 100644 board/exmeritus/hww1u1a/ddr.c delete mode 100644 board/exmeritus/hww1u1a/gpios.h delete mode 100644 board/exmeritus/hww1u1a/hww1u1a.c delete mode 100644 board/exmeritus/hww1u1a/law.c delete mode 100644 board/exmeritus/hww1u1a/tlb.c delete mode 100644 configs/HWW1U1A_defconfig delete mode 100644 include/configs/HWW1U1A.h
arch/powerpc/cpu/mpc85xx/Kconfig +0 -4
@@ -13,9 +13,6 @@ config TARGET_SBC8548 config TARGET_SOCRATES bool "Support socrates" -config TARGET_HWW1U1A - bool "Support HWW1U1A" - config TARGET_B4860QDS bool "Support B4860QDS"
@@ -144,7 +141,6 @@ config TARGET_XPEDITE550X endchoice -source "board/exmeritus/hww1u1a/Kconfig" source "board/freescale/b4860qds/Kconfig" source "board/freescale/bsc9131rdb/Kconfig" source "board/freescale/bsc9132qds/Kconfig"
board/exmeritus/hww1u1a/Kconfig deleted +0 -12
@@ -1,12 +0,0 @@ -if TARGET_HWW1U1A - -config SYS_BOARD - default "hww1u1a" - -config SYS_VENDOR - default "exmeritus" - -config SYS_CONFIG_NAME - default "HWW1U1A" - -endif
board/exmeritus/hww1u1a/MAINTAINERS deleted +0 -6
@@ -1,6 +0,0 @@ -HWW1U1A BOARD -#M: Kyle Moffett <[email protected]> -S: Orphan (since 2014-06) -F: board/exmeritus/hww1u1a/ -F: include/configs/HWW1U1A.h -F: configs/HWW1U1A_defconfig
board/exmeritus/hww1u1a/Makefile deleted +0 -12
@@ -1,12 +0,0 @@ -# -# Copyright 2007-2009 Freescale Semiconductor, Inc. -# (C) Copyright 2001-2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y += hww1u1a.o -obj-y += law.o -obj-y += tlb.o -obj-$(CONFIG_DDR_SPD) += ddr.o
board/exmeritus/hww1u1a/ddr.c deleted +0 -34
@@ -1,34 +0,0 @@ -/* -* Copyright 2009-2010 eXMeritus, A Boeing Company -* Copyright 2008-2009 Freescale Semiconductor, Inc. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* Version 2 as published by the Free Software Foundation. -*/ - -#include <common.h> - -#include <fsl_ddr_sdram.h> -#include <fsl_ddr_dimm_params.h> - -void fsl_ddr_board_options (memctl_options_t *popts, -dimm_params_t *pdimm, -unsigned int ctrl_num) -{ -/* -* We only support one DIMM, so according to the P2020 docs we should -* set the options as follows: -*/ - popts->cs_local_opts[0 ].odt_rd_cfg =0 ; - popts->cs_local_opts[0 ].odt_wr_cfg =4 ; - popts->cs_local_opts[1 ].odt_rd_cfg =0 ; - popts->cs_local_opts[1 ].odt_wr_cfg =0 ; - popts->half_strength_driver_enable =0 ; - -/* Manually configured for our static clock rate */ - popts->clk_adjust =4 ; - popts->cpo_override =4 ; - popts->write_data_delay =2 ; - popts->twot_en =0 ; -}
board/exmeritus/hww1u1a/gpios.h deleted +0 -56
56 lines not on this page · raw message
board/exmeritus/hww1u1a/hww1u1a.c deleted +0 -268
268 lines not on this page · raw message
board/exmeritus/hww1u1a/law.c deleted +0 -18
@@ -1,18 +0,0 @@ -/* -* Copyright 2008-2009 Freescale Semiconductor, Inc. -* -* (C) Copyright 2000 -* Wolfgang Denk, DENX Software Engineering, [email protected]. -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#include <common.h> -#include <asm/fsl_law.h> -#include <asm/mmu.h> - -struct law_entry law_table[] = { -SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ), -}; - -int num_law_entries =ARRAY_SIZE (law_table);
board/exmeritus/hww1u1a/tlb.c deleted +0 -90
90 lines not on this page · raw message
configs/HWW1U1A_defconfig deleted +0 -3
@@ -1,3 +0,0 @@ -CONFIG_PPC=y -CONFIG_MPC85xx=y -CONFIG_TARGET_HWW1U1A=y
include/configs/HWW1U1A.h deleted +0 -460
460 lines not on this page · raw message
Signature · 1 line
2.1.1
PATCH 5/25 ppc: Zap IDS8247 board
In reply to Marek VasutThis board is old and is using CONFIG_I2C_X, which is wrong.
--- arch/powerpc/cpu/mpc8260/Kconfig | 4 - board/ids/ids8247/Kconfig | 12 - board/ids/ids8247/MAINTAINERS | 6 - board/ids/ids8247/Makefile | 11 - board/ids/ids8247/ids8247.c | 390 --------------------------------- configs/IDS8247_defconfig | 3 - include/configs/IDS8247.h | 462 --------------------------------------- 7 files changed, 888 deletions(-) delete mode 100644 board/ids/ids8247/Kconfig delete mode 100644 board/ids/ids8247/MAINTAINERS delete mode 100644 board/ids/ids8247/Makefile delete mode 100644 board/ids/ids8247/ids8247.c delete mode 100644 configs/IDS8247_defconfig delete mode 100644 include/configs/IDS8247.h
arch/powerpc/cpu/mpc8260/Kconfig +0 -4
@@ -52,9 +52,6 @@ config TARGET_MPC8266ADS config TARGET_VOVPN_GW bool "Support VoVPN-GW" -config TARGET_IDS8247 - bool "Support IDS8247" - config TARGET_KM82XX bool "Support km82xx"
@@ -75,7 +72,6 @@ source "board/ep82xxm/Kconfig" source "board/freescale/mpc8266ads/Kconfig" source "board/funkwerk/vovpn-gw/Kconfig" source "board/gw8260/Kconfig" -source "board/ids/ids8247/Kconfig" source "board/iphase4539/Kconfig" source "board/keymile/km82xx/Kconfig" source "board/muas3001/Kconfig"
board/ids/ids8247/Kconfig deleted +0 -12
@@ -1,12 +0,0 @@ -if TARGET_IDS8247 - -config SYS_BOARD - default "ids8247" - -config SYS_VENDOR - default "ids" - -config SYS_CONFIG_NAME - default "IDS8247" - -endif
board/ids/ids8247/MAINTAINERS deleted +0 -6
@@ -1,6 +0,0 @@ -IDS8247 BOARD -M: Heiko Schocher <[email protected]> -S: Maintained -F: board/ids/ids8247/ -F: include/configs/IDS8247.h -F: configs/IDS8247_defconfig
board/ids/ids8247/Makefile deleted +0 -11
@@ -1,11 +0,0 @@ -# -# (C) Copyright 2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# (C) Copyright 2005 -# Heiko Schocher, DENX Software Engineering, <[email protected]> -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = ids8247.o
board/ids/ids8247/ids8247.c deleted +0 -390
390 lines not on this page · raw message
configs/IDS8247_defconfig deleted +0 -3
@@ -1,3 +0,0 @@ -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_IDS8247=y
include/configs/IDS8247.h deleted +0 -462
462 lines not on this page · raw message
Signature · 1 line
2.1.1
PATCH 6/25 ppc: Zap TQM8260 board
In reply to Marek VasutThis board is old and is using CONFIG_I2C_X, which is wrong.
--- arch/powerpc/cpu/mpc8260/Kconfig | 4 - board/tqc/tqm8260/Kconfig | 12 - board/tqc/tqm8260/MAINTAINERS | 16 - board/tqc/tqm8260/Makefile | 8 - board/tqc/tqm8260/README | 415 -------------------------- board/tqc/tqm8260/tqm8260.c | 352 ---------------------- configs/TQM8255_AA_defconfig | 4 - configs/TQM8260_AA_defconfig | 4 - configs/TQM8260_AB_defconfig | 4 - configs/TQM8260_AC_defconfig | 4 - configs/TQM8260_AD_defconfig | 4 - configs/TQM8260_AE_defconfig | 4 - configs/TQM8260_AF_defconfig | 4 - configs/TQM8260_AG_defconfig | 4 - configs/TQM8260_AH_defconfig | 4 - configs/TQM8260_AI_defconfig | 4 - configs/TQM8265_AA_defconfig | 4 - include/configs/TQM8260.h | 620 --------------------------------------- 18 files changed, 1471 deletions(-) delete mode 100644 board/tqc/tqm8260/Kconfig delete mode 100644 board/tqc/tqm8260/MAINTAINERS delete mode 100644 board/tqc/tqm8260/Makefile delete mode 100644 board/tqc/tqm8260/README delete mode 100644 board/tqc/tqm8260/tqm8260.c delete mode 100644 configs/TQM8255_AA_defconfig delete mode 100644 configs/TQM8260_AA_defconfig delete mode 100644 configs/TQM8260_AB_defconfig delete mode 100644 configs/TQM8260_AC_defconfig delete mode 100644 configs/TQM8260_AD_defconfig delete mode 100644 configs/TQM8260_AE_defconfig delete mode 100644 configs/TQM8260_AF_defconfig delete mode 100644 configs/TQM8260_AG_defconfig delete mode 100644 configs/TQM8260_AH_defconfig delete mode 100644 configs/TQM8260_AI_defconfig delete mode 100644 configs/TQM8265_AA_defconfig delete mode 100644 include/configs/TQM8260.h
arch/powerpc/cpu/mpc8260/Kconfig +0 -4
@@ -55,9 +55,6 @@ config TARGET_VOVPN_GW config TARGET_KM82XX bool "Support km82xx" -config TARGET_TQM8260 - bool "Support TQM8260" - config TARGET_TQM8272 bool "Support TQM8272"
@@ -79,7 +76,6 @@ source "board/pm826/Kconfig" source "board/pm828/Kconfig" source "board/ppmc8260/Kconfig" source "board/sacsng/Kconfig" -source "board/tqc/tqm8260/Kconfig" source "board/tqc/tqm8272/Kconfig" endmenu
board/tqc/tqm8260/Kconfig deleted +0 -12
@@ -1,12 +0,0 @@ -if TARGET_TQM8260 - -config SYS_BOARD - default "tqm8260" - -config SYS_VENDOR - default "tqc" - -config SYS_CONFIG_NAME - default "TQM8260" - -endif
board/tqc/tqm8260/MAINTAINERS deleted +0 -16
@@ -1,16 +0,0 @@ -TQM8260 BOARD -M: Wolfgang Denk <[email protected]> -S: Maintained -F: board/tqc/tqm8260/ -F: include/configs/TQM8260.h -F: configs/TQM8255_AA_defconfig -F: configs/TQM8260_AA_defconfig -F: configs/TQM8260_AB_defconfig -F: configs/TQM8260_AC_defconfig -F: configs/TQM8260_AD_defconfig -F: configs/TQM8260_AE_defconfig -F: configs/TQM8260_AF_defconfig -F: configs/TQM8260_AG_defconfig -F: configs/TQM8260_AH_defconfig -F: configs/TQM8260_AI_defconfig -F: configs/TQM8265_AA_defconfig
board/tqc/tqm8260/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -# -# (C) Copyright 2001-2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = tqm8260.o ../tqm8xx/load_sernum_ethaddr.o
board/tqc/tqm8260/README deleted +0 -415
415 lines not on this page · raw message
board/tqc/tqm8260/tqm8260.c deleted +0 -352
352 lines not on this page · raw message
configs/TQM8255_AA_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8255,300MHz" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AA_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,200MHz" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AB_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,200MHz,L2_CACHE,BUSMODE_60x" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AC_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,200MHz,L2_CACHE,BUSMODE_60x" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AD_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,300MHz,BUSMODE_60x" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AE_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,266MHz" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AF_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,300MHz,BUSMODE_60x" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AG_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,300MHz" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AH_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,300MHz,L2_CACHE,BUSMODE_60x" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8260_AI_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8260,300MHz,BUSMODE_60x" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
configs/TQM8265_AA_defconfig deleted +0 -4
@@ -1,4 +0,0 @@ -CONFIG_SYS_EXTRA_OPTIONS="MPC8265,300MHz,BUSMODE_60x" -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8260=y
include/configs/TQM8260.h deleted +0 -620
620 lines not on this page · raw message
Signature · 1 line
2.1.1
PATCH 6/25 ppc: Zap TQM8260 board
Dear Marek Vasut,
Quoted 8 lines · In message <[email protected]> you wrote:
This board is old and is using
CONFIG_I2C_X, which is wrong.Signed-off-by Marek Vasut <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Tom Rini <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Heiko Schocher <[email protected]>
Assuming you also add an entry to scrapyard:
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 It is better to be silent and thought a fool then to speak and remove all doubt.
PATCH 7/25 ppc: Zap TQM8272 board
In reply to Marek VasutThis board is old and is using CONFIG_I2C_X, which is wrong.
--- arch/powerpc/cpu/mpc8260/Kconfig | 4 - arch/powerpc/cpu/mpc8260/pci.c | 2 - board/tqc/tqm8272/Kconfig | 12 - board/tqc/tqm8272/MAINTAINERS | 6 - board/tqc/tqm8272/Makefile | 8 - board/tqc/tqm8272/nand.c | 264 ----------- board/tqc/tqm8272/tqm8272.c | 944 --------------------------------------- board/tqc/tqm8272/tqm8272.h | 37 -- configs/TQM8272_defconfig | 3 - include/configs/TQM8272.h | 735 ------------------------------ 10 files changed, 2015 deletions(-) delete mode 100644 board/tqc/tqm8272/Kconfig delete mode 100644 board/tqc/tqm8272/MAINTAINERS delete mode 100644 board/tqc/tqm8272/Makefile delete mode 100644 board/tqc/tqm8272/nand.c delete mode 100644 board/tqc/tqm8272/tqm8272.c delete mode 100644 board/tqc/tqm8272/tqm8272.h delete mode 100644 configs/TQM8272_defconfig delete mode 100644 include/configs/TQM8272.h
arch/powerpc/cpu/mpc8260/Kconfig +0 -4
@@ -55,9 +55,6 @@ config TARGET_VOVPN_GW config TARGET_KM82XX bool "Support km82xx" -config TARGET_TQM8272 - bool "Support TQM8272" - endchoice source "board/atc/Kconfig"
@@ -76,6 +73,5 @@ source "board/pm826/Kconfig" source "board/pm828/Kconfig" source "board/ppmc8260/Kconfig" source "board/sacsng/Kconfig" -source "board/tqc/tqm8272/Kconfig" endmenu
arch/powerpc/cpu/mpc8260/pci.c +0 -2
@@ -262,8 +262,6 @@ void pci_mpc8250_init (struct pci_controller *hose) | SIUMCR_CS10PC00 |SIUMCR_BCTLC00 |SIUMCR_MMR11 ; -#elif defined(CONFIG_TQM8272 ) -/* nothing to do for this Board here */ #else /* * Setting required to enable IRQ1-IRQ7 (SIUMCR [DPPC]),
board/tqc/tqm8272/Kconfig deleted +0 -12
@@ -1,12 +0,0 @@ -if TARGET_TQM8272 - -config SYS_BOARD - default "tqm8272" - -config SYS_VENDOR - default "tqc" - -config SYS_CONFIG_NAME - default "TQM8272" - -endif
board/tqc/tqm8272/MAINTAINERS deleted +0 -6
@@ -1,6 +0,0 @@ -TQM8272 BOARD -#M: - -S: Maintained -F: board/tqc/tqm8272/ -F: include/configs/TQM8272.h -F: configs/TQM8272_defconfig
board/tqc/tqm8272/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -# -# (C) Copyright 2001-2008 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y = tqm8272.o ../tqm8xx/load_sernum_ethaddr.o nand.o
board/tqc/tqm8272/nand.c deleted +0 -264
264 lines not on this page · raw message
board/tqc/tqm8272/tqm8272.c deleted +0 -944
944 lines not on this page · raw message
board/tqc/tqm8272/tqm8272.h deleted +0 -37
@@ -1,37 +0,0 @@ -/* -* (C) Copyright 2008 -* Heiko Schocher, DENX Software Engineering, hs at denx.de. -* -* SPDX-License-Identifier: GPL-2.0+ -*/ - -#ifndef _TQM8272_HEADER_H -#define _TQM8272_HEADER_H - -#define _NOT_USED_ 0xFFFFFFFF - -typedef struct { -int Bus; -int flash; -int flash_nr; -int ram; -int ram_cs; -int nand; -int nand_cs; -int eeprom; -int can; -unsigned long cpunr; -unsigned long option; -int SecEng; -int cpucl; -int cpmcl; -int buscl; -int busclk_real_ok; -int busclk_real; -unsigned char OK; -unsigned char ethaddr[20 ]; -}HWIB_INFO ; - -static HWIB_INFO hwinf = {0 ,0 ,1 ,0 ,1 ,0 ,0 ,0 ,0 ,8272 ,0 ,0 , -0 ,0 ,0 ,0 ,0 ,0 }; -#endif /* __CONFIG_H */
configs/TQM8272_defconfig deleted +0 -3
@@ -1,3 +0,0 @@ -CONFIG_PPC=y -CONFIG_MPC8260=y -CONFIG_TARGET_TQM8272=y
include/configs/TQM8272.h deleted +0 -735
735 lines not on this page · raw message
Signature · 1 line
2.1.1
PATCH 7/25 ppc: Zap TQM8272 board
Dear Marek Vasut,
Quoted 8 lines · In message <[email protected]> you wrote:
This board is old and is using
CONFIG_I2C_X, which is wrong.Signed-off-by Marek Vasut <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Tom Rini <[email protected]>Cc Wolfgang Denk <[email protected]>Cc Simon Glass <[email protected]>Cc Heiko Schocher <[email protected]>
Assuming you also add an entry to scrapyard:
Best regards,
Wolfgang Denk
Signature · 6 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 At the source of every error which is blamed on the computer you will find at least two human errors, including the error of blaming it on the computer.
PATCH 8/25 arm: Zap tricorder-eeprom
In reply to Marek VasutThis is a reimplementation of the cmd_eeprom with the added bit where it can select I2C bus. Just remove this ugly duplication. If someone needs this code, there should be proper implementation submitted.
--- board/corscience/tricorder/Makefile | 2 +- board/corscience/tricorder/tricorder-eeprom.c | 251 -------------------------- board/corscience/tricorder/tricorder-eeprom.h | 41 ----- 3 files changed, 1 insertion(+), 293 deletions(-) delete mode 100644 board/corscience/tricorder/tricorder-eeprom.c delete mode 100644 board/corscience/tricorder/tricorder-eeprom.h
board/corscience/tricorder/Makefile +1 -1
@@ -8,4 +8,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-y := tricorder.o tricorder-eeprom.o led.o +obj-y := tricorder.o led.o
board/corscience/tricorder/tricorder-eeprom.c deleted +0 -251
251 lines not on this page · raw message
board/corscience/tricorder/tricorder-eeprom.h deleted +0 -41
41 lines not on this page · raw message
Signature · 1 line
2.1.1
RFC PATCH 1/1 tricorder: rewrite tricordereeprom command
This rewrite uses lately promoted eeprom_init(int) function to choose the right I2C bus when writing data to the EEPROM.
---
Hi Marek,
works this for you? I can't kill the i2c_read() cause eeprom_read() will blow up my SPL size.
While you are on it, there are some other eeprom implementations (freescale) not yet covered by your removal.
regards
Andreas Bie?mann
board/corscience/tricorder/tricorder-eeprom.c | 36 +++++++-------------------- 1 file changed, 9 insertions(+), 27 deletions(-)
board/corscience/tricorder/tricorder-eeprom.c +9 -27
@@ -77,17 +77,13 @@ static int handle_eeprom_v1(struct tricorder_eeprom *eeprom)int tricorder_get_eeprom (int addr,struct tricorder_eeprom *eeprom) { -#ifdef CONFIG_SYS_EEPROM_BUS_NUM unsigned int bus =i2c_get_bus_num ();i2c_set_bus_num (CONFIG_SYS_EEPROM_BUS_NUM ); -#endif memset (eeprom,0 ,TRICORDER_EEPROM_SIZE );i2c_read (addr,0 ,2 , (unsigned char *)eeprom,TRICORDER_EEPROM_SIZE ); -#ifdef CONFIG_SYS_EEPROM_BUS_NUM i2c_set_bus_num (bus); -#endif if (be32_to_cpu (eeprom->magic) !=TRICORDER_EEPROM_MAGIC ) { warn_wrong_value("magic", TRICORDER_EEPROM_MAGIC,
@@ -138,9 +134,6 @@ int tricorder_eeprom_write(unsigned devaddr, const char *name,int ret;unsigned char *p;int i; -#ifdef CONFIG_SYS_EEPROM_BUS_NUM -unsigned int bus; -#endif memset (eeprom,0 ,TRICORDER_EEPROM_SIZE );memset (eeprom_verify,0 ,TRICORDER_EEPROM_SIZE );
@@ -172,33 +165,23 @@ int tricorder_eeprom_write(unsigned devaddr, const char *name,print_buffer (0 , &eeprom,1 ,sizeof (eeprom),16 );#endif -#ifdef CONFIG_SYS_EEPROM_BUS_NUM - bus =i2c_get_bus_num (); -i2c_set_bus_num (CONFIG_SYS_EEPROM_BUS_NUM ); -#endif +eeprom_init (CONFIG_SYS_EEPROM_BUS_NUM ); -/* do page write to the eeprom */ -for (i =0 , p = (unsigned char *)&eeprom; - i <sizeof (eeprom); - i +=32 , p +=32 ) { - ret =i2c_write (devaddr, i,CONFIG_SYS_I2C_EEPROM_ADDR_LEN , - p,min (sizeof (eeprom) - i,32 )); -if (ret) -break ; -udelay (5000 );/* 5ms write cycle timing */ - } + ret =eeprom_write (devaddr,0 , (unsigned char *)&eeprom, +TRICORDER_EEPROM_SIZE ); +if (ret) +printf ("Tricorder: Could not write EEPROM content!\n" ); - ret =i2c_read (devaddr,0 ,2 , (unsigned char *)&eeprom_verify, + ret =eeprom_read (devaddr,0 , (unsigned char *)&eeprom_verify,TRICORDER_EEPROM_SIZE ); +if (ret) +printf ("Tricorder: Could not read EEPROM content!\n" );if (memcmp (&eeprom, &eeprom_verify,sizeof (eeprom)) !=0 ) {printf ("Tricorder: Could not verify EEPROM content!\n" ); ret =1 ; } -#ifdef CONFIG_SYS_EEPROM_BUS_NUM -i2c_set_bus_num (bus); -#endif return ret; }
@@ -206,7 +189,7 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) {if (argc ==3 ) {ulong dev_addr =simple_strtoul (argv[2 ],NULL ,16 ); -eeprom_init (); +if (strcmp (argv[1 ],"read" ) ==0 ) {int rcode;
@@ -220,7 +203,6 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])char *version = argv[4 ];char *serial = argv[5 ];char *interface =NULL ; -eeprom_init ();if (argc ==7 ) interface = argv[6 ];
Signature · 1 line
2.1.1
RFC PATCH 1/1 tricorder: rewrite tricordereeprom command
Quoted 5 lines · Andreas Bie?mann
This rewrite uses lately promoted
eeprom_init(int)function to choose the right I2C bus when writing data to the EEPROM.Signed-off-by Andreas Bie?mann <[email protected]>Cc Marek Vasut <[email protected]>
I am back! Yes, picked this up, thanks!
Best regards,
Marek Vasut
PATCH 9/25 eeprom: Shuffle code around
In reply to Marek VasutJust move the code around so that the forward declarations are not necessary. Also zap a few checkpatch issues where applicable and zap the use of #ifdef CONFIG_CMD_EEPROM in the code, since this is always true.
--- common/cmd_eeprom.c | 176 ++++++++++++++++++++++------------------------------ 1 file changed, 74 insertions(+), 102 deletions(-)
common/cmd_eeprom.c +74 -102
@@ -25,94 +25,60 @@#include <command.h> #include <i2c.h> -extern void eeprom_init (void ); -extern int eeprom_read (unsigned dev_addr,unsigned offset, -uchar *buffer,unsigned cnt); -extern int eeprom_write (unsigned dev_addr,unsigned offset, -uchar *buffer,unsigned cnt); -#if defined(CONFIG_SYS_EEPROM_WREN ) -extern int eeprom_write_enable (unsigned dev_addr,int state); +#ifndef CONFIG_SYS_I2C_SPEED +#define CONFIG_SYS_I2C_SPEED 50000#endif - +/* Maximum number of times to poll for acknowledge after write */ #if defined(CONFIG_SYS_EEPROM_X40430 ) -/* Maximum number of times to poll for acknowledge after write */ #define MAX_ACKNOWLEDGE_POLLS 10#endif -/* ------------------------------------------------------------------------- */ - -#if defined(CONFIG_CMD_EEPROM ) -static int do_eeprom (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) -{ -const char *const fmt = -"\nEEPROM @0x%lX %s: addr %08lx off %04lx count %ld ... " ; - -#if defined(CONFIG_SYS_I2C_MULTI_EEPROMS ) -if (argc ==6 ) { -ulong dev_addr =simple_strtoul (argv[2 ],NULL ,16 ); -ulong addr =simple_strtoul (argv[3 ],NULL ,16 ); -ulong off =simple_strtoul (argv[4 ],NULL ,16 ); -ulong cnt =simple_strtoul (argv[5 ],NULL ,16 ); -#else -if (argc ==5 ) { -ulong dev_addr =CONFIG_SYS_DEF_EEPROM_ADDR ; -ulong addr =simple_strtoul (argv[2 ],NULL ,16 ); -ulong off =simple_strtoul (argv[3 ],NULL ,16 ); -ulong cnt =simple_strtoul (argv[4 ],NULL ,16 ); -#endif /* CONFIG_SYS_I2C_MULTI_EEPROMS */ - -# if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -eeprom_init (); -# endif /* !CONFIG_SPI */ - -if (strcmp (argv[1 ],"read" ) ==0 ) { -int rcode; - -printf (fmt, dev_addr, argv[1 ], addr, off, cnt); - - rcode =eeprom_read (dev_addr, off, (uchar *) addr, cnt); - -puts ("done\n" ); -return rcode; - }else if (strcmp (argv[1 ],"write" ) ==0 ) { -int rcode; - -printf (fmt, dev_addr, argv[1 ], addr, off, cnt); - - rcode =eeprom_write (dev_addr, off, (uchar *) addr, cnt); - -puts ("done\n" ); -return rcode; - } - } - -return CMD_RET_USAGE ; -} -#endif - -/*----------------------------------------------------------------------- -* +/* * for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 2 (16-bit EEPROM address) offset is * 0x000nxxxx for EEPROM address selectors at n, offset xxxx in EEPROM. * * for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 1 (8-bit EEPROM page address) offset is * 0x00000nxx for EEPROM address selectors and page number at n. */ -#if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -#if !defined(CONFIG_SYS_I2C_EEPROM_ADDR_LEN ) ||CONFIG_SYS_I2C_EEPROM_ADDR_LEN <1 ||CONFIG_SYS_I2C_EEPROM_ADDR_LEN >2 +#if !defined(CONFIG_SYS_I2C_EEPROM_ADDR_LEN ) || \ + (CONFIG_SYS_I2C_EEPROM_ADDR_LEN <1 ) || \ + (CONFIG_SYS_I2C_EEPROM_ADDR_LEN >2 )#error CONFIG_SYS_I2C_EEPROM_ADDR_LEN must be 1 or 2#endif #endif +#if defined(CONFIG_SYS_EEPROM_WREN ) +extern int eeprom_write_enable (unsigned dev_addr,int state); +#endif + +void eeprom_init (void ) +{ +/* SPI EEPROM */ +#if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) +spi_init_f (); +#endif + +/* I2C EEPROM */ +#if defined(CONFIG_HARD_I2C ) || defined(CONFIG_SYS_I2C_SOFT ) || \ + defined(CONFIG_SYS_I2C ) +#ifdef CONFIG_SYS_I2C +i2c_init_all (); +#else +i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); +#endif +#endif +} +int eeprom_read (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) {unsigned end = offset + cnt;unsigned blk_off;int rcode =0 ; -/* Read data until done or would cross a page boundary. +/* +* Read data until done or would cross a page boundary. * We must write the address again when changing pages * because the next page may be in a different device. */
@@ -171,15 +137,6 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cntreturn rcode; } -/*----------------------------------------------------------------------- -* -* for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 2 (16-bit EEPROM address) offset is -* 0x000nxxxx for EEPROM address selectors at n, offset xxxx in EEPROM. -* -* for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 1 (8-bit EEPROM page address) offset is -* 0x00000nxx for EEPROM address selectors and page number at n. -*/ -int eeprom_write (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) {unsigned end = offset + cnt;
@@ -197,7 +154,8 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn#if defined(CONFIG_SYS_EEPROM_WREN )eeprom_write_enable (dev_addr,1 );#endif -/* Write data until done or would cross a write page boundary. +/* +* Write data until done or would cross a write page boundary. * We must write the address again when changing pages * because the address counter only increments within a page. */
@@ -357,8 +315,7 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn }#if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -int -eeprom_probe (unsigned dev_addr,unsigned offset) +int eeprom_probe (unsigned dev_addr,unsigned offset) {unsigned char chip;
@@ -376,35 +333,52 @@ eeprom_probe (unsigned dev_addr, unsigned offset) }#endif -/*----------------------------------------------------------------------- -* Set default values -*/ -#ifndef CONFIG_SYS_I2C_SPEED -#define CONFIG_SYS_I2C_SPEED 50000 -#endif - -void eeprom_init (void ) +static int do_eeprom (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { +const char *const fmt = +"\nEEPROM @0x%lX %s: addr %08lx off %04lx count %ld ... " ; -#if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -spi_init_f (); -#endif -#if defined(CONFIG_HARD_I2C ) || defined(CONFIG_SYS_I2C_SOFT ) || \ - defined(CONFIG_SYS_I2C ) -#ifdef CONFIG_SYS_I2C -i2c_init_all (); +#if defined(CONFIG_SYS_I2C_MULTI_EEPROMS ) +if (argc ==6 ) { +ulong dev_addr =simple_strtoul (argv[2 ],NULL ,16 ); +ulong addr =simple_strtoul (argv[3 ],NULL ,16 ); +ulong off =simple_strtoul (argv[4 ],NULL ,16 ); +ulong cnt =simple_strtoul (argv[5 ],NULL ,16 );#else -i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE ); -#endif -#endif -} +if (argc ==5 ) { +ulong dev_addr =CONFIG_SYS_DEF_EEPROM_ADDR ; +ulong addr =simple_strtoul (argv[2 ],NULL ,16 ); +ulong off =simple_strtoul (argv[3 ],NULL ,16 ); +ulong cnt =simple_strtoul (argv[4 ],NULL ,16 ); +#endif /* CONFIG_SYS_I2C_MULTI_EEPROMS */ -/*----------------------------------------------------------------------- -*/ +# if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) +eeprom_init (); +# endif /* !CONFIG_SPI */ -/***************************************************/ +if (strcmp (argv[1 ],"read" ) ==0 ) { +int rcode; -#if defined(CONFIG_CMD_EEPROM ) +printf (fmt, dev_addr, argv[1 ], addr, off, cnt); + + rcode =eeprom_read (dev_addr, off, (uchar *) addr, cnt); + +puts ("done\n" ); +return rcode; + }else if (strcmp (argv[1 ],"write" ) ==0 ) { +int rcode; + +printf (fmt, dev_addr, argv[1 ], addr, off, cnt); + + rcode =eeprom_write (dev_addr, off, (uchar *) addr, cnt); + +puts ("done\n" ); +return rcode; + } + } + +return CMD_RET_USAGE ; +}#ifdef CONFIG_SYS_I2C_MULTI_EEPROMS U_BOOT_CMD(
@@ -423,5 +397,3 @@ U_BOOT_CMD( " - read/write `cnt' bytes at EEPROM offset `off'" )#endif /* CONFIG_SYS_I2C_MULTI_EEPROMS */ - -#endif
Signature · 1 line
2.1.1
PATCH 10/25 eeprom: Zap CONFIG_SYS_I2C_MULTI_EEPROMS
In reply to Marek VasutThis option only complicates the code unnecessarily, just use CONFIG_SYS_DEF_EEPROM_ADDR as the default address if there are only five arguments to eeprom {read/write} if this is defined. If CONFIG_SYS_DEF_EEPROM_ADDR is not defined, we mandate all six arguments.
--- common/cmd_eeprom.c | 69 ++++++++++++++++++----------------------- include/configs/BSC9131RDB.h | 1 - include/configs/BSC9132QDS.h | 1 - include/configs/C29XPCIE.h | 1 - include/configs/CPCI405AB.h | 1 - include/configs/CPCI750.h | 1 - include/configs/DB64360.h | 1 - include/configs/DB64460.h | 1 - include/configs/DU440.h | 1 - include/configs/P1010RDB.h | 1 - include/configs/PMC440.h | 1 - include/configs/TQM834x.h | 1 - include/configs/W7OLMC.h | 1 - include/configs/W7OLMG.h | 1 - include/configs/acadia.h | 1 - include/configs/am335x_evm.h | 1 - include/configs/am43xx_evm.h | 1 - include/configs/axs101.h | 1 - include/configs/bamboo.h | 1 - include/configs/canyonlands.h | 1 - include/configs/cpci5200.h | 1 - include/configs/ebony.h | 1 - include/configs/icon.h | 1 - include/configs/intip.h | 1 - include/configs/katmai.h | 1 - include/configs/km/km-powerpc.h | 1 - include/configs/km/km_arm.h | 1 - include/configs/korat.h | 1 - include/configs/ks2_evm.h | 1 - include/configs/luan.h | 1 - include/configs/m28evk.h | 1 - include/configs/mecp5200.h | 1 - include/configs/motionpro.h | 1 - include/configs/ocotea.h | 1 - include/configs/p1_p2_rdb_pc.h | 1 - include/configs/p1_twr.h | 1 - include/configs/pcm051.h | 1 - include/configs/pengwyn.h | 1 - include/configs/pf5200.h | 1 - include/configs/sequoia.h | 1 - include/configs/t3corp.h | 1 - include/configs/taishan.h | 1 - include/configs/tricorder.h | 1 - include/configs/walnut.h | 1 - include/configs/yosemite.h | 1 - 45 files changed, 30 insertions(+), 83 deletions(-)
common/cmd_eeprom.c +30 -39
@@ -337,50 +337,50 @@ static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {const char *const fmt ="\nEEPROM @0x%lX %s: addr %08lx off %04lx count %ld ... " ; +char *const *args = &argv[2 ]; +int rcode; +ulong dev_addr, addr, off, cnt; + +switch (argc) { +#ifdef CONFIG_SYS_DEF_EEPROM_ADDR +case 5 : + dev_addr =CONFIG_SYS_DEF_EEPROM_ADDR ; +break ; +#endif +case 6 : + dev_addr =simple_strtoul (*args++,NULL ,16 ); +break ; +default : +return CMD_RET_USAGE ; + } -#if defined(CONFIG_SYS_I2C_MULTI_EEPROMS) - if (argc == 6) { - ulong dev_addr = simple_strtoul (argv[2], NULL, 16); - ulong addr = simple_strtoul (argv[3], NULL, 16); - ulong off = simple_strtoul (argv[4], NULL, 16); - ulong cnt = simple_strtoul (argv[5], NULL, 16); -#else - if (argc == 5) { - ulong dev_addr = CONFIG_SYS_DEF_EEPROM_ADDR; - ulong addr = simple_strtoul (argv[2], NULL, 16); - ulong off = simple_strtoul (argv[3], NULL, 16); - ulong cnt = simple_strtoul (argv[4], NULL, 16); -#endif /* CONFIG_SYS_I2C_MULTI_EEPROMS */ + addr =simple_strtoul (*args++,NULL ,16 ); + off =simple_strtoul (*args++,NULL ,16 ); + cnt =simple_strtoul (*args++,NULL ,16 );# if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) - eeprom_init (); +eeprom_init ();# endif /* !CONFIG_SPI */ - if (strcmp (argv[1], "read") == 0) { - int rcode; - - printf (fmt, dev_addr, argv[1], addr, off, cnt); - - rcode = eeprom_read (dev_addr, off, (uchar *) addr, cnt); +if (strcmp (argv[1 ],"read" ) ==0 ) { +printf (fmt, dev_addr, argv[1 ], addr, off, cnt); - puts ("done\n"); - return rcode; - } else if (strcmp (argv[1], "write") == 0) { - int rcode; + rcode =eeprom_read (dev_addr, off, (uchar *) addr, cnt); - printf (fmt, dev_addr, argv[1], addr, off, cnt); +puts ("done\n" ); +return rcode; + }else if (strcmp (argv[1 ],"write" ) ==0 ) { +printf (fmt, dev_addr, argv[1 ], addr, off, cnt); - rcode = eeprom_write (dev_addr, off, (uchar *) addr, cnt); + rcode =eeprom_write (dev_addr, off, (uchar *) addr, cnt); - puts ("done\n"); - return rcode; - } +puts ("done\n" ); +return rcode; }return CMD_RET_USAGE ; } -#ifdef CONFIG_SYS_I2C_MULTI_EEPROMS U_BOOT_CMD( eeprom, 6, 1, do_eeprom, "EEPROM sub-system",
@@ -388,12 +388,3 @@ U_BOOT_CMD("eeprom write devaddr addr off cnt\n" " - read/write `cnt' bytes from `devaddr` EEPROM at offset `off'" ) -#else /* One EEPROM */ -U_BOOT_CMD ( - eeprom,5 ,1 , do_eeprom, -"EEPROM sub-system" , -"read addr off cnt\n" -"eeprom write addr off cnt\n" -" - read/write `cnt' bytes at EEPROM offset `off'" -) -#endif /* CONFIG_SYS_I2C_MULTI_EEPROMS */
include/configs/BSC9131RDB.h +0 -1
@@ -265,7 +265,6 @@ extern unsigned long get_sdram_size(void);/* I2C EEPROM */ #define CONFIG_CMD_EEPROM -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
include/configs/BSC9132QDS.h +0 -1
@@ -464,7 +464,6 @@ combinations. this should be removed later/* enable read and write access to EEPROM */ #define CONFIG_CMD_EEPROM -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
include/configs/C29XPCIE.h +0 -1
@@ -422,7 +422,6 @@/* I2C EEPROM */ /* enable read and write access to EEPROM */ #define CONFIG_CMD_EEPROM -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
include/configs/CPCI405AB.h +0 -1
@@ -253,7 +253,6 @@#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2/* Bytes of address */ /* mask of address bits that overflow into the "EEPROM chip address" */ #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 0x01 -#define CONFIG_SYS_I2C_MULTI_EEPROMS 1/* more than one eeprom used! */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5/* The Catalyst CAT24WC32 has */ /* 32 byte page write mode using*/ /* last 5 bits of the address */
include/configs/CPCI750.h +0 -1
@@ -167,7 +167,6 @@* Miscellaneous configurable options */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_SPEED 80000/* I2C speed default */ #define CONFIG_PRAM 0
include/configs/DB64360.h +0 -1
@@ -250,7 +250,6 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"* Miscellaneous configurable options */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_SPEED 40000/* I2C speed default */ /* #define CONFIG_SYS_GT_DUAL_CPU also for JTAG even with one cpu */
include/configs/DB64460.h +0 -1
@@ -188,7 +188,6 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"* Miscellaneous configurable options */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_SPEED 40000/* I2C speed default */ /* #define CONFIG_SYS_GT_DUAL_CPU also for JTAG even with one cpu */
include/configs/DU440.h +0 -1
@@ -170,7 +170,6 @@#define IIC1_USB2507_ADDR 0x2c#define CONFIG_SYS_I2C_NOPROBES { {1, IIC1_USB2507_ADDR} } -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5
include/configs/P1010RDB.h +0 -1
@@ -661,7 +661,6 @@ extern unsigned long get_sdram_size(void);#endif /* enable read and write access to EEPROM */ #define CONFIG_CMD_EEPROM -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
include/configs/PMC440.h +0 -1
@@ -156,7 +156,6 @@#define CONFIG_SYS_I2C_PPC4XX_SPEED_1 400000#define CONFIG_SYS_I2C_PPC4XX_SLAVE_1 0x7F -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR 0x54#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
include/configs/TQM834x.h +0 -1
@@ -181,7 +181,6 @@#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2/* 16 bit */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5/* 32 bytes/write */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 12/* 10ms +/- 20% */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS /* more than one eeprom */ /* I2C RTC */ #define CONFIG_RTC_DS1337 /* use ds1337 rtc via i2c */
include/configs/W7OLMC.h +0 -1
@@ -273,7 +273,6 @@#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 4/* The Catalyst CAT24WC08 has */ /* 16 byte page write mode using*/ /* last 4 bits of the address */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS /*----------------------------------------------------------------------- * Definitions for Serial Presence Detect EEPROM address * (to get SDRAM settings)
include/configs/W7OLMG.h +0 -1
@@ -276,7 +276,6 @@#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50/* EEPROM ATMEL 24C04N */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1/* Bytes of address */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 -#define CONFIG_SYS_I2C_MULTI_EEPROMS /*----------------------------------------------------------------------- * Definitions for Serial Presence Detect EEPROM address * (to get SDRAM settings)
include/configs/acadia.h +0 -1
@@ -120,7 +120,6 @@*----------------------------------------------------------------------*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/am335x_evm.h +0 -1
@@ -209,7 +209,6 @@#define CONFIG_ENV_EEPROM_IS_ON_I2C #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50/* Main EEPROM */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 -#define CONFIG_SYS_I2C_MULTI_EEPROMS /* PMIC support */ #define CONFIG_POWER_TPS65217
include/configs/am43xx_evm.h +0 -1
@@ -30,7 +30,6 @@#define CONFIG_ENV_EEPROM_IS_ON_I2C #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50/* Main EEPROM */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 -#define CONFIG_SYS_I2C_MULTI_EEPROMS /* Power */ #define CONFIG_POWER
include/configs/axs101.h +0 -1
@@ -98,7 +98,6 @@/* * EEPROM configuration */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xA8 >> 1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW 1
include/configs/bamboo.h +0 -1
@@ -139,7 +139,6 @@*----------------------------------------------------------------------*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/canyonlands.h +0 -1
@@ -246,7 +246,6 @@*----------------------------------------------------------------------*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/cpci5200.h +0 -1
@@ -173,7 +173,6 @@#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20 -#define CONFIG_SYS_I2C_MULTI_EEPROMS 1/* * Flash configuration */
include/configs/ebony.h +0 -1
@@ -123,7 +123,6 @@*----------------------------------------------------------------------*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/icon.h +0 -1
@@ -107,7 +107,6 @@#define CONFIG_SYS_SPD_BUS_NUM 0/* The I2C bus for SPD */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/intip.h +0 -1
@@ -217,7 +217,6 @@*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/katmai.h +0 -1
@@ -109,7 +109,6 @@#define IIC0_BOOTPROM_ADDR 0x50#define IIC0_ALT_BOOTPROM_ADDR 0x54 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0x50)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/km/km-powerpc.h +0 -1
@@ -21,7 +21,6 @@#define CONFIG_KM_COMMON_ETH_INIT /* EEprom support 24C08, 24C16, 24C64 */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3/* 8 Byte write page */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
include/configs/km/km_arm.h +0 -1
@@ -218,7 +218,6 @@ int get_scl(void);#define CONFIG_SYS_I2C_SOFT_SPEED 100000/* EEprom support 24C128, 24C256 valid for environment eeprom */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6/* 64 Byte write page */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
include/configs/korat.h +0 -1
@@ -147,7 +147,6 @@#define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000#define CONFIG_SYS_I2C_PPC4XX_SLAVE_0 0x7F -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/ks2_evm.h +0 -1
@@ -120,7 +120,6 @@#define I2C_BUS_MAX 3/* EEPROM definitions */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6
include/configs/luan.h +0 -1
@@ -119,7 +119,6 @@*----------------------------------------------------------------------*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/m28evk.h +0 -1
@@ -97,7 +97,6 @@/* EEPROM */ #ifdef CONFIG_CMD_EEPROM -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2#endif
include/configs/mecp5200.h +0 -1
@@ -148,7 +148,6 @@#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20 -#define CONFIG_SYS_I2C_MULTI_EEPROMS 1/* * Flash configuration */
include/configs/motionpro.h +0 -1
@@ -296,7 +296,6 @@#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 1/* 2 bytes per write cycle */ #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5/* 2ms/cycle + 3ms extra */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS 1/* 2 EEPROMs (addr:50,52) */ /* * RTC configuration
include/configs/ocotea.h +0 -1
@@ -136,7 +136,6 @@*----------------------------------------------------------------------*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/p1_p2_rdb_pc.h +0 -1
@@ -665,7 +665,6 @@/* enable read and write access to EEPROM */ #define CONFIG_CMD_EEPROM -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
include/configs/p1_twr.h +0 -1
@@ -261,7 +261,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);/* enable read and write access to EEPROM */ #define CONFIG_CMD_EEPROM -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
include/configs/pcm051.h +0 -1
@@ -109,7 +109,6 @@#define CONFIG_ENV_EEPROM_IS_ON_I2C #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50/* Main EEPROM */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \ 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
include/configs/pengwyn.h +0 -1
@@ -112,7 +112,6 @@#define CONFIG_ENV_EEPROM_IS_ON_I2C #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 -#define CONFIG_SYS_I2C_MULTI_EEPROMS /* SPL */ #define CONFIG_SPL_POWER_SUPPORT
include/configs/pf5200.h +0 -1
@@ -165,7 +165,6 @@#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 5#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20 -#define CONFIG_SYS_I2C_MULTI_EEPROMS 1/* * Flash configuration */
include/configs/sequoia.h +0 -1
@@ -160,7 +160,6 @@*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/t3corp.h +0 -1
@@ -307,7 +307,6 @@*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/taishan.h +0 -1
@@ -121,7 +121,6 @@*----------------------------------------------------------------------*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#undef CONFIG_SYS_I2C_MULTI_EEPROMS#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/tricorder.h +0 -1
@@ -109,7 +109,6 @@/* EEPROM */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_CMD_EEPROM #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2#define CONFIG_SYS_EEPROM_BUS_NUM 1
include/configs/walnut.h +0 -1
@@ -80,7 +80,6 @@*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
include/configs/yosemite.h +0 -1
@@ -122,7 +122,6 @@*----------------------------------------------------------------------*/ #define CONFIG_SYS_I2C_PPC4XX_SPEED_0 400000 -#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8>>1)#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
Signature · 1 line
2.1.1
PATCH 11/25 eeprom: Zap CONFIG_SYS_EEPROM_X40430
In reply to Marek VasutNow that the only user of CONFIG_SYS_EEPROM_X40430 was removed, remove this unused code from cmd_eeprom.c
--- common/cmd_eeprom.c | 95 ----------------------------------------------------- 1 file changed, 95 deletions(-)
common/cmd_eeprom.c +0 -95
@@ -29,11 +29,6 @@#define CONFIG_SYS_I2C_SPEED 50000#endif -/* Maximum number of times to poll for acknowledge after write */ -#if defined(CONFIG_SYS_EEPROM_X40430 ) -#define MAX_ACKNOWLEDGE_POLLS 10 -#endif -/* * for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 2 (16-bit EEPROM address) offset is * 0x000nxxxx for EEPROM address selectors at n, offset xxxx in EEPROM.
@@ -143,14 +138,6 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnunsigned blk_off;int rcode =0 ; -#if defined(CONFIG_SYS_EEPROM_X40430 ) -uchar contr_r_addr[2 ]; -uchar addr_void[2 ]; -uchar contr_reg[2 ]; -uchar ctrl_reg_v; -int i; -#endif -#if defined(CONFIG_SYS_EEPROM_WREN )eeprom_write_enable (dev_addr,1 );#endif
@@ -215,88 +202,6 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn#if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C )spi_write (addr, alen, buffer, len);#else -#if defined(CONFIG_SYS_EEPROM_X40430 ) -/* Get the value of the control register. -* Set current address (internal pointer in the x40430) -* to 0x1ff. -*/ - contr_r_addr[0 ] =9 ; - contr_r_addr[1 ] =0xff ; - addr_void[0 ] =0 ; - addr_void[1 ] = addr[1 ]; -#ifdef CONFIG_SYS_I2C_EEPROM_ADDR - contr_r_addr[0 ] |=CONFIG_SYS_I2C_EEPROM_ADDR ; - addr_void[0 ] |=CONFIG_SYS_I2C_EEPROM_ADDR ; -#endif - contr_reg[0 ] =0xff ; -if (i2c_read (contr_r_addr[0 ], contr_r_addr[1 ],1 , contr_reg,1 ) !=0 ) { - rcode =1 ; - } - ctrl_reg_v = contr_reg[0 ]; - -/* Are any of the eeprom blocks write protected? -*/ -if (ctrl_reg_v &0x18 ) { - ctrl_reg_v &= ~0x18 ;/* reset block protect bits */ - ctrl_reg_v |=0x02 ;/* set write enable latch */ - ctrl_reg_v &= ~0x04 ;/* clear RWEL */ - -/* Set write enable latch. -*/ - contr_reg[0 ] =0x02 ; -if (i2c_write (contr_r_addr[0 ],0xff ,1 , contr_reg,1 ) !=0 ) { - rcode =1 ; - } - -/* Set register write enable latch. -*/ - contr_reg[0 ] =0x06 ; -if (i2c_write (contr_r_addr[0 ],0xFF ,1 , contr_reg,1 ) !=0 ) { - rcode =1 ; - } - -/* Modify ctrl register. -*/ - contr_reg[0 ] = ctrl_reg_v; -if (i2c_write (contr_r_addr[0 ],0xFF ,1 , contr_reg,1 ) !=0 ) { - rcode =1 ; - } - -/* The write (above) is an operation on NV memory. -* These can take some time (~5ms), and the device -* will not respond to further I2C messages till -* it's completed the write. -* So poll device for an I2C acknowledge. -* When we get one we know we can continue with other -* operations. -*/ - contr_reg[0 ] =0 ; -for (i =0 ; i <MAX_ACKNOWLEDGE_POLLS ; i++) { -if (i2c_read (addr_void[0 ], addr_void[1 ],1 , contr_reg,1 ) ==0 ) -break ;/* got ack */ -#if defined(CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS ) -udelay (CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS *1000 ); -#endif - } -if (i ==MAX_ACKNOWLEDGE_POLLS ) { -puts ("EEPROM poll acknowledge failed\n" ); - rcode =1 ; - } - } - -/* Is the write enable latch on?. -*/ -else if (!(ctrl_reg_v &0x02 )) { -/* Set write enable latch. -*/ - contr_reg[0 ] =0x02 ; -if (i2c_write (contr_r_addr[0 ],0xFF ,1 , contr_reg,1 ) !=0 ) { - rcode =1 ; - } - } -/* Write is enabled ... now write eeprom value. -*/ -#endif if (i2c_write (addr[0 ], offset, alen -1 , buffer, len)) rcode =1 ;
Signature · 1 line
2.1.1
PATCH 12/25 eeprom: Zap eeprom_probe()
In reply to Marek VasutRemove this function as it's no longer used.
--- common/cmd_eeprom.c | 19 ------------------- include/common.h | 3 --- 2 files changed, 22 deletions(-)
common/cmd_eeprom.c +0 -19
@@ -219,25 +219,6 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnreturn rcode; } -#if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -int eeprom_probe (unsigned dev_addr,unsigned offset) -{ -unsigned char chip; - -/* Probe the chip address -*/ -#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN ==1 && !defined(CONFIG_SPI_X ) - chip = offset >>8 ;/* block number */ -#else - chip = offset >>16 ;/* block number */ -#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN, CONFIG_SPI_X */ - - chip |= dev_addr;/* insert device address */ - -return (i2c_probe (chip)); -} -#endif -static int do_eeprom (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { const char *const fmt =
include/common.h +0 -3
@@ -456,9 +456,6 @@ void fdc_hw_init (void);/* $(BOARD)/eeprom.c */ void eeprom_init (void ); -#ifndef CONFIG_SPI -int eeprom_probe (unsigned dev_addr,unsigned offset); -#endif int eeprom_read (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt);int eeprom_write (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt);#ifdef CONFIG_LWMON
Signature · 1 line
2.1.1
PATCH 13/25 eeprom: Zap CONFIG_SPI_X
In reply to Marek VasutThis macro is no longer used, so just reap it.
--- README | 5 ----- common/cmd_eeprom.c | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-)
README +0 -5
@@ -2609,11 +2609,6 @@ CBFS (Coreboot Filesystem) support Enables the driver for SPI controller on SuperH. Currently only SH7757 is supported. - CONFIG_SPI_X - - Enables extended (16-bit) SPI EEPROM addressing. - (symmetrical to CONFIG_I2C_X) - CONFIG_SOFT_SPI Enables a software (bit-bang) SPI driver rather than
common/cmd_eeprom.c +4 -4
@@ -83,7 +83,7 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cntunsigned maxlen;#endif -#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN ==1 && !defined(CONFIG_SPI_X ) +#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN ==1 uchar addr[2 ]; blk_off = offset &0xFF ;/* block offset */
@@ -100,7 +100,7 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt addr[1 ] = offset >>8 ;/* upper address octet */ addr[2 ] = blk_off;/* lower address octet */ alen =3 ; -#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN, CONFIG_SPI_X */ +#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN */ addr[0 ] |= dev_addr;/* insert device address */
@@ -153,7 +153,7 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnunsigned maxlen;#endif -#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN ==1 && !defined(CONFIG_SPI_X ) +#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN ==1 uchar addr[2 ]; blk_off = offset &0xFF ;/* block offset */
@@ -170,7 +170,7 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn addr[1 ] = offset >>8 ;/* upper address octet */ addr[2 ] = blk_off;/* lower address octet */ alen =3 ; -#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN, CONFIG_SPI_X */ +#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN */ addr[0 ] |= dev_addr;/* insert device address */
Signature · 1 line
2.1.1
PATCH 14/25 eeprom: Pull out the I/O code
In reply to Marek VasutPull out the code which does the I2C or SPI read/write, so that the beefy ifdef around it is contained in a single function.
--- common/cmd_eeprom.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-)
common/cmd_eeprom.c +26 -12
@@ -66,6 +66,29 @@ void eeprom_init(void)#endif } +static int eeprom_rw_block (unsigned offset,uchar *addr,unsigned alen, +uchar *buffer,unsigned len,bool read) +{ +int ret =0 ; + +/* SPI */ +#if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) +if (read) +spi_read (addr, alen, buffer, len); +else +spi_write (addr, alen, buffer, len); +#else /* I2C */ +if (read) + ret =i2c_read (addr[0 ], offset, alen -1 , buffer, len); +else + ret =i2c_write (addr[0 ], offset, alen -1 , buffer, len); + +if (ret) + ret =1 ; +#endif +return ret; +} +int eeprom_read (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) {unsigned end = offset + cnt;
@@ -119,12 +142,8 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt len = maxlen;#endif -#if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -spi_read (addr, alen, buffer, len); -#else -if (i2c_read (addr[0 ], offset, alen -1 , buffer, len)) - rcode =1 ; -#endif + rcode =eeprom_rw_block (offset, addr, alen, buffer, len,1 ); + buffer += len; offset += len; }
@@ -199,13 +218,8 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn len = maxlen;#endif -#if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -spi_write (addr, alen, buffer, len); -#else -if (i2c_write (addr[0 ], offset, alen -1 , buffer, len)) - rcode =1 ; + rcode =eeprom_rw_block (offset, addr, alen, buffer, len,0 ); -#endif buffer += len; offset += len;
Signature · 1 line
2.1.1
PATCH 15/25 eeprom: Pull out address computation
In reply to Marek VasutPull out the code computing the EEPROM address into separate function so that it's not duplicated.
--- common/cmd_eeprom.c | 64 ++++++++++++++++++++++------------------------------- 1 file changed, 26 insertions(+), 38 deletions(-)
common/cmd_eeprom.c +26 -38
@@ -66,6 +66,28 @@ void eeprom_init(void)#endif } +static int eeprom_addr (unsigned dev_addr,unsigned offset,uchar *addr) +{ +unsigned blk_off; +int alen; + + blk_off = offset &0xff ;/* block offset */ +#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN ==1 + addr[0 ] = offset >>8 ;/* block number */ + addr[1 ] = blk_off;/* block offset */ + alen =2 ; +#else + addr[0 ] = offset >>16 ;/* block number */ + addr[1 ] = offset >>8 ;/* upper address octet */ + addr[2 ] = blk_off;/* lower address octet */ + alen =3 ; +#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN */ + + addr[0 ] |= dev_addr;/* insert device address */ + +return alen; +} +static int eeprom_rw_block (unsigned offset,uchar *addr,unsigned alen,uchar *buffer,unsigned len,bool read) {
@@ -94,6 +116,7 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cntunsigned end = offset + cnt;unsigned blk_off;int rcode =0 ; +uchar addr[3 ];/* * Read data until done or would cross a page boundary.
@@ -106,26 +129,8 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cntunsigned maxlen;#endif -#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN ==1 -uchar addr[2 ]; - - blk_off = offset &0xFF ;/* block offset */ - - addr[0 ] = offset >>8 ;/* block number */ - addr[1 ] = blk_off;/* block offset */ - alen =2 ; -#else -uchar addr[3 ]; - blk_off = offset &0xFF ;/* block offset */ - - addr[0 ] = offset >>16 ;/* block number */ - addr[1 ] = offset >>8 ;/* upper address octet */ - addr[2 ] = blk_off;/* lower address octet */ - alen =3 ; -#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN */ - - addr[0 ] |= dev_addr;/* insert device address */ + alen =eeprom_addr (dev_addr, offset, addr); len = end - offset;
@@ -156,6 +161,7 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnunsigned end = offset + cnt;unsigned blk_off;int rcode =0 ; +uchar addr[3 ];#if defined(CONFIG_SYS_EEPROM_WREN )eeprom_write_enable (dev_addr,1 );
@@ -172,26 +178,8 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnunsigned maxlen;#endif -#if CONFIG_SYS_I2C_EEPROM_ADDR_LEN ==1 -uchar addr[2 ]; - blk_off = offset &0xFF ;/* block offset */ - - addr[0 ] = offset >>8 ;/* block number */ - addr[1 ] = blk_off;/* block offset */ - alen =2 ; -#else -uchar addr[3 ]; - - blk_off = offset &0xFF ;/* block offset */ - - addr[0 ] = offset >>16 ;/* block number */ - addr[1 ] = offset >>8 ;/* upper address octet */ - addr[2 ] = blk_off;/* lower address octet */ - alen =3 ; -#endif /* CONFIG_SYS_I2C_EEPROM_ADDR_LEN */ - - addr[0 ] |= dev_addr;/* insert device address */ + alen =eeprom_addr (dev_addr, offset, addr); len = end - offset;
Signature · 1 line
2.1.1
PATCH 16/25 eeprom: Make eeprom_write_enable() weak
In reply to Marek VasutMake this function weak and implement it's weak implementation so that the boards can just reimplement it. This zaps the horrid CONFIG_SYS_EEPROM_WREN macro.
--- common/cmd_eeprom.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
common/cmd_eeprom.c +9 -9
@@ -44,9 +44,10 @@#endif #endif -#if defined(CONFIG_SYS_EEPROM_WREN ) -extern int eeprom_write_enable (unsigned dev_addr,int state); -#endif +__weak int eeprom_write_enable (unsigned dev_addr,int state) +{ +return 0 ; +}void eeprom_init (void ) {
@@ -163,9 +164,8 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnint rcode =0 ;uchar addr[3 ]; -#if defined(CONFIG_SYS_EEPROM_WREN ) -eeprom_write_enable (dev_addr,1 ); -#endif +eeprom_write_enable (dev_addr,1 ); +/* * Write data until done or would cross a write page boundary. * We must write the address again when changing pages
@@ -215,9 +215,9 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnudelay (CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS *1000 );#endif } -#if defined(CONFIG_SYS_EEPROM_WREN ) -eeprom_write_enable (dev_addr,0 ); -#endif + +eeprom_write_enable (dev_addr,0 ); +return rcode; }
Signature · 1 line
2.1.1
PATCH 17/25 eeprom: Pull out CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
In reply to Marek VasutPull this macro to the beginning of the cmd_eeprom.c and remove another nasty ifdef from the code. Note that this is legal, since udelay(0) changes the behavior only such that it pings the WDT if WDT is enabled and otherwise does not wait.
--- common/cmd_eeprom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
common/cmd_eeprom.c +4 -2
@@ -29,6 +29,10 @@#define CONFIG_SYS_I2C_SPEED 50000#endif +#ifndef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 0 +#endif +/* * for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 2 (16-bit EEPROM address) offset is * 0x000nxxxx for EEPROM address selectors at n, offset xxxx in EEPROM.
@@ -211,9 +215,7 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn buffer += len; offset += len; -#if defined(CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS )udelay (CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS *1000 ); -#endif }eeprom_write_enable (dev_addr,0 );
Signature · 1 line
2.1.1
PATCH 18/25 eeprom: Suck the ifdef into eeprom_init()
In reply to Marek VasutJust suck the ugly ifdef around eeprom_init() call into eeprom_init() function itself. This puts all of the ifdef mess into one place.
--- common/cmd_eeprom.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
common/cmd_eeprom.c +5 -3
@@ -55,6 +55,8 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state)void eeprom_init (void ) { +# if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) +/* SPI EEPROM */ #if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C )spi_init_f ();
@@ -69,6 +71,8 @@ void eeprom_init(void)i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE );#endif #endif + +# endif /* !CONFIG_SPI */ }static int eeprom_addr (unsigned dev_addr,unsigned offset,uchar *addr)
@@ -248,9 +252,7 @@ static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) off =simple_strtoul (*args++,NULL ,16 ); cnt =simple_strtoul (*args++,NULL ,16 ); -# if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -eeprom_init (); -# endif /* !CONFIG_SPI */ +eeprom_init ();if (strcmp (argv[1 ],"read" ) ==0 ) {printf (fmt, dev_addr, argv[1 ], addr, off, cnt);
Signature · 1 line
2.1.1
PATCH 19/25 eeprom: Pull out CONFIG_SYS_EEPROM_PAGE_WRITE_BITS
In reply to Marek VasutImplement default value of 8 for this macro and pull out all of this macro out of the code. The default value of 8 actually does implement exactly the same behavior as the previous code which was in the #else clause of the ifdef.
--- common/cmd_eeprom.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
common/cmd_eeprom.c +8 -8
@@ -33,6 +33,13 @@#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 0#endif +#ifndef CONFIG_SYS_EEPROM_PAGE_WRITE_BITS +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 8 +#endif + +#define EEPROM_PAGE_SIZE (1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS) +#define EEPROM_PAGE_OFFSET (x) ((x) & (EEPROM_PAGE_SIZE - 1)) +/* * for CONFIG_SYS_I2C_EEPROM_ADDR_LEN == 2 (16-bit EEPROM address) offset is * 0x000nxxxx for EEPROM address selectors@n, offset xxxx in EEPROM.
@@ -198,15 +205,8 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn*/ #if !defined(CONFIG_SYS_I2C_FRAM ) -#if defined(CONFIG_SYS_EEPROM_PAGE_WRITE_BITS ) - -#define EEPROM_PAGE_SIZE (1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS) -#define EEPROM_PAGE_OFFSET (x) ((x) & (EEPROM_PAGE_SIZE - 1)) - maxlen =EEPROM_PAGE_SIZE -EEPROM_PAGE_OFFSET (blk_off); -#else - maxlen =0x100 - blk_off; -#endif +if (maxlen >I2C_RXTX_LEN ) maxlen =I2C_RXTX_LEN ;
Signature · 1 line
2.1.1
PATCH 20/25 eeprom: Pull out transfer length computation
In reply to Marek VasutPull out the code which computes the length of the transfer into separate code and clean it up a little. This again trims down the code duplication.
--- common/cmd_eeprom.c | 66 ++++++++++++++++++++--------------------------------- 1 file changed, 25 insertions(+), 41 deletions(-)
common/cmd_eeprom.c +25 -41
@@ -104,6 +104,29 @@ static int eeprom_addr(unsigned dev_addr, unsigned offset, uchar *addr)return alen; } +static int eeprom_len (unsigned offset,unsigned end) +{ +unsigned len = end - offset; + +/* +* For a FRAM device there is no limit on the number of the +* bytes that can be ccessed with the single read or write +* operation. +*/ +#if !defined(CONFIG_SYS_I2C_FRAM ) +unsigned blk_off = offset &0xff ; +unsigned maxlen =EEPROM_PAGE_SIZE -EEPROM_PAGE_OFFSET (blk_off); + +if (maxlen >I2C_RXTX_LEN ) + maxlen =I2C_RXTX_LEN ; + +if (len > maxlen) + len = maxlen; +#endif + +return len; +} +static int eeprom_rw_block (unsigned offset,uchar *addr,unsigned alen,uchar *buffer,unsigned len,bool read) {
@@ -130,7 +153,6 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen,int eeprom_read (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) {unsigned end = offset + cnt; -unsigned blk_off;int rcode =0 ;uchar addr[3 ];
@@ -141,27 +163,10 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt*/ while (offset < end) {unsigned alen, len; -#if !defined(CONFIG_SYS_I2C_FRAM ) -unsigned maxlen; -#endif - blk_off = offset &0xFF ;/* block offset */ alen =eeprom_addr (dev_addr, offset, addr); - len = end - offset; - -/* -* For a FRAM device there is no limit on the number of the -* bytes that can be ccessed with the single read or write -* operation. -*/ -#if !defined(CONFIG_SYS_I2C_FRAM ) - maxlen =0x100 - blk_off; -if (maxlen >I2C_RXTX_LEN ) - maxlen =I2C_RXTX_LEN ; -if (len > maxlen) - len = maxlen; -#endif + len =eeprom_len (offset, end); rcode =eeprom_rw_block (offset, addr, alen, buffer, len,1 );
@@ -175,7 +180,6 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cntint eeprom_write (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) {unsigned end = offset + cnt; -unsigned blk_off;int rcode =0 ;uchar addr[3 ];
@@ -189,30 +193,10 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnwhile (offset < end) {unsigned alen, len; -#if !defined(CONFIG_SYS_I2C_FRAM ) -unsigned maxlen; -#endif - blk_off = offset &0xFF ;/* block offset */ alen =eeprom_addr (dev_addr, offset, addr); - len = end - offset; - -/* -* For a FRAM device there is no limit on the number of the -* bytes that can be accessed with the single read or write -* operation. -*/ -#if !defined(CONFIG_SYS_I2C_FRAM ) - - maxlen =EEPROM_PAGE_SIZE -EEPROM_PAGE_OFFSET (blk_off); - -if (maxlen >I2C_RXTX_LEN ) - maxlen =I2C_RXTX_LEN ; - -if (len > maxlen) - len = maxlen; -#endif + len =eeprom_len (offset, end); rcode =eeprom_rw_block (offset, addr, alen, buffer, len,0 );
Signature · 1 line
2.1.1
PATCH 21/25 eeprom: Pull out the RW loop
In reply to Marek VasutUnify the code for doing read/write into single function, since the code for both the read and write is almost identical. This again trims down the code duplication.
--- common/cmd_eeprom.c | 51 +++++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 30 deletions(-)
common/cmd_eeprom.c +21 -30
@@ -150,38 +150,44 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen,return ret; } -int eeprom_read (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) +static int eeprom_rw (unsigned dev_addr,unsigned offset,uchar *buffer, +unsigned cnt,bool read) {unsigned end = offset + cnt; +unsigned alen, len;int rcode =0 ;uchar addr[3 ]; -/* -* Read data until done or would cross a page boundary. -* We must write the address again when changing pages -* because the next page may be in a different device. -*/ while (offset < end) { -unsigned alen, len; - alen =eeprom_addr (dev_addr, offset, addr); len =eeprom_len (offset, end); - rcode =eeprom_rw_block (offset, addr, alen, buffer, len,1 ); + rcode =eeprom_rw_block (offset, addr, alen, buffer, len, read); buffer += len; offset += len; + +if (!read) +udelay (CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS *1000 ); }return rcode; } -int eeprom_write (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) +int eeprom_read (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) { -unsigned end = offset + cnt; -int rcode =0 ; -uchar addr[3 ]; +/* +* Read data until done or would cross a page boundary. +* We must write the address again when changing pages +* because the next page may be in a different device. +*/ +return eeprom_rw (dev_addr, offset, buffer, cnt,1 ); +} + +int eeprom_write (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) +{ +int ret;eeprom_write_enable (dev_addr,1 );
@@ -190,25 +196,10 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn* We must write the address again when changing pages * because the address counter only increments within a page. */ - -while (offset < end) { -unsigned alen, len; - - alen =eeprom_addr (dev_addr, offset, addr); - - len =eeprom_len (offset, end); - - rcode =eeprom_rw_block (offset, addr, alen, buffer, len,0 ); - - buffer += len; - offset += len; - -udelay (CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS *1000 ); - } + ret =eeprom_rw (dev_addr, offset, buffer, cnt,1 );eeprom_write_enable (dev_addr,0 ); - -return rcode; +return ret; }static int do_eeprom (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[])
Signature · 1 line
2.1.1
PATCH 22/25 eeprom: Cultivate the ifdef mess
In reply to Marek VasutJust squash the ad-hoc ifdef chaos into single #else statement. It's not worth having so many checks in place, since this only leads to complicated code and if the first test for SPI && not env in I2C EEPROM fails, then we're dealing with I2C EEPROM.
--- common/cmd_eeprom.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
common/cmd_eeprom.c +3 -9
@@ -62,24 +62,18 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state)void eeprom_init (void ) { -# if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -/* SPI EEPROM */ #if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C ) -spi_init_f (); -#endif - +spi_init_f (); +#else /* I2C EEPROM */ -#if defined(CONFIG_HARD_I2C ) || defined(CONFIG_SYS_I2C_SOFT ) || \ - defined(CONFIG_SYS_I2C )#ifdef CONFIG_SYS_I2C i2c_init_all ();#else i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE );#endif -#endif -# endif /* !CONFIG_SPI */ +#endif }static int eeprom_addr (unsigned dev_addr,unsigned offset,uchar *addr)
Signature · 1 line
2.1.1
PATCH 23/25 eeprom: Add bus argument to eeprom_init()
In reply to Marek VasutAdd bus argument to eeprom_init(), so that it can select the I2C bus number on which the eeprom resides. Any negative value of the $bus argument will preserve the old behavior. This is in place so that old code does not randomly break.
--- common/cmd_eeprom.c | 7 ++++--- common/env_eeprom.c | 4 ++-- include/common.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-)
common/cmd_eeprom.c +4 -3
@@ -60,7 +60,7 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state)return 0 ; } -void eeprom_init (void ) +void eeprom_init (int bus) {/* SPI EEPROM */ #if defined(CONFIG_SPI ) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C )
@@ -72,7 +72,8 @@ void eeprom_init(void)#else i2c_init (CONFIG_SYS_I2C_SPEED ,CONFIG_SYS_I2C_SLAVE );#endif - +if (bus >=0 ) +i2c_set_bus_num (bus);#endif }
@@ -221,7 +222,7 @@ static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) off =simple_strtoul (*args++,NULL ,16 ); cnt =simple_strtoul (*args++,NULL ,16 ); -eeprom_init (); +eeprom_init (-1 );if (strcmp (argv[1 ],"read" ) ==0 ) {printf (fmt, dev_addr, argv[1 ], addr, off, cnt);
common/env_eeprom.c +2 -2
@@ -153,7 +153,7 @@ int env_init(void)uchar buf[64 ], flags[2 ];int i, crc_ok[2 ] = {0 ,0 }; -eeprom_init ();/* prepare for EEPROM read/write */ +eeprom_init (-1 );/* prepare for EEPROM read/write */ off_env[0 ] =CONFIG_ENV_OFFSET ; off_env[1 ] =CONFIG_ENV_OFFSET_REDUND ;
@@ -227,7 +227,7 @@ int env_init(void)unsigned off;uchar buf[64 ]; -eeprom_init ();/* prepare for EEPROM read/write */ +eeprom_init (-1 );/* prepare for EEPROM read/write */ /* read old CRC */ eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR,
include/common.h +1 -1
@@ -455,7 +455,7 @@ void reset_phy (void);void fdc_hw_init (void );/* $(BOARD)/eeprom.c */ -void eeprom_init (void ); +void eeprom_init (int bus);int eeprom_read (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt);int eeprom_write (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt);#ifdef CONFIG_LWMON
Signature · 1 line
2.1.1
PATCH 24/25 eeprom: Add support for selecting i2c bus
In reply to Marek VasutAdd additional parameter into the eeprom command to select the I2C bus on which the eeprom resides.
--- common/cmd_eeprom.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
common/cmd_eeprom.c +11 -4
@@ -204,14 +204,21 @@ static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])char *const *args = &argv[2 ];int rcode;ulong dev_addr, addr, off, cnt; +int bus_addr;switch (argc) {#ifdef CONFIG_SYS_DEF_EEPROM_ADDR case 5 : + bus_addr =-1 ; dev_addr =CONFIG_SYS_DEF_EEPROM_ADDR ;break ;#endif case 6 : + bus_addr =-1 ; + dev_addr =simple_strtoul (*args++,NULL ,16 ); +break ; +case 7 : + bus_addr =simple_strtoul (*args++,NULL ,16 ); dev_addr =simple_strtoul (*args++,NULL ,16 );break ;default :
@@ -222,7 +229,7 @@ static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) off =simple_strtoul (*args++,NULL ,16 ); cnt =simple_strtoul (*args++,NULL ,16 ); -eeprom_init (-1 ); +eeprom_init (bus_addr);if (strcmp (argv[1 ],"read" ) ==0 ) {printf (fmt, dev_addr, argv[1 ], addr, off, cnt);
@@ -244,9 +251,9 @@ static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) }U_BOOT_CMD ( - eeprom,6 ,1 , do_eeprom, + eeprom,7 ,1 , do_eeprom,"EEPROM sub-system" , -"read devaddr addr off cnt\n" -"eeprom write devaddr addr off cnt\n" +"read <bus> <devaddr> addr off cnt\n" +"eeprom write <bus> <devaddr> addr off cnt\n" " - read/write `cnt' bytes from `devaddr` EEPROM at offset `off'" )
Signature · 1 line
2.1.1
PATCH 25/25 eeprom: Clean up checkpatch issues
In reply to Marek VasutCosmetic fixes to the file, make it checkpatch clean.
--- common/cmd_eeprom.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
common/cmd_eeprom.c +10 -9
@@ -49,8 +49,8 @@*/ #if !defined(CONFIG_SPI ) || defined(CONFIG_ENV_EEPROM_IS_ON_I2C )#if !defined(CONFIG_SYS_I2C_EEPROM_ADDR_LEN ) || \ - (CONFIG_SYS_I2C_EEPROM_ADDR_LEN <1 ) || \ - (CONFIG_SYS_I2C_EEPROM_ADDR_LEN >2 ) + (CONFIG_SYS_I2C_EEPROM_ADDR_LEN <1 ) || \ + (CONFIG_SYS_I2C_EEPROM_ADDR_LEN >2 )#error CONFIG_SYS_I2C_EEPROM_ADDR_LEN must be 1 or 2#endif #endif
@@ -180,7 +180,8 @@ int eeprom_read(unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt)return eeprom_rw (dev_addr, offset, buffer, cnt,1 ); } -int eeprom_write (unsigned dev_addr,unsigned offset,uchar *buffer,unsigned cnt) +int eeprom_write (unsigned dev_addr,unsigned offset, +uchar *buffer,unsigned cnt) {int ret;
@@ -231,19 +232,19 @@ static int do_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])eeprom_init (bus_addr); -if (strcmp (argv[1 ],"read" ) ==0 ) { +if (strcmp (argv[1 ],"read" ) ==0 ) {printf (fmt, dev_addr, argv[1 ], addr, off, cnt); - rcode =eeprom_read (dev_addr, off, (uchar *) addr, cnt); + rcode =eeprom_read (dev_addr, off, (uchar *)addr, cnt); -puts ("done\n" ); +puts ("done\n" );return rcode; - }else if (strcmp (argv[1 ],"write" ) ==0 ) { + }else if (strcmp (argv[1 ],"write" ) ==0 ) {printf (fmt, dev_addr, argv[1 ], addr, off, cnt); - rcode =eeprom_write (dev_addr, off, (uchar *) addr, cnt); + rcode =eeprom_write (dev_addr, off, (uchar *)addr, cnt); -puts ("done\n" ); +puts ("done\n" );return rcode; }
Signature · 1 line
2.1.1